]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
Don't throw an error in 'info registers' for unavailable MIPS registers.
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-06-19 John Baldwin <jhb@FreeBSD.org>
2
3 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4 registers.
5
6 2017-06-19 Pedro Alves <palves@redhat.com>
7
8 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9 after gdb::unlinker.
10
11 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
12
13 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
14 gdb_environ to access an environment variable.
15
16 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
17
18 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
19 gdb_byte*.
20
21 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
22
23 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
24
25 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
26
27 * configure: Re-generate.
28 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
29
30 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
31
32 * configure: Re-generate.
33 * warning.m4: Pass -Werror to compiler when checking for
34 supported warning flags.
35
36 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
37
38 * Makefile.in (COMPILE.pre): Add "-x c++".
39
40 2017-06-16 Alan Hayward <alan.hayward@arm.com>
41 Pedro Alves <palves@redhat.com>
42 Yao Qi <yao.qi@linaro.org>
43
44 * defs.h (RequireLongest): New.
45 (extract_integer): Declare function template.
46 (extract_signed_integer): Remove the declaration, but define it
47 static inline.
48 (extract_unsigned_integer): Likewise.
49 (store_integer): Declare function template.
50 (store_signed_integer): Remove the declaration, but define it
51 static inline.
52 (store_unsigned_integer): Likewise.
53 * findvar.c (extract_integer): New function template.
54 (extract_signed_integer): Remove.
55 (extract_unsigned_integer): Remove.
56 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
57 instantiations.
58 (store_integer): New function template.
59 (store_signed_integer): Remove.
60 (store_unsigned_integer): Remove.
61 (store_integer): Explicit instantiations.
62 * regcache.c (regcache_raw_read_signed): Update.
63 (regcache::raw_read): New function.
64 (regcache::raw_read_signed): Remove.
65 (regcache::raw_read_unsigned): Remove.
66 (regcache_raw_read_unsigned): Update.
67 (regcache_raw_write_unsigned): Update.
68 (regcache::raw_write_signed): Remove.
69 (regcache::raw_write): New function.
70 (regcache_cooked_read_signed): Update.
71 (regcache::raw_write_unsigned): Remove.
72 (regcache::cooked_read_signed): Remove.
73 (regcache_cooked_read_unsigned): Update.
74 (regcache::cooked_read_unsigned): Remove.
75 (regcache_cooked_write_signed): Update.
76 (regcache_cooked_write_unsigned): Update.
77 * regcache.h (regcache) <raw_read_signed>: Remove.
78 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
79 <raw_read, raw_write>: New.
80 <cooked_read_signed, cooked_write_signed>: Remove.
81 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
82 <cooked_read, cooked_write>: New.
83 * sh64-tdep.c (sh64_pseudo_register_read): Update.
84 (sh64_pseudo_register_write): Update.
85
86 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
87
88 * arc-tdep.c (arc_disassembler_options): New variable.
89 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
90 of default_print_insn.
91 (arc_delayed_print_insn): Set info->section when needed,
92 use default_print_insn to retrieve a disassembler.
93
94 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
95
96 PR gdb/21574
97 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
98 to mention $SHELL and startup-with-shell.
99
100 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
101
102 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
103
104 2017-06-14 Yao Qi <yao.qi@linaro.org>
105
106 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
107 default_print_insn instead of print_insn_aarch64.
108 * arm-tdep.c (gdb_print_insn_arm): Call
109 default_print_insn instead of print_insn_big_arm
110 and print_insn_little_arm.
111 * i386-tdep.c (i386_print_insn): Call default_print_insn
112 instead of print_insn_i386.
113 * ia64-tdep.c (ia64_print_insn): Call
114 default_print_insn instead of print_insn_ia64.
115 * mips-tdep.c (gdb_print_insn_mips): Call
116 default_print_insn instead of print_insn_big_mips
117 and print_insn_little_mips.
118 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
119 instead of print_insn_spu.
120
121 2017-06-14 Pedro Alves <palves@redhat.com>
122
123 * ada-lang.c: Include "common/byte-vector.h".
124 (ada_value_primitive_packed_val): Use gdb::byte_vector.
125 * charset.c (wchar_iterator::iterate): Resize the vector instead
126 of reserving it.
127 * common/byte-vector.h: Include "common/def-vector.h".
128 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
129 * cli/cli-dump.c: Include "common/byte-vector.h".
130 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
131 * common/byte-vector.h: New file.
132 * common/def-vector.h: New file.
133 * common/default-init-alloc.h: New file.
134 * dwarf2loc.c: Include "common/byte-vector.h".
135 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
136 instead of reserving it.
137 * dwarf2read.c: Include "common/byte-vector.h".
138 (data_buf::m_vec): Now a gdb::byte_vector.
139 * gdb_regex.c: Include "common/def-vector.h".
140 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
141 * mi/mi-main.c: Include "common/byte-vector.h".
142 (mi_cmd_data_read_memory): Use gdb::byte_vector.
143 * printcmd.c: Include "common/byte-vector.h".
144 (print_scalar_formatted): Use gdb::byte_vector.
145 * valprint.c: Include "common/byte-vector.h".
146 (maybe_negate_by_bytes, print_decimal_chars): Use
147 gdb::byte_vector.
148
149 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
150
151 * darwin-nat.c: Include "nat/fork-inferior.h".
152
153 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
154
155 * configure.nat: Factor out Darwin bits that are not
156 architecture-specific. Add fork-inferior.o.
157
158 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
159
160 * configure.nat: Factor out AIX bits that are not
161 architecture-specific. Add fork-inferior.o.
162
163 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
164
165 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
166 (read_pieced_value, write_pieced_value): ...here. Reduce to
167 wrappers that just call rw_pieced_value.
168
169 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
170
171 * dwarf2loc.c (write_pieced_value): When writing the data for a
172 memory piece, use write_memory_with_notification instead of
173 write_memory.
174
175 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
176
177 * valops.c (read_value_memory): Change embedded_offset to
178 represent a bit offset instead of a byte offset.
179 * value.h (read_value_memory): Adjust comment.
180
181 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
182
183 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
184 dest_offset_bits and source_offset_bits.
185 (write_pieced_value): Likewise.
186
187 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
188
189 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
190 given by DW_OP_bit_piece.
191 (write_pieced_value): Likewise.
192
193 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
194
195 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
196 some other preparations to the places where sufficient information
197 is available.
198 (write_pieced_value): Likewise.
199
200 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
201
202 * dwarf2loc.c (bits_to_bytes): New function.
203 (read_pieced_value): Fix offset calculations for register pieces
204 on big-endian targets.
205 (write_pieced_value): Likewise.
206
207 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
208
209 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
210 (write_pieced_value): Likewise.
211
212 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
213
214 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
215 transfer the source value's least significant bits, instead of its
216 lowest-addressed ones. Rename type_len to max_offset.
217 (read_pieced_value): Mirror above changes to write_pieced_value as
218 applicable.
219
220 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
221
222 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
223 truncate full bytes from dest_offset_bits before using it as an
224 offset into the buffer.
225
226 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
227
228 * dwarf2loc.c (write_pieced_value): Include transfer size in
229 byte-wise check.
230
231 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
232
233 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
234 calculation of this_size.
235
236 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
237
238 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
239 when targeting a bit-field.
240 (write_pieced_value): Likewise.
241
242 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
243
244 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
245 (allocate_piece_closure): Drop addr_size parameter.
246 (dwarf2_evaluate_loc_desc_full): Adjust call to
247 allocate_piece_closure.
248
249 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
250
251 PR gdb/21226
252 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
253 the LSB end, independent of endianness.
254
255 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
256
257 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
258 size capping.
259
260 2017-06-13 Yao Qi <yao.qi@linaro.org>
261
262 * mips-linux-nat.c: Move include features/mips*-linux.c to
263 mips-linux-tdep.c.
264 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
265 to mips-linux-tdep.c.
266 * mips-linux-tdep.c: Include features/mips*-linux.c
267 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
268 functions.
269 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
270 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
271 (tdesc_mips64_dsp_linux): Declare.
272
273 2017-06-12 Tom Tromey <tom@tromey.com>
274
275 * valprint.h (val_print_type_code_int): Remove.
276 * valprint.c (generic_val_print_int): Always call
277 val_print_scalar_formatted.
278 (val_print_type_code_int): Remove.
279 * printcmd.c (print_scalar_formatted): Handle options->format==0.
280 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
281 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
282 * ada-valprint.c (ada_val_print_num): Use
283 val_print_scalar_formatted.
284
285 2017-06-12 Tom Tromey <tom@tromey.com>
286
287 * printcmd.c (print_scalar_formatted): Unify the two switches.
288 Don't convert scalars to LONGEST.
289
290 2017-06-12 Tom Tromey <tom@tromey.com>
291
292 PR exp/16225:
293 * valprint.h (print_decimal_chars): Update.
294 * valprint.c (maybe_negate_by_bytes): New function.
295 (print_decimal_chars): Add "is_signed" argument.
296 * printcmd.c (print_scalar_formatted): Update.
297
298 2017-06-12 Tom Tromey <tom@tromey.com>
299
300 PR exp/16225:
301 * valprint.h (print_binary_chars, print_hex_chars): Update.
302 * valprint.c (val_print_type_code_int): Update.
303 (print_binary_chars): Add "zero_pad" argument.
304 (emit_octal_digit): New function.
305 (print_octal_chars): Don't zero-pad.
306 (print_decimal_chars): Likewise.
307 (print_hex_chars): Add "zero_pad" argument.
308 * sh64-tdep.c (sh64_do_fp_register): Update.
309 * regcache.c (regcache::dump): Update.
310 * printcmd.c (print_scalar_formatted): Update.
311 * infcmd.c (default_print_one_register_info): Update.
312
313 2017-06-12 Pedro Alves <palves@redhat.com>
314 Alan Hayward <alan.hayward@arm.com>
315
316 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
317 (mips_eabi_push_dummy_call): Rename local 'regsize' to
318 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
319 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
320 Assert that abi_regsize bytes fit in 'ref_valbuf'.
321
322 2017-06-12 Pedro Alves <palves@redhat.com>
323
324 * dwarf2read.c (mapped_symtab::data): Now a vector of
325 symtab_index_entry instead of vector of
326 std::unique_ptr<symtab_index_entry>. All users adjusted to check
327 whether an element's name is NULL instead of checking whether the
328 element itself is NULL.
329 (find_slot): Change return type. Adjust.
330 (hash_expand, , add_index_entry, uniquify_cu_indices)
331 (write_hash_table): Adjust.
332
333 2017-06-12 Pedro Alves <palves@redhat.com>
334
335 * dwarf2read.c (recursively_count_psymbols): New function.
336 (write_psymtabs_to_index): Call it to compute number of psyms and
337 pass estimate size of psyms_seen to unordered_set's ctor.
338
339 2017-06-12 Pedro Alves <palves@redhat.com>
340
341 * dwarf2read.c (write_hash_table): Check if key already exists
342 before emplacing.
343
344 2017-06-12 Pedro Alves <palves@redhat.com>
345
346 * dwarf2read.c (data_buf::append_space): Rename to...
347 (data_buf::grow): ... this, and make private. Adjust all callers.
348 (data_buf::append_uint): New method.
349 (add_address_entry, write_one_signatured_type)
350 (write_psymtabs_to_index): Use it.
351
352 2017-06-12 Pedro Alves <palves@redhat.com>
353
354 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
355 (file_write (FILE *, const std::vector<Elem>&)): Delete.
356 (data_buf::file_write): Call ::fwrite directly.
357
358 2017-06-12 Pedro Alves <palves@redhat.com>
359
360 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
361 std::vector::erase.
362
363 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
364
365 Code cleanup: C++ify .gdb_index producer.
366 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
367 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
368 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
369 (create_strtab, add_string): Remove.
370 (file_write, data_buf): New.
371 (struct symtab_index_entry): Use std::vector for cu_indices.
372 (struct mapped_symtab): Use std::vector for data.
373 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
374 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
375 Remove.
376 (find_slot): Change return type. Update it to the new data structures.
377 (hash_expand, add_index_entry): Update it to the new data structures.
378 (offset_type_compare): Remove.
379 (uniquify_cu_indices): Update it to the new data structures.
380 (c_str_view, c_str_view_hasher, vector_hasher): New.
381 (add_indices_to_cpool): Remove.
382 (write_hash_table): Update it to the new data structures.
383 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
384 (eq_psymtab_cu_index): Remove.
385 (psym_index_map): New typedef.
386 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
387 reference and std::unordered_map for cu_index_htab.
388 (add_address_entry, add_address_entry_worker, write_address_map)
389 (write_psymbols): Update it to the new data structures.
390 (write_obstack): Remove.
391 (struct signatured_type_index_data): Change types_list to a data_buf
392 reference and psyms_seen to a std::unordered_set reference.
393 (write_one_signatured_type, recursively_write_psymbols)
394 (write_psymtabs_to_index): Update it to the new data structures.
395
396 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
397
398 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
399 separate-debug-file commands.
400 * symfile.h (separate_debug_file_debug): New global.
401 * symfile.c (separate_debug_file_debug): New global.
402 (separate_debug_file_exists, find_separate_debug_file): Add
403 debug output.
404 (_initialize_symfile): Add "set debug separate-debug-file"
405 command.
406 * build-id.c (build_id_to_debug_bfd,
407 find_separate_debug_file_by_buildid): Add debug output.
408
409 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
410
411 * gdbarch.sh (displaced_step_free_closure): Remove.
412 * gdbarch.h, gdbarch.c: Re-generate.
413 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
414 displaced_step_free_closure.
415 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
416 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
417 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
418 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
419 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
420 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
421 * arch-utils.h (simple_displaced_step_free_closure): Remove.
422 * arch-utils.c (simple_displaced_step_free_closure): Remove.
423 * infrun.c (displaced_step_clear): Call xfree instead of
424 gdbarch_displaced_step_free_closure.
425
426 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
427
428 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
429 NULL".
430
431 2017-06-08 Alan Hayward <alan.hayward@arm.com>
432
433 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
434 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
435 (mn10300_push_dummy_call): Likewise.
436
437 2017-06-08 Alan Hayward <alan.hayward@arm.com>
438
439 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
440
441 2017-06-08 Alan Hayward <alan.hayward@arm.com>
442
443 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
444
445 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
446
447 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
448 able to start inferiors using a shell.
449 (New remote packets): Announce new packet "QStartupWithShell".
450 * remote.c: Add PACKET_QStartupWithShell.
451 (extended_remote_create_inferior): Handle new
452 PACKET_QStartupWithShell.
453 (remote_protocol_features) <QStartupWithShell>: New entry for
454 PACKET_QStartupWithShell.
455 (_initialize_remote): Call "add_packet_config_cmd" for
456 QStartupShell.
457
458 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
459 Pedro Alves <palves@redhat.com>
460
461 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
462 and "nat/fork-inferior.h".
463 * common/common-inferior.h: New file, with contents from
464 "gdb/inferior.h".
465 * commom/common-utils.c: Include "common-utils.h".
466 (stringify_argv): New function.
467 * common/common-utils.h (stringify_argv): New prototype.
468 * configure.nat: Add "fork-inferior.o" as a dependency for
469 "*linux*", "fbsd*" and "nbsd*" hosts.
470 * corefile.c (get_exec_file): Update comment.
471 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
472 instead of "startup_inferior".
473 (darwin_create_inferior): Call "add_thread_silent" after
474 "fork_inferior".
475 * fork-child.c: Cleanup unnecessary includes.
476 (SHELL_FILE): Move to "common/common-fork-child.c".
477 (environ): Likewise.
478 (exec_wrapper): Initialize.
479 (get_exec_wrapper): New function.
480 (breakup_args): Move to "common/common-fork-child.c"; rename to
481 "breakup_args_for_exec".
482 (escape_bang_in_quoted_argument): Move to
483 "common/common-fork-child.c".
484 (saved_ui): New variable.
485 (prefork_hook): New function.
486 (postfork_hook): Likewise.
487 (postfork_child_hook): Likewise.
488 (gdb_startup_inferior): Likewise.
489 (fork_inferior): Move to "common/common-fork-child.c". Update
490 function to support gdbserver.
491 (startup_inferior): Likewise.
492 * gdbcore.h (get_exec_file): Remove declaration.
493 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
494 instead of "startup_inferior". Call "add_thread_silent" after
495 "fork_inferior".
496 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
497 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
498 instead of "startup_inferior". Call "add_thread_silent" after
499 "fork_inferior".
500 * inferior.h: Include "common-inferior.h".
501 (trace_start_error): Move to "common/common-utils.h".
502 (trace_start_error_with_name): Likewise.
503 (fork_inferior): Move prototype to "nat/fork-inferior.h".
504 (startup_inferior): Likewise.
505 (gdb_startup_inferior): New prototype.
506 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
507 * nat/fork-inferior.h: New file.
508 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
509 instead of "startup_inferior". Call "add_thread_silent" after
510 "fork_inferior".
511 * target.h (target_terminal_init): Move prototype to
512 "target/target.h".
513 (target_terminal_inferior): Likewise.
514 (target_terminal_ours): Likewise.
515 * target/target.h (target_terminal_init): New prototype, moved
516 from "target.h".
517 (target_terminal_inferior): Likewise.
518 (target_terminal_ours): Likewise.
519 * utils.c (gdb_flush_out_err): New function.
520
521 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
522
523 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
524 * common/common-gdbthread.h: New file, with parts from
525 "gdb/gdbthread.h".
526 * gdbthread.h: Include "common-gdbthread.h".
527 (switch_to_thread): Moved to "common/common-gdbthread.h".
528
529 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
530
531 * Makefile.in (SFILES): Add "common/job-control.c".
532 (HFILES_NO_SRCDIR): Add "common/job-control.h".
533 (COMMON_OBS): Add "job-control.o".
534 * common/job-control.c: New file, with contents from
535 "gdb/inflow.c".
536 * common/job-control.h: New file, with contents from "terminal.h".
537 * fork-child.c: Include "job-control.h".
538 * inflow.c: Include "job-control.h".
539 (gdb_setpgid): Move to "common/common-inflow.c".
540 (_initialize_inflow): Move setting of "job_control" to
541 "handle_job_control".
542 * terminal.h (job_control): Moved to "common/common-terminal.h".
543 (gdb_setpgid): Likewise.
544 * top.c: Include "job_control.h".
545 * utils.c: Likewise.
546 (job_control): Moved to "job-control.c".
547
548 2017-06-07 Pedro Alves <palves@redhat.com>
549
550 * Makefile.in (SFILES): Add gdb_regex.c.
551 (COMMON_OBS): Add gdb_regex.o.
552 * ada-lang.c (ada_add_standard_exceptions)
553 (ada_add_exceptions_from_frame, name_matches_regex)
554 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
555 parameter type to compiled_regex. Adjust.
556 (ada_exceptions_list): Use compiled_regex.
557 * break-catch-throw.c (exception_catchpoint::pattern): Now a
558 std::unique_ptr<compiled_regex>.
559 (exception_catchpoint::~exception_catchpoint): Remove regfree
560 call.
561 (check_status_exception_catchpoint): Adjust to use compiled_regex.
562 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
563 * breakpoint.c (solib_catchpoint::compiled): Now a
564 std::unique_ptr<compiled_regex>.
565 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
566 (check_status_catch_solib): Adjust to use compiled_regex.
567 (add_solib_catchpoint): Adjust to use compiled_regex.
568 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
569 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
570 compiled_regex reference. Adjust to use it.
571 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
572 declaration. Include "gdb_regex.h".
573 (apropos_cmd): Change regex parameter to compiled_regex reference.
574 * gdb_regex.c: New file.
575 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
576 declarations.
577 (class compiled_regex): New.
578 * linux-tdep.c: Include "common/gdb_optional.h".
579 (struct mapping_regexes): New, factored out from
580 mapping_is_anonymous_p, and adjusted to use compiled_regex.
581 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
582 gdb::optional and remove cleanups. Adjust to compiled_regex.
583 * probe.c: Include "common/gdb_optional.h".
584 (collect_probes): Use compiled_regex and gdb::optional and remove
585 cleanups.
586 * skip.c: Include "common/gdb_optional.h".
587 (skiplist_entry::compiled_function_regexp): Now a
588 gdb::optional<compiled_regex>.
589 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
590 (free_skiplist_entry): Remove regfree call.
591 (compile_skip_regexp, skip_rfunction_p): Adjust to use
592 compiled_regex and gdb::optional.
593 * symtab.c: Include "common/gdb_optional.h".
594 (search_symbols): Use compiled_regex and gdb::optional.
595 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
596 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
597 to gdb_regex.c.
598
599 2017-06-07 Alan Hayward <alan.hayward@arm.com>
600
601 * regcache.c (regcache::save): Avoid buffer use.
602 (regcache::dump): Likewise.
603
604 2017-06-07 Alan Hayward <alan.hayward@arm.com>
605
606 * sh-tdep.c (sh_pseudo_register_read): Remove
607 MAX_REGISTER_SIZE.
608 (sh_pseudo_register_write): Likewise.
609 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
610 (sh64_pseudo_register_write): Likewise
611
612 2017-06-07 Alan Hayward <alan.hayward@arm.com>
613
614 * aarch64-tdep.c (aarch64_store_return_value): Use
615 V_REGISTER_SIZE.
616 (aarch64_pseudo_read_value): Likewise.
617 (aarch64_pseudo_write): Likewise.
618
619 2017-06-06 Yao Qi <yao.qi@linaro.org>
620
621 * regformats/regdef.h (set_register_cache): Remove the
622 declaration.
623
624 2017-06-06 Alan Hayward <alan.hayward@arm.com>
625
626 * frame.c (frame_unwind_register_signed): Use
627 frame_unwind_register_value.
628
629 2017-06-06 Pedro Alves <palves@redhat.com>
630
631 PR breakpoints/21553
632 * breakpoint.c (create_breakpoints_sal_default)
633 (init_breakpoint_sal, create_breakpoint_sal): Use
634 gdb::unique_xmalloc_ptr for string parameters.
635 (create_breakpoint): Constify 'extra_string' and 'cond_string'
636 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
637 (base_breakpoint_create_breakpoints_sal)
638 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
639 (strace_marker_create_breakpoints_sal)
640 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
641 string parameters.
642 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
643 gdb::unique_xmalloc_ptr for string parameters.
644 (create_breakpoint): Constify 'extra_string' and 'cond_string'
645 parameters.
646
647 2017-06-06 Alan Hayward <alan.hayward@arm.com>
648
649 * alpha-tdep.c (alpha_register_to_value): Use
650 get_frame_register_value.
651 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
652
653 2017-06-06 Alan Hayward <alan.hayward@arm.com>
654
655 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
656 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
657 (ia64_value_to_register): Likewise.
658 (ia64_extract_return_value): Likewise.
659 (ia64_store_return_value): Likewise.
660 (ia64_push_dummy_call): Likewise.
661
662 2017-06-04 Joel Brobecker <brobecker@adacore.com>
663
664 GDB 8.0 released.
665
666 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
667
668 * x86-linux-nat.c (struct arch_lwp_info): Remove.
669
670 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
671
672 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
673 parameter.
674 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
675
676 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
677
678 * event-loop.c (poll_timers): Unallocate timer using delete
679 instead of xfree.
680
681 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
682
683 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
684 (struct breakpoint) <~breakpoint>: New.
685 (struct watchpoint): Inherit from breakpoint.
686 <~watchpoint>: New.
687 <base>: Remove.
688 (struct tracepoint): Inherit from breakpoint.
689 <base>: Remove.
690 * breakpoint.c (longjmp_breakpoint_ops): Remove.
691 (struct longjmp_breakpoint): Inherit from breakpoint.
692 <~longjmp_breakpoint>: New.
693 <base>: Remove.
694 (new_breakpoint_from_type): Remove casts.
695 (watchpoint_in_thread_scope): Remove reference to base field.
696 (watchpoint_del_at_next_stop): Likewise.
697 (update_watchpoint): Likewise.
698 (watchpoint_check): Likewise.
699 (bpstat_check_watchpoint): Likewise.
700 (set_longjmp_breakpoint): Likewise.
701 (struct fork_catchpoint): Inherit from breakpoint.
702 <base>: Remove.
703 (struct solib_catchpoint): Inherit from breakpoint.
704 <~solib_catchpoint>: New.
705 <base>: Remove.
706 (dtor_catch_solib): Change to ...
707 (solib_catchpoint::~solib_catchpoint): ... this.
708 (breakpoint_hit_catch_solib): Remove reference to base field.
709 (add_solib_catchpoint): Likewise.
710 (create_fork_vfork_event_catchpoint): Likewise.
711 (struct exec_catchpoint): Inherit from breakpoint.
712 <~exec_catchpoint>: New.
713 <base>: Remove.
714 (dtor_catch_exec): Change to ...
715 (exec_catchpoint::~exec_catchpoint): ... this.
716 (dtor_watchpoint): Change to ...
717 (watchpoint::~watchpoint): ... this.
718 (watch_command_1): Remove reference to base field.
719 (catch_exec_command_1): Likewise.
720 (base_breakpoint_dtor): Change to ...
721 (breakpoint::~breakpoint): ... this.
722 (base_breakpoint_ops): Remove dtor field value.
723 (longjmp_bkpt_dtor): Change to ...
724 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
725 (strace_marker_create_breakpoints_sal): Remove reference to base
726 field.
727 (delete_breakpoint): Don't manually call breakpoint destructor.
728 (create_tracepoint_from_upload): Remove reference to base field.
729 (trace_pass_set_count): Likewise.
730 (initialize_breakpoint_ops): Don't initialize
731 momentary_breakpoint_ops, don't set dtors.
732 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
733 <~ada_catchpoint>: New.
734 <base>: Remove.
735 (create_excep_cond_exprs): Remove reference to base field.
736 (dtor_exception): Change to ...
737 (ada_catchpoint::~ada_catchpoint): ... this.
738 (dtor_catch_exception): Remove.
739 (dtor_catch_exception_unhandled): Remove.
740 (dtor_catch_assert): Remove.
741 (create_ada_exception_catchpoint): Remove reference to base
742 field.
743 (initialize_ada_catchpoint_ops): Don't set dtors.
744 * break-catch-sig.c (struct signal_catchpoint): Inherit from
745 breakpoint.
746 <~signal_catchpoint>: New.
747 <base>: Remove.
748 (signal_catchpoint_dtor): Change to ...
749 (signal_catchpoint::~signal_catchpoint): ... this.
750 (create_signal_catchpoint): Remove reference to base field.
751 (initialize_signal_catchpoint_ops): Don't set dtor.
752 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
753 from breakpoint.
754 <~syscall_catchpoint>: New.
755 <base>: Remove.
756 (dtor_catch_syscall): Change to ...
757 (syscall_catchpoint::~syscall_catchpoint): ... this.
758 (create_syscall_event_catchpoint): Remove reference to base
759 field.
760 (initialize_syscall_catchpoint_ops): Don't set dtor.
761 * break-catch-throw.c (struct exception_catchpoint): Inherit
762 from breakpoint.
763 <~exception_catchpoint>: New.
764 <base>: Remove.
765 (dtor_exception_catchpoint): Change to ...
766 (exception_catchpoint::~exception_catchpoint): ... this.
767 (handle_gnu_v3_exceptions): Remove reference to base field.
768 (initialize_throw_catchpoint_ops): Don't set dtor.
769 * ctf.c (ctf_get_traceframe_address): Remove reference to base
770 field.
771 * remote.c (remote_get_tracepoint_status): Likewise.
772 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
773 * tracefile.c (tracefile_fetch_registers): Likewise.
774 * tracepoint.c (actions_command): Likewise.
775 (validate_actionline): Likewise.
776 (tfind_1): Likewise.
777 (get_traceframe_location): Likewise.
778 (find_matching_tracepoint_location): Likewise.
779 (parse_tracepoint_status): Likewise.
780 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
781
782 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
783
784 * breakpoint.c (struct longjmp_breakpoint): New struct.
785 (is_tracepoint_type): Change return type to bool.
786 (is_longjmp_type): New function.
787 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
788 (set_raw_breakpoint_without_location): Use
789 new_breakpoint_from_type.
790 (set_raw_breakpoint): Likewise.
791
792 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
793
794 * breakpoint.c (new_breakpoint_from_type): New function.
795 (create_breakpoint_sal): Use new_breakpoint_from_type and
796 unique_ptr.
797 (create_breakpoint): Likewise.
798
799 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
800
801 * memattr.c (mem_info_command): Rename to ...
802 (info_mem_command): ... this.
803 (mem_enable_command): Rename to ...
804 (enable_mem_command): ... this.
805 (mem_disable_command): Rename to ...
806 (disable_mem_command): ... this.
807 (mem_delete_command): Rename to ...
808 (delete_mem_command): ... this.
809 (_initialize_mem): Adjust function names.
810
811 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
812
813 * btrace.c (handle_pt_insn_events): New.
814 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
815 STATUS. Split into this and ...
816 (handle_pt_insn_event_flags): ... this.
817
818 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
819
820 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
821 and struct pt_insn.resynced.
822 * configure: Regenerated.
823 * config.in: Regenerated.
824
825 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
826
827 * btrace.c (ftrace_find_call_by_number): New function.
828 (ftrace_new_function): Store objects, not pointers.
829 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
830 ftrace_new_gap, ftrace_update_function,
831 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
832 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
833 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
834 btrace_ends_with_single_insn, btrace_call_get): Account for
835 btrace_thread_info::functions now storing objects.
836 * btrace.h (struct btrace_thread_info): Add constructor.
837 (struct btrace_thread_info) <functions>: Make std::vector.
838 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
839 Initialize with default values.
840 * record-btrace.c (record_btrace_frame_sniffer): Account for
841 btrace_thread_info::functions now storing objects.
842
843 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
844
845 * btrace.c: Remove typedef bfun_s.
846 (ftrace_new_gap): Directly add gaps to the list of gaps.
847 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
848 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
849 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
850 instead of gdb VEC.
851
852 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
853
854 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
855 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
856 with btrace_thread_info::next_segment and
857 btrace_thread_info::prev_segment.
858 * btrace.h: Remove struct btrace_func_link.
859 (struct btrace_function): Replace pair of function segment pointers
860 with pair of indices.
861 * python/py-record-btrace.c (btpy_call_prev_sibling,
862 btpy_call_next_sibling): Replace references to
863 btrace_thread_info::segment with btrace_thread_info::next_segment and
864 btrace_thread_info::prev_segment.
865 * record-btrace.c (record_btrace_frame_this_id): Use
866 btrace_find_call_by_number.
867
868 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
869
870 * btrace.c (ftrace_new_function, ftrace_fixup_level,
871 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
872 btrace_insn_next, btrace_insn_prev): Remove references to
873 btrace_thread_info::flow.
874 * btrace.h (struct btrace_function): Remove FLOW.
875
876 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
877
878 * btrace.c (ftrace_find_call_by_number): New function.
879 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
880 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
881 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
882 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
883 index.
884 * btrace.h (struct btrace_function): Turn UP into an index.
885 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
886 as an index.
887 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
888 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
889 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
890
891 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
892
893 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
894 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
895 ftrace_update_function, ftrace_compute_global_level_offset,
896 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
897 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
898 btrace_insn_end, btrace_is_empty): Remove references to
899 btrace_thread_info::begin and btrace_thread_info::end.
900 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
901 (struct btrace_thread_info) <functions>: Adjust comment.
902 * record-btrace.c (record_btrace_start_replaying): Remove reference to
903 btrace_thread_info::begin.
904
905 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
906
907 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
908 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
909 ftrace_update_function): Remove arguments that implicitly were always
910 BTINFO->END.
911 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
912 Don't pass BTINFO->END.
913
914 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
915
916 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
917 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
918 btrace_find_insn_by_number): Replace function segment pointer with
919 index.
920 (btrace_insn_cmp): Simplify.
921 * btrace.h: (struct btrace_insn_iterator) Rename index to
922 insn_index. Replace function segment pointer with index into function
923 segment vector.
924 * record-btrace.c (record_btrace_call_history): Replace function
925 segment pointer use with index.
926 (record_btrace_frame_sniffer): Retrieve function call segment through
927 vector.
928 (record_btrace_set_replay): Remove defunc't safety check.
929
930 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
931
932 * btrace.c (btrace_ends_with_single_insn): New function.
933 (btrace_call_get, btrace_call_number, btrace_call_begin,
934 btrace_call_end, btrace_call_next, btrace_call_prev,
935 btrace_find_call_by_number): Use index into call segment vector
936 instead of pointer.
937 (btrace_call_cmp): Simplify.
938 * btrace.h (struct btrace_call_iterator): Replace function call segment
939 pointer with index into vector.
940 * record-btrace.c (record_btrace_call_history): Use index instead of
941 pointer.
942
943 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
944
945 * btrace.c (btrace_insn_begin, btrace_insn_end,
946 btrace_find_insn_by_number): Add btinfo to iterator.
947 * btrace.h (struct btrace_insn_iterator): Add btinfo.
948
949 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
950
951 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
952 and save pointers directly.
953 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
954 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
955 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
956 changed signature of functions.
957 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
958 (btrace_fetch): Remove code that adds btrace_function pointers to
959 vector of btrace_functions.
960 (btrace_clear): Simplify freeing vector of btrace_functions.
961
962 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
963
964 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
965 Replace VEC_* with std::vector functions.
966 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
967 (struct btrace_thread_info)<functions>: Change type to std::vector.
968
969 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
970
971 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
972 "Removed targets and native configurations" up. Merge duplicate
973 "New commands" sub-sections. Add "New options" sub-sections.
974
975 2017-05-26 Alan Hayward <alan.hayward@arm.com>
976
977 * defs.h (copy_integer_to_size): New declaration.
978 * findvar.c (copy_integer_to_size): New function.
979 (do_cint_test): New selftest function.
980 (copy_integer_to_size_test): Likewise.
981 (_initialize_findvar): Likewise.
982 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
983 (mips_fbsd_collect_reg): Use raw_collect_integer.
984 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
985 (mips64_fill_gregset): Use raw_collect_integer
986 (mips64_fill_fpregset): Use raw_supply_integer.
987 * regcache.c (regcache::raw_supply_integer): New function.
988 (regcache::raw_collect_integer): Likewise.
989 * regcache.h: (regcache::raw_supply_integer): New declaration.
990 (regcache::raw_collect_integer): Likewise.
991
992 2017-05-24 Yao Qi <yao.qi@linaro.org>
993
994 * Makefile.in (SFILES): Add gdbarch-selftests.c.
995 (COMMON_OBS): Add gdbarch-selftests.o.
996 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
997 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
998 * gdbarch-selftests.c: New file.
999 * regcache.h (regcache) <~regcache>: Mark it virtual if
1000 GDB_SELF_TEST.
1001 <raw_write>: Likewise.
1002
1003 2017-05-24 Yao Qi <yao.qi@linaro.org>
1004
1005 * regcache.c (current_regcache): Change it to
1006 regcache::current_regcache.
1007 (regcache_observer_target_changed): Update.
1008 (regcache_thread_ptid_changed): Make it a regcache static
1009 method.
1010 (regcache_thread_ptid_changed): Update.
1011 (class regcache_access): New.
1012 (current_regcache_test): Update.
1013 (_initialize_regcache): Update.
1014 * regcache.h: Include forward_list.
1015 (regcache): Declare regcache_thread_ptid_changed and declare
1016 registers_changed_ptid as friend.
1017
1018 2017-05-24 Yao Qi <yao.qi@linaro.org>
1019
1020 * i387-tdep.c (i387_register_to_value): Use register_size
1021 instead of TYPE_LENGTH.
1022 * m68k-tdep.c (m68k_register_to_value): Likewise.
1023
1024 2017-05-24 Yao Qi <yao.qi@linaro.org>
1025
1026 * i387-tdep.c (i387_convert_register_p): Return false if type
1027 code isn't TYPE_CODE_FLT.
1028
1029 2017-05-24 Yao Qi <yao.qi@linaro.org>
1030
1031 * alpha-tdep.c (alpha_convert_register_p): Return true if type
1032 length is 4.
1033 (alpha_register_to_value): Remove type length check.
1034 (alpha_value_to_register): Likewise.
1035
1036 2017-05-24 Yao Qi <yao.qi@linaro.org>
1037
1038 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
1039 TYPE_CODE_FLT.
1040
1041 2017-05-24 Yao Qi <yao.qi@linaro.org>
1042
1043 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
1044 TYPE_CODE_FLT or not.
1045
1046 2017-05-24 Yao Qi <yao.qi@linaro.org>
1047
1048 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
1049 * avr-tdep.c (avr_gdbarch_init): Likewise.
1050 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
1051 * cris-tdep.c (cris_gdbarch_init): Likewise.
1052 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1053 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
1054 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
1055 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
1056 * mep-tdep.c (mep_gdbarch_init): Likewise.
1057 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
1058 * mips-tdep.c (mips_gdbarch_init): Likewise.
1059 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
1060 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
1061 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
1062 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
1063 * v850-tdep.c (v850_gdbarch_init): Likewise.
1064
1065 2017-05-24 Yao Qi <yao.qi@linaro.org>
1066
1067 * selftest-arch.c (tests_with_arch): Call registers_changed
1068 and reinit_frame_cache.
1069 * selftest.c (run_self_tests): Likewise.
1070
1071 2017-05-24 Yao Qi <yao.qi@linaro.org>
1072
1073 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
1074 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
1075
1076 2017-05-24 Yao Qi <yao.qi@linaro.org>
1077
1078 * rl78-tdep.c (rl78_gdbarch_init): Don't call
1079 set_gdbarch_print_insn.
1080
1081 2017-05-24 Yao Qi <yao.qi@linaro.org>
1082
1083 * h8300-tdep.c (h8300_gdbarch_init): Don't call
1084 set_gdbarch_print_insn.
1085
1086 2017-05-24 Yao Qi <yao.qi@linaro.org>
1087
1088 * alpha-tdep.c (alpha_gdbarch_init): Don't call
1089 set_gdbarch_print_insn.
1090 * arc-tdep.c (arc_gdbarch_init): Likewise.
1091 * arch-utils.c: include dis-asm.h.
1092 (default_print_insn): New function.
1093 * arch-utils.h (default_print_insn): Declare.
1094 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
1095 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
1096 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
1097 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
1098 * frv-tdep.c (frv_gdbarch_init): Likewise.
1099 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1100 * gdbarch.sh (print_insn): Use default_print_insn.
1101 * gdbarch.c: Regenerated.
1102 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
1103 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
1104 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
1105 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
1106 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
1107 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
1108 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
1109 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
1110 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
1111 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
1112 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
1113 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
1114 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
1115 * mt-tdep.c (mt_gdbarch_init): Likewise.
1116 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
1117 * nios2-tdep.c (nios2_print_insn): Remove.
1118 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
1119 * rx-tdep.c (rx_gdbarch_init): Likewise.
1120 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
1121 * score-tdep.c (score_print_insn): Remove.
1122 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
1123 * sh-tdep.c (sh_gdbarch_init): Likewise.
1124 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
1125 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
1126 * tic6x-tdep.c (tic6x_print_insn): Remove.
1127 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
1128 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
1129 * v850-tdep.c (v850_gdbarch_init): Likewise.
1130 * vax-tdep.c (vax_gdbarch_init): Likewise.
1131 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
1132 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
1133
1134 2017-05-23 John Baldwin <jhb@FreeBSD.org>
1135
1136 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
1137 (MIPS_FP0_REGNUM): Remove.
1138 (MIPS_FSR_REGNUM): Remove.
1139 (mips_fbsd_supply_fpregs): Use mips_regnum.
1140 (mips_fbsd_supply_gregs): Likewise.
1141 (mips_fbsd_collect_fpregs): Likewise.
1142 (mips_fbsd_collect_gregs): Likewise.
1143
1144 2017-05-23 John Baldwin <jhb@FreeBSD.org>
1145
1146 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
1147 (getpfpregs_supplies): New function.
1148 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
1149 getfpregs_supplies.
1150 (mips_fbsd_store_inferior_registers): Likewise.
1151
1152 2017-05-22 Pedro Alves <palves@redhat.com>
1153
1154 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
1155 maintainer.
1156
1157 2017-05-22 Alan Hayward <alan.hayward@arm.com>
1158
1159 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
1160 (store_register): Likewise.
1161 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
1162 (get_decimal_float_return_value): Likewise.
1163 (do_ppc_sysv_return_value): Likewise.
1164 (ppc64_sysv_abi_push_integer): Likewise.
1165 (ppc64_sysv_abi_push_freg): Likewise.
1166 (ppc64_sysv_abi_return_value_base): Likewise.
1167 (ppc64_sysv_abi_return_value): Likewise.
1168 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
1169 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
1170 * rs6000-nat.c: Likewise.
1171 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
1172 (rs6000_value_to_register): Likewise.
1173 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
1174
1175 2017-05-21 Tom Tromey <tom@tromey.com>
1176
1177 PR rust/21466:
1178 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
1179 arrays as "[T]", not "[T; ]".
1180
1181 2017-05-19 Tom Tromey <tom@tromey.com>
1182
1183 PR rust/21484:
1184 * rust-lang.c (exp_descriptor_rust): New function.
1185 (rust_language_defn): Use it.
1186 * p-lang.c (pascal_language_defn): Update.
1187 * opencl-lang.c (opencl_language_defn): Update.
1188 * objc-lang.c (objc_language_defn): Update.
1189 * m2-lang.c (m2_language_defn): Update.
1190 * language.h (struct language_defn)
1191 <la_watch_location_expression>: New member.
1192 * language.c (unknown_language_defn, auto_language_defn)
1193 (local_language_defn): Update.
1194 * go-lang.c (go_language_defn): Update.
1195 * f-lang.c (f_language_defn): Update.
1196 * d-lang.c (d_language_defn): Update.
1197 * c-lang.h (c_watch_location_expression): Declare.
1198 * c-lang.c (c_watch_location_expression): New function.
1199 (c_language_defn, cplus_language_defn, asm_language_defn)
1200 (minimal_language_defn): Use it.
1201 * breakpoint.c (watch_command_1): Call
1202 la_watch_location_expression.
1203 * ada-lang.c (ada_language_defn): Update.
1204
1205 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1206
1207 PR tui/21482
1208 * gdb_curses.h (NOMACROS): Define.
1209 (NCURSES_NOMACROS): Define.
1210
1211 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1212
1213 PR tui/21482
1214 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
1215 arg to char *.
1216 * tui/tui-wingeneral.c (box_win): Likewise.
1217 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
1218 (tui_show_source_line): Likewise.
1219 (tui_show_exec_info_content): Likewise.
1220
1221 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
1222
1223 * sparc-tdep.c (sparc_structure_return_p)
1224 (sparc_arg_on_registers_p): New functions.
1225 (sparc32_store_arguments): Use them.
1226 * sparc64-tdep.c (sparc64_16_byte_align_p)
1227 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
1228 Handle TYPE_CODE_ARRAY.
1229
1230 2017-05-17 Yao Qi <yao.qi@linaro.org>
1231
1232 * cli/cli-decode.c (add_alias_cmd): New function.
1233 * command.h (add_alias_cmd): Declare.
1234 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
1235 instead call add_alias_cmd.
1236
1237 2017-05-17 Pedro Alves <palves@redhat.com>
1238
1239 * Makefile.in (nat_extra_makefile_frag): Rename to ...
1240 (nat_makefile_frag): ... this. All references updated.
1241 * configure.ac: Likewise.
1242 * configure.nat: Likewise. Enhance comments.
1243 * configure: Regenerate.
1244
1245 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1246
1247 * procfs.c (procfs_create_inferior): Change prototype to match
1248 definition.
1249
1250 2017-05-13 Eli Zaretskii <eliz@gnu.org>
1251
1252 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
1253 C++ compiler warning.
1254
1255 2017-05-12 Tom Tromey <tom@tromey.com>
1256
1257 PR rust/21483:
1258 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
1259 recurse, just call value_struct_elt directly.
1260
1261 2017-05-12 Tom Tromey <tom@tromey.com>
1262
1263 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
1264 OP_RUST_ARRAY>: Fix.
1265
1266 2017-05-12 Tom Tromey <tom@tromey.com>
1267
1268 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
1269
1270 2017-05-09 Yao Qi <yao.qi@linaro.org>
1271
1272 * regcache.c: Include <forward_list>.
1273 (struct regcache_list): Remove.
1274 (current_regcache): Update.
1275 (get_thread_arch_aspace_regcache): Update for std::forward_list.
1276 (regcache_thread_ptid_changed): Likewise.
1277 (registers_changed_ptid): Likewise.
1278 (current_regcache_size): Likewise.
1279
1280 2017-05-09 Yao Qi <yao.qi@linaro.org>
1281
1282 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
1283 (current_regcache_size): New function.
1284 (current_regcache_test): New function.
1285 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
1286
1287 2017-05-08 Alan Hayward <alan.hayward@arm.com>
1288
1289 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
1290 (print_gp_register_row): Use get_frame_register_value.
1291
1292 2017-05-08 Alan Hayward <alan.hayward@arm.com>
1293
1294 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
1295 (mips_supply_fpregset): Likewise.
1296 (mips64_supply_gregset): Likewise.
1297
1298 2017-05-08 Alan Hayward <alan.hayward@arm.com>
1299
1300 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
1301 regcache->raw_supply_zeroed.
1302
1303 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1304
1305 * configure.nat: Rearrange 'case' statements to match
1306 host before cpu.
1307
1308 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1309
1310 * Makefile.in: Remove "@host_makefile_frag@". Add variables
1311 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
1312 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
1313 "@nat_extra_makefile_frag@".
1314 (Makefile): Remove dependency on "@frags@".
1315 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
1316 (data-directory/Makefile): Likewise.
1317 * config/aarch64/linux.mh: Deleted; moved contents to
1318 "gdb/configure.nat".
1319 * config/alpha/alpha-linux.mh: Likewise.
1320 * config/alpha/nbsd.mh: Likewise.
1321 * config/arm/linux.mh: Likewise.
1322 * config/arm/nbsdelf.mh: Likewise.
1323 * config/i386/cygwin.mh: Likewise.
1324 * config/i386/cygwin64.mh: Likewise.
1325 * config/i386/darwin.mh: Likewise.
1326 * config/i386/fbsd.mh: Likewise.
1327 * config/i386/fbsd64.mh: Likewise.
1328 * config/i386/go32.mh: Likewise.
1329 * config/i386/i386gnu.mh: Likewise.
1330 * config/i386/i386sol2.mh: Likewise.
1331 * config/i386/linux.mh: Likewise.
1332 * config/i386/linux64.mh: Likewise.
1333 * config/i386/mingw.mh: Likewise.
1334 * config/i386/mingw64.mh: Likewise.
1335 * config/i386/nbsd64.mh: Likewise.
1336 * config/i386/nbsdelf.mh: Likewise.
1337 * config/i386/nto.mh: Likewise.
1338 * config/i386/obsd.mh: Likewise.
1339 * config/i386/obsd64.mh: Likewise.
1340 * config/i386/sol2-64.mh: Likewise.
1341 * config/ia64/linux.mh: Likewise.
1342 * config/m32r/linux.mh: Likewise.
1343 * config/m68k/linux.mh: Likewise.
1344 * config/m68k/nbsdelf.mh: Likewise.
1345 * config/m68k/obsd.mh: Likewise.
1346 * config/m88k/obsd.mh: Likewise.
1347 * config/mips/fbsd.mh: Likewise.
1348 * config/mips/linux.mh: Likewise.
1349 * config/mips/nbsd.mh: Likewise.
1350 * config/mips/obsd64.mh: Likewise.
1351 * config/pa/linux.mh: Likewise.
1352 * config/pa/nbsd.mh: Likewise.
1353 * config/pa/obsd.mh: Likewise.
1354 * config/powerpc/aix.mh: Likewise.
1355 * config/powerpc/fbsd.mh: Likewise.
1356 * config/powerpc/linux.mh: Likewise.
1357 * config/powerpc/nbsd.mh: Likewise.
1358 * config/powerpc/obsd.mh: Likewise.
1359 * config/powerpc/ppc64-linux.mh: Likewise.
1360 * config/powerpc/spu-linux.mh: Likewise.
1361 * config/s390/linux.mh: Likewise.
1362 * config/sh/nbsd.mh: Likewise.
1363 * config/sparc/fbsd.mh: Likewise.
1364 * config/sparc/linux.mh: Likewise.
1365 * config/sparc/linux64.mh: Likewise.
1366 * config/sparc/nbsd64.mh: Likewise.
1367 * config/sparc/nbsdelf.mh: Likewise.
1368 * config/sparc/obsd64.mh: Likewise.
1369 * config/sparc/sol2.mh: Likewise.
1370 * config/tilegx/linux.mh: Likewise.
1371 * config/vax/nbsdelf.mh: Likewise.
1372 * config/vax/obsd.mh: Likewise.
1373 * config/xtensa/linux.mh: Likewise.
1374 * config/i386/i386gnu.mn: New file, with excerpts from
1375 "config/i386/i386gnu.mh".
1376 * configure: Regenerate.
1377 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
1378 *.mh files under "gdb/config".
1379 * configure.nat: New file, with contents from the
1380 "gdb/config/*/*.mh" files.
1381
1382 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
1383
1384 * btrace.c (btrace_clear): Free insn vector.
1385
1386 2017-05-05 Pedro Alves <palves@redhat.com>
1387
1388 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
1389 * configure: Regenerate.
1390
1391 2017-05-04 Pedro Alves <palves@redhat.com>
1392
1393 * Makefile.in (SFILES): Add progspace-and-thread.c.
1394 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
1395 (COMMON_OBS): Add progspace-and-thread.o.
1396 * breakpoint.c: Include "progspace-and-thread.h".
1397 (update_inserted_breakpoint_locations)
1398 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
1399 Use scoped_restore_current_pspace_and_thread.
1400 (create_std_terminate_master_breakpoint): Use
1401 scoped_restore_current_program_space.
1402 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
1403 (print_breakpoint_location): Use
1404 scoped_restore_current_program_space.
1405 (bp_loc_is_permanent): Use
1406 scoped_restore_current_pspace_and_thread.
1407 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
1408 (download_tracepoint_locations): Use
1409 scoped_restore_current_pspace_and_thread.
1410 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
1411 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
1412 (enum step_over_calls_kind): Moved from inferior.h.
1413 (class scoped_restore_current_thread): New class.
1414 * gdbthread.h (make_cleanup_restore_current_thread): Delete
1415 declaration.
1416 (scoped_restore_current_thread): New class.
1417 * infcmd.c: Include "common/gdb_optional.h".
1418 (continue_1, proceed_after_attach): Use
1419 scoped_restore_current_thread.
1420 (notice_new_inferior): Use scoped_restore_current_thread.
1421 * inferior.c: Include "progspace-and-thread.h".
1422 (restore_inferior, save_current_inferior): Delete.
1423 (add_inferior_command, clone_inferior_command): Use
1424 scoped_restore_current_pspace_and_thread.
1425 * inferior.h (scoped_restore_current_inferior): New class.
1426 * infrun.c: Include "progspace-and-thread.h" and
1427 "common/gdb_optional.h".
1428 (follow_fork_inferior): Use
1429 scoped_restore_current_pspace_and_thread.
1430 (scoped_restore_exited_inferior): New class.
1431 (handle_vfork_child_exec_or_exit): Use
1432 scoped_restore_exited_inferior,
1433 scoped_restore_current_pspace_and_thread,
1434 scoped_restore_current_thread and scoped_restore.
1435 (fetch_inferior_event): Use scoped_restore_current_thread.
1436 * linespec.c (decode_line_full, decode_line_1): Use
1437 scoped_restore_current_program_space.
1438 * mi/mi-main.c: Include "progspace-and-thread.h".
1439 (exec_continue): Use scoped_restore_current_thread.
1440 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
1441 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
1442 * proc-service.c (ps_pglobal_lookup): Use
1443 scoped_restore_current_program_space.
1444 * progspace-and-thread.c: New file.
1445 * progspace-and-thread.h: New file.
1446 * progspace.c (release_program_space, clone_program_space): Use
1447 scoped_restore_current_program_space.
1448 (restore_program_space, save_current_program_space)
1449 (save_current_space_and_thread): Delete.
1450 (switch_to_program_space_and_thread): Moved to
1451 progspace-and-thread.c.
1452 * progspace.h (save_current_program_space)
1453 (save_current_space_and_thread): Delete declarations.
1454 (scoped_restore_current_program_space): New class.
1455 * remote.c (remote_btrace_maybe_reopen): Use
1456 scoped_restore_current_thread.
1457 * symtab.c: Include "progspace-and-thread.h".
1458 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
1459 * thread.c (print_thread_info_1): Use
1460 scoped_restore_current_thread.
1461 (struct current_thread_cleanup): Delete.
1462 (do_restore_current_thread_cleanup)
1463 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
1464 (scoped_restore_current_thread::~scoped_restore_current_thread):
1465 ... this new dtor.
1466 (make_cleanup_restore_current_thread): Rename/convert to ...
1467 (scoped_restore_current_thread::scoped_restore_current_thread):
1468 ... this new ctor.
1469 (thread_apply_all_command): Use scoped_restore_current_thread.
1470 (thread_apply_command): Use scoped_restore_current_thread.
1471 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
1472 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
1473
1474 2017-05-04 Pedro Alves <palves@redhat.com>
1475
1476 * thread.c (make_cleanup_restore_current_thread): Move
1477 find_thread_ptid call before the is_stopped call. Assert that the
1478 thread is found. Replace is_stopped call by checking the thread's
1479 state directly. Remove unnecessary NULL-thread check.
1480
1481 2017-05-04 Pedro Alves <palves@redhat.com>
1482
1483 * corelow.c (thread_section_name): New class.
1484 (get_core_register_section, get_core_siginfo): Use it.
1485
1486 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
1487
1488 * corelow.c (sniff_core_bfd): Remove extra semicolon.
1489 (get_core_register_section): Remove xfree of NULL pointer.
1490
1491 2017-05-03 Alan Hayward <alan.hayward@arm.com>
1492
1493 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
1494 * regcache.c (regcache::raw_supply_zeroed): New function.
1495 * regcache.h (regcache::raw_supply_zeroed): New declaration.
1496
1497 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
1498
1499 * gdbarch.sh: Remove commented out definition of
1500 TARGET_CHAR_BIT.
1501 * gdbarch.h: Re-generate.
1502
1503 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1504
1505 * configure: Regenerate.
1506
1507 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
1508
1509 * solib-target.c (solib_target_relocate_section_addresses):
1510 Remove num_section_bases, num_bases, segment_bases variables.
1511
1512 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1513
1514 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
1515
1516 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1517
1518 * solib-target.c: Include <vector>
1519 (struct lm_info_target) <~lm_info_target>: Remove.
1520 <segment_bases, section_bases>: Change type to
1521 std::vector<CORE_ADDR>.
1522 (library_list_start_segment, library_list_start_section,
1523 library_list_end_library,
1524 solib_target_relocate_section_addresses): Adjust.
1525
1526 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1527
1528 * gdbarch.sh (software_single_step): Change return type to
1529 std::vector<CORE_ADDR>.
1530 * gdbarch.c, gdbarch.h: Re-generate.
1531 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
1532 Adjust.
1533 (arm_deal_with_atomic_sequence_raw): Adjust.
1534 (thumb_get_next_pcs_raw): Adjust.
1535 (arm_get_next_pcs_raw): Adjust.
1536 (arm_get_next_pcs): Adjust.
1537 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
1538 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
1539 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
1540 (alpha_software_single_step): Adjust.
1541 * alpha-tdep.h (alpha_software_single_step): Adjust.
1542 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
1543 * arm-tdep.c (arm_software_single_step): Adjust.
1544 (arm_breakpoint_kind_from_current_state): Adjust.
1545 * arm-tdep.h (arm_software_single_step): Adjust.
1546 * breakpoint.c (insert_single_step_breakpoint): Adjust.
1547 * cris-tdep.c (cris_software_single_step): Adjust.
1548 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
1549 (micromips_deal_with_atomic_sequence): Adjust.
1550 (deal_with_atomic_sequence): Adjust.
1551 (mips_software_single_step): Adjust.
1552 * mips-tdep.h (mips_software_single_step): Adjust.
1553 * moxie-tdep.c (moxie_software_single_step): Adjust.
1554 * nios2-tdep.c (nios2_software_single_step): Adjust.
1555 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
1556 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
1557 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
1558 * s390-linux-tdep.c (s390_software_single_step): Adjust.
1559 * sparc-tdep.c (sparc_software_single_step): Adjust.
1560 * spu-tdep.c (spu_software_single_step): Adjust.
1561 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
1562
1563 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1564
1565 * gdbarch.sh: Use semi-colon as field separator instead of colon.
1566 * gdbarch.h: Re-generate.
1567
1568 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1569
1570 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
1571 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
1572 * python/py-instruction.c, python/py-instruction.h: New file.
1573 * python/py-record.c: Add py-instruction.h include.
1574 (gdbpy_initialize_record): Make gdb.Instruction a super class of
1575 gdb.RecordInstruction.
1576 * python/python-internal.h: Add gdbpy_initialize_instruction
1577 declaration.
1578 * python/python.c (do_start_initialization): Add
1579 gdbpy_initialize_instruction.
1580
1581 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1582
1583 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
1584 Remove.
1585 (btrace_func_from_recpy_func): New function.
1586 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
1587 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
1588 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
1589 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
1590 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
1591 Also, use new helper functions.
1592 (btpy_list_item): Use new helper functions.
1593 (recpy_bt_function_call_history): Use new type name.
1594 (btpy_call_getset): Remove.
1595 (gdbpy_initialize_btrace): Remove code to initialize
1596 gdb.BtraceFunctionCall.
1597 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
1598 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
1599 recpy_bt_func_prev, recpy_bt_func_next): New export.
1600 * python/py-record.c (recpy_func_type): New static object.
1601 (recpy_func_new, recpy_func_level, recpy_func_symbol,
1602 recpy_func_instructions, recpy_func_up, recpy_func_prev,
1603 recpy_func_next): New function.
1604 (recpy_element_hash, recpy_element_richcompare): Updated comment.
1605 (recpy_func_getset): New static object.
1606 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
1607 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
1608
1609 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1610
1611 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
1612 (btpy_object, btpy_insn_type, btpy_new): Remove.
1613 (btpy_list_object): Use gdb.RecordInstruction type instead of
1614 gdb.BtraceInstruction type.
1615 (btrace_insn_from_recpy_insn): New function.
1616 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
1617 btpy_new.
1618 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
1619 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
1620 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
1621 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
1622 instead of btpy_object.
1623 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
1624 btpy_insn_data, btpy_insn_decode): Rename to ...
1625 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
1626 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
1627 recpy_bt_insn_decode): This. Also, use new helper functions.
1628 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
1629 recpy_insn_type.
1630 (btpy_insn_getset): Remove.
1631 (gdbpy_initialize_btrace): Remove code to initialize
1632 gdb.BtraceInstruction. Use recpy_element_object.
1633 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
1634 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
1635 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
1636 * python/py-record.c (recpy_insn_type): New static object.
1637 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
1638 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
1639 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
1640 New function.
1641 (recpy_insn_getset): New static object.
1642 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
1643 * python/py-record.h (recpy_element_object): New typedef.
1644 (recpy_insn_type, recpy_insn_new): New export.
1645
1646 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1647
1648 * py-record-btrace.c (btpy_insn_new): Removed.
1649 (btpy_insn_or_gap_new): New function.
1650 (btpy_insn_error): Removed.
1651 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
1652 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
1653 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
1654 btpy_insn_or_gap_new instead of btpy_insn_new.
1655 (btpy_insn_getset): Remove btpy_insn_error.
1656 * py-record.c (recpy_gap_type): New static object.
1657 (recpy_gap_object): New typedef.
1658 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
1659 recpy_gap_reason_string): New function.
1660 (recpy_gap_getset): New static object.
1661 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
1662 * py-record.h (recpy_gap_new): New export.
1663
1664 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1665
1666 * python/py-record.c (recpy_ptid): Remove.
1667 (recpy_record_getset): Remove recpy_ptid.
1668
1669 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1670
1671 * btrace.c (btrace_fetch): Set inferior_ptid.
1672 * python/py-record-btrace.c: Add "py-record.h" include.
1673 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
1674 recpy_bt_end, recpy_bt_instruction_history,
1675 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
1676 in gdb.Record object instead of current ptid.
1677 * python/py-record.c: Include new "py-record.h" file.
1678 (recpy_record_object): Moved to py-record.h.
1679 * python/py-record.h: New file.
1680
1681 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
1682
1683 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
1684 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
1685 indentation.
1686
1687 2017-05-01 Joel Brobecker <brobecker@adacore.com>
1688
1689 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
1690 the past maintainers section.
1691
1692 2017-04-28 Yao Qi <yao.qi@linaro.org>
1693
1694 * infcmd.c (get_return_value): Use regcache ctor, and remove
1695 cleanup.
1696
1697 2017-04-28 Yao Qi <yao.qi@linaro.org>
1698 Pedro Alves <palves@redhat.com>
1699
1700 * regcache.c (regcache::regcache): New tag dispatch ctor.
1701 (do_cooked_read): Moved above.
1702 (regcache_dup): Use the tag dispatch ctor..
1703 * regcache.h (regcache): Declare ctor, delete copy ctor and
1704 assignment operator, remove friend regcache_dup.
1705
1706 2017-04-28 Yao Qi <yao.qi@linaro.org>
1707
1708 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
1709 call method save instead of regcache_cpy.
1710 * regcache.h (struct regcache): Make regcache_dup a friend.
1711
1712 2017-04-28 Yao Qi <yao.qi@linaro.org>
1713
1714 * regcache.c (struct regcache): Move to regcache.h
1715 (regcache::arch): New method.
1716 (regcache_get_ptid): Update.
1717 (get_regcache_arch): Call arch method.
1718 (get_regcache_aspace): Call method aspace.
1719 (register_buffer): Change it to method.
1720 (regcache_save): Change it to regcache::save.
1721 (regcache_restore): Likewise.
1722 (regcache_cpy_no_passthrough): Remove the declaration.
1723 (regcache_cpy): Call methods restore and cpy_no_passthrough.
1724 (regcache_cpy_no_passthrough): Change it to method
1725 cpy_no_passthrough.
1726 (regcache_register_status): Change it to method
1727 get_register_status.
1728 (regcache_invalidate): Change it to method invalidate.
1729 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
1730 (regcache_raw_update): Change it to method raw_update.
1731 (regcache_raw_read): Likewise.
1732 (regcache_raw_read_signed): Likewise.
1733 (regcache_raw_read_unsigned): Likewise.
1734 (regcache_raw_write_signed): Likewise.
1735 (regcache_raw_write_unsigned): Likewise.
1736 (regcache_cooked_read): Likewise.
1737 (regcache_cooked_read_value): Likewise.
1738 (regcache_cooked_read_signed): Likewise.
1739 (regcache_cooked_read_unsigned): Likewise.
1740 (regcache_cooked_write_signed): Likewise.
1741 (regcache_cooked_write_unsigned): Likewise.
1742 (regcache_raw_set_cached_value): Likewise.
1743 (regcache_raw_write): Likewise.
1744 (regcache_cooked_write): Likewise.
1745 (regcache_xfer_part): Likewise.
1746 (regcache_raw_read_part): Likewise.
1747 (regcache_raw_write_part): Likewise.
1748 (regcache_cooked_read_part): Likewise.
1749 (regcache_cooked_write_part): Likewise.
1750 (regcache_raw_supply): Likewise.
1751 (regcache_raw_collect): Likewise.
1752 (regcache_transfer_regset): Likewise.
1753 (regcache_supply_regset): Likewise.
1754 (regcache_collect_regset): Likewise.
1755 (regcache_debug_print_register): Likewise.
1756 (enum regcache_dump_what): Move it to regcache.h.
1757 (regcache_dump): Change it to method dump.
1758 * regcache.h (enum regcache_dump_what): New.
1759 (class regcache): New.
1760 * target.c (target_fetch_registers): Call method
1761 debug_print_register.
1762 (target_store_registers): Likewise.
1763
1764 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1765
1766 * windows-nat.c (struct lm_info_windows): Initialize field.
1767 (windows_make_so): Allocate lm_info_windows with new.
1768 (windows_free_so): Free lm_info_windows with delete.
1769
1770 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1771
1772 * solib-darwin.c (struct lm_info_darwin): Initialize field.
1773 (darwin_current_sos): Allocate lm_info_darwin with new, remove
1774 cleanup.
1775 (darwin_free_so): Free lm_info_darwin with delete.
1776
1777 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1778
1779 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
1780 <l_addr_p>: Change type to bool.
1781 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
1782 (svr4_free_so): Free lm_info_svr4 with delete.
1783 (svr4_copy_library_list): Replace memcpy with call to copy
1784 constructor.
1785 (library_list_start_library, svr4_default_sos): Allocate
1786 lm_info_svr4 with new.
1787
1788 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1789
1790 * solib-target.c (struct lm_info_target): Add destructor,
1791 initialize fields.
1792 <name>: Change type to std::string.
1793 (library_list_start_library): Allocate lm_info_target with new.
1794 (solib_target_free_library_list): Free lm_info_target with
1795 delete.
1796 (solib_target_current_sos): Adapt to std::string.
1797 (solib_target_free_so): Free lm_info_target with delete.
1798
1799 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1800
1801 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
1802 fields.
1803 (frv_current_sos): Allocate lm_info_frv with new.
1804 (frv_relocate_main_executable): Free lm_info_frv with delete,
1805 allocate with new.
1806 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
1807
1808 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1809
1810 * solib-frv.c (struct lm_info_frv): Fix indentation.
1811
1812 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1813
1814 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
1815 map field.
1816 (dsbt_current_sos): Allocate lm_info_dsbt with new.
1817 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
1818 and allocate with new.
1819 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
1820
1821 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1822
1823 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
1824 <filename, member_name>: Change type to std::string.
1825 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
1826 (library_list_start_library): Allocate lm_info_aix with new.
1827 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
1828 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
1829 with copy constructor.
1830
1831 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1832
1833 * solist.h (struct lm_info): Remove.
1834 (struct lm_info_base): New class.
1835 (struct so_list) <lm_info>: Change type to lm_info_base *.
1836 * nto-tdep.c (struct lm_info): Remove.
1837 (lm_addr): Adjust.
1838 * solib-aix.c (struct lm_info): Rename to ...
1839 (struct lm_info_aix): ... this. Extend lm_info_base.
1840 (lm_info_p): Rename to ...
1841 (lm_info_aix_p): ... this, and adjust.
1842 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
1843 solib_aix_parse_libraries, library_list_start_library,
1844 solib_aix_free_library_list, solib_aix_parse_libraries,
1845 solib_aix_get_library_list,
1846 solib_aix_relocate_section_addresses, solib_aix_free_so,
1847 solib_aix_get_section_offsets,
1848 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
1849 Adjust.
1850 (struct solib_aix_inferior_data) <library_list>: Adjust.
1851 * solib-darwin.c (struct lm_info): Rename to ...
1852 (struct lm_info_darwin): ... this. Extend lm_info_base.
1853 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
1854 * solib-dsbt.c (struct lm_info): Rename to ...
1855 (struct lm_info_dsbt): ... this. Extend lm_info_base.
1856 (struct dsbt_info) <main_executable_lm_info): Adjust.
1857 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
1858 dsbt_relocate_section_addresses): Adjust.
1859 * solib-frv.c (struct lm_info): Rename to ...
1860 (struct lm_info_frv): ... this. Extend lm_info_base.
1861 (main_executable_lm_info): Adjust.
1862 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
1863 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
1864 find_canonical_descriptor_in_load_object,
1865 frv_fdpic_find_canonical_descriptor): Adjust.
1866 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
1867 to lm_info_svr4.
1868 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
1869 svr4_clear_so, svr4_copy_library_list,
1870 library_list_start_library, svr4_default_sos, svr4_read_so_list,
1871 svr4_current_sos, svr4_fetch_objfile_link_map,
1872 solist_update_incremental): Adjust.
1873 * solib-svr4.h (struct lm_info_svr4): Move here from
1874 solib-svr4.c.
1875 * solib-target.c (struct lm_info): Rename to ...
1876 (struct lm_info_target): ... this. Extend lm_info_base.
1877 (lm_info_p): Rename to ...
1878 (lm_info_target_p): ... this.
1879 (solib_target_parse_libraries, library_list_start_segment,
1880 library_list_start_section, library_list_start_library,
1881 library_list_end_library, solib_target_free_library_list,
1882 solib_target_current_sos, solib_target_free_so,
1883 solib_target_relocate_section_addresses): Adjust.
1884 * windows-nat.c (struct lm_info): Rename to ...
1885 (struct lm_info_windows): ... this. Extend lm_info_base.
1886 (windows_make_so, handle_load_dll, handle_unload_dll,
1887 windows_xfer_shared_libraries): Adjust.
1888
1889 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
1890
1891 * solib-darwin.c (struct darwin_so_list): Remove.
1892 (darwin_current_sos): Allocate an so_list object instead of a
1893 darwin_so_list, separately allocate an lm_info object.
1894 (darwin_free_so): Free lm_info.
1895
1896 2017-04-28 John Baldwin <jhb@FreeBSD.org>
1897
1898 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
1899 with fprintf_filtered.
1900
1901 2017-04-28 Yao Qi <yao.qi@linaro.org>
1902
1903 * regcache.c (regcache::regcache): New function.
1904 (regcache::~regcache): New function.
1905 (regcache_xmalloc_1): Remove.
1906 (regcache_xmalloc): Call new regcache.
1907 (regcache_xfree): Call delete regcache.
1908 (get_thread_arch_aspace_regcache): Call new regcache.
1909
1910 2017-04-28 Yao Qi <yao.qi@linaro.org>
1911
1912 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
1913 lwp instead of ptid_get_lwp.
1914
1915 2017-04-28 Yao Qi <yao.qi@linaro.org>
1916
1917 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
1918 lwp_info instead of getting from inferior_ptid.
1919
1920 2017-04-27 Keith Seitz <keiths@redhat.com>
1921
1922 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
1923 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
1924 (CV_CONVERSION_BADNESS): Define.
1925 (rank_one_type): Remove overly restrictive rvalue reference
1926 rank checks.
1927 Add cv-qualifier checks and subranks for type equality.
1928 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
1929 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
1930 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
1931
1932 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
1933
1934 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
1935 count when creating the object.
1936
1937 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
1938 Ulrich Weigand <uweigand@de.ibm.com>
1939
1940 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
1941 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
1942 is used in AIX.
1943 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
1944 (process_xcoff_symbol): Likewise.
1945 (scan_xcoff_symtab): Likewise.
1946
1947 2017-04-26 Alan Hayward <alan.hayward@arm.com>
1948
1949 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
1950 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
1951 (ia64_access_reg): Use get_frame_register_unsigned.
1952 (ia64_access_rse_reg): Likewise.
1953 (ia64_libunwind_frame_prev_register): Likewise.
1954
1955 2017-04-26 Jiong Wang <jiong.wang@arm.com>
1956
1957 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
1958 * gdbarch.c: Regenerated.
1959 * gdbarch.h: Regenerated.
1960 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
1961 visibility external.
1962 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
1963 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
1964 (enum cfa_how_kind): Move to ...
1965 (struct dwarf2_frame_state_reg_info): Likewise.
1966 (struct dwarf2_frame_state): Likewise.
1967 * dwarf2-frame.h: ... here.
1968 (dwarf2_frame_state_alloc_regs): New declaration.
1969 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
1970 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
1971
1972 2017-04-26 Alan Hayward <alan.hayward@arm.com>
1973
1974 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
1975 regcache_raw_read_unsigned.
1976 (xtensa_pseudo_register_write): Likewise.
1977
1978 2017-04-26 Alan Hayward <alan.hayward@arm.com>
1979
1980 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
1981 (nds32_pseudo_register_write): Likewise.
1982
1983 2017-04-25 Yao Qi <yao.qi@linaro.org>
1984
1985 * regcache.c (struct regcache) <readonly_p>: Change its type
1986 to bool.
1987 (regcache_xmalloc_1): Update parameter type and callers update.
1988
1989 2017-04-25 Yao Qi <yao.qi@linaro.org>
1990
1991 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
1992 set_gdbarch_wchar_bit.
1993 * arm-tdep.c (arm_gdbarch_init): Likewise.
1994
1995 2017-04-25 Pedro Alves <palves@redhat.com>
1996
1997 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
1998 (BothAreRelocatable, memcopy, memmove): Don't define.
1999 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
2000 macros.
2001
2002 2017-04-25 Pedro Alves <palves@redhat.com>
2003
2004 * common/common-defs.h: Include "common/poison.h".
2005 * common/function-view.h: (Not, Or, Requires): Move to traits.h
2006 and adjust.
2007 * common/poison.h: New file.
2008 * common/traits.h: Include <type_traits>.
2009 (Not, Or, Requires): New, moved from common/function-view.h.
2010
2011 2017-04-25 Pedro Alves <palves@redhat.com>
2012
2013 * breakpoint.h (struct breakpoint): In-class initialize all
2014 fields. Make boolean fields "bool".
2015 * breakpoint.c (init_raw_breakpoint_without_location): Remove
2016 memset call and initializations no longer necessary.
2017
2018 2017-04-25 Pedro Alves <palves@redhat.com>
2019
2020 * btrace.c (pt_btrace_insn_flags): Change parameter type to
2021 reference.
2022 (pt_btrace_insn): New function.
2023 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
2024
2025 2017-04-25 Pedro Alves <palves@redhat.com>
2026
2027 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
2028 "base" field and inherit from "bp_location" instead. Add
2029 non-default ctor.
2030 (allocate_location_exception): Use new non-default ctor.
2031 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
2032 (init_bp_location): Convert to ...
2033 (bp_location::bp_location): ... this new ctor, and remove memset
2034 call.
2035 (base_breakpoint_allocate_location): Use the new non-default ctor.
2036 * breakpoint.h (bp_location): Now a class. Declare default and
2037 non-default ctors. In-class initialize all members.
2038 (init_bp_location): Remove declaration.
2039
2040 2017-04-25 Pedro Alves <palves@redhat.com>
2041
2042 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
2043 assignment operator.
2044
2045 2017-04-24 Yao Qi <yao.qi@linaro.org>
2046
2047 * doublest.c (convert_doublest_to_floatformat): Call
2048 floatformat_totalsize_bytes.
2049
2050 2017-04-22 Tom Tromey <tom@tromey.com>
2051
2052 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2053 ui_out_emit_list.
2054 * stack.c (print_frame): Use ui_out_emit_list.
2055 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
2056 ui_out_emit_list.
2057 * mi/mi-main.c (print_one_inferior)
2058 (mi_cmd_data_list_register_names)
2059 (mi_cmd_data_list_register_values, mi_cmd_list_features)
2060 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
2061 ui_out_emit_list.
2062 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
2063 (mi_output_solib_attribs): Use ui_out_emit_list,
2064 ui_out_emit_tuple.
2065 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
2066 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
2067 (mi_cmd_stack_list_args, list_args_or_locals): Use
2068 ui_out_emit_list.
2069 * disasm.c (do_assembly_only): Use ui_out_emit_list.
2070 * breakpoint.c (print_solib_event, output_thread_groups): Use
2071 ui_out_emit_list.
2072
2073 2017-04-22 Tom Tromey <tom@tromey.com>
2074
2075 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
2076 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
2077 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
2078
2079 2017-04-22 Tom Tromey <tom@tromey.com>
2080
2081 * tracepoint.c (tvariables_info_1)
2082 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
2083
2084 2017-04-22 Tom Tromey <tom@tromey.com>
2085
2086 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
2087 annotate_arg_emitter.
2088 * breakpoint.c (print_mention_watchpoint)
2089 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
2090 * annotate.h (struct annotate_arg_emitter): New.
2091
2092 2017-04-22 Tom Tromey <tom@tromey.com>
2093
2094 * record-btrace.c (record_btrace_insn_history)
2095 (record_btrace_insn_history_range, record_btrace_call_history)
2096 (record_btrace_call_history_range): Use ui_out_emit_tuple.
2097 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
2098 ui_out_emit_tuple.
2099 * stack.c (print_frame_info): Use ui_out_emit_tuple.
2100 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
2101 * skip.c (skip_info): Use ui_out_emit_tuple.
2102 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
2103 * progspace.c (print_program_space): Use ui_out_emit_tuple.
2104 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
2105 * osdata.c (info_osdata): Use ui_out_emit_tuple.
2106 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
2107 ui_out_emit_tuple.
2108 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
2109 (output_register, mi_cmd_data_read_memory)
2110 (mi_cmd_data_read_memory_bytes, mi_load_progress)
2111 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
2112 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
2113 Use ui_out_emit_tuple.
2114 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
2115 ui_out_emit_tuple.
2116 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
2117 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
2118 * linux-thread-db.c (info_auto_load_libthread_db): Use
2119 ui_out_emit_tuple.
2120 * inferior.c (print_inferior): Use ui_out_emit_tuple.
2121 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
2122 * disasm.c (do_mixed_source_and_assembly_deprecated)
2123 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
2124 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
2125 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
2126 * breakpoint.c (print_one_breakpoint_location)
2127 (print_one_breakpoint): Use ui_out_emit_tuple.
2128 * auto-load.c (print_script, info_auto_load_cmd): Use
2129 ui_out_emit_tuple.
2130 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
2131
2132 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
2133
2134 * thread.c (print_thread_info_1): Remove dead code.
2135
2136 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2137
2138 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
2139 GDB_SELF_TEST.
2140 * arm-tdep.c (selftests::arm_record_test): Likewise.
2141
2142 2017-04-21 Yao Qi <yao.qi@linaro.org>
2143
2144 * regcache.c (regcache_restore): Remove argument 2. Replace
2145 argument 3 with regcache. Get register status from
2146 src->register_status and get register contents from
2147 register_buffer (src, regnum).
2148 (regcache_cpy): Update.
2149
2150 2017-04-19 Pedro Alves <palves@redhat.com>
2151
2152 * gdbthread.h (thread): Add missing closing parenthesis in
2153 comment.
2154
2155 2017-04-19 Pedro Alves <palves@redhat.com>
2156
2157 * common/refcounted-object.h: New file.
2158 * gdbthread.h: Include "common/refcounted-object.h".
2159 (thread_info): Inherit from refcounted_object and add comments.
2160 (thread_info::incref, thread_info::decref)
2161 (thread_info::m_refcount): Delete.
2162 (thread_info::deletable): Use the refcounted_object::refcount()
2163 method.
2164 * inferior.c (current_inferior_): Add comment.
2165 (set_current_inferior): Increment/decrement refcounts.
2166 (prune_inferiors, remove_inferior_command): Skip inferiors marked
2167 not-deletable instead of comparing with the current inferior.
2168 (initialize_inferiors): Increment the initial inferior's refcount.
2169 * inferior.h (struct inferior): Forward declare.
2170 Include "common/refcounted-object.h".
2171 (current_inferior, set_current_inferior): Move declaration to
2172 before struct inferior's definition, and fix comment.
2173 (inferior): Inherit from refcounted_object. Add comments.
2174 * thread.c (switch_to_thread_no_regs): Reference the thread's
2175 inferior pointer directly instead of doing a ptid lookup.
2176 (switch_to_no_thread): New function.
2177 (switch_to_thread(thread_info *)): New function, factored out
2178 from ...
2179 (switch_to_thread(ptid_t)): ... this.
2180 (restore_current_thread): Delete.
2181 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
2182 fields, and add 'inf' field.
2183 (do_restore_current_thread_cleanup): Check whether old->inf is
2184 alive instead of looking up an inferior by ptid. Use
2185 switch_to_thread and switch_to_no_thread.
2186 (restore_current_thread_cleanup_dtor): Use old->inf directly
2187 instead of lookup up an inferior by id. Decref the inferior.
2188 Don't restore 'removable'.
2189 (make_cleanup_restore_current_thread): Same the inferior pointer
2190 in old, instead of the inferior number. Incref the inferior.
2191 Don't save/clear 'removable'.
2192
2193 2017-04-19 Pedro Alves <palves@redhat.com>
2194
2195 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2196 unittests/scoped_restore-selftests.c.
2197 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
2198 * common/scoped_restore.h (scoped_restore_base): Make "class".
2199 (scoped_restore_base::release): New public method.
2200 (scoped_restore_base::scoped_restore_base): New protected ctor.
2201 (scoped_restore_base::m_saved_var): New protected field.
2202 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
2203 scoped_restore_base base class instead of m_saved_var directly.
2204 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
2205 (scoped_restore_tmpl::scoped_restore_tmpl(const
2206 scoped_restore_tmpl<T>&)): Likewise.
2207 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
2208 method.
2209 (scoped_restore_tmpl::saved_var): New method.
2210 (scoped_restore_tmpl::m_saved_var): Delete.
2211 * inferior.h (inferior::detaching): Now a bool.
2212 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
2213 cleanup.
2214 * unittests/scoped_restore-selftests.c: New file.
2215
2216 2017-04-19 Pedro Alves <palves@redhat.com>
2217
2218 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
2219 Re-sort in alphabetic order.
2220
2221 2017-04-18 Pedro Alves <palves@redhat.com>
2222
2223 * xml-support.c (obstack_xml_printf): Delete.
2224 * xml-support.h (obstack_xml_printf): Delete.
2225
2226 2017-04-18 Pedro Alves <palves@redhat.com>
2227
2228 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
2229 vdebug, verror, body_text, start_element, end_element, name,
2230 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
2231 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
2232 is_xinclude>: Make private and add m_ prefix.
2233 (gdb_xml_parser::body_text): New method, based on ...
2234 (gdb_xml_body_text): ... this. Adjust.
2235 (gdb_xml_parser::vdebug): New method, based on ...
2236 (gdb_xml_debug): ... this. Adjust.
2237 (gdb_xml_parser::verror): New method, based on ...
2238 (gdb_xml_error): ... this. Adjust.
2239 (gdb_xml_parser::start_element): New method, based on ...
2240 (gdb_xml_start_element): ... this. Adjust.
2241 (gdb_xml_start_element_wrapper): Defer to
2242 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
2243 (gdb_xml_parser::end_element): New method, based on ...
2244 (gdb_xml_end_element_wrapper): ... this. Adjust.
2245 (gdb_xml_parser::~gdb_xml_parser): Adjust.
2246 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
2247 (gdb_xml_parser::use_dtd): New method, based on ...
2248 (gdb_xml_use_dtd): ... this. Adjust.
2249 (gdb_xml_parser::parse): New method, based on ...
2250 (gdb_xml_parse): ... this. Adjust.
2251 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
2252 (xinclude_start_include): Adjust to call the parser's name method.
2253 (xml_xinclude_default, xml_xinclude_start_doctype)
2254 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
2255 method.
2256 (xml_process_xincludes): Adjust to call parser methods.
2257 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
2258 declarations.
2259
2260 2017-04-18 Pedro Alves <palves@redhat.com>
2261
2262 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
2263 gdb::optional<std::string>.
2264 * xml-support.c: Include <string>.
2265 (scope_level::scope_level(scope_level &&))
2266 (scope_level::~scope_level): Delete.
2267 (scope_level::body): Now a std::string.
2268 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
2269 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
2270 parameter.
2271 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
2272 (xinclude_parsing_data::output): Now a std::string reference.
2273 (xinclude_start_include): Adjust.
2274 (xml_xinclude_default): Adjust.
2275 (xml_process_xincludes): Add 'output' parameter, and return bool.
2276 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
2277 and return bool.
2278 * xml-tdesc.c: Include <unordered_map> and <string>.
2279 (tdesc_xml_cache): Delete.
2280 (tdesc_xml_cache_s): Delete.
2281 (xml_cache): Now an std::unordered_map.
2282 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
2283 (target_fetch_description_xml): Change return type to
2284 gdb::optional<std::string>, and adjust.
2285 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
2286 (target_fetch_description_xml): Change return type to
2287 gdb::optional<std::string>.
2288
2289 2017-04-18 Pedro Alves <palves@redhat.com>
2290
2291 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2292 unittests/optional-selftests.c.
2293 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
2294 * unittests/optional-selftests.c: New file.
2295 * unittests/optional/assignment/1.cc: New file.
2296 * unittests/optional/assignment/2.cc: New file.
2297 * unittests/optional/assignment/3.cc: New file.
2298 * unittests/optional/assignment/4.cc: New file.
2299 * unittests/optional/assignment/5.cc: New file.
2300 * unittests/optional/assignment/6.cc: New file.
2301 * unittests/optional/assignment/7.cc: New file.
2302 * unittests/optional/cons/copy.cc: New file.
2303 * unittests/optional/cons/default.cc: New file.
2304 * unittests/optional/cons/move.cc: New file.
2305 * unittests/optional/cons/value.cc: New file.
2306 * unittests/optional/in_place.cc: New file.
2307 * unittests/optional/observers/1.cc: New file.
2308 * unittests/optional/observers/2.cc: New file.
2309
2310 2017-04-18 Pedro Alves <palves@redhat.com>
2311
2312 * common/gdb_optional.h: Include common/traits.h.
2313 (in_place_t): New type.
2314 (in_place): New constexpr variable.
2315 (optional::optional): Remove member initialization of
2316 m_instantiated.
2317 (optional::optional(in_place_t...)): New constructor.
2318 (optional::~optional): Use reset.
2319 (optional::optional(const optional&)): New.
2320 (optional::optional(const optional&&)): New.
2321 (optional::optional(T &)): New.
2322 (optional::optional(T &&)): New.
2323 (operator::operator=(const optional &)): New.
2324 (operator::operator=(optional &&)): New.
2325 (operator::operator= (const T &))
2326 (operator::operator= (T &&))
2327 (operator::emplace (Args &&... args)): Return a T&. Use reset.
2328 (operator::reset): New.
2329 (operator::m_instantiated):: Add in-class initializer.
2330 * common/traits.h: Include <type_traits>.
2331 (struct And): New types.
2332
2333 2017-04-18 Pedro Alves <palves@redhat.com>
2334
2335 * xml-support.c: Include <vector>.
2336 (scope_level::scope_level(const gdb_xml_element *))
2337 (scope_level::scope_level(scope_level&&)): New.
2338 (scope_level::~scope_level): New.
2339 (scope_level_s): Delete.
2340 (gdb_xml_parser::scopes): Now a std::vector.
2341 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
2342 Use std::vector.
2343 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
2344 scope cleanup code.
2345 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
2346 of the scopes member. Use std::vector::emplace_back.
2347
2348 2017-04-18 Pedro Alves <palves@redhat.com>
2349
2350 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
2351 a bool.
2352 (gdb_xml_end_element): Change type of first parameter.
2353 (gdb_xml_cleanup): Rename to ...
2354 (gdb_xml_parser::~gdb_xml_parser): ... this.
2355 (gdb_xml_create_parser_and_cleanup): Delete with ...
2356 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
2357 to this new ctor.
2358 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
2359 using gdb_xml_create_parser_and_cleanup.
2360 (xinclude_parsing_data): Add ctor/dtor.
2361 (xml_xinclude_cleanup): Delete.
2362 (xml_process_xincludes): Create a local xinclude_parsing_data
2363 instead of heap-allocating one. Create a local gdb_xml_parser
2364 instead of heap-allocating one with
2365 gdb_xml_create_parser_and_cleanup.
2366
2367 2017-04-18 John Baldwin <jhb@FreeBSD.org>
2368
2369 PR threads/20743
2370 * fbsd-nat.c (resume_one_thread_cb): Remove.
2371 (resume_all_threads_cb): Remove.
2372 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
2373 iterate_over_threads.
2374
2375 2017-04-17 Joel Brobecker <brobecker@adacore.com>
2376
2377 * NEWS: Create a new section for the next release branch.
2378 Rename the section of the current branch, now that it has
2379 been cut.
2380
2381 2017-04-17 Joel Brobecker <brobecker@adacore.com>
2382
2383 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
2384 * version.in: Bump version to 8.0.50.DATE-git.
2385
2386 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
2387
2388 PR gdb/21385
2389 * windows-nat.c (windows_create_inferior): Declare 'allargs'
2390 independently of the host, and fix build breakage on Cygwin.
2391
2392 2017-04-13 Pedro Alves <palves@redhat.com>
2393
2394 * inferior.c (free_inferior): Convert to ...
2395 (inferior::~inferior): ... this dtor.
2396 (inferior::inferior): New ctor, factored out from ...
2397 (add_inferior_silent): ... here. Allocate the inferior with a new
2398 expression.
2399 (delete_inferior): Call delete instead of free_inferior.
2400 * inferior.h (gdb_environ, continuation): Forward declare.
2401 (inferior): Now a class. Add in-class initialization to all
2402 members. Make boolean fields bool, except 'detaching'.
2403 (inferior::inferior): New explicit ctor.
2404 (inferior::~inferior): New.
2405
2406 2017-04-13 Pedro Alves <palves@redhat.com>
2407
2408 * inferior.c (init_inferior_list): Delete.
2409 * inferior.h (init_inferior_list): Delete.
2410
2411 2017-04-13 Pedro Alves <palves@redhat.com>
2412
2413 PR threads/13217
2414 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
2415 (top level): Call it twice, with different thread sets.
2416
2417 2017-04-13 Pedro Alves <palves@redhat.com>
2418
2419 * thread.c: Include <algorithm>.
2420 (thread_array_cleanup): Delete.
2421 (scoped_inc_dec_ref): New class.
2422 (live_threads_count): New function.
2423 (set_thread_refcount): Delete.
2424 (tp_array_compar_ascending): Now a bool.
2425 (tp_array_compar): Convert to a std::sort comparison function.
2426 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
2427 and live_threads_count.
2428
2429 2017-04-13 Pedro Alves <palves@redhat.com>
2430
2431 * infrun.c (follow_fork_inferior): Also switch the current
2432 inferior.
2433
2434 2017-04-13 Pedro Alves <palves@redhat.com>
2435
2436 * breakpoint.c (watch_command_1): Save watchpoint-frame info
2437 before calling create_internal_breakpoint.
2438
2439 2017-04-13 Pedro Alves <palves@redhat.com>
2440
2441 * fork-child.c (execv_argv): New class.
2442 (breakup_args): Refactored as ...
2443 (execv_argv::init_for_no_shell): .. this method of execv_argv.
2444 Copy arguments to storage and replace separators with NULL
2445 terminators in place.
2446 (escape_bang_in_quoted_argument): Adjust to return bool.
2447 (execv_argv::execv_argv): New ctor.
2448 (execv_argv::init_for_shell): New method, factored out from
2449 fork_inferior. Don't strdup strings into the vector.
2450 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
2451 Remove free_vector_argv call.
2452
2453 2017-04-13 Yao Qi <yao.qi@linaro.org>
2454
2455 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
2456 tdep->rx_psw_type.
2457
2458 2017-04-13 Yao Qi <yao.qi@linaro.org>
2459
2460 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
2461 * rx-tdep.c (rx_gdbarch_init): Likewise.
2462
2463 2017-04-13 Pedro Alves <palves@redhat.com>
2464
2465 * breakpoint.h (struct breakpoint): Reindent.
2466
2467 2017-04-13 Pedro Alves <palves@redhat.com>
2468
2469 * breakpoint.c (bp_location): Rename to ...
2470 (bp_locations): ... this. All references updated.
2471 (bp_location_count): Rename to ...
2472 (bp_locations_count): ... this. All references updated.
2473 (bp_location_placed_address_before_address_max): Rename to ...
2474 (bp_locations_placed_address_before_address_max): ... this. All
2475 references updated.
2476 (bp_location_shadow_len_after_address_max): Rename to ...
2477 (bp_locations_shadow_len_after_address_max): ... this. All
2478 references updated.
2479 (bp_location_compare_addrs): Rename to ...
2480 (bp_locations_compare_addrs): ... this. All references updated.
2481 (bp_location_compare):Rename to ...
2482 (bp_locations_compare): ... this. All references updated.
2483 (bp_location_target_extensions_update): Rename to ...
2484 (bp_locations_target_extensions_update): ... this. All references
2485 updated.
2486
2487 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2488
2489 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
2490 * common/common.m4: Check headers 'termios.h', 'termio.h' and
2491 'sgtty.h'.
2492 * common/gdb_termios.h: New file, with parts of "terminal.h".
2493 * inflow.c: Include "gdb_termios.h".
2494 * ser-unix.c: Include "gdb_termios.h".
2495 * terminal.h: Move terminal-related defines to
2496 "common/gdb_termios.h".
2497
2498 2017-04-12 Tom Tromey <tom@tromey.com>
2499
2500 * probe.c (parse_probes): Update.
2501 * location.h (delete_event_location): Don't declare.
2502 (event_location_deleter::operator()): Update.
2503 * location.c (event_location_deleter::operator()): Rename from
2504 delete_event_location.
2505 * linespec.h (linespec_result) <location>: Change type to
2506 event_location_up.
2507 * linespec.c (canonicalize_linespec, event_location_to_sals)
2508 (decode_objc): Update.
2509 (linespec_result): Don't call delete_event_location.
2510 * breakpoint.c (create_breakpoints_sal)
2511 (bkpt_probe_create_sals_from_location)
2512 (strace_marker_create_sals_from_location): Update.
2513
2514 2017-04-12 Tom Tromey <tom@tromey.com>
2515
2516 * linespec.h (struct linespec_result): Add constructor and
2517 destructor.
2518 (init_linespec_result, destroy_linespec_result)
2519 (make_cleanup_destroy_linespec_result): Don't declare.
2520 * linespec.c (init_linespec_result): Remove.
2521 (linespec_result::~linespec_result): Rename from
2522 destroy_linespec_result. Update.
2523 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
2524 Remove.
2525 * breakpoint.c (create_breakpoint, break_range_command)
2526 (decode_location_default): Update.
2527 * ax-gdb.c (agent_command_1): Update.
2528
2529 2017-04-12 Tom Tromey <tom@tromey.com>
2530
2531 * remote.c (remote_download_tracepoint): Update.
2532 * python/py-breakpoint.c (bppy_get_location): Update.
2533 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
2534 (gdbscm_breakpoint_location): Update.
2535 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
2536 * breakpoint.h (struct breakpoint) <location, location_range_end>:
2537 Change type to event_location_up.
2538 * breakpoint.c (create_overlay_event_breakpoint)
2539 (create_longjmp_master_breakpoint)
2540 (create_std_terminate_master_breakpoint)
2541 (create_exception_master_breakpoint)
2542 (breakpoint_event_location_empty_p, print_breakpoint_location)
2543 (print_one_breakpoint_location, create_thread_event_breakpoint)
2544 (init_breakpoint_sal, create_breakpoint)
2545 (print_recreate_ranged_breakpoint, break_range_command)
2546 (init_ada_exception_breakpoint, say_where): Update.
2547 (base_breakpoint_dtor): Don't call delete_event_location.
2548 (bkpt_print_recreate, tracepoint_print_recreate)
2549 (dprintf_print_recreate, update_static_tracepoint)
2550 (breakpoint_re_set_default): Update.
2551
2552 2017-04-12 Tom Tromey <tom@tromey.com>
2553
2554 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
2555 type of "to_do". Update.
2556 (compute_stack_depth): Use std::vector.
2557
2558 2017-04-12 Tom Tromey <tom@tromey.com>
2559
2560 * printcmd.c (find_instruction_backward): Use std::vector.
2561
2562 2017-04-12 Tom Tromey <tom@tromey.com>
2563
2564 * symfile.c (objfilep): Remove typedef.
2565 (reread_symbols): Use a std::vector.
2566
2567 2017-04-12 Tom Tromey <tom@tromey.com>
2568
2569 * mi/mi-main.c (exec_direction_forward): Remove.
2570 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
2571 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2572 scoped_restore.
2573 * guile/guile.c (guile_repl_command, guile_command)
2574 (gdbscm_execute_gdb_command): Use scoped_restore.
2575 * go-exp.y (go_parse): Use scoped_restore.
2576 * d-exp.y (d_parse): Use scoped_restore.
2577 * cli/cli-decode.c (cmd_func): Use scoped_restore.
2578 * c-exp.y (c_parse): Use scoped_restore.
2579
2580 2017-04-12 Tom Tromey <tom@tromey.com>
2581
2582 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
2583 (mi_parse): Update return type.
2584 (mi_parse_free): Remove.
2585 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
2586 (mi_parse::~mi_parse): Rename from mi_parse_free.
2587 (mi_parse_cleanup): Remove.
2588 (mi_parse): Return a unique_ptr. Use new.
2589 * mi/mi-main.c (mi_execute_command): Update.
2590
2591 2017-04-12 Tom Tromey <tom@tromey.com>
2592
2593 * location.c (explicit_location_lex_one): Return a
2594 unique_xmalloc_ptr.
2595 (string_to_explicit_location): Update. Remove cleanups.
2596
2597 2017-04-12 Tom Tromey <tom@tromey.com>
2598
2599 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
2600 (compare_value_and_voffset): Change type. Update.
2601 (compute_vtable_size): Change type of "offset_vec".
2602 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
2603 (gnuv3_get_typeid): Remove extraneous declaration.
2604
2605 2017-04-12 Tom Tromey <tom@tromey.com>
2606
2607 * charset.h (wchar_iterator): Fix comment.
2608
2609 2017-04-12 Tom Tromey <tom@tromey.com>
2610
2611 * charset.c (iconv_wrapper): New class.
2612 (cleanup_iconv): Remove.
2613 (convert_between_encodings): Use it.
2614
2615 2017-04-12 Tom Tromey <tom@tromey.com>
2616
2617 * symfile.h (increment_reading_symtab): Update type.
2618 * symfile.c (decrement_reading_symtab): Remove.
2619 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
2620 * psymtab.c (psymtab_to_symtab): Update.
2621 * dwarf2read.c (dw2_instantiate_symtab): Update.
2622
2623 2017-04-12 Tom Tromey <tom@tromey.com>
2624
2625 * jit.c (struct jit_reader): Declare separately. Add constructor
2626 and destructor. Change type of "handle".
2627 (loaded_jit_reader): Define separately.
2628 (jit_reader_load): Update. New "new".
2629 (jit_reader_unload_command): Use "delete".
2630 * gdb-dlfcn.h (struct dlclose_deleter): New.
2631 (gdb_dlhandle_up): New typedef.
2632 (gdb_dlopen, gdb_dlsym): Update types.
2633 (gdb_dlclose): Remove.
2634 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
2635 (gdb_dlsym): Change type of "handle".
2636 (make_cleanup_dlclose): Remove.
2637 (dlclose_deleter::operator()): Rename from gdb_dlclose.
2638 * compile/compile-c-support.c (load_libcc): Update.
2639
2640 2017-04-12 Tom Tromey <tom@tromey.com>
2641
2642 * symtab.h (find_pcs_for_symtab_line): Change return type.
2643 * symtab.c (find_pcs_for_symtab_line): Change return type.
2644 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
2645 type of "vec". Update.
2646 (ltpy_get_pcs_for_line): Update.
2647 * linespec.c (decode_digits_ordinary): Update.
2648
2649 2017-04-12 Tom Tromey <tom@tromey.com>
2650
2651 * tracepoint.c (actions_command): Update.
2652 * python/python.c (python_command, python_interactive_command):
2653 Update.
2654 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
2655 * guile/guile.c (guile_command): Update.
2656 * defs.h (read_command_lines, read_command_lines_1): Return
2657 command_line_up.
2658 (command_lines_deleter): New struct.
2659 (command_line_up): New typedef.
2660 * compile/compile.c (compile_code_command)
2661 (compile_print_command): Update.
2662 * cli/cli-script.h (get_command_line, copy_command_lines): Return
2663 command_line_up.
2664 (make_cleanup_free_command_lines): Remove.
2665 * cli/cli-script.c (get_command_line, read_command_lines_1)
2666 (copy_command_lines): Return command_line_up.
2667 (while_command, if_command, read_command_lines, define_command)
2668 (document_command): Update.
2669 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
2670 Remove.
2671 * breakpoint.h (breakpoint_set_commands): Change type of
2672 "commands".
2673 * breakpoint.c (breakpoint_set_commands): Change type of
2674 "commands". Update.
2675 (do_map_commands_command, update_dprintf_command_list)
2676 (create_tracepoint_from_upload): Update.
2677
2678 2017-04-12 Tom Tromey <tom@tromey.com>
2679
2680 * tracepoint.c (scope_info): Update.
2681 * spu-tdep.c (spu_catch_start): Update.
2682 * python/python.c (gdbpy_decode_line): Update.
2683 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
2684 * python/py-breakpoint.c (bppy_init): Update.
2685 * probe.c (parse_probes): Update.
2686 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
2687 * location.h (event_location_deleter): New struct.
2688 (event_location_up): New typedef.
2689 (new_linespec_location, new_address_location, new_probe_location)
2690 (new_explicit_location, copy_event_location)
2691 (string_to_event_location, string_to_event_location_basic)
2692 (string_to_explicit_location): Update return type.
2693 (make_cleanup_delete_event_location): Remove.
2694 * location.c (new_linespec_location, new_address_location)
2695 (new_probe_location, new_explicit_location, copy_event_location):
2696 Return event_location_up.
2697 (delete_event_location_cleanup)
2698 (make_cleanup_delete_event_location): Remove.
2699 (string_to_explicit_location, string_to_event_location_basic)
2700 (string_to_event_location): Return event_location_up.
2701 * linespec.c (canonicalize_linespec, event_location_to_sals)
2702 (decode_line_with_current_source)
2703 (decode_line_with_last_displayed, decode_objc): Update.
2704 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
2705 * completer.c (location_completer): Update.
2706 * cli/cli-cmds.c (edit_command, list_command): Update.
2707 * breakpoint.c (create_overlay_event_breakpoint)
2708 (create_longjmp_master_breakpoint)
2709 (create_std_terminate_master_breakpoint)
2710 (create_exception_master_breakpoint)
2711 (create_thread_event_breakpoint): Update.
2712 (init_breakpoint_sal): Update. Remove some dead code.
2713 (create_breakpoint_sal): Change type of "location". Update.
2714 (create_breakpoints_sal, create_breakpoint, break_command_1)
2715 (dprintf_command, break_range_command, until_break_command)
2716 (init_ada_exception_breakpoint)
2717 (strace_marker_create_sals_from_location)
2718 (update_static_tracepoint, trace_command, ftrace_command)
2719 (strace_command, create_tracepoint_from_upload): Update.
2720 * break-catch-throw.c (re_set_exception_catchpoint): Update.
2721 * ax-gdb.c (agent_command_1): Update.
2722
2723 2017-04-12 Pedro Alves <palves@redhat.com>
2724
2725 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
2726 * configure.tgt: Handle i[34567]86-*-go32* and
2727 i[34567]86-*-msdosdjgpp*.
2728 * i386-tdep.c (i386_svr4_reg_to_regnum):
2729 Make extern.
2730 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
2731 i386-go32-tdep.c.
2732 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
2733 * i386-go32-tdep.c: New file.
2734 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
2735 declarations.
2736
2737 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
2738
2739 * aix-thread.c (pd_status2str): Change return type to const char *.
2740
2741 2017-04-12 Pedro Alves <palves@redhat.com>
2742
2743 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
2744 calls to set_gdbarch_gnu_triplet_regexp.
2745
2746 2017-04-12 Pedro Alves <palves@redhat.com>
2747
2748 PR gdb/21323
2749 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
2750 New enum value.
2751 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
2752 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
2753 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
2754 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
2755 * gdbarch.h, gdbarch.c: Regenerate.
2756 * aarch64-tdep.c (aarch64_gdbarch_init): Override
2757 gdbarch_wchar_bit and gdbarch_wchar_signed.
2758 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
2759 * arm-tdep.c (arm_gdbarch_init): Likewise.
2760 * avr-tdep.c (avr_gdbarch_init): Likewise.
2761 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
2762 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
2763 * i386-tdep.c (i386_go32_init_abi): Likewise.
2764 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
2765 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
2766 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2767 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
2768 * sh-tdep.c (sh_gdbarch_init): Likewise.
2769 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2770 * sparc64-tdep.c (sparc64_init_abi): Likewise.
2771 * windows-tdep.c (windows_init_abi): Likewise.
2772 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
2773
2774 2017-04-12 Pedro Alves <palves@redhat.com>
2775
2776 PR c++/21323
2777 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
2778 cplus_primitive_type_char32_t>: New enum values.
2779 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
2780 and cplus_primitive_type_char32_t.
2781 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
2782 32, use the archtecture's built-in type for char16_t and char32_t,
2783 respectively. Otherwise, fallback to init_integer_type as before,
2784 but make the type unsigned, and issue a complaint.
2785 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
2786
2787 2017-04-12 Alan Hayward <alan.hayward@arm.com>
2788
2789 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
2790 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
2791
2792 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2793
2794 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
2795 'const char *'.
2796
2797 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2798
2799 * common/common-utils.c (free_vector_argv): New function.
2800 * common/common-utils.h: Include <vector>.
2801 (free_vector_argv): New prototype.
2802 * darwin-nat.c (darwin_create_inferior): Rewrite function
2803 prototype in order to constify "exec_file" and accept a
2804 "std::string" for "allargs".
2805 * fork-child.c: Include <vector>.
2806 (breakup_args): Rewrite function, using C++.
2807 (fork_inferior): Rewrite function header, constify "exec_file_arg"
2808 and accept "std::string" for "allargs". Update the code to
2809 calculate "argv" based on "allargs". Update calls to "exec_fun"
2810 and "execvp".
2811 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
2812 order to constify "exec_file" and accept a "std::string" for
2813 "allargs".
2814 * go32-nat.c (go32_create_inferior): Likewise.
2815 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
2816 * infcmd.c (run_command_1): Constify "exec_file". Use
2817 "std::string" for inferior arguments.
2818 * inferior.h (fork_inferior): Update prototype.
2819 * linux-nat.c (linux_nat_create_inferior): Rewrite function
2820 prototype in order to constify "exec_file" and accept a
2821 "std::string" for "allargs".
2822 * nto-procfs.c (procfs_create_inferior): Likewise.
2823 * procfs.c (procfs_create_inferior): Likewise.
2824 * remote-sim.c (gdbsim_create_inferior): Likewise.
2825 * remote.c (extended_remote_run): Update code to accept
2826 "std::string" as argument.
2827 (extended_remote_create_inferior): Rewrite function prototype in
2828 order to constify "exec_file" and accept a "std::string" for
2829 "allargs".
2830 * rs6000-nat.c (super_create_inferior): Likewise.
2831 (rs6000_create_inferior): Likewise.
2832 * target.h (struct target_ops) <to_create_inferior>: Likewise.
2833 * windows-nat.c (windows_create_inferior): Likewise.
2834
2835 2017-04-11 Pedro Alves <palves@redhat.com>
2836
2837 * thread.c: Fix whitespace throughout.
2838
2839 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
2840
2841 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
2842
2843 2017-04-11 Alan Hayward <alan.hayward@arm.com>
2844
2845 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
2846
2847 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
2848
2849 PR gdb/21364
2850 * osdata.c (info_osdata): Check if 'type' is an empty string
2851 instead of NULL.
2852
2853 2017-04-10 Pedro Alves <palves@redhat.com>
2854
2855 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
2856 (ptid_to_global_thread_id, in_thread_list)
2857 (do_captured_list_thread_ids, set_resumed, set_running)
2858 (set_executing, set_stop_requested, finish_thread_state)
2859 (validate_registers_access, can_access_registers_ptid)
2860 (print_thread_info_1, switch_to_thread)
2861 (do_restore_current_thread_cleanup)
2862 (make_cleanup_restore_current_thread, thread_command)
2863 (thread_name_command): Use operator== instead of ptid_equal.
2864
2865 2017-04-10 Pedro Alves <palves@redhat.com>
2866
2867 * thread.c (struct current_thread_cleanup) <next>: Delete field.
2868 (current_thread_cleanup_chain): Delete.
2869 (restore_current_thread_cleanup_dtor)
2870 (make_cleanup_restore_current_thread): Remove references to
2871 current_thread_cleanup_chain.
2872
2873 2017-04-10 Alan Hayward <alan.hayward@arm.com>
2874
2875 * msp430-tdep.c (msp430_pseudo_register_read): Never return
2876 REG_UNKNOWN.
2877
2878 2017-04-10 Yao Qi <yao.qi@linaro.org>
2879
2880 PR gdb/19942
2881 * gdbthread.h (thread_info::deletable): New method.
2882 (thread_info::incref): New method.
2883 (thread_info::decref): New method.
2884 (thread_info::refcount): Move it to private.
2885 * infrun.c (save_stop_context): Call inc_refcount.
2886 (release_stop_context_cleanup): Likewise.
2887 * thread.c (set_thread_exited): New function.
2888 (init_thread_list): Delete "tp" only it is deletable, otherwise
2889 call set_thread_exited.
2890 (delete_thread_1): Call set_thread_exited.
2891 (current_thread_cleanup) <inferior_pid>: Remove.
2892 <thread>: New field.
2893 (restore_current_thread_ptid_changed): Removed.
2894 (do_restore_current_thread_cleanup): Adjust.
2895 (restore_current_thread_cleanup_dtor): Don't call
2896 find_thread_ptid.
2897 (set_thread_refcount): Use dec_refcount.
2898 (make_cleanup_restore_current_thread): Adjust.
2899 (thread_apply_all_command): Call inc_refcount.
2900 (_initialize_thread): Don't call
2901 observer_attach_thread_ptid_changed.
2902
2903 2017-04-10 Yao Qi <yao.qi@linaro.org>
2904
2905 * thread.c (delete_thread_1): Hoist code on marking thread as
2906 exited.
2907
2908 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
2909
2910 * windows-nat.c (windows_detach): Initialize ptid with
2911 minus_one_ptid.
2912
2913 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
2914
2915 * unittests/ptid-selftests.c: Fix erroneous assert messages.
2916
2917 2017-04-07 Alan Hayward <alan.hayward@arm.com>
2918
2919 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
2920 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
2921 (bfin_pseudo_register_write): Likewise
2922
2923 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2924
2925 * common/ptid.h (struct ptid): Change to...
2926 (class ptid_t): ... this.
2927 <ptid_t>: New constructors.
2928 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
2929 matches>: New methods.
2930 <make_null, make_minus_one>: New static methods.
2931 <pid>: Rename to...
2932 <m_pid>: ...this.
2933 <lwp>: Rename to...
2934 <m_lwp>: ...this.
2935 <tid>: Rename to...
2936 <m_tid>: ...this.
2937 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
2938 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
2939 as references, move comment to class ptid_t.
2940 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
2941 ptid_t static methods.
2942 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
2943 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
2944 Take ptid arguments as references, implement using ptid_t methods.
2945 * unittests/ptid-selftests.c: New file.
2946 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2947 unittests/ptid-selftests.c.
2948 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
2949
2950 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
2951
2952 * python/python.c (python_run_simple_file): Cast mode literal to
2953 non-const char pointer as expected by PyFile_FromString.
2954
2955 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
2956
2957 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
2958 minus_one_ptid and null_ptid.
2959
2960 2017-04-05 Pedro Alves <palves@redhat.com>
2961
2962 * warning.m4 (build_warnings): Remove -Wno-write-strings.
2963 * configure: Regenerate.
2964
2965 2017-04-05 Pedro Alves <palves@redhat.com>
2966
2967 * ada-exp.y (yyerror): Constify.
2968 * ada-lang.c (bound_name, get_selections)
2969 (ada_variant_discrim_type)
2970 (ada_variant_discrim_name, ada_value_struct_elt)
2971 (ada_lookup_struct_elt_type, is_unchecked_variant)
2972 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
2973 (catch_ada_exception_command_split)
2974 (catch_ada_assert_command_split, catch_assert_command)
2975 (ada_op_name): Constify.
2976 * ada-lang.h (ada_yyerror, get_selections)
2977 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
2978 * arc-tdep.c (arc_print_frame_cache): Constify.
2979 * arm-tdep.c (arm_skip_stub): Constify.
2980 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
2981 (gen_aggregate_elt_ref): Constify.
2982 * bcache.c (print_bcache_statistics): Constify.
2983 * bcache.h (print_bcache_statistics): Constify.
2984 * break-catch-throw.c (catch_exception_command_1):
2985 * breakpoint.c (struct ep_type_description::description):
2986 Constify.
2987 (add_solib_catchpoint): Constify.
2988 (catch_fork_command_1): Add cast.
2989 (add_catch_command): Constify.
2990 * breakpoint.h (add_catch_command, add_solib_catchpoint):
2991 Constify.
2992 * bsd-uthread.c (bsd_uthread_state): Constify.
2993 * buildsym.c (patch_subfile_names): Constify.
2994 * buildsym.h (next_symbol_text_func, patch_subfile_names):
2995 Constify.
2996 * c-exp.y (yyerror): Constify.
2997 (token::oper): Constify.
2998 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
2999 * c-varobj.c (cplus_describe_child): Constify.
3000 * charset.c (find_charset_names): Add cast.
3001 (find_charset_names): Constify array and add const_cast.
3002 * cli/cli-cmds.c (complete_command, cd_command): Constify.
3003 (edit_command): Constify.
3004 * cli/cli-decode.c (lookup_cmd): Constify.
3005 * cli/cli-dump.c (dump_memory_command, dump_value_command):
3006 Constify.
3007 (struct dump_context): Constify.
3008 (add_dump_command, restore_command): Constify.
3009 * cli/cli-script.c (get_command_line): Constify.
3010 * cli/cli-script.h (get_command_line): Constify.
3011 * cli/cli-utils.c (check_for_argument): Constify.
3012 * cli/cli-utils.h (check_for_argument): Constify.
3013 * coff-pe-read.c (struct read_pe_section_data): Constify.
3014 * command.h (lookup_cmd): Constify.
3015 * common/print-utils.c (decimal2str): Constify.
3016 * completer.c (gdb_print_filename): Constify.
3017 * corefile.c (set_gnutarget): Constify.
3018 * cp-name-parser.y (yyerror): Constify.
3019 * cp-valprint.c (cp_print_class_member): Constify.
3020 * cris-tdep.c (cris_register_name, crisv32_register_name):
3021 Constify.
3022 * d-exp.y (yyerror): Constify.
3023 (struct token::oper): Constify.
3024 * d-lang.h (d_yyerror): Constify.
3025 * dbxread.c (struct header_file_location::name): Constify.
3026 (add_old_header_file, add_new_header_file, last_function_name)
3027 (dbx_next_symbol_text, add_bincl_to_list)
3028 (find_corresponding_bincl_psymtab, set_namestring)
3029 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
3030 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
3031 * defs.h (command_line_input, print_address_symbolic)
3032 (deprecated_readline_begin_hook): Constify.
3033 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
3034 Constify.
3035 * event-top.c (handle_line_of_input): Constify and add cast.
3036 * exceptions.c (catch_errors): Constify.
3037 * exceptions.h (catch_errors): Constify.
3038 * expprint.c (print_subexp_standard, op_string, op_name)
3039 (op_name_standard, dump_raw_expression, dump_raw_expression):
3040 * expression.h (op_name, op_string, dump_raw_expression):
3041 Constify.
3042 * f-exp.y (yyerror): Constify.
3043 (struct token::oper): Constify.
3044 (struct f77_boolean_val::name): Constify.
3045 * f-lang.c (f_word_break_characters): Constify.
3046 * f-lang.h (f_yyerror): Constify.
3047 * fork-child.c (fork_inferior): Add cast.
3048 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
3049 (new_variant): Constify.
3050 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
3051 * gdbarch.c: Regenerate.
3052 * gdbcore.h (set_gnutarget): Constify.
3053 * go-exp.y (yyerror): Constify.
3054 (token::oper): Constify.
3055 * go-lang.h (go_yyerror): Constify.
3056 * go32-nat.c (go32_sysinfo): Constify.
3057 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
3058 * guile/scm-cmd.c (cmdscm_function): Constify.
3059 * guile/scm-param.c (pascm_param_value): Constify.
3060 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
3061 (h8300sx_register_name): Constify.
3062 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
3063 Constify.
3064 * ia64-tdep.c (ia64_register_names): Constify.
3065 * infcmd.c (construct_inferior_arguments): Constify.
3066 (path_command, attach_post_wait): Constify.
3067 * language.c (show_range_command, show_case_command)
3068 (unk_lang_error): Constify.
3069 * language.h (language_defn::la_error)
3070 (language_defn::la_name_of_this): Constify.
3071 * linespec.c (decode_line_2): Constify.
3072 * linux-thread-db.c (thread_db_err_str): Constify.
3073 * lm32-tdep.c (lm32_register_name): Constify.
3074 * m2-exp.y (yyerror): Constify.
3075 * m2-lang.h (m2_yyerror): Constify.
3076 * m32r-tdep.c (m32r_register_names): Constify and make static.
3077 * m68hc11-tdep.c (m68hc11_register_names): Constify.
3078 * m88k-tdep.c (m88k_register_name): Constify.
3079 * macroexp.c (appendmem): Constify.
3080 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
3081 (upgrade_type, parse_external, parse_partial_symbols)
3082 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
3083 (new_symbol): Constify.
3084 * memattr.c (mem_info_command): Constify.
3085 * mep-tdep.c (register_name_from_keyword): Constify.
3086 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
3087 Constify.
3088 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
3089 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
3090 * mi/mi-main.c (captured_mi_execute_command): Constify and add
3091 cast.
3092 (mi_execute_async_cli_command): Constify.
3093 * mips-tdep.c (mips_register_name): Constify.
3094 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
3095 (am33_register_name, am33_2_register_name)
3096 * moxie-tdep.c (moxie_register_names): Constify.
3097 * nat/linux-osdata.c (osdata_type): Constify fields.
3098 * nto-tdep.c (nto_parse_redirection): Constify.
3099 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
3100 (lookup_child_selector): Constify.
3101 (objc_methcall::name): Constify.
3102 * objc-lang.h (lookup_objc_class, lookup_child_selector)
3103 (lookup_struct_typedef): Constify.
3104 * objfiles.c (pc_in_section): Constify.
3105 * objfiles.h (pc_in_section): Constify.
3106 * p-exp.y (struct token::oper): Constify.
3107 (yyerror): Constify.
3108 * p-lang.h (pascal_yyerror): Constify.
3109 * parser-defs.h (op_name_standard): Constify.
3110 (op_print::string): Constify.
3111 (exp_descriptor::op_name): Constify.
3112 * printcmd.c (print_address_symbolic): Constify.
3113 * psymtab.c (print_partial_symbols): Constify.
3114 * python/py-breakpoint.c (stop_func): Constify.
3115 (bppy_get_expression): Constify.
3116 * python/py-cmd.c (cmdpy_completer::name): Constify.
3117 (cmdpy_function): Constify.
3118 * python/py-event.c (evpy_add_attribute)
3119 (gdbpy_initialize_event_generic): Constify.
3120 * python/py-event.h (evpy_add_attribute)
3121 (gdbpy_initialize_event_generic): Constify.
3122 * python/py-evts.c (add_new_registry): Constify.
3123 * python/py-finishbreakpoint.c (outofscope_func): Constify.
3124 * python/py-framefilter.c (get_py_iter_from_func): Constify.
3125 * python/py-inferior.c (get_buffer): Add cast.
3126 * python/py-param.c (parm_constant::name): Constify.
3127 * python/py-unwind.c (fprint_frame_id): Constify.
3128 * python/python.c (gdbpy_parameter_value): Constify.
3129 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
3130 * remote.c (memory_packet_config::name): Constify.
3131 (show_packet_config_cmd, remote_write_bytes)
3132 (remote_buffer_add_string):
3133 * reverse.c (exec_reverse_once): Constify.
3134 * rs6000-tdep.c (variant::name, variant::description): Constify.
3135 * rust-exp.y (rustyyerror): Constify.
3136 * rust-lang.c (rust_op_name): Constify.
3137 * rust-lang.h (rustyyerror): Constify.
3138 * serial.h (serial_ops::name): Constify.
3139 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
3140 (sh_sh3e_register_name, sh_sh2e_register_name)
3141 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
3142 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
3143 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
3144 (sh_sh4al_dsp_register_name): Constify.
3145 * sh64-tdep.c (sh64_register_name): Constify.
3146 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
3147 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
3148 * stabsread.c (patch_block_stabs, read_type_number)
3149 (ref_map::stabs, ref_add, process_reference)
3150 (symbol_reference_defined, define_symbol, define_symbol)
3151 (error_type, read_type, read_member_functions, read_cpp_abbrev)
3152 (read_one_struct_field, read_struct_fields, read_baseclasses)
3153 (read_tilde_fields, read_struct_type, read_array_type)
3154 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
3155 (read_huge_number, read_range_type, read_args, common_block_start)
3156 (find_name_end): Constify.
3157 * stabsread.h (common_block_start, define_symbol)
3158 (process_one_symbol, symbol_reference_defined, ref_add):
3159 * symfile.c (get_section_index, add_symbol_file_command):
3160 * symfile.h (get_section_index): Constify.
3161 * target-descriptions.c (tdesc_type::name): Constify.
3162 (tdesc_free_type): Add cast.
3163 * target.c (find_default_run_target):
3164 (add_deprecated_target_alias, find_default_run_target)
3165 (target_announce_detach): Constify.
3166 (do_option): Constify.
3167 * target.h (add_deprecated_target_alias): Constify.
3168 * thread.c (print_thread_info_1): Constify.
3169 * top.c (deprecated_readline_begin_hook, command_line_input):
3170 Constify.
3171 (init_main): Add casts.
3172 * top.h (handle_line_of_input): Constify.
3173 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
3174 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
3175 (tfind_command): Rename to ...
3176 (tfind_command_1): ... this and constify.
3177 (tfind_command): New function.
3178 (tfind_end_command, tfind_start_command): Adjust.
3179 (encode_source_string): Constify.
3180 * tracepoint.h (encode_source_string): Constify.
3181 * tui/tui-data.c (tui_partial_win_by_name): Constify.
3182 * tui/tui-data.h (tui_partial_win_by_name): Constify.
3183 * tui/tui-source.c (tui_set_source_content_nil): Constify.
3184 * tui/tui-source.h (tui_set_source_content_nil): Constify.
3185 * tui/tui-win.c (parse_scrolling_args): Constify.
3186 * tui/tui-windata.c (tui_erase_data_content): Constify.
3187 * tui/tui-windata.h (tui_erase_data_content): Constify.
3188 * tui/tui-winsource.c (tui_erase_source_content): Constify.
3189 * tui/tui.c (tui_enable): Add cast.
3190 * utils.c (defaulted_query): Constify.
3191 (init_page_info): Add cast.
3192 (puts_debug, subset_compare): Constify.
3193 * utils.h (subset_compare): Constify.
3194 * varobj.c (varobj_format_string): Constify.
3195 * varobj.h (varobj_format_string): Constify.
3196 * vax-tdep.c (vax_register_name): Constify.
3197 * windows-nat.c (windows_detach): Constify.
3198 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
3199 * xml-support.c (gdb_xml_end_element): Constify.
3200 * xml-tdesc.c (tdesc_start_reg): Constify.
3201 * xstormy16-tdep.c (xstormy16_register_name): Constify.
3202 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
3203 * xtensa-tdep.h (xtensa_register_t::name): Constify.
3204
3205 2017-04-05 Pedro Alves <palves@redhat.com>
3206
3207 * proc-api.c (struct trans): Constify.
3208 (procfs_note): Constify.
3209 * proc-events.c (struct trans, syscall_table):
3210 * proc-flags.c (struct trans): Constify.
3211 * proc-utils.h (procfs_note): Constify.
3212 * proc-why.c (struct trans): Constify.
3213 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
3214 (procfs_detach): Constify.
3215 * sol-thread.c (struct string_map): Constify.
3216 (td_err_string, td_state_string): Constify.
3217
3218 2017-04-05 Pedro Alves <palves@redhat.com>
3219
3220 * proc-api.c (procfs_filename): Don't initialize
3221 procfs_filename.
3222 (prepare_to_trace): Assume procfs_filename is non-NULL.
3223 (_initialize_proc_api): Give procfs_filename a default value here.
3224
3225 2017-04-05 Pedro Alves <palves@redhat.com>
3226
3227 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
3228 'cond_string' parameter.
3229 (extract_exception_regexp): Constify 'string' parameter.
3230 (catch_exception_command_1): Constify.
3231 * breakpoint.c (init_catchpoint)
3232 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
3233 parameter.
3234 (ep_parse_optional_if_clause, catch_fork_command_1)
3235 (catch_exec_command_1): Constify.
3236 * breakpoint.h (init_catchpoint): Constify 'cond_string'
3237 parameter.
3238 (ep_parse_optional_if_clause): Constify.
3239 * cli/cli-utils.c (remove_trailing_whitespace)
3240 (check_for_argument): Constify.
3241 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
3242 non-const overload.
3243 (check_for_argument): Likewise.
3244
3245 2017-04-05 Pedro Alves <palves@redhat.com>
3246
3247 * event-top.c (command_line_handler): Add cast to execute_command
3248 call.
3249 * record-btrace.c (cmd_record_btrace_bts_start)
3250 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
3251 (cmd_record_btrace_start): Add cast to execute_command call.
3252 * record-full.c (record_full_goto_insn):
3253 * record.c (record_start, record_stop): Add cast to
3254 execute_command_to_string calls.
3255 (cmd_record_start): Add cast to execute_command calls.
3256
3257 2017-04-05 Pedro Alves <palves@redhat.com>
3258
3259 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
3260 static inline function.
3261 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
3262 array and use gdb_PyArg_ParseTupleAndKeywords.
3263 * python/py-cmd.c (cmdpy_init): Likewise.
3264 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
3265 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
3266 (infpy_search_memory): Likewise.
3267 * python/py-objfile.c (objfpy_add_separate_debug_file)
3268 (gdbpy_lookup_objfile): Likewise.
3269 * python/py-symbol.c (gdbpy_lookup_symbol)
3270 (gdbpy_lookup_global_symbol): Likewise.
3271 * python/py-type.c (gdbpy_lookup_type): Likewise.
3272 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
3273 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
3274 Likewise.
3275
3276 2017-04-05 Pedro Alves <palves@redhat.com>
3277
3278 * python/python-internal.h (gdb_PyGetSetDef): New type.
3279 * python/py-block.c (block_object_getset)
3280 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
3281 * python/py-event.c (event_object_getset)
3282 (finish_breakpoint_object_getset): Likewise.
3283 * python/py-inferior.c (inferior_object_getset): Likewise.
3284 * python/py-infthread.c (thread_object_getset): Likewise.
3285 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
3286 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
3287 * python/py-objfile.c (objfile_getset): Likewise.
3288 * python/py-progspace.c (pspace_getset): Likewise.
3289 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
3290 Likewise.
3291 * python/py-record.c (recpy_record_getset): Likewise.
3292 * python/py-symbol.c (symbol_object_getset): Likewise.
3293 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
3294 Likewise.
3295 * python/py-type.c (type_object_getset, field_object_getset):
3296 Likewise.
3297 * python/py-value.c (value_object_getset): Likewise.
3298
3299 2017-04-05 Pedro Alves <palves@redhat.com>
3300
3301 * python/python-internal.h (gdb_PyObject_CallMethod)
3302 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
3303 New functions.
3304 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
3305 (PySys_GetObject, PySys_SetPath): New macros.
3306
3307 2017-04-05 Pedro Alves <palves@redhat.com>
3308
3309 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
3310 info_osdata_command.
3311 * osdata.c (info_osdata_command): Rename to ...
3312 (info_osdata): ... this. Constify 'type' parameter, and remove
3313 the 'from_tty' parameter. Accept NULL TYPE.
3314 (info_osdata_command): New function.
3315 * osdata.h (info_osdata_command): Remove declaration.
3316 (info_osdata): New declaration.
3317
3318 2017-04-05 Pedro Alves <palves@redhat.com>
3319
3320 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
3321 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
3322 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
3323 parameter.
3324 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
3325 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
3326 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
3327 parameter.
3328 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
3329 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
3330 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
3331 (mi_cmd_file_list_exec_source_files)
3332 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
3333 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
3334 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
3335 parameter.
3336 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
3337 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
3338 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
3339 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
3340 (mi_cmd_stack_info_frame): Constify 'command' parameter.
3341 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
3342 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
3343 'command' parameter.
3344 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
3345 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
3346 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
3347 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
3348 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
3349 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
3350 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
3351 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
3352 (mi_cmd_var_set_update_range): Constify 'command' parameter.
3353 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
3354 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
3355 parameter.
3356 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
3357 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
3358 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
3359 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
3360 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
3361 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
3362 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
3363 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
3364 (mi_cmd_data_list_changed_registers)
3365 (mi_cmd_data_write_register_values)
3366 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
3367 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
3368 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
3369 (mi_cmd_list_features, mi_cmd_list_target_features)
3370 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
3371 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
3372 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
3373 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
3374 (mi_cmd_trace_frame_collected): Constify 'command'
3375 parameter.
3376 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
3377 'command' parameter.
3378
3379 2017-04-05 Pedro Alves <palves@redhat.com>
3380
3381 * ada-lang.c (ada_completer_word_break_characters): Now a const
3382 array.
3383 (ada_get_gdb_completer_word_break_characters): Constify.
3384 * completer.c (gdb_completer_command_word_break_characters)
3385 (gdb_completer_file_name_break_characters)
3386 (gdb_completer_quote_characters): Now const arrays.
3387 (get_gdb_completer_quote_characters): Constify.
3388 (set_rl_completer_word_break_characters): New function.
3389 (set_gdb_completion_word_break_characters)
3390 (complete_line_internal): Use it.
3391 * completer.h (get_gdb_completer_quote_characters): Constify.
3392 (set_rl_completer_word_break_characters): Declare.
3393 * f-lang.c (f_word_break_characters): Constify.
3394 * language.c (default_word_break_characters): Constify.
3395 * language.h (language_defn::la_word_break_characters): Constify.
3396 (default_word_break_characters): Constify.
3397 * top.c (init_main): Use set_rl_completer_word_break_characters.
3398
3399 2017-04-05 Pedro Alves <palves@redhat.com>
3400
3401 * aix-thread.c (aix_thread_pid_to_str)
3402 (aix_thread_extra_thread_info): Constify.
3403 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
3404 * bsd-uthread.c (bsd_uthread_extra_thread_info)
3405 (bsd_uthread_pid_to_str): Constify.
3406 * corelow.c (core_pid_to_str): Constify.
3407 * darwin-nat.c (darwin_pid_to_str): Constify.
3408 * fbsd-nat.c (fbsd_pid_to_str): Constify.
3409 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
3410 Constify.
3411 * gnu-nat.c (gnu_pid_to_str): Constify.
3412 * go32-nat.c (go32_pid_to_str): Constify.
3413 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
3414 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
3415 * inferior.c (inferior_pid_to_str): Constify.
3416 * linux-nat.c (linux_nat_pid_to_str): Constify.
3417 * linux-tdep.c (linux_core_pid_to_str): Constify.
3418 * linux-thread-db.c (thread_db_pid_to_str)
3419 (thread_db_extra_thread_info): Constify.
3420 * nto-tdep.c (nto_extra_thread_info): Constify.
3421 * nto-tdep.h (nto_extra_thread_info): Constify.
3422 * obsd-nat.c (obsd_pid_to_str): Constify.
3423 * procfs.c (procfs_pid_to_str): Constify.
3424 * ravenscar-thread.c (ravenscar_extra_thread_info)
3425 (ravenscar_pid_to_str): Constify.
3426 * remote-sim.c (gdbsim_pid_to_str): Constify.
3427 * remote.c (remote_threads_extra_info, remote_pid_to_str):
3428 Constify.
3429 * sol-thread.c (solaris_pid_to_str): Constify.
3430 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
3431 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
3432 * target.c (default_pid_to_str, target_pid_to_str)
3433 (normal_pid_to_str, default_pid_to_str): Constify.
3434 * target.h (target_ops::to_pid_to_str)
3435 (target_ops::to_extra_thread_info): Constify.
3436 (target_pid_to_str, normal_pid_to_str): Constify.
3437 * windows-nat.c (windows_pid_to_str): Constify.
3438 * gdbarch.sh (core_pid_to_str): Constify.
3439 * target-delegates.c: Regenerate.
3440 * gdbarch.h, gdbarch.c: Regenerate.
3441
3442 2017-04-05 Pedro Alves <palves@redhat.com>
3443
3444 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
3445 the memory of the temporary warning_pre_print override.
3446 * utils.c (warning_pre_print): Constify.
3447 * utils.h (warning_pre_print): Constify.
3448
3449 2017-04-05 Pedro Alves <palves@redhat.com>
3450
3451 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
3452 (shell_command): New function.
3453 (make_command): Use std::string.
3454 (init_cli_cmds): Register shell_command instead of shell_escape.
3455
3456 2017-04-05 Pedro Alves <palves@redhat.com>
3457
3458 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
3459 * tracepoint.c (default_collect): Don't initialize.
3460
3461 2017-04-05 Pedro Alves <palves@redhat.com>
3462
3463 * macroexp.c (macro_buffer::shared): Now a bool.
3464 (init_buffer): Update.
3465 (init_shared_buffer): Constify 'addr' parameter.
3466 (substitute_args, expand, macro_expand, macro_expand_next): Remove
3467 casts.
3468
3469 2017-04-05 Pedro Alves <palves@redhat.com>
3470
3471 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
3472 * disasm.c (set_disassembler_options): Constify local.
3473 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
3474
3475 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
3476
3477 PR gdb/21352
3478 * tracefile.c (tsave_command): Fix argument parsing for '-r'
3479 option.
3480
3481 2017-04-05 Yao Qi <yao.qi@linaro.org>
3482
3483 * frame.c (frame_unwind_register_unsigned): Call
3484 frame_unwind_register_value.
3485
3486 2017-04-05 Yao Qi <yao.qi@linaro.org>
3487
3488 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
3489 Use gdb_test_multiple, and don't match anchor.
3490
3491 2017-04-05 Pedro Alves <palves@redhat.com>
3492
3493 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
3494 (Write After Approval): Remove Simon Marchi.
3495
3496 2017-04-05 Pedro Alves <palves@redhat.com>
3497
3498 * common/gdb_optional.h (optional::optional): Make constexpr and
3499 initialize m_dummy.
3500
3501 2017-04-04 John Baldwin <jhb@FreeBSD.org>
3502
3503 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
3504 (amd64fbsd_jmp_buf_reg_offset): Remove.
3505 (amd64fbsd_supply_uthread): Remove function.
3506 (amd64fbsd_collect_uthread): Remove function.
3507 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
3508 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
3509 (x86_64-*-freebsd*): Remove bsd-uthread.o.
3510 (fbsd-nat.c): Update comment.
3511 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
3512 (i386fbsd_jmp_buf_reg_offset): Remove.
3513 (i386fbsd_supply_uthread): Remove function.
3514 (i386fbsd_collect_uthread): Remove function.
3515 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
3516
3517 2017-04-04 John Baldwin <jhb@FreeBSD.org>
3518
3519 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
3520 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
3521 * NEWS: Mention that support for FreeBSD/alpha was removed.
3522 * alpha-fbsd-tdep.c: Delete file.
3523 * config/alpha/fbsd.mh: Delete file.
3524 * configure.host: Delete alpha*-*-freebsd* and
3525 alpha*-*-kfreebsd*-gnu.
3526 * configure.tgt: Delete alpha*-*-freebsd* and
3527 alpha*-*-kfreebsd*-gnu.
3528
3529 2017-04-04 John Baldwin <jhb@FreeBSD.org>
3530
3531 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
3532 amd64bsd_store_inferior_registers): Use ptid from regcache.
3533
3534 2017-04-04 Pedro Alves <palves@redhat.com>
3535
3536 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
3537 data fields, make them private and add "m_" prefixes.
3538 (lnp_state_machine::lnp_state_machine): New ctor.
3539 (record_line, check_line_address, handle_set_discriminator)
3540 (handle_set_address, handle_advance_pc, handle_special_opcode)
3541 (handle_advance_line, handle_set_file, handle_negate_stmt)
3542 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
3543 (end_sequence, advance_line): New methods.
3544 (m_gdbarch, m_record_lines_p): New fields.
3545 (lnp_reader_state): Delete.
3546 (dwarf_record_line): Rename to ...
3547 (lnp_state_machine::record_line): ... adjust.
3548 (init_lnp_state_machine): Delete.
3549 (lnp_state_machine::lnp_state_machine): New.
3550 (check_line_address): Rename to ...
3551 (lnp_state_machine::check_line_address): This.
3552 (dwarf_decode_lines_1): Remove reference to "reader_state".
3553 Adjust lnp_state_machine having a non-default ctor. Use bool.
3554 State machine internal state manipulation moved to
3555 lnp_state_machine methods.
3556
3557 2017-04-04 Pedro Alves <palves@redhat.com>
3558
3559 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3560 unittests/offset-type-selftests.c.
3561 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
3562 * common/offset-type.h: New file.
3563 * common/preprocessor.h: New file.
3564 * common/traits.h: New file.
3565 * common/valid-expr.h: New file.
3566 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
3567 sect_offset and cu_offset strong typedefs throughout.
3568 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
3569 typedefs throughout.
3570 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
3571 sect_offset and cu_offset strong typedefs throughout.
3572 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
3573 typedefs throughout.
3574 * gdbtypes.h: Include "common/offset-type.h".
3575 (cu_offset): Now an offset type (strong typedef) instead of a
3576 struct.
3577 (sect_offset): Likewise.
3578 (union call_site_parameter_u): Rename "param_offset" field to
3579 "param_cu_off".
3580 * unittests/offset-type-selftests.c: New file.
3581
3582 2017-04-04 Pedro Alves <palves@redhat.com>
3583
3584 * common/underlying.h: New file.
3585 * dwarf2read.c: Include "common/gdb_optional.h" and
3586 "common/underlying.h".
3587 (dir_index, file_name_index): New types.
3588 (file_entry): Use them.
3589 (file_entry::include): Use to_underlying.
3590 (line_header::add_file_name): Use dir_index.
3591 (read_formatted_entries): Use gdb::optional. Read form before
3592 writting to file_entry.
3593 (dwarf_decode_line_header): Use dir_index.
3594 (lnp_state_machine::current_file): Use to_underlying.
3595 (lnp_state_machine::file): Change type to file_name_index.
3596 (dwarf_record_line): Use to_underlying.
3597 (init_lnp_state_machine): Use file_name_index.
3598 (dwarf_decode_lines_1): Use dir_index and file_name_index.
3599
3600 2017-04-04 Pedro Alves <palves@redhat.com>
3601
3602 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
3603 operator bool, has_value and get methods.
3604
3605 2017-04-04 Pedro Alves <palves@redhat.com>
3606
3607 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
3608 fields.
3609 (line_header): Initialize all data fields. Change type of
3610 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
3611 Change type of include_dirs to std::vector<const char *>. Remove
3612 num_include_dirs, include_dirs_size. Change type of file_names to
3613 std::vector<file_entry>. Remove num_file_names, file_names_size.
3614 (line_header::line_header): New.
3615 (line_header::add_include_dir, line_header::add_file_name): New
3616 methods.
3617 (line_header::include_dir_at): Remove NULL check.
3618 (line_header::file_name_at): Add const overload.
3619 (line_header_up): New unique_ptr typedef.
3620 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
3621 std::vector. Remove free_line_header call.
3622 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
3623 free_line_header call.
3624 (free_cu_line_header): Delete.
3625 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
3626 (setup_type_unit_groups): Use line_header_up instead of cleanups.
3627 Adjust to use std::vector.
3628 (free_line_header): Delete.
3629 (free_line_header_voidp): Use delete.
3630 (add_include_dir): Replace with ...
3631 (line_header::add_include_dir): ... this method. Use std::vector.
3632 (add_file_name): Replace with ...
3633 (line_header::add_file_name): ... this method. Use std::vector.
3634 (add_include_dir_stub): Delete.
3635 (read_formatted_entries): Remove memset.
3636 (dwarf_decode_line_header): Return a line_header_up instead of a
3637 raw pointer. Remove cleanup handling. Pass lambdas to
3638 read_formatted_entries. Adjust to use line_header methods.
3639 (dwarf_decode_lines_1): Adjust to use line_header methods.
3640 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
3641 use std::vector.
3642
3643 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
3644
3645 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
3646 instead of struct ptid.
3647
3648 2017-05-04 Alan Hayward <alan.hayward@arm.com>
3649
3650 * frame.c (get_frame_register_bytes): Unwind using value.
3651 (put_frame_register_bytes): Likewise.
3652
3653 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
3654
3655 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
3656 aggregate-like.
3657
3658 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
3659
3660 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
3661
3662 2017-03-29 Yao Qi <yao.qi@linaro.org>
3663
3664 * gdbthread.h (struct thread_info): Declare constructor and
3665 destructor. Add some in-class member initializers.
3666 * thread.c (free_thread): Remove.
3667 (init_thread_list): Call delete instead of free_thread.
3668 (new_thread): Call thread_info constructor.
3669 (thread_info::thread_info): New function.
3670 (thread_info::~thread_info): New function.
3671 (delete_thread_1): Call delete instead of free_thread.
3672 (make_cleanup_restore_current_thread): Move tp and frame to
3673 inner block.
3674
3675 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
3676
3677 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
3678 (arc_skip_prologue): Likewise.
3679 (arc_make_frame_cache): Likewise.
3680 (arc_pv_get_operand): New function.
3681 (arc_is_in_prologue): Likewise.
3682 (arc_analyze_prologue): Likewise.
3683 (arc_print_frame_cache): Likewise.
3684 (MAX_PROLOGUE_LENGTH): New constant.
3685
3686 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
3687
3688 * configure.tgt: Add arc-insn.o.
3689 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
3690 (dump_arc_instruction_command): New function.
3691 (arc_fprintf_disasm): Likewise.
3692 (arc_disassemble_info): Likewise.
3693 (arc_insn_get_operand_value): Likewise.
3694 (arc_insn_get_operand_value_signed): Likewise.
3695 (arc_insn_get_memory_base_reg): Likewise.
3696 (arc_insn_get_memory_offset): Likewise.
3697 (arc_insn_get_branch_target): Likewise.
3698 (arc_insn_dump): Likewise.
3699 (arc_insn_get_linear_next_pc): Likewise.
3700 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
3701 (arc_disassemble_info): Likewise.
3702 (arc_insn_get_branch_target): Likewise.
3703 (arc_insn_get_linear_next_pc): Likewise.
3704 * NEWS: Mention new "maint print arc arc-instruction".
3705
3706 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
3707
3708 * arc-tdep (maintenance_print_arc_list): New variable.
3709 (maintenance_print_arc_command): New function.
3710
3711 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
3712
3713 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
3714 Add "limm" and "reserved".
3715 (arc_cannot_fetch_register, arc_cannot_store_register): Add
3716 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
3717 * arc-tdep.h (arc_regnum): Likewise.
3718
3719 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3720
3721 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
3722 for THREADPTR register.
3723 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
3724 register.
3725 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
3726 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
3727 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
3728
3729 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3730
3731 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
3732 registers above gdbarch_num_regs (gdbarch) as privileged in
3733 call0 ABI.
3734
3735 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3736
3737 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
3738 for a single specified register or for all registers in
3739 a0_base..a0_base + C0_NREGS range.
3740 (supply_gregset_reg): Call regcache_raw_supply for a single
3741 specified register or for all registers in a0_base..a0_base +
3742 C0_NREGS range.
3743
3744 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3745
3746 * arch/xtensa.h (C0_NREGS): Add definition.
3747 * xtensa-tdep.c (C0_NREGS): Remove definition.
3748
3749 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3750
3751 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
3752 Drop xtensa_default_isa initialization.
3753 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
3754
3755 2017-03-27 Pedro Alves <palves@redhat.com>
3756
3757 * dwarf2read.c (file_entry) <dir_index>: Add comment.
3758 (file_entry::include_dir): New method.
3759 (line_header::include_dir_at, line_header::file_name_at): New
3760 methods.
3761 (setup_type_unit_groups, setup_type_unit_groups)
3762 (psymtab_include_file_name): Simplify using the new methods.
3763 (lnp_state_machine) <the_line_header>: New field.
3764 <file>: Add comment.
3765 (lnp_state_machine::current_file): New method.
3766 (dwarf_record_line): Simplify using the new methods.
3767 (init_lnp_state_machine): Initialize the "the_line_header" field.
3768 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
3769 Simplify using the new methods.
3770
3771 2017-03-27 Pedro Alves <palves@redhat.com>
3772
3773 * cp-name-parser.y (make_empty): Delete.
3774 (demangler_special, nested_name, ptr_operator, array_indicator)
3775 (direct_declarator, declarator_1): Use fill_comp instead of
3776 make_empty.
3777
3778 2017-03-27 Pedro Alves <palves@redhat.com>
3779
3780 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
3781 to ATTRIBUTE_PRINTF.
3782 * solib-target.c (library_list_start_list): Print "string" not
3783 "version".
3784 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
3785 gdb_xml_error call.
3786
3787 2017-03-27 Pedro Alves <palves@redhat.com>
3788
3789 * dwarf2read.c (struct file_and_directory): New.
3790 (dwarf2_get_dwz_file): Adjust to use std::string.
3791 (dw2_get_file_names_reader): Adjust to use file_and_directory.
3792 (find_file_and_directory): Adjust to return a file_and_directory
3793 object.
3794 (read_file_scope): Adjust to use file_and_directory. Remove
3795 make_cleanup/do_cleanups calls.
3796 (open_and_init_dwp_file): Adjust to use std::string. Remove
3797 make_cleanup/do_cleanups calls.
3798 * python/python.c (do_start_initialization): Adjust to ldirname
3799 returning a std::string.
3800 * utils.c (ldirname): Now returns a std::string.
3801 * utils.h (ldirname): Change return type to std::string.
3802 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
3803 returning a std::string.
3804 * xml-tdesc.c (file_read_description_xml): Likewise.
3805
3806 2017-03-24 Alan Hayward <alan.hayward@arm.com>
3807
3808 * regcache.c (regcache_debug_print_register): New function.
3809 * regcache.h (regcache_debug_print_register): New declaration.
3810 * target.c (debug_print_register): Remove.
3811 (target_fetch_registers): Call regcache_debug_print_register.
3812 (target_store_registers): Likewise.
3813
3814 2017-03-24 Pádraig Brady <pbrady@fb.com>
3815
3816 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
3817 reference beyond the 'lh->include_dirs' array before accessing to
3818 it.
3819 (psymtab_include_file_name): Likewise.
3820 (dwarf_decode_lines_1): Likewise.
3821 (dwarf_decode_lines): Likewise.
3822 (file_file_name): Likewise.
3823
3824 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
3825
3826 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
3827 inferior_ptid.
3828 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
3829 ps_lsetfpregs): Likewise.
3830 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
3831 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
3832 ps_lsetfpregs): Likewise.
3833 * target.c (target_fetch_registers, target_store_registers):
3834 Remove asserts.
3835
3836 2017-03-23 Alan Hayward <alan.hayward@arm.com>
3837
3838 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
3839
3840 2017-03-23 Yao Qi <yao.qi@linaro.org>
3841
3842 * aarch64-tdep.c (aarch64_process_record_test): Declare.
3843 (_initialize_aarch64_tdep): Register it.
3844 (aarch64_record_load_store): Handle PRFM instruction.
3845 (aarch64_process_record_test): New function.
3846
3847 2017-03-23 Yao Qi <yao.qi@linaro.org>
3848
3849 * aarch64-tdep.c (aarch64_record_load_store): Fix code
3850 indentation.
3851
3852 2017-03-23 Yao Qi <yao.qi@linaro.org>
3853
3854 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
3855
3856 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
3857
3858 python/python.c (do_start_initialization): Fix memory leak.
3859
3860 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
3861
3862 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
3863 using get_ptrace_pid.
3864 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
3865 inferior_ptid.
3866 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
3867 inferior_ptid instead of pid.
3868
3869 2017-03-22 Yao Qi <yao.qi@linaro.org>
3870
3871 * aarch64-tdep.c: Wrap locally used classes in anonymous
3872 namespace.
3873 * arm-tdep.c: Likewise.
3874 * linespec.c: Likewise.
3875 * ui-out.c: Likewise.
3876
3877 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
3878
3879 PR gdb/19637
3880 * python/lib/gdb/printer/bound_registers.py: Import sys.
3881
3882 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
3883
3884 * windows-nat.c (do_windows_fetch_inferior_registers): Add
3885 windows_thread_info parameter and use it instead of
3886 current_thread.
3887 (windows_fetch_inferior_registers): Don't set current_thread,
3888 pass the thread to do_windows_fetch_inferior_registers. Use
3889 ptid from regcache instead of inferior_ptid.
3890 (do_windows_store_inferior_registers): Add windows_thread_info
3891 parameter and use it instead of current_thread.
3892 (windows_store_inferior_registers): Don't set current_thread,
3893 pass the thread to do_windows_store_inferior_registers. Use
3894 ptid from regcache instead of inferior_ptid.
3895
3896 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
3897
3898 * ser-mingw.c (ser_windows_raw): Remove reference to
3899 struct serial::current_timeout.
3900
3901 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
3902
3903 PR tdep/20928
3904 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
3905 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
3906 (sparc64_fsr_type): Fix %fsr decoding.
3907
3908 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
3909
3910 * python/py-record-btrace.c (btpy_insn_data): Change return type
3911 for Python 2.
3912
3913 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
3914
3915 * spu-linux-nat.c (spu_fetch_inferior_registers,
3916 spu_store_inferior_registers): Use ptid from regcache, set and
3917 restore inferior_ptid.
3918 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
3919 Likewise.
3920
3921 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
3922
3923 * i386-linux-nat.c (fetch_register, store_register,
3924 i386_linux_fetch_inferior_registers,
3925 i386_linux_store_inferior_registers): Use ptid from regcache.
3926 * ia64-linux-nat.c (ia64_linux_fetch_register,
3927 ia64_linux_store_register): Likewise.
3928 * inf-ptrace.c (inf_ptrace_fetch_register,
3929 inf_ptrace_store_register): Likewise.
3930 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
3931 m32r_linux_store_inferior_registers): Likewise.
3932 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
3933 m68kbsd_store_inferior_registers): Likewise.
3934 * m68k-linux-nat.c (fetch_register, store_register,
3935 m68k_linux_fetch_inferior_registers,
3936 m68k_linux_store_inferior_registers): Likewise.
3937 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
3938 m88kbsd_store_inferior_registers): Likewise.
3939 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
3940 mips_fbsd_store_inferior_registers): Likewise.
3941 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
3942 mips64_linux_regsets_store_registers): Likewise.
3943 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
3944 mipsnbsd_store_inferior_registers): Likewise.
3945 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
3946 mips64obsd_store_inferior_registers): Likewise.
3947 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
3948 Likewise.
3949 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
3950 ppcfbsd_store_inferior_registers): Likewise.
3951 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
3952 ppc_linux_store_inferior_registers): Likewise.
3953 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
3954 ppcnbsd_store_inferior_registers): Likewise.
3955 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
3956 ppcobsd_store_registers): Likewise.
3957 * procfs.c (procfs_fetch_registers, procfs_store_registers):
3958 Likewise.
3959 * ravenscar-thread.c (ravenscar_fetch_registers,
3960 ravenscar_store_registers, ravenscar_prepare_to_store):
3961 Likewise.
3962 * record-btrace.c (record_btrace_fetch_registers,
3963 record_btrace_store_registers, record_btrace_prepare_to_store):
3964 Likewise.
3965 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
3966 Lookup inferior using ptid from regcache, instead of
3967 current_inferior.
3968 * remote.c (remote_fetch_registers, remote_store_registers): Use
3969 ptid from regcache.
3970 * rs6000-nat.c (fetch_register, store_register): Likewise.
3971 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
3972 s390_linux_store_inferior_registers): Likewise.
3973 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
3974 shnbsd_store_inferior_registers): Likewise.
3975 * sol-thread.c (sol_thread_fetch_registers,
3976 sol_thread_store_registers): Likewise.
3977 * sparc-nat.c (sparc_fetch_inferior_registers,
3978 sparc_store_inferior_registers): Likewise.
3979 * tilegx-linux-nat.c (fetch_inferior_registers,
3980 store_inferior_registers): Likewise.
3981 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
3982 vaxbsd_store_inferior_registers): Likewise.
3983 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
3984 store_xtregs): Likewise.
3985
3986 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3987
3988 PR gdb/14441
3989 * NEWS: Mention support for rvalue references in GDB and python.
3990 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
3991 supports both lvalue and rvalue references.
3992
3993 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
3994
3995 PR gdb/14441
3996 * gdbtypes.c (rank_one_type): Implement overloading
3997 resolution rules regarding rvalue references.
3998
3999 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4000
4001 PR gdb/14441
4002 * aarch64-tdep.c (aarch64_type_align)
4003 (aarch64_extract_return_value, aarch64_store_return_value): Change
4004 lvalue reference type checks to general reference type checks.
4005 * amd64-tdep.c (amd64_classify): Likewise.
4006 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
4007 Likewise.
4008 * arm-tdep.c (arm_type_align, arm_extract_return_value)
4009 (arm_store_return_value): Likewise.
4010 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
4011 * c-typeprint.c (c_print_type): Likewise.
4012 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
4013 (cplus_number_of_children, cplus_describe_child): Likewise.
4014 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
4015 * completer.c (expression_completer): Likewise.
4016 * cp-support.c (make_symbol_overload_list_adl_namespace):
4017 Likewise.
4018 * darwin-nat-info.c (info_mach_region_command): Likewise.
4019 * dwarf2loc.c (entry_data_value_coerce_ref)
4020 (value_of_dwarf_reg_entry): Likewise.
4021 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
4022 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
4023 Likewise.
4024 * findvar.c (extract_typed_address, store_typed_address):
4025 Likewise.
4026 * gdbtypes.c (rank_one_type): Likewise.
4027 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
4028 * infcall.c (value_arg_coerce): Likewise.
4029 * language.c (pointer_type): Likewise.
4030 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
4031 Likewise.
4032 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
4033 * mn10300-tdep.c (mn10300_type_align): Likewise.
4034 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
4035 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
4036 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
4037 Likewise.
4038 * printcmd.c (print_formatted, x_command): Likewise.
4039 * python/py-type.c (typy_get_composite, typy_template_argument):
4040 Likewise.
4041 * python/py-value.c (valpy_referenced_value)
4042 (valpy_get_dynamic_type, value_has_field): Likewise.
4043 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
4044 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
4045 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
4046 * spu-tdep.c (spu_scalar_value_p): Likewise.
4047 * symtab.c (lookup_symbol_aux): Likewise.
4048 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
4049 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
4050 Likewise.
4051 * valops.c (value_cast_pointers, value_cast)
4052 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
4053 (value_struct_elt, value_struct_elt_bitpos)
4054 (value_find_oload_method_list, find_overload_match)
4055 (value_rtti_indirect_type): Likewise.
4056 * valprint.c (val_print_scalar_type_p, generic_val_print):
4057 Likewise.
4058 * value.c (value_actual_type, value_as_address, unpack_long)
4059 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
4060 (coerce_ref): Likewise.
4061 * varobj.c (varobj_get_value_type): Likewise.
4062
4063 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4064
4065 PR gdb/14441
4066 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
4067 table of constants.
4068 * python/lib/gdb/command/explore.py: Support exploring values
4069 of rvalue reference types.
4070 * python/lib/gdb/types.py: Implement get_basic_type() for
4071 rvalue reference types.
4072 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
4073 constant.
4074 * python/py-value.c (valpy_getitem): Add an rvalue reference
4075 check.
4076 (valpy_reference_value): Add new parameter "refcode".
4077 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
4078 New wrappers for valpy_reference_value().
4079 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
4080 (gdbpy_invoke_xmethod): Likewise.
4081
4082 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4083
4084 PR gdb/14441
4085 * dwarf2read.c (process_die, read_type_die_1): Handle the
4086 DW_TAG_rvalue_reference_type DIE.
4087 (read_tag_reference_type): Add new parameter "refcode".
4088
4089 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4090
4091 PR gdb/14441
4092 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
4093 (c_type_print_modifier, c_type_print_varspec_suffix)
4094 (c_type_print_base): Support printing rvalue reference types.
4095 * c-valprint.c (c_val_print, c_value_print): Support printing
4096 rvalue reference values.
4097
4098 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4099
4100 PR gdb/14441
4101 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
4102 typename.
4103 * cp-support.c (replace_typedefs): Handle
4104 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
4105 * python/py-type.c (typy_lookup_type): Likewise.
4106
4107 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4108
4109 PR gdb/14441
4110 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
4111 * parse.c (insert_type): Change assert statement.
4112 (follow_types): Handle rvalue reference types.
4113 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
4114 constant.
4115
4116 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4117
4118 PR gdb/14441
4119 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
4120 value_ref() interface.
4121 * c-valprint.c (c_value_print): Likewise.
4122 * infcall.c (value_arg_coerce): Likewise.
4123 * python/py-value.c (valpy_reference_value): Likewise.
4124 * valops.c (value_cast, value_reinterpret_cast)
4125 (value_dynamic_cast, typecmp): Likewise.
4126 (value_ref): Parameterize by kind of return value reference type.
4127 * value.h (value_ref): Add new parameter "refcode".
4128
4129 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4130
4131 PR gdb/14441
4132 * dwarf2read.c (read_tag_reference_type): Use
4133 lookup_lvalue_reference_type() instead of lookup_reference_type().
4134 * eval.c (evaluate_subexp_standard): Likewise.
4135 * f-exp.y: Likewise.
4136 * gdbtypes.c (make_reference_type, lookup_reference_type):
4137 Generalize with rvalue reference types.
4138 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
4139 convenience wrappers for lookup_reference_type().
4140 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
4141 reference kind parameter.
4142 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
4143 wrappers for lookup_reference_type().
4144 * guile/scm-type.c (gdbscm_type_reference): Use
4145 lookup_lvalue_reference_type() instead of lookup_reference_type().
4146 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
4147 * parse.c (follow_types): Likewise.
4148 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
4149 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
4150 Likewise.
4151 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
4152 (gdbpy_invoke_xmethod): Likewise.
4153 * stabsread.c: Provide extra argument to make_reference_type()
4154 call.
4155 * valops.c (value_ref, value_rtti_indirect_type): Use
4156 lookup_lvalue_reference_type() instead of lookup_reference_type().
4157
4158 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
4159
4160 PR gdb/14441
4161 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
4162 (TYPE_IS_REFERENCE): New macro.
4163 (struct type): Add rvalue_reference_type field.
4164 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
4165
4166 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
4167
4168 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
4169 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
4170 New function definition.
4171 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
4172 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
4173 New function declaration.
4174 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
4175 * mi/mi-interp.h: New file.
4176 * solib.c (info_sharedlibrary_command): Replace for loop with
4177 ALL_SO_LIBS macro
4178 * solib.h (update_solib_list): New function declaration.
4179 (so_list_head): Move macro.
4180 * solist.h (ALL_SO_LIBS): New macro.
4181
4182 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
4183
4184 * infcmd.c (post_create_inferior): Remove unused argument in
4185 call to solib_add.
4186 * remote.c (remote_start_remote): Likewise.
4187 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
4188 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
4189 (enable_break): Likewise.
4190 * solib.c (update_solib_list): Remove unused target argument
4191 and its documentation.
4192 (solib_add): Remove unused target argument. Remove unused
4193 argument in call to update_solib_list.
4194 (info_sharedlibrary_command): Remove unused argument in call
4195 to update_solib_list.
4196 (sharedlibrary_command): Remove unused argument in call to
4197 solib_add.
4198 (handle_solib_event): Likewise.
4199 (reload_shared_libraries): Likewise.
4200 * solib.h (solib_add): Remove unused target argument.
4201
4202 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
4203
4204 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
4205 (s390_displaced_step_fixup): Cover relative branches with the
4206 default fixup handling. This fixes lack of support for some
4207 relative branch instructions.
4208
4209 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4210
4211 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
4212 ptid from regcache.
4213
4214 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4215
4216 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
4217 i386_darwin_store_inferior_registers): Use ptid from regcache.
4218
4219 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4220
4221 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
4222 i386bsd_store_inferior_registers): Use ptid from regcache.
4223
4224 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4225
4226 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
4227 hppaobsd_store_registers): Use ptid from regcache.
4228
4229 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4230
4231 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
4232 hppanbsd_store_registers): Use ptid from regcache.
4233
4234 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4235
4236 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
4237 from regcache. Use get_ptrace_pid.
4238
4239 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4240
4241 * corelow.c (get_core_register_section): Use ptid from regcache,
4242 update doc.
4243
4244 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4245
4246 * bsd-uthread.c (bsd_uthread_fetch_registers,
4247 bsd_uthread_store_registers): Use ptid from regcache, set and
4248 restore inferior_ptid.
4249
4250 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4251
4252 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
4253 fetch_fp_regs, store_register, store_regs, store_fp_register,
4254 store_fp_regs): Use ptid from regcache.
4255
4256 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
4257
4258 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
4259 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
4260 store_vfp_regs): Use ptid from regcache.
4261
4262 2017-03-17 Pedro Alves <palves@redhat.com>
4263
4264 PR remote/21188
4265 * ser-base.c (ser_base_wait_for): Add comment.
4266 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
4267 version.
4268 * ser-unix.c (hardwire_raw): Remove reference to
4269 scb->current_timeout.
4270 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
4271 (hardwire_ops): Install ser_base_readchar instead of
4272 hardwire_readchar.
4273 * serial.h (struct serial) <current_timeout, timeout_remaining>:
4274 Remove fields.
4275
4276 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
4277
4278 PR gdb/19637
4279 * python/lib/gdb/printer/bound_registers.py: Add support for
4280 Python 3.
4281
4282 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4283
4284 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
4285 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
4286 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
4287 byte_offset to subobj_byte_offset. Fix the handling of
4288 DWARF_VALUE_STACK on big-endian targets when coming via an
4289 implicit pointer.
4290 (dwarf2_evaluate_loc_desc): Adjust call to
4291 dwarf2_evaluate_loc_desc_full.
4292 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
4293 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
4294
4295 2017-03-16 Yao Qi <yao.qi@linaro.org>
4296
4297 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
4298 and REVSH instructions.
4299
4300 2017-03-16 Yao Qi <yao.qi@linaro.org>
4301
4302 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
4303 (arm_record_test): Declare.
4304 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
4305 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
4306 align with the manual.
4307 (thumb_record_misc): Adjust the code order to align with the
4308 manual.
4309 (thumb2_record_decode_insn_handler): Fix instruction matching.
4310 (instruction_reader_thumb): New class.
4311 (arm_record_test): New function.
4312
4313 2017-03-16 Yao Qi <yao.qi@linaro.org>
4314
4315 * arm-tdep.c (abstract_memory_reader): New class.
4316 (instruction_reader): New class.
4317 (extract_arm_insn): Add argument 'reader'. Callers updated.
4318 (decode_insn): Likewise.
4319
4320 2017-03-16 Doug Evans <dje@google.com>
4321
4322 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
4323 member. Change type of TYPE member to SCM. All uses updated.
4324 (lsscm_make_lazy_string_smob): Add assert.
4325 (lsscm_make_lazy_string): Flag bad length values.
4326 (lsscm_elt_type): New function.
4327 (gdbscm_lazy_string_to_value): Rewrite to use
4328 lsscm_safe_lazy_string_to_value.
4329 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
4330 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
4331 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
4332 in incoming type.
4333 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
4334 * guile/scm-type.c (tyscm_scm_to_type): New function.
4335
4336 2017-03-15 Doug Evans <dje@google.com>
4337
4338 PR python/17728, python/18439, python/18779
4339 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
4340 member. Change type of TYPE member to PyObject *. All uses updated.
4341 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
4342 (gdbpy_create_lazy_string_object): Flag bad length values.
4343 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
4344 Handle typedefs in incoming type.
4345 (stpy_lazy_string_elt_type): New function.
4346 (gdbpy_extract_lazy_string): Call it.
4347 * python/py-value.c (valpy_lazy_string): Flag bad length values.
4348 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
4349 typedefs in incoming type.
4350
4351 2017-03-16 Doug Evans <dje@google.com>
4352
4353 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
4354 * guile/scm-type.c (tyscm_scm_to_type): New function.
4355
4356 2017-03-16 Jiong Wang <jiong.wang@arm.com>
4357
4358 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
4359 "ULONGEST" for "skip".
4360
4361 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
4362
4363 PR gdb/21220
4364 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
4365 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
4366 (inf_ptrace_peek_poke): ...here. New function. Now also loop
4367 over ptrace peek/poke until end of buffer or error.
4368
4369 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
4370
4371 * parse.c (length_of_subexp): Make static.
4372 * parser-defs.h (length_of_subexp): Remove.
4373
4374 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
4375
4376 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
4377 as well.
4378
4379 2017-03-14 Pedro Alves <palves@redhat.com>
4380
4381 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
4382 (main): Use std::unique_ptr. Remove calls to
4383 cp_demangled_name_parse_free.
4384
4385 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4386
4387 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
4388 alphabsd_store_inferior_registers): Use regcache->ptid instead
4389 of inferior_ptid.
4390
4391 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4392
4393 * aix-thread.c (aix_thread_fetch_registers,
4394 aix_thread_store_registers): Use regcache->ptid instead of
4395 inferior_ptid.
4396
4397 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4398
4399 * aarch64-linux-nat.c (fetch_gregs_from_thread,
4400 store_gregs_to_thread, fetch_fpregs_from_thread,
4401 store_fpregs_to_thread): Use regcache->ptid instead of
4402 inferior_ptid.
4403
4404 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4405
4406 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
4407 amd64_linux_fetch_inferior_registers): Use regcache->ptid
4408 instead of inferior_ptid.
4409
4410 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4411
4412 * target.c (target_fetch_registers, target_store_registers): Add
4413 assert.
4414
4415 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4416
4417 * regcache.h (regcache_get_ptid): New function.
4418 * regcache.c (regcache_get_ptid): New function.
4419
4420 2017-03-13 Mark Wielaard <mark@klomp.org>
4421
4422 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
4423
4424 2017-03-10 Keith Seitz <keiths@redhat.com>
4425
4426 PR c++/8218
4427 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
4428
4429 2017-03-08 Pedro Alves <palves@redhat.com>
4430
4431 PR gdb/18360
4432 * infrun.c (start_step_over, do_target_resume, resume)
4433 (restart_threads): Assert we're not resuming a thread that is
4434 meant to be stopped.
4435 (infrun_thread_stop_requested_callback): Delete.
4436 (infrun_thread_stop_requested): If the thread is internally
4437 stopped, queue a pending stop event and clear the thread's
4438 inline-frame state.
4439 (handle_stop_requested): New function.
4440 (handle_syscall_event, handle_inferior_event_1): Use
4441 handle_stop_requested.
4442 (handle_stop_requested): New function.
4443 (handle_signal_stop): Set the thread's stop_signal here instead of
4444 at caller.
4445 (finish_step_over): Clear step over info unconditionally.
4446 (handle_signal_stop): If the user had interrupted the event
4447 thread, consider the stop a random signal.
4448 (handle_signal_stop) <signal arrived while stepping over
4449 breakpoint>: Don't restart threads here.
4450 (stop_waiting): Don't clear step-over info here.
4451
4452 2017-03-08 Pedro Alves <palves@redhat.com>
4453
4454 PR 21206
4455 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
4456 goes to argument 2, not 1.
4457
4458 2017-03-08 Pedro Alves <palves@redhat.com>
4459
4460 PR cli/21218
4461 * top.c (gdb_readline_wrapper): Avoid passing NULL to
4462 display_gdb_prompt.
4463 (command_line_input): Add comment.
4464
4465 2017-03-08 Pedro Alves <palves@redhat.com>
4466
4467 PR tui/21216
4468 * tui/tui-file.c (tui_file::write): New.
4469 * tui/tui-file.h (tui_file): Override "write".
4470 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
4471 factored out from ...
4472 (tui_puts): ... here.
4473 (tui_putc): Use them.
4474 (tui_write): New function.
4475 * tui/tui-io.h (tui_write): Declare.
4476
4477 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4478
4479 * Makefile.in (SFILES): Replace "environ.c" with
4480 "common/environ.c".
4481 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
4482 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
4483 to...
4484 * common/environ.c: ... here.
4485 * environ.h: Moved to...
4486 * common/environ.h: ... here.
4487
4488 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
4489
4490 * gdbarch.sh (pstring_ptr): New static function.
4491 (gdbarch_disassembler_options): Use it.
4492 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
4493 not valid_disassembler_option->name.
4494 * gdbarch.c: Regenerate.
4495
4496 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
4497
4498 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
4499
4500 2017-03-07 Pedro Alves <palves@redhat.com>
4501
4502 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
4503
4504 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4505
4506 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
4507 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
4508 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
4509 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4510
4511 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
4512
4513 * xtensa-linux-nat.c (fetch_gregs): Remove const.
4514
4515 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
4516
4517 * remote.c (remote_add_target_side_commands): Use range-based
4518 for loop.
4519
4520 2017-03-03 Yao Qi <yao.qi@linaro.org>
4521
4522 PR gdb/21165
4523 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
4524 value is lazy.
4525 * valprint.c (common_val_print): Likewise.
4526
4527 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
4528
4529 * NEWS: Mention new set/show disassembler-options commands.
4530 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
4531 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
4532 (prospective_options): New static variable.
4533 (gdb_disassembler::gdb_disassembler): Initialize
4534 m_di.disassembler_options.
4535 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
4536 (get_disassembler_options): New function.
4537 (set_disassembler_options): Likewise.
4538 (set_disassembler_options_sfunc): Likewise.
4539 (show_disassembler_options_sfunc): Likewise.
4540 (disassembler_options_completer): Likewise.
4541 (_initialize_disasm): Likewise.
4542 * disasm.h (get_disassembler_options): New prototype.
4543 (set_disassembler_options): Likewise.
4544 * gdbarch.sh (gdbarch_disassembler_options): New variable.
4545 (gdbarch_verify_disassembler_options): Likewise.
4546 * gdbarch.c: Regenerate.
4547 * gdbarch.h: Likewise.
4548 * arm-tdep.c (num_disassembly_options): Delete.
4549 (set_disassembly_style): Likewise.
4550 (arm_disassembler_options): New static variable.
4551 (set_disassembly_style_sfunc): Convert short style name into long
4552 option name. Call set_disassembler_options.
4553 (show_disassembly_style_sfunc): New function.
4554 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
4555 set_gdbarch_verify_disassembler_options.
4556 (_initialize_arm_tdep): Delete regnames variable and update callers.
4557 (arm_disassembler_options): Initialize.
4558 (disasm_options): New variable.
4559 (num_disassembly_options): Rename from this...
4560 (num_disassembly_styles): ...to this. Compute by scanning through
4561 disasm_options.
4562 (valid_disassembly_styles): Initialize using disasm_options.
4563 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
4564 set_arm_regname_option.
4565 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
4566 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
4567 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
4568 set_gdbarch_verify_disassembler_options.
4569 * s390-tdep.c (s390_disassembler_options): New static variable.
4570 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
4571 set_gdbarch_verify_disassembler_options.
4572
4573 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
4574
4575 * remote.c (remote_add_target_side_condition): Remove "struct"
4576 keyword from range-based for loop.
4577
4578 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
4579
4580 * remote.c (remote_add_target_side_condition): Use range-based
4581 for loop. Update comment.
4582
4583 2017-02-27 Yao Qi <yao.qi@linaro.org>
4584
4585 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
4586
4587 2017-02-26 Alan Hayward <alan.hayward@arm.com>
4588
4589 * regcache.c (regcache_raw_update): New function.
4590 (regcache_raw_read): Move code to regcache_raw_update.
4591 * regcache.h (regcache_raw_update): New declaration.
4592 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
4593
4594 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
4595
4596 * dwarf2read.c (create_debug_type_hash_table): Initialize
4597 header.signature and header.type_offset_in_tu.
4598
4599 2017-02-24 Pedro Alves <palves@redhat.com>
4600
4601 * symtab.c (make_file_symbol_completion_list_1): Use
4602 add_symtab_completions.
4603
4604 2017-02-24 Alan Hayward <alan.hayward@arm.com>
4605
4606 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
4607
4608 2017-02-24 Alan Hayward <alan.hayward@arm.com>
4609
4610 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
4611 I386_MAX_REGISTER_SIZE.
4612 (i386_pseudo_register_write): Likewise.
4613 (i386_process_record): Likewise.
4614 * i387-tdep.c (i387_supply_xsave): Likewise.
4615 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
4616 (store_register): Likewise.
4617
4618 2017-02-23 Pedro Alves <palves@redhat.com>
4619
4620 * ada-lang.c: Include "common/function-view.h".
4621 (ada_iterate_over_symbols): Adjust to use function_view as
4622 callback type.
4623 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
4624 (ada_make_symbol_completion_list): Use a lambda.
4625 (ada_exc_search_name_matches): Delete.
4626 (name_matches_regex): New.
4627 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
4628 * compile/compile-c-support.c: Include "common/function-view.h".
4629 (print_one_macro): Change prototype to accept a ui_file pointer.
4630 (write_macro_definitions): Use a lambda.
4631 * dwarf2read.c: Include "common/function-view.h".
4632 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
4633 (dw2_expand_symtabs_matching): Adjust to use function_view as
4634 callback type.
4635 * language.h: Include "common/function-view.h".
4636 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
4637 function_view as callback type.
4638 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
4639 * linespec.c: Include "common/function-view.h".
4640 (collect_info::add_symbol): New method.
4641 (struct symbol_and_data_callback, iterate_inline_only, struct
4642 symbol_matcher_data, iterate_name_matcher): Delete.
4643 (iterate_over_all_matching_symtabs): Adjust to use function_view
4644 as callback type and lambdas.
4645 (iterate_over_file_blocks): Adjust to use function_view as
4646 callback type.
4647 (decode_compound_collector): Now a class with private fields.
4648 (decode_compound_collector::release_symbols): New method.
4649 (collect_one_symbol): Rename to...
4650 (decode_compound_collector::operator()): ... this and adjust.
4651 (lookup_prefix_sym): decode_compound_collector construction bits
4652 move to decode_compound_collector ctor. Pass the
4653 decode_compound_collector object directly as callback. Remove
4654 cleanups and use decode_compound_collector::release_symbols
4655 instead.
4656 (symtab_collector): Now a class with private fields.
4657 (symtab_collector::release_symtabs): New method.
4658 (add_symtabs_to_list): Rename to...
4659 (symtab_collector::operator()): ... this and adjust.
4660 (collect_symtabs_from_filename): symtab_collector construction
4661 bits move to symtab_collector ctor. Pass the symtab_collector
4662 object directly as callback. Remove cleanups and use
4663 symtab_collector::release_symtabs instead.
4664 (collect_symbols): Delete.
4665 (add_matching_symbols_to_info): Use lambdas.
4666 * macrocmd.c (print_macro_callback): Delete.
4667 (info_macro_command): Use a lambda.
4668 (info_macros_command): Pass print_macro_definition as callable
4669 directly.
4670 (print_one_macro): Remove 'ignore' parameter.
4671 (macro_list_command): Adjust.
4672 * macrotab.c (macro_for_each_data::fn): Now a function_view.
4673 (macro_for_each_data::user_data): Delete field.
4674 (foreach_macro): Adjust to call the function_view.
4675 (macro_for_each): Adjust to use function_view as callback type.
4676 (foreach_macro_in_scope): Adjust to call the function_view.
4677 (macro_for_each_in_scope): Adjust to use function_view as callback
4678 type.
4679 * macrotab.h: Include "common/function-view.h".
4680 (macro_callback_fn): Declare a prototype instead of a pointer.
4681 Remove "user_data" parameter.
4682 (macro_for_each, macro_for_each_in_scope): Adjust to use
4683 function_view as callback type.
4684 * psymtab.c (partial_map_expand_apply)
4685 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
4686 Adjust to use function_view as callback type and to return bool.
4687 (psym_expand_symtabs_matching): Adjust to use function_view as
4688 callback types.
4689 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
4690 to use function_view as callback type and to return bool.
4691 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
4692 callback types.
4693 * symfile.c (expand_symtabs_matching): Adjust to use function_view
4694 as callback types.
4695 * symfile.h: Include "common/function-view.h".
4696 (expand_symtabs_file_matcher_ftype)
4697 (expand_symtabs_symbol_matcher_ftype)
4698 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
4699 return bool.
4700 (quick_symbol_functions::map_symtabs_matching_filename)
4701 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
4702 function_view as callback type and return bool.
4703 (expand_symtabs_matching): Adjust to use function_view as callback
4704 type.
4705 (maintenance_expand_name_matcher)
4706 (maintenance_expand_file_matcher): Delete.
4707 (maintenance_expand_symtabs): Use lambdas.
4708 * symtab.c (iterate_over_some_symtabs): Adjust to use
4709 function_view as callback types and return bool.
4710 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
4711 of a cleanup.
4712 (lookup_symtab_callback): Delete.
4713 (lookup_symtab): Use a lambda.
4714 (iterate_over_symbols): Adjust to use function_view as callback
4715 type.
4716 (struct search_symbols_data, search_symbols_file_matches)
4717 (search_symbols_name_matches): Delete.
4718 (search_symbols): Use a pair of lambdas.
4719 (struct add_name_data, add_macro_name, symbol_completion_matcher)
4720 (symtab_expansion_callback): Delete.
4721 (default_make_symbol_completion_list_break_on_1): Use lambdas.
4722 * symtab.h: Include "common/function-view.h".
4723 (iterate_over_some_symtabs): Adjust to use function_view as
4724 callback type and return bool.
4725 (iterate_over_symtabs): Adjust to use function_view as callback
4726 type.
4727 (symbol_found_callback_ftype): Remove 'data' parameter and return
4728 bool.
4729 (iterate_over_symbols): Adjust to use function_view as callback
4730 type.
4731
4732 2017-02-23 Pedro Alves <palves@redhat.com>
4733
4734 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
4735 (%.o) <unittests/%.c>: New pattern.
4736 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
4737 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
4738 * common/function-view.h: New file.
4739 * unittests/function-view-selftests.c: New file.
4740 * configure: Regenerate.
4741
4742 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
4743
4744 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
4745 inferior_ptid.
4746 * go32-nat.c (go32_thread_alive): Likewise.
4747
4748 2017-02-23 Yao Qi <yao.qi@linaro.org>
4749
4750 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
4751 delete.
4752
4753 2017-02-23 Yao Qi <yao.qi@linaro.org>
4754
4755 * varobj.c (varobj_clear_saved_item): Use delete instead of
4756 xfree.
4757 (update_dynamic_varobj_children): Likewise.
4758
4759 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4760
4761 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
4762
4763 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
4764
4765 * common/enum-flags.h (enum_flags::enum_flags): Initialize
4766 m_enum_value to 0 in default constructor.
4767
4768 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4769
4770 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
4771 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
4772 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
4773 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
4774 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
4775 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
4776 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
4777 IS_STORE_CONDITIONAL_INSN.
4778
4779 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4780
4781 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
4782
4783 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4784
4785 * NEWS (Changes since GDB 7.12): Add DWARF-5.
4786
4787 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4788
4789 * dwarf2read.c (skip_one_die, read_attribute_value)
4790 (dwarf2_const_value_attr, dump_die_shallow)
4791 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4792 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
4793
4794 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4795
4796 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
4797 (dwarf_parse_macro_header): Accept DWARF version 5.
4798 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
4799
4800 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4801
4802 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
4803 DW_AT_GNU_*.
4804 * common/common-exceptions.h (enum errors): Likewise.
4805 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
4806 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
4807 (dwarf_expr_context::execute_stack_op): Likewise.
4808 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
4809 Likewise.
4810 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
4811 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
4812 (show_entry_values_debug, call_site_to_target_addr)
4813 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
4814 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
4815 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
4816 (value_of_dwarf_block_entry, indirect_pieced_value)
4817 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
4818 (disassemble_dwarf_expression): Likewise.
4819 * dwarf2read.c (process_die, inherit_abstract_dies)
4820 (read_call_site_scope): Likewise.
4821 * gdbtypes.h (struct func_type, struct call_site_parameter)
4822 (struct call_site): Likewise.
4823 * stack.c (read_frame_arg): Likewise.
4824 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
4825
4826 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4827
4828 * defs.h (read_unsigned_leb128): New declaration.
4829 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
4830 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
4831 (dwarf2_find_location_expression): Call also
4832 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
4833 * dwarf2loc.h (dwarf2_version): New declaration.
4834 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
4835 rnglists.
4836 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
4837 .debug_rnglists.
4838 (struct dwop_section_names): Add loclists_dwo.
4839 (dwop_section_names): Add .debug_loclists.dwo.
4840 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
4841 (struct dwarf2_per_cu_data): Add dwarf_version.
4842 (struct dwo_sections): Add loclists.
4843 (struct attr_abbrev): Add implicit_const.
4844 (read_indirect_line_string): New declaration.
4845 (read_unsigned_leb128): Delete declaration.
4846 (rcuh_kind): New definition.
4847 (read_and_check_comp_unit_head): Change parameter
4848 is_debug_types_section to section_kind.
4849 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
4850 (read_comp_unit_head): Change parameter abfd to section, add parameter
4851 section_kind. Handle DWARF-5.
4852 (error_check_comp_unit_head): Accept also DWARF version 5.
4853 (read_and_check_comp_unit_head): Change parameter
4854 is_debug_types_section to section_kind.
4855 (read_and_check_type_unit_head): Delete function.
4856 (read_abbrev_offset): Handle DWARF-5.
4857 (create_debug_type_hash_table): Add parameter section_kind. Process
4858 only DW_UT_type. Use signature and type_offset_in_tu from struct
4859 comp_unit_head.
4860 (create_debug_types_hash_table): Update create_debug_type_hash_table
4861 caller.
4862 (create_all_type_units): Call create_debug_type_hash_table.
4863 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
4864 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
4865 caller.
4866 (skip_one_die): Handle DW_FORM_implicit_const.
4867 (dwarf2_rnglists_process): New function.
4868 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
4869 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
4870 (read_attribute_value): Handle DW_FORM_implicit_const,
4871 DW_FORM_line_strp.
4872 (read_attribute): Handle DW_FORM_implicit_const.
4873 (read_indirect_string_at_offset_from): New function from
4874 read_indirect_string_at_offset.
4875 (read_indirect_string_at_offset): Call
4876 read_indirect_string_at_offset_from.
4877 (read_indirect_line_string_at_offset): New function.
4878 (read_indirect_string): New function comment.
4879 (read_indirect_line_string): New function.
4880 (read_unsigned_leb128): Make it global.
4881 (dwarf2_string_attr): Handle DWARF-5.
4882 (add_include_dir_stub, read_formatted_entries): New functions.
4883 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
4884 Handle DWARF-5.
4885 (per_cu_header_read_in): Update read_comp_unit_head caller.
4886 (dwarf2_version): New function.
4887 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
4888 rnglists.
4889 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
4890 fields.
4891
4892 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4893
4894 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
4895
4896 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4897
4898 * dwarf2read.c (dwarf2_ranges_process): New function from
4899 dwarf2_ranges_read.
4900 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
4901 dwarf2_ranges_process.
4902
4903 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
4904
4905 * dwarf2read.c (create_debug_type_hash_table): New function from
4906 create_debug_types_hash_table.
4907 (create_debug_types_hash_table): Call create_debug_type_hash_table.
4908 (create_all_type_units, open_and_init_dwo_file): Update
4909 create_debug_types_hash_table callers.
4910
4911 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
4912
4913 PR gdb/16188
4914 * fork-child.c (trace_start_error): Fix thinko. va_end should
4915 refer to 'ap', not 'args'.
4916
4917 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
4918 Pedro Alves <palves@redhat.com>
4919
4920 PR gdb/16188
4921 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
4922 calls succeeded.
4923 * fork-child.c (trace_start_error): New function.
4924 (trace_start_error_with_name): Likewise.
4925 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
4926 * inf-ptrace.c (inf_ptrace_me): Likewise.
4927 * inferior.h (trace_start_error): New prototype.
4928 (trace_start_error_with_name): Likewise.
4929
4930 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
4931
4932 PR gdb/21164
4933 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
4934 NULL before using it.
4935 * symmisc.c (maintenance_print_symbols): Likewise.
4936 (maintenance_print_msymbols): Likewise.
4937
4938 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4939
4940 * NEWS: Add record Python bindings entry.
4941
4942 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4943
4944 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
4945 py-record-full.o.
4946 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
4947 * python/py-record-btrace.c, python/py-record-btrace.h,
4948 python/py-record-full.c, python/py-record-full.h: New file.
4949 * python/py-record.c: Add include for py-record-btrace.h and
4950 py-record-full.h.
4951 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
4952 recpy_instruction_history, recpy_function_call_history, recpy_begin,
4953 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
4954 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
4955 New definition.
4956 (gdbpy_initialize_btrace): New export.
4957 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
4958
4959 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4960
4961 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
4962 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
4963 * python/py-record.c: New file.
4964 * python/python-internal.h (gdbpy_start_recording,
4965 gdbpy_current_recording, gdpy_stop_recording,
4966 gdbpy_initialize_record): New export.
4967 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
4968 (python_GdbMethods): Add gdbpy_start_recording,
4969 gdbpy_current_recording and gdbpy_stop_recording.
4970
4971 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4972
4973 * record-btrace.c (record_btrace_record_method): New function.
4974 (init_record_btrace_ops): Initialize to_record_method.
4975 * record-full.c (record_full_record_method): New function.
4976 (init_record_full_ops, init_record_full_core_ops): Add
4977 record_full_record_method.
4978 * record.h (enum record_method): New enum.
4979 * target-debug.h (target_debug_print_enum_record_method: New define.
4980 * target-delegates.c: Regenerate.
4981 * target.c (target_record_method): New function.
4982 * target.h: Include record.h.
4983 (struct target_ops) <to_record_method>: New field.
4984 (target_record_method): New export.
4985
4986 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4987
4988 * record.h (record_start, record_stop): New export.
4989 * record.c (record_start, record_stop): New function.
4990
4991 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
4992
4993 * btrace.c (btrace_fetch): Copy function call segments pointer
4994 into a vector.
4995 (btrace_clear): Clear the vector.
4996 (btrace_find_insn_by_number): Use binary search to find the correct
4997 function call segment.
4998 * btrace.h (brace_fun_p): New typedef.
4999 (struct btrace_thread_info) <functions>: New field.
5000
5001 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5002
5003 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
5004 * btrace.c (btrace_decode_error): ... here. New function.
5005 * btrace.h (btrace_decode_error): New export.
5006
5007 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
5008
5009 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
5010 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
5011 btrace_find_insn_by_number): Remove special case for gaps.
5012 * btrace.h (btrace_insn_get_error): New export.
5013 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
5014 * record-btrace.c (btrace_insn_history): Print number for gaps.
5015 (record_btrace_info, record_btrace_goto): Handle gaps.
5016
5017 2017-02-14 Tom Tromey <tom@tromey.com>
5018
5019 PR python/13598:
5020 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
5021 event.
5022 * python/py-evts.c (gdbpy_initialize_py_events): Add
5023 before_prompt registry.
5024 * python/py-events.h (events_object) <before_prompt>: New field.
5025
5026 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
5027
5028 * btrace.c (ftrace_new_switch): Preserve up link and flags.
5029
5030 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
5031
5032 * symfile (_initialize_symfile): Add usage text to the load command's
5033 help text.
5034
5035 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
5036
5037 * utils.c (defaulted_query): Don't query on secondary UIs.
5038
5039 2017-02-10 Tom Tromey <tom@tromey.com>
5040
5041 * rust-lang.c (rust_get_disr_info): Remove unused variable.
5042
5043 2017-02-10 Tom Tromey <tom@tromey.com>
5044
5045 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
5046 "cleanup" local.
5047 * python/py-type.c (typy_legacy_template_argument): Remove
5048 unnecessary "cleanup" local.
5049
5050 2017-02-10 Tom Tromey <tom@tromey.com>
5051
5052 * python/python.c (do_start_initialization): New function, from
5053 _initialize_python.
5054 (_initialize_python): Call do_start_initialization.
5055 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
5056 goto.
5057
5058 2017-02-10 Tom Tromey <tom@tromey.com>
5059
5060 * python/py-prettyprint.c (pretty_print_one_value): Use
5061 gdbpy_ref.
5062
5063 2017-02-10 Tom Tromey <tom@tromey.com>
5064
5065 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
5066 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
5067 gdbpy_ref.
5068 * python/py-type.c (field_new): Use gdbpy_ref.
5069 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
5070 gdbpy_ref.
5071 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
5072 (py_free_pspace): Likewise.
5073 (pspace_to_pspace_object): Likewise.
5074 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
5075 (py_free_objfile): Likewise.
5076 (objfile_to_objfile_object): Likewise.
5077 * python/py-inferior.c (delete_thread_object): Use
5078 gdbpy_ref.
5079 (infpy_read_memory): Likewise.
5080 (py_free_inferior): Likewise.
5081 * python/py-evtregistry.c (create_eventregistry_object): Use
5082 gdbpy_ref.
5083 * python/py-event.c (create_event_object): Use gdbpy_ref.
5084
5085 2017-02-10 Tom Tromey <tom@tromey.com>
5086
5087 * python/py-ref.h (gdbpy_ref_policy): Now a template.
5088 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
5089 used.
5090 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
5091 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
5092 python/py-exitedevent.c, python/py-finishbreakpoint.c,
5093 python/py-framefilter.c, python/py-function.c,
5094 python/py-inferior.c, python/py-infevents.c,
5095 python/py-linetable.c, python/py-newobjfileevent.c,
5096 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
5097 python/py-signalevent.c, python/py-stopevent.c,
5098 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
5099 python/py-unwind.c, python/py-utils.c, python/py-value.c,
5100 python/py-varobj.c, python/py-xmethods.c, python/python.c,
5101 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
5102
5103 2017-02-10 Tom Tromey <tom@tromey.com>
5104
5105 * ui-out.h (ui_out_emit_type): New class.
5106 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
5107 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
5108 and ui_out_emit_tuple.
5109 (enumerate_locals): Likewise.
5110 (py_mi_print_variables, py_print_locals, py_print_args): Use
5111 ui_out_emit_list.
5112 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
5113 ui_out_emit_list.
5114 * common/gdb_optional.h: New file.
5115
5116 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
5117
5118 * MAINTAINERS (Write After Approval): Update my e-mail address.
5119
5120 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
5121
5122 PR gdb/21122
5123 * breakpoint.c (_initialize_breakpoint): Update the help description
5124 of the 'commands' command to indicate that it takes a list argument.
5125
5126 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
5127
5128 * interps.c (current_interp_set_logging): Remove "return".
5129
5130 2017-02-09 Gary Benson <gbenson@redhat.com>
5131
5132 * symtab.c (add_symtab_completions): Prevent NULL pointer
5133 dereference.
5134
5135 2017-02-08 Pedro Alves <palves@redhat.com>
5136
5137 * interps.c (interp::interp): Remove reference to quiet_p.
5138 (interp_set): Make static. Remove dead "Switching to" output
5139 code.
5140 (interp_quiet_p, interp_set_quiet): Delete.
5141 (interpreter_exec_cmd): Don't set the interpreter quiet.
5142 * interps.h (interp_quiet_p): Make static.
5143 (class interp) <quiet_p>: Remove field
5144
5145 2017-02-08 Jerome Guitton <guitton@adacore.com>
5146
5147 * cli/cli-decode.c (find_command_name_length): Make it extern.
5148 * cli/cli-decode.h (find_command_name_length): Declare.
5149 * cli/cli-script.c (command_name_equals, line_first_arg):
5150 New functions.
5151 (process_next_line): Use cli-decode to parse command names.
5152 (build_command_line): Make args a constant pointer.
5153
5154 2017-02-08 Jerome Guitton <guitton@adacore.com>
5155
5156 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
5157 Remove case-insensitive search.
5158
5159 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
5160
5161 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
5162 at the end of the line. Avoids an ARI warning.
5163
5164 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
5165
5166 * NEWS: Mention support for record/replay of Intel 64 rdrand and
5167 rdseed instructions.
5168 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
5169
5170 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
5171
5172 PR tdep/20936
5173 Provide and use sparc32 and sparc64 target description XML files.
5174 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
5175 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
5176 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
5177 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
5178 * features/sparc/sparc32-solaris.xml: New file.
5179 * features/sparc/sparc64-solaris.xml: New file.
5180 * features/sparc/sparc32-solaris.c: Generated.
5181 * features/sparc/sparc64-solaris.c: Generated.
5182 * sparc-tdep.h: Account for differences in target descriptions.
5183 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
5184 (sparc32_register_type): Use target provided registers.
5185 (validate_tdesc_registers): New function.
5186 (sparc32_gdbarch_init): Use tdesc_has_registers.
5187 Set pseudoregister functions.
5188 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
5189 (sparc64_register_type): Use target provided registers.
5190 (sparc64_init_abi): Set pseudoregister functions.
5191
5192 2017-02-03 Tom Tromey <tom@tromey.com>
5193
5194 PR rust/21097:
5195 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
5196 with a single member.
5197
5198 2017-02-03 Pedro Alves <palves@redhat.com>
5199
5200 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
5201 (cli_interp_base::~cli_interp_base): New.
5202 (cli_interp): New struct.
5203 (as_cli_interp): Cast the interp itself to cli_interp.
5204 (cli_interpreter_pre_command_loop): Rename to ...
5205 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
5206 parameter.
5207 (cli_interpreter_init): Rename to ...
5208 (cli_interp::init): ... this. Remove 'self' parameter. Use
5209 boolean. Make extern.
5210 (cli_interpreter_resume): Rename to ...
5211 (cli_interp::resume): ... this. Remove 'data' parameter. Make
5212 extern.
5213 (cli_interpreter_suspend): Rename to ...
5214 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
5215 extern.
5216 (cli_interpreter_exec): Rename to ...
5217 (cli_interp::exec): ... this. Remove 'data' parameter. Make
5218 extern.
5219 (cli_interpreter_supports_command_editing): Rename to ...
5220 (cli_interp_base::supports_command_editing): ... this. Remove
5221 'interp' parameter. Make extern.
5222 (cli_ui_out): Rename to ...
5223 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
5224 Make extern.
5225 (cli_set_logging): Rename to ...
5226 (cli_interp_base::set_logging): ... this. Remove 'interp'
5227 parameter. Make extern.
5228 (cli_interp_procs): Delete.
5229 (cli_interp_factory): Adjust to use "new".
5230 * cli/cli-interp.h: Include "interps.h".
5231 (struct cli_interp_base): New struct.
5232 * interps.c (struct interp): Delete. Fields moved to interps.h.
5233 (interp_new): Delete.
5234 (interp::interp, interp::~interp): New.
5235 (interp_set): Use bool, and return void. Assume the interpreter
5236 has suspend, init and resume methods, and that the all return
5237 void.
5238 (set_top_level_interpreter): interp_set returns void.
5239 (interp_ui_out): Adapt.
5240 (current_interp_set_logging): Adapt.
5241 (interp_data): Delete.
5242 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
5243 (interp_exec): Adapt.
5244 (top_level_interpreter_data): Delete.
5245 * interps.h (interp_init_ftype, interp_resume_ftype)
5246 (interp_suspend_ftype, interp_exec_ftype)
5247 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
5248 (class interp): New.
5249 (interp_new): Delete.
5250 (interp_set): Now returns void. Use bool.
5251 (interp_data, top_level_interpreter_data): Delete.
5252 * mi/mi-common.h: Include interps.h.
5253 (class mi_interp): Inherit from interp. Define a ctor. Declare
5254 init, resume, suspect, exec, interp_ui_out, set_logging and
5255 pre_command_loop methods.
5256 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
5257 (mi_interpreter_init): Rename to ...
5258 (mi_interp::init): ... this. Remove the 'interp' parameter, use
5259 bool, return void and make extern. Adjust.
5260 (mi_interpreter_resume): ... Rename to ...
5261 (mi_interp::resume): ... this. Remove the 'data' parameter,
5262 return void and make extern. Adjust.
5263 (mi_interpreter_suspend): ... Rename to ...
5264 (mi_interp::suspend): ... this. Remove the 'data' parameter,
5265 return void and make extern. Adjust.
5266 (mi_interpreter_exec): ... Rename to ...
5267 (mi_interp::exec): ... this. Remove the 'data' parameter and make
5268 extern. Adjust.
5269 (mi_interpreter_pre_command_loop): ... Rename to ...
5270 (mi_interp::pre_command_loop): ... this. Remove the 'self'
5271 parameter and make extern.
5272 (mi_on_normal_stop_1): Adjust.
5273 (mi_ui_out): Rename to ...
5274 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
5275 parameter and make extern. Adjust.
5276 (mi_set_logging): Rename to ...
5277 (mi_interp::set_logging): ... this. Remove the 'interp'
5278 parameter and make extern. Adjust.
5279 (mi_interp_procs): Delete.
5280 (mi_interp_factory): Adjust to use 'new'.
5281 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
5282 (mi_print_exception, mi_execute_command, mi_load_progress):
5283 Adjust.
5284 * tui/tui-interp.c (tui_interp): New class.
5285 (as_tui_interp): Return a tui_interp pointer.
5286 (tui_on_normal_stop, tui_on_signal_received)
5287 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
5288 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
5289 to use interp::interp_ui_out.
5290 (tui_init): Rename to ...
5291 (tui_interp::init): ... this. Remove the 'self' parameter, use
5292 bool, return void and make extern. Adjust.
5293 (tui_resume): Rename to ...
5294 (tui_interp::resume): ... this. Remove the 'data' parameter,
5295 return void and make extern. Adjust.
5296 (tui_suspend): Rename to ...
5297 (tui_interp::suspend): ... this. Remove the 'data' parameter,
5298 return void and make extern. Adjust.
5299 (tui_ui_out): Rename to ...
5300 (tui_interp::interp_ui_out): ... this. Remove the 'self'
5301 parameter, and make extern. Adjust.
5302 (tui_exec): Rename to ...
5303 (tui_interp::exec): ... this. Remove the 'data' parameter and
5304 make extern.
5305 (tui_interp_procs): Delete.
5306 (tui_interp_factory): Use "new".
5307
5308 2017-02-02 Tom Tromey <tom@tromey.com>
5309
5310 * rust-exp.y (ends_raw_string, space_then_number)
5311 (rust_identifier_start_p): Return bool.
5312 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
5313 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
5314 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
5315 (rust_chartype_p): Return bool.
5316 (val_print_struct, rust_print_struct_def, rust_print_type):
5317 Update.
5318 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
5319 Return bool.
5320
5321 2017-02-02 Tom Tromey <tom@tromey.com>
5322
5323 * rust-lang.c: Reindent.
5324
5325 2017-02-02 Tom Tromey <tom@tromey.com>
5326
5327 * rust-lang.h (rust_crate_for_block): Update.
5328 * rust-lang.c (rust_crate_for_block): Return std::string.
5329 (rust_get_disr_info): Use std:;string, not
5330 gdb::unique_xmalloc_ptr.
5331 * rust-exp.y (crate_name): Update.
5332
5333 2017-02-02 Pedro Alves <palves@redhat.com>
5334
5335 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
5336 field out of gdb_disassembler_test and make it static.
5337
5338 2017-02-02 Pedro Alves <palves@redhat.com>
5339
5340 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
5341 mi1_interp and mi_interp fields.
5342
5343 2017-02-02 Pedro Alves <palves@redhat.com>
5344
5345 * cli/cli-interp.c (struct saved_output_files, saved_output):
5346 Moved from cli/cli-logging.c.
5347 (cli_set_logging): New function.
5348 (cli_interp_procs): Install cli_set_logging.
5349 * cli/cli-interp.h (make_logging_output, cli_set_logging):
5350 Declare.
5351 * cli/cli-logging.c (struct saved_output_files, saved_output):
5352 Moved to cli/cli-interp.c.
5353 (pop_output_files): Don't save outputs here.
5354 (make_logging_output): New function.
5355 (handle_redirections): Don't build tee nor save previous outputs
5356 here.
5357 * interps.c (current_interp_set_logging): Change prototype.
5358 Assume there's always a set_logging_proc method installed.
5359 * interps.h (interp_set_logging_ftype): Change prototype.
5360 (current_interp_set_logging): Change prototype and adjust comment.
5361 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
5362 use make_logging_output.
5363 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
5364 2017-02-02 Pedro Alves <palves@redhat.com>
5365
5366 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
5367 from ...
5368 (set_logging_overwrite): ... here.
5369 (logging_no_redirect_file): Delete.
5370 (set_logging_redirect): Don't handle redirection on the fly.
5371 Instead warn that "logging off" / "logging on" is necessary.
5372 (pop_output_files): Delete references to logging_no_redirect_file.
5373 (show_logging_command): Always speak in terms of what will happen
5374 once logging is reenabled.
5375
5376 2017-02-02 Pedro Alves <palves@redhat.com>
5377
5378 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
5379
5380 2017-02-02 Pedro Alves <palves@redhat.com>
5381
5382 * disasm.c (gdb_pretty_print_insn): Rename to ...
5383 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
5384 Remove gdbarch parameter. Adapt to clear the object's buffers
5385 instead of allocating new buffers, and to print using the object's
5386 gdb_disassembler instead of calling gdb_print_insn.
5387 (dump_insns): Use gdb_pretty_print_disassembler.
5388 * disasm.h (gdb_pretty_print_insn): Delete declaration.
5389 (gdb_pretty_print_disassembler): New class.
5390 * record-btrace.c (btrace_insn_history): Use
5391 gdb_pretty_print_disassembler.
5392
5393 2017-02-02 Pedro Alves <palves@redhat.com>
5394
5395 * ada-lang.c (type_as_string): Use string_file.
5396 * ada-valprint.c (ada_print_floating): Use string_file.
5397 * ada-varobj.c (ada_varobj_scalar_image)
5398 (ada_varobj_get_value_image): Use string_file.
5399 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
5400 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
5401 * breakpoint.c (update_inserted_breakpoint_locations)
5402 (insert_breakpoint_locations, reattach_breakpoints)
5403 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
5404 (print_it_watchpoint): Use string_file.
5405 (save_breakpoints): Use stdio_file.
5406 * c-exp.y (oper): Use string_file.
5407 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
5408 tee_file.
5409 (pop_output_files): Use delete.
5410 (handle_redirections): Use stdio_file and tee_file.
5411 * cli/cli-setshow.c (do_show_command): Use string_file.
5412 * compile/compile-c-support.c (c_compute_program): Use
5413 string_file.
5414 * compile/compile-c-symbols.c (generate_vla_size): Take a
5415 'string_file &' instead of a 'ui_file *'.
5416 (generate_c_for_for_one_variable): Take a 'string_file &' instead
5417 of a 'ui_file *'. Use string_file.
5418 (generate_c_for_variable_locations): Take a 'string_file &'
5419 instead of a 'ui_file *'.
5420 * compile/compile-internal.h (generate_c_for_for_one_variable):
5421 Take a 'string_file &' instead of a 'ui_file *'.
5422 * compile/compile-loc2c.c (push, pushf, unary, binary)
5423 (print_label, pushf_register_address, pushf_register)
5424 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
5425 'ui_file *'. Adjust.
5426 * compile/compile.c (compile_to_object): Use string_file.
5427 * compile/compile.h (compile_dwarf_expr_to_c)
5428 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
5429 'ui_file *'.
5430 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
5431 (replace_typedefs_qualified_name): Use string_file and
5432 obstack_copy0.
5433 * disasm.c (gdb_pretty_print_insn): Use string_file.
5434 (gdb_disassembly): Adjust reference the null_stream global.
5435 (do_ui_file_delete): Delete.
5436 (gdb_insn_length): Use null_stream.
5437 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
5438 * dwarf2loc.c (dwarf2_compile_property_to_c)
5439 (locexpr_generate_c_location, loclist_generate_c_location): Take a
5440 'string_file &' instead of a 'ui_file *'.
5441 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
5442 * dwarf2read.c (do_ui_file_peek_last): Delete.
5443 (dwarf2_compute_name): Use string_file.
5444 * event-top.c (gdb_setup_readline): Use stdio_file.
5445 * gdbarch.sh (verify_gdbarch): Use string_file.
5446 * gdbtypes.c (safe_parse_type): Use null_stream.
5447 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
5448 string_file.
5449 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
5450 'string_file *' instead of a 'ui_file *'.
5451 (gdbscm_arch_disassemble): Use string_file.
5452 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
5453 * guile/scm-ports.c (class ioscm_file_port): Now a class that
5454 inherits from ui_file.
5455 (ioscm_file_port_delete, ioscm_file_port_rewind)
5456 (ioscm_file_port_put): Delete.
5457 (ioscm_file_port_write): Rename to ...
5458 (ioscm_file_port::write): ... this. Remove file_port_magic
5459 checks.
5460 (ioscm_file_port_new): Delete.
5461 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
5462 ui_file_up.
5463 * guile/scm-type.c (tyscm_type_name): Use string_file.
5464 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
5465 Use string_file.
5466 * infcmd.c (print_return_value_1): Use string_file.
5467 * infrun.c (print_target_wait_results): Use string_file.
5468 * language.c (add_language): Use string_file.
5469 * location.c (explicit_to_string_internal): Use string_file.
5470 * main.c (captured_main_1): Use null_file.
5471 * maint.c (maintenance_print_architecture): Use stdio_file.
5472 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
5473 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
5474 event_channel>: Change type to mi_console_file pointer.
5475 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
5476 (mi_console_file_delete): Delete.
5477 (struct mi_console_file): Delete.
5478 (mi_console_file_magic): Delete.
5479 (mi_console_file_new): Delete.
5480 (mi_console_file::mi_console_file): New.
5481 (mi_console_file_delete): Delete.
5482 (mi_console_file_fputs): Delete.
5483 (mi_console_file::write): New.
5484 (mi_console_raw_packet): Delete.
5485 (mi_console_file::flush): New.
5486 (mi_console_file_flush): Delete.
5487 (mi_console_set_raw): Rename to ...
5488 (mi_console_file::set_raw): ... this.
5489 * mi/mi-console.h (class mi_console_file): New class.
5490 (mi_console_file_new, mi_console_set_raw): Delete.
5491 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
5492 (mi_set_logging): Use delete and tee_file. Adjust.
5493 * mi/mi-main.c (output_register): Use string_file.
5494 (mi_cmd_data_evaluate_expression): Use string_file.
5495 (mi_cmd_data_read_memory): Use string_file.
5496 (mi_cmd_execute, print_variable_or_computed): Use string_file.
5497 * mi/mi-out.c (mi_ui_out::main_stream): New.
5498 (mi_ui_out::rewind): Use main_stream and
5499 string_file.
5500 (mi_ui_out::put): Use main_stream and string_file.
5501 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
5502 Allocate a 'string_file' instead.
5503 (mi_out_new): Don't allocate a mem_fileopen stream here.
5504 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
5505 (mi_ui_out::main_stream): Declare method.
5506 * printcmd.c (eval_command): Use string_file.
5507 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
5508 * python/py-arch.c (archpy_disassemble): Use string_file.
5509 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
5510 * python/py-frame.c (frapy_str): Use string_file.
5511 * python/py-framefilter.c (py_print_type, py_print_single_arg):
5512 Use string_file.
5513 * python/py-type.c (typy_str): Use string_file.
5514 * python/py-unwind.c (unwind_infopy_str): Use string_file.
5515 * python/py-value.c (valpy_str): Use string_file.
5516 * record-btrace.c (btrace_insn_history): Use string_file.
5517 * regcache.c (regcache_print): Use stdio_file.
5518 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
5519 * remote.c (escape_buffer): Use string_file.
5520 * rust-lang.c (rust_get_disr_info): Use string_file.
5521 * serial.c (serial_open_ops_1): Use stdio_file.
5522 (do_serial_close): Use delete.
5523 * stack.c (print_frame_arg): Use string_file.
5524 (print_frame_args): Remove local mem_fileopen stream, not used.
5525 (print_frame): Use string_file.
5526 * symmisc.c (maintenance_print_symbols): Use stdio_file.
5527 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
5528 Take a 'string_file *' instead of a 'ui_file *'.
5529 * top.c (new_ui): Use stdio_file and stderr_file.
5530 (free_ui): Use delete.
5531 (execute_command_to_string): Use string_file.
5532 (quit_confirm): Use string_file.
5533 * tracepoint.c (collection_list::append_exp): Use string_file.
5534 * tui/tui-disasm.c (tui_disassemble): Use string_file.
5535 * tui/tui-file.c: Don't include "ui-file.h".
5536 (enum streamtype, struct tui_stream): Delete.
5537 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
5538 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
5539 (tui_file::tui_file): New method.
5540 (tui_file_fputs): Delete.
5541 (tui_file_get_strbuf): Delete.
5542 (tui_file::puts): New method.
5543 (tui_file_adjust_strbuf): Delete.
5544 (tui_file_flush): Delete.
5545 (tui_file::flush): New method.
5546 * tui/tui-file.h: Tweak intro comment.
5547 Include ui-file.h.
5548 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
5549 (tui_file_adjust_strbuf): Delete declarations.
5550 (class tui_file): New class.
5551 * tui/tui-io.c (tui_initialize_io): Use tui_file.
5552 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
5553 (tui_register_format): Use string_stream.
5554 * tui/tui-stack.c (tui_make_status_line): Use string_file.
5555 (tui_get_function_from_frame): Use string_file.
5556 * typeprint.c (type_to_string): Use string_file.
5557 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
5558 (null_stream): New global.
5559 (ui_file_delete): Delete.
5560 (ui_file::ui_file): New.
5561 (null_file_isatty): Delete.
5562 (ui_file::~ui_file): New.
5563 (null_file_rewind): Delete.
5564 (ui_file::printf): New.
5565 (null_file_put): Delete.
5566 (null_file_flush): Delete.
5567 (ui_file::putstr): New.
5568 (null_file_write): Delete.
5569 (ui_file::putstrn): New.
5570 (null_file_read): Delete.
5571 (ui_file::putc): New.
5572 (null_file_fputs): Delete.
5573 (null_file_write_async_safe): Delete.
5574 (ui_file::vprintf): New.
5575 (null_file_delete): Delete.
5576 (null_file::write): New.
5577 (null_file_fseek): Delete.
5578 (null_file::puts): New.
5579 (ui_file_data): Delete.
5580 (null_file::write_async_safe): New.
5581 (gdb_flush, ui_file_isatty): Adjust.
5582 (ui_file_put, ui_file_rewind): Delete.
5583 (ui_file_write): Adjust.
5584 (ui_file_write_for_put): Delete.
5585 (ui_file_write_async_safe, ui_file_read): Adjust.
5586 (ui_file_fseek): Delete.
5587 (fputs_unfiltered): Adjust.
5588 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
5589 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
5590 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
5591 (set_ui_file_data): Delete.
5592 (string_file::~string_file, string_file::write)
5593 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
5594 (do_ui_file_as_string, ui_file_as_string): Delete.
5595 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
5596 (struct mem_file): Delete.
5597 (mem_file_new): Delete.
5598 (stdio_file::stdio_file): New.
5599 (mem_file_delete): Delete.
5600 (stdio_file::stdio_file): New.
5601 (mem_fileopen): Delete.
5602 (stdio_file::~stdio_file): New.
5603 (mem_file_rewind): Delete.
5604 (stdio_file::set_stream): New.
5605 (mem_file_put): Delete.
5606 (stdio_file::open): New.
5607 (mem_file_write): Delete.
5608 (stdio_file_magic, struct stdio_file): Delete.
5609 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
5610 (stdio_file::flush): New.
5611 (stdio_file_read): Rename to ...
5612 (stdio_file::read): ... this. Adjust.
5613 (stdio_file_write): Rename to ...
5614 (stdio_file::write): ... this. Adjust.
5615 (stdio_file_write_async_safe): Rename to ...
5616 (stdio_file::write_async_safe) ... this. Adjust.
5617 (stdio_file_fputs): Rename to ...
5618 (stdio_file::puts) ... this. Adjust.
5619 (stdio_file_isatty): Delete.
5620 (stdio_file_fseek): Delete.
5621 (stdio_file::isatty): New.
5622 (stderr_file_write): Rename to ...
5623 (stderr_file::write) ... this. Adjust.
5624 (stderr_file_fputs): Rename to ...
5625 (stderr_file::puts) ... this. Adjust.
5626 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
5627 (stderr_file::stderr_file): New.
5628 (tee_file_magic): Delete.
5629 (struct tee_file): Delete.
5630 (tee_file::tee_file): New.
5631 (tee_file_new): Delete.
5632 (tee_file::~tee_file): New.
5633 (tee_file_delete): Delete.
5634 (tee_file_flush): Rename to ...
5635 (tee_file::flush): ... this. Adjust.
5636 (tee_file_write): Rename to ...
5637 (tee_file::write): ... this. Adjust.
5638 (tee_file::write_async_safe): New.
5639 (tee_file_fputs): Rename to ...
5640 (tee_file::puts): ... this. Adjust.
5641 (tee_file_isatty): Rename to ...
5642 (tee_file::isatty): ... this. Adjust.
5643 * ui-file.h (struct obstack, struct ui_file): Don't
5644 forward-declare.
5645 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
5646 (ui_file_write_ftype)
5647 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
5648 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
5649 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
5650 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
5651 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
5652 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
5653 (set_ui_file_fseek): Delete.
5654 (ui_file_data, ui_file_delete, ui_file_rewind)
5655 (struct ui_file): New.
5656 (ui_file_up): New.
5657 (class null_file): New.
5658 (null_stream): Declare.
5659 (ui_file_write_for_put, ui_file_put): Delete.
5660 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
5661 Delete.
5662 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
5663 (gdb_fopen, tee_file_new): Delete.
5664 (struct string_file): New.
5665 (struct stdio_file): New.
5666 (stdio_file_up): New.
5667 (struct stderr_file): New.
5668 (class tee_file): New.
5669 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
5670 of a 'ui_file *'. Adjust.
5671 * ui-out.h (class ui_out) <field_stream>: Likewise.
5672 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
5673 (null_stream): Delete.
5674 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
5675 Adjust.
5676 * utils.h (struct ui_file): Delete forward declaration..
5677 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
5678 (error_stream): Take a 'string_file &' instead of a
5679 'ui_file *'.
5680 * varobj.c (varobj_value_get_print_value): Use string_file.
5681 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
5682 * gdbarch.c: Regenerate.
5683
5684 2017-02-02 Pedro Alves <palves@redhat.com>
5685
5686 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
5687 (gdb_pretty_print_insn): ... this. Now a free function. Add back
5688 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
5689 Adjust to call gdb_print_insn instead of
5690 gdb_disassembler::print_insn.
5691 (dump_insns, do_mixed_source_and_assembly_deprecated)
5692 (do_mixed_source_and_assembly, do_assembly_only): Add back a
5693 'gdbarch' parameter. Remove gdb_disassembler parameter.
5694 (gdb_disassembly): Don't allocate a gdb_disassembler here.
5695 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
5696 declaration.
5697 (gdb_pretty_print_insn): Re-add declaration.
5698 * record-btrace.c (btrace_insn_history): Don't allocate a
5699 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
5700
5701 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
5702
5703 * disasm.h (gdb_disassembly): Remove file_string parameter.
5704 * disasm.c (gdb_disassembly): Likewise.
5705 * cli/cli-cmds.c (print_disassembly): Adapt.
5706 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
5707 * stack.c (do_gdb_disassembly): Likewise.
5708
5709 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
5710
5711 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
5712 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
5713 targets. And if the implicit value is longer than needed, extract
5714 the first bytes instead of the "least significant" ones.
5715
5716 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
5717
5718 * btrace.c (btrace_enable): Do not call btrace_add_pc for
5719 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
5720 (btrace_fetch): Assert can_access_registers_ptid.
5721 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
5722 validate_registers_access.
5723
5724 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
5725
5726 * gdbthread.h (can_access_registers_ptid): New.
5727 * thread.c (can_access_registers_ptid): New.
5728
5729 2017-02-01 Pedro Alves <palves@redhat.com>
5730
5731 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
5732
5733 2017-01-31 Pedro Alves <palves@redhat.com>
5734
5735 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
5736 Fix typos.
5737
5738 2017-01-31 Pedro Alves <palves@redhat.com>
5739
5740 * stack.c (print_frame_args): Remove local mem_fileopen stream,
5741 not used.
5742
5743 2017-01-31 Pedro Alves <palves@redhat.com>
5744
5745 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
5746
5747 2017-01-31 Pedro Alves <palves@redhat.com>
5748
5749 * common/scoped_restore.h
5750 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
5751 change the value's parameter type to T2.
5752 (make_scoped_restore): Likewise.
5753
5754 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
5755 Richard Henderson <rth@redhat.com>
5756
5757 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
5758 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
5759 GS_BASE for older kernels.
5760 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
5761 GS_BASE for older kernels.
5762 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
5763 and GS_BASE to the offset table.
5764 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
5765 system register group.
5766 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
5767 for older kernels.
5768 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
5769 amd64 ABI.
5770 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
5771 AMD64_GSBASE_REGNUM.
5772 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
5773 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
5774 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
5775 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
5776 i386/64bit-segments.xml in those rules.
5777 * features/i386/64bit-segments.xml: New file.
5778 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
5779 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
5780 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
5781 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
5782 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
5783 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
5784 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
5785 * features/i386/amd64-avx-linux.c: Regenerated.
5786 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
5787 * features/i386/amd64-avx-mpx.c: Regenerated.
5788 * features/i386/amd64-avx512-linux.c: Regenerated.
5789 * features/i386/amd64-linux.c: Regenerated.
5790 * features/i386/amd64-mpx-linux.c: Regenerated.
5791 * features/i386/i386-avx-mpx-linux.c: Regenerated.
5792 * features/i386/i386-avx-mpx.c: Regenerated.
5793 * features/i386/x32-avx-linux.c: Regenerated.
5794 * features/i386/x32-avx512-linux.c: Regenerated.
5795 * regformats/i386/amd64-avx-linux.dat: Regenerated.
5796 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
5797 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
5798 * regformats/i386/amd64-linux.dat: Regenerated.
5799 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
5800 * regformats/i386/x32-avx-linux.dat: Regenerated.
5801 * regformats/i386/x32-avx512-linux.dat: Regenerated.
5802 * regformats/i386/x32-linux.dat: Regenerated.
5803
5804 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
5805
5806 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
5807 Set to AMD64_NUM_REGS.
5808
5809 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
5810
5811 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
5812 that checks validity of a register number.
5813
5814 2017-01-27 Kees Cook <keescook@google.com>
5815
5816 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
5817 fetch_fpregs if target has fpa registers.
5818 (arm_linux_store_inferior_registers): Call store_fpregs if target
5819 has fpa registers.
5820
5821 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
5822
5823 * cris-tdep.c (cris_gdbarch_init): Remove check for
5824 info.byte_order and force it to BFD_ENDIAN_LITTLE.
5825
5826 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
5827
5828 * corelow.c (get_core_register_section): Check for regset
5829 existence before checking for REGSET_VARIABLE_SIZE.
5830
5831 2017-01-26 Yao Qi <yao.qi@linaro.org>
5832 Pedro Alves <palves@redhat.com>
5833
5834 PR gdb/20939
5835 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
5836 call memory_error, save memaddr instead.
5837 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
5838 negative, cal memory_error.
5839 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
5840
5841 2017-01-26 Yao Qi <yao.qi@linaro.org>
5842
5843 * disasm-selftests.c (memory_error_test): New function.
5844 (_initialize_disasm_selftests): Register memory_error_test.
5845
5846 2017-01-26 Yao Qi <yao.qi@linaro.org>
5847
5848 * Makefile.in (SFILES): Add disasm-selftests.c and
5849 selftest-arch.c.
5850 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
5851 * disasm-selftests.c: New file.
5852 * selftest-arch.c: New file.
5853 * selftest-arch.h: New file.
5854
5855 2017-01-26 Yao Qi <yao.qi@linaro.org>
5856
5857 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
5858 to bfd_arch_mep. Don't return 0 if section is not
5859 found. Call print_insn_mep.
5860
5861 2017-01-26 Pedro Alves <palves@redhat.com>
5862 Yao Qi <yao.qi@linaro.org>
5863
5864 * arm-tdep.c: Include "disasm.h".
5865 (gdb_print_insn_arm): Update code to get gdbarch.
5866 * disasm.c (dis_asm_read_memory): Change it to
5867 gdb_disassembler::dis_asm_read_memory.
5868 (dis_asm_memory_error): Likewise.
5869 (dis_asm_print_address): Likewise.
5870 (gdb_pretty_print_insn): Change it to
5871 gdb_disassembler::pretty_print_insn.
5872 (dump_insns): Add one argument gdb_disassemlber. All
5873 callers updated.
5874 (do_mixed_source_and_assembly_deprecated): Likewise.
5875 (do_mixed_source_and_assembly): Likewise.
5876 (do_assembly_only): Likewise.
5877 (gdb_disassembler::gdb_disassembler): New.
5878 (gdb_disassembler::print_insn): New.
5879 * disasm.h (class gdb_disassembler): New.
5880 (gdb_pretty_print_insn): Remove declaration.
5881 (gdb_disassemble_info): Likewise.
5882 * guile/scm-disasm.c (class gdbscm_disassembler): New.
5883 (gdbscm_disasm_read_memory_worker): Update.
5884 (gdbscm_disasm_read_memory): Update.
5885 (gdbscm_disasm_memory_error): Remove.
5886 (gdbscm_disasm_print_address): Remove.
5887 (gdbscm_disassembler::gdbscm_disassembler): New.
5888 (gdbscm_print_insn_from_port): Update.
5889 * mips-tdep.c: Include disasm.h.
5890 (gdb_print_insn_mips): Update code to get gdbarch.
5891 * record-btrace.c (btrace_insn_history): Update.
5892 * spu-tdep.c: Include disasm.h.
5893 (struct spu_dis_asm_data): Remove.
5894 (struct spu_dis_asm_info): New.
5895 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
5896 SPU id.
5897 (gdb_print_insn_spu): Cast disassemble_info to
5898 spu_dis_asm_info.
5899
5900 2017-01-26 Yao Qi <yao.qi@linaro.org>
5901
5902 * disasm.c (do_ui_file_delete): Delete.
5903 (gdb_insn_length): Move code creating stream to ...
5904 * utils.c (null_stream): ... here. New function.
5905 * utils.h (null_stream): Declare.
5906
5907 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
5908
5909 * python/py-inferior.c (find_thread_object): Return directly
5910 from the loop. Remove "found" variable.
5911
5912 2017-01-21 Joel Brobecker <brobecker@adacore.com>
5913
5914 GDB 7.12.1 released.
5915
5916 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
5917
5918 * python/py-function.c (fnpy_call): Reorder declarations to have
5919 the gdbpy_enter object declared first.
5920 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
5921
5922 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
5923
5924 PR python/21068
5925 * python/python-internal.h (PyMem_RawMalloc): Define for
5926 Python < 3.4.
5927 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
5928 PyMem_RawMalloc instead of PyMem_Malloc.
5929
5930 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
5931 Luis Machado <lgustavo@codesourcery.com>
5932
5933 * NEWS (New commands): Mention flash-erase.
5934 (New MI commands): Mention target-flash-erase.
5935 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
5936 command.
5937 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
5938 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
5939 * target.c (flash_erase_command): New function.
5940 (initialize_targets): Add new flash-erase command.
5941 * target.h (flash_erase_command): New declaration.
5942
5943 2017-01-20 Joel Brobecker <brobecker@adacore.com>
5944
5945 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
5946 HAVE_SYS_PROCFS_H is defined.
5947
5948 2017-01-18 Alan Hayward <alan.hayward@arm.com>
5949
5950 * remote.c (struct cached_reg): Change data into a pointer.
5951 * (stop_reply_dtr): Free data pointers before deleting vector.
5952 (process_stop_reply): Likewise.
5953 (remote_parse_stop_reply): Allocate space for data
5954
5955 2017-01-18 Alan Hayward <alan.hayward@arm.com>
5956
5957 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
5958 MAX_REGISTER_SIZE.
5959 (amd64_pseudo_register_read_value): Likewise.
5960 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
5961 (store_register_using_P): Likewise.
5962 * regcache.c (regcache_xfer_part): Likewise.
5963
5964 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
5965
5966 Split real and pseudo registers.
5967 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
5968 (sparc32_pseudo_regnum): New enum.
5969 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
5970 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
5971 (SPARC32_CP0_REGISTERS): New macro.
5972 (sparc32_pseudo_register_name): New function.
5973 (sparc32_register_name): Use sparc32_pseudo_register_name.
5974 (sparc32_pseudo_register_type): New function.
5975 (sparc32_register_type): Use sparc32_pseudo_register_type.
5976 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
5977 pseudo register numbers.
5978 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
5979 (SPARC64_CP0_REGISTERS): New macro.
5980 (sparc64_pseudo_register_name): New function.
5981 (sparc64_register_name): Use sparc64_pseudo_register_name.
5982 (sparc64_pseudo_register_type): New function.
5983 (sparc64_register_type): Use sparc64_pseudo_register_type.
5984 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
5985 pseudo register numbers.
5986 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
5987 sparc64_store_arguments): Handle pseudo register numbers.
5988
5989 2017-01-13 Yao Qi <yao.qi@linaro.org>
5990
5991 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
5992 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
5993 output.
5994 (getpkt_or_notif_sane_1): Likewise.
5995
5996 2017-01-13 Yao Qi <yao.qi@linaro.org>
5997
5998 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
5999 of CC. Pass "-x c++-header" instead of "-x c".
6000
6001 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
6002
6003 * remote.c (remote_can_async_p): Update comment.
6004
6005 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
6006
6007 * linux-nat.c (linux_nat_can_async_p): Update comment.
6008
6009 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
6010
6011 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
6012
6013 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
6014
6015 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
6016
6017 2017-01-10 Tom Tromey <tom@tromey.com>
6018
6019 * python/py-type.c (typy_legacy_template_argument): Update.
6020 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
6021 ~demangle_parse_info): Declare new members.
6022 (cp_demangled_name_to_comp): Return unique_ptr.
6023 (cp_demangled_name_parse_free)
6024 (make_cleanup_cp_demangled_name_parse_free)
6025 (cp_new_demangle_parse_info): Remove.
6026 * cp-support.c (do_demangled_name_parse_free_cleanup)
6027 (make_cleanup_cp_demangled_name_parse_free): Remove.
6028 (inspect_type, cp_canonicalize_string_full)
6029 (cp_canonicalize_string): Update.
6030 (mangled_name_to_comp): Change return type.
6031 (cp_class_name_from_physname, method_name_from_physname)
6032 (cp_func_name, cp_remove_params): Update.
6033 * cp-name-parser.y (demangle_parse_info): New constructor, from
6034 cp_new_demangle_parse_info.
6035 (~demangle_parse_info): New destructor, from
6036 cp_demangled_name_parse_free.
6037 (cp_merge_demangle_parse_infos): Update.
6038 (cp_demangled_name_to_comp): Change return type.
6039
6040 2017-01-10 Tom Tromey <tom@tromey.com>
6041
6042 * top.c (prevent_dont_repeat): Change return type.
6043 * python/python.c (execute_gdb_command): Use std::string.
6044 Update.
6045 * guile/guile.c (gdbscm_execute_gdb_command): Update.
6046 * command.h (prevent_dont_repeat): Change return type.
6047 * breakpoint.c (bpstat_do_actions_1): Update.
6048
6049 2017-01-10 Tom Tromey <tom@tromey.com>
6050
6051 * value.h (scoped_value_mark::~scoped_value_mark): Call
6052 free_to_mark.
6053 (scoped_value_mark::free_to_mark): New method.
6054 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
6055 scoped_value_mark.
6056
6057 2017-01-10 Tom Tromey <tom@tromey.com>
6058
6059 * python/py-value.c (valpy_dereference, valpy_referenced_value)
6060 (valpy_reference_value, valpy_const_value, valpy_get_address)
6061 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
6062 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
6063 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
6064 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
6065 scoped_value_mark.
6066 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
6067 * value.h (scoped_value_mark): New class.
6068
6069 2017-01-10 Tom Tromey <tom@tromey.com>
6070
6071 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
6072 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
6073 * psymtab.c (discard_psymtabs_upto): Remove.
6074 (make_cleanup_discard_psymtabs): Remove.
6075 (struct psymtab_state): Remove.
6076
6077 2017-01-10 Tom Tromey <tom@tromey.com>
6078
6079 * record-full.c (record_full_save_cleanups): Remove.
6080 (record_full_save): Use gdb::unlinker.
6081 * gcore.c (do_bfd_delete_cleanup): Remove.
6082 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
6083 cleanups.
6084 * dwarf2read.c (unlink_if_set): Remove.
6085 (write_psymtabs_to_index): Use gdb::unlinker.
6086 * common/gdb_unlinker.h: New file.
6087
6088 2017-01-10 Tom Tromey <tom@tromey.com>
6089
6090 * windows-tdep.c (windows_xfer_shared_library): Update.
6091 * windows-nat.c (windows_make_so): Update.
6092 * utils.h (make_cleanup_bfd_unref): Remove.
6093 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
6094 * symfile.h (symfile_bfd_open)
6095 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
6096 * symfile.c (read_symbols, symbol_file_add)
6097 (separate_debug_file_exists): Update.
6098 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
6099 (generic_load, reread_symbols): Update.
6100 * symfile-mem.c (symbol_file_add_from_memory): Update.
6101 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
6102 (spu_symbol_file_add_from_memory): Update.
6103 * solist.h (struct target_so_ops) <bfd_open>: Return
6104 gdb_bfd_ref_ptr.
6105 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
6106 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
6107 gdb_bfd_ref_ptr.
6108 (solib_map_sections, reload_shared_libraries_1): Update.
6109 * solib-svr4.c (enable_break): Update.
6110 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
6111 * solib-frv.c (enable_break2): Update.
6112 * solib-dsbt.c (enable_break): Update.
6113 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
6114 gdb_bfd_ref_ptr.
6115 (darwin_solib_get_all_image_info_addr_at_init): Update.
6116 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
6117 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
6118 * record-full.c (record_full_save): Update.
6119 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
6120 * procfs.c (insert_dbx_link_bpt_in_file): Update.
6121 * minidebug.c (find_separate_debug_file_in_section): Return
6122 gdb_bfd_ref_ptr.
6123 * machoread.c (macho_add_oso_symfile): Change abfd to
6124 gdb_bfd_ref_ptr.
6125 (macho_symfile_read_all_oso): Update.
6126 (macho_check_dsym): Return gdb_bfd_ref_ptr.
6127 (macho_symfile_read): Update.
6128 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
6129 (jit_bfd_try_read_symtab): Update.
6130 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6131 (gdb_bfd_openw, gdb_bfd_openr_iovec)
6132 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
6133 gdb_bfd_ref_ptr.
6134 (gdb_bfd_ref_policy): New struct.
6135 (gdb_bfd_ref_ptr): New typedef.
6136 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6137 (gdb_bfd_openw, gdb_bfd_openr_iovec)
6138 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
6139 gdb_bfd_ref_ptr.
6140 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
6141 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
6142 (gcore_command): Update.
6143 * exec.c (exec_file_attach): Update.
6144 * elfread.c (elf_symfile_read): Update.
6145 * dwarf2read.c (dwarf2_get_dwz_file): Update.
6146 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
6147 (open_and_init_dwo_file): Update.
6148 (open_dwp_file): Return gdb_bfd_ref_ptr.
6149 (open_and_init_dwp_file): Update.
6150 * corelow.c (core_open): Update.
6151 * compile/compile-object-load.c (compile_object_load): Update.
6152 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
6153 * coffread.c (coff_symfile_read): Update.
6154 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
6155 gdb_bfd_ref_ptr. Rename.
6156 (dump_bfd_file, restore_command): Update.
6157 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
6158 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
6159 (find_separate_debug_file_by_buildid): Update.
6160
6161 2017-01-10 Tom Tromey <tom@tromey.com>
6162
6163 * common/gdb_ref_ptr.h: New file.
6164 * python/py-ref.h (struct gdbpy_ref_policy): New.
6165 (gdbpy_ref): Now a typedef.
6166
6167 2017-01-10 Tom Tromey <tom@tromey.com>
6168
6169 * utils.h (make_cleanup_htab_delete): Don't declare.
6170 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
6171 Remove.
6172 * linespec.c (decode_compound_collector): Add constructor,
6173 destructor.
6174 (lookup_prefix_sym): Remove cleanup.
6175 (symtab_collector): Add constructor, destructor.
6176 (collect_symtabs_from_filename): Remove cleanup.
6177 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
6178 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
6179 Use htab_up.
6180 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
6181 * dwarf2read.c (dw2_expand_symtabs_matching)
6182 (dw2_map_symbol_filenames, dwarf_decode_macros)
6183 (write_psymtabs_to_index): Use htab_up.
6184 * dwarf2loc.c (func_verify_no_selftailcall)
6185 (call_site_find_chain_1, func_verify_no_selftailcall)
6186 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
6187 std::vector, gdb::unique_xmalloc_ptr.
6188 (call_sitep): Remove typedef.
6189 (dwarf2_locexpr_baton_eval): Remove unused variable.
6190
6191 2017-01-10 Tom Tromey <tom@tromey.com>
6192
6193 * python/python-internal.h (make_cleanup_py_decref)
6194 (make_cleanup_py_xdecref): Don't declare.
6195 * python/py-utils.c (py_decref, make_cleanup_py_decref)
6196 (py_xdecref, make_cleanup_py_xdecref): Remove.
6197
6198 2017-01-10 Tom Tromey <tom@tromey.com>
6199
6200 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
6201 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
6202
6203 2017-01-10 Tom Tromey <tom@tromey.com>
6204
6205 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
6206
6207 2017-01-10 Tom Tromey <tom@tromey.com>
6208
6209 * python/py-utils.c (unicode_to_encoded_string)
6210 (python_string_to_target_string)
6211 (python_string_to_target_python_string)
6212 (python_string_to_host_string, gdbpy_obj_to_string)
6213 (get_addr_from_python): Use gdbpy_ref.
6214
6215 2017-01-10 Tom Tromey <tom@tromey.com>
6216
6217 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
6218 gdbpy_ref.
6219
6220 2017-01-10 Tom Tromey <tom@tromey.com>
6221
6222 * python/python.c (eval_python_command, gdbpy_decode_line)
6223 (gdbpy_run_events, gdbpy_start_type_printers)
6224 (gdbpy_apply_type_printers): Use gdbpy_ref.
6225
6226 2017-01-10 Tom Tromey <tom@tromey.com>
6227
6228 * python/py-param.c (get_doc_string, compute_enum_values): Use
6229 gdbpy_ref.
6230
6231 2017-01-10 Tom Tromey <tom@tromey.com>
6232
6233 * python/py-inferior.c (find_thread_object, build_inferior_list):
6234 Use gdbpy_ref.
6235
6236 2017-01-10 Tom Tromey <tom@tromey.com>
6237
6238 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
6239
6240 2017-01-10 Tom Tromey <tom@tromey.com>
6241
6242 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
6243 gdbpy_ref.
6244
6245 2017-01-10 Tom Tromey <tom@tromey.com>
6246
6247 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
6248 extra incref.
6249 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
6250 Use gdbpy_ref.
6251
6252 2017-01-10 Tom Tromey <tom@tromey.com>
6253
6254 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
6255 gdbpy_ref.
6256
6257 2017-01-10 Tom Tromey <tom@tromey.com>
6258
6259 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
6260 decref results of PyArg_ParseTupleAndKeywords.
6261
6262 2017-01-10 Tom Tromey <tom@tromey.com>
6263
6264 * python/python.c (python_run_simple_file): Use
6265 unique_xmalloc_ptr, gdbpy_ref.
6266
6267 2017-01-10 Tom Tromey <tom@tromey.com>
6268
6269 * python/py-prettyprint.c (print_stack_unless_memory_error)
6270 (print_string_repr, print_children): Use gdbpy_ref.
6271 (dummy_python_frame): New class.
6272 (dummy_python_frame::dummy_python_frame): Rename from
6273 push_dummy_python_frame.
6274 (py_restore_tstate): Remove.
6275
6276 2017-01-10 Tom Tromey <tom@tromey.com>
6277
6278 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
6279
6280 2017-01-10 Tom Tromey <tom@tromey.com>
6281
6282 * python/python.c (ensure_python_env, restore_python_env):
6283 Remove.
6284 * python/python-internal.h (ensure_python_env): Don't declare.
6285 * varobj.h (varobj_ensure_python_env): Don't declare.
6286 * varobj.c (varobj_ensure_python_env): Remove.
6287
6288 2017-01-10 Tom Tromey <tom@tromey.com>
6289
6290 * varobj.c (varobj_value_get_print_value): Use
6291 gdbpy_enter_varobj.
6292
6293 2017-01-10 Tom Tromey <tom@tromey.com>
6294
6295 * python/py-prettyprint.c (print_string_repr, print_children):
6296 Update.
6297 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
6298 of "encoding".
6299 * varobj.c (varobj_value_get_print_value): Update.
6300 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
6301
6302 2017-01-10 Tom Tromey <tom@tromey.com>
6303
6304 * varobj.c (varobj_get_display_hint)
6305 (dynamic_varobj_has_child_method, install_new_value_visualizer)
6306 (varobj_set_visualizer, free_variable): Use
6307 gdbpy_enter_varobj.
6308
6309 2017-01-10 Tom Tromey <tom@tromey.com>
6310
6311 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
6312 (do_finish_initialization): New function. Use gdbpy_ref.
6313 (gdbpy_finish_initialization): Use gdbpy_enter. Call
6314 do_finish_initialization.
6315
6316 2017-01-10 Tom Tromey <tom@tromey.com>
6317
6318 * python/py-param.c (get_set_value, get_show_value): Use
6319 gdbpy_enter, gdbpy_ref.
6320
6321 2017-01-10 Tom Tromey <tom@tromey.com>
6322
6323 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
6324
6325 2017-01-10 Tom Tromey <tom@tromey.com>
6326
6327 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
6328
6329 2017-01-10 Tom Tromey <tom@tromey.com>
6330
6331 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
6332 Use gdbpy_enter_varobj.
6333
6334 2017-01-10 Tom Tromey <tom@tromey.com>
6335
6336 * varobj.c (gdbpy_enter_varobj): New constructor.
6337 * python/python-internal.h (gdbpy_enter_varobj): New class.
6338 * python/py-varobj.c (py_varobj_get_iterator): Use
6339 gdbpy_enter_varobj.
6340
6341 2017-01-10 Tom Tromey <tom@tromey.com>
6342
6343 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
6344 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
6345 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
6346 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
6347 unique_xmalloc_ptr.
6348 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
6349
6350 2017-01-10 Tom Tromey <tom@tromey.com>
6351
6352 * python/py-xmethods.c (invoke_match_method): Use
6353 gdbpy_ref.
6354
6355 2017-01-10 Tom Tromey <tom@tromey.com>
6356
6357 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
6358 gdbpy_enter, gdbpy_ref.
6359
6360 2017-01-10 Tom Tromey <tom@tromey.com>
6361
6362 * python/python.c (python_interactive_command): Use gdbpy_enter.
6363
6364 2017-01-10 Tom Tromey <tom@tromey.com>
6365
6366 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
6367 gdbpy_ref.
6368
6369 2017-01-10 Tom Tromey <tom@tromey.com>
6370
6371 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
6372 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
6373
6374 2017-01-10 Tom Tromey <tom@tromey.com>
6375
6376 * utils.h (htab_deleter): New struct.
6377 (htab_up): New typedef.
6378 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
6379 gdbpy_enter, gdbpy_ref, htab_up.
6380
6381 2017-01-10 Tom Tromey <tom@tromey.com>
6382
6383 * python/py-unwind.c (pending_frame_invalidate): Remove.
6384 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
6385
6386 2017-01-10 Tom Tromey <tom@tromey.com>
6387
6388 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
6389 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
6390
6391 2017-01-10 Tom Tromey <tom@tromey.com>
6392
6393 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
6394
6395 2017-01-10 Tom Tromey <tom@tromey.com>
6396
6397 * python/python.c (gdbpy_eval_from_control_command)
6398 (gdbpy_source_script, gdbpy_run_events)
6399 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
6400 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
6401 gdbpy_enter.
6402
6403 2017-01-10 Tom Tromey <tom@tromey.com>
6404
6405 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
6406
6407 2017-01-10 Tom Tromey <tom@tromey.com>
6408
6409 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
6410
6411 2017-01-10 Tom Tromey <tom@tromey.com>
6412
6413 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
6414 (python_on_inferior_call_pre, python_on_inferior_call_post)
6415 (python_on_memory_change, python_on_register_change)
6416 (python_inferior_exit, python_new_objfile, add_thread_object)
6417 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
6418
6419 2017-01-10 Tom Tromey <tom@tromey.com>
6420
6421 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
6422 (bpfinishpy_handle_exit): Use gdbpy_enter.
6423
6424 2017-01-10 Tom Tromey <tom@tromey.com>
6425
6426 * python/py-cmd.c (cmdpy_destroyer)
6427 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
6428 gdbpy_enter.
6429
6430 2017-01-10 Tom Tromey <tom@tromey.com>
6431
6432 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
6433 gdbpy_enter.
6434 (gdbpy_breakpoint_has_cond): Likewise.
6435
6436 2017-01-10 Tom Tromey <tom@tromey.com>
6437
6438 * python/python.c (gdbpy_enter): New constructor.
6439 (~gdbpy_enter): New destructor.
6440 (restore_python_env, ensure_python_env): Rewrite.
6441 * python/python-internal.h (gdbpy_enter): New class.
6442
6443 2017-01-10 Tom Tromey <tom@tromey.com>
6444
6445 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
6446
6447 2017-01-10 Tom Tromey <tom@tromey.com>
6448
6449 * python/py-value.c (value_has_field, get_field_flag)
6450 (get_field_type, valpy_getitem, convert_value_from_python): Use
6451 gdbpy_ref.
6452
6453 2017-01-10 Tom Tromey <tom@tromey.com>
6454
6455 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
6456 gdbpy_ref.
6457
6458 2017-01-10 Tom Tromey <tom@tromey.com>
6459
6460 * python/py-prettyprint.c (search_pp_list)
6461 (find_pretty_printer_from_objfiles)
6462 (find_pretty_printer_from_progspace)
6463 (find_pretty_printer_from_gdb, find_pretty_printer)
6464 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
6465 gdbpy_ref.
6466
6467 2017-01-10 Tom Tromey <tom@tromey.com>
6468
6469 * python/py-param.c (call_doc_function): Use gdbpy_ref.
6470
6471 2017-01-10 Tom Tromey <tom@tromey.com>
6472
6473 * python/py-linetable.c (build_line_table_tuple_from_pcs)
6474 (ltpy_get_all_source_lines): Use gdbpy_ref.
6475
6476 2017-01-10 Tom Tromey <tom@tromey.com>
6477
6478 * python/py-framefilter.c (extract_sym, extract_value)
6479 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
6480 gdbpy_ref.
6481
6482 2017-01-10 Tom Tromey <tom@tromey.com>
6483
6484 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
6485
6486 2017-01-10 Tom Tromey <tom@tromey.com>
6487
6488 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
6489
6490 2017-01-10 Tom Tromey <tom@tromey.com>
6491
6492 * python/py-function.c (convert_values_to_python, fnpy_init): Use
6493 gdbpy_ref.
6494
6495 2017-01-10 Tom Tromey <tom@tromey.com>
6496
6497 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
6498
6499 2017-01-10 Tom Tromey <tom@tromey.com>
6500
6501 * python/py-type.c (convert_field, make_fielditem, typy_fields)
6502 (typy_range): Use gdbpy_ref.
6503
6504 2017-01-10 Tom Tromey <tom@tromey.com>
6505
6506 * python/py-threadevent.c (create_thread_event_object): Use
6507 gdbpy_ref.
6508 * python/py-stopevent.c (create_stop_event_object): Simplify.
6509 (emit_stop_event): Use gdbpy_ref.
6510 * python/py-signalevent.c (create_signal_event_object): Use
6511 gdbpy_ref.
6512 * python/py-newobjfileevent.c (create_new_objfile_event_object)
6513 (emit_new_objfile_event, create_clear_objfiles_event_object)
6514 (emit_clear_objfiles_event): Use gdbpy_ref.
6515 * python/py-infevents.c (create_inferior_call_event_object)
6516 (create_register_changed_event_object)
6517 (create_memory_changed_event_object, emit_inferior_call_event)
6518 (emit_memory_changed_event, emit_register_changed_event): Use
6519 gdbpy_ref.
6520 * python/py-exitedevent.c (create_exited_event_object)
6521 (emit_exited_event): Use gdbpy_ref.
6522 * python/py-event.h (evpy_emit_event): Remove
6523 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
6524 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
6525 * python/py-continueevent.c (emit_continue_event): Use
6526 gdbpy_ref.
6527 * python/py-breakpoint.c (gdbpy_breakpoint_created)
6528 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
6529 gdbpy_ref.
6530 * python/py-bpevent.c (create_breakpoint_event_object): Use
6531 gdbpy_ref.
6532
6533 2017-01-10 Tom Tromey <tom@tromey.com>
6534
6535 * python/py-ref.h: New file.
6536
6537 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
6538
6539 * cli-out.c (cli_ui_out::do_redirect): Change return type to
6540 void.
6541 * cli-out.h (cli_ui_out::do_redirect): Likewise.
6542 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
6543 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
6544 * ui-out.c (ui_out::redirect): Likewise.
6545 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
6546 * cli/cli-logging.c (set_logging_redirect): Update call site of
6547 ui_out::redirect.
6548 (handle_redirections): Likewise.
6549 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
6550 * top.c (execute_command_to_string): Likewise.
6551 * utils.c (do_ui_out_redirect_pop): Likewise.
6552
6553 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
6554
6555 * stack.c (_initialize_stack): Update "frame" command help message.
6556
6557 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
6558
6559 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
6560
6561 2017-01-06 Yao Qi <yao.qi@linaro.org>
6562
6563 * x86-linux-nat.h: Include gdb_proc_service.h.
6564
6565 2017-01-06 Yao Qi <yao.qi@linaro.org>
6566
6567 * ser-base.h: Include serial.h.
6568
6569 2017-01-06 Yao Qi <yao.qi@linaro.org>
6570
6571 * ppc-linux-tdep.h: Include ppc-tdep.h.
6572
6573 2017-01-06 Yao Qi <yao.qi@linaro.org>
6574
6575 * nat/amd64-linux-siginfo.h: Include signal.h.
6576
6577 2017-01-06 Yao Qi <yao.qi@linaro.org>
6578
6579 * nat/aarch64-linux-hw-point.h: Include break-common.h.
6580
6581 2017-01-06 Yao Qi <yao.qi@linaro.org>
6582
6583 * mi/mi-parse.h: Include mi-cmds.h.
6584
6585 2017-01-06 Yao Qi <yao.qi@linaro.org>
6586
6587 * inf-loop.c: Don't include "target.h".
6588 * inf-loop.h: Include it here.
6589
6590 2017-01-06 Yao Qi <yao.qi@linaro.org>
6591
6592 * dfp.h: Include "dboulest.h" and "expression.h".
6593
6594 2017-01-06 Yao Qi <yao.qi@linaro.org>
6595
6596 * ax-gdb.h: Include "ax.h".
6597
6598 2017-01-06 Yao Qi <yao.qi@linaro.org>
6599
6600 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
6601 with nat/gdb_ptrace.h.
6602
6603 2017-01-05 Yao Qi <yao.qi@linaro.org>
6604
6605 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
6606 new line.
6607 (mips64_fbsd_sigframe_init): Likewise.
6608
6609 2017-01-04 John Baldwin <jhb@FreeBSD.org>
6610
6611 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
6612 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
6613
6614 2017-01-04 John Baldwin <jhb@FreeBSD.org>
6615
6616 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6617 * NEWS: Mention new FreeBSD/mips native configuration.
6618 * config/mips/fbsd.mh: New file.
6619 * configure.host: Add mips*-*-freebsd*.
6620 * mips-fbsd-nat.c: New file.
6621
6622 2017-01-04 John Baldwin <jhb@FreeBSD.org>
6623
6624 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
6625 (ALLDEPFILES): Add mips-fbsd-tdep.c.
6626 * NEWS: Mention new FreeBSD/mips target.
6627 * configure.tgt: Add mips*-*-freebsd*.
6628 * mips-fbsd-tdep.c: New file.
6629 * mips-fbsd-tdep.h: New file.
6630
6631 2017-01-04 Yao Qi <yao.qi@linaro.org>
6632
6633 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
6634 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
6635
6636 2017-01-01 Joel Brobecker <brobecker@adacore.com>
6637
6638 Update copyright year range in all GDB files.
6639
6640 2017-01-01 Joel Brobecker <brobecker@adacore.com>
6641
6642 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
6643
6644 For older changes see ChangeLog-2016.
6645 \f
6646 Local Variables:
6647 mode: change-log
6648 left-margin: 8
6649 fill-column: 74
6650 version-control: never
6651 coding: utf-8
6652 End: