More uses of ui_out_emit_tuple
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
46b9c129
TT
12017-04-22 Tom Tromey <tom@tromey.com>
2
3 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
4 annotate_arg_emitter.
5 * breakpoint.c (print_mention_watchpoint)
6 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
7 * annotate.h (struct annotate_arg_emitter): New.
8
2e783024
TT
92017-04-22 Tom Tromey <tom@tromey.com>
10
11 * record-btrace.c (record_btrace_insn_history)
12 (record_btrace_insn_history_range, record_btrace_call_history)
13 (record_btrace_call_history_range): Use ui_out_emit_tuple.
14 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
15 ui_out_emit_tuple.
16 * stack.c (print_frame_info): Use ui_out_emit_tuple.
17 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
18 * skip.c (skip_info): Use ui_out_emit_tuple.
19 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
20 * progspace.c (print_program_space): Use ui_out_emit_tuple.
21 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
22 * osdata.c (info_osdata): Use ui_out_emit_tuple.
23 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
24 ui_out_emit_tuple.
25 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
26 (output_register, mi_cmd_data_read_memory)
27 (mi_cmd_data_read_memory_bytes, mi_load_progress)
28 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
29 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
30 Use ui_out_emit_tuple.
31 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
32 ui_out_emit_tuple.
33 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
34 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
35 * linux-thread-db.c (info_auto_load_libthread_db): Use
36 ui_out_emit_tuple.
37 * inferior.c (print_inferior): Use ui_out_emit_tuple.
38 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
39 * disasm.c (do_mixed_source_and_assembly_deprecated)
40 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
41 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
42 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
43 * breakpoint.c (print_one_breakpoint_location)
44 (print_one_breakpoint): Use ui_out_emit_tuple.
45 * auto-load.c (print_script, info_auto_load_cmd): Use
46 ui_out_emit_tuple.
47 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
48
9be21bb4
SM
492017-04-21 Simon Marchi <simon.marchi@ericsson.com>
50
51 * thread.c (print_thread_info_1): Remove dead code.
52
0d4c07af
JK
532017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
54
55 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
56 GDB_SELF_TEST.
57 * arm-tdep.c (selftests::arm_record_test): Likewise.
58
4daf993d
YQ
592017-04-21 Yao Qi <yao.qi@linaro.org>
60
61 * regcache.c (regcache_restore): Remove argument 2. Replace
62 argument 3 with regcache. Get register status from
63 src->register_status and get register contents from
64 register_buffer (src, regnum).
65 (regcache_cpy): Update.
66
a6c21d4a
PA
672017-04-19 Pedro Alves <palves@redhat.com>
68
69 * gdbthread.h (thread): Add missing closing parenthesis in
70 comment.
71
3a3fd0fd
PA
722017-04-19 Pedro Alves <palves@redhat.com>
73
74 * common/refcounted-object.h: New file.
75 * gdbthread.h: Include "common/refcounted-object.h".
76 (thread_info): Inherit from refcounted_object and add comments.
77 (thread_info::incref, thread_info::decref)
78 (thread_info::m_refcount): Delete.
79 (thread_info::deletable): Use the refcounted_object::refcount()
80 method.
81 * inferior.c (current_inferior_): Add comment.
82 (set_current_inferior): Increment/decrement refcounts.
83 (prune_inferiors, remove_inferior_command): Skip inferiors marked
84 not-deletable instead of comparing with the current inferior.
85 (initialize_inferiors): Increment the initial inferior's refcount.
86 * inferior.h (struct inferior): Forward declare.
87 Include "common/refcounted-object.h".
88 (current_inferior, set_current_inferior): Move declaration to
89 before struct inferior's definition, and fix comment.
90 (inferior): Inherit from refcounted_object. Add comments.
91 * thread.c (switch_to_thread_no_regs): Reference the thread's
92 inferior pointer directly instead of doing a ptid lookup.
93 (switch_to_no_thread): New function.
94 (switch_to_thread(thread_info *)): New function, factored out
95 from ...
96 (switch_to_thread(ptid_t)): ... this.
97 (restore_current_thread): Delete.
98 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
99 fields, and add 'inf' field.
100 (do_restore_current_thread_cleanup): Check whether old->inf is
101 alive instead of looking up an inferior by ptid. Use
102 switch_to_thread and switch_to_no_thread.
103 (restore_current_thread_cleanup_dtor): Use old->inf directly
104 instead of lookup up an inferior by id. Decref the inferior.
105 Don't restore 'removable'.
106 (make_cleanup_restore_current_thread): Same the inferior pointer
107 in old, instead of the inferior number. Incref the inferior.
108 Don't save/clear 'removable'.
109
9bcb1f16
PA
1102017-04-19 Pedro Alves <palves@redhat.com>
111
112 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
113 unittests/scoped_restore-selftests.c.
114 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
115 * common/scoped_restore.h (scoped_restore_base): Make "class".
116 (scoped_restore_base::release): New public method.
117 (scoped_restore_base::scoped_restore_base): New protected ctor.
118 (scoped_restore_base::m_saved_var): New protected field.
119 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
120 scoped_restore_base base class instead of m_saved_var directly.
121 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
122 (scoped_restore_tmpl::scoped_restore_tmpl(const
123 scoped_restore_tmpl<T>&)): Likewise.
124 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
125 method.
126 (scoped_restore_tmpl::saved_var): New method.
127 (scoped_restore_tmpl::m_saved_var): Delete.
128 * inferior.h (inferior::detaching): Now a bool.
129 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
130 cleanup.
131 * unittests/scoped_restore-selftests.c: New file.
132
26fcd539
PA
1332017-04-19 Pedro Alves <palves@redhat.com>
134
135 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
136 Re-sort in alphabetic order.
137
fdd243b0
PA
1382017-04-18 Pedro Alves <palves@redhat.com>
139
140 * xml-support.c (obstack_xml_printf): Delete.
141 * xml-support.h (obstack_xml_printf): Delete.
142
4895cde2
PA
1432017-04-18 Pedro Alves <palves@redhat.com>
144
145 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
146 vdebug, verror, body_text, start_element, end_element, name,
147 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
148 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
149 is_xinclude>: Make private and add m_ prefix.
150 (gdb_xml_parser::body_text): New method, based on ...
151 (gdb_xml_body_text): ... this. Adjust.
152 (gdb_xml_parser::vdebug): New method, based on ...
153 (gdb_xml_debug): ... this. Adjust.
154 (gdb_xml_parser::verror): New method, based on ...
155 (gdb_xml_error): ... this. Adjust.
156 (gdb_xml_parser::start_element): New method, based on ...
157 (gdb_xml_start_element): ... this. Adjust.
158 (gdb_xml_start_element_wrapper): Defer to
159 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
160 (gdb_xml_parser::end_element): New method, based on ...
161 (gdb_xml_end_element_wrapper): ... this. Adjust.
162 (gdb_xml_parser::~gdb_xml_parser): Adjust.
163 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
164 (gdb_xml_parser::use_dtd): New method, based on ...
165 (gdb_xml_use_dtd): ... this. Adjust.
166 (gdb_xml_parser::parse): New method, based on ...
167 (gdb_xml_parse): ... this. Adjust.
168 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
169 (xinclude_start_include): Adjust to call the parser's name method.
170 (xml_xinclude_default, xml_xinclude_start_doctype)
171 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
172 method.
173 (xml_process_xincludes): Adjust to call parser methods.
174 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
175 declarations.
176
bd8a901f
PA
1772017-04-18 Pedro Alves <palves@redhat.com>
178
179 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
180 gdb::optional<std::string>.
181 * xml-support.c: Include <string>.
182 (scope_level::scope_level(scope_level &&))
183 (scope_level::~scope_level): Delete.
184 (scope_level::body): Now a std::string.
185 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
186 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
187 parameter.
188 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
189 (xinclude_parsing_data::output): Now a std::string reference.
190 (xinclude_start_include): Adjust.
191 (xml_xinclude_default): Adjust.
192 (xml_process_xincludes): Add 'output' parameter, and return bool.
193 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
194 and return bool.
195 * xml-tdesc.c: Include <unordered_map> and <string>.
196 (tdesc_xml_cache): Delete.
197 (tdesc_xml_cache_s): Delete.
198 (xml_cache): Now an std::unordered_map.
199 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
200 (target_fetch_description_xml): Change return type to
201 gdb::optional<std::string>, and adjust.
202 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
203 (target_fetch_description_xml): Change return type to
204 gdb::optional<std::string>.
205
d35d1958
PA
2062017-04-18 Pedro Alves <palves@redhat.com>
207
208 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
209 unittests/optional-selftests.c.
210 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
211 * unittests/optional-selftests.c: New file.
212 * unittests/optional/assignment/1.cc: New file.
213 * unittests/optional/assignment/2.cc: New file.
214 * unittests/optional/assignment/3.cc: New file.
215 * unittests/optional/assignment/4.cc: New file.
216 * unittests/optional/assignment/5.cc: New file.
217 * unittests/optional/assignment/6.cc: New file.
218 * unittests/optional/assignment/7.cc: New file.
219 * unittests/optional/cons/copy.cc: New file.
220 * unittests/optional/cons/default.cc: New file.
221 * unittests/optional/cons/move.cc: New file.
222 * unittests/optional/cons/value.cc: New file.
223 * unittests/optional/in_place.cc: New file.
224 * unittests/optional/observers/1.cc: New file.
225 * unittests/optional/observers/2.cc: New file.
226
22796e97
PA
2272017-04-18 Pedro Alves <palves@redhat.com>
228
229 * common/gdb_optional.h: Include common/traits.h.
230 (in_place_t): New type.
231 (in_place): New constexpr variable.
232 (optional::optional): Remove member initialization of
233 m_instantiated.
234 (optional::optional(in_place_t...)): New constructor.
235 (optional::~optional): Use reset.
236 (optional::optional(const optional&)): New.
237 (optional::optional(const optional&&)): New.
238 (optional::optional(T &)): New.
239 (optional::optional(T &&)): New.
240 (operator::operator=(const optional &)): New.
241 (operator::operator=(optional &&)): New.
242 (operator::operator= (const T &))
243 (operator::operator= (T &&))
244 (operator::emplace (Args &&... args)): Return a T&. Use reset.
245 (operator::reset): New.
246 (operator::m_instantiated):: Add in-class initializer.
247 * common/traits.h: Include <type_traits>.
248 (struct And): New types.
249
a7fc9b61
PA
2502017-04-18 Pedro Alves <palves@redhat.com>
251
252 * xml-support.c: Include <vector>.
253 (scope_level::scope_level(const gdb_xml_element *))
254 (scope_level::scope_level(scope_level&&)): New.
255 (scope_level::~scope_level): New.
256 (scope_level_s): Delete.
257 (gdb_xml_parser::scopes): Now a std::vector.
258 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
259 Use std::vector.
260 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
261 scope cleanup code.
262 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
263 of the scopes member. Use std::vector::emplace_back.
264
010151c9
PA
2652017-04-18 Pedro Alves <palves@redhat.com>
266
267 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
268 a bool.
269 (gdb_xml_end_element): Change type of first parameter.
270 (gdb_xml_cleanup): Rename to ...
271 (gdb_xml_parser::~gdb_xml_parser): ... this.
272 (gdb_xml_create_parser_and_cleanup): Delete with ...
273 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
274 to this new ctor.
275 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
276 using gdb_xml_create_parser_and_cleanup.
277 (xinclude_parsing_data): Add ctor/dtor.
278 (xml_xinclude_cleanup): Delete.
279 (xml_process_xincludes): Create a local xinclude_parsing_data
280 instead of heap-allocating one. Create a local gdb_xml_parser
281 instead of heap-allocating one with
282 gdb_xml_create_parser_and_cleanup.
283
d56060f0
JB
2842017-04-18 John Baldwin <jhb@FreeBSD.org>
285
286 PR threads/20743
287 * fbsd-nat.c (resume_one_thread_cb): Remove.
288 (resume_all_threads_cb): Remove.
289 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
290 iterate_over_threads.
291
305d16a9
JB
2922017-04-17 Joel Brobecker <brobecker@adacore.com>
293
294 * NEWS: Create a new section for the next release branch.
295 Rename the section of the current branch, now that it has
296 been cut.
297
8bb57231
JB
2982017-04-17 Joel Brobecker <brobecker@adacore.com>
299
300 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
301 * version.in: Bump version to 8.0.50.DATE-git.
302
096c92dd
SDJ
3032017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
304
305 PR gdb/21385
306 * windows-nat.c (windows_create_inferior): Declare 'allargs'
307 independently of the host, and fix build breakage on Cygwin.
308
0550c955
PA
3092017-04-13 Pedro Alves <palves@redhat.com>
310
311 * inferior.c (free_inferior): Convert to ...
312 (inferior::~inferior): ... this dtor.
313 (inferior::inferior): New ctor, factored out from ...
314 (add_inferior_silent): ... here. Allocate the inferior with a new
315 expression.
316 (delete_inferior): Call delete instead of free_inferior.
317 * inferior.h (gdb_environ, continuation): Forward declare.
318 (inferior): Now a class. Add in-class initialization to all
319 members. Make boolean fields bool, except 'detaching'.
320 (inferior::inferior): New explicit ctor.
321 (inferior::~inferior): New.
322
e3d60dfc
PA
3232017-04-13 Pedro Alves <palves@redhat.com>
324
325 * inferior.c (init_inferior_list): Delete.
326 * inferior.h (init_inferior_list): Delete.
327
5fd69d0a
PA
3282017-04-13 Pedro Alves <palves@redhat.com>
329
330 PR threads/13217
331 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
332 (top level): Call it twice, with different thread sets.
333
c6609450
PA
3342017-04-13 Pedro Alves <palves@redhat.com>
335
336 * thread.c: Include <algorithm>.
337 (thread_array_cleanup): Delete.
338 (scoped_inc_dec_ref): New class.
339 (live_threads_count): New function.
340 (set_thread_refcount): Delete.
341 (tp_array_compar_ascending): Now a bool.
342 (tp_array_compar): Convert to a std::sort comparison function.
343 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
344 and live_threads_count.
345
2a00d7ce
PA
3462017-04-13 Pedro Alves <palves@redhat.com>
347
348 * infrun.c (follow_fork_inferior): Also switch the current
349 inferior.
350
441d7c93
PA
3512017-04-13 Pedro Alves <palves@redhat.com>
352
353 * breakpoint.c (watch_command_1): Save watchpoint-frame info
354 before calling create_internal_breakpoint.
355
808480f6
PA
3562017-04-13 Pedro Alves <palves@redhat.com>
357
358 * fork-child.c (execv_argv): New class.
359 (breakup_args): Refactored as ...
360 (execv_argv::init_for_no_shell): .. this method of execv_argv.
361 Copy arguments to storage and replace separators with NULL
362 terminators in place.
363 (escape_bang_in_quoted_argument): Adjust to return bool.
364 (execv_argv::execv_argv): New ctor.
365 (execv_argv::init_for_shell): New method, factored out from
366 fork_inferior. Don't strdup strings into the vector.
367 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
368 Remove free_vector_argv call.
369
ad3d022a
YQ
3702017-04-13 Yao Qi <yao.qi@linaro.org>
371
372 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
373 tdep->rx_psw_type.
374
e6ddc3bf
YQ
3752017-04-13 Yao Qi <yao.qi@linaro.org>
376
377 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
378 * rx-tdep.c (rx_gdbarch_init): Likewise.
379
bfb8cf90
PA
3802017-04-13 Pedro Alves <palves@redhat.com>
381
382 * breakpoint.h (struct breakpoint): Reindent.
383
f5336ca5
PA
3842017-04-13 Pedro Alves <palves@redhat.com>
385
386 * breakpoint.c (bp_location): Rename to ...
387 (bp_locations): ... this. All references updated.
388 (bp_location_count): Rename to ...
389 (bp_locations_count): ... this. All references updated.
390 (bp_location_placed_address_before_address_max): Rename to ...
391 (bp_locations_placed_address_before_address_max): ... this. All
392 references updated.
393 (bp_location_shadow_len_after_address_max): Rename to ...
394 (bp_locations_shadow_len_after_address_max): ... this. All
395 references updated.
396 (bp_location_compare_addrs): Rename to ...
397 (bp_locations_compare_addrs): ... this. All references updated.
398 (bp_location_compare):Rename to ...
399 (bp_locations_compare): ... this. All references updated.
400 (bp_location_target_extensions_update): Rename to ...
401 (bp_locations_target_extensions_update): ... this. All references
402 updated.
403
be628ab8
SDJ
4042017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
405
406 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
407 * common/common.m4: Check headers 'termios.h', 'termio.h' and
408 'sgtty.h'.
409 * common/gdb_termios.h: New file, with parts of "terminal.h".
410 * inflow.c: Include "gdb_termios.h".
411 * ser-unix.c: Include "gdb_termios.h".
412 * terminal.h: Move terminal-related defines to
413 "common/gdb_termios.h".
414
8e9e35b1
TT
4152017-04-12 Tom Tromey <tom@tromey.com>
416
417 * probe.c (parse_probes): Update.
418 * location.h (delete_event_location): Don't declare.
419 (event_location_deleter::operator()): Update.
420 * location.c (event_location_deleter::operator()): Rename from
421 delete_event_location.
422 * linespec.h (linespec_result) <location>: Change type to
423 event_location_up.
424 * linespec.c (canonicalize_linespec, event_location_to_sals)
425 (decode_objc): Update.
426 (linespec_result): Don't call delete_event_location.
427 * breakpoint.c (create_breakpoints_sal)
428 (bkpt_probe_create_sals_from_location)
429 (strace_marker_create_sals_from_location): Update.
430
16e802b9
TT
4312017-04-12 Tom Tromey <tom@tromey.com>
432
433 * linespec.h (struct linespec_result): Add constructor and
434 destructor.
435 (init_linespec_result, destroy_linespec_result)
436 (make_cleanup_destroy_linespec_result): Don't declare.
437 * linespec.c (init_linespec_result): Remove.
438 (linespec_result::~linespec_result): Rename from
439 destroy_linespec_result. Update.
440 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
441 Remove.
442 * breakpoint.c (create_breakpoint, break_range_command)
443 (decode_location_default): Update.
444 * ax-gdb.c (agent_command_1): Update.
445
d28cd78a
TT
4462017-04-12 Tom Tromey <tom@tromey.com>
447
448 * remote.c (remote_download_tracepoint): Update.
449 * python/py-breakpoint.c (bppy_get_location): Update.
450 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
451 (gdbscm_breakpoint_location): Update.
452 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
453 * breakpoint.h (struct breakpoint) <location, location_range_end>:
454 Change type to event_location_up.
455 * breakpoint.c (create_overlay_event_breakpoint)
456 (create_longjmp_master_breakpoint)
457 (create_std_terminate_master_breakpoint)
458 (create_exception_master_breakpoint)
459 (breakpoint_event_location_empty_p, print_breakpoint_location)
460 (print_one_breakpoint_location, create_thread_event_breakpoint)
461 (init_breakpoint_sal, create_breakpoint)
462 (print_recreate_ranged_breakpoint, break_range_command)
463 (init_ada_exception_breakpoint, say_where): Update.
464 (base_breakpoint_dtor): Don't call delete_event_location.
465 (bkpt_print_recreate, tracepoint_print_recreate)
466 (dprintf_print_recreate, update_static_tracepoint)
467 (breakpoint_re_set_default): Update.
468
711799d5
TT
4692017-04-12 Tom Tromey <tom@tromey.com>
470
471 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
472 type of "to_do". Update.
473 (compute_stack_depth): Use std::vector.
474
52d214d3
TT
4752017-04-12 Tom Tromey <tom@tromey.com>
476
477 * printcmd.c (find_instruction_backward): Use std::vector.
478
4c404b8b
TT
4792017-04-12 Tom Tromey <tom@tromey.com>
480
481 * symfile.c (objfilep): Remove typedef.
482 (reread_symbols): Use a std::vector.
483
156d9eab
TT
4842017-04-12 Tom Tromey <tom@tromey.com>
485
486 * mi/mi-main.c (exec_direction_forward): Remove.
487 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
488 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
489 scoped_restore.
490 * guile/guile.c (guile_repl_command, guile_command)
491 (gdbscm_execute_gdb_command): Use scoped_restore.
492 * go-exp.y (go_parse): Use scoped_restore.
493 * d-exp.y (d_parse): Use scoped_restore.
494 * cli/cli-decode.c (cmd_func): Use scoped_restore.
495 * c-exp.y (c_parse): Use scoped_restore.
496
4d89769a
TT
4972017-04-12 Tom Tromey <tom@tromey.com>
498
499 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
500 (mi_parse): Update return type.
501 (mi_parse_free): Remove.
502 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
503 (mi_parse::~mi_parse): Rename from mi_parse_free.
504 (mi_parse_cleanup): Remove.
505 (mi_parse): Return a unique_ptr. Use new.
506 * mi/mi-main.c (mi_execute_command): Update.
507
4b217cc7
TT
5082017-04-12 Tom Tromey <tom@tromey.com>
509
510 * location.c (explicit_location_lex_one): Return a
511 unique_xmalloc_ptr.
512 (string_to_explicit_location): Update. Remove cleanups.
513
59d3651b
TT
5142017-04-12 Tom Tromey <tom@tromey.com>
515
516 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
517 (compare_value_and_voffset): Change type. Update.
518 (compute_vtable_size): Change type of "offset_vec".
519 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
520 (gnuv3_get_typeid): Remove extraneous declaration.
521
b24b0d6c
TT
5222017-04-12 Tom Tromey <tom@tromey.com>
523
524 * charset.h (wchar_iterator): Fix comment.
525
80a3b8c5
TT
5262017-04-12 Tom Tromey <tom@tromey.com>
527
528 * charset.c (iconv_wrapper): New class.
529 (cleanup_iconv): Remove.
530 (convert_between_encodings): Use it.
531
c83dd867
TT
5322017-04-12 Tom Tromey <tom@tromey.com>
533
534 * symfile.h (increment_reading_symtab): Update type.
535 * symfile.c (decrement_reading_symtab): Remove.
536 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
537 * psymtab.c (psymtab_to_symtab): Update.
538 * dwarf2read.c (dw2_instantiate_symtab): Update.
539
0e8621a0
TT
5402017-04-12 Tom Tromey <tom@tromey.com>
541
542 * jit.c (struct jit_reader): Declare separately. Add constructor
543 and destructor. Change type of "handle".
544 (loaded_jit_reader): Define separately.
545 (jit_reader_load): Update. New "new".
546 (jit_reader_unload_command): Use "delete".
547 * gdb-dlfcn.h (struct dlclose_deleter): New.
548 (gdb_dlhandle_up): New typedef.
549 (gdb_dlopen, gdb_dlsym): Update types.
550 (gdb_dlclose): Remove.
551 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
552 (gdb_dlsym): Change type of "handle".
553 (make_cleanup_dlclose): Remove.
554 (dlclose_deleter::operator()): Rename from gdb_dlclose.
555 * compile/compile-c-support.c (load_libcc): Update.
556
67d89901
TT
5572017-04-12 Tom Tromey <tom@tromey.com>
558
559 * symtab.h (find_pcs_for_symtab_line): Change return type.
560 * symtab.c (find_pcs_for_symtab_line): Change return type.
561 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
562 type of "vec". Update.
563 (ltpy_get_pcs_for_line): Update.
564 * linespec.c (decode_digits_ordinary): Update.
565
93921405
TT
5662017-04-12 Tom Tromey <tom@tromey.com>
567
568 * tracepoint.c (actions_command): Update.
569 * python/python.c (python_command, python_interactive_command):
570 Update.
571 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
572 * guile/guile.c (guile_command): Update.
573 * defs.h (read_command_lines, read_command_lines_1): Return
574 command_line_up.
575 (command_lines_deleter): New struct.
576 (command_line_up): New typedef.
577 * compile/compile.c (compile_code_command)
578 (compile_print_command): Update.
579 * cli/cli-script.h (get_command_line, copy_command_lines): Return
580 command_line_up.
581 (make_cleanup_free_command_lines): Remove.
582 * cli/cli-script.c (get_command_line, read_command_lines_1)
583 (copy_command_lines): Return command_line_up.
584 (while_command, if_command, read_command_lines, define_command)
585 (document_command): Update.
586 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
587 Remove.
588 * breakpoint.h (breakpoint_set_commands): Change type of
589 "commands".
590 * breakpoint.c (breakpoint_set_commands): Change type of
591 "commands". Update.
592 (do_map_commands_command, update_dprintf_command_list)
593 (create_tracepoint_from_upload): Update.
594
ffc2605c
TT
5952017-04-12 Tom Tromey <tom@tromey.com>
596
597 * tracepoint.c (scope_info): Update.
598 * spu-tdep.c (spu_catch_start): Update.
599 * python/python.c (gdbpy_decode_line): Update.
600 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
601 * python/py-breakpoint.c (bppy_init): Update.
602 * probe.c (parse_probes): Update.
603 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
604 * location.h (event_location_deleter): New struct.
605 (event_location_up): New typedef.
606 (new_linespec_location, new_address_location, new_probe_location)
607 (new_explicit_location, copy_event_location)
608 (string_to_event_location, string_to_event_location_basic)
609 (string_to_explicit_location): Update return type.
610 (make_cleanup_delete_event_location): Remove.
611 * location.c (new_linespec_location, new_address_location)
612 (new_probe_location, new_explicit_location, copy_event_location):
613 Return event_location_up.
614 (delete_event_location_cleanup)
615 (make_cleanup_delete_event_location): Remove.
616 (string_to_explicit_location, string_to_event_location_basic)
617 (string_to_event_location): Return event_location_up.
618 * linespec.c (canonicalize_linespec, event_location_to_sals)
619 (decode_line_with_current_source)
620 (decode_line_with_last_displayed, decode_objc): Update.
621 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
622 * completer.c (location_completer): Update.
623 * cli/cli-cmds.c (edit_command, list_command): Update.
624 * breakpoint.c (create_overlay_event_breakpoint)
625 (create_longjmp_master_breakpoint)
626 (create_std_terminate_master_breakpoint)
627 (create_exception_master_breakpoint)
628 (create_thread_event_breakpoint): Update.
629 (init_breakpoint_sal): Update. Remove some dead code.
630 (create_breakpoint_sal): Change type of "location". Update.
631 (create_breakpoints_sal, create_breakpoint, break_command_1)
632 (dprintf_command, break_range_command, until_break_command)
633 (init_ada_exception_breakpoint)
634 (strace_marker_create_sals_from_location)
635 (update_static_tracepoint, trace_command, ftrace_command)
636 (strace_command, create_tracepoint_from_upload): Update.
637 * break-catch-throw.c (re_set_exception_catchpoint): Update.
638 * ax-gdb.c (agent_command_1): Update.
639
8f10c932
PA
6402017-04-12 Pedro Alves <palves@redhat.com>
641
642 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
643 * configure.tgt: Handle i[34567]86-*-go32* and
644 i[34567]86-*-msdosdjgpp*.
645 * i386-tdep.c (i386_svr4_reg_to_regnum):
646 Make extern.
647 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
648 i386-go32-tdep.c.
649 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
650 * i386-go32-tdep.c: New file.
651 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
652 declarations.
653
0a31ccfb
SM
6542017-04-12 Simon Marchi <simon.marchi@ericsson.com>
655
656 * aix-thread.c (pd_status2str): Change return type to const char *.
657
e9bb3fbb
PA
6582017-04-12 Pedro Alves <palves@redhat.com>
659
660 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
661 calls to set_gdbarch_gnu_triplet_regexp.
662
53375380
PA
6632017-04-12 Pedro Alves <palves@redhat.com>
664
665 PR gdb/21323
666 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
667 New enum value.
668 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
669 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
670 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
671 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
672 * gdbarch.h, gdbarch.c: Regenerate.
673 * aarch64-tdep.c (aarch64_gdbarch_init): Override
674 gdbarch_wchar_bit and gdbarch_wchar_signed.
675 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
676 * arm-tdep.c (arm_gdbarch_init): Likewise.
677 * avr-tdep.c (avr_gdbarch_init): Likewise.
678 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
679 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
680 * i386-tdep.c (i386_go32_init_abi): Likewise.
681 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
682 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
683 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
684 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
685 * sh-tdep.c (sh_gdbarch_init): Likewise.
686 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
687 * sparc64-tdep.c (sparc64_init_abi): Likewise.
688 * windows-tdep.c (windows_init_abi): Likewise.
689 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
690
53e710ac
PA
6912017-04-12 Pedro Alves <palves@redhat.com>
692
693 PR c++/21323
694 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
695 cplus_primitive_type_char32_t>: New enum values.
696 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
697 and cplus_primitive_type_char32_t.
698 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
699 32, use the archtecture's built-in type for char16_t and char32_t,
700 respectively. Otherwise, fallback to init_integer_type as before,
701 but make the type unsigned, and issue a complaint.
702 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
703
ab0538b8
AH
7042017-04-12 Alan Hayward <alan.hayward@arm.com>
705
5e0e0422 706 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
707 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
708
5430098f
SDJ
7092017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
710
711 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
712 'const char *'.
713
7c5ded6a
SDJ
7142017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
715
716 * common/common-utils.c (free_vector_argv): New function.
717 * common/common-utils.h: Include <vector>.
718 (free_vector_argv): New prototype.
719 * darwin-nat.c (darwin_create_inferior): Rewrite function
720 prototype in order to constify "exec_file" and accept a
721 "std::string" for "allargs".
722 * fork-child.c: Include <vector>.
723 (breakup_args): Rewrite function, using C++.
724 (fork_inferior): Rewrite function header, constify "exec_file_arg"
725 and accept "std::string" for "allargs". Update the code to
726 calculate "argv" based on "allargs". Update calls to "exec_fun"
727 and "execvp".
728 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
729 order to constify "exec_file" and accept a "std::string" for
730 "allargs".
731 * go32-nat.c (go32_create_inferior): Likewise.
732 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
733 * infcmd.c (run_command_1): Constify "exec_file". Use
734 "std::string" for inferior arguments.
735 * inferior.h (fork_inferior): Update prototype.
736 * linux-nat.c (linux_nat_create_inferior): Rewrite function
737 prototype in order to constify "exec_file" and accept a
738 "std::string" for "allargs".
739 * nto-procfs.c (procfs_create_inferior): Likewise.
740 * procfs.c (procfs_create_inferior): Likewise.
741 * remote-sim.c (gdbsim_create_inferior): Likewise.
742 * remote.c (extended_remote_run): Update code to accept
743 "std::string" as argument.
744 (extended_remote_create_inferior): Rewrite function prototype in
745 order to constify "exec_file" and accept a "std::string" for
746 "allargs".
747 * rs6000-nat.c (super_create_inferior): Likewise.
748 (rs6000_create_inferior): Likewise.
749 * target.h (struct target_ops) <to_create_inferior>: Likewise.
750 * windows-nat.c (windows_create_inferior): Likewise.
751
ae0eee42
PA
7522017-04-11 Pedro Alves <palves@redhat.com>
753
754 * thread.c: Fix whitespace throughout.
755
a6acac06
PR
7562017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
757
758 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
759
64403bd1
AH
7602017-04-11 Alan Hayward <alan.hayward@arm.com>
761
762 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
763
a5bef50f
SDJ
7642017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
765
766 PR gdb/21364
767 * osdata.c (info_osdata): Check if 'type' is an empty string
768 instead of NULL.
769
9295a5a9
PA
7702017-04-10 Pedro Alves <palves@redhat.com>
771
772 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
773 (ptid_to_global_thread_id, in_thread_list)
774 (do_captured_list_thread_ids, set_resumed, set_running)
775 (set_executing, set_stop_requested, finish_thread_state)
776 (validate_registers_access, can_access_registers_ptid)
777 (print_thread_info_1, switch_to_thread)
778 (do_restore_current_thread_cleanup)
779 (make_cleanup_restore_current_thread, thread_command)
780 (thread_name_command): Use operator== instead of ptid_equal.
781
996812e3
PA
7822017-04-10 Pedro Alves <palves@redhat.com>
783
784 * thread.c (struct current_thread_cleanup) <next>: Delete field.
785 (current_thread_cleanup_chain): Delete.
786 (restore_current_thread_cleanup_dtor)
787 (make_cleanup_restore_current_thread): Remove references to
788 current_thread_cleanup_chain.
789
845b344f
AH
7902017-04-10 Alan Hayward <alan.hayward@arm.com>
791
792 * msp430-tdep.c (msp430_pseudo_register_read): Never return
793 REG_UNKNOWN.
794
803bdfe4
YQ
7952017-04-10 Yao Qi <yao.qi@linaro.org>
796
797 PR gdb/19942
798 * gdbthread.h (thread_info::deletable): New method.
799 (thread_info::incref): New method.
800 (thread_info::decref): New method.
801 (thread_info::refcount): Move it to private.
802 * infrun.c (save_stop_context): Call inc_refcount.
803 (release_stop_context_cleanup): Likewise.
804 * thread.c (set_thread_exited): New function.
805 (init_thread_list): Delete "tp" only it is deletable, otherwise
806 call set_thread_exited.
807 (delete_thread_1): Call set_thread_exited.
808 (current_thread_cleanup) <inferior_pid>: Remove.
809 <thread>: New field.
810 (restore_current_thread_ptid_changed): Removed.
811 (do_restore_current_thread_cleanup): Adjust.
812 (restore_current_thread_cleanup_dtor): Don't call
813 find_thread_ptid.
814 (set_thread_refcount): Use dec_refcount.
815 (make_cleanup_restore_current_thread): Adjust.
816 (thread_apply_all_command): Call inc_refcount.
817 (_initialize_thread): Don't call
818 observer_attach_thread_ptid_changed.
819
8c25b497
YQ
8202017-04-10 Yao Qi <yao.qi@linaro.org>
821
822 * thread.c (delete_thread_1): Hoist code on marking thread as
823 exited.
824
8473b447
SM
8252017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
826
827 * windows-nat.c (windows_detach): Initialize ptid with
828 minus_one_ptid.
829
6670ec13
SM
8302017-04-07 Simon Marchi <simon.marchi@ericsson.com>
831
832 * unittests/ptid-selftests.c: Fix erroneous assert messages.
833
ba2f91bb
AH
8342017-04-07 Alan Hayward <alan.hayward@arm.com>
835
836 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
837 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
838 (bfin_pseudo_register_write): Likewise
839
436252de
SM
8402017-04-06 Simon Marchi <simon.marchi@ericsson.com>
841
842 * common/ptid.h (struct ptid): Change to...
843 (class ptid_t): ... this.
844 <ptid_t>: New constructors.
845 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
846 matches>: New methods.
847 <make_null, make_minus_one>: New static methods.
848 <pid>: Rename to...
849 <m_pid>: ...this.
850 <lwp>: Rename to...
851 <m_lwp>: ...this.
852 <tid>: Rename to...
853 <m_tid>: ...this.
854 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
855 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
856 as references, move comment to class ptid_t.
857 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
858 ptid_t static methods.
859 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
860 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
861 Take ptid arguments as references, implement using ptid_t methods.
862 * unittests/ptid-selftests.c: New file.
863 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
864 unittests/ptid-selftests.c.
865 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
866
0dedf377
TP
8672017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
868
869 * python/python.c (python_run_simple_file): Cast mode literal to
870 non-const char pointer as expected by PyFile_FromString.
871
4e9868d4
SM
8722017-04-05 Simon Marchi <simon.marchi@ericsson.com>
873
874 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
875 minus_one_ptid and null_ptid.
876
9bf2a700
PA
8772017-04-05 Pedro Alves <palves@redhat.com>
878
879 * warning.m4 (build_warnings): Remove -Wno-write-strings.
880 * configure: Regenerate.
881
a121b7c1
PA
8822017-04-05 Pedro Alves <palves@redhat.com>
883
884 * ada-exp.y (yyerror): Constify.
885 * ada-lang.c (bound_name, get_selections)
886 (ada_variant_discrim_type)
887 (ada_variant_discrim_name, ada_value_struct_elt)
888 (ada_lookup_struct_elt_type, is_unchecked_variant)
889 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
890 (catch_ada_exception_command_split)
891 (catch_ada_assert_command_split, catch_assert_command)
892 (ada_op_name): Constify.
893 * ada-lang.h (ada_yyerror, get_selections)
894 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
895 * arc-tdep.c (arc_print_frame_cache): Constify.
896 * arm-tdep.c (arm_skip_stub): Constify.
897 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
898 (gen_aggregate_elt_ref): Constify.
899 * bcache.c (print_bcache_statistics): Constify.
900 * bcache.h (print_bcache_statistics): Constify.
901 * break-catch-throw.c (catch_exception_command_1):
902 * breakpoint.c (struct ep_type_description::description):
903 Constify.
904 (add_solib_catchpoint): Constify.
905 (catch_fork_command_1): Add cast.
906 (add_catch_command): Constify.
907 * breakpoint.h (add_catch_command, add_solib_catchpoint):
908 Constify.
909 * bsd-uthread.c (bsd_uthread_state): Constify.
910 * buildsym.c (patch_subfile_names): Constify.
911 * buildsym.h (next_symbol_text_func, patch_subfile_names):
912 Constify.
913 * c-exp.y (yyerror): Constify.
914 (token::oper): Constify.
915 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
916 * c-varobj.c (cplus_describe_child): Constify.
917 * charset.c (find_charset_names): Add cast.
918 (find_charset_names): Constify array and add const_cast.
919 * cli/cli-cmds.c (complete_command, cd_command): Constify.
920 (edit_command): Constify.
921 * cli/cli-decode.c (lookup_cmd): Constify.
922 * cli/cli-dump.c (dump_memory_command, dump_value_command):
923 Constify.
924 (struct dump_context): Constify.
925 (add_dump_command, restore_command): Constify.
926 * cli/cli-script.c (get_command_line): Constify.
927 * cli/cli-script.h (get_command_line): Constify.
928 * cli/cli-utils.c (check_for_argument): Constify.
929 * cli/cli-utils.h (check_for_argument): Constify.
930 * coff-pe-read.c (struct read_pe_section_data): Constify.
931 * command.h (lookup_cmd): Constify.
932 * common/print-utils.c (decimal2str): Constify.
933 * completer.c (gdb_print_filename): Constify.
934 * corefile.c (set_gnutarget): Constify.
935 * cp-name-parser.y (yyerror): Constify.
936 * cp-valprint.c (cp_print_class_member): Constify.
937 * cris-tdep.c (cris_register_name, crisv32_register_name):
938 Constify.
939 * d-exp.y (yyerror): Constify.
940 (struct token::oper): Constify.
941 * d-lang.h (d_yyerror): Constify.
942 * dbxread.c (struct header_file_location::name): Constify.
943 (add_old_header_file, add_new_header_file, last_function_name)
944 (dbx_next_symbol_text, add_bincl_to_list)
945 (find_corresponding_bincl_psymtab, set_namestring)
946 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
947 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
948 * defs.h (command_line_input, print_address_symbolic)
949 (deprecated_readline_begin_hook): Constify.
950 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
951 Constify.
952 * event-top.c (handle_line_of_input): Constify and add cast.
953 * exceptions.c (catch_errors): Constify.
954 * exceptions.h (catch_errors): Constify.
955 * expprint.c (print_subexp_standard, op_string, op_name)
956 (op_name_standard, dump_raw_expression, dump_raw_expression):
957 * expression.h (op_name, op_string, dump_raw_expression):
958 Constify.
959 * f-exp.y (yyerror): Constify.
960 (struct token::oper): Constify.
961 (struct f77_boolean_val::name): Constify.
962 * f-lang.c (f_word_break_characters): Constify.
963 * f-lang.h (f_yyerror): Constify.
964 * fork-child.c (fork_inferior): Add cast.
965 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
966 (new_variant): Constify.
967 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
968 * gdbarch.c: Regenerate.
969 * gdbcore.h (set_gnutarget): Constify.
970 * go-exp.y (yyerror): Constify.
971 (token::oper): Constify.
972 * go-lang.h (go_yyerror): Constify.
973 * go32-nat.c (go32_sysinfo): Constify.
974 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
975 * guile/scm-cmd.c (cmdscm_function): Constify.
976 * guile/scm-param.c (pascm_param_value): Constify.
977 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
978 (h8300sx_register_name): Constify.
979 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
980 Constify.
981 * ia64-tdep.c (ia64_register_names): Constify.
982 * infcmd.c (construct_inferior_arguments): Constify.
983 (path_command, attach_post_wait): Constify.
984 * language.c (show_range_command, show_case_command)
985 (unk_lang_error): Constify.
986 * language.h (language_defn::la_error)
987 (language_defn::la_name_of_this): Constify.
988 * linespec.c (decode_line_2): Constify.
989 * linux-thread-db.c (thread_db_err_str): Constify.
990 * lm32-tdep.c (lm32_register_name): Constify.
991 * m2-exp.y (yyerror): Constify.
992 * m2-lang.h (m2_yyerror): Constify.
993 * m32r-tdep.c (m32r_register_names): Constify and make static.
994 * m68hc11-tdep.c (m68hc11_register_names): Constify.
995 * m88k-tdep.c (m88k_register_name): Constify.
996 * macroexp.c (appendmem): Constify.
997 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
998 (upgrade_type, parse_external, parse_partial_symbols)
999 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
1000 (new_symbol): Constify.
1001 * memattr.c (mem_info_command): Constify.
1002 * mep-tdep.c (register_name_from_keyword): Constify.
1003 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
1004 Constify.
1005 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
1006 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
1007 * mi/mi-main.c (captured_mi_execute_command): Constify and add
1008 cast.
1009 (mi_execute_async_cli_command): Constify.
1010 * mips-tdep.c (mips_register_name): Constify.
1011 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
1012 (am33_register_name, am33_2_register_name)
1013 * moxie-tdep.c (moxie_register_names): Constify.
1014 * nat/linux-osdata.c (osdata_type): Constify fields.
1015 * nto-tdep.c (nto_parse_redirection): Constify.
1016 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
1017 (lookup_child_selector): Constify.
1018 (objc_methcall::name): Constify.
1019 * objc-lang.h (lookup_objc_class, lookup_child_selector)
1020 (lookup_struct_typedef): Constify.
1021 * objfiles.c (pc_in_section): Constify.
1022 * objfiles.h (pc_in_section): Constify.
1023 * p-exp.y (struct token::oper): Constify.
1024 (yyerror): Constify.
1025 * p-lang.h (pascal_yyerror): Constify.
1026 * parser-defs.h (op_name_standard): Constify.
1027 (op_print::string): Constify.
1028 (exp_descriptor::op_name): Constify.
1029 * printcmd.c (print_address_symbolic): Constify.
1030 * psymtab.c (print_partial_symbols): Constify.
1031 * python/py-breakpoint.c (stop_func): Constify.
1032 (bppy_get_expression): Constify.
1033 * python/py-cmd.c (cmdpy_completer::name): Constify.
1034 (cmdpy_function): Constify.
1035 * python/py-event.c (evpy_add_attribute)
1036 (gdbpy_initialize_event_generic): Constify.
1037 * python/py-event.h (evpy_add_attribute)
1038 (gdbpy_initialize_event_generic): Constify.
1039 * python/py-evts.c (add_new_registry): Constify.
1040 * python/py-finishbreakpoint.c (outofscope_func): Constify.
1041 * python/py-framefilter.c (get_py_iter_from_func): Constify.
1042 * python/py-inferior.c (get_buffer): Add cast.
1043 * python/py-param.c (parm_constant::name): Constify.
1044 * python/py-unwind.c (fprint_frame_id): Constify.
1045 * python/python.c (gdbpy_parameter_value): Constify.
1046 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
1047 * remote.c (memory_packet_config::name): Constify.
1048 (show_packet_config_cmd, remote_write_bytes)
1049 (remote_buffer_add_string):
1050 * reverse.c (exec_reverse_once): Constify.
1051 * rs6000-tdep.c (variant::name, variant::description): Constify.
1052 * rust-exp.y (rustyyerror): Constify.
1053 * rust-lang.c (rust_op_name): Constify.
1054 * rust-lang.h (rustyyerror): Constify.
1055 * serial.h (serial_ops::name): Constify.
1056 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
1057 (sh_sh3e_register_name, sh_sh2e_register_name)
1058 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
1059 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
1060 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
1061 (sh_sh4al_dsp_register_name): Constify.
1062 * sh64-tdep.c (sh64_register_name): Constify.
1063 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
1064 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
1065 * stabsread.c (patch_block_stabs, read_type_number)
1066 (ref_map::stabs, ref_add, process_reference)
1067 (symbol_reference_defined, define_symbol, define_symbol)
1068 (error_type, read_type, read_member_functions, read_cpp_abbrev)
1069 (read_one_struct_field, read_struct_fields, read_baseclasses)
1070 (read_tilde_fields, read_struct_type, read_array_type)
1071 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
1072 (read_huge_number, read_range_type, read_args, common_block_start)
1073 (find_name_end): Constify.
1074 * stabsread.h (common_block_start, define_symbol)
1075 (process_one_symbol, symbol_reference_defined, ref_add):
1076 * symfile.c (get_section_index, add_symbol_file_command):
1077 * symfile.h (get_section_index): Constify.
1078 * target-descriptions.c (tdesc_type::name): Constify.
1079 (tdesc_free_type): Add cast.
1080 * target.c (find_default_run_target):
1081 (add_deprecated_target_alias, find_default_run_target)
1082 (target_announce_detach): Constify.
1083 (do_option): Constify.
1084 * target.h (add_deprecated_target_alias): Constify.
1085 * thread.c (print_thread_info_1): Constify.
1086 * top.c (deprecated_readline_begin_hook, command_line_input):
1087 Constify.
1088 (init_main): Add casts.
1089 * top.h (handle_line_of_input): Constify.
1090 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
1091 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
1092 (tfind_command): Rename to ...
1093 (tfind_command_1): ... this and constify.
1094 (tfind_command): New function.
1095 (tfind_end_command, tfind_start_command): Adjust.
1096 (encode_source_string): Constify.
1097 * tracepoint.h (encode_source_string): Constify.
1098 * tui/tui-data.c (tui_partial_win_by_name): Constify.
1099 * tui/tui-data.h (tui_partial_win_by_name): Constify.
1100 * tui/tui-source.c (tui_set_source_content_nil): Constify.
1101 * tui/tui-source.h (tui_set_source_content_nil): Constify.
1102 * tui/tui-win.c (parse_scrolling_args): Constify.
1103 * tui/tui-windata.c (tui_erase_data_content): Constify.
1104 * tui/tui-windata.h (tui_erase_data_content): Constify.
1105 * tui/tui-winsource.c (tui_erase_source_content): Constify.
1106 * tui/tui.c (tui_enable): Add cast.
1107 * utils.c (defaulted_query): Constify.
1108 (init_page_info): Add cast.
1109 (puts_debug, subset_compare): Constify.
1110 * utils.h (subset_compare): Constify.
1111 * varobj.c (varobj_format_string): Constify.
1112 * varobj.h (varobj_format_string): Constify.
1113 * vax-tdep.c (vax_register_name): Constify.
1114 * windows-nat.c (windows_detach): Constify.
1115 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
1116 * xml-support.c (gdb_xml_end_element): Constify.
1117 * xml-tdesc.c (tdesc_start_reg): Constify.
1118 * xstormy16-tdep.c (xstormy16_register_name): Constify.
1119 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
1120 * xtensa-tdep.h (xtensa_register_t::name): Constify.
1121
995816ba
PA
11222017-04-05 Pedro Alves <palves@redhat.com>
1123
1124 * proc-api.c (struct trans): Constify.
1125 (procfs_note): Constify.
1126 * proc-events.c (struct trans, syscall_table):
1127 * proc-flags.c (struct trans): Constify.
1128 * proc-utils.h (procfs_note): Constify.
1129 * proc-why.c (struct trans): Constify.
1130 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
1131 (procfs_detach): Constify.
1132 * sol-thread.c (struct string_map): Constify.
1133 (td_err_string, td_state_string): Constify.
1134
3e83a920
PA
11352017-04-05 Pedro Alves <palves@redhat.com>
1136
1137 * proc-api.c (procfs_filename): Don't initialize
1138 procfs_filename.
1139 (prepare_to_trace): Assume procfs_filename is non-NULL.
1140 (_initialize_proc_api): Give procfs_filename a default value here.
1141
63160a43
PA
11422017-04-05 Pedro Alves <palves@redhat.com>
1143
1144 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
1145 'cond_string' parameter.
1146 (extract_exception_regexp): Constify 'string' parameter.
1147 (catch_exception_command_1): Constify.
1148 * breakpoint.c (init_catchpoint)
1149 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
1150 parameter.
1151 (ep_parse_optional_if_clause, catch_fork_command_1)
1152 (catch_exec_command_1): Constify.
1153 * breakpoint.h (init_catchpoint): Constify 'cond_string'
1154 parameter.
1155 (ep_parse_optional_if_clause): Constify.
1156 * cli/cli-utils.c (remove_trailing_whitespace)
1157 (check_for_argument): Constify.
1158 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
1159 non-const overload.
1160 (check_for_argument): Likewise.
1161
9b2eba3d
PA
11622017-04-05 Pedro Alves <palves@redhat.com>
1163
1164 * event-top.c (command_line_handler): Add cast to execute_command
1165 call.
1166 * record-btrace.c (cmd_record_btrace_bts_start)
1167 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
1168 (cmd_record_btrace_start): Add cast to execute_command call.
1169 * record-full.c (record_full_goto_insn):
1170 * record.c (record_start, record_stop): Add cast to
1171 execute_command_to_string calls.
1172 (cmd_record_start): Add cast to execute_command calls.
1173
2adadf51
PA
11742017-04-05 Pedro Alves <palves@redhat.com>
1175
1176 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
1177 static inline function.
1178 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
1179 array and use gdb_PyArg_ParseTupleAndKeywords.
1180 * python/py-cmd.c (cmdpy_init): Likewise.
1181 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
1182 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
1183 (infpy_search_memory): Likewise.
1184 * python/py-objfile.c (objfpy_add_separate_debug_file)
1185 (gdbpy_lookup_objfile): Likewise.
1186 * python/py-symbol.c (gdbpy_lookup_symbol)
1187 (gdbpy_lookup_global_symbol): Likewise.
1188 * python/py-type.c (gdbpy_lookup_type): Likewise.
1189 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
1190 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
1191 Likewise.
1192
0d1f4ceb
PA
11932017-04-05 Pedro Alves <palves@redhat.com>
1194
1195 * python/python-internal.h (gdb_PyGetSetDef): New type.
1196 * python/py-block.c (block_object_getset)
1197 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
1198 * python/py-event.c (event_object_getset)
1199 (finish_breakpoint_object_getset): Likewise.
1200 * python/py-inferior.c (inferior_object_getset): Likewise.
1201 * python/py-infthread.c (thread_object_getset): Likewise.
1202 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
1203 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
1204 * python/py-objfile.c (objfile_getset): Likewise.
1205 * python/py-progspace.c (pspace_getset): Likewise.
1206 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
1207 Likewise.
1208 * python/py-record.c (recpy_record_getset): Likewise.
1209 * python/py-symbol.c (symbol_object_getset): Likewise.
1210 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
1211 Likewise.
1212 * python/py-type.c (type_object_getset, field_object_getset):
1213 Likewise.
1214 * python/py-value.c (value_object_getset): Likewise.
1215
4d759979
PA
12162017-04-05 Pedro Alves <palves@redhat.com>
1217
1218 * python/python-internal.h (gdb_PyObject_CallMethod)
1219 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
1220 New functions.
1221 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
1222 (PySys_GetObject, PySys_SetPath): New macros.
1223
fdf9e36f
PA
12242017-04-05 Pedro Alves <palves@redhat.com>
1225
1226 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
1227 info_osdata_command.
1228 * osdata.c (info_osdata_command): Rename to ...
1229 (info_osdata): ... this. Constify 'type' parameter, and remove
1230 the 'from_tty' parameter. Accept NULL TYPE.
1231 (info_osdata_command): New function.
1232 * osdata.h (info_osdata_command): Remove declaration.
1233 (info_osdata): New declaration.
1234
9f33b8b7
PA
12352017-04-05 Pedro Alves <palves@redhat.com>
1236
1237 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
1238 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
1239 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
1240 parameter.
1241 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
1242 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
1243 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
1244 parameter.
1245 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
1246 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
1247 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
1248 (mi_cmd_file_list_exec_source_files)
1249 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
1250 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
1251 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
1252 parameter.
1253 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
1254 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
1255 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
1256 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
1257 (mi_cmd_stack_info_frame): Constify 'command' parameter.
1258 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
1259 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
1260 'command' parameter.
1261 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
1262 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
1263 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
1264 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
1265 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
1266 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
1267 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
1268 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
1269 (mi_cmd_var_set_update_range): Constify 'command' parameter.
1270 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
1271 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
1272 parameter.
1273 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
1274 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
1275 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
1276 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
1277 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
1278 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
1279 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
1280 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
1281 (mi_cmd_data_list_changed_registers)
1282 (mi_cmd_data_write_register_values)
1283 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
1284 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
1285 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
1286 (mi_cmd_list_features, mi_cmd_list_target_features)
1287 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
1288 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
1289 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
1290 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
1291 (mi_cmd_trace_frame_collected): Constify 'command'
1292 parameter.
1293 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
1294 'command' parameter.
1295
67cb5b2d
PA
12962017-04-05 Pedro Alves <palves@redhat.com>
1297
1298 * ada-lang.c (ada_completer_word_break_characters): Now a const
1299 array.
1300 (ada_get_gdb_completer_word_break_characters): Constify.
1301 * completer.c (gdb_completer_command_word_break_characters)
1302 (gdb_completer_file_name_break_characters)
1303 (gdb_completer_quote_characters): Now const arrays.
1304 (get_gdb_completer_quote_characters): Constify.
1305 (set_rl_completer_word_break_characters): New function.
1306 (set_gdb_completion_word_break_characters)
1307 (complete_line_internal): Use it.
1308 * completer.h (get_gdb_completer_quote_characters): Constify.
1309 (set_rl_completer_word_break_characters): Declare.
1310 * f-lang.c (f_word_break_characters): Constify.
1311 * language.c (default_word_break_characters): Constify.
1312 * language.h (language_defn::la_word_break_characters): Constify.
1313 (default_word_break_characters): Constify.
1314 * top.c (init_main): Use set_rl_completer_word_break_characters.
1315
7a114964
PA
13162017-04-05 Pedro Alves <palves@redhat.com>
1317
1318 * aix-thread.c (aix_thread_pid_to_str)
1319 (aix_thread_extra_thread_info): Constify.
1320 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
1321 * bsd-uthread.c (bsd_uthread_extra_thread_info)
1322 (bsd_uthread_pid_to_str): Constify.
1323 * corelow.c (core_pid_to_str): Constify.
1324 * darwin-nat.c (darwin_pid_to_str): Constify.
1325 * fbsd-nat.c (fbsd_pid_to_str): Constify.
1326 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
1327 Constify.
1328 * gnu-nat.c (gnu_pid_to_str): Constify.
1329 * go32-nat.c (go32_pid_to_str): Constify.
1330 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
1331 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
1332 * inferior.c (inferior_pid_to_str): Constify.
1333 * linux-nat.c (linux_nat_pid_to_str): Constify.
1334 * linux-tdep.c (linux_core_pid_to_str): Constify.
1335 * linux-thread-db.c (thread_db_pid_to_str)
1336 (thread_db_extra_thread_info): Constify.
1337 * nto-tdep.c (nto_extra_thread_info): Constify.
1338 * nto-tdep.h (nto_extra_thread_info): Constify.
1339 * obsd-nat.c (obsd_pid_to_str): Constify.
1340 * procfs.c (procfs_pid_to_str): Constify.
1341 * ravenscar-thread.c (ravenscar_extra_thread_info)
1342 (ravenscar_pid_to_str): Constify.
1343 * remote-sim.c (gdbsim_pid_to_str): Constify.
1344 * remote.c (remote_threads_extra_info, remote_pid_to_str):
1345 Constify.
1346 * sol-thread.c (solaris_pid_to_str): Constify.
1347 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
1348 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
1349 * target.c (default_pid_to_str, target_pid_to_str)
1350 (normal_pid_to_str, default_pid_to_str): Constify.
1351 * target.h (target_ops::to_pid_to_str)
1352 (target_ops::to_extra_thread_info): Constify.
1353 (target_pid_to_str, normal_pid_to_str): Constify.
1354 * windows-nat.c (windows_pid_to_str): Constify.
1355 * gdbarch.sh (core_pid_to_str): Constify.
1356 * target-delegates.c: Regenerate.
1357 * gdbarch.h, gdbarch.c: Regenerate.
1358
69bbf465
PA
13592017-04-05 Pedro Alves <palves@redhat.com>
1360
1361 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
1362 the memory of the temporary warning_pre_print override.
1363 * utils.c (warning_pre_print): Constify.
1364 * utils.h (warning_pre_print): Constify.
1365
be47f9e8
PA
13662017-04-05 Pedro Alves <palves@redhat.com>
1367
1368 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
1369 (shell_command): New function.
1370 (make_command): Use std::string.
1371 (init_cli_cmds): Register shell_command instead of shell_escape.
1372
bde6261a
PA
13732017-04-05 Pedro Alves <palves@redhat.com>
1374
1375 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
1376 * tracepoint.c (default_collect): Don't initialize.
1377
b38ef47f
PA
13782017-04-05 Pedro Alves <palves@redhat.com>
1379
1380 * macroexp.c (macro_buffer::shared): Now a bool.
1381 (init_buffer): Update.
1382 (init_shared_buffer): Constify 'addr' parameter.
1383 (substitute_args, expand, macro_expand, macro_expand_next): Remove
1384 casts.
1385
f995bbe8
PA
13862017-04-05 Pedro Alves <palves@redhat.com>
1387
1388 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
1389 * disasm.c (set_disassembler_options): Constify local.
1390 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
1391
4a596fe2
SDJ
13922017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
1393
1394 PR gdb/21352
1395 * tracefile.c (tsave_command): Fix argument parsing for '-r'
1396 option.
1397
2cad08ea
YQ
13982017-04-05 Yao Qi <yao.qi@linaro.org>
1399
1400 * frame.c (frame_unwind_register_unsigned): Call
1401 frame_unwind_register_value.
1402
55a98976
YQ
14032017-04-05 Yao Qi <yao.qi@linaro.org>
1404
1405 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
1406 Use gdb_test_multiple, and don't match anchor.
1407
4ac40124
PA
14082017-04-05 Pedro Alves <palves@redhat.com>
1409
1410 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
1411 (Write After Approval): Remove Simon Marchi.
1412
c053b654
PA
14132017-04-05 Pedro Alves <palves@redhat.com>
1414
1415 * common/gdb_optional.h (optional::optional): Make constexpr and
1416 initialize m_dummy.
1417
4c7bf4f9
JB
14182017-04-04 John Baldwin <jhb@FreeBSD.org>
1419
1420 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
1421 (amd64fbsd_jmp_buf_reg_offset): Remove.
1422 (amd64fbsd_supply_uthread): Remove function.
1423 (amd64fbsd_collect_uthread): Remove function.
1424 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
1425 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
1426 (x86_64-*-freebsd*): Remove bsd-uthread.o.
1427 (fbsd-nat.c): Update comment.
1428 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
1429 (i386fbsd_jmp_buf_reg_offset): Remove.
1430 (i386fbsd_supply_uthread): Remove function.
1431 (i386fbsd_collect_uthread): Remove function.
1432 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
1433
1e1a8bef
JB
14342017-04-04 John Baldwin <jhb@FreeBSD.org>
1435
1436 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
1437 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
1438 * NEWS: Mention that support for FreeBSD/alpha was removed.
1439 * alpha-fbsd-tdep.c: Delete file.
1440 * config/alpha/fbsd.mh: Delete file.
1441 * configure.host: Delete alpha*-*-freebsd* and
1442 alpha*-*-kfreebsd*-gnu.
1443 * configure.tgt: Delete alpha*-*-freebsd* and
1444 alpha*-*-kfreebsd*-gnu.
1445
49907934
JB
14462017-04-04 John Baldwin <jhb@FreeBSD.org>
1447
1448 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
1449 amd64bsd_store_inferior_registers): Use ptid from regcache.
1450
6f77053d
PA
14512017-04-04 Pedro Alves <palves@redhat.com>
1452
1453 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
1454 data fields, make them private and add "m_" prefixes.
1455 (lnp_state_machine::lnp_state_machine): New ctor.
1456 (record_line, check_line_address, handle_set_discriminator)
1457 (handle_set_address, handle_advance_pc, handle_special_opcode)
1458 (handle_advance_line, handle_set_file, handle_negate_stmt)
1459 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
1460 (end_sequence, advance_line): New methods.
1461 (m_gdbarch, m_record_lines_p): New fields.
1462 (lnp_reader_state): Delete.
1463 (dwarf_record_line): Rename to ...
1464 (lnp_state_machine::record_line): ... adjust.
1465 (init_lnp_state_machine): Delete.
1466 (lnp_state_machine::lnp_state_machine): New.
1467 (check_line_address): Rename to ...
1468 (lnp_state_machine::check_line_address): This.
1469 (dwarf_decode_lines_1): Remove reference to "reader_state".
1470 Adjust lnp_state_machine having a non-default ctor. Use bool.
1471 State machine internal state manipulation moved to
1472 lnp_state_machine methods.
1473
9c541725
PA
14742017-04-04 Pedro Alves <palves@redhat.com>
1475
1476 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1477 unittests/offset-type-selftests.c.
1478 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
1479 * common/offset-type.h: New file.
1480 * common/preprocessor.h: New file.
1481 * common/traits.h: New file.
1482 * common/valid-expr.h: New file.
1483 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
1484 sect_offset and cu_offset strong typedefs throughout.
1485 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
1486 typedefs throughout.
1487 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
1488 sect_offset and cu_offset strong typedefs throughout.
1489 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
1490 typedefs throughout.
1491 * gdbtypes.h: Include "common/offset-type.h".
1492 (cu_offset): Now an offset type (strong typedef) instead of a
1493 struct.
1494 (sect_offset): Likewise.
1495 (union call_site_parameter_u): Rename "param_offset" field to
1496 "param_cu_off".
1497 * unittests/offset-type-selftests.c: New file.
1498
ecfb656c
PA
14992017-04-04 Pedro Alves <palves@redhat.com>
1500
1501 * common/underlying.h: New file.
1502 * dwarf2read.c: Include "common/gdb_optional.h" and
1503 "common/underlying.h".
1504 (dir_index, file_name_index): New types.
1505 (file_entry): Use them.
1506 (file_entry::include): Use to_underlying.
1507 (line_header::add_file_name): Use dir_index.
1508 (read_formatted_entries): Use gdb::optional. Read form before
1509 writting to file_entry.
1510 (dwarf_decode_line_header): Use dir_index.
1511 (lnp_state_machine::current_file): Use to_underlying.
1512 (lnp_state_machine::file): Change type to file_name_index.
1513 (dwarf_record_line): Use to_underlying.
1514 (init_lnp_state_machine): Use file_name_index.
1515 (dwarf_decode_lines_1): Use dir_index and file_name_index.
1516
d194f1fe
PA
15172017-04-04 Pedro Alves <palves@redhat.com>
1518
1519 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
1520 operator bool, has_value and get methods.
1521
fff8551c
PA
15222017-04-04 Pedro Alves <palves@redhat.com>
1523
1524 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
1525 fields.
1526 (line_header): Initialize all data fields. Change type of
1527 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
1528 Change type of include_dirs to std::vector<const char *>. Remove
1529 num_include_dirs, include_dirs_size. Change type of file_names to
1530 std::vector<file_entry>. Remove num_file_names, file_names_size.
1531 (line_header::line_header): New.
1532 (line_header::add_include_dir, line_header::add_file_name): New
1533 methods.
1534 (line_header::include_dir_at): Remove NULL check.
1535 (line_header::file_name_at): Add const overload.
1536 (line_header_up): New unique_ptr typedef.
1537 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
1538 std::vector. Remove free_line_header call.
1539 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
1540 free_line_header call.
1541 (free_cu_line_header): Delete.
1542 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
1543 (setup_type_unit_groups): Use line_header_up instead of cleanups.
1544 Adjust to use std::vector.
1545 (free_line_header): Delete.
1546 (free_line_header_voidp): Use delete.
1547 (add_include_dir): Replace with ...
1548 (line_header::add_include_dir): ... this method. Use std::vector.
1549 (add_file_name): Replace with ...
1550 (line_header::add_file_name): ... this method. Use std::vector.
1551 (add_include_dir_stub): Delete.
1552 (read_formatted_entries): Remove memset.
1553 (dwarf_decode_line_header): Return a line_header_up instead of a
1554 raw pointer. Remove cleanup handling. Pass lambdas to
1555 read_formatted_entries. Adjust to use line_header methods.
1556 (dwarf_decode_lines_1): Adjust to use line_header methods.
1557 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
1558 use std::vector.
1559
d62a8ae2
SM
15602017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
1561
1562 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
1563 instead of struct ptid.
1564
db3a1dc7
AH
15652017-05-04 Alan Hayward <alan.hayward@arm.com>
1566
1567 * frame.c (get_frame_register_bytes): Unwind using value.
1568 (put_frame_register_bytes): Likewise.
1569
b1b45502
IB
15702017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
1571
1572 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
1573 aggregate-like.
1574
ec13808e
JK
15752017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
1576
1577 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
1578
12316564
YQ
15792017-03-29 Yao Qi <yao.qi@linaro.org>
1580
1581 * gdbthread.h (struct thread_info): Declare constructor and
1582 destructor. Add some in-class member initializers.
1583 * thread.c (free_thread): Remove.
1584 (init_thread_list): Call delete instead of free_thread.
1585 (new_thread): Call thread_info constructor.
1586 (thread_info::thread_info): New function.
1587 (thread_info::~thread_info): New function.
1588 (delete_thread_1): Call delete instead of free_thread.
1589 (make_cleanup_restore_current_thread): Move tp and frame to
1590 inner block.
1591
fe5f7374
AK
15922017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
1593
1594 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
1595 (arc_skip_prologue): Likewise.
1596 (arc_make_frame_cache): Likewise.
1597 (arc_pv_get_operand): New function.
1598 (arc_is_in_prologue): Likewise.
1599 (arc_analyze_prologue): Likewise.
1600 (arc_print_frame_cache): Likewise.
1601 (MAX_PROLOGUE_LENGTH): New constant.
1602
eea78757
AK
16032017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
1604
1605 * configure.tgt: Add arc-insn.o.
1606 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
1607 (dump_arc_instruction_command): New function.
1608 (arc_fprintf_disasm): Likewise.
1609 (arc_disassemble_info): Likewise.
1610 (arc_insn_get_operand_value): Likewise.
1611 (arc_insn_get_operand_value_signed): Likewise.
1612 (arc_insn_get_memory_base_reg): Likewise.
1613 (arc_insn_get_memory_offset): Likewise.
1614 (arc_insn_get_branch_target): Likewise.
1615 (arc_insn_dump): Likewise.
1616 (arc_insn_get_linear_next_pc): Likewise.
1617 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
1618 (arc_disassemble_info): Likewise.
1619 (arc_insn_get_branch_target): Likewise.
1620 (arc_insn_get_linear_next_pc): Likewise.
1621 * NEWS: Mention new "maint print arc arc-instruction".
1622
3be78afd
AK
16232017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
1624
1625 * arc-tdep (maintenance_print_arc_list): New variable.
1626 (maintenance_print_arc_command): New function.
1627
296ec4fa
AK
16282017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
1629
1630 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
1631 Add "limm" and "reserved".
1632 (arc_cannot_fetch_register, arc_cannot_store_register): Add
1633 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
1634 * arc-tdep.h (arc_regnum): Likewise.
1635
f74f865e
MF
16362017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1637
1638 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
1639 for THREADPTR register.
1640 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
1641 register.
1642 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
1643 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
1644 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
1645
0d0bf81a
MF
16462017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1647
1648 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
1649 registers above gdbarch_num_regs (gdbarch) as privileged in
1650 call0 ABI.
1651
0ce4291e
MF
16522017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1653
1654 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
1655 for a single specified register or for all registers in
1656 a0_base..a0_base + C0_NREGS range.
1657 (supply_gregset_reg): Call regcache_raw_supply for a single
1658 specified register or for all registers in a0_base..a0_base +
1659 C0_NREGS range.
1660
c56054f9
MF
16612017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1662
1663 * arch/xtensa.h (C0_NREGS): Add definition.
1664 * xtensa-tdep.c (C0_NREGS): Remove definition.
1665
a4398628
MF
16662017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1667
1668 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
1669 Drop xtensa_default_isa initialization.
1670 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
1671
8c43009f
PA
16722017-03-27 Pedro Alves <palves@redhat.com>
1673
1674 * dwarf2read.c (file_entry) <dir_index>: Add comment.
1675 (file_entry::include_dir): New method.
1676 (line_header::include_dir_at, line_header::file_name_at): New
1677 methods.
1678 (setup_type_unit_groups, setup_type_unit_groups)
1679 (psymtab_include_file_name): Simplify using the new methods.
1680 (lnp_state_machine) <the_line_header>: New field.
1681 <file>: Add comment.
1682 (lnp_state_machine::current_file): New method.
1683 (dwarf_record_line): Simplify using the new methods.
1684 (init_lnp_state_machine): Initialize the "the_line_header" field.
1685 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
1686 Simplify using the new methods.
1687
a7e80b9e
PA
16882017-03-27 Pedro Alves <palves@redhat.com>
1689
1690 * cp-name-parser.y (make_empty): Delete.
1691 (demangler_special, nested_name, ptr_operator, array_indicator)
1692 (direct_declarator, declarator_1): Use fill_comp instead of
1693 make_empty.
1694
21047726
PA
16952017-03-27 Pedro Alves <palves@redhat.com>
1696
1697 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
1698 to ATTRIBUTE_PRINTF.
1699 * solib-target.c (library_list_start_list): Print "string" not
1700 "version".
1701 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
1702 gdb_xml_error call.
1703
d721ba37
PA
17042017-03-27 Pedro Alves <palves@redhat.com>
1705
1706 * dwarf2read.c (struct file_and_directory): New.
1707 (dwarf2_get_dwz_file): Adjust to use std::string.
1708 (dw2_get_file_names_reader): Adjust to use file_and_directory.
1709 (find_file_and_directory): Adjust to return a file_and_directory
1710 object.
1711 (read_file_scope): Adjust to use file_and_directory. Remove
1712 make_cleanup/do_cleanups calls.
1713 (open_and_init_dwp_file): Adjust to use std::string. Remove
1714 make_cleanup/do_cleanups calls.
1715 * python/python.c (do_start_initialization): Adjust to ldirname
1716 returning a std::string.
1717 * utils.c (ldirname): Now returns a std::string.
1718 * utils.h (ldirname): Change return type to std::string.
1719 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
1720 returning a std::string.
1721 * xml-tdesc.c (file_read_description_xml): Likewise.
1722
ed771251
AH
17232017-03-24 Alan Hayward <alan.hayward@arm.com>
1724
1725 * regcache.c (regcache_debug_print_register): New function.
1726 * regcache.h (regcache_debug_print_register): New declaration.
1727 * target.c (debug_print_register): Remove.
1728 (target_fetch_registers): Call regcache_debug_print_register.
1729 (target_store_registers): Likewise.
1730
568c1b9f
PB
17312017-03-24 Pádraig Brady <pbrady@fb.com>
1732
1733 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
1734 reference beyond the 'lh->include_dirs' array before accessing to
1735 it.
1736 (psymtab_include_file_name): Likewise.
1737 (dwarf_decode_lines_1): Likewise.
1738 (dwarf_decode_lines): Likewise.
1739 (file_file_name): Likewise.
1740
3e00d44f
SM
17412017-03-23 Simon Marchi <simon.marchi@ericsson.com>
1742
1743 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
1744 inferior_ptid.
1745 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
1746 ps_lsetfpregs): Likewise.
1747 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
1748 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
1749 ps_lsetfpregs): Likewise.
1750 * target.c (target_fetch_registers, target_store_registers):
1751 Remove asserts.
1752
077ae656
AH
17532017-03-23 Alan Hayward <alan.hayward@arm.com>
1754
1755 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
1756
1e2b521d
YQ
17572017-03-23 Yao Qi <yao.qi@linaro.org>
1758
1759 * aarch64-tdep.c (aarch64_process_record_test): Declare.
1760 (_initialize_aarch64_tdep): Register it.
1761 (aarch64_record_load_store): Handle PRFM instruction.
1762 (aarch64_process_record_test): New function.
1763
33877125
YQ
17642017-03-23 Yao Qi <yao.qi@linaro.org>
1765
1766 * aarch64-tdep.c (aarch64_record_load_store): Fix code
1767 indentation.
1768
a0eef940
YQ
17692017-03-23 Yao Qi <yao.qi@linaro.org>
1770
1771 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
1772
3f2a3564
PR
17732017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1774
1775 python/python.c (do_start_initialization): Fix memory leak.
1776
b67aeab0
SM
17772017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
1778
1779 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
1780 using get_ptrace_pid.
1781 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
1782 inferior_ptid.
1783 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
1784 inferior_ptid instead of pid.
1785
ffdbe864
YQ
17862017-03-22 Yao Qi <yao.qi@linaro.org>
1787
1788 * aarch64-tdep.c: Wrap locally used classes in anonymous
1789 namespace.
1790 * arm-tdep.c: Likewise.
1791 * linespec.c: Likewise.
1792 * ui-out.c: Likewise.
1793
9d736fbf
JG
17942017-03-22 Jonah Graham <jonah@kichwacoders.com>
1795
1796 PR gdb/19637
1797 * python/lib/gdb/printer/bound_registers.py: Import sys.
1798
3de88e9a
SM
17992017-03-21 Simon Marchi <simon.marchi@ericsson.com>
1800
1801 * windows-nat.c (do_windows_fetch_inferior_registers): Add
1802 windows_thread_info parameter and use it instead of
1803 current_thread.
1804 (windows_fetch_inferior_registers): Don't set current_thread,
1805 pass the thread to do_windows_fetch_inferior_registers. Use
1806 ptid from regcache instead of inferior_ptid.
1807 (do_windows_store_inferior_registers): Add windows_thread_info
1808 parameter and use it instead of current_thread.
1809 (windows_store_inferior_registers): Don't set current_thread,
1810 pass the thread to do_windows_store_inferior_registers. Use
1811 ptid from regcache instead of inferior_ptid.
1812
0e7b8f61
SM
18132017-03-21 Simon Marchi <simon.marchi@ericsson.com>
1814
1815 * ser-mingw.c (ser_windows_raw): Remove reference to
1816 struct serial::current_timeout.
1817
5badf10a
IR
18182017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
1819
1820 PR tdep/20928
1821 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
1822 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
1823 (sparc64_fsr_type): Fix %fsr decoding.
1824
cee59b3f
TW
18252017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
1826
1827 * python/py-record-btrace.c (btpy_insn_data): Change return type
1828 for Python 2.
1829
639a9038
SM
18302017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
1831
1832 * spu-linux-nat.c (spu_fetch_inferior_registers,
1833 spu_store_inferior_registers): Use ptid from regcache, set and
1834 restore inferior_ptid.
1835 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
1836 Likewise.
1837
bcc0c096
SM
18382017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
1839
1840 * i386-linux-nat.c (fetch_register, store_register,
1841 i386_linux_fetch_inferior_registers,
1842 i386_linux_store_inferior_registers): Use ptid from regcache.
1843 * ia64-linux-nat.c (ia64_linux_fetch_register,
1844 ia64_linux_store_register): Likewise.
1845 * inf-ptrace.c (inf_ptrace_fetch_register,
1846 inf_ptrace_store_register): Likewise.
1847 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
1848 m32r_linux_store_inferior_registers): Likewise.
1849 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
1850 m68kbsd_store_inferior_registers): Likewise.
1851 * m68k-linux-nat.c (fetch_register, store_register,
1852 m68k_linux_fetch_inferior_registers,
1853 m68k_linux_store_inferior_registers): Likewise.
1854 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
1855 m88kbsd_store_inferior_registers): Likewise.
1856 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
1857 mips_fbsd_store_inferior_registers): Likewise.
1858 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
1859 mips64_linux_regsets_store_registers): Likewise.
1860 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
1861 mipsnbsd_store_inferior_registers): Likewise.
1862 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
1863 mips64obsd_store_inferior_registers): Likewise.
1864 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
1865 Likewise.
1866 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
1867 ppcfbsd_store_inferior_registers): Likewise.
1868 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
1869 ppc_linux_store_inferior_registers): Likewise.
1870 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
1871 ppcnbsd_store_inferior_registers): Likewise.
1872 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
1873 ppcobsd_store_registers): Likewise.
1874 * procfs.c (procfs_fetch_registers, procfs_store_registers):
1875 Likewise.
1876 * ravenscar-thread.c (ravenscar_fetch_registers,
1877 ravenscar_store_registers, ravenscar_prepare_to_store):
1878 Likewise.
1879 * record-btrace.c (record_btrace_fetch_registers,
1880 record_btrace_store_registers, record_btrace_prepare_to_store):
1881 Likewise.
1882 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
1883 Lookup inferior using ptid from regcache, instead of
1884 current_inferior.
1885 * remote.c (remote_fetch_registers, remote_store_registers): Use
1886 ptid from regcache.
1887 * rs6000-nat.c (fetch_register, store_register): Likewise.
1888 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
1889 s390_linux_store_inferior_registers): Likewise.
1890 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
1891 shnbsd_store_inferior_registers): Likewise.
1892 * sol-thread.c (sol_thread_fetch_registers,
1893 sol_thread_store_registers): Likewise.
1894 * sparc-nat.c (sparc_fetch_inferior_registers,
1895 sparc_store_inferior_registers): Likewise.
1896 * tilegx-linux-nat.c (fetch_inferior_registers,
1897 store_inferior_registers): Likewise.
1898 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
1899 vaxbsd_store_inferior_registers): Likewise.
1900 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
1901 store_xtregs): Likewise.
1902
c0f55cc6
AV
19032017-03-20 Artemiy Volkov <artemiyv@acm.org>
1904
1905 PR gdb/14441
1906 * NEWS: Mention support for rvalue references in GDB and python.
1907 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
1908 supports both lvalue and rvalue references.
1909
15c0a2a9
AV
19102017-03-20 Artemiy Volkov <artemiyv@acm.org>
1911
1912 PR gdb/14441
1913 * gdbtypes.c (rank_one_type): Implement overloading
1914 resolution rules regarding rvalue references.
1915
aa006118
AV
19162017-03-20 Artemiy Volkov <artemiyv@acm.org>
1917
1918 PR gdb/14441
1919 * aarch64-tdep.c (aarch64_type_align)
1920 (aarch64_extract_return_value, aarch64_store_return_value): Change
1921 lvalue reference type checks to general reference type checks.
1922 * amd64-tdep.c (amd64_classify): Likewise.
1923 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
1924 Likewise.
1925 * arm-tdep.c (arm_type_align, arm_extract_return_value)
1926 (arm_store_return_value): Likewise.
1927 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
1928 * c-typeprint.c (c_print_type): Likewise.
1929 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
1930 (cplus_number_of_children, cplus_describe_child): Likewise.
1931 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1932 * completer.c (expression_completer): Likewise.
1933 * cp-support.c (make_symbol_overload_list_adl_namespace):
1934 Likewise.
1935 * darwin-nat-info.c (info_mach_region_command): Likewise.
1936 * dwarf2loc.c (entry_data_value_coerce_ref)
1937 (value_of_dwarf_reg_entry): Likewise.
1938 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
1939 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
1940 Likewise.
1941 * findvar.c (extract_typed_address, store_typed_address):
1942 Likewise.
1943 * gdbtypes.c (rank_one_type): Likewise.
1944 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
1945 * infcall.c (value_arg_coerce): Likewise.
1946 * language.c (pointer_type): Likewise.
1947 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
1948 Likewise.
1949 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
1950 * mn10300-tdep.c (mn10300_type_align): Likewise.
1951 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1952 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
1953 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
1954 Likewise.
1955 * printcmd.c (print_formatted, x_command): Likewise.
1956 * python/py-type.c (typy_get_composite, typy_template_argument):
1957 Likewise.
1958 * python/py-value.c (valpy_referenced_value)
1959 (valpy_get_dynamic_type, value_has_field): Likewise.
1960 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
1961 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
1962 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
1963 * spu-tdep.c (spu_scalar_value_p): Likewise.
1964 * symtab.c (lookup_symbol_aux): Likewise.
1965 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
1966 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
1967 Likewise.
1968 * valops.c (value_cast_pointers, value_cast)
1969 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
1970 (value_struct_elt, value_struct_elt_bitpos)
1971 (value_find_oload_method_list, find_overload_match)
1972 (value_rtti_indirect_type): Likewise.
1973 * valprint.c (val_print_scalar_type_p, generic_val_print):
1974 Likewise.
1975 * value.c (value_actual_type, value_as_address, unpack_long)
1976 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
1977 (coerce_ref): Likewise.
1978 * varobj.c (varobj_get_value_type): Likewise.
1979
3fcf899d
AV
19802017-03-20 Artemiy Volkov <artemiyv@acm.org>
1981
1982 PR gdb/14441
1983 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
1984 table of constants.
1985 * python/lib/gdb/command/explore.py: Support exploring values
1986 of rvalue reference types.
1987 * python/lib/gdb/types.py: Implement get_basic_type() for
1988 rvalue reference types.
1989 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
1990 constant.
1991 * python/py-value.c (valpy_getitem): Add an rvalue reference
1992 check.
1993 (valpy_reference_value): Add new parameter "refcode".
1994 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
1995 New wrappers for valpy_reference_value().
1996 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
1997 (gdbpy_invoke_xmethod): Likewise.
1998
4297a3f0
AV
19992017-03-20 Artemiy Volkov <artemiyv@acm.org>
2000
2001 PR gdb/14441
2002 * dwarf2read.c (process_die, read_type_die_1): Handle the
2003 DW_TAG_rvalue_reference_type DIE.
2004 (read_tag_reference_type): Add new parameter "refcode".
2005
e1cb3213
AV
20062017-03-20 Artemiy Volkov <artemiyv@acm.org>
2007
2008 PR gdb/14441
2009 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
2010 (c_type_print_modifier, c_type_print_varspec_suffix)
2011 (c_type_print_base): Support printing rvalue reference types.
2012 * c-valprint.c (c_val_print, c_value_print): Support printing
2013 rvalue reference values.
2014
e4347c89
AV
20152017-03-20 Artemiy Volkov <artemiyv@acm.org>
2016
2017 PR gdb/14441
2018 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
2019 typename.
2020 * cp-support.c (replace_typedefs): Handle
2021 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
2022 * python/py-type.c (typy_lookup_type): Likewise.
2023
53cc15f5
AV
20242017-03-20 Artemiy Volkov <artemiyv@acm.org>
2025
2026 PR gdb/14441
2027 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
2028 * parse.c (insert_type): Change assert statement.
2029 (follow_types): Handle rvalue reference types.
2030 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
2031 constant.
2032
a65cfae5
AV
20332017-03-20 Artemiy Volkov <artemiyv@acm.org>
2034
2035 PR gdb/14441
2036 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
2037 value_ref() interface.
2038 * c-valprint.c (c_value_print): Likewise.
2039 * infcall.c (value_arg_coerce): Likewise.
2040 * python/py-value.c (valpy_reference_value): Likewise.
2041 * valops.c (value_cast, value_reinterpret_cast)
2042 (value_dynamic_cast, typecmp): Likewise.
2043 (value_ref): Parameterize by kind of return value reference type.
2044 * value.h (value_ref): Add new parameter "refcode".
2045
3b224330
AV
20462017-03-20 Artemiy Volkov <artemiyv@acm.org>
2047
2048 PR gdb/14441
2049 * dwarf2read.c (read_tag_reference_type): Use
2050 lookup_lvalue_reference_type() instead of lookup_reference_type().
2051 * eval.c (evaluate_subexp_standard): Likewise.
2052 * f-exp.y: Likewise.
2053 * gdbtypes.c (make_reference_type, lookup_reference_type):
2054 Generalize with rvalue reference types.
2055 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
2056 convenience wrappers for lookup_reference_type().
2057 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
2058 reference kind parameter.
2059 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
2060 wrappers for lookup_reference_type().
2061 * guile/scm-type.c (gdbscm_type_reference): Use
2062 lookup_lvalue_reference_type() instead of lookup_reference_type().
2063 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
2064 * parse.c (follow_types): Likewise.
2065 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
2066 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
2067 Likewise.
2068 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
2069 (gdbpy_invoke_xmethod): Likewise.
2070 * stabsread.c: Provide extra argument to make_reference_type()
2071 call.
2072 * valops.c (value_ref, value_rtti_indirect_type): Use
2073 lookup_lvalue_reference_type() instead of lookup_reference_type().
2074
f9aeb8d4
AV
20752017-03-20 Artemiy Volkov <artemiyv@acm.org>
2076
2077 PR gdb/14441
2078 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
2079 (TYPE_IS_REFERENCE): New macro.
2080 (struct type): Add rvalue_reference_type field.
2081 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
2082
51457a05
MAL
20832017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2084
2085 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
2086 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
2087 New function definition.
2088 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
2089 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
2090 New function declaration.
2091 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
2092 * mi/mi-interp.h: New file.
2093 * solib.c (info_sharedlibrary_command): Replace for loop with
2094 ALL_SO_LIBS macro
2095 * solib.h (update_solib_list): New function declaration.
2096 (so_list_head): Move macro.
2097 * solist.h (ALL_SO_LIBS): New macro.
2098
e696b3ad
MAL
20992017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2100
2101 * infcmd.c (post_create_inferior): Remove unused argument in
2102 call to solib_add.
2103 * remote.c (remote_start_remote): Likewise.
2104 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
2105 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
2106 (enable_break): Likewise.
2107 * solib.c (update_solib_list): Remove unused target argument
2108 and its documentation.
2109 (solib_add): Remove unused target argument. Remove unused
2110 argument in call to update_solib_list.
2111 (info_sharedlibrary_command): Remove unused argument in call
2112 to update_solib_list.
2113 (sharedlibrary_command): Remove unused argument in call to
2114 solib_add.
2115 (handle_solib_event): Likewise.
2116 (reload_shared_libraries): Likewise.
2117 * solib.h (solib_add): Remove unused target argument.
2118
dcb84eda
AA
21192017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
2120
2121 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
2122 (s390_displaced_step_fixup): Cover relative branches with the
2123 default fixup handling. This fixes lack of support for some
2124 relative branch instructions.
2125
d9cb6cdc
SM
21262017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2127
2128 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
2129 ptid from regcache.
2130
1afaf9f4
SM
21312017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2132
2133 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
2134 i386_darwin_store_inferior_registers): Use ptid from regcache.
2135
aac12e24
SM
21362017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2137
2138 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
2139 i386bsd_store_inferior_registers): Use ptid from regcache.
2140
bbe1eef1
SM
21412017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2142
2143 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
2144 hppaobsd_store_registers): Use ptid from regcache.
2145
10799020
SM
21462017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2147
2148 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
2149 hppanbsd_store_registers): Use ptid from regcache.
2150
00204cf7
SM
21512017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2152
2153 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
2154 from regcache. Use get_ptrace_pid.
2155
11a33714
SM
21562017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2157
2158 * corelow.c (get_core_register_section): Use ptid from regcache,
2159 update doc.
2160
317cd492
SM
21612017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2162
2163 * bsd-uthread.c (bsd_uthread_fetch_registers,
2164 bsd_uthread_store_registers): Use ptid from regcache, set and
2165 restore inferior_ptid.
2166
9ac8a7c2
SM
21672017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2168
2169 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
2170 fetch_fp_regs, store_register, store_regs, store_fp_register,
2171 store_fp_regs): Use ptid from regcache.
2172
4ac4bb6a
SM
21732017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
2174
2175 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
2176 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
2177 store_vfp_regs): Use ptid from regcache.
2178
9bcbdca8
PA
21792017-03-17 Pedro Alves <palves@redhat.com>
2180
2181 PR remote/21188
2182 * ser-base.c (ser_base_wait_for): Add comment.
2183 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
2184 version.
2185 * ser-unix.c (hardwire_raw): Remove reference to
2186 scb->current_timeout.
2187 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
2188 (hardwire_ops): Install ser_base_readchar instead of
2189 hardwire_readchar.
2190 * serial.h (struct serial) <current_timeout, timeout_remaining>:
2191 Remove fields.
2192
7503099f
JG
21932017-03-17 Jonah Graham <jonah@kichwacoders.com>
2194
2195 PR gdb/19637
2196 * python/lib/gdb/printer/bound_registers.py: Add support for
2197 Python 3.
2198
7942e96e
AA
21992017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2200
2201 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
2202 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
2203 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
2204 byte_offset to subobj_byte_offset. Fix the handling of
2205 DWARF_VALUE_STACK on big-endian targets when coming via an
2206 implicit pointer.
2207 (dwarf2_evaluate_loc_desc): Adjust call to
2208 dwarf2_evaluate_loc_desc_full.
2209 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
2210 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
2211
ba14f379
YQ
22122017-03-16 Yao Qi <yao.qi@linaro.org>
2213
2214 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
2215 and REVSH instructions.
2216
b121eeb9
YQ
22172017-03-16 Yao Qi <yao.qi@linaro.org>
2218
2219 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
2220 (arm_record_test): Declare.
2221 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
2222 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
2223 align with the manual.
2224 (thumb_record_misc): Adjust the code order to align with the
2225 manual.
2226 (thumb2_record_decode_insn_handler): Fix instruction matching.
2227 (instruction_reader_thumb): New class.
2228 (arm_record_test): New function.
2229
728a7913
YQ
22302017-03-16 Yao Qi <yao.qi@linaro.org>
2231
2232 * arm-tdep.c (abstract_memory_reader): New class.
2233 (instruction_reader): New class.
2234 (extract_arm_insn): Add argument 'reader'. Callers updated.
2235 (decode_insn): Likewise.
2236
34b43320
DE
22372017-03-16 Doug Evans <dje@google.com>
2238
a7c0469f
DE
2239 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
2240 member. Change type of TYPE member to SCM. All uses updated.
2241 (lsscm_make_lazy_string_smob): Add assert.
2242 (lsscm_make_lazy_string): Flag bad length values.
2243 (lsscm_elt_type): New function.
2244 (gdbscm_lazy_string_to_value): Rewrite to use
2245 lsscm_safe_lazy_string_to_value.
2246 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
2247 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
2248 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
2249 in incoming type.
2250 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
2251 * guile/scm-type.c (tyscm_scm_to_type): New function.
2252
22532017-03-15 Doug Evans <dje@google.com>
2254
34b43320
DE
2255 PR python/17728, python/18439, python/18779
2256 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
2257 member. Change type of TYPE member to PyObject *. All uses updated.
2258 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
2259 (gdbpy_create_lazy_string_object): Flag bad length values.
2260 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
2261 Handle typedefs in incoming type.
2262 (stpy_lazy_string_elt_type): New function.
2263 (gdbpy_extract_lazy_string): Call it.
2264 * python/py-value.c (valpy_lazy_string): Flag bad length values.
2265 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
2266 typedefs in incoming type.
2267
a3a5fecc
DE
22682017-03-16 Doug Evans <dje@google.com>
2269
2270 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
2271 * guile/scm-type.c (tyscm_scm_to_type): New function.
2272
28f1c605
JW
22732017-03-16 Jiong Wang <jiong.wang@arm.com>
2274
2275 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
2276 "ULONGEST" for "skip".
2277
87c336f6
AA
22782017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
2279
2280 PR gdb/21220
2281 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
2282 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
2283 (inf_ptrace_peek_poke): ...here. New function. Now also loop
2284 over ptrace peek/poke until end of buffer or error.
2285
cf81cf60
SM
22862017-03-14 Simon Marchi <simon.marchi@ericsson.com>
2287
2288 * parse.c (length_of_subexp): Make static.
2289 * parser-defs.h (length_of_subexp): Remove.
2290
a379284a
AA
22912017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
2292
2293 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
2294 as well.
2295
8a6200ba
PA
22962017-03-14 Pedro Alves <palves@redhat.com>
2297
2298 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
2299 (main): Use std::unique_ptr. Remove calls to
2300 cp_demangled_name_parse_free.
2301
f79ec206
SM
23022017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2303
2304 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
2305 alphabsd_store_inferior_registers): Use regcache->ptid instead
2306 of inferior_ptid.
2307
edb5fb00
SM
23082017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2309
2310 * aix-thread.c (aix_thread_fetch_registers,
2311 aix_thread_store_registers): Use regcache->ptid instead of
2312 inferior_ptid.
2313
55119686
SM
23142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2315
2316 * aarch64-linux-nat.c (fetch_gregs_from_thread,
2317 store_gregs_to_thread, fetch_fpregs_from_thread,
2318 store_fpregs_to_thread): Use regcache->ptid instead of
2319 inferior_ptid.
2320
6a06fbb7
SM
23212017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2322
2323 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
2324 amd64_linux_fetch_inferior_registers): Use regcache->ptid
2325 instead of inferior_ptid.
2326
c6386875
SM
23272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2328
2329 * target.c (target_fetch_registers, target_store_registers): Add
2330 assert.
2331
ddaaf0fb
SM
23322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2333
2334 * regcache.h (regcache_get_ptid): New function.
2335 * regcache.c (regcache_get_ptid): New function.
2336
b9da89d1 23372017-03-13 Mark Wielaard <mark@klomp.org>
2338
2339 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
2340
5f4d1085
KS
23412017-03-10 Keith Seitz <keiths@redhat.com>
2342
2343 PR c++/8218
2344 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
2345
c65d6b55
PA
23462017-03-08 Pedro Alves <palves@redhat.com>
2347
2348 PR gdb/18360
2349 * infrun.c (start_step_over, do_target_resume, resume)
2350 (restart_threads): Assert we're not resuming a thread that is
2351 meant to be stopped.
2352 (infrun_thread_stop_requested_callback): Delete.
2353 (infrun_thread_stop_requested): If the thread is internally
2354 stopped, queue a pending stop event and clear the thread's
2355 inline-frame state.
2356 (handle_stop_requested): New function.
2357 (handle_syscall_event, handle_inferior_event_1): Use
2358 handle_stop_requested.
2359 (handle_stop_requested): New function.
2360 (handle_signal_stop): Set the thread's stop_signal here instead of
2361 at caller.
2362 (finish_step_over): Clear step over info unconditionally.
2363 (handle_signal_stop): If the user had interrupted the event
2364 thread, consider the stop a random signal.
2365 (handle_signal_stop) <signal arrived while stepping over
2366 breakpoint>: Don't restart threads here.
2367 (stop_waiting): Don't clear step-over info here.
2368
15c22686
PA
23692017-03-08 Pedro Alves <palves@redhat.com>
2370
2371 PR 21206
2372 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
2373 goes to argument 2, not 1.
2374
6e5d74e7
PA
23752017-03-08 Pedro Alves <palves@redhat.com>
2376
2377 PR cli/21218
2378 * top.c (gdb_readline_wrapper): Avoid passing NULL to
2379 display_gdb_prompt.
2380 (command_line_input): Add comment.
2381
9753a2f6
PA
23822017-03-08 Pedro Alves <palves@redhat.com>
2383
2384 PR tui/21216
2385 * tui/tui-file.c (tui_file::write): New.
2386 * tui/tui-file.h (tui_file): Override "write".
2387 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
2388 factored out from ...
2389 (tui_puts): ... here.
2390 (tui_putc): Use them.
2391 (tui_write): New function.
2392 * tui/tui-io.h (tui_write): Declare.
2393
1672e0d9
SDJ
23942017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2395
2396 * Makefile.in (SFILES): Replace "environ.c" with
2397 "common/environ.c".
2398 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
2399 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
2400 to...
2401 * common/environ.c: ... here.
2402 * environ.h: Moved to...
2403 * common/environ.h: ... here.
2404
f7bb4e3a
PB
24052017-03-07 Peter Bergner <bergner@vnet.ibm.com>
2406
2407 * gdbarch.sh (pstring_ptr): New static function.
2408 (gdbarch_disassembler_options): Use it.
2409 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
2410 not valid_disassembler_option->name.
2411 * gdbarch.c: Regenerate.
2412
e45ced6c
PB
24132017-03-07 Peter Bergner <bergner@vnet.ibm.com>
2414
2415 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
2416
5f6fd321
PA
24172017-03-07 Pedro Alves <palves@redhat.com>
2418
2419 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
2420
6dbb839a 24212017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
2422
2423 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
2424 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
2425 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 2426 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 2427
d274ecf4
SM
24282017-03-06 Simon Marchi <simon.marchi@ericsson.com>
2429
2430 * xtensa-linux-nat.c (fetch_gregs): Remove const.
2431
df97be55
SM
24322017-03-03 Simon Marchi <simon.marchi@ericsson.com>
2433
2434 * remote.c (remote_add_target_side_commands): Use range-based
2435 for loop.
2436
7d45f3df
YQ
24372017-03-03 Yao Qi <yao.qi@linaro.org>
2438
2439 PR gdb/21165
2440 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
2441 value is lazy.
2442 * valprint.c (common_val_print): Likewise.
2443
65b48a81
PB
24442017-02-28 Peter Bergner <bergner@vnet.ibm.com>
2445
2446 * NEWS: Mention new set/show disassembler-options commands.
2447 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
2448 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
2449 (prospective_options): New static variable.
2450 (gdb_disassembler::gdb_disassembler): Initialize
2451 m_di.disassembler_options.
2452 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
2453 (get_disassembler_options): New function.
2454 (set_disassembler_options): Likewise.
2455 (set_disassembler_options_sfunc): Likewise.
2456 (show_disassembler_options_sfunc): Likewise.
2457 (disassembler_options_completer): Likewise.
2458 (_initialize_disasm): Likewise.
2459 * disasm.h (get_disassembler_options): New prototype.
2460 (set_disassembler_options): Likewise.
2461 * gdbarch.sh (gdbarch_disassembler_options): New variable.
2462 (gdbarch_verify_disassembler_options): Likewise.
2463 * gdbarch.c: Regenerate.
2464 * gdbarch.h: Likewise.
2465 * arm-tdep.c (num_disassembly_options): Delete.
2466 (set_disassembly_style): Likewise.
2467 (arm_disassembler_options): New static variable.
2468 (set_disassembly_style_sfunc): Convert short style name into long
2469 option name. Call set_disassembler_options.
2470 (show_disassembly_style_sfunc): New function.
2471 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
2472 set_gdbarch_verify_disassembler_options.
2473 (_initialize_arm_tdep): Delete regnames variable and update callers.
2474 (arm_disassembler_options): Initialize.
2475 (disasm_options): New variable.
2476 (num_disassembly_options): Rename from this...
2477 (num_disassembly_styles): ...to this. Compute by scanning through
2478 disasm_options.
2479 (valid_disassembly_styles): Initialize using disasm_options.
2480 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
2481 set_arm_regname_option.
2482 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
2483 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
2484 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
2485 set_gdbarch_verify_disassembler_options.
2486 * s390-tdep.c (s390_disassembler_options): New static variable.
2487 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
2488 set_gdbarch_verify_disassembler_options.
2489
d538e36d
SM
24902017-02-27 Simon Marchi <simon.marchi@ericsson.com>
2491
2492 * remote.c (remote_add_target_side_condition): Remove "struct"
2493 keyword from range-based for loop.
2494
83621223
SM
24952017-02-27 Simon Marchi <simon.marchi@ericsson.com>
2496
2497 * remote.c (remote_add_target_side_condition): Use range-based
2498 for loop. Update comment.
2499
2123df0e
YQ
25002017-02-27 Yao Qi <yao.qi@linaro.org>
2501
2502 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
2503
8e368124
AH
25042017-02-26 Alan Hayward <alan.hayward@arm.com>
2505
2506 * regcache.c (regcache_raw_update): New function.
2507 (regcache_raw_read): Move code to regcache_raw_update.
2508 * regcache.h (regcache_raw_update): New declaration.
2509 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
2510
a49dd8dd
JK
25112017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
2512
2513 * dwarf2read.c (create_debug_type_hash_table): Initialize
2514 header.signature and header.type_offset_in_tu.
2515
34e4bae9
PA
25162017-02-24 Pedro Alves <palves@redhat.com>
2517
2518 * symtab.c (make_file_symbol_completion_list_1): Use
2519 add_symtab_completions.
2520
b0e4b369
AH
25212017-02-24 Alan Hayward <alan.hayward@arm.com>
2522
2523 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
2524
975c21ab
AH
25252017-02-24 Alan Hayward <alan.hayward@arm.com>
2526
2527 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
2528 I386_MAX_REGISTER_SIZE.
2529 (i386_pseudo_register_write): Likewise.
2530 (i386_process_record): Likewise.
2531 * i387-tdep.c (i387_supply_xsave): Likewise.
2532 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
2533 (store_register): Likewise.
2534
14bc53a8
PA
25352017-02-23 Pedro Alves <palves@redhat.com>
2536
2537 * ada-lang.c: Include "common/function-view.h".
2538 (ada_iterate_over_symbols): Adjust to use function_view as
2539 callback type.
2540 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
2541 (ada_make_symbol_completion_list): Use a lambda.
2542 (ada_exc_search_name_matches): Delete.
2543 (name_matches_regex): New.
2544 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
2545 * compile/compile-c-support.c: Include "common/function-view.h".
2546 (print_one_macro): Change prototype to accept a ui_file pointer.
2547 (write_macro_definitions): Use a lambda.
2548 * dwarf2read.c: Include "common/function-view.h".
2549 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
2550 (dw2_expand_symtabs_matching): Adjust to use function_view as
2551 callback type.
2552 * language.h: Include "common/function-view.h".
2553 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
2554 function_view as callback type.
2555 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
2556 * linespec.c: Include "common/function-view.h".
2557 (collect_info::add_symbol): New method.
2558 (struct symbol_and_data_callback, iterate_inline_only, struct
2559 symbol_matcher_data, iterate_name_matcher): Delete.
2560 (iterate_over_all_matching_symtabs): Adjust to use function_view
2561 as callback type and lambdas.
2562 (iterate_over_file_blocks): Adjust to use function_view as
2563 callback type.
2564 (decode_compound_collector): Now a class with private fields.
2565 (decode_compound_collector::release_symbols): New method.
2566 (collect_one_symbol): Rename to...
2567 (decode_compound_collector::operator()): ... this and adjust.
2568 (lookup_prefix_sym): decode_compound_collector construction bits
2569 move to decode_compound_collector ctor. Pass the
2570 decode_compound_collector object directly as callback. Remove
2571 cleanups and use decode_compound_collector::release_symbols
2572 instead.
2573 (symtab_collector): Now a class with private fields.
2574 (symtab_collector::release_symtabs): New method.
2575 (add_symtabs_to_list): Rename to...
2576 (symtab_collector::operator()): ... this and adjust.
2577 (collect_symtabs_from_filename): symtab_collector construction
2578 bits move to symtab_collector ctor. Pass the symtab_collector
2579 object directly as callback. Remove cleanups and use
2580 symtab_collector::release_symtabs instead.
2581 (collect_symbols): Delete.
2582 (add_matching_symbols_to_info): Use lambdas.
2583 * macrocmd.c (print_macro_callback): Delete.
2584 (info_macro_command): Use a lambda.
2585 (info_macros_command): Pass print_macro_definition as callable
2586 directly.
2587 (print_one_macro): Remove 'ignore' parameter.
2588 (macro_list_command): Adjust.
2589 * macrotab.c (macro_for_each_data::fn): Now a function_view.
2590 (macro_for_each_data::user_data): Delete field.
2591 (foreach_macro): Adjust to call the function_view.
2592 (macro_for_each): Adjust to use function_view as callback type.
2593 (foreach_macro_in_scope): Adjust to call the function_view.
2594 (macro_for_each_in_scope): Adjust to use function_view as callback
2595 type.
2596 * macrotab.h: Include "common/function-view.h".
2597 (macro_callback_fn): Declare a prototype instead of a pointer.
2598 Remove "user_data" parameter.
2599 (macro_for_each, macro_for_each_in_scope): Adjust to use
2600 function_view as callback type.
2601 * psymtab.c (partial_map_expand_apply)
2602 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
2603 Adjust to use function_view as callback type and to return bool.
2604 (psym_expand_symtabs_matching): Adjust to use function_view as
2605 callback types.
2606 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
2607 to use function_view as callback type and to return bool.
2608 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
2609 callback types.
2610 * symfile.c (expand_symtabs_matching): Adjust to use function_view
2611 as callback types.
2612 * symfile.h: Include "common/function-view.h".
2613 (expand_symtabs_file_matcher_ftype)
2614 (expand_symtabs_symbol_matcher_ftype)
2615 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
2616 return bool.
2617 (quick_symbol_functions::map_symtabs_matching_filename)
2618 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
2619 function_view as callback type and return bool.
2620 (expand_symtabs_matching): Adjust to use function_view as callback
2621 type.
2622 (maintenance_expand_name_matcher)
2623 (maintenance_expand_file_matcher): Delete.
2624 (maintenance_expand_symtabs): Use lambdas.
2625 * symtab.c (iterate_over_some_symtabs): Adjust to use
2626 function_view as callback types and return bool.
2627 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
2628 of a cleanup.
2629 (lookup_symtab_callback): Delete.
2630 (lookup_symtab): Use a lambda.
2631 (iterate_over_symbols): Adjust to use function_view as callback
2632 type.
2633 (struct search_symbols_data, search_symbols_file_matches)
2634 (search_symbols_name_matches): Delete.
2635 (search_symbols): Use a pair of lambdas.
2636 (struct add_name_data, add_macro_name, symbol_completion_matcher)
2637 (symtab_expansion_callback): Delete.
2638 (default_make_symbol_completion_list_break_on_1): Use lambdas.
2639 * symtab.h: Include "common/function-view.h".
2640 (iterate_over_some_symtabs): Adjust to use function_view as
2641 callback type and return bool.
2642 (iterate_over_symtabs): Adjust to use function_view as callback
2643 type.
2644 (symbol_found_callback_ftype): Remove 'data' parameter and return
2645 bool.
2646 (iterate_over_symbols): Adjust to use function_view as callback
2647 type.
2648
07e253aa
PA
26492017-02-23 Pedro Alves <palves@redhat.com>
2650
2651 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
2652 (%.o) <unittests/%.c>: New pattern.
2653 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
2654 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
2655 * common/function-view.h: New file.
2656 * unittests/function-view-selftests.c: New file.
2657 * configure: Regenerate.
2658
8eaf5320
SM
26592017-02-23 Simon Marchi <simon.marchi@ericsson.com>
2660
2661 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
2662 inferior_ptid.
2663 * go32-nat.c (go32_thread_alive): Likewise.
2664
38768751
YQ
26652017-02-23 Yao Qi <yao.qi@linaro.org>
2666
2667 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
2668 delete.
2669
0a8beaba
YQ
26702017-02-23 Yao Qi <yao.qi@linaro.org>
2671
2672 * varobj.c (varobj_clear_saved_item): Use delete instead of
2673 xfree.
2674 (update_dynamic_varobj_children): Likewise.
2675
58fdfd2c
JK
26762017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2677
2678 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
2679
1b90b139
SM
26802017-02-21 Simon Marchi <simon.marchi@ericsson.com>
2681
2682 * common/enum-flags.h (enum_flags::enum_flags): Initialize
2683 m_enum_value to 0 in default constructor.
2684
2039d74e
EBM
26852017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2686
2687 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
2688 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
2689 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
2690 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
2691 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
2692 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
2693 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
2694 IS_STORE_CONDITIONAL_INSN.
2695
7814882a
JK
26962017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2697
2698 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
2699
0ae60b63
JK
27002017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2701
2702 * NEWS (Changes since GDB 7.12): Add DWARF-5.
2703
0224619f
JK
27042017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2705
2706 * dwarf2read.c (skip_one_die, read_attribute_value)
2707 (dwarf2_const_value_attr, dump_die_shallow)
2708 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2709 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
2710
0af92d60
JK
27112017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2712
2713 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
2714 (dwarf_parse_macro_header): Accept DWARF version 5.
2715 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
2716
216f72a1
JK
27172017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2718
2719 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
2720 DW_AT_GNU_*.
2721 * common/common-exceptions.h (enum errors): Likewise.
2722 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
2723 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
2724 (dwarf_expr_context::execute_stack_op): Likewise.
2725 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
2726 Likewise.
2727 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
2728 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
2729 (show_entry_values_debug, call_site_to_target_addr)
2730 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
2731 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
2732 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
2733 (value_of_dwarf_block_entry, indirect_pieced_value)
2734 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
2735 (disassemble_dwarf_expression): Likewise.
2736 * dwarf2read.c (process_die, inherit_abstract_dies)
2737 (read_call_site_scope): Likewise.
2738 * gdbtypes.h (struct func_type, struct call_site_parameter)
2739 (struct call_site): Likewise.
2740 * stack.c (read_frame_arg): Likewise.
2741 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
2742
43988095
JK
27432017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2744
2745 * defs.h (read_unsigned_leb128): New declaration.
2746 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
2747 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
2748 (dwarf2_find_location_expression): Call also
2749 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
2750 * dwarf2loc.h (dwarf2_version): New declaration.
2751 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
2752 rnglists.
2753 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
2754 .debug_rnglists.
2755 (struct dwop_section_names): Add loclists_dwo.
2756 (dwop_section_names): Add .debug_loclists.dwo.
2757 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
2758 (struct dwarf2_per_cu_data): Add dwarf_version.
2759 (struct dwo_sections): Add loclists.
2760 (struct attr_abbrev): Add implicit_const.
2761 (read_indirect_line_string): New declaration.
2762 (read_unsigned_leb128): Delete declaration.
2763 (rcuh_kind): New definition.
2764 (read_and_check_comp_unit_head): Change parameter
2765 is_debug_types_section to section_kind.
2766 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
2767 (read_comp_unit_head): Change parameter abfd to section, add parameter
2768 section_kind. Handle DWARF-5.
2769 (error_check_comp_unit_head): Accept also DWARF version 5.
2770 (read_and_check_comp_unit_head): Change parameter
2771 is_debug_types_section to section_kind.
2772 (read_and_check_type_unit_head): Delete function.
2773 (read_abbrev_offset): Handle DWARF-5.
2774 (create_debug_type_hash_table): Add parameter section_kind. Process
2775 only DW_UT_type. Use signature and type_offset_in_tu from struct
2776 comp_unit_head.
2777 (create_debug_types_hash_table): Update create_debug_type_hash_table
2778 caller.
2779 (create_all_type_units): Call create_debug_type_hash_table.
2780 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
2781 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
2782 caller.
2783 (skip_one_die): Handle DW_FORM_implicit_const.
2784 (dwarf2_rnglists_process): New function.
2785 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
2786 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
2787 (read_attribute_value): Handle DW_FORM_implicit_const,
2788 DW_FORM_line_strp.
2789 (read_attribute): Handle DW_FORM_implicit_const.
2790 (read_indirect_string_at_offset_from): New function from
2791 read_indirect_string_at_offset.
2792 (read_indirect_string_at_offset): Call
2793 read_indirect_string_at_offset_from.
2794 (read_indirect_line_string_at_offset): New function.
2795 (read_indirect_string): New function comment.
2796 (read_indirect_line_string): New function.
2797 (read_unsigned_leb128): Make it global.
2798 (dwarf2_string_attr): Handle DWARF-5.
2799 (add_include_dir_stub, read_formatted_entries): New functions.
2800 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
2801 Handle DWARF-5.
2802 (per_cu_header_read_in): Update read_comp_unit_head caller.
2803 (dwarf2_version): New function.
2804 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
2805 rnglists.
2806 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
2807 fields.
2808
22d2f3ab
JK
28092017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2810
2811 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
2812
5f46c5a5
JK
28132017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2814
2815 * dwarf2read.c (dwarf2_ranges_process): New function from
2816 dwarf2_ranges_read.
2817 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
2818 dwarf2_ranges_process.
2819
78d4d2c5
JK
28202017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2821
2822 * dwarf2read.c (create_debug_type_hash_table): New function from
2823 create_debug_types_hash_table.
2824 (create_debug_types_hash_table): Call create_debug_type_hash_table.
2825 (create_all_type_units, open_and_init_dwo_file): Update
2826 create_debug_types_hash_table callers.
2827
1b076f25
SDJ
28282017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
2829
2830 PR gdb/16188
2831 * fork-child.c (trace_start_error): Fix thinko. va_end should
2832 refer to 'ap', not 'args'.
2833
0db8980c
SDJ
28342017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
2835 Pedro Alves <palves@redhat.com>
2836
2837 PR gdb/16188
2838 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
2839 calls succeeded.
2840 * fork-child.c (trace_start_error): New function.
2841 (trace_start_error_with_name): Likewise.
2842 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
2843 * inf-ptrace.c (inf_ptrace_me): Likewise.
2844 * inferior.h (trace_start_error): New prototype.
2845 (trace_start_error_with_name): Likewise.
2846
99e8a4f9
SDJ
28472017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
2848
2849 PR gdb/21164
2850 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
2851 NULL before using it.
2852 * symmisc.c (maintenance_print_symbols): Likewise.
2853 (maintenance_print_msymbols): Likewise.
2854
4e746bb6
TW
28552017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2856
2857 * NEWS: Add record Python bindings entry.
2858
28592017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2860
2861 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
2862 py-record-full.o.
2863 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
2864 * python/py-record-btrace.c, python/py-record-btrace.h,
2865 python/py-record-full.c, python/py-record-full.h: New file.
2866 * python/py-record.c: Add include for py-record-btrace.h and
2867 py-record-full.h.
2868 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
2869 recpy_instruction_history, recpy_function_call_history, recpy_begin,
2870 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
2871 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
2872 New definition.
2873 (gdbpy_initialize_btrace): New export.
2874 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
2875
28762017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2877
2878 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
2879 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
2880 * python/py-record.c: New file.
2881 * python/python-internal.h (gdbpy_start_recording,
2882 gdbpy_current_recording, gdpy_stop_recording,
2883 gdbpy_initialize_record): New export.
2884 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
2885 (python_GdbMethods): Add gdbpy_start_recording,
2886 gdbpy_current_recording and gdbpy_stop_recording.
2887
28882017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2889
2890 * record-btrace.c (record_btrace_record_method): New function.
2891 (init_record_btrace_ops): Initialize to_record_method.
2892 * record-full.c (record_full_record_method): New function.
2893 (init_record_full_ops, init_record_full_core_ops): Add
2894 record_full_record_method.
2895 * record.h (enum record_method): New enum.
2896 * target-debug.h (target_debug_print_enum_record_method: New define.
2897 * target-delegates.c: Regenerate.
2898 * target.c (target_record_method): New function.
2899 * target.h: Include record.h.
2900 (struct target_ops) <to_record_method>: New field.
2901 (target_record_method): New export.
2902
29032017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2904
2905 * record.h (record_start, record_stop): New export.
2906 * record.c (record_start, record_stop): New function.
2907
29082017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2909
2910 * btrace.c (btrace_fetch): Copy function call segments pointer
2911 into a vector.
2912 (btrace_clear): Clear the vector.
2913 (btrace_find_insn_by_number): Use binary search to find the correct
2914 function call segment.
2915 * btrace.h (brace_fun_p): New typedef.
2916 (struct btrace_thread_info) <functions>: New field.
2917
29182017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2919
2920 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
2921 * btrace.c (btrace_decode_error): ... here. New function.
2922 * btrace.h (btrace_decode_error): New export.
2923
29242017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2925
2926 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
2927 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
2928 btrace_find_insn_by_number): Remove special case for gaps.
2929 * btrace.h (btrace_insn_get_error): New export.
2930 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
2931 * record-btrace.c (btrace_insn_history): Print number for gaps.
2932 (record_btrace_info, record_btrace_goto): Handle gaps.
2933
3f77c769
TT
29342017-02-14 Tom Tromey <tom@tromey.com>
2935
2936 PR python/13598:
2937 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
2938 event.
2939 * python/py-evts.c (gdbpy_initialize_py_events): Add
2940 before_prompt registry.
2941 * python/py-events.h (events_object) <before_prompt>: New field.
2942
4c2c7ac6
MM
29432017-02-14 Markus Metzger <markus.t.metzger@intel.com>
2944
2945 * btrace.c (ftrace_new_switch): Preserve up link and flags.
2946
5cf30ebf
LM
29472017-02-13 Luis Machado <lgustavo@codesourcery.com>
2948
2949 * symfile (_initialize_symfile): Add usage text to the load command's
2950 help text.
2951
26a06916
SM
29522017-02-10 Simon Marchi <simon.marchi@ericsson.com>
2953
2954 * utils.c (defaulted_query): Don't query on secondary UIs.
2955
0b145e37
TT
29562017-02-10 Tom Tromey <tom@tromey.com>
2957
2958 * rust-lang.c (rust_get_disr_info): Remove unused variable.
2959
2d8365c4
TT
29602017-02-10 Tom Tromey <tom@tromey.com>
2961
2962 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
2963 "cleanup" local.
2964 * python/py-type.c (typy_legacy_template_argument): Remove
2965 unnecessary "cleanup" local.
2966
2bb8f231
TT
29672017-02-10 Tom Tromey <tom@tromey.com>
2968
2969 * python/python.c (do_start_initialization): New function, from
2970 _initialize_python.
2971 (_initialize_python): Call do_start_initialization.
2972 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
2973 goto.
2974
1bdfaf42
TT
29752017-02-10 Tom Tromey <tom@tromey.com>
2976
2977 * python/py-prettyprint.c (pretty_print_one_value): Use
2978 gdbpy_ref.
2979
88b6faea
TT
29802017-02-10 Tom Tromey <tom@tromey.com>
2981
2982 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
2983 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
2984 gdbpy_ref.
2985 * python/py-type.c (field_new): Use gdbpy_ref.
2986 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
2987 gdbpy_ref.
2988 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
2989 (py_free_pspace): Likewise.
2990 (pspace_to_pspace_object): Likewise.
2991 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
2992 (py_free_objfile): Likewise.
2993 (objfile_to_objfile_object): Likewise.
2994 * python/py-inferior.c (delete_thread_object): Use
2995 gdbpy_ref.
2996 (infpy_read_memory): Likewise.
2997 (py_free_inferior): Likewise.
2998 * python/py-evtregistry.c (create_eventregistry_object): Use
2999 gdbpy_ref.
3000 * python/py-event.c (create_event_object): Use gdbpy_ref.
3001
7780f186
TT
30022017-02-10 Tom Tromey <tom@tromey.com>
3003
3004 * python/py-ref.h (gdbpy_ref_policy): Now a template.
3005 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
3006 used.
3007 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
3008 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
3009 python/py-exitedevent.c, python/py-finishbreakpoint.c,
3010 python/py-framefilter.c, python/py-function.c,
3011 python/py-inferior.c, python/py-infevents.c,
3012 python/py-linetable.c, python/py-newobjfileevent.c,
3013 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
3014 python/py-signalevent.c, python/py-stopevent.c,
3015 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
3016 python/py-unwind.c, python/py-utils.c, python/py-value.c,
3017 python/py-varobj.c, python/py-xmethods.c, python/python.c,
3018 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
3019
d4b0bb18
TT
30202017-02-10 Tom Tromey <tom@tromey.com>
3021
3022 * ui-out.h (ui_out_emit_type): New class.
3023 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
3024 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
3025 and ui_out_emit_tuple.
3026 (enumerate_locals): Likewise.
3027 (py_mi_print_variables, py_print_locals, py_print_args): Use
3028 ui_out_emit_list.
3029 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
3030 ui_out_emit_list.
3031 * common/gdb_optional.h: New file.
3032
f67f945c
MG
30332017-02-10 Martin Galvan <martingalvan@sourceware.org>
3034
3035 * MAINTAINERS (Write After Approval): Update my e-mail address.
3036
18da0c51
MG
30372017-02-10 Martin Galvan <martingalvan@sourceware.org>
3038
3039 PR gdb/21122
3040 * breakpoint.c (_initialize_breakpoint): Update the help description
3041 of the 'commands' command to indicate that it takes a list argument.
3042
62c14536
SM
30432017-02-09 Simon Marchi <simon.marchi@ericsson.com>
3044
3045 * interps.c (current_interp_set_logging): Remove "return".
3046
ff6fa247
GB
30472017-02-09 Gary Benson <gbenson@redhat.com>
3048
3049 * symtab.c (add_symtab_completions): Prevent NULL pointer
3050 dereference.
3051
a474bd8e
PA
30522017-02-08 Pedro Alves <palves@redhat.com>
3053
3054 * interps.c (interp::interp): Remove reference to quiet_p.
3055 (interp_set): Make static. Remove dead "Switching to" output
3056 code.
3057 (interp_quiet_p, interp_set_quiet): Delete.
3058 (interpreter_exec_cmd): Don't set the interpreter quiet.
3059 * interps.h (interp_quiet_p): Make static.
3060 (class interp) <quiet_p>: Remove field
3061
3d7b173c
JG
30622017-02-08 Jerome Guitton <guitton@adacore.com>
3063
604c4576
JG
3064 * cli/cli-decode.c (find_command_name_length): Make it extern.
3065 * cli/cli-decode.h (find_command_name_length): Declare.
3066 * cli/cli-script.c (command_name_equals, line_first_arg):
3067 New functions.
3068 (process_next_line): Use cli-decode to parse command names.
3069 (build_command_line): Make args a constant pointer.
3070
30712017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 3072
3d7b173c
JG
3073 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
3074 Remove case-insensitive search.
3075
1291063d
JM
30762017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
3077
3078 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
3079 at the end of the line. Avoids an ARI warning.
3080
20b477a7
LM
30812017-02-06 Luis Machado <lgustavo@codesourcery.com>
3082
3083 * NEWS: Mention support for record/replay of Intel 64 rdrand and
3084 rdseed instructions.
3085 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
3086
3f7b46f2
IR
30872017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
3088
3089 PR tdep/20936
3090 Provide and use sparc32 and sparc64 target description XML files.
3091 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
3092 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
3093 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
3094 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
3095 * features/sparc/sparc32-solaris.xml: New file.
3096 * features/sparc/sparc64-solaris.xml: New file.
3097 * features/sparc/sparc32-solaris.c: Generated.
3098 * features/sparc/sparc64-solaris.c: Generated.
3099 * sparc-tdep.h: Account for differences in target descriptions.
3100 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
3101 (sparc32_register_type): Use target provided registers.
3102 (validate_tdesc_registers): New function.
3103 (sparc32_gdbarch_init): Use tdesc_has_registers.
3104 Set pseudoregister functions.
3105 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
3106 (sparc64_register_type): Use target provided registers.
3107 (sparc64_init_abi): Set pseudoregister functions.
3108
f0fd41c1
TT
31092017-02-03 Tom Tromey <tom@tromey.com>
3110
3111 PR rust/21097:
3112 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
3113 with a single member.
3114
d6f9b0fb
PA
31152017-02-03 Pedro Alves <palves@redhat.com>
3116
3117 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
3118 (cli_interp_base::~cli_interp_base): New.
3119 (cli_interp): New struct.
3120 (as_cli_interp): Cast the interp itself to cli_interp.
3121 (cli_interpreter_pre_command_loop): Rename to ...
3122 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
3123 parameter.
3124 (cli_interpreter_init): Rename to ...
3125 (cli_interp::init): ... this. Remove 'self' parameter. Use
3126 boolean. Make extern.
3127 (cli_interpreter_resume): Rename to ...
3128 (cli_interp::resume): ... this. Remove 'data' parameter. Make
3129 extern.
3130 (cli_interpreter_suspend): Rename to ...
3131 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
3132 extern.
3133 (cli_interpreter_exec): Rename to ...
3134 (cli_interp::exec): ... this. Remove 'data' parameter. Make
3135 extern.
3136 (cli_interpreter_supports_command_editing): Rename to ...
3137 (cli_interp_base::supports_command_editing): ... this. Remove
3138 'interp' parameter. Make extern.
3139 (cli_ui_out): Rename to ...
3140 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
3141 Make extern.
3142 (cli_set_logging): Rename to ...
3143 (cli_interp_base::set_logging): ... this. Remove 'interp'
3144 parameter. Make extern.
3145 (cli_interp_procs): Delete.
3146 (cli_interp_factory): Adjust to use "new".
3147 * cli/cli-interp.h: Include "interps.h".
3148 (struct cli_interp_base): New struct.
3149 * interps.c (struct interp): Delete. Fields moved to interps.h.
3150 (interp_new): Delete.
3151 (interp::interp, interp::~interp): New.
3152 (interp_set): Use bool, and return void. Assume the interpreter
3153 has suspend, init and resume methods, and that the all return
3154 void.
3155 (set_top_level_interpreter): interp_set returns void.
3156 (interp_ui_out): Adapt.
3157 (current_interp_set_logging): Adapt.
3158 (interp_data): Delete.
3159 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
3160 (interp_exec): Adapt.
3161 (top_level_interpreter_data): Delete.
3162 * interps.h (interp_init_ftype, interp_resume_ftype)
3163 (interp_suspend_ftype, interp_exec_ftype)
3164 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
3165 (class interp): New.
3166 (interp_new): Delete.
3167 (interp_set): Now returns void. Use bool.
3168 (interp_data, top_level_interpreter_data): Delete.
3169 * mi/mi-common.h: Include interps.h.
3170 (class mi_interp): Inherit from interp. Define a ctor. Declare
3171 init, resume, suspect, exec, interp_ui_out, set_logging and
3172 pre_command_loop methods.
3173 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
3174 (mi_interpreter_init): Rename to ...
3175 (mi_interp::init): ... this. Remove the 'interp' parameter, use
3176 bool, return void and make extern. Adjust.
3177 (mi_interpreter_resume): ... Rename to ...
3178 (mi_interp::resume): ... this. Remove the 'data' parameter,
3179 return void and make extern. Adjust.
3180 (mi_interpreter_suspend): ... Rename to ...
3181 (mi_interp::suspend): ... this. Remove the 'data' parameter,
3182 return void and make extern. Adjust.
3183 (mi_interpreter_exec): ... Rename to ...
3184 (mi_interp::exec): ... this. Remove the 'data' parameter and make
3185 extern. Adjust.
3186 (mi_interpreter_pre_command_loop): ... Rename to ...
3187 (mi_interp::pre_command_loop): ... this. Remove the 'self'
3188 parameter and make extern.
3189 (mi_on_normal_stop_1): Adjust.
3190 (mi_ui_out): Rename to ...
3191 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
3192 parameter and make extern. Adjust.
3193 (mi_set_logging): Rename to ...
3194 (mi_interp::set_logging): ... this. Remove the 'interp'
3195 parameter and make extern. Adjust.
3196 (mi_interp_procs): Delete.
3197 (mi_interp_factory): Adjust to use 'new'.
3198 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
3199 (mi_print_exception, mi_execute_command, mi_load_progress):
3200 Adjust.
3201 * tui/tui-interp.c (tui_interp): New class.
3202 (as_tui_interp): Return a tui_interp pointer.
3203 (tui_on_normal_stop, tui_on_signal_received)
3204 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
3205 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
3206 to use interp::interp_ui_out.
3207 (tui_init): Rename to ...
3208 (tui_interp::init): ... this. Remove the 'self' parameter, use
3209 bool, return void and make extern. Adjust.
3210 (tui_resume): Rename to ...
3211 (tui_interp::resume): ... this. Remove the 'data' parameter,
3212 return void and make extern. Adjust.
3213 (tui_suspend): Rename to ...
3214 (tui_interp::suspend): ... this. Remove the 'data' parameter,
3215 return void and make extern. Adjust.
3216 (tui_ui_out): Rename to ...
3217 (tui_interp::interp_ui_out): ... this. Remove the 'self'
3218 parameter, and make extern. Adjust.
3219 (tui_exec): Rename to ...
3220 (tui_interp::exec): ... this. Remove the 'data' parameter and
3221 make extern.
3222 (tui_interp_procs): Delete.
3223 (tui_interp_factory): Use "new".
3224
65c40c95
TT
32252017-02-02 Tom Tromey <tom@tromey.com>
3226
3227 * rust-exp.y (ends_raw_string, space_then_number)
3228 (rust_identifier_start_p): Return bool.
3229 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
3230 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
3231 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
3232 (rust_chartype_p): Return bool.
3233 (val_print_struct, rust_print_struct_def, rust_print_type):
3234 Update.
3235 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
3236 Return bool.
3237
b50f188d
TT
32382017-02-02 Tom Tromey <tom@tromey.com>
3239
3240 * rust-lang.c: Reindent.
3241
03c85b11
TT
32422017-02-02 Tom Tromey <tom@tromey.com>
3243
3244 * rust-lang.h (rust_crate_for_block): Update.
3245 * rust-lang.c (rust_crate_for_block): Return std::string.
3246 (rust_get_disr_info): Use std:;string, not
3247 gdb::unique_xmalloc_ptr.
3248 * rust-exp.y (crate_name): Update.
3249
9b6da501
PA
32502017-02-02 Pedro Alves <palves@redhat.com>
3251
3252 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
3253 field out of gdb_disassembler_test and make it static.
3254
ec4cb20b
PA
32552017-02-02 Pedro Alves <palves@redhat.com>
3256
3257 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
3258 mi1_interp and mi_interp fields.
3259
5be5dbf0
PA
32602017-02-02 Pedro Alves <palves@redhat.com>
3261
616268b6
PA
3262 * cli/cli-interp.c (struct saved_output_files, saved_output):
3263 Moved from cli/cli-logging.c.
3264 (cli_set_logging): New function.
3265 (cli_interp_procs): Install cli_set_logging.
3266 * cli/cli-interp.h (make_logging_output, cli_set_logging):
3267 Declare.
3268 * cli/cli-logging.c (struct saved_output_files, saved_output):
3269 Moved to cli/cli-interp.c.
3270 (pop_output_files): Don't save outputs here.
3271 (make_logging_output): New function.
3272 (handle_redirections): Don't build tee nor save previous outputs
3273 here.
3274 * interps.c (current_interp_set_logging): Change prototype.
3275 Assume there's always a set_logging_proc method installed.
3276 * interps.h (interp_set_logging_ftype): Change prototype.
3277 (current_interp_set_logging): Change prototype and adjust comment.
3278 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
3279 use make_logging_output.
3280 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
32812017-02-02 Pedro Alves <palves@redhat.com>
3282
5be5dbf0
PA
3283 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
3284 from ...
3285 (set_logging_overwrite): ... here.
3286 (logging_no_redirect_file): Delete.
3287 (set_logging_redirect): Don't handle redirection on the fly.
3288 Instead warn that "logging off" / "logging on" is necessary.
3289 (pop_output_files): Delete references to logging_no_redirect_file.
3290 (show_logging_command): Always speak in terms of what will happen
3291 once logging is reenabled.
3292
c99cc448
PA
32932017-02-02 Pedro Alves <palves@redhat.com>
3294
3295 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
3296
8b172ce7
PA
32972017-02-02 Pedro Alves <palves@redhat.com>
3298
3299 * disasm.c (gdb_pretty_print_insn): Rename to ...
3300 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
3301 Remove gdbarch parameter. Adapt to clear the object's buffers
3302 instead of allocating new buffers, and to print using the object's
3303 gdb_disassembler instead of calling gdb_print_insn.
3304 (dump_insns): Use gdb_pretty_print_disassembler.
3305 * disasm.h (gdb_pretty_print_insn): Delete declaration.
3306 (gdb_pretty_print_disassembler): New class.
3307 * record-btrace.c (btrace_insn_history): Use
3308 gdb_pretty_print_disassembler.
3309
d7e74731
PA
33102017-02-02 Pedro Alves <palves@redhat.com>
3311
3312 * ada-lang.c (type_as_string): Use string_file.
3313 * ada-valprint.c (ada_print_floating): Use string_file.
3314 * ada-varobj.c (ada_varobj_scalar_image)
3315 (ada_varobj_get_value_image): Use string_file.
3316 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
3317 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
3318 * breakpoint.c (update_inserted_breakpoint_locations)
3319 (insert_breakpoint_locations, reattach_breakpoints)
3320 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
3321 (print_it_watchpoint): Use string_file.
3322 (save_breakpoints): Use stdio_file.
3323 * c-exp.y (oper): Use string_file.
3324 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
3325 tee_file.
3326 (pop_output_files): Use delete.
3327 (handle_redirections): Use stdio_file and tee_file.
3328 * cli/cli-setshow.c (do_show_command): Use string_file.
3329 * compile/compile-c-support.c (c_compute_program): Use
3330 string_file.
3331 * compile/compile-c-symbols.c (generate_vla_size): Take a
3332 'string_file &' instead of a 'ui_file *'.
3333 (generate_c_for_for_one_variable): Take a 'string_file &' instead
3334 of a 'ui_file *'. Use string_file.
3335 (generate_c_for_variable_locations): Take a 'string_file &'
3336 instead of a 'ui_file *'.
3337 * compile/compile-internal.h (generate_c_for_for_one_variable):
3338 Take a 'string_file &' instead of a 'ui_file *'.
3339 * compile/compile-loc2c.c (push, pushf, unary, binary)
3340 (print_label, pushf_register_address, pushf_register)
3341 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
3342 'ui_file *'. Adjust.
3343 * compile/compile.c (compile_to_object): Use string_file.
3344 * compile/compile.h (compile_dwarf_expr_to_c)
3345 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
3346 'ui_file *'.
3347 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
3348 (replace_typedefs_qualified_name): Use string_file and
3349 obstack_copy0.
3350 * disasm.c (gdb_pretty_print_insn): Use string_file.
3351 (gdb_disassembly): Adjust reference the null_stream global.
3352 (do_ui_file_delete): Delete.
3353 (gdb_insn_length): Use null_stream.
3354 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
3355 * dwarf2loc.c (dwarf2_compile_property_to_c)
3356 (locexpr_generate_c_location, loclist_generate_c_location): Take a
3357 'string_file &' instead of a 'ui_file *'.
3358 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
3359 * dwarf2read.c (do_ui_file_peek_last): Delete.
3360 (dwarf2_compute_name): Use string_file.
3361 * event-top.c (gdb_setup_readline): Use stdio_file.
3362 * gdbarch.sh (verify_gdbarch): Use string_file.
3363 * gdbtypes.c (safe_parse_type): Use null_stream.
3364 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
3365 string_file.
3366 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
3367 'string_file *' instead of a 'ui_file *'.
3368 (gdbscm_arch_disassemble): Use string_file.
3369 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
3370 * guile/scm-ports.c (class ioscm_file_port): Now a class that
3371 inherits from ui_file.
3372 (ioscm_file_port_delete, ioscm_file_port_rewind)
3373 (ioscm_file_port_put): Delete.
3374 (ioscm_file_port_write): Rename to ...
3375 (ioscm_file_port::write): ... this. Remove file_port_magic
3376 checks.
3377 (ioscm_file_port_new): Delete.
3378 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
3379 ui_file_up.
3380 * guile/scm-type.c (tyscm_type_name): Use string_file.
3381 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
3382 Use string_file.
3383 * infcmd.c (print_return_value_1): Use string_file.
3384 * infrun.c (print_target_wait_results): Use string_file.
3385 * language.c (add_language): Use string_file.
3386 * location.c (explicit_to_string_internal): Use string_file.
3387 * main.c (captured_main_1): Use null_file.
3388 * maint.c (maintenance_print_architecture): Use stdio_file.
3389 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
3390 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
3391 event_channel>: Change type to mi_console_file pointer.
3392 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
3393 (mi_console_file_delete): Delete.
3394 (struct mi_console_file): Delete.
3395 (mi_console_file_magic): Delete.
3396 (mi_console_file_new): Delete.
3397 (mi_console_file::mi_console_file): New.
3398 (mi_console_file_delete): Delete.
3399 (mi_console_file_fputs): Delete.
3400 (mi_console_file::write): New.
3401 (mi_console_raw_packet): Delete.
3402 (mi_console_file::flush): New.
3403 (mi_console_file_flush): Delete.
3404 (mi_console_set_raw): Rename to ...
3405 (mi_console_file::set_raw): ... this.
3406 * mi/mi-console.h (class mi_console_file): New class.
3407 (mi_console_file_new, mi_console_set_raw): Delete.
3408 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
3409 (mi_set_logging): Use delete and tee_file. Adjust.
3410 * mi/mi-main.c (output_register): Use string_file.
3411 (mi_cmd_data_evaluate_expression): Use string_file.
3412 (mi_cmd_data_read_memory): Use string_file.
3413 (mi_cmd_execute, print_variable_or_computed): Use string_file.
3414 * mi/mi-out.c (mi_ui_out::main_stream): New.
3415 (mi_ui_out::rewind): Use main_stream and
3416 string_file.
3417 (mi_ui_out::put): Use main_stream and string_file.
3418 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
3419 Allocate a 'string_file' instead.
3420 (mi_out_new): Don't allocate a mem_fileopen stream here.
3421 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
3422 (mi_ui_out::main_stream): Declare method.
3423 * printcmd.c (eval_command): Use string_file.
3424 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
3425 * python/py-arch.c (archpy_disassemble): Use string_file.
3426 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
3427 * python/py-frame.c (frapy_str): Use string_file.
3428 * python/py-framefilter.c (py_print_type, py_print_single_arg):
3429 Use string_file.
3430 * python/py-type.c (typy_str): Use string_file.
3431 * python/py-unwind.c (unwind_infopy_str): Use string_file.
3432 * python/py-value.c (valpy_str): Use string_file.
3433 * record-btrace.c (btrace_insn_history): Use string_file.
3434 * regcache.c (regcache_print): Use stdio_file.
3435 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
3436 * remote.c (escape_buffer): Use string_file.
3437 * rust-lang.c (rust_get_disr_info): Use string_file.
3438 * serial.c (serial_open_ops_1): Use stdio_file.
3439 (do_serial_close): Use delete.
3440 * stack.c (print_frame_arg): Use string_file.
3441 (print_frame_args): Remove local mem_fileopen stream, not used.
3442 (print_frame): Use string_file.
3443 * symmisc.c (maintenance_print_symbols): Use stdio_file.
3444 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3445 Take a 'string_file *' instead of a 'ui_file *'.
3446 * top.c (new_ui): Use stdio_file and stderr_file.
3447 (free_ui): Use delete.
3448 (execute_command_to_string): Use string_file.
3449 (quit_confirm): Use string_file.
3450 * tracepoint.c (collection_list::append_exp): Use string_file.
3451 * tui/tui-disasm.c (tui_disassemble): Use string_file.
3452 * tui/tui-file.c: Don't include "ui-file.h".
3453 (enum streamtype, struct tui_stream): Delete.
3454 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
3455 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
3456 (tui_file::tui_file): New method.
3457 (tui_file_fputs): Delete.
3458 (tui_file_get_strbuf): Delete.
3459 (tui_file::puts): New method.
3460 (tui_file_adjust_strbuf): Delete.
3461 (tui_file_flush): Delete.
3462 (tui_file::flush): New method.
3463 * tui/tui-file.h: Tweak intro comment.
3464 Include ui-file.h.
3465 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
3466 (tui_file_adjust_strbuf): Delete declarations.
3467 (class tui_file): New class.
3468 * tui/tui-io.c (tui_initialize_io): Use tui_file.
3469 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
3470 (tui_register_format): Use string_stream.
3471 * tui/tui-stack.c (tui_make_status_line): Use string_file.
3472 (tui_get_function_from_frame): Use string_file.
3473 * typeprint.c (type_to_string): Use string_file.
3474 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
3475 (null_stream): New global.
3476 (ui_file_delete): Delete.
3477 (ui_file::ui_file): New.
3478 (null_file_isatty): Delete.
3479 (ui_file::~ui_file): New.
3480 (null_file_rewind): Delete.
3481 (ui_file::printf): New.
3482 (null_file_put): Delete.
3483 (null_file_flush): Delete.
3484 (ui_file::putstr): New.
3485 (null_file_write): Delete.
3486 (ui_file::putstrn): New.
3487 (null_file_read): Delete.
3488 (ui_file::putc): New.
3489 (null_file_fputs): Delete.
3490 (null_file_write_async_safe): Delete.
3491 (ui_file::vprintf): New.
3492 (null_file_delete): Delete.
3493 (null_file::write): New.
3494 (null_file_fseek): Delete.
3495 (null_file::puts): New.
3496 (ui_file_data): Delete.
3497 (null_file::write_async_safe): New.
3498 (gdb_flush, ui_file_isatty): Adjust.
3499 (ui_file_put, ui_file_rewind): Delete.
3500 (ui_file_write): Adjust.
3501 (ui_file_write_for_put): Delete.
3502 (ui_file_write_async_safe, ui_file_read): Adjust.
3503 (ui_file_fseek): Delete.
3504 (fputs_unfiltered): Adjust.
3505 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
3506 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
3507 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
3508 (set_ui_file_data): Delete.
3509 (string_file::~string_file, string_file::write)
3510 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
3511 (do_ui_file_as_string, ui_file_as_string): Delete.
3512 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
3513 (struct mem_file): Delete.
3514 (mem_file_new): Delete.
3515 (stdio_file::stdio_file): New.
3516 (mem_file_delete): Delete.
3517 (stdio_file::stdio_file): New.
3518 (mem_fileopen): Delete.
3519 (stdio_file::~stdio_file): New.
3520 (mem_file_rewind): Delete.
3521 (stdio_file::set_stream): New.
3522 (mem_file_put): Delete.
3523 (stdio_file::open): New.
3524 (mem_file_write): Delete.
3525 (stdio_file_magic, struct stdio_file): Delete.
3526 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
3527 (stdio_file::flush): New.
3528 (stdio_file_read): Rename to ...
3529 (stdio_file::read): ... this. Adjust.
3530 (stdio_file_write): Rename to ...
3531 (stdio_file::write): ... this. Adjust.
3532 (stdio_file_write_async_safe): Rename to ...
3533 (stdio_file::write_async_safe) ... this. Adjust.
3534 (stdio_file_fputs): Rename to ...
3535 (stdio_file::puts) ... this. Adjust.
3536 (stdio_file_isatty): Delete.
3537 (stdio_file_fseek): Delete.
3538 (stdio_file::isatty): New.
3539 (stderr_file_write): Rename to ...
3540 (stderr_file::write) ... this. Adjust.
3541 (stderr_file_fputs): Rename to ...
3542 (stderr_file::puts) ... this. Adjust.
3543 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
3544 (stderr_file::stderr_file): New.
3545 (tee_file_magic): Delete.
3546 (struct tee_file): Delete.
3547 (tee_file::tee_file): New.
3548 (tee_file_new): Delete.
3549 (tee_file::~tee_file): New.
3550 (tee_file_delete): Delete.
3551 (tee_file_flush): Rename to ...
3552 (tee_file::flush): ... this. Adjust.
3553 (tee_file_write): Rename to ...
3554 (tee_file::write): ... this. Adjust.
3555 (tee_file::write_async_safe): New.
3556 (tee_file_fputs): Rename to ...
3557 (tee_file::puts): ... this. Adjust.
3558 (tee_file_isatty): Rename to ...
3559 (tee_file::isatty): ... this. Adjust.
3560 * ui-file.h (struct obstack, struct ui_file): Don't
3561 forward-declare.
3562 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
3563 (ui_file_write_ftype)
3564 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
3565 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
3566 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
3567 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
3568 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
3569 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
3570 (set_ui_file_fseek): Delete.
3571 (ui_file_data, ui_file_delete, ui_file_rewind)
3572 (struct ui_file): New.
3573 (ui_file_up): New.
3574 (class null_file): New.
3575 (null_stream): Declare.
3576 (ui_file_write_for_put, ui_file_put): Delete.
3577 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
3578 Delete.
3579 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
3580 (gdb_fopen, tee_file_new): Delete.
3581 (struct string_file): New.
3582 (struct stdio_file): New.
3583 (stdio_file_up): New.
3584 (struct stderr_file): New.
3585 (class tee_file): New.
3586 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
3587 of a 'ui_file *'. Adjust.
3588 * ui-out.h (class ui_out) <field_stream>: Likewise.
3589 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
3590 (null_stream): Delete.
3591 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
3592 Adjust.
3593 * utils.h (struct ui_file): Delete forward declaration..
3594 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
3595 (error_stream): Take a 'string_file &' instead of a
3596 'ui_file *'.
3597 * varobj.c (varobj_value_get_print_value): Use string_file.
3598 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
3599 * gdbarch.c: Regenerate.
3600
187808b0
PA
36012017-02-02 Pedro Alves <palves@redhat.com>
3602
3603 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
3604 (gdb_pretty_print_insn): ... this. Now a free function. Add back
3605 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
3606 Adjust to call gdb_print_insn instead of
3607 gdb_disassembler::print_insn.
3608 (dump_insns, do_mixed_source_and_assembly_deprecated)
3609 (do_mixed_source_and_assembly, do_assembly_only): Add back a
3610 'gdbarch' parameter. Remove gdb_disassembler parameter.
3611 (gdb_disassembly): Don't allocate a gdb_disassembler here.
3612 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
3613 declaration.
3614 (gdb_pretty_print_insn): Re-add declaration.
3615 * record-btrace.c (btrace_insn_history): Don't allocate a
3616 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
3617
7a8eb317
SM
36182017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
3619
3620 * disasm.h (gdb_disassembly): Remove file_string parameter.
3621 * disasm.c (gdb_disassembly): Likewise.
3622 * cli/cli-cmds.c (print_disassembly): Adapt.
3623 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
3624 * stack.c (do_gdb_disassembly): Likewise.
3625
7346ef59
AA
36262017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
3627
3628 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
3629 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
3630 targets. And if the implicit value is longer than needed, extract
3631 the first bytes instead of the "least significant" ones.
3632
cd4007e4
MM
36332017-02-01 Markus Metzger <markus.t.metzger@intel.com>
3634
3635 * btrace.c (btrace_enable): Do not call btrace_add_pc for
3636 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
3637 (btrace_fetch): Assert can_access_registers_ptid.
3638 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
3639 validate_registers_access.
3640
cf77c34e
MM
36412017-02-01 Markus Metzger <markus.t.metzger@intel.com>
3642
3643 * gdbthread.h (can_access_registers_ptid): New.
3644 * thread.c (can_access_registers_ptid): New.
3645
be85ce7d
PA
36462017-02-01 Pedro Alves <palves@redhat.com>
3647
3648 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
3649
29b0b251
PA
36502017-01-31 Pedro Alves <palves@redhat.com>
3651
3652 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
3653 Fix typos.
3654
289b5b24
PA
36552017-01-31 Pedro Alves <palves@redhat.com>
3656
3657 * stack.c (print_frame_args): Remove local mem_fileopen stream,
3658 not used.
3659
b47413b4
PA
36602017-01-31 Pedro Alves <palves@redhat.com>
3661
3662 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
3663
60adb36c
PA
36642017-01-31 Pedro Alves <palves@redhat.com>
3665
3666 * common/scoped_restore.h
3667 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
3668 change the value's parameter type to T2.
3669 (make_scoped_restore): Likewise.
3670
2735833d
WT
36712017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3672 Richard Henderson <rth@redhat.com>
3673
3674 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
3675 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
3676 GS_BASE for older kernels.
3677 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
3678 GS_BASE for older kernels.
3679 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
3680 and GS_BASE to the offset table.
3681 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
3682 system register group.
3683 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
3684 for older kernels.
3685 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
3686 amd64 ABI.
3687 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
3688 AMD64_GSBASE_REGNUM.
3689 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
3690 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
3691 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
3692 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
3693 i386/64bit-segments.xml in those rules.
3694 * features/i386/64bit-segments.xml: New file.
3695 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
3696 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
3697 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
3698 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
3699 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
3700 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
3701 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
3702 * features/i386/amd64-avx-linux.c: Regenerated.
3703 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
3704 * features/i386/amd64-avx-mpx.c: Regenerated.
3705 * features/i386/amd64-avx512-linux.c: Regenerated.
3706 * features/i386/amd64-linux.c: Regenerated.
3707 * features/i386/amd64-mpx-linux.c: Regenerated.
3708 * features/i386/i386-avx-mpx-linux.c: Regenerated.
3709 * features/i386/i386-avx-mpx.c: Regenerated.
3710 * features/i386/x32-avx-linux.c: Regenerated.
3711 * features/i386/x32-avx512-linux.c: Regenerated.
3712 * regformats/i386/amd64-avx-linux.dat: Regenerated.
3713 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
3714 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
3715 * regformats/i386/amd64-linux.dat: Regenerated.
3716 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
3717 * regformats/i386/x32-avx-linux.dat: Regenerated.
3718 * regformats/i386/x32-avx512-linux.dat: Regenerated.
3719 * regformats/i386/x32-linux.dat: Regenerated.
3720
8884e97e
WT
37212017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3722
3723 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
3724 Set to AMD64_NUM_REGS.
3725
7005d26a
WT
37262017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3727
3728 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
3729 that checks validity of a register number.
3730
4bd2e1b2
KC
37312017-01-27 Kees Cook <keescook@google.com>
3732
3733 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
3734 fetch_fpregs if target has fpa registers.
3735 (arm_linux_store_inferior_registers): Call store_fpregs if target
3736 has fpa registers.
3737
7cf1de6c
AA
37382017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
3739
3740 * cris-tdep.c (cris_gdbarch_init): Remove check for
3741 info.byte_order and force it to BFD_ENDIAN_LITTLE.
3742
874a1c8c
AT
37432017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
3744
3745 * corelow.c (get_core_register_section): Check for regset
3746 existence before checking for REGSET_VARIABLE_SIZE.
3747
d8b49cf0
YQ
37482017-01-26 Yao Qi <yao.qi@linaro.org>
3749 Pedro Alves <palves@redhat.com>
3750
3751 PR gdb/20939
3752 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
3753 call memory_error, save memaddr instead.
3754 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
3755 negative, cal memory_error.
3756 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
3757
658ca58c
YQ
37582017-01-26 Yao Qi <yao.qi@linaro.org>
3759
3760 * disasm-selftests.c (memory_error_test): New function.
3761 (_initialize_disasm_selftests): Register memory_error_test.
3762
79843d45
YQ
37632017-01-26 Yao Qi <yao.qi@linaro.org>
3764
3765 * Makefile.in (SFILES): Add disasm-selftests.c and
3766 selftest-arch.c.
3767 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
3768 * disasm-selftests.c: New file.
3769 * selftest-arch.c: New file.
3770 * selftest-arch.h: New file.
3771
8cafda32
YQ
37722017-01-26 Yao Qi <yao.qi@linaro.org>
3773
3774 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
3775 to bfd_arch_mep. Don't return 0 if section is not
3776 found. Call print_insn_mep.
3777
e47ad6c0
YQ
37782017-01-26 Pedro Alves <palves@redhat.com>
3779 Yao Qi <yao.qi@linaro.org>
3780
3781 * arm-tdep.c: Include "disasm.h".
3782 (gdb_print_insn_arm): Update code to get gdbarch.
3783 * disasm.c (dis_asm_read_memory): Change it to
3784 gdb_disassembler::dis_asm_read_memory.
3785 (dis_asm_memory_error): Likewise.
3786 (dis_asm_print_address): Likewise.
3787 (gdb_pretty_print_insn): Change it to
3788 gdb_disassembler::pretty_print_insn.
3789 (dump_insns): Add one argument gdb_disassemlber. All
3790 callers updated.
3791 (do_mixed_source_and_assembly_deprecated): Likewise.
3792 (do_mixed_source_and_assembly): Likewise.
3793 (do_assembly_only): Likewise.
3794 (gdb_disassembler::gdb_disassembler): New.
3795 (gdb_disassembler::print_insn): New.
3796 * disasm.h (class gdb_disassembler): New.
3797 (gdb_pretty_print_insn): Remove declaration.
3798 (gdb_disassemble_info): Likewise.
3799 * guile/scm-disasm.c (class gdbscm_disassembler): New.
3800 (gdbscm_disasm_read_memory_worker): Update.
3801 (gdbscm_disasm_read_memory): Update.
3802 (gdbscm_disasm_memory_error): Remove.
3803 (gdbscm_disasm_print_address): Remove.
3804 (gdbscm_disassembler::gdbscm_disassembler): New.
3805 (gdbscm_print_insn_from_port): Update.
3806 * mips-tdep.c: Include disasm.h.
3807 (gdb_print_insn_mips): Update code to get gdbarch.
3808 * record-btrace.c (btrace_insn_history): Update.
3809 * spu-tdep.c: Include disasm.h.
3810 (struct spu_dis_asm_data): Remove.
3811 (struct spu_dis_asm_info): New.
3812 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
3813 SPU id.
3814 (gdb_print_insn_spu): Cast disassemble_info to
3815 spu_dis_asm_info.
3816
80d75874
YQ
38172017-01-26 Yao Qi <yao.qi@linaro.org>
3818
3819 * disasm.c (do_ui_file_delete): Delete.
3820 (gdb_insn_length): Move code creating stream to ...
3821 * utils.c (null_stream): ... here. New function.
3822 * utils.h (null_stream): Declare.
3823
60685cd0
SM
38242017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
3825
3826 * python/py-inferior.c (find_thread_object): Return directly
3827 from the loop. Remove "found" variable.
3828
eb1cdb62
JB
38292017-01-21 Joel Brobecker <brobecker@adacore.com>
3830
3831 GDB 7.12.1 released.
3832
b1ce6568
SM
38332017-01-20 Simon Marchi <simon.marchi@ericsson.com>
3834
3835 * python/py-function.c (fnpy_call): Reorder declarations to have
3836 the gdbpy_enter object declared first.
3837 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
3838
6f8b0407
SM
38392017-01-20 Simon Marchi <simon.marchi@ericsson.com>
3840
fec93fb1 3841 PR python/21068
6f8b0407
SM
3842 * python/python-internal.h (PyMem_RawMalloc): Define for
3843 Python < 3.4.
3844 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
3845 PyMem_RawMalloc instead of PyMem_Malloc.
3846
78cbbba8
LM
38472017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
3848 Luis Machado <lgustavo@codesourcery.com>
3849
3850 * NEWS (New commands): Mention flash-erase.
3851 (New MI commands): Mention target-flash-erase.
3852 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
3853 command.
3854 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
3855 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
3856 * target.c (flash_erase_command): New function.
3857 (initialize_targets): Add new flash-erase command.
3858 * target.h (flash_erase_command): New declaration.
3859
2132fe85
JB
38602017-01-20 Joel Brobecker <brobecker@adacore.com>
3861
3862 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
3863 HAVE_SYS_PROCFS_H is defined.
3864
d1dff226
AH
38652017-01-18 Alan Hayward <alan.hayward@arm.com>
3866
3867 * remote.c (struct cached_reg): Change data into a pointer.
3868 * (stop_reply_dtr): Free data pointers before deleting vector.
3869 (process_stop_reply): Likewise.
3870 (remote_parse_stop_reply): Allocate space for data
3871
9890e433
AH
38722017-01-18 Alan Hayward <alan.hayward@arm.com>
3873
3874 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
3875 MAX_REGISTER_SIZE.
3876 (amd64_pseudo_register_read_value): Likewise.
3877 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
3878 (store_register_using_P): Likewise.
3879 * regcache.c (regcache_xfer_part): Likewise.
3880
7a36499a
IR
38812017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
3882
3883 Split real and pseudo registers.
3884 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
3885 (sparc32_pseudo_regnum): New enum.
3886 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
3887 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
3888 (SPARC32_CP0_REGISTERS): New macro.
3889 (sparc32_pseudo_register_name): New function.
3890 (sparc32_register_name): Use sparc32_pseudo_register_name.
3891 (sparc32_pseudo_register_type): New function.
3892 (sparc32_register_type): Use sparc32_pseudo_register_type.
3893 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
3894 pseudo register numbers.
3895 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
3896 (SPARC64_CP0_REGISTERS): New macro.
3897 (sparc64_pseudo_register_name): New function.
3898 (sparc64_register_name): Use sparc64_pseudo_register_name.
3899 (sparc64_pseudo_register_type): New function.
3900 (sparc64_register_type): Use sparc64_pseudo_register_type.
3901 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
3902 pseudo register numbers.
3903 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
3904 sparc64_store_arguments): Handle pseudo register numbers.
3905
6f8976bf
YQ
39062017-01-13 Yao Qi <yao.qi@linaro.org>
3907
3908 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
3909 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
3910 output.
3911 (getpkt_or_notif_sane_1): Likewise.
3912
e4241ace
YQ
39132017-01-13 Yao Qi <yao.qi@linaro.org>
3914
3915 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
3916 of CC. Pass "-x c++-header" instead of "-x c".
3917
3015c064
SM
39182017-01-12 Simon Marchi <simon.marchi@ericsson.com>
3919
3920 * remote.c (remote_can_async_p): Update comment.
3921
fde1b17d
SM
39222017-01-12 Simon Marchi <simon.marchi@ericsson.com>
3923
3924 * linux-nat.c (linux_nat_can_async_p): Update comment.
3925
ca1ca08b
SM
39262017-01-12 Simon Marchi <simon.marchi@ericsson.com>
3927
3928 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
3929
4ad2da73
SM
39302017-01-11 Simon Marchi <simon.marchi@ericsson.com>
3931
3932 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
3933
c8b23b3f
TT
39342017-01-10 Tom Tromey <tom@tromey.com>
3935
3936 * python/py-type.c (typy_legacy_template_argument): Update.
3937 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
3938 ~demangle_parse_info): Declare new members.
3939 (cp_demangled_name_to_comp): Return unique_ptr.
3940 (cp_demangled_name_parse_free)
3941 (make_cleanup_cp_demangled_name_parse_free)
3942 (cp_new_demangle_parse_info): Remove.
3943 * cp-support.c (do_demangled_name_parse_free_cleanup)
3944 (make_cleanup_cp_demangled_name_parse_free): Remove.
3945 (inspect_type, cp_canonicalize_string_full)
3946 (cp_canonicalize_string): Update.
3947 (mangled_name_to_comp): Change return type.
3948 (cp_class_name_from_physname, method_name_from_physname)
3949 (cp_func_name, cp_remove_params): Update.
3950 * cp-name-parser.y (demangle_parse_info): New constructor, from
3951 cp_new_demangle_parse_info.
3952 (~demangle_parse_info): New destructor, from
3953 cp_demangled_name_parse_free.
3954 (cp_merge_demangle_parse_infos): Update.
3955 (cp_demangled_name_to_comp): Change return type.
3956
1ac32117
TT
39572017-01-10 Tom Tromey <tom@tromey.com>
3958
3959 * top.c (prevent_dont_repeat): Change return type.
3960 * python/python.c (execute_gdb_command): Use std::string.
3961 Update.
3962 * guile/guile.c (gdbscm_execute_gdb_command): Update.
3963 * command.h (prevent_dont_repeat): Change return type.
3964 * breakpoint.c (bpstat_do_actions_1): Update.
3965
0cf08227
TT
39662017-01-10 Tom Tromey <tom@tromey.com>
3967
3968 * value.h (scoped_value_mark::~scoped_value_mark): Call
3969 free_to_mark.
3970 (scoped_value_mark::free_to_mark): New method.
3971 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
3972 scoped_value_mark.
3973
eb115069
TT
39742017-01-10 Tom Tromey <tom@tromey.com>
3975
3976 * python/py-value.c (valpy_dereference, valpy_referenced_value)
3977 (valpy_reference_value, valpy_const_value, valpy_get_address)
3978 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
3979 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
3980 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
3981 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
3982 scoped_value_mark.
3983 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
3984 * value.h (scoped_value_mark): New class.
3985
906768f9
TT
39862017-01-10 Tom Tromey <tom@tromey.com>
3987
3988 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
3989 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
3990 * psymtab.c (discard_psymtabs_upto): Remove.
3991 (make_cleanup_discard_psymtabs): Remove.
3992 (struct psymtab_state): Remove.
3993
bef155c3
TT
39942017-01-10 Tom Tromey <tom@tromey.com>
3995
3996 * record-full.c (record_full_save_cleanups): Remove.
3997 (record_full_save): Use gdb::unlinker.
3998 * gcore.c (do_bfd_delete_cleanup): Remove.
3999 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
4000 cleanups.
4001 * dwarf2read.c (unlink_if_set): Remove.
4002 (write_psymtabs_to_index): Use gdb::unlinker.
4003 * common/gdb_unlinker.h: New file.
4004
192b62ce
TT
40052017-01-10 Tom Tromey <tom@tromey.com>
4006
4007 * windows-tdep.c (windows_xfer_shared_library): Update.
4008 * windows-nat.c (windows_make_so): Update.
4009 * utils.h (make_cleanup_bfd_unref): Remove.
4010 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
4011 * symfile.h (symfile_bfd_open)
4012 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
4013 * symfile.c (read_symbols, symbol_file_add)
4014 (separate_debug_file_exists): Update.
4015 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
4016 (generic_load, reread_symbols): Update.
4017 * symfile-mem.c (symbol_file_add_from_memory): Update.
4018 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
4019 (spu_symbol_file_add_from_memory): Update.
4020 * solist.h (struct target_so_ops) <bfd_open>: Return
4021 gdb_bfd_ref_ptr.
4022 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
4023 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
4024 gdb_bfd_ref_ptr.
4025 (solib_map_sections, reload_shared_libraries_1): Update.
4026 * solib-svr4.c (enable_break): Update.
4027 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
4028 * solib-frv.c (enable_break2): Update.
4029 * solib-dsbt.c (enable_break): Update.
4030 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
4031 gdb_bfd_ref_ptr.
4032 (darwin_solib_get_all_image_info_addr_at_init): Update.
4033 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
4034 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
4035 * record-full.c (record_full_save): Update.
4036 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
4037 * procfs.c (insert_dbx_link_bpt_in_file): Update.
4038 * minidebug.c (find_separate_debug_file_in_section): Return
4039 gdb_bfd_ref_ptr.
4040 * machoread.c (macho_add_oso_symfile): Change abfd to
4041 gdb_bfd_ref_ptr.
4042 (macho_symfile_read_all_oso): Update.
4043 (macho_check_dsym): Return gdb_bfd_ref_ptr.
4044 (macho_symfile_read): Update.
4045 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
4046 (jit_bfd_try_read_symtab): Update.
4047 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4048 (gdb_bfd_openw, gdb_bfd_openr_iovec)
4049 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
4050 gdb_bfd_ref_ptr.
4051 (gdb_bfd_ref_policy): New struct.
4052 (gdb_bfd_ref_ptr): New typedef.
4053 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4054 (gdb_bfd_openw, gdb_bfd_openr_iovec)
4055 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
4056 gdb_bfd_ref_ptr.
4057 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
4058 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
4059 (gcore_command): Update.
4060 * exec.c (exec_file_attach): Update.
4061 * elfread.c (elf_symfile_read): Update.
4062 * dwarf2read.c (dwarf2_get_dwz_file): Update.
4063 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
4064 (open_and_init_dwo_file): Update.
4065 (open_dwp_file): Return gdb_bfd_ref_ptr.
4066 (open_and_init_dwp_file): Update.
4067 * corelow.c (core_open): Update.
4068 * compile/compile-object-load.c (compile_object_load): Update.
4069 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
4070 * coffread.c (coff_symfile_read): Update.
4071 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
4072 gdb_bfd_ref_ptr. Rename.
4073 (dump_bfd_file, restore_command): Update.
4074 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
4075 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
4076 (find_separate_debug_file_by_buildid): Update.
4077
50315b21
TT
40782017-01-10 Tom Tromey <tom@tromey.com>
4079
4080 * common/gdb_ref_ptr.h: New file.
4081 * python/py-ref.h (struct gdbpy_ref_policy): New.
4082 (gdbpy_ref): Now a typedef.
4083
fc4007c9
TT
40842017-01-10 Tom Tromey <tom@tromey.com>
4085
4086 * utils.h (make_cleanup_htab_delete): Don't declare.
4087 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
4088 Remove.
4089 * linespec.c (decode_compound_collector): Add constructor,
4090 destructor.
4091 (lookup_prefix_sym): Remove cleanup.
4092 (symtab_collector): Add constructor, destructor.
4093 (collect_symtabs_from_filename): Remove cleanup.
4094 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
4095 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4096 Use htab_up.
4097 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
4098 * dwarf2read.c (dw2_expand_symtabs_matching)
4099 (dw2_map_symbol_filenames, dwarf_decode_macros)
4100 (write_psymtabs_to_index): Use htab_up.
4101 * dwarf2loc.c (func_verify_no_selftailcall)
4102 (call_site_find_chain_1, func_verify_no_selftailcall)
4103 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
4104 std::vector, gdb::unique_xmalloc_ptr.
4105 (call_sitep): Remove typedef.
4106 (dwarf2_locexpr_baton_eval): Remove unused variable.
4107
8dbcee67
TT
41082017-01-10 Tom Tromey <tom@tromey.com>
4109
4110 * python/python-internal.h (make_cleanup_py_decref)
4111 (make_cleanup_py_xdecref): Don't declare.
4112 * python/py-utils.c (py_decref, make_cleanup_py_decref)
4113 (py_xdecref, make_cleanup_py_xdecref): Remove.
4114
13df46cc
TT
41152017-01-10 Tom Tromey <tom@tromey.com>
4116
4117 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
4118 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
4119
06fc9bf7
TT
41202017-01-10 Tom Tromey <tom@tromey.com>
4121
4122 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
4123
830a4934
TT
41242017-01-10 Tom Tromey <tom@tromey.com>
4125
4126 * python/py-utils.c (unicode_to_encoded_string)
4127 (python_string_to_target_string)
4128 (python_string_to_target_python_string)
4129 (python_string_to_host_string, gdbpy_obj_to_string)
4130 (get_addr_from_python): Use gdbpy_ref.
4131
4586d543
TT
41322017-01-10 Tom Tromey <tom@tromey.com>
4133
4134 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
4135 gdbpy_ref.
4136
59876f8f
TT
41372017-01-10 Tom Tromey <tom@tromey.com>
4138
4139 * python/python.c (eval_python_command, gdbpy_decode_line)
4140 (gdbpy_run_events, gdbpy_start_type_printers)
4141 (gdbpy_apply_type_printers): Use gdbpy_ref.
4142
97d83487
TT
41432017-01-10 Tom Tromey <tom@tromey.com>
4144
4145 * python/py-param.c (get_doc_string, compute_enum_values): Use
4146 gdbpy_ref.
4147
9205649a
TT
41482017-01-10 Tom Tromey <tom@tromey.com>
4149
4150 * python/py-inferior.c (find_thread_object, build_inferior_list):
4151 Use gdbpy_ref.
4152
74c49d45
TT
41532017-01-10 Tom Tromey <tom@tromey.com>
4154
4155 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
4156
16361ffb
TT
41572017-01-10 Tom Tromey <tom@tromey.com>
4158
4159 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
4160 gdbpy_ref.
4161
905f2cca
TT
41622017-01-10 Tom Tromey <tom@tromey.com>
4163
4164 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
4165 extra incref.
4166 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
4167 Use gdbpy_ref.
4168
64081434
TT
41692017-01-10 Tom Tromey <tom@tromey.com>
4170
4171 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
4172 gdbpy_ref.
4173
59e9e831
TT
41742017-01-10 Tom Tromey <tom@tromey.com>
4175
4176 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
4177 decref results of PyArg_ParseTupleAndKeywords.
4178
9de10f6d
TT
41792017-01-10 Tom Tromey <tom@tromey.com>
4180
4181 * python/python.c (python_run_simple_file): Use
4182 unique_xmalloc_ptr, gdbpy_ref.
4183
2bd5759d
TT
41842017-01-10 Tom Tromey <tom@tromey.com>
4185
4186 * python/py-prettyprint.c (print_stack_unless_memory_error)
4187 (print_string_repr, print_children): Use gdbpy_ref.
4188 (dummy_python_frame): New class.
4189 (dummy_python_frame::dummy_python_frame): Rename from
4190 push_dummy_python_frame.
4191 (py_restore_tstate): Remove.
4192
3b4e0e01
TT
41932017-01-10 Tom Tromey <tom@tromey.com>
4194
4195 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
4196
17a22718
TT
41972017-01-10 Tom Tromey <tom@tromey.com>
4198
4199 * python/python.c (ensure_python_env, restore_python_env):
4200 Remove.
4201 * python/python-internal.h (ensure_python_env): Don't declare.
4202 * varobj.h (varobj_ensure_python_env): Don't declare.
4203 * varobj.c (varobj_ensure_python_env): Remove.
4204
68cdc557
TT
42052017-01-10 Tom Tromey <tom@tromey.com>
4206
4207 * varobj.c (varobj_value_get_print_value): Use
4208 gdbpy_enter_varobj.
4209
1eba6383
TT
42102017-01-10 Tom Tromey <tom@tromey.com>
4211
4212 * python/py-prettyprint.c (print_string_repr, print_children):
4213 Update.
4214 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
4215 of "encoding".
4216 * varobj.c (varobj_value_get_print_value): Update.
4217 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
4218
bde7b3e3
TT
42192017-01-10 Tom Tromey <tom@tromey.com>
4220
4221 * varobj.c (varobj_get_display_hint)
4222 (dynamic_varobj_has_child_method, install_new_value_visualizer)
4223 (varobj_set_visualizer, free_variable): Use
4224 gdbpy_enter_varobj.
4225
a7785f8c
TT
42262017-01-10 Tom Tromey <tom@tromey.com>
4227
4228 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
4229 (do_finish_initialization): New function. Use gdbpy_ref.
4230 (gdbpy_finish_initialization): Use gdbpy_enter. Call
4231 do_finish_initialization.
4232
2865bfce
TT
42332017-01-10 Tom Tromey <tom@tromey.com>
4234
4235 * python/py-param.c (get_set_value, get_show_value): Use
4236 gdbpy_enter, gdbpy_ref.
4237
0e9dcc75
TT
42382017-01-10 Tom Tromey <tom@tromey.com>
4239
4240 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
4241
12a5cedd
TT
42422017-01-10 Tom Tromey <tom@tromey.com>
4243
4244 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
4245
788f2586
TT
42462017-01-10 Tom Tromey <tom@tromey.com>
4247
4248 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
4249 Use gdbpy_enter_varobj.
4250
6cd67bea
TT
42512017-01-10 Tom Tromey <tom@tromey.com>
4252
4253 * varobj.c (gdbpy_enter_varobj): New constructor.
4254 * python/python-internal.h (gdbpy_enter_varobj): New class.
4255 * python/py-varobj.c (py_varobj_get_iterator): Use
4256 gdbpy_enter_varobj.
4257
14b122bf
TT
42582017-01-10 Tom Tromey <tom@tromey.com>
4259
4260 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
4261 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
4262 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
4263 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
4264 unique_xmalloc_ptr.
4265 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
4266
bf1ca3b9
TT
42672017-01-10 Tom Tromey <tom@tromey.com>
4268
4269 * python/py-xmethods.c (invoke_match_method): Use
4270 gdbpy_ref.
4271
572a5524
TT
42722017-01-10 Tom Tromey <tom@tromey.com>
4273
4274 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
4275 gdbpy_enter, gdbpy_ref.
4276
396a78b6
TT
42772017-01-10 Tom Tromey <tom@tromey.com>
4278
4279 * python/python.c (python_interactive_command): Use gdbpy_enter.
4280
a88b13c7
TT
42812017-01-10 Tom Tromey <tom@tromey.com>
4282
4283 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
4284 gdbpy_ref.
4285
e9f0c363
TT
42862017-01-10 Tom Tromey <tom@tromey.com>
4287
4288 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
4289 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
4290
6349f452
TT
42912017-01-10 Tom Tromey <tom@tromey.com>
4292
4293 * utils.h (htab_deleter): New struct.
4294 (htab_up): New typedef.
4295 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
4296 gdbpy_enter, gdbpy_ref, htab_up.
4297
c0171de6
TT
42982017-01-10 Tom Tromey <tom@tromey.com>
4299
4300 * python/py-unwind.c (pending_frame_invalidate): Remove.
4301 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
4302
f18e226f
TT
43032017-01-10 Tom Tromey <tom@tromey.com>
4304
4305 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
4306 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
4307
c57af3f1
TT
43082017-01-10 Tom Tromey <tom@tromey.com>
4309
4310 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
4311
60e600ec
TT
43122017-01-10 Tom Tromey <tom@tromey.com>
4313
4314 * python/python.c (gdbpy_eval_from_control_command)
4315 (gdbpy_source_script, gdbpy_run_events)
4316 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
4317 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
4318 gdbpy_enter.
4319
bf7da5b0
TT
43202017-01-10 Tom Tromey <tom@tromey.com>
4321
4322 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
4323
2d38bced
TT
43242017-01-10 Tom Tromey <tom@tromey.com>
4325
4326 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
4327
07bc7329
TT
43282017-01-10 Tom Tromey <tom@tromey.com>
4329
4330 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
4331 (python_on_inferior_call_pre, python_on_inferior_call_post)
4332 (python_on_memory_change, python_on_register_change)
4333 (python_inferior_exit, python_new_objfile, add_thread_object)
4334 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
4335
6e7c365e
TT
43362017-01-10 Tom Tromey <tom@tromey.com>
4337
4338 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
4339 (bpfinishpy_handle_exit): Use gdbpy_enter.
4340
6ba0cd40
TT
43412017-01-10 Tom Tromey <tom@tromey.com>
4342
4343 * python/py-cmd.c (cmdpy_destroyer)
4344 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
4345 gdbpy_enter.
4346
de2dc875
TT
43472017-01-10 Tom Tromey <tom@tromey.com>
4348
4349 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
4350 gdbpy_enter.
4351 (gdbpy_breakpoint_has_cond): Likewise.
4352
4ecee2c4
TT
43532017-01-10 Tom Tromey <tom@tromey.com>
4354
4355 * python/python.c (gdbpy_enter): New constructor.
4356 (~gdbpy_enter): New destructor.
4357 (restore_python_env, ensure_python_env): Rewrite.
4358 * python/python-internal.h (gdbpy_enter): New class.
4359
37fce74f
TT
43602017-01-10 Tom Tromey <tom@tromey.com>
4361
4362 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
4363
53a0cca3
TT
43642017-01-10 Tom Tromey <tom@tromey.com>
4365
4366 * python/py-value.c (value_has_field, get_field_flag)
4367 (get_field_type, valpy_getitem, convert_value_from_python): Use
4368 gdbpy_ref.
4369
ff3724f5
TT
43702017-01-10 Tom Tromey <tom@tromey.com>
4371
4372 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
4373 gdbpy_ref.
4374
0700aea5
TT
43752017-01-10 Tom Tromey <tom@tromey.com>
4376
4377 * python/py-prettyprint.c (search_pp_list)
4378 (find_pretty_printer_from_objfiles)
4379 (find_pretty_printer_from_progspace)
4380 (find_pretty_printer_from_gdb, find_pretty_printer)
4381 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
4382 gdbpy_ref.
4383
1bb44c9f
TT
43842017-01-10 Tom Tromey <tom@tromey.com>
4385
4386 * python/py-param.c (call_doc_function): Use gdbpy_ref.
4387
87ce03fd
TT
43882017-01-10 Tom Tromey <tom@tromey.com>
4389
4390 * python/py-linetable.c (build_line_table_tuple_from_pcs)
4391 (ltpy_get_all_source_lines): Use gdbpy_ref.
4392
ee0a3fb8
TT
43932017-01-10 Tom Tromey <tom@tromey.com>
4394
4395 * python/py-framefilter.c (extract_sym, extract_value)
4396 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
4397 gdbpy_ref.
4398
bf2a52fa
TT
43992017-01-10 Tom Tromey <tom@tromey.com>
4400
4401 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
4402
f59fe7f8
TT
44032017-01-10 Tom Tromey <tom@tromey.com>
4404
4405 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
4406
80bd970a
TT
44072017-01-10 Tom Tromey <tom@tromey.com>
4408
4409 * python/py-function.c (convert_values_to_python, fnpy_init): Use
4410 gdbpy_ref.
4411
d1b3de2e
TT
44122017-01-10 Tom Tromey <tom@tromey.com>
4413
4414 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
4415
3bb43384
TT
44162017-01-10 Tom Tromey <tom@tromey.com>
4417
4418 * python/py-type.c (convert_field, make_fielditem, typy_fields)
4419 (typy_range): Use gdbpy_ref.
4420
abf5651e
TT
44212017-01-10 Tom Tromey <tom@tromey.com>
4422
4423 * python/py-threadevent.c (create_thread_event_object): Use
4424 gdbpy_ref.
4425 * python/py-stopevent.c (create_stop_event_object): Simplify.
4426 (emit_stop_event): Use gdbpy_ref.
4427 * python/py-signalevent.c (create_signal_event_object): Use
4428 gdbpy_ref.
4429 * python/py-newobjfileevent.c (create_new_objfile_event_object)
4430 (emit_new_objfile_event, create_clear_objfiles_event_object)
4431 (emit_clear_objfiles_event): Use gdbpy_ref.
4432 * python/py-infevents.c (create_inferior_call_event_object)
4433 (create_register_changed_event_object)
4434 (create_memory_changed_event_object, emit_inferior_call_event)
4435 (emit_memory_changed_event, emit_register_changed_event): Use
4436 gdbpy_ref.
4437 * python/py-exitedevent.c (create_exited_event_object)
4438 (emit_exited_event): Use gdbpy_ref.
4439 * python/py-event.h (evpy_emit_event): Remove
4440 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
4441 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
4442 * python/py-continueevent.c (emit_continue_event): Use
4443 gdbpy_ref.
4444 * python/py-breakpoint.c (gdbpy_breakpoint_created)
4445 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
4446 gdbpy_ref.
4447 * python/py-bpevent.c (create_breakpoint_event_object): Use
4448 gdbpy_ref.
4449
a68ff33e
TT
44502017-01-10 Tom Tromey <tom@tromey.com>
4451
4452 * python/py-ref.h: New file.
4453
7becfd03
SM
44542017-01-10 Simon Marchi <simon.marchi@ericsson.com>
4455
4456 * cli-out.c (cli_ui_out::do_redirect): Change return type to
4457 void.
4458 * cli-out.h (cli_ui_out::do_redirect): Likewise.
4459 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
4460 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
4461 * ui-out.c (ui_out::redirect): Likewise.
4462 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
4463 * cli/cli-logging.c (set_logging_redirect): Update call site of
4464 ui_out::redirect.
4465 (handle_redirections): Likewise.
4466 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
4467 * top.c (execute_command_to_string): Likewise.
4468 * utils.c (do_ui_out_redirect_pop): Likewise.
4469
df294654
SM
44702017-01-10 Simon Marchi <simon.marchi@ericsson.com>
4471
4472 * stack.c (_initialize_stack): Update "frame" command help message.
4473
f5e6296e
IB
44742017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
4475
4476 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
4477
0e2d6fa6
YQ
44782017-01-06 Yao Qi <yao.qi@linaro.org>
4479
4480 * x86-linux-nat.h: Include gdb_proc_service.h.
4481
44d6d3f9
YQ
44822017-01-06 Yao Qi <yao.qi@linaro.org>
4483
4484 * ser-base.h: Include serial.h.
4485
656731fe
YQ
44862017-01-06 Yao Qi <yao.qi@linaro.org>
4487
4488 * ppc-linux-tdep.h: Include ppc-tdep.h.
4489
1ca8f924
YQ
44902017-01-06 Yao Qi <yao.qi@linaro.org>
4491
4492 * nat/amd64-linux-siginfo.h: Include signal.h.
4493
bc3008c4
YQ
44942017-01-06 Yao Qi <yao.qi@linaro.org>
4495
4496 * nat/aarch64-linux-hw-point.h: Include break-common.h.
4497
66c80d03
YQ
44982017-01-06 Yao Qi <yao.qi@linaro.org>
4499
4500 * mi/mi-parse.h: Include mi-cmds.h.
4501
051d2dda
YQ
45022017-01-06 Yao Qi <yao.qi@linaro.org>
4503
4504 * inf-loop.c: Don't include "target.h".
4505 * inf-loop.h: Include it here.
4506
8018d34f
YQ
45072017-01-06 Yao Qi <yao.qi@linaro.org>
4508
4509 * dfp.h: Include "dboulest.h" and "expression.h".
4510
c0b8369c
YQ
45112017-01-06 Yao Qi <yao.qi@linaro.org>
4512
4513 * ax-gdb.h: Include "ax.h".
4514
ad5cba2a
YQ
45152017-01-06 Yao Qi <yao.qi@linaro.org>
4516
4517 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
4518 with nat/gdb_ptrace.h.
4519
1c33cd7f
YQ
45202017-01-05 Yao Qi <yao.qi@linaro.org>
4521
4522 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
4523 new line.
4524 (mips64_fbsd_sigframe_init): Likewise.
4525
c988ac1d
JB
45262017-01-04 John Baldwin <jhb@FreeBSD.org>
4527
4528 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
4529 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
4530
b268007c
JB
45312017-01-04 John Baldwin <jhb@FreeBSD.org>
4532
4533 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4534 * NEWS: Mention new FreeBSD/mips native configuration.
4535 * config/mips/fbsd.mh: New file.
4536 * configure.host: Add mips*-*-freebsd*.
4537 * mips-fbsd-nat.c: New file.
4538
387360da
JB
45392017-01-04 John Baldwin <jhb@FreeBSD.org>
4540
4541 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
4542 (ALLDEPFILES): Add mips-fbsd-tdep.c.
4543 * NEWS: Mention new FreeBSD/mips target.
4544 * configure.tgt: Add mips*-*-freebsd*.
4545 * mips-fbsd-tdep.c: New file.
4546 * mips-fbsd-tdep.h: New file.
4547
2aaaf250
YQ
45482017-01-04 Yao Qi <yao.qi@linaro.org>
4549
4550 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
4551 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
4552
61baf725
JB
45532017-01-01 Joel Brobecker <brobecker@adacore.com>
4554
6dbb839a 4555 Update copyright year range in all GDB files.
61baf725 4556
c113e7ff 45572017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 4558
c113e7ff 4559 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 4560
c113e7ff 4561For older changes see ChangeLog-2016.
c906108c
SS
4562\f
4563Local Variables:
4564mode: change-log
4565left-margin: 8
4566fill-column: 74
4567version-control: never
57da7796 4568coding: utf-8
c906108c 4569End:
This page took 2.095849 seconds and 4 git commands to generate.