1 2017-10-17 Yao Qi <yao.qi@linaro.org>
3 * Makefile.in: Remove one rule.
4 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6 2017-10-17 Yao Qi <yao.qi@linaro.org>
8 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
9 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
11 2017-10-17 Yao Qi <yao.qi@linaro.org>
13 * configure.srv: Rename arm.o with arch/arm.o.
15 2017-10-17 Yao Qi <yao.qi@linaro.org>
17 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
18 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
19 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
20 (arch-i386.o, arch-amd64.o): Remove rules.
22 Update POSTCOMPILE and COMPILE.pre.
23 * configure.ac: Invoke AC_CONFIG_COMMANDS.
24 * configure: Re-generated.
25 * configure.srv: Replace arch-i386.o with arch/i386.o.
26 Replace arch-amd64.o with arch/amd64.o.
28 2017-10-16 Yao Qi <yao.qi@linaro.org>
30 * configure: Regenerated.
32 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
34 * inferiors.h: (struct inferior_list): Remove.
35 (struct inferior_list_entry); Remove.
36 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
37 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
38 get_first_inferior): Remove.
39 (for_each_inferior, for_each_inferior_with_data, find_inferior,
40 find_inferior_id, find_inferior_in_random): Change signature.
41 * inferiors.c (all_threads): Change type to
42 std::list<thread_info *>.
43 (get_thread): Remove macro.
44 (find_inferior, find_inferior_id): Change signature, implement
46 (find_inferior_in_random): Change signature, implement using
47 find_thread_in_random.
48 (for_each_inferior, for_each_inferior_with_data): Change
49 signature, implement using for_each_thread.
50 (add_inferior_to_list, remove_inferior): Remove.
51 (add_thread, get_first_thread, thread_of_pid,
52 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
53 (get_first_inferior, one_inferior_p, clear_inferior_list):
55 (clear_inferiors, get_thread_process): Update.
56 * gdbthread.h: Include <list>.
57 (struct thread_info) <entry>: Remove field.
59 (all_threads): Change type to std::list<thread_info *>.
60 (get_first_inferior): Add doc.
61 (find_thread, for_each_thread, find_thread_in_random): New
63 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
64 * linux-arm-low.c (update_registers_callback): Update.
65 * linux-low.c (second_thread_of_pid_p): Update.
66 (kill_one_lwp_callback, linux_detach_lwp_callback,
67 delete_lwp_callback, status_pending_p_callback, same_lwp,
68 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
69 iterate_over_lwps, not_stopped_callback,
70 resume_stopped_resumed_lwps, count_events_callback,
71 select_singlestep_lwp_callback, select_event_lwp_callback,
72 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
73 suspend_and_send_sigstop_callback, wait_for_sigstop,
74 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
75 lwp_running, linux_set_resume_request, resume_status_pending_p,
76 need_step_over_p, start_step_over, linux_resume_one_thread,
77 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
78 reset_lwp_ptrace_options_callback): Update.
79 * linux-mips-low.c (update_watch_registers_callback): Update.
80 * regcache.c (regcache_invalidate_one, regcache_invalidate):
82 (free_register_cache_thread_one): Remove.
83 (regcache_release): Update.
84 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
85 handle_qxfer_threads_worker): Update.
86 (handle_query): Update, use list iterator.
87 (visit_actioned_threads, handle_pending_status,
88 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
89 clear_pending_status_callback, set_pending_status_callback,
90 find_status_pending_thread_callback, handle_status,
91 process_serial_event): Update.
92 * target.c (thread_search_callback): Update.
93 * thread-db.c (thread_db_get_tls_address): Update.
94 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
96 * win32-i386-low.c (update_debug_registers_callback): Update.
97 * win32-low.c (delete_thread_info, child_delete_thread,
98 continue_one_thread, suspend_one_thread,
99 get_child_debug_event): Adjust.
101 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
103 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
104 * inferiors.h: Include <list>.
105 (struct process_info) <entry>: Remove field.
107 (pid_of): Change macro to function.
108 (ptid_of, lwpid_of): Remove macro.
109 (all_processes): Change type to std::list<process_info *>.
110 (ALL_PROCESSES): Remove macro.
111 (for_each_process, find_process): New function.
112 * inferiors.c (all_processes): Change type to
113 std::list<process_info *>.
114 (find_thread_process): Adjust.
115 (add_process): Likewise.
116 (remove_process): Likewise.
117 (find_process_pid): Likewise.
118 (get_first_process): Likewise.
119 (started_inferior_callback): Remove.
120 (have_started_inferiors_p): Adjust.
121 (attached_inferior_callback): Remove.
122 (have_attached_inferiors_p): Adjust.
123 * linux-low.c (check_zombie_leaders): Likewise.
124 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
125 (x86_linux_update_xmltarget): Adjust.
126 * server.c (handle_query): Likewise.
127 (gdb_reattached_process): Remove.
128 (handle_status): Adjust.
129 (kill_inferior_callback): Likewise.
130 (detach_or_kill_inferior): Remove.
131 (print_started_pid): Likewise.
132 (print_attached_pid): Likewise.
133 (detach_or_kill_for_exit): Update.
134 (process_serial_event): Likewise.
135 * linux-arm-low.c (arm_new_fork): Likewise.
137 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
139 * dll.h: Include <list>.
140 (struct dll_info): Add constructor.
141 <entry>: Remove field.
142 (all_dlls): Change type to std::list<dll_info>.
143 * dll.c: Include <algorithm>.
144 (get_dll): Remove macro.
145 (all_dlls): Change type to std::list<dll_info *>.
146 (free_one_dll): Remove.
147 (match_dll): Likewise.
148 (loaded_dll): Adjust.
149 (unloaded_dll): Adjust to all_dlls type change, use
150 std::find_if. Inline code from match_dll.
151 (clear_dlls): Adjust to all_dlls type change.
152 * server.c (emit_dll_description): Remove.
153 (handle_qxfer_libraries): Adjust to all_dlls type change,
154 integrate emit_dll_description's functionality.
156 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
158 * linux-low.h (struct linux_target_ops) <delete_process>: New
160 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
161 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
162 (struct linux_target_ops): Add delete_process callback.
163 * linux-arm-low.c (arm_delete_process): New.
164 (struct linux_target_ops): Add delete_process callback.
165 * linux-bfin-low.c (struct linux_target_ops): Likewise.
166 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
167 * linux-m32r-low.c (struct linux_target_ops): Likewise.
168 * linux-mips-low.c (mips_linux_delete_process): New.
169 (struct linux_target_ops): Add delete_process callback.
170 * linux-ppc-low.c (struct linux_target_ops): Likewise.
171 * linux-s390-low.c (struct linux_target_ops): Likewise.
172 * linux-sh-low.c (struct linux_target_ops): Likewise.
173 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
174 * linux-tile-low.c (struct linux_target_ops): Likewise.
175 * linux-x86-low.c (x86_linux_delete_process): New.
176 (struct linux_target_ops): Add delete_process callback.
177 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
179 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
181 * linux-aarch64-low.c (the_low_target): Add thread delete
183 * linux-arm-low.c (arm_delete_thread): New function.
184 (the_low_target): Add thread delete callback.
185 * linux-bfin-low.c (the_low_target): Likewise.
186 * linux-crisv32-low.c (the_low_target): Likewise.
187 * linux-low.c (delete_lwp): Invoke delete_thread callback if
189 * linux-low.h (struct linux_target_ops) <delete_thread>: New
191 * linux-m32r-low.c (the_low_target): Add thread delete callback.
192 * linux-mips-low.c (mips_linux_delete_thread): New function.
193 (the_low_target): Add thread delete callback.
194 * linux-ppc-low.c (the_low_target): Likewise.
195 * linux-s390-low.c (the_low_target): Likewise.
196 * linux-sh-low.c (the_low_target): Likewise.
197 * linux-tic6x-low.c (the_low_target): Likewise.
198 * linux-tile-low.c (the_low_target): Likewise.
199 * linux-x86-low.c (the_low_target): Likewise.
200 * linux-xtensa-low.c (the_low_target): Likewise.
202 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
204 * win32-low.c: Include "common-inferior.h".
206 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
208 * inferiors.c (set_inferior_cwd): New function.
209 * server.c (handle_general_set): Handle QSetWorkingDir packet.
210 (handle_query): Inform that QSetWorkingDir is supported.
211 * win32-low.c (create_process): Pass the inferior's cwd to
214 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
216 * inferiors.c (current_inferior_cwd): New global variable.
217 (get_inferior_cwd): New function.
218 * inferiors.h (struct process_info) <cwd>: New field.
220 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
222 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
223 (OBS): Add gdb_tilde_expand.o.
225 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
227 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
228 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
230 2017-09-29 Pedro Alves <palves@redhat.com>
232 * ax.c (gdb_parse_agent_expr): Constify.
233 * ax.h (gdb_parse_agent_expr): Constify.
234 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
236 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
237 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
238 * remote-utils.h (read_ptid): Constify.
239 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
240 (process_point_options, process_serial_event): Constify.
241 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
242 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
243 (cmd_qtbuffer): Constify.
245 2017-09-29 Pedro Alves <palves@redhat.com>
247 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
250 2017-09-29 Pedro Alves <palves@redhat.com>
252 * linux-low.c (handle_extended_wait): Pass parent thread instead
253 of process to thread_db_notice_clone.
254 * linux-low.h (thread_db_notice_clone): Replace parent process
255 parameter with parent thread parameter.
256 * thread-db.c (find_one_thread): Add comment.
257 (thread_db_notice_clone): Replace parent process parameter with
258 parent thread parameter. Temporarily switch to the parent thread.
260 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
262 * gdbthread.h: Include "common-gdbthread.h".
263 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
264 "if" when validating the ptid.
265 * remote-utils.c: Include "gdbthread.h".
266 (prepare_resume_reply): Use "switch_to_thread".
267 * target.c (done_accessing_memory): Likewise.
269 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
271 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
272 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
273 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
274 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
275 s390x-gs-linux64-ipa.o to ipa_obj.
276 * linux-s390-low.c (HWCAP_S390_GS): New define.
277 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
279 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
280 (s390_arch_setup): Check for guarded-storage support and choose
282 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
283 init_registers_s390x_gs_linux64.
284 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
286 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
287 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
289 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
291 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
293 2017-09-21 Kevin Buettner <kevinb@redhat.com>
295 * linux-low.h (struct lwp_info): Add new field, thread_handle.
296 (thread_db_thread_handle): Declare.
297 * linux-low.c (linux_target_ops): Initialize thread_handle.
298 * server.c (handle_qxfer_threads_worker): Add support for
300 * target.h (struct target_ops): Add new function pointer,
302 (target_thread_handle): Define.
303 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
305 (thread_db_thread_handle): New function.
307 2017-09-21 Kevin Buettner <kevinb@redhat.com>
309 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
310 * linux-low.h (thread_db_notice_clone): Declare.
311 * thread-db.c (thread_db_notice_clone): New function.
313 2017-09-21 Pedro Alves <palves@redhat.com>
315 * server.c (gdb_read_memory, handle_status, process_serial_event)
316 (handle_serial_event, handle_target_event): Adjust to
317 set_desired_thread prototype change.
318 * target.c (set_desired_thread): Remove 'use_general' parameter
320 * target.h (set_desired_thread): Remove 'use_general' parameter.
322 2017-09-20 Tom Tromey <tom@tromey.com>
324 * target.c (target_terminal::terminal_state): Define.
325 (target_terminal::init): Rename from target_terminal_init.
326 (target_terminal::inferior): Rename from
327 target_terminal_inferior.
328 (target_terminal::ours): Rename from target_terminal_ours.
329 (target_terminal::ours_for_output, target_terminal::info): New.
331 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
333 * server.c (accumulate_file_name_length): Remove.
334 (emit_dll_description): Adjust to std::string change.
335 (handle_qxfer_libraries): Use std::string to hold document.
337 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
339 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
340 return type of xml_escape_text.
341 * server.c (emit_dll_description): Likewise.
343 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
345 * server.c (captured_main): Accept argument for --selftest.
346 Update run_tests call.
347 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
348 when registering selftests.
350 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
352 * regcache.c (get_thread_regcache): Update code to use "std::vector"
353 instead of "VEC" for "target_desc.reg_defs".
354 (regcache_cpy): Likewise.
355 (registers_to_string): Likewise.
356 (registers_from_string): Likewise.
357 (find_regno): Likewise.
358 (supply_regblock): Likewise.
359 (regcache_raw_read_unsigned): Likewise.
360 * tdesc.c (init_target_desc): Likewise.
361 (tdesc_create_reg): Likewise.
362 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
363 (struct target_desc) <reg_defs>: Convert to "std::vector".
364 (target_desc): Do not initialize "reg_defs".
365 (~target_desc): Update code to use "std::vector" instead of "VEC"
366 for "target_desc.reg_defs".
367 (operator==): Likewise.
369 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
371 * inferiors.h (thread_to_gdb_id): Remove.
372 * inferiors.c (thread_to_gdb_id): Remove.
373 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
374 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
375 lynx_store_registers, lynx_read_memory, lynx_write_memory):
377 * nto-low.c (nto_fetch_registers, nto_store_registers,
378 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
380 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
382 * inferiors.h (gdb_id_to_thread_id): Remove.
383 * inferiors.c (gdb_id_to_thread_id): Remove.
384 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
385 removal. Move pid declaration closer to where it's used.
387 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
389 * server.c (handle_detach): New function.
390 (process_serial_event): Move code out, call handle_detach.
392 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
394 * server.c (require_running): Rename to ...
395 (require_running_or_return): ... this ...
396 (require_running_or_break): ... and this.
397 (handle_query, process_serial_event): Adjust.
399 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
401 * linux-low.c (linux_set_resume_request): Remove unused
404 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
406 * server.c (first_thread_of): Remove.
407 (process_serial_event): Replace usage of first_thread_of with
408 find_any_thread_of_pid.
409 * tracepoint.c (same_process_p): Remove.
410 (gdb_agent_about_to_close): Replace usage of same_process_p with
411 find_any_thread_of_pid.
412 * linux-x86-low.c (same_process_callback): Remove.
413 (x86_arch_setup_process_callback): Replace usage of
414 same_process_callback with find_any_thread_of_pid.
415 * thread-db.c (any_thread_of): Remove.
416 (switch_to_process): Replace usage of any_thread_of with
417 find_any_thread_of_pid.
418 * inferiors.c (thread_pid_matches_callback): Remove.
419 (find_thread_process): Adjust to use find_any_thread_of_pid.
421 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
423 * regcache.c (get_thread_regcache): Guard calls to "memset"
426 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
428 * linux-low.c (handle_extended_wait): Use
429 "allocate_target_description" instead of "XNEW".
430 * linux-x86-low.c (initialize_low_arch): Likewise.
432 2017-09-05 Yao Qi <yao.qi@linaro.org>
434 * configure.srv (srv_i386_regobj): Remove.
435 (srv_amd64_regobj): Remove.
436 (srv_regobj): Set it to "" for x86 non-linux targets.
437 * linux-x86-tdesc.c (i386_linux_read_description):
438 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
439 (init_registers_i386): Remove the declaration.
440 (tdesc_i386): Remove the declaration.
441 (lynx_i386_arch_setup): Call i386_create_target_description.
442 * nto-x86-low.c: Likewise.
443 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
444 [!__x86_64__]: include arch/i386.h.
445 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
447 2017-09-05 Yao Qi <yao.qi@linaro.org>
449 * configure.srv (srv_amd64_linux_xmlfiles): Remove
450 i386/amd64-XXX-linux from it.
452 2017-09-05 Yao Qi <yao.qi@linaro.org>
454 * configure.srv: Empty srv_amd64_linux_regobj if $development is
456 (ipa_amd64_linux_regobj): Remove.
457 (ipa_x32_linux_regobj): Remove.
459 2017-09-05 Yao Qi <yao.qi@linaro.org>
461 * Makefile.in (arch-amd64.o): New rule.
462 * configure.srv: Append arch-amd64.o.
463 * linux-amd64-ipa.c: Include common/x86-xstate.h.
464 (get_ipa_tdesc): Call amd64_linux_read_description.
465 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
466 and init_registers_amd64_XXX.
467 * linux-x86-low.c (x86_linux_read_description): Call
468 amd64_linux_read_description.
469 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
470 (initialize_low_arch): Don't call init_registers_x32_XXX and
471 init_registers_amd64_XXX.
472 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
474 [__x86_64__] (amd64_tdesc_test): New function.
475 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
476 and init_registers_amd64_XXX.
477 * linux-x86-tdesc.c: Include arch/amd64.h.
478 (xcr0_to_tdesc_idx): New function.
479 (i386_linux_read_description): New function.
480 (amd64_get_ipa_tdesc_idx): New function.
481 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
482 (amd64_get_ipa_tdesc): Declare.
484 2017-09-05 Yao Qi <yao.qi@linaro.org>
486 * configure.srv (srv_i386_linux_xmlfiles): Remove
487 i386/i386-XXX-linux.xml from it.
489 2017-09-05 Yao Qi <yao.qi@linaro.org>
491 * configure.srv: Set srv_i386_linux_regobj empty if $development
493 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
494 initialize_low_tdesc.
495 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
496 with #if initialize_low_tdesc.
497 * linux-x86-tdesc-selftest.c: New file.
498 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
500 2017-09-05 Yao Qi <yao.qi@linaro.org>
502 * Makefile.in (arch-i386.o): New rule.
503 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
504 (x86_64-*-linux*): Likewise.
505 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
507 (i386_linux_read_description): Remove code and call
508 i386_create_target_description.
509 * tdesc.c (allocate_target_description): New function.
510 * tdesc.h (set_tdesc_architecture): Remove declaration.
511 (set_tdesc_osabi): Likewise.
513 2017-09-05 Yao Qi <yao.qi@linaro.org>
515 * linux-x86-tdesc.c: Don't include <inttypes.h>.
516 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
517 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
519 * server.c (get_features_xml): Call tdesc_get_features_xml.
520 * tdesc.c (set_tdesc_architecture): New function.
521 (set_tdesc_osabi): New function.
522 (tdesc_get_features_xml): New function.
523 (tdesc_create_feature): Add an argument.
524 * tdesc.h (struct target_desc) <features>: New field.
525 <arch, osabi>: New field.
526 (~target_desc): xfree features, arch, and osabi.
527 (target_desc::oerator==): Don't compare .xmltarget.
528 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
529 (set_tdesc_osabi): Likewise.
530 (tdesc_get_features_xml): Likewise.
532 2017-09-05 Yao Qi <yao.qi@linaro.org>
534 * linux-x86-tdesc.c: Include selftest.h.
535 (i386_tdesc_test): New function.
536 (initialize_low_tdesc): Call selftests::register_test.
537 * tdesc.h: Include regdef.h.
538 (target_desc): Override operator == and !=.
540 2017-09-05 Yao Qi <yao.qi@linaro.org>
542 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
544 * linux-i386-ipa.c: Include common/x86-xstate.h
545 (get_ipa_tdesc): Call i386_linux_read_description.
546 (initialize_low_tracepoint): Don't call init_registers_XXX
547 functions, call initialize_low_tdesc instead.
548 * linux-x86-low.c (x86_linux_read_description): Call
549 i386_linux_read_description.
550 (initialize_low_arch): Don't call init_registers_i386_XXX
551 functions, call initialize_low_tdesc.
552 * linux-x86-tdesc.c: New file.
553 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
554 (i386_get_ipa_tdesc_idx): Declare.
555 (i386_get_ipa_tdesc): Declare.
556 (initialize_low_tdesc): Declare.
558 2017-09-05 Yao Qi <yao.qi@linaro.org>
560 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
563 2017-09-05 Yao Qi <yao.qi@linaro.org>
565 * Makefile.in (IPA_OBJS): Add vec-ipa.o
566 * regcache.c (get_thread_regcache): Use VEC_length.
567 (init_register_cache): Likewise.
568 (regcache_cpy): Likewise.
569 (registers_to_string): Iterate reg_defs via VEC_iterate.
570 (find_regno): Likewise.
571 (find_register_by_number): Use VEC_index.
572 (register_size): Call find_register_by_number.
573 (register_data): Call find_register_by_number.
574 (supply_regblock): Use VEC_length.
575 (regcache_raw_read_unsigned): Likewise.
576 * tdesc.c (init_target_desc): Iterate reg_defs via
578 (default_description): Update initializer.
579 (copy_target_description): Don't update field num_registers.
580 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
581 <num_registers>: Remove.
583 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
585 * Makefile.in (.SECONDARY): Define target.
587 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
589 * linux-low.c (linux_wait_1): Adjust.
590 * server.c (queue_stop_reply_callback): Adjust.
592 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
594 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
595 QEnvironmentUnset and QEnvironmentReset packets.
596 (handle_query): Inform remote that QEnvironmentHexEncoded,
597 QEnvironmentUnset and QEnvironmentReset are supported.
599 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
601 * inferiors.h (inferior_target_data): Rename to ...
602 (thread_target_data): ... this.
603 (inferior_regcache_data): Rename to ...
604 (thread_regcache_data): ... this.
605 (set_inferior_regcache_data): Rename to ...
606 (set_thread_regcache_data): ... this.
607 * inferiors.c (inferior_target_data): Rename to ...
608 (thread_target_data): ... this.
609 (inferior_regcache_data): Rename to ...
610 (thread_regcache_data): ... this.
611 (set_inferior_regcache_data): Rename to ...
612 (set_thread_regcache_data): ... this.
613 (free_one_thread): Update.
614 * linux-low.h (get_thread_lwp): Update.
615 * regcache.c (get_thread_regcache): Update.
616 (regcache_invalidate_thread): Update.
617 (free_register_cache_thread): Update.
618 * win32-i386-low.c (update_debug_registers_callback): Update.
619 (win32_get_current_dr): Update.
620 * win32-low.c (thread_rec): Update.
621 (delete_thread_info): Update.
622 (continue_one_thread): Update.
623 (suspend_one_thread): Update.
625 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
627 * inferiors.c (set_inferior_target_data): Remove.
628 * inferiors.h (set_inferior_target_data): Remove.
630 2017-08-18 Yao Qi <yao.qi@linaro.org>
632 * Makefile.in (OBS): Add selftest.o.
633 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
634 * configure, config.in: Re-generated.
635 * server.c: Include common/sefltest.h.
636 (captured_main): Handle option --selftest.
638 2017-08-09 Yao Qi <yao.qi@linaro.org>
640 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
641 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
642 i386-avx-mpx.o and i386-mmx.o.
643 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
644 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
645 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
646 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
647 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
648 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
649 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
650 i386/amd64-avx-mpx.xml.
652 2017-08-09 Yao Qi <yao.qi@linaro.org>
654 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
655 and x32-avx-avx512.o.
656 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
657 i386/x32-avx-avx512.xml.
659 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
661 * tracepoint.h (enum class fast_tpoint_collect_result): New
663 (fast_tracepoint_collecting): Change return type to
664 fast_tpoint_collect_result.
665 * tracepoint.c (fast_tracepoint_collecting): Likewise.
666 * linux-low.h: Include tracepoint.h.
667 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
668 fast_tpoint_collect_result.
669 * linux-low.c (handle_tracepoints): Adjust.
670 (linux_fast_tracepoint_collecting): Change return type to
671 fast_tpoint_collect_result.
672 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
673 linux_wait_1, stuck_in_jump_pad_callback,
674 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
675 proceed_one_lwp): Adjust to type change.
677 2017-07-10 Yao Qi <yao.qi@linaro.org>
679 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
681 2017-06-29 Yao Qi <yao.qi@linaro.org>
683 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
685 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
687 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
689 * Makefile.in (IPA_OBJS): Sort and format one item per line.
691 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
693 * linux-low.c (linux_create_inferior): Adjust code to access the
694 environment information via 'gdb_environ' class.
695 * lynx-low.c (lynx_create_inferior): Likewise.
696 * server.c (our_environ): Make it an instance of 'gdb_environ'.
697 (get_environ): Return a pointer to 'our_environ'.
698 (captured_main): Initialize 'our_environ'.
699 * server.h (get_environ): Adjust prototype.
700 * spu-low.c (spu_create_inferior): Adjust code to access the
701 environment information via 'gdb_environ' class.
703 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
705 * linux-low.c (linux_read_memory, linux_write_memory): Remove
706 usage of "register" keyword.
708 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
710 * configure: Re-generate.
712 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
714 * configure: Re-generate.
716 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
718 * Makefile.in (COMPILE.pre): Add "-x c++".
720 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
722 * fork-child.c: Conditionally include <signal.h>.
724 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
726 * server.c (handle_general_set): Handle new packet
728 (handle_query): Add "QStartupWithShell" to the list of supported
730 (gdbserver_usage): Add help text explaining the
731 new "--startup-with-shell" and "--no-startup-with-shell" CLI
733 (captured_main): Recognize and act upon the presence of the new
736 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
737 Pedro Alves <palves@redhat.com>
739 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
740 * configure: Regenerate.
741 * configure.srv (srv_linux_obj): Add "fork-child.o" and
743 (i[34567]86-*-lynxos*): Likewise.
744 (spu*-*-*): Likewise.
745 * fork-child.c: New file.
746 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
748 (linux_ptrace_fun): New function.
749 (linux_create_inferior): Adjust function prototype to reflect
750 change on "target.h". Adjust function code to use
752 (linux_request_interrupt): Delete "signal_pid".
753 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
754 (lynx_ptrace_fun): New function.
755 (lynx_create_inferior): Adjust function prototype to reflect
756 change on "target.h". Adjust function code to use
758 * nto-low.c (nto_create_inferior): Adjust function prototype and
759 code to reflect change on "target.h". Update comments.
760 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
761 "common-terminal.h" and "environ.h".
762 (terminal_fd): Moved to fork-child.c.
763 (old_foreground_pgrp): Likewise.
764 (restore_old_foreground_pgrp): Likewise.
765 (last_status): Make it global.
766 (last_ptid): Likewise.
767 (our_environ): New variable.
768 (startup_with_shell): Likewise.
769 (program_name): Likewise.
770 (program_argv): Rename to...
771 (program_args): ...this.
772 (wrapper_argv): New variable.
773 (start_inferior): Delete function.
774 (get_exec_wrapper): New function.
775 (get_exec_file): Likewise.
776 (get_environ): Likewise.
777 (prefork_hook): Likewise.
778 (post_fork_inferior): Likewise.
779 (postfork_hook): Likewise.
780 (postfork_child_hook): Likewise.
781 (handle_v_run): Update code to deal with arguments coming from the
782 remote host. Update calls from "start_inferior" to
784 (captured_main): Likewise. Initialize environment variable. Call
786 * server.h (post_fork_inferior): New prototype.
787 (get_environ): Likewise.
788 (last_status): Declare.
789 (last_ptid): Likewise.
790 (signal_pid): Likewise.
791 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
792 (spu_ptrace_fun): New function.
793 (spu_create_inferior): Adjust function prototype to reflect change
794 on "target.h". Adjust function code to use "fork_inferior".
795 * target.c (target_terminal_init): New function.
796 (target_terminal_inferior): Likewise.
797 (target_terminal_ours): Likewise.
798 * target.h: Include <vector>.
799 (struct target_ops) <create_inferior>: Update prototype.
800 (create_inferior): Update macro.
801 * utils.c (gdb_flush_out_err): New function.
802 * win32-low.c (win32_create_inferior): Adjust function prototype
803 and code to reflect change on "target.h".
805 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
807 * inferiors.c (switch_to_thread): New function.
809 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
811 * Makefile.in (SFILE): Add "common/job-control.c".
812 (OBS): Add "job-control.o".
814 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
816 * Makefile: Remove "@host_makefile_frag@".
818 2017-05-05 Pedro Alves <palves@redhat.com>
820 * configure: Regenerate.
822 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
824 * configure: Regenerate.
826 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
828 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
829 software_single_step change of return type to
830 std::vector<CORE_ADDR>.
831 * linux-low.c (install_software_single_step_breakpoints):
833 * linux-low.h (install_software_single_step_breakpoints):
836 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
838 * remote-utils.c: Include "gdb_termios.h" instead of
840 * terminal.h: Delete file.
842 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
844 * server.c: Include <vector>.
845 <program_argv, wrapper_argv>: Convert to std::vector.
846 (start_inferior): Rewrite function to use C++.
847 (handle_v_run): Likewise. Update code that calculates the argv
848 based on the vRun packet; use C++.
849 (captured_main): Likewise.
851 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
853 * server.c (handle_v_cont): Initialize thread_resume::thread
856 2017-04-05 Pedro Alves <palves@redhat.com>
858 * configure: Regenerate.
860 2017-04-05 Pedro Alves <palves@redhat.com>
862 * gdbreplay.c (sync_error): Constify.
863 * linux-x86-low.c (push_opcode): Constify.
865 2017-04-05 Pedro Alves <palves@redhat.com>
867 * win32-low.c (get_child_debug_event)
868 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
869 Report TARGET_WAITKIND_SPURIOUS instead.
871 2017-04-05 Pedro Alves <palves@redhat.com>
873 * remote-utils.c (remote_prepare, remote_open): Constify.
874 * remote-utils.h (remote_prepare, remote_open): Constify.
875 * server.c (captured_main): Constify 'port' handling.
877 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
879 * Makefile.in (clean): Clear .deps.
881 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
883 * .gitignore: Remove generated files, replace with wildcard.
884 * (clean): Replace removal of generated files with wildcard.
885 (version.c): Replace with...
886 (version-generated.c): ...this.
887 (xml-builtin.c): Replace with...
888 (xml-builtin-generated.c): ...this.
889 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
890 (%.c: *regformats*): Replace with...
891 (%-generated.c: *regformats*): ...this.
893 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
895 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
896 (xtensa_fill_gregset): Call collect_register_by_name for
898 (xtensa_store_gregset): Call supply_register_by_name for
901 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
903 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
904 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
905 (xtensa_store_gregset): Call supply_register for all registers in
906 a0_regnum..a0_regnum + C0_NREGS range.
908 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
910 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
911 (ax-ipa.o: ax.c): Remove.
912 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
913 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
914 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
915 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
916 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
918 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
920 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
921 (print-utils-ipa.o: ../common/print-utils.c): Remove.
922 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
923 (errors-ipa.o: ../common/errors.c): Remove.
924 (format-ipa.o: ../common/format.c): Remove.
925 (common-utils-ipa.o: ../common/common-utils.c): Remove.
927 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
929 * Makefile.in (%-ipa.o: %.c): New rule.
930 (tracepoint-ipa.o: tracepoint.c): Remove.
931 (utils-ipa.o: utils.c): Remove.
932 (remote-utils-ipa.o: remote-utils.c): Remove.
933 (regcache-ipa.o: regcache.c): Remove.
934 (i386-linux-ipa.o: i386-linux.c): Remove.
935 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
936 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
937 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
938 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
939 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
940 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
941 (amd64-linux-ipa.o: amd64-linux.c): Remove.
942 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
943 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
944 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
945 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
946 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
947 (aarch64-ipa.o: aarch64.c): Remove.
948 (s390-linux32-ipa.o: s390-linux32.c): Remove.
949 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
950 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
951 (s390-linux64-ipa.o: s390-linux64.c): Remove.
952 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
953 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
954 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
955 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
956 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
957 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
958 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
959 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
960 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
961 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
962 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
963 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
964 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
965 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
966 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
967 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
968 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
969 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
970 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
971 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
972 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
973 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
974 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
975 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
976 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
977 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
978 (tdesc-ipa.o: tdesc.c): Remove.
979 (x32-linux-ipa.o: x32-linux.c): Remove.
980 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
981 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
983 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
985 * Makefile.in (%.o: ../arch/%.c): New rule.
986 (arm.o: ../arch/arm.c): Remove.
987 (arm-linux.o: ../arch/arm-linux.c): Remove.
988 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
989 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
991 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
993 * Makefile.in (%.o: ../nat/%.c): New rule.
994 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
995 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
996 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
997 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
998 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
999 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1000 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1001 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1002 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1003 (linux-personality.o: ../nat/linux-personality.c): Remove.
1004 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1005 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1006 (x86-linux.o: ../nat/x86-linux.c): Remove.
1007 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1008 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1010 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1012 * Makefile.in (%.o: ../common/%.c): New rule.
1013 (signals.o: ../common/signals.c): Remove.
1014 (print-utils.o: ../common/print-utils.c): Remove.
1015 (rsp-low.o: ../common/rsp-low.c): Remove.
1016 (common-utils.o: ../common/common-utils.c): Remove.
1017 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1018 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1019 (vec.o: ../common/vec.c): Remove.
1020 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1021 (xml-utils.o: ../common/xml-utils.c): Remove.
1022 (ptid.o: ../common/ptid.c): Remove.
1023 (buffer.o: ../common/buffer.c): Remove.
1024 (format.o: ../common/format.c): Remove.
1025 (filestuff.o: ../common/filestuff.c): Remove.
1026 (agent.o: ../common/agent.c): Remove.
1027 (errors.o: ../common/errors.c): Remove.
1028 (environ.o: ../common/environ.c): Remove.
1029 (common-debug.o: ../common/common-debug.c): Remove.
1030 (cleanups.o: ../common/cleanups.c): Remove.
1031 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1032 (fileio.o: ../common/fileio.c): Remove.
1033 (common-regcache.o: ../common/common-regcache.c): Remove.
1034 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1035 (new-op.o: ../common/new-op.c): Remove.
1036 (btrace-common.o: ../common/btrace-common.c): Remove.
1038 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1040 * Makefile.in (%.o: ../target/%.c): New rule.
1041 (waitstatus.o: ../target/waitstatus.c): Remove.
1043 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1046 (%.c: ../regformats/%.dat,
1047 (%.c: ../regformats/arm/%.dat,
1048 (%.c: ../regformats/i386/%.dat,
1049 (%.c: ../regformats/rs6000/%.dat): New rules.
1050 (aarch64.c): Remove.
1051 (reg-arm.c): Remove.
1052 (arm-with-iwmmxt.c): Remove.
1053 (arm-with-vfpv2.c): Remove.
1054 (arm-with-vfpv3.c): Remove.
1055 (arm-with-neon.c): Remove.
1056 (reg-bfin.c): Remove.
1057 (reg-cris.c): Remove.
1058 (reg-crisv32.c): Remove.
1060 (i386-linux.c): Remove.
1061 (i386-avx.c): Remove.
1062 (i386-avx-linux.c): Remove.
1063 (i386-avx-avx512.c): Remove.
1064 (i386-avx-avx512-linux.c): Remove.
1065 (i386-mpx.c): Remove.
1066 (i386-mpx-linux.c): Remove.
1067 (i386-avx-mpx-avx512-pku.c): Remove.
1068 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1069 (i386-avx-mpx.c): Remove.
1070 (i386-avx-mpx-linux.c): Remove.
1071 (i386-mmx.c): Remove.
1072 (i386-mmx-linux.c): Remove.
1073 (reg-ia64.c): Remove.
1074 (reg-m32r.c): Remove.
1075 (reg-m68k.c): Remove.
1077 (mips-linux.c): Remove.
1078 (mips-dsp-linux.c): Remove.
1079 (mips64-linux.c): Remove.
1080 (mips64-dsp-linux.c): Remove.
1081 (nios2-linux.c): Remove.
1082 (powerpc-32.c): Remove.
1083 (powerpc-32l.c): Remove.
1084 (powerpc-altivec32l.c): Remove.
1085 (powerpc-cell32l.c): Remove.
1086 (powerpc-vsx32l.c): Remove.
1087 (powerpc-isa205-32l.c): Remove.
1088 (powerpc-isa205-altivec32l.c): Remove.
1089 (powerpc-isa205-vsx32l.c): Remove.
1090 (powerpc-e500l.c): Remove.
1091 (powerpc-64l.c): Remove.
1092 (powerpc-altivec64l.c): Remove.
1093 (powerpc-cell64l.c): Remove.
1094 (powerpc-vsx64l.c): Remove.
1095 (powerpc-isa205-64l.c): Remove.
1096 (powerpc-isa205-altivec64l.c): Remove.
1097 (powerpc-isa205-vsx64l.c): Remove.
1098 (s390-linux32.c): Remove.
1099 (s390-linux32v1.c): Remove.
1100 (s390-linux32v2.c): Remove.
1101 (s390-linux64.c): Remove.
1102 (s390-linux64v1.c): Remove.
1103 (s390-linux64v2.c): Remove.
1104 (s390-te-linux64.c): Remove.
1105 (s390-vx-linux64.c): Remove.
1106 (s390-tevx-linux64.c): Remove.
1107 (s390x-linux64.c): Remove.
1108 (s390x-linux64v1.c): Remove.
1109 (s390x-linux64v2.c): Remove.
1110 (s390x-te-linux64.c): Remove.
1111 (s390x-vx-linux64.c): Remove.
1112 (s390x-tevx-linux64.c): Remove.
1113 (tic6x-c64xp-linux.c): Remove.
1114 (tic6x-c64x-linux.c): Remove.
1115 (tic6x-c62x-linux.c): Remove.
1117 (reg-sparc64.c): Remove.
1118 (reg-spu.c): Remove.
1120 (amd64-linux.c): Remove.
1121 (amd64-avx.c): Remove.
1122 (amd64-avx-linux.c): Remove.
1123 (amd64-avx-avx512.c): Remove.
1124 (amd64-avx-avx512-linux.c): Remove.
1125 (amd64-mpx.c): Remove.
1126 (amd64-mpx-linux.c): Remove.
1127 (amd64-avx-mpx-avx512-pku.c): Remove.
1128 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1129 (amd64-avx-mpx.c): Remove.
1130 (amd64-avx-mpx-linux.c): Remove.
1132 (x32-linux.c): Remove.
1133 (x32-avx.c): Remove.
1134 (x32-avx-linux.c): Remove.
1135 (x32-avx-avx512.c): Remove.
1136 (x32-avx-avx512-linux.c): Remove.
1137 (reg-xtensa.c): Remove.
1138 (reg-tilegx.c): Remove.
1139 (reg-tilegx32.c): Remove.
1141 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1143 * Makefile.in (SFILES): Add "common/environ.c".
1144 (OBJS): Add "common/environ.h".
1146 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1148 * configure.ac: Check if the fs_base and gs_base members of
1149 `struct user_regs_struct' exist.
1150 * config.in: Regenerated.
1151 * configure: Likewise.
1153 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1155 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1157 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1158 (get_next_pcs_syscall_next_pc): Likewise.
1160 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1162 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1163 * nto-x86-low.c: Likewise.
1165 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1167 * Makefile.in: Include disable-implicit-rules.mk.
1169 2016-11-23 Pedro Alves <palves@redhat.com>
1171 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1172 (debug_vprintf): Use std::chrono::steady_clock instead of
1173 gettimeofday. Use '.' instead of ':'.
1174 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1175 (get_timestamp): Use std::chrono::steady_clock instead of
1178 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1180 * Makefile.in: Fix whitespace formatting.
1182 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1184 * Makefile.in (SFILES, OBS): Flatten list and order
1187 2016-11-23 Pedro Alves <palves@redhat.com>
1189 * event-loop.c (handle_file_event): Use warning.
1190 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1191 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1194 2016-11-23 Pedro Alves <palves@redhat.com>
1196 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1198 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1199 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1200 debug_printf and debug_flush for debug output.
1201 * server.c (handle_general_set): Likewise.
1202 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1205 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1207 * Makefile.in (.c.o): Replace rule with ...
1208 (%.o: %.c): ... this one.
1210 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1212 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1213 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1215 * configure.ac: Remove checks for the make program.
1216 * configure: Re-generate.
1218 2016-10-28 Pedro Alves <palves@redhat.com>
1220 * Makefile.in (CXX_DIALECT): Get from configure.
1221 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1222 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1223 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1224 * config.in: Regenerate.
1225 * configure: Regenerate.
1227 2016-10-27 Yao Qi <yao.qi@linaro.org>
1229 * linux-low.c (linux_supports_range_stepping): Return true if
1230 can_software_single_step return true.
1232 2016-10-27 Yao Qi <yao.qi@linaro.org>
1234 * inferiors.c (find_inferior_in_random): New function.
1235 * inferiors.h (find_inferior_in_random): Declare.
1236 * linux-low.c (linux_wait_for_event_filtered): Call
1237 find_inferior_in_random instead of find_inferior.
1239 2016-10-27 Yao Qi <yao.qi@linaro.org>
1241 * linux-low.c (linux_wait_1): If single-step breakpoints are
1242 inserted, remove them.
1244 2016-10-26 Pedro Alves <palves@redhat.com>
1246 * linux-low.c (handle_extended_wait): Link parent/child fork
1248 (linux_wait_1): Unlink them.
1249 (linux_set_resume_request): Ignore resume requests for
1250 already-resumed and unhandled fork child threads.
1251 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1252 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1254 (handle_v_requests) <vCont>: Don't call require_running.
1255 * server.h (in_queued_stop_replies): New declaration.
1257 2016-10-24 Yao Qi <yao.qi@linaro.org>
1260 * linux-aarch64-low.c (append_insns): Cast the return value to
1263 2016-10-10 Yao Qi <yao.qi@linaro.org>
1265 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1267 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1269 * target.c (target_supports_multi_process): New function, moved
1271 * target.h (target_supports_multi_process): ... here. Remove
1274 2016-10-05 Tom Tromey <tom@tromey.com>
1277 * tracepoint.c (handle_tracepoint_bkpts): Check
1278 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1280 2016-10-05 Yao Qi <yao.qi@linaro.org>
1282 * configure.srv: Update the path of arm-*.xml files.
1284 2016-10-05 Terry Guo <terry.guo@arm.com>
1285 Yao Qi <yao.qi@linaro.org>
1287 * Makefile.in: Adjust the path of rules.
1288 * configure.srv: Update the path of xml files.
1289 * regformats/arm-with-iwmmxt.dat: Regenerated.
1290 * regformats/arm-with-neon.dat: Likewise.
1291 * regformats/arm-with-vfpv2.dat: Likewise.
1292 * regformats/arm-with-vfpv3.dat Likewise.
1294 2016-09-30 Yao Qi <yao.qi@linaro.org>
1297 * target.c (target_stop_and_wait): Don't call
1298 target_continue_no_signal, use resume_stop instead.
1300 2016-09-26 Yao Qi <yao.qi@linaro.org>
1302 * linux-low.c (linux_wait_1): Call debug_exit.
1304 2016-09-23 Pedro Alves <palves@redhat.com>
1306 * Makefile.in (SFILES): Add common/new-op.c.
1307 (OBS): Add common/new-op.o.
1308 (new-op.o): New rule.
1310 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1312 * .gitinore: Ignore more files.
1314 2016-09-21 Yao Qi <yao.qi@linaro.org>
1316 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1319 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1321 * server.c (start_inferior): Call target_mourn_inferior instead of
1322 mourn_inferior; pass ptid_t argument to it.
1324 (handle_target_event): Likewise.
1325 * target.c (target_mourn_inferior): New function.
1326 * target.h (mourn_inferior): Delete macro.
1328 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1330 * linux-low.c (lwp_is_stepping): New function.
1332 2016-09-06 Carl Love <cel@us.ibm.com>
1334 * server.c (start_inferior): Fixed comment, requested comment change
1335 didn't get updated correctly. Removed reference to ptrace () call as
1336 it is only true on Linux systems.
1338 2016-09-06 Carl Love <cel@us.ibm.com>
1340 * server.c (start_inferior): Do not call
1341 function target_post_create_inferior () if the
1342 inferior process has already exited.
1344 2016-09-05 Pedro Alves <palves@redhat.com>
1346 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1347 (COMPILE.pre, CC_LD): Use CXX directly.
1348 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1349 * acinclude.m4: Don't include build-with-cxx.m4.
1350 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1351 * configure: Regenerate.
1353 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1356 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1357 call writing data to own_buf.
1359 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1361 * target.c (mywait): Call target_wait instead of
1363 (target_wait): New function.
1365 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1367 * server.c (start_inferior): New variable 'ptid'. Replace calls
1368 to the_target->resume by target_continue{,_no_signal}, depending
1370 * target.c (target_stop_and_wait): Call target_continue_no_signal
1371 instead of the_target->resume.
1372 (target_continue): New function.
1374 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1376 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1378 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1381 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1383 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1384 * linux-arm-low.c (ps_get_thread_area): Likewise.
1385 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1386 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1387 * linux-mips-low.c (ps_get_thread_area): Likewise.
1388 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1389 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1390 * linux-x86-low.c (ps_get_thread_area): Likewise.
1391 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1393 2016-08-19 Pedro Alves <palves@redhat.com>
1395 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1397 2016-08-19 Pedro Alves <palves@redhat.com>
1399 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1400 comment. Use memcpy instead of casting through unsigned long.
1402 2016-08-19 Pedro Alves <palves@redhat.com>
1404 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1405 allocating around 0x80000000.
1407 2016-08-19 Pedro Alves <palves@redhat.com>
1410 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1411 (x32-avx512-linux-ipa.o): New rules.
1412 * configure.ac (x86_64-*-linux*): New x32 check.
1413 * configure.srv (ipa_x32_linux_regobj): New.
1414 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1415 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1417 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1419 * configure: Regenerate.
1421 2016-08-09 Pedro Alves <palves@redhat.com>
1424 * Makefile.in (OBS): Add signals-state-save-restore.o.
1425 (signals-state-save-restore.o): New rule.
1426 * config.in: Regenerate.
1427 * configure: Regenerate.
1428 * linux-low.c: Include "signals-state-save-restore.h".
1429 (linux_create_inferior): Call
1430 restore_original_signals_state.
1431 * server.c: Include "dispositions-save-restore.h".
1432 (captured_main): Call save_original_signals_state.
1434 2016-08-05 Pedro Alves <palves@redhat.com>
1436 * configure: Regenerate.
1438 2016-08-04 Yao Qi <yao.qi@linaro.org>
1440 * linux-low.c (regsets_fetch_inferior_registers): Check
1441 errno is ESRCH or not.
1443 2016-08-02 Yao Qi <yao.qi@linaro.org>
1445 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1446 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1447 (thread_db_load_search): Update.
1448 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1449 td_ta_set_event and td_ta_event_getmsg.
1451 2016-07-26 Pedro Alves <palves@redhat.com>
1454 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1455 of unsigned long for 64-bit registers and use uint32_t instead of
1456 unsigned int for 32-bit registers.
1458 2016-07-26 Pedro Alves <palves@redhat.com>
1460 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1463 2016-07-21 Tom Tromey <tom@tromey.com>
1465 * configure: Rebuild.
1467 2016-07-21 Yao Qi <yao.qi@linaro.org>
1469 * mem-break.c (find_gdb_breakpoint): Cast bp to
1470 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1472 2016-07-21 Yao Qi <yao.qi@linaro.org>
1474 * server.c (handle_v_requests): Support s and S actions
1475 if target_supports_software_single_step return true.
1477 2016-07-21 Yao Qi <yao.qi@linaro.org>
1479 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1480 is resume_step, call maybe_hw_step.
1481 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1483 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1485 (proceed_one_lwp): If resume request is resume_step, install
1486 reinsert breakpoints and call maybe_hw_step.
1488 2016-07-21 Yao Qi <yao.qi@linaro.org>
1490 * linux-low.c (proceed_one_lwp): Declare.
1491 (linux_resume_one_thread): Remove local variable 'step'.
1492 Lift code enqueue signal. Call proceed_one_lwp instead of
1493 linux_resume_one_lwp.
1495 2016-07-21 Yao Qi <yao.qi@linaro.org>
1497 * linux-low.c (linux_resume_one_thread): Call
1498 enqueue_pending_signal.
1500 2016-07-21 Yao Qi <yao.qi@linaro.org>
1502 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1503 * inferiors.c (do_restore_current_thread_cleanup): New function.
1504 (make_cleanup_restore_current_thread): Likewise.
1505 * linux-low.c (install_software_single_step_breakpoints): Call
1506 make_cleanup_restore_current_thread. Switch current_thread to
1509 2016-07-21 Yao Qi <yao.qi@linaro.org>
1511 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1512 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1513 (clone_one_breakpoint): Likewise.
1514 (delete_reinsert_breakpoints): Change parameter to thread.
1516 (has_reinsert_breakpoints): Likewise.
1517 (uninsert_reinsert_breakpoints): Likewise.
1518 (reinsert_reinsert_breakpoints): Likewise.
1519 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1520 (delete_reinsert_breakpoints): Likewise.
1521 (reinsert_reinsert_breakpoints): Likewise.
1522 (uninsert_reinsert_breakpoints): Likewise.
1523 (has_reinsert_breakpoints): Likewise.
1525 2016-07-21 Yao Qi <yao.qi@linaro.org>
1527 * inferiors.c (get_thread_process): Make parameter const.
1528 * inferiors.h (get_thread_process): Update declaration.
1529 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1530 Add new parameters child_thread and parent_thread. Callers
1532 * mem-break.h (clone_all_breakpoints): Update declaration.
1534 2016-07-21 Yao Qi <yao.qi@linaro.org>
1536 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1537 <command_list, handler>: Remove.
1538 (struct gdb_breakpoint): New.
1539 (struct other_breakpoint): New.
1540 (struct reinsert_breakpoint): New.
1541 (is_gdb_breakpoint): New function.
1542 (any_persistent_commands): Update command_list if
1543 is_gdb_breakpoint returns true.
1544 (set_breakpoint): Create breakpoints according to their types.
1545 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1546 (set_gdb_breakpoint_1): Likewise.
1547 (set_gdb_breakpoint): Likewise.
1548 (clear_breakpoint_conditions): Change parameter type to
1549 'struct gdb_breakpoint *'.
1550 (clear_breakpoint_commands): Likewise.
1551 (clear_breakpoint_conditions_and_commands): Likewise.
1552 (add_condition_to_breakpoint): Likewise.
1553 (add_breakpoint_condition): Likewise.
1554 (add_commands_to_breakpoint): Likewise.
1555 (check_breakpoints): Check other_breakpoint.
1556 (clone_one_breakpoint): Clone breakpopint according to its type.
1557 * mem-break.h (struct gdb_breakpoint): Declare.
1558 (set_gdb_breakpoint): Update declaration.
1559 (clear_breakpoint_conditions_and_commands): Likewise.
1560 (add_breakpoint_condition): Likewise.
1561 (add_breakpoint_commands): Likewise.
1562 * server.c (process_point_options): Change parameter type to
1563 'struct gdb_breakpoint *'.
1565 2016-07-21 Yao Qi <yao.qi@linaro.org>
1567 * mem-break.c (set_breakpoint_at): Rename it to ...
1568 (set_breakpoint_type_at): ... it.
1569 (set_breakpoint_at): Call set_breakpoint_type_at.
1570 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1571 * mem-break.h (set_breakpoint_at): Update comments.
1573 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1575 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1577 (nios2_store_gregset): Likewise.
1579 2016-07-01 Pedro Alves <palves@redhat.com>
1580 Antoine Tremblay <antoine.tremblay@ericsson.com>
1582 * linux-low.c: Change interface to take the target lwp_info
1583 pointer directly and return void. Handle detaching from a zombie
1585 (linux_detach_lwp_callback): New function.
1586 (linux_detach): Detach from the leader thread after detaching from
1589 2016-06-28 Yao Qi <yao.qi@linaro.org>
1591 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1592 for variable new_offset.
1593 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1594 (aarch64_ftrace_insn_reloc_cb): Likewise.
1595 (aarch64_ftrace_insn_reloc_tb): Likewise.
1596 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1597 PRIx64 instead of PRIx32.
1599 2016-06-28 Yao Qi <yao.qi@linaro.org>
1601 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1602 (the_low_target): Install arm_get_syscall_trapinfo.
1604 2016-06-28 Yao Qi <yao.qi@linaro.org>
1606 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1608 (the_low_target): Install aarch64_get_syscall_trapinfo.
1610 2016-06-28 Yao Qi <yao.qi@linaro.org>
1612 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1614 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1615 Remove parameter sysno.
1616 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1619 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1621 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1622 (s390_emit_ne_goto): Likewise.
1623 (s390_emit_lt_goto): Likewise.
1624 (s390_emit_le_goto): Likewise.
1625 (s390_emit_gt_goto): Likewise.
1626 (s390_emit_ge_goto): Likewise.
1627 (s390x_emit_eq_goto): Likewise.
1628 (s390x_emit_ne_goto): Likewise.
1629 (s390x_emit_lt_goto): Likewise.
1630 (s390x_emit_le_goto): Likewise.
1631 (s390x_emit_gt_goto): Likewise.
1632 (s390x_emit_ge_goto): Likewise.
1633 (s390_emit_ops_impl): Mark variable static.
1634 (s390x_emit_ops): Likewise.
1636 2016-06-17 Yao Qi <yao.qi@linaro.org>
1638 * linux-low.c (handle_extended_wait): Call
1639 uninsert_reinsert_breakpoints for the parent process. Remove
1640 reinsert breakpoints from the child process. Reinsert them to
1641 the parent process when vfork is done.
1642 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1643 (reinsert_reinsert_breakpoints): New function.
1644 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1645 (reinsert_reinsert_breakpoints): Declare.
1647 2016-06-17 Yao Qi <yao.qi@linaro.org>
1649 * linux-low.c (handle_extended_wait): If the parent is doing
1650 step-over, remove the reinsert breakpoints from the forked child.
1652 2016-06-17 Yao Qi <yao.qi@linaro.org>
1654 * linux-low.c (unsuspend_all_lwps): Declare.
1655 (linux_low_filter_event): If thread exited, call finish_step_over.
1656 If step-over is finished, unsuspend other threads.
1658 2016-06-17 Yao Qi <yao.qi@linaro.org>
1660 * linux-low.c (linux_resume_one_lwp_throw): Assert
1661 has_reinsert_breakpoints returns false.
1662 * mem-break.c (delete_disabled_breakpoints): Assert
1663 bp type isn't reinsert_breakpoint.
1665 2016-06-17 Yao Qi <yao.qi@linaro.org>
1667 * linux-low.c (maybe_hw_step): New function.
1668 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1669 (finish_step_over): Switch current_thread to lwp temporarily,
1670 and assert has_reinsert_breakpoints returns true.
1671 (proceed_one_lwp): Call maybe_hw_step.
1672 * mem-break.c (has_reinsert_breakpoints): New function.
1673 * mem-break.h (has_reinsert_breakpoints): Declare.
1675 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1677 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1679 2016-05-17 Yao Qi <yao.qi@linaro.org>
1681 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1682 instead of find_inferior.
1684 2016-05-05 Yao Qi <yao.qi@linaro.org>
1686 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1687 Initialize res to zero.
1689 2016-05-05 Yao Qi <yao.qi@linaro.org>
1691 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1694 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1696 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1697 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1698 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1700 2016-04-28 Par Olsson <par.olsson@windriver.com>
1701 Simon Marchi <simon.marchi@ericsson.com>
1703 * tracepoint.c (write_inferior_int8): New function.
1704 (cmd_qtenable_disable): Write enable flag using
1705 write_inferior_int8.
1707 2016-04-25 Yao Qi <yao.qi@linaro.org>
1709 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1710 (need_step_over_p): Return zero if the LWP has pending signals
1711 can be delivered on software single step target.
1713 2016-04-25 Yao Qi <yao.qi@linaro.org>
1715 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1716 return instead of error.
1718 2016-04-22 Yao Qi <yao.qi@linaro.org>
1720 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1723 2016-04-22 Yao Qi <yao.qi@linaro.org>
1725 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1726 signal when stepping over breakpoint with software single
1729 2016-04-21 Pedro Alves <palves@redhat.com>
1731 * linux-s390-low.c (s390_collect_ptrace_register)
1732 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1734 (s390_check_regset): Use void * instead of gdb_byte *.
1736 2016-04-20 Pedro Alves <palves@redhat.com>
1738 * configure: Renegerate.
1740 2016-04-20 Yao Qi <yao.qi@linaro.org>
1742 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1743 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1745 (arm_store_gregset): Likewise.
1747 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1749 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1750 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1751 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1752 (amd64-avx-mpx-linux.c): New rules.
1753 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1754 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1755 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1756 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1757 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1758 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1759 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1760 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1761 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1762 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1763 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1764 * linux-x86-low.c (x86_linux_read_description): Add case for
1765 X86_XSTATE_AVX_MPX_MASK.
1766 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1767 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1768 init_registers_i386_avx_mpx_linux.
1769 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1770 (initialize_low_tracepoint): Call
1771 init_registers_i386_avx_mpx_linux.
1772 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1773 (initialize_low_tracepoint): Call
1774 init_registers_amd64_avx_mpx_linux.
1775 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1776 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1777 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1780 2016-04-18 Pedro Alves <palves@redhat.com>
1782 * configure: Regenerate.
1784 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1786 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1787 (aarch64_emit_sub): Likewise.
1789 2016-04-12 Pedro Alves <palves@redhat.com>
1791 * utils.c (prepare_to_throw_exception): Delete.
1793 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1795 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1797 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1799 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1801 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1803 * linux-aarch64-ipa.c: Add <elf.h> include.
1804 * linux-ppc-ipa.c: Add <elf.h> include.
1805 * linux-s390-ipa.c: Add <elf.h> include.
1807 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1809 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1810 (get_raw_reg_ptr): Likewise.
1811 (get_trace_state_variable_value_ptr): Likewise.
1812 (set_trace_state_variable_value_ptr): Likewise.
1813 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1816 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1817 Marcin Kościelnicki <koriakin@0x04.net>
1820 * linux-ppc-low.c (emit_insns): New function.
1821 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1822 (ppc_emit_prologue): New function.
1823 (ppc_emit_epilogue): New function.
1824 (ppc_emit_add): New function.
1825 (ppc_emit_sub): New function.
1826 (ppc_emit_mul): New function.
1827 (ppc_emit_lsh): New function.
1828 (ppc_emit_rsh_signed): New function.
1829 (ppc_emit_rsh_unsigned): New function.
1830 (ppc_emit_ext): New function.
1831 (ppc_emit_zero_ext): New function.
1832 (ppc_emit_log_not): New function.
1833 (ppc_emit_bit_and): New function.
1834 (ppc_emit_bit_or): New function.
1835 (ppc_emit_bit_xor): New function.
1836 (ppc_emit_bit_not): New function.
1837 (ppc_emit_equal): New function.
1838 (ppc_emit_less_signed): New function.
1839 (ppc_emit_less_unsigned): New function.
1840 (ppc_emit_ref): New function.
1841 (ppc_emit_const): New function.
1842 (ppc_emit_reg): New function.
1843 (ppc_emit_pop): New function.
1844 (ppc_emit_stack_flush): New function.
1845 (ppc_emit_swap): New function.
1846 (ppc_emit_stack_adjust): New function.
1847 (ppc_emit_call): New function.
1848 (ppc_emit_int_call_1): New function.
1849 (ppc_emit_void_call_2): New function.
1850 (ppc_emit_if_goto): New function.
1851 (ppc_emit_goto): New function.
1852 (ppc_emit_eq_goto): New function.
1853 (ppc_emit_ne_goto): New function.
1854 (ppc_emit_lt_goto): New function.
1855 (ppc_emit_le_goto): New function.
1856 (ppc_emit_gt_goto): New function.
1857 (ppc_emit_ge_goto): New function.
1858 (ppc_write_goto_address): New function.
1859 (ppc_emit_ops_impl): New static variable.
1860 (ppc64v1_emit_prologue): New function.
1861 (ppc64v2_emit_prologue): New function.
1862 (ppc64_emit_epilogue): New function.
1863 (ppc64_emit_add): New function.
1864 (ppc64_emit_sub): New function.
1865 (ppc64_emit_mul): New function.
1866 (ppc64_emit_lsh): New function.
1867 (ppc64_emit_rsh_signed): New function.
1868 (ppc64_emit_rsh_unsigned): New function.
1869 (ppc64_emit_ext): New function.
1870 (ppc64_emit_zero_ext): New function.
1871 (ppc64_emit_log_not): New function.
1872 (ppc64_emit_bit_and): New function.
1873 (ppc64_emit_bit_or): New function.
1874 (ppc64_emit_bit_xor): New function.
1875 (ppc64_emit_bit_not): New function.
1876 (ppc64_emit_equal): New function.
1877 (ppc64_emit_less_signed): New function.
1878 (ppc64_emit_less_unsigned): New function.
1879 (ppc64_emit_ref): New function.
1880 (ppc64_emit_const): New function.
1881 (ppc64v1_emit_reg): New function.
1882 (ppc64v2_emit_reg): New function.
1883 (ppc64_emit_pop): New function.
1884 (ppc64_emit_stack_flush): New function.
1885 (ppc64_emit_swap): New function.
1886 (ppc64v1_emit_call): New function.
1887 (ppc64v2_emit_call): New function.
1888 (ppc64v1_emit_int_call_1): New function.
1889 (ppc64v2_emit_int_call_1): New function.
1890 (ppc64v1_emit_void_call_2): New function.
1891 (ppc64v2_emit_void_call_2): New function.
1892 (ppc64_emit_if_goto): New function.
1893 (ppc64_emit_eq_goto): New function.
1894 (ppc64_emit_ne_goto): New function.
1895 (ppc64_emit_lt_goto): New function.
1896 (ppc64_emit_le_goto): New function.
1897 (ppc64_emit_gt_goto): New function.
1898 (ppc64_emit_ge_goto): New function.
1899 (ppc64v1_emit_ops_impl): New static variable.
1900 (ppc64v2_emit_ops_impl): New static variable.
1901 (ppc_emit_ops): New function.
1902 (linux_low_target): Wire in ppc_emit_ops.
1904 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1905 Marcin Kościelnicki <koriakin@0x04.net>
1908 * Makefile.in: Add powerpc-*-ipa.o
1909 * configure.srv: Add ipa_obj for powerpc*-linux.
1910 * linux-ppc-ipa.c: New file.
1911 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1913 (PPC_FIELD): New macro.
1914 (PPC_SEXT): New macro.
1915 (PPC_OP6): New macro.
1916 (PPC_BO): New macro.
1917 (PPC_LI): New macro.
1918 (PPC_BD): New macro.
1919 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1920 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1921 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1922 (ppc_get_thread_area): New function.
1923 (is_elfv2_inferior): New function.
1924 (gen_ds_form): New function.
1925 (GEN_STD): New macro.
1926 (GEN_STDU): New macro.
1927 (GEN_LD): New macro.
1928 (GEN_LDU): New macro.
1929 (gen_d_form): New function.
1930 (GEN_ADDI): New macro.
1931 (GEN_ADDIS): New macro.
1932 (GEN_LI): New macro.
1933 (GEN_LIS): New macro.
1934 (GEN_ORI): New macro.
1935 (GEN_ORIS): New macro.
1936 (GEN_LWZ): New macro.
1937 (GEN_STW): New macro.
1938 (GEN_STWU): New macro.
1939 (gen_xfx_form): New function.
1940 (GEN_MFSPR): New macro.
1941 (GEN_MTSPR): New macro.
1942 (GEN_MFCR): New macro.
1943 (GEN_MTCR): New macro.
1944 (GEN_SYNC): New macro.
1945 (GEN_LWSYNC): New macro.
1946 (gen_x_form): New function.
1947 (GEN_OR): New macro.
1948 (GEN_MR): New macro.
1949 (GEN_LWARX): New macro.
1950 (GEN_STWCX): New macro.
1951 (GEN_CMPW): New macro.
1952 (gen_md_form): New function.
1953 (GEN_RLDICL): New macro.
1954 (GEN_RLDICR): New macro.
1955 (gen_i_form): New function.
1957 (GEN_BL): New macro.
1958 (gen_b_form): New function.
1959 (GEN_BNE): New macro.
1960 (GEN_LOAD): New macro.
1961 (GEN_STORE): New macro.
1962 (gen_limm): New function.
1963 (gen_atomic_xchg): New function.
1964 (gen_call): New function.
1965 (ppc_relocate_instruction): New function.
1966 (ppc_install_fast_tracepoint_jump_pad): New function.
1967 (ppc_get_min_fast_tracepoint_insn_len): New function.
1968 (ppc_get_ipa_tdesc_idx): New function.
1969 (the_low_target): Wire in the new functions.
1970 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1972 * linux-ppc-tdesc.h: New file.
1974 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1976 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1977 (alloc_jump_pad_buffer): New function.
1978 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1979 (alloc_jump_pad_buffer): New function.
1980 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1981 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1982 (alloc_jump_pad_buffer): New function.
1983 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1984 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1985 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1986 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1988 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1990 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1991 * linux-amd64-ipa.c: Likewise.
1992 * linux-i386-ipa.c: Likewise.
1993 * linux-s390-ipa.c: Likewise.
1994 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1995 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1996 set_trace_state_variable_value_ptr.
1997 (struct ipa_sym_addresses): Likewise.
1998 (symbol_list): Likewise.
1999 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2000 accessing gdb_collect directly.
2001 (gdb_collect_ptr_type): New typedef.
2002 (get_raw_reg_ptr_type): New typedef.
2003 (get_trace_state_variable_value_ptr_type): New typedef.
2004 (set_trace_state_variable_value_ptr_type): New typedef.
2005 (gdb_collect_ptr): New global.
2006 (get_raw_reg_ptr): New global.
2007 (get_trace_state_variable_value_ptr): New global.
2008 (set_trace_state_variable_value_ptr): New global.
2009 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2010 accessing get_raw_reg directly.
2011 (get_get_tsv_func_addr): Likewise for
2012 get_trace_state_variable_value_ptr.
2013 (get_set_tsv_func_addr): Likewise for
2014 set_trace_state_variable_value_ptr.
2015 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2017 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2019 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2021 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2023 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2025 (relocate_instruction): Remove own_buf.
2026 * server.c (own_buf): Make global.
2027 (handle_v_requests): Make global.
2028 * server.h (own_buf): New declaration.
2029 (handle_v_requests): New prototype.
2031 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2034 * linux-s390-low.c (add_insns): New function.
2035 (s390_emit_prologue): New function.
2036 (s390_emit_epilogue): New function.
2037 (s390_emit_add): New function.
2038 (s390_emit_sub): New function.
2039 (s390_emit_mul): New function.
2040 (s390_emit_lsh): New function.
2041 (s390_emit_rsh_signed): New function.
2042 (s390_emit_rsh_unsigned): New function.
2043 (s390_emit_ext): New function.
2044 (s390_emit_log_not): New function.
2045 (s390_emit_bit_and): New function.
2046 (s390_emit_bit_or): New function.
2047 (s390_emit_bit_xor): New function.
2048 (s390_emit_bit_not): New function.
2049 (s390_emit_equal): New function.
2050 (s390_emit_less_signed): New function.
2051 (s390_emit_less_unsigned): New function.
2052 (s390_emit_ref): New function.
2053 (s390_emit_if_goto): New function.
2054 (s390_emit_goto): New function.
2055 (s390_write_goto_address): New function.
2056 (s390_emit_litpool): New function.
2057 (s390_emit_const): New function.
2058 (s390_emit_call): New function.
2059 (s390_emit_reg): New function.
2060 (s390_emit_pop): New function.
2061 (s390_emit_stack_flush): New function.
2062 (s390_emit_zero_ext): New function.
2063 (s390_emit_swap): New function.
2064 (s390_emit_stack_adjust): New function.
2065 (s390_emit_set_r2): New function.
2066 (s390_emit_int_call_1): New function.
2067 (s390_emit_void_call_2): New function.
2068 (s390_emit_eq_goto): New function.
2069 (s390_emit_ne_goto): New function.
2070 (s390_emit_lt_goto): New function.
2071 (s390_emit_le_goto): New function.
2072 (s390_emit_gt_goto): New function.
2073 (s390_emit_ge_goto): New function.
2074 (s390x_emit_prologue): New function.
2075 (s390x_emit_epilogue): New function.
2076 (s390x_emit_add): New function.
2077 (s390x_emit_sub): New function.
2078 (s390x_emit_mul): New function.
2079 (s390x_emit_lsh): New function.
2080 (s390x_emit_rsh_signed): New function.
2081 (s390x_emit_rsh_unsigned): New function.
2082 (s390x_emit_ext): New function.
2083 (s390x_emit_log_not): New function.
2084 (s390x_emit_bit_and): New function.
2085 (s390x_emit_bit_or): New function.
2086 (s390x_emit_bit_xor): New function.
2087 (s390x_emit_bit_not): New function.
2088 (s390x_emit_equal): New function.
2089 (s390x_emit_less_signed): New function.
2090 (s390x_emit_less_unsigned): New function.
2091 (s390x_emit_ref): New function.
2092 (s390x_emit_if_goto): New function.
2093 (s390x_emit_const): New function.
2094 (s390x_emit_call): New function.
2095 (s390x_emit_reg): New function.
2096 (s390x_emit_pop): New function.
2097 (s390x_emit_stack_flush): New function.
2098 (s390x_emit_zero_ext): New function.
2099 (s390x_emit_swap): New function.
2100 (s390x_emit_stack_adjust): New function.
2101 (s390x_emit_int_call_1): New function.
2102 (s390x_emit_void_call_2): New function.
2103 (s390x_emit_eq_goto): New function.
2104 (s390x_emit_ne_goto): New function.
2105 (s390x_emit_lt_goto): New function.
2106 (s390x_emit_le_goto): New function.
2107 (s390x_emit_gt_goto): New function.
2108 (s390x_emit_ge_goto): New function.
2109 (s390_emit_ops): New function.
2110 (struct linux_target_ops): Fill in emit_ops hook.
2112 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2115 * Makefile.in: Add s390 IPA files.
2116 * configure.srv: Build IPA for s390.
2117 * linux-s390-ipa.c: New file.
2118 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2119 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2120 (tdesc_s390_linux32): Likewise.
2121 (init_registers_s390_linux32v1): Likewise.
2122 (tdesc_s390_linux32v1): Likewise.
2123 (init_registers_s390_linux32v2): Likewise.
2124 (tdesc_s390_linux32v2): Likewise.
2125 (init_registers_s390_linux64): Likewise.
2126 (tdesc_s390_linux64): Likewise.
2127 (init_registers_s390_linux64v1): Likewise.
2128 (tdesc_s390_linux64v1): Likewise.
2129 (init_registers_s390_linux64v2): Likewise.
2130 (tdesc_s390_linux64v2): Likewise.
2131 (init_registers_s390_te_linux64): Likewise.
2132 (tdesc_s390_te_linux64): Likewise.
2133 (init_registers_s390_vx_linux64): Likewise.
2134 (tdesc_s390_vx_linux64): Likewise.
2135 (init_registers_s390_tevx_linux64): Likewise.
2136 (tdesc_s390_tevx_linux64): Likewise.
2137 (init_registers_s390x_linux64): Likewise.
2138 (tdesc_s390x_linux64): Likewise.
2139 (init_registers_s390x_linux64v1): Likewise.
2140 (tdesc_s390x_linux64v1): Likewise.
2141 (init_registers_s390x_linux64v2): Likewise.
2142 (tdesc_s390x_linux64v2): Likewise.
2143 (init_registers_s390x_te_linux64): Likewise.
2144 (tdesc_s390x_te_linux64): Likewise.
2145 (init_registers_s390x_vx_linux64): Likewise.
2146 (tdesc_s390x_vx_linux64): Likewise.
2147 (init_registers_s390x_tevx_linux64): Likewise.
2148 (tdesc_s390x_tevx_linux64): Likewise.
2149 (have_hwcap_s390_vx): New static variable.
2150 (s390_arch_setup): Fill have_hwcap_s390_vx.
2151 (s390_get_thread_area): New function.
2152 (s390_ft_entry_gpr_esa): New const.
2153 (s390_ft_entry_gpr_zarch): New const.
2154 (s390_ft_entry_misc): New const.
2155 (s390_ft_entry_fr): New const.
2156 (s390_ft_entry_vr): New const.
2157 (s390_ft_main_31): New const.
2158 (s390_ft_main_64): New const.
2159 (s390_ft_exit_fr): New const.
2160 (s390_ft_exit_vr): New const.
2161 (s390_ft_exit_misc): New const.
2162 (s390_ft_exit_gpr_esa): New const.
2163 (s390_ft_exit_gpr_zarch): New const.
2164 (append_insns): New function.
2165 (s390_relocate_instruction): New function.
2166 (s390_install_fast_tracepoint_jump_pad): New function.
2167 (s390_get_min_fast_tracepoint_insn_len): New function.
2168 (s390_get_ipa_tdesc_idx): New function.
2169 (struct linux_target_ops): Wire in the above functions.
2170 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2171 * linux-s390-tdesc.h: New file.
2173 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2175 * linux-s390-low.c (s390_supports_tracepoints): New function.
2176 (struct linux_target_ops): Fill supports_tracepoints hook.
2178 2016-03-18 Yao Qi <yao.qi@linaro.org>
2180 * linux-low.c (lwp_signal_can_be_delivered): New function.
2181 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2183 2016-03-18 Yao Qi <yao.qi@linaro.org>
2185 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2186 0 if signal is enqueued. Remove 'signal' from one debugging
2187 message. Move one debugging message to some lines below.
2188 Remove code setting 'signal' to 0.
2190 2016-03-18 Yao Qi <yao.qi@linaro.org>
2192 * linux-low.c (linux_low_filter_event): Remove redundant
2193 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2195 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2197 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2198 (struct linux_target_ops): Wire in the above.
2200 2016-03-03 Yao Qi <yao.qi@linaro.org>
2202 * linux-low.c: Update comments to start_step_over.
2204 2016-03-03 Yao Qi <yao.qi@linaro.org>
2207 * linux-low.c (handle_extended_wait): Set child suspended
2208 if event_lwp->bp_reinsert isn't zero.
2210 2016-03-02 Yao Qi <yao.qi@linaro.org>
2212 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2213 enqueue_pending_signal.
2215 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2217 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2220 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2222 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2223 (s390_regmap_3264) [!__s390x__]: New global.
2224 (s390_collect_ptrace_register): Skip map entries containing -1.
2225 (s390_supply_ptrace_register): Ditto.
2226 (s390_fill_gprs_high): New function.
2227 (s390_store_gprs_high): New function.
2228 (s390_regsets): Add NT_S390_HIGH_GPRS.
2229 (s390_get_hwcap): Enable on 31-bit.
2230 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2231 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2232 Detect NT_S390_HIGH_GPRS.
2233 (s390_usrregs_info_3264): Enable on 31-bit.
2234 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2235 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2237 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2240 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2241 * configure.srv: Ditto.
2242 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2243 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2244 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2245 (init_registers_amd64_linux): Remove prototype.
2246 (tdesc_amd64_linux): Remove declaration.
2247 (get_ipa_tdesc): New function.
2248 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2249 initialize remaining tdescs.
2250 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2251 (init_registers_i386_linux): Remove prototype.
2252 (tdesc_i386_linux): Remove declaration.
2253 (get_ipa_tdesc): New function.
2254 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2255 initialize remaining tdescs.
2256 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2257 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2258 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2259 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2260 (x86_get_ipa_tdesc_idx): New function.
2261 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2262 * linux-x86-tdesc.h: New file.
2263 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2264 (target_get_ipa_tdesc_idx): New macro.
2265 * tracepoint.c (ipa_tdesc_idx): New macro.
2266 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2267 (symbol_list): Add ipa_tdesc_idx.
2268 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2269 (ipa_tdesc): Remove.
2270 (ipa_tdesc_idx): New variable.
2271 (get_context_regcache): Use get_ipa_tdesc.
2272 (gdb_collect): Ditto.
2274 * tracepoint.h (get_ipa_tdesc): New prototype.
2275 (ipa_tdesc): Remove.
2277 2016-02-24 Pedro Alves <palves@redhat.com>
2279 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2280 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2281 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2282 Factor out common code between the USE_SIGTRAP_SIGINFO and
2283 !USE_SIGTRAP_SIGINFO blocks.
2284 (linux_low_filter_event): Call save_stop_reason instead of
2285 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2287 (linux_wait_1): Update comments.
2289 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2291 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2292 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2293 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2294 ppc_insert_point, ppc_remove_point.
2296 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2298 * linux-s390-low.c (s390_supports_z_point_type): New function.
2299 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2301 2016-02-16 Yao Qi <yao.qi@linaro.org>
2303 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2304 PC. Get pc from regcache_read_pc.
2306 2016-02-12 Yao Qi <yao.qi@linaro.org>
2308 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2309 or linux_get_pc_32bit.
2310 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2312 2016-02-12 Yao Qi <yao.qi@linaro.org>
2314 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2315 arm_linux_get_next_pcs_fixup.
2317 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2319 * tracepoint.c (x_tracepoint_action_download): Change
2320 write_inferior_data_ptr to write_inferior_data_pointer.
2321 (cmd_qtstart): Likewise.
2322 (write_inferior_data_ptr): Remove.
2323 (download_agent_expr): Change write_inferior_data_ptr to
2324 write_inferior_data_pointer.
2325 (download_tracepoint_1): Likewise.
2326 (download_tracepoint): Likewise.
2327 (download_trace_state_variables): Likewise.
2329 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2330 Marcin Kościelnicki <koriakin@0x04.net>
2332 * tracepoint.c (struct tracepoint_action_ops): Remove.
2333 (struct tracepoint_action): Remove ops.
2334 (m_tracepoint_action_download, r_tracepoint_action_download)
2335 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2336 size and offset accordingly.
2337 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2338 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2339 (tracepoint_action_send, tracepoint_action_download): New functions.
2340 Helpers for trace action handlers.
2341 (add_tracepoint_action): Remove setup actions ops.
2342 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2344 2016-02-10 Yao Qi <yao.qi@linaro.org>
2346 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2348 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2350 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2352 * configure: Regenerate.
2354 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2356 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2357 void * to gdb_byte *.
2358 * linux-low.c (siginfo_fixup): Likewise.
2359 (linux_xfer_siginfo): Likewise.
2360 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2362 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2364 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2366 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2368 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2370 * linux-x86-low.c [__x86_64__]: Include
2371 "nat/amd64-linux-siginfo.h".
2372 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2373 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2374 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2375 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2376 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2377 (cpt_si_fd, si_timerid, si_overrun): Move from
2378 nat/amd64-linux-siginfo.c.
2379 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2381 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2383 * server.c (skip_to_semicolon): Remove.
2384 (process_point_options): Use strchrnul instead of
2387 2016-01-26 Yao Qi <yao.qi@linaro.org>
2389 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2390 * linux-low.c (install_software_single_step_breakpoints): Don't
2391 call regcache_read_pc.
2392 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2395 2016-01-26 Yao Qi <yao.qi@linaro.org>
2397 * linux-low.c (install_software_single_step_breakpoints): Call
2398 regcache_read_pc instead of get_pc.
2400 2016-01-26 Yao Qi <yao.qi@linaro.org>
2402 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2403 (unblock_async_io): Rename to ...
2404 (block_unblock_async_io): ... it. New function.
2405 (enable_async_io): Don't install SIGIO handler. Unblock it
2407 (disable_async_io): Don't ignore SIGIO. Block it instead.
2408 (initialize_async_io): Install SIGIO handler. Don't call
2411 2016-01-26 Yao Qi <yao.qi@linaro.org>
2413 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2414 first character is '\003', call *the_target->request_interrupt.
2416 2016-01-25 Yao Qi <yao.qi@linaro.org>
2418 * remote-utils.c (new_thread_notify): Remove.
2419 (dead_thread_notify): Likewise.
2420 * remote-utils.h (new_thread_notify): Remove declaration.
2421 (dead_thread_notify): Likewise.
2423 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2425 * gdb.trace/pending.exp: Fix expected message on continue.
2427 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2429 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2430 it works properly on big-endian machines where sizeof (CORE_ADDR)
2433 2016-01-21 Pedro Alves <palves@redhat.com>
2435 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2436 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2437 * configure: Regenerate.
2439 2016-01-21 Yao Qi <yao.qi@linaro.org>
2441 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2442 is_thumb and set it according to CPSR saved on the stack.
2443 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2444 arm_sigreturn_next_pc.
2446 2016-01-18 Yao Qi <yao.qi@linaro.org>
2448 * linux-low.c (linux_set_pc_64bit): New function.
2449 (linux_get_pc_64bit): New function.
2450 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2452 * linux-sparc-low.c (debug_threads): Remove declaration.
2453 (sparc_get_pc): Remove.
2454 (the_low_target): Use linux_get_pc_64bit instead of
2456 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2457 (the_low_target): Use linux_get_pc_64bit and
2460 2016-01-18 Yao Qi <yao.qi@linaro.org>
2462 * linux-arm-low.c (debug_threads): Remove declaration.
2463 (arm_get_pc, arm_set_pc): Remove.
2464 (the_low_target): Use linux_get_pc_32bit and
2466 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2467 (the_low_target): Use linux_get_pc_32bit and
2469 * linux-cris-low.c (debug_threads): Remove declaration.
2470 (cris_get_pc, cris_set_pc,): Remove.
2471 (the_low_target): Use linux_get_pc_32bit and
2473 * linux-crisv32-low.c (debug_threads): Remove declaration.
2474 (cris_get_pc, cris_set_pc): Remove.
2475 (the_low_target): Use linux_get_pc_32bit and
2477 * linux-low.c: Include inttypes.h.
2478 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2479 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2480 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2481 (the_low_target): Use linux_get_pc_32bit and
2483 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2484 (the_low_target): Use linux_get_pc_32bit and
2486 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2487 (the_low_target): Use linux_get_pc_32bit and
2489 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2490 (the_low_target): Use linux_get_pc_32bit and
2492 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2493 (the_low_target): Use linux_get_pc_32bit and
2496 2016-01-18 Gary Benson <gbenson@redhat.com>
2498 * configure.ac (AC_FUNC_FORK): New check.
2499 * config.in: Regenerate.
2500 * configure: Likewise.
2502 2016-01-14 Yao Qi <yao.qi@linaro.org>
2504 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2505 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2506 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2507 arm_get_next_pcs_ctor.
2509 2016-01-12 Josh Stone <jistone@redhat.com>
2510 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2512 * inferiors.h: Include "gdb_vecs.h".
2513 (struct process_info): Add syscalls_to_catch.
2514 * inferiors.c (remove_process): Free syscalls_to_catch.
2515 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2516 syscall_return stops.
2517 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2518 * server.c (handle_general_set): Handle QCatchSyscalls.
2519 (handle_query): Report support for QCatchSyscalls.
2520 * target.h (struct target_ops): Add supports_catch_syscall.
2521 (target_supports_catch_syscall): New macro.
2522 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2523 (struct lwp_info): Add syscall_state.
2524 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2525 Maintain syscall_state and syscalls_to_catch across exec.
2526 (get_syscall_trapinfo): New function, proxy to the_low_target.
2527 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2528 (linux_low_filter_event): Toggle syscall_state entry/return for
2529 syscall traps, and set it ignored for all others.
2530 (gdb_catching_syscalls_p): New function.
2531 (gdb_catch_this_syscall_p): New function.
2532 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2533 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2534 (linux_supports_catch_syscall): New function.
2535 (linux_target_ops): Install it.
2536 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2537 (the_low_target): Install it.
2539 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2541 * acinclude.m4: Include new ../warning.m4 file.
2542 * configure: Regenerated.
2543 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2545 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2547 * ax.c (is_goto_target): Mark static.
2548 * linux-low.c (register_addr): Likewise.
2549 (linux_fetch_registers, linux_store_registers): Likewise.
2550 * mem-break.c (any_persistent_commands): Fix old prototype.
2551 (add_commands_to_breakpoint): Mark static.
2552 * regcache.c (find_register_by_name): Delete unused func.
2553 * remote-utils.c (hex_or_minus_one): Mark static.
2554 * server.c (monitor_show_help): Mark static.
2555 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2556 handle_v_requests): Likewise.
2558 2016-01-12 Pedro Alves <palves@redhat.com>
2560 Remove use of the registered trademark symbol throughout.
2562 2016-01-08 Yao Qi <yao.qi@linaro.org>
2564 * remote-utils.c (getpkt): If c is '\003', call target hook
2567 2016-01-06 Yao Qi <yao.qi@linaro.org>
2569 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2570 linux-aarch32-low.c.
2571 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2572 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2573 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2574 (thumb2_breakpoint): Declare.
2575 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2576 linux-aarch32-low.h.
2577 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2578 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2579 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2581 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2583 * gdbreplay.c (gdbreplay_version): Change copyright year in
2585 * server.c (gdbserver_version): Likewise.
2587 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2589 * server.c (crc32_table): Delete.
2590 (crc32): Use libiberty's xcrc32 function.
2592 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2594 * lynx-low.c (lynx_delete_thread_callback): New function.
2595 (lynx_mourn): Properly delete our process and all of its
2596 threads. Remove call to clear_inferiors.
2598 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2600 * target.c (thread_search_callback): Add check that
2601 the thread_stopped target callback is not NULL before
2604 2015-12-21 Yao Qi <yao.qi@linaro.org>
2606 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2609 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2611 * server.c (handle_query): Call target_supports_software_single_step.
2613 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2615 * linux-low.c (single_step): New function.
2616 (linux_resume_one_lwp_throw): Call single_step.
2617 (start_step_over): Likewise.
2619 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2621 * Makefile.in (SFILES): Append arch/arm-linux.c,
2622 arch/arm-get-next-pcs.c.
2623 (arm-linux.o): New rule.
2624 (arm-get-next-pcs.o): New rule.
2625 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2627 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2628 to linux-aarch32-low.c.
2629 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2630 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2631 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2632 (thumb2_breakpoint_len): Likewise.
2633 (arm_is_thumb_mode): Make non-static.
2634 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2635 from linux-aarch32-low.c.
2636 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2637 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2638 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2639 (thumb2_breakpoint_len): Likewise.
2640 (arm_is_thumb_mode): New declaration.
2641 * linux-arm-low.c: Include arch/arm-linux.h
2642 aarch/arm-get-next-pcs.h, sys/syscall.h.
2643 (get_next_pcs_ops): New struct.
2644 (get_next_pcs_addr_bits_remove): New function.
2645 (get_next_pcs_is_thumb): New function.
2646 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2647 (arm_sigreturn_next_pc): Likewise.
2648 (get_next_pcs_syscall_next_pc): Likewise.
2649 (arm_gdbserver_get_next_pcs): Likewise.
2650 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2652 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2653 * server.h: Include gdb_vecs.h.
2655 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2657 * Makefile.in (SFILES): Append common/common-regcache.c.
2658 (OBS): Append common-regcache.o.
2659 (common-regcache.o): New rule.
2660 * regcache.c (init_register_cache): Initialize cache to
2662 (regcache_raw_read_unsigned): New function.
2663 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2664 register_status enum.
2666 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2668 * linux-aarch64-low.c (the_low_targets): Rename
2669 breakpoint_reinsert_addr to get_next_pcs.
2670 * linux-arm-low.c (the_low_targets): Likewise.
2671 * linux-bfin-low.c (the_low_targets): Likewise.
2672 * linux-cris-low.c (the_low_targets): Likewise.
2673 * linux-crisv32-low.c (the_low_targets): Likewise.
2674 * linux-low.c (can_software_single_step): Likewise.
2675 (install_software_single_step_breakpoints): New function.
2676 (start_step_over): Use install_software_single_step_breakpoints.
2677 * linux-low.h: New CORE_ADDR vector.
2678 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2680 * linux-mips-low.c (the_low_targets): Likewise.
2681 * linux-nios2-low.c (the_low_targets): Likewise.
2682 * linux-sparc-low.c (the_low_targets): Likewise.
2684 2015-12-17 Pedro Alves <palves@redhat.com>
2686 * linux-low.c (linux_kill_one_lwp): Remove references to
2688 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2690 (linux_init_signals): Delete.
2691 (initialize_low): Adjust.
2692 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2694 2015-12-16 Pedro Alves <palves@redhat.com>
2696 * configure.ac (compiler warning flags): When testing a
2697 -Wno-foo option, check whether -Wfoo works instead.
2698 * configure: Regenerate.
2700 2015-12-11 Don Breazeal <donb@codesourcery.com>
2702 * server.c (process_serial_event): Don't exit from gdbserver
2703 in remote mode if there are still active inferiors.
2705 2015-12-11 Yao Qi <yao.qi@linaro.org>
2707 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2708 arm_breakpoint_at if the process is 32-bit.
2710 2015-12-11 Yao Qi <yao.qi@linaro.org>
2712 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2715 2015-12-07 Yao Qi <yao.qi@linaro.org>
2717 * configure.srv: Append arm.o to srv_tgtobj for
2718 aarch64*-*-linux* target.
2719 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2720 from linux-arm-low.c.
2721 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2722 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2723 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2724 (thumb2_breakpoint_len): Likewise.
2725 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2726 (arm_breakpoint_kinds): Likewise.
2727 (arm_breakpoint_kind_from_pc): Likewise.
2728 (arm_sw_breakpoint_from_kind): Likewise.
2729 (arm_breakpoint_kind_from_current_state): Likewise.
2730 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2731 (arm_sw_breakpoint_from_kind): Declare.
2732 (arm_breakpoint_kind_from_current_state): Declare.
2733 (arm_breakpoint_at): Declare.
2734 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2735 arm_sw_breakpoint_from_kind if process is 32-bit.
2736 (aarch64_breakpoint_kind_from_pc): New function.
2737 (aarch64_breakpoint_kind_from_current_state): New function.
2738 (the_low_target): Initialize fields breakpoint_kind_from_pc
2739 and breakpoint_kind_from_current_state.
2740 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2741 linux-aarch32-low.c.
2742 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2743 (arm_breakpoint, arm_breakpoint_len): Likewise.
2744 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2745 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2746 (arm_is_thumb_mode): Likewise.
2747 (arm_breakpoint_at): Likewise.
2748 (arm_breakpoint_kind_from_pc): Likewise.
2749 (arm_sw_breakpoint_from_kind): Likewise.
2750 (arm_breakpoint_kind_from_current_state): Likewise.
2753 2015-08-04 Yao Qi <yao.qi@linaro.org>
2755 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2756 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2757 * server.c (extended_protocol): Remove "static".
2758 * server.h (extended_protocol): Declare it.
2760 2015-12-04 Josh Stone <jistone@redhat.com>
2762 * target.h (struct target_ops) <arch_setup>: Rename to ...
2763 (struct target_ops) <post_create_inferior>: ... this.
2764 (target_arch_setup): Rename to ...
2765 (target_post_create_inferior): ... this, calling post_create_inferior.
2766 * server.c (start_inferior): Update target_arch_setup calls to
2767 target_post_create_inferior.
2768 * linux-low.c (linux_low_ptrace_options): Forward declare.
2769 (linux_arch_setup): Update its comment for general use.
2770 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2771 (struct linux_target_ops): Use linux_post_create_inferior.
2772 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2773 to post_create_inferior.
2774 * nto-low.c (struct nto_target_ops): Likewise.
2775 * spu-low.c (struct spu_target_ops): Likewise.
2776 * win32-low.c (struct win32_target_ops): Likewise.
2778 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2780 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2782 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2784 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2785 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2786 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2787 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2788 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2789 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2790 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2791 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2792 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2793 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2794 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2795 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2797 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2799 * linux-low.c (linux_look_up_symbols): Don't call
2800 linux_supports_traceclone.
2801 * linux-low.h (thread_db_init): Remove use_events argument.
2802 * thread-db.c (thread_db_use_event): Remove global variable.
2803 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2804 (struct thread_db) <td_create_bp>: Remove field.
2805 (thread_db_create_event): Remove function.
2806 (thread_db_enable_reporting): Likewise.
2807 (find_one_thread): Don't check for thread_db_use_events.
2808 (attach_thread): Likewise.
2809 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2810 (try_thread_db_load_1): Don't check for thread_db_use_events.
2811 (thread_db_init): Remove use_events argument and thread events
2813 (remove_thread_event_breakpoints): Remove function.
2814 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2816 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2818 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2820 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2821 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2822 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2823 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2824 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2826 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2828 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2829 * linux-low.c (can_hardware_single_step): Use
2830 supports_hardware_single_step.
2831 (can_software_single_step): New function.
2832 (start_step_over): Call can_software_single_step.
2833 (linux_supports_hardware_single_step): New function.
2834 (struct target_ops) <supports_software_single_step>: Initialize.
2835 * linux-low.h (struct linux_target_ops)
2836 <supports_hardware_single_step>: Initialize.
2837 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2838 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2839 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2840 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2841 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2842 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2843 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2844 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2845 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2846 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2848 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2849 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2851 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2852 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2853 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2855 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2856 * target.h (struct target_ops): <supports_software_single_step>:
2858 (target_supports_software_single_step): New macro.
2860 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2862 * linux-low.c (linux_wait_1): Fix pc advance condition.
2863 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2864 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2866 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2868 * linux-arm-low.c (arm_is_thumb_mode): New function.
2869 (arm_breakpoint_at): Use arm_is_thumb_mode.
2870 (arm_breakpoint_kind_from_current_state): New function.
2871 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2873 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2874 (linux_breakpoint_kind_from_current_state): New function.
2875 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2876 * linux-low.h (struct linux_target_ops)
2877 <breakpoint_kind_from_current_state>: New field.
2878 * target.h (struct target_ops): Likewise.
2879 (target_breakpoint_kind_from_current_state): New macro.
2881 2015-11-30 Pedro Alves <palves@redhat.com>
2883 * linux-low.c (linux_resume): Wake up the event loop before
2886 2015-11-30 Pedro Alves <palves@redhat.com>
2888 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2890 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2892 * target.c (struct thread_search): New structure.
2893 (thread_search_callback): New function.
2894 (prev_general_thread): New global.
2895 (prepare_to_access_memory, done_accessing_memory): New functions.
2896 * target.h (prepare_to_access_memory, done_accessing_memory):
2897 Replace macros with function declarations.
2899 2015-11-30 Pedro Alves <palves@redhat.com>
2902 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2903 report TARGET_WAITKIND_NO_RESUMED.
2904 * remote-utils.c (prepare_resume_reply): Handle
2905 TARGET_WAITKIND_NO_RESUMED.
2906 * server.c (report_no_resumed): New global.
2907 (handle_query) <qSupported>: Handle "no-resumed+". Report
2908 "no-resumed+" support.
2909 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2910 return error if the client doesn't support no-resumed events.
2911 (push_stop_notification): New function.
2912 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2913 events if the client supports them.
2915 2015-11-30 Pedro Alves <palves@redhat.com>
2917 * linux-low.c (thread_still_has_status_pending_p): Don't check
2919 (lwp_resumed): New function.
2920 (status_pending_p_callback): Return early if the LWP is not
2921 supposed to be resumed.
2923 2015-11-30 Pedro Alves <palves@redhat.com>
2925 * linux-low.c (handle_extended_wait): Assert that the LWP's
2926 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2927 thread create events, leave the new child's status pending.
2928 (linux_low_filter_event): If GDB wants to hear about thread exit
2929 events, leave the LWP marked dead and don't delete it.
2930 (linux_wait_for_event_filtered): Don't check for thread exit.
2931 (filter_exit_event): New function.
2932 (linux_wait_1): Use it, when returning an exit event.
2933 (linux_resume_one_lwp_throw): Assert that the LWP's
2934 waitstatus is TARGET_WAITKIND_IGNORE.
2935 * remote-utils.c (prepare_resume_reply): Handle
2936 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2937 * server.c (report_thread_events): New global.
2938 (handle_general_set): Handle QThreadEvents.
2939 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2940 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2941 TARGET_WAITKIND_THREAD_EXITED.
2942 * server.h (report_thread_events): Declare.
2944 2015-11-30 Pedro Alves <palves@redhat.com>
2946 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2947 the thread's last_resume_kind was resume_stop.
2949 2015-11-30 Pedro Alves <palves@redhat.com>
2951 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2954 2015-11-30 Pedro Alves <palves@redhat.com>
2956 * server.c (handle_v_requests): Handle vCtrlC.
2958 2015-11-30 Pedro Alves <palves@redhat.com>
2960 * gdbthread.h (find_any_thread_of_pid): Declare.
2961 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2963 * server.c (handle_query): If current_thread is NULL, look for
2964 another thread of the selected process.
2966 2015-11-26 Daniel Colascione <dancol@dancol.org>
2967 Simon Marchi <simon.marchi@ericsson.com>
2969 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2970 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2972 * target.h (struct target_ops) <thread_name>: New field.
2973 (target_thread_name): New macro.
2975 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2977 * regcache.h (regcache_invalidate_pid): Add declaration.
2978 * regcache.c (regcache_invalidate_pid): New function, extracted
2979 from regcache_invalidate.
2980 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2981 Add trivial documentation comment.
2982 * lynx-low.c: Use regcache_invalidate_pid instead of
2983 regcache_invalidate.
2985 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2987 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2988 and Elf64_auxv_t if the target is Android.
2990 2015-11-22 Doug Evans <xdje42@gmail.com>
2992 * target.h: #include <sys/types.h>.
2994 2015-11-19 Pedro Alves <palves@redhat.com>
2996 * linux-low.c (linux_process_qsupported): Change prototype.
2998 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3000 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3001 and adjust to loop over all features.
3002 * server.c (handle_query) <qSupported>: Adjust to call
3003 target_process_qsupported once, passing it a vector of unprocessed
3005 * target.h (struct target_ops) <process_qsupported>: Change
3007 (target_process_qsupported): Adjust.
3009 2015-11-19 Pedro Alves <palves@redhat.com>
3011 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3013 * configure: Regenerate.
3015 2015-11-19 Pedro Alves <palves@redhat.com>
3017 * configure: Regenerate.
3019 2015-11-19 Yao Qi <yao.qi@linaro.org>
3021 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3024 2015-11-19 Yao Qi <yao.qi@linaro.org>
3026 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3027 (struct aarch64_operand): Move enum out.
3029 2015-11-19 Yao Qi <yao.qi@linaro.org>
3031 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3032 struct user_fpsimd_state *.
3033 (aarch64_store_fpregset): Likewise.
3035 2015-11-19 Yao Qi <yao.qi@linaro.org>
3037 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3038 struct user_pt_regs *.
3039 (aarch64_store_gregset): Likewise.
3041 2015-11-18 Pedro Alves <palves@redhat.com>
3043 * Makefile.in (all_object_files): Add $IPA_OBJS.
3045 2015-11-17 Pedro Alves <palves@redhat.com>
3047 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3048 GDB_SIGNAL_0 and gdb_signal_to_string.
3050 2015-11-17 Pedro Alves <palves@redhat.com>
3052 * win32-low.c (handle_output_debug_string): Remove parameter.
3053 (win32_kill): Remove our_status local and adjust call to
3054 handle_output_debug_string.
3055 (get_child_debug_event): Adjust call to
3056 handle_output_debug_string.
3058 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3060 * linux-mips-low.c (mips_fill_gregset): Add cast.
3061 (mips_store_gregset): Likewise.
3062 (mips_fill_fpregset): Likewise.
3063 (mips_store_fpregset): Likewise.
3065 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3067 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3070 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3072 * linux-mips-low.c (mips_linux_new_thread): Change type of
3073 watch_type to enum target_hw_bp_type.
3075 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3077 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3078 Change return type to arm_hwbp_type.
3080 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3082 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3083 (arm_store_gregset): Likewise.
3084 * linux-arm-low.c (arm_get_hwcap): Likewise.
3085 (arm_read_description): Likewise.
3087 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3089 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3091 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3093 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3094 (ppc_fill_vsxregset): Likewise.
3095 (ppc_store_vsxregset): Likewise.
3096 (ppc_fill_vrregset): Likewise.
3097 (ppc_store_vrregset): Likewise.
3098 (ppc_fill_evrregset): Likewise.
3099 (ppc_store_evrregset): Likewise.
3101 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3103 * linux-ppc-low.c (ppc_usrregs_info): Remove
3104 forward-declaration.
3105 (ppc_arch_setup): Move lower in file.
3107 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3109 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3110 (ps_pdwrite): Likewise.
3112 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3114 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3115 to after assert checks.
3117 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3119 * proc-service.c (ps_pdread): Add/adjust casts.
3120 (ps_pdwrite): Add/adjust casts.
3122 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3124 * server.c (handle_search_memory_1): Cast return value of
3127 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3129 * server.c (write_qxfer_response): Change type of data to
3132 2015-10-29 Pedro Alves <palves@redhat.com>
3134 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3136 2015-10-29 Pedro Alves <palves@redhat.com>
3138 * tracepoint.c (clear_installed_tracepoints): Add casts.
3140 2015-10-29 Pedro Alves <palves@redhat.com>
3142 * server.c (handle_v_cont, process_serial_event): Add enum
3143 gdb_signal casts to signal parsing code.
3145 2015-10-29 Pedro Alves <palves@redhat.com>
3147 * linux-low.h (NULL_REGSET): Define.
3148 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3149 * linux-arm-low.c (arm_regsets): Likewise.
3150 * linux-crisv32-low.c (cris_regsets): Likewise.
3151 * linux-m68k-low.c (m68k_regsets): Likewise.
3152 * linux-mips-low.c (mips_regsets): Likewise.
3153 * linux-nios2-low.c (nios2_regsets): Likewise.
3154 * linux-ppc-low.c (ppc_regsets): Likewise.
3155 * linux-s390-low.c (s390_regsets): Likewise.
3156 * linux-sh-low.c (sh_regsets): Likewise.
3157 * linux-sparc-low.c (sparc_regsets): Likewise.
3158 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3159 * linux-tile-low.c (tile_regsets): Likewise.
3160 * linux-x86-low.c (x86_regsets): Likewise.
3161 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3163 2015-10-29 Pedro Alves <palves@redhat.com>
3165 * linux-low.h (NULL_REGSET): Define.
3166 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3167 * linux-arm-low.c (arm_regsets): Likewise.
3168 * linux-crisv32-low.c (cris_regsets): Likewise.
3169 * linux-m68k-low.c (m68k_regsets): Likewise.
3170 * linux-mips-low.c (mips_regsets): Likewise.
3171 * linux-nios2-low.c (nios2_regsets): Likewise.
3172 * linux-ppc-low.c (ppc_regsets): Likewise.
3173 * linux-s390-low.c (s390_regsets): Likewise.
3174 * linux-sh-low.c (sh_regsets): Likewise.
3175 * linux-sparc-low.c (sparc_regsets): Likewise.
3176 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3177 * linux-tile-low.c (tile_regsets): Likewise.
3178 * linux-x86-low.c (x86_regsets): Likewise.
3179 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3181 2015-10-26 Doug Evans <dje@google.com>
3183 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3185 2015-10-26 Doug Evans <dje@google.com>
3187 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3189 2015-10-26 Doug Evans <dje@google.com>
3191 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3193 (attach_thread, find_new_threads_callback): Ditto.
3195 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3197 * mem-break.h (set_breakpoint_data): Remove.
3199 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3201 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3202 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3203 (initialize_low): Remove set_breakpoint_data call.
3204 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3205 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3206 (initialize_low): Remove set_breakpoint_data call.
3207 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3208 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3209 (initialize_low): Remove set_breakpoint_data call.
3211 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3213 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3214 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3215 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3216 * target.h (target_breakpoint_kind_from_pc): New macro.
3218 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3220 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3221 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3222 the default breakpoint kind.
3224 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3226 * linux-arm-low.c (arm_supports_z_point_type): Add software
3229 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3231 * linux-arm-low.c: Refactor breakpoint definitions.
3232 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3233 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3235 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3237 * Makefile.in: Add arm.c/o.
3238 * configure.srv: Likewise.
3239 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3240 (arm_breakpoint_kind_from_pc): New function.
3241 (arm_sw_breakpoint_from_kind): Return proper kind.
3242 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3244 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3246 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3248 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3249 (struct raw_breakpoint) <size>: Remove.
3250 (struct raw_breakpoint) <kind>: Add.
3251 (bp_size): New function.
3252 (bp_opcode): Likewise.
3253 (find_raw_breakpoint_at): Adjust for kind.
3254 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3255 (remove_memory_breakpoint): Adjust for kind call bp_size.
3256 (set_raw_breakpoint_at): Adjust for kind.
3257 (set_breakpoint): Likewise.
3258 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3259 (delete_raw_breakpoint): Adjust for kind.
3260 (delete_breakpoint): Likewise.
3261 (find_gdb_breakpoint): Likewise.
3262 (set_gdb_breakpoint_1): Likewise.
3263 (set_gdb_breakpoint): Likewise.
3264 (delete_gdb_breakpoint_1): Likewise.
3265 (delete_gdb_breakpoint): Likewise.
3266 (uninsert_raw_breakpoint): Likewise.
3267 (reinsert_raw_breakpoint): Likewise.
3268 (set_breakpoint_data): Remove.
3269 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3270 (check_mem_read): Adjust for kind call bp_size.
3271 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3272 (clone_one_breakpoint): Adjust for kind.
3273 * mem-break.h (set_gdb_breakpoint): Likewise.
3274 (delete_gdb_breakpoint): Likewise.
3275 * server.c (process_serial_event): Likewise.
3277 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3279 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3280 (struct linux_target_ops) <breakpoint>: Remove.
3281 (struct linux_target_ops) <breakpoint_len>: Remove.
3282 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3283 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3284 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3285 (arm_sw_breakpoint_from_kind): New function.
3286 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3287 (struct linux_target_ops) <breakpoint>: Remove.
3288 (struct linux_target_ops) <breakpoint_len>: Remove.
3289 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3290 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3291 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3292 (struct linux_target_ops) <breakpoint>: Remove.
3293 (struct linux_target_ops) <breakpoint_len>: Remove.
3294 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3295 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3296 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3297 (struct linux_target_ops) <breakpoint>: Remove.
3298 (struct linux_target_ops) <breakpoint_len>: Remove.
3299 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3300 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3301 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3302 and sw_breakpoint_from_kind to increment the pc.
3303 (linux_breakpoint_kind_from_pc): New function.
3304 (linux_sw_breakpoint_from_kind): New function.
3305 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3306 (initialize_low): Call breakpoint_kind_from_pc and
3307 sw_breakpoint_from_kind to replace breakpoint_data/len.
3308 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3310 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3311 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3312 (struct linux_target_ops) <breakpoint>: Remove.
3313 (struct linux_target_ops) <breakpoint_len>: Remove.
3314 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3315 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3316 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3317 (struct linux_target_ops) <breakpoint>: Remove.
3318 (struct linux_target_ops) <breakpoint_len>: Remove.
3319 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3320 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3321 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3322 (struct linux_target_ops) <breakpoint>: Remove.
3323 (struct linux_target_ops) <breakpoint_len>: Remove.
3324 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3325 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3326 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3327 (struct linux_target_ops) <breakpoint>: Remove.
3328 (struct linux_target_ops) <breakpoint_len>: Remove.
3329 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3330 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3331 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3332 (struct linux_target_ops) <breakpoint>: Remove.
3333 (struct linux_target_ops) <breakpoint_len>: Remove.
3334 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3335 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3336 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3337 (struct linux_target_ops) <breakpoint>: Remove.
3338 (struct linux_target_ops) <breakpoint_len>: Remove.
3339 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3340 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3341 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3342 (struct linux_target_ops) <breakpoint>: Remove.
3343 (struct linux_target_ops) <breakpoint_len>: Remove.
3344 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3345 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3346 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3347 (struct linux_target_ops) <breakpoint>: Remove.
3348 (struct linux_target_ops) <breakpoint_len>: Remove.
3349 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3350 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3351 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3352 (struct linux_target_ops) <breakpoint>: Remove.
3353 (struct linux_target_ops) <breakpoint_len>: Remove.
3354 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3355 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3356 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3357 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3358 (struct linux_target_ops) <breakpoint>: Remove.
3359 (struct linux_target_ops) <breakpoint_len>: Remove.
3360 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3361 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3362 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3363 (struct linux_target_ops) <breakpoint>: Remove.
3364 (struct linux_target_ops) <breakpoint_len>: Remove.
3365 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3366 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3368 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3370 * linux-cris-low.c (cris_get_pc): Remove void arg.
3372 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3374 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3377 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3379 * inferiors.c (thread_pid_matches_callback): New function.
3380 (find_thread_process): New function.
3381 (remove_thread): Reset current_thread.
3382 (remove_process): Assert threads have been removed first.
3384 2015-10-15 Yao Qi <yao.qi@linaro.org>
3386 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3388 (aarch64_remove_point): Likewise.
3389 * regcache.c (regcache_register_size): New function.
3391 2015-10-12 Yao Qi <yao.qi@linaro.org>
3393 * linux-aarch64-low.c: Update all callers as emit_load_store
3394 is renamed to aarch64_emit_load_store.
3396 2015-10-12 Yao Qi <yao.qi@linaro.org>
3398 * linux-aarch64-low.c: Update all callers of function renaming
3399 from emit_insn to aarch64_emit_insn.
3401 2015-10-12 Yao Qi <yao.qi@linaro.org>
3403 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3404 arch/aarch64-insn.h.
3405 (struct aarch64_memory_operand): Likewise.
3407 (emit_insn): Move to arch/aarch64-insn.c.
3408 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3409 (emit_load_store): Move to arch/aarch64-insn.c.
3410 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3411 (can_encode_int32): Remove.
3413 2015-10-12 Yao Qi <yao.qi@linaro.org>
3415 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3416 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3417 (aarch64_relocate_instruction): Likewise.
3418 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3419 (struct aarch64_insn_visitor): Likewise.
3421 2015-10-12 Yao Qi <yao.qi@linaro.org>
3423 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3424 (struct aarch64_insn_visitor): New.
3425 (struct aarch64_insn_relocation_data): New.
3426 (aarch64_ftrace_insn_reloc_b): New function.
3427 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3428 (aarch64_ftrace_insn_reloc_cb): Likewise.
3429 (aarch64_ftrace_insn_reloc_tb): Likewise.
3430 (aarch64_ftrace_insn_reloc_adr): Likewise.
3431 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3432 (aarch64_ftrace_insn_reloc_others): Likewise.
3434 (aarch64_relocate_instruction): Use visitor.
3436 2015-10-12 Yao Qi <yao.qi@linaro.org>
3438 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3439 int. Add argument buf.
3440 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3441 aarch64_relocate_instruction.
3443 2015-10-12 Yao Qi <yao.qi@linaro.org>
3445 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3446 argument insn. Remove local variable insn. Don't call
3448 (aarch64_install_fast_tracepoint_jump_pad): Call
3451 2015-09-30 Yao Qi <yao.qi@linaro.org>
3453 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3454 (emit_load_store_pair): Likewise.
3456 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3458 * dll.c (match_dll): Add cast(s).
3459 (unloaded_dll): Likewise.
3460 * linux-low.c (second_thread_of_pid_p): Likewise.
3461 (delete_lwp_callback): Likewise.
3462 (count_events_callback): Likewise.
3463 (select_event_lwp_callback): Likewise.
3464 (linux_set_resume_request): Likewise.
3465 * server.c (accumulate_file_name_length): Likewise.
3466 (emit_dll_description): Likewise.
3467 (handle_qxfer_threads_worker): Likewise.
3468 (visit_actioned_threads): Likewise.
3469 * thread-db.c (any_thread_of): Likewise.
3470 * tracepoint.c (same_process_p): Likewise.
3471 (match_blocktype): Likewise.
3472 (build_traceframe_info_xml): Likewise.
3474 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3476 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3478 (gdb_unparse_agent_expr): Likewise.
3479 * hostio.c (require_data): Likewise.
3480 (handle_pread): Likewise.
3481 * linux-low.c (disable_regset): Likewise.
3482 (fetch_register): Likewise.
3483 (store_register): Likewise.
3484 (get_dynamic): Likewise.
3485 (linux_qxfer_libraries_svr4): Likewise.
3486 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3487 (set_fast_tracepoint_jump): Likewise.
3488 (uninsert_fast_tracepoint_jumps_at): Likewise.
3489 (reinsert_fast_tracepoint_jumps_at): Likewise.
3490 (validate_inserted_breakpoint): Likewise.
3491 (clone_agent_expr): Likewise.
3492 * regcache.c (init_register_cache): Likewise.
3493 * remote-utils.c (putpkt_binary_1): Likewise.
3494 (decode_M_packet): Likewise.
3495 (decode_X_packet): Likewise.
3496 (look_up_one_symbol): Likewise.
3497 (relocate_instruction): Likewise.
3498 (monitor_output): Likewise.
3499 * server.c (handle_search_memory): Likewise.
3500 (handle_qxfer_exec_file): Likewise.
3501 (handle_qxfer_libraries): Likewise.
3502 (handle_qxfer): Likewise.
3503 (handle_query): Likewise.
3504 (handle_v_cont): Likewise.
3505 (handle_v_run): Likewise.
3506 (captured_main): Likewise.
3507 * target.c (write_inferior_memory): Likewise.
3508 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3509 * tracepoint.c (init_trace_buffer): Likewise.
3510 (add_tracepoint_action): Likewise.
3511 (add_traceframe): Likewise.
3512 (add_traceframe_block): Likewise.
3513 (cmd_qtdpsrc): Likewise.
3514 (cmd_qtdv): Likewise.
3515 (cmd_qtstatus): Likewise.
3516 (response_source): Likewise.
3517 (response_tsv): Likewise.
3518 (cmd_qtnotes): Likewise.
3519 (gdb_collect): Likewise.
3520 (initialize_tracepoint): Likewise.
3522 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3524 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3525 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3526 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3528 (enum aarch64_condition_codes): New enum.
3529 (w0): New static global.
3532 (struct aarch64_memory_operand) <type>: New
3533 MEMORY_OPERAND_POSTINDEX type.
3534 (postindex_memory_operand): New helper function.
3535 (emit_ret): New function.
3536 (emit_load_store_pair): New function, factored out of emit_stp
3537 with support for MEMORY_OPERAND_POSTINDEX.
3538 (emit_stp): Rewrite using emit_load_store_pair.
3539 (emit_ldp): New function.
3540 (emit_load_store): Likewise.
3541 (emit_ldr): Mention post-index instruction in comment.
3542 (emit_ldrh): New function.
3543 (emit_ldrb): New function.
3544 (emit_ldrsw): Mention post-index instruction in comment.
3545 (emit_str): Likewise.
3546 (emit_subs): New function.
3547 (emit_cmp): Likewise.
3548 (emit_and): Likewise.
3549 (emit_orr): Likewise.
3550 (emit_orn): Likewise.
3551 (emit_eor): Likewise.
3552 (emit_mvn): Likewise.
3553 (emit_lslv): Likewise.
3554 (emit_lsrv): Likewise.
3555 (emit_asrv): Likewise.
3556 (emit_mul): Likewise.
3557 (emit_sbfm): Likewise.
3558 (emit_sbfx): Likewise.
3559 (emit_ubfm): Likewise.
3560 (emit_ubfx): Likewise.
3561 (emit_csinc): Likewise.
3562 (emit_cset): Likewise.
3563 (emit_nop): Likewise.
3564 (emit_ops_insns): New helper function.
3565 (emit_pop): Likewise.
3566 (emit_push): Likewise.
3567 (aarch64_emit_prologue): New function.
3568 (aarch64_emit_epilogue): Likewise.
3569 (aarch64_emit_add): Likewise.
3570 (aarch64_emit_sub): Likewise.
3571 (aarch64_emit_mul): Likewise.
3572 (aarch64_emit_lsh): Likewise.
3573 (aarch64_emit_rsh_signed): Likewise.
3574 (aarch64_emit_rsh_unsigned): Likewise.
3575 (aarch64_emit_ext): Likewise.
3576 (aarch64_emit_log_not): Likewise.
3577 (aarch64_emit_bit_and): Likewise.
3578 (aarch64_emit_bit_or): Likewise.
3579 (aarch64_emit_bit_xor): Likewise.
3580 (aarch64_emit_bit_not): Likewise.
3581 (aarch64_emit_equal): Likewise.
3582 (aarch64_emit_less_signed): Likewise.
3583 (aarch64_emit_less_unsigned): Likewise.
3584 (aarch64_emit_ref): Likewise.
3585 (aarch64_emit_if_goto): Likewise.
3586 (aarch64_emit_goto): Likewise.
3587 (aarch64_write_goto_address): Likewise.
3588 (aarch64_emit_const): Likewise.
3589 (aarch64_emit_call): Likewise.
3590 (aarch64_emit_reg): Likewise.
3591 (aarch64_emit_pop): Likewise.
3592 (aarch64_emit_stack_flush): Likewise.
3593 (aarch64_emit_zero_ext): Likewise.
3594 (aarch64_emit_swap): Likewise.
3595 (aarch64_emit_stack_adjust): Likewise.
3596 (aarch64_emit_int_call_1): Likewise.
3597 (aarch64_emit_void_call_2): Likewise.
3598 (aarch64_emit_eq_goto): Likewise.
3599 (aarch64_emit_ne_goto): Likewise.
3600 (aarch64_emit_lt_goto): Likewise.
3601 (aarch64_emit_le_goto): Likewise.
3602 (aarch64_emit_gt_goto): Likewise.
3603 (aarch64_emit_ge_got): Likewise.
3604 (aarch64_emit_ops_impl): New static global variable.
3605 (aarch64_emit_ops): New target function, return
3606 &aarch64_emit_ops_impl.
3607 (struct linux_target_ops): Install it.
3609 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3611 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3612 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3614 * linux-aarch64-ipa.c: New file.
3615 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3617 (aarch64_get_thread_area): New target method.
3618 (extract_signed_bitfield): New helper function.
3619 (aarch64_decode_ldr_literal): New function.
3620 (enum aarch64_opcodes): New enum.
3621 (struct aarch64_register): New struct.
3622 (struct aarch64_operand): New struct.
3623 (x0): New static global.
3632 (aarch64_register): New helper function.
3633 (register_operand): Likewise.
3634 (immediate_operand): Likewise.
3635 (struct aarch64_memory_operand): New struct.
3636 (offset_memory_operand): New helper function.
3637 (preindex_memory_operand): Likewise.
3638 (enum aarch64_system_control_registers): New enum.
3639 (ENCODE): New macro.
3640 (emit_insn): New helper function.
3641 (emit_b): New function.
3642 (emit_bcond): Likewise.
3643 (emit_cb): Likewise.
3644 (emit_tb): Likewise.
3645 (emit_blr): Likewise.
3646 (emit_stp): Likewise.
3647 (emit_ldp_q_offset): Likewise.
3648 (emit_stp_q_offset): Likewise.
3649 (emit_load_store): Likewise.
3650 (emit_ldr): Likewise.
3651 (emit_ldrsw): Likewise.
3652 (emit_str): Likewise.
3653 (emit_ldaxr): Likewise.
3654 (emit_stxr): Likewise.
3655 (emit_stlr): Likewise.
3656 (emit_data_processing_reg): Likewise.
3657 (emit_data_processing): Likewise.
3658 (emit_add): Likewise.
3659 (emit_sub): Likewise.
3660 (emit_mov): Likewise.
3661 (emit_movk): Likewise.
3662 (emit_mov_addr): Likewise.
3663 (emit_mrs): Likewise.
3664 (emit_msr): Likewise.
3665 (emit_sevl): Likewise.
3666 (emit_wfe): Likewise.
3667 (append_insns): Likewise.
3668 (can_encode_int32_in): New helper function.
3669 (aarch64_relocate_instruction): New function.
3670 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3671 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3672 (struct linux_target_ops): Install aarch64_get_thread_area,
3673 aarch64_install_fast_tracepoint_jump_pad and
3674 aarch64_get_min_fast_tracepoint_insn_len.
3676 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3678 * Makefile.in (aarch64-insn.o): New rule.
3679 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3681 2015-09-21 Yao Qi <yao.qi@linaro.org>
3683 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3685 2015-09-21 Yao Qi <yao.qi@linaro.org>
3687 * tracepoint.c (max_jump_pad_size): Remove.
3689 2015-09-18 Yao Qi <yao.qi@linaro.org>
3691 * linux-aarch64-low.c: Don't include sys/uio.h.
3692 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3694 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3696 * tracepoint.c (eval_result_type): Change prototype.
3697 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3699 2015-09-15 Pedro Alves <palves@redhat.com>
3701 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3702 Check whether to report exec events instead of checking whether
3703 multiprocess is enabled.
3705 2015-09-15 Pedro Alves <palves@redhat.com>
3708 * remote-utils.c (prepare_resume_reply): Merge
3709 TARGET_WAITKIND_VFORK_DONE switch case with the
3710 TARGET_WAITKIND_FORKED case.
3712 2015-09-15 Yao Qi <yao.qi@linaro.org>
3714 * server.c (handle_query): Check string comparison using
3715 "else if" instead of "if".
3717 2015-09-15 Yao Qi <yao.qi@linaro.org>
3719 * server.c (vCont_supported): New global variable.
3720 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3721 matches. Append ";vContSupported+" to own_buf.
3722 (handle_v_requests): Append ";s;S" to own_buf if target supports
3723 hardware single step or vCont_supported is false.
3724 (capture_main): Set vCont_supported to zero.
3726 2015-09-15 Yao Qi <yao.qi@linaro.org>
3728 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3730 (linux_supports_hardware_single_step): ... New function.
3731 (linux_target_ops): Update.
3732 * lynx-low.c (lynx_target_ops): Set field
3733 supports_hardware_single_step to target_can_do_hardware_single_step.
3734 * nto-low.c (nto_target_ops): Likewise.
3735 * spu-low.c (spu_target_ops): Likewise.
3736 * win32-low.c (win32_target_ops): Likewise.
3737 * target.c (target_can_do_hardware_single_step): New function.
3738 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3739 Remove. <supports_hardware_single_step>: New field.
3740 (target_supports_conditional_breakpoints): Remove.
3741 (target_supports_hardware_single_step): New macro.
3742 (target_can_do_hardware_single_step): Declare.
3743 * server.c (handle_query): Use target_supports_hardware_single_step
3744 instead of target_supports_conditional_breakpoints.
3746 2015-09-15 Yao Qi <yao.qi@linaro.org>
3748 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3750 (struct linux_target_ops the_low_target): Install
3751 aarch64_linux_siginfo_fixup.
3753 2015-09-11 Don Breazeal <donb@codesourcery.com>
3754 Luis Machado <lgustavo@codesourcery.com>
3756 * linux-low.c (linux_mourn): Static declaration.
3757 (linux_arch_setup): Move in front of
3758 handle_extended_wait.
3759 (linux_arch_setup_thread): New function.
3760 (handle_extended_wait): Handle exec events. Call
3761 linux_arch_setup_thread. Make event_lwp argument a
3762 pointer-to-a-pointer.
3763 (check_zombie_leaders): Do not check stopped threads.
3764 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3765 (linux_low_filter_event): Add lwp and thread for exec'ing
3766 non-leader thread if leader thread has been deleted.
3767 Refactor code into linux_arch_setup_thread and call it.
3768 Pass child lwp pointer by reference to handle_extended_wait.
3769 (linux_wait_for_event_filtered): Update comment.
3770 (linux_wait_1): Prevent clobbering exec event status.
3771 (linux_supports_exec_events): New function.
3772 (linux_target_ops) <supports_exec_events>: Initialize new member.
3773 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3775 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3776 * server.c (report_exec_events): New global variable.
3777 (handle_query): Handle qSupported query for exec-events feature.
3778 (captured_main): Initialize report_exec_events.
3779 * server.h (report_exec_events): Declare new global variable.
3780 * target.h (struct target_ops) <supports_exec_events>: New
3782 (target_supports_exec_events): New macro.
3783 * win32-low.c (win32_target_ops) <supports_exec_events>:
3784 Initialize new member.
3786 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3788 * linux-low.c (linux_low_enable_btrace): Remove.
3789 (linux_target_ops): Replace linux_low_enable_btrace with
3790 linux_enable_btrace.
3792 2015-09-03 Yao Qi <yao.qi@linaro.org>
3794 * linux-aarch64-low.c (aarch64_insert_point): Call
3795 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3798 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3800 * linux-low.c (check_stopped_by_breakpoint): Use
3801 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3803 2015-08-27 Pedro Alves <palves@redhat.com>
3805 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3807 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3809 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3810 the XNEW-family equivalent.
3811 (compile_bytecodes): Likewise.
3812 * dll.c (loaded_dll): Likewise.
3813 * event-loop.c (append_callback_event): Likewise.
3814 (create_file_handler): Likewise.
3815 (create_file_event): Likewise.
3816 * hostio.c (handle_open): Likewise.
3817 * inferiors.c (add_thread): Likewise.
3818 (add_process): Likewise.
3819 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3820 * linux-arm-low.c (arm_new_process): Likewise.
3821 (arm_new_thread): Likewise.
3822 * linux-low.c (add_to_pid_list): Likewise.
3823 (linux_add_process): Likewise.
3824 (handle_extended_wait): Likewise.
3825 (add_lwp): Likewise.
3826 (enqueue_one_deferred_signal): Likewise.
3827 (enqueue_pending_signal): Likewise.
3828 (linux_resume_one_lwp_throw): Likewise.
3829 (linux_resume_one_thread): Likewise.
3830 (linux_read_memory): Likewise.
3831 (linux_write_memory): Likewise.
3832 * linux-mips-low.c (mips_linux_new_process): Likewise.
3833 (mips_linux_new_thread): Likewise.
3834 (mips_add_watchpoint): Likewise.
3835 * linux-x86-low.c (initialize_low_arch): Likewise.
3836 * lynx-low.c (lynx_add_process): Likewise.
3837 * mem-break.c (set_raw_breakpoint_at): Likewise.
3838 (set_breakpoint): Likewise.
3839 (add_condition_to_breakpoint): Likewise.
3840 (add_commands_to_breakpoint): Likewise.
3841 (clone_agent_expr): Likewise.
3842 (clone_one_breakpoint): Likewise.
3843 * regcache.c (new_register_cache): Likewise.
3844 * remote-utils.c (look_up_one_symbol): Likewise.
3845 * server.c (queue_stop_reply): Likewise.
3846 (start_inferior): Likewise.
3847 (queue_stop_reply_callback): Likewise.
3848 (handle_target_event): Likewise.
3849 * spu-low.c (fetch_ppc_memory): Likewise.
3850 (store_ppc_memory): Likewise.
3851 * target.c (set_target_ops): Likewise.
3852 * thread-db.c (thread_db_load_search): Likewise.
3853 (try_thread_db_load_1): Likewise.
3854 * tracepoint.c (add_tracepoint): Likewise.
3855 (add_tracepoint_action): Likewise.
3856 (create_trace_state_variable): Likewise.
3857 (cmd_qtdpsrc): Likewise.
3858 (cmd_qtro): Likewise.
3859 (add_while_stepping_state): Likewise.
3860 * win32-low.c (child_add_thread): Likewise.
3861 (get_image_name): Likewise.
3863 2015-08-25 Yao Qi <yao.qi@linaro.org>
3865 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3867 2015-08-25 Yao Qi <yao.qi@linaro.org>
3869 * Makefile.in (aarch64-linux.o): New rule.
3870 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3872 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3873 (aarch64_init_debug_reg_state): Make it extern.
3874 (aarch64_linux_prepare_to_resume): Remove.
3876 2015-08-25 Yao Qi <yao.qi@linaro.org>
3878 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3879 lwp_arch_private_info and ptid_of_lwp.
3881 2015-08-25 Yao Qi <yao.qi@linaro.org>
3883 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3884 Find proc_info by find_process_pid. All callers updated.
3886 2015-08-25 Yao Qi <yao.qi@linaro.org>
3888 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3890 (debug_reg_change_callback): Remove.
3891 (aarch64_notify_debug_reg_change): Remove.
3893 2015-08-25 Yao Qi <yao.qi@linaro.org>
3895 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3896 Call current_lwp_ptid.
3898 2015-08-25 Yao Qi <yao.qi@linaro.org>
3900 * linux-aarch64-low.c (debug_reg_change_callback): Use
3903 2015-08-25 Yao Qi <yao.qi@linaro.org>
3905 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3907 2015-08-25 Yao Qi <yao.qi@linaro.org>
3909 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3911 2015-08-25 Yao Qi <yao.qi@linaro.org>
3913 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3916 2015-08-25 Yao Qi <yao.qi@linaro.org>
3918 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3920 (debug_reg_change_callback): Remove argument entry and add argument
3921 lwp. Remove local variable thread. Don't print thread id in the
3922 debugging output. Don't check whether pid of thread equals to pid.
3923 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3924 iterate_over_lwps instead find_inferior.
3926 2015-08-24 Pedro Alves <palves@redhat.com>
3928 * inferiors.c (get_first_process): New function.
3929 * inferiors.h (get_first_process): New declaration.
3930 * remote-utils.c (read_ptid): Default to the first process in the
3931 list, instead of to the current thread's process.
3933 2015-08-24 Pedro Alves <palves@redhat.com>
3935 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3936 * event-loop.c: Likewise.
3937 * remote-utils.c: Likewise.
3938 * tracepoint.c: Likewise.
3940 2015-08-24 Pedro Alves <palves@redhat.com>
3942 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3945 2015-08-21 Pedro Alves <palves@redhat.com>
3947 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3948 instead of literal 1.
3950 2015-08-21 Pedro Alves <palves@redhat.com>
3952 * tdesc.c (default_description): Explicitly zero-initialize.
3954 2015-08-21 Pedro Alves <palves@redhat.com>
3957 * inferiors.c (remove_thread): Discard any pending stop reply for
3959 * server.c (remove_all_on_match_pid): Rename to ...
3960 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3962 (discard_queued_stop_replies): Change parameter to a ptid. Now
3964 (handle_v_kill, kill_inferior_callback, captured_main)
3965 (process_serial_event): Adjust.
3966 * server.h (discard_queued_stop_replies): Declare.
3968 2015-08-21 Pedro Alves <palves@redhat.com>
3970 * linux-low.c (wait_for_sigstop): Always switch to no thread
3971 selected if the previously current thread dies.
3972 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3973 process instead of the current thread's.
3974 * remote-utils.c (input_interrupt): Don't check if there's no
3976 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3977 current thread to the general thread fails, error out.
3978 (handle_qxfer_auxv, handle_qxfer_libraries)
3979 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3980 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3981 (handle_query): Check if there's a thread selected instead of
3982 checking whether there's any thread in the thread list.
3983 (handle_qxfer_threads, handle_qxfer_btrace)
3984 (handle_qxfer_btrace_conf): Don't error out early if there's no
3985 thread in the thread list.
3986 (handle_v_cont, myresume): Don't set the current thread to the
3988 (process_serial_event) <Hg handling>: Also set thread_id if the
3989 previous general thread is still alive.
3990 (process_serial_event) <g/G handling>: If setting the current
3991 thread to the general thread fails, error out.
3992 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3993 thread's lwp instead of the current thread's.
3994 * target.c (set_desired_thread): If the desired thread was not
3995 found, leave the current thread pointing to NULL. Return an int
3996 (boolean) indicating success.
3997 * target.h (set_desired_thread): Change return type to int.
3999 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4001 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4002 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4004 (ps_get_thread_area): New function.
4006 2015-08-19 Gary Benson <gbenson@redhat.com>
4008 * hostio.c (handle_pread): Do not attempt to read more data
4009 than hostio_reply_with_data can fit in a packet.
4011 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4013 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4015 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4017 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4019 2015-08-06 Pedro Alves <palves@redhat.com>
4021 * tracepoint.c (expr_eval_result): Now an int.
4023 2015-08-06 Pedro Alves <palves@redhat.com>
4025 * gdbthread.h (struct regcache): Forward declare.
4026 (struct thread_info) <regcache_data>: Now a struct regcache
4028 * inferiors.c (inferior_regcache_data)
4029 (set_inferior_regcache_data): Now work with struct regcache
4031 * inferiors.h (struct regcache): Forward declare.
4032 (inferior_regcache_data, set_inferior_regcache_data): Now work
4033 with struct regcache pointers.
4034 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4035 (free_register_cache_thread): Remove struct regcache pointer
4038 2015-08-06 Pedro Alves <palves@redhat.com>
4040 * server.c (captured_main): On error, print the exception message
4041 to stderr, and if run_once is set, throw a quit.
4043 2015-08-06 Pedro Alves <palves@redhat.com>
4045 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4048 2015-08-06 Pedro Alves <palves@redhat.com>
4050 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4051 reading beyond the passed in buffer length.
4053 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4055 * tracepoint.c (symbol_list) <required>: Remove.
4057 2015-08-06 Pedro Alves <palves@redhat.com>
4059 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4060 count if stopping and suspending threads.
4061 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4062 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4063 (linux_detach): Complete an ongoing step-over.
4064 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4066 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4067 (linux_wait_1): If passing a signal to the inferior after
4068 finishing a step-over, unsuspend and re-resume all lwps. If we
4069 see a single-step event but the thread should be continuing, don't
4070 pass the trap to gdb.
4071 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4072 internal_error instead of gdb_assert.
4073 (enqueue_pending_signal): New function.
4074 (check_ptrace_stopped_lwp_gone): Add debug output.
4075 (start_step_over): Use internal_error instead of gdb_assert.
4076 (complete_ongoing_step_over): New function.
4077 (linux_resume_one_thread): Don't resume a suspended thread.
4078 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4081 2015-08-06 Pedro Alves <palves@redhat.com>
4083 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4084 (linux_thread_alive): Use lwp_is_marked_dead.
4085 (extended_event_reported): Delete.
4086 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4087 instead of extended_event_reported.
4088 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4090 (lwp_is_marked_dead): New function.
4091 (lwp_running): Use lwp_is_marked_dead.
4092 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4095 2015-08-06 Pedro Alves <palves@redhat.com>
4097 * linux-low.c (linux_wait_1): Move fork event output out of the
4098 !report_to_gdb check. Pass event_child->waitstatus to
4099 target_waitstatus_to_string instead of ourstatus.
4101 2015-08-04 Yao Qi <yao.qi@linaro.org>
4103 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4104 if current_thread is 32 bit.
4106 2015-08-04 Yao Qi <yao.qi@linaro.org>
4108 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4109 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4110 * server.c (extended_protocol): Remove "static".
4111 * server.h (extended_protocol): Declare it.
4113 2015-08-04 Yao Qi <yao.qi@linaro.org>
4115 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4116 both aarch64 and aarch32.
4117 (aarch64_set_pc): Likewise.
4119 2015-08-04 Yao Qi <yao.qi@linaro.org>
4121 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4122 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4123 arm-with-neon.xml to srv_xmlfiles.
4124 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4125 (is_64bit_tdesc): New function.
4126 (aarch64_linux_read_description): New function.
4127 (aarch64_arch_setup): Call aarch64_linux_read_description.
4128 (regs_info): Rename to regs_info_aarch64.
4129 (aarch64_regs_info): Return right regs_info.
4130 (initialize_low_arch): Call initialize_low_arch_aarch32.
4132 2015-08-04 Yao Qi <yao.qi@linaro.org>
4134 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4135 * linux-aarch32-low.c: New file.
4136 * linux-aarch32-low.h: New file.
4137 * linux-arm-low.c (arm_fill_gregset): Move it to
4138 linux-aarch32-low.c.
4139 (arm_store_gregset): Likewise.
4140 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4141 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4142 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4143 (regs_info): Rename to regs_info_arm.
4144 (arm_regs_info): Return regs_info_aarch32 if
4145 have_ptrace_getregset is 1 and target description is
4146 arm_with_neon or arm_with_vfpv3.
4147 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4148 Call initialize_low_arch_aarch32 instead.
4150 2015-08-04 Yao Qi <yao.qi@linaro.org>
4152 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4153 * linux-low.c: ... here.
4154 * linux-low.h (have_ptrace_getregset): Declare it.
4156 2015-08-04 Pedro Alves <palves@redhat.com>
4158 * thread-db.c (struct thread_db): Use new typedefs.
4159 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4161 (disable_thread_event_reporting): Cast result of dlsym to
4162 destination function pointer type.
4163 (thread_db_mourn): Use td_ta_delete_ftype.
4165 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4167 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4169 (CDX_BREAKPOINT): Define for R2.
4170 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4171 (the_low_target): Add comments.
4173 2015-07-30 Yao Qi <yao.qi@linaro.org>
4175 * linux-arm-low.c (arm_hwcap): Remove it.
4176 (arm_read_description): New local variable arm_hwcap. Don't
4177 set arm_hwcap to zero.
4179 2015-07-30 Yao Qi <yao.qi@linaro.org>
4181 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4182 Use regcache->tdesc instead.
4183 (arm_store_wmmxregset): Likewise.
4184 (arm_fill_vfpregset): Likewise.
4185 (arm_store_vfpregset): Likewise.
4187 2015-07-30 Yao Qi <yao.qi@linaro.org>
4189 * linux-arm-low.c: Include arch/arm.h.
4190 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4191 (arm_store_gregset): Likewise.
4193 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4195 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4196 ptrace's 4th parameter.
4198 2015-07-27 Yao Qi <yao.qi@linaro.org>
4200 * configure.srv (case aarch64*-*-linux*): Don't set
4203 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4205 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4207 * linux-arm-low.c: Likewise.
4208 * linux-cris-low.c: Likewise.
4209 * linux-crisv32-low.c: Likewise.
4210 * linux-low.c: Likewise.
4211 * linux-m68k-low.c: Likewise.
4212 * linux-mips-low.c: Likewise.
4213 * linux-nios2-low.c: Likewise.
4214 * linux-s390-low.c: Likewise.
4215 * linux-sparc-low.c: Likewise.
4216 * linux-tic6x-low.c: Likewise.
4217 * linux-tile-low.c: Likewise.
4218 * linux-x86-low.c: Likewise.
4220 2015-07-24 Pedro Alves <palves@redhat.com>
4222 * config.in: Regenerate.
4223 * configure: Regenerate.
4225 2015-07-24 Pedro Alves <palves@redhat.com>
4227 * acinclude.m4: Include ../ptrace.m4.
4228 * configure.ac: Call GDB_AC_PTRACE.
4229 * config.in, configure: Regenerate.
4231 2015-07-24 Yao Qi <yao.qi@linaro.org>
4233 * linux-low.c (linux_create_inferior): Remove setting to
4234 proc->priv->new_inferior.
4235 (linux_attach): Likewise.
4236 (linux_low_filter_event): Likewise.
4237 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4239 2015-07-24 Yao Qi <yao.qi@linaro.org>
4241 * linux-low.c (linux_arch_setup): New function.
4242 (linux_low_filter_event): If proc->tdesc is NULL and
4243 proc->attached is true, call the_low_target.arch_setup.
4244 Otherwise, keep status pending, and return.
4245 (linux_resume_one_lwp_throw): Don't call get_pc if
4246 thread->while_stepping isn't NULL. Don't call
4247 get_thread_regcache if proc->tdesc is NULL.
4248 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4249 (linux_target_ops): Install arch_setup.
4250 * server.c (start_inferior): Call the_target->arch_setup.
4251 * target.h (struct target_ops) <arch_setup>: New field.
4252 (target_arch_setup): New marco.
4253 * lynx-low.c (lynx_target_ops): Update.
4254 * nto-low.c (nto_target_ops): Update.
4255 * spu-low.c (spu_target_ops): Update.
4256 * win32-low.c (win32_target_ops): Update.
4258 2015-07-24 Yao Qi <yao.qi@linaro.org>
4260 * linux-low.c (linux_add_process): Don't set
4261 proc->priv->new_inferior.
4262 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4263 (linux_attach): Likewise.
4265 2015-07-24 Yao Qi <yao.qi@linaro.org>
4267 * server.c (start_inferior): Code refactor.
4269 2015-07-24 Yao Qi <yao.qi@linaro.org>
4271 * server.c (process_serial_event): Set general_thread.
4273 2015-07-21 Yao Qi <yao.qi@linaro.org>
4275 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4276 aarch64_linux_get_debug_reg_capacity.
4278 2015-07-17 Yao Qi <yao.qi@linaro.org>
4280 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4281 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4282 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4283 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4284 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4285 (AARCH64_HWP_ALIGNMENT): Likewise.
4286 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4287 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4288 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4289 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4290 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4291 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4292 (struct aarch64_debug_reg_state): Likewise.
4293 (struct arch_lwp_info): Likewise.
4294 (aarch64_align_watchpoint): Likewise.
4295 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4296 (aarch64_watchpoint_length): Likewise.
4297 (aarch64_point_encode_ctrl_reg): Likewise
4298 (aarch64_point_is_aligned): Likewise.
4299 (aarch64_align_watchpoint): Likewise.
4300 (aarch64_linux_set_debug_regs):
4301 (aarch64_dr_state_insert_one_point): Likewise.
4302 (aarch64_dr_state_remove_one_point): Likewise.
4303 (aarch64_handle_breakpoint): Likewise.
4304 (aarch64_handle_aligned_watchpoint): Likewise.
4305 (aarch64_handle_unaligned_watchpoint): Likewise.
4306 (aarch64_handle_watchpoint): Likewise.
4308 2015-07-17 Yao Qi <yao.qi@linaro.org>
4310 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4311 and don't aarch64_get_debug_reg_state. All callers update.
4312 (aarch64_handle_aligned_watchpoint): Likewise.
4313 (aarch64_handle_unaligned_watchpoint): Likewise.
4314 (aarch64_handle_watchpoint): Likewise.
4315 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4316 (aarch64_remove_point): Likewise.
4318 2015-07-17 Yao Qi <yao.qi@linaro.org>
4320 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4322 (aarch64_handle_unaligned_watchpoint): Likewise.
4324 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4326 Revert the previous 3 commits:
4327 Move gdb_regex* to common/
4328 Move linux_find_memory_regions_full & co.
4329 gdbserver build-id attribute generator
4331 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4332 Jan Kratochvil <jan.kratochvil@redhat.com>
4334 gdbserver build-id attribute generator.
4335 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4336 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4337 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4339 (get_dynamic): Use find_pdhr to traverse program headers.
4340 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4341 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4342 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4343 (get_hex_build_id): New.
4344 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4345 to reply XML document.
4347 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4348 Jan Kratochvil <jan.kratochvil@redhat.com>
4350 * target.c: Include target/target-utils.h and fcntl.h.
4351 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4352 (target_fileio_read_stralloc): New functions.
4354 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4356 * Makefile.in (OBS): Add gdb_regex.o.
4358 * config.in: Rebuilt.
4359 * configure: Rebuilt.
4361 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4362 Jan Kratochvil <jan.kratochvil@redhat.com>
4364 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4365 * Makefile.in (OBS): Add target-utils.o.
4366 (linux-maps.o, target-utils.o): New.
4367 * configure.srv (srv_linux_obj): Add linux-maps.o.
4369 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4371 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4373 (the_low_target): Install it.
4375 2015-07-14 Pedro Alves <palves@redhat.com>
4377 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4378 Instead, ignore ECHILD, and throw an error for other errnos.
4380 2015-07-10 Pedro Alves <palves@redhat.com>
4382 * event-loop.c (struct callback_event) <data>: Change type to
4383 gdb_client_data instance instead of gdb_client_data pointer.
4384 (append_callback_event): Adjust.
4386 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4388 * linux-aarch64-low.c: Add comments for each linux_target_ops
4389 method. Remove comments already covered in target_ops and
4390 linux_target_ops definitions.
4391 (the_low_target): Add comments for each unimplemented method.
4393 2015-07-09 Yao Qi <yao.qi@linaro.org>
4395 * linux-aarch64-low.c (aarch64_regmap): Remove.
4396 (aarch64_usrregs_info): Remove.
4397 (regs_info): Set field usrregs to NULL.
4399 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4401 * linux-low.c: Include "rsp-low.h"
4402 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4403 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4404 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4405 (handle_btrace_enable_pt): New.
4406 (handle_btrace_general_set): Support "pt".
4407 (handle_btrace_conf_general_set): Support "pt:size".
4409 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4411 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4414 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4416 * linux-aarch64-low.c: Remove comment about endianness.
4417 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4418 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4421 2015-06-24 Gary Benson <gbenson@redhat.com>
4423 * linux-i386-ipa.c (stdint.h): Do not include.
4424 * lynx-i386-low.c (stdint.h): Likewise.
4425 * lynx-ppc-low.c (stdint.h): Likewise.
4426 * mem-break.c (stdint.h): Likewise.
4427 * thread-db.c (stdint.h): Likewise.
4428 * tracepoint.c (stdint.h): Likewise.
4429 * win32-low.c (stdint.h): Likewise.
4431 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4433 * server.c (write_qxfer_response): Update call to
4434 remote_escape_output.
4436 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4437 Jan Kratochvil <jan.kratochvil@redhat.com>
4439 Merge multiple hex conversions.
4440 * gdbreplay.c (tohex): Rename to 'fromhex'.
4441 (logchar): Use fromhex.
4443 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4445 * server.c (handle_qxfer_libraries): Set `version' attribute for
4448 2015-06-10 Gary Benson <gbenson@redhat.com>
4450 * target.h (struct target_ops) <multifs_open>: New field.
4451 <multifs_unlink>: Likewise.
4452 <multifs_readlink>: Likewise.
4453 * linux-low.c (nat/linux-namespaces.h): New include.
4454 (linux_target_ops): Initialize the_target->multifs_open,
4455 the_target->multifs_unlink and the_target->multifs_readlink.
4456 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4457 * hostio.c (hostio_fs_pid): New static variable.
4458 (hostio_handle_new_gdb_connection): New function.
4459 (handle_setfs): Likewise.
4460 (handle_open): Use the_target->multifs_open as appropriate.
4461 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4462 (handle_readlink): Use the_target->multifs_readlink as
4464 (handle_vFile): Handle vFile:setfs packets.
4465 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4466 after target_handle_new_gdb_connection.
4468 2015-06-10 Gary Benson <gbenson@redhat.com>
4470 * configure.ac (AC_CHECK_FUNCS): Add setns.
4471 * config.in: Regenerate.
4472 * configure: Likewise.
4473 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4474 (linux-namespaces.o): New rule.
4475 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4477 2015-06-09 Gary Benson <gbenson@redhat.com>
4479 * hostio.c (handle_open): Process mode argument with
4480 fileio_to_host_mode.
4482 2015-06-01 Yao Qi <yao.qi@linaro.org>
4484 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4485 * linux-x86-low.c: Likewise.
4487 2015-05-28 Don Breazeal <donb@codesourcery.com>
4489 * linux-low.c (handle_extended_wait): Initialize
4490 thread_info.last_resume_kind for new fork children.
4492 2015-05-15 Pedro Alves <palves@redhat.com>
4494 * target.h (target_handle_new_gdb_connection): Rewrite using if
4495 wrapped in do/while.
4497 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4499 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4500 * configure, config.in: Regenerate.
4501 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4504 2015-05-12 Don Breazeal <donb@codesourcery.com>
4506 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4507 PTRACE_EVENT_VFORK_DONE.
4508 (linux_low_ptrace_options, extended_event_reported): Add vfork
4510 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4511 and "vforkdone" for RSP 'T' Stop Reply Packet.
4512 * server.h (report_vfork_events): Declare
4515 2015-05-12 Don Breazeal <donb@codesourcery.com>
4517 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4518 (the_low_target) <new_fork>: Initialize new member.
4519 * linux-arm-low.c (arm_new_fork): New function.
4520 (the_low_target) <new_fork>: Initialize new member.
4521 * linux-low.c (handle_extended_wait): Call new target function
4523 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4524 * linux-mips-low.c (mips_add_watchpoint): New function
4525 extracted from mips_insert_point.
4526 (the_low_target) <new_fork>: Initialize new member.
4527 (mips_linux_new_fork): New function.
4528 (mips_insert_point): Call mips_add_watchpoint.
4529 * linux-x86-low.c (x86_linux_new_fork): New function.
4530 (the_low_target) <new_fork>: Initialize new member.
4532 2015-05-12 Don Breazeal <donb@codesourcery.com>
4534 * linux-low.c (handle_extended_wait): Implement return value,
4535 rename argument 'event_child' to 'event_lwp', handle
4536 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4537 (linux_low_ptrace_options): New function.
4538 (linux_low_filter_event): Call linux_low_ptrace_options,
4539 use different argument fo linux_enable_event_reporting,
4540 use return value from handle_extended_wait.
4541 (extended_event_reported): New function.
4542 (linux_wait_1): Call extended_event_reported and set
4543 status to report fork events.
4544 (linux_write_memory): Add pid to debug message.
4545 (reset_lwp_ptrace_options_callback): New function.
4546 (linux_handle_new_gdb_connection): New function.
4547 (linux_target_ops): Initialize new structure member.
4548 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4549 * lynx-low.c: Initialize new structure member.
4550 * remote-utils.c (prepare_resume_reply): Implement stop reason
4551 "fork" for "T" stop message.
4552 * server.c (handle_query): Call handle_new_gdb_connection.
4553 * server.h (report_fork_events): Declare global flag.
4554 * target.h (struct target_ops) <handle_new_gdb_connection>:
4556 (target_handle_new_gdb_connection): New macro.
4557 * win32-low.c: Initialize new structure member.
4559 2015-05-12 Don Breazeal <donb@codesourcery.com>
4561 * mem-break.c (APPEND_TO_LIST): Define macro.
4562 (clone_agent_expr): New function.
4563 (clone_one_breakpoint): New function.
4564 (clone_all_breakpoints): New function.
4565 * mem-break.h: Declare new functions.
4567 2015-05-12 Don Breazeal <donb@codesourcery.com>
4569 * linux-low.c (linux_supports_fork_events): New function.
4570 (linux_supports_vfork_events): New function.
4571 (linux_target_ops): Initialize new structure members.
4572 (initialize_low): Call linux_check_ptrace_features.
4573 * lynx-low.c (lynx_target_ops): Initialize new structure
4575 * server.c (report_fork_events, report_vfork_events):
4577 (handle_query): Add new features to qSupported packet and
4579 (captured_main): Initialize new global variables.
4580 * target.h (struct target_ops) <supports_fork_events>:
4582 <supports_vfork_events>: New member.
4583 (target_supports_fork_events): New macro.
4584 (target_supports_vfork_events): New macro.
4585 * win32-low.c (win32_target_ops): Initialize new structure
4588 2015-05-12 Gary Benson <gbenson@redhat.com>
4590 * server.c (handle_qxfer_exec_file): Use current process
4593 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4595 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4596 Remove HAVE_PTRACE_GETREGS conditionals.
4597 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4598 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4600 2015-05-08 Yao Qi <yao.qi@linaro.org>
4602 * linux-low.c (linux_supports_conditional_breakpoints): New
4604 (linux_target_ops): Install new target method.
4605 * lynx-low.c (lynx_target_ops): Install NULL hook for
4606 supports_conditional_breakpoints.
4607 * nto-low.c (nto_target_ops): Likewise.
4608 * spu-low.c (spu_target_ops): Likewise.
4609 * win32-low.c (win32_target_ops): Likewise.
4610 * server.c (handle_query): Check
4611 target_supports_conditional_breakpoints.
4612 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4614 (target_supports_conditional_breakpoints): New macro.
4616 2015-05-06 Pedro Alves <palves@redhat.com>
4619 * server.c (start_inferior): If the process exits, mourn it.
4621 2015-04-21 Gary Benson <gbenson@redhat.com>
4623 * hostio.c (fileio_open_flags_to_host): Factored out to
4624 fileio_to_host_openflags in common/fileio.c. Single use
4627 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4629 * linux-xtensa-low.c (xtensa_fill_gregset)
4630 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4633 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4635 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4636 (regs_info): Replace usrregs pointer with NULL.
4638 2015-04-17 Gary Benson <gbenson@redhat.com>
4640 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4641 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4642 * server.c (handle_qxfer_exec_file): New function.
4643 (qxfer_packets): Add exec-file entry.
4644 (handle_query): Report qXfer:exec-file:read as supported packet.
4646 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4648 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4650 2015-04-09 Gary Benson <gbenson@redhat.com>
4652 * hostio-errno.c (errno_to_fileio_error): Remove function.
4653 Update caller to use remote_fileio_to_fio_error.
4655 2015-04-09 Yao Qi <yao.qi@linaro.org>
4657 * linux-low.c (linux_insert_point): Call
4658 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4659 (linux_remove_point): Call remove_memory_breakpoint if type is
4661 * linux-x86-low.c (x86_insert_point): Don't call
4662 insert_memory_breakpoint.
4663 (x86_remove_point): Don't call remove_memory_breakpoint.
4665 2015-04-01 Pedro Alves <palves@redhat.com>
4666 Cleber Rosa <crosa@redhat.com>
4668 * server.c (gdbserver_usage): Reorganize and extend the usage
4671 2015-03-24 Pedro Alves <palves@redhat.com>
4673 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4674 output. Also dump TRAP_TRACE.
4675 (linux_low_filter_event): In debug output, distinguish a
4676 resume_stop SIGSTOP from a delayed SIGSTOP.
4678 2015-03-24 Gary Benson <gbenson@redhat.com>
4680 * linux-x86-low.c (x86_linux_new_thread): Moved to
4682 (x86_linux_prepare_to_resume): Likewise.
4684 2015-03-24 Gary Benson <gbenson@redhat.com>
4686 * Makefile.in (x86-linux-dregs.o): New rule.
4687 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4688 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4689 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4690 (x86_linux_dr_get): Likewise.
4691 (x86_linux_dr_set): Likewise.
4692 (update_debug_registers_callback): Likewise.
4693 (x86_linux_dr_set_addr): Likewise.
4694 (x86_linux_dr_get_addr): Likewise.
4695 (x86_linux_dr_set_control): Likewise.
4696 (x86_linux_dr_get_control): Likewise.
4697 (x86_linux_dr_get_status): Likewise.
4698 (x86_linux_update_debug_registers): Likewise.
4700 2015-03-24 Gary Benson <gbenson@redhat.com>
4702 * linux-x86-low.c (x86_linux_update_debug_registers):
4703 New function, factored out from...
4704 (x86_linux_prepare_to_resume): ...this.
4706 2015-03-24 Gary Benson <gbenson@redhat.com>
4708 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4709 (x86_linux_dr_set): Likewise.
4710 (update_debug_registers_callback): Likewise.
4711 (x86_linux_dr_set_addr): Likewise.
4712 (x86_linux_dr_get_addr): Likewise.
4713 (x86_linux_dr_set_control): Likewise.
4714 (x86_linux_dr_get_control): Likewise.
4715 (x86_linux_dr_get_status): Likewise.
4716 (x86_linux_prepare_to_resume): Likewise.
4718 2015-03-24 Gary Benson <gbenson@redhat.com>
4720 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4721 Use perror_with_name. Pass string through gettext.
4722 (x86_linux_dr_set): Likewise.
4724 2015-03-24 Gary Benson <gbenson@redhat.com>
4726 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4727 (x86_linux_dr_set_addr): ...this.
4728 (x86_dr_low_get_addr): Rename to...
4729 (x86_linux_dr_get_addr): ...this.
4730 (x86_dr_low_set_control): Rename to...
4731 (x86_linux_dr_set_control): ...this.
4732 (x86_dr_low_get_control): Rename to...
4733 (x86_linux_dr_get_control): ...this.
4734 (x86_dr_low_get_status): Rename to...
4735 (x86_linux_dr_get_status): ...this.
4736 (x86_dr_low): Update with new function names.
4738 2015-03-24 Gary Benson <gbenson@redhat.com>
4740 * Makefile.in (x86-linux.o): New rule.
4741 * configure.srv: Add x86-linux.o to relevant targets.
4742 * linux-low.c (lwp_set_arch_private_info): New function.
4743 (lwp_arch_private_info): Likewise.
4744 * linux-x86-low.c: Include nat/x86-linux.h.
4745 (arch_lwp_info): Removed structure.
4746 (update_debug_registers_callback):
4747 Use lwp_set_debug_registers_changed.
4748 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4749 and lwp_set_debug_registers_changed.
4750 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4752 2015-03-24 Gary Benson <gbenson@redhat.com>
4754 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4755 * linux-arm-low.c (arm_new_thread): Likewise.
4756 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4757 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4758 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4759 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4761 2015-03-24 Gary Benson <gbenson@redhat.com>
4763 * linux-low.c (ptid_of_lwp): New function.
4764 (lwp_is_stopped): Likewise.
4765 (lwp_stop_reason): Likewise.
4766 * linux-x86-low.c (update_debug_registers_callback):
4768 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4771 2015-03-24 Gary Benson <gbenson@redhat.com>
4773 * linux-low.h (linux_stop_lwp): Remove declaration.
4775 2015-03-24 Gary Benson <gbenson@redhat.com>
4777 * linux-low.h: Include nat/linux-nat.h.
4778 * linux-low.c (iterate_over_lwps_args): New structure.
4779 (iterate_over_lwps_filter): New function.
4780 (iterate_over_lwps): Likewise.
4781 * linux-x86-low.c (update_debug_registers_callback):
4782 Update signature to what iterate_over_lwps expects.
4783 Remove PID check that iterate_over_lwps now performs.
4784 (x86_dr_low_set_addr): Use iterate_over_lwps.
4785 (x86_dr_low_set_control): Likewise.
4787 2015-03-24 Gary Benson <gbenson@redhat.com>
4789 * linux-x86-low.c (x86_debug_reg_state): New function.
4790 (x86_linux_prepare_to_resume): Use the above.
4792 2015-03-24 Gary Benson <gbenson@redhat.com>
4794 * linux-low.c (current_lwp_ptid): New function.
4795 * linux-x86-low.c: Include nat/linux-nat.h.
4796 (x86_dr_low_get_addr): Use current_lwp_ptid.
4797 (x86_dr_low_get_control): Likewise.
4798 (x86_dr_low_get_status): Likewise.
4800 2015-03-20 Pedro Alves <palves@redhat.com>
4802 * tracepoint.c (cmd_qtstatus): Make "str" const.
4804 2015-03-20 Pedro Alves <palves@redhat.com>
4806 * server.c (handle_general_set): Make "req_str" const.
4808 2015-03-19 Pedro Alves <palves@redhat.com>
4810 * linux-low.c (linux_resume_one_lwp): Rename to ...
4811 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4812 instead call perror_with_name.
4813 (check_ptrace_stopped_lwp_gone): New function.
4814 (linux_resume_one_lwp): Reimplement as wrapper around
4815 linux_resume_one_lwp_throw that swallows errors if the LWP is
4818 2015-03-19 Pedro Alves <palves@redhat.com>
4820 * linux-low.c (count_events_callback, select_event_lwp_callback):
4821 No longer check whether the thread has resume_stop as last resume
4824 2015-03-19 Pedro Alves <palves@redhat.com>
4826 * linux-low.c (count_events_callback, select_event_lwp_callback):
4827 Use the lwp's status_pending_p field, not the thread's.
4829 2015-03-19 Pedro Alves <palves@redhat.com>
4831 * linux-low.c (select_event_lwp_callback): Update comments to
4832 no longer mention SIGTRAP.
4834 2015-03-18 Gary Benson <gbenson@redhat.com>
4836 * server.c (handle_query): Do not report vFile:fstat as supported.
4838 2015-03-11 Gary Benson <gbenson@redhat.com>
4840 * hostio.c (sys/types.h): New include.
4841 (sys/stat.h): Likewise.
4842 (common-remote-fileio.h): Likewise.
4843 (handle_fstat): New function.
4844 (handle_vFile): Handle vFile:fstat packets.
4846 2015-03-11 Gary Benson <gbenson@redhat.com>
4848 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4849 struct stat.st_blocks and struct stat.st_blksize.
4850 * configure: Regenerate.
4851 * config.in: Likewise.
4852 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4853 (OBS): Add common-remote-fileio.o.
4854 (common-remote-fileio.o): New rule.
4856 2015-03-09 Pedro Alves <palves@redhat.com>
4858 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4859 'struct sockaddr' pointer in 'accept' call.
4861 2015-03-09 Pedro Alves <palves@redhat.com>
4864 2015-03-07 Pedro Alves <palves@redhat.com>
4865 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4866 or <winsock2.h> here. Instead include "gdb_socket.h".
4867 (remote_open): Use union gdb_sockaddr_u.
4868 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4869 or <winsock2.h> here. Instead include "gdb_socket.h".
4870 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4871 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4873 (init_named_socket, gdb_agent_helper_thread): Use union
4876 2015-03-07 Pedro Alves <palves@redhat.com>
4878 * configure.ac (build_warnings): Move
4879 -Wdeclaration-after-statement to the C-specific set.
4880 * configure: Regenerate.
4882 2015-03-07 Pedro Alves <palves@redhat.com>
4884 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4885 or <winsock2.h> here. Instead include "gdb_socket.h".
4886 (remote_open): Use union gdb_sockaddr_u.
4887 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4888 or <winsock2.h> here. Instead include "gdb_socket.h".
4889 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4890 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4892 (init_named_socket, gdb_agent_helper_thread): Use union
4895 2015-03-07 Pedro Alves <palves@redhat.com>
4897 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4900 2015-03-06 Yao Qi <yao.qi@linaro.org>
4902 * linux-aarch64-low.c (aarch64_insert_point): Use
4903 show_debug_regs as a boolean.
4904 (aarch64_remove_point): Likewise.
4906 2015-03-05 Pedro Alves <palves@redhat.com>
4908 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4909 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4910 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4911 * nto-low.c (nto_target_ops): Likewise.
4912 * spu-low.c (spu_target_ops): Likewise.
4913 * win32-low.c (win32_target_ops): Likewise.
4915 2015-03-04 Pedro Alves <palves@redhat.com>
4917 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4918 Decide whether a breakpoint triggered based on the SIGTRAP's
4920 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4921 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4922 (linux_low_filter_event): Check for breakpoints before checking
4924 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4926 (linux_stopped_by_sw_breakpoint)
4927 (linux_supports_stopped_by_sw_breakpoint)
4928 (linux_stopped_by_hw_breakpoint)
4929 (linux_supports_stopped_by_hw_breakpoint): New functions.
4930 (linux_target_ops): Install new target methods.
4932 2015-03-04 Pedro Alves <palves@redhat.com>
4934 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4935 * server.c (swbreak_feature, hwbreak_feature): New globals.
4936 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4937 (captured_main): Clear swbreak_feature and hwbreak_feature.
4938 * server.h (swbreak_feature, hwbreak_feature): Declare.
4939 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4940 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4941 supports_stopped_by_hw_breakpoint>: New fields.
4942 (target_supports_stopped_by_sw_breakpoint)
4943 (target_stopped_by_sw_breakpoint)
4944 (target_supports_stopped_by_hw_breakpoint)
4945 (target_stopped_by_hw_breakpoint): Declare.
4947 2015-03-04 Pedro Alves <palves@redhat.com>
4949 enum lwp_stop_reason -> enum target_stop_reason
4950 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4951 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4952 (linux_wait_1, stuck_in_jump_pad_callback)
4953 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4954 (linux_stopped_by_watchpoint):
4955 * linux-low.h (enum lwp_stop_reason): Delete.
4956 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4957 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4959 2015-03-04 Yao Qi <yao.qi@linaro.org>
4961 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4963 2015-03-03 Gary Benson <gbenson@redhat.com>
4965 * hostio.c (handle_vFile): Fix prefix lengths.
4967 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4969 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4972 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4974 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4975 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4976 (clean): Add "rm -f" for above C files.
4977 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4978 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4979 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4980 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4981 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4982 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4983 (init_registers_s390x_vx_linux64)
4984 (init_registers_s390x_tevx_linux64)
4985 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4986 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4988 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4989 (s390_store_vxrs_high): New functions.
4990 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4992 (s390_arch_setup): Add logic for selecting one of the new target
4993 descriptions. Activate the new vector regsets if applicable.
4994 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4995 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4996 and init_registers_s390x_tevx_linux64.
4998 2015-03-01 Pedro Alves <palves@redhat.com>
5000 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5003 2015-02-27 Pedro Alves <palves@redhat.com>
5005 * linux-x86-low.c (u_debugreg_offset): New function.
5006 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5008 2015-02-27 Pedro Alves <palves@redhat.com>
5010 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5011 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5012 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5013 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5014 (ps_lsetfpregs, ps_getpid)
5015 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5016 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5017 (ps_lsetxregs, ps_plog): Declare.
5019 2015-02-27 Pedro Alves <palves@redhat.com>
5021 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5022 IP_AGENT_EXPORT_FUNC.
5023 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5024 IP_AGENT_EXPORT_FUNC.
5025 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5026 (IP_AGENT_EXPORT): Delete.
5027 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5028 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5029 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5030 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5031 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5032 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5033 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5034 (traceframe_read_count, traceframe_write_count)
5035 (traceframes_created, trace_state_variables, get_raw_reg)
5036 (get_trace_state_variable_value, set_trace_state_variable_value)
5037 (ust_loaded, helper_thread_id, cmd_buf): Use
5038 IPA_SYM_EXPORTED_NAME.
5039 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5040 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5041 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5042 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5043 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5044 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5045 EXTERN_C_PUSH/EXTERN_C_POP.
5046 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5047 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5048 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5049 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5050 (traceframe_write_count, traceframe_read_count)
5051 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5052 (about_to_request_buffer_space, get_trace_state_variable_value)
5053 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5054 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5055 EXTERN_C_PUSH/EXTERN_C_POP.
5056 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5057 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5058 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5059 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5060 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5061 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5062 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5063 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5065 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5066 (IP_AGENT_EXPORT_VAR_DECL): Define.
5068 (gdb_agent_get_raw_reg): Declare.
5070 2015-02-27 Tom Tromey <tromey@redhat.com>
5071 Pedro Alves <palves@redhat.com>
5073 Rename symbols whose names are reserved C++ keywords throughout.
5075 2015-02-27 Pedro Alves <palves@redhat.com>
5077 * Makefile.in (COMPILER): New, get it from autoconf.
5078 (CXX): Get from autoconf instead.
5079 (COMPILE.pre): Use COMPILER.
5080 (CC-LD): Rename to ...
5081 (CC_LD): ... this. Use COMPILER.
5082 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5083 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5084 * acinclude.m4: Include build-with-cxx.m4.
5085 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5086 Disable -Werror by default if building in C++ mode.
5087 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5088 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5089 the C++ compiler. Save/restore CXXFLAGS too.
5090 * configure: Regenerate.
5092 2015-02-27 Pedro Alves <palves@redhat.com>
5094 * acinclude.m4: Include libiberty.m4.
5095 * configure.ac: Call libiberty_INIT.
5096 * config.in, configure: Regenerate.
5098 2015-02-26 Pedro Alves <palves@redhat.com>
5100 * linux-low.c (linux_wait_1): When incrementing the PC past a
5101 program breakpoint always use the_low_target.breakpoint_len as
5102 increment, rather than the maximum between that and
5103 the_low_target.decr_pc_after_break.
5105 2015-02-23 Pedro Alves <palves@redhat.com>
5107 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5108 thread was doing a step-over; always adjust the PC if
5109 we stepped over a permanent breakpoint.
5110 (linux_wait_1): If we stepped over breakpoint that was on top of a
5111 permanent breakpoint, manually advance the PC past it.
5113 2015-02-23 Pedro Alves <palves@redhat.com>
5115 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5117 (x86_fill_gregset, x86_store_gregset): Use it when handling
5120 2015-02-20 Pedro Alves <palves@redhat.com>
5122 * thread-db.c: Include "nat/linux-procfs.h".
5123 (thread_db_init): Skip listing new threads if the kernel supports
5124 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5126 2015-02-20 Pedro Alves <palves@redhat.com>
5128 * linux-low.c (status_pending_p_callback): Use ptid_match.
5130 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5132 PR breakpoints/16812
5133 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5134 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5135 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5137 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5139 PR breakpoints/15956
5140 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5142 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5144 * linux-low.c (linux_low_btrace_conf): Print size.
5145 * server.c (handle_btrace_conf_general_set): New.
5146 (hanle_general_set): Call handle_btrace_conf_general_set.
5147 (handle_query): Report Qbtrace-conf:bts:size as supported.
5149 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5151 * linux-low.c (linux_low_enable_btrace): Update parameters.
5152 (linux_low_btrace_conf): New.
5153 (linux_target_ops)<to_btrace_conf>: Initialize.
5154 * server.c (current_btrace_conf): New.
5155 (handle_btrace_enable): Rename to ...
5156 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5157 to target_enable_btrace. Update comment. Update users.
5158 (handle_qxfer_btrace_conf): New.
5159 (qxfer_packets): Add btrace-conf entry.
5160 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5161 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5162 (target_ops)<read_btrace_conf>: New.
5163 (target_enable_btrace): Update parameters.
5164 (target_read_btrace_conf): New.
5166 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5168 * server.c (handle_btrace_general_set): Remove call to
5169 target_supports_btrace.
5170 (supported_btrace_packets): New.
5171 (handle_query): Call supported_btrace_packets.
5172 * target.h: include btrace-common.h.
5173 (btrace_target_info): Removed.
5174 (supports_btrace, target_supports_btrace): Update parameters.
5176 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5178 * Makefile.in (SFILES): Add common/btrace-common.c.
5179 (OBS): Add common/btrace-common.o.
5180 (btrace-common.o): Add build rules.
5181 * linux-low: Include btrace-common.h.
5182 (linux_low_read_btrace): Use struct btrace_data. Call
5183 btrace_data_init and btrace_data_fini.
5185 2015-02-06 Pedro Alves <palves@redhat.com>
5187 * thread-db.c (find_new_threads_callback): Add debug output.
5189 2015-02-04 Pedro Alves <palves@redhat.com>
5191 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5192 (resume_stopped_resumed_lwps): New function.
5193 (linux_wait_for_event_filtered): Use it.
5195 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5197 * Makefile.in (SFILES): Add linux-personality.c.
5198 (linux-personality.o): New rule.
5199 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5200 list of objects to be built.
5201 * linux-low.c: Include nat/linux-personality.h.
5202 (linux_create_inferior): Remove code to disable address space
5203 randomization (moved to ../nat/linux-personality.c). Create
5204 cleanup to disable address space randomization.
5206 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5208 * Makefile.in (posix-strerror.o): New rule.
5209 (mingw-strerror.o): Likewise.
5210 * configure: Regenerated.
5211 * configure.ac: Source file ../common/common.host. Initialize new
5212 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5214 2015-01-14 Yao Qi <yao@codesourcery.com>
5216 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5217 (ppc-linux.o): New rule.
5218 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5219 * configure.ac: AC_CHECK_FUNCS(getauxval).
5220 * config.in: Re-generated.
5221 * configure: Re-generated.
5222 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5223 ppc64_64bit_inferior_p
5225 2015-01-14 Yao Qi <yao@codesourcery.com>
5227 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5228 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5229 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5230 (PT_ORIG_R3, PT_TRAP): Likewise.
5231 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5232 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5233 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5235 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5237 * i387-fp.c (i387_cache_to_xsave): In look over
5238 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5239 zmmh_low_space field by use of zmmh_high_space.
5241 2015-01-09 Pedro Alves <palves@redhat.com>
5243 * linux-low.c (step_over_bkpt): Move higher up in the file.
5244 (handle_extended_wait): Don't store the stop_pc here.
5245 (get_stop_pc): Adjust comments and rename to ...
5246 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5247 stopped for a software breakpoint or hardware breakpoint.
5248 (thread_still_has_status_pending_p): New function.
5249 (status_pending_p_callback): Use
5250 thread_still_has_status_pending_p. If the event is no longer
5251 interesting, resume the LWP.
5252 (handle_tracepoints): Add assert.
5253 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5254 (wstatus_maybe_breakpoint): New function.
5255 (cancel_breakpoint): Delete function.
5256 (check_stopped_by_watchpoint): New function, factored out from
5257 linux_low_filter_event.
5258 (lp_status_maybe_breakpoint): Delete function.
5259 (linux_low_filter_event): Remove filter_ptid argument.
5260 Leave thread group exits pending here. Store the LWP's stop PC.
5261 Always leave events pending.
5262 (linux_wait_for_event_filtered): Pull all events out of the
5263 kernel, and leave them all pending.
5264 (count_events_callback, select_event_lwp_callback): Consider all
5266 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5267 (select_event_lwp): Only give preference to the stepping LWP in
5268 all-stop mode. Adjust comments.
5269 (ignore_event): New function.
5270 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5271 references to cancel_breakpoints. Adjust to renames. Also give
5272 equal priority to all LWPs that have had events in non-stop mode.
5273 If reporting a software breakpoint event, unadjust the LWP's PC.
5274 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5275 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5277 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5278 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5279 (linux_stopped_by_watchpoint): Adjust.
5280 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5281 * linux-low.h (enum lwp_stop_reason): New.
5282 (struct lwp_info) <stop_pc>: Adjust comment.
5283 <stopped_by_watchpoint>: Delete field.
5284 <stop_reason>: New field.
5285 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5286 * mem-break.c (software_breakpoint_inserted_here)
5287 (hardware_breakpoint_inserted_here): New function.
5288 * mem-break.h (software_breakpoint_inserted_here)
5289 (hardware_breakpoint_inserted_here): Declare.
5290 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5291 (cancel_breakpoints): Delete.
5292 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5293 (upload_fast_traceframes): Remove references to
5296 2015-01-09 Pedro Alves <palves@redhat.com>
5298 * thread-db.c (find_new_threads_callback): Ignore thread if the
5299 kernel thread ID is -1.
5301 2015-01-09 Pedro Alves <palves@redhat.com>
5303 * linux-low.c (linux_attach_fail_reason_string): Move to
5304 nat/linux-ptrace.c, and rename.
5305 (linux_attach_lwp): Update comment.
5306 (attach_proc_task_lwp_callback): New function.
5307 (linux_attach): Adjust to rename and use
5308 linux_proc_attach_tgid_threads.
5309 (linux_attach_fail_reason_string): Delete declaration.
5311 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5313 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5314 * server.c (gdbserver_version): Likewise.
5316 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5318 * remote-utils.c: Include ctype.h.
5319 (input_interrupt): Explicitly handle the case when the char
5320 received is the NUL byte. Improve the printing of non-ASCII
5323 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5325 * linux-low.c (linux_low_filter_event): Update call to
5326 linux_enable_event_reporting following the addition of
5327 a new parameter to that function.
5329 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5332 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5333 (AARCH64_FPCR_REGNO): Likewise.
5334 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5335 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5336 (aarch64_store_fpregset): Likewise.
5338 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5340 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5341 Remove FIXME comment about assumption about N.
5343 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5345 * configure.ac: If large-file support is disabled in GDBserver,
5346 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5347 * configure: Regenerate.
5349 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5351 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5352 warning upon ENODATA from ptrace.
5353 * linux-s390-low.c (s390_store_tdb): New.
5354 (s390_regsets): Add regset for NT_S390_TDB.
5356 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5358 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5359 without a fill_function.
5360 * linux-s390-low.c (s390_fill_last_break): Remove.
5361 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5362 (s390_arch_setup): Use regset's size instead of fill_function for
5365 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5367 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5368 the regset's store function when ptrace returned an error.
5369 * regcache.c (get_thread_regcache): Invalidate register cache
5370 before fetching inferior's registers.
5372 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5374 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5375 while-loop as for-loop.
5376 (regsets_store_inferior_registers): Likewise.
5378 2014-11-28 Yao Qi <yao@codesourcery.com>
5380 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5381 * config.in, configure: Re-generate.
5382 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5385 2014-11-21 Yao Qi <yao@codesourcery.com>
5387 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5388 (AC_CHECK_HEADERS): Remove malloc.h.
5389 * configure: Re-generated.
5390 * config.in: Re-generated.
5391 * server.h: Don't include alloca.h and malloc.h.
5392 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5393 Don't include malloc.h.
5395 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5397 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5398 corresponding ERRNO check in same block.
5400 2014-11-12 Pedro Alves <palves@redhat.com>
5402 * server.c (cont_thread): Update comment.
5403 (start_inferior, attach_inferior): No longer clear cont_thread.
5404 (handle_v_cont): No longer set cont_thread.
5405 (captured_main): Clear cont_thread each time a GDB connects.
5407 2014-11-12 Pedro Alves <palves@redhat.com>
5409 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5410 thread, and don't resume all threads if the Hc thread has exited.
5412 2014-11-12 Pedro Alves <palves@redhat.com>
5414 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5415 the process group instead of to a specific LWP.
5417 2014-10-15 Pedro Alves <palves@redhat.com>
5420 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5422 (arm_set_thread_context): Delete.
5423 (the_low_target): Adjust.
5424 * win32-i386-low.c (debug_registers_changed)
5425 (debug_registers_used): Delete.
5426 (update_debug_registers_callback): New function.
5427 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5428 needing to update their debug registers.
5429 (win32_get_current_dr): New function.
5430 (x86_dr_low_get_addr, x86_dr_low_get_control)
5431 (x86_dr_low_get_status): Fetch the debug register from the thread
5433 (i386_initial_stuff): Adjust.
5434 (i386_get_thread_context): Remove current_event parameter. Don't
5435 clear debug_registers_changed nor copy DR values to
5437 (i386_set_thread_context): Delete.
5438 (i386_prepare_to_resume): New function.
5439 (i386_thread_added): Mark the thread as needing to update irs
5441 (the_low_target): Remove i386_set_thread_context and install
5442 i386_prepare_to_resume.
5443 * win32-low.c (win32_get_thread_context): Adjust.
5444 (win32_set_thread_context): Use SetThreadContext
5446 (win32_prepare_to_resume): New function.
5447 (win32_require_context): New function, factored out from ...
5448 (thread_rec): ... this.
5449 (continue_one_thread): Call win32_prepare_to_resume on each thread
5450 we're about to continue.
5451 (win32_resume): Call win32_prepare_to_resume on the event thread.
5452 * win32-low.h (struct win32_thread_info)
5453 <debug_registers_changed>: New field.
5454 (struct win32_target_ops): Change prototype of set_thread_context,
5455 delete set_thread_context and add prepare_to_resume.
5456 (win32_require_context): New declaration.
5458 2014-10-08 Gary Benson <gbenson@redhat.com>
5460 * server.h: Do not include common-exceptions.h.
5462 2014-10-08 Gary Benson <gbenson@redhat.com>
5464 * server.h: Do not include cleanups.h.
5466 2014-09-30 James Hogan <james.hogan@imgtec.com>
5468 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5471 2014-09-23 Yao Qi <yao@codesourcery.com>
5473 * linux-low.c (lp_status_maybe_breakpoint): New function.
5474 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5475 (count_events_callback): Likewise.
5476 (select_event_lwp_callback): Likewise.
5477 (cancel_breakpoints_callback): Likewise.
5479 2014-09-19 Don Breazeal <donb@codesourcery.com>
5481 * linux-low.c (handle_extended_wait): Call
5482 linux_ptrace_get_extended_event.
5483 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5484 linux_is_extended_waitstatus.
5486 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5488 * Makefile.in (CPPFLAGS): Define.
5489 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5490 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5492 2014-09-16 Gary Benson <gbenson@redhat.com>
5494 * inferiors.h (current_inferior): Renamed as...
5495 (current_thread): New variable. All uses updated.
5496 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5497 (maybe_move_out_of_jump_pad): Likewise.
5498 (cancel_breakpoint): Likewise.
5499 (linux_low_filter_event): Likewise.
5500 (wait_for_sigstop): Likewise.
5501 (linux_resume_one_lwp): Likewise.
5502 (need_step_over_p): Likewise.
5503 (start_step_over): Likewise.
5504 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5505 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5506 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5507 and save_inferior as saved_thread.
5508 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5510 (regcache_invalidate_thread): Likewise.
5511 * remote-utils.c (prepare_resume_reply): Likewise.
5512 * thread-db.c (thread_db_get_tls_address): Likewise.
5513 (disable_thread_event_reporting): Likewise.
5514 (remove_thread_event_breakpoints): Likewise.
5515 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5517 * target.h (set_desired_inferior): Renamed as...
5518 (set_desired_thread): New declaration. All uses updated.
5519 * server.c (myresume): Updated comment to reference thread instead
5521 (handle_serial_event): Likewise.
5522 (handle_target_event): Likewise.
5524 2014-09-12 Tom Tromey <tromey@redhat.com>
5525 Gary Benson <gbenson@redhat.com>
5527 * regcache.h: Include common-regcache.h.
5528 (regcache_read_pc): Don't declare.
5529 * regcache.c (get_thread_regcache_for_ptid): New function.
5531 2014-09-11 Tom Tromey <tromey@redhat.com>
5532 Gary Benson <gbenson@redhat.com>
5534 * symbol.c: New file.
5535 * Makefile.in (SFILES): Add symbol.c.
5536 (OBS): Add symbol.o.
5538 2014-09-11 Gary Benson <gbenson@redhat.com>
5540 * target.c (target_stop_ptid, target_continue_ptid): New
5543 2014-09-11 Tom Tromey <tromey@redhat.com>
5544 Gary Benson <gbenson@redhat.com>
5546 * target.h: Include target/target.h.
5547 * target.c (target_read_memory, target_read_uint32)
5548 (target_write_memory): New functions.
5550 2014-09-11 Gary Benson <gbenson@redhat.com>
5552 * server.h (debug_hw_points): Don't declare.
5553 * server.c (debug_hw_points): Don't define. Replace all uses
5554 with show_debug_regs.
5555 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5556 all uses with show_debug_regs.
5558 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5560 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5561 endianness into account.
5562 (ppc_supply_ptrace_register): Likewise.
5564 2014-09-03 James Hogan <james.hogan@imgtec.com>
5566 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5567 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5569 2014-09-03 Gary Benson <gbenson@redhat.com>
5571 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5572 ALL_DEBUG_ADDRESS_REGISTERS.
5574 2014-09-02 Gary Benson <gbenson@redhat.com>
5576 * i386-low.h: Renamed as...
5577 * x86-low.h: New file. All type, function and variable name
5578 prefixes changed from "i386_" to "x86_". All references updated.
5579 * i386-low.c: Renamed as...
5580 * x86-low.c: New file. All type, function and variable name
5581 prefixes changed from "i386_" to "x86_". All references updated.
5583 2014-09-02 Gary Benson <gbenson@redhat.com>
5585 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5586 (x86_linux_new_thread): Likewise.
5588 2014-08-29 Gary Benson <gbenson@redhat.com>
5590 * server.h (setjmp.h): Do not include.
5591 (toplevel): Do not declare.
5592 (common-exceptions.h): Include.
5593 (cleanups.h): Likewise.
5594 * server.c (toplevel): Do not define.
5595 (exit_code): New static global.
5596 (detach_or_kill_for_exit_cleanup): New function.
5597 (main): New function. Original main renamed to...
5598 (captured_main): New function.
5599 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5601 2014-08-29 Gary Benson <gbenson@redhat.com>
5603 * Makefile.in (SFILES): Add common/common-exceptions.c.
5604 (OBS): Add common-exceptions.o.
5605 (common-exceptions.o): New rule.
5606 * utils.c (prepare_to_throw_exception): New function.
5608 2014-08-29 Gary Benson <gbenson@redhat.com>
5610 * config.in: Regenerate.
5611 * configure: Likewise.
5613 2014-08-29 Gary Benson <gbenson@redhat.com>
5615 * Makefile.in (SFILES): Add common/cleanups.c.
5617 (cleanups.o): New rule.
5619 2014-08-29 Gary Benson <gbenson@redhat.com>
5621 * utils.c (internal_vwarning): New function.
5623 2014-08-28 Gary Benson <gbenson@redhat.com>
5625 * utils.h (fatal): Remove declaration.
5626 * utils.c (fatal): Remove function.
5628 2014-08-28 Gary Benson <gbenson@redhat.com>
5630 * tracepoint.c (gdb_agent_init): Replace fatal with
5632 (initialize_tracepoint): Likewise.
5634 2014-08-28 Gary Benson <gbenson@redhat.com>
5636 * remote-utils.c (remote_prepare): Replace fatal with error.
5638 2014-08-28 Gary Benson <gbenson@redhat.com>
5640 * linux-low.c (linux_async): Replace fatal with warning.
5642 (linux_start_non_stop): Return -1 if linux_async failed.
5644 2014-08-28 Gary Benson <gbenson@redhat.com>
5646 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5648 (i386_dr_low_get_addr): Remove vague comment.
5649 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5652 2014-08-28 Gary Benson <gbenson@redhat.com>
5654 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5655 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5657 (linux_resume_one_lwp): Likewise.
5658 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5660 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5661 with internal_error.
5662 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5663 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5664 (find_register_by_name): Replace fatal with internal_error.
5665 (find_regno): Likewise.
5666 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5667 * thread-db.c (thread_db_create_event): Likewise.
5668 (thread_db_load_search): Likewise.
5669 (try_thread_db_load_1): Likewise.
5670 * tracepoint.c (get_jump_space_head): Replace fatal with
5672 (claim_trampoline_space): Likewise.
5673 (have_fast_tracepoint_trampoline_buffer): Likewise.
5674 (cmd_qtstart): Likewise.
5675 (stop_tracing): Likewise.
5676 (fast_tracepoint_collecting): Likewise.
5677 (target_malloc): Likewise.
5678 (download_tracepoint): Likewise.
5679 (download_trace_state_variables): Replace check with gdb_assert.
5680 (upload_fast_traceframes): Replace fatal with internal_error.
5682 2014-08-19 Tom Tromey <tromey@redhat.com>
5683 Gary Benson <gbenson@redhat.com>
5685 * Makefile.in (SFILES): Add common/common-debug.c.
5686 (OBS): Add common-debug.o.
5687 (common-debug.o): New rule.
5688 * debug.h (debug_printf): Don't declare.
5689 * debug.c (debug_printf): Renamed and rewritten as...
5690 (debug_vprintf): New function.
5692 2014-08-19 Gary Benson <gbenson@redhat.com>
5694 * utils.h: Do not include print-utils.h.
5696 2014-08-19 Tom Tromey <tromey@redhat.com>
5697 Gary Benson <gbenson@redhat.com>
5699 * server.h: Add static assertion.
5700 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5702 2014-08-19 Tom Tromey <tromey@redhat.com>
5703 Gary Benson <gbenson@redhat.com>
5705 * Makefile.in (SFILES): Add common/errors.c.
5706 (OBS): Add errors.o.
5707 (IPA_OBS): Add errors-ipa.o.
5708 (errors.o): New rule.
5709 (errors-ipa.o): Likewise.
5710 * utils.h (perror_with_name, error, warning): Don't declare.
5711 * utils.c (warning): Renamed and rewritten as...
5712 (vwarning): New function.
5713 (error): Renamed and rewritten as...
5714 (verror): New function.
5715 (internal_error): Renamed and rewritten as...
5716 (internal_verror): New function.
5718 2014-08-07 Gary Benson <gbenson@redhat.com>
5720 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5721 * configure: Regenerate.
5722 * config.in: Likewise.
5723 * server.h: Do not include errno.h.
5724 * event-loop.c: Likewise.
5725 * hostio-errno.c: Likewise.
5726 * linux-low.c: Likewise.
5727 * remote-utils.c: Likewise.
5728 * spu-low.c: Likewise.
5729 * utils.c: Likewise.
5730 * gdbreplay.c: Unconditionally include errno.h.
5732 2014-08-07 Gary Benson <gbenson@redhat.com>
5734 * server.h: Do not include string.h.
5735 * event-loop.c: Likewise.
5736 * linux-low.c: Likewise.
5737 * regcache.c: Likewise.
5738 * remote-utils.c: Likewise.
5739 * spu-low.c: Likewise.
5740 * utils.c: Likewise.
5742 2014-08-07 Gary Benson <gbenson@redhat.com>
5744 * server.h: Do not include gdb_assert.h.
5746 2014-08-07 Gary Benson <gbenson@redhat.com>
5748 * server.h: Do not include common-utils.h.
5750 2014-08-07 Gary Benson <gbenson@redhat.com>
5752 * server.h: Do not include ptid.h.
5753 * notif.h: Likewise.
5755 2014-08-07 Gary Benson <gbenson@redhat.com>
5757 * server.h: Do not include gdb_locale.h.
5759 2014-08-07 Gary Benson <gbenson@redhat.com>
5761 * server.h: Do not include gdb/signals.h.
5762 * win32-low.c: Likewise.
5764 2014-08-07 Gary Benson <gbenson@redhat.com>
5766 * server.h: Do not include pathmax.h.
5768 2014-08-07 Gary Benson <gbenson@redhat.com>
5770 * server.h: Do not include libiberty.h.
5771 * linux-bfin-low.c: Likewise.
5773 2014-08-07 Gary Benson <gbenson@redhat.com>
5775 * server.h: Do not include ansidecl.h.
5777 2014-08-07 Gary Benson <gbenson@redhat.com>
5779 * linux-x86-low.c: Do not include stddef.h.
5780 * lynx-ppc-low.c: Likewise.
5781 * tracepoint.c: Likewise.
5783 2014-08-07 Gary Benson <gbenson@redhat.com>
5785 * server.h: Do not include stdarg.h.
5786 * nto-low.c: Likewise.
5788 2014-08-07 Gary Benson <gbenson@redhat.com>
5790 * server.h: Do not include stdlib.h.
5791 * inferiors.c: Likewise.
5792 * linux-low.c: Likewise.
5793 * regcache.c: Likewise.
5794 * spu-low.c: Likewise.
5795 * tracepoint.c: Likewise.
5796 * utils.c: Likewise.
5798 2014-08-07 Gary Benson <gbenson@redhat.com>
5800 * server.h: Do not include stdio.h.
5801 * linux-low.c: Likewise.
5802 * remote-utils.c: Likewise.
5803 * spu-low.c: Likewise.
5804 * utils.c: Likewise.
5805 * wincecompat.c: Likewise.
5807 2014-08-06 Gary Benson <gbenson@redhat.com>
5809 * regcache.c (init_register_cache): Move conditionals inside if.
5811 2014-08-06 Gary Benson <gbenson@redhat.com>
5813 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5815 2014-07-31 Gary Benson <gbenson@redhat.com>
5817 * ax.h: Do not include server.h.
5818 * gdbthread.h: Likewise.
5819 * lynx-low.h: Likewise.
5820 * notif.h: Likewise.
5822 2014-07-30 Gary Benson <gbenson@redhat.com>
5824 * server.h: Include common-defs.h.
5825 Do not include config.h or build-gnulib-gdbserver/config.h.
5827 2014-07-30 Gary Benson <gbenson@redhat.com>
5829 * hostio-errno.c: Move server.h to top of includes list.
5830 * inferiors.c: Likewise.
5831 * linux-x86-low.c: Likewise.
5832 * notif.c: Include server.h.
5834 2014-07-24 Tom Tromey <tromey@redhat.com>
5835 Gary Benson <gbenson@redhat.com>
5837 * server.h (CORE_ADDR): Now unsigned.
5839 2014-07-16 Pedro Alves <palves@redhat.com>
5841 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5843 2014-07-15 Pedro Alves <palves@redhat.com>
5845 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5848 2014-07-11 Pedro Alves <palves@redhat.com>
5850 * linux-low.c (kill_wait_lwp): New function, based on
5851 kill_one_lwp_callback, but use my_waitpid directly.
5852 (kill_one_lwp_callback, linux_kill): Use it.
5854 2014-06-23 Pedro Alves <palves@redhat.com>
5856 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5857 before setting DR0..DR3.
5859 2014-06-20 Gary Benson <gbenson@redhat.com>
5861 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5862 * configure: Regenerated.
5863 * config.in: Likewise.
5865 2014-06-20 Gary Benson <gbenson@redhat.com>
5867 * Makefile.in (SFILES): Update locations for files moved
5869 (object file files): Reordered.
5871 2014-06-20 Gary Benson <gbenson@redhat.com>
5873 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5874 (i386_dr_low_set_addr): Likewise.
5875 (i386_dr_low_get_addr): Likewise.
5876 (i386_dr_low_can_set_control): Likewise.
5877 (i386_dr_low_set_control): Likewise.
5878 (i386_dr_low_get_control): Likewise.
5879 (i386_dr_low_get_status): Likewise.
5880 (i386_get_debug_register_length): Likewise.
5881 * linux-x86-low.c (i386_dr_low_set_addr):
5882 Changed signature. Made static.
5883 (i386_dr_low_get_addr): Likewise.
5884 (i386_dr_low_set_control): Likewise.
5885 (i386_dr_low_get_control): Likewise.
5886 (i386_dr_low_get_status): Likewise.
5887 (i386_dr_low): New global variable.
5888 * win32-i386-low.c (i386_dr_low_set_addr):
5889 Changed signature. Made static.
5890 (i386_dr_low_get_addr): Likewise.
5891 (i386_dr_low_set_control): Likewise.
5892 (i386_dr_low_get_control): Likewise.
5893 (i386_dr_low_get_status): Likewise.
5894 (i386_dr_low): New global variable.
5896 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5898 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5899 * Makefile.in (AR, AR_FLAGS): Define.
5900 * configure: Regenerate.
5902 2014-06-19 Gary Benson <gbenson@redhat.com>
5904 * Makefile.in (i386-dregs.o): New rule.
5905 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5906 * i386-low.c (target.h): Remove include.
5907 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5908 (DR_CONTROL_SHIFT): Likewise.
5909 (DR_CONTROL_SIZE): Likewise.
5910 (DR_RW_EXECUTE): Likewise.
5911 (DR_RW_WRITE): Likewise.
5912 (DR_RW_READ): Likewise.
5913 (DR_RW_IORW): Likewise.
5914 (DR_LEN_1): Likewise.
5915 (DR_LEN_2): Likewise.
5916 (DR_LEN_4): Likewise.
5917 (DR_LEN_8): Likewise.
5918 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5919 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5920 (DR_ENABLE_SIZE): Likewise.
5921 (DR_LOCAL_SLOWDOWN): Likewise.
5922 (DR_GLOBAL_SLOWDOWN): Likewise.
5923 (DR_CONTROL_RESERVED): Likewise.
5924 (I386_DR_CONTROL_MASK): Likewise.
5925 (I386_DR_VACANT): Likewise.
5926 (I386_DR_LOCAL_ENABLE): Likewise.
5927 (I386_DR_GLOBAL_ENABLE): Likewise.
5928 (I386_DR_DISABLE): Likewise.
5929 (I386_DR_SET_RW_LEN): Likewise.
5930 (I386_DR_GET_RW_LEN): Likewise.
5931 (I386_DR_WATCH_HIT): Likewise.
5932 (i386_wp_op_t): Likewise.
5933 (i386_show_dr): Likewise.
5934 (i386_length_and_rw_bits): Likewise.
5935 (i386_insert_aligned_watchpoint): Likewise.
5936 (i386_remove_aligned_watchpoint): Likewise.
5937 (i386_handle_nonaligned_watchpoint): Likewise.
5938 i386_update_inferior_debug_regs(): Likewise.
5939 (i386_dr_insert_watchpoint): Likewise.
5940 (i386_dr_remove_watchpoint): Likewise.
5941 (i386_dr_region_ok_for_watchpoint): Likewise.
5942 (i386_dr_stopped_data_address): Likewise.
5943 (i386_dr_stopped_by_watchpoint): Likewise.
5945 2014-06-19 Gary Benson <gbenson@redhat.com>
5947 * i386-low.c (i386_dr_show): Renamed to
5948 i386_show_dr and made static. All uses updated.
5949 (i386_dr_length_and_rw_bits): Renamed to
5950 i386_length_and_rw_bits and made static.
5952 (i386_dr_insert_aligned_watchpoint): Renamed to
5953 i386_insert_aligned_watchpoint and made static.
5955 (i386_dr_remove_aligned_watchpoint): Renamed to
5956 i386_remove_aligned_watchpoint and made static.
5958 (i386_dr_update_inferior_debug_regs): Renamed to
5959 i386_update_inferior_debug_regs and made static.
5962 2014-06-18 Gary Benson <gbenson@redhat.com>
5964 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5965 (i386_dr_low_can_set_control): Likewise.
5966 (i386_get_debug_register_length): Likewise.
5967 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5968 (i386_dr_low_can_set_control): Likewise.
5969 (i386_get_debug_register_length): Likewise.
5971 2014-06-17 Gary Benson <gbenson@redhat.com>
5973 * i386-low.h (i386-dregs.h): New include.
5974 (DR_FIRSTADDR): Now in i386-dregs.h.
5975 (DR_LASTADDR): Likewise.
5976 (DR_NADDR): Likewise.
5977 (DR_STATUS): Likewise.
5978 (DR_CONTROL): Likewise.
5979 (i386_debug_reg_state): Likewise.
5980 (i386_dr_insert_watchpoint): Likewise.
5981 (i386_dr_remove_watchpoint): Likewise.
5982 (i386_dr_region_ok_for_watchpoint): Likewise.
5983 (i386_dr_stopped_data_address): Likewise.
5984 (i386_dr_stopped_by_watchpoint): Likewise.
5985 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5987 2014-06-18 Gary Benson <gbenson@redhat.com>
5989 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5990 i386_dr_insert_watchpoint.
5991 (i386_low_remove_watchpoint): Renamed to
5992 i386_dr_remove_watchpoint.
5993 (i386_low_region_ok_for_watchpoint): Renamed to
5994 i386_dr_region_ok_for_watchpoint.
5995 (i386_low_stopped_data_address): Renamed to
5996 i386_dr_stopped_data_address.
5997 (i386_low_stopped_by_watchpoint): Renamed to
5998 i386_dr_stopped_by_watchpoint.
5999 * i386-low.c (i386_show_dr): Renamed to
6000 i386_dr_show and made nonstatic. All uses updated.
6001 (i386_length_and_rw_bits): Renamed to
6002 i386_dr_length_and_rw_bits and made nonstatic.
6004 (i386_insert_aligned_watchpoint): Renamed to
6005 i386_dr_insert_aligned_watchpoint and made nonstatic.
6007 (i386_remove_aligned_watchpoint): Renamed to
6008 i386_dr_remove_aligned_watchpoint and made nonstatic.
6010 (i386_update_inferior_debug_regs): Renamed to
6011 i386_dr_update_inferior_debug_regs and made nonstatic.
6013 (i386_low_insert_watchpoint): Renamed to
6014 i386_dr_insert_watchpoint. All uses updated.
6015 (i386_low_remove_watchpoint): Renamed to
6016 i386_dr_remove_watchpoint. All uses updated.
6017 (i386_low_region_ok_for_watchpoint): Renamed to
6018 i386_dr_region_ok_for_watchpoint. All uses updated.
6019 (i386_low_stopped_data_address): Renamed to
6020 i386_dr_stopped_data_address. All uses updated.
6021 (i386_low_stopped_by_watchpoint): Renamed to
6022 i386_dr_stopped_by_watchpoint. All uses updated.
6024 2014-06-18 Gary Benson <gbenson@redhat.com>
6026 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6027 (i386_dr_low_can_set_control): Likewise.
6028 (i386_insert_aligned_watchpoint): New check.
6030 2014-06-18 Gary Benson <gbenson@redhat.com>
6032 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6035 2014-06-18 Gary Benson <gbenson@redhat.com>
6037 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6038 instead of fatal and error.
6039 (i386_handle_nonaligned_watchpoint): Likewise.
6041 2014-06-18 Gary Benson <gbenson@redhat.com>
6043 * i386-low.c (i386_get_debug_register_length): New macro.
6044 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6045 (i386_show_dr): Use debug_printf instead of fprintf. Use
6046 phex to format values.
6048 2014-06-18 Gary Benson <gbenson@redhat.com>
6050 * i386-low.h: Comment changes.
6051 * i386-low.c: Likewise.
6053 2014-06-18 Gary Benson <gbenson@redhat.com>
6055 * i386-low.c: Whitespace changes.
6057 2014-06-12 Tom Tromey <tromey@redhat.com>
6059 * utils.c (freeargv): Remove.
6061 2014-06-12 Tom Tromey <tromey@redhat.com>
6063 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6064 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6065 (parse_debug_format_options): Likewise.
6066 (gdbserver_usage): Likewise.
6067 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6068 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6069 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6071 ($(LIBGNU)): Depend on libiberty.
6072 (all-lib): Recurse into all subdirs.
6073 (install-only): Invoke "install" target in subdirs.
6074 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6076 * configure: Rebuild.
6077 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6078 for vasprintf, vsnprintf, or gettimeofday.
6079 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6082 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6084 * development.sh: Delete.
6085 * Makefile.in (config.status): Adjust dependency on development.sh.
6086 * configure.ac: Adjust development.sh source call.
6087 * configure: Regenerate.
6089 2014-06-02 Pedro Alves <palves@redhat.com>
6091 * ax.c (gdb_free_agent_expr): New function.
6092 * ax.h (gdb_free_agent_expr): New declaration.
6093 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6095 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6097 (clear_breakpoint_conditions_and_commands): New function.
6098 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6099 (clear_breakpoint_conditions_and_commands): New declaration.
6101 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6103 * linux-aarch64-low.c (asm/ptrace.h): Include.
6105 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6107 Fix TLS access for -static -pthread.
6108 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6109 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6110 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6112 2014-05-20 Pedro Alves <palves@redhat.com>
6114 * linux-aarch64-low.c (aarch64_insert_point)
6115 (aarch64_remove_point): No longer check whether the type is
6116 supported here. Adjust to new interface.
6117 (the_low_target): Install aarch64_supports_z_point_type as
6118 supports_z_point_type method.
6119 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6120 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6121 instead of a Z packet char. Adjust.
6122 (arm_supports_z_point_type): New function.
6123 (arm_insert_point, arm_remove_point): Adjust to new interface.
6124 (the_low_target): Install arm_supports_z_point_type.
6125 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6126 (cris_insert_point, cris_remove_point): Adjust to new interface.
6127 Don't check whether the type is supported here.
6128 (the_low_target): Install cris_supports_z_point_type.
6129 * linux-low.c (linux_supports_z_point_type): New function.
6130 (linux_insert_point, linux_remove_point): Adjust to new interface.
6131 * linux-low.h (struct linux_target_ops) <insert_point,
6132 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6133 raw_breakpoint pointer parameter.
6134 <supports_z_point_type>: New method.
6135 * linux-mips-low.c (mips_supports_z_point_type): New function.
6136 (mips_insert_point, mips_remove_point): Adjust to new interface.
6137 Use mips_supports_z_point_type.
6138 (the_low_target): Install mips_supports_z_point_type.
6139 * linux-ppc-low.c (the_low_target): Install NULL as
6140 supports_z_point_type method.
6141 * linux-s390-low.c (the_low_target): Install NULL as
6142 supports_z_point_type method.
6143 * linux-sparc-low.c (the_low_target): Install NULL as
6144 supports_z_point_type method.
6145 * linux-x86-low.c (x86_supports_z_point_type): New function.
6146 (x86_insert_point): Adjust to new insert_point interface. Use
6147 insert_memory_breakpoint. Adjust to new
6148 i386_low_insert_watchpoint interface.
6149 (x86_remove_point): Adjust to remove_point interface. Use
6150 remove_memory_breakpoint. Adjust to new
6151 i386_low_remove_watchpoint interface.
6152 (the_low_target): Install x86_supports_z_point_type.
6153 * lynx-low.c (lynx_target_ops): Install NULL as
6154 supports_z_point_type callback.
6155 * nto-low.c (nto_supports_z_point_type): New.
6156 (nto_insert_point, nto_remove_point): Adjust to new interface.
6157 (nto_target_ops): Install nto_supports_z_point_type.
6158 * mem-break.c: Adjust intro comment.
6159 (struct raw_breakpoint) <raw_type, size>: New fields.
6160 <inserted>: Update comment.
6161 <shlib_disabled>: Delete field.
6162 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6163 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6164 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6165 (raw_bkpt_type_to_target_hw_bp_type): New function.
6166 (find_enabled_raw_code_breakpoint_at): New function.
6167 (find_raw_breakpoint_at): New type and size parameters. Use them.
6168 (insert_memory_breakpoint): New function, based off
6169 set_raw_breakpoint_at.
6170 (remove_memory_breakpoint): New function.
6171 (set_raw_breakpoint_at): Reimplement.
6172 (set_breakpoint): New, based on set_breakpoint_at.
6173 (set_breakpoint_at): Reimplement.
6174 (delete_raw_breakpoint): Go through the_target->remove_point
6175 instead of assuming memory breakpoints.
6176 (find_gdb_breakpoint_at): Delete.
6177 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6178 (find_gdb_breakpoint): New function.
6179 (set_gdb_breakpoint_at): Delete.
6180 (z_type_supported): New function.
6181 (set_gdb_breakpoint_1): New function, loosely based off
6182 set_gdb_breakpoint_at.
6183 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6184 (delete_gdb_breakpoint_at): Delete.
6185 (delete_gdb_breakpoint_1): New function, loosely based off
6186 delete_gdb_breakpoint_at.
6187 (delete_gdb_breakpoint): New function.
6188 (clear_gdb_breakpoint_conditions): Rename to ...
6189 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6191 (add_condition_to_breakpoint): Make static.
6192 (add_breakpoint_condition): Take a struct breakpoint pointer
6193 instead of an address. Adjust.
6194 (gdb_condition_true_at_breakpoint): Rename to ...
6195 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6197 (gdb_condition_true_at_breakpoint): Reimplement.
6198 (add_breakpoint_commands): Take a struct breakpoint pointer
6199 instead of an address. Adjust.
6200 (gdb_no_commands_at_breakpoint): Rename to ...
6201 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6202 parameter. Return true if no breakpoint was found. Change debug
6204 (gdb_no_commands_at_breakpoint): Reimplement.
6205 (run_breakpoint_commands): Rename to ...
6206 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6207 and change return type to boolean.
6208 (run_breakpoint_commands): New function.
6209 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6210 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6211 breakpoint. Go through the_target->remove_point instead of
6212 assuming memory breakpoint.
6213 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6214 software and hardware breakpoints.
6215 (reinsert_raw_breakpoint): Go through the_target->insert_point
6216 instead of assuming memory breakpoint.
6217 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6218 software and hardware breakpoints.
6219 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6220 Check both software and hardware breakpoints.
6221 (validate_inserted_breakpoint): Assert the breakpoint is a
6222 software breakpoint. Set the inserted flag to -1 instead of
6223 setting shlib_disabled.
6224 (delete_disabled_breakpoints): Adjust.
6225 (validate_breakpoints): Only validate software breakpoints.
6226 Adjust to inserted flag change.
6227 (check_mem_read, check_mem_write): Skip breakpoint types other
6228 than software breakpoints. Adjust to inserted flag change.
6229 * mem-break.h (enum raw_bkpt_type): New enum.
6230 (raw_breakpoint, struct process_info): Forward declare.
6231 (Z_packet_to_target_hw_bp_type): Delete declaration.
6232 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6233 (set_gdb_breakpoint, delete_gdb_breakpoint)
6234 (clear_breakpoint_conditions): New declarations.
6235 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6236 (breakpoint_inserted_here): Update comment.
6237 (add_breakpoint_condition, add_breakpoint_commands): Replace
6238 address parameter with a breakpoint pointer parameter.
6239 (gdb_breakpoint_here): Update comment.
6240 (delete_gdb_breakpoint_at): Delete.
6241 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6242 * server.c (process_point_options): Take a struct breakpoint
6243 pointer instead of an address. Adjust.
6244 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6245 delete_gdb_breakpoint.
6246 * spu-low.c (spu_target_ops): Install NULL as
6247 supports_z_point_type method.
6248 * target.h: Include mem-break.h.
6249 (struct target_ops) <prepare_to_access_memory>: Update comment.
6250 <supports_z_point_type>: New field.
6251 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6252 instead of a char. Also take a raw breakpoint pointer.
6253 * win32-arm-low.c (the_low_target): Install NULL as
6254 supports_z_point_type.
6255 * win32-i386-low.c (i386_supports_z_point_type): New function.
6256 (i386_insert_point, i386_remove_point): Adjust to new interface.
6257 (the_low_target): Install i386_supports_z_point_type.
6258 * win32-low.c (win32_supports_z_point_type): New function.
6259 (win32_insert_point, win32_remove_point): Adjust to new interface.
6260 (win32_target_ops): Install win32_supports_z_point_type.
6261 * win32-low.h (struct win32_target_ops):
6262 <supports_z_point_type>: New method.
6263 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6264 instead of a char. Also take a raw breakpoint pointer.
6266 2014-05-20 Pedro Alves <palves@redhat.com>
6268 * mem-break.h: Include break-common.h.
6269 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6270 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6271 (Z_packet_to_target_hw_bp_type): New declaration.
6272 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6273 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6274 (Z_PACKET_ACCESS_WP): Delete macros.
6275 (Z_packet_to_hw_type): Delete function.
6276 * i386-low.h: Don't include break-common.h here.
6277 (Z_packet_to_hw_type): Delete declaration.
6278 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6279 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6280 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6281 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6282 * linux-aarch64-low.c: Don't include break-common.h here.
6283 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6284 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6285 (Z_packet_to_target_hw_bp_type): Delete function.
6286 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6288 (mips_insert_point, mips_remove_point): Use
6289 Z_packet_to_target_hw_bp_type.
6291 2014-05-20 Pedro Alves <palves@redhat.com>
6293 * linux-aarch64-low.c: Include break-common.h.
6294 (enum target_point_type): Delete.
6295 (Z_packet_to_point_type): Rename to ...
6296 (Z_packet_to_target_hw_bp_type): ... this, and return a
6297 target_hw_bp_type instead.
6298 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6299 instead of an enum target_point_type.
6300 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6302 (aarch64_dr_state_insert_one_point)
6303 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6304 (aarch64_handle_aligned_watchpoint)
6305 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6306 Take an enum target_hw_bp_type instead of an enum
6308 (aarch64_supports_z_point_type): New function.
6309 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6310 use Z_packet_to_target_hw_bp_type.
6312 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6314 * configure.ac: Only use -Werror by default when DEVELOPMENT
6316 * configure: Regenerate.
6318 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6320 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6321 * linux-x86-low.c (X86_64_USER_REGS): New.
6322 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6324 2014-04-28 Yao Qi <yao@codesourcery.com>
6326 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6329 2014-04-25 Pedro Alves <palves@redhat.com>
6332 * linux-low.c (linux_attach_fail_reason_string): New function.
6333 (linux_attach_lwp): Delete.
6334 (linux_attach_lwp_1): Rename to ...
6335 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6336 argument. Remove "initial" parameter. Return int instead of
6337 void. Don't error or warn here.
6338 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6339 failure to attach to the tgid. Call warning when failing to
6341 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6342 argument. Remove "initial" parameter. Return int instead of
6343 void. Don't error or warn here.
6344 (linux_attach_fail_reason_string): New declaration.
6345 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6346 interface change. Use linux_attach_fail_reason_string.
6348 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6349 Walfred Tedeschi <walfred.tedeschi@intel.com>
6351 * Makefile.in: Added rules to handle new files
6352 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6353 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6354 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6355 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6356 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6357 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6359 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6360 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6361 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6362 i386/x32-avx512.xml.
6363 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6364 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6365 i386/x32-avx512-linux.xml.
6366 * i387-fp.c (num_avx512_k_registers): New constant for number
6368 (num_avx512_zmmh_low_registers): New constant for number of
6369 lower ZMM registers (0-15).
6370 (num_avx512_zmmh_high_registers): New constant for number of
6371 higher ZMM registers (16-31).
6372 (num_avx512_ymmh_registers): New contant for number of higher
6373 YMM registers (ymm16-31 added by avx521 on x86_64).
6374 (num_avx512_xmm_registers): New constant for number of higher
6375 XMM registers (xmm16-31 added by AVX512 on x86_64).
6376 (struct i387_xsave): Add space for AVX512 registers.
6377 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6378 Add code to handle AVX512 registers.
6379 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6380 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6381 prototypei from generated file.
6382 (tdesc_amd64_avx512_linux): Likewise.
6383 (init_registers_x32_avx512_linux): Likewise.
6384 (tdesc_x32_avx512_linux): Likewise.
6385 (init_registers_i386_avx512_linux): Likewise.
6386 (tdesc_i386_avx512_linux): Likewise.
6387 (x86_64_regmap): Add AVX512 registers.
6388 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6390 (initialize_low_arch): Add code to initialize AVX512 registers.
6392 2014-04-23 Pedro Alves <palves@redhat.com>
6394 * mem-break.c (find_gdb_breakpoint_at): Make static.
6395 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6397 2014-04-23 Pedro Alves <palves@redhat.com>
6399 * i386-low.c: Don't include break-common.h here.
6400 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6401 prototype to take target_hw_bp_type as argument instead of a Z
6403 * i386-low.h: Include break-common.h here.
6404 (Z_packet_to_hw_type): Declare.
6405 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6407 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6408 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6409 (x86_remove_point): Convert the packet number to a
6410 target_hw_bp_type before calling i386_low_remove_watchpoint.
6411 * win32-i386-low.c (i386_insert_point): Convert the packet number
6412 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6413 (i386_remove_point): Convert the packet number to a
6414 target_hw_bp_type before calling i386_low_remove_watchpoint.
6416 2014-04-23 Pedro Alves <palves@redhat.com>
6418 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6420 2014-04-10 Pedro Alves <palves@redhat.com>
6422 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6423 Check if the condition or command is NULL before checking if the
6424 breakpoint is known. On success, return true.
6425 * mem-break.h (add_breakpoint_condition): Document return.
6426 (add_breakpoint_commands): Add describing comment.
6427 * server.c (skip_to_semicolon): New function.
6428 (process_point_options): Use it.
6430 2014-04-09 Pedro Alves <palves@redhat.com>
6432 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6435 2014-02-27 Pedro Alves <palves@redhat.com>
6438 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6440 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6442 (last_thread_of_process_p): Take a PID argument instead of a
6444 (linux_wait_for_lwp): Delete.
6445 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6447 (linux_low_filter_event): New function, party factored out from
6448 linux_wait_for_event.
6449 (linux_wait_for_event): Rename to ...
6450 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6451 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6452 sigsuspend. Check for zombie leaders.
6453 (linux_wait_for_event): Reimplement as wrapper around
6454 linux_wait_for_event_filtered.
6455 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6456 a normal or signal exit is seen, it's the whole process exiting.
6457 (wait_for_sigstop): No longer a for_each_inferior callback.
6458 Rewrite on top of linux_wait_for_event_filtered.
6459 (stop_all_lwps): Call wait_for_sigstop directly.
6460 * server.c (resume, handle_target_event): Handle
6461 TARGET_WAITKIND_NO_RESUMED.
6463 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6465 * win32-low.c (psapi_get_dll_name,
6466 * win32_CreateToolhelp32Snapshot): Delete.
6467 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6468 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6470 (handle_load_dll): Add function description.
6471 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6473 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6475 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6477 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6478 base address when calling win32_add_one_solib.
6479 (handle_load_dll): Delete local variable load_addr.
6480 Remove 0x1000 offset applied to DLL base address when calling
6481 win32_add_one_solib.
6482 (handle_unload_dll): Add comment.
6484 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6486 * win32-low.c (win32_add_all_dlls): Renames
6487 win32_ensure_ntdll_loaded. Rewrite function documentation.
6488 Adjust implementation to always load all DLLs.
6489 Add 0x1000 offset to DLL base address when calling
6490 win32_add_one_solib.
6491 (child_initialization_done): New static global.
6492 (do_initial_child_stuff): Set child_initialization_done to
6493 zero during child initialization, and 1 after. Replace call
6494 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6496 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6497 (handle_unload_dll): Add function documentation.
6498 (get_child_debug_event): Ignore load and unload DLL events
6499 during child initialization.
6501 2014-02-20 Doug Evans <dje@google.com>
6503 Remove global all_lwps.
6504 * inferiors.h (ptid_of): Move here from linux-low.h.
6505 (pid_of, lwpid_of): Ditto.
6506 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6507 parameter is a struct thread_info * now.
6508 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6509 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6510 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6512 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6513 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6514 * linux-arm-low.c (update_registers_callback): Update, "entry"
6515 parameter is a struct thread_info * now.
6516 Fetch lwpid from current_inferior directly.
6517 (arm_insert_point): Pass &all_threads to find_inferior instead of
6519 (arm_remove_point): Ditto.
6520 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6521 (arm_prepare_to_resume): Fetch pid from thread.
6522 (arm_read_description): Fetch lwpid from current_inferior directly.
6523 * linux-low.c (all_lwps): Delete.
6524 (delete_lwp): Delete call to remove_inferior.
6525 (handle_extended_wait): Fetch lwpid from thread.
6526 (add_lwp): Don't set lwp->entry.id. Remove call to
6527 add_inferior_to_list.
6528 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6529 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6530 (kill_one_lwp_callback): Ditto.
6531 (linux_kill): Don't dereference NULL pointer.
6532 Fetch ptid,lwpid from thread.
6533 (get_detach_signal): Fetch ptid from thread.
6534 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6535 Simplify call to regcache_invalidate_thread.
6536 (delete_lwp_callback): Update, "entry" parameter is a
6537 struct thread_info * now. Fetch pid from thread.
6538 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6539 (status_pending_p_callback): Update, "entry" parameter is a
6540 struct thread_info * now. Fetch ptid from thread.
6541 (find_lwp_pid): Update, "entry" parameter is a
6542 struct thread_info * now.
6543 (linux_wait_for_lwp): Fetch pid from thread.
6544 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6545 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6546 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6547 (dequeue_one_deferred_signal): Ditto.
6548 (cancel_breakpoint): Fetch ptid from current_inferior.
6549 (linux_wait_for_event): Pass &all_threads to find_inferior,
6550 not &all_lwps. Fetch ptid, lwpid from thread.
6551 (count_events_callback): Update, "entry" parameter is a
6552 struct thread_info * now.
6553 (select_singlestep_lwp_callback): Ditto.
6554 (select_event_lwp_callback): Ditto.
6555 (cancel_breakpoints_callback): Ditto.
6556 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6558 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6559 (unsuspend_one_lwp): Update, "entry" parameter is a
6560 struct thread_info * now.
6561 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6563 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6564 Fetch lwpid from thread, not lwp.
6565 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6566 Pass &all_threads to find_inferior, not &all_lwps.
6567 (send_sigstop): Fetch lwpid from thread, not lwp.
6568 (send_sigstop_callback): Update, "entry" parameter is a
6569 struct thread_info * now.
6570 (suspend_and_send_sigstop_callback): Ditto.
6571 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6572 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6573 struct thread_info * now.
6574 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6576 (lwp_running): Update, "entry" parameter is a
6577 struct thread_info * now.
6578 (stop_all_lwps): Fetch ptid from thread.
6579 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6580 (linux_resume_one_lwp): Fetch lwpid from thread.
6581 (linux_set_resume_request): Update, "entry" parameter is a
6582 struct thread_info * now. Fetch pid, lwpid from thread.
6583 (resume_status_pending_p): Update, "entry" parameter is a
6584 struct thread_info * now.
6585 (need_step_over_p): Ditto. Fetch lwpid from thread.
6586 (start_step_over): Fetch lwpid from thread.
6587 (linux_resume_one_thread): Update, "entry" parameter is a
6588 struct thread_info * now. Fetch lwpid from thread.
6589 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6590 (proceed_one_lwp): Update, "entry" parameter is a
6591 struct thread_info * now. Fetch lwpid from thread.
6592 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6593 struct thread_info * now.
6594 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6595 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6596 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6598 (regsets_store_inferior_registers): Ditto.
6599 (fetch_register, store_register): Ditto.
6600 (linux_read_memory, linux_write_memory): Ditto.
6601 (linux_request_interrupt): Ditto.
6602 (linux_read_auxv): Ditto.
6603 (linux_xfer_siginfo): Ditto.
6604 (linux_qxfer_spu): Ditto.
6605 (linux_qxfer_libraries_svr4): Ditto.
6606 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6607 moved to inferiors.h.
6609 (get_thread_lwp): Update.
6610 (struct lwp_info): Delete member "entry". Simplify comment for
6613 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6614 current_inferior directly.
6615 (update_watch_registers_callback): Update, "entry" parameter is a
6616 struct thread_info * now. Fetch pid from thread.
6617 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6618 (mips_insert_point): Fetch lwpid from current_inferior.
6619 Pass &all_threads to find_inferior, not &all_lwps.
6620 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6621 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6623 (mips_stopped_data_address): Ditto.
6624 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6626 * linux-tile-low.c (tile_arch_setup): Ditto.
6627 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6628 (update_debug_registers_callback): Update, "entry" parameter is a
6629 struct thread_info * now. Fetch pid from thread.
6630 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6631 Pass &all_threads to find_inferior, not &all_lwps.
6632 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6633 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6634 Pass &all_threads to find_inferior, not &all_lwps.
6635 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6636 (i386_dr_low_get_status): Ditto.
6637 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6638 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6639 (x86_linux_read_description): Ditto.
6640 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6642 2014-02-20 Doug Evans <dje@google.com>
6644 * inferiors.c (get_first_inferior): Fix buglet.
6646 2014-02-19 Doug Evans <dje@google.com>
6648 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6649 * inferiors.c (add_thread): Change result type to struct thread_info *.
6650 All callers updated.
6651 (add_lwp): Call add_thread here instead of in callers.
6652 All callers updated.
6653 * linux-low.h (get_lwp_thread): Rewrite.
6654 (struct lwp_info): New member "thread".
6656 2014-02-19 Doug Evans <dje@google.com>
6658 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6659 All callers updated.
6661 2014-02-19 Doug Evans <dje@google.com>
6663 * inferiors.c (add_thread): Fix whitespace.
6665 2014-02-19 Doug Evans <dje@google.com>
6667 * dll.c (clear_dlls): Replace accessing list implemention details
6669 * gdbthread.h (get_first_thread): Declare.
6670 * inferiors.c (for_each_inferior_with_data): New function.
6671 (get_first_thread): New function.
6672 (find_thread_ptid): Simplify.
6673 (get_first_inferior): New function.
6674 (clear_list): Delete.
6675 (one_inferior_p): New function.
6676 (clear_inferior_list): New function.
6677 (clear_inferiors): Update.
6678 * inferiors.h (for_each_inferior_with_data): Declare.
6679 (clear_inferior_list): Declare.
6680 (one_inferior_p): Declare.
6681 (get_first_inferior): Declare.
6682 * linux-low.c (linux_wait_for_event): Replace accessing list
6683 implemention details with API function.
6684 * server.c (target_running): Ditto.
6685 (accumulate_file_name_length): New function.
6686 (emit_dll_description): New function.
6687 (handle_qxfer_libraries): Replace accessing list implemention
6688 details with API function.
6689 (handle_qxfer_threads_worker): New function.
6690 (handle_qxfer_threads_proper): Replace accessing list implemention
6691 details with API function.
6692 (handle_query): Ditto.
6693 (visit_actioned_threads_callback_ftype): New typedef.
6694 (visit_actioned_threads_data): New struct.
6695 (visit_actioned_threads): Rewrite to be find_inferior callback.
6696 (resume): Call find_inferior.
6697 (handle_status): Replace accessing list implemention
6698 details with API function.
6699 (process_serial_event): Replace accessing list implemention details
6701 * target.c (set_desired_inferior): Replace accessing list implemention
6702 details with API function.
6703 * tracepoint.c (same_process_p): New function.
6704 (gdb_agent_about_to_close): Replace accessing list implemention
6705 details with API function.
6706 * win32-low.c (child_delete_thread): Replace accessing list
6707 implemention details with API function.
6708 (match_dll_by_basename): New function.
6709 (dll_is_loaded_by_basename): New function.
6710 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6711 details call to dll_is_loaded_by_basename.
6713 2014-02-19 Doug Evans <dje@google.com>
6715 * dll.h (struct dll_info): Add comment.
6716 * gdbthread.h (struct thread_info): Add comment.
6717 (current_ptid): Simplify.
6718 * inferiors.c (add_process): Update.
6719 (remove_process): Update.
6720 * inferiors.h (struct process_info): Rename member "head" to "entry".
6721 * linux-low.c (delete_lwp): Update.
6723 (last_thread_of_process_p): Update.
6724 (kill_one_lwp_callback, linux_kill): Update.
6725 (status_pending_p_callback): Update.
6726 (wait_for_sigstop): Update. Simplify read of ptid.
6727 (start_step_over): Update.
6728 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6729 (get_lwp_thread): Update.
6730 (struct lwp_info): Rename member "head" to "entry".
6731 * regcache.h (inferior_list_entry): Delete.
6732 * server.c (kill_inferior_callback): Update.
6733 (detach_or_kill_inferior_callback): Update.
6734 (print_started_pid): Update.
6735 (print_attached_pid): Update.
6736 (process_serial_event): Simplify read of ptid.
6737 * thread-db.c (thread_db_create_event): Update.
6738 (thread_db_get_tls_address): Update.
6739 * win32-low.c (current_inferior_ptid): Simplify.
6741 2014-02-19 Tom Tromey <tromey@redhat.com>
6743 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6745 (target_supports_btrace): Update.
6747 2014-02-14 Yao Qi <yao@codesourcery.com>
6749 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6750 (rsp-low-ipa.o): New target.
6752 2014-02-12 Tom Tromey <tromey@redhat.com>
6754 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6755 convert_ascii_to_int.
6756 * regcache.c (registers_to_string): Likewise.
6757 * remote-utils.c (decode_M_packet): Likewise.
6758 * server.c (process_serial_event): Likewise.
6760 2014-02-12 Tom Tromey <tromey@redhat.com>
6762 * server.c (handle_query, handle_v_run): Use hex2bin, not
6764 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6766 2014-02-12 Tom Tromey <tromey@redhat.com>
6768 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6769 convert_int_to_ascii.
6770 * regcache.c (registers_to_string, collect_register_as_string):
6772 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6774 * server.c (process_serial_event): Likewise.
6775 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6776 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6778 2014-02-12 Tom Tromey <tromey@redhat.com>
6780 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6781 bin2hex, not hexify.
6782 * tracepoint.c (cmd_qtstatus): Likewise.
6784 2014-02-12 Tom Tromey <tromey@redhat.com>
6786 * remote-utils.c (monitor_output): Pass explicit length to
6789 2014-02-12 Tom Tromey <tromey@redhat.com>
6791 * tracepoint.c: Include rsp-low.h.
6792 * server.c: Include rsp-low.h.
6793 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6794 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6796 * remote-utils.c: Include rsp-low.h.
6797 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6798 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6799 (convert_int_to_ascii, convert_ascii_to_int): Move to
6801 * regcache.c: Include rsp-low.h.
6802 * ax.c: Include rsp-low.h.
6803 * Makefile.in (SFILES): Add common/rsp-low.c.
6804 (OBS): Add rsp-low.o.
6805 (rsp-low.o): New target.
6807 2014-02-12 Tom Tromey <tromey@redhat.com>
6809 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6810 Include print-utils.h.
6811 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6812 (plongest, thirty_two, phex_nz): Remove.
6813 * Makefile.in (SFILES): Add common/print-utils.c.
6814 (OBS): Add print-utils.o.
6815 (print-utils-ipa.o): New target.
6816 (print-utils.o): New target.
6817 (IPA_OBJS): Add print-utils-ipa.o.
6819 2014-02-06 Tom Tromey <tromey@redhat.com>
6821 * Makefile.in (SFILES): Fix indentation.
6823 2014-02-05 Doug Evans <dje@google.com>
6825 * linux-low.c (linux_wait_for_event): Improve comment.
6826 (linux_wait_1): Keep current_inferior in sync with event_child.
6828 2014-01-22 Doug Evans <dje@google.com>
6830 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6832 2014-01-22 Doug Evans <dje@google.com>
6834 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6835 * configure: Regenerate.
6836 * config.in: Regenerate.
6837 * Makefile.in (SFILES): Add debug.c.
6839 * debug.c: New file.
6840 * debug.h: New file.
6841 * linux-aarch64-low.c (*): Update all debugging printfs to use
6842 debug_printf instead of fprintf.
6843 * linux-arm-low.c (*): Ditto.
6844 * linux-cris-low.c (*): Ditto.
6845 * linux-crisv32-low.c (*): Ditto.
6846 * linux-m32r-low.c (*): Ditto.
6847 * linux-sparc-low.c (*): Ditto.
6848 * linux-x86.c (*): Ditto.
6849 * linux-low.c (*): Ditto.
6850 (linux_wait_1): Add calls to debug_enter, debug_exit.
6851 (linux_wait): Remove redundant debugging printf.
6852 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6853 (linux_resume, unstop_all_lwps): Ditto.
6854 * mem-break.c (*): Update all debugging printfs to use
6855 debug_printf instead of fprintf.
6856 * remote-utils.c (*): Ditto.
6857 * thread-db.c (*): Ditto.
6858 * server.c #include <ctype.h>, "gdb_vecs.h".
6859 (debug_threads): Moved to debug.c.
6860 (*): Update all debugging printfs to use debug_printf instead of
6862 (start_inferior): Replace call to fflush with call to debug_flush.
6863 (monitor_show_help): Mention set debug-format.
6864 (parse_debug_format_options): New function.
6865 (handle_monitor_command): Handle "monitor set debug-format".
6866 (gdbserver_usage): Mention --debug-format.
6867 (main): Parse --debug-format.
6868 * server.h (debug_threads): Declaration moved to debug.h.
6870 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6871 trace_debug_1 that uses debug_printf.
6872 (tracepoint_look_up_symbols): Update all debugging printfs to use
6873 debug_printf instead of fprintf.
6875 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6877 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6880 2014-01-17 Pedro Alves <palves@redhat.com>
6883 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6884 defined after including gdb_proc_service.h.
6886 2014-01-16 Doug Evans <dje@google.com>
6888 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6889 (match_dll): Use it.
6891 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6893 * target.h (target_ops) <read_btrace>: Change parameters and
6894 return type to allow error reporting.
6895 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6896 trace reading errors on.
6897 * linux-low.c (linux_low_read_btrace): Pass trace reading
6899 (linux_low_disable_btrace): New.
6901 2014-01-15 Doug Evans <dje@google.com>
6903 * inferiors.c (thread_id_to_gdb_id): Delete.
6904 * inferiors.h (thread_id_to_gdb_id): Delete.
6906 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6908 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6909 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6912 2014-01-08 Pedro Alves <palves@redhat.com>
6914 * server.c (handle_status): Don't discard previous queued stop
6915 replies or thread's pending status here.
6916 (main) <disconnection>: Do it here instead.
6918 2014-01-08 Pedro Alves <palves@redhat.com>
6920 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6921 * server.c (visit_actioned_threads, handle_pending_status): New
6923 (handle_v_cont): Factor out parts to ...
6924 (resume): ... this new function. If in all-stop, and a thread
6925 being resumed has a pending status, report it without actually
6927 (myresume): Adjust to use the new 'resume' function.
6928 (clear_pending_status_callback, set_pending_status_callback)
6929 (find_status_pending_thread_callback): New functions.
6930 (handle_status): Handle the case of multiple threads having
6931 interesting statuses to report. Report threads' real last signal
6932 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6933 with an interesting thread to report the status for, instead of
6934 always reporting the status of the first thread.
6936 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6938 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6939 * gdbreplay.c (gdbreplay_version): Likewise.
6941 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6943 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6944 iov.iov_len with the real length in use.
6946 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6948 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6949 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6950 for all targets that use win32-low.c.
6951 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6952 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6954 2013-12-13 Pedro Alves <palves@redhat.com>
6956 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6957 if equal to TARGET_WAITKIND_LOADED.
6958 * win32-low.c (cached_status): New static global.
6959 (win32_wait): Add declaration.
6960 (do_initial_child_stuff): Flush all initial pending debug events
6961 up to the initial breakpoint.
6962 (win32_wait): If CACHED_STATUS was set, return that instead
6963 of doing a real wait. Remove the code resuming the execution
6964 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6965 during the initial phase. Also remove the code changing
6966 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6967 TARGET_WAITKIND_STOPPED.
6969 2013-12-11 Yao Qi <yao@codesourcery.com>
6971 * notif.c (handle_notif_ack): Return 0 if no notification
6974 2013-11-20 Doug Evans <dje@google.com>
6976 * linux-low.c (linux_set_resume_request): Fix comment.
6978 2013-11-20 Doug Evans <dje@google.com>
6980 * linux-low.c (resume_status_pending_p): Tweak comment.
6982 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6984 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6985 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6986 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6987 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6988 (srv_amd64_regobj): Add amd64-mpx.o.
6989 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6990 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6991 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6992 * i387-fp.c (num_pl_bnd_register) Added constant.
6993 (num_pl_bnd_cfg_registers) Added constant.
6994 (struct i387_xsave) Added reserved area and MPX fields.
6995 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6996 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6998 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6999 (init_registers_amd64_mpx_linux): Declare new function.
7000 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7001 (x86_64_regmap): Add MPX registers.
7002 (x86_linux_read_description): Add MPX case.
7003 (initialize_low_arch): Initialize MPX targets.
7005 2013-11-18 Tom Tromey <tromey@redhat.com>
7007 * configure: Rebuild.
7008 * configure.ac: Don't check for stdlib.h.
7009 * gdbreplay.c: Unconditionally include stdlib.h.
7011 2013-11-18 Tom Tromey <tromey@redhat.com>
7013 * config.in: Rebuild.
7014 * configure: Rebuild.
7015 * configure.ac: Don't use AC_HEADER_DIRENT.
7017 2013-11-18 Tom Tromey <tromey@redhat.com>
7019 * server.h: Don't check HAVE_STRING_H.
7020 * gdbreplay.c: Don't check HAVE_STRING_H.
7021 * configure: Rebuild.
7023 2013-11-18 Tom Tromey <tromey@redhat.com>
7025 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7028 2013-11-08 Tom Tromey <tromey@redhat.com>
7030 * configure, config.in: Rebuild.
7031 * configure.ac: Remove unused configury.
7033 2013-11-08 Tom Tromey <tromey@redhat.com>
7035 * acinclude.m4: Include common.m4, codeset.m4.
7036 * configure, config.in: Rebuild.
7037 * configure.ac: Use GDB_AC_COMMON.
7039 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7041 * linux-s390-low.c (HWCAP_S390_TE): New define.
7042 (s390_arch_setup): Consider the TE field in the HWCAP for
7043 determining 'have_regset_tdb'.
7045 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7048 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7051 2013-10-02 Pedro Alves <palves@redhat.com>
7053 * server.c (process_serial_event): Don't output "GDBserver
7054 exiting" if GDB is connected through stdio.
7055 * target.c (mywait): Likewise, be silent if GDB is connected
7058 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7060 * lynx-low.c (lynx_add_threads_after_attach): New function.
7061 (lynx_attach): Remove call to add_thread. Add call to
7062 lynx_add_threads_after_attach instead.
7064 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7066 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7067 * config.in, configure: Regenerated.
7069 2013-09-18 Yao Qi <yao@codesourcery.com>
7072 * server.c (start_inferior): Clear 'resume_info'.
7074 2013-09-16 Jiong Wang <jiwang@tilera.com>
7076 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7079 2013-09-16 Jiong Wang <jiwang@tilera.com>
7081 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7082 linux-tile-low.o to srv_tgtobj.
7084 2013-09-16 Will Newton <will.newton@linaro.org>
7086 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7089 2013-09-06 Pedro Alves <palves@redhat.com>
7091 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7092 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7093 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7094 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7095 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7096 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7098 2013-09-06 Pedro Alves <palves@redhat.com>
7100 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7101 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7103 2013-09-06 Pedro Alves <palves@redhat.com>
7105 * linux-amd64-ipa.c: Include tracepoint.h.
7106 * linux-i386-ipa.c: Include tracepoint.h.
7108 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7110 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7111 (ps_get_thread_area): New function.
7113 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7115 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7116 (initialize_low_arch): Call init_registers_crisv32 rather than
7117 init_register_crisv32.
7119 2013-09-05 Pedro Alves <palves@redhat.com>
7121 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7123 * hostio.h: ... this new file.
7124 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7125 win32-low.c: Include hostio.h.
7127 2013-09-05 Pedro Alves <palves@redhat.com>
7129 * server.h (gdb_client_data, handler_func, callback_handler_func)
7130 (delete_file_handler, add_file_handler, append_callback_event)
7131 (delete_callback_event, start_event_loop, initialize_event_loop):
7132 Move to event-loop.h and include it.
7133 * event-loop.h: New file.
7135 2013-09-05 Pedro Alves <palves@redhat.com>
7137 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7138 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7139 (loaded_dll, unloaded_dll): Move to ...
7140 * dll.h: ... this new file.
7141 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7143 2013-09-05 Pedro Alves <palves@redhat.com>
7145 * server.h (current_process, get_thread_process, all_processes)
7146 (add_inferior_to_list, for_each_inferior, current_inferior)
7147 (remove_inferior, add_process, remove_process, find_process_pid)
7148 (have_started_inferiors_p, have_attached_inferiors_p)
7149 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7150 (clear_inferiors, find_inferior, find_inferior_id)
7151 (inferior_target_data, set_inferior_target_data)
7152 (inferior_regcache_data, set_inferior_regcache_data): Move to
7153 inferiors.h, and include it.
7154 * inferiors.h: New file.
7156 2013-09-05 Pedro Alves <palves@redhat.com>
7158 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7162 2013-09-05 Pedro Alves <palves@redhat.com>
7164 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7166 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7167 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7168 (handle_tracepoint_general_set, handle_tracepoint_query)
7169 (tracepoint_finished_step, tracepoint_was_hit)
7170 (release_while_stepping_state_list, current_traceframe)
7171 (in_readonly_region, traceframe_read_mem)
7172 (fetch_traceframe_registers, traceframe_read_sdata)
7173 (traceframe_read_info, struct fast_tpoint_collect_status)
7174 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7175 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7176 (supply_fast_tracepoint_registers)
7177 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7178 (ipa_tdesc, claim_trampoline_space)
7179 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7180 (agent_mem_read, agent_get_trace_state_variable_value)
7181 (agent_set_trace_state_variable_value, agent_tsv_read)
7182 (agent_mem_read_string, get_raw_reg_func_addr)
7183 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7184 * tracepoint.h: ... this new file.
7186 2013-09-05 Pedro Alves <palves@redhat.com>
7188 * server.h (perror_with_name, error, fatal, warning, paddress)
7189 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7191 * utils.h: New file.
7193 2013-09-05 Pedro Alves <palves@redhat.com>
7195 * server.h (remote_debug, noack_mode, transport_is_reliable)
7196 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7197 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7198 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7199 (write_enn, initialize_async_io, enable_async_io)
7200 (disable_async_io, check_remote_input_interrupt_request)
7201 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7202 (dead_thread_notify, prepare_resume_reply)
7203 (decode_address_to_semicolon, decode_address, decode_m_packet)
7204 (decode_M_packet, decode_X_packet, decode_xfer_write)
7205 (decode_search_memory_packet, unhexify, hexify)
7206 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7207 (look_up_one_symbol, relocate_instruction)
7208 (monitor_output): Move to remote-utils.h, and include it.
7209 * remote-utils.h: New file.
7211 2013-09-05 Pedro Alves <palves@redhat.com>
7213 * server.h (_): Delete.
7215 2013-09-02 Pedro Alves <palves@redhat.com>
7217 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7218 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7220 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7222 2013-09-02 Pierre Muller <muller@sourceware.org>
7224 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7225 or WriteProcessMemory complete successfully and handle
7226 ERROR_PARTIAL_COPY error.
7228 2013-09-02 Pedro Alves <palves@redhat.com>
7230 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7231 error instead of EIO.
7233 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7236 * linux-low.c: Include filestuff.h.
7237 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7238 * lynx-low.c: Include filestuff.h.
7239 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7240 * server.c: Include filestuff.h.
7241 (main): Call notice_open_fds.
7242 * spu-low.c: Include filestuff.h.
7243 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7245 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7247 * Makefile.in: Explain why ../target and ../nat are not
7248 listed as include file search paths.
7249 (linux-waitpid.o): New object file rule.
7250 * configure.srv (srv_native_linux_obj): New variable.
7251 Replace all occurrences of linux native object files with
7252 $srv_native_linux_obj.
7253 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7254 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7255 (linux_enable_event_reporting): Remove declaration.
7256 (my_waitpid): Moved to common/linux-waitpid.c.
7257 (linux_wait_for_event): Pass ptid when calling
7258 linux_enable_event_reporting.
7259 (linux_supports_tracefork_flag): Remove.
7260 (linux_enable_event_reporting): Likewise.
7261 (linux_tracefork_grandchild): Remove.
7262 (STACK_SIZE): Moved to common/linux-ptrace.c.
7263 (linux_tracefork_child): Remove.
7264 (linux_test_for_tracefork): Remove.
7265 (linux_look_up_symbols): Call linux_supports_traceclone.
7266 (initialize_low): Remove call to linux_test_for_tracefork.
7267 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7268 common/linux-ptrace.h.
7269 (PTRACE_TYPE_ARG4): Likewise.
7270 Include linux-ptrace.h.
7272 2013-08-21 Pedro Alves <palves@redhat.com>
7274 * config.in: Renegerate.
7276 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7278 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7279 (SFILES): Remove $(srcdir)/common/target-common.c and
7280 add $(srcdir)/target/waitstatus.c.
7281 (OBS): Remove target-common.o and add waitstatus.o.
7282 (server_h): Remove $(srcdir)/../common/target-common.h and
7283 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7284 and $(srcdir)/../target/waitstatus.h.
7285 (target-common.o): Remove.
7286 (waitstatus.o): New target object file.
7287 * target.h: Do not include target-common.h and
7288 include target/resume.h, target/wait.h and
7289 target/waitstatus.h.
7291 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7293 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7294 to PTRACE_TYPE_ARG3.
7295 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7296 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7298 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7299 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7301 2013-07-27 Jie Zhang <jie@codesourcery.com>
7302 Daniel Jacobowitz <dan@codesourcery.com>
7303 Yao Qi <yao@codesourcery.com>
7305 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7306 (mips-linux-watch.o): New rule.
7307 (mips_linux_watch_h): New variable.
7308 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7310 * linux-mips-low.c: Include mips-linux-watch.h.
7311 (struct arch_process_info, struct arch_lwp_info): New.
7312 (update_watch_registers_callback): New function.
7313 (mips_linux_new_process, mips_linux_new_thread) New functions.
7314 (mips_linux_prepare_to_resume, mips_insert_point): New
7316 (mips_remove_point, mips_stopped_by_watchpoint): New
7318 (rsp_bp_type_to_target_hw_bp_type): New function.
7319 (mips_stopped_data_address): New function.
7320 (the_low_target): Add watchpoint support functions.
7322 2013-07-27 Yao Qi <yao@codesourcery.com>
7324 * i386-low.c: Include break-common.h.
7325 (enum target_hw_bp_type): Remove.
7327 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7329 * Makefile.in (SFILES): /common/target-common.c.
7330 (OBS): Add target-common.o.
7331 (server_h): Add $(srcdir)/../common/target-common.h.
7332 (target-common.o): New target.
7333 * server.c (queue_stop_reply_callback): Free
7334 status string after use.
7335 * target.c (target_waitstatus_to_string): Remove.
7336 * target.h: Include target-common.h.
7337 (resume_kind): Likewise.
7338 (target_waitkind): Likewise.
7339 (target_waitstatus): Likewise.
7340 (TARGET_WNOHANG): Likewise.
7342 2013-07-04 Yao Qi <yao@codesourcery.com>
7344 * Makefile.in (host_alias): Use @host_noncanonical@.
7345 (target_alias): Use @target_noncanonical@.
7346 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7347 ACX_NONCANONICAL_HOST.
7348 * configure: Regenerated.
7351 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7353 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7354 * configure: Rebuild.
7355 * Makefile.in (version_host, version_target): Get from configure.
7356 (version.c): Use $(version_host) and $(version_target).
7358 2013-07-03 Pedro Alves <palves@redhat.com>
7360 * Makefile.in (config.status): Depend on development.sh.
7361 * acinclude.m4: Include libmcheck.m4.
7362 * configure: Regenerate.
7364 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7366 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7367 attribute inside the parentheses.
7368 (winapi_DebugSetProcessKillOnExit): Ditto.
7369 (winapi_DebugBreakProcess): Ditto.
7370 (winapi_GenerateConsoleCtrlEvent): Ditto.
7372 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7374 * notif.h (notif_event): Add a dummy member to avoid compiler
7377 2013-07-01 Pedro Alves <palves@redhat.com>
7379 * hostio.c (HOSTIO_PATH_MAX): Define.
7380 (require_filename, handle_open, handle_unlink, handle_readlink):
7383 2013-07-01 Pedro Alves <palves@redhat.com>
7385 * server.h: Include "pathmax.h".
7386 * linux-low.c: Don't include sys/param.h.
7387 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7389 * win32-low.c: Don't include sys/param.h.
7390 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7392 2013-07-01 Pedro Alves <palves@redhat.com>
7394 * event-loop.c: Don't check HAVE_UNISTD_H before including
7396 * gdbreplay.c: Likewise.
7397 * remote-utils.c: Likewise.
7398 * server.c: Likewise.
7399 * configure.ac: Don't check for unistd.h.
7400 * configure: Regenerate.
7402 2013-06-28 Tom Tromey <tromey@redhat.com>
7404 * Makefile.in (version.c): Use version.in, not
7407 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7409 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7410 * configure: Rebuild.
7411 * Makefile.in (version_host, version_target): Get from configure.
7412 (version.c): Use $(version_host) and $(version_target).
7414 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7416 Fix trace-status to output user name without trailing colon.
7417 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7419 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7421 Fix trace-status to output proper start-time and stop-time.
7422 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7423 output start time and stop time in hex as gdb expects.
7425 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7427 * tracepoint.c (build_traceframe_info_xml): Output trace state
7428 variables present in the trace buffer.
7430 2013-06-24 Tom Tromey <tromey@redhat.com>
7432 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7434 (version.o): Remove.
7435 * gdbreplay.c: Include version.h.
7436 (version, host_name): Don't declare.
7437 * server.h: Include version.h.
7438 (version, host_name): Don't declare.
7440 2013-06-12 Pedro Alves <palves@redhat.com>
7442 * linux-x86-low.c (linux_is_elf64): Delete global.
7443 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7444 with local linux_pid_exe_is_elf_64_file use.
7446 2013-06-11 Pedro Alves <palves@redhat.com>
7448 * linux-low.c (regset_disabled, disable_regset): New functions.
7449 (regsets_fetch_inferior_registers)
7450 (regsets_store_inferior_registers): Use them.
7451 (initialize_regsets_info); Don't allocate the disabled_regsets
7453 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7456 2013-06-11 Pedro Alves <palves@redhat.com>
7458 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7461 2013-06-11 Pedro Alves <palves@redhat.com>
7463 * linux-x86-low.c (initialize_low_arch): Call
7464 init_registers_x32_avx_linux.
7466 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7468 Fix compatibility with Android Bionic.
7469 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7472 2013-06-07 Pedro Alves <palves@redhat.com>
7475 * Makefile.in (OBS): Add tdesc.o.
7476 (IPA_OBJS): Add tdesc-ipa.o.
7477 (tdesc-ipa.o): New rule.
7478 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7480 * linux-low.c (new_inferior): Delete.
7481 (disabled_regsets, num_regsets): Delete.
7482 (linux_add_process): Adjust to set the new per-process
7484 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7485 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7486 was a stop. When calling arch_setup, switch the current inferior
7487 to the thread that got an event.
7488 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7489 (regsets_fetch_inferior_registers)
7490 (regsets_store_inferior_registers): New regsets_info parameter.
7492 (linux_register_in_regsets): New regs_info parameter. Adjust to
7494 (register_addr, fetch_register, store_register): New usrregs_info
7495 parameter. Adjust to use it.
7496 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7497 parameter regs_info. Adjust to use it.
7498 (linux_fetch_registers): Get the current inferior's regs_info, and
7500 (linux_store_registers): Ditto.
7501 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7502 (initialize_low): Don't initialize the target_regsets here. Call
7503 initialize_low_arch.
7504 * linux-low.h (target_regsets): Delete declaration.
7505 (struct regsets_info): New.
7506 (struct usrregs_info): New.
7507 (struct regs_info): New.
7508 (struct process_info_private) <new_inferior>: New field.
7509 (struct linux_target_ops): Delete the num_regs, regmap, and
7510 regset_bitmap fields. New field regs_info.
7511 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7512 * i387-fp.c (num_xmm_registers): Delete.
7513 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7514 calls to new interface.
7515 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7516 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7517 Infer the number of xmm registers from the regcache's target
7519 * i387-fp.h (num_xmm_registers): Delete.
7520 * inferiors.c (add_thread): Don't install the thread's regcache
7522 * proc-service.c (gregset_info): Fetch the current inferior's
7523 regs_info. Adjust to use it.
7524 * regcache.c: Include tdesc.h.
7525 (register_bytes, reg_defs, num_registers)
7526 (gdbserver_expedite_regs): Delete.
7527 (get_thread_regcache): If the thread doesn't have a regcache yet,
7528 create one, instead of aborting gdbserver.
7529 (regcache_invalidate_one): Rename to ...
7530 (regcache_invalidate_thread): ... this.
7531 (regcache_invalidate_one): New.
7532 (regcache_invalidate): Only invalidate registers of the current
7534 (init_register_cache): Add target_desc parameter, and use it.
7535 (new_register_cache): Ditto. Assert the target description has a
7536 non zero registers_size.
7537 (regcache_cpy): Add assertions. Adjust.
7538 (realloc_register_cache, set_register_cache): Delete.
7539 (registers_to_string, registers_from_string): Adjust.
7540 (find_register_by_name, find_regno, find_register_by_number)
7541 (register_cache_size): Add target_desc parameter, and use it.
7542 (free_register_cache_thread, free_register_cache_thread_one)
7543 (regcache_release, register_cache_size): New.
7544 (register_size): Add target_desc parameter, and use it.
7545 (register_data, supply_register, supply_register_zeroed)
7546 (supply_regblock, supply_register_by_name, collect_register)
7547 (collect_register_as_string, collect_register_by_name): Adjust.
7548 * regcache.h (struct target_desc): Forward declare.
7549 (struct regcache) <tdesc>: New field.
7550 (init_register_cache, new_register_cache): Add target_desc
7552 (regcache_invalidate_thread): Declare.
7553 (regcache_invalidate_one): Delete declaration.
7554 (regcache_release): Declare.
7555 (find_register_by_number, register_cache_size, register_size)
7556 (find_regno): Add target_desc parameter.
7557 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7559 * remote-utils.c: Include tdesc.h.
7560 (outreg, prepare_resume_reply): Adjust.
7561 * server.c: Include tdesc.h.
7562 (gdbserver_xmltarget): Delete declaration.
7563 (get_features_xml, process_serial_event): Adjust.
7564 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7566 (struct process_info) <tdesc>: New field.
7567 (ipa_tdesc): Declare.
7568 * tdesc.c: New file.
7569 * tdesc.h: New file.
7570 * tracepoint.c: Include tdesc.h.
7571 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7572 (get_context_regcache): Adjust to pass ipa_tdesc down.
7573 (do_action_at_tracepoint): Adjust to get the register cache size
7574 from the context regcache's description.
7575 (traceframe_walk_blocks): Adjust to get the register cache size
7576 from the current trace frame's description.
7577 (traceframe_get_pc): Adjust to get current trace frame's
7578 description and pass it down.
7579 (gdb_collect): Adjust to get the register cache size from the
7581 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7582 (gdbserver_xmltarget): Delete.
7583 (initialize_low_tracepoint): Set the ipa's target description.
7584 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7585 (initialize_low_tracepoint): Set the ipa's target description.
7586 * linux-x86-low.c: Include tdesc.h.
7587 [__x86_64__] (is_64bit_tdesc): New.
7588 (ps_get_thread_area, x86_get_thread_area): Use it.
7589 (i386_cannot_store_register): Rename to ...
7590 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7591 (i386_cannot_fetch_register): Rename to ...
7592 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7593 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7595 (target_regsets): Rename to ...
7596 (x86_regsets): ... this.
7597 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7599 (x86_siginfo_fixup): Use is_64bit_tdesc.
7600 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7601 (tdesc_x32_avx_linux, tdesc_x32_linux)
7602 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7604 (x86_linux_update_xmltarget): Delete.
7605 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7606 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7607 (AMD64_LINUX_USER64_CS): New.
7608 (x86_linux_read_description): New, based on
7609 x86_linux_update_xmltarget.
7610 (same_process_callback): New.
7611 (x86_arch_setup_process_callback): New.
7612 (x86_linux_update_xmltarget): New.
7613 (x86_regsets_info): New.
7614 (amd64_linux_regs_info): New.
7615 (i386_linux_usrregs_info): New.
7616 (i386_linux_regs_info): New.
7617 (x86_linux_regs_info): New.
7618 (x86_arch_setup): Reimplement.
7619 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7620 (x86_emit_ops): Ditto.
7621 (the_low_target): Adjust. Install x86_linux_regs_info,
7622 x86_cannot_fetch_register, and x86_cannot_store_register.
7623 (initialize_low_arch): New.
7624 * linux-ia64-low.c (tdesc_ia64): Declare.
7625 (ia64_fetch_register): Adjust.
7626 (ia64_usrregs_info, regs_info): New globals.
7627 (ia64_regs_info): New function.
7628 (the_low_target): Adjust.
7629 (initialize_low_arch): New function.
7630 * linux-sparc-low.c (tdesc_sparc64): Declare.
7631 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7633 (sparc_arch_setup): New function.
7634 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7635 (the_low_target): Adjust.
7636 (initialize_low_arch): New function.
7637 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7638 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7639 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7640 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7641 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7642 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7643 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7644 (tdesc_powerpc_isa205_vsx64l): Declare.
7645 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7646 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7647 (ppc_set_pc, ppc_get_hwcap): Adjust.
7648 (ppc_usrregs_info): Forward declare.
7649 (!__powerpc64__) ppc_regmap_adjusted: New global.
7650 (ppc_arch_setup): Adjust to the current process'es target
7652 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7653 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7654 (ppc_store_evrregset): Adjust.
7655 (target_regsets): Rename to ...
7656 (ppc_regsets): ... this, and make static.
7657 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7658 (ppc_regs_info): New function.
7659 (the_low_target): Adjust.
7660 (initialize_low_arch): New function.
7661 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7662 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7663 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7664 (tdesc_s390x_linux64v2): Declare.
7665 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7666 (s390_fill_gregset, s390_store_last_break): Adjust.
7667 (target_regsets): Rename to ...
7668 (s390_regsets): ... this, and make static.
7669 (s390_get_pc, s390_set_pc): Adjust.
7670 (s390_get_hwcap): New target_desc parameter, and use it.
7671 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7672 (s390_arch_setup): Adjust to set the current process'es target
7673 description. Don't adjust the regmap.
7674 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7675 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7676 (regs_info_3264): New globals.
7677 (s390_regs_info): New function.
7678 (the_low_target): Adjust.
7679 (initialize_low_arch): New function.
7680 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7681 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7682 [__mips64] (init_registers_mips_linux)
7683 (init_registers_mips_dsp_linux): Delete defines.
7684 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7685 (have_dsp): New global.
7686 (mips_read_description): New, based on mips_arch_setup.
7687 (mips_arch_setup): Reimplement.
7688 (get_usrregs_info): New function.
7689 (mips_cannot_fetch_register, mips_cannot_store_register)
7690 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7691 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7692 (target_regsets): Rename to ...
7693 (mips_regsets): ... this, and make static.
7694 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7695 (dsp_regs_info, regs_info): New globals.
7696 (mips_regs_info): New function.
7697 (the_low_target): Adjust.
7698 (initialize_low_arch): New function.
7699 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7700 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7702 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7703 (arm_read_description): New, with bits factored from
7705 (arm_arch_setup): Reimplement.
7706 (target_regsets): Rename to ...
7707 (arm_regsets): ... this, and make static.
7708 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7709 (arm_regs_info): New function.
7710 (the_low_target): Adjust.
7711 (initialize_low_arch): New function.
7712 * linux-m68k-low.c (tdesc_m68k): Declare.
7713 (target_regsets): Rename to ...
7714 (m68k_regsets): ... this, and make static.
7715 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7716 (m68k_regs_info): New function.
7717 (m68k_arch_setup): New function.
7718 (the_low_target): Adjust.
7719 (initialize_low_arch): New function.
7720 * linux-sh-low.c (tdesc_sharch): Declare.
7721 (target_regsets): Rename to ...
7722 (sh_regsets): ... this, and make static.
7723 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7724 (sh_regs_info, sh_arch_setup): New functions.
7725 (the_low_target): Adjust.
7726 (initialize_low_arch): New function.
7727 * linux-bfin-low.c (tdesc_bfin): Declare.
7728 (bfin_arch_setup): New function.
7729 (bfin_usrregs_info, regs_info): New globals.
7730 (bfin_regs_info): New function.
7731 (the_low_target): Adjust.
7732 (initialize_low_arch): New function.
7733 * linux-cris-low.c (tdesc_cris): Declare.
7734 (cris_arch_setup): New function.
7735 (cris_usrregs_info, regs_info): New globals.
7736 (cris_regs_info): New function.
7737 (the_low_target): Adjust.
7738 (initialize_low_arch): New function.
7739 * linux-cris-low.c (tdesc_crisv32): Declare.
7740 (cris_arch_setup): New function.
7741 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7742 (cris_regs_info): New function.
7743 (the_low_target): Adjust.
7744 (initialize_low_arch): New function.
7745 * linux-m32r-low.c (tdesc_m32r): Declare.
7746 (m32r_arch_setup): New function.
7747 (m32r_usrregs_info, regs_info): New globals.
7748 (m32r_regs_info): Adjust.
7749 (initialize_low_arch): New function.
7750 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7751 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7752 (tic6x_usrregs_info): Forward declare.
7753 (tic6x_read_description): New function, based on ...
7754 (tic6x_arch_setup): ... this. Reimplement.
7755 (target_regsets): Rename to ...
7756 (tic6x_regsets): ... this, and make static.
7757 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7758 (tic6x_regs_info): New function.
7759 (the_low_target): Adjust.
7760 (initialize_low_arch): New function.
7761 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7762 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7763 (target_regsets): Rename to ...
7764 (xtensa_regsets): ... this, and make static.
7765 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7767 (xtensa_arch_setup, xtensa_regs_info): New functions.
7768 (the_low_target): Adjust.
7769 (initialize_low_arch): New function.
7770 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7771 (nios2_arch_setup): Set the current process'es tdesc.
7772 (target_regsets): Rename to ...
7773 (nios2_regsets): ... this.
7774 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7775 (nios2_regs_info): New function.
7776 (the_low_target): Adjust.
7777 (initialize_low_arch): New function.
7778 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7779 (aarch64_arch_setup): Set the current process'es tdesc.
7780 (target_regsets): Rename to ...
7781 (aarch64_regsets): ... this.
7782 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7783 (aarch64_regs_info): New function.
7784 (the_low_target): Adjust.
7785 (initialize_low_arch): New function.
7786 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7788 (target_regsets): Rename to ...
7789 (tile_regsets): ... this.
7790 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7791 (tile_regs_info): New function.
7792 (tile_arch_setup): Set the current process'es tdesc.
7793 (the_low_target): Adjust.
7794 (initialize_low_arch): New function.
7795 * spu-low.c (tdesc_spu): Declare.
7796 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7797 * win32-arm-low.c (tdesc_arm): Declare.
7798 (arm_arch_setup): New function.
7799 (the_low_target): Install arm_arch_setup instead of
7801 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7802 (init_windows_x86): Rename to ...
7803 (i386_arch_setup): ... this. Set `win32_tdesc'.
7804 (the_low_target): Adjust.
7805 * win32-low.c (win32_tdesc): New global.
7806 (child_add_thread): Don't create the thread cache here.
7807 (do_initial_child_stuff): Set the new process'es tdesc.
7808 * win32-low.h (struct target_desc): Forward declare.
7809 (win32_tdesc): Declare.
7810 * lynx-i386-low.c (tdesc_i386): Declare global.
7811 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7812 * lynx-low.c (lynx_tdesc): New global.
7813 (lynx_add_process): Set the new process'es tdesc.
7814 * lynx-low.h (struct target_desc): Forward declare.
7815 (lynx_tdesc): Declare global.
7816 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7817 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7818 * nto-low.c (nto_tdesc): New global.
7819 (do_attach): Set the new process'es tdesc.
7820 * nto-low.h (struct target_desc): Forward declare.
7821 (nto_tdesc): Declare.
7822 * nto-x86-low.c (tdesc_i386): Declare.
7823 (nto_x86_arch_setup): Set `nto_tdesc'.
7825 2013-06-04 Gary Benson <gbenson@redhat.com>
7827 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7828 to qSupported response when appropriate.
7829 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7830 with nonzero-length annex.
7831 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7832 arguments supplied in annex.
7834 2013-05-31 Doug Evans <dje@google.com>
7837 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7838 64 bits in 64-cross-32 environment.
7840 2013-05-28 Pedro Alves <palves@redhat.com>
7842 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7843 (aarch64-without-fpu.c): Delete rule.
7844 * configure.srv (aarch64*-*-linux*): Remove references to
7845 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7846 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7849 2013-05-24 Pedro Alves <palves@redhat.com>
7851 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7852 instead of strchr/decode_address. Error if the range isn't split
7853 with a ','. Don't assume there's be a ':' in the action.
7855 2013-05-23 Yao Qi <yao@codesourcery.com>
7856 Pedro Alves <palves@redhat.com>
7858 * linux-low.c (lwp_in_step_range): New function.
7859 (linux_wait_1): If the thread was range stepping and stopped
7860 outside the stepping range, report the stop to GDB. Otherwise,
7861 continue stepping. Add range stepping debug output.
7862 (linux_set_resume_request): Copy the step range from the resume
7864 (linux_supports_range_stepping): New.
7865 (linux_target_ops) <supports_range_stepping>: Set to
7866 linux_supports_range_stepping.
7867 * linux-low.h (struct linux_target_ops)
7868 <supports_range_stepping>: New field.
7869 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7870 * linux-x86-low.c (x86_supports_range_stepping): New.
7871 (the_low_target) <supports_range_stepping>: Set to
7872 x86_supports_range_stepping.
7873 * server.c (handle_v_cont): Handle 'r' action.
7874 (handle_v_requests): Append ";r" if the target supports range
7876 * target.h (struct thread_resume) <step_range_start,
7877 step_range_end>: New fields.
7878 (struct target_ops) <supports_range_stepping>:
7880 (target_supports_range_stepping): New macro.
7882 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7884 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7885 confusion in comment.
7887 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7889 * lynx-low.c (struct process_info_private): New type.
7890 (lynx_add_process): New function.
7891 (lynx_create_inferior, lynx_attach): Replace calls to
7892 add_process by calls to lynx_add_process.
7893 (lynx_resume): If PTID is null, then try using
7894 current_process()->private->last_wait_event_ptid.
7896 (lynx_clear_inferiors): Delete. The contents of that function
7897 has been inlined in lynx_mourn;
7898 (lynx_wait_1): Save the ptid in the process's private data.
7899 (lynx_mourn): Free the process' private data. Replace call
7900 to lynx_clear_inferiors by call to clear_inferiors.
7902 2013-05-17 Yao Qi <yao@codesourcery.com>
7904 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7907 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7909 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7910 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7911 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7912 PT_TEXT_END_ADDR guards. Update comments.
7913 (linux_target_op) <read_offsets>: Conditionally define to
7914 linux_read_offsets if the target is UCLIBC and if it defines
7915 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7917 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7918 Andrew Jenner <andrew@codesourcery.com>
7920 * Makefile.in (SFILES): Add linux-nios2-low.c.
7921 (clean): Add action to delete nios2-linux.c.
7922 (nios2-linux.c): New rule.
7923 * configure.srv: Add nios2*-*-linux*.
7924 * linux-nios2-low.c: New.
7926 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7928 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7930 2013-04-25 Hui Zhu <hui@codesourcery.com>
7933 * ax.c (ax_printf): Add fflush.
7935 2013-04-22 Tom Tromey <tromey@redhat.com>
7937 * Makefile.in (SFILES): Add filestuff.c.
7938 (OBS): Add filestuff.o.
7939 (filestuff.o): New target.
7940 * config.in, configure: Rebuild.
7941 * configure.ac: Check for fdwalk, pipe2.
7943 2013-04-17 Pedro Alves <palves@redhat.com>
7945 * configure.ac (USE_THREAD_DB): Delete variable.
7946 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7947 Don't AC_SUBST USE_THREAD_DB.
7948 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7949 * config.in, configure: Regenerate.
7951 2013-04-16 Pedro Alves <palves@redhat.com>
7953 * linux-low.h (struct lwp_info) <thread_known>: Move under
7954 the USE_THREAD_DB #ifdef.
7956 2013-04-16 Pedro Alves <palves@redhat.com>
7958 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7959 (linux-low.o): Delete rule.
7960 * linux-low.h: Always include "gdb_thread_db.h" instead of
7961 conditionally including thread_db.h.
7962 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7965 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7967 * Makefile.in (install-only): Fix make install regression.
7969 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7971 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7972 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7974 * gdbserver.1: Remove.
7976 2013-03-22 Pedro Alves <palves@redhat.com>
7978 * linux-low.c (handle_extended_wait): Don't call
7979 linux_enable_event_reporting.
7981 2013-03-15 Tony Theodore <tonyt@logyst.com>
7984 * Makefile.in (SHELL): Use @SHELL@.
7986 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7988 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7991 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7993 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7994 Remove extraneous NULL element.
7996 2013-03-13 Yao Qi <yao@codesourcery.com>
7998 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7999 'V' block in trace frame.
8001 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8003 * target.h (struct target_ops): Add btrace ops.
8004 (target_supports_btrace): New macro.
8005 (target_enable_btrace): New macro.
8006 (target_disable_btrace): New macro.
8007 (target_read_btrace): New macro.
8008 * gdbthread.h (struct thread_info): Add btrace field.
8009 * server.c: Include btrace-common.h.
8010 (handle_btrace_general_set): New function.
8011 (handle_btrace_enable): New function.
8012 (handle_btrace_disable): New function.
8013 (handle_general_set): Call handle_btrace_general_set.
8014 (handle_qxfer_btrace): New function.
8015 (struct qxfer qxfer_packets[]): Add btrace entry.
8016 * inferiors.c (remove_thread): Disable btrace.
8017 * linux-low: Include linux-btrace.h.
8018 (linux_low_enable_btrace): New function.
8019 (linux_low_read_btrace): New function.
8020 (linux_target_ops): Add btrace ops.
8021 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8022 Add srv_linux_btrace=yes.
8023 (x86_64-*-linux*): Add linux-btrace.o.
8024 Add srv_linux_btrace=yes.
8025 * configure.ac: Define HAVE_LINUX_BTRACE.
8026 * config.in: Regenerated.
8027 * configure: Regenerated.
8029 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8031 * server.c (handle_qxfer): Preserve error message if -3 is
8033 (qxfer): Document the -3 return value.
8035 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8037 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8038 (linux_btrace_h): New variable.
8039 (linux-btrace.o): New rule.
8041 2013-03-08 Stan Shebs <stan@codesourcery.com>
8042 Hafiz Abid Qadeer <abidh@codesourcery.com>
8044 * tracepoint.c (trace_buffer_size): New global.
8045 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8046 (init_trace_buffer): Change to one-argument function. Allocate
8047 trace buffer memory.
8048 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8049 handle QTBuffer:size packet.
8050 (cmd_bigqtbuffer_size): New function.
8051 (initialize_tracepoint): Call init_trace_buffer with
8052 DEFAULT_TRACE_BUFFER_SIZE.
8053 * server.c (handle_query): Add QTBuffer:size in the
8056 2013-03-07 Yao Qi <yao@codesourcery.com>
8058 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8059 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8061 (cmd_qtsp): Adjust condition. Do post increment.
8062 Set cur_action and cur_step_action back to 0.
8064 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8067 * linux-low.c (linux_write_memory): Return early success if LEN is
8070 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8072 * configure.srv: Add x86_64-*-cygwin* as target.
8074 2013-02-28 Tom Tromey <tromey@redhat.com>
8076 * configure.ac: Invoke AC_SYS_LARGEFILE.
8077 * configure, config.in: Rebuild.
8079 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8081 * win32-low.c: Throughout, fix format strings and casts of
8082 printf-like functions to avoid type related warnings on all
8084 (get_child_debug_event): Print dwDebugEventCode as hex since
8085 that's how it's usually documented.
8087 2013-02-28 Yao Qi <yao@codesourcery.com>
8089 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8092 2013-02-27 Jiong Wang <jiwang@tilera.com>
8094 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8095 (reg-tilegx32.c): New rule.
8096 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8097 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8098 different register info initializer according to elf class.
8099 (init_registers_tilgx32): New function. The tilegx32 register info
8101 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8102 (tile_store_gregset): Likewise.
8104 2013-02-27 Yao Qi <yao@codesourcery.com>
8106 * server.c (process_point_options): Print debug message when
8107 debug_threads is true.
8109 2013-02-26 Yao Qi <yao@codesourcery.com>
8111 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8113 2013-02-19 Pedro Alves <palves@redhat.com>
8114 Kai Tietz <ktietz@redhat.com>
8118 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8119 instead of strtoul to extract address from packet.
8120 (process_serial_event) <'z'>: Likewise.
8122 2013-02-18 Yao Qi <yao@codesourcery.com>
8124 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8126 2013-02-14 Pedro Alves <palves@redhat.com>
8130 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8131 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8133 2013-02-14 Pedro Alves <palves@redhat.com>
8135 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8137 2013-02-14 Pedro Alves <palves@redhat.com>
8139 * tracepoint.c (save_string): Delete.
8140 (add_tracepoint_action): Use savestring instead of save_string.
8142 2013-02-12 Pedro Alves <palves@redhat.com>
8144 * linux-xtensa-low.c: Ditto.
8145 * xtensa-xtregs.c: Ditto.
8147 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8149 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8152 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8154 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8155 aarch64_num_wp_regs and aarch64_num_bp_regs to
8156 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8158 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8160 * linux-aarch64-low.c (ps_get_thread_area): Replace
8161 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8163 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8164 Marcus Shawcroft <marcus.shawcroft@arm.com>
8165 Nigel Stephens <nigel.stephens@arm.com>
8166 Yufeng Zhang <yufeng.zhang@arm.com>
8168 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8169 (aarch64.c, aarch64-without-fpu.c): New targets.
8170 * configure.srv (aarch64*-*-linux*): New.
8171 * linux-aarch64-low.c: New file.
8173 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8175 * linux-low.c (handle_extended_wait, linux_create_inferior)
8176 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8177 (dequeue_one_deferred_signal, linux_resume_one_thread)
8178 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8179 (linux_tracefork_grandchild, linux_test_for_tracefork)
8180 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8181 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8182 where the argument is 0.
8184 2013-01-25 Yao Qi <yao@codesourcery.com>
8186 * event-loop.c: Include "queue.h".
8187 (gdb_event_p): New typedef.
8188 (struct gdb_event) <next_event>: Remove.
8189 (event_queue): Change to QUEUE(gdb_event_p).
8190 (async_queue_event): Remove.
8191 (gdb_event_xfree): New.
8192 (initialize_event_loop): New.
8193 (process_event): Use API from QUEUE.
8194 (wait_for_event): Likewise.
8195 * server.c (main): Call initialize_event_loop.
8196 * server.h (initialize_event_loop): Declare.
8198 2013-01-18 Yao Qi <yao@codesourcery.com>
8200 * ax.h (struct eval_agent_expr_context): New.
8201 (gdb_eval_agent_expr): Update declaration.
8202 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8203 TFRAME. Add new argument CTX.
8204 * server.h (struct eval_agent_expr_context): Declare.
8205 (agent_mem_read, agent_tsv_read): Update declaration.
8206 (agent_mem_read_string): Likewise.
8207 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8208 (add_traceframe_block): Add new argument TPOINT.
8209 Increase TPOINT->traceframe_usage.
8210 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8211 eval_tracepoint_agent_expr.
8212 (condition_true_at_tracepoint): Likewise.
8213 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8214 (agent_mem_read_string, agent_tsv_read): Likewise.
8216 2013-01-16 Yao Qi <yao@codesourcery.com>
8218 * linux-low.c (linux_resume_one_lwp): Don't check
8219 'lwp->bp_reinsert != 0'.
8221 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8222 Pedro Alves <palves@redhat.com>
8224 * lynx-low.c (ptrace_request_to_str): Define a temporary
8225 macro and use it to simplify this function's implementation.
8227 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8229 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8232 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8234 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8236 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8238 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8240 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8242 * lynx-low.c (lynx_resume): Use the resume_info parameter
8243 to determine the ptid for the lynx_ptrace call, unless
8244 it is equal to minus_one_ptid, in which case we use the
8245 ptid of the current_inferior.
8246 (lynx_wait_1): After having received a thread create/exit
8247 event, resume the inferior's execution using the signaling
8248 thread's ptid, rather than the old ptid.
8250 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8252 * lynx-low.c (lynx_resume): Delete variable ret.
8254 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8256 * gdbreplay.c (gdbreplay_version): Update copyright year.
8257 * server.c (gdbserver_version): Likewise.
8259 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8261 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8264 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8266 * lynx-low.c (ptrace_request_to_str): Add handling for
8269 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8271 * lynx-low.c (lynx_attach): Delete variable new_process.
8273 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8275 * lynx-low.c (lynx_create_inferior): Delete variable
8278 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8280 * lynx-low.c (ptrace_request_to_str): Do not handle
8281 PTRACE_GETTHREADLIST if this macro does not exist.
8283 2012-12-15 Yao Qi <yao@codesourcery.com>
8285 * Makefile.in (OBS): Add notif.o.
8286 * notif.c, notif.h: New.
8287 * server.c: Include "notif.h".
8288 (struct vstop_notif) <next>: Remove.
8290 (queue_stop_reply): Update.
8291 (push_event, send_next_stop_reply): Remove.
8292 (discard_queued_stop_replies): Update.
8293 (notif_stop): New variable.
8294 (handle_v_stopped): Remove.
8295 (handle_v_requests): Don't call handle_v_stopped. Call
8296 handle_ack_notif instead.
8297 (queue_stop_reply_callback): Call notif_event_enque instead
8298 of queue_stop_reply.
8299 (handle_status): Don't call send_next_stop_reply, call
8300 notif_write_event instead.
8301 (kill_inferior_callback): Likewise.
8302 (detach_or_kill_inferior_callback): Likewise.
8303 (main): Call initialize_notif.
8304 (process_serial_event): Call QUEUE_is_empty.
8305 (handle_target_event): Call notif_push instead of push event.
8306 * server.h (push_event): Remove declaration.
8308 2012-12-10 Tom Tromey <tromey@redhat.com>
8310 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8311 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8314 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8315 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8316 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8317 (amd64-linux-ipa.o, ax.o): Rewrite.
8318 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8319 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8320 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8321 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8322 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8323 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8324 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8325 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8326 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8327 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8328 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8329 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8330 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8331 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8332 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8333 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8334 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8335 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8336 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8337 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8338 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8339 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8340 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8341 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8342 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8343 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8344 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8345 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8346 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8347 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8348 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8349 (reg-tilegx.o): Remove.
8350 (all_object_files): New macro.
8351 Include .deps files.
8352 * aclocal.m4, configure: Rebuild.
8353 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8354 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8355 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8357 2012-12-05 Tom Tromey <tromey@redhat.com>
8360 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8362 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8364 * configure.ac: Check for linux/perf_event.h.
8365 * config.in: Regenerated.
8366 * configure: Regenerated.
8368 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8370 * hostio.c (handle_readlink): Decrease buffer size
8371 parameter passed to readlink by one byte.
8373 2012-11-26 Yao Qi <yao@codesourcery.com>
8375 * configure.ac (build_warnings): Append '-Wempty-body'.
8376 * configure: Regenerated.
8377 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8380 2012-11-15 Pierre Muller <muller@sourceware.org>
8382 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8383 * config.in: Regenerate.
8384 * configure: Regenerate.
8385 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8386 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8387 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8388 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8390 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8391 instead of <sys/wait.h> header.
8392 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8394 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8396 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8397 (various make rules): Remove -DGDBSERVER
8399 2012-11-09 Yao Qi <yao@codesourcery.com>
8401 * spu-low.c (current_ptid): Move it to ..
8402 * gdbthread.h: ... here. New.
8403 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8404 * server.c (myresume, process_serial_event): Likewise.
8405 * thread-db.c (thread_db_find_new_threads): Likewise.
8406 * tracepoint.c (run_inferior_command): Likewise.
8408 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8410 * server.c (handle_search_memory_1): Include access length in
8413 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8415 * linux-crisv32-low.c: Fix compile errors.
8417 2012-09-04 Yao Qi <yao@codesourcery.com>
8419 * tracepoint.c (cmd_qtsv): Adjust debug message.
8420 Don't check CUR_TPOINT.
8422 2012-08-28 Yao Qi <yao@codesourcery.com>
8424 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8425 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8426 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8427 Remove declarations of xmalloc, xreallloc, xstrdup and
8429 * Makefile.in (libiberty_h): New.
8430 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8431 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8433 2012-08-23 Yao Qi <yao@codesourcery.com>
8435 * server.h: Remove declaration of 'xsnprintf'.
8437 2012-08-22 Keith Seitz <keiths@redhat.com>
8439 * server.h: Include build-gnulib-gbserver/config.h.
8440 * gdbreplay.c: Likewise.
8442 2012-08-08 Doug Evans <dje@google.com>
8444 * Makefile.in (SFILES): Add gdb_vecs.c.
8445 (OBS): Add gdb_vecs.o.
8446 (gdb_vecs_h, host_defs_h): New variables.
8447 (thread-db.o): Add $(gdb_vecs_h) dependency.
8448 (gdb_vecs.o): New rule.
8449 * thread-db.c: #include "gdb_vecs.h".
8450 (thread_db_load_search): Use a vector to iterate over path elements.
8451 Handle text appearing after "$pdir".
8453 * configure.ac: Add check for strstr.
8454 * config.in: Regenerate.
8455 * configure: Regenerate.
8457 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8459 * hostio.c (handle_pread): If pread fails, fall back to attempting
8461 (handle_pwrite): Likewise for pwrite.
8463 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8465 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8466 between unsupported TYPE and unimplementable ADDR/LEN combination.
8467 (arm_insert_point): Act on new return value.
8469 2012-07-31 Pedro Alves <palves@redhat.com>
8471 * server.c (process_point_options): Only skip tokens if we find
8472 one that is unrecognized. Don't treat 'X' specially while
8473 skipping unrecognized tokens.
8475 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8477 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8478 to 4-byte-align HW breakpoint addresses for Thumb.
8480 2012-07-27 Yao Qi <yao@codesourcery.com>
8484 * server.h: Declare gdb_agent_about_to_close.
8485 * target.c (kill_inferior): Include "agent.h".
8486 New. Send command 'kill'.
8487 * target.h (kill_inferior): Removed macro.
8488 * tracepoint.c (gdb_agent_about_to_close): New.
8489 (gdb_agent_helper_thread): Handle command 'close'.
8490 Wait endlessly until the inferior stops.
8491 Install gdb_agent_remove_socket to atexit hook.
8492 (agent_socket_name): New static variable.
8493 (gdb_agent_socket_init): Replace local variable 'name' with
8494 'agent_socket_name'.
8495 (gdb_agent_remove_socket): New.
8497 2012-07-27 Yao Qi <yao@codesourcery.com>
8499 * server.c (process_point_options): Stop at 'X' when parsing.
8501 2012-07-19 Michael Eager <eager@eagercon.com>
8503 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8505 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8506 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8507 hardware breakpoint.
8509 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8511 * gdbserver/linux-low.c (initialize_low): Call
8512 linux_ptrace_init_warnings.
8514 2012-07-02 Doug Evans <dje@google.com>
8516 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8519 2012-07-02 Stan Shebs <stan@codesourcery.com>
8521 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8522 (ax.o): Add it to build rule.
8524 (OBS): Add format.o.
8525 (IPA_OBS): Add format.o.
8526 * server.c (handle_query): Claim support for breakpoint commands.
8527 (process_point_options): Add command case.
8528 (process_serial_event): Leave running if there are printfs in
8530 * mem-break.h (any_persistent_commands): Declare.
8531 (add_breakpoint_commands): Declare.
8532 (gdb_no_commands_at_breakpoint): Declare.
8533 (run_breakpoint_commands): Declare.
8534 * mem-break.c (struct point_command_list): New struct.
8535 (struct breakpoint): New field command_list.
8536 (any_persistent_commands): New function.
8537 (add_commands_to_breakpoint): New function.
8538 (add_breakpoint_commands): New function.
8539 (gdb_no_commands_at_breakpoint): New function.
8540 (run_breakpoint_commands): New function.
8541 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8543 * ax.c: Include format.h.
8544 (ax_printf): New function.
8545 (gdb_eval_agent_expr): Add printf opcode.
8547 2012-06-13 Yao Qi <yao@codesourcery.com>
8549 * server.c (start_inferior): Remove duplicated writes to fields
8550 'last_resume_kind' and 'last_status' of 'current_inferior'.
8552 2012-06-12 Yao Qi <yao@codesourcery.com>
8553 Pedro Alves <palves@redhat.com>
8555 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8557 * server.c (handle_v_cont): Extend comment.
8559 2012-06-11 Yao Qi <yao@codesourcery.com>
8561 * linux-low.c (linux_attach): Add 'static'.
8563 2012-06-06 Yao Qi <yao@codesourcery.com>
8565 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8567 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8569 Fix gcc -flto compilation warning.
8570 * server.c (main): Make variable multi_mode and attach volatile.
8572 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8574 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8575 if the platform doesn't know about it.
8577 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8579 * Makefile.in (SFILES): Add linux-tile-low.c.
8580 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8581 * configure.srv: Handle tilegx-*-linux*.
8582 * linux-tile-low.c: New file.
8584 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8586 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8588 2012-05-24 Pedro Alves <palves@redhat.com>
8592 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8594 2012-05-24 Pedro Alves <palves@redhat.com>
8598 Replace target_signal with gdb_signal throughout.
8600 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8602 * linux-low.c (linux_store_registers): Avoid the copying sequence
8603 when no data has been retrieved by ptrace.
8605 2012-05-22 Will Deacon <will.deacon@arm.com>
8607 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8608 Include asm/ptrace.h.
8609 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8612 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8614 * linux-low.c (linux_store_registers): Don't re-retrieve data
8615 with ptrace that has already been obtained from /proc. Always
8616 copy any data retrieved with ptrace to the buffer supplied.
8618 2012-05-11 Yao Qi <yao@codesourcery.com>
8619 Pedro Alves <palves@redhat.com>
8621 * linux-low.c (enum stopping_threads_kind): New.
8622 (stopping_threads): Change type to `enum stopping_threads_kind'.
8623 (handle_extended_wait): If stopping and suspending threads, leave
8624 the new_lwp suspended too.
8625 (linux_wait_for_event): Adjust.
8626 (stop_all_lwps): Set `stopping_threads' to
8627 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8628 whether we're suspending threads or just stopping them. Assert no
8631 2012-04-29 Yao Qi <yao@codesourcery.com>
8633 * server.h: Move some code to ...
8634 * gdbthread.h: ... here. New.
8635 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8636 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8637 (nto-low.o, win32-low.o): Likewise.
8638 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8639 * regcache.c, remote-utils.c, server.c: Likewise.
8640 * target.c, tracepoint.c, win32-low.c: Likewise.
8642 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8644 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8645 (PTRACE_ARG4_TYPE): Likewise.
8646 (PTRACE_XFER_TYPE): Likewise.
8647 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8648 ptrace to PTRACE_ARG3_TYPE.
8649 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8650 (PTRACE_ARG4_TYPE): Likewise.
8651 (PTRACE_XFER_TYPE): Likewise.
8652 (linux_detach_one_lwp): Cast fourth argument of
8653 ptrace to long then PTRACE_ARG4_TYPE.
8654 (regsets_fetch_inferior_registers): Cast third argument of
8655 ptrace to long then PTRACE_ARG3_TYPE.
8656 (regsets_store_inferior_registers): Likewise.
8658 2012-04-20 Pedro Alves <palves@redhat.com>
8660 * configure: Regenerate.
8662 2012-04-19 Pedro Alves <palves@redhat.com>
8664 * Makefile.in (GNULIB_BUILDDIR): New.
8665 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8666 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8667 (all, install-only, uninstall, clean-info, all-lib, clean): No
8668 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8669 (maintainer-clean realclean distclean): Use subdir_do.
8671 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8672 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8673 * acinclude.m4: Include acx_configure_dir.m4.
8674 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8675 calls. Call AC_PROG_RANLIB. Configure gnulib using
8678 (GNULIB_STDINT_H): Adjust.
8679 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8680 * gdbreplay.c: Include build-gnulib/config.h.
8681 * server.h: Likewise.
8682 * aclocal.m4: Regenerate.
8683 * config.in: Regenerate.
8684 * configure: Regenerate.
8686 2012-04-19 Pedro Alves <palves@redhat.com>
8688 * Makefile.in (LIBGNU, INCGNU): Adjust.
8689 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8690 (all, install-only, uninstall, clean-info, all-lib, clean)
8691 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8692 * configure.ac: Adjust AC_OUTPUT output.
8693 * aclocal.m4: Regenerate.
8694 * configure: Regenerate.
8696 2012-04-19 Pedro Alves <palves@redhat.com>
8698 * Makefile.in (generated_files): New.
8699 (server_h): Remove the explicit dependency on config.h, and depend
8700 on $generated_files.
8702 2012-04-19 Pedro Alves <palves@redhat.com>
8704 * Makefile.in (INCGNU): Add -Ignulib.
8706 2012-04-19 Pedro Alves <palves@redhat.com>
8708 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8709 (INCGNU): ... this, and spell out -I here.
8710 (GNULIB_LIB): Rename to ...
8712 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8714 2012-04-19 Pedro Alves <palves@redhat.com>
8716 * config.in: Regenerate.
8718 2012-04-19 Pedro Alves <palves@redhat.com>
8720 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8721 * server.h (memmem): Remove declaration.
8722 * config.in: Regenerate.
8723 * configure: Regenerate.
8725 2012-04-19 Yao Qi <yao@codesourcery.com>
8727 * Makefile.in (SFILES): Add common/vec.c.
8731 2012-04-19 Yao Qi <yao@codesourcery.com>
8733 * remote-utils.c (prepare_resume_reply): Replace with macro
8734 target_core_of_thread.
8735 * server.c (handle_qxfer_threads_proper): Likewise.
8736 * target.h (traget_core_of_thread): New macro.
8738 2012-04-18 Pedro Alves <palves@redhat.com>
8740 * aclocal.m4: Regenerate.
8741 * configure: Regenerate.
8743 2012-04-16 Yao Qi <yao@codesourcery.com>
8745 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8746 duplicated on address.
8748 2012-04-16 Yao Qi <yao@codesourcery.com>
8750 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8751 (struct tracepoint_action_ops) <send>: New field.
8752 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8753 (agent_expr_send, x_tracepoint_action_send): New.
8754 (l_tracepoint_action_send): New.
8755 (cmd_qtdp): Download and install tracepoint
8756 according to `use_agent'.
8757 (run_inferior_command): Add one more parameter `len'.
8759 (tracepoint_send_agent): New.
8760 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8762 2012-04-16 Yao Qi <yao@codesourcery.com>
8764 * tracepoint.c (download_tracepoints): Moved to ...
8765 (cmd_qtstart): ... here.
8767 2012-04-14 Yao Qi <yao@codesourcery.com>
8769 * tracepoint.c: Include inttypes.h.
8770 (struct collect_memory_action): Use sized types.
8771 (struct tracepoint): Likewise.
8772 (cmd_qtdp, stop_tracing): Update print specifiers.
8773 (cmd_qtp, response_tracepoint): Likewise.
8774 (collect_data_at_tracepoint): Likewise.
8775 (collect_data_at_step): Likewise.
8777 2012-04-14 Yao Qi <yao@codesourcery.com>
8779 Import gnulib module inttypes.
8780 * aclocal.m4, config.in, configure: Regenerated.
8782 2012-04-14 Yao Qi <yao@codesourcery.com>
8784 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8785 Makefile and config.status at last.
8787 2012-04-13 Yao Qi <yao@codesourcery.com>
8789 * tracepoint.c: Include stdint.h unconditionally.
8791 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8793 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8794 on BFD_HAVE_SYS_PROCFS_TYPE.
8795 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8796 * configure: Regenerate.
8797 * config.in: Likewise.
8799 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8801 * Makefile.in (clean): Also remove x32.c x32-linux.c
8802 x32-avx.c x32-avx-linux.c.
8803 (x32.o): New target.
8805 (x32-linux.o): Likewise.
8806 (x32-linux.c): Likewise.
8807 (x32-avx.o): Likewise.
8808 (x32-avx.c): Likewise.
8809 (x32-avx-linux.o): Likewise.
8810 (x32-avx-linux.c): Likewise.
8812 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8813 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8814 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8815 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8816 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8817 i386/x32-avx-linux.xml.
8819 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8820 (init_registers_x32_avx_linux): Likwise.
8821 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8822 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8824 2012-04-13 Pedro Alves <palves@redhat.com>
8826 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8827 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8828 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8829 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8832 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8834 * linux-x86-low.c (compat_x32_clock_t): New.
8835 (compat_x32_siginfo_t): Likewise.
8836 (compat_x32_siginfo_from_siginfo): Likewise.
8837 (siginfo_from_compat_x32_siginfo): Likewise.
8838 (linux_is_elf64): Likewise.
8839 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8840 and siginfo_from_compat_x32_siginfo for x32.
8841 (x86_arch_setup): Set linux_is_elf64.
8843 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8846 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8848 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8849 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8850 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8851 compatible with process.
8853 2012-04-12 Yao Qi <yao@codesourcery.com>
8855 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8856 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8857 (install-only, install-info, clean): Handle sub dir gnulib.
8858 (all-lib, am--refresh): New targets.
8859 (memmem.o): Remove target.
8860 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8861 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8862 (AC_REPLACE_FUNCS): Remove memmem.
8863 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8864 (AC_OUTPUT): Generate Makefile in gnulib/.
8865 * aclocal.m4, config.in, configure: Regenerated.
8867 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8869 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8871 2012-04-05 Pedro Alves <palves@redhat.com>
8873 -Werror=strict-aliasing
8875 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8878 2012-04-04 Pedro Alves <palves@redhat.com>
8880 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8881 (sparc_store_gregset_from_stack, sparc_store_gregset)
8882 (sparc_breakpoint_at): Fix formatting.
8884 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8886 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8888 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8889 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8890 * config.in: Regenerate.
8891 * configure: Likewise.
8893 2012-03-29 Pedro Alves <palves@redhat.com>
8895 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8896 Correct ptrace arguments.
8898 2012-03-28 Pedro Alves <palves@redhat.com>
8900 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8901 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8902 (IA64_FR1_REGNUM): New defines.
8903 (ia64_fetch_register): New.
8904 (the_low_target): Install it.
8905 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8907 * linux-low.c (linux_fetch_registers): Try the
8908 the_low_target.fetch_register hook first.
8910 * linux-arm-low.c (the_low_target): Adjust.
8911 * linux-bfin-low.c (the_low_target): Adjust.
8912 * linux-cris-low.c (the_low_target): Adjust.
8913 * linux-crisv32-low.c (the_low_target): Adjust.
8914 * linux-m32r-low.c (the_low_target): Adjust.
8915 * linux-m68k-low.c (the_low_target): Adjust.
8916 * linux-mips-low.c (the_low_target): Adjust.
8917 * linux-ppc-low.c (the_low_target): Adjust.
8918 * linux-s390-low.c (the_low_target): Adjust.
8919 * linux-sh-low.c (the_low_target): Adjust.
8920 * linux-sparc-low.c (the_low_target): Adjust.
8921 * linux-tic6x-low.c (the_low_target): Adjust.
8922 * linux-x86-low.c (the_low_target): Adjust.
8923 * linux-xtensa-low.c (the_low_target): Adjust.
8925 2012-03-26 Pedro Alves <palves@redhat.com>
8927 * server.c (handle_qxfer_libraries): Don't bail early if
8928 the_target->qxfer_libraries_svr4 is not NULL.
8930 2012-03-26 Pedro Alves <palves@redhat.com>
8932 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8934 2012-03-23 Pedro Alves <palves@redhat.com>
8936 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8937 "library-list-svr4" element's start tag when the the DSO list is
8940 2012-03-23 Pedro Alves <palves@redhat.com>
8942 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8943 a variable whose type size is the same as the inferior's pointer
8946 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8948 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8950 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8951 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8952 * linux-low.h: Include <signal.h>.
8953 (struct siginfo): Remove forward declaration.
8954 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8957 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8959 * .gitignore: Ignore more files.
8961 2012-03-19 Pedro Alves <palves@redhat.com>
8962 Jan Kratochvil <jan.kratochvil@redhat.com>
8964 * server.c (cont_thread, general_thread): Add describing comments.
8965 (start_inferior): Clear `cont_thread'.
8966 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8969 2012-03-15 Yao Qi <yao@codesourcery.com>
8971 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8973 (cmd_qtdp): ... here.
8975 2012-03-15 Yao Qi <yao@codesourcery.com>
8977 * tracepoint.c (struct tracepoint_action_ops): New.
8978 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8979 (m_tracepoint_action_download): New.
8980 (r_tracepoint_action_download): New.
8981 (x_tracepoint_action_download): New.
8982 (l_tracepoint_action_download): New.
8983 (add_tracepoint_action): Install `action->ops' according type.
8984 (download_tracepoint_1): Move code `download' function pointer
8985 of various tracepoint_action_ops.
8987 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8989 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8990 linux_ptrace_attach_warnings.
8992 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8994 * Makefile.in (linux-ptrace.o): New.
8995 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8996 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8997 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8998 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8999 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9001 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9003 2012-03-08 Yao Qi <yao@codesourcery.com>
9004 Pedro Alves <palves@redhat.com>
9006 Fix PR server/13392.
9007 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9009 * tracepoint.c (remove_tracepoint): New.
9010 (cmd_qtdp): Call remove_tracepoint when failed to install.
9012 2012-03-07 Pedro Alves <palves@redhat.com>
9014 * linux-low.c (get_detach_signal): New.
9015 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9016 Pass on pending signals to PTRACE_DETACH. Check the result of the
9018 * server.c (program_signals, program_signals_p): New.
9019 (handle_general_set): Handle QProgramSignals.
9020 * server.h (program_signals, program_signals_p): Declare.
9022 2012-03-05 Pedro Alves <palves@redhat.com>
9023 Jan Kratochvil <jan.kratochvil@redhat.com>
9025 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9028 2012-03-03 Yao Qi <yao@codesourcery.com>
9030 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9031 agent_look_up_symbols.
9033 2012-03-03 Yao Qi <yao@codesourcery.com>
9035 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9036 (linux-x86-low.o): Likewise.
9037 * server.h: Remove in_process_agent_loaded.
9038 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9042 2012-03-03 Yao Qi <yao@codesourcery.com>
9044 * tracepoint.c (gdb_agent_capability): New global.
9045 (in_process_agent_loaded_ust): Renamed to
9046 `in_process_agent_supports_ust'.
9048 (in_process_agent_supports_ust): Call agent_capability_check.
9049 (clear_installed_tracepoints): Assert that agent supports
9052 2012-03-03 Yao Qi <yao@codesourcery.com>
9054 * linux-low.c (linux_supports_agent): New.
9055 (linux_target_ops): Initialize field `supports_agent' with
9056 linux_supports_agent.
9057 * target.h (struct target_ops) <supports_agent>: New.
9058 (target_supports_agent): New macro.
9059 * server.c (handle_general_set): Handle packet 'QAgent'.
9060 (handle_query): Send `QAgent+'.
9061 * Makefile.in (server.o): Depends on agent.h.
9063 2012-03-03 Yao Qi <yao@codesourcery.com>
9065 * Makefile.in (OBS): Add agent.o.
9066 Add new rule for agent.o.
9067 Track dependence of tracepoint.c on agent.h.
9068 * tracepoint.c (run_inferior_command_1):
9069 (run_inferior_command): Call agent_run_command.
9070 (gdb_ust_connect_sync_socket): Deleted. Move it to
9072 (resume_thread, stop_thread): Likewise.
9073 (gdb_ust_socket_init): Renamed to ...
9074 (gdb_agent_socket_init): ... New.
9075 (gdb_ust_thread): Renamed to ...
9076 (gdb_agent_helper_thread): ... New.
9077 (gdb_ust_init): Move some code to ...
9078 (gdb_agent_init): ... here. New.
9079 [HAVE_UST]: Call gdb_ust_init.
9080 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9081 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9082 * config.in, configure: Regenerated.
9084 2012-03-02 Pedro Alves <palves@redhat.com>
9086 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9087 * linux-low.c (struct simple_pid_list): New.
9088 (stopped_pids): New a struct simple_pid_list pointer.
9089 (add_to_pid_list, pull_pid_from_list): New.
9090 (handle_extended_wait): Don't assume the first signal new children
9091 report is SIGSTOP. Adjust call to pull_pid_from_list.
9092 (linux_wait_for_lwp): Adjust.
9094 2012-03-02 Yao Qi <yao@codesourcery.com>
9096 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9099 2012-03-02 Yao Qi <yao@codesourcery.com>
9101 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9102 `stop_pc' and `tpoint'. Update caller.
9104 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9106 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9107 * linux-low.c (use_linux_regsets): New macro.
9108 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9109 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9110 (linux_register_in_regsets): New function.
9111 (usr_fetch_inferior_registers): Skip registers covered by
9113 (usr_store_inferior_registers): Likewise.
9114 (usr_fetch_inferior_registers): New macro.
9115 (usr_store_inferior_registers): Likewise.
9116 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9117 (linux_store_registers): Likewise.
9118 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9120 (init_registers_mips64_dsp_linux): Likewise.
9121 (init_registers_mips_linux): New macro.
9122 (init_registers_mips_dsp_linux): Likewise.
9123 (mips_dsp_num_regs): Likewise.
9124 (DSP_BASE, DSP_CONTROL): New fallback macros.
9125 (mips_base_regs): New macro.
9126 (mips_regmap): Use it. Fix the size.
9127 (mips_dsp_regmap): New variable.
9128 (mips_dsp_regset_bitmap): Likewise.
9129 (mips_arch_setup): New function.
9130 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9132 (mips_cannot_store_register): Likewise.
9133 (the_low_target): Update .arch_setup, .num_regs and .regmap
9134 initializers. Add .regset_bitmap initializer.
9135 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9137 * linux-bfin-low.c (the_low_target): Likewise.
9138 * linux-cris-low.c (the_low_target): Likewise.
9139 * linux-crisv32-low.c (the_low_target): Likewise.
9140 * linux-ia64-low.c (the_low_target): Likewise.
9141 * linux-m32r-low.c (the_low_target): Likewise.
9142 * linux-m68k-low.c (the_low_target): Likewise.
9143 * linux-ppc-low.c (the_low_target): Likewise.
9144 * linux-s390-low.c (the_low_target): Likewise.
9145 * linux-sh-low.c (the_low_target): Likewise.
9146 * linux-sparc-low.c (the_low_target): Likewise.
9147 * linux-tic6x-low.c (the_low_target): Likewise.
9148 * linux-x86-low.c (the_low_target): Likewise.
9149 * linux-xtensa-low.c (the_low_target): Likewise.
9150 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9151 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9152 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9154 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9155 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9157 2012-02-29 Yao Qi <yao@codesourcery.com>
9158 Pedro Alves <palves@redhat.com>
9160 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9161 `step_over_finished' is true.
9163 2012-02-27 Pedro Alves <palves@redhat.com>
9165 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9166 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9168 2012-02-27 Pedro Alves <palves@redhat.com>
9171 * linux-low.c (pid_is_stopped): New.
9172 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9174 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9176 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9179 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9181 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9183 2012-02-24 Luis Machado <lgustavo@codesourcery>
9185 * server.c (handle_query): Advertise support for target-side
9186 breakpoint condition evaluation.
9187 (process_point_options): New function.
9188 (process_serial_event): When inserting a breakpoint, check for
9189 a target-side condition that should be evaluated.
9191 * mem-break.c: Include regcache.h and ax.h.
9192 (point_cond_list_t): New data structure.
9193 (breakpoint) <cond_list>: New field.
9194 (find_gdb_breakpoint_at): Make non-static.
9195 (delete_gdb_breakpoint_at): Clear any target-side
9197 (clear_gdb_breakpoint_conditions): New function.
9198 (add_condition_to_breakpoint): Likewise.
9199 (add_breakpoint_condition): Likewise.
9200 (gdb_condition_true_at_breakpoint): Likewise.
9201 (gdb_breakpoint_here): Return result directly instead
9202 of going through a local variable.
9204 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9205 (clear_gdb_breakpoint_conditions): Likewise.
9206 (add_breakpoint_condition): Likewise.
9207 (gdb_condition_true_at_breakpoint): Likewise.
9209 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9210 (need_step_over_p): Take target-side breakpoint condition into
9213 2012-02-24 Luis Machado <lgustavo@codesourcery>
9215 * server.h: Include tracepoint.h.
9216 (agent_mem_read, agent_get_trace_state_variable_value,
9217 agent_set_trace_state_variable_value,
9218 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9219 get_set_tsv_func_addr): New prototypes.
9221 * ax.h: New include file.
9222 * ax.c: New source file.
9224 * tracepoint.c: Include ax.h.
9225 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9226 agent_expr, eval_result_type): Move to ax.h.
9227 (parse_agent_expr): Rename to ...
9228 (gdb_parse_agent_expr): ... this, make it non-static and move
9230 (unparse_agent_expr) Rename to ...
9231 (gdb_unparse_agent_expr): ... this, make it non-static and move
9233 (eval_agent_expr): Rename to ...
9234 (eval_tracepoint_agent_expr): ... this.
9235 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9236 forward declarations.
9237 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9238 (agent_get_trace_state_variable_value): New function.
9239 (agent_set_trace_state_variable_value): New function.
9240 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9241 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9242 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9243 (condition_true_at_tracepoint): Likewise.
9244 (parse_agent_expr): Rename to ...
9245 (gdb_parse_agent_expr): ... this and move to ax.c.
9246 (unparse_agent_expr): Rename to ...
9247 (gdb_unparse_agent_expr): ... this and move to ax.c.
9248 (gdb_agent_op_name): Move to ax.c.
9249 (eval_agent_expr): Rename to ...
9250 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9252 (eval_tracepoint_agent_expr): New function.
9253 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9255 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9257 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9258 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9259 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9260 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9261 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9262 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9263 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9264 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9265 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9266 (compile_bytecodes): Remove forward declaration.
9267 (is_goto_target): Move to ax.c.
9268 (compile_bytecodes): Move to ax.c and call
9269 agent_get_trace_state_variable_value (...) and
9270 agent_set_trace_state_variable_value (...).
9272 * Makefile.in: Update ax.c and IPA dependencies.
9274 2012-02-24 Pedro Alves <palves@redhat.com>
9276 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9277 (cmd_bigqtbuffer_circular): ... this. Only handle
9278 'QTBuffer:circular:'.
9279 (handle_tracepoint_general_set): Adjust.
9281 2012-02-16 Yao Qi <yao@codesourcery.com>
9283 * inferiors.c: Move code to ...
9284 * dll.c: .... here. New.
9285 * server.h: Declare clear_dlls.
9286 * Makefile.in (SFILES): Add dll.c.
9290 2012-02-11 Yao Qi <yao@codesourcery.com>
9292 * server.c: (handle_monitor_command): Add a new parameter
9294 (handle_query): Update caller.
9296 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9298 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9299 * configure, config.in: Regenerate.
9300 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9303 2012-02-02 Pedro Alves <palves@redhat.com>
9305 Try SIGKILL first, then PTRACE_KILL.
9306 * linux-low.c (linux_kill_one_lwp): New.
9307 (linux_kill_one_lwp): Rename to ...
9308 (kill_one_lwp_callback): ... this. Use the new
9311 2012-02-02 Pedro Alves <palves@redhat.com>
9313 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9316 2012-01-27 Pedro Alves <palves@redhat.com>
9318 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9319 (elf_64_file_p): Make static.
9320 (linux_pid_exe_is_elf_64_file): New.
9321 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9322 Delete declarations.
9323 (linux_pid_exe_is_elf_64_file): Declare.
9324 * linux-x86-low.c (x86_arch_setup): Use
9325 linux_pid_exe_is_elf_64_file.
9327 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9329 * linux-low.c (linux_wait_for_event_1): Rename to ...
9330 (linux_wait_for_event): ... here and merge it with former
9331 linux_wait_for_event - new variable wait_ptid, use it.
9332 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9334 2012-01-23 Pedro Alves <palves@redhat.com>
9336 * server.c (main): Avoid yet another case of infinite loop while
9337 detaching/killing after a longjmp.
9339 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9342 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9344 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9346 * hostio.c (handle_readlink): New function.
9347 (handle_vFile): Call it to handle "vFile:readlink" packets.
9349 2012-01-20 Pedro Alves <palves@redhat.com>
9350 Ulrich Weigand <ulrich.weigand@linaro.org>
9352 * server.c (handle_v_requests): Only support vAttach and vRun to
9353 start multiple processes when in extended protocol mode.
9355 2012-01-17 Pedro Alves <palves@redhat.com>
9357 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9358 memalign plus mprotect to allocate the scratch buffer.
9360 2012-01-13 Pedro Alves <palves@redhat.com>
9362 * server.c (attach_inferior): Clear `cont_thread'.
9364 2012-01-13 Pedro Alves <palves@redhat.com>
9366 * server.c (main): Avoid infinite loop while detaching/killing
9369 2012-01-09 Doug Evans <dje@google.com>
9371 * server.c (start_inferior): Set last_ptid in --wrapper case.
9373 2012-01-06 Yao Qi <yao@codesourcery.com>
9375 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9377 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9379 2012-01-04 Yao Qi <yao@codesourcery.com>
9381 * tracepoint.c (cmd_qtdp): Print debug message
9382 for static tracepoint.
9384 2012-01-04 Yao Qi <yao@codesourcery.com>
9386 * tracepoint.c (trace_vdebug): Differentiate debug message
9387 between gdbserver and IPA.
9389 2012-01-03 Yao Qi <yao@codesourcery.com>
9391 * tracepoint.c (tracepoint_was_hit): Don't collect for
9394 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9396 * terminal.h: Reformat copyright header.
9398 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9400 * server.c (gdbserver_version): Update copyright year.
9401 * gdbreplay.c (gdbreplay_version): Likewise.
9403 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9405 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9408 2011-12-18 Hui Zhu <teawater@gmail.com>
9409 * linux-low.c (linux_create_inferior): Save return value to ret.
9411 2011-12-18 Hui Zhu <teawater@gmail.com>
9413 * linux-low.c (linux_create_inferior): Save return value to ret.
9415 2011-12-16 Doug Evans <dje@google.com>
9417 * linux-low.c (linux_create_inferior): If stdio connection,
9418 redirect stdin from /dev/null, stdout to stderr.
9419 * remote-utils.c (remote_is_stdio): New static global.
9420 (remote_connection_is_stdio): New function.
9421 (remote_prepare): Handle stdio connection.
9422 (remote_open): Ditto.
9423 (remote_close): Don't close stdin for stdio connections.
9424 (read_prim,write_prim): New functions. Replace all calls to
9425 read/write to these.
9426 * server.c (main): Watch for "-" argument. Move call to
9427 remote_prepare before start_inferior.
9428 * server.h (STDIO_CONNECTION_NAME): New macro.
9429 (remote_connection_is_stdio): Declare.
9431 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9432 in debugging output.
9434 2011-12-15 Yao Qi <yao@codesourcery.com>
9436 * tracepoint.c: Include sys/syscall.h.
9437 (gdb_ust_thread): Remove preprocessor conditional.
9439 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9441 * linux-low.c (linux_detach_one_lwp): Call
9442 the_low_target.prepare_to_resume before detaching.
9444 2011-12-14 Yao Qi <yao@codesourcery.com>
9446 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9449 2011-12-14 Yao Qi <yao@codesourcery.com>
9451 * i386-low.c (i386_low_stopped_data_address): Initialize local
9454 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9458 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9459 DR_CONTROL unless necessary. Extend comments.
9460 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9461 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9463 2011-12-13 Yao Qi <yao@codesourcery.com>
9465 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9467 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9469 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9471 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9472 Print new debug message for such case.
9474 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9476 Fix overlapping memcpy.
9477 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9478 the read_inferior_memory transfer.
9479 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9480 write_inferior_memory transfer.
9481 (set_fast_tracepoint_jump): New variable buf. Use it for the
9482 read_inferior_memory and write_inferior_memory transfers.
9483 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9484 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9485 Use it for the write_inferior_memory transfer.
9486 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9489 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9491 * linux-low.c (fetch_register, store_register): Make code
9492 consistent, fix formatting.
9494 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9496 * linux-low.c (usr_store_inferior_registers): Factor out code
9497 to handle individual registers into...
9498 (store_register): ... this new function.
9500 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9502 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9503 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9504 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9505 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9506 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9507 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9508 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9509 (srv_xmlfiles): Add new XML files.
9511 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9513 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9514 (init_registers_s390_linux32v1): Add prototype.
9515 (init_registers_s390_linux32v2): Likewise.
9516 (init_registers_s390_linux64v1): Likewise.
9517 (init_registers_s390_linux64v2): Likewise.
9518 (init_registers_s390x_linux64v1): Likewise.
9519 (init_registers_s390x_linux64v2): Likewise.
9520 (s390_num_regs): Increment to 52.
9521 (s390_regmap): Add orig_r2 register.
9522 (s390_num_regs_3264): Increment to 68.
9523 (s390_regmap_3264): Add orig_r2 register.
9524 (s390_collect_ptrace_register): Handle orig_r2 register.
9525 (s390_supply_ptrace_register): Likewise.
9526 (s390_fill_last_break): New function.
9527 (s390_store_last_break): Likewise.
9528 (s390_fill_system_call): New function.
9529 (s390_store_system_call): Likewise.
9530 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9532 (s390_check_regset): New function.
9533 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9534 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9535 Update target_regsets for available register sets.
9537 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9538 Jan Kratochvil <jan.kratochvil@redhat.com>
9540 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9541 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9543 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9544 * linux-low.h (struct process_info_private): New member r_debug.
9545 * server.c (handle_qxfer_libraries): Call
9546 the_target->qxfer_libraries_svr4.
9547 (handle_qxfer_libraries_svr4): New function.
9548 (qxfer_packets): New entry "libraries-svr4".
9549 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9550 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9551 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9552 PACKET_qXfer_libraries_svr4.
9554 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9556 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9557 PSW address/mask between 8-byte and 16-byte formats.
9558 (s390_supply_ptrace_register): Likewise.
9559 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9560 basic addressing mode bit.
9562 2011-11-24 Stan Shebs <stan@codesourcery.com>
9564 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9566 2011-11-17 Stan Shebs <stan@codesourcery.com>
9568 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9569 (tracing_start_time): New global.
9570 (tracing_stop_time): New global.
9571 (tracing_user_name): New global.
9572 (tracing_notes): New global.
9573 (tracing_stop_note): New global.
9574 (cmd_qtstart): Set traceframe_usage, start_time.
9575 (stop_tracing): Set stop_time.
9576 (cmd_qtstatus): Report additional status.
9577 (cmd_qtp): New function.
9578 (handle_tracepoint_query): Call it.
9579 (cmd_qtnotes): New function.
9580 (handle_tracepoint_general_set): Call it.
9581 (get_timestamp): Rename from tsv_get_timestamp.
9583 2011-11-14 Stan Shebs <stan@codesourcery.com>
9584 Kwok Cheung Yeung <kcy@codesourcery.com>
9586 * linux-x86-low.c (small_jump_insn): New.
9587 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9588 trampoline and error message, build a trampoline and issue a small
9589 jump instruction to it.
9590 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9591 trampoline and error message.
9592 (x86_get_min_fast_tracepoint_insn_len): New.
9593 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9594 * linux-low.h (struct linux_target_ops): Add arguments to
9595 install_fast_tracepoint_jump_pad operation, add new operation.
9596 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9598 (linux_get_min_fast_tracepoint_insn_len): New function.
9599 (linux_target_op): Add new operation.
9600 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9601 (gdb_trampoline_buffer_end): Ditto.
9602 (gdb_trampoline_buffer_error): Ditto.
9603 (struct ipa_sym_addresses): Add fields for new IPA variables.
9604 (symbol_list): Add entries for new IPA variables.
9605 (struct tracepoint): Add fields to hold the address range of the
9606 trampoline used by the tracepoint.
9607 (trampoline_buffer_head): New static variable.
9608 (trampoline_buffer_tail): Ditto.
9609 (claim_trampoline_space): New function.
9610 (have_fast_tracepoint_trampoline_buffer): New function.
9611 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9613 (install_fast_tracepoint): Ditto, also add error buffer argument.
9614 (cmd_qtminftpilen): New function.
9615 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9616 (fast_tracepoint_from_trampoline_address): New function.
9617 (fast_tracepoint_collecting): Handle trampoline as part of jump
9619 (set_trampoline_buffer_space): New function.
9620 (initialize_tracepoint): Initialize new IPA variables.
9621 * target.h (struct target_ops): Add arguments to
9622 install_fast_tracepoint_jump_pad operation, add new
9623 get_min_fast_tracepoint_insn_len operation.
9624 (target_get_min_fast_tracepoint_insn_len): New.
9625 (install_fast_tracepoint_jump_pad): Add arguments.
9626 * server.h (IPA_BUFSIZ): Define.
9627 * linux-i386-ipa.c: Include extra header files.
9628 (initialize_fast_tracepoint_trampoline_buffer): New function.
9629 (initialize_low_tracepoint): Call it.
9630 * server.h (set_trampoline_buffer_space): Declare.
9631 (claim_trampoline_space): Ditto.
9632 (have_fast_tracepoint_trampoline_buffer): Ditto.
9634 2011-11-14 Yao Qi <yao@codesourcery.com>
9636 * server.c (handle_query): Handle InstallInTrace for qSupported.
9637 * tracepoint.c (add_tracepoint): Sort list.
9638 (install_tracepoint, download_tracepoint): New.
9639 (cmd_qtdp): Call them to install and download tracepoints.
9640 (sort_tracepoints): Removed.
9641 (cmd_qtstart): Update.
9643 2011-11-14 Yao Qi <yao@codesourcery.com>
9645 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9646 * mem-break.h: Declare.
9647 * tracepoint.c (cmd_qtstart): Move some code to ...
9648 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9650 (download_tracepoints): Move some code to ...
9651 (download_tracepoint_1): ... here. New.
9653 2011-11-08 Yao Qi <yao@codesourcery.com>
9655 * remote-utils.c (relocate_instruction): A comment fix.
9657 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9659 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9660 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9661 dr_status_mirror and dr_control_mirror from debug_reg_state.
9662 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9663 (i386_initial_stuff): Remove use of deleted globals.
9664 (i386_get_thread_context, i386_set_thread_context,
9665 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9666 from debug_reg_state.
9668 2011-11-05 Yao Qi <yao@codesourcery.com>
9670 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9671 address as TPOINT's.
9673 2011-11-02 Stan Shebs <stan@codesourcery.com>
9675 * tracepoint.c (agent_mem_read_string): New function.
9676 (eval_agent_expr): Call it for tracenz.
9677 * server.c (handle_query): Report support for tracenz.
9679 2011-11-02 Yao Qi <yao@codesourcery.com>
9681 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9683 2011-11-02 Yao Qi <yao@codesourcery.com>
9685 * target.h: Fix a typo in comment.
9687 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9689 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9690 clobber the breakpoints' shadows with fast tracepoint jumps.
9691 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9692 * target.c (write_inferior_memory): Also pass MYADDR down to
9695 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9697 * configure.ac: Check support for personality routine.
9698 * configure: Regenerate.
9699 * config.in: Likewise.
9700 * linux-low.c: Include <sys/personality.h>.
9701 Define ADDR_NO_RANDOMIZE if necessary.
9702 (linux_create_inferior): Disable address space randomization when
9703 forking inferior, if requested.
9704 (linux_supports_disable_randomization): New function.
9705 (linux_target_ops): Install it.
9706 * server.h (disable_randomization): Declare.
9707 * server.c (disable_randomization): New global variable.
9708 (handle_general_set): Handle QDisableRandomization.
9709 (handle_query): Likewise for qSupported.
9710 (main): Support --disable-randomization and --no-disable-randomization
9711 command line arguments.
9712 * target.h (struct target_ops): Add supports_disable_randomization.
9713 (target_supports_disable_randomization): New macro.
9715 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9717 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9719 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9720 [!PT_GETDSBT] (target_loadmap): New definition.
9721 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9722 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9723 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9724 and PT_GETDSBT to LINUX_LOADMAP.
9725 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9726 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9728 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9730 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9731 (arm_linux_hwbp_cap): New static variable.
9732 (arm_linux_get_hwbp_cap): Replace by ...
9733 (arm_linux_init_hwbp_cap): ... this new function.
9734 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9735 (arm_linux_get_hw_watchpoint_count): Likewise.
9736 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9737 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9738 (arm_prepare_to_resume): Use perror_with_name instead of error.
9740 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9742 * linux-arm-low.c: Include <signal.h>.
9743 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9744 (struct arm_linux_hwbp_cap): New data type.
9745 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9746 (struct arm_linux_hw_breakpoint): New data type.
9747 (MAX_BPTS, MAX_WPTS): Define.
9748 (struct arch_process_info, struct arch_lwp_info): New data types.
9749 (arm_linux_get_hwbp_cap): New function.
9750 (arm_linux_get_hw_breakpoint_count): Likewise.
9751 (arm_linux_get_hw_watchpoint_count): Likewise.
9752 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9753 (arm_hwbp_control_initialize): Likewise.
9754 (arm_hwbp_control_is_enabled): Likewise.
9755 (arm_hwbp_control_is_initialized): Likewise.
9756 (arm_hwbp_control_disable): Likewise.
9757 (arm_linux_hw_breakpoint_equal): Likewise.
9758 (arm_linux_hw_point_initialize): Likewise.
9759 (struct update_registers_data): New data structure.
9760 (update_registers_callback: New function.
9761 (arm_insert_point): Likewise.
9762 (arm_remove_point): Likewise.
9763 (arm_stopped_by_watchpoint): Likewise.
9764 (arm_stopped_data_address): Likewise.
9765 (arm_new_process): Likewise.
9766 (arm_new_thread): Likewise.
9767 (arm_prepare_to_resume): Likewise.
9768 (the_low_target): Register arm_insert_point, arm_remove_point,
9769 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9770 arm_new_thread, and arm_prepare_to_resume.
9772 2011-09-15 Stan Shebs <stan@codesourcery.com>
9774 * server.h (struct emit_ops): Add compare-goto fields.
9775 * tracepoint.c (gdb_agent_op_sizes): New table.
9776 (emit_eq_goto): New function.
9777 (emit_ne_goto): New function.
9778 (emit_lt_goto): New function.
9779 (emit_le_goto): New function.
9780 (emit_gt_goto): New function.
9781 (emit_ge_goto): New function.
9782 (is_goto_target): New function.
9783 (compile_bytecodes): Recognize special cases of compare-goto
9784 combinations and call specialized emitters for them.
9785 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9786 (amd64_emit_ne_goto): New function.
9787 (amd64_emit_lt_goto): New function.
9788 (amd64_emit_le_goto): New function.
9789 (amd64_emit_gt_goto): New function.
9790 (amd64_emit_ge_goto): New function.
9791 (amd64_emit_ops): Add the new functions.
9792 (i386_emit_eq_goto): New function.
9793 (i386_emit_ne_goto): New function.
9794 (i386_emit_lt_goto): New function.
9795 (i386_emit_le_goto): New function.
9796 (i386_emit_gt_goto): New function.
9797 (i386_emit_ge_goto): New function.
9798 (i386_emit_ops): Add the new functions.
9800 2011-09-08 Stan Shebs <stan@codesourcery.com>
9802 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9803 (i386_emit_epilogue): Restore %ebx.
9805 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9807 * server.c (step_thread): Remove definition.
9808 (process_serial_event): Don't handle Hs.
9809 * server.h (step_thread): Remove declaration.
9810 * target.c (set_desired_inferior): Remove use of step_thread.
9812 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9814 * linux-low.c: Include linux-procfs.h.
9815 (linux_attach_lwp_1): Update comments.
9816 (linux_attach): Scan for existing threads when attaching to a
9817 process that is the tgid.
9818 * Makefile.in: Update dependencies.
9820 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9822 * configure.srv: Add linux-procfs.o dependencies.
9824 2011-08-14 Yao Qi <yao@codesourcery.com>
9826 * target.h (struct target_ops): Fix indent.
9827 * win32-low.c (win32_target_ops): Fix comment.
9829 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9830 Yao Qi <yao@codesourcery.com>
9832 * Makefile.in (clean): Remove tic6x-*.c files.
9833 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9834 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9835 (tic6x-c64xp-linux.c): Likewise.
9836 * configure.srv: Add support for tic6x-*-uclinux.
9837 * linux-tic6x-low.c: New.
9838 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9840 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9841 Yao Qi <yao@codesourcery.com>
9843 * target.h (struct target_ops): Add read_loadmap.
9844 * linux-low.c (struct target_loadseg): New type.
9845 (struct target_loadmap): New type.
9846 (linux_read_loadmap): New function.
9847 (linux_target_ops): Add linux_read_loadmap.
9848 * server.c (handle_query): Support qXfer:fdpic:read packet.
9849 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9852 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9854 * win32-low.c: Include <stdint.h>.
9856 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9858 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9859 to the inferior here.
9860 (i386_remove_aligned_watchpoint): Ditto.
9861 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9862 fit part of the watchpoint in the debug registers.
9863 (i386_update_inferior_debug_regs): New.
9864 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9865 registers, and only update the inferior on success.
9866 (i386_low_remove_watchpoint): Ditto.
9868 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9870 * linux-low.c (compare_ints, unique, list_threads, show_process,
9871 linux_core_of_thread): Delete.
9872 (linux_target_ops): Change linux_core_of_thread to
9873 linux_common_core_of_thread.
9874 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9875 * utils.c (malloc_failure): Change type of argument.
9876 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9877 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9878 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9879 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9880 (IPA_OBJS): Add common-utils-ipa.o.
9881 (ptid_h, linux_osdata_h): New macros.
9882 (server_h): Add common/common-utils.h, common/xml-utils.h,
9883 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9885 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9886 ptid.o, buffer.o): New rules.
9887 (linux-low.o): Add common/linux-osdata.h as a dependency.
9888 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9889 * configure.ac: Add AC_HEADER_DIRENT check.
9890 * config.in: Regenerate.
9891 * configure: Regenerate.
9892 * remote-utils.c (xml_escape_text): Delete.
9893 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9894 buffer_xml_printf): Move to common/buffer.c.
9895 * server.c (main): Remove call to initialize_inferiors.
9896 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9897 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9898 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9899 internal_error, gdb_assert, gdb_assert_fail): Delete.
9900 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9901 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9903 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9904 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9905 initialize_inferiors): Delete.
9907 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9909 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9912 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9914 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9916 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9918 2011-05-26 Yao Qi <yao@codesourcery.com>
9920 * Makefile.in (thread-db.o): Track dependence to
9921 common/gdb_thread_db.h.
9922 * thread-db.c: include gdb_thread_db.h from right place.
9924 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9926 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9927 __FILE__ and __LINE__ to internal_error.
9929 2011-05-13 Doug Evans <dje@google.com>
9931 * thread-db.c (try_thread_db_load_from_sdir): New function.
9932 (try_thread_db_load_from_dir): New function.
9933 (thread_db_load_search): Handle $sdir, ignore $pdir.
9934 Remove trying of system directories if search of
9935 libthread-db-search-path fails, that is now done via $sdir.
9937 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9939 * server.c (handle_query): Add EnableDisableTracepoints to the list
9940 of supported features.
9941 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9943 (cmd_qtenable_disable): New.
9944 (cmd_qtstart): Install tracepoints even if disabled.
9945 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9946 receiving a QTEnable or QTDisable packet.
9947 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9948 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9950 (gdb_probe): Skip data collection if static tracepoint is disabled.
9952 2011-05-10 Doug Evans <dje@google.com>
9954 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9956 2011-05-04 Doug Evans <dje@google.com>
9958 * linux-low.c (linux_join): Skip process lookup.
9959 * spu-low.c (spu_join): Ditto.
9960 * server.c (join_inferiors_callback): Delete.
9961 (process_serial_event): For 'D' packet (detach) call join_inferior
9964 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9966 * README: Don't mention xscale*-*-linux*.
9967 * configure.srv (xscale*-*-linux*): Don't handle target.
9969 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9971 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9973 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9974 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9975 (i386_emit_void_call_2): Likewise.
9977 2011-04-26 Yao Qi <yao@codesourcery.com>
9979 * linux-low.c: Move common macros to linux-ptrace.h.
9980 Include linux-ptrace.h.
9981 * Makefile.in (linux_ptrace_h): New.
9982 (linux-low.o): Depends on linux-ptrace.h.
9984 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9986 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9987 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9988 (remote_prepare): New function with most of the TCP code from ...
9989 (remote_open): ... here. Detect PORT here unconditionally. Move also
9990 setting transport_is_reliable.
9991 * server.c (run_once): New variable.
9992 (gdbserver_usage): Document it.
9993 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9994 the first run if RUN_ONCE.
9995 * server.h (run_once, remote_prepare): New declarations.
9997 2011-04-19 Tom Tromey <tromey@redhat.com>
9999 * win32-low.c (handle_load_dll): Remove duplicate "the".
10001 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10003 Remove support for old Cygwin 1.5 versions.
10004 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10005 function to avoid warning.
10006 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10009 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10011 * gdbserver/server.h (Macro _): Define it if not available.
10013 2011-03-14 Michael Snyder <msnyder@vmware.com>
10015 * hostio.c (handle_close): Remove unnecessary null test.
10017 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10019 * Makefile.in (maintainer-clean realclean distclean): Remove
10020 "make ... subdir_do" command.
10022 2011-03-10 Michael Snyder <msnyder@vmware.com>
10024 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10026 * server.c (handle_v_run): Free alloced buffer on early return.
10028 2011-03-09 Yao Qi <yao@codesourcery.com>
10031 2011-03-04 Yao Qi <yao@codesourcery.com>
10033 * Makefile.in: Remove GNU make feature --directory.
10035 2011-03-05 Yao Qi <yao@codesourcery.com>
10037 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10038 (subdir_do): New make target. Copied from gdb/Makefile.
10039 (maintainer-clean, realclean, distclean, clean): Call corresponding
10040 make targets in common/Makefile.
10042 2011-02-11 Yao Qi <yao@codesourcery.com>
10044 * configure.ac: Call AC_PROG_RANLIB.
10045 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10046 * configure: Regenerate.
10048 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10050 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10052 2011-03-06 Yao Qi <yao@codesourcery.com>
10054 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10056 2011-03-05 Yao Qi <yao@codesourcery.com>
10058 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10059 (subdir_do): New make target. Copied from gdb/Makefile.
10060 (maintainer-clean, realclean, distclean, clean): Call corresponding
10061 make targets in common/Makefile.
10063 2011-03-04 Yao Qi <yao@codesourcery.com>
10065 * Makefile.in: Remove GNU make feature --directory.
10067 2011-03-04 Michael Snyder <msnyder@vmware.com>
10069 * server.c (queue_stop_reply): Call xmalloc not malloc.
10071 2011-03-02 Michael Snyder <msnyder@vmware.com>
10073 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10075 2011-02-28 Michael Snyder <msnyder@vmware.com>
10077 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10078 (cmd_qtframe): Ditto.
10079 (cmd_qtbuffer): Ditto.
10080 (cmd_bigqtbuffer): Ditto.
10082 * utils.c (decimal2str): Initialize 'width' to nine, then
10083 don't mess with it.
10085 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10087 * hostio.c (require_data): Free *data, not data.
10089 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10091 * hostio.c (require_data): Use free, not xfree.
10093 2011-02-27 Michael Snyder <msnyder@vmware.com>
10095 * server.c (handle_query): Discard unused value.
10097 * hostio.c (require_data): Free malloc memory before returning
10100 2011-02-26 Michael Snyder <msnyder@vmware.com>
10102 * linux-low.c (list_threads): Call closedir for dirent.
10104 2011-02-27 Michael Snyder <msnyder@vmware.com>
10106 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10107 a case statement falls through.
10109 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10111 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10114 2011-02-26 Michael Snyder <msnyder@vmware.com>
10116 * utils.c (decimal2str): Eliminate dead code and dead param.
10117 (pulongest): Drop dead param from call to decimal2str.
10120 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10122 Revert the following patch (not approved yet):
10123 2011-02-21 Hui Zhu <teawater@gmail.com>
10124 * tracepoint.c (tp_printf): New function.
10125 (eval_agent_expr): Handle gdb_agent_op_printf.
10127 2011-02-21 Hui Zhu <teawater@gmail.com>
10129 * tracepoint.c (tp_printf): New function.
10130 (eval_agent_expr): Handle gdb_agent_op_printf.
10132 2011-02-18 Tom Tromey <tromey@redhat.com>
10134 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10135 (tracepoint.o): Likewise.
10136 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10137 (gdb_agent_op_names): Likewise.
10139 2011-02-18 Tom Tromey <tromey@redhat.com>
10141 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10142 gdb_agent_op_rot>: New constants.
10143 (gdb_agent_op_names): Add pick and roll.
10144 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10147 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10149 * aclocal.m4: Regenerated with aclocal-1.11.1.
10151 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10153 * server.c (handle_qxfer_traceframe_info): New.
10154 (qxfer_packets): Register "traceframe-info".
10155 (handle_query): Report support for qXfer:traceframe-info:read+.
10156 * tracepoint.c (match_blocktype): New.
10157 (traceframe_find_block_type): Rename to ...
10158 (traceframe_walk_blocks): ... this. Add callback filter argument,
10160 (traceframe_find_block_type): New, reimplemented on top of
10161 traceframe_walk_blocks.
10162 (build_traceframe_info_xml): New.
10163 (traceframe_read_info): New.
10164 * server.h (traceframe_read_info): Declare.
10166 2011-02-11 Yao Qi <yao@codesourcery.com>
10168 * configure.ac: Call AC_PROG_RANLIB.
10169 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10170 * configure: Regenerate.
10172 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10174 * server.c (gdb_read_memory): Change return semantics to allow
10176 (handle_search_memory_1): Adjust.
10177 (process_serial_event) <'m' packet>: Handle partial transfers.
10178 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10180 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10182 * regcache.c (init_register_cache): Initialize
10183 regcache->register_status.
10184 (free_register_cache): Release regcache->register_status.
10185 (regcache_cpy): Copy register_status.
10186 (registers_to_string): Print 'x's for unavailable registers.
10187 (supply_register): Mark the register's status valid or
10188 unavailable, depending on whether a buffer was passed in or not.
10189 (supply_register_zeroed): New.
10190 (supply_regblock): Mark the registers' status valid or
10191 unavailable, depending on whether a buffer was passed in or not.
10192 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10193 (struct regcache): New `register_status' field.
10194 (supply_register_zeroed): Declare.
10195 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10196 supply_register_zeroed, rather than passing a NULL buffer to
10198 * tracepoint.c (fetch_traceframe_registers): Update comment.
10200 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10202 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10205 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10207 * server.h (decode_xfer_write): Change prototype.
10208 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10209 and don't extract the annex here.
10210 * server.c (decode_xfer_read): Remove `annex' parameter,
10211 and don't extract the annex here.
10212 (decode_xfer): New.
10213 (struct qxfer): New.
10214 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10215 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10216 (handle_qxfer_statictrace): New functions, abstracted out from
10217 handle_query, and made to use the struct qxfer interface.
10218 (handle_threads_qxfer_proper): Rename to ...
10219 (handle_qxfer_threads_proper): ... this.
10220 (handle_threads_qxfer): Rename to ...
10221 (handle_qxfer_threads): ... this. Adjust.
10222 (qxfer_packets): New array.
10223 (handle_qxfer): New function.
10224 (handle_query): Use handle_qxfer.
10226 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10228 * gdbreplay.c: Shorten lines of >= 80 columns.
10229 * linux-low.c: Ditto.
10230 * linux-ppc-low.c: Ditto.
10231 * linux-s390-low.c: Ditto.
10232 * linux-sparc-low.c: Ditto.
10233 * linux-x86-low.c: Ditto.
10234 * linux-xtensa-low.c: Ditto.
10235 * mem-break.c: Ditto.
10236 * nto-low.c: Ditto.
10237 * regcache.h: Ditto.
10238 * remote-utils.c: Ditto.
10241 * thread-db.c: Ditto.
10242 * tracepoint.c: Ditto.
10244 * win32-low.h: Ditto.
10246 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10248 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10251 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10253 * server.c (gdbserver_version): Update copyright year in version
10255 * gdbreplay.c (gdbreplay_version): Ditto.
10257 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10259 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10260 * linux-bfin-low.c: New file.
10261 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10262 PT_DATA_ADDR for BFIN targets.
10263 * Makefile.in (SFILES): Add linux-bfin-low.c.
10264 (clean): Remove reg-bfin.c.
10265 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10266 * README: Mention supported Blackfin targets.
10268 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10270 * .gitignore: New file.
10272 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10274 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10276 2010-10-22 Jie Zhang <jie@codesourcery.com>
10278 * Makefile.in: Add FLAGS_TO_PASS variable.
10279 (install): Remove dependency of install-only and recursively
10280 invoke make for install-only.
10282 2010-10-04 Doug Evans <dje@google.com>
10284 * Makefile.in (uninstall): Use $(DESTDIR).
10286 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10290 * linux-x86-low.c (compat_siginfo_from_siginfo)
10291 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10292 si_code is < 0. Check for si_code == SI_TIMER before checking for
10295 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10297 * lynx-i386-low.c: New file.
10298 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10300 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10302 * lynx-low.c (ptrace_request_to_str): Remove handling for
10303 request values that have been removed in LynxOS 5.x.
10305 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10307 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10310 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10312 * configure.ac: Add --enable-inprocess-agent option.
10313 * configure: Rebuilt.
10315 2010-09-06 Yao Qi <yao@codesourcery.com>
10317 * linux-low.c (linux_kill): Remove unused variable.
10318 (linux_stabilize_threads): Likewise.
10319 * server.c (start_inferior): Likewise.
10320 (queue_stop_reply_callback): Likewise.
10321 * tracepoint.c (do_action_at_tracepoint): Likewise.
10323 2010-09-06 Yao Qi <yao@codesourcery.com>
10325 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10328 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10330 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10332 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10334 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10337 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10339 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10340 gdbserver/lynx-ppc-low.c: New files.
10341 * Makefile.in (lynx_low_h): New variable.
10342 (lynx-low.o, lynx-ppc-low.o): New rules.
10343 * configure.ac: On LynxOS, link with -lnetinet.
10344 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10345 * configure: regenerate.
10347 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10349 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10350 * configure.ac: Add check for vasprintf and vsnprintf.
10351 * configure, config.in: Regenerate.
10352 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10354 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10356 * gdbreplay.c: Move include of alloca.h up, next to include of
10358 * server.h: Add include of malloc.h.
10359 * mem-break.c: Remove include of malloc.h.
10360 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10362 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10364 * Makefile.in (memmem.o): Build with -Wno-error.
10366 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10368 * utils.c (xsnprintf): Make non-static.
10369 * server.h: Add xsnprintf declaration.
10370 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10371 replace calls to snprintf by calls to xsnprintf throughout.
10373 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10375 * configure.ac: Add configure check for alloca.
10376 * configure, config.in: Regenerate.
10377 * server.h: Include alloca.h if it exists.
10378 * gdbreplay.c: Include alloca.h if it exists.
10380 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10382 * linux-low.c (__SIGRTMIN): Define if not already defined.
10383 (linux_create_inferior): Check for __ANDROID__ rather than
10385 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10386 are already deferred.
10387 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10388 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10389 stopped and already has a pending signal to report.
10390 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10391 a pending signal to report or is moving out of a jump pad.
10392 (linux_init_signals): Check for __ANDROID__ rather than
10395 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10397 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10398 debug_threads check. Avoid a linear search when not doing debug
10401 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10403 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10404 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10405 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10406 (process_event): Change local fd's type to gdb_fildes_t.
10407 (create_file_handler): Adjust prototype.
10408 (delete_file_handler): Adjust prototype.
10409 (handle_file_event): Adjust prototype. Use pfildes.
10410 (create_file_event): Adjsut prototype.
10411 * remote-utils.c (remote_desc, listen_desc): Change type to
10413 * server.h: New gdb_fildes_t typedef.
10414 [USE_WIN32API]: Include winsock2.h.
10415 (delete_file_handler, add_file_handler): Adjust prototypes.
10416 (pfildes): Declare.
10417 * utils.c (pfildes): New.
10419 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10421 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10422 * configure: Regenerate.
10424 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10426 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10427 (linux_done_accessing_memory): ... this.
10428 (linux_target_ops): Adjust.
10429 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10430 * nto-low.c (nto_target_ops): Adjust comment.
10431 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10432 * spu-low.c (spu_target_ops): Adjust comment.
10433 * target.h (target_ops): Rename unprepare_to_access_memory field
10434 to done_accessing_memory.
10435 (unprepare_to_access_memory): Rename to ...
10436 (done_accessing_memory): ... this.
10438 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10440 * linux-low.c (linux_prepare_to_access_memory): New.
10441 (linux_unprepare_to_access_memory): New.
10442 (linux_target_ops): Install them.
10443 * server.c (read_memory): Rename to ...
10444 (gdb_read_memory): ... this. Use
10445 prepare_to_access_memory/prepare_to_access_memory.
10446 (write_memory): Rename to ...
10447 (gdb_write_memory): ... this. Use
10448 prepare_to_access_memory/prepare_to_access_memory.
10449 (handle_search_memory_1): Adjust.
10450 (process_serial_event): Adjust.
10451 * target.h (struct target_ops): New fields
10452 prepare_to_access_memory and unprepare_to_access_memory.
10453 (prepare_to_access_memory, unprepare_to_access_memory): New.
10454 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10455 prepare_to_access_memory/prepare_to_access_memory.
10456 * nto-low.c (nto_target_ops): Adjust.
10457 * spu-low.c (spu_target_ops): Adjust.
10458 * win32-low.c (win32_target_ops): Adjust.
10460 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10462 * Makefile.in (WARN_CFLAGS): Get it from configure.
10463 (WERROR_CFLAGS): New.
10464 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10465 * configure.ac: Introduce --enable-werror, which adds -Werror to
10466 the compiler command line. Enabled by default. Disable with
10467 --disable-werror. Add -Wdeclaration-after-statement
10468 Wpointer-arith and -Wformat-nonliteral to warning flags.
10469 * configure: Regenerate.
10471 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10473 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10475 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10477 * gdbreplay.c (remote_error): New.
10479 (expect): Use gdbchar. Check for error reading from GDB.
10480 Clarify sync error output.
10481 (play): Check for errors writing to GDB.
10482 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10483 * remote-utils.c (getpkt): Check for errors writing to the remote
10486 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10488 * linux-low.c (linux_wait_1): Move non-debugging code out of
10489 `debug_threads' control.
10491 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10493 * linux-low.c (linux_wait_1): Don't set last_status here.
10494 * server.c (push_event, queue_stop_reply_callback): Assert we're
10495 not pushing a TARGET_WAITKIND_IGNORE event.
10496 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10497 (myresume, handle_target_event): Set the thread's last_resume_kind
10498 and last_status from the target returned status.
10500 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10504 * linux-x86-low.c (update_debug_registers_callback): New.
10505 (i386_dr_low_set_addr): Use it.
10506 (i386_dr_low_get_addr): New.
10507 (i386_dr_low_set_control): Use update_debug_registers_callback.
10508 (i386_dr_low_get_control): New.
10509 (i386_dr_low_get_status): Adjust.
10510 * linux-low.c (linux_stop_lwp): New.
10511 * linux-low.h (linux_stop_lwp): Declare.
10513 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10514 argument instead of a i386_debug_reg_state.
10515 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10516 a i386_debug_reg_state.
10517 (i386_insert_aligned_watchpoint): Adjust.
10518 (i386_remove_aligned_watchpoint): Adjust.
10519 (i386_low_stopped_data_address): Read the debug registers from the
10520 inferior instead of from the mirrors.
10521 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10522 (i386_dr_low_get_addr): Declare.
10523 (i386_dr_low_get_control): Declare.
10524 (i386_dr_low_get_status): Change prototype.
10526 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10527 (i386_dr_low_get_addr): New.
10528 (i386_dr_low_get_control): New.
10529 (i386_dr_low_get_status): Adjust prototype. Return
10531 (i386_initial_stuff): Clear dr_status_mirror and
10533 (i386_get_thread_context): Adjust.
10534 (i386_set_thread_context): Adjust.
10535 (i386_thread_added): Adjust.
10537 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10539 * linux-low.h (linux_thread_area): Delete declaration.
10541 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10543 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10544 after its termination.
10546 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10548 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10549 (gdb_wants_all_stopped): Delete.
10550 (linux_wait_1): Don't call them.
10551 * server.c (handle_v_cont): Tag all threads as want-stopped.
10552 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10553 stopped as "client-wants-stopped".
10555 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10557 * Makefile.in (signals_h): New.
10558 (server_h): Depend on it.
10559 (server.o): Don't depend on $(signals_def).
10560 (signals.o): Depend on $(signals_def).
10562 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10564 * Makefile.in (signals_def): New.
10565 (server_h): Append include/gdb/signals.h and signals_def.
10566 (server.o): Append signals_def.
10568 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10570 * server.c (handle_target_event): Use target_signal_to_host for
10571 resume_info.sig initialization.
10572 * target.h (struct thread_resume) <sig>: New comment.
10574 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10576 * server.c (handle_query): strcpy() the returned string from paddress()
10577 instead of sprintf().
10578 * utils.c (paddress): Return phex_nz().
10580 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10582 * server.c (handle_v_cont): Call mourn_inferior if process
10584 (myresume): Likewise.
10586 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10588 Static tracepoints, and integration with UST.
10590 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10591 * mem-break.c (uninsert_all_breakpoints)
10592 (reinsert_all_breakpoints): New.
10593 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10594 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10595 (gdb_agent_ust_loaded, helper_thread_id)
10596 (gdb_agent_helper_thread_id): New macros.
10597 (struct ipa_sym_addresses): Add addr_ust_loaded,
10598 addr_helper_thread_id, addr_cmd_buf.
10599 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10600 (in_process_agent_loaded_ust): New.
10601 (write_e_ust_not_loaded): New.
10602 (maybe_write_ipa_ust_not_loaded): New.
10603 (struct collect_static_trace_data_action): New.
10604 (enum tracepoint_type) <static_tracepoint>: New.
10605 (struct tracepoint) <handle>: Mention static tracepoints.
10606 (struct static_tracepoint_ctx): New.
10607 (CMD_BUF_SIZE): New.
10608 (add_tracepoint_action): Handle static tracepoint actions.
10609 (unprobe_marker_at): New.
10610 (clear_installed_tracepoints): Handle static tracepoints.
10611 (cmd_qtdp): Handle static tracepoints.
10612 (probe_marker_at): New.
10613 (cmd_qtstart): Handle static tracepoints.
10614 (response_tracepoint): Handle static tracepoints.
10615 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10616 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10617 (get_context_regcache): Handle static tracepoints.
10618 (do_action_at_tracepoint): Handle static tracepoint actions.
10619 (traceframe_find_block_type): Handle static trace data blocks.
10620 (traceframe_read_sdata): New.
10621 (download_tracepoints): Download static tracepoint actions.
10622 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10623 (GDB_PROBE_NAME): New.
10625 (GET_UST_SYM): New.
10628 (ust_marker_to_static_tracepoint): New.
10630 (collect_ust_data_at_tracepoint): New.
10631 (gdb_ust_probe): New.
10632 (UNIX_PATH_MAX, SOCK_DIR): New.
10633 (gdb_ust_connect_sync_socket): New.
10634 (resume_thread, stop_thread): New.
10635 (run_inferior_command): New.
10636 (init_named_socket): New.
10637 (gdb_ust_socket_init): New.
10638 (cstr_to_hexstr): New.
10640 (first_marker, next_marker): New.
10641 (response_ust_marker): New.
10642 (cmd_qtfstm, cmd_qtsstm): New.
10643 (unprobe_marker_at, probe_marker_at): New.
10644 (cmd_qtstmat, gdb_ust_thread): New.
10645 (gdb_ust_init): New.
10646 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10647 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10648 (ST_REGENTRY): New.
10649 (x86_64_st_collect_regmap): New.
10650 (X86_64_NUM_ST_COLLECT_GREGS): New.
10651 (AMD64_RIP_REGNUM): New.
10652 (supply_static_tracepoint_registers): New.
10653 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10654 (ST_REGENTRY): New.
10655 (i386_st_collect_regmap): New.
10656 (i386_NUM_ST_COLLECT_GREGS): New.
10657 (supply_static_tracepoint_registers): New.
10658 * server.c (handle_query): Handle qXfer:statictrace:read.
10659 <qSupported>: Report support for StaticTracepoints, and
10660 qXfer:statictrace:read features.
10661 * server.h (traceframe_read_sdata)
10662 (supply_static_tracepoint_registers): Declare.
10663 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10664 (unpack_varlen_hex): Include in IPA build.
10665 * Makefile.in (ustlibs, ustinc): New.
10666 (IPA_OBJS): Add remote-utils-ipa.o.
10667 ($(IPA_LIB)): Link -ldl and -lpthread.
10669 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10670 * config.in, configure: Regenerate.
10672 2010-06-20 Ian Lance Taylor <iant@google.com>
10673 Pedro Alves <pedro@codesourcery.com>
10675 * linux-x86-low.c (always_true): Delete.
10676 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10677 trying to fool the compiler with always_true.
10679 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10681 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10682 conditions in gdbserver.
10684 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10686 * spu-low.c (spu_read_memory): Wrap around local store limit.
10687 (spu_write_memory): Likewise.
10689 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10691 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10692 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10694 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10696 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10697 uses with LONGEST uses.
10699 2010-06-14 Stan Shebs <stan@codesourcery.com>
10700 Pedro Alves <pedro@codesourcery.com>
10704 * linux-x86-low.c: Include limits.h.
10706 (always_true): New.
10709 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10710 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10711 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10712 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10713 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10714 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10715 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10716 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10717 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10718 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10719 (amd64_emit_void_call_2): New.
10720 (amd64_emit_ops): New.
10721 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10722 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10723 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10724 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10725 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10726 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10727 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10728 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10729 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10730 (i386_emit_stack_adjust, i386_emit_int_call_1)
10731 (i386_emit_void_call_2): New.
10732 (i386_emit_ops): New.
10733 (x86_emit_ops): New.
10734 (the_low_target): Install x86_emit_ops.
10735 * server.h (struct emit_ops): New.
10736 (get_raw_reg_func_addr): Declare.
10737 (current_insn_ptr, emit_error): Declare.
10738 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10739 (set_trace_state_variable_value): New defines.
10740 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10741 addr_get_trace_state_variable_value and
10742 addr_set_trace_state_variable_value.
10743 (symbol_list): New fields for get_raw_reg,
10744 get_trace_state_variable_value and set_trace_state_variable_value.
10745 (condfn): New typedef.
10746 (struct tracepoint): New field `compiled_cond'.
10747 (do_action_at_tracepoint): Clear compiled_cond.
10748 (get_trace_state_variable_value, set_trace_state_variable_value):
10750 (condition_true_at_tracepoint): If there's a compiled condition,
10752 (current_insn_ptr, emit_error): New globals.
10753 (struct bytecode_address): New.
10754 (get_raw_reg_func_addr): New.
10755 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10756 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10757 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10758 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10759 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10760 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10761 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10762 (compile_tracepoint_condition, compile_bytecodes): New.
10763 * target.h (emit_ops): Forward declare.
10764 (struct target_ops): New field emit_ops.
10765 (target_emit_ops): New.
10766 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10767 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10768 * linux-low.c (linux_emit_ops): New.
10769 (linux_target_ops): Install it.
10770 * linux-low.h (struct linux_target_ops): New field emit_ops.
10772 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10774 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10775 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10777 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10778 Stan Shebs <stan@codesourcery.com>
10780 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10781 (all): Depend on $(extra_libraries).
10782 (install-only): Install the IPA.
10783 (IPA_OBJS, IPA_LIB): New.
10784 (clean): Remove the IPA lib.
10785 (IPAGENT_CFLAGS): New.
10786 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10787 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10788 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10789 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10790 * configure.ac: Check for atomic builtins support in the compiler.
10791 (IPA_DEPFILES, extra_libraries): Define.
10792 * configure.srv (ipa_obj): Add description.
10793 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10794 (i[34567]86-*-linux*): Set ipa_obj.
10795 (x86_64-*-linux*): Set ipa_obj.
10796 * linux-low.c (stabilizing_threads): New.
10797 (supports_fast_tracepoints): New.
10798 (linux_detach): Stabilize threads before detaching.
10799 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10800 the lwp is either not stabilizing, or is moving out of a jump pad.
10801 (linux_fast_tracepoint_collecting): New.
10802 (maybe_move_out_of_jump_pad): New.
10803 (enqueue_one_deferred_signal): New.
10804 (dequeue_one_deferred_signal): New.
10805 (linux_wait_for_event_1): If moving out of a jump pad, defer
10806 pending signals to later.
10807 (linux_stabilize_threads): New.
10808 (linux_wait_1): Check if threads need moving out of jump pads, and
10810 (stuck_in_jump_pad_callback): New.
10811 (move_out_of_jump_pad_callback): New.
10812 (lwp_running): New.
10813 (linux_resume_one_lwp): Handle moving out of jump pads.
10814 (linux_set_resume_request): Dequeue deferred signals.
10815 (need_step_over_p): Also step over fast tracepoint jumps.
10816 (start_step_over): Also uninsert fast tracepoint jumps.
10817 (finish_step_over): Also reinsert fast tracepoint jumps.
10818 (linux_install_fast_tracepoint_jump): New.
10819 (linux_target_ops): Install linux_stabilize_threads and
10820 linux_install_fast_tracepoint_jump_pad.
10821 * linux-low.h (linux_target_ops) <get_thread_area,
10822 install_fast_tracepoint_jump_pad>: New fields.
10823 (struct lwp_info) <collecting_fast_tracepoint,
10824 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10825 (linux_get_thread_area): Declare.
10826 * linux-x86-low.c (jump_insn): New.
10827 (x86_get_thread_area): New.
10828 (append_insns): New.
10829 (push_opcode): New.
10830 (amd64_install_fast_tracepoint_jump_pad): New.
10831 (i386_install_fast_tracepoint_jump_pad): New.
10832 (x86_install_fast_tracepoint_jump_pad): New.
10833 (the_low_target): Install x86_get_thread_area and
10834 x86_install_fast_tracepoint_jump_pad.
10835 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10836 (struct fast_tracepoint_jump): New.
10837 (fast_tracepoint_jump_insn): New.
10838 (fast_tracepoint_jump_shadow): New.
10839 (find_fast_tracepoint_jump_at): New.
10840 (fast_tracepoint_jump_here): New.
10841 (delete_fast_tracepoint_jump): New.
10842 (set_fast_tracepoint_jump): New.
10843 (uninsert_fast_tracepoint_jumps_at): New.
10844 (reinsert_fast_tracepoint_jumps_at): New.
10845 (set_breakpoint_at): Use write_inferior_memory.
10846 (uninsert_raw_breakpoint): Use write_inferior_memory.
10847 (check_mem_read): Mask out fast tracepoint jumps.
10848 (check_mem_write): Mask out fast tracepoint jumps.
10849 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10850 (set_fast_tracepoint_jump): Declare.
10851 (delete_fast_tracepoint_jump)
10852 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10853 (reinsert_fast_tracepoint_jumps_at): Declare.
10854 * regcache.c: Don't compile many functions when building the
10855 in-process agent library.
10856 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10857 the register buffer in the heap.
10858 (free_register_cache): If the register buffer isn't owned by the
10859 regcache, don't free it.
10860 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10861 pre-existing register caches.
10862 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10864 (convert_ascii_to_int): : Constify `from' parameter type.
10865 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10866 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10867 the needed buffer in-place.
10868 (relocate_instruction): New.
10869 * server.c (handle_query) <qSymbols>: If the target supports
10870 tracepoints, give it a chance of looking up symbols. Report
10871 support for fast tracepoints.
10872 (handle_status): Stabilize threads.
10873 (process_serial_event): Adjust.
10874 * server.h (struct fast_tracepoint_jump): Forward declare.
10875 (struct process_info) <fast_tracepoint_jumps>: New field.
10876 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10877 (decode_X_packet, decode_M_packet): Adjust.
10878 (relocate_instruction): Declare.
10879 (in_process_agent_loaded): Declare.
10880 (tracepoint_look_up_symbols): Declare.
10881 (struct fast_tpoint_collect_status): Declare.
10882 (fast_tracepoint_collecting): Declare.
10883 (force_unlock_trace_buffer): Declare.
10884 (handle_tracepoint_bkpts): Declare.
10885 (initialize_low_tracepoint)
10886 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10887 * target.h (struct target_ops) <stabilize_threads,
10888 install_fast_tracepoint_jump_pad>: New fields.
10889 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10890 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10891 [HAVE_STDINT_H]: Include stdint.h.
10892 (trace_debug_1): Rename to ...
10893 (trace_vdebug): ... this.
10894 (trace_debug): Rename to ...
10895 (trace_debug_1): ... this. Add `level' parameter.
10896 (trace_debug): New.
10897 (ATTR_USED, ATTR_NOINLINE): New.
10898 (IP_AGENT_EXPORT): New.
10899 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10900 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10901 (about_to_request_buffer_space, trace_buffer_is_full)
10902 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10903 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10904 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10905 (traceframe_write_count, traceframes_created)
10906 (trace_state_variables)
10907 New renaming defines.
10908 (struct ipa_sym_addresses): New.
10909 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10910 (symbol_list): New.
10911 (ipa_sym_addrs): New.
10912 (all_tracepoint_symbols_looked_up): New.
10913 (in_process_agent_loaded): New.
10914 (write_e_ipa_not_loaded): New.
10915 (maybe_write_ipa_not_loaded): New.
10916 (tracepoint_look_up_symbols): New.
10917 (debug_threads) [IN_PROCESS_AGENT]: New.
10918 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10919 (UNKNOWN_SIDE_EFFECTS): New.
10920 (stop_tracing): New.
10921 (flush_trace_buffer): New.
10922 (stop_tracing_bkpt): New.
10923 (flush_trace_buffer_bkpt): New.
10924 (read_inferior_integer): New.
10925 (read_inferior_uinteger): New.
10926 (read_inferior_data_pointer): New.
10927 (write_inferior_data_pointer): New.
10928 (write_inferior_integer): New.
10929 (write_inferior_uinteger): New.
10930 (struct collect_static_trace_data_action): Delete.
10931 (enum tracepoint_type): New.
10932 (struct tracepoint) <type>: New field `type'.
10933 <actions_str, step_actions, step_actions_str>: Only include in
10935 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10936 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10937 (tracepoints): Use IP_AGENT_EXPORT.
10938 (last_tracepoint): Don't include in the IPA.
10939 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10940 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10941 (alloced_trace_state_variables): New.
10942 (trace_state_variables): Use IP_AGENT_EXPORT.
10943 (traceframe_t): Delete unused variable.
10944 (circular_trace_buffer): Don't include in the IPA.
10945 (trace_buffer_start): Delete.
10946 (struct trace_buffer_control): New.
10947 (trace_buffer_free): Delete.
10948 (struct ipa_trace_buffer_control): New.
10949 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10950 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10952 (trace_buffer_ctrl): New.
10953 (TRACE_BUFFER_CTRL_CURR): New.
10954 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10955 Reimplement as macros.
10956 (trace_buffer_wrap): Delete.
10957 (traceframe_write_count, traceframe_read_count)
10958 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10959 (struct tracepoint_hit_ctx) <type>: New field.
10960 (struct fast_tracepoint_ctx): New.
10961 (memory_barrier): New.
10963 (record_tracepoint_error): Update atomically in the IPA.
10964 (clear_inferior_trace_buffer): New.
10965 (about_to_request_buffer_space): New.
10966 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10967 updating the same buffer.
10968 (add_tracepoint): Default the tracepoint's type to trap
10969 tracepoint, and orig_size to -1.
10970 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10971 internal variables.
10972 (create_trace_state_variable): New parameter `gdb'. Handle it.
10973 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10974 (cmd_qtdp): Handle fast tracepoints.
10975 (cmd_qtdv): Adjust.
10976 (max_jump_pad_size): New.
10977 (gdb_jump_pad_head): New.
10978 (get_jump_space_head): New.
10979 (claim_jump_space): New.
10980 (sort_tracepoints): New.
10981 (MAX_JUMP_SIZE): New.
10982 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10984 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10985 support. Upload fast traceframes, and delete internal IPA
10987 (stop_tracing_handler): New.
10988 (flush_trace_buffer_handler): New.
10989 (cmd_qtstop): Upload fast tracepoints.
10990 (response_tracepoint): Handle fast tracepoints.
10991 (tracepoint_finished_step): Upload fast traceframes. Set the
10992 tracepoint hit context's tracepoint type.
10993 (handle_tracepoint_bkpts): New.
10994 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10995 type. Add comment about fast tracepoints.
10996 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10997 non-existing action_str field.
10998 (get_context_regcache): Handle fast tracepoints.
10999 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11001 (fast_tracepoint_from_jump_pad_address): New.
11002 (fast_tracepoint_from_ipa_tpoint_address): New.
11003 (collecting_t): New.
11004 (force_unlock_trace_buffer): New.
11005 (fast_tracepoint_collecting): New.
11007 (gdb_collect): New.
11008 (write_inferior_data_ptr): New.
11009 (target_tp_heap): New.
11010 (target_malloc): New.
11011 (download_agent_expr): New.
11013 (download_tracepoints): New.
11014 (download_trace_state_variables): New.
11015 (upload_fast_traceframes): New.
11016 (IPA_FIRST_TRACEFRAME): New.
11017 (IPA_NEXT_TRACEFRAME_1): New.
11018 (IPA_NEXT_TRACEFRAME): New.
11019 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11020 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11021 (gdb_jump_pad_buffer_end): New.
11022 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11023 (initialize_tracepoint): Adjust.
11024 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11025 buffer. Initialize the low module.
11026 * utils.c (PREFIX, TOOLNAME): New.
11027 (malloc_failure): Use PREFIX.
11028 (error): In the IPA, an error causes an exit.
11029 (fatal, warning): Use PREFIX.
11030 (internal_error): Use TOOLNAME.
11031 (NUMCELLS): Increase to 10.
11032 * configure, config.in: Regenerate.
11034 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11036 * server.c (handle_query) <qSupported>: Do two passes over the
11037 qSupported string to avoid nesting strtok.
11039 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11041 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11043 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11044 -Wl,--dynamic-list.
11045 * configure: Regenerate.
11046 * proc-service.list: New.
11048 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11050 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11053 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11055 * gdbreplay.c (remote_open): Check error return from socket() call by
11056 its equality to -1 not by it being negative.
11057 * remote-utils.c (remote_open): Likewise.
11059 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11061 * config.h: Regenerate.
11063 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11065 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11066 doesn't provide PTRACE_GET_THREAD_AREA.
11068 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11070 * linux-m68k-low.c: Include <asm/ptrace.h>
11071 (ps_get_thread_area): Implement.
11073 2010-05-03 Doug Evans <dje@google.com>
11075 * event-loop.c (struct callback_event): New struct.
11076 (callback_list): New global.
11077 (append_callback_event, delete_callback_event): New functions.
11078 (process_callback): New function.
11079 (start_event_loop): Call it.
11080 * remote-utils.c (NOT_SCHEDULED): Define.
11081 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11082 moved out of readchar.
11083 (readchar): Rewrite. Call reschedule before returning.
11084 (reset_readchar): New function.
11085 (remote_close): Call it.
11086 (process_remaining, reschedule): New functions.
11087 * server.h (callback_handler_func): New typedef.
11088 (append_callback_event, delete_callback_event): Declare.
11090 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11092 * proc-service.c (ps_pglobal_lookup): Use
11093 thread_db_look_up_one_symbol.
11094 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11095 parameter. Use it instead of all_symbols_looked_up.
11096 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11098 (all_symbols_looked_up): Don't declare.
11099 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11100 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11102 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11103 Set all_symbols_looked_up here.
11104 (thread_db_look_up_one_symbol): New.
11105 (thread_db_get_tls_address): Adjust.
11106 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11107 thread_db object on the heap, and tentatively set it in the
11109 (thread_db_init): Don't set all_symbols_looked_up here.
11110 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11112 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11114 * linux-low.c (linux_kill, linux_detach): Adjust.
11115 (status_pending_p_callback): Remove redundant statement. Check
11116 for !TARGET_WAITIKIND_IGNORE, instead of
11117 TARGET_WAITKIND_STOPPED.
11118 (handle_tracepoints): Make sure LWP is locked. Adjust.
11119 (linux_wait_for_event_1): Adjust.
11120 (linux_cancel_breakpoints): New.
11121 (unsuspend_one_lwp): New.
11122 (unsuspend_all_lwps): New.
11123 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11124 (send_sigstop_callback): Change return type to int, add new
11125 `except' parameter and handle it.
11126 (suspend_and_send_sigstop_callback): New.
11127 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11128 pass them down. If SUSPEND, also increment the lwp's suspend
11130 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11131 (need_step_over_p): Don't consider suspended LWPs.
11132 (start_step_over): Adjust.
11133 (proceed_one_lwp): Change return type to int, add new `except'
11134 parameter and handle it.
11135 (unsuspend_and_proceed_one_lwp): New.
11136 (proceed_all_lwps): Use find_inferior instead of
11138 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11139 also decrement the suspend count of LWPs. Pass `except' down,
11140 instead of hacking its suspend count.
11141 (linux_pause_all): Add `freeze' parameter. Adjust.
11142 (linux_unpause_all): New.
11143 (linux_target_ops): Install linux_unpause_all.
11144 * server.c (handle_status): Adjust.
11145 * target.h (struct target_ops): New fields `unpause_all' and
11146 `cancel_breakpoints'. Add new parameter to `pause_all'.
11147 (pause_all): Add new `freeze' parameter.
11148 (unpause_all): New.
11149 (cancel_breakpoints): New.
11150 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11151 cancel breakpoints.
11152 (cmd_qtstart): Pause threads.
11153 (stop_tracing): Pause threads, and cancel breakpoints.
11154 * win32-low.c (win32_target_ops): Adjust.
11156 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11158 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11159 the inferior right away from here...
11160 (linux_wait_1): ... to here, and adjust to check the thread's
11161 last_resume_kind instead of the lwp's step or stop_expected flags.
11163 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11165 * README: Use consistent `GDB' and `GDBserver' spellings.
11167 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11169 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11170 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11171 (linux_detach_one_lwp): Assume the lwp is stopped.
11172 (any_thread_of): Delete.
11173 (linux_detach): Stop all lwps here. Don't blindly delete all
11175 (delete_lwp_callback): New.
11176 (linux_mourn): Delete all lwps of the process that is gone.
11177 (linux_wait_1): Don't delete the last lwp of the process here.
11178 * mem-break.h (mark_breakpoints_out): Declare.
11179 * mem-break.c (mark_breakpoints_out): New.
11180 (free_all_breakpoints): Use it.
11181 * server.c (handle_target_event): If the process is gone, mark
11183 * thread-db.c (struct thread_db) <create_bp>: New field.
11184 (thread_db_enable_reporting): Fix prototype. Store a thread event
11185 breakpoint reference in the thread_db struct.
11186 (thread_db_load_search): Clear the thread_db object.
11187 (try_thread_db_load_1): Ditto.
11188 (switch_to_process): New.
11189 (disable_thread_event_reporting): Use it.
11190 (remove_thread_event_breakpoints): New.
11191 (thread_db_detach, thread_db_mourn): Use it.
11193 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11195 * linux-low.c (linux_enable_event_reporting): New.
11196 (linux_wait_for_event_1, handle_extended_wait): Use it.
11198 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11200 * linux-low.c (linux_kill_one_lwp, linux_kill)
11201 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11202 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11203 SIGSTOP even if the LWP is stopped.
11204 (send_sigstop_callback): New.
11205 (stop_all_lwps): Use send_sigstop_callback instead.
11206 (linux_resume_one_thread): Adjust.
11207 (proceed_one_lwp): Still proceed an LWP that the client has
11208 requested to stop, if we haven't reported it as stopped yet. Make
11209 sure that LWPs the client want stopped, have a pending SIGSTOP.
11211 2010-04-26 Doug Evans <dje@google.com>
11213 * server.c (handle_general_set): Make static.
11215 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11216 Print received char after testing for error/eof instead of before.
11217 (input_interrupt): Tweak comment.
11219 2010-04-23 Doug Evans <dje@google.com>
11221 * server.c (start_inferior): Print inferior argv if --debug.
11223 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11225 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11226 * nto-x86-low.c: Include server.h
11228 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11230 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11231 be consistent with other sources of this directory.
11232 (init_registers_amd64): Correct name of source file of this function
11235 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11237 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11238 64-bit executables.
11240 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11242 * win32-i386-low.c: Add 64-bit support.
11243 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11244 (init_registers_amd64): Declare.
11245 (mappings): Add 64-bit version of array.
11246 (init_windows_x86): New function.
11247 (the_low_target): Change init_arch field to init_windows_x86.
11249 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11251 * win32-low.c: Adapt to support also 64-bit architecture.
11252 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11253 (get_image_name): Use SIZE_T type for local variable `done'.
11254 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11255 (toolhelp_get_dll_name): Idem.
11256 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11257 Use uintptr_t typecast to avoid warning.
11258 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11259 (handle_exception): Use phex_nz to avoid warning.
11260 (win32_wait): Remove unused local variable `process'.
11262 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11264 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11267 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11269 * configure.ac: Use `ws2_32' library for srv_mingw.
11270 * configure: Regenerate.
11271 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11272 * remote-utils.c: Likewise.
11274 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11276 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11277 if __x86_64__ is defined.
11279 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11281 * configure: Regenerate.
11283 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11285 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11286 * target.h (target_ops): New get_tib_address field.
11287 * win32-low.h (win32_thread_info): Add thread_local_base field.
11288 * win32-low.c (child_add_thread): Add tlb argument.
11289 Set thread_local_base field to TLB.
11290 (get_child_debug_event): Adapt to child_add_thread change.
11291 (win32_get_tib_address): New function.
11292 (win32_target_ops): Set get_tib_address field to
11293 win32_get_tib_address.
11294 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11296 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11298 * linux-low.c (linux_mourn): Also remove the process.
11299 * server.c (handle_target_event): Don't remove the process here.
11300 * nto-low.c (nto_mourn): New.
11301 (nto_target_ops): Install it.
11302 * spu-low.c (spu_mourn): New.
11303 (spu_target_ops): Install it.
11304 * win32-low.c (win32_mourn): New.
11305 (win32_target_ops): Install it.
11307 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11309 * server.h (buffer_xml_printf): Remove redundant `;'.
11311 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11313 * regcache.c (set_register_cache): Invalidate regcaches before
11314 changing the register cache layout.
11315 (regcache_invalidate_one): Allow a NULL regcache.
11316 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11317 regcaches before changing the register cache layout or the target
11320 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11322 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11323 variable warning on Linux/x86-64.
11325 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11327 GDBserver disconnected tracing support.
11329 * linux-low.c (linux_remove_process): Delete.
11330 (add_lwp): Don't set last_resume_kind here.
11331 (linux_kill): Use `mourn'.
11332 (linux_detach): Use `thread_db_detach', and `mourn'.
11333 (linux_mourn): New.
11334 (linux_attach_lwp_1): Adjust comment.
11335 (linux_attach): last_resume_kind moved the thread_info; adjust.
11336 (status_pending_p_callback): Adjust.
11337 (linux_wait_for_event_1): Adjust.
11338 (count_events_callback, select_singlestep_lwp_callback)
11339 (select_event_lwp_callback, cancel_breakpoints_callback)
11340 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11341 (proceed_one_lwp): Adjust.
11342 (linux_async): Add debug output.
11343 (linux_thread_stopped): New.
11344 (linux_pause_all): New.
11345 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11347 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11348 (thread_db_free): Delete declaration.
11349 (thread_db_detach, thread_db_mourn): Declare.
11350 * thread-db.c (thread_db_init): Use thread_db_mourn.
11351 (thread_db_free): Delete, split in two.
11352 (disable_thread_event_reporting): New.
11353 (thread_db_detach): New.
11354 (thread_db_mourn): New.
11356 * server.h (struct thread_info) <last_resume_kind>: New field.
11357 <attached>: Add comment.
11358 <gdb_detached>: New field.
11359 (handler_func): Change return type to int.
11360 (handle_serial_event, handle_target_event): Ditto.
11361 (gdb_connected): Declare.
11363 (disconnected_tracing): Declare.
11364 (stop_tracing): Declare.
11366 * server.c (handle_query) <qSupported>: Report support for
11367 disconnected tracing.
11368 (queue_stop_reply_callback): Account for running threads.
11369 (gdb_wants_thread_stopped): New.
11370 (gdb_wants_all_threads_stopped): New.
11371 (gdb_reattached_process): New.
11372 (handle_status): Clear the `gdb_detached' flag of all processes.
11373 In all-stop, stop all threads.
11374 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11375 (process_serial_event): If the remote connection breaks, or if an
11376 exit was forced with "monitor exit", force an event loop exit.
11377 Handle disconnected tracing on detach.
11378 (handle_serial_event): Adjust.
11379 (handle_target_event): If GDB isn't connected, forward events back
11380 to the inferior, unless the last process exited, in which case,
11381 exit gdbserver. Adjust interface.
11383 * remote-utils.c (remote_open): Don't block in accept. Instead
11384 register an event loop source on the listen socket file
11385 descriptor. Refactor bits into ...
11386 (listen_desc): ... this new global.
11387 (gdb_connected): ... this new function.
11388 (enable_async_notification): ... this new function.
11389 (handle_accept_event): ... this new function.
11390 (remote_close): Clear remote_desc.
11392 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11394 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11396 (mourn_inferior): Define.
11397 (target_process_qsupported): Avoid the dangling else problem.
11398 (thread_stopped): Define.
11399 (pause_all): Define.
11400 (target_waitstatus_to_string): Declare.
11401 * target.c (target_waitstatus_to_string): New.
11403 * tracepoint.c (tracing): Make extern.
11404 (disconnected_tracing): New.
11405 (stop_tracing): Make extern. Handle tracing stops due to GDB
11407 (cmd_qtdisconnected): New.
11408 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11409 (handle_tracepoint_general_set): Handle QTDisconnected.
11411 * event-loop.c (event_handler_func): Change return type to int.
11412 (process_event): Bail out if the event handler wants the event
11414 (handle_file_event): Ditto.
11415 (start_event_loop): Bail out if the event handler wants the event
11418 * nto-low.c (nto_target_ops): Adjust.
11419 * spu-low.c (spu_wait): Don't remove the process here.
11420 (spu_target_ops): Adjust.
11421 * win32-low.c (win32_wait): Don't remove the process here.
11422 (win32_target_ops): Adjust.
11424 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11426 * regcache.c (realloc_register_cache): Invalidate inferior's
11427 regcache before recreating it.
11429 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11431 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11433 2010-04-09 Stan Shebs <stan@codesourcery.com>
11434 Pedro Alves <pedro@codesourcery.com>
11436 * server.h (LONGEST): New.
11437 (struct thread_info) <while_stepping>: New field.
11438 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11440 (initialize_tracepoint, handle_tracepoint_general_set)
11441 (handle_tracepoint_query, tracepoint_finished_step)
11442 (tracepoint_was_hit, release_while_stepping_state_list):
11443 (current_traceframe): Declare.
11444 * server.c (handle_general_set): Handle tracepoint packets.
11445 (read_memory): New.
11446 (write_memory): New.
11447 (handle_search_memory_1): Use read_memory.
11448 (handle_query): Report support for conditional tracepoints, trace
11449 state variables, and tracepoint sources. Handle tracepoint
11451 (main): Initialize the tracepoints module.
11452 (process_serial_event): Handle traceframe reads/writes.
11454 * linux-low.c (handle_tracepoints): New.
11455 (linux_wait_1): Call it.
11456 (linux_resume_one_lwp): Handle while-stepping.
11457 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11458 (linux_target_ops): Install them.
11459 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11461 * linux-x86-low.c (x86_supports_tracepoints): New.
11462 (the_low_target). Install it.
11464 * mem-break.h (delete_breakpoint): Declare.
11465 * mem-break.c (delete_breakpoint): Make external.
11467 * target.h (struct target_ops): Add `supports_tracepoints',
11468 `read_pc', and `write_pc' fields.
11469 (target_supports_tracepoints): Define.
11470 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11473 * regcache.h (struct regcache) <registers_owned>: New field.
11474 (init_register_cache, regcache_cpy): Declare.
11475 (regcache_read_pc, regcache_write_pc): Declare.
11476 (register_cache_size): Declare.
11477 (supply_regblock): Declare.
11478 * regcache.c (init_register_cache): New.
11479 (new_register_cache): Use it.
11480 (regcache_cpy): New.
11481 (register_cache_size): New.
11482 (supply_regblock): New.
11483 (regcache_read_pc, regcache_write_pc): New.
11485 * tracepoint.c: New.
11487 * Makefile.in (OBS): Add tracepoint.o.
11488 (tracepoint.o): New rule.
11490 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11492 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11494 (i386-mmx.c): Likewise.
11495 (i386-mmx-linux.o): Likewise.
11496 (i386-mmx-linux.c): Likewise.
11498 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11499 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11500 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11501 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11503 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11504 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11505 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11507 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11509 * Makefile.in (clean): Updated.
11511 (i386-avx.c): Likewise.
11512 (i386-avx-linux.o): Likewise.
11513 (i386-avx-linux.c): Likewise.
11514 (amd64-avx.o): Likewise.
11515 (amd64-avx.c): Likewise.
11516 (amd64-avx-linux.o): Likewise.
11517 (amd64-avx-linux.c): Likewise.
11519 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11520 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11521 (srv_amd64_regobj): Add amd64-avx.o.
11522 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11523 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11524 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11525 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11526 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11527 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11528 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11530 * i387-fp.c: Include "i386-xstate.h".
11532 (i387_cache_to_xsave): Likewise.
11533 (i387_xsave_to_cache): Likewise.
11534 (x86_xcr0): Likewise.
11536 * i387-fp.h (i387_cache_to_xsave): Likewise.
11537 (i387_xsave_to_cache): Likewise.
11538 (x86_xcr0): Likewise.
11540 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11541 * linux-crisv32-low.c (target_regsets): Likewise.
11542 * linux-m68k-low.c (target_regsets): Likewise.
11543 * linux-mips-low.c (target_regsets): Likewise.
11544 * linux-ppc-low.c (target_regsets): Likewise.
11545 * linux-s390-low.c (target_regsets): Likewise.
11546 * linux-sh-low.c (target_regsets): Likewise.
11547 * linux-sparc-low.c (target_regsets): Likewise.
11548 * linux-xtensa-low.c (target_regsets): Likewise.
11550 * linux-low.c: Include <sys/uio.h>.
11551 (regsets_fetch_inferior_registers): Support nt_type.
11552 (regsets_store_inferior_registers): Likewise.
11553 (linux_process_qsupported): New.
11554 (linux_target_ops): Add linux_process_qsupported.
11556 * linux-low.h (regset_info): Add nt_type.
11557 (linux_target_ops): Add process_qsupported.
11559 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11561 (init_registers_i386_avx_linux): New.
11562 (init_registers_amd64_avx_linux): Likewise.
11563 (xmltarget_i386_linux_no_xml): Likewise.
11564 (xmltarget_amd64_linux_no_xml): Likewise.
11565 (PTRACE_GETREGSET): Likewise.
11566 (PTRACE_SETREGSET): Likewise.
11567 (x86_fill_xstateregset): Likewise.
11568 (x86_store_xstateregset): Likewise.
11569 (use_xml): Likewise.
11570 (x86_linux_update_xmltarget): Likewise.
11571 (x86_linux_process_qsupported): Likewise.
11572 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11573 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11574 init_registers_i386_linux here. Call
11575 x86_linux_update_xmltarget.
11576 (the_low_target): Add x86_linux_process_qsupported.
11578 * server.c (handle_query): Call target_process_qsupported.
11580 * target.h (target_ops): Add process_qsupported.
11581 (target_process_qsupported): New.
11583 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11585 * inferiors.c (add_thread): Set last_status kind to
11586 TARGET_WAITKIND_IGNORE.
11587 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11588 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11589 (linux_wait_1): Move `thread' local definition to block that uses
11590 it. Don't NULL initialize `event_child'.
11591 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11592 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11593 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11595 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11597 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11598 an extended waitstatus, or by a watchpoint.
11599 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11600 thread was stepping or has been stopped by a watchpoint.
11602 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11604 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11605 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11606 of another, then delete the previous, and validate all
11608 (validate_inserted_breakpoint): New.
11609 (delete_disabled_breakpoints): New.
11610 (validate_breakpoints): New.
11611 (check_mem_read): Validate breakpoints before trusting their
11612 shadow. Delete disabled breakpoints.
11613 (check_mem_write): Validate breakpoints before trusting they
11614 should be inserted. Delete disabled breakpoints.
11615 * mem-break.h (validate_breakpoints):
11616 * server.c (handle_query): Validate breakpoints when we see a
11619 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11621 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11622 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11623 if we could tell there's a GDB breakpoint at stop_pc.
11624 (need_step_over_p): Don't do a step over if we find a GDB
11625 breakpoint at the resume PC.
11627 * mem-break.c (struct raw_breakpoint): New.
11628 (enum bkpt_type): New type `gdb_breakpoint'.
11629 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11630 fields. New field `raw'.
11631 (find_raw_breakpoint_at): New.
11632 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11633 breakpoint instead.
11634 (set_breakpoint_at): Adjust.
11635 (delete_raw_breakpoint): New.
11636 (release_breakpoint): New.
11637 (delete_breakpoint): Rename to...
11638 (delete_breakpoint_1): ... this. Add proc parameter. Use
11639 release_breakpoint. Return ENOENT.
11640 (delete_breakpoint): Reimplement.
11641 (find_breakpoint_at): Delete.
11642 (find_gdb_breakpoint_at): New.
11643 (delete_breakpoint_at): Delete.
11644 (set_gdb_breakpoint_at): New.
11645 (delete_gdb_breakpoint_at): New.
11646 (gdb_breakpoint_here): New.
11647 (set_reinsert_breakpoint): Use release_breakpoint.
11648 (uninsert_breakpoint): Rename to ...
11649 (uninsert_raw_breakpoint): ... this.
11650 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11651 (reinsert_raw_breakpoint): Change parameter type to
11653 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11655 (check_breakpoints): Adjust. Use release_breakpoint.
11656 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11657 (breakpoint_inserted_here): Ditto.
11658 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11659 Don't trust the breakpoint's shadow if it is not inserted.
11660 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11661 (delete_all_breakpoints): Adjust.
11662 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11663 use delete_breakpoint_1.
11665 * mem-break.h (breakpoints_supported): Delete declaration.
11666 (set_gdb_breakpoint_at): Declare.
11667 (gdb_breakpoint_here): Declare.
11668 (delete_breakpoint_at): Delete.
11669 (delete_gdb_breakpoint_at): Declare.
11671 * server.h (struct raw_breakpoint): Forward declare.
11672 (struct process_info): New field `raw_breakpoints'.
11674 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11677 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11679 * linux-low.c (status_pending_p_callback): Fix comment.
11680 (linux_wait_for_event_1): Move most of the internal breakpoint
11681 handling from here...
11682 (linux_wait_1): ... to here.
11683 (count_events_callback): New.
11684 (select_singlestep_lwp_callback): New.
11685 (select_event_lwp_callback): New.
11686 (cancel_breakpoints_callback): New.
11687 (select_event_lwp): New.
11688 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11689 priority to all LWPs that have had events that should be reported
11690 to the client. Cancel breakpoints when about to reporting the
11691 event to the client, not while stopping lwps. No longer cancel
11692 finished single-steps here.
11693 (cancel_finished_single_step): Delete.
11694 (cancel_finished_single_steps): Delete.
11696 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11698 * mem-break.c (enum bkpt_type): New.
11699 (struct breakpoint): New field `type'.
11700 (set_breakpoint_at): Change return type to struct breakpoint
11701 pointer. Set type to `other_breakpoint' by default.
11702 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11703 in the breakpoint list.
11704 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11705 (reinsert_breakpoint): Rename to ...
11706 (reinsert_raw_breakpoint): ... this.
11707 (reinsert_breakpoints_at): Adjust.
11708 * mem-break.h (struct breakpoint): Declare.
11709 (set_breakpoint_at): Change return type to struct breakpoint
11712 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11714 * server.c (handle_query): Assign, not compare.
11716 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11718 Teach linux gdbserver to step-over-breakpoints.
11720 * linux-low.c (can_hardware_single_step): New.
11721 (supports_breakpoints): New.
11722 (handle_extended_wait): If stopping threads, read the stop pc of
11723 the new cloned LWP.
11725 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11726 low target doesn't support retrieving the PC.
11727 (add_lwp): Set last_resume_kind to resume_continue.
11728 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11729 (linux_attach): Don't clear stop_expected. Set the lwp's
11730 last_resume_kind to resume_stop.
11731 (linux_detach_one_lwp): Don't check for removed breakpoints.
11732 (check_removed_breakpoint): Delete.
11733 (status_pending_p): Rename to ...
11734 (status_pending_p_callback): ... this. Don't check for removed
11735 breakpoints. Don't consider threads that are stopped from GDB's
11737 (linux_wait_for_lwp): Always read the stop_pc here.
11738 (cancel_breakpoint): New.
11739 (step_over_bkpt): New global.
11740 (linux_wait_for_event_1): Implement stepping over breakpoints.
11741 (gdb_wants_lwp_stopped): New.
11742 (gdb_wants_all_stopped): New.
11743 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11744 single-step traps here. Store the thread's last reported target
11746 (send_sigstop): Don't clear stop_expected. Always set it,
11748 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11749 (cancel_finished_single_step): New.
11750 (cancel_finished_single_steps): New.
11751 (wait_for_sigstop): Don't cancel finished single-step traps here.
11752 (linux_resume_one_lwp): Don't check for removed breakpoints.
11753 Don't set `step' on non-hardware step archs.
11754 (linux_set_resume_request): Ignore resume_stop requests if already
11755 stopping or stopped. Set the lwp's last_resume_kind.
11756 (resume_status_pending_p): Don't check for removed breakpoints.
11757 (need_step_over_p): New.
11758 (start_step_over): New.
11759 (finish_step_over): New.
11760 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11761 requests. Clear the thread's last reported target waitstatus.
11762 Don't use the `suspended' flag. Don't consider pending breakpoints.
11763 (linux_resume): Start a step-over if necessary.
11764 (proceed_one_lwp): New.
11765 (proceed_all_lwps): New.
11766 (unstop_all_lwps): New.
11767 * linux-low.h (struct lwp_info): Rewrite comment for the
11768 `suspended' flag. Add the `stop_pc' field. Delete the
11769 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11770 Add `'last_resume_kind' and `need_step_over' fields.
11771 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11772 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11773 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11774 (set_raw_breakpoint_at): New.
11775 (set_breakpoint_at): Rewrite to use it.
11776 (reinsert_breakpoint_handler): Delete.
11777 (set_reinsert_breakpoint): New.
11778 (reinsert_breakpoint_by_bp): Delete.
11779 (delete_reinsert_breakpoints): New.
11780 (uninsert_breakpoint): Rewrite.
11781 (uninsert_breakpoints_at): New.
11782 (reinsert_breakpoint): Rewrite.
11783 (reinsert_breakpoints_at): New.
11784 (check_breakpoints): Rewrite.
11785 (breakpoint_here): New.
11786 (breakpoint_inserted_here): New.
11787 (check_mem_read): Adjust.
11788 * mem-break.h (breakpoints_supported, breakpoint_here)
11789 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11790 (reinsert_breakpoint_by_bp): Delete declaration.
11791 (delete_reinsert_breakpoints): Declare.
11792 (reinsert_breakpoint): Delete declaration.
11793 (reinsert_breakpoints_at): Declare.
11794 (uninsert_breakpoint): Delete declaration.
11795 (uninsert_breakpoints_at): Declare.
11796 (check_breakpoints): Adjust prototype.
11797 * server.h: Adjust include order.
11798 (struct thread_info): Declare here. Add a `last_status' field.
11800 2010-03-23 Michael Snyder <msnyder@vmware.com>
11802 * server.c (crc32): New function.
11803 (handle_query): Add handling for 'qCRC:' request.
11805 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11807 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11808 lwp had been stopped by a watchpoint.
11810 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11812 * server.h (internal_error): Declare.
11813 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11814 * utils.c (internal_error): New function.
11816 2010-03-15 Andreas Schwab <schwab@redhat.com>
11818 * configure.srv: Fix typo setting srv_regobj.
11820 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11822 * linux-low.c (fetch_register): Avoid passing a non string literal
11824 (usr_store_inferior_registers): Ditto.
11826 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11828 * linux-low.c (linux_write_memory): Bail out early if peeking
11831 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11833 * linux-low.h (struct lwp_info): New fields
11834 `stopped_by_watchpoint' and `stopped_data_address'.
11835 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11836 here, and cache them in the lwp object.
11837 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11839 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11841 (linux_stopped_by_watchpoint): Rewrite.
11842 (linux_stopped_data_address): Rewrite.
11844 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11846 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11847 switching the current inferior, not before.
11849 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11851 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11852 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11853 i386-linux.c and amd64-linux.c.
11854 (reg-i386.o): Removed.
11855 (reg-i386.c): Likewise.
11856 (reg-i386-linux.o): Likewise.
11857 (reg-i386-linux.c): Likewise.
11858 (reg-x86-64.o): Likewise.
11859 (reg-x86-64.c): Likewise.
11860 (reg-x86-64-linux.o): Likewise.
11861 (reg-x86-64-linux.c): Likewise.
11863 (i386.c): Likewise.
11864 (i386-linux.o): Likewise.
11865 (i386-linux.c): Likewise.
11866 (amd64.o): Likewise.
11867 (amd64.c): Likewise.
11868 (amd64-linux.o): Likewise.
11869 (amd64-linux.c): Likewise.
11871 * configure.srv (srv_i386_regobj): New.
11872 (srv_i386_linux_regobj): Likewise.
11873 (srv_amd64_regobj): Likewise.
11874 (srv_amd64_linux_regobj): Likewise.
11875 (srv_i386_32bit_xmlfiles): Likewise.
11876 (srv_i386_64bit_xmlfiles): Likewise.
11877 (srv_i386_xmlfiles): Likewise.
11878 (srv_amd64_xmlfiles): Likewise.
11879 (srv_i386_linux_xmlfiles): Likewise.
11880 (srv_amd64_linux_xmlfiles): Likewise.
11881 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11882 srv_xmlfiles to $srv_i386_xmlfiles.
11883 (i[34567]86-*-mingw32ce*): Likewise.
11884 (i[34567]86-*-mingw*): Likewise.
11885 (i[34567]86-*-nto*): Likewise.
11886 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11887 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11888 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11889 (x86_64-*-linux*): Likewise.
11891 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11892 (init_registers_amd64_linux): New.
11893 (x86_arch_setup): Replace init_registers_x86_64_linux with
11894 init_registers_amd64_linux.
11896 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11898 * configure.ac: Check for libdl. If it is not available link against
11899 static libthread_db.
11900 * configure: Regenerate.
11902 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11906 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11907 handing a read watchpoint.
11908 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11910 2010-02-12 Doug Evans <dje@google.com>
11912 * linux-low.c (linux_supports_tracefork_flag): Document.
11913 (linux_look_up_symbols): Add comment.
11915 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11917 * regcache.c (supply_register): Clear regcache if buf is NULL.
11919 2010-02-02 Nicolas Roche <roche@sourceware.org>
11920 Joel Brobecker <brobecker@adacore.com>
11922 * inferiors.c (find_inferior): Add function documentation.
11923 (unloaded_dll): Handle the case where the unloaded dll has not
11924 been previously registered in the dll list.
11926 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11928 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11929 (thumb2_breakpoint): New.
11930 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11932 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11934 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11935 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11938 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11940 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11942 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11944 * linux-s390-low.c (s390_collect_ptrace_register)
11945 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11947 2010-01-21 Doug Evans <dje@google.com>
11949 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11950 (PTRACE_ARG4_TYPE): New macro.
11951 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11952 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11953 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11954 (usr_store_inferior_registers): Ditto.
11955 (linux_read_memory, linux_write_memory): Ditto.
11956 (linux_test_for_tracefork): Ditto.
11958 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11959 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11961 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11963 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11966 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11968 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11969 prototype to take a regcache. Adjust.
11971 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11973 * regcache.h (struct thread_info): Forward declare.
11974 (struct regcache): New.
11975 (new_register_cache): Adjust prototype.
11976 (get_thread_regcache): Declare.
11977 (free_register_cache): Adjust prototype.
11978 (registers_to_string, registers_from_string): Ditto.
11979 (supply_register, supply_register_by_name, collect_register)
11980 (collect_register_as_string, collect_register_by_name): Ditto.
11981 * regcache.c (struct inferior_regcache_data): Delete.
11982 (get_regcache): Rename to ...
11983 (get_thread_regcache): ... this. Adjust. Switch inferior before
11984 fetching registers.
11985 (regcache_invalidate_one): Adjust.
11986 (regcache_invalidate): Fix prototype.
11987 (new_register_cache): Return the new register cache.
11988 (free_register_cache): Change prototype.
11989 (realloc_register_cache): Adjust.
11990 (registers_to_string): Change prototype to take a regcache. Adjust.
11991 (registers_from_string): Ditto.
11992 (register_data): Ditto.
11993 (supply_register): Ditto.
11994 (supply_register_by_name): Ditto.
11995 (collect_register): Ditto.
11996 (collect_register_as_string): Ditto.
11997 (collect_register_by_name): Ditto.
11998 * server.c (process_serial_event): Adjust.
11999 * linux-low.h (regset_fill_func, regset_store_func): Change
12001 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12003 * linux-low.c (get_stop_pc): Adjust.
12004 (check_removed_breakpoint): Adjust.
12005 (linux_wait_for_event): Adjust.
12006 (linux_resume_one_lwp): Adjust.
12007 (fetch_register): Add regcache parameter. Adjust.
12008 (usr_store_inferior_registers): Ditto.
12009 (regsets_fetch_inferior_registers): Ditto.
12010 (regsets_store_inferior_registers): Ditto.
12011 (linux_fetch_registers, linux_store_registers): Ditto.
12012 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12014 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12016 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12017 prototype to take a regcache.
12018 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12019 * remote-utils.c (convert_ascii_to_int, outreg)
12020 (prepare_resume_reply): Change prototype to take a regcache.
12022 * target.h (struct target_ops) <fetch_registers, store_registers>:
12023 Change prototype to take a regcache.
12024 (fetch_inferior_registers, store_inferior_registers): Change
12025 prototype to take a regcache. Adjust.
12026 * proc-service.c (ps_lgetregs): Adjust.
12027 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12028 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12029 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12030 take a regcache. Adjust.
12031 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12032 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12033 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12034 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12035 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12036 (cris_cannot_fetch_register):
12037 (cris_breakpoint_at): Change prototype to take a regcache.
12039 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12040 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12041 to take a regcache. Adjust.
12042 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12044 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12045 take a regcache. Adjust.
12046 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12047 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12048 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12049 * linux-mips-low.c (mips_get_pc):
12050 (mips_set_pc): Change prototype to take a regcache. Adjust.
12051 (mips_reinsert_addr): Adjust.
12052 (mips_collect_register): Change prototype to take a regcache.
12054 (mips_supply_register):
12055 (mips_collect_register_32bit, mips_supply_register_32bit)
12056 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12057 (mips_store_fpregset): Ditto.
12058 * linux-ppc-low.c (ppc_supply_ptrace_register)
12059 (ppc_supply_ptrace_register): Ditto.
12060 (parse_spufs_run): Adjust.
12061 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12062 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12063 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12064 take a regcache. Adjust.
12065 * linux-s390-low.c (s390_collect_ptrace_register)
12066 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12067 (s390_set_pc): Change prototype to take a regcache. Adjust.
12068 (s390_arch_setup): Adjust.
12069 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12070 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12071 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12072 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12073 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12075 (sparc_breakpoint_at): Adjust.
12076 * linux-xtensa-low.c (xtensa_fill_gregset):
12077 (xtensa_store_gregset):
12078 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12079 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12080 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12081 prototype to take a regcache. Adjust.
12082 * win32-arm-low.c (arm_fetch_inferior_register)
12083 (arm_store_inferior_register): Change prototype to take a
12085 * win32-i386-low.c (i386_fetch_inferior_register)
12086 (i386_store_inferior_register): Change prototype to take a
12088 * win32-low.c (child_fetch_inferior_registers)
12089 (child_store_inferior_registers): Change prototype to take a
12091 (win32_wait): Adjust.
12092 (win32_fetch_inferior_registers): Change prototype to take a
12094 (win32_store_inferior_registers): Adjust.
12095 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12096 store_inferior_register>: Change prototype to take a regcache.
12098 2010-01-20 Doug Evans <dje@google.com>
12100 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12102 (linux_wait_for_event1, linux_init_signals): Ditto.
12103 (W_STOPCODE): Provide definition if missing.
12105 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12107 * linux-low.c (linux_core_of_thread): New.
12108 (compare_ints, show_process, list_threads): New.
12109 (linux_qxfer_osdata): Report threads and cores.
12110 (linux_target_op): Register linux_core_of_thread.
12111 * remote-utils.c (prepare_resume_reply): Report the core.
12112 (buffer_xml_printf): Support %d specifier.
12113 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12115 (handle_query): Handle qXfer:threads. Announce availability
12117 * target.h (struct target_ops): New field core_of_thread.
12119 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12121 * Makefile.in (clean): Remove new generated files.
12122 (reg-s390.o, reg-s390.c): Remove rules.
12123 (reg-s390x.o, reg-s390x.c): Likewise.
12124 (s390-linux32.o, s390-linux32.c): Add rules.
12125 (s390-linux64.o, s390-linux64.c): Likewise.
12126 (s390x-linux64.o, s390x-linux64.c): Likewise.
12127 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12128 * linux-s390-low.c: Include <elf.h>.
12129 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12130 (init_registers_s390): Remove prototype.
12131 (init_registers_s390x): Likewise.
12132 (init_registers_s390_linux32): Add prototype.
12133 (init_registers_s390_linux64): Likewise.
12134 (init_registers_s390x_linux64): Likewise.
12135 (s390_num_regs_3264): New define.
12136 (s390_regmap_3264): New global variable.
12137 (s390_cannot_fetch_register): Remove obsolete check.
12138 (s390_cannot_store_register): Likewise.
12139 (s390_collect_ptrace_register): Handle upper/lower register halves.
12140 (s390_supply_ptrace_register): Likewise.
12141 (s390_fill_gregset): Update to register number changes.
12142 (s390_get_hwcap): New routine.
12143 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12144 Install appropriate regmap and register set.
12146 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12148 * server.c (gdbserver_version): Update copyright year to 2010.
12149 * gdbreplay.c (gdbreplay_version): Likewise.
12151 2009-12-28 Doug Evans <dje@google.com>
12153 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12154 elf/external.h. Include <elf.h> instead but only if necessary.
12156 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12158 * linux-low.c (linux_remove_process): Remove `detaching'
12159 parameter. Don't release/detach from thread_db here.
12160 (linux_kill): Release/detach from thread_db here, ...
12161 (linux_detach): ... and here, before actually detaching.
12162 (linux_wait_1): ... and here, when a process exits.
12163 * thread-db.c (any_thread_of): New.
12164 (thread_db_free): Switch the current inferior to a thread of the
12167 2009-12-21 Doug Evans <dje@google.com>
12169 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12171 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12172 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12173 warning ifndef __NR_tkill. Move setting of errno there too.
12174 Delete unnecessary resetting of errno after syscall.
12175 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12177 * configure.ac: Check for dladdr.
12178 * config.in: Regenerate.
12179 * configure: Regenerate.
12180 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12181 (try_thread_db_load): Update.
12183 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12185 2009-12-18 Doug Evans <dje@google.com>
12187 * event-loop.c: Include unistd.h if it exists.
12189 * linux-low.c (my_waitpid): Move definition away from being in
12190 between linux_tracefork_child/linux_test_for_tracefork.
12192 * gdb_proc_service.h (psaddr_t): Fix type.
12193 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12194 signature to match glibc.
12196 2009-12-16 Doug Evans <dje@google.com>
12198 * linux-low.c (linux_read_memory): Fix argument to read.
12200 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12202 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12203 events, don't leave current_inferior pointing at null.
12205 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12207 * win32-low.c (LOG): Delete.
12208 (OUTMSG): Output to stderr.
12209 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12210 on compile time LOG macro.
12211 (win32_wait): Fix debug output.
12213 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12215 * win32-low.c (win32_add_one_solib): If the dll name is
12216 "ntdll.dll", prepend the system directory to the dll path.
12218 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12220 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12222 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12223 Vladimir Prus <vladimir@codesourcery.com>
12225 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12226 * configure.ac: Check for __mcoldfire__ and set
12227 gdb_cv_m68k_is_coldfire.
12228 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12229 reg-cf.o and reg-m68k.o.
12230 * configure: Regenerated.
12232 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12234 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12235 Pass it to thread_db_free.
12236 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12237 proper `detaching' argument to linux_remove_process.
12238 * linux-low.h (thread_db_free): Add `detaching' parameter.
12239 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12241 (thread_db_free): Add `detaching' parameter. Only
12242 call td_ta_clear_event if detaching from process.
12244 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12246 * thread-db.c (thread_db_free): Fix typo.
12248 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12251 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12253 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12255 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12256 with an i686 compiler.
12257 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12259 * configure: Rebuilt.
12261 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12265 * server.c (handle_search_memory_1): Correct read_addr initialization
12266 in loop for searching subsequent chunks.
12268 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12270 * configure.ac: New --with-libthread-db option.
12271 * thread-db.c: Allow direct dependence on libthread_db.
12272 (thread_db_free): Adjust.
12273 * config.in: Regenerate.
12274 * configure: Likewise.
12276 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12279 * thread-db.c (attach_thread): New function.
12280 (maybe_attach_thread): Return success/failure.
12281 (find_new_threads_callback): Adjust.
12282 (thread_db_find_new_threads): Loop until no new threads.
12284 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12286 * proc-service.c (ps_lgetregs): Formatting.
12288 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12290 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12291 * configure.ac: Adjust.
12292 * linux-low.h (struct process_info_private): Move members to struct
12294 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12295 * linux-low.c (linux_remove_process): Adjust.
12296 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12297 * server.c (handle_query): Move code ...
12298 (handle_monitor_command): ... here. New function.
12299 * target.h (struct target_ops): New member.
12300 * thread-db.c (struct thread_db): New.
12301 (libthread_db_search_path): New variable.
12302 (thread_db_create_event, thread_db_enable_reporting)
12303 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12304 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12305 (try_thread_db_load_1, dladdr_to_soname): New functions.
12306 (try_thread_db_load, thread_db_load_search): New functions.
12307 (thread_db_init): Search for libthread_db.
12308 (thread_db_free): New function.
12309 (thread_db_handle_monitor_command): Likewise.
12310 * config.in: Regenerate.
12311 * configure: Regenerate.
12313 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12315 * spu-low.c (spu_kill): Wait for inferior to terminate.
12316 Call clear_inferiors.
12317 (spu_detach): Call clear_inferiors.
12319 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12321 * aclocal.m4: Regenerate.
12322 * config.in: Likewise.
12323 * configure: Likewise.
12325 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12327 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12328 (parse_spufs_run): New function.
12329 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12330 (ppc_breakpoint_at): Handle SPU breakpoints.
12332 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12334 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12335 (SPUFS_MAGIC): Define.
12336 (spu_enumerate_spu_ids): New function.
12337 (linux_qxfer_spu): New function.
12338 (linux_target_ops): Install linux_qxfer_spu.
12340 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12342 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12343 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12344 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12345 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12346 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12347 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12348 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12349 (init_registers_powerpc_cell32l): Add prototype.
12350 (init_registers_powerpc_cell64l): Likewise.
12351 (ppc_arch_setup): Detect Cell/B.E. architecture.
12353 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12355 * Makefile.in (datarootdir): New variable.
12357 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12359 * linux-low.c (linux_write_memory): Update debugging output.
12360 * Makefile.in (clean): Add new descriptions.
12361 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12362 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12363 * configure.srv: Add new files for arm*-*-linux*.
12364 * linux-arm-low.c: Add new declarations.
12365 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12366 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12367 (HWCAP_VFPv3D16): New.
12368 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12369 instead of __IWMMXT__.
12370 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12371 (arm_arch_setup): New.
12372 (target_regsets): Remove #ifdef. Add VFP regset.
12373 (the_low_target): Use arm_arch_setup.
12375 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12377 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12378 the main thread again.
12380 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12382 Adding Neutrino gdbserver.
12383 * configure: Regenerated.
12384 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12385 * configure.srv (i[34567]86-*-nto*): New target.
12386 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12387 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12388 (nto_comctrl) [__QNX__]: New function.
12389 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12391 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12393 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12396 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12397 Pedro Alves <pedro@codesourcery.com>
12399 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12400 don't support CONTEXT_EXTENDED_REGISTERS.
12401 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12402 (the_low_target): Install them.
12403 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12404 failing with ERROR_PIPE_NOT_CONNECTED.
12406 2009-06-30 Doug Evans <dje@google.com>
12407 Pierre Muller <muller@ics.u-strasbg.fr>
12409 Add h/w watchpoint support to x86-linux, win32-i386.
12410 * Makefile.in (SFILES): Add i386-low.c
12411 (i386_low_h): Define.
12412 (i386-low.o): Add dependencies.
12413 (linux-x86-low.o): Add i386-low.h dependency.
12414 (win32-i386-low.o): Ditto.
12415 * i386-low.c: New file.
12416 * i386-low.h: New file.
12417 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12418 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12419 * linux-low.c (linux_add_process): Initialize arch_private.
12420 (linux_remove_process): Free arch_private.
12421 (add_lwp): Initialize arch_private.
12422 (delete_lwp): Free arch_private.
12423 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12425 * linux-low.h (process_info_private): New member arch_private.
12426 (lwp_info): New member arch_private.
12427 (linux_target_ops): New members new_process, new_thread,
12429 (ptid_of): New macro.
12430 * linux-x86-low.c: Include stddef.h, i386-low.h.
12431 (arch_process_info): New struct.
12432 (arch_lwp_info): New struct.
12433 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12434 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12435 (i386_dr_low_get_status): New function.
12436 (x86_insert_point, x86_remove_point): New functions.
12437 (x86_stopped_by_watchpoint): New function.
12438 (x86_stopped_data_address): New function.
12439 (x86_linux_new_process, x86_linux_new_thread): New functions.
12440 (x86_linux_prepare_to_resume): New function.
12441 (the_low_target): Add entries for insert_point, remove_point,
12442 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12444 * server.c (debug_hw_points): New global.
12445 (monitor_show_help): Document set debug-hw-points.
12446 (handle_query): Process "set debug-hw-points".
12447 * server.h (debug_hw_points): Declare.
12448 (paddress): Declare.
12449 * utils.c (NUMCELLS, CELLSIZE): New macros.
12450 (get_sell, xsnprintf, paddress): New functions.
12451 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12452 remove_point, stopped_by_watchpoint, stopped_data_address.
12453 * win32-i386-low.c: Include i386-low.h.
12454 (debug_reg_state): Replaces dr.
12455 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12456 (i386_dr_low_get_status): New function.
12457 (i386_insert_point, i386_remove_point): New functions.
12458 (i386_stopped_by_watchpoint): New function.
12459 (i386_stopped_data_address): New function.
12460 (i386_initial_stuff): Update.
12461 (get_thread_context,set_thread_context,i386_thread_added): Update.
12462 (the_low_target): Add entries for insert_point,
12463 remove_point, stopped_by_watchpoint, stopped_data_address.
12464 * win32-low.c (win32_insert_watchpoint): New function.
12465 (win32_remove_watchpoint): New function.
12466 (win32_stopped_by_watchpoint): New function.
12467 (win32_stopped_data_address): New function.
12468 (win32_target_ops): Add entries for insert_watchpoint,
12469 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12470 * win32-low.h (win32_target_ops): New members insert_point,
12471 remove_point, stopped_by_watchpoint, stopped_data_address.
12473 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12475 * server.c (process_serial_event): Re-return unsupported, not
12476 error, if the type isn't recognized. Re-allow supporting only
12477 insert or remove packets. Also call require_running for
12478 breakpoints. Add missing break statement to default case. Tidy.
12479 * target.h (struct target_ops): Rename insert_watchpoint to
12480 insert_point, and remove_watchpoint to remove_point.
12482 * linux-low.h (struct linux_target_ops): Likewise.
12483 * linux-low.c (linux_insert_watchpoint): Rename to ...
12484 (linux_insert_point): ... this. Adjust.
12485 (linux_remove_watchpoint): Rename to ...
12486 (linux_remove_point): ... this. Adjust.
12487 (linux_target_ops): Adjust.
12488 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12489 (cris_insert_point): ... this.
12490 (cris_remove_watchpoint): Rename to ...
12491 (cris_remove_point): ... this.
12492 (the_low_target): Adjust.
12494 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12496 * server.c (handle_v_kill): Pass signal_pid to
12497 kill_inferior if multi_process is zero.
12499 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12501 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12502 * target.h (target_ops): Comment for *_watchpoint to make it clear
12503 the functions can get types '0' and '1'.
12505 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12507 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12508 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12509 * regcache.c (get_regcache): Likewise.
12510 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12511 * win32-low.c (child_fetch_inferior_registers): Remove check for
12514 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12515 Pedro Alves <pedro@codesourcery.com>
12517 * target.h (struct target_ops) <supports_multi_process>: New
12519 (target_supports_multi_process): New.
12520 * server.c (handle_query): Even if GDB reports support, only
12521 enable multi-process if the target also supports it. Report
12522 multi-process support only if the target backend supports it.
12523 * linux-low.c (linux_supports_multi_process): New function.
12524 (linux_target_ops): Install it as target_supports_multi_process
12527 2009-05-24 Doug Evans <dje@google.com>
12529 Global renaming of find_thread_pid to find_thread_ptid.
12530 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12531 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12532 All callers updated.
12534 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12535 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12538 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12539 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12540 (linux_resume_one_lwp): Ditto.
12542 2009-05-23 Doug Evans <dje@google.com>
12544 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12545 from struct inferior_list_entry * to struct lwp_info *.
12546 All callers updated.
12548 2009-05-13 Doug Evans <dje@google.com>
12550 * linux-x86-low.c: Don't include assert.h.
12551 (x86_siginfo_fixup): Use fatal, not assert.
12552 (x86_arch_setup): Fix comment.
12554 2009-05-12 Doug Evans <dje@google.com>
12556 Biarch support for i386/amd64 gdbserver.
12557 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12558 Add linux-x86-low.c.
12559 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12560 (linux-x86-low.o): Add.
12561 * linux-x86-64-low.c: Delete.
12562 * linux-i386-low.c: Delete.
12563 * linux-x86-low.c: New file.
12564 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12566 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12568 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12569 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12570 (linux_child_pid_to_exec_file): New function.
12571 (elf_64_header_p, elf_64_file_p): New functions.
12572 (siginfo_fixup): New function.
12573 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12574 give target a chance to convert layout.
12575 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12576 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12578 2009-05-07 Doug Evans <dje@google.com>
12580 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12581 (regsets_store_inferior_registers): Ditto.
12583 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12587 * linux-low.c (must_set_ptrace_flags): Delete.
12588 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12590 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12591 `lwp->must_set_ptrace_flags' instead.
12592 (linux_wait_for_event_1): Set ptrace options here.
12593 (linux_wait_1): ... not here.
12595 2009-04-30 Doug Evans <dje@google.com>
12597 * inferiors.c (started_inferior_callback): New function.
12598 (attached_inferior_callback): New function.
12599 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12600 * server.c (print_started_pid, print_attached_pid): New functions.
12601 (detach_or_kill_for_exit): New function.
12602 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12603 * server.h (have_started_inferiors_p): Declare.
12604 (have_attached_inferiors_p): Declare.
12606 * inferiors.c (remove_process): Fix memory leak, free process.
12607 * linux-low.c (linux_remove_process): New function.
12608 (linux_kill): Call it instead of remove_process.
12609 (linux_detach, linux_wait_1): Ditto.
12611 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12613 * configure.srv: Add x86 Windows CE target.
12615 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12617 * inferiors.c (get_thread_process): Make global.
12618 * server.h (get_thread_process): Add prototype.
12619 * thread-db.c (find_one_thread): Use get_thread_process
12620 instead of current_process.
12621 (thread_db_get_tls_address): Do not crash if called when
12622 thread layer is not yet initialized.
12624 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12626 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12627 * spu-low.c (current_tid): Rename to ...
12628 (current_ptid): ... this.
12629 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12630 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12631 ptid_get_lwp (current_ptid) instead of current_tid.
12632 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12633 instead of current_tid. Use find_process_pid to verify pid
12634 argument is valid. Pass proper argument to remove_process.
12635 (spu_thread_alive): Compare current_ptid instead of current_tid.
12636 (spu_resume): Likewise.
12638 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12640 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12643 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12645 Implement the multiprocess extensions, and add linux multiprocess
12648 * server.h (ULONGEST): Declare.
12649 (struct ptid, ptid_t): New.
12650 (minus_one_ptid, null_ptid): Declare.
12651 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12652 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12653 (struct inferior_list_entry): Change `id' type from unsigned from
12655 (struct sym_cache, struct breakpoint, struct
12656 process_info_private): Forward declare.
12657 (struct process_info): Declare.
12658 (current_process): Declare.
12659 (all_processes): Declare.
12660 (initialize_inferiors): Declare.
12661 (add_thread): Adjust to use ptid_t.
12662 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12663 (add_process, remove_process, find_thread_pid): Declare.
12664 (find_inferior_id): Adjust to use ptid_t.
12665 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12666 (multi_process): Declare.
12667 (push_event): Adjust to use ptid_t.
12668 (read_ptid, write_ptid): Declare.
12669 (prepare_resume_reply): Adjust to use ptid_t.
12670 (clear_symbol_cache): Declare.
12671 * inferiors.c (all_processes): New.
12672 (null_ptid, minus_one_ptid): New.
12673 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12674 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12675 (add_thread): Change unsigned long to ptid. Remove gdb_id
12677 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12678 (gdb_id_to_thread): Rename to ...
12679 (find_thread_pid): ... this. Change unsigned long to ptid.
12680 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12681 (loaded_dll, pull_pid_from_list): Adjust.
12682 (add_process, remove_process, find_process_pid)
12683 (get_thread_process, current_process, initialize_inferiors): New.
12684 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12685 (struct target_waitstatus) <related_pid>: Ditto.
12686 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12687 return type to int.
12688 (struct target_ops) <join>: Add `pid' argument.
12689 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12690 (struct target_ops) <wait>: Add `ptid' field. Change return type
12692 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12693 (mywait): Add `ptid' argument. Change return type to ptid_t.
12694 (target_pid_to_str): Declare.
12695 * target.c (set_desired_inferior): Adjust to use ptids.
12696 (mywait): Add new `ptid' argument. Adjust.
12697 (target_pid_to_str): New.
12698 * mem-break.h (free_all_breakpoints): Declare.
12699 * mem-break.c (breakpoints): Delelete.
12700 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12701 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12702 to use per-process breakpoint list.
12703 (free_all_breakpoints): New.
12704 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12705 (symbol_cache, all_symbols_looked_up): Delete.
12707 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12709 (prepare_resume_reply): Change ptid argument's type from unsigned
12710 long to ptid_t. Adjust. Implement W;process and X;process.
12711 (free_sym_cache, clear_symbol_cache): New.
12712 (look_up_one_symbol): Adjust to per-process symbol cache. *
12713 * server.c (cont_thread, general_thread, step_thread): Change type
12715 (attached): Delete.
12716 (multi_process): New.
12717 (last_ptid): Change type to ptid_t.
12718 (struct vstop_notif) <ptid>: Change type to ptid_t.
12719 (queue_stop_reply, push_event): Change `ptid' argument's type to
12721 (discard_queued_stop_replies): Add `pid' argument.
12722 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12723 changes. Don't reference the `attached' global.
12724 (attach_inferior): Adjust to mywait interface changes.
12725 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12726 features. Handle and report "multiprocess+". Handle
12728 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12730 (handle_v_kill): New.
12731 (handle_v_stopped): Adjust to use target_pid_to_str.
12732 (handle_v_requests): Allow multiple attaches and runs when
12733 multiprocess extensions are in effect. Handle "vKill".
12734 (myresume): Adjust to use ptids.
12735 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12736 (handle_status): Adjust to discard_queued_stop_replies interface
12738 (first_thread_of, kill_inferior_callback)
12739 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12740 (main): Call initialize_inferiors. Adjust to use ptids, killing
12741 and detaching from all inferiors. Handle multiprocess packet
12743 * linux-low.h: Include gdb_proc_service.h.
12744 (struct process_info_private): New.
12745 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12746 <lwpid_of>: Use ptid_get_lwp.
12747 (get_lwp_thread): Adjust.
12748 (struct lwp_info): Add `dead' member.
12749 (find_lwp_pid): Declare.
12750 * linux-low.c (thread_db_active): Delete.
12751 (new_inferior): Adjust comment.
12752 (inferior_pid): Delete.
12753 (linux_add_process): New.
12754 (handle_extended_wait): Adjust.
12755 (add_lwp): Change unsigned long to ptid.
12756 (linux_create_inferior): Add process to processes table. Adjust
12757 to use ptids. Don't set new_inferior here.
12758 (linux_attach_lwp): Rename to ...
12759 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12760 it. Adjust to use ptids.
12761 (linux_attach_lwp): New.
12762 (linux_attach): Add process to processes table. Don't set
12764 (struct counter): New.
12765 (second_thread_of_pid_p, last_thread_of_process_p): New.
12766 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12767 multiple processes.
12768 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12769 processes. Remove process from process table.
12770 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12771 to multiple processes.
12772 (any_thread_of): New.
12773 (linux_detach): Add `pid' argument, and handle it. Remove process
12774 from processes table.
12775 (linux_join): Add `pid' argument. Handle it.
12776 (linux_thread_alive): Change unsighed long argument to ptid_t.
12777 Consider dead lwps as not being alive.
12778 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12779 threads we're not interested in.
12780 (same_lwp, find_lwp_pid): New.
12781 (linux_wait_for_lwp): Change `pid' argument's type from int to
12783 (linux_wait_for_event): Rename to ...
12784 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12785 from int to ptid_t. Adjust.
12786 (linux_wait_for_event): New.
12787 (linux_wait_1): Add `ptid' argument. Change return type to
12788 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12789 that exit from the process table.
12790 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12792 (mark_lwp_dead): New.
12793 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12794 stopping all threads, mark its main lwp as dead.
12795 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12797 (fetch_register, usr_store_inferior_registers)
12798 (regsets_fetch_inferior_registers)
12799 (regsets_store_inferior_registers, linux_read_memory)
12800 (linux_write_memory): Inline `inferior_pid'.
12801 (linux_look_up_symbols): Adjust to use per-process
12802 `thread_db_active'.
12803 (linux_request_interrupt): Adjust to use ptids.
12804 (linux_read_auxv): Inline `inferior_pid'.
12805 (initialize_low): Don't reference thread_db_active.
12806 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12807 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12808 (ps_getpid): Return the pid of the current inferior.
12809 * thread-db.c (proc_handle, thread_agent): Delete.
12810 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12812 (find_one_thread): Change argument type to ptid_t. Adjust to
12814 (maybe_attach_thread): Adjust to per-process data and ptids.
12815 (thread_db_find_new_threads): Ditto.
12816 (thread_db_init): Ditto.
12817 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12818 processes table. Adjust to use ptids.
12819 (spu_kill, spu_detach): Adjust interface. Remove process from
12821 (spu_join, spu_thread_alive): Adjust interface.
12822 (spu_wait): Adjust interface. Remove process from processes
12823 table. Adjust to use ptids.
12824 * win32-low.c (current_inferior_tid): Delete.
12825 (current_inferior_ptid): New.
12826 (debug_event_ptid): New.
12827 (thread_rec): Take a ptid. Adjust.
12828 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12829 (child_delete_thread): Ditto.
12830 (do_initial_child_stuff): Add `attached' argument. Add process to
12832 (child_fetch_inferior_registers, child_store_inferior_registers):
12834 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12835 (win32_attach): Pass 1 to do_initial_child_stuff.
12836 (win32_kill): Adjust interface. Remove process from processes
12838 (win32_detach): Ditto.
12839 (win32_join): Adjust interface.
12840 (win32_thread_alive): Take a ptid.
12841 (win32_resume): Adjust to use ptids.
12842 (get_child_debug_event): Ditto.
12843 (win32_wait): Adjust interface. Remove exiting process from
12846 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12848 Non-stop mode support.
12850 * server.h (non_stop): Declare.
12851 (gdb_client_data, handler_func): Declare.
12852 (delete_file_handler, add_file_handler, start_event_loop):
12854 (handle_serial_event, handle_target_event, push_event)
12855 (putpkt_notif): Declare.
12856 * target.h (enum resume_kind): New.
12857 (struct thread_resume): Replace `step' field by `kind' field.
12858 (TARGET_WNOHANG): Define.
12859 (struct target_ops) <wait>: Add `options' argument.
12860 <supports_non_stop, async, start_non_stop>: New fields.
12861 (target_supports_non_stop, target_async): New.
12862 (start_non_stop): Declare.
12863 (mywait): Add `options' argument.
12864 * target.c (mywait): Add `options' argument. Print child exit
12865 notifications here.
12866 (start_non_stop): New.
12867 * server.c (non_stop, own_buf, mem_buf): New globals.
12868 (struct vstop_notif): New.
12869 (notif_queue): New global.
12870 (queue_stop_reply, push_event, discard_queued_stop_replies)
12871 (send_next_stop_reply): New.
12872 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12874 (attach_inferior): In non-stop mode, don't wait for the target
12876 (handle_general_set): Handle QNonStop.
12877 (handle_query): When handling qC, return the current general
12878 thread, instead of the first thread of the list.
12879 (handle_query): If the backend supports non-stop mode, include
12880 QNonStop+ in the qSupported query response.
12881 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12883 (handle_v_attach, handle_v_run): Handle non-stop mode.
12884 (handle_v_stopped): New.
12885 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12886 (myresume): Adjust to use resume_kind. Handle non-stop.
12887 (queue_stop_reply_callback): New.
12888 (handle_status): Handle non-stop mode.
12889 (main): Clear non_stop flag on reconnection. Use the event-loop.
12890 Refactor serial protocol handling from here ...
12891 (process_serial_event): ... to this new function. When GDB
12892 selects any thread, select one here. In non-stop mode, wait until
12893 GDB acks all pending events before exiting.
12894 (handle_serial_event, handle_target_event): New.
12895 * remote-utils.c (remote_open): Install remote_desc in the event
12897 (remote_close): Remove remote_desc from the event loop.
12898 (putpkt_binary): Rename to...
12899 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12900 (putpkt_binary): New as wrapper around putpkt_binary_1.
12901 (putpkt_notif): New.
12902 (prepare_resume_reply): In non-stop mode, don't change the
12904 * event-loop.c: New.
12905 * Makefile.in (OBJ): Add event-loop.o.
12906 (event-loop.o): New rule.
12908 * linux-low.h (pid_of): Moved here.
12910 (get_lwp_thread): Use lwpid_of.
12911 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12912 * linux-low.c (pid_of): Delete.
12913 (inferior_pid): Use lwpid_of.
12914 (linux_event_pipe): New.
12915 (target_is_async_p): New.
12917 (handle_extended_wait): Use lwpid_of.
12918 (add_lwp): Don't set lwpid field.
12919 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12920 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12921 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12922 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12923 first. Adjust to linux_wait_for_event interface changes. Use
12925 (linux_detach): Don't delete the main lwp here.
12926 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12927 (status_pending_p): Don't consider explicitly suspended lwps.
12928 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12929 pointer. Add OPTIONS argument. Change return type to int. Use
12930 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12931 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12932 pointer. Add status pointer argument. Return a pid instead of a
12933 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12934 changes. In non-stop mode, don't switch to a random thread.
12935 (linux_wait): Rename to...
12936 (linux_wait_1): ... this. Add target_options argument, and handle
12937 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12938 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12939 clean exit and signal exit code. Don't stop all threads in
12940 non-stop mode. In all-stop mode, only stop all threads when
12941 reporting a stop to GDB. Handle explicit thread stop requests.
12942 (async_file_flush, async_file_mark): New.
12944 (send_sigstop): Use lwpid_of.
12945 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12946 interface changes. In non-stop mode, don't switch to a random
12948 (linux_resume_one_lwp): Use lwpid_of.
12949 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12950 (linux_resume_one_thread): ... this. Handle resume_stop. In
12951 non-stop mode, don't look for pending flag in all threads.
12952 (resume_status_pending_p): Don't consider explicitly suspended
12954 (my_waitpid): Reimplement. Emulate __WALL.
12955 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12957 (sigchld_handler, linux_supports_non_stop, linux_async)
12958 (linux_start_non_stop): New.
12959 (linux_target_ops): Register linux_supports_non_stop, linux_async
12960 and linux_start_non_stop.
12961 (initialize_low): Install SIGCHLD handler.
12962 * thread-db.c (thread_db_create_event, find_one_thread)
12963 (thread_db_get_tls_address): Use lwpid_of.
12964 * win32-low.c (win32_detach): Adjust to use resume_kind.
12965 (win32_wait): Add `options' argument.
12966 * spu-low.c (spu_resume): Adjust to use resume_kind.
12967 (spu_wait): Add `options' argument.
12969 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12971 Decouple target code from remote protocol.
12973 * target.h (enum target_waitkind): New.
12974 (struct target_waitstatus): New.
12975 (struct target_ops) <wait>: Return an unsigned long. Take a
12976 target_waitstatus pointer instead of a char pointer.
12977 (mywait): Likewise.
12978 * target.c (mywait): Change prototype to return an unsigned long.
12979 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12980 * server.h (thread_from_wait, old_thread_from_wait): Delete
12982 (prepare_resume_reply): Change prototype to take a
12984 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12985 (last_status, last_ptid): New.
12986 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12987 pid instead of a signal.
12988 (attach_inferior): Remove "status" and "signal" parameters.
12990 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12992 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12993 (handle_v_requests, myresume): Remove "status" and "signal"
12994 parameters. Adjust.
12995 (handle_status): New.
12996 (main): Delete local `status'. Adjust.
12997 * remote-utils.c: Include target.h.
12998 (prepare_resume_reply): Change prototype to take a
12999 target_waitstatus. Adjust.
13001 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13003 * spu-low.c (spu_wait): Adjust.
13004 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13006 (win32_wait): Adjust.
13008 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13010 * target.h (struct thread_resume): Delete leave_stopped member.
13011 (struct target_ops): Add a `n' argument to the `resume' callback.
13012 * server.c (start_inferior): Adjust.
13013 (handle_v_cont, myresume): Adjust.
13014 * linux-low.c (check_removed_breakpoint): Adjust to resume
13015 interface change, and to removed leave_stopped field.
13016 (resume_ptr): Delete.
13017 (struct thread_resume_array): New.
13018 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13019 resume interface change.
13020 (linux_continue_one_thread, linux_queue_one_thread)
13021 (resume_status_pending_p): Check if the resume field is NULL
13022 instead of checking the leave_stopped member.
13023 (linux_resume): Adjust to the target resume interface change.
13024 * spu-low.c (spu_resume): Adjust to the target resume interface
13026 * win32-low.c (win32_detach, win32_resume): Ditto.
13028 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13030 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13032 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13034 (linux_continue_one_thread): Only preserve the stepping flag if
13035 there's a pending breakpoint.
13037 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13039 * server.c (main): After the inferior having exited, call
13040 remote_close before exiting gdbserver.
13042 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13044 Fix size of FPSCR in Power 7 processors.
13045 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13046 (PPC_FEATURE_HAS_DFP): New #define.
13047 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13050 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13052 * server.c (handle_query) Whitespace and formatting.
13054 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13056 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13057 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13058 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13059 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13060 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13061 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13062 Makefile.in, configure.ac: Fix whitespace throughout.
13063 * configure: Regenerate.
13065 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13067 * inferiors.c (find_inferior): Make it safe for the callback
13068 function to delete the currently iterated inferior.
13070 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13072 * Makefile.in (linuw_low_h): Move higher.
13073 (thread-db.o): Depend on $(linux_low_h).
13075 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13077 Rename "process" to "lwp" throughout.
13079 * linux-low.c (all_processes): Rename to...
13080 (all_lwps): ... this.
13081 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13082 (add_process): Rename to ...
13083 (add_lwp): ... this. Adjust.
13084 (linux_create_inferior): Adjust.
13085 (linux_attach_lwp): Adjust.
13086 (linux_attach): Adjust.
13087 (linux_kill_one_process): Rename to ...
13088 (linux_kill_one_lwp): ... this. Adjust.
13089 (linux_kill): Adjust.
13090 (linux_detach_one_process): Rename to ...
13091 (linux_detach_one_lwp): ... this. Adjust.
13092 (linux_detach): Adjust.
13093 (check_removed_breakpoint): Adjust.
13094 (status_pending_p): Adjust.
13095 (linux_wait_for_process): Rename to ...
13096 (linux_wait_for_lwp): ... this. Adjust.
13097 (linux_wait_for_event): Adjust.
13098 (send_sigstop): Adjust.
13099 (wait_for_sigstop): Adjust.
13100 (stop_all_processes): Rename to ...
13101 (stop_all_lwps): ... this.
13102 (linux_resume_one_process): Rename to ...
13103 (linux_resume_one_lwp): ... this. Adjust.
13104 (linux_set_resume_request, linux_continue_one_thread)
13105 (linux_queue_one_thread, resume_status_pending_p)
13106 (usr_store_inferior_registers, regsets_store_inferior_registers)
13107 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13109 * linux-low.h (get_process): Rename to ...
13110 (get_lwp): ... this. Adjust.
13111 (get_thread_process): Rename to ...
13112 (get_thread_lwp): ... this. Adjust.
13113 (get_process_thread): Rename to ...
13114 (get_lwp_thread): ... this. Adjust.
13115 (struct process_info): Rename to ...
13116 (struct lwp_info): ... this.
13117 (all_processes): Rename to ...
13118 (all_lwps): ... this.
13119 * proc-service.c (ps_lgetregs): Adjust.
13120 * thread-db.c (thread_db_create_event, find_one_thread)
13121 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13123 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13125 * server.c (handle_query): Handle "qAttached".
13127 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13129 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13130 GPLv3, update license URL.
13132 2009-03-01 Doug Evans <dje@google.com>
13134 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13135 (server_h): Add gdb_signals.h.
13136 (signals.o): Update.
13137 * server.h (target_signal_from_host,target_signal_to_host_p)
13138 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13140 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13142 * remote-utils.c (getpkt): Also generate remote-debug
13143 information if noack_mode is set.
13145 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13147 * server.c (handle_query): Report qXfer:siginfo:read and
13148 qXfer:siginfo:write as supported and handle them.
13149 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13150 * linux-low.c (linux_xfer_siginfo): New.
13151 (linux_target_ops): Set it.
13153 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13155 * server.c (gdbserver_usage): Mention --remote-debug.
13156 (main): Accept '--remote-debug' switch.
13158 2009-01-18 Doug Evans <dje@google.com>
13160 * regcache.c (new_register_cache): No need to check result of xcalloc.
13161 * server.c (handle_search_memory): Back out calls to xmalloc,
13162 result is checked and error is returned to user upon failure.
13163 (handle_query): Ditto. Add more checks for result of malloc.
13164 (handle_v_cont): Check result of malloc, report error back to
13166 (handle_v_run): Ditto. Call freeargv.
13167 * server.h (freeargv): Declare.
13168 * utils.c (freeargv): New fn.
13170 2009-01-15 Doug Evans <dje@google.com>
13172 * gdbreplay.c (perror_with_name): Make arg const char *.
13173 * server.h (target_signal_to_name): Make return type const char *.
13174 * thread-db.c (thread_db_err_str): Make return type const char *.
13175 * utils.c (perror_with_name): Make arg const char *.
13177 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13179 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13180 when handling a EXIT_PROCESS_DEBUG_EVENT.
13182 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13184 * gdbreplay.c (gdbreplay_version): Update copyright year.
13185 * server.c (gdbserver_version): Likewise.
13187 2009-01-05 Doug Evans <dje@google.com>
13189 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13190 (handle_extended_wait): Improve comment.
13192 2008-12-13 Doug Evans <dje@google.com>
13194 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13195 * server.h (ATTR_MALLOC): New macro.
13196 (xmalloc,xcalloc,xstrdup): Declare.
13197 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13198 * inferiors.c: Ditto.
13199 * linux-low.c: Ditto.
13200 * mem-break.c: Ditto.
13201 * regcache.c: Ditto.
13202 * remote-utils.c: Ditto.
13205 * win32-low.c: Ditto.
13207 2008-12-12 Doug Evans <dje@google.com>
13209 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13210 in debugging printf.
13212 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13214 2008-12-09 Doug Evans <dje@google.com>
13216 * linux-low.h (struct process_info): Delete member tid, unused.
13217 * thread-db.c (find_one_thread): Update.
13218 (maybe_attach_thread): Update.
13220 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13222 * target.h (struct target_ops): Add qxfer_osdata member.
13223 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13225 (linux_qxfer_osdata): New functions.
13226 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13228 * server.c (handle_query): Handle "qXfer:osdata:read:".
13229 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13230 (buffer_xml_printf): New functions.
13231 * server.h (struct buffer): New.
13232 (buffer_grow_str, buffer_grow_str0): New macros.
13233 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13234 (buffer_xml_printf): Declare.
13236 2008-11-24 Doug Evans <dje@google.com>
13238 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13240 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13242 * server.c (handle_v_run): Always use the supplied argument list.
13244 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13246 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13247 (xtensa_regmap_table): Add entry for scompare1.
13249 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13251 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13252 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13253 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13254 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13255 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13256 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13257 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13258 XML target descriptions.
13259 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13260 when inferior is running on an ISA 2.05 or later processor. Add
13261 special case to return offset for full 64-bit slot of FPSCR when
13264 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13266 * Makefile.in (SFILES, clean): Added sparc64 files.
13267 (reg-sparc64.o, reg-sparc64.c): New.
13268 * configure.srv (sparc*-*-linux*): New configuration.
13269 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13270 syscall arguments for SPARC.
13271 (regsets_store_inferior_registers): Likewise.
13272 * linux-sparc-low.c: New file.
13274 2008-10-21 Doug Evans <dje@google.com>
13276 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13277 (READLINE_DIR,READLINE_DEP): Delete.
13278 (INTERNAL_CFLAGS): Update.
13279 (LINTFLAGS): Update.
13281 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13283 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13284 whole argv from the last run, not just argv[0].
13286 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13288 * regcache.c (new_register_cache): Return NULL if the register
13289 cache size isn't known yet.
13290 (free_register_cache): Avoid dereferencing a NULL regcache.
13292 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13294 * configure.srv: Merge MIPS and MIPS64.
13296 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13298 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13300 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13302 * Makefile.in: Add required vsx dependencies.
13304 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13305 Declare init_registers_powerpc_vsx32l.
13306 Declare init_registers_powerpc_vsx64l.
13307 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13308 (ppc_arch_setup): Check for VSX in hwcap.
13309 (ppc_fill_vsxregset): New function.
13310 (ppc_store_vsxregset): New function.
13311 Add new VSX entry in regset_info target_regsets.
13313 * configure.srv: Add new VSX dependencies.
13315 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13317 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13318 (remote_open): Set or clear transport_is_reliable.
13319 (putpkt_binary): Don't expect acks in noack mode.
13320 (getpkt): Don't send ack/nac in noack mode.
13321 * server.c (handle_general_set): Handle QStartNoAckMode.
13322 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13324 (main): Reset noack_mode on every connection.
13325 * server.h (noack_mode): Declare.
13327 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13329 * Makefile.in (GDBREPLAY_OBS): New variable.
13330 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13332 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13333 Daniel Jacobowitz <dan@codesourcery.com>
13335 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13336 (usr_store_inferior_registers): Likewise.
13337 (regsets_store_inferior_registers): Likewise.
13339 2008-07-31 Rolf Jansen <rj@surtec.com>
13340 Pedro Alves <pedro@codesourcery.com>
13342 * configure.ac: Check for memmem declaration.
13343 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13344 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13345 (disable_packet_qfThreadInfo): Unconditionally compile.
13346 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13347 * configure, config.in: Regenerate.
13349 2008-07-28 Doug Kwan <dougkwan@google.com>
13351 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13352 (linux_write_memory): Remove declaration of errno.
13354 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13356 * linux-low.c (handle_extended_wait): Do not use "status"
13357 variable uninitialized.
13359 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13361 * server.c (handle_v_attach): Inhibit reporting dll changes.
13363 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13365 * remote-utils.c (prepare_resume_reply): If requested, don't
13366 output "thread:TID" in the T stop reply.
13368 * server.c (disable_packet_vCont, disable_packet_Tthread)
13369 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13370 (handle_query): If requested, disable support for qC, qfThreadInfo
13372 (handle_v_requests): If requested, disable support for vCont.
13373 (gdbserver_show_disableable): New.
13374 (main): Handle --disable-packet and --disable-packet=LIST.
13376 * server.h (disable_packet_vCont, disable_packet_Tthread)
13377 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13379 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13381 * server.c (gdbserver_usage): Mention --version.
13383 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13385 * Makefile.in (gdbreplay.o): New rule.
13387 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13389 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13390 message, not gdbserver.
13392 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13393 Nathan Sidwell <nathan@codesourcery.com>
13394 Joseph Myers <joseph@codesourcery.com>
13396 * acinclude.m4: Include ../../config/acx.m4.
13397 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13398 * configure, config.in: Regenerate.
13399 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13400 * server.c (gdbserver_version): Print PKGVERSION.
13401 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13402 (main): Adjust gdbserver_usage calls.
13403 * gdbreplay.c (version, host_name): Add declarations.
13404 (gdbreplay_version, gdbreplay_usage): New.
13405 (main): Accept --version and --help options.
13407 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13409 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13410 (arm_breakpoint_at): Handle Thumb.
13411 (the_low_target): Add comment.
13413 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13415 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13417 2008-05-09 Doug Evans <dje@google.com>
13419 * server.h (decode_search_memory_packet): Declare.
13420 * remote-utils.c (decode_search_memory_packet): New fn.
13421 * server.c (handle_search_memory_1): New fn.
13422 (handle_search_memory): New fn.
13423 (handle_query): Process qSearch:memory packets.
13425 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13427 * regcache.c (registers_length): Remove.
13428 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13429 full register packet.
13430 * regcache.h (registers_length): Remove prototype.
13431 * server.h (PBUFSIZ): Define to 16384.
13433 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13435 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13436 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13437 powerpc-64l.o, and powerpc-altivec64l.o.
13438 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13439 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13440 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13441 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13442 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13445 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13446 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13447 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13448 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13449 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13450 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13451 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13452 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13453 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13454 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13457 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13458 (init_registers_powerpc_32l): ... this new prototype.
13459 (init_registers_powerpc_32): Remove, replace by ...
13460 (init_registers_powerpc_altivec32l): ... this new prototype.
13461 (init_registers_powerpc_e500): Remove, replace by ...
13462 (init_registers_powerpc_e500l): ... this new prototype.
13463 (init_registers_ppc64): Remove, replace by ...
13464 (init_registers_powerpc_64l): ... this new prototype.
13465 (init_registers_powerpc_64): Remove, replace by ...
13466 (init_registers_powerpc_altivec64l): ... this new prototype.
13467 (ppc_num_regs): Set to 73.
13468 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13469 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13470 (ppc_cannot_store_register): Handle orig_r3 and trap.
13471 (ppc_arch_setup): Update init_registers_... calls.
13472 (ppc_fill_gregset): Handle orig_r3 and trap.
13474 * inferiors.c (clear_inferiors): Reset current_inferior.
13476 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13478 * acinclude.m4: Add override.m4.
13479 * configure: Regenerate.
13481 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13483 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13484 initial call to init_register_ppc64.
13486 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13488 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13489 single powerpc*-*-linux* case.
13490 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13492 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13494 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13495 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13497 * linux-ppc-low.c: Include <elf.h>.
13498 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13499 (ppc_hwcap): New global variable.
13500 (ppc_regmap): Remove __SPE__ #ifdef sections.
13501 (ppc_regmap_e500): New global variable.
13502 (ppc_cannot_store_register): Update __SPE__ special case.
13503 (ppc_get_hwcap): New function.
13504 (ppc_arch_setup): Use it to determine whether inferior supports
13505 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13506 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13507 Do not access registers if target does not support AltiVec.
13508 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13509 Do not access registers if target does not support SPE.
13510 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13512 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13514 * linux-low.c (disabled_regsets, num_regsets): New.
13515 (use_regsets_p): Delete.
13516 (linux_wait_for_process): Clear disabled_regsets.
13517 (regsets_fetch_inferior_registers): Check and set it.
13518 (regsets_store_inferior_registers): Likewise.
13519 (linux_fetch_registers, linux_store_registers): Do not use
13521 (initialize_low): Allocate disabled_regsets.
13523 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13525 * Makefile.in (LIBOBJS): New.
13526 (OBS): Use LIBOBJS.
13527 (memmem.o): New rule.
13528 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13529 * configure: Regenerated.
13531 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13533 * server.c (handle_query): Never return "unsupported" for
13534 qXfer:features:read queries.
13536 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13538 * server.c (get_features_xml): Fix inverted condition.
13539 (handle_query): Always support qXfer:feature:read.
13541 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13543 * server.c (wrapper_argv): New.
13544 (start_inferior): Handle wrapper_argv. If set, expect an extra
13546 (gdbserver_usage): Document --wrapper.
13547 (main): Parse --wrapper.
13549 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13551 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13552 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13553 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13554 (ppc_set_pc): Likewise.
13555 (ppc_arch_setup): New function.
13556 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13557 of collect_register.
13558 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13560 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13562 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13563 instead of linux-ppc64-low.o.
13564 * linux-ppc64-low.c: Remove file.
13565 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13566 (linux-ppc64-low.o): Remove rule.
13568 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13569 (init_registers_powerpc_64): Likewise.
13570 (ppc_regmap): Conditionally define depending on __powerpc64__.
13571 (ppc_cannot_store_register): Do not special-case "fpscr" when
13572 compiled on __powerpc64__.
13573 (ppc_collect_ptrace_register): New function.
13574 (ppc_supply_ptrace_register): New function.
13575 (ppc_breakpoint): Change type to "unsigned int".
13576 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13577 (the_low_target): Conditionally provide initializers for the
13578 arch_setup member depending on __powerpc64__. Install
13579 collect_ptrace_register and supply_ptrace_register members.
13581 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13583 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13584 * server.c (gdbserver_xmltarget): Define.
13585 (get_features_xml): Use it to replace "target.xml" and arch_string.
13587 * configure.srv: Remove srv_xmltarget. Add XML files that were
13588 mentioned there to srv_xmlfiles instead. Remove conditional tests
13589 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13590 srv_xmlfiles and srv_regobj to include all possible choices.
13591 * configure.ac (srv_xmltarget): Remove.
13592 (srv_xmlfiles): Do not add "target.xml".
13593 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13594 checks for supplementary target information.
13595 * configure: Regenerate.
13596 * Makefile.in (XML_TARGET): Remove.
13597 (target.xml): Remove rule.
13598 (clean): Do not clean up target.xml.
13599 (.PRECIOUS): Do not mention target.xml.
13601 * target.h (struct target_ops): Remove arch_string member.
13602 * linux-low.c (linux_arch_string): Remove.
13603 (linux_target_ops): Remove arch_string initializer.
13604 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13605 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13606 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13607 * spu-low.c (spu_arch_string): Remove.
13608 (spu_target_ops): Remove arch_string initializer.
13609 * win32-low.c (win32_arch_string): Remove.
13610 (win32_target_ops): Remove arch_string initializer.
13611 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13612 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13613 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13615 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13617 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13618 by collect_ptrace_register and supply_ptrace_register hooks.
13619 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13620 instead of checking for the_low_target.left_pad_xfer.
13621 (usr_store_inferior_registers): Use collect_ptrace_register callback
13622 instead of checking for the_low_target.left_pad_xfer.
13624 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13625 (s390_supply_ptrace_register): Likewise.
13626 (s390_fill_gregset): Call s390_collect_ptrace_register.
13627 (the_low_target): Update.
13629 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13630 (ppc_supply_ptrace_register): Likewise.
13631 (the_low_target): Update.
13633 * linux-i386-low.c (the_low_target): Update.
13634 * linux-x86-64-low.c (the_low_target): Update.
13636 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13638 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13639 reg-s390.o and reg-s390x.o.
13641 * linux-low.c (new_inferior): New global variable.
13642 (linux_create_inferior, linux_attach): Set it.
13643 (linux_wait_for_process): Call the_low_target.arch_setup after the
13644 target has stopped for the first time.
13645 (initialize_low): Do not call the_low_target.arch_setup.
13647 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13648 (s390_set_pc): Likewise.
13649 (s390_arch_setup): New function.
13650 (the_low_target): Use s390_arch_setup as arch_setup routine.
13652 * regcache.c (realloc_register_cache): New function.
13653 (set_register_cache): Call it for each existing regcache.
13655 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13657 * server.h (init_registers): Remove prototype.
13659 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13660 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13661 instead of init_registers ().
13662 * linux-arm-low.c (init_registers_arm): Add prototype.
13663 (init_registers_arm_with_iwmmxt): Likewise.
13664 (the_low_target): Add initializer for arch_setup field.
13665 * linux-cris-low.c (init_registers_cris): Add prototype.
13666 (the_low_target): Add initializer for arch_setup field.
13667 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13668 (the_low_target): Add initializer for arch_setup field.
13669 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13670 (the_low_target): Add initializer for arch_setup field.
13671 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13672 (the_low_target): Add initializer for arch_setup field.
13673 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13674 (the_low_target): Add initializer for arch_setup field.
13675 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13676 (the_low_target): Add initializer for arch_setup field.
13677 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13678 (init_registers_mips64_linux): Likewise.
13679 (the_low_target): Add initializer for arch_setup field.
13680 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13681 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13682 (the_low_target): Add initializer for arch_setup field.
13683 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13684 (init_registers_powerpc_64): Likewise.
13685 (the_low_target): Add initializer for arch_setup field.
13686 * linux-s390-low.c (init_registers_s390): Add prototype.
13687 (init_registers_s390x): Likewise.
13688 (the_low_target): Add initializer for arch_setup field.
13689 * linux-sh-low.c (init_registers_sh): Add prototype.
13690 (the_low_target): Add initializer for arch_setup field.
13691 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13692 (the_low_target): Add initializer for arch_setup field.
13693 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13694 (the_low_target): Add initializer for arch_setup field.
13696 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13697 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13698 instead of init_registers ().
13699 * win32-arm-low.c (init_registers_arm): Add prototype.
13700 (the_low_target): Add initializer for arch_setup field.
13701 * win32-i386-low.c (init_registers_i386): Add prototype.
13702 (the_low_target): Add initializer for arch_setup field.
13704 * spu-low.c (init_registers_spu): Add prototype.
13705 (initialize_low): Call initialie_registers_spu () instead of
13706 initialize_registers ().
13708 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13710 * server.c (handle_v_requests): When handling the vRun and vAttach
13711 packets, if already debugging a process, don't kill it. Return an
13714 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13716 * server.c (handle_query): Correct length check.
13718 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13720 * win32-low.c (do_initial_child_stuff): Add process handle
13721 parameter. Set current_process_handle and current_process_id from the
13722 parameters. Clear globals.
13723 (win32_create_inferior): Don't set current_process_handle and
13724 current_process_id here. Instead pass them on the call to
13725 do_initial_child_stuff.
13726 (win32_attach): Likewise.
13727 (win32_clear_inferiors): New.
13728 (win32_kill): Don't close the current process handle or the
13729 current thread handle here. Instead call win32_clear_inferiors.
13730 (win32_detach): Don't open a new handle to the process. Call
13731 win32_clear_inferiors.
13732 (win32_join): Don't rely on current_process_handle; open a new
13733 handle using the process id.
13734 (win32_wait): Call win32_clear_inferiors when the inferior process
13737 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13739 * server.c (monitor_show_help): Add "exit".
13741 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13743 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13744 (clean): Add reg-xtensa.c.
13745 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13746 * configure.srv (xtensa*-*-linux*) New target.
13747 * linux-xtensa-low.c: New.
13748 * xtensa-xtregs.c: New.
13750 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13752 * hostio.c: Don't include errno.h.
13753 (errno_to_fileio_errno): Move to hostio-errno.
13754 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13755 error number outputting to the target->hostio_last_error callback.
13756 (hostio_packet_error): Use FILEIO_EINVAL directly.
13757 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13758 calls to hostio_error.
13759 * hostio-errno.c: New.
13760 * server.h (hostio_last_error_from_errno): Declare.
13761 * target.h (target_ops): Add hostio_last_error member.
13762 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13763 as hostio_last_error handler.
13764 * spu-low.c (spu_target_ops): Likewise.
13765 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13766 (wince_hostio_last_error): New functions.
13767 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13768 as hostio_last_error handler.
13769 (win32_target_ops) [!_WIN32_WCE]: Register
13770 hostio_last_error_from_errno as hostio_last_error handler.
13771 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13772 (hostio-errno.o): New rule.
13773 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13774 * configure.srv (srv_hostio_err_objs): New variable. Default to
13776 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13777 * configure: Regenerate.
13779 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13781 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13782 (linux_kill, linux_detach): Clean up the process list.
13783 * remote-utils.c (remote_open): Improve port number parsing.
13784 (putpkt_binary, input_interrupt): Only send interrupts if the target
13786 * server.c (extended_protocol): Make static.
13787 (attached): Define earlier.
13788 (exit_requested, response_needed, program_argv): New variables.
13789 (target_running): New.
13790 (start_inferior): Clear attached here.
13791 (attach_inferior): Set attached here.
13792 (require_running): Define.
13793 (handle_query): Use require_running and target_running. Implement
13795 (handle_v_attach, handle_v_run): New.
13796 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13797 (gdbserver_usage): Update.
13798 (main): Redo argument parsing. Handle --debug and --multi. Handle
13799 --attach along with other options or after the port. Save
13800 program_argv. Support no initial program. Resynchronize
13801 communication with GDB after an error. Handle "monitor exit".
13802 Use require_running and target_running. Always allow the extended
13803 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13804 restart in extended mode.
13805 * README: Refer to the GDB manual. Update --attach usage.
13807 2007-12-20 Andreas Schwab <schwab@suse.de>
13809 * linux-low.c (STACK_SIZE): Define.
13810 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13811 (linux_test_for_tracefork): Likewise.
13813 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13815 * linux-low.c (linux_wait_for_event): Update messages. Do not
13816 reinsert auto-delete breakpoints.
13817 * mem-break.c (struct breakpoint): Change return type of handler to
13819 (set_breakpoint_at): Update handler type.
13820 (reinsert_breakpoint_handler): Return 1 instead of calling
13822 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13824 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13825 * mem-break.h (set_breakpoint_at): Update handler type.
13826 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13827 * win32-low.c (auto_delete_breakpoint): New.
13828 (get_child_debug_event): Use it.
13830 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13832 * configure.ac: Check for pread and pwrite.
13833 * hostio.c (handle_pread): Fall back to lseek and read.
13834 (handle_pwrite): Fall back to lseek and write.
13835 * config.in, configure: Regenerated.
13837 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13839 * server.c (myresume): Add own_buf argument.
13840 (main): Update calls.
13842 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13844 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13845 * remote-utils.c (remote_open): Do not call disable_async_io.
13846 (block_async_io): Delete.
13847 (unblock_async_io): Make static.
13848 (initialize_async_io): New.
13849 * server.c (handle_v_cont): Handle async I/O here.
13850 (myresume): Likewise. Move other common resume tasks here...
13851 (main): ... from here. Call initialize_async_io. Disable async
13852 I/O before the main loop.
13853 * server.h (initialize_async_io): Declare.
13854 (block_async_io, unblock_async_io): Delete prototypes.
13855 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13857 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13859 * remote-utils.c (readchar): Allow binary data in received messages.
13861 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13863 * win32-low.c (attaching): New global.
13864 (win32_create_inferior): Clear the `attaching' global.
13865 (win32_attach): Set the `attaching' global.
13866 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13867 attaching. Only set a breakpoint at the entry point if not
13870 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13872 * server.c (main): Don't report dll events on the initial
13873 connection on attaches.
13875 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13877 * server.c (main): Relax numerical bases supported for the pid of
13878 the --attach command line argument.
13880 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13882 * win32-low.c (win32_attach): Call OpenProcess before
13883 DebugActiveProcess, not after. Add last error output to error
13886 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13888 * win32-low.c (win32_get_thread_context)
13889 (win32_set_thread_context): New functions.
13890 (thread_rec): Use win32_get_thread_context.
13891 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13892 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13895 2007-12-03 Leo Zayas
13896 Pedro Alves <pedro_alves@portugalmail.pt>
13898 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13900 (child_add_thread): Minor cleanup.
13901 (child_continue): Resume artificially suspended threads before
13902 calling ContinueDebugEvent.
13903 (suspend_one_thread): New.
13904 (fake_breakpoint_event): New.
13905 (get_child_debug_event): Change return type to int. Check here if
13906 gdb sent an interrupt request. If a soft interrupt was requested,
13907 fake a breakpoint event. Return 0 if there is no event to handle,
13909 (win32_wait): Don't check here if gdb sent an interrupt request.
13910 Ensure there is a valid event to handle.
13911 (win32_request_interrupt): Add soft interruption method as last
13914 2007-12-03 Leo Zayas
13915 Pedro Alves <pedro_alves@portugalmail.pt>
13917 * win32-low.h (win32_thread_info): Add descriptions to the
13918 structure members. Replace `suspend_count' counter by a
13920 * win32-low.c (thread_rec): Update condition of when to get the
13921 context from the inferior. Rely on ContextFlags being set if it
13922 has already been retrieved. Only suspend the inferior thread if
13923 we haven't already. Warn if that fails.
13924 (continue_one_thread): s/suspend_count/suspended/. Only call
13925 ResumeThread once. Warn if that fails.
13927 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13929 * win32-low.c (win32_wait): Don't read from the inferior when it
13930 has already exited.
13932 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13934 * Makefile.in (win32_low_h): New variable.
13935 (win32-low.o): Add dependency on $(win32_low_h).
13936 (win32-arm-low.o, win32-i386-low.o): New rules.
13938 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13940 * hostio.c: Correct copyright year.
13942 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13944 * Makefile.in (OBS): Add hostio.o.
13945 (hostio.o): New rule.
13946 * server.h (handle_vFile): Declare.
13947 * hostio.c: New file.
13948 * server.c (handle_v_requests): Take packet_len and new_packet_len
13949 for binary packets. Call handle_vFile.
13950 (main): Update call to handle_v_requests.
13952 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13954 * linux-low.c: Include <sched.h>.
13956 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13958 * linux-low.c (linux_tracefork_grandchild): New.
13959 (linux_tracefork_child): Use clone.
13960 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13962 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13964 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13966 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13968 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13970 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13972 * inferiors.c (change_inferior_id): Delete.
13973 (add_pid_to_list, pull_pid_from_list): New.
13974 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13975 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13976 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13977 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13978 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13979 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13980 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13981 (using_threads): Always set to 1.
13982 (handle_extended_wait): New.
13983 (add_process): Do not set TID.
13984 (linux_create_inferior): Set must_set_ptrace_flags.
13985 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13986 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13987 (linux_thread_alive): Rename TID argument to LWPID.
13988 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13989 (linux_wait_for_event): Do not use TID or check using_threads. Update
13990 call to dead_thread_notify. Call handle_extended_wait.
13991 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13992 (send_sigstop): Delete sigstop_sent.
13993 (wait_for_sigstop): Avoid TID.
13994 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13995 (linux_test_for_tracefork): New.
13996 (linux_lookup_signals): Use thread_db_active and
13997 linux_supports_tracefork_flag.
13998 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13999 * linux-low.h (get_process_thread): Avoid TID.
14000 (struct process_ifo): Move thread_known and tid to the end. Remove
14002 (linux_attach_lwp, thread_db_init): Update prototypes.
14003 * server.h (change_inferior_id): Delete prototype.
14004 (add_pid_to_list, pull_pid_from_list): New prototypes.
14005 * thread-db.c (thread_db_use_events): New.
14006 (find_first_thread): Rename to...
14007 (find_one_thread): ...this. Update callers and messages. Do not
14008 call fatal. Check thread_db_use_events. Do not call
14009 change_inferior_id or new_thread_notify.
14010 (maybe_attach_thread): Update. Do not call new_thread_notify.
14011 (thread_db_init): Set thread_db_use_events. Check use_events.
14012 * utils.c (fatal, warning): Correct message prefix.
14014 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14016 * Makefile.in (clean): Remove new files.
14017 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14018 (powerpc-64.o, powerpc-64.c): New rules.
14019 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14020 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14022 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14024 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14025 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14026 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14027 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14028 (target_regsets): Add AltiVec and SPE register sets.
14029 * configure.ac: Check for AltiVec and SPE.
14030 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14031 (ppc_fill_vrregset, ppc_store_vrregset): New.
14032 (target_regsets): Add AltiVec register set.
14033 * configure: Regenerated.
14035 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14037 * linux-low.c (O_LARGEFILE): Define.
14038 (linux_read_memory): Use /proc/PID/mem.
14039 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14040 * configure, config.in: Regenerated.
14042 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14044 * linux-low.c (linux_wait_for_event): Do not pass signals while
14047 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14049 * win32-low.c (create_process): New.
14050 (win32_create_inferior): Use create_process instead of
14051 CreateProcess. If create_process failed retry appending an ".exe"
14052 suffix. Store the GetLastError result immediatelly after
14053 create_process calls and use it on the call to error.
14055 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14057 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14059 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14061 * configure.ac: Switch license to GPLv3.
14063 2007-08-01 Michael Snyder <msnyder@access-company.com>
14065 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14067 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14069 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14071 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14072 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14073 CloseToolhelp32Snapshot.
14074 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14075 CloseToolhelp32Snapshot.
14077 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14079 * server.c (main): Check for inferior exit before main loop.
14081 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14083 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14084 instead of on tmp_desc.
14086 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14087 Daniel Jacobowitz <dan@codesourcery.com>
14089 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14090 (add_thread): Minor cleanups.
14091 (clear_inferiors): Move lower in the file. Clear the DLL
14093 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14094 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14095 (xml_escape_text): New.
14096 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14098 (handle_v_cont): Report errors.
14099 (gdbserver_version): Update.
14100 (main): Correct size of own_buf. Do not report initial DLL events.
14101 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14102 (unloaded_dll, xml_escape_text): New.
14103 * win32-low.c (enum target_waitkind): Update comments.
14104 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14105 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14106 (win32_EnumProcessModules, win32_GetModuleInformation)
14107 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14108 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14109 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14110 (win32_Module32First, win32_Module32Next, load_toolhelp)
14111 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14112 (get_child_debug_event): Handle DLL events.
14113 (win32_wait): Likewise.
14115 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14117 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14118 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14120 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14122 * win32-low.c (handle_output_debug_string): Ignore event if not
14125 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14127 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14129 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14131 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14133 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14135 * inferiors.c (change_inferior_id): Add comment.
14136 * linux-low.c (check_removed_breakpoint): Add an early
14137 prototype. Improve debug output.
14138 (linux_attach): Doc update.
14139 (linux_detach_one_process, linux_detach): Clean up before releasing
14141 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14142 * linux-low.h (struct process_info): Doc improvement.
14143 * mem-break.c (delete_all_breakpoints): New.
14144 * mem-break.h (delete_all_breakpoints): New prototype.
14145 * thread-db.c (find_first_thread): New.
14146 (thread_db_create_event): Call it instead of
14147 thread_db_find_new_threads. Clean up unused variables.
14148 (maybe_attach_thread): Remove first thread handling.
14149 (thread_db_find_new_threads): Use find_first_thread.
14150 (thread_db_get_tls_address): Likewise.
14152 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14154 * thread-db.c (thread_db_find_new_threads): Add prototype.
14155 (thread_db_create_event): Check for the main thread before adding
14157 (maybe_attach_thread): Only enable event reporting if TID == 0.
14158 (thread_db_get_tls_address): Check for new threads.
14160 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14162 * linux-low.c (linux_create_inferior): Try execv before execvp.
14163 * spu-low.c (spu_create_inferior): Likewise.
14165 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14167 * linux-low.c (linux_create_inferior): Change execv to execvp.
14168 * spu-low.c (spu_create_inferior): Likewies.
14170 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14172 * Makefile.in (clean): Clean new files instead of deleted ones.
14173 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14174 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14176 * configure.srv: Specify XML files and new regformats for MIPS and
14178 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14179 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14180 an entry for the restart register.
14181 (mips_cannot_fetch_register, mips_cannot_store_register)
14182 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14183 register names to match the XML descriptions.
14184 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14185 restart register instead of $0.
14187 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14188 Markus Deuling <deuling@de.ibm.com>
14190 * remote-utils.c (decode_xfer_write): New function.
14191 * server.h (decode_xfer_write): Add prototype.
14192 * server.c (handle_query): Add PACKET_LEN argument. Support
14193 qXfer:spu:read and qXfer:spu:write packets.
14194 (main): Pass packet_len to handle_query.
14195 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14196 * target.h (target_ops): Add qxfer_spu.
14198 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14200 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14201 accessing non-seekable spufs files.
14203 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14205 * server.c (handle_query): Add reply for qC packet.
14207 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14208 Leo Zayas <lerele@champenstudios@com>
14210 * server.h (check_remote_input_interrupt_request): New function.
14211 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14212 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14213 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14214 (check_remote_input_interrupt_request): New function.
14215 * server.h (check_remote_input_interrupt_request): Declare.
14216 * win32-low.c (winapi_DebugBreakProcess,
14217 winapi_GenerateConsoleCtrlEvent): New typedefs.
14218 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14220 (win32_wait): Check for remote interrupt request
14221 with check_remote_input_interrupt_request.
14222 (win32_request_interrupt): New function.
14223 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14225 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14227 * win32-low.c (debug_registers_changed,
14228 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14229 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14230 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14231 (thread_rec): Get context using the low target.
14232 (child_add_thread): Call thread_added on the low target,
14233 which does the same thing.
14235 (do_initial_child_stuff): Remove debug registers references.
14236 Set context using the low target. Resume threads after
14237 setting the contexts.
14238 (child_continue): Remove dead variable. Remove debug
14239 registers references.
14240 (child_fetch_inferior_registers): Go through the low target.
14241 (do_child_store_inferior_registers): Remove.
14242 (child_store_inferior_registers): Go through the low target.
14243 (win32_resume): Remove debug registers references.
14244 Set context using the low target.
14245 (handle_exception): Change return type to void. Don't record
14246 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14247 first chance exception.
14248 (get_child_debug_event): Change return type to void. Remove
14249 goto loop. Always return after waiting for debug event.
14250 (win32_wait): Convert to switch statement. Handle spurious
14253 * win32-i386-low.c (debug_registers_changed,
14254 debug_registers_used): New.
14255 (initial_stuff): Rename to ...
14256 (i386_initial_stuff): ... this. Clear debug registers
14258 (store_debug_registers): Delete.
14259 (i386_get_thread_context): New.
14260 (load_debug_registers): Delete.
14261 (i386_set_thread_context): New.
14262 (i386_thread_added): New.
14263 (single_step): Rename to ...
14264 (i386_single_step): ... this.
14265 (do_fetch_inferior_registers): Rename to ...
14266 (i386_fetch_inferior_register): ... this.
14267 (i386_store_inferior_register): New.
14268 (the_low_target): Adapt to new interface.
14270 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14271 (arm_get_thread_context): New.
14272 (arm_set_thread_context): New.
14274 (do_fetch_inferior_registers): Rename to ...
14275 (arm_fetch_inferior_register): ... this.
14276 (arm_store_inferior_register): New.
14277 (arm_wince_breakpoint): Reimplement as unsigned long.
14278 (arm_wince_breakpoint_len): Define.
14279 (the_low_target): Adapt to new interface.
14281 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14282 load_debug_registers. Add get_thread_context, set_thread_context,
14283 thread_added and store_inferior_register. Rename
14284 fetch_inferior_registers to fetch_inferior_register.
14285 (regptr): Remove declaration.
14287 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14289 * linux-low.c (linux_detach): Change return type to int. Return 0.
14290 * spu-low.c (spu_detach): Likewise.
14292 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14294 * target.h (target_ops): Change return type of detach to int.
14296 (join_inferior): New.
14297 * server.c (main): Don't skip detach support on mingw32.
14298 If the inferior doesn't support detaching return error.
14299 Call join_inferior instead of using waitpid.
14300 * linux-low.c (linux_join): New.
14301 (linux_target_op): Add linux_join.
14302 * spu-low.c (spu_join): New.
14303 (spu_target_ops): Add spu_join.
14304 * win32-low.c (win32_detach): Adapt to new interface.
14305 Reopen current_process_handle before detaching. Issue a child
14306 resume before detaching.
14308 (win32_target_op): Add win32_join.
14310 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14312 * win32-low.c (win32-attach): Fix return value.
14313 * target.h (target_ops): Describe ATTACH return values.
14315 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14317 * win32-low.c (GETPROCADDRESS): Define.
14318 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14319 (winapi_DebugSetProcessKillOnExit): Likewise.
14320 (win32_create_inferior): Force usage of ansi CreateProcessA.
14321 (win32_attach): Use GETPROCADDRESS.
14322 (win32_detach): Likewise.
14324 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14326 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14328 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14330 * win32-low.c: Commit leftover changes from 2007-03-29.
14332 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14334 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14335 fields short instead of int. Add explicit padding.
14336 (i387_cache_to_fsave): Remove unnecessary casts.
14337 (i387_fsave_to_cache): Doc fix.
14338 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14340 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14342 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14343 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14345 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14347 * configure.srv (arm*-*-mingw32ce*): Move near the other
14350 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14352 * configure.ac: Add errno checking.
14353 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14354 sys/file.h and malloc.h.
14355 (AC_CHECK_DECLS): Add perror.
14356 (srv_mingwce): Handle.
14357 * configure.srv (i[34567]86-*-cygwin*): Add
14358 win32-i386-low.o to srv_tgtobj.
14359 (i[34567]86-*-mingw*): Likewise.
14360 (arm*-*-mingw32ce*): Add case.
14361 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14362 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14363 [__MINGW32CE__] (strerror): New function.
14364 [__MINGW32CE__] (errno): Define to GetLastError.
14365 [__MINGW32CE__] (COUNTOF): New macro.
14366 (remote_open): Remove extra close call.
14367 * mem-break.c (delete_breakpoint_at): New function.
14368 * mem-break.h (delete_breakpoint_at): Declare.
14369 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14370 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14371 [USE_WIN32API] (read, write): Add char* casts.
14372 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14373 * server.h: Include wincecompat.h on Windows CE.
14374 [HAVE_ERRNO_H]: Check.
14375 (perror): Declare if not declared.
14376 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14377 (perror_with_name): Remove errno declaration.
14378 * wincecompat.h: New.
14379 * wincecompat.c: New.
14380 * win32-low.h: New.
14381 * win32-arm-low.c: New.
14382 * win32-i386-low.c: New.
14383 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14384 (OUTMSG2): Make it safe.
14386 (COUNTOF): New macro.
14387 (NUM_REGS): Get it from the low target.
14388 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14389 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14390 (thread_rec): Let low target handle debug registers.
14391 (child_add_thread): Likewise.
14392 (child_init_thread_list): Likewise.
14393 (continue_one_thread): Likewise.
14395 (do_child_fetch_inferior_registers): Move to ...
14396 * win32-i386-low.c: ... here, and rename to ...
14397 (do_fetch_inferior_registers): ... this.
14398 * win32-low.c (child_fetch_inferior_registers):
14399 Go through the low target.
14400 (do_child_store_inferior_registers): Use regptr.
14401 (strwinerror): New function.
14402 (win32_create_inferior): Handle Windows CE.
14403 Use strwinerror instead of strerror on Windows error
14404 codes. Add program to the error output.
14405 Don't close the main thread handle on Windows CE.
14406 (win32_attach): Use coredll.dll on Windows CE.
14407 (win32_kill): Close current process and current
14409 (win32_detach): Use coredll.dll on Windows CE.
14410 (win32_resume): Let low target handle debug registers, and
14412 (handle_exception): Add/Remove initial breakpoint. Avoid
14413 non-existant WSTOPSIG on Windows CE.
14414 (win32_read_inferior_memory): Cast to remove warning.
14415 (win32_arch_string): Go through the low target.
14416 (initialize_low): Call set_breakpoint_data with the low
14417 target's breakpoint.
14418 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14419 FOP_REGNUM, mappings): Move to ...
14420 * win32-i386-low.c: ... here.
14421 * win32-low.c (win32_thread_info): Move to ...
14422 * win32-low.h: ... here.
14423 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14424 win32-arm-low.c and wincecompat.c.
14425 (all:): Add $EXEEXT.
14426 (install-only:): Likewise.
14427 (gdbserver:): Likewise.
14428 (gdbreplay:): Likewise.
14429 * config.in: Regenerate.
14430 * configure: Regenerate.
14432 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14434 * win32-low.c: Rename typedef thread_info to
14435 win32_thread_info throughout.
14437 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14439 * win32-i386-low.c: Rename to ...
14440 * win32-low.c: ... this.
14441 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14442 * Makefile.in: Likewise.
14444 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14446 * remote-utils.c (monitor_output): Constify msg parameter.
14447 * server.h (monitor_output): Likewise.
14448 * win32-i386-low.c (handle_output_debug_string): New.
14449 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14450 handle_output_debug_string.
14451 (get_child_debug_event): Likewise.
14453 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14455 * server.c (main): Correct strtoul check.
14457 2007-03-27 Jon Ringle <jon@ringle.org>
14459 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14461 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14463 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14465 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14467 * terminal.h: Check HAVE_SGTTY_H.
14469 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14471 * remote-utils.c (remote_open): Print out the assigned port number.
14473 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14475 * remote-utils.c (monitor_output): New function.
14476 * server.c (debug_threads): Define here.
14477 (monitor_show_help): New function.
14478 (handle_query): Handle qRcmd.
14479 (main): Do not handle 'd' packet.
14480 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14481 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14484 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14486 * Makefile.in (EXEEXT): New.
14487 (clean): Use $(EXEEXT).
14489 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14491 * target.h (target_ops): Rename send_signal to request_interrupt,
14492 and remove enum target_signal parameter.
14493 * linux-low.c (linux_request_interrupt): Rename from
14494 linux_send_signal, and always send SIGINT.
14495 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14496 and always send SIGINT.
14497 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14499 (input_interrupt): Likewise.
14501 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14503 * server.c (get_features_xml): Check if target implemented
14505 * win32-i386-low.c (win32_arch_string): New.
14506 (win32_target_ops): Add win32_arch_string as arch_string member.
14508 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14510 * spu-low.c (spu_arch_string): New.
14511 (spu_target_ops): Add spu_arch_string.
14513 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14515 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14516 * configure.ac: Do not check for terminal.h.
14517 * configure, config.in: Regenerated.
14519 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14521 * Makefile.in (OBS): Add $(XML_BUILTIN).
14522 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14524 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14525 (arm-with-iwmmxt.c): New.
14526 * config.in, configure: Regenerate.
14527 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14528 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14529 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14530 (arm*-*-linux*): Add iWMMXt and regset support.
14531 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14532 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14533 (arm_store_wmmxregset, target_regsets): New.
14534 * server.c (get_features_xml): Take annex argument. Check builtin
14536 (handle_query): Handle multiple annexes.
14538 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14540 * remote-utils.c [USE_WIN32API] (read, write): Define.
14541 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14544 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14546 * linux-i386-low.c (the_low_target): Set arch_string.
14547 * linux-x86-64-low.c (the_low_target): Likewise.
14548 * linux-low.c (linux_arch_string): New.
14549 (linux_target_ops): Add it.
14550 * linux-low.h (struct linux_target_ops): Add arch_string.
14551 * server.c (write_qxfer_response): Use const void * for DATA.
14552 (get_features_xml): New.
14553 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14554 * target.h (struct target_ops): Add arch_string method.
14556 2007-01-03 Denis Pilat <denis.pilat@st.com>
14557 Daniel Jacobowitz <dan@codesourcery.com>
14559 * linux-low.c (linux_kill): Handle being called with no threads.
14560 * win32-i386-low.c (win32_kill): Likewise.
14561 (get_child_debug_event): Clear current_process_handle.
14563 2006-12-30 Denis PILAT <denis.pilat@st.com>
14564 Daniel Jacobowitz <dan@codesourcery.com>
14566 * remote-utils.c (remote_open): Check the type of specified
14567 serial port devices before opening them.
14568 * server.c (main): Kill the inferior if an error occurs during
14569 the first remote_open.
14571 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14573 * README: Update supported targets.
14575 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14577 * Makefile.in (clean): Remove reg-mips64.c.
14578 (reg-mips64.c, reg-mips64.o): New rules.
14579 * configure.srv: Handle mips64. Include regset support for mips.
14580 * linux-mips-low.c (union mips_register): New.
14581 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14582 (mips_breakpoint, mips_breakpoint_at): Use int.
14583 (mips_collect_register, mips_supply_register)
14584 (mips_collect_register_32bit, mips_supply_register_32bit)
14585 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14586 (mips_store_fpregset, target_regsets): New.
14587 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14589 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14591 * configure.srv: Add target "spu*-*-*".
14592 * Makefile.in (clean): Remove reg-spu.c.
14593 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14594 * spu-low.c: New file.
14596 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14598 * configure.ac: Correct td_thr_tls_get_addr test.
14599 * configure: Regenerated.
14601 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14603 * linux-low.c (linux_wait_for_event): Reformat. Use the
14604 pass_signals array.
14605 * remote-utils.c (decode_address_to_semicolon): New.
14606 * server.c (pass_signals, handle_general_set): New.
14607 (handle_query): Mention QPassSignals for qSupported.
14608 (main): Call handle_general_set.
14609 * server.h (pass_signals, decode_address_to_semicolon): New.
14611 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14613 * server.c (handle_query): Correct error handling for read_auxv.
14615 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14617 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14618 and srv_linux_thread_db to yes.
14619 * linux-s390-low.c (s390_fill_gregset): New function.
14620 (target_regsets): Define data structure.
14622 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14624 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14625 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14626 * config.in, configure: Regenerated.
14627 * inferiors.c (gdb_id_to_thread): New function.
14628 (gdb_id_to_thread_id): Use it.
14629 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14630 * linux-low.h (struct process_info): Add th member.
14631 (thread_db_get_tls_address): New prototype.
14632 * remote-utils.c (decode_address): Make non-static.
14633 * server.c (handle_query): Handle qGetTLSAddr.
14634 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14635 * target.h (struct target_ops): Add get_tls_address.
14636 * thread-db.c (maybe_attach_thread): Save the thread handle.
14637 (thread_db_get_tls_address): New.
14639 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14641 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14642 (linux_resume_one_process): Take a siginfo_t *. Update all
14643 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14644 (struct pending_signals): Add a siginfo_t.
14645 (linux_wait_for_process): Always set last_status.
14646 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14647 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14648 * linux-low.h (struct process_info): Add last_status.
14650 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14652 * remote-utils.c (try_rle): New function.
14653 (putpkt_binary): Use it.
14655 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14657 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14658 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14659 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14660 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14661 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14664 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14666 * server.c (terminal_fd): New variable.
14667 (old_foreground_pgrp): Likewise.
14668 (restore_old_foreground_pgrp): New function.
14669 (start_inferior): Record the terminal file descriptor in terminal_fd
14670 and its original foreground group in old_foreground_pgrp. Register
14671 restore_old_foreground_pgrp with atexit().
14673 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14675 * server.c (handle_query): Correct qPart to qXfer.
14677 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14679 * configure.ac: Check for more headers which are missing on
14680 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14681 * configure.srv: Add Cygwin and mingw32.
14682 * remote-utils.c: Don't include headers unconditionally which
14683 are missing on mingw32. Include <winsock.h> for mingw32.
14684 (remote_open): Adjust for mingw32 support. Flush
14685 standard error after writing to it.
14686 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14687 (unblock_async_io, enable_async_io, disable_async_io)
14688 (readchar, getpkt): Update for Winsock support.
14689 (prepare_resume_reply): Expect a protocol signal number.
14690 * server.c: Disable <sys/wait.h> on mingw32.
14691 (start_inferior): Adjust for mingw32 support. Flush
14692 standard error after writing to it.
14693 (attach_inferior): Likewise. Use protocol signal
14695 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14697 * win32-i386-low.c: New file.
14698 * Makefile.in (XM_CLIBS): Set.
14699 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14700 (win32-i386-low.o): New dependency rule.
14701 * linux-low.c (linux_wait): Use target signal numbers.
14702 * target.h (struct target_ops): Doc fix.
14703 * server.h (target_signal_to_name): New prototype.
14704 * gdbreplay.c: Don't include headers unconditionally which
14705 are missing on mingw32. Include <winsock.h> for mingw32.
14706 (remote_close, remote_open): Adjust for Winsock support.
14707 * configure, config.in: Regenerated.
14709 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14711 * server.c (decode_xfer_read, write_qxfer_response): New.
14712 (handle_query): Take a packet length argument. Handle
14713 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14714 the qSupported response.
14715 (main): Update call to handle_query.
14717 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14719 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14720 (putpkt_binary): Renamed from putpkt and adjusted for binary
14722 (putpkt): New wrapper for putpkt_binary.
14723 (readchar): Don't mask off the high bit.
14724 (decode_X_packet): New function.
14725 * server.c (main): Call putpkt_binary if a handler sets the packet
14726 length. Save the length of the incoming packet. Handle 'X'.
14727 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14729 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14731 * server.c (handle_query): Handle qSupported.
14733 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14735 * remote-utils.c (all_symbols_looked_up): New variable.
14736 (look_up_one_symbol): Check it.
14737 * server.h (look_up_one_symbol): New declaration.
14738 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14740 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14742 * Makefile.in (linux-arm-low.o): Update dependencies.
14743 * linux-arm-low.c: Include "gdb_proc_service.h".
14744 (PTRACE_GET_THREAD_AREA): Define.
14745 (ps_get_thread_area): New function.
14747 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14749 * configure.srv (m68k*-*-uclinux*): New target.
14750 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14751 (linux_resume_one_process): Remove extraneous cast.
14752 (linux_read_offsets): New.
14753 (linux_target_op): Add linux_read_offsets on mmuless systems.
14754 * server.c (handle_query): Add qOffsets logic.
14755 * target.h (struct target_ops): Add read_offsets.
14757 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14759 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14760 (PTRACE_GET_THREAD_AREA): Define.
14761 (ps_get_thread_area): New function.
14762 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14763 (linux-x86-64-low.o): Update.
14765 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14767 * configure.ac: Remove checks for prfpregset_t.
14768 * gdb_proc_service.h: New file.
14769 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14770 new "gdb_proc_service.h".
14771 * proc-service.c: Likewise.
14772 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14773 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14774 * Makefile.in (gdb_proc_service_h): Updated.
14775 * configure, config.in: Regenerated.
14777 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14779 * remote-utils.c (prepare_resume_reply): Move declaration
14780 of gdb_id_from_wait to the top of the block.
14782 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14784 * linux-low.c (regsets_store_inferior_registers): Read the regset
14785 from the target before filling it.
14787 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14789 * server.c (attach_inferior): Return SIGTRAP for a successful
14792 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14794 * Makefile.in (OBS): Add version.o.
14795 (STAGESTUFF): Delete.
14796 (version.o): Add dependencies.
14797 (version.c): Replace rule.
14798 (clean): Remove version.c.
14799 * server.c (gdbserver_version): New.
14800 (gdbserver_usage): Use printf.
14801 (main): Handle --version and --help.
14802 * server.h (version, host_name): Add declarations.
14804 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14816 * linux-x86-64-low.c:
14818 * linux-s390-low.c:
14819 * linux-ppc64-low.c:
14821 * linux-mips-low.c:
14822 * linux-m68k-low.c:
14823 * linux-m32r-low.c:
14826 * linux-ia64-low.c:
14827 * linux-i386-low.c:
14828 * linux-crisv32-low.c:
14840 * gdbserver.1: Add (C) after Copyright. Update the FSF
14843 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14845 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14846 (arm_breakpoint_at): Recognize both breakpoints.
14847 (the_low_target): Use the correct breakpoint instruction.
14849 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14851 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14852 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14853 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14854 (the_low_target): Update.
14856 2005-10-25 Andreas Schwab <schwab@suse.de>
14858 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14860 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14861 (ia64_num_regs): Reduce to 462.
14863 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14865 * acinclude.m4: Correct quoting.
14866 * aclocal.m4: Regenerated.
14868 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14869 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14870 (thread_db_init): Call thread_db_err_str.
14871 * configure.ac: Check for TD_VERSION.
14872 * config.in, configure: Regenerated.
14874 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14876 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14878 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14880 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14881 is not available. Define HAVE_PTRACE_GETREGS if it is.
14882 * config.in, configure: Regenerated.
14883 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14884 * linux-i386-low.c, linux-m68k-low.c: Update to use
14885 HAVE_PTRACE_GETREGS.
14886 * linux-low.c (regsets_fetch_inferior_registers)
14887 (regsets_store_inferior_registers): Only return 0 if we processed
14889 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14890 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14892 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14894 * inferiors.c (struct thread_info): Add gdb_id.
14895 (add_thread): Add gdb_id argument.
14896 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14897 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14898 calls to add_thread.
14899 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14900 * server.c (handle_query): Use thread_to_gdb_id.
14901 (handle_v_cont, main): Use gdb_id_to_thread_id.
14902 * server.h (add_thread): Update prototype.
14903 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14906 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14908 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14909 left-padded registers.
14910 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14911 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14913 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14915 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14916 * configure: Regenerate.
14917 * config.in: Regenerate.
14918 * server.h (NEED_DECLARATION_STRERROR):
14919 Replace with !HAVE_DECL_STRERROR.
14921 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14923 * linux-low.c (linux_wait, linux_send_signal): Don't test
14924 an unsigned long variable for > 0 if it could be MAX_ULONG.
14925 * server.c (myresume): Likewise.
14926 * target.c (set_desired_inferior): Likewise.
14928 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14930 * configure.ac: Simplify and improve check for socklen_t.
14931 * configure, config.in: Regenerate.
14933 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14935 * acconfig.h: Remove.
14936 * configure.ac: Add a test for socklen_t. Use three-argument
14937 AC_DEFINE throughout.
14938 * config.in: Regenerated using autoheader 2.59.
14939 * configure: Regenerated.
14941 * gdbreplay.c (socklen_t): Provide a default.
14942 (remote_open): Use socklen_t.
14943 * remote-utils.c (socklen_t): Provide a default.
14944 (remote_open): Use socklen_t.
14945 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14948 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14950 * linux-low.c (linux_read_memory, linux_write_memory)
14951 (linux_read_auxv): Likewise.
14952 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14953 (check_mem_write): Likewise.
14954 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14956 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14957 (registers_from_string, register_data): Likewise.
14958 * server.c (handle_query, main): Likewise.
14959 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14960 (decode_M_packet): Likewise.
14961 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14962 * target.h (struct target_ops): Update read_memory, write_memory,
14964 (read_inferior_memory, write_inferior_memory): Update.
14965 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14966 to unsigned char *.
14967 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14968 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14969 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14970 linux-s390-low.c, linux-sh-low.c: Update for changes in
14971 read_inferior_memory and the_low_target->breakpoint.
14973 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14975 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14976 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14977 * configure.srv: Add powerpc64-*-linux*.
14978 * linux-ppc64-low.c: New file.
14980 2005-05-23 Orjan Friberg <orjanf@axis.com>
14982 * linux-cris-low.c: New file with support for CRIS.
14983 * linux-crisv32-low.c: Ditto for CRISv32.
14984 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14985 (clean): Add reg-cris.c and reg-crisv32.c.
14986 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14987 reg-crisv32.o, and reg-crisv32.c to make rules.
14988 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14989 recognized targets.
14991 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14993 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14994 of sizeof (PTRACE_XFER_TYPE).
14995 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14997 2005-05-12 Orjan Friberg <orjanf@axis.com>
14999 * target.h (struct target_ops): Add insert_watchpoint,
15000 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15001 pointers for hardware watchpoint support.
15002 * linux-low.h (struct linux_target_ops): Ditto.
15003 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15004 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15005 to linux_target_ops.
15006 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15008 * server.c (main): Recognize 'Z' and 'z' packets.
15010 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15012 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15013 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15014 (the_low_target): Add new members.
15016 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15018 * proc-service.c (ps_lgetregs): Search all_processes instead of
15021 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15023 * server.c (start_inferior): Change return type to int.
15024 (attach_inferior): Change sigptr to int *.
15025 (handle_v_cont, handle_v_requests): Change signal to int *.
15026 (main): Change signal to int.
15028 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15030 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15031 * configure.srv: Add m32r*-*-linux*.
15032 * linux-m32r-low.c: New file.
15034 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15036 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15038 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15040 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15041 Take unsigned long arguments for PIDs.
15042 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15043 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15044 (wait_for_sigstop, linux_resume_one_process)
15045 (regsets_fetch_inferior_registers, linux_send_signal)
15046 (linux_read_auxv): Likewise. Update the types of variables holding
15047 PIDs. Update format string specifiers.
15048 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15049 * remote-utils.c (prepare_resume_reply): Likewise.
15050 * server.c (cont_thread, general_thread, step_thread)
15051 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15053 (handle_query): Update format specifiers.
15054 (handle_v_cont, main): Use strtoul for thread IDs.
15055 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15056 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15057 (general_thread, step_thread, thread_from_wait)
15058 (old_thread_from_wait): Update.
15059 * target.h (struct thread_resume): Use unsigned long for THREAD.
15060 (struct target_ops): Use unsigned long for arguments to attach and
15063 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15065 * acinclude.m4: Include bfd/bfd.m4 directly.
15066 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15067 <agriffis@toolchain.org>.
15068 * aclocal.m4, configure: Regenerated.
15070 2005-01-07 Andrew Cagney <cagney@gnu.org>
15072 * configure.ac: Rename configure.in, require autoconf 2.59.
15073 * configure: Re-generate.
15075 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15077 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15078 LIBS when finished.
15079 * aclocal.m4: Regenerated.
15080 * configure: Regenerated.
15082 2004-11-21 Andreas Schwab <schwab@suse.de>
15084 * linux-m68k-low.c (m68k_num_gregs): Define.
15085 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15086 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15087 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15088 (m68k_breakpoint_at): New. Add to the_low_target.
15090 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15091 srv_linux_thread_db to yes.
15093 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15095 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15096 (ARCH_SET_FS): Likewise.
15097 (ARCH_GET_FS): Likewise.
15098 (ARCH_GET_GS): Likewise.
15100 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15102 * linux-i386-low.c (ps_get_thread_area): New.
15103 * linux-x86-64-low.c (ps_get_thread_area): New.
15104 * linux-low.c: Include <sys/syscall.h>.
15105 (linux_kill_one_process): Don't kill the first thread here.
15106 (linux_kill): Kill the first thread here.
15107 (kill_lwp): New function.
15108 (send_sigstop, linux_send_signal): Use it.
15109 * proc-service.c: Clean up #ifdefs.
15110 (fpregset_info): Delete.
15111 (ps_lgetregs): Update and enable implementation.
15112 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15114 * remote-utils.c (struct sym_cache, symbol_cache): New.
15115 (input_interrupt): Print a clearer message.
15116 (async_io_enabled): New variable.
15117 (enable_async_io, disable_async_io): Use it. Update comments.
15118 (look_up_one_symbol): Use the symbol cache.
15119 * thread-db.c (thread_db_look_up_symbols): New function.
15120 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15122 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15124 * configure.in: Test for -rdynamic.
15125 * configure: Regenerated.
15126 * Makefile (INTERNAL_LDFLAGS): New.
15127 (gdbserver, gdbreplay): Use it.
15129 2004-09-02 Andrew Cagney <cagney@gnu.org>
15131 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15133 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15135 * linux-low.c (linux_wait): Clear all_processes list also.
15137 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15139 * linux-low.c: Include <errno.h>. Remove extern declaration of
15142 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15144 * gdbreplay.c, server.h, utils.c: Update copyright years.
15146 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15148 * server.c (main): Print child status or termination signal from
15149 variable 'signal', not 'sig'.
15151 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15153 * linux-low.c (linux_read_memory): Change return type to
15154 int. Check for and return error from ptrace().
15155 * target.c (read_inferior_memory): Change return type to int. Pass
15156 back return status from the_target->read_memory().
15157 * target.h (struct target_ops): Adapt *read_memory() prototype.
15159 (read_inferior_memory): Adapt prototype.
15160 * server.c (main): Return an error packet if
15161 read_inferior_memory() returns an error.
15163 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15165 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15166 Unify with other clean targets.
15168 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15170 * server.c (handle_v_cont): Call set_desired_inferior.
15172 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15174 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15176 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15178 * linux-low.c (linux_wait): Unblock async I/O.
15179 (linux_resume): Block and enable async I/O.
15180 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15181 * server.h (block_async_io, unblock_async_io): Add prototypes.
15183 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15185 * remote-utils.c (remote_open): Print a status notice after
15186 opening a TCP port.
15187 * server.c (attach_inferior): Print a status notice after
15190 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15192 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15194 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15196 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15198 * server.c, target.h: Update copyright years.
15200 2004-02-25 Roland McGrath <roland@redhat.com>
15202 * target.h (struct target_ops): New member `read_auxv'.
15203 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15204 * linux-low.c (linux_read_auxv): New function.
15205 (linux_target_ops): Initialize `read_auxv' member to that.
15207 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15209 Committed by Jim Blandy <jimb@redhat.com>.
15211 * linux-s390-low.c (s390_num_regs): Update.
15212 (s390_regmap): Remove control registers. Use __s390x__ predefine
15213 instead of GPR_SIZE to distiguish s390 and s390x targets.
15215 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15217 * linux-low.c: Update copyright year.
15218 (check_removed_breakpoint): Clear pending_is_breakpoint.
15219 (linux_set_resume_request, linux_queue_one_thread)
15220 (resume_status_pending_p): New functions.
15221 (linux_continue_one_thread): Use process->resume.
15222 (linux_resume): Only resume threads if there are no pending events.
15223 * linux-low.h (struct process_info): Add resume request
15226 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15228 * regcache.c (new_register_cache): Clear the allocated register
15229 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15231 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15233 * linux-low.c (linux_resume): Take a struct thread_resume *
15235 (linux_wait): Update call.
15236 (resume_ptr): New static variable.
15237 (linux_continue_one_thread): Renamed from
15238 linux_continue_one_process. Use resume_ptr.
15239 (linux_resume): Use linux_continue_one_thread.
15240 * server.c (handle_v_cont, handle_v_requests): New functions.
15241 (myresume): New function.
15242 (main): Handle 'v' case.
15243 * target.h (struct thread_resume): New type.
15244 (struct target_ops): Change argument of "resume" to struct
15246 (myresume): Delete macro.
15248 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15250 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15251 (uninstall): Support DESTDIR.
15253 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15255 * configure.srv: Add xscale*linux copy of arm*linux entry.
15257 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15259 * linux-arm-low.c (arm_reinsert_addr): New function.
15260 (the_low_target): Add arm_reinsert_addr.
15262 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15264 * mem-break.c: Remove whitespace at end of file.
15266 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15268 * configure.in: Check whether we need to prototype strerror.
15269 * server.h: Optionally prototype strerror.
15270 * gdbreplay.c (perror_with_name): Use strerror.
15271 * linux-low.c (linux_attach_lwp): Use strerror.
15272 * utils.c (perror_with_name): Use strerror.
15273 * config.in, configure: Regenerated.
15275 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15277 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15278 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15280 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15282 * Makefile.in (SFILES): Update.
15283 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15284 low-sun3.c: Remove files.
15286 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15288 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15289 (linux_detach_one_process, linux_detach): New functions.
15290 (linux_target_ops): Add linux_detach.
15291 * server.c (main): Handle 'D' packet.
15292 * target.h (struct target_ops): Add "detach" member.
15293 (detach_inferior): Define.
15295 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15297 From Kelley Cook <kelleycook@wideopenwest.com>:
15298 * configure.srv: Accept i[34567]86 variants.
15300 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15302 * linux-low.c (linux_wait_for_event): Correct comment typos.
15303 (linux_resume_one_process): Call check_removed_breakpoint.
15304 (linux_send_signal): New function.
15305 (linux_target_ops): Add linux_send_signal.
15306 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15308 * target.h (struct target_ops): Add send_signal.
15310 2003-05-29 Jim Blandy <jimb@redhat.com>
15312 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15313 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15314 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15315 away part of the register's value.
15317 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15319 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15320 (linux_wait_for_event, linux_init_signals): Likewise.
15322 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15324 * configure.in: Check for stdlib.h.
15325 * configure: Regenerated.
15326 * config.in: Regenerated.
15328 2003-01-04 Andreas Schwab <schwab@suse.de>
15330 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15332 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15334 * Makefile.in: Remove obsolete code.
15336 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15338 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15339 defined(PT_FPR0_HI).
15341 2002-11-17 Stuart Hughes <seh@zee2.com>
15343 * linux-arm-low.c (arm_num_regs): Increase.
15344 (arm_regmap): Include status register.
15346 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15348 * linux-low.c (register_addr): Remove incorrect -1 check.
15350 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15352 * linux-low.c (linux_create_inferior): Call setpgid. Return
15354 (unstopped_p, linux_signal_pid): Remove.
15355 (linux_target_ops): Remove linux_signal_pid.
15356 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15357 global instead of target method.
15358 * target.h (struct target_ops): Remove signal_pid. Update comment
15359 for create_inferior.
15360 * server.c (signal_pid): New variable.
15361 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15362 gdbserver. Set the child to be the foreground process group.
15363 (attach_inferior): Set signal_pid.
15365 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15367 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15369 2002-08-20 Jim Blandy <jimb@redhat.com>
15371 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15374 2002-08-01 Andrew Cagney <cagney@redhat.com>
15376 * Makefile.in: Make chill references obsolete.
15378 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15380 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15381 * configure: Regenerate.
15382 * config.in: Regenerate.
15384 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15386 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15387 (perror_with_name, remote_close, remote_open, expect, play): Static.
15389 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15391 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15392 byte offsets instead of an array of indexes.
15393 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15395 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15397 * regcache.c: Add comment.
15399 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15401 * thread-db.c: New file.
15402 * proc-service.c: New file.
15403 * acinclude.m4: New file.
15404 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15405 proc-service.o, and thread-db.o.
15406 (linux-low.o): Add USE_THREAD_DB.
15407 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15408 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15409 * aclocal.m4: Regenerated.
15410 * config.in: Regenerated.
15411 * configure: Regenerated.
15412 * configure.in: Check for proc_service.h, sys/procfs.h,
15413 thread_db.h, and linux/elf.h headrs.
15414 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15415 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15416 Check for -lthread_db and thread support.
15417 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15418 PowerPC, and SuperH.
15419 * i387-fp.c: Constify arguments.
15420 * i387-fp.h: Likewise.
15421 * inferiors.c: (struct thread_info): Renamed from
15422 `struct inferior_info'. Remove PID member. Use generic inferior
15423 list header. All uses updated.
15424 (inferiors, signal_pid): Removed.
15425 (all_threads): New variable.
15426 (get_thread): Define.
15427 (add_inferior_to_list): New function.
15428 (for_each_inferior): New function.
15429 (change_inferior_id): New function.
15430 (add_inferior): Removed.
15431 (remove_inferior): New function.
15432 (add_thread): New function.
15433 (free_one_thread): New function.
15434 (remove_thread): New function.
15435 (clear_inferiors): Use for_each_inferior and free_one_thread.
15436 (find_inferior): New function.
15437 (find_inferior_id): New function.
15438 (inferior_target_data): Update argument type.
15439 (set_inferior_target_data): Likewise.
15440 (inferior_regcache_data): Likewise.
15441 (set_inferior_regcache_data): Likewise.
15442 * linux-low.c (linux_bp_reinsert): Remove.
15443 (all_processes, stopping_threads, using_thrads)
15444 (struct pending_signals, debug_threads, pid_of): New.
15445 (inferior_pid): Replace with macro.
15446 (struct inferior_linux_data): Remove.
15447 (get_stop_pc, add_process): New functions.
15448 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15449 Use add_process and add_thread.
15450 (linux_attach_lwp): New function, based on old linux_attach. Use
15451 add_process and add_thread. Set stop_expected for new threads.
15452 (linux_attach): New function.
15453 (linux_kill_one_process): New function.
15454 (linux_kill): Kill all LWPs.
15455 (linux_thread_alive): Use find_inferior_id.
15456 (check_removed_breakpoints, status_pending_p): New functions.
15457 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15458 Update. Use WNOHANG. Wait for cloned processes also. Update process
15459 struct for the found process.
15460 (linux_wait_for_event): New function.
15461 (linux_wait): Use it. Support LWPs.
15462 (send_sigstop, wait_for_sigstop, stop_all_processes)
15463 (linux_resume_one_process, linux_continue_one_process): New functions.
15464 (linux_resume): Support LWPs.
15465 (REGISTER_RAW_SIZE): Remove.
15466 (fetch_register): Use register_size instead. Call supply_register.
15467 (usr_store_inferior_registers): Likewise. Call collect_register.
15468 Fix recursive case.
15469 (regsets_fetch_inferior_registers): Improve error message.
15470 (regsets_store_inferior_registers): Add debugging.
15471 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15472 (unstopped_p, linux_signal_pid): New functions.
15473 (linux_target_ops): Add linux_signal_pid.
15474 (linux_init_signals): New function.
15475 (initialize_low): Call it. Initialize using_threads.
15476 * regcache.c (inferior_regcache_data): Add valid
15478 (get_regcache): Fetch registers lazily. Add fetch argument
15479 and update all callers.
15480 (regcache_invalidate_one, regcache_invalidate): New
15482 (new_register_cache): Renamed from create_register_cache.
15483 Return the new regcache.
15484 (free_register_cache): Change argument to a void *.
15485 (registers_to_string, registers_from_string): Call get_regcache
15486 with fetch flag set.
15487 (register_data): Make static. Pass fetch flag to get_regcache.
15488 (supply_register): Call get_regcache with fetch flag clear.
15489 (collect_register): Call get_regcache with fetch flag set.
15490 (collect_register_as_string): New function.
15491 * regcache.h: Update.
15492 * remote-utils.c (putpkt): Flush after debug output and use
15494 Handle input interrupts while waiting for an ACK.
15495 (input_interrupt): Use signal_pid method.
15496 (getpkt): Flush after debug output and use stderr.
15497 (outreg): Use collect_register_as_string.
15498 (new_thread_notify, dead_thread_notify): New functions.
15499 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15500 and general_thread.
15501 (look_up_one_symbol): Flush after debug output.
15502 * server.c (step_thread, server_waiting): New variables.
15503 (start_inferior): Don't use signal_pid. Update call to mywait.
15504 (attach_inferior): Update call to mywait.
15505 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15506 (main): Don't fetch/store registers explicitly. Use
15507 set_desired_inferior. Support proposed ``Hs'' packet. Update
15509 * server.h: Update.
15510 (struct inferior_list, struct_inferior_list_entry): New.
15511 * target.c (set_desired_inferior): New.
15512 (write_inferior_memory): Constify.
15513 (mywait): New function.
15514 * target.h: Update.
15515 (struct target_ops): New signal_pid method.
15516 (mywait): Removed macro, added prototype.
15518 * linux-low.h (regset_func): Removed.
15519 (regset_fill_func, regset_store_func): New.
15520 (enum regset_type): New.
15521 (struct regset_info): Add type field. Use new operation types.
15522 (struct linux_target_ops): stop_pc renamed to get_pc.
15523 Add decr_pc_after_break and breakpoint_at.
15524 (get_process, get_thread_proess, get_process_thread)
15525 (strut process_info, all_processes, linux_attach_lwp)
15526 (thread_db_init): New.
15528 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15529 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15530 (the_low_target): Add new members.
15531 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15532 (i386_store_fpxregset): Constify.
15533 (target_regsets): Add new kind identifier.
15534 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15535 (i386_set_pc): Add debugging.
15536 (i386_breakpoint_at): New function.
15537 (the_low_target): Add new members.
15538 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15539 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15540 (mips_breakpoint_at): New.
15541 (the_low_target): Add new members.
15542 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15543 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15544 (the_low_target): Add new members.
15545 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15546 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15547 (the_low_target): Add new members.
15548 * linux-x86-64-low.c (target_regsets): Add new kind
15551 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15553 From Martin Pool <mbp@samba.org>:
15554 * server.c (gdbserver_usage): New function.
15557 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15559 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15560 stop_at -> stop_pc.
15562 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15564 * Makefile.in: Remove obsolete code.
15566 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15568 * linux-low.c (regsets_fetch_inferior_registers),
15569 (regsets_store_inferior_registers): Removed cast to int from
15571 * regcache.h: Added declaration of struct inferior_info.
15573 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15575 * inferiors.c (struct inferior_info): Add regcache_data.
15576 (add_inferior): Call create_register_cache.
15577 (clear_inferiors): Call free_register_cache.
15578 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15579 * regcache.c (struct inferior_regcache_data): New.
15580 (registers): Remove.
15581 (get_regcache): New function.
15582 (create_register_cache, free_register_cache): New functions.
15583 (set_register_cache): Don't initialize the register cache here.
15584 (registers_to_string, registers_from_string, register_data): Call
15586 * regcache.h: Add prototypes.
15587 * server.h: Likewise.
15589 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15591 * mem-break.c: New file.
15592 * mem-break.h: New file.
15593 * Makefile.in: Add mem-break.o rule; update server.h
15595 * inferiors.c (struct inferior_info): Add target_data
15597 (clear_inferiors): Free target_data member if set.
15598 (inferior_target_data, set_inferior_target_data): New functions.
15599 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15600 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15601 * linux-low.c (linux_bp_reinsert): New variable.
15602 (struct inferior_linux_data): New.
15603 (linux_create_inferior): Use set_inferior_target_data.
15604 (linux_attach): Likewise. Call add_inferior.
15605 (linux_wait_for_one_inferior): New function.
15606 (linux_wait): Call it.
15607 (linux_write_memory): Add const.
15608 (initialize_low): Call set_breakpoint_data.
15609 * linux-low.h (struct linux_target_ops): Add breakpoint
15611 * server.c (attach_inferior): Remove extra add_inferior
15613 * server.h: Include mem-break.h. Update inferior.c
15615 * target.c (read_inferior_memory)
15616 (write_inferior_memory): New functions.
15617 * target.h (read_inferior_memory)
15618 (write_inferior_memory): Change macros to prototypes.
15619 (struct target_ops): Update comments. Add const to write_memory
15622 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15624 * linux-low.c (usr_store_inferior_registers): Support
15625 registers which are allowed to fail to store.
15626 * linux-low.h (linux_target_ops): Likewise.
15627 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15628 (ppc_cannot_store_register): FPSCR may not be storable.
15630 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15632 * server.h: Include <string.h> if HAVE_STRING_H.
15633 * ChangeLog: Correct paths in last ChangeLog entry.
15635 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15637 * linux-low.h: Remove obsolete prototypes.
15638 (struct linux_target_ops): New.
15639 (extern the_low_target): New.
15640 * linux-low.c (num_regs, regmap): Remove declarations.
15641 (register_addr): Use the_low_target explicitly.
15642 (fetch_register): Likewise.
15643 (usr_fetch_inferior_registers): Likewise.
15644 (usr_store_inferior_registers): Likewise.
15645 * linux-arm-low.c (num_regs): Remove.
15646 (arm_num_regs): Define.
15647 (arm_regmap): Renamed from regmap, made static.
15648 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15650 (arm_cannot_store_register): Renamed from cannot_store_register,
15652 (the_low_target): New.
15653 * linux-i386-low.c (num_regs): Remove.
15654 (i386_num_regs): Define.
15655 (i386_regmap): Renamed from regmap, made static.
15656 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15658 (i386_cannot_store_register): Renamed from cannot_store_register,
15660 (the_low_target): New.
15661 * linux-ia64-low.c (num_regs): Remove.
15662 (ia64_num_regs): Define.
15663 (ia64_regmap): Renamed from regmap, made static.
15664 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15666 (ia64_cannot_store_register): Renamed from cannot_store_register,
15668 (the_low_target): New.
15669 * linux-m68k-low.c (num_regs): Remove.
15670 (m68k_num_regs): Define.
15671 (m68k_regmap): Renamed from regmap, made static.
15672 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15674 (m68k_cannot_store_register): Renamed from cannot_store_register,
15676 (the_low_target): New.
15677 * linux-mips-low.c (num_regs): Remove.
15678 (mips_num_regs): Define.
15679 (mips_regmap): Renamed from regmap, made static.
15680 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15682 (mips_cannot_store_register): Renamed from cannot_store_register,
15684 (the_low_target): New.
15685 * linux-ppc-low.c (num_regs): Remove.
15686 (ppc_num_regs): Define.
15687 (ppc_regmap): Renamed from regmap, made static.
15688 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15690 (ppc_cannot_store_register): Renamed from cannot_store_register,
15692 (the_low_target): New.
15693 * linux-s390-low.c (num_regs): Remove.
15694 (s390_num_regs): Define.
15695 (s390_regmap): Renamed from regmap, made static.
15696 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15698 (s390_cannot_store_register): Renamed from cannot_store_register,
15700 (the_low_target): New.
15701 * linux-sh-low.c (num_regs): Remove.
15702 (sh_num_regs): Define.
15703 (sh_regmap): Renamed from regmap, made static.
15704 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15706 (sh_cannot_store_register): Renamed from cannot_store_register,
15708 (the_low_target): New.
15709 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15710 (the_low_target): New.
15712 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15714 * Makefile.in: Add stamp-h target.
15715 * configure.in: Create stamp-h.
15716 * configure: Regenerated.
15718 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15720 * inferiors.c: New file.
15721 * target.c: New file.
15722 * target.h: New file.
15723 * Makefile.in: Add target.o and inferiors.o. Update
15725 * linux-low.c (inferior_pid): New static variable,
15726 moved from server.c.
15727 (linux_create_inferior): Renamed from create_inferior.
15728 Call add_inferior. Return 0 on success instead of a PID.
15729 (linux_attach): Renamed from myattach.
15730 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15731 (linux_thread_alive): Renamed from mythread_alive.
15732 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15734 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15735 (regsets_store_inferior_registers): Correct error message.
15736 Add missing ``return 0''.
15737 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15738 (linux_store_registers): Renamed from store_inferior_registers.
15739 (linux_read_memory): Renamed from read_inferior_memory.
15740 (linux_write_memory): Renamed from write_inferior_memory.
15741 (linux_target_ops): New structure.
15742 (initialize_low): Call set_target_ops ().
15743 * remote-utils.c (unhexify): New function.
15744 (hexify): New function.
15745 (input_interrupt): Send signals to ``signal_pid''.
15746 * server.c (inferior_pid): Remove.
15747 (start_inferior): Update create_inferior call.
15748 (attach_inferior): Call add_inferior.
15749 (handle_query): New function.
15750 (main): Call handle_query for `q' packets.
15751 * server.h: Include "target.h". Remove obsolete prototypes.
15752 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15754 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15756 * Makefile.in: Add WARN_CFLAGS. Update configury
15758 * configure.in: Check for <string.h>
15759 * configure: Regenerate.
15760 * config.in: Regenerate.
15761 * gdbreplay.c: Include needed system headers.
15762 (remote_open): Remove strchr prototype.
15763 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15764 * regcache.c (supply_register): Change buf argument to const void *.
15765 (supply_register_by_name): Likewise.
15766 (collect_register): Change buf argument to void *.
15767 (collect_register_by_name): Likewise.
15768 * regcache.h: Add missing prototypes.
15769 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15770 * server.c (handle_query): New function.
15771 (attached): New static variable, moved out of main.
15772 (main): Quiet longjmp clobber warnings.
15773 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15774 * utils.c (error): Remove NORETURN.