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