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