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