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