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