1 2017-11-06 Pedro Alves <palves@redhat.com>
3 * config.in, configure: Regenerate.
5 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
7 * target.c (struct thread_search): Remove.
8 (thread_search_callback): Remove.
9 (prepare_to_access_memory): Use for_each_thread instead of
10 find_inferior. Inline code from thread_search_callback.
12 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
14 * server.c (struct visit_actioned_threads_data): Remove.
15 (visit_actioned_threads): Change prototype to take arguments
17 (resume): Use find_thread instead of find_inferior.
19 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
21 * server.c (queue_stop_reply_callback): Change prototype, return
23 (find_status_pending_thread_callback): Remove.
24 (handle_status): Replace find_inferior with find_thread and
27 2017-10-25 Alan Hayward <alan.hayward@arm.com>
29 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
31 (aarch64_store_gregset): Likewise.
32 (aarch64_fill_fpregset): Likewise.
33 (aarch64_store_fpregset): Likewise.
35 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
37 * gdbthread.h (find_thread, for_each_thread): New functions.
38 * inferiors.c (thread_of_pid): Remove.
39 (find_any_thread_of_pid): Use find_thread.
40 * linux-low.c (num_lwps): Use for_each_thread.
42 2017-10-17 Yao Qi <yao.qi@linaro.org>
44 * Makefile.in: Remove one rule.
45 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
47 2017-10-17 Yao Qi <yao.qi@linaro.org>
49 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
50 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
52 2017-10-17 Yao Qi <yao.qi@linaro.org>
54 * configure.srv: Rename arm.o with arch/arm.o.
56 2017-10-17 Yao Qi <yao.qi@linaro.org>
58 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
59 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
60 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
61 (arch-i386.o, arch-amd64.o): Remove rules.
63 Update POSTCOMPILE and COMPILE.pre.
64 * configure.ac: Invoke AC_CONFIG_COMMANDS.
65 * configure: Re-generated.
66 * configure.srv: Replace arch-i386.o with arch/i386.o.
67 Replace arch-amd64.o with arch/amd64.o.
69 2017-10-16 Yao Qi <yao.qi@linaro.org>
71 * configure: Regenerated.
73 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
75 * inferiors.h: (struct inferior_list): Remove.
76 (struct inferior_list_entry); Remove.
77 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
78 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
79 get_first_inferior): Remove.
80 (for_each_inferior, for_each_inferior_with_data, find_inferior,
81 find_inferior_id, find_inferior_in_random): Change signature.
82 * inferiors.c (all_threads): Change type to
83 std::list<thread_info *>.
84 (get_thread): Remove macro.
85 (find_inferior, find_inferior_id): Change signature, implement
87 (find_inferior_in_random): Change signature, implement using
88 find_thread_in_random.
89 (for_each_inferior, for_each_inferior_with_data): Change
90 signature, implement using for_each_thread.
91 (add_inferior_to_list, remove_inferior): Remove.
92 (add_thread, get_first_thread, thread_of_pid,
93 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
94 (get_first_inferior, one_inferior_p, clear_inferior_list):
96 (clear_inferiors, get_thread_process): Update.
97 * gdbthread.h: Include <list>.
98 (struct thread_info) <entry>: Remove field.
100 (all_threads): Change type to std::list<thread_info *>.
101 (get_first_inferior): Add doc.
102 (find_thread, for_each_thread, find_thread_in_random): New
104 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
105 * linux-arm-low.c (update_registers_callback): Update.
106 * linux-low.c (second_thread_of_pid_p): Update.
107 (kill_one_lwp_callback, linux_detach_lwp_callback,
108 delete_lwp_callback, status_pending_p_callback, same_lwp,
109 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
110 iterate_over_lwps, not_stopped_callback,
111 resume_stopped_resumed_lwps, count_events_callback,
112 select_singlestep_lwp_callback, select_event_lwp_callback,
113 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
114 suspend_and_send_sigstop_callback, wait_for_sigstop,
115 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
116 lwp_running, linux_set_resume_request, resume_status_pending_p,
117 need_step_over_p, start_step_over, linux_resume_one_thread,
118 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
119 reset_lwp_ptrace_options_callback): Update.
120 * linux-mips-low.c (update_watch_registers_callback): Update.
121 * regcache.c (regcache_invalidate_one, regcache_invalidate):
123 (free_register_cache_thread_one): Remove.
124 (regcache_release): Update.
125 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
126 handle_qxfer_threads_worker): Update.
127 (handle_query): Update, use list iterator.
128 (visit_actioned_threads, handle_pending_status,
129 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
130 clear_pending_status_callback, set_pending_status_callback,
131 find_status_pending_thread_callback, handle_status,
132 process_serial_event): Update.
133 * target.c (thread_search_callback): Update.
134 * thread-db.c (thread_db_get_tls_address): Update.
135 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
137 * win32-i386-low.c (update_debug_registers_callback): Update.
138 * win32-low.c (delete_thread_info, child_delete_thread,
139 continue_one_thread, suspend_one_thread,
140 get_child_debug_event): Adjust.
142 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
144 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
145 * inferiors.h: Include <list>.
146 (struct process_info) <entry>: Remove field.
148 (pid_of): Change macro to function.
149 (ptid_of, lwpid_of): Remove macro.
150 (all_processes): Change type to std::list<process_info *>.
151 (ALL_PROCESSES): Remove macro.
152 (for_each_process, find_process): New function.
153 * inferiors.c (all_processes): Change type to
154 std::list<process_info *>.
155 (find_thread_process): Adjust.
156 (add_process): Likewise.
157 (remove_process): Likewise.
158 (find_process_pid): Likewise.
159 (get_first_process): Likewise.
160 (started_inferior_callback): Remove.
161 (have_started_inferiors_p): Adjust.
162 (attached_inferior_callback): Remove.
163 (have_attached_inferiors_p): Adjust.
164 * linux-low.c (check_zombie_leaders): Likewise.
165 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
166 (x86_linux_update_xmltarget): Adjust.
167 * server.c (handle_query): Likewise.
168 (gdb_reattached_process): Remove.
169 (handle_status): Adjust.
170 (kill_inferior_callback): Likewise.
171 (detach_or_kill_inferior): Remove.
172 (print_started_pid): Likewise.
173 (print_attached_pid): Likewise.
174 (detach_or_kill_for_exit): Update.
175 (process_serial_event): Likewise.
176 * linux-arm-low.c (arm_new_fork): Likewise.
178 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
180 * dll.h: Include <list>.
181 (struct dll_info): Add constructor.
182 <entry>: Remove field.
183 (all_dlls): Change type to std::list<dll_info>.
184 * dll.c: Include <algorithm>.
185 (get_dll): Remove macro.
186 (all_dlls): Change type to std::list<dll_info *>.
187 (free_one_dll): Remove.
188 (match_dll): Likewise.
189 (loaded_dll): Adjust.
190 (unloaded_dll): Adjust to all_dlls type change, use
191 std::find_if. Inline code from match_dll.
192 (clear_dlls): Adjust to all_dlls type change.
193 * server.c (emit_dll_description): Remove.
194 (handle_qxfer_libraries): Adjust to all_dlls type change,
195 integrate emit_dll_description's functionality.
197 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
199 * linux-low.h (struct linux_target_ops) <delete_process>: New
201 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
202 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
203 (struct linux_target_ops): Add delete_process callback.
204 * linux-arm-low.c (arm_delete_process): New.
205 (struct linux_target_ops): Add delete_process callback.
206 * linux-bfin-low.c (struct linux_target_ops): Likewise.
207 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
208 * linux-m32r-low.c (struct linux_target_ops): Likewise.
209 * linux-mips-low.c (mips_linux_delete_process): New.
210 (struct linux_target_ops): Add delete_process callback.
211 * linux-ppc-low.c (struct linux_target_ops): Likewise.
212 * linux-s390-low.c (struct linux_target_ops): Likewise.
213 * linux-sh-low.c (struct linux_target_ops): Likewise.
214 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
215 * linux-tile-low.c (struct linux_target_ops): Likewise.
216 * linux-x86-low.c (x86_linux_delete_process): New.
217 (struct linux_target_ops): Add delete_process callback.
218 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
220 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
222 * linux-aarch64-low.c (the_low_target): Add thread delete
224 * linux-arm-low.c (arm_delete_thread): New function.
225 (the_low_target): Add thread delete callback.
226 * linux-bfin-low.c (the_low_target): Likewise.
227 * linux-crisv32-low.c (the_low_target): Likewise.
228 * linux-low.c (delete_lwp): Invoke delete_thread callback if
230 * linux-low.h (struct linux_target_ops) <delete_thread>: New
232 * linux-m32r-low.c (the_low_target): Add thread delete callback.
233 * linux-mips-low.c (mips_linux_delete_thread): New function.
234 (the_low_target): Add thread delete callback.
235 * linux-ppc-low.c (the_low_target): Likewise.
236 * linux-s390-low.c (the_low_target): Likewise.
237 * linux-sh-low.c (the_low_target): Likewise.
238 * linux-tic6x-low.c (the_low_target): Likewise.
239 * linux-tile-low.c (the_low_target): Likewise.
240 * linux-x86-low.c (the_low_target): Likewise.
241 * linux-xtensa-low.c (the_low_target): Likewise.
243 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
245 * win32-low.c: Include "common-inferior.h".
247 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
249 * inferiors.c (set_inferior_cwd): New function.
250 * server.c (handle_general_set): Handle QSetWorkingDir packet.
251 (handle_query): Inform that QSetWorkingDir is supported.
252 * win32-low.c (create_process): Pass the inferior's cwd to
255 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
257 * inferiors.c (current_inferior_cwd): New global variable.
258 (get_inferior_cwd): New function.
259 * inferiors.h (struct process_info) <cwd>: New field.
261 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
263 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
264 (OBS): Add gdb_tilde_expand.o.
266 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
268 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
269 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
271 2017-09-29 Pedro Alves <palves@redhat.com>
273 * ax.c (gdb_parse_agent_expr): Constify.
274 * ax.h (gdb_parse_agent_expr): Constify.
275 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
277 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
278 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
279 * remote-utils.h (read_ptid): Constify.
280 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
281 (process_point_options, process_serial_event): Constify.
282 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
283 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
284 (cmd_qtbuffer): Constify.
286 2017-09-29 Pedro Alves <palves@redhat.com>
288 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
291 2017-09-29 Pedro Alves <palves@redhat.com>
293 * linux-low.c (handle_extended_wait): Pass parent thread instead
294 of process to thread_db_notice_clone.
295 * linux-low.h (thread_db_notice_clone): Replace parent process
296 parameter with parent thread parameter.
297 * thread-db.c (find_one_thread): Add comment.
298 (thread_db_notice_clone): Replace parent process parameter with
299 parent thread parameter. Temporarily switch to the parent thread.
301 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
303 * gdbthread.h: Include "common-gdbthread.h".
304 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
305 "if" when validating the ptid.
306 * remote-utils.c: Include "gdbthread.h".
307 (prepare_resume_reply): Use "switch_to_thread".
308 * target.c (done_accessing_memory): Likewise.
310 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
312 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
313 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
314 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
315 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
316 s390x-gs-linux64-ipa.o to ipa_obj.
317 * linux-s390-low.c (HWCAP_S390_GS): New define.
318 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
320 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
321 (s390_arch_setup): Check for guarded-storage support and choose
323 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
324 init_registers_s390x_gs_linux64.
325 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
327 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
328 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
330 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
332 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
334 2017-09-21 Kevin Buettner <kevinb@redhat.com>
336 * linux-low.h (struct lwp_info): Add new field, thread_handle.
337 (thread_db_thread_handle): Declare.
338 * linux-low.c (linux_target_ops): Initialize thread_handle.
339 * server.c (handle_qxfer_threads_worker): Add support for
341 * target.h (struct target_ops): Add new function pointer,
343 (target_thread_handle): Define.
344 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
346 (thread_db_thread_handle): New function.
348 2017-09-21 Kevin Buettner <kevinb@redhat.com>
350 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
351 * linux-low.h (thread_db_notice_clone): Declare.
352 * thread-db.c (thread_db_notice_clone): New function.
354 2017-09-21 Pedro Alves <palves@redhat.com>
356 * server.c (gdb_read_memory, handle_status, process_serial_event)
357 (handle_serial_event, handle_target_event): Adjust to
358 set_desired_thread prototype change.
359 * target.c (set_desired_thread): Remove 'use_general' parameter
361 * target.h (set_desired_thread): Remove 'use_general' parameter.
363 2017-09-20 Tom Tromey <tom@tromey.com>
365 * target.c (target_terminal::terminal_state): Define.
366 (target_terminal::init): Rename from target_terminal_init.
367 (target_terminal::inferior): Rename from
368 target_terminal_inferior.
369 (target_terminal::ours): Rename from target_terminal_ours.
370 (target_terminal::ours_for_output, target_terminal::info): New.
372 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
374 * server.c (accumulate_file_name_length): Remove.
375 (emit_dll_description): Adjust to std::string change.
376 (handle_qxfer_libraries): Use std::string to hold document.
378 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
380 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
381 return type of xml_escape_text.
382 * server.c (emit_dll_description): Likewise.
384 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
386 * server.c (captured_main): Accept argument for --selftest.
387 Update run_tests call.
388 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
389 when registering selftests.
391 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
393 * regcache.c (get_thread_regcache): Update code to use "std::vector"
394 instead of "VEC" for "target_desc.reg_defs".
395 (regcache_cpy): Likewise.
396 (registers_to_string): Likewise.
397 (registers_from_string): Likewise.
398 (find_regno): Likewise.
399 (supply_regblock): Likewise.
400 (regcache_raw_read_unsigned): Likewise.
401 * tdesc.c (init_target_desc): Likewise.
402 (tdesc_create_reg): Likewise.
403 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
404 (struct target_desc) <reg_defs>: Convert to "std::vector".
405 (target_desc): Do not initialize "reg_defs".
406 (~target_desc): Update code to use "std::vector" instead of "VEC"
407 for "target_desc.reg_defs".
408 (operator==): Likewise.
410 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
412 * inferiors.h (thread_to_gdb_id): Remove.
413 * inferiors.c (thread_to_gdb_id): Remove.
414 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
415 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
416 lynx_store_registers, lynx_read_memory, lynx_write_memory):
418 * nto-low.c (nto_fetch_registers, nto_store_registers,
419 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
421 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
423 * inferiors.h (gdb_id_to_thread_id): Remove.
424 * inferiors.c (gdb_id_to_thread_id): Remove.
425 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
426 removal. Move pid declaration closer to where it's used.
428 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
430 * server.c (handle_detach): New function.
431 (process_serial_event): Move code out, call handle_detach.
433 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
435 * server.c (require_running): Rename to ...
436 (require_running_or_return): ... this ...
437 (require_running_or_break): ... and this.
438 (handle_query, process_serial_event): Adjust.
440 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
442 * linux-low.c (linux_set_resume_request): Remove unused
445 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
447 * server.c (first_thread_of): Remove.
448 (process_serial_event): Replace usage of first_thread_of with
449 find_any_thread_of_pid.
450 * tracepoint.c (same_process_p): Remove.
451 (gdb_agent_about_to_close): Replace usage of same_process_p with
452 find_any_thread_of_pid.
453 * linux-x86-low.c (same_process_callback): Remove.
454 (x86_arch_setup_process_callback): Replace usage of
455 same_process_callback with find_any_thread_of_pid.
456 * thread-db.c (any_thread_of): Remove.
457 (switch_to_process): Replace usage of any_thread_of with
458 find_any_thread_of_pid.
459 * inferiors.c (thread_pid_matches_callback): Remove.
460 (find_thread_process): Adjust to use find_any_thread_of_pid.
462 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
464 * regcache.c (get_thread_regcache): Guard calls to "memset"
467 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
469 * linux-low.c (handle_extended_wait): Use
470 "allocate_target_description" instead of "XNEW".
471 * linux-x86-low.c (initialize_low_arch): Likewise.
473 2017-09-05 Yao Qi <yao.qi@linaro.org>
475 * configure.srv (srv_i386_regobj): Remove.
476 (srv_amd64_regobj): Remove.
477 (srv_regobj): Set it to "" for x86 non-linux targets.
478 * linux-x86-tdesc.c (i386_linux_read_description):
479 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
480 (init_registers_i386): Remove the declaration.
481 (tdesc_i386): Remove the declaration.
482 (lynx_i386_arch_setup): Call i386_create_target_description.
483 * nto-x86-low.c: Likewise.
484 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
485 [!__x86_64__]: include arch/i386.h.
486 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
488 2017-09-05 Yao Qi <yao.qi@linaro.org>
490 * configure.srv (srv_amd64_linux_xmlfiles): Remove
491 i386/amd64-XXX-linux from it.
493 2017-09-05 Yao Qi <yao.qi@linaro.org>
495 * configure.srv: Empty srv_amd64_linux_regobj if $development is
497 (ipa_amd64_linux_regobj): Remove.
498 (ipa_x32_linux_regobj): Remove.
500 2017-09-05 Yao Qi <yao.qi@linaro.org>
502 * Makefile.in (arch-amd64.o): New rule.
503 * configure.srv: Append arch-amd64.o.
504 * linux-amd64-ipa.c: Include common/x86-xstate.h.
505 (get_ipa_tdesc): Call amd64_linux_read_description.
506 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
507 and init_registers_amd64_XXX.
508 * linux-x86-low.c (x86_linux_read_description): Call
509 amd64_linux_read_description.
510 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
511 (initialize_low_arch): Don't call init_registers_x32_XXX and
512 init_registers_amd64_XXX.
513 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
515 [__x86_64__] (amd64_tdesc_test): New function.
516 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
517 and init_registers_amd64_XXX.
518 * linux-x86-tdesc.c: Include arch/amd64.h.
519 (xcr0_to_tdesc_idx): New function.
520 (i386_linux_read_description): New function.
521 (amd64_get_ipa_tdesc_idx): New function.
522 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
523 (amd64_get_ipa_tdesc): Declare.
525 2017-09-05 Yao Qi <yao.qi@linaro.org>
527 * configure.srv (srv_i386_linux_xmlfiles): Remove
528 i386/i386-XXX-linux.xml from it.
530 2017-09-05 Yao Qi <yao.qi@linaro.org>
532 * configure.srv: Set srv_i386_linux_regobj empty if $development
534 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
535 initialize_low_tdesc.
536 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
537 with #if initialize_low_tdesc.
538 * linux-x86-tdesc-selftest.c: New file.
539 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
541 2017-09-05 Yao Qi <yao.qi@linaro.org>
543 * Makefile.in (arch-i386.o): New rule.
544 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
545 (x86_64-*-linux*): Likewise.
546 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
548 (i386_linux_read_description): Remove code and call
549 i386_create_target_description.
550 * tdesc.c (allocate_target_description): New function.
551 * tdesc.h (set_tdesc_architecture): Remove declaration.
552 (set_tdesc_osabi): Likewise.
554 2017-09-05 Yao Qi <yao.qi@linaro.org>
556 * linux-x86-tdesc.c: Don't include <inttypes.h>.
557 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
558 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
560 * server.c (get_features_xml): Call tdesc_get_features_xml.
561 * tdesc.c (set_tdesc_architecture): New function.
562 (set_tdesc_osabi): New function.
563 (tdesc_get_features_xml): New function.
564 (tdesc_create_feature): Add an argument.
565 * tdesc.h (struct target_desc) <features>: New field.
566 <arch, osabi>: New field.
567 (~target_desc): xfree features, arch, and osabi.
568 (target_desc::oerator==): Don't compare .xmltarget.
569 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
570 (set_tdesc_osabi): Likewise.
571 (tdesc_get_features_xml): Likewise.
573 2017-09-05 Yao Qi <yao.qi@linaro.org>
575 * linux-x86-tdesc.c: Include selftest.h.
576 (i386_tdesc_test): New function.
577 (initialize_low_tdesc): Call selftests::register_test.
578 * tdesc.h: Include regdef.h.
579 (target_desc): Override operator == and !=.
581 2017-09-05 Yao Qi <yao.qi@linaro.org>
583 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
585 * linux-i386-ipa.c: Include common/x86-xstate.h
586 (get_ipa_tdesc): Call i386_linux_read_description.
587 (initialize_low_tracepoint): Don't call init_registers_XXX
588 functions, call initialize_low_tdesc instead.
589 * linux-x86-low.c (x86_linux_read_description): Call
590 i386_linux_read_description.
591 (initialize_low_arch): Don't call init_registers_i386_XXX
592 functions, call initialize_low_tdesc.
593 * linux-x86-tdesc.c: New file.
594 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
595 (i386_get_ipa_tdesc_idx): Declare.
596 (i386_get_ipa_tdesc): Declare.
597 (initialize_low_tdesc): Declare.
599 2017-09-05 Yao Qi <yao.qi@linaro.org>
601 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
604 2017-09-05 Yao Qi <yao.qi@linaro.org>
606 * Makefile.in (IPA_OBJS): Add vec-ipa.o
607 * regcache.c (get_thread_regcache): Use VEC_length.
608 (init_register_cache): Likewise.
609 (regcache_cpy): Likewise.
610 (registers_to_string): Iterate reg_defs via VEC_iterate.
611 (find_regno): Likewise.
612 (find_register_by_number): Use VEC_index.
613 (register_size): Call find_register_by_number.
614 (register_data): Call find_register_by_number.
615 (supply_regblock): Use VEC_length.
616 (regcache_raw_read_unsigned): Likewise.
617 * tdesc.c (init_target_desc): Iterate reg_defs via
619 (default_description): Update initializer.
620 (copy_target_description): Don't update field num_registers.
621 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
622 <num_registers>: Remove.
624 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
626 * Makefile.in (.SECONDARY): Define target.
628 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
630 * linux-low.c (linux_wait_1): Adjust.
631 * server.c (queue_stop_reply_callback): Adjust.
633 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
635 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
636 QEnvironmentUnset and QEnvironmentReset packets.
637 (handle_query): Inform remote that QEnvironmentHexEncoded,
638 QEnvironmentUnset and QEnvironmentReset are supported.
640 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
642 * inferiors.h (inferior_target_data): Rename to ...
643 (thread_target_data): ... this.
644 (inferior_regcache_data): Rename to ...
645 (thread_regcache_data): ... this.
646 (set_inferior_regcache_data): Rename to ...
647 (set_thread_regcache_data): ... this.
648 * inferiors.c (inferior_target_data): Rename to ...
649 (thread_target_data): ... this.
650 (inferior_regcache_data): Rename to ...
651 (thread_regcache_data): ... this.
652 (set_inferior_regcache_data): Rename to ...
653 (set_thread_regcache_data): ... this.
654 (free_one_thread): Update.
655 * linux-low.h (get_thread_lwp): Update.
656 * regcache.c (get_thread_regcache): Update.
657 (regcache_invalidate_thread): Update.
658 (free_register_cache_thread): Update.
659 * win32-i386-low.c (update_debug_registers_callback): Update.
660 (win32_get_current_dr): Update.
661 * win32-low.c (thread_rec): Update.
662 (delete_thread_info): Update.
663 (continue_one_thread): Update.
664 (suspend_one_thread): Update.
666 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
668 * inferiors.c (set_inferior_target_data): Remove.
669 * inferiors.h (set_inferior_target_data): Remove.
671 2017-08-18 Yao Qi <yao.qi@linaro.org>
673 * Makefile.in (OBS): Add selftest.o.
674 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
675 * configure, config.in: Re-generated.
676 * server.c: Include common/sefltest.h.
677 (captured_main): Handle option --selftest.
679 2017-08-09 Yao Qi <yao.qi@linaro.org>
681 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
682 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
683 i386-avx-mpx.o and i386-mmx.o.
684 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
685 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
686 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
687 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
688 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
689 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
690 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
691 i386/amd64-avx-mpx.xml.
693 2017-08-09 Yao Qi <yao.qi@linaro.org>
695 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
696 and x32-avx-avx512.o.
697 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
698 i386/x32-avx-avx512.xml.
700 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
702 * tracepoint.h (enum class fast_tpoint_collect_result): New
704 (fast_tracepoint_collecting): Change return type to
705 fast_tpoint_collect_result.
706 * tracepoint.c (fast_tracepoint_collecting): Likewise.
707 * linux-low.h: Include tracepoint.h.
708 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
709 fast_tpoint_collect_result.
710 * linux-low.c (handle_tracepoints): Adjust.
711 (linux_fast_tracepoint_collecting): Change return type to
712 fast_tpoint_collect_result.
713 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
714 linux_wait_1, stuck_in_jump_pad_callback,
715 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
716 proceed_one_lwp): Adjust to type change.
718 2017-07-10 Yao Qi <yao.qi@linaro.org>
720 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
722 2017-06-29 Yao Qi <yao.qi@linaro.org>
724 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
726 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
728 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
730 * Makefile.in (IPA_OBJS): Sort and format one item per line.
732 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
734 * linux-low.c (linux_create_inferior): Adjust code to access the
735 environment information via 'gdb_environ' class.
736 * lynx-low.c (lynx_create_inferior): Likewise.
737 * server.c (our_environ): Make it an instance of 'gdb_environ'.
738 (get_environ): Return a pointer to 'our_environ'.
739 (captured_main): Initialize 'our_environ'.
740 * server.h (get_environ): Adjust prototype.
741 * spu-low.c (spu_create_inferior): Adjust code to access the
742 environment information via 'gdb_environ' class.
744 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
746 * linux-low.c (linux_read_memory, linux_write_memory): Remove
747 usage of "register" keyword.
749 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
751 * configure: Re-generate.
753 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
755 * configure: Re-generate.
757 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
759 * Makefile.in (COMPILE.pre): Add "-x c++".
761 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
763 * fork-child.c: Conditionally include <signal.h>.
765 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
767 * server.c (handle_general_set): Handle new packet
769 (handle_query): Add "QStartupWithShell" to the list of supported
771 (gdbserver_usage): Add help text explaining the
772 new "--startup-with-shell" and "--no-startup-with-shell" CLI
774 (captured_main): Recognize and act upon the presence of the new
777 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
778 Pedro Alves <palves@redhat.com>
780 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
781 * configure: Regenerate.
782 * configure.srv (srv_linux_obj): Add "fork-child.o" and
784 (i[34567]86-*-lynxos*): Likewise.
785 (spu*-*-*): Likewise.
786 * fork-child.c: New file.
787 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
789 (linux_ptrace_fun): New function.
790 (linux_create_inferior): Adjust function prototype to reflect
791 change on "target.h". Adjust function code to use
793 (linux_request_interrupt): Delete "signal_pid".
794 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
795 (lynx_ptrace_fun): New function.
796 (lynx_create_inferior): Adjust function prototype to reflect
797 change on "target.h". Adjust function code to use
799 * nto-low.c (nto_create_inferior): Adjust function prototype and
800 code to reflect change on "target.h". Update comments.
801 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
802 "common-terminal.h" and "environ.h".
803 (terminal_fd): Moved to fork-child.c.
804 (old_foreground_pgrp): Likewise.
805 (restore_old_foreground_pgrp): Likewise.
806 (last_status): Make it global.
807 (last_ptid): Likewise.
808 (our_environ): New variable.
809 (startup_with_shell): Likewise.
810 (program_name): Likewise.
811 (program_argv): Rename to...
812 (program_args): ...this.
813 (wrapper_argv): New variable.
814 (start_inferior): Delete function.
815 (get_exec_wrapper): New function.
816 (get_exec_file): Likewise.
817 (get_environ): Likewise.
818 (prefork_hook): Likewise.
819 (post_fork_inferior): Likewise.
820 (postfork_hook): Likewise.
821 (postfork_child_hook): Likewise.
822 (handle_v_run): Update code to deal with arguments coming from the
823 remote host. Update calls from "start_inferior" to
825 (captured_main): Likewise. Initialize environment variable. Call
827 * server.h (post_fork_inferior): New prototype.
828 (get_environ): Likewise.
829 (last_status): Declare.
830 (last_ptid): Likewise.
831 (signal_pid): Likewise.
832 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
833 (spu_ptrace_fun): New function.
834 (spu_create_inferior): Adjust function prototype to reflect change
835 on "target.h". Adjust function code to use "fork_inferior".
836 * target.c (target_terminal_init): New function.
837 (target_terminal_inferior): Likewise.
838 (target_terminal_ours): Likewise.
839 * target.h: Include <vector>.
840 (struct target_ops) <create_inferior>: Update prototype.
841 (create_inferior): Update macro.
842 * utils.c (gdb_flush_out_err): New function.
843 * win32-low.c (win32_create_inferior): Adjust function prototype
844 and code to reflect change on "target.h".
846 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
848 * inferiors.c (switch_to_thread): New function.
850 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
852 * Makefile.in (SFILE): Add "common/job-control.c".
853 (OBS): Add "job-control.o".
855 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
857 * Makefile: Remove "@host_makefile_frag@".
859 2017-05-05 Pedro Alves <palves@redhat.com>
861 * configure: Regenerate.
863 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
865 * configure: Regenerate.
867 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
869 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
870 software_single_step change of return type to
871 std::vector<CORE_ADDR>.
872 * linux-low.c (install_software_single_step_breakpoints):
874 * linux-low.h (install_software_single_step_breakpoints):
877 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
879 * remote-utils.c: Include "gdb_termios.h" instead of
881 * terminal.h: Delete file.
883 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
885 * server.c: Include <vector>.
886 <program_argv, wrapper_argv>: Convert to std::vector.
887 (start_inferior): Rewrite function to use C++.
888 (handle_v_run): Likewise. Update code that calculates the argv
889 based on the vRun packet; use C++.
890 (captured_main): Likewise.
892 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
894 * server.c (handle_v_cont): Initialize thread_resume::thread
897 2017-04-05 Pedro Alves <palves@redhat.com>
899 * configure: Regenerate.
901 2017-04-05 Pedro Alves <palves@redhat.com>
903 * gdbreplay.c (sync_error): Constify.
904 * linux-x86-low.c (push_opcode): Constify.
906 2017-04-05 Pedro Alves <palves@redhat.com>
908 * win32-low.c (get_child_debug_event)
909 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
910 Report TARGET_WAITKIND_SPURIOUS instead.
912 2017-04-05 Pedro Alves <palves@redhat.com>
914 * remote-utils.c (remote_prepare, remote_open): Constify.
915 * remote-utils.h (remote_prepare, remote_open): Constify.
916 * server.c (captured_main): Constify 'port' handling.
918 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
920 * Makefile.in (clean): Clear .deps.
922 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
924 * .gitignore: Remove generated files, replace with wildcard.
925 * (clean): Replace removal of generated files with wildcard.
926 (version.c): Replace with...
927 (version-generated.c): ...this.
928 (xml-builtin.c): Replace with...
929 (xml-builtin-generated.c): ...this.
930 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
931 (%.c: *regformats*): Replace with...
932 (%-generated.c: *regformats*): ...this.
934 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
936 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
937 (xtensa_fill_gregset): Call collect_register_by_name for
939 (xtensa_store_gregset): Call supply_register_by_name for
942 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
944 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
945 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
946 (xtensa_store_gregset): Call supply_register for all registers in
947 a0_regnum..a0_regnum + C0_NREGS range.
949 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
951 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
952 (ax-ipa.o: ax.c): Remove.
953 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
954 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
955 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
956 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
957 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
959 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
961 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
962 (print-utils-ipa.o: ../common/print-utils.c): Remove.
963 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
964 (errors-ipa.o: ../common/errors.c): Remove.
965 (format-ipa.o: ../common/format.c): Remove.
966 (common-utils-ipa.o: ../common/common-utils.c): Remove.
968 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
970 * Makefile.in (%-ipa.o: %.c): New rule.
971 (tracepoint-ipa.o: tracepoint.c): Remove.
972 (utils-ipa.o: utils.c): Remove.
973 (remote-utils-ipa.o: remote-utils.c): Remove.
974 (regcache-ipa.o: regcache.c): Remove.
975 (i386-linux-ipa.o: i386-linux.c): Remove.
976 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
977 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
978 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
979 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
980 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
981 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
982 (amd64-linux-ipa.o: amd64-linux.c): Remove.
983 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
984 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
985 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
986 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
987 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
988 (aarch64-ipa.o: aarch64.c): Remove.
989 (s390-linux32-ipa.o: s390-linux32.c): Remove.
990 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
991 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
992 (s390-linux64-ipa.o: s390-linux64.c): Remove.
993 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
994 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
995 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
996 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
997 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
998 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
999 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1000 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1001 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1002 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1003 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1004 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1005 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1006 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1007 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1008 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1009 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1010 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1011 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1012 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1013 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1014 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1015 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1016 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1017 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1018 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1019 (tdesc-ipa.o: tdesc.c): Remove.
1020 (x32-linux-ipa.o: x32-linux.c): Remove.
1021 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1022 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1024 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1026 * Makefile.in (%.o: ../arch/%.c): New rule.
1027 (arm.o: ../arch/arm.c): Remove.
1028 (arm-linux.o: ../arch/arm-linux.c): Remove.
1029 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1030 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1032 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1034 * Makefile.in (%.o: ../nat/%.c): New rule.
1035 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1036 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1037 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1038 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1039 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1040 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1041 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1042 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1043 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1044 (linux-personality.o: ../nat/linux-personality.c): Remove.
1045 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1046 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1047 (x86-linux.o: ../nat/x86-linux.c): Remove.
1048 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1049 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1051 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1053 * Makefile.in (%.o: ../common/%.c): New rule.
1054 (signals.o: ../common/signals.c): Remove.
1055 (print-utils.o: ../common/print-utils.c): Remove.
1056 (rsp-low.o: ../common/rsp-low.c): Remove.
1057 (common-utils.o: ../common/common-utils.c): Remove.
1058 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1059 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1060 (vec.o: ../common/vec.c): Remove.
1061 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1062 (xml-utils.o: ../common/xml-utils.c): Remove.
1063 (ptid.o: ../common/ptid.c): Remove.
1064 (buffer.o: ../common/buffer.c): Remove.
1065 (format.o: ../common/format.c): Remove.
1066 (filestuff.o: ../common/filestuff.c): Remove.
1067 (agent.o: ../common/agent.c): Remove.
1068 (errors.o: ../common/errors.c): Remove.
1069 (environ.o: ../common/environ.c): Remove.
1070 (common-debug.o: ../common/common-debug.c): Remove.
1071 (cleanups.o: ../common/cleanups.c): Remove.
1072 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1073 (fileio.o: ../common/fileio.c): Remove.
1074 (common-regcache.o: ../common/common-regcache.c): Remove.
1075 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1076 (new-op.o: ../common/new-op.c): Remove.
1077 (btrace-common.o: ../common/btrace-common.c): Remove.
1079 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1081 * Makefile.in (%.o: ../target/%.c): New rule.
1082 (waitstatus.o: ../target/waitstatus.c): Remove.
1084 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1087 (%.c: ../regformats/%.dat,
1088 (%.c: ../regformats/arm/%.dat,
1089 (%.c: ../regformats/i386/%.dat,
1090 (%.c: ../regformats/rs6000/%.dat): New rules.
1091 (aarch64.c): Remove.
1092 (reg-arm.c): Remove.
1093 (arm-with-iwmmxt.c): Remove.
1094 (arm-with-vfpv2.c): Remove.
1095 (arm-with-vfpv3.c): Remove.
1096 (arm-with-neon.c): Remove.
1097 (reg-bfin.c): Remove.
1098 (reg-cris.c): Remove.
1099 (reg-crisv32.c): Remove.
1101 (i386-linux.c): Remove.
1102 (i386-avx.c): Remove.
1103 (i386-avx-linux.c): Remove.
1104 (i386-avx-avx512.c): Remove.
1105 (i386-avx-avx512-linux.c): Remove.
1106 (i386-mpx.c): Remove.
1107 (i386-mpx-linux.c): Remove.
1108 (i386-avx-mpx-avx512-pku.c): Remove.
1109 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1110 (i386-avx-mpx.c): Remove.
1111 (i386-avx-mpx-linux.c): Remove.
1112 (i386-mmx.c): Remove.
1113 (i386-mmx-linux.c): Remove.
1114 (reg-ia64.c): Remove.
1115 (reg-m32r.c): Remove.
1116 (reg-m68k.c): Remove.
1118 (mips-linux.c): Remove.
1119 (mips-dsp-linux.c): Remove.
1120 (mips64-linux.c): Remove.
1121 (mips64-dsp-linux.c): Remove.
1122 (nios2-linux.c): Remove.
1123 (powerpc-32.c): Remove.
1124 (powerpc-32l.c): Remove.
1125 (powerpc-altivec32l.c): Remove.
1126 (powerpc-cell32l.c): Remove.
1127 (powerpc-vsx32l.c): Remove.
1128 (powerpc-isa205-32l.c): Remove.
1129 (powerpc-isa205-altivec32l.c): Remove.
1130 (powerpc-isa205-vsx32l.c): Remove.
1131 (powerpc-e500l.c): Remove.
1132 (powerpc-64l.c): Remove.
1133 (powerpc-altivec64l.c): Remove.
1134 (powerpc-cell64l.c): Remove.
1135 (powerpc-vsx64l.c): Remove.
1136 (powerpc-isa205-64l.c): Remove.
1137 (powerpc-isa205-altivec64l.c): Remove.
1138 (powerpc-isa205-vsx64l.c): Remove.
1139 (s390-linux32.c): Remove.
1140 (s390-linux32v1.c): Remove.
1141 (s390-linux32v2.c): Remove.
1142 (s390-linux64.c): Remove.
1143 (s390-linux64v1.c): Remove.
1144 (s390-linux64v2.c): Remove.
1145 (s390-te-linux64.c): Remove.
1146 (s390-vx-linux64.c): Remove.
1147 (s390-tevx-linux64.c): Remove.
1148 (s390x-linux64.c): Remove.
1149 (s390x-linux64v1.c): Remove.
1150 (s390x-linux64v2.c): Remove.
1151 (s390x-te-linux64.c): Remove.
1152 (s390x-vx-linux64.c): Remove.
1153 (s390x-tevx-linux64.c): Remove.
1154 (tic6x-c64xp-linux.c): Remove.
1155 (tic6x-c64x-linux.c): Remove.
1156 (tic6x-c62x-linux.c): Remove.
1158 (reg-sparc64.c): Remove.
1159 (reg-spu.c): Remove.
1161 (amd64-linux.c): Remove.
1162 (amd64-avx.c): Remove.
1163 (amd64-avx-linux.c): Remove.
1164 (amd64-avx-avx512.c): Remove.
1165 (amd64-avx-avx512-linux.c): Remove.
1166 (amd64-mpx.c): Remove.
1167 (amd64-mpx-linux.c): Remove.
1168 (amd64-avx-mpx-avx512-pku.c): Remove.
1169 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1170 (amd64-avx-mpx.c): Remove.
1171 (amd64-avx-mpx-linux.c): Remove.
1173 (x32-linux.c): Remove.
1174 (x32-avx.c): Remove.
1175 (x32-avx-linux.c): Remove.
1176 (x32-avx-avx512.c): Remove.
1177 (x32-avx-avx512-linux.c): Remove.
1178 (reg-xtensa.c): Remove.
1179 (reg-tilegx.c): Remove.
1180 (reg-tilegx32.c): Remove.
1182 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1184 * Makefile.in (SFILES): Add "common/environ.c".
1185 (OBJS): Add "common/environ.h".
1187 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1189 * configure.ac: Check if the fs_base and gs_base members of
1190 `struct user_regs_struct' exist.
1191 * config.in: Regenerated.
1192 * configure: Likewise.
1194 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1196 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1198 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1199 (get_next_pcs_syscall_next_pc): Likewise.
1201 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1203 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1204 * nto-x86-low.c: Likewise.
1206 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1208 * Makefile.in: Include disable-implicit-rules.mk.
1210 2016-11-23 Pedro Alves <palves@redhat.com>
1212 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1213 (debug_vprintf): Use std::chrono::steady_clock instead of
1214 gettimeofday. Use '.' instead of ':'.
1215 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1216 (get_timestamp): Use std::chrono::steady_clock instead of
1219 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1221 * Makefile.in: Fix whitespace formatting.
1223 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1225 * Makefile.in (SFILES, OBS): Flatten list and order
1228 2016-11-23 Pedro Alves <palves@redhat.com>
1230 * event-loop.c (handle_file_event): Use warning.
1231 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1232 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1235 2016-11-23 Pedro Alves <palves@redhat.com>
1237 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1239 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1240 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1241 debug_printf and debug_flush for debug output.
1242 * server.c (handle_general_set): Likewise.
1243 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1246 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1248 * Makefile.in (.c.o): Replace rule with ...
1249 (%.o: %.c): ... this one.
1251 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1253 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1254 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1256 * configure.ac: Remove checks for the make program.
1257 * configure: Re-generate.
1259 2016-10-28 Pedro Alves <palves@redhat.com>
1261 * Makefile.in (CXX_DIALECT): Get from configure.
1262 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1263 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1264 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1265 * config.in: Regenerate.
1266 * configure: Regenerate.
1268 2016-10-27 Yao Qi <yao.qi@linaro.org>
1270 * linux-low.c (linux_supports_range_stepping): Return true if
1271 can_software_single_step return true.
1273 2016-10-27 Yao Qi <yao.qi@linaro.org>
1275 * inferiors.c (find_inferior_in_random): New function.
1276 * inferiors.h (find_inferior_in_random): Declare.
1277 * linux-low.c (linux_wait_for_event_filtered): Call
1278 find_inferior_in_random instead of find_inferior.
1280 2016-10-27 Yao Qi <yao.qi@linaro.org>
1282 * linux-low.c (linux_wait_1): If single-step breakpoints are
1283 inserted, remove them.
1285 2016-10-26 Pedro Alves <palves@redhat.com>
1287 * linux-low.c (handle_extended_wait): Link parent/child fork
1289 (linux_wait_1): Unlink them.
1290 (linux_set_resume_request): Ignore resume requests for
1291 already-resumed and unhandled fork child threads.
1292 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1293 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1295 (handle_v_requests) <vCont>: Don't call require_running.
1296 * server.h (in_queued_stop_replies): New declaration.
1298 2016-10-24 Yao Qi <yao.qi@linaro.org>
1301 * linux-aarch64-low.c (append_insns): Cast the return value to
1304 2016-10-10 Yao Qi <yao.qi@linaro.org>
1306 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1308 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1310 * target.c (target_supports_multi_process): New function, moved
1312 * target.h (target_supports_multi_process): ... here. Remove
1315 2016-10-05 Tom Tromey <tom@tromey.com>
1318 * tracepoint.c (handle_tracepoint_bkpts): Check
1319 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1321 2016-10-05 Yao Qi <yao.qi@linaro.org>
1323 * configure.srv: Update the path of arm-*.xml files.
1325 2016-10-05 Terry Guo <terry.guo@arm.com>
1326 Yao Qi <yao.qi@linaro.org>
1328 * Makefile.in: Adjust the path of rules.
1329 * configure.srv: Update the path of xml files.
1330 * regformats/arm-with-iwmmxt.dat: Regenerated.
1331 * regformats/arm-with-neon.dat: Likewise.
1332 * regformats/arm-with-vfpv2.dat: Likewise.
1333 * regformats/arm-with-vfpv3.dat Likewise.
1335 2016-09-30 Yao Qi <yao.qi@linaro.org>
1338 * target.c (target_stop_and_wait): Don't call
1339 target_continue_no_signal, use resume_stop instead.
1341 2016-09-26 Yao Qi <yao.qi@linaro.org>
1343 * linux-low.c (linux_wait_1): Call debug_exit.
1345 2016-09-23 Pedro Alves <palves@redhat.com>
1347 * Makefile.in (SFILES): Add common/new-op.c.
1348 (OBS): Add common/new-op.o.
1349 (new-op.o): New rule.
1351 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1353 * .gitinore: Ignore more files.
1355 2016-09-21 Yao Qi <yao.qi@linaro.org>
1357 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1360 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1362 * server.c (start_inferior): Call target_mourn_inferior instead of
1363 mourn_inferior; pass ptid_t argument to it.
1365 (handle_target_event): Likewise.
1366 * target.c (target_mourn_inferior): New function.
1367 * target.h (mourn_inferior): Delete macro.
1369 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1371 * linux-low.c (lwp_is_stepping): New function.
1373 2016-09-06 Carl Love <cel@us.ibm.com>
1375 * server.c (start_inferior): Fixed comment, requested comment change
1376 didn't get updated correctly. Removed reference to ptrace () call as
1377 it is only true on Linux systems.
1379 2016-09-06 Carl Love <cel@us.ibm.com>
1381 * server.c (start_inferior): Do not call
1382 function target_post_create_inferior () if the
1383 inferior process has already exited.
1385 2016-09-05 Pedro Alves <palves@redhat.com>
1387 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1388 (COMPILE.pre, CC_LD): Use CXX directly.
1389 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1390 * acinclude.m4: Don't include build-with-cxx.m4.
1391 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1392 * configure: Regenerate.
1394 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1397 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1398 call writing data to own_buf.
1400 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1402 * target.c (mywait): Call target_wait instead of
1404 (target_wait): New function.
1406 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1408 * server.c (start_inferior): New variable 'ptid'. Replace calls
1409 to the_target->resume by target_continue{,_no_signal}, depending
1411 * target.c (target_stop_and_wait): Call target_continue_no_signal
1412 instead of the_target->resume.
1413 (target_continue): New function.
1415 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1417 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1419 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1422 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1424 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1425 * linux-arm-low.c (ps_get_thread_area): Likewise.
1426 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1427 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1428 * linux-mips-low.c (ps_get_thread_area): Likewise.
1429 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1430 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1431 * linux-x86-low.c (ps_get_thread_area): Likewise.
1432 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1434 2016-08-19 Pedro Alves <palves@redhat.com>
1436 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1438 2016-08-19 Pedro Alves <palves@redhat.com>
1440 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1441 comment. Use memcpy instead of casting through unsigned long.
1443 2016-08-19 Pedro Alves <palves@redhat.com>
1445 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1446 allocating around 0x80000000.
1448 2016-08-19 Pedro Alves <palves@redhat.com>
1451 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1452 (x32-avx512-linux-ipa.o): New rules.
1453 * configure.ac (x86_64-*-linux*): New x32 check.
1454 * configure.srv (ipa_x32_linux_regobj): New.
1455 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1456 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1458 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1460 * configure: Regenerate.
1462 2016-08-09 Pedro Alves <palves@redhat.com>
1465 * Makefile.in (OBS): Add signals-state-save-restore.o.
1466 (signals-state-save-restore.o): New rule.
1467 * config.in: Regenerate.
1468 * configure: Regenerate.
1469 * linux-low.c: Include "signals-state-save-restore.h".
1470 (linux_create_inferior): Call
1471 restore_original_signals_state.
1472 * server.c: Include "dispositions-save-restore.h".
1473 (captured_main): Call save_original_signals_state.
1475 2016-08-05 Pedro Alves <palves@redhat.com>
1477 * configure: Regenerate.
1479 2016-08-04 Yao Qi <yao.qi@linaro.org>
1481 * linux-low.c (regsets_fetch_inferior_registers): Check
1482 errno is ESRCH or not.
1484 2016-08-02 Yao Qi <yao.qi@linaro.org>
1486 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1487 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1488 (thread_db_load_search): Update.
1489 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1490 td_ta_set_event and td_ta_event_getmsg.
1492 2016-07-26 Pedro Alves <palves@redhat.com>
1495 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1496 of unsigned long for 64-bit registers and use uint32_t instead of
1497 unsigned int for 32-bit registers.
1499 2016-07-26 Pedro Alves <palves@redhat.com>
1501 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1504 2016-07-21 Tom Tromey <tom@tromey.com>
1506 * configure: Rebuild.
1508 2016-07-21 Yao Qi <yao.qi@linaro.org>
1510 * mem-break.c (find_gdb_breakpoint): Cast bp to
1511 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1513 2016-07-21 Yao Qi <yao.qi@linaro.org>
1515 * server.c (handle_v_requests): Support s and S actions
1516 if target_supports_software_single_step return true.
1518 2016-07-21 Yao Qi <yao.qi@linaro.org>
1520 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1521 is resume_step, call maybe_hw_step.
1522 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1524 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1526 (proceed_one_lwp): If resume request is resume_step, install
1527 reinsert breakpoints and call maybe_hw_step.
1529 2016-07-21 Yao Qi <yao.qi@linaro.org>
1531 * linux-low.c (proceed_one_lwp): Declare.
1532 (linux_resume_one_thread): Remove local variable 'step'.
1533 Lift code enqueue signal. Call proceed_one_lwp instead of
1534 linux_resume_one_lwp.
1536 2016-07-21 Yao Qi <yao.qi@linaro.org>
1538 * linux-low.c (linux_resume_one_thread): Call
1539 enqueue_pending_signal.
1541 2016-07-21 Yao Qi <yao.qi@linaro.org>
1543 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1544 * inferiors.c (do_restore_current_thread_cleanup): New function.
1545 (make_cleanup_restore_current_thread): Likewise.
1546 * linux-low.c (install_software_single_step_breakpoints): Call
1547 make_cleanup_restore_current_thread. Switch current_thread to
1550 2016-07-21 Yao Qi <yao.qi@linaro.org>
1552 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1553 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1554 (clone_one_breakpoint): Likewise.
1555 (delete_reinsert_breakpoints): Change parameter to thread.
1557 (has_reinsert_breakpoints): Likewise.
1558 (uninsert_reinsert_breakpoints): Likewise.
1559 (reinsert_reinsert_breakpoints): Likewise.
1560 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1561 (delete_reinsert_breakpoints): Likewise.
1562 (reinsert_reinsert_breakpoints): Likewise.
1563 (uninsert_reinsert_breakpoints): Likewise.
1564 (has_reinsert_breakpoints): Likewise.
1566 2016-07-21 Yao Qi <yao.qi@linaro.org>
1568 * inferiors.c (get_thread_process): Make parameter const.
1569 * inferiors.h (get_thread_process): Update declaration.
1570 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1571 Add new parameters child_thread and parent_thread. Callers
1573 * mem-break.h (clone_all_breakpoints): Update declaration.
1575 2016-07-21 Yao Qi <yao.qi@linaro.org>
1577 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1578 <command_list, handler>: Remove.
1579 (struct gdb_breakpoint): New.
1580 (struct other_breakpoint): New.
1581 (struct reinsert_breakpoint): New.
1582 (is_gdb_breakpoint): New function.
1583 (any_persistent_commands): Update command_list if
1584 is_gdb_breakpoint returns true.
1585 (set_breakpoint): Create breakpoints according to their types.
1586 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1587 (set_gdb_breakpoint_1): Likewise.
1588 (set_gdb_breakpoint): Likewise.
1589 (clear_breakpoint_conditions): Change parameter type to
1590 'struct gdb_breakpoint *'.
1591 (clear_breakpoint_commands): Likewise.
1592 (clear_breakpoint_conditions_and_commands): Likewise.
1593 (add_condition_to_breakpoint): Likewise.
1594 (add_breakpoint_condition): Likewise.
1595 (add_commands_to_breakpoint): Likewise.
1596 (check_breakpoints): Check other_breakpoint.
1597 (clone_one_breakpoint): Clone breakpopint according to its type.
1598 * mem-break.h (struct gdb_breakpoint): Declare.
1599 (set_gdb_breakpoint): Update declaration.
1600 (clear_breakpoint_conditions_and_commands): Likewise.
1601 (add_breakpoint_condition): Likewise.
1602 (add_breakpoint_commands): Likewise.
1603 * server.c (process_point_options): Change parameter type to
1604 'struct gdb_breakpoint *'.
1606 2016-07-21 Yao Qi <yao.qi@linaro.org>
1608 * mem-break.c (set_breakpoint_at): Rename it to ...
1609 (set_breakpoint_type_at): ... it.
1610 (set_breakpoint_at): Call set_breakpoint_type_at.
1611 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1612 * mem-break.h (set_breakpoint_at): Update comments.
1614 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1616 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1618 (nios2_store_gregset): Likewise.
1620 2016-07-01 Pedro Alves <palves@redhat.com>
1621 Antoine Tremblay <antoine.tremblay@ericsson.com>
1623 * linux-low.c: Change interface to take the target lwp_info
1624 pointer directly and return void. Handle detaching from a zombie
1626 (linux_detach_lwp_callback): New function.
1627 (linux_detach): Detach from the leader thread after detaching from
1630 2016-06-28 Yao Qi <yao.qi@linaro.org>
1632 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1633 for variable new_offset.
1634 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1635 (aarch64_ftrace_insn_reloc_cb): Likewise.
1636 (aarch64_ftrace_insn_reloc_tb): Likewise.
1637 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1638 PRIx64 instead of PRIx32.
1640 2016-06-28 Yao Qi <yao.qi@linaro.org>
1642 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1643 (the_low_target): Install arm_get_syscall_trapinfo.
1645 2016-06-28 Yao Qi <yao.qi@linaro.org>
1647 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1649 (the_low_target): Install aarch64_get_syscall_trapinfo.
1651 2016-06-28 Yao Qi <yao.qi@linaro.org>
1653 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1655 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1656 Remove parameter sysno.
1657 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1660 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1662 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1663 (s390_emit_ne_goto): Likewise.
1664 (s390_emit_lt_goto): Likewise.
1665 (s390_emit_le_goto): Likewise.
1666 (s390_emit_gt_goto): Likewise.
1667 (s390_emit_ge_goto): Likewise.
1668 (s390x_emit_eq_goto): Likewise.
1669 (s390x_emit_ne_goto): Likewise.
1670 (s390x_emit_lt_goto): Likewise.
1671 (s390x_emit_le_goto): Likewise.
1672 (s390x_emit_gt_goto): Likewise.
1673 (s390x_emit_ge_goto): Likewise.
1674 (s390_emit_ops_impl): Mark variable static.
1675 (s390x_emit_ops): Likewise.
1677 2016-06-17 Yao Qi <yao.qi@linaro.org>
1679 * linux-low.c (handle_extended_wait): Call
1680 uninsert_reinsert_breakpoints for the parent process. Remove
1681 reinsert breakpoints from the child process. Reinsert them to
1682 the parent process when vfork is done.
1683 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1684 (reinsert_reinsert_breakpoints): New function.
1685 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1686 (reinsert_reinsert_breakpoints): Declare.
1688 2016-06-17 Yao Qi <yao.qi@linaro.org>
1690 * linux-low.c (handle_extended_wait): If the parent is doing
1691 step-over, remove the reinsert breakpoints from the forked child.
1693 2016-06-17 Yao Qi <yao.qi@linaro.org>
1695 * linux-low.c (unsuspend_all_lwps): Declare.
1696 (linux_low_filter_event): If thread exited, call finish_step_over.
1697 If step-over is finished, unsuspend other threads.
1699 2016-06-17 Yao Qi <yao.qi@linaro.org>
1701 * linux-low.c (linux_resume_one_lwp_throw): Assert
1702 has_reinsert_breakpoints returns false.
1703 * mem-break.c (delete_disabled_breakpoints): Assert
1704 bp type isn't reinsert_breakpoint.
1706 2016-06-17 Yao Qi <yao.qi@linaro.org>
1708 * linux-low.c (maybe_hw_step): New function.
1709 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1710 (finish_step_over): Switch current_thread to lwp temporarily,
1711 and assert has_reinsert_breakpoints returns true.
1712 (proceed_one_lwp): Call maybe_hw_step.
1713 * mem-break.c (has_reinsert_breakpoints): New function.
1714 * mem-break.h (has_reinsert_breakpoints): Declare.
1716 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1718 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1720 2016-05-17 Yao Qi <yao.qi@linaro.org>
1722 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1723 instead of find_inferior.
1725 2016-05-05 Yao Qi <yao.qi@linaro.org>
1727 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1728 Initialize res to zero.
1730 2016-05-05 Yao Qi <yao.qi@linaro.org>
1732 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1735 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1737 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1738 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1739 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1741 2016-04-28 Par Olsson <par.olsson@windriver.com>
1742 Simon Marchi <simon.marchi@ericsson.com>
1744 * tracepoint.c (write_inferior_int8): New function.
1745 (cmd_qtenable_disable): Write enable flag using
1746 write_inferior_int8.
1748 2016-04-25 Yao Qi <yao.qi@linaro.org>
1750 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1751 (need_step_over_p): Return zero if the LWP has pending signals
1752 can be delivered on software single step target.
1754 2016-04-25 Yao Qi <yao.qi@linaro.org>
1756 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1757 return instead of error.
1759 2016-04-22 Yao Qi <yao.qi@linaro.org>
1761 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1764 2016-04-22 Yao Qi <yao.qi@linaro.org>
1766 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1767 signal when stepping over breakpoint with software single
1770 2016-04-21 Pedro Alves <palves@redhat.com>
1772 * linux-s390-low.c (s390_collect_ptrace_register)
1773 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1775 (s390_check_regset): Use void * instead of gdb_byte *.
1777 2016-04-20 Pedro Alves <palves@redhat.com>
1779 * configure: Renegerate.
1781 2016-04-20 Yao Qi <yao.qi@linaro.org>
1783 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1784 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1786 (arm_store_gregset): Likewise.
1788 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1790 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1791 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1792 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1793 (amd64-avx-mpx-linux.c): New rules.
1794 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1795 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1796 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1797 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1798 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1799 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1800 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1801 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1802 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1803 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1804 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1805 * linux-x86-low.c (x86_linux_read_description): Add case for
1806 X86_XSTATE_AVX_MPX_MASK.
1807 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1808 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1809 init_registers_i386_avx_mpx_linux.
1810 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1811 (initialize_low_tracepoint): Call
1812 init_registers_i386_avx_mpx_linux.
1813 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1814 (initialize_low_tracepoint): Call
1815 init_registers_amd64_avx_mpx_linux.
1816 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1817 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1818 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1821 2016-04-18 Pedro Alves <palves@redhat.com>
1823 * configure: Regenerate.
1825 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1827 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1828 (aarch64_emit_sub): Likewise.
1830 2016-04-12 Pedro Alves <palves@redhat.com>
1832 * utils.c (prepare_to_throw_exception): Delete.
1834 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1836 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1838 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1840 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1842 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1844 * linux-aarch64-ipa.c: Add <elf.h> include.
1845 * linux-ppc-ipa.c: Add <elf.h> include.
1846 * linux-s390-ipa.c: Add <elf.h> include.
1848 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1850 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1851 (get_raw_reg_ptr): Likewise.
1852 (get_trace_state_variable_value_ptr): Likewise.
1853 (set_trace_state_variable_value_ptr): Likewise.
1854 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1857 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1858 Marcin Kościelnicki <koriakin@0x04.net>
1861 * linux-ppc-low.c (emit_insns): New function.
1862 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1863 (ppc_emit_prologue): New function.
1864 (ppc_emit_epilogue): New function.
1865 (ppc_emit_add): New function.
1866 (ppc_emit_sub): New function.
1867 (ppc_emit_mul): New function.
1868 (ppc_emit_lsh): New function.
1869 (ppc_emit_rsh_signed): New function.
1870 (ppc_emit_rsh_unsigned): New function.
1871 (ppc_emit_ext): New function.
1872 (ppc_emit_zero_ext): New function.
1873 (ppc_emit_log_not): New function.
1874 (ppc_emit_bit_and): New function.
1875 (ppc_emit_bit_or): New function.
1876 (ppc_emit_bit_xor): New function.
1877 (ppc_emit_bit_not): New function.
1878 (ppc_emit_equal): New function.
1879 (ppc_emit_less_signed): New function.
1880 (ppc_emit_less_unsigned): New function.
1881 (ppc_emit_ref): New function.
1882 (ppc_emit_const): New function.
1883 (ppc_emit_reg): New function.
1884 (ppc_emit_pop): New function.
1885 (ppc_emit_stack_flush): New function.
1886 (ppc_emit_swap): New function.
1887 (ppc_emit_stack_adjust): New function.
1888 (ppc_emit_call): New function.
1889 (ppc_emit_int_call_1): New function.
1890 (ppc_emit_void_call_2): New function.
1891 (ppc_emit_if_goto): New function.
1892 (ppc_emit_goto): New function.
1893 (ppc_emit_eq_goto): New function.
1894 (ppc_emit_ne_goto): New function.
1895 (ppc_emit_lt_goto): New function.
1896 (ppc_emit_le_goto): New function.
1897 (ppc_emit_gt_goto): New function.
1898 (ppc_emit_ge_goto): New function.
1899 (ppc_write_goto_address): New function.
1900 (ppc_emit_ops_impl): New static variable.
1901 (ppc64v1_emit_prologue): New function.
1902 (ppc64v2_emit_prologue): New function.
1903 (ppc64_emit_epilogue): New function.
1904 (ppc64_emit_add): New function.
1905 (ppc64_emit_sub): New function.
1906 (ppc64_emit_mul): New function.
1907 (ppc64_emit_lsh): New function.
1908 (ppc64_emit_rsh_signed): New function.
1909 (ppc64_emit_rsh_unsigned): New function.
1910 (ppc64_emit_ext): New function.
1911 (ppc64_emit_zero_ext): New function.
1912 (ppc64_emit_log_not): New function.
1913 (ppc64_emit_bit_and): New function.
1914 (ppc64_emit_bit_or): New function.
1915 (ppc64_emit_bit_xor): New function.
1916 (ppc64_emit_bit_not): New function.
1917 (ppc64_emit_equal): New function.
1918 (ppc64_emit_less_signed): New function.
1919 (ppc64_emit_less_unsigned): New function.
1920 (ppc64_emit_ref): New function.
1921 (ppc64_emit_const): New function.
1922 (ppc64v1_emit_reg): New function.
1923 (ppc64v2_emit_reg): New function.
1924 (ppc64_emit_pop): New function.
1925 (ppc64_emit_stack_flush): New function.
1926 (ppc64_emit_swap): New function.
1927 (ppc64v1_emit_call): New function.
1928 (ppc64v2_emit_call): New function.
1929 (ppc64v1_emit_int_call_1): New function.
1930 (ppc64v2_emit_int_call_1): New function.
1931 (ppc64v1_emit_void_call_2): New function.
1932 (ppc64v2_emit_void_call_2): New function.
1933 (ppc64_emit_if_goto): New function.
1934 (ppc64_emit_eq_goto): New function.
1935 (ppc64_emit_ne_goto): New function.
1936 (ppc64_emit_lt_goto): New function.
1937 (ppc64_emit_le_goto): New function.
1938 (ppc64_emit_gt_goto): New function.
1939 (ppc64_emit_ge_goto): New function.
1940 (ppc64v1_emit_ops_impl): New static variable.
1941 (ppc64v2_emit_ops_impl): New static variable.
1942 (ppc_emit_ops): New function.
1943 (linux_low_target): Wire in ppc_emit_ops.
1945 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1946 Marcin Kościelnicki <koriakin@0x04.net>
1949 * Makefile.in: Add powerpc-*-ipa.o
1950 * configure.srv: Add ipa_obj for powerpc*-linux.
1951 * linux-ppc-ipa.c: New file.
1952 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1954 (PPC_FIELD): New macro.
1955 (PPC_SEXT): New macro.
1956 (PPC_OP6): New macro.
1957 (PPC_BO): New macro.
1958 (PPC_LI): New macro.
1959 (PPC_BD): New macro.
1960 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1961 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1962 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1963 (ppc_get_thread_area): New function.
1964 (is_elfv2_inferior): New function.
1965 (gen_ds_form): New function.
1966 (GEN_STD): New macro.
1967 (GEN_STDU): New macro.
1968 (GEN_LD): New macro.
1969 (GEN_LDU): New macro.
1970 (gen_d_form): New function.
1971 (GEN_ADDI): New macro.
1972 (GEN_ADDIS): New macro.
1973 (GEN_LI): New macro.
1974 (GEN_LIS): New macro.
1975 (GEN_ORI): New macro.
1976 (GEN_ORIS): New macro.
1977 (GEN_LWZ): New macro.
1978 (GEN_STW): New macro.
1979 (GEN_STWU): New macro.
1980 (gen_xfx_form): New function.
1981 (GEN_MFSPR): New macro.
1982 (GEN_MTSPR): New macro.
1983 (GEN_MFCR): New macro.
1984 (GEN_MTCR): New macro.
1985 (GEN_SYNC): New macro.
1986 (GEN_LWSYNC): New macro.
1987 (gen_x_form): New function.
1988 (GEN_OR): New macro.
1989 (GEN_MR): New macro.
1990 (GEN_LWARX): New macro.
1991 (GEN_STWCX): New macro.
1992 (GEN_CMPW): New macro.
1993 (gen_md_form): New function.
1994 (GEN_RLDICL): New macro.
1995 (GEN_RLDICR): New macro.
1996 (gen_i_form): New function.
1998 (GEN_BL): New macro.
1999 (gen_b_form): New function.
2000 (GEN_BNE): New macro.
2001 (GEN_LOAD): New macro.
2002 (GEN_STORE): New macro.
2003 (gen_limm): New function.
2004 (gen_atomic_xchg): New function.
2005 (gen_call): New function.
2006 (ppc_relocate_instruction): New function.
2007 (ppc_install_fast_tracepoint_jump_pad): New function.
2008 (ppc_get_min_fast_tracepoint_insn_len): New function.
2009 (ppc_get_ipa_tdesc_idx): New function.
2010 (the_low_target): Wire in the new functions.
2011 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2013 * linux-ppc-tdesc.h: New file.
2015 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2017 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2018 (alloc_jump_pad_buffer): New function.
2019 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2020 (alloc_jump_pad_buffer): New function.
2021 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2022 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2023 (alloc_jump_pad_buffer): New function.
2024 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2025 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2026 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2027 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2029 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2031 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2032 * linux-amd64-ipa.c: Likewise.
2033 * linux-i386-ipa.c: Likewise.
2034 * linux-s390-ipa.c: Likewise.
2035 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2036 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2037 set_trace_state_variable_value_ptr.
2038 (struct ipa_sym_addresses): Likewise.
2039 (symbol_list): Likewise.
2040 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2041 accessing gdb_collect directly.
2042 (gdb_collect_ptr_type): New typedef.
2043 (get_raw_reg_ptr_type): New typedef.
2044 (get_trace_state_variable_value_ptr_type): New typedef.
2045 (set_trace_state_variable_value_ptr_type): New typedef.
2046 (gdb_collect_ptr): New global.
2047 (get_raw_reg_ptr): New global.
2048 (get_trace_state_variable_value_ptr): New global.
2049 (set_trace_state_variable_value_ptr): New global.
2050 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2051 accessing get_raw_reg directly.
2052 (get_get_tsv_func_addr): Likewise for
2053 get_trace_state_variable_value_ptr.
2054 (get_set_tsv_func_addr): Likewise for
2055 set_trace_state_variable_value_ptr.
2056 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2058 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2060 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2062 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2064 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2066 (relocate_instruction): Remove own_buf.
2067 * server.c (own_buf): Make global.
2068 (handle_v_requests): Make global.
2069 * server.h (own_buf): New declaration.
2070 (handle_v_requests): New prototype.
2072 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2075 * linux-s390-low.c (add_insns): New function.
2076 (s390_emit_prologue): New function.
2077 (s390_emit_epilogue): New function.
2078 (s390_emit_add): New function.
2079 (s390_emit_sub): New function.
2080 (s390_emit_mul): New function.
2081 (s390_emit_lsh): New function.
2082 (s390_emit_rsh_signed): New function.
2083 (s390_emit_rsh_unsigned): New function.
2084 (s390_emit_ext): New function.
2085 (s390_emit_log_not): New function.
2086 (s390_emit_bit_and): New function.
2087 (s390_emit_bit_or): New function.
2088 (s390_emit_bit_xor): New function.
2089 (s390_emit_bit_not): New function.
2090 (s390_emit_equal): New function.
2091 (s390_emit_less_signed): New function.
2092 (s390_emit_less_unsigned): New function.
2093 (s390_emit_ref): New function.
2094 (s390_emit_if_goto): New function.
2095 (s390_emit_goto): New function.
2096 (s390_write_goto_address): New function.
2097 (s390_emit_litpool): New function.
2098 (s390_emit_const): New function.
2099 (s390_emit_call): New function.
2100 (s390_emit_reg): New function.
2101 (s390_emit_pop): New function.
2102 (s390_emit_stack_flush): New function.
2103 (s390_emit_zero_ext): New function.
2104 (s390_emit_swap): New function.
2105 (s390_emit_stack_adjust): New function.
2106 (s390_emit_set_r2): New function.
2107 (s390_emit_int_call_1): New function.
2108 (s390_emit_void_call_2): New function.
2109 (s390_emit_eq_goto): New function.
2110 (s390_emit_ne_goto): New function.
2111 (s390_emit_lt_goto): New function.
2112 (s390_emit_le_goto): New function.
2113 (s390_emit_gt_goto): New function.
2114 (s390_emit_ge_goto): New function.
2115 (s390x_emit_prologue): New function.
2116 (s390x_emit_epilogue): New function.
2117 (s390x_emit_add): New function.
2118 (s390x_emit_sub): New function.
2119 (s390x_emit_mul): New function.
2120 (s390x_emit_lsh): New function.
2121 (s390x_emit_rsh_signed): New function.
2122 (s390x_emit_rsh_unsigned): New function.
2123 (s390x_emit_ext): New function.
2124 (s390x_emit_log_not): New function.
2125 (s390x_emit_bit_and): New function.
2126 (s390x_emit_bit_or): New function.
2127 (s390x_emit_bit_xor): New function.
2128 (s390x_emit_bit_not): New function.
2129 (s390x_emit_equal): New function.
2130 (s390x_emit_less_signed): New function.
2131 (s390x_emit_less_unsigned): New function.
2132 (s390x_emit_ref): New function.
2133 (s390x_emit_if_goto): New function.
2134 (s390x_emit_const): New function.
2135 (s390x_emit_call): New function.
2136 (s390x_emit_reg): New function.
2137 (s390x_emit_pop): New function.
2138 (s390x_emit_stack_flush): New function.
2139 (s390x_emit_zero_ext): New function.
2140 (s390x_emit_swap): New function.
2141 (s390x_emit_stack_adjust): New function.
2142 (s390x_emit_int_call_1): New function.
2143 (s390x_emit_void_call_2): New function.
2144 (s390x_emit_eq_goto): New function.
2145 (s390x_emit_ne_goto): New function.
2146 (s390x_emit_lt_goto): New function.
2147 (s390x_emit_le_goto): New function.
2148 (s390x_emit_gt_goto): New function.
2149 (s390x_emit_ge_goto): New function.
2150 (s390_emit_ops): New function.
2151 (struct linux_target_ops): Fill in emit_ops hook.
2153 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2156 * Makefile.in: Add s390 IPA files.
2157 * configure.srv: Build IPA for s390.
2158 * linux-s390-ipa.c: New file.
2159 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2160 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2161 (tdesc_s390_linux32): Likewise.
2162 (init_registers_s390_linux32v1): Likewise.
2163 (tdesc_s390_linux32v1): Likewise.
2164 (init_registers_s390_linux32v2): Likewise.
2165 (tdesc_s390_linux32v2): Likewise.
2166 (init_registers_s390_linux64): Likewise.
2167 (tdesc_s390_linux64): Likewise.
2168 (init_registers_s390_linux64v1): Likewise.
2169 (tdesc_s390_linux64v1): Likewise.
2170 (init_registers_s390_linux64v2): Likewise.
2171 (tdesc_s390_linux64v2): Likewise.
2172 (init_registers_s390_te_linux64): Likewise.
2173 (tdesc_s390_te_linux64): Likewise.
2174 (init_registers_s390_vx_linux64): Likewise.
2175 (tdesc_s390_vx_linux64): Likewise.
2176 (init_registers_s390_tevx_linux64): Likewise.
2177 (tdesc_s390_tevx_linux64): Likewise.
2178 (init_registers_s390x_linux64): Likewise.
2179 (tdesc_s390x_linux64): Likewise.
2180 (init_registers_s390x_linux64v1): Likewise.
2181 (tdesc_s390x_linux64v1): Likewise.
2182 (init_registers_s390x_linux64v2): Likewise.
2183 (tdesc_s390x_linux64v2): Likewise.
2184 (init_registers_s390x_te_linux64): Likewise.
2185 (tdesc_s390x_te_linux64): Likewise.
2186 (init_registers_s390x_vx_linux64): Likewise.
2187 (tdesc_s390x_vx_linux64): Likewise.
2188 (init_registers_s390x_tevx_linux64): Likewise.
2189 (tdesc_s390x_tevx_linux64): Likewise.
2190 (have_hwcap_s390_vx): New static variable.
2191 (s390_arch_setup): Fill have_hwcap_s390_vx.
2192 (s390_get_thread_area): New function.
2193 (s390_ft_entry_gpr_esa): New const.
2194 (s390_ft_entry_gpr_zarch): New const.
2195 (s390_ft_entry_misc): New const.
2196 (s390_ft_entry_fr): New const.
2197 (s390_ft_entry_vr): New const.
2198 (s390_ft_main_31): New const.
2199 (s390_ft_main_64): New const.
2200 (s390_ft_exit_fr): New const.
2201 (s390_ft_exit_vr): New const.
2202 (s390_ft_exit_misc): New const.
2203 (s390_ft_exit_gpr_esa): New const.
2204 (s390_ft_exit_gpr_zarch): New const.
2205 (append_insns): New function.
2206 (s390_relocate_instruction): New function.
2207 (s390_install_fast_tracepoint_jump_pad): New function.
2208 (s390_get_min_fast_tracepoint_insn_len): New function.
2209 (s390_get_ipa_tdesc_idx): New function.
2210 (struct linux_target_ops): Wire in the above functions.
2211 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2212 * linux-s390-tdesc.h: New file.
2214 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2216 * linux-s390-low.c (s390_supports_tracepoints): New function.
2217 (struct linux_target_ops): Fill supports_tracepoints hook.
2219 2016-03-18 Yao Qi <yao.qi@linaro.org>
2221 * linux-low.c (lwp_signal_can_be_delivered): New function.
2222 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2224 2016-03-18 Yao Qi <yao.qi@linaro.org>
2226 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2227 0 if signal is enqueued. Remove 'signal' from one debugging
2228 message. Move one debugging message to some lines below.
2229 Remove code setting 'signal' to 0.
2231 2016-03-18 Yao Qi <yao.qi@linaro.org>
2233 * linux-low.c (linux_low_filter_event): Remove redundant
2234 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2236 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2238 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2239 (struct linux_target_ops): Wire in the above.
2241 2016-03-03 Yao Qi <yao.qi@linaro.org>
2243 * linux-low.c: Update comments to start_step_over.
2245 2016-03-03 Yao Qi <yao.qi@linaro.org>
2248 * linux-low.c (handle_extended_wait): Set child suspended
2249 if event_lwp->bp_reinsert isn't zero.
2251 2016-03-02 Yao Qi <yao.qi@linaro.org>
2253 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2254 enqueue_pending_signal.
2256 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2258 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2261 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2263 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2264 (s390_regmap_3264) [!__s390x__]: New global.
2265 (s390_collect_ptrace_register): Skip map entries containing -1.
2266 (s390_supply_ptrace_register): Ditto.
2267 (s390_fill_gprs_high): New function.
2268 (s390_store_gprs_high): New function.
2269 (s390_regsets): Add NT_S390_HIGH_GPRS.
2270 (s390_get_hwcap): Enable on 31-bit.
2271 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2272 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2273 Detect NT_S390_HIGH_GPRS.
2274 (s390_usrregs_info_3264): Enable on 31-bit.
2275 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2276 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2278 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2281 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2282 * configure.srv: Ditto.
2283 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2284 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2285 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2286 (init_registers_amd64_linux): Remove prototype.
2287 (tdesc_amd64_linux): Remove declaration.
2288 (get_ipa_tdesc): New function.
2289 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2290 initialize remaining tdescs.
2291 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2292 (init_registers_i386_linux): Remove prototype.
2293 (tdesc_i386_linux): Remove declaration.
2294 (get_ipa_tdesc): New function.
2295 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2296 initialize remaining tdescs.
2297 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2298 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2299 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2300 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2301 (x86_get_ipa_tdesc_idx): New function.
2302 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2303 * linux-x86-tdesc.h: New file.
2304 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2305 (target_get_ipa_tdesc_idx): New macro.
2306 * tracepoint.c (ipa_tdesc_idx): New macro.
2307 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2308 (symbol_list): Add ipa_tdesc_idx.
2309 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2310 (ipa_tdesc): Remove.
2311 (ipa_tdesc_idx): New variable.
2312 (get_context_regcache): Use get_ipa_tdesc.
2313 (gdb_collect): Ditto.
2315 * tracepoint.h (get_ipa_tdesc): New prototype.
2316 (ipa_tdesc): Remove.
2318 2016-02-24 Pedro Alves <palves@redhat.com>
2320 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2321 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2322 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2323 Factor out common code between the USE_SIGTRAP_SIGINFO and
2324 !USE_SIGTRAP_SIGINFO blocks.
2325 (linux_low_filter_event): Call save_stop_reason instead of
2326 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2328 (linux_wait_1): Update comments.
2330 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2332 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2333 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2334 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2335 ppc_insert_point, ppc_remove_point.
2337 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2339 * linux-s390-low.c (s390_supports_z_point_type): New function.
2340 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2342 2016-02-16 Yao Qi <yao.qi@linaro.org>
2344 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2345 PC. Get pc from regcache_read_pc.
2347 2016-02-12 Yao Qi <yao.qi@linaro.org>
2349 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2350 or linux_get_pc_32bit.
2351 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2353 2016-02-12 Yao Qi <yao.qi@linaro.org>
2355 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2356 arm_linux_get_next_pcs_fixup.
2358 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2360 * tracepoint.c (x_tracepoint_action_download): Change
2361 write_inferior_data_ptr to write_inferior_data_pointer.
2362 (cmd_qtstart): Likewise.
2363 (write_inferior_data_ptr): Remove.
2364 (download_agent_expr): Change write_inferior_data_ptr to
2365 write_inferior_data_pointer.
2366 (download_tracepoint_1): Likewise.
2367 (download_tracepoint): Likewise.
2368 (download_trace_state_variables): Likewise.
2370 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2371 Marcin Kościelnicki <koriakin@0x04.net>
2373 * tracepoint.c (struct tracepoint_action_ops): Remove.
2374 (struct tracepoint_action): Remove ops.
2375 (m_tracepoint_action_download, r_tracepoint_action_download)
2376 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2377 size and offset accordingly.
2378 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2379 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2380 (tracepoint_action_send, tracepoint_action_download): New functions.
2381 Helpers for trace action handlers.
2382 (add_tracepoint_action): Remove setup actions ops.
2383 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2385 2016-02-10 Yao Qi <yao.qi@linaro.org>
2387 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2389 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2391 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2393 * configure: Regenerate.
2395 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2397 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2398 void * to gdb_byte *.
2399 * linux-low.c (siginfo_fixup): Likewise.
2400 (linux_xfer_siginfo): Likewise.
2401 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2403 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2405 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2407 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2409 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2411 * linux-x86-low.c [__x86_64__]: Include
2412 "nat/amd64-linux-siginfo.h".
2413 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2414 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2415 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2416 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2417 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2418 (cpt_si_fd, si_timerid, si_overrun): Move from
2419 nat/amd64-linux-siginfo.c.
2420 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2422 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2424 * server.c (skip_to_semicolon): Remove.
2425 (process_point_options): Use strchrnul instead of
2428 2016-01-26 Yao Qi <yao.qi@linaro.org>
2430 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2431 * linux-low.c (install_software_single_step_breakpoints): Don't
2432 call regcache_read_pc.
2433 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2436 2016-01-26 Yao Qi <yao.qi@linaro.org>
2438 * linux-low.c (install_software_single_step_breakpoints): Call
2439 regcache_read_pc instead of get_pc.
2441 2016-01-26 Yao Qi <yao.qi@linaro.org>
2443 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2444 (unblock_async_io): Rename to ...
2445 (block_unblock_async_io): ... it. New function.
2446 (enable_async_io): Don't install SIGIO handler. Unblock it
2448 (disable_async_io): Don't ignore SIGIO. Block it instead.
2449 (initialize_async_io): Install SIGIO handler. Don't call
2452 2016-01-26 Yao Qi <yao.qi@linaro.org>
2454 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2455 first character is '\003', call *the_target->request_interrupt.
2457 2016-01-25 Yao Qi <yao.qi@linaro.org>
2459 * remote-utils.c (new_thread_notify): Remove.
2460 (dead_thread_notify): Likewise.
2461 * remote-utils.h (new_thread_notify): Remove declaration.
2462 (dead_thread_notify): Likewise.
2464 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2466 * gdb.trace/pending.exp: Fix expected message on continue.
2468 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2470 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2471 it works properly on big-endian machines where sizeof (CORE_ADDR)
2474 2016-01-21 Pedro Alves <palves@redhat.com>
2476 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2477 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2478 * configure: Regenerate.
2480 2016-01-21 Yao Qi <yao.qi@linaro.org>
2482 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2483 is_thumb and set it according to CPSR saved on the stack.
2484 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2485 arm_sigreturn_next_pc.
2487 2016-01-18 Yao Qi <yao.qi@linaro.org>
2489 * linux-low.c (linux_set_pc_64bit): New function.
2490 (linux_get_pc_64bit): New function.
2491 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2493 * linux-sparc-low.c (debug_threads): Remove declaration.
2494 (sparc_get_pc): Remove.
2495 (the_low_target): Use linux_get_pc_64bit instead of
2497 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2498 (the_low_target): Use linux_get_pc_64bit and
2501 2016-01-18 Yao Qi <yao.qi@linaro.org>
2503 * linux-arm-low.c (debug_threads): Remove declaration.
2504 (arm_get_pc, arm_set_pc): Remove.
2505 (the_low_target): Use linux_get_pc_32bit and
2507 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2508 (the_low_target): Use linux_get_pc_32bit and
2510 * linux-cris-low.c (debug_threads): Remove declaration.
2511 (cris_get_pc, cris_set_pc,): Remove.
2512 (the_low_target): Use linux_get_pc_32bit and
2514 * linux-crisv32-low.c (debug_threads): Remove declaration.
2515 (cris_get_pc, cris_set_pc): Remove.
2516 (the_low_target): Use linux_get_pc_32bit and
2518 * linux-low.c: Include inttypes.h.
2519 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2520 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2521 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2522 (the_low_target): Use linux_get_pc_32bit and
2524 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2525 (the_low_target): Use linux_get_pc_32bit and
2527 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2528 (the_low_target): Use linux_get_pc_32bit and
2530 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2531 (the_low_target): Use linux_get_pc_32bit and
2533 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2534 (the_low_target): Use linux_get_pc_32bit and
2537 2016-01-18 Gary Benson <gbenson@redhat.com>
2539 * configure.ac (AC_FUNC_FORK): New check.
2540 * config.in: Regenerate.
2541 * configure: Likewise.
2543 2016-01-14 Yao Qi <yao.qi@linaro.org>
2545 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2546 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2547 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2548 arm_get_next_pcs_ctor.
2550 2016-01-12 Josh Stone <jistone@redhat.com>
2551 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2553 * inferiors.h: Include "gdb_vecs.h".
2554 (struct process_info): Add syscalls_to_catch.
2555 * inferiors.c (remove_process): Free syscalls_to_catch.
2556 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2557 syscall_return stops.
2558 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2559 * server.c (handle_general_set): Handle QCatchSyscalls.
2560 (handle_query): Report support for QCatchSyscalls.
2561 * target.h (struct target_ops): Add supports_catch_syscall.
2562 (target_supports_catch_syscall): New macro.
2563 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2564 (struct lwp_info): Add syscall_state.
2565 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2566 Maintain syscall_state and syscalls_to_catch across exec.
2567 (get_syscall_trapinfo): New function, proxy to the_low_target.
2568 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2569 (linux_low_filter_event): Toggle syscall_state entry/return for
2570 syscall traps, and set it ignored for all others.
2571 (gdb_catching_syscalls_p): New function.
2572 (gdb_catch_this_syscall_p): New function.
2573 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2574 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2575 (linux_supports_catch_syscall): New function.
2576 (linux_target_ops): Install it.
2577 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2578 (the_low_target): Install it.
2580 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2582 * acinclude.m4: Include new ../warning.m4 file.
2583 * configure: Regenerated.
2584 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2586 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2588 * ax.c (is_goto_target): Mark static.
2589 * linux-low.c (register_addr): Likewise.
2590 (linux_fetch_registers, linux_store_registers): Likewise.
2591 * mem-break.c (any_persistent_commands): Fix old prototype.
2592 (add_commands_to_breakpoint): Mark static.
2593 * regcache.c (find_register_by_name): Delete unused func.
2594 * remote-utils.c (hex_or_minus_one): Mark static.
2595 * server.c (monitor_show_help): Mark static.
2596 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2597 handle_v_requests): Likewise.
2599 2016-01-12 Pedro Alves <palves@redhat.com>
2601 Remove use of the registered trademark symbol throughout.
2603 2016-01-08 Yao Qi <yao.qi@linaro.org>
2605 * remote-utils.c (getpkt): If c is '\003', call target hook
2608 2016-01-06 Yao Qi <yao.qi@linaro.org>
2610 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2611 linux-aarch32-low.c.
2612 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2613 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2614 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2615 (thumb2_breakpoint): Declare.
2616 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2617 linux-aarch32-low.h.
2618 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2619 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2620 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2622 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2624 * gdbreplay.c (gdbreplay_version): Change copyright year in
2626 * server.c (gdbserver_version): Likewise.
2628 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2630 * server.c (crc32_table): Delete.
2631 (crc32): Use libiberty's xcrc32 function.
2633 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2635 * lynx-low.c (lynx_delete_thread_callback): New function.
2636 (lynx_mourn): Properly delete our process and all of its
2637 threads. Remove call to clear_inferiors.
2639 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2641 * target.c (thread_search_callback): Add check that
2642 the thread_stopped target callback is not NULL before
2645 2015-12-21 Yao Qi <yao.qi@linaro.org>
2647 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2650 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2652 * server.c (handle_query): Call target_supports_software_single_step.
2654 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2656 * linux-low.c (single_step): New function.
2657 (linux_resume_one_lwp_throw): Call single_step.
2658 (start_step_over): Likewise.
2660 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2662 * Makefile.in (SFILES): Append arch/arm-linux.c,
2663 arch/arm-get-next-pcs.c.
2664 (arm-linux.o): New rule.
2665 (arm-get-next-pcs.o): New rule.
2666 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2668 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2669 to linux-aarch32-low.c.
2670 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2671 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2672 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2673 (thumb2_breakpoint_len): Likewise.
2674 (arm_is_thumb_mode): Make non-static.
2675 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2676 from linux-aarch32-low.c.
2677 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2678 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2679 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2680 (thumb2_breakpoint_len): Likewise.
2681 (arm_is_thumb_mode): New declaration.
2682 * linux-arm-low.c: Include arch/arm-linux.h
2683 aarch/arm-get-next-pcs.h, sys/syscall.h.
2684 (get_next_pcs_ops): New struct.
2685 (get_next_pcs_addr_bits_remove): New function.
2686 (get_next_pcs_is_thumb): New function.
2687 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2688 (arm_sigreturn_next_pc): Likewise.
2689 (get_next_pcs_syscall_next_pc): Likewise.
2690 (arm_gdbserver_get_next_pcs): Likewise.
2691 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2693 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2694 * server.h: Include gdb_vecs.h.
2696 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2698 * Makefile.in (SFILES): Append common/common-regcache.c.
2699 (OBS): Append common-regcache.o.
2700 (common-regcache.o): New rule.
2701 * regcache.c (init_register_cache): Initialize cache to
2703 (regcache_raw_read_unsigned): New function.
2704 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2705 register_status enum.
2707 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2709 * linux-aarch64-low.c (the_low_targets): Rename
2710 breakpoint_reinsert_addr to get_next_pcs.
2711 * linux-arm-low.c (the_low_targets): Likewise.
2712 * linux-bfin-low.c (the_low_targets): Likewise.
2713 * linux-cris-low.c (the_low_targets): Likewise.
2714 * linux-crisv32-low.c (the_low_targets): Likewise.
2715 * linux-low.c (can_software_single_step): Likewise.
2716 (install_software_single_step_breakpoints): New function.
2717 (start_step_over): Use install_software_single_step_breakpoints.
2718 * linux-low.h: New CORE_ADDR vector.
2719 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2721 * linux-mips-low.c (the_low_targets): Likewise.
2722 * linux-nios2-low.c (the_low_targets): Likewise.
2723 * linux-sparc-low.c (the_low_targets): Likewise.
2725 2015-12-17 Pedro Alves <palves@redhat.com>
2727 * linux-low.c (linux_kill_one_lwp): Remove references to
2729 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2731 (linux_init_signals): Delete.
2732 (initialize_low): Adjust.
2733 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2735 2015-12-16 Pedro Alves <palves@redhat.com>
2737 * configure.ac (compiler warning flags): When testing a
2738 -Wno-foo option, check whether -Wfoo works instead.
2739 * configure: Regenerate.
2741 2015-12-11 Don Breazeal <donb@codesourcery.com>
2743 * server.c (process_serial_event): Don't exit from gdbserver
2744 in remote mode if there are still active inferiors.
2746 2015-12-11 Yao Qi <yao.qi@linaro.org>
2748 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2749 arm_breakpoint_at if the process is 32-bit.
2751 2015-12-11 Yao Qi <yao.qi@linaro.org>
2753 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2756 2015-12-07 Yao Qi <yao.qi@linaro.org>
2758 * configure.srv: Append arm.o to srv_tgtobj for
2759 aarch64*-*-linux* target.
2760 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2761 from linux-arm-low.c.
2762 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2763 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2764 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2765 (thumb2_breakpoint_len): Likewise.
2766 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2767 (arm_breakpoint_kinds): Likewise.
2768 (arm_breakpoint_kind_from_pc): Likewise.
2769 (arm_sw_breakpoint_from_kind): Likewise.
2770 (arm_breakpoint_kind_from_current_state): Likewise.
2771 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2772 (arm_sw_breakpoint_from_kind): Declare.
2773 (arm_breakpoint_kind_from_current_state): Declare.
2774 (arm_breakpoint_at): Declare.
2775 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2776 arm_sw_breakpoint_from_kind if process is 32-bit.
2777 (aarch64_breakpoint_kind_from_pc): New function.
2778 (aarch64_breakpoint_kind_from_current_state): New function.
2779 (the_low_target): Initialize fields breakpoint_kind_from_pc
2780 and breakpoint_kind_from_current_state.
2781 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2782 linux-aarch32-low.c.
2783 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2784 (arm_breakpoint, arm_breakpoint_len): Likewise.
2785 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2786 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2787 (arm_is_thumb_mode): Likewise.
2788 (arm_breakpoint_at): Likewise.
2789 (arm_breakpoint_kind_from_pc): Likewise.
2790 (arm_sw_breakpoint_from_kind): Likewise.
2791 (arm_breakpoint_kind_from_current_state): Likewise.
2794 2015-08-04 Yao Qi <yao.qi@linaro.org>
2796 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2797 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2798 * server.c (extended_protocol): Remove "static".
2799 * server.h (extended_protocol): Declare it.
2801 2015-12-04 Josh Stone <jistone@redhat.com>
2803 * target.h (struct target_ops) <arch_setup>: Rename to ...
2804 (struct target_ops) <post_create_inferior>: ... this.
2805 (target_arch_setup): Rename to ...
2806 (target_post_create_inferior): ... this, calling post_create_inferior.
2807 * server.c (start_inferior): Update target_arch_setup calls to
2808 target_post_create_inferior.
2809 * linux-low.c (linux_low_ptrace_options): Forward declare.
2810 (linux_arch_setup): Update its comment for general use.
2811 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2812 (struct linux_target_ops): Use linux_post_create_inferior.
2813 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2814 to post_create_inferior.
2815 * nto-low.c (struct nto_target_ops): Likewise.
2816 * spu-low.c (struct spu_target_ops): Likewise.
2817 * win32-low.c (struct win32_target_ops): Likewise.
2819 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2821 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2823 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2825 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2826 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2827 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2828 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2829 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2830 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2831 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2832 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2833 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2834 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2835 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2836 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2838 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2840 * linux-low.c (linux_look_up_symbols): Don't call
2841 linux_supports_traceclone.
2842 * linux-low.h (thread_db_init): Remove use_events argument.
2843 * thread-db.c (thread_db_use_event): Remove global variable.
2844 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2845 (struct thread_db) <td_create_bp>: Remove field.
2846 (thread_db_create_event): Remove function.
2847 (thread_db_enable_reporting): Likewise.
2848 (find_one_thread): Don't check for thread_db_use_events.
2849 (attach_thread): Likewise.
2850 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2851 (try_thread_db_load_1): Don't check for thread_db_use_events.
2852 (thread_db_init): Remove use_events argument and thread events
2854 (remove_thread_event_breakpoints): Remove function.
2855 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2857 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2859 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2861 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2862 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2863 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2864 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2865 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2867 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2869 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2870 * linux-low.c (can_hardware_single_step): Use
2871 supports_hardware_single_step.
2872 (can_software_single_step): New function.
2873 (start_step_over): Call can_software_single_step.
2874 (linux_supports_hardware_single_step): New function.
2875 (struct target_ops) <supports_software_single_step>: Initialize.
2876 * linux-low.h (struct linux_target_ops)
2877 <supports_hardware_single_step>: Initialize.
2878 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2879 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2880 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2881 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2882 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2883 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2884 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2885 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2886 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2887 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2889 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2890 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2892 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2893 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2894 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2896 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2897 * target.h (struct target_ops): <supports_software_single_step>:
2899 (target_supports_software_single_step): New macro.
2901 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2903 * linux-low.c (linux_wait_1): Fix pc advance condition.
2904 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2905 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2907 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2909 * linux-arm-low.c (arm_is_thumb_mode): New function.
2910 (arm_breakpoint_at): Use arm_is_thumb_mode.
2911 (arm_breakpoint_kind_from_current_state): New function.
2912 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2914 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2915 (linux_breakpoint_kind_from_current_state): New function.
2916 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2917 * linux-low.h (struct linux_target_ops)
2918 <breakpoint_kind_from_current_state>: New field.
2919 * target.h (struct target_ops): Likewise.
2920 (target_breakpoint_kind_from_current_state): New macro.
2922 2015-11-30 Pedro Alves <palves@redhat.com>
2924 * linux-low.c (linux_resume): Wake up the event loop before
2927 2015-11-30 Pedro Alves <palves@redhat.com>
2929 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2931 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2933 * target.c (struct thread_search): New structure.
2934 (thread_search_callback): New function.
2935 (prev_general_thread): New global.
2936 (prepare_to_access_memory, done_accessing_memory): New functions.
2937 * target.h (prepare_to_access_memory, done_accessing_memory):
2938 Replace macros with function declarations.
2940 2015-11-30 Pedro Alves <palves@redhat.com>
2943 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2944 report TARGET_WAITKIND_NO_RESUMED.
2945 * remote-utils.c (prepare_resume_reply): Handle
2946 TARGET_WAITKIND_NO_RESUMED.
2947 * server.c (report_no_resumed): New global.
2948 (handle_query) <qSupported>: Handle "no-resumed+". Report
2949 "no-resumed+" support.
2950 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2951 return error if the client doesn't support no-resumed events.
2952 (push_stop_notification): New function.
2953 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2954 events if the client supports them.
2956 2015-11-30 Pedro Alves <palves@redhat.com>
2958 * linux-low.c (thread_still_has_status_pending_p): Don't check
2960 (lwp_resumed): New function.
2961 (status_pending_p_callback): Return early if the LWP is not
2962 supposed to be resumed.
2964 2015-11-30 Pedro Alves <palves@redhat.com>
2966 * linux-low.c (handle_extended_wait): Assert that the LWP's
2967 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2968 thread create events, leave the new child's status pending.
2969 (linux_low_filter_event): If GDB wants to hear about thread exit
2970 events, leave the LWP marked dead and don't delete it.
2971 (linux_wait_for_event_filtered): Don't check for thread exit.
2972 (filter_exit_event): New function.
2973 (linux_wait_1): Use it, when returning an exit event.
2974 (linux_resume_one_lwp_throw): Assert that the LWP's
2975 waitstatus is TARGET_WAITKIND_IGNORE.
2976 * remote-utils.c (prepare_resume_reply): Handle
2977 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2978 * server.c (report_thread_events): New global.
2979 (handle_general_set): Handle QThreadEvents.
2980 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2981 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2982 TARGET_WAITKIND_THREAD_EXITED.
2983 * server.h (report_thread_events): Declare.
2985 2015-11-30 Pedro Alves <palves@redhat.com>
2987 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2988 the thread's last_resume_kind was resume_stop.
2990 2015-11-30 Pedro Alves <palves@redhat.com>
2992 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2995 2015-11-30 Pedro Alves <palves@redhat.com>
2997 * server.c (handle_v_requests): Handle vCtrlC.
2999 2015-11-30 Pedro Alves <palves@redhat.com>
3001 * gdbthread.h (find_any_thread_of_pid): Declare.
3002 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3004 * server.c (handle_query): If current_thread is NULL, look for
3005 another thread of the selected process.
3007 2015-11-26 Daniel Colascione <dancol@dancol.org>
3008 Simon Marchi <simon.marchi@ericsson.com>
3010 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3011 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3013 * target.h (struct target_ops) <thread_name>: New field.
3014 (target_thread_name): New macro.
3016 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3018 * regcache.h (regcache_invalidate_pid): Add declaration.
3019 * regcache.c (regcache_invalidate_pid): New function, extracted
3020 from regcache_invalidate.
3021 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3022 Add trivial documentation comment.
3023 * lynx-low.c: Use regcache_invalidate_pid instead of
3024 regcache_invalidate.
3026 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3028 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3029 and Elf64_auxv_t if the target is Android.
3031 2015-11-22 Doug Evans <xdje42@gmail.com>
3033 * target.h: #include <sys/types.h>.
3035 2015-11-19 Pedro Alves <palves@redhat.com>
3037 * linux-low.c (linux_process_qsupported): Change prototype.
3039 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3041 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3042 and adjust to loop over all features.
3043 * server.c (handle_query) <qSupported>: Adjust to call
3044 target_process_qsupported once, passing it a vector of unprocessed
3046 * target.h (struct target_ops) <process_qsupported>: Change
3048 (target_process_qsupported): Adjust.
3050 2015-11-19 Pedro Alves <palves@redhat.com>
3052 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3054 * configure: Regenerate.
3056 2015-11-19 Pedro Alves <palves@redhat.com>
3058 * configure: Regenerate.
3060 2015-11-19 Yao Qi <yao.qi@linaro.org>
3062 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3065 2015-11-19 Yao Qi <yao.qi@linaro.org>
3067 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3068 (struct aarch64_operand): Move enum out.
3070 2015-11-19 Yao Qi <yao.qi@linaro.org>
3072 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3073 struct user_fpsimd_state *.
3074 (aarch64_store_fpregset): Likewise.
3076 2015-11-19 Yao Qi <yao.qi@linaro.org>
3078 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3079 struct user_pt_regs *.
3080 (aarch64_store_gregset): Likewise.
3082 2015-11-18 Pedro Alves <palves@redhat.com>
3084 * Makefile.in (all_object_files): Add $IPA_OBJS.
3086 2015-11-17 Pedro Alves <palves@redhat.com>
3088 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3089 GDB_SIGNAL_0 and gdb_signal_to_string.
3091 2015-11-17 Pedro Alves <palves@redhat.com>
3093 * win32-low.c (handle_output_debug_string): Remove parameter.
3094 (win32_kill): Remove our_status local and adjust call to
3095 handle_output_debug_string.
3096 (get_child_debug_event): Adjust call to
3097 handle_output_debug_string.
3099 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3101 * linux-mips-low.c (mips_fill_gregset): Add cast.
3102 (mips_store_gregset): Likewise.
3103 (mips_fill_fpregset): Likewise.
3104 (mips_store_fpregset): Likewise.
3106 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3108 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3111 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3113 * linux-mips-low.c (mips_linux_new_thread): Change type of
3114 watch_type to enum target_hw_bp_type.
3116 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3118 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3119 Change return type to arm_hwbp_type.
3121 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3123 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3124 (arm_store_gregset): Likewise.
3125 * linux-arm-low.c (arm_get_hwcap): Likewise.
3126 (arm_read_description): Likewise.
3128 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3130 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3132 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3134 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3135 (ppc_fill_vsxregset): Likewise.
3136 (ppc_store_vsxregset): Likewise.
3137 (ppc_fill_vrregset): Likewise.
3138 (ppc_store_vrregset): Likewise.
3139 (ppc_fill_evrregset): Likewise.
3140 (ppc_store_evrregset): Likewise.
3142 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3144 * linux-ppc-low.c (ppc_usrregs_info): Remove
3145 forward-declaration.
3146 (ppc_arch_setup): Move lower in file.
3148 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3150 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3151 (ps_pdwrite): Likewise.
3153 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3155 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3156 to after assert checks.
3158 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3160 * proc-service.c (ps_pdread): Add/adjust casts.
3161 (ps_pdwrite): Add/adjust casts.
3163 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3165 * server.c (handle_search_memory_1): Cast return value of
3168 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3170 * server.c (write_qxfer_response): Change type of data to
3173 2015-10-29 Pedro Alves <palves@redhat.com>
3175 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3177 2015-10-29 Pedro Alves <palves@redhat.com>
3179 * tracepoint.c (clear_installed_tracepoints): Add casts.
3181 2015-10-29 Pedro Alves <palves@redhat.com>
3183 * server.c (handle_v_cont, process_serial_event): Add enum
3184 gdb_signal casts to signal parsing code.
3186 2015-10-29 Pedro Alves <palves@redhat.com>
3188 * linux-low.h (NULL_REGSET): Define.
3189 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3190 * linux-arm-low.c (arm_regsets): Likewise.
3191 * linux-crisv32-low.c (cris_regsets): Likewise.
3192 * linux-m68k-low.c (m68k_regsets): Likewise.
3193 * linux-mips-low.c (mips_regsets): Likewise.
3194 * linux-nios2-low.c (nios2_regsets): Likewise.
3195 * linux-ppc-low.c (ppc_regsets): Likewise.
3196 * linux-s390-low.c (s390_regsets): Likewise.
3197 * linux-sh-low.c (sh_regsets): Likewise.
3198 * linux-sparc-low.c (sparc_regsets): Likewise.
3199 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3200 * linux-tile-low.c (tile_regsets): Likewise.
3201 * linux-x86-low.c (x86_regsets): Likewise.
3202 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3204 2015-10-29 Pedro Alves <palves@redhat.com>
3206 * linux-low.h (NULL_REGSET): Define.
3207 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3208 * linux-arm-low.c (arm_regsets): Likewise.
3209 * linux-crisv32-low.c (cris_regsets): Likewise.
3210 * linux-m68k-low.c (m68k_regsets): Likewise.
3211 * linux-mips-low.c (mips_regsets): Likewise.
3212 * linux-nios2-low.c (nios2_regsets): Likewise.
3213 * linux-ppc-low.c (ppc_regsets): Likewise.
3214 * linux-s390-low.c (s390_regsets): Likewise.
3215 * linux-sh-low.c (sh_regsets): Likewise.
3216 * linux-sparc-low.c (sparc_regsets): Likewise.
3217 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3218 * linux-tile-low.c (tile_regsets): Likewise.
3219 * linux-x86-low.c (x86_regsets): Likewise.
3220 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3222 2015-10-26 Doug Evans <dje@google.com>
3224 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3226 2015-10-26 Doug Evans <dje@google.com>
3228 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3230 2015-10-26 Doug Evans <dje@google.com>
3232 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3234 (attach_thread, find_new_threads_callback): Ditto.
3236 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3238 * mem-break.h (set_breakpoint_data): Remove.
3240 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3242 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3243 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3244 (initialize_low): Remove set_breakpoint_data call.
3245 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3246 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3247 (initialize_low): Remove set_breakpoint_data call.
3248 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3249 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3250 (initialize_low): Remove set_breakpoint_data call.
3252 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3254 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3255 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3256 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3257 * target.h (target_breakpoint_kind_from_pc): New macro.
3259 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3261 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3262 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3263 the default breakpoint kind.
3265 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3267 * linux-arm-low.c (arm_supports_z_point_type): Add software
3270 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3272 * linux-arm-low.c: Refactor breakpoint definitions.
3273 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3274 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3276 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3278 * Makefile.in: Add arm.c/o.
3279 * configure.srv: Likewise.
3280 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3281 (arm_breakpoint_kind_from_pc): New function.
3282 (arm_sw_breakpoint_from_kind): Return proper kind.
3283 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3285 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3287 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3289 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3290 (struct raw_breakpoint) <size>: Remove.
3291 (struct raw_breakpoint) <kind>: Add.
3292 (bp_size): New function.
3293 (bp_opcode): Likewise.
3294 (find_raw_breakpoint_at): Adjust for kind.
3295 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3296 (remove_memory_breakpoint): Adjust for kind call bp_size.
3297 (set_raw_breakpoint_at): Adjust for kind.
3298 (set_breakpoint): Likewise.
3299 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3300 (delete_raw_breakpoint): Adjust for kind.
3301 (delete_breakpoint): Likewise.
3302 (find_gdb_breakpoint): Likewise.
3303 (set_gdb_breakpoint_1): Likewise.
3304 (set_gdb_breakpoint): Likewise.
3305 (delete_gdb_breakpoint_1): Likewise.
3306 (delete_gdb_breakpoint): Likewise.
3307 (uninsert_raw_breakpoint): Likewise.
3308 (reinsert_raw_breakpoint): Likewise.
3309 (set_breakpoint_data): Remove.
3310 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3311 (check_mem_read): Adjust for kind call bp_size.
3312 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3313 (clone_one_breakpoint): Adjust for kind.
3314 * mem-break.h (set_gdb_breakpoint): Likewise.
3315 (delete_gdb_breakpoint): Likewise.
3316 * server.c (process_serial_event): Likewise.
3318 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3320 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3321 (struct linux_target_ops) <breakpoint>: Remove.
3322 (struct linux_target_ops) <breakpoint_len>: Remove.
3323 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3324 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3325 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3326 (arm_sw_breakpoint_from_kind): New function.
3327 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3328 (struct linux_target_ops) <breakpoint>: Remove.
3329 (struct linux_target_ops) <breakpoint_len>: Remove.
3330 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3331 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3332 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3333 (struct linux_target_ops) <breakpoint>: Remove.
3334 (struct linux_target_ops) <breakpoint_len>: Remove.
3335 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3336 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3337 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3338 (struct linux_target_ops) <breakpoint>: Remove.
3339 (struct linux_target_ops) <breakpoint_len>: Remove.
3340 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3341 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3342 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3343 and sw_breakpoint_from_kind to increment the pc.
3344 (linux_breakpoint_kind_from_pc): New function.
3345 (linux_sw_breakpoint_from_kind): New function.
3346 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3347 (initialize_low): Call breakpoint_kind_from_pc and
3348 sw_breakpoint_from_kind to replace breakpoint_data/len.
3349 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3351 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3352 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3353 (struct linux_target_ops) <breakpoint>: Remove.
3354 (struct linux_target_ops) <breakpoint_len>: Remove.
3355 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3356 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3357 * linux-m68k-low.c (m68k_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-mips-low.c (mips_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.
3367 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3368 (struct linux_target_ops) <breakpoint>: Remove.
3369 (struct linux_target_ops) <breakpoint_len>: Remove.
3370 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3371 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3372 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3373 (struct linux_target_ops) <breakpoint>: Remove.
3374 (struct linux_target_ops) <breakpoint_len>: Remove.
3375 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3376 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3377 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3378 (struct linux_target_ops) <breakpoint>: Remove.
3379 (struct linux_target_ops) <breakpoint_len>: Remove.
3380 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3381 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3382 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3383 (struct linux_target_ops) <breakpoint>: Remove.
3384 (struct linux_target_ops) <breakpoint_len>: Remove.
3385 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3386 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3387 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3388 (struct linux_target_ops) <breakpoint>: Remove.
3389 (struct linux_target_ops) <breakpoint_len>: Remove.
3390 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3391 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3392 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3393 (struct linux_target_ops) <breakpoint>: Remove.
3394 (struct linux_target_ops) <breakpoint_len>: Remove.
3395 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3396 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3397 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3398 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3399 (struct linux_target_ops) <breakpoint>: Remove.
3400 (struct linux_target_ops) <breakpoint_len>: Remove.
3401 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3402 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3403 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3404 (struct linux_target_ops) <breakpoint>: Remove.
3405 (struct linux_target_ops) <breakpoint_len>: Remove.
3406 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3407 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3409 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3411 * linux-cris-low.c (cris_get_pc): Remove void arg.
3413 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3415 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3418 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3420 * inferiors.c (thread_pid_matches_callback): New function.
3421 (find_thread_process): New function.
3422 (remove_thread): Reset current_thread.
3423 (remove_process): Assert threads have been removed first.
3425 2015-10-15 Yao Qi <yao.qi@linaro.org>
3427 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3429 (aarch64_remove_point): Likewise.
3430 * regcache.c (regcache_register_size): New function.
3432 2015-10-12 Yao Qi <yao.qi@linaro.org>
3434 * linux-aarch64-low.c: Update all callers as emit_load_store
3435 is renamed to aarch64_emit_load_store.
3437 2015-10-12 Yao Qi <yao.qi@linaro.org>
3439 * linux-aarch64-low.c: Update all callers of function renaming
3440 from emit_insn to aarch64_emit_insn.
3442 2015-10-12 Yao Qi <yao.qi@linaro.org>
3444 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3445 arch/aarch64-insn.h.
3446 (struct aarch64_memory_operand): Likewise.
3448 (emit_insn): Move to arch/aarch64-insn.c.
3449 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3450 (emit_load_store): Move to arch/aarch64-insn.c.
3451 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3452 (can_encode_int32): Remove.
3454 2015-10-12 Yao Qi <yao.qi@linaro.org>
3456 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3457 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3458 (aarch64_relocate_instruction): Likewise.
3459 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3460 (struct aarch64_insn_visitor): Likewise.
3462 2015-10-12 Yao Qi <yao.qi@linaro.org>
3464 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3465 (struct aarch64_insn_visitor): New.
3466 (struct aarch64_insn_relocation_data): New.
3467 (aarch64_ftrace_insn_reloc_b): New function.
3468 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3469 (aarch64_ftrace_insn_reloc_cb): Likewise.
3470 (aarch64_ftrace_insn_reloc_tb): Likewise.
3471 (aarch64_ftrace_insn_reloc_adr): Likewise.
3472 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3473 (aarch64_ftrace_insn_reloc_others): Likewise.
3475 (aarch64_relocate_instruction): Use visitor.
3477 2015-10-12 Yao Qi <yao.qi@linaro.org>
3479 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3480 int. Add argument buf.
3481 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3482 aarch64_relocate_instruction.
3484 2015-10-12 Yao Qi <yao.qi@linaro.org>
3486 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3487 argument insn. Remove local variable insn. Don't call
3489 (aarch64_install_fast_tracepoint_jump_pad): Call
3492 2015-09-30 Yao Qi <yao.qi@linaro.org>
3494 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3495 (emit_load_store_pair): Likewise.
3497 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3499 * dll.c (match_dll): Add cast(s).
3500 (unloaded_dll): Likewise.
3501 * linux-low.c (second_thread_of_pid_p): Likewise.
3502 (delete_lwp_callback): Likewise.
3503 (count_events_callback): Likewise.
3504 (select_event_lwp_callback): Likewise.
3505 (linux_set_resume_request): Likewise.
3506 * server.c (accumulate_file_name_length): Likewise.
3507 (emit_dll_description): Likewise.
3508 (handle_qxfer_threads_worker): Likewise.
3509 (visit_actioned_threads): Likewise.
3510 * thread-db.c (any_thread_of): Likewise.
3511 * tracepoint.c (same_process_p): Likewise.
3512 (match_blocktype): Likewise.
3513 (build_traceframe_info_xml): Likewise.
3515 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3517 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3519 (gdb_unparse_agent_expr): Likewise.
3520 * hostio.c (require_data): Likewise.
3521 (handle_pread): Likewise.
3522 * linux-low.c (disable_regset): Likewise.
3523 (fetch_register): Likewise.
3524 (store_register): Likewise.
3525 (get_dynamic): Likewise.
3526 (linux_qxfer_libraries_svr4): Likewise.
3527 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3528 (set_fast_tracepoint_jump): Likewise.
3529 (uninsert_fast_tracepoint_jumps_at): Likewise.
3530 (reinsert_fast_tracepoint_jumps_at): Likewise.
3531 (validate_inserted_breakpoint): Likewise.
3532 (clone_agent_expr): Likewise.
3533 * regcache.c (init_register_cache): Likewise.
3534 * remote-utils.c (putpkt_binary_1): Likewise.
3535 (decode_M_packet): Likewise.
3536 (decode_X_packet): Likewise.
3537 (look_up_one_symbol): Likewise.
3538 (relocate_instruction): Likewise.
3539 (monitor_output): Likewise.
3540 * server.c (handle_search_memory): Likewise.
3541 (handle_qxfer_exec_file): Likewise.
3542 (handle_qxfer_libraries): Likewise.
3543 (handle_qxfer): Likewise.
3544 (handle_query): Likewise.
3545 (handle_v_cont): Likewise.
3546 (handle_v_run): Likewise.
3547 (captured_main): Likewise.
3548 * target.c (write_inferior_memory): Likewise.
3549 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3550 * tracepoint.c (init_trace_buffer): Likewise.
3551 (add_tracepoint_action): Likewise.
3552 (add_traceframe): Likewise.
3553 (add_traceframe_block): Likewise.
3554 (cmd_qtdpsrc): Likewise.
3555 (cmd_qtdv): Likewise.
3556 (cmd_qtstatus): Likewise.
3557 (response_source): Likewise.
3558 (response_tsv): Likewise.
3559 (cmd_qtnotes): Likewise.
3560 (gdb_collect): Likewise.
3561 (initialize_tracepoint): Likewise.
3563 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3565 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3566 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3567 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3569 (enum aarch64_condition_codes): New enum.
3570 (w0): New static global.
3573 (struct aarch64_memory_operand) <type>: New
3574 MEMORY_OPERAND_POSTINDEX type.
3575 (postindex_memory_operand): New helper function.
3576 (emit_ret): New function.
3577 (emit_load_store_pair): New function, factored out of emit_stp
3578 with support for MEMORY_OPERAND_POSTINDEX.
3579 (emit_stp): Rewrite using emit_load_store_pair.
3580 (emit_ldp): New function.
3581 (emit_load_store): Likewise.
3582 (emit_ldr): Mention post-index instruction in comment.
3583 (emit_ldrh): New function.
3584 (emit_ldrb): New function.
3585 (emit_ldrsw): Mention post-index instruction in comment.
3586 (emit_str): Likewise.
3587 (emit_subs): New function.
3588 (emit_cmp): Likewise.
3589 (emit_and): Likewise.
3590 (emit_orr): Likewise.
3591 (emit_orn): Likewise.
3592 (emit_eor): Likewise.
3593 (emit_mvn): Likewise.
3594 (emit_lslv): Likewise.
3595 (emit_lsrv): Likewise.
3596 (emit_asrv): Likewise.
3597 (emit_mul): Likewise.
3598 (emit_sbfm): Likewise.
3599 (emit_sbfx): Likewise.
3600 (emit_ubfm): Likewise.
3601 (emit_ubfx): Likewise.
3602 (emit_csinc): Likewise.
3603 (emit_cset): Likewise.
3604 (emit_nop): Likewise.
3605 (emit_ops_insns): New helper function.
3606 (emit_pop): Likewise.
3607 (emit_push): Likewise.
3608 (aarch64_emit_prologue): New function.
3609 (aarch64_emit_epilogue): Likewise.
3610 (aarch64_emit_add): Likewise.
3611 (aarch64_emit_sub): Likewise.
3612 (aarch64_emit_mul): Likewise.
3613 (aarch64_emit_lsh): Likewise.
3614 (aarch64_emit_rsh_signed): Likewise.
3615 (aarch64_emit_rsh_unsigned): Likewise.
3616 (aarch64_emit_ext): Likewise.
3617 (aarch64_emit_log_not): Likewise.
3618 (aarch64_emit_bit_and): Likewise.
3619 (aarch64_emit_bit_or): Likewise.
3620 (aarch64_emit_bit_xor): Likewise.
3621 (aarch64_emit_bit_not): Likewise.
3622 (aarch64_emit_equal): Likewise.
3623 (aarch64_emit_less_signed): Likewise.
3624 (aarch64_emit_less_unsigned): Likewise.
3625 (aarch64_emit_ref): Likewise.
3626 (aarch64_emit_if_goto): Likewise.
3627 (aarch64_emit_goto): Likewise.
3628 (aarch64_write_goto_address): Likewise.
3629 (aarch64_emit_const): Likewise.
3630 (aarch64_emit_call): Likewise.
3631 (aarch64_emit_reg): Likewise.
3632 (aarch64_emit_pop): Likewise.
3633 (aarch64_emit_stack_flush): Likewise.
3634 (aarch64_emit_zero_ext): Likewise.
3635 (aarch64_emit_swap): Likewise.
3636 (aarch64_emit_stack_adjust): Likewise.
3637 (aarch64_emit_int_call_1): Likewise.
3638 (aarch64_emit_void_call_2): Likewise.
3639 (aarch64_emit_eq_goto): Likewise.
3640 (aarch64_emit_ne_goto): Likewise.
3641 (aarch64_emit_lt_goto): Likewise.
3642 (aarch64_emit_le_goto): Likewise.
3643 (aarch64_emit_gt_goto): Likewise.
3644 (aarch64_emit_ge_got): Likewise.
3645 (aarch64_emit_ops_impl): New static global variable.
3646 (aarch64_emit_ops): New target function, return
3647 &aarch64_emit_ops_impl.
3648 (struct linux_target_ops): Install it.
3650 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3652 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3653 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3655 * linux-aarch64-ipa.c: New file.
3656 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3658 (aarch64_get_thread_area): New target method.
3659 (extract_signed_bitfield): New helper function.
3660 (aarch64_decode_ldr_literal): New function.
3661 (enum aarch64_opcodes): New enum.
3662 (struct aarch64_register): New struct.
3663 (struct aarch64_operand): New struct.
3664 (x0): New static global.
3673 (aarch64_register): New helper function.
3674 (register_operand): Likewise.
3675 (immediate_operand): Likewise.
3676 (struct aarch64_memory_operand): New struct.
3677 (offset_memory_operand): New helper function.
3678 (preindex_memory_operand): Likewise.
3679 (enum aarch64_system_control_registers): New enum.
3680 (ENCODE): New macro.
3681 (emit_insn): New helper function.
3682 (emit_b): New function.
3683 (emit_bcond): Likewise.
3684 (emit_cb): Likewise.
3685 (emit_tb): Likewise.
3686 (emit_blr): Likewise.
3687 (emit_stp): Likewise.
3688 (emit_ldp_q_offset): Likewise.
3689 (emit_stp_q_offset): Likewise.
3690 (emit_load_store): Likewise.
3691 (emit_ldr): Likewise.
3692 (emit_ldrsw): Likewise.
3693 (emit_str): Likewise.
3694 (emit_ldaxr): Likewise.
3695 (emit_stxr): Likewise.
3696 (emit_stlr): Likewise.
3697 (emit_data_processing_reg): Likewise.
3698 (emit_data_processing): Likewise.
3699 (emit_add): Likewise.
3700 (emit_sub): Likewise.
3701 (emit_mov): Likewise.
3702 (emit_movk): Likewise.
3703 (emit_mov_addr): Likewise.
3704 (emit_mrs): Likewise.
3705 (emit_msr): Likewise.
3706 (emit_sevl): Likewise.
3707 (emit_wfe): Likewise.
3708 (append_insns): Likewise.
3709 (can_encode_int32_in): New helper function.
3710 (aarch64_relocate_instruction): New function.
3711 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3712 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3713 (struct linux_target_ops): Install aarch64_get_thread_area,
3714 aarch64_install_fast_tracepoint_jump_pad and
3715 aarch64_get_min_fast_tracepoint_insn_len.
3717 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3719 * Makefile.in (aarch64-insn.o): New rule.
3720 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3722 2015-09-21 Yao Qi <yao.qi@linaro.org>
3724 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3726 2015-09-21 Yao Qi <yao.qi@linaro.org>
3728 * tracepoint.c (max_jump_pad_size): Remove.
3730 2015-09-18 Yao Qi <yao.qi@linaro.org>
3732 * linux-aarch64-low.c: Don't include sys/uio.h.
3733 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3735 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3737 * tracepoint.c (eval_result_type): Change prototype.
3738 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3740 2015-09-15 Pedro Alves <palves@redhat.com>
3742 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3743 Check whether to report exec events instead of checking whether
3744 multiprocess is enabled.
3746 2015-09-15 Pedro Alves <palves@redhat.com>
3749 * remote-utils.c (prepare_resume_reply): Merge
3750 TARGET_WAITKIND_VFORK_DONE switch case with the
3751 TARGET_WAITKIND_FORKED case.
3753 2015-09-15 Yao Qi <yao.qi@linaro.org>
3755 * server.c (handle_query): Check string comparison using
3756 "else if" instead of "if".
3758 2015-09-15 Yao Qi <yao.qi@linaro.org>
3760 * server.c (vCont_supported): New global variable.
3761 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3762 matches. Append ";vContSupported+" to own_buf.
3763 (handle_v_requests): Append ";s;S" to own_buf if target supports
3764 hardware single step or vCont_supported is false.
3765 (capture_main): Set vCont_supported to zero.
3767 2015-09-15 Yao Qi <yao.qi@linaro.org>
3769 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3771 (linux_supports_hardware_single_step): ... New function.
3772 (linux_target_ops): Update.
3773 * lynx-low.c (lynx_target_ops): Set field
3774 supports_hardware_single_step to target_can_do_hardware_single_step.
3775 * nto-low.c (nto_target_ops): Likewise.
3776 * spu-low.c (spu_target_ops): Likewise.
3777 * win32-low.c (win32_target_ops): Likewise.
3778 * target.c (target_can_do_hardware_single_step): New function.
3779 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3780 Remove. <supports_hardware_single_step>: New field.
3781 (target_supports_conditional_breakpoints): Remove.
3782 (target_supports_hardware_single_step): New macro.
3783 (target_can_do_hardware_single_step): Declare.
3784 * server.c (handle_query): Use target_supports_hardware_single_step
3785 instead of target_supports_conditional_breakpoints.
3787 2015-09-15 Yao Qi <yao.qi@linaro.org>
3789 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3791 (struct linux_target_ops the_low_target): Install
3792 aarch64_linux_siginfo_fixup.
3794 2015-09-11 Don Breazeal <donb@codesourcery.com>
3795 Luis Machado <lgustavo@codesourcery.com>
3797 * linux-low.c (linux_mourn): Static declaration.
3798 (linux_arch_setup): Move in front of
3799 handle_extended_wait.
3800 (linux_arch_setup_thread): New function.
3801 (handle_extended_wait): Handle exec events. Call
3802 linux_arch_setup_thread. Make event_lwp argument a
3803 pointer-to-a-pointer.
3804 (check_zombie_leaders): Do not check stopped threads.
3805 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3806 (linux_low_filter_event): Add lwp and thread for exec'ing
3807 non-leader thread if leader thread has been deleted.
3808 Refactor code into linux_arch_setup_thread and call it.
3809 Pass child lwp pointer by reference to handle_extended_wait.
3810 (linux_wait_for_event_filtered): Update comment.
3811 (linux_wait_1): Prevent clobbering exec event status.
3812 (linux_supports_exec_events): New function.
3813 (linux_target_ops) <supports_exec_events>: Initialize new member.
3814 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3816 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3817 * server.c (report_exec_events): New global variable.
3818 (handle_query): Handle qSupported query for exec-events feature.
3819 (captured_main): Initialize report_exec_events.
3820 * server.h (report_exec_events): Declare new global variable.
3821 * target.h (struct target_ops) <supports_exec_events>: New
3823 (target_supports_exec_events): New macro.
3824 * win32-low.c (win32_target_ops) <supports_exec_events>:
3825 Initialize new member.
3827 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3829 * linux-low.c (linux_low_enable_btrace): Remove.
3830 (linux_target_ops): Replace linux_low_enable_btrace with
3831 linux_enable_btrace.
3833 2015-09-03 Yao Qi <yao.qi@linaro.org>
3835 * linux-aarch64-low.c (aarch64_insert_point): Call
3836 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3839 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3841 * linux-low.c (check_stopped_by_breakpoint): Use
3842 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3844 2015-08-27 Pedro Alves <palves@redhat.com>
3846 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3848 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3850 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3851 the XNEW-family equivalent.
3852 (compile_bytecodes): Likewise.
3853 * dll.c (loaded_dll): Likewise.
3854 * event-loop.c (append_callback_event): Likewise.
3855 (create_file_handler): Likewise.
3856 (create_file_event): Likewise.
3857 * hostio.c (handle_open): Likewise.
3858 * inferiors.c (add_thread): Likewise.
3859 (add_process): Likewise.
3860 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3861 * linux-arm-low.c (arm_new_process): Likewise.
3862 (arm_new_thread): Likewise.
3863 * linux-low.c (add_to_pid_list): Likewise.
3864 (linux_add_process): Likewise.
3865 (handle_extended_wait): Likewise.
3866 (add_lwp): Likewise.
3867 (enqueue_one_deferred_signal): Likewise.
3868 (enqueue_pending_signal): Likewise.
3869 (linux_resume_one_lwp_throw): Likewise.
3870 (linux_resume_one_thread): Likewise.
3871 (linux_read_memory): Likewise.
3872 (linux_write_memory): Likewise.
3873 * linux-mips-low.c (mips_linux_new_process): Likewise.
3874 (mips_linux_new_thread): Likewise.
3875 (mips_add_watchpoint): Likewise.
3876 * linux-x86-low.c (initialize_low_arch): Likewise.
3877 * lynx-low.c (lynx_add_process): Likewise.
3878 * mem-break.c (set_raw_breakpoint_at): Likewise.
3879 (set_breakpoint): Likewise.
3880 (add_condition_to_breakpoint): Likewise.
3881 (add_commands_to_breakpoint): Likewise.
3882 (clone_agent_expr): Likewise.
3883 (clone_one_breakpoint): Likewise.
3884 * regcache.c (new_register_cache): Likewise.
3885 * remote-utils.c (look_up_one_symbol): Likewise.
3886 * server.c (queue_stop_reply): Likewise.
3887 (start_inferior): Likewise.
3888 (queue_stop_reply_callback): Likewise.
3889 (handle_target_event): Likewise.
3890 * spu-low.c (fetch_ppc_memory): Likewise.
3891 (store_ppc_memory): Likewise.
3892 * target.c (set_target_ops): Likewise.
3893 * thread-db.c (thread_db_load_search): Likewise.
3894 (try_thread_db_load_1): Likewise.
3895 * tracepoint.c (add_tracepoint): Likewise.
3896 (add_tracepoint_action): Likewise.
3897 (create_trace_state_variable): Likewise.
3898 (cmd_qtdpsrc): Likewise.
3899 (cmd_qtro): Likewise.
3900 (add_while_stepping_state): Likewise.
3901 * win32-low.c (child_add_thread): Likewise.
3902 (get_image_name): Likewise.
3904 2015-08-25 Yao Qi <yao.qi@linaro.org>
3906 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3908 2015-08-25 Yao Qi <yao.qi@linaro.org>
3910 * Makefile.in (aarch64-linux.o): New rule.
3911 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3913 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3914 (aarch64_init_debug_reg_state): Make it extern.
3915 (aarch64_linux_prepare_to_resume): Remove.
3917 2015-08-25 Yao Qi <yao.qi@linaro.org>
3919 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3920 lwp_arch_private_info and ptid_of_lwp.
3922 2015-08-25 Yao Qi <yao.qi@linaro.org>
3924 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3925 Find proc_info by find_process_pid. All callers updated.
3927 2015-08-25 Yao Qi <yao.qi@linaro.org>
3929 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3931 (debug_reg_change_callback): Remove.
3932 (aarch64_notify_debug_reg_change): Remove.
3934 2015-08-25 Yao Qi <yao.qi@linaro.org>
3936 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3937 Call current_lwp_ptid.
3939 2015-08-25 Yao Qi <yao.qi@linaro.org>
3941 * linux-aarch64-low.c (debug_reg_change_callback): Use
3944 2015-08-25 Yao Qi <yao.qi@linaro.org>
3946 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3948 2015-08-25 Yao Qi <yao.qi@linaro.org>
3950 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3952 2015-08-25 Yao Qi <yao.qi@linaro.org>
3954 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3957 2015-08-25 Yao Qi <yao.qi@linaro.org>
3959 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3961 (debug_reg_change_callback): Remove argument entry and add argument
3962 lwp. Remove local variable thread. Don't print thread id in the
3963 debugging output. Don't check whether pid of thread equals to pid.
3964 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3965 iterate_over_lwps instead find_inferior.
3967 2015-08-24 Pedro Alves <palves@redhat.com>
3969 * inferiors.c (get_first_process): New function.
3970 * inferiors.h (get_first_process): New declaration.
3971 * remote-utils.c (read_ptid): Default to the first process in the
3972 list, instead of to the current thread's process.
3974 2015-08-24 Pedro Alves <palves@redhat.com>
3976 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3977 * event-loop.c: Likewise.
3978 * remote-utils.c: Likewise.
3979 * tracepoint.c: Likewise.
3981 2015-08-24 Pedro Alves <palves@redhat.com>
3983 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3986 2015-08-21 Pedro Alves <palves@redhat.com>
3988 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3989 instead of literal 1.
3991 2015-08-21 Pedro Alves <palves@redhat.com>
3993 * tdesc.c (default_description): Explicitly zero-initialize.
3995 2015-08-21 Pedro Alves <palves@redhat.com>
3998 * inferiors.c (remove_thread): Discard any pending stop reply for
4000 * server.c (remove_all_on_match_pid): Rename to ...
4001 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4003 (discard_queued_stop_replies): Change parameter to a ptid. Now
4005 (handle_v_kill, kill_inferior_callback, captured_main)
4006 (process_serial_event): Adjust.
4007 * server.h (discard_queued_stop_replies): Declare.
4009 2015-08-21 Pedro Alves <palves@redhat.com>
4011 * linux-low.c (wait_for_sigstop): Always switch to no thread
4012 selected if the previously current thread dies.
4013 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4014 process instead of the current thread's.
4015 * remote-utils.c (input_interrupt): Don't check if there's no
4017 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4018 current thread to the general thread fails, error out.
4019 (handle_qxfer_auxv, handle_qxfer_libraries)
4020 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4021 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4022 (handle_query): Check if there's a thread selected instead of
4023 checking whether there's any thread in the thread list.
4024 (handle_qxfer_threads, handle_qxfer_btrace)
4025 (handle_qxfer_btrace_conf): Don't error out early if there's no
4026 thread in the thread list.
4027 (handle_v_cont, myresume): Don't set the current thread to the
4029 (process_serial_event) <Hg handling>: Also set thread_id if the
4030 previous general thread is still alive.
4031 (process_serial_event) <g/G handling>: If setting the current
4032 thread to the general thread fails, error out.
4033 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4034 thread's lwp instead of the current thread's.
4035 * target.c (set_desired_thread): If the desired thread was not
4036 found, leave the current thread pointing to NULL. Return an int
4037 (boolean) indicating success.
4038 * target.h (set_desired_thread): Change return type to int.
4040 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4042 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4043 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4045 (ps_get_thread_area): New function.
4047 2015-08-19 Gary Benson <gbenson@redhat.com>
4049 * hostio.c (handle_pread): Do not attempt to read more data
4050 than hostio_reply_with_data can fit in a packet.
4052 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4054 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4056 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4058 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4060 2015-08-06 Pedro Alves <palves@redhat.com>
4062 * tracepoint.c (expr_eval_result): Now an int.
4064 2015-08-06 Pedro Alves <palves@redhat.com>
4066 * gdbthread.h (struct regcache): Forward declare.
4067 (struct thread_info) <regcache_data>: Now a struct regcache
4069 * inferiors.c (inferior_regcache_data)
4070 (set_inferior_regcache_data): Now work with struct regcache
4072 * inferiors.h (struct regcache): Forward declare.
4073 (inferior_regcache_data, set_inferior_regcache_data): Now work
4074 with struct regcache pointers.
4075 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4076 (free_register_cache_thread): Remove struct regcache pointer
4079 2015-08-06 Pedro Alves <palves@redhat.com>
4081 * server.c (captured_main): On error, print the exception message
4082 to stderr, and if run_once is set, throw a quit.
4084 2015-08-06 Pedro Alves <palves@redhat.com>
4086 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4089 2015-08-06 Pedro Alves <palves@redhat.com>
4091 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4092 reading beyond the passed in buffer length.
4094 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4096 * tracepoint.c (symbol_list) <required>: Remove.
4098 2015-08-06 Pedro Alves <palves@redhat.com>
4100 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4101 count if stopping and suspending threads.
4102 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4103 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4104 (linux_detach): Complete an ongoing step-over.
4105 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4107 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4108 (linux_wait_1): If passing a signal to the inferior after
4109 finishing a step-over, unsuspend and re-resume all lwps. If we
4110 see a single-step event but the thread should be continuing, don't
4111 pass the trap to gdb.
4112 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4113 internal_error instead of gdb_assert.
4114 (enqueue_pending_signal): New function.
4115 (check_ptrace_stopped_lwp_gone): Add debug output.
4116 (start_step_over): Use internal_error instead of gdb_assert.
4117 (complete_ongoing_step_over): New function.
4118 (linux_resume_one_thread): Don't resume a suspended thread.
4119 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4122 2015-08-06 Pedro Alves <palves@redhat.com>
4124 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4125 (linux_thread_alive): Use lwp_is_marked_dead.
4126 (extended_event_reported): Delete.
4127 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4128 instead of extended_event_reported.
4129 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4131 (lwp_is_marked_dead): New function.
4132 (lwp_running): Use lwp_is_marked_dead.
4133 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4136 2015-08-06 Pedro Alves <palves@redhat.com>
4138 * linux-low.c (linux_wait_1): Move fork event output out of the
4139 !report_to_gdb check. Pass event_child->waitstatus to
4140 target_waitstatus_to_string instead of ourstatus.
4142 2015-08-04 Yao Qi <yao.qi@linaro.org>
4144 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4145 if current_thread is 32 bit.
4147 2015-08-04 Yao Qi <yao.qi@linaro.org>
4149 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4150 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4151 * server.c (extended_protocol): Remove "static".
4152 * server.h (extended_protocol): Declare it.
4154 2015-08-04 Yao Qi <yao.qi@linaro.org>
4156 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4157 both aarch64 and aarch32.
4158 (aarch64_set_pc): Likewise.
4160 2015-08-04 Yao Qi <yao.qi@linaro.org>
4162 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4163 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4164 arm-with-neon.xml to srv_xmlfiles.
4165 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4166 (is_64bit_tdesc): New function.
4167 (aarch64_linux_read_description): New function.
4168 (aarch64_arch_setup): Call aarch64_linux_read_description.
4169 (regs_info): Rename to regs_info_aarch64.
4170 (aarch64_regs_info): Return right regs_info.
4171 (initialize_low_arch): Call initialize_low_arch_aarch32.
4173 2015-08-04 Yao Qi <yao.qi@linaro.org>
4175 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4176 * linux-aarch32-low.c: New file.
4177 * linux-aarch32-low.h: New file.
4178 * linux-arm-low.c (arm_fill_gregset): Move it to
4179 linux-aarch32-low.c.
4180 (arm_store_gregset): Likewise.
4181 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4182 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4183 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4184 (regs_info): Rename to regs_info_arm.
4185 (arm_regs_info): Return regs_info_aarch32 if
4186 have_ptrace_getregset is 1 and target description is
4187 arm_with_neon or arm_with_vfpv3.
4188 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4189 Call initialize_low_arch_aarch32 instead.
4191 2015-08-04 Yao Qi <yao.qi@linaro.org>
4193 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4194 * linux-low.c: ... here.
4195 * linux-low.h (have_ptrace_getregset): Declare it.
4197 2015-08-04 Pedro Alves <palves@redhat.com>
4199 * thread-db.c (struct thread_db): Use new typedefs.
4200 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4202 (disable_thread_event_reporting): Cast result of dlsym to
4203 destination function pointer type.
4204 (thread_db_mourn): Use td_ta_delete_ftype.
4206 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4208 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4210 (CDX_BREAKPOINT): Define for R2.
4211 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4212 (the_low_target): Add comments.
4214 2015-07-30 Yao Qi <yao.qi@linaro.org>
4216 * linux-arm-low.c (arm_hwcap): Remove it.
4217 (arm_read_description): New local variable arm_hwcap. Don't
4218 set arm_hwcap to zero.
4220 2015-07-30 Yao Qi <yao.qi@linaro.org>
4222 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4223 Use regcache->tdesc instead.
4224 (arm_store_wmmxregset): Likewise.
4225 (arm_fill_vfpregset): Likewise.
4226 (arm_store_vfpregset): Likewise.
4228 2015-07-30 Yao Qi <yao.qi@linaro.org>
4230 * linux-arm-low.c: Include arch/arm.h.
4231 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4232 (arm_store_gregset): Likewise.
4234 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4236 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4237 ptrace's 4th parameter.
4239 2015-07-27 Yao Qi <yao.qi@linaro.org>
4241 * configure.srv (case aarch64*-*-linux*): Don't set
4244 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4246 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4248 * linux-arm-low.c: Likewise.
4249 * linux-cris-low.c: Likewise.
4250 * linux-crisv32-low.c: Likewise.
4251 * linux-low.c: Likewise.
4252 * linux-m68k-low.c: Likewise.
4253 * linux-mips-low.c: Likewise.
4254 * linux-nios2-low.c: Likewise.
4255 * linux-s390-low.c: Likewise.
4256 * linux-sparc-low.c: Likewise.
4257 * linux-tic6x-low.c: Likewise.
4258 * linux-tile-low.c: Likewise.
4259 * linux-x86-low.c: Likewise.
4261 2015-07-24 Pedro Alves <palves@redhat.com>
4263 * config.in: Regenerate.
4264 * configure: Regenerate.
4266 2015-07-24 Pedro Alves <palves@redhat.com>
4268 * acinclude.m4: Include ../ptrace.m4.
4269 * configure.ac: Call GDB_AC_PTRACE.
4270 * config.in, configure: Regenerate.
4272 2015-07-24 Yao Qi <yao.qi@linaro.org>
4274 * linux-low.c (linux_create_inferior): Remove setting to
4275 proc->priv->new_inferior.
4276 (linux_attach): Likewise.
4277 (linux_low_filter_event): Likewise.
4278 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4280 2015-07-24 Yao Qi <yao.qi@linaro.org>
4282 * linux-low.c (linux_arch_setup): New function.
4283 (linux_low_filter_event): If proc->tdesc is NULL and
4284 proc->attached is true, call the_low_target.arch_setup.
4285 Otherwise, keep status pending, and return.
4286 (linux_resume_one_lwp_throw): Don't call get_pc if
4287 thread->while_stepping isn't NULL. Don't call
4288 get_thread_regcache if proc->tdesc is NULL.
4289 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4290 (linux_target_ops): Install arch_setup.
4291 * server.c (start_inferior): Call the_target->arch_setup.
4292 * target.h (struct target_ops) <arch_setup>: New field.
4293 (target_arch_setup): New marco.
4294 * lynx-low.c (lynx_target_ops): Update.
4295 * nto-low.c (nto_target_ops): Update.
4296 * spu-low.c (spu_target_ops): Update.
4297 * win32-low.c (win32_target_ops): Update.
4299 2015-07-24 Yao Qi <yao.qi@linaro.org>
4301 * linux-low.c (linux_add_process): Don't set
4302 proc->priv->new_inferior.
4303 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4304 (linux_attach): Likewise.
4306 2015-07-24 Yao Qi <yao.qi@linaro.org>
4308 * server.c (start_inferior): Code refactor.
4310 2015-07-24 Yao Qi <yao.qi@linaro.org>
4312 * server.c (process_serial_event): Set general_thread.
4314 2015-07-21 Yao Qi <yao.qi@linaro.org>
4316 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4317 aarch64_linux_get_debug_reg_capacity.
4319 2015-07-17 Yao Qi <yao.qi@linaro.org>
4321 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4322 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4323 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4324 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4325 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4326 (AARCH64_HWP_ALIGNMENT): Likewise.
4327 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4328 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4329 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4330 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4331 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4332 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4333 (struct aarch64_debug_reg_state): Likewise.
4334 (struct arch_lwp_info): Likewise.
4335 (aarch64_align_watchpoint): Likewise.
4336 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4337 (aarch64_watchpoint_length): Likewise.
4338 (aarch64_point_encode_ctrl_reg): Likewise
4339 (aarch64_point_is_aligned): Likewise.
4340 (aarch64_align_watchpoint): Likewise.
4341 (aarch64_linux_set_debug_regs):
4342 (aarch64_dr_state_insert_one_point): Likewise.
4343 (aarch64_dr_state_remove_one_point): Likewise.
4344 (aarch64_handle_breakpoint): Likewise.
4345 (aarch64_handle_aligned_watchpoint): Likewise.
4346 (aarch64_handle_unaligned_watchpoint): Likewise.
4347 (aarch64_handle_watchpoint): Likewise.
4349 2015-07-17 Yao Qi <yao.qi@linaro.org>
4351 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4352 and don't aarch64_get_debug_reg_state. All callers update.
4353 (aarch64_handle_aligned_watchpoint): Likewise.
4354 (aarch64_handle_unaligned_watchpoint): Likewise.
4355 (aarch64_handle_watchpoint): Likewise.
4356 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4357 (aarch64_remove_point): Likewise.
4359 2015-07-17 Yao Qi <yao.qi@linaro.org>
4361 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4363 (aarch64_handle_unaligned_watchpoint): Likewise.
4365 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4367 Revert the previous 3 commits:
4368 Move gdb_regex* to common/
4369 Move linux_find_memory_regions_full & co.
4370 gdbserver build-id attribute generator
4372 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4373 Jan Kratochvil <jan.kratochvil@redhat.com>
4375 gdbserver build-id attribute generator.
4376 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4377 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4378 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4380 (get_dynamic): Use find_pdhr to traverse program headers.
4381 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4382 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4383 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4384 (get_hex_build_id): New.
4385 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4386 to reply XML document.
4388 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4389 Jan Kratochvil <jan.kratochvil@redhat.com>
4391 * target.c: Include target/target-utils.h and fcntl.h.
4392 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4393 (target_fileio_read_stralloc): New functions.
4395 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4397 * Makefile.in (OBS): Add gdb_regex.o.
4399 * config.in: Rebuilt.
4400 * configure: Rebuilt.
4402 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4403 Jan Kratochvil <jan.kratochvil@redhat.com>
4405 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4406 * Makefile.in (OBS): Add target-utils.o.
4407 (linux-maps.o, target-utils.o): New.
4408 * configure.srv (srv_linux_obj): Add linux-maps.o.
4410 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4412 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4414 (the_low_target): Install it.
4416 2015-07-14 Pedro Alves <palves@redhat.com>
4418 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4419 Instead, ignore ECHILD, and throw an error for other errnos.
4421 2015-07-10 Pedro Alves <palves@redhat.com>
4423 * event-loop.c (struct callback_event) <data>: Change type to
4424 gdb_client_data instance instead of gdb_client_data pointer.
4425 (append_callback_event): Adjust.
4427 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4429 * linux-aarch64-low.c: Add comments for each linux_target_ops
4430 method. Remove comments already covered in target_ops and
4431 linux_target_ops definitions.
4432 (the_low_target): Add comments for each unimplemented method.
4434 2015-07-09 Yao Qi <yao.qi@linaro.org>
4436 * linux-aarch64-low.c (aarch64_regmap): Remove.
4437 (aarch64_usrregs_info): Remove.
4438 (regs_info): Set field usrregs to NULL.
4440 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4442 * linux-low.c: Include "rsp-low.h"
4443 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4444 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4445 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4446 (handle_btrace_enable_pt): New.
4447 (handle_btrace_general_set): Support "pt".
4448 (handle_btrace_conf_general_set): Support "pt:size".
4450 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4452 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4455 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4457 * linux-aarch64-low.c: Remove comment about endianness.
4458 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4459 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4462 2015-06-24 Gary Benson <gbenson@redhat.com>
4464 * linux-i386-ipa.c (stdint.h): Do not include.
4465 * lynx-i386-low.c (stdint.h): Likewise.
4466 * lynx-ppc-low.c (stdint.h): Likewise.
4467 * mem-break.c (stdint.h): Likewise.
4468 * thread-db.c (stdint.h): Likewise.
4469 * tracepoint.c (stdint.h): Likewise.
4470 * win32-low.c (stdint.h): Likewise.
4472 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4474 * server.c (write_qxfer_response): Update call to
4475 remote_escape_output.
4477 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4478 Jan Kratochvil <jan.kratochvil@redhat.com>
4480 Merge multiple hex conversions.
4481 * gdbreplay.c (tohex): Rename to 'fromhex'.
4482 (logchar): Use fromhex.
4484 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4486 * server.c (handle_qxfer_libraries): Set `version' attribute for
4489 2015-06-10 Gary Benson <gbenson@redhat.com>
4491 * target.h (struct target_ops) <multifs_open>: New field.
4492 <multifs_unlink>: Likewise.
4493 <multifs_readlink>: Likewise.
4494 * linux-low.c (nat/linux-namespaces.h): New include.
4495 (linux_target_ops): Initialize the_target->multifs_open,
4496 the_target->multifs_unlink and the_target->multifs_readlink.
4497 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4498 * hostio.c (hostio_fs_pid): New static variable.
4499 (hostio_handle_new_gdb_connection): New function.
4500 (handle_setfs): Likewise.
4501 (handle_open): Use the_target->multifs_open as appropriate.
4502 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4503 (handle_readlink): Use the_target->multifs_readlink as
4505 (handle_vFile): Handle vFile:setfs packets.
4506 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4507 after target_handle_new_gdb_connection.
4509 2015-06-10 Gary Benson <gbenson@redhat.com>
4511 * configure.ac (AC_CHECK_FUNCS): Add setns.
4512 * config.in: Regenerate.
4513 * configure: Likewise.
4514 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4515 (linux-namespaces.o): New rule.
4516 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4518 2015-06-09 Gary Benson <gbenson@redhat.com>
4520 * hostio.c (handle_open): Process mode argument with
4521 fileio_to_host_mode.
4523 2015-06-01 Yao Qi <yao.qi@linaro.org>
4525 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4526 * linux-x86-low.c: Likewise.
4528 2015-05-28 Don Breazeal <donb@codesourcery.com>
4530 * linux-low.c (handle_extended_wait): Initialize
4531 thread_info.last_resume_kind for new fork children.
4533 2015-05-15 Pedro Alves <palves@redhat.com>
4535 * target.h (target_handle_new_gdb_connection): Rewrite using if
4536 wrapped in do/while.
4538 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4540 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4541 * configure, config.in: Regenerate.
4542 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4545 2015-05-12 Don Breazeal <donb@codesourcery.com>
4547 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4548 PTRACE_EVENT_VFORK_DONE.
4549 (linux_low_ptrace_options, extended_event_reported): Add vfork
4551 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4552 and "vforkdone" for RSP 'T' Stop Reply Packet.
4553 * server.h (report_vfork_events): Declare
4556 2015-05-12 Don Breazeal <donb@codesourcery.com>
4558 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4559 (the_low_target) <new_fork>: Initialize new member.
4560 * linux-arm-low.c (arm_new_fork): New function.
4561 (the_low_target) <new_fork>: Initialize new member.
4562 * linux-low.c (handle_extended_wait): Call new target function
4564 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4565 * linux-mips-low.c (mips_add_watchpoint): New function
4566 extracted from mips_insert_point.
4567 (the_low_target) <new_fork>: Initialize new member.
4568 (mips_linux_new_fork): New function.
4569 (mips_insert_point): Call mips_add_watchpoint.
4570 * linux-x86-low.c (x86_linux_new_fork): New function.
4571 (the_low_target) <new_fork>: Initialize new member.
4573 2015-05-12 Don Breazeal <donb@codesourcery.com>
4575 * linux-low.c (handle_extended_wait): Implement return value,
4576 rename argument 'event_child' to 'event_lwp', handle
4577 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4578 (linux_low_ptrace_options): New function.
4579 (linux_low_filter_event): Call linux_low_ptrace_options,
4580 use different argument fo linux_enable_event_reporting,
4581 use return value from handle_extended_wait.
4582 (extended_event_reported): New function.
4583 (linux_wait_1): Call extended_event_reported and set
4584 status to report fork events.
4585 (linux_write_memory): Add pid to debug message.
4586 (reset_lwp_ptrace_options_callback): New function.
4587 (linux_handle_new_gdb_connection): New function.
4588 (linux_target_ops): Initialize new structure member.
4589 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4590 * lynx-low.c: Initialize new structure member.
4591 * remote-utils.c (prepare_resume_reply): Implement stop reason
4592 "fork" for "T" stop message.
4593 * server.c (handle_query): Call handle_new_gdb_connection.
4594 * server.h (report_fork_events): Declare global flag.
4595 * target.h (struct target_ops) <handle_new_gdb_connection>:
4597 (target_handle_new_gdb_connection): New macro.
4598 * win32-low.c: Initialize new structure member.
4600 2015-05-12 Don Breazeal <donb@codesourcery.com>
4602 * mem-break.c (APPEND_TO_LIST): Define macro.
4603 (clone_agent_expr): New function.
4604 (clone_one_breakpoint): New function.
4605 (clone_all_breakpoints): New function.
4606 * mem-break.h: Declare new functions.
4608 2015-05-12 Don Breazeal <donb@codesourcery.com>
4610 * linux-low.c (linux_supports_fork_events): New function.
4611 (linux_supports_vfork_events): New function.
4612 (linux_target_ops): Initialize new structure members.
4613 (initialize_low): Call linux_check_ptrace_features.
4614 * lynx-low.c (lynx_target_ops): Initialize new structure
4616 * server.c (report_fork_events, report_vfork_events):
4618 (handle_query): Add new features to qSupported packet and
4620 (captured_main): Initialize new global variables.
4621 * target.h (struct target_ops) <supports_fork_events>:
4623 <supports_vfork_events>: New member.
4624 (target_supports_fork_events): New macro.
4625 (target_supports_vfork_events): New macro.
4626 * win32-low.c (win32_target_ops): Initialize new structure
4629 2015-05-12 Gary Benson <gbenson@redhat.com>
4631 * server.c (handle_qxfer_exec_file): Use current process
4634 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4636 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4637 Remove HAVE_PTRACE_GETREGS conditionals.
4638 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4639 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4641 2015-05-08 Yao Qi <yao.qi@linaro.org>
4643 * linux-low.c (linux_supports_conditional_breakpoints): New
4645 (linux_target_ops): Install new target method.
4646 * lynx-low.c (lynx_target_ops): Install NULL hook for
4647 supports_conditional_breakpoints.
4648 * nto-low.c (nto_target_ops): Likewise.
4649 * spu-low.c (spu_target_ops): Likewise.
4650 * win32-low.c (win32_target_ops): Likewise.
4651 * server.c (handle_query): Check
4652 target_supports_conditional_breakpoints.
4653 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4655 (target_supports_conditional_breakpoints): New macro.
4657 2015-05-06 Pedro Alves <palves@redhat.com>
4660 * server.c (start_inferior): If the process exits, mourn it.
4662 2015-04-21 Gary Benson <gbenson@redhat.com>
4664 * hostio.c (fileio_open_flags_to_host): Factored out to
4665 fileio_to_host_openflags in common/fileio.c. Single use
4668 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4670 * linux-xtensa-low.c (xtensa_fill_gregset)
4671 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4674 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4676 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4677 (regs_info): Replace usrregs pointer with NULL.
4679 2015-04-17 Gary Benson <gbenson@redhat.com>
4681 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4682 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4683 * server.c (handle_qxfer_exec_file): New function.
4684 (qxfer_packets): Add exec-file entry.
4685 (handle_query): Report qXfer:exec-file:read as supported packet.
4687 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4689 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4691 2015-04-09 Gary Benson <gbenson@redhat.com>
4693 * hostio-errno.c (errno_to_fileio_error): Remove function.
4694 Update caller to use remote_fileio_to_fio_error.
4696 2015-04-09 Yao Qi <yao.qi@linaro.org>
4698 * linux-low.c (linux_insert_point): Call
4699 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4700 (linux_remove_point): Call remove_memory_breakpoint if type is
4702 * linux-x86-low.c (x86_insert_point): Don't call
4703 insert_memory_breakpoint.
4704 (x86_remove_point): Don't call remove_memory_breakpoint.
4706 2015-04-01 Pedro Alves <palves@redhat.com>
4707 Cleber Rosa <crosa@redhat.com>
4709 * server.c (gdbserver_usage): Reorganize and extend the usage
4712 2015-03-24 Pedro Alves <palves@redhat.com>
4714 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4715 output. Also dump TRAP_TRACE.
4716 (linux_low_filter_event): In debug output, distinguish a
4717 resume_stop SIGSTOP from a delayed SIGSTOP.
4719 2015-03-24 Gary Benson <gbenson@redhat.com>
4721 * linux-x86-low.c (x86_linux_new_thread): Moved to
4723 (x86_linux_prepare_to_resume): Likewise.
4725 2015-03-24 Gary Benson <gbenson@redhat.com>
4727 * Makefile.in (x86-linux-dregs.o): New rule.
4728 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4729 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4730 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4731 (x86_linux_dr_get): Likewise.
4732 (x86_linux_dr_set): Likewise.
4733 (update_debug_registers_callback): Likewise.
4734 (x86_linux_dr_set_addr): Likewise.
4735 (x86_linux_dr_get_addr): Likewise.
4736 (x86_linux_dr_set_control): Likewise.
4737 (x86_linux_dr_get_control): Likewise.
4738 (x86_linux_dr_get_status): Likewise.
4739 (x86_linux_update_debug_registers): Likewise.
4741 2015-03-24 Gary Benson <gbenson@redhat.com>
4743 * linux-x86-low.c (x86_linux_update_debug_registers):
4744 New function, factored out from...
4745 (x86_linux_prepare_to_resume): ...this.
4747 2015-03-24 Gary Benson <gbenson@redhat.com>
4749 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4750 (x86_linux_dr_set): Likewise.
4751 (update_debug_registers_callback): Likewise.
4752 (x86_linux_dr_set_addr): Likewise.
4753 (x86_linux_dr_get_addr): Likewise.
4754 (x86_linux_dr_set_control): Likewise.
4755 (x86_linux_dr_get_control): Likewise.
4756 (x86_linux_dr_get_status): Likewise.
4757 (x86_linux_prepare_to_resume): Likewise.
4759 2015-03-24 Gary Benson <gbenson@redhat.com>
4761 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4762 Use perror_with_name. Pass string through gettext.
4763 (x86_linux_dr_set): Likewise.
4765 2015-03-24 Gary Benson <gbenson@redhat.com>
4767 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4768 (x86_linux_dr_set_addr): ...this.
4769 (x86_dr_low_get_addr): Rename to...
4770 (x86_linux_dr_get_addr): ...this.
4771 (x86_dr_low_set_control): Rename to...
4772 (x86_linux_dr_set_control): ...this.
4773 (x86_dr_low_get_control): Rename to...
4774 (x86_linux_dr_get_control): ...this.
4775 (x86_dr_low_get_status): Rename to...
4776 (x86_linux_dr_get_status): ...this.
4777 (x86_dr_low): Update with new function names.
4779 2015-03-24 Gary Benson <gbenson@redhat.com>
4781 * Makefile.in (x86-linux.o): New rule.
4782 * configure.srv: Add x86-linux.o to relevant targets.
4783 * linux-low.c (lwp_set_arch_private_info): New function.
4784 (lwp_arch_private_info): Likewise.
4785 * linux-x86-low.c: Include nat/x86-linux.h.
4786 (arch_lwp_info): Removed structure.
4787 (update_debug_registers_callback):
4788 Use lwp_set_debug_registers_changed.
4789 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4790 and lwp_set_debug_registers_changed.
4791 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4793 2015-03-24 Gary Benson <gbenson@redhat.com>
4795 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4796 * linux-arm-low.c (arm_new_thread): Likewise.
4797 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4798 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4799 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4800 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4802 2015-03-24 Gary Benson <gbenson@redhat.com>
4804 * linux-low.c (ptid_of_lwp): New function.
4805 (lwp_is_stopped): Likewise.
4806 (lwp_stop_reason): Likewise.
4807 * linux-x86-low.c (update_debug_registers_callback):
4809 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4812 2015-03-24 Gary Benson <gbenson@redhat.com>
4814 * linux-low.h (linux_stop_lwp): Remove declaration.
4816 2015-03-24 Gary Benson <gbenson@redhat.com>
4818 * linux-low.h: Include nat/linux-nat.h.
4819 * linux-low.c (iterate_over_lwps_args): New structure.
4820 (iterate_over_lwps_filter): New function.
4821 (iterate_over_lwps): Likewise.
4822 * linux-x86-low.c (update_debug_registers_callback):
4823 Update signature to what iterate_over_lwps expects.
4824 Remove PID check that iterate_over_lwps now performs.
4825 (x86_dr_low_set_addr): Use iterate_over_lwps.
4826 (x86_dr_low_set_control): Likewise.
4828 2015-03-24 Gary Benson <gbenson@redhat.com>
4830 * linux-x86-low.c (x86_debug_reg_state): New function.
4831 (x86_linux_prepare_to_resume): Use the above.
4833 2015-03-24 Gary Benson <gbenson@redhat.com>
4835 * linux-low.c (current_lwp_ptid): New function.
4836 * linux-x86-low.c: Include nat/linux-nat.h.
4837 (x86_dr_low_get_addr): Use current_lwp_ptid.
4838 (x86_dr_low_get_control): Likewise.
4839 (x86_dr_low_get_status): Likewise.
4841 2015-03-20 Pedro Alves <palves@redhat.com>
4843 * tracepoint.c (cmd_qtstatus): Make "str" const.
4845 2015-03-20 Pedro Alves <palves@redhat.com>
4847 * server.c (handle_general_set): Make "req_str" const.
4849 2015-03-19 Pedro Alves <palves@redhat.com>
4851 * linux-low.c (linux_resume_one_lwp): Rename to ...
4852 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4853 instead call perror_with_name.
4854 (check_ptrace_stopped_lwp_gone): New function.
4855 (linux_resume_one_lwp): Reimplement as wrapper around
4856 linux_resume_one_lwp_throw that swallows errors if the LWP is
4859 2015-03-19 Pedro Alves <palves@redhat.com>
4861 * linux-low.c (count_events_callback, select_event_lwp_callback):
4862 No longer check whether the thread has resume_stop as last resume
4865 2015-03-19 Pedro Alves <palves@redhat.com>
4867 * linux-low.c (count_events_callback, select_event_lwp_callback):
4868 Use the lwp's status_pending_p field, not the thread's.
4870 2015-03-19 Pedro Alves <palves@redhat.com>
4872 * linux-low.c (select_event_lwp_callback): Update comments to
4873 no longer mention SIGTRAP.
4875 2015-03-18 Gary Benson <gbenson@redhat.com>
4877 * server.c (handle_query): Do not report vFile:fstat as supported.
4879 2015-03-11 Gary Benson <gbenson@redhat.com>
4881 * hostio.c (sys/types.h): New include.
4882 (sys/stat.h): Likewise.
4883 (common-remote-fileio.h): Likewise.
4884 (handle_fstat): New function.
4885 (handle_vFile): Handle vFile:fstat packets.
4887 2015-03-11 Gary Benson <gbenson@redhat.com>
4889 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4890 struct stat.st_blocks and struct stat.st_blksize.
4891 * configure: Regenerate.
4892 * config.in: Likewise.
4893 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4894 (OBS): Add common-remote-fileio.o.
4895 (common-remote-fileio.o): New rule.
4897 2015-03-09 Pedro Alves <palves@redhat.com>
4899 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4900 'struct sockaddr' pointer in 'accept' call.
4902 2015-03-09 Pedro Alves <palves@redhat.com>
4905 2015-03-07 Pedro Alves <palves@redhat.com>
4906 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4907 or <winsock2.h> here. Instead include "gdb_socket.h".
4908 (remote_open): Use union gdb_sockaddr_u.
4909 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4910 or <winsock2.h> here. Instead include "gdb_socket.h".
4911 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4912 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4914 (init_named_socket, gdb_agent_helper_thread): Use union
4917 2015-03-07 Pedro Alves <palves@redhat.com>
4919 * configure.ac (build_warnings): Move
4920 -Wdeclaration-after-statement to the C-specific set.
4921 * configure: Regenerate.
4923 2015-03-07 Pedro Alves <palves@redhat.com>
4925 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4926 or <winsock2.h> here. Instead include "gdb_socket.h".
4927 (remote_open): Use union gdb_sockaddr_u.
4928 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4929 or <winsock2.h> here. Instead include "gdb_socket.h".
4930 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4931 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4933 (init_named_socket, gdb_agent_helper_thread): Use union
4936 2015-03-07 Pedro Alves <palves@redhat.com>
4938 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4941 2015-03-06 Yao Qi <yao.qi@linaro.org>
4943 * linux-aarch64-low.c (aarch64_insert_point): Use
4944 show_debug_regs as a boolean.
4945 (aarch64_remove_point): Likewise.
4947 2015-03-05 Pedro Alves <palves@redhat.com>
4949 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4950 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4951 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4952 * nto-low.c (nto_target_ops): Likewise.
4953 * spu-low.c (spu_target_ops): Likewise.
4954 * win32-low.c (win32_target_ops): Likewise.
4956 2015-03-04 Pedro Alves <palves@redhat.com>
4958 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4959 Decide whether a breakpoint triggered based on the SIGTRAP's
4961 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4962 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4963 (linux_low_filter_event): Check for breakpoints before checking
4965 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4967 (linux_stopped_by_sw_breakpoint)
4968 (linux_supports_stopped_by_sw_breakpoint)
4969 (linux_stopped_by_hw_breakpoint)
4970 (linux_supports_stopped_by_hw_breakpoint): New functions.
4971 (linux_target_ops): Install new target methods.
4973 2015-03-04 Pedro Alves <palves@redhat.com>
4975 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4976 * server.c (swbreak_feature, hwbreak_feature): New globals.
4977 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4978 (captured_main): Clear swbreak_feature and hwbreak_feature.
4979 * server.h (swbreak_feature, hwbreak_feature): Declare.
4980 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4981 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4982 supports_stopped_by_hw_breakpoint>: New fields.
4983 (target_supports_stopped_by_sw_breakpoint)
4984 (target_stopped_by_sw_breakpoint)
4985 (target_supports_stopped_by_hw_breakpoint)
4986 (target_stopped_by_hw_breakpoint): Declare.
4988 2015-03-04 Pedro Alves <palves@redhat.com>
4990 enum lwp_stop_reason -> enum target_stop_reason
4991 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4992 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4993 (linux_wait_1, stuck_in_jump_pad_callback)
4994 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4995 (linux_stopped_by_watchpoint):
4996 * linux-low.h (enum lwp_stop_reason): Delete.
4997 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4998 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5000 2015-03-04 Yao Qi <yao.qi@linaro.org>
5002 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5004 2015-03-03 Gary Benson <gbenson@redhat.com>
5006 * hostio.c (handle_vFile): Fix prefix lengths.
5008 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5010 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5013 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5015 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5016 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5017 (clean): Add "rm -f" for above C files.
5018 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5019 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5020 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5021 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5022 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5023 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5024 (init_registers_s390x_vx_linux64)
5025 (init_registers_s390x_tevx_linux64)
5026 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5027 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5029 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5030 (s390_store_vxrs_high): New functions.
5031 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5033 (s390_arch_setup): Add logic for selecting one of the new target
5034 descriptions. Activate the new vector regsets if applicable.
5035 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5036 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5037 and init_registers_s390x_tevx_linux64.
5039 2015-03-01 Pedro Alves <palves@redhat.com>
5041 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5044 2015-02-27 Pedro Alves <palves@redhat.com>
5046 * linux-x86-low.c (u_debugreg_offset): New function.
5047 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5049 2015-02-27 Pedro Alves <palves@redhat.com>
5051 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5052 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5053 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5054 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5055 (ps_lsetfpregs, ps_getpid)
5056 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5057 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5058 (ps_lsetxregs, ps_plog): Declare.
5060 2015-02-27 Pedro Alves <palves@redhat.com>
5062 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5063 IP_AGENT_EXPORT_FUNC.
5064 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5065 IP_AGENT_EXPORT_FUNC.
5066 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5067 (IP_AGENT_EXPORT): Delete.
5068 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5069 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5070 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5071 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5072 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5073 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5074 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5075 (traceframe_read_count, traceframe_write_count)
5076 (traceframes_created, trace_state_variables, get_raw_reg)
5077 (get_trace_state_variable_value, set_trace_state_variable_value)
5078 (ust_loaded, helper_thread_id, cmd_buf): Use
5079 IPA_SYM_EXPORTED_NAME.
5080 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5081 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5082 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5083 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5084 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5085 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5086 EXTERN_C_PUSH/EXTERN_C_POP.
5087 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5088 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5089 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5090 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5091 (traceframe_write_count, traceframe_read_count)
5092 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5093 (about_to_request_buffer_space, get_trace_state_variable_value)
5094 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5095 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5096 EXTERN_C_PUSH/EXTERN_C_POP.
5097 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5098 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5099 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5100 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5101 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5102 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5103 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5104 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5106 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5107 (IP_AGENT_EXPORT_VAR_DECL): Define.
5109 (gdb_agent_get_raw_reg): Declare.
5111 2015-02-27 Tom Tromey <tromey@redhat.com>
5112 Pedro Alves <palves@redhat.com>
5114 Rename symbols whose names are reserved C++ keywords throughout.
5116 2015-02-27 Pedro Alves <palves@redhat.com>
5118 * Makefile.in (COMPILER): New, get it from autoconf.
5119 (CXX): Get from autoconf instead.
5120 (COMPILE.pre): Use COMPILER.
5121 (CC-LD): Rename to ...
5122 (CC_LD): ... this. Use COMPILER.
5123 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5124 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5125 * acinclude.m4: Include build-with-cxx.m4.
5126 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5127 Disable -Werror by default if building in C++ mode.
5128 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5129 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5130 the C++ compiler. Save/restore CXXFLAGS too.
5131 * configure: Regenerate.
5133 2015-02-27 Pedro Alves <palves@redhat.com>
5135 * acinclude.m4: Include libiberty.m4.
5136 * configure.ac: Call libiberty_INIT.
5137 * config.in, configure: Regenerate.
5139 2015-02-26 Pedro Alves <palves@redhat.com>
5141 * linux-low.c (linux_wait_1): When incrementing the PC past a
5142 program breakpoint always use the_low_target.breakpoint_len as
5143 increment, rather than the maximum between that and
5144 the_low_target.decr_pc_after_break.
5146 2015-02-23 Pedro Alves <palves@redhat.com>
5148 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5149 thread was doing a step-over; always adjust the PC if
5150 we stepped over a permanent breakpoint.
5151 (linux_wait_1): If we stepped over breakpoint that was on top of a
5152 permanent breakpoint, manually advance the PC past it.
5154 2015-02-23 Pedro Alves <palves@redhat.com>
5156 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5158 (x86_fill_gregset, x86_store_gregset): Use it when handling
5161 2015-02-20 Pedro Alves <palves@redhat.com>
5163 * thread-db.c: Include "nat/linux-procfs.h".
5164 (thread_db_init): Skip listing new threads if the kernel supports
5165 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5167 2015-02-20 Pedro Alves <palves@redhat.com>
5169 * linux-low.c (status_pending_p_callback): Use ptid_match.
5171 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5173 PR breakpoints/16812
5174 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5175 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5176 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5178 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5180 PR breakpoints/15956
5181 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5183 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5185 * linux-low.c (linux_low_btrace_conf): Print size.
5186 * server.c (handle_btrace_conf_general_set): New.
5187 (hanle_general_set): Call handle_btrace_conf_general_set.
5188 (handle_query): Report Qbtrace-conf:bts:size as supported.
5190 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5192 * linux-low.c (linux_low_enable_btrace): Update parameters.
5193 (linux_low_btrace_conf): New.
5194 (linux_target_ops)<to_btrace_conf>: Initialize.
5195 * server.c (current_btrace_conf): New.
5196 (handle_btrace_enable): Rename to ...
5197 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5198 to target_enable_btrace. Update comment. Update users.
5199 (handle_qxfer_btrace_conf): New.
5200 (qxfer_packets): Add btrace-conf entry.
5201 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5202 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5203 (target_ops)<read_btrace_conf>: New.
5204 (target_enable_btrace): Update parameters.
5205 (target_read_btrace_conf): New.
5207 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5209 * server.c (handle_btrace_general_set): Remove call to
5210 target_supports_btrace.
5211 (supported_btrace_packets): New.
5212 (handle_query): Call supported_btrace_packets.
5213 * target.h: include btrace-common.h.
5214 (btrace_target_info): Removed.
5215 (supports_btrace, target_supports_btrace): Update parameters.
5217 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5219 * Makefile.in (SFILES): Add common/btrace-common.c.
5220 (OBS): Add common/btrace-common.o.
5221 (btrace-common.o): Add build rules.
5222 * linux-low: Include btrace-common.h.
5223 (linux_low_read_btrace): Use struct btrace_data. Call
5224 btrace_data_init and btrace_data_fini.
5226 2015-02-06 Pedro Alves <palves@redhat.com>
5228 * thread-db.c (find_new_threads_callback): Add debug output.
5230 2015-02-04 Pedro Alves <palves@redhat.com>
5232 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5233 (resume_stopped_resumed_lwps): New function.
5234 (linux_wait_for_event_filtered): Use it.
5236 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5238 * Makefile.in (SFILES): Add linux-personality.c.
5239 (linux-personality.o): New rule.
5240 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5241 list of objects to be built.
5242 * linux-low.c: Include nat/linux-personality.h.
5243 (linux_create_inferior): Remove code to disable address space
5244 randomization (moved to ../nat/linux-personality.c). Create
5245 cleanup to disable address space randomization.
5247 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5249 * Makefile.in (posix-strerror.o): New rule.
5250 (mingw-strerror.o): Likewise.
5251 * configure: Regenerated.
5252 * configure.ac: Source file ../common/common.host. Initialize new
5253 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5255 2015-01-14 Yao Qi <yao@codesourcery.com>
5257 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5258 (ppc-linux.o): New rule.
5259 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5260 * configure.ac: AC_CHECK_FUNCS(getauxval).
5261 * config.in: Re-generated.
5262 * configure: Re-generated.
5263 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5264 ppc64_64bit_inferior_p
5266 2015-01-14 Yao Qi <yao@codesourcery.com>
5268 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5269 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5270 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5271 (PT_ORIG_R3, PT_TRAP): Likewise.
5272 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5273 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5274 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5276 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5278 * i387-fp.c (i387_cache_to_xsave): In look over
5279 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5280 zmmh_low_space field by use of zmmh_high_space.
5282 2015-01-09 Pedro Alves <palves@redhat.com>
5284 * linux-low.c (step_over_bkpt): Move higher up in the file.
5285 (handle_extended_wait): Don't store the stop_pc here.
5286 (get_stop_pc): Adjust comments and rename to ...
5287 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5288 stopped for a software breakpoint or hardware breakpoint.
5289 (thread_still_has_status_pending_p): New function.
5290 (status_pending_p_callback): Use
5291 thread_still_has_status_pending_p. If the event is no longer
5292 interesting, resume the LWP.
5293 (handle_tracepoints): Add assert.
5294 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5295 (wstatus_maybe_breakpoint): New function.
5296 (cancel_breakpoint): Delete function.
5297 (check_stopped_by_watchpoint): New function, factored out from
5298 linux_low_filter_event.
5299 (lp_status_maybe_breakpoint): Delete function.
5300 (linux_low_filter_event): Remove filter_ptid argument.
5301 Leave thread group exits pending here. Store the LWP's stop PC.
5302 Always leave events pending.
5303 (linux_wait_for_event_filtered): Pull all events out of the
5304 kernel, and leave them all pending.
5305 (count_events_callback, select_event_lwp_callback): Consider all
5307 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5308 (select_event_lwp): Only give preference to the stepping LWP in
5309 all-stop mode. Adjust comments.
5310 (ignore_event): New function.
5311 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5312 references to cancel_breakpoints. Adjust to renames. Also give
5313 equal priority to all LWPs that have had events in non-stop mode.
5314 If reporting a software breakpoint event, unadjust the LWP's PC.
5315 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5316 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5318 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5319 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5320 (linux_stopped_by_watchpoint): Adjust.
5321 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5322 * linux-low.h (enum lwp_stop_reason): New.
5323 (struct lwp_info) <stop_pc>: Adjust comment.
5324 <stopped_by_watchpoint>: Delete field.
5325 <stop_reason>: New field.
5326 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5327 * mem-break.c (software_breakpoint_inserted_here)
5328 (hardware_breakpoint_inserted_here): New function.
5329 * mem-break.h (software_breakpoint_inserted_here)
5330 (hardware_breakpoint_inserted_here): Declare.
5331 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5332 (cancel_breakpoints): Delete.
5333 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5334 (upload_fast_traceframes): Remove references to
5337 2015-01-09 Pedro Alves <palves@redhat.com>
5339 * thread-db.c (find_new_threads_callback): Ignore thread if the
5340 kernel thread ID is -1.
5342 2015-01-09 Pedro Alves <palves@redhat.com>
5344 * linux-low.c (linux_attach_fail_reason_string): Move to
5345 nat/linux-ptrace.c, and rename.
5346 (linux_attach_lwp): Update comment.
5347 (attach_proc_task_lwp_callback): New function.
5348 (linux_attach): Adjust to rename and use
5349 linux_proc_attach_tgid_threads.
5350 (linux_attach_fail_reason_string): Delete declaration.
5352 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5354 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5355 * server.c (gdbserver_version): Likewise.
5357 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5359 * remote-utils.c: Include ctype.h.
5360 (input_interrupt): Explicitly handle the case when the char
5361 received is the NUL byte. Improve the printing of non-ASCII
5364 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5366 * linux-low.c (linux_low_filter_event): Update call to
5367 linux_enable_event_reporting following the addition of
5368 a new parameter to that function.
5370 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5373 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5374 (AARCH64_FPCR_REGNO): Likewise.
5375 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5376 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5377 (aarch64_store_fpregset): Likewise.
5379 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5381 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5382 Remove FIXME comment about assumption about N.
5384 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5386 * configure.ac: If large-file support is disabled in GDBserver,
5387 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5388 * configure: Regenerate.
5390 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5392 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5393 warning upon ENODATA from ptrace.
5394 * linux-s390-low.c (s390_store_tdb): New.
5395 (s390_regsets): Add regset for NT_S390_TDB.
5397 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5399 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5400 without a fill_function.
5401 * linux-s390-low.c (s390_fill_last_break): Remove.
5402 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5403 (s390_arch_setup): Use regset's size instead of fill_function for
5406 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5408 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5409 the regset's store function when ptrace returned an error.
5410 * regcache.c (get_thread_regcache): Invalidate register cache
5411 before fetching inferior's registers.
5413 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5415 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5416 while-loop as for-loop.
5417 (regsets_store_inferior_registers): Likewise.
5419 2014-11-28 Yao Qi <yao@codesourcery.com>
5421 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5422 * config.in, configure: Re-generate.
5423 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5426 2014-11-21 Yao Qi <yao@codesourcery.com>
5428 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5429 (AC_CHECK_HEADERS): Remove malloc.h.
5430 * configure: Re-generated.
5431 * config.in: Re-generated.
5432 * server.h: Don't include alloca.h and malloc.h.
5433 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5434 Don't include malloc.h.
5436 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5438 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5439 corresponding ERRNO check in same block.
5441 2014-11-12 Pedro Alves <palves@redhat.com>
5443 * server.c (cont_thread): Update comment.
5444 (start_inferior, attach_inferior): No longer clear cont_thread.
5445 (handle_v_cont): No longer set cont_thread.
5446 (captured_main): Clear cont_thread each time a GDB connects.
5448 2014-11-12 Pedro Alves <palves@redhat.com>
5450 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5451 thread, and don't resume all threads if the Hc thread has exited.
5453 2014-11-12 Pedro Alves <palves@redhat.com>
5455 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5456 the process group instead of to a specific LWP.
5458 2014-10-15 Pedro Alves <palves@redhat.com>
5461 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5463 (arm_set_thread_context): Delete.
5464 (the_low_target): Adjust.
5465 * win32-i386-low.c (debug_registers_changed)
5466 (debug_registers_used): Delete.
5467 (update_debug_registers_callback): New function.
5468 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5469 needing to update their debug registers.
5470 (win32_get_current_dr): New function.
5471 (x86_dr_low_get_addr, x86_dr_low_get_control)
5472 (x86_dr_low_get_status): Fetch the debug register from the thread
5474 (i386_initial_stuff): Adjust.
5475 (i386_get_thread_context): Remove current_event parameter. Don't
5476 clear debug_registers_changed nor copy DR values to
5478 (i386_set_thread_context): Delete.
5479 (i386_prepare_to_resume): New function.
5480 (i386_thread_added): Mark the thread as needing to update irs
5482 (the_low_target): Remove i386_set_thread_context and install
5483 i386_prepare_to_resume.
5484 * win32-low.c (win32_get_thread_context): Adjust.
5485 (win32_set_thread_context): Use SetThreadContext
5487 (win32_prepare_to_resume): New function.
5488 (win32_require_context): New function, factored out from ...
5489 (thread_rec): ... this.
5490 (continue_one_thread): Call win32_prepare_to_resume on each thread
5491 we're about to continue.
5492 (win32_resume): Call win32_prepare_to_resume on the event thread.
5493 * win32-low.h (struct win32_thread_info)
5494 <debug_registers_changed>: New field.
5495 (struct win32_target_ops): Change prototype of set_thread_context,
5496 delete set_thread_context and add prepare_to_resume.
5497 (win32_require_context): New declaration.
5499 2014-10-08 Gary Benson <gbenson@redhat.com>
5501 * server.h: Do not include common-exceptions.h.
5503 2014-10-08 Gary Benson <gbenson@redhat.com>
5505 * server.h: Do not include cleanups.h.
5507 2014-09-30 James Hogan <james.hogan@imgtec.com>
5509 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5512 2014-09-23 Yao Qi <yao@codesourcery.com>
5514 * linux-low.c (lp_status_maybe_breakpoint): New function.
5515 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5516 (count_events_callback): Likewise.
5517 (select_event_lwp_callback): Likewise.
5518 (cancel_breakpoints_callback): Likewise.
5520 2014-09-19 Don Breazeal <donb@codesourcery.com>
5522 * linux-low.c (handle_extended_wait): Call
5523 linux_ptrace_get_extended_event.
5524 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5525 linux_is_extended_waitstatus.
5527 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5529 * Makefile.in (CPPFLAGS): Define.
5530 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5531 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5533 2014-09-16 Gary Benson <gbenson@redhat.com>
5535 * inferiors.h (current_inferior): Renamed as...
5536 (current_thread): New variable. All uses updated.
5537 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5538 (maybe_move_out_of_jump_pad): Likewise.
5539 (cancel_breakpoint): Likewise.
5540 (linux_low_filter_event): Likewise.
5541 (wait_for_sigstop): Likewise.
5542 (linux_resume_one_lwp): Likewise.
5543 (need_step_over_p): Likewise.
5544 (start_step_over): Likewise.
5545 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5546 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5547 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5548 and save_inferior as saved_thread.
5549 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5551 (regcache_invalidate_thread): Likewise.
5552 * remote-utils.c (prepare_resume_reply): Likewise.
5553 * thread-db.c (thread_db_get_tls_address): Likewise.
5554 (disable_thread_event_reporting): Likewise.
5555 (remove_thread_event_breakpoints): Likewise.
5556 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5558 * target.h (set_desired_inferior): Renamed as...
5559 (set_desired_thread): New declaration. All uses updated.
5560 * server.c (myresume): Updated comment to reference thread instead
5562 (handle_serial_event): Likewise.
5563 (handle_target_event): Likewise.
5565 2014-09-12 Tom Tromey <tromey@redhat.com>
5566 Gary Benson <gbenson@redhat.com>
5568 * regcache.h: Include common-regcache.h.
5569 (regcache_read_pc): Don't declare.
5570 * regcache.c (get_thread_regcache_for_ptid): New function.
5572 2014-09-11 Tom Tromey <tromey@redhat.com>
5573 Gary Benson <gbenson@redhat.com>
5575 * symbol.c: New file.
5576 * Makefile.in (SFILES): Add symbol.c.
5577 (OBS): Add symbol.o.
5579 2014-09-11 Gary Benson <gbenson@redhat.com>
5581 * target.c (target_stop_ptid, target_continue_ptid): New
5584 2014-09-11 Tom Tromey <tromey@redhat.com>
5585 Gary Benson <gbenson@redhat.com>
5587 * target.h: Include target/target.h.
5588 * target.c (target_read_memory, target_read_uint32)
5589 (target_write_memory): New functions.
5591 2014-09-11 Gary Benson <gbenson@redhat.com>
5593 * server.h (debug_hw_points): Don't declare.
5594 * server.c (debug_hw_points): Don't define. Replace all uses
5595 with show_debug_regs.
5596 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5597 all uses with show_debug_regs.
5599 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5601 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5602 endianness into account.
5603 (ppc_supply_ptrace_register): Likewise.
5605 2014-09-03 James Hogan <james.hogan@imgtec.com>
5607 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5608 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5610 2014-09-03 Gary Benson <gbenson@redhat.com>
5612 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5613 ALL_DEBUG_ADDRESS_REGISTERS.
5615 2014-09-02 Gary Benson <gbenson@redhat.com>
5617 * i386-low.h: Renamed as...
5618 * x86-low.h: New file. All type, function and variable name
5619 prefixes changed from "i386_" to "x86_". All references updated.
5620 * i386-low.c: Renamed as...
5621 * x86-low.c: New file. All type, function and variable name
5622 prefixes changed from "i386_" to "x86_". All references updated.
5624 2014-09-02 Gary Benson <gbenson@redhat.com>
5626 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5627 (x86_linux_new_thread): Likewise.
5629 2014-08-29 Gary Benson <gbenson@redhat.com>
5631 * server.h (setjmp.h): Do not include.
5632 (toplevel): Do not declare.
5633 (common-exceptions.h): Include.
5634 (cleanups.h): Likewise.
5635 * server.c (toplevel): Do not define.
5636 (exit_code): New static global.
5637 (detach_or_kill_for_exit_cleanup): New function.
5638 (main): New function. Original main renamed to...
5639 (captured_main): New function.
5640 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5642 2014-08-29 Gary Benson <gbenson@redhat.com>
5644 * Makefile.in (SFILES): Add common/common-exceptions.c.
5645 (OBS): Add common-exceptions.o.
5646 (common-exceptions.o): New rule.
5647 * utils.c (prepare_to_throw_exception): New function.
5649 2014-08-29 Gary Benson <gbenson@redhat.com>
5651 * config.in: Regenerate.
5652 * configure: Likewise.
5654 2014-08-29 Gary Benson <gbenson@redhat.com>
5656 * Makefile.in (SFILES): Add common/cleanups.c.
5658 (cleanups.o): New rule.
5660 2014-08-29 Gary Benson <gbenson@redhat.com>
5662 * utils.c (internal_vwarning): New function.
5664 2014-08-28 Gary Benson <gbenson@redhat.com>
5666 * utils.h (fatal): Remove declaration.
5667 * utils.c (fatal): Remove function.
5669 2014-08-28 Gary Benson <gbenson@redhat.com>
5671 * tracepoint.c (gdb_agent_init): Replace fatal with
5673 (initialize_tracepoint): Likewise.
5675 2014-08-28 Gary Benson <gbenson@redhat.com>
5677 * remote-utils.c (remote_prepare): Replace fatal with error.
5679 2014-08-28 Gary Benson <gbenson@redhat.com>
5681 * linux-low.c (linux_async): Replace fatal with warning.
5683 (linux_start_non_stop): Return -1 if linux_async failed.
5685 2014-08-28 Gary Benson <gbenson@redhat.com>
5687 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5689 (i386_dr_low_get_addr): Remove vague comment.
5690 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5693 2014-08-28 Gary Benson <gbenson@redhat.com>
5695 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5696 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5698 (linux_resume_one_lwp): Likewise.
5699 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5701 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5702 with internal_error.
5703 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5704 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5705 (find_register_by_name): Replace fatal with internal_error.
5706 (find_regno): Likewise.
5707 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5708 * thread-db.c (thread_db_create_event): Likewise.
5709 (thread_db_load_search): Likewise.
5710 (try_thread_db_load_1): Likewise.
5711 * tracepoint.c (get_jump_space_head): Replace fatal with
5713 (claim_trampoline_space): Likewise.
5714 (have_fast_tracepoint_trampoline_buffer): Likewise.
5715 (cmd_qtstart): Likewise.
5716 (stop_tracing): Likewise.
5717 (fast_tracepoint_collecting): Likewise.
5718 (target_malloc): Likewise.
5719 (download_tracepoint): Likewise.
5720 (download_trace_state_variables): Replace check with gdb_assert.
5721 (upload_fast_traceframes): Replace fatal with internal_error.
5723 2014-08-19 Tom Tromey <tromey@redhat.com>
5724 Gary Benson <gbenson@redhat.com>
5726 * Makefile.in (SFILES): Add common/common-debug.c.
5727 (OBS): Add common-debug.o.
5728 (common-debug.o): New rule.
5729 * debug.h (debug_printf): Don't declare.
5730 * debug.c (debug_printf): Renamed and rewritten as...
5731 (debug_vprintf): New function.
5733 2014-08-19 Gary Benson <gbenson@redhat.com>
5735 * utils.h: Do not include print-utils.h.
5737 2014-08-19 Tom Tromey <tromey@redhat.com>
5738 Gary Benson <gbenson@redhat.com>
5740 * server.h: Add static assertion.
5741 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5743 2014-08-19 Tom Tromey <tromey@redhat.com>
5744 Gary Benson <gbenson@redhat.com>
5746 * Makefile.in (SFILES): Add common/errors.c.
5747 (OBS): Add errors.o.
5748 (IPA_OBS): Add errors-ipa.o.
5749 (errors.o): New rule.
5750 (errors-ipa.o): Likewise.
5751 * utils.h (perror_with_name, error, warning): Don't declare.
5752 * utils.c (warning): Renamed and rewritten as...
5753 (vwarning): New function.
5754 (error): Renamed and rewritten as...
5755 (verror): New function.
5756 (internal_error): Renamed and rewritten as...
5757 (internal_verror): New function.
5759 2014-08-07 Gary Benson <gbenson@redhat.com>
5761 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5762 * configure: Regenerate.
5763 * config.in: Likewise.
5764 * server.h: Do not include errno.h.
5765 * event-loop.c: Likewise.
5766 * hostio-errno.c: Likewise.
5767 * linux-low.c: Likewise.
5768 * remote-utils.c: Likewise.
5769 * spu-low.c: Likewise.
5770 * utils.c: Likewise.
5771 * gdbreplay.c: Unconditionally include errno.h.
5773 2014-08-07 Gary Benson <gbenson@redhat.com>
5775 * server.h: Do not include string.h.
5776 * event-loop.c: Likewise.
5777 * linux-low.c: Likewise.
5778 * regcache.c: Likewise.
5779 * remote-utils.c: Likewise.
5780 * spu-low.c: Likewise.
5781 * utils.c: Likewise.
5783 2014-08-07 Gary Benson <gbenson@redhat.com>
5785 * server.h: Do not include gdb_assert.h.
5787 2014-08-07 Gary Benson <gbenson@redhat.com>
5789 * server.h: Do not include common-utils.h.
5791 2014-08-07 Gary Benson <gbenson@redhat.com>
5793 * server.h: Do not include ptid.h.
5794 * notif.h: Likewise.
5796 2014-08-07 Gary Benson <gbenson@redhat.com>
5798 * server.h: Do not include gdb_locale.h.
5800 2014-08-07 Gary Benson <gbenson@redhat.com>
5802 * server.h: Do not include gdb/signals.h.
5803 * win32-low.c: Likewise.
5805 2014-08-07 Gary Benson <gbenson@redhat.com>
5807 * server.h: Do not include pathmax.h.
5809 2014-08-07 Gary Benson <gbenson@redhat.com>
5811 * server.h: Do not include libiberty.h.
5812 * linux-bfin-low.c: Likewise.
5814 2014-08-07 Gary Benson <gbenson@redhat.com>
5816 * server.h: Do not include ansidecl.h.
5818 2014-08-07 Gary Benson <gbenson@redhat.com>
5820 * linux-x86-low.c: Do not include stddef.h.
5821 * lynx-ppc-low.c: Likewise.
5822 * tracepoint.c: Likewise.
5824 2014-08-07 Gary Benson <gbenson@redhat.com>
5826 * server.h: Do not include stdarg.h.
5827 * nto-low.c: Likewise.
5829 2014-08-07 Gary Benson <gbenson@redhat.com>
5831 * server.h: Do not include stdlib.h.
5832 * inferiors.c: Likewise.
5833 * linux-low.c: Likewise.
5834 * regcache.c: Likewise.
5835 * spu-low.c: Likewise.
5836 * tracepoint.c: Likewise.
5837 * utils.c: Likewise.
5839 2014-08-07 Gary Benson <gbenson@redhat.com>
5841 * server.h: Do not include stdio.h.
5842 * linux-low.c: Likewise.
5843 * remote-utils.c: Likewise.
5844 * spu-low.c: Likewise.
5845 * utils.c: Likewise.
5846 * wincecompat.c: Likewise.
5848 2014-08-06 Gary Benson <gbenson@redhat.com>
5850 * regcache.c (init_register_cache): Move conditionals inside if.
5852 2014-08-06 Gary Benson <gbenson@redhat.com>
5854 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5856 2014-07-31 Gary Benson <gbenson@redhat.com>
5858 * ax.h: Do not include server.h.
5859 * gdbthread.h: Likewise.
5860 * lynx-low.h: Likewise.
5861 * notif.h: Likewise.
5863 2014-07-30 Gary Benson <gbenson@redhat.com>
5865 * server.h: Include common-defs.h.
5866 Do not include config.h or build-gnulib-gdbserver/config.h.
5868 2014-07-30 Gary Benson <gbenson@redhat.com>
5870 * hostio-errno.c: Move server.h to top of includes list.
5871 * inferiors.c: Likewise.
5872 * linux-x86-low.c: Likewise.
5873 * notif.c: Include server.h.
5875 2014-07-24 Tom Tromey <tromey@redhat.com>
5876 Gary Benson <gbenson@redhat.com>
5878 * server.h (CORE_ADDR): Now unsigned.
5880 2014-07-16 Pedro Alves <palves@redhat.com>
5882 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5884 2014-07-15 Pedro Alves <palves@redhat.com>
5886 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5889 2014-07-11 Pedro Alves <palves@redhat.com>
5891 * linux-low.c (kill_wait_lwp): New function, based on
5892 kill_one_lwp_callback, but use my_waitpid directly.
5893 (kill_one_lwp_callback, linux_kill): Use it.
5895 2014-06-23 Pedro Alves <palves@redhat.com>
5897 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5898 before setting DR0..DR3.
5900 2014-06-20 Gary Benson <gbenson@redhat.com>
5902 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5903 * configure: Regenerated.
5904 * config.in: Likewise.
5906 2014-06-20 Gary Benson <gbenson@redhat.com>
5908 * Makefile.in (SFILES): Update locations for files moved
5910 (object file files): Reordered.
5912 2014-06-20 Gary Benson <gbenson@redhat.com>
5914 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5915 (i386_dr_low_set_addr): Likewise.
5916 (i386_dr_low_get_addr): Likewise.
5917 (i386_dr_low_can_set_control): Likewise.
5918 (i386_dr_low_set_control): Likewise.
5919 (i386_dr_low_get_control): Likewise.
5920 (i386_dr_low_get_status): Likewise.
5921 (i386_get_debug_register_length): Likewise.
5922 * linux-x86-low.c (i386_dr_low_set_addr):
5923 Changed signature. Made static.
5924 (i386_dr_low_get_addr): Likewise.
5925 (i386_dr_low_set_control): Likewise.
5926 (i386_dr_low_get_control): Likewise.
5927 (i386_dr_low_get_status): Likewise.
5928 (i386_dr_low): New global variable.
5929 * win32-i386-low.c (i386_dr_low_set_addr):
5930 Changed signature. Made static.
5931 (i386_dr_low_get_addr): Likewise.
5932 (i386_dr_low_set_control): Likewise.
5933 (i386_dr_low_get_control): Likewise.
5934 (i386_dr_low_get_status): Likewise.
5935 (i386_dr_low): New global variable.
5937 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5939 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5940 * Makefile.in (AR, AR_FLAGS): Define.
5941 * configure: Regenerate.
5943 2014-06-19 Gary Benson <gbenson@redhat.com>
5945 * Makefile.in (i386-dregs.o): New rule.
5946 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5947 * i386-low.c (target.h): Remove include.
5948 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5949 (DR_CONTROL_SHIFT): Likewise.
5950 (DR_CONTROL_SIZE): Likewise.
5951 (DR_RW_EXECUTE): Likewise.
5952 (DR_RW_WRITE): Likewise.
5953 (DR_RW_READ): Likewise.
5954 (DR_RW_IORW): Likewise.
5955 (DR_LEN_1): Likewise.
5956 (DR_LEN_2): Likewise.
5957 (DR_LEN_4): Likewise.
5958 (DR_LEN_8): Likewise.
5959 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5960 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5961 (DR_ENABLE_SIZE): Likewise.
5962 (DR_LOCAL_SLOWDOWN): Likewise.
5963 (DR_GLOBAL_SLOWDOWN): Likewise.
5964 (DR_CONTROL_RESERVED): Likewise.
5965 (I386_DR_CONTROL_MASK): Likewise.
5966 (I386_DR_VACANT): Likewise.
5967 (I386_DR_LOCAL_ENABLE): Likewise.
5968 (I386_DR_GLOBAL_ENABLE): Likewise.
5969 (I386_DR_DISABLE): Likewise.
5970 (I386_DR_SET_RW_LEN): Likewise.
5971 (I386_DR_GET_RW_LEN): Likewise.
5972 (I386_DR_WATCH_HIT): Likewise.
5973 (i386_wp_op_t): Likewise.
5974 (i386_show_dr): Likewise.
5975 (i386_length_and_rw_bits): Likewise.
5976 (i386_insert_aligned_watchpoint): Likewise.
5977 (i386_remove_aligned_watchpoint): Likewise.
5978 (i386_handle_nonaligned_watchpoint): Likewise.
5979 i386_update_inferior_debug_regs(): 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.
5986 2014-06-19 Gary Benson <gbenson@redhat.com>
5988 * i386-low.c (i386_dr_show): Renamed to
5989 i386_show_dr and made static. All uses updated.
5990 (i386_dr_length_and_rw_bits): Renamed to
5991 i386_length_and_rw_bits and made static.
5993 (i386_dr_insert_aligned_watchpoint): Renamed to
5994 i386_insert_aligned_watchpoint and made static.
5996 (i386_dr_remove_aligned_watchpoint): Renamed to
5997 i386_remove_aligned_watchpoint and made static.
5999 (i386_dr_update_inferior_debug_regs): Renamed to
6000 i386_update_inferior_debug_regs and made static.
6003 2014-06-18 Gary Benson <gbenson@redhat.com>
6005 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6006 (i386_dr_low_can_set_control): Likewise.
6007 (i386_get_debug_register_length): Likewise.
6008 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6009 (i386_dr_low_can_set_control): Likewise.
6010 (i386_get_debug_register_length): Likewise.
6012 2014-06-17 Gary Benson <gbenson@redhat.com>
6014 * i386-low.h (i386-dregs.h): New include.
6015 (DR_FIRSTADDR): Now in i386-dregs.h.
6016 (DR_LASTADDR): Likewise.
6017 (DR_NADDR): Likewise.
6018 (DR_STATUS): Likewise.
6019 (DR_CONTROL): Likewise.
6020 (i386_debug_reg_state): Likewise.
6021 (i386_dr_insert_watchpoint): Likewise.
6022 (i386_dr_remove_watchpoint): Likewise.
6023 (i386_dr_region_ok_for_watchpoint): Likewise.
6024 (i386_dr_stopped_data_address): Likewise.
6025 (i386_dr_stopped_by_watchpoint): Likewise.
6026 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6028 2014-06-18 Gary Benson <gbenson@redhat.com>
6030 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6031 i386_dr_insert_watchpoint.
6032 (i386_low_remove_watchpoint): Renamed to
6033 i386_dr_remove_watchpoint.
6034 (i386_low_region_ok_for_watchpoint): Renamed to
6035 i386_dr_region_ok_for_watchpoint.
6036 (i386_low_stopped_data_address): Renamed to
6037 i386_dr_stopped_data_address.
6038 (i386_low_stopped_by_watchpoint): Renamed to
6039 i386_dr_stopped_by_watchpoint.
6040 * i386-low.c (i386_show_dr): Renamed to
6041 i386_dr_show and made nonstatic. All uses updated.
6042 (i386_length_and_rw_bits): Renamed to
6043 i386_dr_length_and_rw_bits and made nonstatic.
6045 (i386_insert_aligned_watchpoint): Renamed to
6046 i386_dr_insert_aligned_watchpoint and made nonstatic.
6048 (i386_remove_aligned_watchpoint): Renamed to
6049 i386_dr_remove_aligned_watchpoint and made nonstatic.
6051 (i386_update_inferior_debug_regs): Renamed to
6052 i386_dr_update_inferior_debug_regs and made nonstatic.
6054 (i386_low_insert_watchpoint): Renamed to
6055 i386_dr_insert_watchpoint. All uses updated.
6056 (i386_low_remove_watchpoint): Renamed to
6057 i386_dr_remove_watchpoint. All uses updated.
6058 (i386_low_region_ok_for_watchpoint): Renamed to
6059 i386_dr_region_ok_for_watchpoint. All uses updated.
6060 (i386_low_stopped_data_address): Renamed to
6061 i386_dr_stopped_data_address. All uses updated.
6062 (i386_low_stopped_by_watchpoint): Renamed to
6063 i386_dr_stopped_by_watchpoint. All uses updated.
6065 2014-06-18 Gary Benson <gbenson@redhat.com>
6067 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6068 (i386_dr_low_can_set_control): Likewise.
6069 (i386_insert_aligned_watchpoint): New check.
6071 2014-06-18 Gary Benson <gbenson@redhat.com>
6073 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6076 2014-06-18 Gary Benson <gbenson@redhat.com>
6078 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6079 instead of fatal and error.
6080 (i386_handle_nonaligned_watchpoint): Likewise.
6082 2014-06-18 Gary Benson <gbenson@redhat.com>
6084 * i386-low.c (i386_get_debug_register_length): New macro.
6085 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6086 (i386_show_dr): Use debug_printf instead of fprintf. Use
6087 phex to format values.
6089 2014-06-18 Gary Benson <gbenson@redhat.com>
6091 * i386-low.h: Comment changes.
6092 * i386-low.c: Likewise.
6094 2014-06-18 Gary Benson <gbenson@redhat.com>
6096 * i386-low.c: Whitespace changes.
6098 2014-06-12 Tom Tromey <tromey@redhat.com>
6100 * utils.c (freeargv): Remove.
6102 2014-06-12 Tom Tromey <tromey@redhat.com>
6104 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6105 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6106 (parse_debug_format_options): Likewise.
6107 (gdbserver_usage): Likewise.
6108 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6109 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6110 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6112 ($(LIBGNU)): Depend on libiberty.
6113 (all-lib): Recurse into all subdirs.
6114 (install-only): Invoke "install" target in subdirs.
6115 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6117 * configure: Rebuild.
6118 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6119 for vasprintf, vsnprintf, or gettimeofday.
6120 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6123 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6125 * development.sh: Delete.
6126 * Makefile.in (config.status): Adjust dependency on development.sh.
6127 * configure.ac: Adjust development.sh source call.
6128 * configure: Regenerate.
6130 2014-06-02 Pedro Alves <palves@redhat.com>
6132 * ax.c (gdb_free_agent_expr): New function.
6133 * ax.h (gdb_free_agent_expr): New declaration.
6134 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6136 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6138 (clear_breakpoint_conditions_and_commands): New function.
6139 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6140 (clear_breakpoint_conditions_and_commands): New declaration.
6142 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6144 * linux-aarch64-low.c (asm/ptrace.h): Include.
6146 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6148 Fix TLS access for -static -pthread.
6149 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6150 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6151 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6153 2014-05-20 Pedro Alves <palves@redhat.com>
6155 * linux-aarch64-low.c (aarch64_insert_point)
6156 (aarch64_remove_point): No longer check whether the type is
6157 supported here. Adjust to new interface.
6158 (the_low_target): Install aarch64_supports_z_point_type as
6159 supports_z_point_type method.
6160 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6161 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6162 instead of a Z packet char. Adjust.
6163 (arm_supports_z_point_type): New function.
6164 (arm_insert_point, arm_remove_point): Adjust to new interface.
6165 (the_low_target): Install arm_supports_z_point_type.
6166 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6167 (cris_insert_point, cris_remove_point): Adjust to new interface.
6168 Don't check whether the type is supported here.
6169 (the_low_target): Install cris_supports_z_point_type.
6170 * linux-low.c (linux_supports_z_point_type): New function.
6171 (linux_insert_point, linux_remove_point): Adjust to new interface.
6172 * linux-low.h (struct linux_target_ops) <insert_point,
6173 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6174 raw_breakpoint pointer parameter.
6175 <supports_z_point_type>: New method.
6176 * linux-mips-low.c (mips_supports_z_point_type): New function.
6177 (mips_insert_point, mips_remove_point): Adjust to new interface.
6178 Use mips_supports_z_point_type.
6179 (the_low_target): Install mips_supports_z_point_type.
6180 * linux-ppc-low.c (the_low_target): Install NULL as
6181 supports_z_point_type method.
6182 * linux-s390-low.c (the_low_target): Install NULL as
6183 supports_z_point_type method.
6184 * linux-sparc-low.c (the_low_target): Install NULL as
6185 supports_z_point_type method.
6186 * linux-x86-low.c (x86_supports_z_point_type): New function.
6187 (x86_insert_point): Adjust to new insert_point interface. Use
6188 insert_memory_breakpoint. Adjust to new
6189 i386_low_insert_watchpoint interface.
6190 (x86_remove_point): Adjust to remove_point interface. Use
6191 remove_memory_breakpoint. Adjust to new
6192 i386_low_remove_watchpoint interface.
6193 (the_low_target): Install x86_supports_z_point_type.
6194 * lynx-low.c (lynx_target_ops): Install NULL as
6195 supports_z_point_type callback.
6196 * nto-low.c (nto_supports_z_point_type): New.
6197 (nto_insert_point, nto_remove_point): Adjust to new interface.
6198 (nto_target_ops): Install nto_supports_z_point_type.
6199 * mem-break.c: Adjust intro comment.
6200 (struct raw_breakpoint) <raw_type, size>: New fields.
6201 <inserted>: Update comment.
6202 <shlib_disabled>: Delete field.
6203 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6204 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6205 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6206 (raw_bkpt_type_to_target_hw_bp_type): New function.
6207 (find_enabled_raw_code_breakpoint_at): New function.
6208 (find_raw_breakpoint_at): New type and size parameters. Use them.
6209 (insert_memory_breakpoint): New function, based off
6210 set_raw_breakpoint_at.
6211 (remove_memory_breakpoint): New function.
6212 (set_raw_breakpoint_at): Reimplement.
6213 (set_breakpoint): New, based on set_breakpoint_at.
6214 (set_breakpoint_at): Reimplement.
6215 (delete_raw_breakpoint): Go through the_target->remove_point
6216 instead of assuming memory breakpoints.
6217 (find_gdb_breakpoint_at): Delete.
6218 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6219 (find_gdb_breakpoint): New function.
6220 (set_gdb_breakpoint_at): Delete.
6221 (z_type_supported): New function.
6222 (set_gdb_breakpoint_1): New function, loosely based off
6223 set_gdb_breakpoint_at.
6224 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6225 (delete_gdb_breakpoint_at): Delete.
6226 (delete_gdb_breakpoint_1): New function, loosely based off
6227 delete_gdb_breakpoint_at.
6228 (delete_gdb_breakpoint): New function.
6229 (clear_gdb_breakpoint_conditions): Rename to ...
6230 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6232 (add_condition_to_breakpoint): Make static.
6233 (add_breakpoint_condition): Take a struct breakpoint pointer
6234 instead of an address. Adjust.
6235 (gdb_condition_true_at_breakpoint): Rename to ...
6236 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6238 (gdb_condition_true_at_breakpoint): Reimplement.
6239 (add_breakpoint_commands): Take a struct breakpoint pointer
6240 instead of an address. Adjust.
6241 (gdb_no_commands_at_breakpoint): Rename to ...
6242 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6243 parameter. Return true if no breakpoint was found. Change debug
6245 (gdb_no_commands_at_breakpoint): Reimplement.
6246 (run_breakpoint_commands): Rename to ...
6247 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6248 and change return type to boolean.
6249 (run_breakpoint_commands): New function.
6250 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6251 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6252 breakpoint. Go through the_target->remove_point instead of
6253 assuming memory breakpoint.
6254 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6255 software and hardware breakpoints.
6256 (reinsert_raw_breakpoint): Go through the_target->insert_point
6257 instead of assuming memory breakpoint.
6258 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6259 software and hardware breakpoints.
6260 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6261 Check both software and hardware breakpoints.
6262 (validate_inserted_breakpoint): Assert the breakpoint is a
6263 software breakpoint. Set the inserted flag to -1 instead of
6264 setting shlib_disabled.
6265 (delete_disabled_breakpoints): Adjust.
6266 (validate_breakpoints): Only validate software breakpoints.
6267 Adjust to inserted flag change.
6268 (check_mem_read, check_mem_write): Skip breakpoint types other
6269 than software breakpoints. Adjust to inserted flag change.
6270 * mem-break.h (enum raw_bkpt_type): New enum.
6271 (raw_breakpoint, struct process_info): Forward declare.
6272 (Z_packet_to_target_hw_bp_type): Delete declaration.
6273 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6274 (set_gdb_breakpoint, delete_gdb_breakpoint)
6275 (clear_breakpoint_conditions): New declarations.
6276 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6277 (breakpoint_inserted_here): Update comment.
6278 (add_breakpoint_condition, add_breakpoint_commands): Replace
6279 address parameter with a breakpoint pointer parameter.
6280 (gdb_breakpoint_here): Update comment.
6281 (delete_gdb_breakpoint_at): Delete.
6282 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6283 * server.c (process_point_options): Take a struct breakpoint
6284 pointer instead of an address. Adjust.
6285 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6286 delete_gdb_breakpoint.
6287 * spu-low.c (spu_target_ops): Install NULL as
6288 supports_z_point_type method.
6289 * target.h: Include mem-break.h.
6290 (struct target_ops) <prepare_to_access_memory>: Update comment.
6291 <supports_z_point_type>: New field.
6292 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6293 instead of a char. Also take a raw breakpoint pointer.
6294 * win32-arm-low.c (the_low_target): Install NULL as
6295 supports_z_point_type.
6296 * win32-i386-low.c (i386_supports_z_point_type): New function.
6297 (i386_insert_point, i386_remove_point): Adjust to new interface.
6298 (the_low_target): Install i386_supports_z_point_type.
6299 * win32-low.c (win32_supports_z_point_type): New function.
6300 (win32_insert_point, win32_remove_point): Adjust to new interface.
6301 (win32_target_ops): Install win32_supports_z_point_type.
6302 * win32-low.h (struct win32_target_ops):
6303 <supports_z_point_type>: New method.
6304 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6305 instead of a char. Also take a raw breakpoint pointer.
6307 2014-05-20 Pedro Alves <palves@redhat.com>
6309 * mem-break.h: Include break-common.h.
6310 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6311 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6312 (Z_packet_to_target_hw_bp_type): New declaration.
6313 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6314 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6315 (Z_PACKET_ACCESS_WP): Delete macros.
6316 (Z_packet_to_hw_type): Delete function.
6317 * i386-low.h: Don't include break-common.h here.
6318 (Z_packet_to_hw_type): Delete declaration.
6319 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6320 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6321 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6322 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6323 * linux-aarch64-low.c: Don't include break-common.h here.
6324 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6325 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6326 (Z_packet_to_target_hw_bp_type): Delete function.
6327 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6329 (mips_insert_point, mips_remove_point): Use
6330 Z_packet_to_target_hw_bp_type.
6332 2014-05-20 Pedro Alves <palves@redhat.com>
6334 * linux-aarch64-low.c: Include break-common.h.
6335 (enum target_point_type): Delete.
6336 (Z_packet_to_point_type): Rename to ...
6337 (Z_packet_to_target_hw_bp_type): ... this, and return a
6338 target_hw_bp_type instead.
6339 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6340 instead of an enum target_point_type.
6341 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6343 (aarch64_dr_state_insert_one_point)
6344 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6345 (aarch64_handle_aligned_watchpoint)
6346 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6347 Take an enum target_hw_bp_type instead of an enum
6349 (aarch64_supports_z_point_type): New function.
6350 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6351 use Z_packet_to_target_hw_bp_type.
6353 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6355 * configure.ac: Only use -Werror by default when DEVELOPMENT
6357 * configure: Regenerate.
6359 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6361 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6362 * linux-x86-low.c (X86_64_USER_REGS): New.
6363 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6365 2014-04-28 Yao Qi <yao@codesourcery.com>
6367 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6370 2014-04-25 Pedro Alves <palves@redhat.com>
6373 * linux-low.c (linux_attach_fail_reason_string): New function.
6374 (linux_attach_lwp): Delete.
6375 (linux_attach_lwp_1): Rename to ...
6376 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6377 argument. Remove "initial" parameter. Return int instead of
6378 void. Don't error or warn here.
6379 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6380 failure to attach to the tgid. Call warning when failing to
6382 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6383 argument. Remove "initial" parameter. Return int instead of
6384 void. Don't error or warn here.
6385 (linux_attach_fail_reason_string): New declaration.
6386 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6387 interface change. Use linux_attach_fail_reason_string.
6389 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6390 Walfred Tedeschi <walfred.tedeschi@intel.com>
6392 * Makefile.in: Added rules to handle new files
6393 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6394 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6395 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6396 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6397 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6398 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6400 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6401 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6402 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6403 i386/x32-avx512.xml.
6404 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6405 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6406 i386/x32-avx512-linux.xml.
6407 * i387-fp.c (num_avx512_k_registers): New constant for number
6409 (num_avx512_zmmh_low_registers): New constant for number of
6410 lower ZMM registers (0-15).
6411 (num_avx512_zmmh_high_registers): New constant for number of
6412 higher ZMM registers (16-31).
6413 (num_avx512_ymmh_registers): New contant for number of higher
6414 YMM registers (ymm16-31 added by avx521 on x86_64).
6415 (num_avx512_xmm_registers): New constant for number of higher
6416 XMM registers (xmm16-31 added by AVX512 on x86_64).
6417 (struct i387_xsave): Add space for AVX512 registers.
6418 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6419 Add code to handle AVX512 registers.
6420 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6421 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6422 prototypei from generated file.
6423 (tdesc_amd64_avx512_linux): Likewise.
6424 (init_registers_x32_avx512_linux): Likewise.
6425 (tdesc_x32_avx512_linux): Likewise.
6426 (init_registers_i386_avx512_linux): Likewise.
6427 (tdesc_i386_avx512_linux): Likewise.
6428 (x86_64_regmap): Add AVX512 registers.
6429 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6431 (initialize_low_arch): Add code to initialize AVX512 registers.
6433 2014-04-23 Pedro Alves <palves@redhat.com>
6435 * mem-break.c (find_gdb_breakpoint_at): Make static.
6436 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6438 2014-04-23 Pedro Alves <palves@redhat.com>
6440 * i386-low.c: Don't include break-common.h here.
6441 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6442 prototype to take target_hw_bp_type as argument instead of a Z
6444 * i386-low.h: Include break-common.h here.
6445 (Z_packet_to_hw_type): Declare.
6446 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6448 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6449 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6450 (x86_remove_point): Convert the packet number to a
6451 target_hw_bp_type before calling i386_low_remove_watchpoint.
6452 * win32-i386-low.c (i386_insert_point): Convert the packet number
6453 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6454 (i386_remove_point): Convert the packet number to a
6455 target_hw_bp_type before calling i386_low_remove_watchpoint.
6457 2014-04-23 Pedro Alves <palves@redhat.com>
6459 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6461 2014-04-10 Pedro Alves <palves@redhat.com>
6463 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6464 Check if the condition or command is NULL before checking if the
6465 breakpoint is known. On success, return true.
6466 * mem-break.h (add_breakpoint_condition): Document return.
6467 (add_breakpoint_commands): Add describing comment.
6468 * server.c (skip_to_semicolon): New function.
6469 (process_point_options): Use it.
6471 2014-04-09 Pedro Alves <palves@redhat.com>
6473 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6476 2014-02-27 Pedro Alves <palves@redhat.com>
6479 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6481 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6483 (last_thread_of_process_p): Take a PID argument instead of a
6485 (linux_wait_for_lwp): Delete.
6486 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6488 (linux_low_filter_event): New function, party factored out from
6489 linux_wait_for_event.
6490 (linux_wait_for_event): Rename to ...
6491 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6492 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6493 sigsuspend. Check for zombie leaders.
6494 (linux_wait_for_event): Reimplement as wrapper around
6495 linux_wait_for_event_filtered.
6496 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6497 a normal or signal exit is seen, it's the whole process exiting.
6498 (wait_for_sigstop): No longer a for_each_inferior callback.
6499 Rewrite on top of linux_wait_for_event_filtered.
6500 (stop_all_lwps): Call wait_for_sigstop directly.
6501 * server.c (resume, handle_target_event): Handle
6502 TARGET_WAITKIND_NO_RESUMED.
6504 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6506 * win32-low.c (psapi_get_dll_name,
6507 * win32_CreateToolhelp32Snapshot): Delete.
6508 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6509 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6511 (handle_load_dll): Add function description.
6512 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6514 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6516 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6518 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6519 base address when calling win32_add_one_solib.
6520 (handle_load_dll): Delete local variable load_addr.
6521 Remove 0x1000 offset applied to DLL base address when calling
6522 win32_add_one_solib.
6523 (handle_unload_dll): Add comment.
6525 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6527 * win32-low.c (win32_add_all_dlls): Renames
6528 win32_ensure_ntdll_loaded. Rewrite function documentation.
6529 Adjust implementation to always load all DLLs.
6530 Add 0x1000 offset to DLL base address when calling
6531 win32_add_one_solib.
6532 (child_initialization_done): New static global.
6533 (do_initial_child_stuff): Set child_initialization_done to
6534 zero during child initialization, and 1 after. Replace call
6535 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6537 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6538 (handle_unload_dll): Add function documentation.
6539 (get_child_debug_event): Ignore load and unload DLL events
6540 during child initialization.
6542 2014-02-20 Doug Evans <dje@google.com>
6544 Remove global all_lwps.
6545 * inferiors.h (ptid_of): Move here from linux-low.h.
6546 (pid_of, lwpid_of): Ditto.
6547 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6548 parameter is a struct thread_info * now.
6549 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6550 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6551 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6553 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6554 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6555 * linux-arm-low.c (update_registers_callback): Update, "entry"
6556 parameter is a struct thread_info * now.
6557 Fetch lwpid from current_inferior directly.
6558 (arm_insert_point): Pass &all_threads to find_inferior instead of
6560 (arm_remove_point): Ditto.
6561 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6562 (arm_prepare_to_resume): Fetch pid from thread.
6563 (arm_read_description): Fetch lwpid from current_inferior directly.
6564 * linux-low.c (all_lwps): Delete.
6565 (delete_lwp): Delete call to remove_inferior.
6566 (handle_extended_wait): Fetch lwpid from thread.
6567 (add_lwp): Don't set lwp->entry.id. Remove call to
6568 add_inferior_to_list.
6569 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6570 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6571 (kill_one_lwp_callback): Ditto.
6572 (linux_kill): Don't dereference NULL pointer.
6573 Fetch ptid,lwpid from thread.
6574 (get_detach_signal): Fetch ptid from thread.
6575 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6576 Simplify call to regcache_invalidate_thread.
6577 (delete_lwp_callback): Update, "entry" parameter is a
6578 struct thread_info * now. Fetch pid from thread.
6579 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6580 (status_pending_p_callback): Update, "entry" parameter is a
6581 struct thread_info * now. Fetch ptid from thread.
6582 (find_lwp_pid): Update, "entry" parameter is a
6583 struct thread_info * now.
6584 (linux_wait_for_lwp): Fetch pid from thread.
6585 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6586 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6587 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6588 (dequeue_one_deferred_signal): Ditto.
6589 (cancel_breakpoint): Fetch ptid from current_inferior.
6590 (linux_wait_for_event): Pass &all_threads to find_inferior,
6591 not &all_lwps. Fetch ptid, lwpid from thread.
6592 (count_events_callback): Update, "entry" parameter is a
6593 struct thread_info * now.
6594 (select_singlestep_lwp_callback): Ditto.
6595 (select_event_lwp_callback): Ditto.
6596 (cancel_breakpoints_callback): Ditto.
6597 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6599 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6600 (unsuspend_one_lwp): Update, "entry" parameter is a
6601 struct thread_info * now.
6602 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6604 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6605 Fetch lwpid from thread, not lwp.
6606 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6607 Pass &all_threads to find_inferior, not &all_lwps.
6608 (send_sigstop): Fetch lwpid from thread, not lwp.
6609 (send_sigstop_callback): Update, "entry" parameter is a
6610 struct thread_info * now.
6611 (suspend_and_send_sigstop_callback): Ditto.
6612 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6613 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6614 struct thread_info * now.
6615 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6617 (lwp_running): Update, "entry" parameter is a
6618 struct thread_info * now.
6619 (stop_all_lwps): Fetch ptid from thread.
6620 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6621 (linux_resume_one_lwp): Fetch lwpid from thread.
6622 (linux_set_resume_request): Update, "entry" parameter is a
6623 struct thread_info * now. Fetch pid, lwpid from thread.
6624 (resume_status_pending_p): Update, "entry" parameter is a
6625 struct thread_info * now.
6626 (need_step_over_p): Ditto. Fetch lwpid from thread.
6627 (start_step_over): Fetch lwpid from thread.
6628 (linux_resume_one_thread): Update, "entry" parameter is a
6629 struct thread_info * now. Fetch lwpid from thread.
6630 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6631 (proceed_one_lwp): Update, "entry" parameter is a
6632 struct thread_info * now. Fetch lwpid from thread.
6633 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6634 struct thread_info * now.
6635 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6636 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6637 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6639 (regsets_store_inferior_registers): Ditto.
6640 (fetch_register, store_register): Ditto.
6641 (linux_read_memory, linux_write_memory): Ditto.
6642 (linux_request_interrupt): Ditto.
6643 (linux_read_auxv): Ditto.
6644 (linux_xfer_siginfo): Ditto.
6645 (linux_qxfer_spu): Ditto.
6646 (linux_qxfer_libraries_svr4): Ditto.
6647 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6648 moved to inferiors.h.
6650 (get_thread_lwp): Update.
6651 (struct lwp_info): Delete member "entry". Simplify comment for
6654 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6655 current_inferior directly.
6656 (update_watch_registers_callback): Update, "entry" parameter is a
6657 struct thread_info * now. Fetch pid from thread.
6658 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6659 (mips_insert_point): Fetch lwpid from current_inferior.
6660 Pass &all_threads to find_inferior, not &all_lwps.
6661 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6662 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6664 (mips_stopped_data_address): Ditto.
6665 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6667 * linux-tile-low.c (tile_arch_setup): Ditto.
6668 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6669 (update_debug_registers_callback): Update, "entry" parameter is a
6670 struct thread_info * now. Fetch pid from thread.
6671 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6672 Pass &all_threads to find_inferior, not &all_lwps.
6673 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6674 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6675 Pass &all_threads to find_inferior, not &all_lwps.
6676 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6677 (i386_dr_low_get_status): Ditto.
6678 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6679 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6680 (x86_linux_read_description): Ditto.
6681 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6683 2014-02-20 Doug Evans <dje@google.com>
6685 * inferiors.c (get_first_inferior): Fix buglet.
6687 2014-02-19 Doug Evans <dje@google.com>
6689 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6690 * inferiors.c (add_thread): Change result type to struct thread_info *.
6691 All callers updated.
6692 (add_lwp): Call add_thread here instead of in callers.
6693 All callers updated.
6694 * linux-low.h (get_lwp_thread): Rewrite.
6695 (struct lwp_info): New member "thread".
6697 2014-02-19 Doug Evans <dje@google.com>
6699 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6700 All callers updated.
6702 2014-02-19 Doug Evans <dje@google.com>
6704 * inferiors.c (add_thread): Fix whitespace.
6706 2014-02-19 Doug Evans <dje@google.com>
6708 * dll.c (clear_dlls): Replace accessing list implemention details
6710 * gdbthread.h (get_first_thread): Declare.
6711 * inferiors.c (for_each_inferior_with_data): New function.
6712 (get_first_thread): New function.
6713 (find_thread_ptid): Simplify.
6714 (get_first_inferior): New function.
6715 (clear_list): Delete.
6716 (one_inferior_p): New function.
6717 (clear_inferior_list): New function.
6718 (clear_inferiors): Update.
6719 * inferiors.h (for_each_inferior_with_data): Declare.
6720 (clear_inferior_list): Declare.
6721 (one_inferior_p): Declare.
6722 (get_first_inferior): Declare.
6723 * linux-low.c (linux_wait_for_event): Replace accessing list
6724 implemention details with API function.
6725 * server.c (target_running): Ditto.
6726 (accumulate_file_name_length): New function.
6727 (emit_dll_description): New function.
6728 (handle_qxfer_libraries): Replace accessing list implemention
6729 details with API function.
6730 (handle_qxfer_threads_worker): New function.
6731 (handle_qxfer_threads_proper): Replace accessing list implemention
6732 details with API function.
6733 (handle_query): Ditto.
6734 (visit_actioned_threads_callback_ftype): New typedef.
6735 (visit_actioned_threads_data): New struct.
6736 (visit_actioned_threads): Rewrite to be find_inferior callback.
6737 (resume): Call find_inferior.
6738 (handle_status): Replace accessing list implemention
6739 details with API function.
6740 (process_serial_event): Replace accessing list implemention details
6742 * target.c (set_desired_inferior): Replace accessing list implemention
6743 details with API function.
6744 * tracepoint.c (same_process_p): New function.
6745 (gdb_agent_about_to_close): Replace accessing list implemention
6746 details with API function.
6747 * win32-low.c (child_delete_thread): Replace accessing list
6748 implemention details with API function.
6749 (match_dll_by_basename): New function.
6750 (dll_is_loaded_by_basename): New function.
6751 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6752 details call to dll_is_loaded_by_basename.
6754 2014-02-19 Doug Evans <dje@google.com>
6756 * dll.h (struct dll_info): Add comment.
6757 * gdbthread.h (struct thread_info): Add comment.
6758 (current_ptid): Simplify.
6759 * inferiors.c (add_process): Update.
6760 (remove_process): Update.
6761 * inferiors.h (struct process_info): Rename member "head" to "entry".
6762 * linux-low.c (delete_lwp): Update.
6764 (last_thread_of_process_p): Update.
6765 (kill_one_lwp_callback, linux_kill): Update.
6766 (status_pending_p_callback): Update.
6767 (wait_for_sigstop): Update. Simplify read of ptid.
6768 (start_step_over): Update.
6769 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6770 (get_lwp_thread): Update.
6771 (struct lwp_info): Rename member "head" to "entry".
6772 * regcache.h (inferior_list_entry): Delete.
6773 * server.c (kill_inferior_callback): Update.
6774 (detach_or_kill_inferior_callback): Update.
6775 (print_started_pid): Update.
6776 (print_attached_pid): Update.
6777 (process_serial_event): Simplify read of ptid.
6778 * thread-db.c (thread_db_create_event): Update.
6779 (thread_db_get_tls_address): Update.
6780 * win32-low.c (current_inferior_ptid): Simplify.
6782 2014-02-19 Tom Tromey <tromey@redhat.com>
6784 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6786 (target_supports_btrace): Update.
6788 2014-02-14 Yao Qi <yao@codesourcery.com>
6790 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6791 (rsp-low-ipa.o): New target.
6793 2014-02-12 Tom Tromey <tromey@redhat.com>
6795 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6796 convert_ascii_to_int.
6797 * regcache.c (registers_to_string): Likewise.
6798 * remote-utils.c (decode_M_packet): Likewise.
6799 * server.c (process_serial_event): Likewise.
6801 2014-02-12 Tom Tromey <tromey@redhat.com>
6803 * server.c (handle_query, handle_v_run): Use hex2bin, not
6805 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6807 2014-02-12 Tom Tromey <tromey@redhat.com>
6809 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6810 convert_int_to_ascii.
6811 * regcache.c (registers_to_string, collect_register_as_string):
6813 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6815 * server.c (process_serial_event): Likewise.
6816 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6817 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6819 2014-02-12 Tom Tromey <tromey@redhat.com>
6821 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6822 bin2hex, not hexify.
6823 * tracepoint.c (cmd_qtstatus): Likewise.
6825 2014-02-12 Tom Tromey <tromey@redhat.com>
6827 * remote-utils.c (monitor_output): Pass explicit length to
6830 2014-02-12 Tom Tromey <tromey@redhat.com>
6832 * tracepoint.c: Include rsp-low.h.
6833 * server.c: Include rsp-low.h.
6834 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6835 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6837 * remote-utils.c: Include rsp-low.h.
6838 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6839 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6840 (convert_int_to_ascii, convert_ascii_to_int): Move to
6842 * regcache.c: Include rsp-low.h.
6843 * ax.c: Include rsp-low.h.
6844 * Makefile.in (SFILES): Add common/rsp-low.c.
6845 (OBS): Add rsp-low.o.
6846 (rsp-low.o): New target.
6848 2014-02-12 Tom Tromey <tromey@redhat.com>
6850 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6851 Include print-utils.h.
6852 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6853 (plongest, thirty_two, phex_nz): Remove.
6854 * Makefile.in (SFILES): Add common/print-utils.c.
6855 (OBS): Add print-utils.o.
6856 (print-utils-ipa.o): New target.
6857 (print-utils.o): New target.
6858 (IPA_OBJS): Add print-utils-ipa.o.
6860 2014-02-06 Tom Tromey <tromey@redhat.com>
6862 * Makefile.in (SFILES): Fix indentation.
6864 2014-02-05 Doug Evans <dje@google.com>
6866 * linux-low.c (linux_wait_for_event): Improve comment.
6867 (linux_wait_1): Keep current_inferior in sync with event_child.
6869 2014-01-22 Doug Evans <dje@google.com>
6871 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6873 2014-01-22 Doug Evans <dje@google.com>
6875 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6876 * configure: Regenerate.
6877 * config.in: Regenerate.
6878 * Makefile.in (SFILES): Add debug.c.
6880 * debug.c: New file.
6881 * debug.h: New file.
6882 * linux-aarch64-low.c (*): Update all debugging printfs to use
6883 debug_printf instead of fprintf.
6884 * linux-arm-low.c (*): Ditto.
6885 * linux-cris-low.c (*): Ditto.
6886 * linux-crisv32-low.c (*): Ditto.
6887 * linux-m32r-low.c (*): Ditto.
6888 * linux-sparc-low.c (*): Ditto.
6889 * linux-x86.c (*): Ditto.
6890 * linux-low.c (*): Ditto.
6891 (linux_wait_1): Add calls to debug_enter, debug_exit.
6892 (linux_wait): Remove redundant debugging printf.
6893 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6894 (linux_resume, unstop_all_lwps): Ditto.
6895 * mem-break.c (*): Update all debugging printfs to use
6896 debug_printf instead of fprintf.
6897 * remote-utils.c (*): Ditto.
6898 * thread-db.c (*): Ditto.
6899 * server.c #include <ctype.h>, "gdb_vecs.h".
6900 (debug_threads): Moved to debug.c.
6901 (*): Update all debugging printfs to use debug_printf instead of
6903 (start_inferior): Replace call to fflush with call to debug_flush.
6904 (monitor_show_help): Mention set debug-format.
6905 (parse_debug_format_options): New function.
6906 (handle_monitor_command): Handle "monitor set debug-format".
6907 (gdbserver_usage): Mention --debug-format.
6908 (main): Parse --debug-format.
6909 * server.h (debug_threads): Declaration moved to debug.h.
6911 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6912 trace_debug_1 that uses debug_printf.
6913 (tracepoint_look_up_symbols): Update all debugging printfs to use
6914 debug_printf instead of fprintf.
6916 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6918 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6921 2014-01-17 Pedro Alves <palves@redhat.com>
6924 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6925 defined after including gdb_proc_service.h.
6927 2014-01-16 Doug Evans <dje@google.com>
6929 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6930 (match_dll): Use it.
6932 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6934 * target.h (target_ops) <read_btrace>: Change parameters and
6935 return type to allow error reporting.
6936 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6937 trace reading errors on.
6938 * linux-low.c (linux_low_read_btrace): Pass trace reading
6940 (linux_low_disable_btrace): New.
6942 2014-01-15 Doug Evans <dje@google.com>
6944 * inferiors.c (thread_id_to_gdb_id): Delete.
6945 * inferiors.h (thread_id_to_gdb_id): Delete.
6947 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6949 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6950 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6953 2014-01-08 Pedro Alves <palves@redhat.com>
6955 * server.c (handle_status): Don't discard previous queued stop
6956 replies or thread's pending status here.
6957 (main) <disconnection>: Do it here instead.
6959 2014-01-08 Pedro Alves <palves@redhat.com>
6961 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6962 * server.c (visit_actioned_threads, handle_pending_status): New
6964 (handle_v_cont): Factor out parts to ...
6965 (resume): ... this new function. If in all-stop, and a thread
6966 being resumed has a pending status, report it without actually
6968 (myresume): Adjust to use the new 'resume' function.
6969 (clear_pending_status_callback, set_pending_status_callback)
6970 (find_status_pending_thread_callback): New functions.
6971 (handle_status): Handle the case of multiple threads having
6972 interesting statuses to report. Report threads' real last signal
6973 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6974 with an interesting thread to report the status for, instead of
6975 always reporting the status of the first thread.
6977 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6979 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6980 * gdbreplay.c (gdbreplay_version): Likewise.
6982 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6984 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6985 iov.iov_len with the real length in use.
6987 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6989 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6990 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6991 for all targets that use win32-low.c.
6992 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6993 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6995 2013-12-13 Pedro Alves <palves@redhat.com>
6997 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6998 if equal to TARGET_WAITKIND_LOADED.
6999 * win32-low.c (cached_status): New static global.
7000 (win32_wait): Add declaration.
7001 (do_initial_child_stuff): Flush all initial pending debug events
7002 up to the initial breakpoint.
7003 (win32_wait): If CACHED_STATUS was set, return that instead
7004 of doing a real wait. Remove the code resuming the execution
7005 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7006 during the initial phase. Also remove the code changing
7007 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7008 TARGET_WAITKIND_STOPPED.
7010 2013-12-11 Yao Qi <yao@codesourcery.com>
7012 * notif.c (handle_notif_ack): Return 0 if no notification
7015 2013-11-20 Doug Evans <dje@google.com>
7017 * linux-low.c (linux_set_resume_request): Fix comment.
7019 2013-11-20 Doug Evans <dje@google.com>
7021 * linux-low.c (resume_status_pending_p): Tweak comment.
7023 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7025 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7026 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7027 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7028 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7029 (srv_amd64_regobj): Add amd64-mpx.o.
7030 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7031 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7032 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7033 * i387-fp.c (num_pl_bnd_register) Added constant.
7034 (num_pl_bnd_cfg_registers) Added constant.
7035 (struct i387_xsave) Added reserved area and MPX fields.
7036 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7037 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7039 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7040 (init_registers_amd64_mpx_linux): Declare new function.
7041 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7042 (x86_64_regmap): Add MPX registers.
7043 (x86_linux_read_description): Add MPX case.
7044 (initialize_low_arch): Initialize MPX targets.
7046 2013-11-18 Tom Tromey <tromey@redhat.com>
7048 * configure: Rebuild.
7049 * configure.ac: Don't check for stdlib.h.
7050 * gdbreplay.c: Unconditionally include stdlib.h.
7052 2013-11-18 Tom Tromey <tromey@redhat.com>
7054 * config.in: Rebuild.
7055 * configure: Rebuild.
7056 * configure.ac: Don't use AC_HEADER_DIRENT.
7058 2013-11-18 Tom Tromey <tromey@redhat.com>
7060 * server.h: Don't check HAVE_STRING_H.
7061 * gdbreplay.c: Don't check HAVE_STRING_H.
7062 * configure: Rebuild.
7064 2013-11-18 Tom Tromey <tromey@redhat.com>
7066 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7069 2013-11-08 Tom Tromey <tromey@redhat.com>
7071 * configure, config.in: Rebuild.
7072 * configure.ac: Remove unused configury.
7074 2013-11-08 Tom Tromey <tromey@redhat.com>
7076 * acinclude.m4: Include common.m4, codeset.m4.
7077 * configure, config.in: Rebuild.
7078 * configure.ac: Use GDB_AC_COMMON.
7080 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7082 * linux-s390-low.c (HWCAP_S390_TE): New define.
7083 (s390_arch_setup): Consider the TE field in the HWCAP for
7084 determining 'have_regset_tdb'.
7086 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7089 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7092 2013-10-02 Pedro Alves <palves@redhat.com>
7094 * server.c (process_serial_event): Don't output "GDBserver
7095 exiting" if GDB is connected through stdio.
7096 * target.c (mywait): Likewise, be silent if GDB is connected
7099 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7101 * lynx-low.c (lynx_add_threads_after_attach): New function.
7102 (lynx_attach): Remove call to add_thread. Add call to
7103 lynx_add_threads_after_attach instead.
7105 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7107 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7108 * config.in, configure: Regenerated.
7110 2013-09-18 Yao Qi <yao@codesourcery.com>
7113 * server.c (start_inferior): Clear 'resume_info'.
7115 2013-09-16 Jiong Wang <jiwang@tilera.com>
7117 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7120 2013-09-16 Jiong Wang <jiwang@tilera.com>
7122 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7123 linux-tile-low.o to srv_tgtobj.
7125 2013-09-16 Will Newton <will.newton@linaro.org>
7127 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7130 2013-09-06 Pedro Alves <palves@redhat.com>
7132 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7133 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7134 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7135 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7136 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7137 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7139 2013-09-06 Pedro Alves <palves@redhat.com>
7141 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7142 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7144 2013-09-06 Pedro Alves <palves@redhat.com>
7146 * linux-amd64-ipa.c: Include tracepoint.h.
7147 * linux-i386-ipa.c: Include tracepoint.h.
7149 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7151 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7152 (ps_get_thread_area): New function.
7154 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7156 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7157 (initialize_low_arch): Call init_registers_crisv32 rather than
7158 init_register_crisv32.
7160 2013-09-05 Pedro Alves <palves@redhat.com>
7162 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7164 * hostio.h: ... this new file.
7165 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7166 win32-low.c: Include hostio.h.
7168 2013-09-05 Pedro Alves <palves@redhat.com>
7170 * server.h (gdb_client_data, handler_func, callback_handler_func)
7171 (delete_file_handler, add_file_handler, append_callback_event)
7172 (delete_callback_event, start_event_loop, initialize_event_loop):
7173 Move to event-loop.h and include it.
7174 * event-loop.h: New file.
7176 2013-09-05 Pedro Alves <palves@redhat.com>
7178 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7179 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7180 (loaded_dll, unloaded_dll): Move to ...
7181 * dll.h: ... this new file.
7182 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7184 2013-09-05 Pedro Alves <palves@redhat.com>
7186 * server.h (current_process, get_thread_process, all_processes)
7187 (add_inferior_to_list, for_each_inferior, current_inferior)
7188 (remove_inferior, add_process, remove_process, find_process_pid)
7189 (have_started_inferiors_p, have_attached_inferiors_p)
7190 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7191 (clear_inferiors, find_inferior, find_inferior_id)
7192 (inferior_target_data, set_inferior_target_data)
7193 (inferior_regcache_data, set_inferior_regcache_data): Move to
7194 inferiors.h, and include it.
7195 * inferiors.h: New file.
7197 2013-09-05 Pedro Alves <palves@redhat.com>
7199 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7203 2013-09-05 Pedro Alves <palves@redhat.com>
7205 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7207 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7208 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7209 (handle_tracepoint_general_set, handle_tracepoint_query)
7210 (tracepoint_finished_step, tracepoint_was_hit)
7211 (release_while_stepping_state_list, current_traceframe)
7212 (in_readonly_region, traceframe_read_mem)
7213 (fetch_traceframe_registers, traceframe_read_sdata)
7214 (traceframe_read_info, struct fast_tpoint_collect_status)
7215 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7216 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7217 (supply_fast_tracepoint_registers)
7218 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7219 (ipa_tdesc, claim_trampoline_space)
7220 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7221 (agent_mem_read, agent_get_trace_state_variable_value)
7222 (agent_set_trace_state_variable_value, agent_tsv_read)
7223 (agent_mem_read_string, get_raw_reg_func_addr)
7224 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7225 * tracepoint.h: ... this new file.
7227 2013-09-05 Pedro Alves <palves@redhat.com>
7229 * server.h (perror_with_name, error, fatal, warning, paddress)
7230 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7232 * utils.h: New file.
7234 2013-09-05 Pedro Alves <palves@redhat.com>
7236 * server.h (remote_debug, noack_mode, transport_is_reliable)
7237 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7238 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7239 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7240 (write_enn, initialize_async_io, enable_async_io)
7241 (disable_async_io, check_remote_input_interrupt_request)
7242 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7243 (dead_thread_notify, prepare_resume_reply)
7244 (decode_address_to_semicolon, decode_address, decode_m_packet)
7245 (decode_M_packet, decode_X_packet, decode_xfer_write)
7246 (decode_search_memory_packet, unhexify, hexify)
7247 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7248 (look_up_one_symbol, relocate_instruction)
7249 (monitor_output): Move to remote-utils.h, and include it.
7250 * remote-utils.h: New file.
7252 2013-09-05 Pedro Alves <palves@redhat.com>
7254 * server.h (_): Delete.
7256 2013-09-02 Pedro Alves <palves@redhat.com>
7258 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7259 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7261 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7263 2013-09-02 Pierre Muller <muller@sourceware.org>
7265 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7266 or WriteProcessMemory complete successfully and handle
7267 ERROR_PARTIAL_COPY error.
7269 2013-09-02 Pedro Alves <palves@redhat.com>
7271 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7272 error instead of EIO.
7274 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7277 * linux-low.c: Include filestuff.h.
7278 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7279 * lynx-low.c: Include filestuff.h.
7280 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7281 * server.c: Include filestuff.h.
7282 (main): Call notice_open_fds.
7283 * spu-low.c: Include filestuff.h.
7284 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7286 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7288 * Makefile.in: Explain why ../target and ../nat are not
7289 listed as include file search paths.
7290 (linux-waitpid.o): New object file rule.
7291 * configure.srv (srv_native_linux_obj): New variable.
7292 Replace all occurrences of linux native object files with
7293 $srv_native_linux_obj.
7294 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7295 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7296 (linux_enable_event_reporting): Remove declaration.
7297 (my_waitpid): Moved to common/linux-waitpid.c.
7298 (linux_wait_for_event): Pass ptid when calling
7299 linux_enable_event_reporting.
7300 (linux_supports_tracefork_flag): Remove.
7301 (linux_enable_event_reporting): Likewise.
7302 (linux_tracefork_grandchild): Remove.
7303 (STACK_SIZE): Moved to common/linux-ptrace.c.
7304 (linux_tracefork_child): Remove.
7305 (linux_test_for_tracefork): Remove.
7306 (linux_look_up_symbols): Call linux_supports_traceclone.
7307 (initialize_low): Remove call to linux_test_for_tracefork.
7308 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7309 common/linux-ptrace.h.
7310 (PTRACE_TYPE_ARG4): Likewise.
7311 Include linux-ptrace.h.
7313 2013-08-21 Pedro Alves <palves@redhat.com>
7315 * config.in: Renegerate.
7317 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7319 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7320 (SFILES): Remove $(srcdir)/common/target-common.c and
7321 add $(srcdir)/target/waitstatus.c.
7322 (OBS): Remove target-common.o and add waitstatus.o.
7323 (server_h): Remove $(srcdir)/../common/target-common.h and
7324 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7325 and $(srcdir)/../target/waitstatus.h.
7326 (target-common.o): Remove.
7327 (waitstatus.o): New target object file.
7328 * target.h: Do not include target-common.h and
7329 include target/resume.h, target/wait.h and
7330 target/waitstatus.h.
7332 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7334 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7335 to PTRACE_TYPE_ARG3.
7336 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7337 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7339 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7340 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7342 2013-07-27 Jie Zhang <jie@codesourcery.com>
7343 Daniel Jacobowitz <dan@codesourcery.com>
7344 Yao Qi <yao@codesourcery.com>
7346 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7347 (mips-linux-watch.o): New rule.
7348 (mips_linux_watch_h): New variable.
7349 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7351 * linux-mips-low.c: Include mips-linux-watch.h.
7352 (struct arch_process_info, struct arch_lwp_info): New.
7353 (update_watch_registers_callback): New function.
7354 (mips_linux_new_process, mips_linux_new_thread) New functions.
7355 (mips_linux_prepare_to_resume, mips_insert_point): New
7357 (mips_remove_point, mips_stopped_by_watchpoint): New
7359 (rsp_bp_type_to_target_hw_bp_type): New function.
7360 (mips_stopped_data_address): New function.
7361 (the_low_target): Add watchpoint support functions.
7363 2013-07-27 Yao Qi <yao@codesourcery.com>
7365 * i386-low.c: Include break-common.h.
7366 (enum target_hw_bp_type): Remove.
7368 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7370 * Makefile.in (SFILES): /common/target-common.c.
7371 (OBS): Add target-common.o.
7372 (server_h): Add $(srcdir)/../common/target-common.h.
7373 (target-common.o): New target.
7374 * server.c (queue_stop_reply_callback): Free
7375 status string after use.
7376 * target.c (target_waitstatus_to_string): Remove.
7377 * target.h: Include target-common.h.
7378 (resume_kind): Likewise.
7379 (target_waitkind): Likewise.
7380 (target_waitstatus): Likewise.
7381 (TARGET_WNOHANG): Likewise.
7383 2013-07-04 Yao Qi <yao@codesourcery.com>
7385 * Makefile.in (host_alias): Use @host_noncanonical@.
7386 (target_alias): Use @target_noncanonical@.
7387 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7388 ACX_NONCANONICAL_HOST.
7389 * configure: Regenerated.
7392 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7394 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7395 * configure: Rebuild.
7396 * Makefile.in (version_host, version_target): Get from configure.
7397 (version.c): Use $(version_host) and $(version_target).
7399 2013-07-03 Pedro Alves <palves@redhat.com>
7401 * Makefile.in (config.status): Depend on development.sh.
7402 * acinclude.m4: Include libmcheck.m4.
7403 * configure: Regenerate.
7405 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7407 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7408 attribute inside the parentheses.
7409 (winapi_DebugSetProcessKillOnExit): Ditto.
7410 (winapi_DebugBreakProcess): Ditto.
7411 (winapi_GenerateConsoleCtrlEvent): Ditto.
7413 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7415 * notif.h (notif_event): Add a dummy member to avoid compiler
7418 2013-07-01 Pedro Alves <palves@redhat.com>
7420 * hostio.c (HOSTIO_PATH_MAX): Define.
7421 (require_filename, handle_open, handle_unlink, handle_readlink):
7424 2013-07-01 Pedro Alves <palves@redhat.com>
7426 * server.h: Include "pathmax.h".
7427 * linux-low.c: Don't include sys/param.h.
7428 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7430 * win32-low.c: Don't include sys/param.h.
7431 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7433 2013-07-01 Pedro Alves <palves@redhat.com>
7435 * event-loop.c: Don't check HAVE_UNISTD_H before including
7437 * gdbreplay.c: Likewise.
7438 * remote-utils.c: Likewise.
7439 * server.c: Likewise.
7440 * configure.ac: Don't check for unistd.h.
7441 * configure: Regenerate.
7443 2013-06-28 Tom Tromey <tromey@redhat.com>
7445 * Makefile.in (version.c): Use version.in, not
7448 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7450 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7451 * configure: Rebuild.
7452 * Makefile.in (version_host, version_target): Get from configure.
7453 (version.c): Use $(version_host) and $(version_target).
7455 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7457 Fix trace-status to output user name without trailing colon.
7458 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7460 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7462 Fix trace-status to output proper start-time and stop-time.
7463 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7464 output start time and stop time in hex as gdb expects.
7466 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7468 * tracepoint.c (build_traceframe_info_xml): Output trace state
7469 variables present in the trace buffer.
7471 2013-06-24 Tom Tromey <tromey@redhat.com>
7473 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7475 (version.o): Remove.
7476 * gdbreplay.c: Include version.h.
7477 (version, host_name): Don't declare.
7478 * server.h: Include version.h.
7479 (version, host_name): Don't declare.
7481 2013-06-12 Pedro Alves <palves@redhat.com>
7483 * linux-x86-low.c (linux_is_elf64): Delete global.
7484 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7485 with local linux_pid_exe_is_elf_64_file use.
7487 2013-06-11 Pedro Alves <palves@redhat.com>
7489 * linux-low.c (regset_disabled, disable_regset): New functions.
7490 (regsets_fetch_inferior_registers)
7491 (regsets_store_inferior_registers): Use them.
7492 (initialize_regsets_info); Don't allocate the disabled_regsets
7494 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7497 2013-06-11 Pedro Alves <palves@redhat.com>
7499 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7502 2013-06-11 Pedro Alves <palves@redhat.com>
7504 * linux-x86-low.c (initialize_low_arch): Call
7505 init_registers_x32_avx_linux.
7507 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7509 Fix compatibility with Android Bionic.
7510 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7513 2013-06-07 Pedro Alves <palves@redhat.com>
7516 * Makefile.in (OBS): Add tdesc.o.
7517 (IPA_OBJS): Add tdesc-ipa.o.
7518 (tdesc-ipa.o): New rule.
7519 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7521 * linux-low.c (new_inferior): Delete.
7522 (disabled_regsets, num_regsets): Delete.
7523 (linux_add_process): Adjust to set the new per-process
7525 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7526 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7527 was a stop. When calling arch_setup, switch the current inferior
7528 to the thread that got an event.
7529 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7530 (regsets_fetch_inferior_registers)
7531 (regsets_store_inferior_registers): New regsets_info parameter.
7533 (linux_register_in_regsets): New regs_info parameter. Adjust to
7535 (register_addr, fetch_register, store_register): New usrregs_info
7536 parameter. Adjust to use it.
7537 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7538 parameter regs_info. Adjust to use it.
7539 (linux_fetch_registers): Get the current inferior's regs_info, and
7541 (linux_store_registers): Ditto.
7542 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7543 (initialize_low): Don't initialize the target_regsets here. Call
7544 initialize_low_arch.
7545 * linux-low.h (target_regsets): Delete declaration.
7546 (struct regsets_info): New.
7547 (struct usrregs_info): New.
7548 (struct regs_info): New.
7549 (struct process_info_private) <new_inferior>: New field.
7550 (struct linux_target_ops): Delete the num_regs, regmap, and
7551 regset_bitmap fields. New field regs_info.
7552 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7553 * i387-fp.c (num_xmm_registers): Delete.
7554 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7555 calls to new interface.
7556 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7557 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7558 Infer the number of xmm registers from the regcache's target
7560 * i387-fp.h (num_xmm_registers): Delete.
7561 * inferiors.c (add_thread): Don't install the thread's regcache
7563 * proc-service.c (gregset_info): Fetch the current inferior's
7564 regs_info. Adjust to use it.
7565 * regcache.c: Include tdesc.h.
7566 (register_bytes, reg_defs, num_registers)
7567 (gdbserver_expedite_regs): Delete.
7568 (get_thread_regcache): If the thread doesn't have a regcache yet,
7569 create one, instead of aborting gdbserver.
7570 (regcache_invalidate_one): Rename to ...
7571 (regcache_invalidate_thread): ... this.
7572 (regcache_invalidate_one): New.
7573 (regcache_invalidate): Only invalidate registers of the current
7575 (init_register_cache): Add target_desc parameter, and use it.
7576 (new_register_cache): Ditto. Assert the target description has a
7577 non zero registers_size.
7578 (regcache_cpy): Add assertions. Adjust.
7579 (realloc_register_cache, set_register_cache): Delete.
7580 (registers_to_string, registers_from_string): Adjust.
7581 (find_register_by_name, find_regno, find_register_by_number)
7582 (register_cache_size): Add target_desc parameter, and use it.
7583 (free_register_cache_thread, free_register_cache_thread_one)
7584 (regcache_release, register_cache_size): New.
7585 (register_size): Add target_desc parameter, and use it.
7586 (register_data, supply_register, supply_register_zeroed)
7587 (supply_regblock, supply_register_by_name, collect_register)
7588 (collect_register_as_string, collect_register_by_name): Adjust.
7589 * regcache.h (struct target_desc): Forward declare.
7590 (struct regcache) <tdesc>: New field.
7591 (init_register_cache, new_register_cache): Add target_desc
7593 (regcache_invalidate_thread): Declare.
7594 (regcache_invalidate_one): Delete declaration.
7595 (regcache_release): Declare.
7596 (find_register_by_number, register_cache_size, register_size)
7597 (find_regno): Add target_desc parameter.
7598 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7600 * remote-utils.c: Include tdesc.h.
7601 (outreg, prepare_resume_reply): Adjust.
7602 * server.c: Include tdesc.h.
7603 (gdbserver_xmltarget): Delete declaration.
7604 (get_features_xml, process_serial_event): Adjust.
7605 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7607 (struct process_info) <tdesc>: New field.
7608 (ipa_tdesc): Declare.
7609 * tdesc.c: New file.
7610 * tdesc.h: New file.
7611 * tracepoint.c: Include tdesc.h.
7612 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7613 (get_context_regcache): Adjust to pass ipa_tdesc down.
7614 (do_action_at_tracepoint): Adjust to get the register cache size
7615 from the context regcache's description.
7616 (traceframe_walk_blocks): Adjust to get the register cache size
7617 from the current trace frame's description.
7618 (traceframe_get_pc): Adjust to get current trace frame's
7619 description and pass it down.
7620 (gdb_collect): Adjust to get the register cache size from the
7622 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7623 (gdbserver_xmltarget): Delete.
7624 (initialize_low_tracepoint): Set the ipa's target description.
7625 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7626 (initialize_low_tracepoint): Set the ipa's target description.
7627 * linux-x86-low.c: Include tdesc.h.
7628 [__x86_64__] (is_64bit_tdesc): New.
7629 (ps_get_thread_area, x86_get_thread_area): Use it.
7630 (i386_cannot_store_register): Rename to ...
7631 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7632 (i386_cannot_fetch_register): Rename to ...
7633 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7634 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7636 (target_regsets): Rename to ...
7637 (x86_regsets): ... this.
7638 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7640 (x86_siginfo_fixup): Use is_64bit_tdesc.
7641 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7642 (tdesc_x32_avx_linux, tdesc_x32_linux)
7643 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7645 (x86_linux_update_xmltarget): Delete.
7646 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7647 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7648 (AMD64_LINUX_USER64_CS): New.
7649 (x86_linux_read_description): New, based on
7650 x86_linux_update_xmltarget.
7651 (same_process_callback): New.
7652 (x86_arch_setup_process_callback): New.
7653 (x86_linux_update_xmltarget): New.
7654 (x86_regsets_info): New.
7655 (amd64_linux_regs_info): New.
7656 (i386_linux_usrregs_info): New.
7657 (i386_linux_regs_info): New.
7658 (x86_linux_regs_info): New.
7659 (x86_arch_setup): Reimplement.
7660 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7661 (x86_emit_ops): Ditto.
7662 (the_low_target): Adjust. Install x86_linux_regs_info,
7663 x86_cannot_fetch_register, and x86_cannot_store_register.
7664 (initialize_low_arch): New.
7665 * linux-ia64-low.c (tdesc_ia64): Declare.
7666 (ia64_fetch_register): Adjust.
7667 (ia64_usrregs_info, regs_info): New globals.
7668 (ia64_regs_info): New function.
7669 (the_low_target): Adjust.
7670 (initialize_low_arch): New function.
7671 * linux-sparc-low.c (tdesc_sparc64): Declare.
7672 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7674 (sparc_arch_setup): New function.
7675 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7676 (the_low_target): Adjust.
7677 (initialize_low_arch): New function.
7678 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7679 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7680 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7681 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7682 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7683 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7684 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7685 (tdesc_powerpc_isa205_vsx64l): Declare.
7686 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7687 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7688 (ppc_set_pc, ppc_get_hwcap): Adjust.
7689 (ppc_usrregs_info): Forward declare.
7690 (!__powerpc64__) ppc_regmap_adjusted: New global.
7691 (ppc_arch_setup): Adjust to the current process'es target
7693 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7694 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7695 (ppc_store_evrregset): Adjust.
7696 (target_regsets): Rename to ...
7697 (ppc_regsets): ... this, and make static.
7698 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7699 (ppc_regs_info): New function.
7700 (the_low_target): Adjust.
7701 (initialize_low_arch): New function.
7702 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7703 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7704 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7705 (tdesc_s390x_linux64v2): Declare.
7706 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7707 (s390_fill_gregset, s390_store_last_break): Adjust.
7708 (target_regsets): Rename to ...
7709 (s390_regsets): ... this, and make static.
7710 (s390_get_pc, s390_set_pc): Adjust.
7711 (s390_get_hwcap): New target_desc parameter, and use it.
7712 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7713 (s390_arch_setup): Adjust to set the current process'es target
7714 description. Don't adjust the regmap.
7715 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7716 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7717 (regs_info_3264): New globals.
7718 (s390_regs_info): New function.
7719 (the_low_target): Adjust.
7720 (initialize_low_arch): New function.
7721 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7722 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7723 [__mips64] (init_registers_mips_linux)
7724 (init_registers_mips_dsp_linux): Delete defines.
7725 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7726 (have_dsp): New global.
7727 (mips_read_description): New, based on mips_arch_setup.
7728 (mips_arch_setup): Reimplement.
7729 (get_usrregs_info): New function.
7730 (mips_cannot_fetch_register, mips_cannot_store_register)
7731 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7732 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7733 (target_regsets): Rename to ...
7734 (mips_regsets): ... this, and make static.
7735 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7736 (dsp_regs_info, regs_info): New globals.
7737 (mips_regs_info): New function.
7738 (the_low_target): Adjust.
7739 (initialize_low_arch): New function.
7740 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7741 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7743 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7744 (arm_read_description): New, with bits factored from
7746 (arm_arch_setup): Reimplement.
7747 (target_regsets): Rename to ...
7748 (arm_regsets): ... this, and make static.
7749 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7750 (arm_regs_info): New function.
7751 (the_low_target): Adjust.
7752 (initialize_low_arch): New function.
7753 * linux-m68k-low.c (tdesc_m68k): Declare.
7754 (target_regsets): Rename to ...
7755 (m68k_regsets): ... this, and make static.
7756 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7757 (m68k_regs_info): New function.
7758 (m68k_arch_setup): New function.
7759 (the_low_target): Adjust.
7760 (initialize_low_arch): New function.
7761 * linux-sh-low.c (tdesc_sharch): Declare.
7762 (target_regsets): Rename to ...
7763 (sh_regsets): ... this, and make static.
7764 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7765 (sh_regs_info, sh_arch_setup): New functions.
7766 (the_low_target): Adjust.
7767 (initialize_low_arch): New function.
7768 * linux-bfin-low.c (tdesc_bfin): Declare.
7769 (bfin_arch_setup): New function.
7770 (bfin_usrregs_info, regs_info): New globals.
7771 (bfin_regs_info): New function.
7772 (the_low_target): Adjust.
7773 (initialize_low_arch): New function.
7774 * linux-cris-low.c (tdesc_cris): Declare.
7775 (cris_arch_setup): New function.
7776 (cris_usrregs_info, regs_info): New globals.
7777 (cris_regs_info): New function.
7778 (the_low_target): Adjust.
7779 (initialize_low_arch): New function.
7780 * linux-cris-low.c (tdesc_crisv32): Declare.
7781 (cris_arch_setup): New function.
7782 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7783 (cris_regs_info): New function.
7784 (the_low_target): Adjust.
7785 (initialize_low_arch): New function.
7786 * linux-m32r-low.c (tdesc_m32r): Declare.
7787 (m32r_arch_setup): New function.
7788 (m32r_usrregs_info, regs_info): New globals.
7789 (m32r_regs_info): Adjust.
7790 (initialize_low_arch): New function.
7791 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7792 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7793 (tic6x_usrregs_info): Forward declare.
7794 (tic6x_read_description): New function, based on ...
7795 (tic6x_arch_setup): ... this. Reimplement.
7796 (target_regsets): Rename to ...
7797 (tic6x_regsets): ... this, and make static.
7798 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7799 (tic6x_regs_info): New function.
7800 (the_low_target): Adjust.
7801 (initialize_low_arch): New function.
7802 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7803 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7804 (target_regsets): Rename to ...
7805 (xtensa_regsets): ... this, and make static.
7806 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7808 (xtensa_arch_setup, xtensa_regs_info): New functions.
7809 (the_low_target): Adjust.
7810 (initialize_low_arch): New function.
7811 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7812 (nios2_arch_setup): Set the current process'es tdesc.
7813 (target_regsets): Rename to ...
7814 (nios2_regsets): ... this.
7815 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7816 (nios2_regs_info): New function.
7817 (the_low_target): Adjust.
7818 (initialize_low_arch): New function.
7819 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7820 (aarch64_arch_setup): Set the current process'es tdesc.
7821 (target_regsets): Rename to ...
7822 (aarch64_regsets): ... this.
7823 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7824 (aarch64_regs_info): New function.
7825 (the_low_target): Adjust.
7826 (initialize_low_arch): New function.
7827 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7829 (target_regsets): Rename to ...
7830 (tile_regsets): ... this.
7831 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7832 (tile_regs_info): New function.
7833 (tile_arch_setup): Set the current process'es tdesc.
7834 (the_low_target): Adjust.
7835 (initialize_low_arch): New function.
7836 * spu-low.c (tdesc_spu): Declare.
7837 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7838 * win32-arm-low.c (tdesc_arm): Declare.
7839 (arm_arch_setup): New function.
7840 (the_low_target): Install arm_arch_setup instead of
7842 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7843 (init_windows_x86): Rename to ...
7844 (i386_arch_setup): ... this. Set `win32_tdesc'.
7845 (the_low_target): Adjust.
7846 * win32-low.c (win32_tdesc): New global.
7847 (child_add_thread): Don't create the thread cache here.
7848 (do_initial_child_stuff): Set the new process'es tdesc.
7849 * win32-low.h (struct target_desc): Forward declare.
7850 (win32_tdesc): Declare.
7851 * lynx-i386-low.c (tdesc_i386): Declare global.
7852 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7853 * lynx-low.c (lynx_tdesc): New global.
7854 (lynx_add_process): Set the new process'es tdesc.
7855 * lynx-low.h (struct target_desc): Forward declare.
7856 (lynx_tdesc): Declare global.
7857 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7858 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7859 * nto-low.c (nto_tdesc): New global.
7860 (do_attach): Set the new process'es tdesc.
7861 * nto-low.h (struct target_desc): Forward declare.
7862 (nto_tdesc): Declare.
7863 * nto-x86-low.c (tdesc_i386): Declare.
7864 (nto_x86_arch_setup): Set `nto_tdesc'.
7866 2013-06-04 Gary Benson <gbenson@redhat.com>
7868 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7869 to qSupported response when appropriate.
7870 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7871 with nonzero-length annex.
7872 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7873 arguments supplied in annex.
7875 2013-05-31 Doug Evans <dje@google.com>
7878 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7879 64 bits in 64-cross-32 environment.
7881 2013-05-28 Pedro Alves <palves@redhat.com>
7883 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7884 (aarch64-without-fpu.c): Delete rule.
7885 * configure.srv (aarch64*-*-linux*): Remove references to
7886 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7887 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7890 2013-05-24 Pedro Alves <palves@redhat.com>
7892 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7893 instead of strchr/decode_address. Error if the range isn't split
7894 with a ','. Don't assume there's be a ':' in the action.
7896 2013-05-23 Yao Qi <yao@codesourcery.com>
7897 Pedro Alves <palves@redhat.com>
7899 * linux-low.c (lwp_in_step_range): New function.
7900 (linux_wait_1): If the thread was range stepping and stopped
7901 outside the stepping range, report the stop to GDB. Otherwise,
7902 continue stepping. Add range stepping debug output.
7903 (linux_set_resume_request): Copy the step range from the resume
7905 (linux_supports_range_stepping): New.
7906 (linux_target_ops) <supports_range_stepping>: Set to
7907 linux_supports_range_stepping.
7908 * linux-low.h (struct linux_target_ops)
7909 <supports_range_stepping>: New field.
7910 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7911 * linux-x86-low.c (x86_supports_range_stepping): New.
7912 (the_low_target) <supports_range_stepping>: Set to
7913 x86_supports_range_stepping.
7914 * server.c (handle_v_cont): Handle 'r' action.
7915 (handle_v_requests): Append ";r" if the target supports range
7917 * target.h (struct thread_resume) <step_range_start,
7918 step_range_end>: New fields.
7919 (struct target_ops) <supports_range_stepping>:
7921 (target_supports_range_stepping): New macro.
7923 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7925 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7926 confusion in comment.
7928 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7930 * lynx-low.c (struct process_info_private): New type.
7931 (lynx_add_process): New function.
7932 (lynx_create_inferior, lynx_attach): Replace calls to
7933 add_process by calls to lynx_add_process.
7934 (lynx_resume): If PTID is null, then try using
7935 current_process()->private->last_wait_event_ptid.
7937 (lynx_clear_inferiors): Delete. The contents of that function
7938 has been inlined in lynx_mourn;
7939 (lynx_wait_1): Save the ptid in the process's private data.
7940 (lynx_mourn): Free the process' private data. Replace call
7941 to lynx_clear_inferiors by call to clear_inferiors.
7943 2013-05-17 Yao Qi <yao@codesourcery.com>
7945 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7948 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7950 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7951 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7952 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7953 PT_TEXT_END_ADDR guards. Update comments.
7954 (linux_target_op) <read_offsets>: Conditionally define to
7955 linux_read_offsets if the target is UCLIBC and if it defines
7956 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7958 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7959 Andrew Jenner <andrew@codesourcery.com>
7961 * Makefile.in (SFILES): Add linux-nios2-low.c.
7962 (clean): Add action to delete nios2-linux.c.
7963 (nios2-linux.c): New rule.
7964 * configure.srv: Add nios2*-*-linux*.
7965 * linux-nios2-low.c: New.
7967 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7969 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7971 2013-04-25 Hui Zhu <hui@codesourcery.com>
7974 * ax.c (ax_printf): Add fflush.
7976 2013-04-22 Tom Tromey <tromey@redhat.com>
7978 * Makefile.in (SFILES): Add filestuff.c.
7979 (OBS): Add filestuff.o.
7980 (filestuff.o): New target.
7981 * config.in, configure: Rebuild.
7982 * configure.ac: Check for fdwalk, pipe2.
7984 2013-04-17 Pedro Alves <palves@redhat.com>
7986 * configure.ac (USE_THREAD_DB): Delete variable.
7987 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7988 Don't AC_SUBST USE_THREAD_DB.
7989 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7990 * config.in, configure: Regenerate.
7992 2013-04-16 Pedro Alves <palves@redhat.com>
7994 * linux-low.h (struct lwp_info) <thread_known>: Move under
7995 the USE_THREAD_DB #ifdef.
7997 2013-04-16 Pedro Alves <palves@redhat.com>
7999 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8000 (linux-low.o): Delete rule.
8001 * linux-low.h: Always include "gdb_thread_db.h" instead of
8002 conditionally including thread_db.h.
8003 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8006 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8008 * Makefile.in (install-only): Fix make install regression.
8010 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8012 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8013 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8015 * gdbserver.1: Remove.
8017 2013-03-22 Pedro Alves <palves@redhat.com>
8019 * linux-low.c (handle_extended_wait): Don't call
8020 linux_enable_event_reporting.
8022 2013-03-15 Tony Theodore <tonyt@logyst.com>
8025 * Makefile.in (SHELL): Use @SHELL@.
8027 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8029 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8032 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8034 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8035 Remove extraneous NULL element.
8037 2013-03-13 Yao Qi <yao@codesourcery.com>
8039 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8040 'V' block in trace frame.
8042 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8044 * target.h (struct target_ops): Add btrace ops.
8045 (target_supports_btrace): New macro.
8046 (target_enable_btrace): New macro.
8047 (target_disable_btrace): New macro.
8048 (target_read_btrace): New macro.
8049 * gdbthread.h (struct thread_info): Add btrace field.
8050 * server.c: Include btrace-common.h.
8051 (handle_btrace_general_set): New function.
8052 (handle_btrace_enable): New function.
8053 (handle_btrace_disable): New function.
8054 (handle_general_set): Call handle_btrace_general_set.
8055 (handle_qxfer_btrace): New function.
8056 (struct qxfer qxfer_packets[]): Add btrace entry.
8057 * inferiors.c (remove_thread): Disable btrace.
8058 * linux-low: Include linux-btrace.h.
8059 (linux_low_enable_btrace): New function.
8060 (linux_low_read_btrace): New function.
8061 (linux_target_ops): Add btrace ops.
8062 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8063 Add srv_linux_btrace=yes.
8064 (x86_64-*-linux*): Add linux-btrace.o.
8065 Add srv_linux_btrace=yes.
8066 * configure.ac: Define HAVE_LINUX_BTRACE.
8067 * config.in: Regenerated.
8068 * configure: Regenerated.
8070 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8072 * server.c (handle_qxfer): Preserve error message if -3 is
8074 (qxfer): Document the -3 return value.
8076 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8078 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8079 (linux_btrace_h): New variable.
8080 (linux-btrace.o): New rule.
8082 2013-03-08 Stan Shebs <stan@codesourcery.com>
8083 Hafiz Abid Qadeer <abidh@codesourcery.com>
8085 * tracepoint.c (trace_buffer_size): New global.
8086 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8087 (init_trace_buffer): Change to one-argument function. Allocate
8088 trace buffer memory.
8089 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8090 handle QTBuffer:size packet.
8091 (cmd_bigqtbuffer_size): New function.
8092 (initialize_tracepoint): Call init_trace_buffer with
8093 DEFAULT_TRACE_BUFFER_SIZE.
8094 * server.c (handle_query): Add QTBuffer:size in the
8097 2013-03-07 Yao Qi <yao@codesourcery.com>
8099 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8100 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8102 (cmd_qtsp): Adjust condition. Do post increment.
8103 Set cur_action and cur_step_action back to 0.
8105 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8108 * linux-low.c (linux_write_memory): Return early success if LEN is
8111 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8113 * configure.srv: Add x86_64-*-cygwin* as target.
8115 2013-02-28 Tom Tromey <tromey@redhat.com>
8117 * configure.ac: Invoke AC_SYS_LARGEFILE.
8118 * configure, config.in: Rebuild.
8120 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8122 * win32-low.c: Throughout, fix format strings and casts of
8123 printf-like functions to avoid type related warnings on all
8125 (get_child_debug_event): Print dwDebugEventCode as hex since
8126 that's how it's usually documented.
8128 2013-02-28 Yao Qi <yao@codesourcery.com>
8130 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8133 2013-02-27 Jiong Wang <jiwang@tilera.com>
8135 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8136 (reg-tilegx32.c): New rule.
8137 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8138 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8139 different register info initializer according to elf class.
8140 (init_registers_tilgx32): New function. The tilegx32 register info
8142 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8143 (tile_store_gregset): Likewise.
8145 2013-02-27 Yao Qi <yao@codesourcery.com>
8147 * server.c (process_point_options): Print debug message when
8148 debug_threads is true.
8150 2013-02-26 Yao Qi <yao@codesourcery.com>
8152 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8154 2013-02-19 Pedro Alves <palves@redhat.com>
8155 Kai Tietz <ktietz@redhat.com>
8159 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8160 instead of strtoul to extract address from packet.
8161 (process_serial_event) <'z'>: Likewise.
8163 2013-02-18 Yao Qi <yao@codesourcery.com>
8165 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8167 2013-02-14 Pedro Alves <palves@redhat.com>
8171 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8172 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8174 2013-02-14 Pedro Alves <palves@redhat.com>
8176 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8178 2013-02-14 Pedro Alves <palves@redhat.com>
8180 * tracepoint.c (save_string): Delete.
8181 (add_tracepoint_action): Use savestring instead of save_string.
8183 2013-02-12 Pedro Alves <palves@redhat.com>
8185 * linux-xtensa-low.c: Ditto.
8186 * xtensa-xtregs.c: Ditto.
8188 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8190 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8193 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8195 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8196 aarch64_num_wp_regs and aarch64_num_bp_regs to
8197 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8199 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8201 * linux-aarch64-low.c (ps_get_thread_area): Replace
8202 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8204 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8205 Marcus Shawcroft <marcus.shawcroft@arm.com>
8206 Nigel Stephens <nigel.stephens@arm.com>
8207 Yufeng Zhang <yufeng.zhang@arm.com>
8209 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8210 (aarch64.c, aarch64-without-fpu.c): New targets.
8211 * configure.srv (aarch64*-*-linux*): New.
8212 * linux-aarch64-low.c: New file.
8214 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8216 * linux-low.c (handle_extended_wait, linux_create_inferior)
8217 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8218 (dequeue_one_deferred_signal, linux_resume_one_thread)
8219 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8220 (linux_tracefork_grandchild, linux_test_for_tracefork)
8221 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8222 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8223 where the argument is 0.
8225 2013-01-25 Yao Qi <yao@codesourcery.com>
8227 * event-loop.c: Include "queue.h".
8228 (gdb_event_p): New typedef.
8229 (struct gdb_event) <next_event>: Remove.
8230 (event_queue): Change to QUEUE(gdb_event_p).
8231 (async_queue_event): Remove.
8232 (gdb_event_xfree): New.
8233 (initialize_event_loop): New.
8234 (process_event): Use API from QUEUE.
8235 (wait_for_event): Likewise.
8236 * server.c (main): Call initialize_event_loop.
8237 * server.h (initialize_event_loop): Declare.
8239 2013-01-18 Yao Qi <yao@codesourcery.com>
8241 * ax.h (struct eval_agent_expr_context): New.
8242 (gdb_eval_agent_expr): Update declaration.
8243 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8244 TFRAME. Add new argument CTX.
8245 * server.h (struct eval_agent_expr_context): Declare.
8246 (agent_mem_read, agent_tsv_read): Update declaration.
8247 (agent_mem_read_string): Likewise.
8248 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8249 (add_traceframe_block): Add new argument TPOINT.
8250 Increase TPOINT->traceframe_usage.
8251 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8252 eval_tracepoint_agent_expr.
8253 (condition_true_at_tracepoint): Likewise.
8254 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8255 (agent_mem_read_string, agent_tsv_read): Likewise.
8257 2013-01-16 Yao Qi <yao@codesourcery.com>
8259 * linux-low.c (linux_resume_one_lwp): Don't check
8260 'lwp->bp_reinsert != 0'.
8262 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8263 Pedro Alves <palves@redhat.com>
8265 * lynx-low.c (ptrace_request_to_str): Define a temporary
8266 macro and use it to simplify this function's implementation.
8268 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8270 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8273 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8275 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8277 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8279 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8281 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8283 * lynx-low.c (lynx_resume): Use the resume_info parameter
8284 to determine the ptid for the lynx_ptrace call, unless
8285 it is equal to minus_one_ptid, in which case we use the
8286 ptid of the current_inferior.
8287 (lynx_wait_1): After having received a thread create/exit
8288 event, resume the inferior's execution using the signaling
8289 thread's ptid, rather than the old ptid.
8291 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8293 * lynx-low.c (lynx_resume): Delete variable ret.
8295 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8297 * gdbreplay.c (gdbreplay_version): Update copyright year.
8298 * server.c (gdbserver_version): Likewise.
8300 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8302 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8305 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8307 * lynx-low.c (ptrace_request_to_str): Add handling for
8310 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8312 * lynx-low.c (lynx_attach): Delete variable new_process.
8314 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8316 * lynx-low.c (lynx_create_inferior): Delete variable
8319 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8321 * lynx-low.c (ptrace_request_to_str): Do not handle
8322 PTRACE_GETTHREADLIST if this macro does not exist.
8324 2012-12-15 Yao Qi <yao@codesourcery.com>
8326 * Makefile.in (OBS): Add notif.o.
8327 * notif.c, notif.h: New.
8328 * server.c: Include "notif.h".
8329 (struct vstop_notif) <next>: Remove.
8331 (queue_stop_reply): Update.
8332 (push_event, send_next_stop_reply): Remove.
8333 (discard_queued_stop_replies): Update.
8334 (notif_stop): New variable.
8335 (handle_v_stopped): Remove.
8336 (handle_v_requests): Don't call handle_v_stopped. Call
8337 handle_ack_notif instead.
8338 (queue_stop_reply_callback): Call notif_event_enque instead
8339 of queue_stop_reply.
8340 (handle_status): Don't call send_next_stop_reply, call
8341 notif_write_event instead.
8342 (kill_inferior_callback): Likewise.
8343 (detach_or_kill_inferior_callback): Likewise.
8344 (main): Call initialize_notif.
8345 (process_serial_event): Call QUEUE_is_empty.
8346 (handle_target_event): Call notif_push instead of push event.
8347 * server.h (push_event): Remove declaration.
8349 2012-12-10 Tom Tromey <tromey@redhat.com>
8351 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8352 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8355 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8356 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8357 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8358 (amd64-linux-ipa.o, ax.o): Rewrite.
8359 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8360 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8361 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8362 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8363 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8364 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8365 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8366 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8367 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8368 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8369 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8370 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8371 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8372 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8373 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8374 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8375 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8376 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8377 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8378 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8379 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8380 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8381 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8382 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8383 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8384 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8385 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8386 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8387 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8388 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8389 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8390 (reg-tilegx.o): Remove.
8391 (all_object_files): New macro.
8392 Include .deps files.
8393 * aclocal.m4, configure: Rebuild.
8394 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8395 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8396 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8398 2012-12-05 Tom Tromey <tromey@redhat.com>
8401 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8403 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8405 * configure.ac: Check for linux/perf_event.h.
8406 * config.in: Regenerated.
8407 * configure: Regenerated.
8409 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8411 * hostio.c (handle_readlink): Decrease buffer size
8412 parameter passed to readlink by one byte.
8414 2012-11-26 Yao Qi <yao@codesourcery.com>
8416 * configure.ac (build_warnings): Append '-Wempty-body'.
8417 * configure: Regenerated.
8418 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8421 2012-11-15 Pierre Muller <muller@sourceware.org>
8423 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8424 * config.in: Regenerate.
8425 * configure: Regenerate.
8426 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8427 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8428 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8429 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8431 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8432 instead of <sys/wait.h> header.
8433 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8435 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8437 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8438 (various make rules): Remove -DGDBSERVER
8440 2012-11-09 Yao Qi <yao@codesourcery.com>
8442 * spu-low.c (current_ptid): Move it to ..
8443 * gdbthread.h: ... here. New.
8444 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8445 * server.c (myresume, process_serial_event): Likewise.
8446 * thread-db.c (thread_db_find_new_threads): Likewise.
8447 * tracepoint.c (run_inferior_command): Likewise.
8449 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8451 * server.c (handle_search_memory_1): Include access length in
8454 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8456 * linux-crisv32-low.c: Fix compile errors.
8458 2012-09-04 Yao Qi <yao@codesourcery.com>
8460 * tracepoint.c (cmd_qtsv): Adjust debug message.
8461 Don't check CUR_TPOINT.
8463 2012-08-28 Yao Qi <yao@codesourcery.com>
8465 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8466 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8467 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8468 Remove declarations of xmalloc, xreallloc, xstrdup and
8470 * Makefile.in (libiberty_h): New.
8471 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8472 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8474 2012-08-23 Yao Qi <yao@codesourcery.com>
8476 * server.h: Remove declaration of 'xsnprintf'.
8478 2012-08-22 Keith Seitz <keiths@redhat.com>
8480 * server.h: Include build-gnulib-gbserver/config.h.
8481 * gdbreplay.c: Likewise.
8483 2012-08-08 Doug Evans <dje@google.com>
8485 * Makefile.in (SFILES): Add gdb_vecs.c.
8486 (OBS): Add gdb_vecs.o.
8487 (gdb_vecs_h, host_defs_h): New variables.
8488 (thread-db.o): Add $(gdb_vecs_h) dependency.
8489 (gdb_vecs.o): New rule.
8490 * thread-db.c: #include "gdb_vecs.h".
8491 (thread_db_load_search): Use a vector to iterate over path elements.
8492 Handle text appearing after "$pdir".
8494 * configure.ac: Add check for strstr.
8495 * config.in: Regenerate.
8496 * configure: Regenerate.
8498 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8500 * hostio.c (handle_pread): If pread fails, fall back to attempting
8502 (handle_pwrite): Likewise for pwrite.
8504 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8506 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8507 between unsupported TYPE and unimplementable ADDR/LEN combination.
8508 (arm_insert_point): Act on new return value.
8510 2012-07-31 Pedro Alves <palves@redhat.com>
8512 * server.c (process_point_options): Only skip tokens if we find
8513 one that is unrecognized. Don't treat 'X' specially while
8514 skipping unrecognized tokens.
8516 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8518 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8519 to 4-byte-align HW breakpoint addresses for Thumb.
8521 2012-07-27 Yao Qi <yao@codesourcery.com>
8525 * server.h: Declare gdb_agent_about_to_close.
8526 * target.c (kill_inferior): Include "agent.h".
8527 New. Send command 'kill'.
8528 * target.h (kill_inferior): Removed macro.
8529 * tracepoint.c (gdb_agent_about_to_close): New.
8530 (gdb_agent_helper_thread): Handle command 'close'.
8531 Wait endlessly until the inferior stops.
8532 Install gdb_agent_remove_socket to atexit hook.
8533 (agent_socket_name): New static variable.
8534 (gdb_agent_socket_init): Replace local variable 'name' with
8535 'agent_socket_name'.
8536 (gdb_agent_remove_socket): New.
8538 2012-07-27 Yao Qi <yao@codesourcery.com>
8540 * server.c (process_point_options): Stop at 'X' when parsing.
8542 2012-07-19 Michael Eager <eager@eagercon.com>
8544 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8546 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8547 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8548 hardware breakpoint.
8550 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8552 * gdbserver/linux-low.c (initialize_low): Call
8553 linux_ptrace_init_warnings.
8555 2012-07-02 Doug Evans <dje@google.com>
8557 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8560 2012-07-02 Stan Shebs <stan@codesourcery.com>
8562 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8563 (ax.o): Add it to build rule.
8565 (OBS): Add format.o.
8566 (IPA_OBS): Add format.o.
8567 * server.c (handle_query): Claim support for breakpoint commands.
8568 (process_point_options): Add command case.
8569 (process_serial_event): Leave running if there are printfs in
8571 * mem-break.h (any_persistent_commands): Declare.
8572 (add_breakpoint_commands): Declare.
8573 (gdb_no_commands_at_breakpoint): Declare.
8574 (run_breakpoint_commands): Declare.
8575 * mem-break.c (struct point_command_list): New struct.
8576 (struct breakpoint): New field command_list.
8577 (any_persistent_commands): New function.
8578 (add_commands_to_breakpoint): New function.
8579 (add_breakpoint_commands): New function.
8580 (gdb_no_commands_at_breakpoint): New function.
8581 (run_breakpoint_commands): New function.
8582 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8584 * ax.c: Include format.h.
8585 (ax_printf): New function.
8586 (gdb_eval_agent_expr): Add printf opcode.
8588 2012-06-13 Yao Qi <yao@codesourcery.com>
8590 * server.c (start_inferior): Remove duplicated writes to fields
8591 'last_resume_kind' and 'last_status' of 'current_inferior'.
8593 2012-06-12 Yao Qi <yao@codesourcery.com>
8594 Pedro Alves <palves@redhat.com>
8596 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8598 * server.c (handle_v_cont): Extend comment.
8600 2012-06-11 Yao Qi <yao@codesourcery.com>
8602 * linux-low.c (linux_attach): Add 'static'.
8604 2012-06-06 Yao Qi <yao@codesourcery.com>
8606 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8608 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8610 Fix gcc -flto compilation warning.
8611 * server.c (main): Make variable multi_mode and attach volatile.
8613 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8615 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8616 if the platform doesn't know about it.
8618 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8620 * Makefile.in (SFILES): Add linux-tile-low.c.
8621 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8622 * configure.srv: Handle tilegx-*-linux*.
8623 * linux-tile-low.c: New file.
8625 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8627 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8629 2012-05-24 Pedro Alves <palves@redhat.com>
8633 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8635 2012-05-24 Pedro Alves <palves@redhat.com>
8639 Replace target_signal with gdb_signal throughout.
8641 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8643 * linux-low.c (linux_store_registers): Avoid the copying sequence
8644 when no data has been retrieved by ptrace.
8646 2012-05-22 Will Deacon <will.deacon@arm.com>
8648 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8649 Include asm/ptrace.h.
8650 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8653 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8655 * linux-low.c (linux_store_registers): Don't re-retrieve data
8656 with ptrace that has already been obtained from /proc. Always
8657 copy any data retrieved with ptrace to the buffer supplied.
8659 2012-05-11 Yao Qi <yao@codesourcery.com>
8660 Pedro Alves <palves@redhat.com>
8662 * linux-low.c (enum stopping_threads_kind): New.
8663 (stopping_threads): Change type to `enum stopping_threads_kind'.
8664 (handle_extended_wait): If stopping and suspending threads, leave
8665 the new_lwp suspended too.
8666 (linux_wait_for_event): Adjust.
8667 (stop_all_lwps): Set `stopping_threads' to
8668 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8669 whether we're suspending threads or just stopping them. Assert no
8672 2012-04-29 Yao Qi <yao@codesourcery.com>
8674 * server.h: Move some code to ...
8675 * gdbthread.h: ... here. New.
8676 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8677 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8678 (nto-low.o, win32-low.o): Likewise.
8679 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8680 * regcache.c, remote-utils.c, server.c: Likewise.
8681 * target.c, tracepoint.c, win32-low.c: Likewise.
8683 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8685 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8686 (PTRACE_ARG4_TYPE): Likewise.
8687 (PTRACE_XFER_TYPE): Likewise.
8688 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8689 ptrace to PTRACE_ARG3_TYPE.
8690 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8691 (PTRACE_ARG4_TYPE): Likewise.
8692 (PTRACE_XFER_TYPE): Likewise.
8693 (linux_detach_one_lwp): Cast fourth argument of
8694 ptrace to long then PTRACE_ARG4_TYPE.
8695 (regsets_fetch_inferior_registers): Cast third argument of
8696 ptrace to long then PTRACE_ARG3_TYPE.
8697 (regsets_store_inferior_registers): Likewise.
8699 2012-04-20 Pedro Alves <palves@redhat.com>
8701 * configure: Regenerate.
8703 2012-04-19 Pedro Alves <palves@redhat.com>
8705 * Makefile.in (GNULIB_BUILDDIR): New.
8706 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8707 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8708 (all, install-only, uninstall, clean-info, all-lib, clean): No
8709 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8710 (maintainer-clean realclean distclean): Use subdir_do.
8712 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8713 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8714 * acinclude.m4: Include acx_configure_dir.m4.
8715 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8716 calls. Call AC_PROG_RANLIB. Configure gnulib using
8719 (GNULIB_STDINT_H): Adjust.
8720 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8721 * gdbreplay.c: Include build-gnulib/config.h.
8722 * server.h: Likewise.
8723 * aclocal.m4: Regenerate.
8724 * config.in: Regenerate.
8725 * configure: Regenerate.
8727 2012-04-19 Pedro Alves <palves@redhat.com>
8729 * Makefile.in (LIBGNU, INCGNU): Adjust.
8730 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8731 (all, install-only, uninstall, clean-info, all-lib, clean)
8732 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8733 * configure.ac: Adjust AC_OUTPUT output.
8734 * aclocal.m4: Regenerate.
8735 * configure: Regenerate.
8737 2012-04-19 Pedro Alves <palves@redhat.com>
8739 * Makefile.in (generated_files): New.
8740 (server_h): Remove the explicit dependency on config.h, and depend
8741 on $generated_files.
8743 2012-04-19 Pedro Alves <palves@redhat.com>
8745 * Makefile.in (INCGNU): Add -Ignulib.
8747 2012-04-19 Pedro Alves <palves@redhat.com>
8749 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8750 (INCGNU): ... this, and spell out -I here.
8751 (GNULIB_LIB): Rename to ...
8753 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8755 2012-04-19 Pedro Alves <palves@redhat.com>
8757 * config.in: Regenerate.
8759 2012-04-19 Pedro Alves <palves@redhat.com>
8761 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8762 * server.h (memmem): Remove declaration.
8763 * config.in: Regenerate.
8764 * configure: Regenerate.
8766 2012-04-19 Yao Qi <yao@codesourcery.com>
8768 * Makefile.in (SFILES): Add common/vec.c.
8772 2012-04-19 Yao Qi <yao@codesourcery.com>
8774 * remote-utils.c (prepare_resume_reply): Replace with macro
8775 target_core_of_thread.
8776 * server.c (handle_qxfer_threads_proper): Likewise.
8777 * target.h (traget_core_of_thread): New macro.
8779 2012-04-18 Pedro Alves <palves@redhat.com>
8781 * aclocal.m4: Regenerate.
8782 * configure: Regenerate.
8784 2012-04-16 Yao Qi <yao@codesourcery.com>
8786 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8787 duplicated on address.
8789 2012-04-16 Yao Qi <yao@codesourcery.com>
8791 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8792 (struct tracepoint_action_ops) <send>: New field.
8793 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8794 (agent_expr_send, x_tracepoint_action_send): New.
8795 (l_tracepoint_action_send): New.
8796 (cmd_qtdp): Download and install tracepoint
8797 according to `use_agent'.
8798 (run_inferior_command): Add one more parameter `len'.
8800 (tracepoint_send_agent): New.
8801 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8803 2012-04-16 Yao Qi <yao@codesourcery.com>
8805 * tracepoint.c (download_tracepoints): Moved to ...
8806 (cmd_qtstart): ... here.
8808 2012-04-14 Yao Qi <yao@codesourcery.com>
8810 * tracepoint.c: Include inttypes.h.
8811 (struct collect_memory_action): Use sized types.
8812 (struct tracepoint): Likewise.
8813 (cmd_qtdp, stop_tracing): Update print specifiers.
8814 (cmd_qtp, response_tracepoint): Likewise.
8815 (collect_data_at_tracepoint): Likewise.
8816 (collect_data_at_step): Likewise.
8818 2012-04-14 Yao Qi <yao@codesourcery.com>
8820 Import gnulib module inttypes.
8821 * aclocal.m4, config.in, configure: Regenerated.
8823 2012-04-14 Yao Qi <yao@codesourcery.com>
8825 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8826 Makefile and config.status at last.
8828 2012-04-13 Yao Qi <yao@codesourcery.com>
8830 * tracepoint.c: Include stdint.h unconditionally.
8832 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8834 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8835 on BFD_HAVE_SYS_PROCFS_TYPE.
8836 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8837 * configure: Regenerate.
8838 * config.in: Likewise.
8840 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8842 * Makefile.in (clean): Also remove x32.c x32-linux.c
8843 x32-avx.c x32-avx-linux.c.
8844 (x32.o): New target.
8846 (x32-linux.o): Likewise.
8847 (x32-linux.c): Likewise.
8848 (x32-avx.o): Likewise.
8849 (x32-avx.c): Likewise.
8850 (x32-avx-linux.o): Likewise.
8851 (x32-avx-linux.c): Likewise.
8853 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8854 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8855 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8856 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8857 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8858 i386/x32-avx-linux.xml.
8860 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8861 (init_registers_x32_avx_linux): Likwise.
8862 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8863 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8865 2012-04-13 Pedro Alves <palves@redhat.com>
8867 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8868 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8869 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8870 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8873 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8875 * linux-x86-low.c (compat_x32_clock_t): New.
8876 (compat_x32_siginfo_t): Likewise.
8877 (compat_x32_siginfo_from_siginfo): Likewise.
8878 (siginfo_from_compat_x32_siginfo): Likewise.
8879 (linux_is_elf64): Likewise.
8880 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8881 and siginfo_from_compat_x32_siginfo for x32.
8882 (x86_arch_setup): Set linux_is_elf64.
8884 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8887 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8889 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8890 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8891 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8892 compatible with process.
8894 2012-04-12 Yao Qi <yao@codesourcery.com>
8896 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8897 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8898 (install-only, install-info, clean): Handle sub dir gnulib.
8899 (all-lib, am--refresh): New targets.
8900 (memmem.o): Remove target.
8901 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8902 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8903 (AC_REPLACE_FUNCS): Remove memmem.
8904 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8905 (AC_OUTPUT): Generate Makefile in gnulib/.
8906 * aclocal.m4, config.in, configure: Regenerated.
8908 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8910 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8912 2012-04-05 Pedro Alves <palves@redhat.com>
8914 -Werror=strict-aliasing
8916 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8919 2012-04-04 Pedro Alves <palves@redhat.com>
8921 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8922 (sparc_store_gregset_from_stack, sparc_store_gregset)
8923 (sparc_breakpoint_at): Fix formatting.
8925 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8927 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8929 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8930 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8931 * config.in: Regenerate.
8932 * configure: Likewise.
8934 2012-03-29 Pedro Alves <palves@redhat.com>
8936 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8937 Correct ptrace arguments.
8939 2012-03-28 Pedro Alves <palves@redhat.com>
8941 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8942 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8943 (IA64_FR1_REGNUM): New defines.
8944 (ia64_fetch_register): New.
8945 (the_low_target): Install it.
8946 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8948 * linux-low.c (linux_fetch_registers): Try the
8949 the_low_target.fetch_register hook first.
8951 * linux-arm-low.c (the_low_target): Adjust.
8952 * linux-bfin-low.c (the_low_target): Adjust.
8953 * linux-cris-low.c (the_low_target): Adjust.
8954 * linux-crisv32-low.c (the_low_target): Adjust.
8955 * linux-m32r-low.c (the_low_target): Adjust.
8956 * linux-m68k-low.c (the_low_target): Adjust.
8957 * linux-mips-low.c (the_low_target): Adjust.
8958 * linux-ppc-low.c (the_low_target): Adjust.
8959 * linux-s390-low.c (the_low_target): Adjust.
8960 * linux-sh-low.c (the_low_target): Adjust.
8961 * linux-sparc-low.c (the_low_target): Adjust.
8962 * linux-tic6x-low.c (the_low_target): Adjust.
8963 * linux-x86-low.c (the_low_target): Adjust.
8964 * linux-xtensa-low.c (the_low_target): Adjust.
8966 2012-03-26 Pedro Alves <palves@redhat.com>
8968 * server.c (handle_qxfer_libraries): Don't bail early if
8969 the_target->qxfer_libraries_svr4 is not NULL.
8971 2012-03-26 Pedro Alves <palves@redhat.com>
8973 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8975 2012-03-23 Pedro Alves <palves@redhat.com>
8977 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8978 "library-list-svr4" element's start tag when the the DSO list is
8981 2012-03-23 Pedro Alves <palves@redhat.com>
8983 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8984 a variable whose type size is the same as the inferior's pointer
8987 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8989 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8991 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8992 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8993 * linux-low.h: Include <signal.h>.
8994 (struct siginfo): Remove forward declaration.
8995 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8998 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9000 * .gitignore: Ignore more files.
9002 2012-03-19 Pedro Alves <palves@redhat.com>
9003 Jan Kratochvil <jan.kratochvil@redhat.com>
9005 * server.c (cont_thread, general_thread): Add describing comments.
9006 (start_inferior): Clear `cont_thread'.
9007 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9010 2012-03-15 Yao Qi <yao@codesourcery.com>
9012 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9014 (cmd_qtdp): ... here.
9016 2012-03-15 Yao Qi <yao@codesourcery.com>
9018 * tracepoint.c (struct tracepoint_action_ops): New.
9019 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9020 (m_tracepoint_action_download): New.
9021 (r_tracepoint_action_download): New.
9022 (x_tracepoint_action_download): New.
9023 (l_tracepoint_action_download): New.
9024 (add_tracepoint_action): Install `action->ops' according type.
9025 (download_tracepoint_1): Move code `download' function pointer
9026 of various tracepoint_action_ops.
9028 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9030 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9031 linux_ptrace_attach_warnings.
9033 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9035 * Makefile.in (linux-ptrace.o): New.
9036 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9037 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9038 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9039 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9040 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9042 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9044 2012-03-08 Yao Qi <yao@codesourcery.com>
9045 Pedro Alves <palves@redhat.com>
9047 Fix PR server/13392.
9048 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9050 * tracepoint.c (remove_tracepoint): New.
9051 (cmd_qtdp): Call remove_tracepoint when failed to install.
9053 2012-03-07 Pedro Alves <palves@redhat.com>
9055 * linux-low.c (get_detach_signal): New.
9056 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9057 Pass on pending signals to PTRACE_DETACH. Check the result of the
9059 * server.c (program_signals, program_signals_p): New.
9060 (handle_general_set): Handle QProgramSignals.
9061 * server.h (program_signals, program_signals_p): Declare.
9063 2012-03-05 Pedro Alves <palves@redhat.com>
9064 Jan Kratochvil <jan.kratochvil@redhat.com>
9066 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9069 2012-03-03 Yao Qi <yao@codesourcery.com>
9071 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9072 agent_look_up_symbols.
9074 2012-03-03 Yao Qi <yao@codesourcery.com>
9076 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9077 (linux-x86-low.o): Likewise.
9078 * server.h: Remove in_process_agent_loaded.
9079 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9083 2012-03-03 Yao Qi <yao@codesourcery.com>
9085 * tracepoint.c (gdb_agent_capability): New global.
9086 (in_process_agent_loaded_ust): Renamed to
9087 `in_process_agent_supports_ust'.
9089 (in_process_agent_supports_ust): Call agent_capability_check.
9090 (clear_installed_tracepoints): Assert that agent supports
9093 2012-03-03 Yao Qi <yao@codesourcery.com>
9095 * linux-low.c (linux_supports_agent): New.
9096 (linux_target_ops): Initialize field `supports_agent' with
9097 linux_supports_agent.
9098 * target.h (struct target_ops) <supports_agent>: New.
9099 (target_supports_agent): New macro.
9100 * server.c (handle_general_set): Handle packet 'QAgent'.
9101 (handle_query): Send `QAgent+'.
9102 * Makefile.in (server.o): Depends on agent.h.
9104 2012-03-03 Yao Qi <yao@codesourcery.com>
9106 * Makefile.in (OBS): Add agent.o.
9107 Add new rule for agent.o.
9108 Track dependence of tracepoint.c on agent.h.
9109 * tracepoint.c (run_inferior_command_1):
9110 (run_inferior_command): Call agent_run_command.
9111 (gdb_ust_connect_sync_socket): Deleted. Move it to
9113 (resume_thread, stop_thread): Likewise.
9114 (gdb_ust_socket_init): Renamed to ...
9115 (gdb_agent_socket_init): ... New.
9116 (gdb_ust_thread): Renamed to ...
9117 (gdb_agent_helper_thread): ... New.
9118 (gdb_ust_init): Move some code to ...
9119 (gdb_agent_init): ... here. New.
9120 [HAVE_UST]: Call gdb_ust_init.
9121 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9122 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9123 * config.in, configure: Regenerated.
9125 2012-03-02 Pedro Alves <palves@redhat.com>
9127 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9128 * linux-low.c (struct simple_pid_list): New.
9129 (stopped_pids): New a struct simple_pid_list pointer.
9130 (add_to_pid_list, pull_pid_from_list): New.
9131 (handle_extended_wait): Don't assume the first signal new children
9132 report is SIGSTOP. Adjust call to pull_pid_from_list.
9133 (linux_wait_for_lwp): Adjust.
9135 2012-03-02 Yao Qi <yao@codesourcery.com>
9137 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9140 2012-03-02 Yao Qi <yao@codesourcery.com>
9142 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9143 `stop_pc' and `tpoint'. Update caller.
9145 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9147 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9148 * linux-low.c (use_linux_regsets): New macro.
9149 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9150 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9151 (linux_register_in_regsets): New function.
9152 (usr_fetch_inferior_registers): Skip registers covered by
9154 (usr_store_inferior_registers): Likewise.
9155 (usr_fetch_inferior_registers): New macro.
9156 (usr_store_inferior_registers): Likewise.
9157 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9158 (linux_store_registers): Likewise.
9159 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9161 (init_registers_mips64_dsp_linux): Likewise.
9162 (init_registers_mips_linux): New macro.
9163 (init_registers_mips_dsp_linux): Likewise.
9164 (mips_dsp_num_regs): Likewise.
9165 (DSP_BASE, DSP_CONTROL): New fallback macros.
9166 (mips_base_regs): New macro.
9167 (mips_regmap): Use it. Fix the size.
9168 (mips_dsp_regmap): New variable.
9169 (mips_dsp_regset_bitmap): Likewise.
9170 (mips_arch_setup): New function.
9171 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9173 (mips_cannot_store_register): Likewise.
9174 (the_low_target): Update .arch_setup, .num_regs and .regmap
9175 initializers. Add .regset_bitmap initializer.
9176 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9178 * linux-bfin-low.c (the_low_target): Likewise.
9179 * linux-cris-low.c (the_low_target): Likewise.
9180 * linux-crisv32-low.c (the_low_target): Likewise.
9181 * linux-ia64-low.c (the_low_target): Likewise.
9182 * linux-m32r-low.c (the_low_target): Likewise.
9183 * linux-m68k-low.c (the_low_target): Likewise.
9184 * linux-ppc-low.c (the_low_target): Likewise.
9185 * linux-s390-low.c (the_low_target): Likewise.
9186 * linux-sh-low.c (the_low_target): Likewise.
9187 * linux-sparc-low.c (the_low_target): Likewise.
9188 * linux-tic6x-low.c (the_low_target): Likewise.
9189 * linux-x86-low.c (the_low_target): Likewise.
9190 * linux-xtensa-low.c (the_low_target): Likewise.
9191 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9192 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9193 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9195 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9196 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9198 2012-02-29 Yao Qi <yao@codesourcery.com>
9199 Pedro Alves <palves@redhat.com>
9201 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9202 `step_over_finished' is true.
9204 2012-02-27 Pedro Alves <palves@redhat.com>
9206 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9207 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9209 2012-02-27 Pedro Alves <palves@redhat.com>
9212 * linux-low.c (pid_is_stopped): New.
9213 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9215 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9217 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9220 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9222 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9224 2012-02-24 Luis Machado <lgustavo@codesourcery>
9226 * server.c (handle_query): Advertise support for target-side
9227 breakpoint condition evaluation.
9228 (process_point_options): New function.
9229 (process_serial_event): When inserting a breakpoint, check for
9230 a target-side condition that should be evaluated.
9232 * mem-break.c: Include regcache.h and ax.h.
9233 (point_cond_list_t): New data structure.
9234 (breakpoint) <cond_list>: New field.
9235 (find_gdb_breakpoint_at): Make non-static.
9236 (delete_gdb_breakpoint_at): Clear any target-side
9238 (clear_gdb_breakpoint_conditions): New function.
9239 (add_condition_to_breakpoint): Likewise.
9240 (add_breakpoint_condition): Likewise.
9241 (gdb_condition_true_at_breakpoint): Likewise.
9242 (gdb_breakpoint_here): Return result directly instead
9243 of going through a local variable.
9245 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9246 (clear_gdb_breakpoint_conditions): Likewise.
9247 (add_breakpoint_condition): Likewise.
9248 (gdb_condition_true_at_breakpoint): Likewise.
9250 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9251 (need_step_over_p): Take target-side breakpoint condition into
9254 2012-02-24 Luis Machado <lgustavo@codesourcery>
9256 * server.h: Include tracepoint.h.
9257 (agent_mem_read, agent_get_trace_state_variable_value,
9258 agent_set_trace_state_variable_value,
9259 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9260 get_set_tsv_func_addr): New prototypes.
9262 * ax.h: New include file.
9263 * ax.c: New source file.
9265 * tracepoint.c: Include ax.h.
9266 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9267 agent_expr, eval_result_type): Move to ax.h.
9268 (parse_agent_expr): Rename to ...
9269 (gdb_parse_agent_expr): ... this, make it non-static and move
9271 (unparse_agent_expr) Rename to ...
9272 (gdb_unparse_agent_expr): ... this, make it non-static and move
9274 (eval_agent_expr): Rename to ...
9275 (eval_tracepoint_agent_expr): ... this.
9276 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9277 forward declarations.
9278 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9279 (agent_get_trace_state_variable_value): New function.
9280 (agent_set_trace_state_variable_value): New function.
9281 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9282 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9283 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9284 (condition_true_at_tracepoint): Likewise.
9285 (parse_agent_expr): Rename to ...
9286 (gdb_parse_agent_expr): ... this and move to ax.c.
9287 (unparse_agent_expr): Rename to ...
9288 (gdb_unparse_agent_expr): ... this and move to ax.c.
9289 (gdb_agent_op_name): Move to ax.c.
9290 (eval_agent_expr): Rename to ...
9291 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9293 (eval_tracepoint_agent_expr): New function.
9294 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9296 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9298 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9299 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9300 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9301 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9302 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9303 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9304 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9305 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9306 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9307 (compile_bytecodes): Remove forward declaration.
9308 (is_goto_target): Move to ax.c.
9309 (compile_bytecodes): Move to ax.c and call
9310 agent_get_trace_state_variable_value (...) and
9311 agent_set_trace_state_variable_value (...).
9313 * Makefile.in: Update ax.c and IPA dependencies.
9315 2012-02-24 Pedro Alves <palves@redhat.com>
9317 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9318 (cmd_bigqtbuffer_circular): ... this. Only handle
9319 'QTBuffer:circular:'.
9320 (handle_tracepoint_general_set): Adjust.
9322 2012-02-16 Yao Qi <yao@codesourcery.com>
9324 * inferiors.c: Move code to ...
9325 * dll.c: .... here. New.
9326 * server.h: Declare clear_dlls.
9327 * Makefile.in (SFILES): Add dll.c.
9331 2012-02-11 Yao Qi <yao@codesourcery.com>
9333 * server.c: (handle_monitor_command): Add a new parameter
9335 (handle_query): Update caller.
9337 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9339 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9340 * configure, config.in: Regenerate.
9341 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9344 2012-02-02 Pedro Alves <palves@redhat.com>
9346 Try SIGKILL first, then PTRACE_KILL.
9347 * linux-low.c (linux_kill_one_lwp): New.
9348 (linux_kill_one_lwp): Rename to ...
9349 (kill_one_lwp_callback): ... this. Use the new
9352 2012-02-02 Pedro Alves <palves@redhat.com>
9354 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9357 2012-01-27 Pedro Alves <palves@redhat.com>
9359 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9360 (elf_64_file_p): Make static.
9361 (linux_pid_exe_is_elf_64_file): New.
9362 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9363 Delete declarations.
9364 (linux_pid_exe_is_elf_64_file): Declare.
9365 * linux-x86-low.c (x86_arch_setup): Use
9366 linux_pid_exe_is_elf_64_file.
9368 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9370 * linux-low.c (linux_wait_for_event_1): Rename to ...
9371 (linux_wait_for_event): ... here and merge it with former
9372 linux_wait_for_event - new variable wait_ptid, use it.
9373 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9375 2012-01-23 Pedro Alves <palves@redhat.com>
9377 * server.c (main): Avoid yet another case of infinite loop while
9378 detaching/killing after a longjmp.
9380 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9383 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9385 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9387 * hostio.c (handle_readlink): New function.
9388 (handle_vFile): Call it to handle "vFile:readlink" packets.
9390 2012-01-20 Pedro Alves <palves@redhat.com>
9391 Ulrich Weigand <ulrich.weigand@linaro.org>
9393 * server.c (handle_v_requests): Only support vAttach and vRun to
9394 start multiple processes when in extended protocol mode.
9396 2012-01-17 Pedro Alves <palves@redhat.com>
9398 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9399 memalign plus mprotect to allocate the scratch buffer.
9401 2012-01-13 Pedro Alves <palves@redhat.com>
9403 * server.c (attach_inferior): Clear `cont_thread'.
9405 2012-01-13 Pedro Alves <palves@redhat.com>
9407 * server.c (main): Avoid infinite loop while detaching/killing
9410 2012-01-09 Doug Evans <dje@google.com>
9412 * server.c (start_inferior): Set last_ptid in --wrapper case.
9414 2012-01-06 Yao Qi <yao@codesourcery.com>
9416 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9418 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9420 2012-01-04 Yao Qi <yao@codesourcery.com>
9422 * tracepoint.c (cmd_qtdp): Print debug message
9423 for static tracepoint.
9425 2012-01-04 Yao Qi <yao@codesourcery.com>
9427 * tracepoint.c (trace_vdebug): Differentiate debug message
9428 between gdbserver and IPA.
9430 2012-01-03 Yao Qi <yao@codesourcery.com>
9432 * tracepoint.c (tracepoint_was_hit): Don't collect for
9435 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9437 * terminal.h: Reformat copyright header.
9439 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9441 * server.c (gdbserver_version): Update copyright year.
9442 * gdbreplay.c (gdbreplay_version): Likewise.
9444 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9446 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9449 2011-12-18 Hui Zhu <teawater@gmail.com>
9450 * linux-low.c (linux_create_inferior): Save return value to ret.
9452 2011-12-18 Hui Zhu <teawater@gmail.com>
9454 * linux-low.c (linux_create_inferior): Save return value to ret.
9456 2011-12-16 Doug Evans <dje@google.com>
9458 * linux-low.c (linux_create_inferior): If stdio connection,
9459 redirect stdin from /dev/null, stdout to stderr.
9460 * remote-utils.c (remote_is_stdio): New static global.
9461 (remote_connection_is_stdio): New function.
9462 (remote_prepare): Handle stdio connection.
9463 (remote_open): Ditto.
9464 (remote_close): Don't close stdin for stdio connections.
9465 (read_prim,write_prim): New functions. Replace all calls to
9466 read/write to these.
9467 * server.c (main): Watch for "-" argument. Move call to
9468 remote_prepare before start_inferior.
9469 * server.h (STDIO_CONNECTION_NAME): New macro.
9470 (remote_connection_is_stdio): Declare.
9472 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9473 in debugging output.
9475 2011-12-15 Yao Qi <yao@codesourcery.com>
9477 * tracepoint.c: Include sys/syscall.h.
9478 (gdb_ust_thread): Remove preprocessor conditional.
9480 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9482 * linux-low.c (linux_detach_one_lwp): Call
9483 the_low_target.prepare_to_resume before detaching.
9485 2011-12-14 Yao Qi <yao@codesourcery.com>
9487 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9490 2011-12-14 Yao Qi <yao@codesourcery.com>
9492 * i386-low.c (i386_low_stopped_data_address): Initialize local
9495 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9499 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9500 DR_CONTROL unless necessary. Extend comments.
9501 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9502 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9504 2011-12-13 Yao Qi <yao@codesourcery.com>
9506 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9508 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9510 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9512 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9513 Print new debug message for such case.
9515 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9517 Fix overlapping memcpy.
9518 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9519 the read_inferior_memory transfer.
9520 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9521 write_inferior_memory transfer.
9522 (set_fast_tracepoint_jump): New variable buf. Use it for the
9523 read_inferior_memory and write_inferior_memory transfers.
9524 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9525 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9526 Use it for the write_inferior_memory transfer.
9527 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9530 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9532 * linux-low.c (fetch_register, store_register): Make code
9533 consistent, fix formatting.
9535 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9537 * linux-low.c (usr_store_inferior_registers): Factor out code
9538 to handle individual registers into...
9539 (store_register): ... this new function.
9541 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9543 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9544 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9545 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9546 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9547 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9548 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9549 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9550 (srv_xmlfiles): Add new XML files.
9552 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9554 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9555 (init_registers_s390_linux32v1): Add prototype.
9556 (init_registers_s390_linux32v2): Likewise.
9557 (init_registers_s390_linux64v1): Likewise.
9558 (init_registers_s390_linux64v2): Likewise.
9559 (init_registers_s390x_linux64v1): Likewise.
9560 (init_registers_s390x_linux64v2): Likewise.
9561 (s390_num_regs): Increment to 52.
9562 (s390_regmap): Add orig_r2 register.
9563 (s390_num_regs_3264): Increment to 68.
9564 (s390_regmap_3264): Add orig_r2 register.
9565 (s390_collect_ptrace_register): Handle orig_r2 register.
9566 (s390_supply_ptrace_register): Likewise.
9567 (s390_fill_last_break): New function.
9568 (s390_store_last_break): Likewise.
9569 (s390_fill_system_call): New function.
9570 (s390_store_system_call): Likewise.
9571 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9573 (s390_check_regset): New function.
9574 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9575 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9576 Update target_regsets for available register sets.
9578 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9579 Jan Kratochvil <jan.kratochvil@redhat.com>
9581 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9582 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9584 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9585 * linux-low.h (struct process_info_private): New member r_debug.
9586 * server.c (handle_qxfer_libraries): Call
9587 the_target->qxfer_libraries_svr4.
9588 (handle_qxfer_libraries_svr4): New function.
9589 (qxfer_packets): New entry "libraries-svr4".
9590 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9591 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9592 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9593 PACKET_qXfer_libraries_svr4.
9595 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9597 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9598 PSW address/mask between 8-byte and 16-byte formats.
9599 (s390_supply_ptrace_register): Likewise.
9600 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9601 basic addressing mode bit.
9603 2011-11-24 Stan Shebs <stan@codesourcery.com>
9605 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9607 2011-11-17 Stan Shebs <stan@codesourcery.com>
9609 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9610 (tracing_start_time): New global.
9611 (tracing_stop_time): New global.
9612 (tracing_user_name): New global.
9613 (tracing_notes): New global.
9614 (tracing_stop_note): New global.
9615 (cmd_qtstart): Set traceframe_usage, start_time.
9616 (stop_tracing): Set stop_time.
9617 (cmd_qtstatus): Report additional status.
9618 (cmd_qtp): New function.
9619 (handle_tracepoint_query): Call it.
9620 (cmd_qtnotes): New function.
9621 (handle_tracepoint_general_set): Call it.
9622 (get_timestamp): Rename from tsv_get_timestamp.
9624 2011-11-14 Stan Shebs <stan@codesourcery.com>
9625 Kwok Cheung Yeung <kcy@codesourcery.com>
9627 * linux-x86-low.c (small_jump_insn): New.
9628 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9629 trampoline and error message, build a trampoline and issue a small
9630 jump instruction to it.
9631 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9632 trampoline and error message.
9633 (x86_get_min_fast_tracepoint_insn_len): New.
9634 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9635 * linux-low.h (struct linux_target_ops): Add arguments to
9636 install_fast_tracepoint_jump_pad operation, add new operation.
9637 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9639 (linux_get_min_fast_tracepoint_insn_len): New function.
9640 (linux_target_op): Add new operation.
9641 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9642 (gdb_trampoline_buffer_end): Ditto.
9643 (gdb_trampoline_buffer_error): Ditto.
9644 (struct ipa_sym_addresses): Add fields for new IPA variables.
9645 (symbol_list): Add entries for new IPA variables.
9646 (struct tracepoint): Add fields to hold the address range of the
9647 trampoline used by the tracepoint.
9648 (trampoline_buffer_head): New static variable.
9649 (trampoline_buffer_tail): Ditto.
9650 (claim_trampoline_space): New function.
9651 (have_fast_tracepoint_trampoline_buffer): New function.
9652 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9654 (install_fast_tracepoint): Ditto, also add error buffer argument.
9655 (cmd_qtminftpilen): New function.
9656 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9657 (fast_tracepoint_from_trampoline_address): New function.
9658 (fast_tracepoint_collecting): Handle trampoline as part of jump
9660 (set_trampoline_buffer_space): New function.
9661 (initialize_tracepoint): Initialize new IPA variables.
9662 * target.h (struct target_ops): Add arguments to
9663 install_fast_tracepoint_jump_pad operation, add new
9664 get_min_fast_tracepoint_insn_len operation.
9665 (target_get_min_fast_tracepoint_insn_len): New.
9666 (install_fast_tracepoint_jump_pad): Add arguments.
9667 * server.h (IPA_BUFSIZ): Define.
9668 * linux-i386-ipa.c: Include extra header files.
9669 (initialize_fast_tracepoint_trampoline_buffer): New function.
9670 (initialize_low_tracepoint): Call it.
9671 * server.h (set_trampoline_buffer_space): Declare.
9672 (claim_trampoline_space): Ditto.
9673 (have_fast_tracepoint_trampoline_buffer): Ditto.
9675 2011-11-14 Yao Qi <yao@codesourcery.com>
9677 * server.c (handle_query): Handle InstallInTrace for qSupported.
9678 * tracepoint.c (add_tracepoint): Sort list.
9679 (install_tracepoint, download_tracepoint): New.
9680 (cmd_qtdp): Call them to install and download tracepoints.
9681 (sort_tracepoints): Removed.
9682 (cmd_qtstart): Update.
9684 2011-11-14 Yao Qi <yao@codesourcery.com>
9686 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9687 * mem-break.h: Declare.
9688 * tracepoint.c (cmd_qtstart): Move some code to ...
9689 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9691 (download_tracepoints): Move some code to ...
9692 (download_tracepoint_1): ... here. New.
9694 2011-11-08 Yao Qi <yao@codesourcery.com>
9696 * remote-utils.c (relocate_instruction): A comment fix.
9698 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9700 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9701 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9702 dr_status_mirror and dr_control_mirror from debug_reg_state.
9703 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9704 (i386_initial_stuff): Remove use of deleted globals.
9705 (i386_get_thread_context, i386_set_thread_context,
9706 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9707 from debug_reg_state.
9709 2011-11-05 Yao Qi <yao@codesourcery.com>
9711 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9712 address as TPOINT's.
9714 2011-11-02 Stan Shebs <stan@codesourcery.com>
9716 * tracepoint.c (agent_mem_read_string): New function.
9717 (eval_agent_expr): Call it for tracenz.
9718 * server.c (handle_query): Report support for tracenz.
9720 2011-11-02 Yao Qi <yao@codesourcery.com>
9722 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9724 2011-11-02 Yao Qi <yao@codesourcery.com>
9726 * target.h: Fix a typo in comment.
9728 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9730 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9731 clobber the breakpoints' shadows with fast tracepoint jumps.
9732 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9733 * target.c (write_inferior_memory): Also pass MYADDR down to
9736 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9738 * configure.ac: Check support for personality routine.
9739 * configure: Regenerate.
9740 * config.in: Likewise.
9741 * linux-low.c: Include <sys/personality.h>.
9742 Define ADDR_NO_RANDOMIZE if necessary.
9743 (linux_create_inferior): Disable address space randomization when
9744 forking inferior, if requested.
9745 (linux_supports_disable_randomization): New function.
9746 (linux_target_ops): Install it.
9747 * server.h (disable_randomization): Declare.
9748 * server.c (disable_randomization): New global variable.
9749 (handle_general_set): Handle QDisableRandomization.
9750 (handle_query): Likewise for qSupported.
9751 (main): Support --disable-randomization and --no-disable-randomization
9752 command line arguments.
9753 * target.h (struct target_ops): Add supports_disable_randomization.
9754 (target_supports_disable_randomization): New macro.
9756 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9758 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9760 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9761 [!PT_GETDSBT] (target_loadmap): New definition.
9762 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9763 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9764 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9765 and PT_GETDSBT to LINUX_LOADMAP.
9766 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9767 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9769 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9771 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9772 (arm_linux_hwbp_cap): New static variable.
9773 (arm_linux_get_hwbp_cap): Replace by ...
9774 (arm_linux_init_hwbp_cap): ... this new function.
9775 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9776 (arm_linux_get_hw_watchpoint_count): Likewise.
9777 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9778 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9779 (arm_prepare_to_resume): Use perror_with_name instead of error.
9781 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9783 * linux-arm-low.c: Include <signal.h>.
9784 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9785 (struct arm_linux_hwbp_cap): New data type.
9786 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9787 (struct arm_linux_hw_breakpoint): New data type.
9788 (MAX_BPTS, MAX_WPTS): Define.
9789 (struct arch_process_info, struct arch_lwp_info): New data types.
9790 (arm_linux_get_hwbp_cap): New function.
9791 (arm_linux_get_hw_breakpoint_count): Likewise.
9792 (arm_linux_get_hw_watchpoint_count): Likewise.
9793 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9794 (arm_hwbp_control_initialize): Likewise.
9795 (arm_hwbp_control_is_enabled): Likewise.
9796 (arm_hwbp_control_is_initialized): Likewise.
9797 (arm_hwbp_control_disable): Likewise.
9798 (arm_linux_hw_breakpoint_equal): Likewise.
9799 (arm_linux_hw_point_initialize): Likewise.
9800 (struct update_registers_data): New data structure.
9801 (update_registers_callback: New function.
9802 (arm_insert_point): Likewise.
9803 (arm_remove_point): Likewise.
9804 (arm_stopped_by_watchpoint): Likewise.
9805 (arm_stopped_data_address): Likewise.
9806 (arm_new_process): Likewise.
9807 (arm_new_thread): Likewise.
9808 (arm_prepare_to_resume): Likewise.
9809 (the_low_target): Register arm_insert_point, arm_remove_point,
9810 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9811 arm_new_thread, and arm_prepare_to_resume.
9813 2011-09-15 Stan Shebs <stan@codesourcery.com>
9815 * server.h (struct emit_ops): Add compare-goto fields.
9816 * tracepoint.c (gdb_agent_op_sizes): New table.
9817 (emit_eq_goto): New function.
9818 (emit_ne_goto): New function.
9819 (emit_lt_goto): New function.
9820 (emit_le_goto): New function.
9821 (emit_gt_goto): New function.
9822 (emit_ge_goto): New function.
9823 (is_goto_target): New function.
9824 (compile_bytecodes): Recognize special cases of compare-goto
9825 combinations and call specialized emitters for them.
9826 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9827 (amd64_emit_ne_goto): New function.
9828 (amd64_emit_lt_goto): New function.
9829 (amd64_emit_le_goto): New function.
9830 (amd64_emit_gt_goto): New function.
9831 (amd64_emit_ge_goto): New function.
9832 (amd64_emit_ops): Add the new functions.
9833 (i386_emit_eq_goto): New function.
9834 (i386_emit_ne_goto): New function.
9835 (i386_emit_lt_goto): New function.
9836 (i386_emit_le_goto): New function.
9837 (i386_emit_gt_goto): New function.
9838 (i386_emit_ge_goto): New function.
9839 (i386_emit_ops): Add the new functions.
9841 2011-09-08 Stan Shebs <stan@codesourcery.com>
9843 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9844 (i386_emit_epilogue): Restore %ebx.
9846 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9848 * server.c (step_thread): Remove definition.
9849 (process_serial_event): Don't handle Hs.
9850 * server.h (step_thread): Remove declaration.
9851 * target.c (set_desired_inferior): Remove use of step_thread.
9853 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9855 * linux-low.c: Include linux-procfs.h.
9856 (linux_attach_lwp_1): Update comments.
9857 (linux_attach): Scan for existing threads when attaching to a
9858 process that is the tgid.
9859 * Makefile.in: Update dependencies.
9861 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9863 * configure.srv: Add linux-procfs.o dependencies.
9865 2011-08-14 Yao Qi <yao@codesourcery.com>
9867 * target.h (struct target_ops): Fix indent.
9868 * win32-low.c (win32_target_ops): Fix comment.
9870 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9871 Yao Qi <yao@codesourcery.com>
9873 * Makefile.in (clean): Remove tic6x-*.c files.
9874 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9875 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9876 (tic6x-c64xp-linux.c): Likewise.
9877 * configure.srv: Add support for tic6x-*-uclinux.
9878 * linux-tic6x-low.c: New.
9879 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9881 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9882 Yao Qi <yao@codesourcery.com>
9884 * target.h (struct target_ops): Add read_loadmap.
9885 * linux-low.c (struct target_loadseg): New type.
9886 (struct target_loadmap): New type.
9887 (linux_read_loadmap): New function.
9888 (linux_target_ops): Add linux_read_loadmap.
9889 * server.c (handle_query): Support qXfer:fdpic:read packet.
9890 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9893 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9895 * win32-low.c: Include <stdint.h>.
9897 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9899 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9900 to the inferior here.
9901 (i386_remove_aligned_watchpoint): Ditto.
9902 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9903 fit part of the watchpoint in the debug registers.
9904 (i386_update_inferior_debug_regs): New.
9905 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9906 registers, and only update the inferior on success.
9907 (i386_low_remove_watchpoint): Ditto.
9909 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9911 * linux-low.c (compare_ints, unique, list_threads, show_process,
9912 linux_core_of_thread): Delete.
9913 (linux_target_ops): Change linux_core_of_thread to
9914 linux_common_core_of_thread.
9915 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9916 * utils.c (malloc_failure): Change type of argument.
9917 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9918 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9919 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9920 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9921 (IPA_OBJS): Add common-utils-ipa.o.
9922 (ptid_h, linux_osdata_h): New macros.
9923 (server_h): Add common/common-utils.h, common/xml-utils.h,
9924 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9926 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9927 ptid.o, buffer.o): New rules.
9928 (linux-low.o): Add common/linux-osdata.h as a dependency.
9929 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9930 * configure.ac: Add AC_HEADER_DIRENT check.
9931 * config.in: Regenerate.
9932 * configure: Regenerate.
9933 * remote-utils.c (xml_escape_text): Delete.
9934 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9935 buffer_xml_printf): Move to common/buffer.c.
9936 * server.c (main): Remove call to initialize_inferiors.
9937 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9938 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9939 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9940 internal_error, gdb_assert, gdb_assert_fail): Delete.
9941 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9942 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9944 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9945 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9946 initialize_inferiors): Delete.
9948 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9950 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9953 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9955 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9957 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9959 2011-05-26 Yao Qi <yao@codesourcery.com>
9961 * Makefile.in (thread-db.o): Track dependence to
9962 common/gdb_thread_db.h.
9963 * thread-db.c: include gdb_thread_db.h from right place.
9965 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9967 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9968 __FILE__ and __LINE__ to internal_error.
9970 2011-05-13 Doug Evans <dje@google.com>
9972 * thread-db.c (try_thread_db_load_from_sdir): New function.
9973 (try_thread_db_load_from_dir): New function.
9974 (thread_db_load_search): Handle $sdir, ignore $pdir.
9975 Remove trying of system directories if search of
9976 libthread-db-search-path fails, that is now done via $sdir.
9978 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9980 * server.c (handle_query): Add EnableDisableTracepoints to the list
9981 of supported features.
9982 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9984 (cmd_qtenable_disable): New.
9985 (cmd_qtstart): Install tracepoints even if disabled.
9986 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9987 receiving a QTEnable or QTDisable packet.
9988 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9989 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9991 (gdb_probe): Skip data collection if static tracepoint is disabled.
9993 2011-05-10 Doug Evans <dje@google.com>
9995 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9997 2011-05-04 Doug Evans <dje@google.com>
9999 * linux-low.c (linux_join): Skip process lookup.
10000 * spu-low.c (spu_join): Ditto.
10001 * server.c (join_inferiors_callback): Delete.
10002 (process_serial_event): For 'D' packet (detach) call join_inferior
10005 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10007 * README: Don't mention xscale*-*-linux*.
10008 * configure.srv (xscale*-*-linux*): Don't handle target.
10010 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10012 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10014 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10015 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10016 (i386_emit_void_call_2): Likewise.
10018 2011-04-26 Yao Qi <yao@codesourcery.com>
10020 * linux-low.c: Move common macros to linux-ptrace.h.
10021 Include linux-ptrace.h.
10022 * Makefile.in (linux_ptrace_h): New.
10023 (linux-low.o): Depends on linux-ptrace.h.
10025 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10027 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10028 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10029 (remote_prepare): New function with most of the TCP code from ...
10030 (remote_open): ... here. Detect PORT here unconditionally. Move also
10031 setting transport_is_reliable.
10032 * server.c (run_once): New variable.
10033 (gdbserver_usage): Document it.
10034 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10035 the first run if RUN_ONCE.
10036 * server.h (run_once, remote_prepare): New declarations.
10038 2011-04-19 Tom Tromey <tromey@redhat.com>
10040 * win32-low.c (handle_load_dll): Remove duplicate "the".
10042 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10044 Remove support for old Cygwin 1.5 versions.
10045 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10046 function to avoid warning.
10047 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10050 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10052 * gdbserver/server.h (Macro _): Define it if not available.
10054 2011-03-14 Michael Snyder <msnyder@vmware.com>
10056 * hostio.c (handle_close): Remove unnecessary null test.
10058 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10060 * Makefile.in (maintainer-clean realclean distclean): Remove
10061 "make ... subdir_do" command.
10063 2011-03-10 Michael Snyder <msnyder@vmware.com>
10065 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10067 * server.c (handle_v_run): Free alloced buffer on early return.
10069 2011-03-09 Yao Qi <yao@codesourcery.com>
10072 2011-03-04 Yao Qi <yao@codesourcery.com>
10074 * Makefile.in: Remove GNU make feature --directory.
10076 2011-03-05 Yao Qi <yao@codesourcery.com>
10078 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10079 (subdir_do): New make target. Copied from gdb/Makefile.
10080 (maintainer-clean, realclean, distclean, clean): Call corresponding
10081 make targets in common/Makefile.
10083 2011-02-11 Yao Qi <yao@codesourcery.com>
10085 * configure.ac: Call AC_PROG_RANLIB.
10086 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10087 * configure: Regenerate.
10089 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10091 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10093 2011-03-06 Yao Qi <yao@codesourcery.com>
10095 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10097 2011-03-05 Yao Qi <yao@codesourcery.com>
10099 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10100 (subdir_do): New make target. Copied from gdb/Makefile.
10101 (maintainer-clean, realclean, distclean, clean): Call corresponding
10102 make targets in common/Makefile.
10104 2011-03-04 Yao Qi <yao@codesourcery.com>
10106 * Makefile.in: Remove GNU make feature --directory.
10108 2011-03-04 Michael Snyder <msnyder@vmware.com>
10110 * server.c (queue_stop_reply): Call xmalloc not malloc.
10112 2011-03-02 Michael Snyder <msnyder@vmware.com>
10114 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10116 2011-02-28 Michael Snyder <msnyder@vmware.com>
10118 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10119 (cmd_qtframe): Ditto.
10120 (cmd_qtbuffer): Ditto.
10121 (cmd_bigqtbuffer): Ditto.
10123 * utils.c (decimal2str): Initialize 'width' to nine, then
10124 don't mess with it.
10126 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10128 * hostio.c (require_data): Free *data, not data.
10130 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10132 * hostio.c (require_data): Use free, not xfree.
10134 2011-02-27 Michael Snyder <msnyder@vmware.com>
10136 * server.c (handle_query): Discard unused value.
10138 * hostio.c (require_data): Free malloc memory before returning
10141 2011-02-26 Michael Snyder <msnyder@vmware.com>
10143 * linux-low.c (list_threads): Call closedir for dirent.
10145 2011-02-27 Michael Snyder <msnyder@vmware.com>
10147 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10148 a case statement falls through.
10150 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10152 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10155 2011-02-26 Michael Snyder <msnyder@vmware.com>
10157 * utils.c (decimal2str): Eliminate dead code and dead param.
10158 (pulongest): Drop dead param from call to decimal2str.
10161 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10163 Revert the following patch (not approved yet):
10164 2011-02-21 Hui Zhu <teawater@gmail.com>
10165 * tracepoint.c (tp_printf): New function.
10166 (eval_agent_expr): Handle gdb_agent_op_printf.
10168 2011-02-21 Hui Zhu <teawater@gmail.com>
10170 * tracepoint.c (tp_printf): New function.
10171 (eval_agent_expr): Handle gdb_agent_op_printf.
10173 2011-02-18 Tom Tromey <tromey@redhat.com>
10175 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10176 (tracepoint.o): Likewise.
10177 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10178 (gdb_agent_op_names): Likewise.
10180 2011-02-18 Tom Tromey <tromey@redhat.com>
10182 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10183 gdb_agent_op_rot>: New constants.
10184 (gdb_agent_op_names): Add pick and roll.
10185 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10188 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10190 * aclocal.m4: Regenerated with aclocal-1.11.1.
10192 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10194 * server.c (handle_qxfer_traceframe_info): New.
10195 (qxfer_packets): Register "traceframe-info".
10196 (handle_query): Report support for qXfer:traceframe-info:read+.
10197 * tracepoint.c (match_blocktype): New.
10198 (traceframe_find_block_type): Rename to ...
10199 (traceframe_walk_blocks): ... this. Add callback filter argument,
10201 (traceframe_find_block_type): New, reimplemented on top of
10202 traceframe_walk_blocks.
10203 (build_traceframe_info_xml): New.
10204 (traceframe_read_info): New.
10205 * server.h (traceframe_read_info): Declare.
10207 2011-02-11 Yao Qi <yao@codesourcery.com>
10209 * configure.ac: Call AC_PROG_RANLIB.
10210 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10211 * configure: Regenerate.
10213 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10215 * server.c (gdb_read_memory): Change return semantics to allow
10217 (handle_search_memory_1): Adjust.
10218 (process_serial_event) <'m' packet>: Handle partial transfers.
10219 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10221 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10223 * regcache.c (init_register_cache): Initialize
10224 regcache->register_status.
10225 (free_register_cache): Release regcache->register_status.
10226 (regcache_cpy): Copy register_status.
10227 (registers_to_string): Print 'x's for unavailable registers.
10228 (supply_register): Mark the register's status valid or
10229 unavailable, depending on whether a buffer was passed in or not.
10230 (supply_register_zeroed): New.
10231 (supply_regblock): Mark the registers' status valid or
10232 unavailable, depending on whether a buffer was passed in or not.
10233 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10234 (struct regcache): New `register_status' field.
10235 (supply_register_zeroed): Declare.
10236 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10237 supply_register_zeroed, rather than passing a NULL buffer to
10239 * tracepoint.c (fetch_traceframe_registers): Update comment.
10241 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10243 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10246 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10248 * server.h (decode_xfer_write): Change prototype.
10249 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10250 and don't extract the annex here.
10251 * server.c (decode_xfer_read): Remove `annex' parameter,
10252 and don't extract the annex here.
10253 (decode_xfer): New.
10254 (struct qxfer): New.
10255 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10256 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10257 (handle_qxfer_statictrace): New functions, abstracted out from
10258 handle_query, and made to use the struct qxfer interface.
10259 (handle_threads_qxfer_proper): Rename to ...
10260 (handle_qxfer_threads_proper): ... this.
10261 (handle_threads_qxfer): Rename to ...
10262 (handle_qxfer_threads): ... this. Adjust.
10263 (qxfer_packets): New array.
10264 (handle_qxfer): New function.
10265 (handle_query): Use handle_qxfer.
10267 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10269 * gdbreplay.c: Shorten lines of >= 80 columns.
10270 * linux-low.c: Ditto.
10271 * linux-ppc-low.c: Ditto.
10272 * linux-s390-low.c: Ditto.
10273 * linux-sparc-low.c: Ditto.
10274 * linux-x86-low.c: Ditto.
10275 * linux-xtensa-low.c: Ditto.
10276 * mem-break.c: Ditto.
10277 * nto-low.c: Ditto.
10278 * regcache.h: Ditto.
10279 * remote-utils.c: Ditto.
10282 * thread-db.c: Ditto.
10283 * tracepoint.c: Ditto.
10285 * win32-low.h: Ditto.
10287 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10289 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10292 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10294 * server.c (gdbserver_version): Update copyright year in version
10296 * gdbreplay.c (gdbreplay_version): Ditto.
10298 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10300 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10301 * linux-bfin-low.c: New file.
10302 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10303 PT_DATA_ADDR for BFIN targets.
10304 * Makefile.in (SFILES): Add linux-bfin-low.c.
10305 (clean): Remove reg-bfin.c.
10306 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10307 * README: Mention supported Blackfin targets.
10309 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10311 * .gitignore: New file.
10313 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10315 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10317 2010-10-22 Jie Zhang <jie@codesourcery.com>
10319 * Makefile.in: Add FLAGS_TO_PASS variable.
10320 (install): Remove dependency of install-only and recursively
10321 invoke make for install-only.
10323 2010-10-04 Doug Evans <dje@google.com>
10325 * Makefile.in (uninstall): Use $(DESTDIR).
10327 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10331 * linux-x86-low.c (compat_siginfo_from_siginfo)
10332 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10333 si_code is < 0. Check for si_code == SI_TIMER before checking for
10336 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10338 * lynx-i386-low.c: New file.
10339 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10341 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10343 * lynx-low.c (ptrace_request_to_str): Remove handling for
10344 request values that have been removed in LynxOS 5.x.
10346 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10348 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10351 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10353 * configure.ac: Add --enable-inprocess-agent option.
10354 * configure: Rebuilt.
10356 2010-09-06 Yao Qi <yao@codesourcery.com>
10358 * linux-low.c (linux_kill): Remove unused variable.
10359 (linux_stabilize_threads): Likewise.
10360 * server.c (start_inferior): Likewise.
10361 (queue_stop_reply_callback): Likewise.
10362 * tracepoint.c (do_action_at_tracepoint): Likewise.
10364 2010-09-06 Yao Qi <yao@codesourcery.com>
10366 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10369 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10371 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10373 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10375 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10378 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10380 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10381 gdbserver/lynx-ppc-low.c: New files.
10382 * Makefile.in (lynx_low_h): New variable.
10383 (lynx-low.o, lynx-ppc-low.o): New rules.
10384 * configure.ac: On LynxOS, link with -lnetinet.
10385 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10386 * configure: regenerate.
10388 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10390 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10391 * configure.ac: Add check for vasprintf and vsnprintf.
10392 * configure, config.in: Regenerate.
10393 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10395 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10397 * gdbreplay.c: Move include of alloca.h up, next to include of
10399 * server.h: Add include of malloc.h.
10400 * mem-break.c: Remove include of malloc.h.
10401 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10403 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10405 * Makefile.in (memmem.o): Build with -Wno-error.
10407 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10409 * utils.c (xsnprintf): Make non-static.
10410 * server.h: Add xsnprintf declaration.
10411 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10412 replace calls to snprintf by calls to xsnprintf throughout.
10414 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10416 * configure.ac: Add configure check for alloca.
10417 * configure, config.in: Regenerate.
10418 * server.h: Include alloca.h if it exists.
10419 * gdbreplay.c: Include alloca.h if it exists.
10421 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10423 * linux-low.c (__SIGRTMIN): Define if not already defined.
10424 (linux_create_inferior): Check for __ANDROID__ rather than
10426 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10427 are already deferred.
10428 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10429 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10430 stopped and already has a pending signal to report.
10431 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10432 a pending signal to report or is moving out of a jump pad.
10433 (linux_init_signals): Check for __ANDROID__ rather than
10436 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10438 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10439 debug_threads check. Avoid a linear search when not doing debug
10442 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10444 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10445 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10446 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10447 (process_event): Change local fd's type to gdb_fildes_t.
10448 (create_file_handler): Adjust prototype.
10449 (delete_file_handler): Adjust prototype.
10450 (handle_file_event): Adjust prototype. Use pfildes.
10451 (create_file_event): Adjsut prototype.
10452 * remote-utils.c (remote_desc, listen_desc): Change type to
10454 * server.h: New gdb_fildes_t typedef.
10455 [USE_WIN32API]: Include winsock2.h.
10456 (delete_file_handler, add_file_handler): Adjust prototypes.
10457 (pfildes): Declare.
10458 * utils.c (pfildes): New.
10460 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10462 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10463 * configure: Regenerate.
10465 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10467 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10468 (linux_done_accessing_memory): ... this.
10469 (linux_target_ops): Adjust.
10470 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10471 * nto-low.c (nto_target_ops): Adjust comment.
10472 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10473 * spu-low.c (spu_target_ops): Adjust comment.
10474 * target.h (target_ops): Rename unprepare_to_access_memory field
10475 to done_accessing_memory.
10476 (unprepare_to_access_memory): Rename to ...
10477 (done_accessing_memory): ... this.
10479 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10481 * linux-low.c (linux_prepare_to_access_memory): New.
10482 (linux_unprepare_to_access_memory): New.
10483 (linux_target_ops): Install them.
10484 * server.c (read_memory): Rename to ...
10485 (gdb_read_memory): ... this. Use
10486 prepare_to_access_memory/prepare_to_access_memory.
10487 (write_memory): Rename to ...
10488 (gdb_write_memory): ... this. Use
10489 prepare_to_access_memory/prepare_to_access_memory.
10490 (handle_search_memory_1): Adjust.
10491 (process_serial_event): Adjust.
10492 * target.h (struct target_ops): New fields
10493 prepare_to_access_memory and unprepare_to_access_memory.
10494 (prepare_to_access_memory, unprepare_to_access_memory): New.
10495 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10496 prepare_to_access_memory/prepare_to_access_memory.
10497 * nto-low.c (nto_target_ops): Adjust.
10498 * spu-low.c (spu_target_ops): Adjust.
10499 * win32-low.c (win32_target_ops): Adjust.
10501 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10503 * Makefile.in (WARN_CFLAGS): Get it from configure.
10504 (WERROR_CFLAGS): New.
10505 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10506 * configure.ac: Introduce --enable-werror, which adds -Werror to
10507 the compiler command line. Enabled by default. Disable with
10508 --disable-werror. Add -Wdeclaration-after-statement
10509 Wpointer-arith and -Wformat-nonliteral to warning flags.
10510 * configure: Regenerate.
10512 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10514 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10516 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10518 * gdbreplay.c (remote_error): New.
10520 (expect): Use gdbchar. Check for error reading from GDB.
10521 Clarify sync error output.
10522 (play): Check for errors writing to GDB.
10523 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10524 * remote-utils.c (getpkt): Check for errors writing to the remote
10527 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10529 * linux-low.c (linux_wait_1): Move non-debugging code out of
10530 `debug_threads' control.
10532 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10534 * linux-low.c (linux_wait_1): Don't set last_status here.
10535 * server.c (push_event, queue_stop_reply_callback): Assert we're
10536 not pushing a TARGET_WAITKIND_IGNORE event.
10537 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10538 (myresume, handle_target_event): Set the thread's last_resume_kind
10539 and last_status from the target returned status.
10541 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10545 * linux-x86-low.c (update_debug_registers_callback): New.
10546 (i386_dr_low_set_addr): Use it.
10547 (i386_dr_low_get_addr): New.
10548 (i386_dr_low_set_control): Use update_debug_registers_callback.
10549 (i386_dr_low_get_control): New.
10550 (i386_dr_low_get_status): Adjust.
10551 * linux-low.c (linux_stop_lwp): New.
10552 * linux-low.h (linux_stop_lwp): Declare.
10554 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10555 argument instead of a i386_debug_reg_state.
10556 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10557 a i386_debug_reg_state.
10558 (i386_insert_aligned_watchpoint): Adjust.
10559 (i386_remove_aligned_watchpoint): Adjust.
10560 (i386_low_stopped_data_address): Read the debug registers from the
10561 inferior instead of from the mirrors.
10562 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10563 (i386_dr_low_get_addr): Declare.
10564 (i386_dr_low_get_control): Declare.
10565 (i386_dr_low_get_status): Change prototype.
10567 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10568 (i386_dr_low_get_addr): New.
10569 (i386_dr_low_get_control): New.
10570 (i386_dr_low_get_status): Adjust prototype. Return
10572 (i386_initial_stuff): Clear dr_status_mirror and
10574 (i386_get_thread_context): Adjust.
10575 (i386_set_thread_context): Adjust.
10576 (i386_thread_added): Adjust.
10578 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10580 * linux-low.h (linux_thread_area): Delete declaration.
10582 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10584 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10585 after its termination.
10587 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10589 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10590 (gdb_wants_all_stopped): Delete.
10591 (linux_wait_1): Don't call them.
10592 * server.c (handle_v_cont): Tag all threads as want-stopped.
10593 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10594 stopped as "client-wants-stopped".
10596 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10598 * Makefile.in (signals_h): New.
10599 (server_h): Depend on it.
10600 (server.o): Don't depend on $(signals_def).
10601 (signals.o): Depend on $(signals_def).
10603 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10605 * Makefile.in (signals_def): New.
10606 (server_h): Append include/gdb/signals.h and signals_def.
10607 (server.o): Append signals_def.
10609 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10611 * server.c (handle_target_event): Use target_signal_to_host for
10612 resume_info.sig initialization.
10613 * target.h (struct thread_resume) <sig>: New comment.
10615 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10617 * server.c (handle_query): strcpy() the returned string from paddress()
10618 instead of sprintf().
10619 * utils.c (paddress): Return phex_nz().
10621 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10623 * server.c (handle_v_cont): Call mourn_inferior if process
10625 (myresume): Likewise.
10627 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10629 Static tracepoints, and integration with UST.
10631 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10632 * mem-break.c (uninsert_all_breakpoints)
10633 (reinsert_all_breakpoints): New.
10634 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10635 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10636 (gdb_agent_ust_loaded, helper_thread_id)
10637 (gdb_agent_helper_thread_id): New macros.
10638 (struct ipa_sym_addresses): Add addr_ust_loaded,
10639 addr_helper_thread_id, addr_cmd_buf.
10640 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10641 (in_process_agent_loaded_ust): New.
10642 (write_e_ust_not_loaded): New.
10643 (maybe_write_ipa_ust_not_loaded): New.
10644 (struct collect_static_trace_data_action): New.
10645 (enum tracepoint_type) <static_tracepoint>: New.
10646 (struct tracepoint) <handle>: Mention static tracepoints.
10647 (struct static_tracepoint_ctx): New.
10648 (CMD_BUF_SIZE): New.
10649 (add_tracepoint_action): Handle static tracepoint actions.
10650 (unprobe_marker_at): New.
10651 (clear_installed_tracepoints): Handle static tracepoints.
10652 (cmd_qtdp): Handle static tracepoints.
10653 (probe_marker_at): New.
10654 (cmd_qtstart): Handle static tracepoints.
10655 (response_tracepoint): Handle static tracepoints.
10656 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10657 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10658 (get_context_regcache): Handle static tracepoints.
10659 (do_action_at_tracepoint): Handle static tracepoint actions.
10660 (traceframe_find_block_type): Handle static trace data blocks.
10661 (traceframe_read_sdata): New.
10662 (download_tracepoints): Download static tracepoint actions.
10663 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10664 (GDB_PROBE_NAME): New.
10666 (GET_UST_SYM): New.
10669 (ust_marker_to_static_tracepoint): New.
10671 (collect_ust_data_at_tracepoint): New.
10672 (gdb_ust_probe): New.
10673 (UNIX_PATH_MAX, SOCK_DIR): New.
10674 (gdb_ust_connect_sync_socket): New.
10675 (resume_thread, stop_thread): New.
10676 (run_inferior_command): New.
10677 (init_named_socket): New.
10678 (gdb_ust_socket_init): New.
10679 (cstr_to_hexstr): New.
10681 (first_marker, next_marker): New.
10682 (response_ust_marker): New.
10683 (cmd_qtfstm, cmd_qtsstm): New.
10684 (unprobe_marker_at, probe_marker_at): New.
10685 (cmd_qtstmat, gdb_ust_thread): New.
10686 (gdb_ust_init): New.
10687 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10688 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10689 (ST_REGENTRY): New.
10690 (x86_64_st_collect_regmap): New.
10691 (X86_64_NUM_ST_COLLECT_GREGS): New.
10692 (AMD64_RIP_REGNUM): New.
10693 (supply_static_tracepoint_registers): New.
10694 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10695 (ST_REGENTRY): New.
10696 (i386_st_collect_regmap): New.
10697 (i386_NUM_ST_COLLECT_GREGS): New.
10698 (supply_static_tracepoint_registers): New.
10699 * server.c (handle_query): Handle qXfer:statictrace:read.
10700 <qSupported>: Report support for StaticTracepoints, and
10701 qXfer:statictrace:read features.
10702 * server.h (traceframe_read_sdata)
10703 (supply_static_tracepoint_registers): Declare.
10704 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10705 (unpack_varlen_hex): Include in IPA build.
10706 * Makefile.in (ustlibs, ustinc): New.
10707 (IPA_OBJS): Add remote-utils-ipa.o.
10708 ($(IPA_LIB)): Link -ldl and -lpthread.
10710 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10711 * config.in, configure: Regenerate.
10713 2010-06-20 Ian Lance Taylor <iant@google.com>
10714 Pedro Alves <pedro@codesourcery.com>
10716 * linux-x86-low.c (always_true): Delete.
10717 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10718 trying to fool the compiler with always_true.
10720 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10722 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10723 conditions in gdbserver.
10725 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10727 * spu-low.c (spu_read_memory): Wrap around local store limit.
10728 (spu_write_memory): Likewise.
10730 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10732 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10733 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10735 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10737 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10738 uses with LONGEST uses.
10740 2010-06-14 Stan Shebs <stan@codesourcery.com>
10741 Pedro Alves <pedro@codesourcery.com>
10745 * linux-x86-low.c: Include limits.h.
10747 (always_true): New.
10750 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10751 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10752 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10753 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10754 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10755 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10756 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10757 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10758 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10759 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10760 (amd64_emit_void_call_2): New.
10761 (amd64_emit_ops): New.
10762 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10763 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10764 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10765 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10766 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10767 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10768 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10769 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10770 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10771 (i386_emit_stack_adjust, i386_emit_int_call_1)
10772 (i386_emit_void_call_2): New.
10773 (i386_emit_ops): New.
10774 (x86_emit_ops): New.
10775 (the_low_target): Install x86_emit_ops.
10776 * server.h (struct emit_ops): New.
10777 (get_raw_reg_func_addr): Declare.
10778 (current_insn_ptr, emit_error): Declare.
10779 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10780 (set_trace_state_variable_value): New defines.
10781 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10782 addr_get_trace_state_variable_value and
10783 addr_set_trace_state_variable_value.
10784 (symbol_list): New fields for get_raw_reg,
10785 get_trace_state_variable_value and set_trace_state_variable_value.
10786 (condfn): New typedef.
10787 (struct tracepoint): New field `compiled_cond'.
10788 (do_action_at_tracepoint): Clear compiled_cond.
10789 (get_trace_state_variable_value, set_trace_state_variable_value):
10791 (condition_true_at_tracepoint): If there's a compiled condition,
10793 (current_insn_ptr, emit_error): New globals.
10794 (struct bytecode_address): New.
10795 (get_raw_reg_func_addr): New.
10796 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10797 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10798 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10799 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10800 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10801 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10802 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10803 (compile_tracepoint_condition, compile_bytecodes): New.
10804 * target.h (emit_ops): Forward declare.
10805 (struct target_ops): New field emit_ops.
10806 (target_emit_ops): New.
10807 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10808 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10809 * linux-low.c (linux_emit_ops): New.
10810 (linux_target_ops): Install it.
10811 * linux-low.h (struct linux_target_ops): New field emit_ops.
10813 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10815 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10816 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10818 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10819 Stan Shebs <stan@codesourcery.com>
10821 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10822 (all): Depend on $(extra_libraries).
10823 (install-only): Install the IPA.
10824 (IPA_OBJS, IPA_LIB): New.
10825 (clean): Remove the IPA lib.
10826 (IPAGENT_CFLAGS): New.
10827 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10828 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10829 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10830 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10831 * configure.ac: Check for atomic builtins support in the compiler.
10832 (IPA_DEPFILES, extra_libraries): Define.
10833 * configure.srv (ipa_obj): Add description.
10834 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10835 (i[34567]86-*-linux*): Set ipa_obj.
10836 (x86_64-*-linux*): Set ipa_obj.
10837 * linux-low.c (stabilizing_threads): New.
10838 (supports_fast_tracepoints): New.
10839 (linux_detach): Stabilize threads before detaching.
10840 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10841 the lwp is either not stabilizing, or is moving out of a jump pad.
10842 (linux_fast_tracepoint_collecting): New.
10843 (maybe_move_out_of_jump_pad): New.
10844 (enqueue_one_deferred_signal): New.
10845 (dequeue_one_deferred_signal): New.
10846 (linux_wait_for_event_1): If moving out of a jump pad, defer
10847 pending signals to later.
10848 (linux_stabilize_threads): New.
10849 (linux_wait_1): Check if threads need moving out of jump pads, and
10851 (stuck_in_jump_pad_callback): New.
10852 (move_out_of_jump_pad_callback): New.
10853 (lwp_running): New.
10854 (linux_resume_one_lwp): Handle moving out of jump pads.
10855 (linux_set_resume_request): Dequeue deferred signals.
10856 (need_step_over_p): Also step over fast tracepoint jumps.
10857 (start_step_over): Also uninsert fast tracepoint jumps.
10858 (finish_step_over): Also reinsert fast tracepoint jumps.
10859 (linux_install_fast_tracepoint_jump): New.
10860 (linux_target_ops): Install linux_stabilize_threads and
10861 linux_install_fast_tracepoint_jump_pad.
10862 * linux-low.h (linux_target_ops) <get_thread_area,
10863 install_fast_tracepoint_jump_pad>: New fields.
10864 (struct lwp_info) <collecting_fast_tracepoint,
10865 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10866 (linux_get_thread_area): Declare.
10867 * linux-x86-low.c (jump_insn): New.
10868 (x86_get_thread_area): New.
10869 (append_insns): New.
10870 (push_opcode): New.
10871 (amd64_install_fast_tracepoint_jump_pad): New.
10872 (i386_install_fast_tracepoint_jump_pad): New.
10873 (x86_install_fast_tracepoint_jump_pad): New.
10874 (the_low_target): Install x86_get_thread_area and
10875 x86_install_fast_tracepoint_jump_pad.
10876 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10877 (struct fast_tracepoint_jump): New.
10878 (fast_tracepoint_jump_insn): New.
10879 (fast_tracepoint_jump_shadow): New.
10880 (find_fast_tracepoint_jump_at): New.
10881 (fast_tracepoint_jump_here): New.
10882 (delete_fast_tracepoint_jump): New.
10883 (set_fast_tracepoint_jump): New.
10884 (uninsert_fast_tracepoint_jumps_at): New.
10885 (reinsert_fast_tracepoint_jumps_at): New.
10886 (set_breakpoint_at): Use write_inferior_memory.
10887 (uninsert_raw_breakpoint): Use write_inferior_memory.
10888 (check_mem_read): Mask out fast tracepoint jumps.
10889 (check_mem_write): Mask out fast tracepoint jumps.
10890 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10891 (set_fast_tracepoint_jump): Declare.
10892 (delete_fast_tracepoint_jump)
10893 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10894 (reinsert_fast_tracepoint_jumps_at): Declare.
10895 * regcache.c: Don't compile many functions when building the
10896 in-process agent library.
10897 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10898 the register buffer in the heap.
10899 (free_register_cache): If the register buffer isn't owned by the
10900 regcache, don't free it.
10901 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10902 pre-existing register caches.
10903 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10905 (convert_ascii_to_int): : Constify `from' parameter type.
10906 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10907 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10908 the needed buffer in-place.
10909 (relocate_instruction): New.
10910 * server.c (handle_query) <qSymbols>: If the target supports
10911 tracepoints, give it a chance of looking up symbols. Report
10912 support for fast tracepoints.
10913 (handle_status): Stabilize threads.
10914 (process_serial_event): Adjust.
10915 * server.h (struct fast_tracepoint_jump): Forward declare.
10916 (struct process_info) <fast_tracepoint_jumps>: New field.
10917 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10918 (decode_X_packet, decode_M_packet): Adjust.
10919 (relocate_instruction): Declare.
10920 (in_process_agent_loaded): Declare.
10921 (tracepoint_look_up_symbols): Declare.
10922 (struct fast_tpoint_collect_status): Declare.
10923 (fast_tracepoint_collecting): Declare.
10924 (force_unlock_trace_buffer): Declare.
10925 (handle_tracepoint_bkpts): Declare.
10926 (initialize_low_tracepoint)
10927 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10928 * target.h (struct target_ops) <stabilize_threads,
10929 install_fast_tracepoint_jump_pad>: New fields.
10930 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10931 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10932 [HAVE_STDINT_H]: Include stdint.h.
10933 (trace_debug_1): Rename to ...
10934 (trace_vdebug): ... this.
10935 (trace_debug): Rename to ...
10936 (trace_debug_1): ... this. Add `level' parameter.
10937 (trace_debug): New.
10938 (ATTR_USED, ATTR_NOINLINE): New.
10939 (IP_AGENT_EXPORT): New.
10940 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10941 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10942 (about_to_request_buffer_space, trace_buffer_is_full)
10943 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10944 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10945 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10946 (traceframe_write_count, traceframes_created)
10947 (trace_state_variables)
10948 New renaming defines.
10949 (struct ipa_sym_addresses): New.
10950 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10951 (symbol_list): New.
10952 (ipa_sym_addrs): New.
10953 (all_tracepoint_symbols_looked_up): New.
10954 (in_process_agent_loaded): New.
10955 (write_e_ipa_not_loaded): New.
10956 (maybe_write_ipa_not_loaded): New.
10957 (tracepoint_look_up_symbols): New.
10958 (debug_threads) [IN_PROCESS_AGENT]: New.
10959 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10960 (UNKNOWN_SIDE_EFFECTS): New.
10961 (stop_tracing): New.
10962 (flush_trace_buffer): New.
10963 (stop_tracing_bkpt): New.
10964 (flush_trace_buffer_bkpt): New.
10965 (read_inferior_integer): New.
10966 (read_inferior_uinteger): New.
10967 (read_inferior_data_pointer): New.
10968 (write_inferior_data_pointer): New.
10969 (write_inferior_integer): New.
10970 (write_inferior_uinteger): New.
10971 (struct collect_static_trace_data_action): Delete.
10972 (enum tracepoint_type): New.
10973 (struct tracepoint) <type>: New field `type'.
10974 <actions_str, step_actions, step_actions_str>: Only include in
10976 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10977 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10978 (tracepoints): Use IP_AGENT_EXPORT.
10979 (last_tracepoint): Don't include in the IPA.
10980 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10981 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10982 (alloced_trace_state_variables): New.
10983 (trace_state_variables): Use IP_AGENT_EXPORT.
10984 (traceframe_t): Delete unused variable.
10985 (circular_trace_buffer): Don't include in the IPA.
10986 (trace_buffer_start): Delete.
10987 (struct trace_buffer_control): New.
10988 (trace_buffer_free): Delete.
10989 (struct ipa_trace_buffer_control): New.
10990 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10991 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10993 (trace_buffer_ctrl): New.
10994 (TRACE_BUFFER_CTRL_CURR): New.
10995 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10996 Reimplement as macros.
10997 (trace_buffer_wrap): Delete.
10998 (traceframe_write_count, traceframe_read_count)
10999 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11000 (struct tracepoint_hit_ctx) <type>: New field.
11001 (struct fast_tracepoint_ctx): New.
11002 (memory_barrier): New.
11004 (record_tracepoint_error): Update atomically in the IPA.
11005 (clear_inferior_trace_buffer): New.
11006 (about_to_request_buffer_space): New.
11007 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11008 updating the same buffer.
11009 (add_tracepoint): Default the tracepoint's type to trap
11010 tracepoint, and orig_size to -1.
11011 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11012 internal variables.
11013 (create_trace_state_variable): New parameter `gdb'. Handle it.
11014 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11015 (cmd_qtdp): Handle fast tracepoints.
11016 (cmd_qtdv): Adjust.
11017 (max_jump_pad_size): New.
11018 (gdb_jump_pad_head): New.
11019 (get_jump_space_head): New.
11020 (claim_jump_space): New.
11021 (sort_tracepoints): New.
11022 (MAX_JUMP_SIZE): New.
11023 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11025 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11026 support. Upload fast traceframes, and delete internal IPA
11028 (stop_tracing_handler): New.
11029 (flush_trace_buffer_handler): New.
11030 (cmd_qtstop): Upload fast tracepoints.
11031 (response_tracepoint): Handle fast tracepoints.
11032 (tracepoint_finished_step): Upload fast traceframes. Set the
11033 tracepoint hit context's tracepoint type.
11034 (handle_tracepoint_bkpts): New.
11035 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11036 type. Add comment about fast tracepoints.
11037 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11038 non-existing action_str field.
11039 (get_context_regcache): Handle fast tracepoints.
11040 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11042 (fast_tracepoint_from_jump_pad_address): New.
11043 (fast_tracepoint_from_ipa_tpoint_address): New.
11044 (collecting_t): New.
11045 (force_unlock_trace_buffer): New.
11046 (fast_tracepoint_collecting): New.
11048 (gdb_collect): New.
11049 (write_inferior_data_ptr): New.
11050 (target_tp_heap): New.
11051 (target_malloc): New.
11052 (download_agent_expr): New.
11054 (download_tracepoints): New.
11055 (download_trace_state_variables): New.
11056 (upload_fast_traceframes): New.
11057 (IPA_FIRST_TRACEFRAME): New.
11058 (IPA_NEXT_TRACEFRAME_1): New.
11059 (IPA_NEXT_TRACEFRAME): New.
11060 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11061 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11062 (gdb_jump_pad_buffer_end): New.
11063 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11064 (initialize_tracepoint): Adjust.
11065 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11066 buffer. Initialize the low module.
11067 * utils.c (PREFIX, TOOLNAME): New.
11068 (malloc_failure): Use PREFIX.
11069 (error): In the IPA, an error causes an exit.
11070 (fatal, warning): Use PREFIX.
11071 (internal_error): Use TOOLNAME.
11072 (NUMCELLS): Increase to 10.
11073 * configure, config.in: Regenerate.
11075 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11077 * server.c (handle_query) <qSupported>: Do two passes over the
11078 qSupported string to avoid nesting strtok.
11080 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11082 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11084 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11085 -Wl,--dynamic-list.
11086 * configure: Regenerate.
11087 * proc-service.list: New.
11089 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11091 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11094 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11096 * gdbreplay.c (remote_open): Check error return from socket() call by
11097 its equality to -1 not by it being negative.
11098 * remote-utils.c (remote_open): Likewise.
11100 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11102 * config.h: Regenerate.
11104 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11106 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11107 doesn't provide PTRACE_GET_THREAD_AREA.
11109 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11111 * linux-m68k-low.c: Include <asm/ptrace.h>
11112 (ps_get_thread_area): Implement.
11114 2010-05-03 Doug Evans <dje@google.com>
11116 * event-loop.c (struct callback_event): New struct.
11117 (callback_list): New global.
11118 (append_callback_event, delete_callback_event): New functions.
11119 (process_callback): New function.
11120 (start_event_loop): Call it.
11121 * remote-utils.c (NOT_SCHEDULED): Define.
11122 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11123 moved out of readchar.
11124 (readchar): Rewrite. Call reschedule before returning.
11125 (reset_readchar): New function.
11126 (remote_close): Call it.
11127 (process_remaining, reschedule): New functions.
11128 * server.h (callback_handler_func): New typedef.
11129 (append_callback_event, delete_callback_event): Declare.
11131 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11133 * proc-service.c (ps_pglobal_lookup): Use
11134 thread_db_look_up_one_symbol.
11135 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11136 parameter. Use it instead of all_symbols_looked_up.
11137 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11139 (all_symbols_looked_up): Don't declare.
11140 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11141 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11143 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11144 Set all_symbols_looked_up here.
11145 (thread_db_look_up_one_symbol): New.
11146 (thread_db_get_tls_address): Adjust.
11147 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11148 thread_db object on the heap, and tentatively set it in the
11150 (thread_db_init): Don't set all_symbols_looked_up here.
11151 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11153 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11155 * linux-low.c (linux_kill, linux_detach): Adjust.
11156 (status_pending_p_callback): Remove redundant statement. Check
11157 for !TARGET_WAITIKIND_IGNORE, instead of
11158 TARGET_WAITKIND_STOPPED.
11159 (handle_tracepoints): Make sure LWP is locked. Adjust.
11160 (linux_wait_for_event_1): Adjust.
11161 (linux_cancel_breakpoints): New.
11162 (unsuspend_one_lwp): New.
11163 (unsuspend_all_lwps): New.
11164 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11165 (send_sigstop_callback): Change return type to int, add new
11166 `except' parameter and handle it.
11167 (suspend_and_send_sigstop_callback): New.
11168 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11169 pass them down. If SUSPEND, also increment the lwp's suspend
11171 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11172 (need_step_over_p): Don't consider suspended LWPs.
11173 (start_step_over): Adjust.
11174 (proceed_one_lwp): Change return type to int, add new `except'
11175 parameter and handle it.
11176 (unsuspend_and_proceed_one_lwp): New.
11177 (proceed_all_lwps): Use find_inferior instead of
11179 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11180 also decrement the suspend count of LWPs. Pass `except' down,
11181 instead of hacking its suspend count.
11182 (linux_pause_all): Add `freeze' parameter. Adjust.
11183 (linux_unpause_all): New.
11184 (linux_target_ops): Install linux_unpause_all.
11185 * server.c (handle_status): Adjust.
11186 * target.h (struct target_ops): New fields `unpause_all' and
11187 `cancel_breakpoints'. Add new parameter to `pause_all'.
11188 (pause_all): Add new `freeze' parameter.
11189 (unpause_all): New.
11190 (cancel_breakpoints): New.
11191 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11192 cancel breakpoints.
11193 (cmd_qtstart): Pause threads.
11194 (stop_tracing): Pause threads, and cancel breakpoints.
11195 * win32-low.c (win32_target_ops): Adjust.
11197 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11199 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11200 the inferior right away from here...
11201 (linux_wait_1): ... to here, and adjust to check the thread's
11202 last_resume_kind instead of the lwp's step or stop_expected flags.
11204 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11206 * README: Use consistent `GDB' and `GDBserver' spellings.
11208 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11210 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11211 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11212 (linux_detach_one_lwp): Assume the lwp is stopped.
11213 (any_thread_of): Delete.
11214 (linux_detach): Stop all lwps here. Don't blindly delete all
11216 (delete_lwp_callback): New.
11217 (linux_mourn): Delete all lwps of the process that is gone.
11218 (linux_wait_1): Don't delete the last lwp of the process here.
11219 * mem-break.h (mark_breakpoints_out): Declare.
11220 * mem-break.c (mark_breakpoints_out): New.
11221 (free_all_breakpoints): Use it.
11222 * server.c (handle_target_event): If the process is gone, mark
11224 * thread-db.c (struct thread_db) <create_bp>: New field.
11225 (thread_db_enable_reporting): Fix prototype. Store a thread event
11226 breakpoint reference in the thread_db struct.
11227 (thread_db_load_search): Clear the thread_db object.
11228 (try_thread_db_load_1): Ditto.
11229 (switch_to_process): New.
11230 (disable_thread_event_reporting): Use it.
11231 (remove_thread_event_breakpoints): New.
11232 (thread_db_detach, thread_db_mourn): Use it.
11234 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11236 * linux-low.c (linux_enable_event_reporting): New.
11237 (linux_wait_for_event_1, handle_extended_wait): Use it.
11239 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11241 * linux-low.c (linux_kill_one_lwp, linux_kill)
11242 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11243 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11244 SIGSTOP even if the LWP is stopped.
11245 (send_sigstop_callback): New.
11246 (stop_all_lwps): Use send_sigstop_callback instead.
11247 (linux_resume_one_thread): Adjust.
11248 (proceed_one_lwp): Still proceed an LWP that the client has
11249 requested to stop, if we haven't reported it as stopped yet. Make
11250 sure that LWPs the client want stopped, have a pending SIGSTOP.
11252 2010-04-26 Doug Evans <dje@google.com>
11254 * server.c (handle_general_set): Make static.
11256 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11257 Print received char after testing for error/eof instead of before.
11258 (input_interrupt): Tweak comment.
11260 2010-04-23 Doug Evans <dje@google.com>
11262 * server.c (start_inferior): Print inferior argv if --debug.
11264 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11266 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11267 * nto-x86-low.c: Include server.h
11269 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11271 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11272 be consistent with other sources of this directory.
11273 (init_registers_amd64): Correct name of source file of this function
11276 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11278 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11279 64-bit executables.
11281 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11283 * win32-i386-low.c: Add 64-bit support.
11284 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11285 (init_registers_amd64): Declare.
11286 (mappings): Add 64-bit version of array.
11287 (init_windows_x86): New function.
11288 (the_low_target): Change init_arch field to init_windows_x86.
11290 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11292 * win32-low.c: Adapt to support also 64-bit architecture.
11293 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11294 (get_image_name): Use SIZE_T type for local variable `done'.
11295 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11296 (toolhelp_get_dll_name): Idem.
11297 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11298 Use uintptr_t typecast to avoid warning.
11299 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11300 (handle_exception): Use phex_nz to avoid warning.
11301 (win32_wait): Remove unused local variable `process'.
11303 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11305 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11308 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11310 * configure.ac: Use `ws2_32' library for srv_mingw.
11311 * configure: Regenerate.
11312 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11313 * remote-utils.c: Likewise.
11315 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11317 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11318 if __x86_64__ is defined.
11320 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11322 * configure: Regenerate.
11324 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11326 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11327 * target.h (target_ops): New get_tib_address field.
11328 * win32-low.h (win32_thread_info): Add thread_local_base field.
11329 * win32-low.c (child_add_thread): Add tlb argument.
11330 Set thread_local_base field to TLB.
11331 (get_child_debug_event): Adapt to child_add_thread change.
11332 (win32_get_tib_address): New function.
11333 (win32_target_ops): Set get_tib_address field to
11334 win32_get_tib_address.
11335 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11337 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11339 * linux-low.c (linux_mourn): Also remove the process.
11340 * server.c (handle_target_event): Don't remove the process here.
11341 * nto-low.c (nto_mourn): New.
11342 (nto_target_ops): Install it.
11343 * spu-low.c (spu_mourn): New.
11344 (spu_target_ops): Install it.
11345 * win32-low.c (win32_mourn): New.
11346 (win32_target_ops): Install it.
11348 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11350 * server.h (buffer_xml_printf): Remove redundant `;'.
11352 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11354 * regcache.c (set_register_cache): Invalidate regcaches before
11355 changing the register cache layout.
11356 (regcache_invalidate_one): Allow a NULL regcache.
11357 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11358 regcaches before changing the register cache layout or the target
11361 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11363 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11364 variable warning on Linux/x86-64.
11366 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11368 GDBserver disconnected tracing support.
11370 * linux-low.c (linux_remove_process): Delete.
11371 (add_lwp): Don't set last_resume_kind here.
11372 (linux_kill): Use `mourn'.
11373 (linux_detach): Use `thread_db_detach', and `mourn'.
11374 (linux_mourn): New.
11375 (linux_attach_lwp_1): Adjust comment.
11376 (linux_attach): last_resume_kind moved the thread_info; adjust.
11377 (status_pending_p_callback): Adjust.
11378 (linux_wait_for_event_1): Adjust.
11379 (count_events_callback, select_singlestep_lwp_callback)
11380 (select_event_lwp_callback, cancel_breakpoints_callback)
11381 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11382 (proceed_one_lwp): Adjust.
11383 (linux_async): Add debug output.
11384 (linux_thread_stopped): New.
11385 (linux_pause_all): New.
11386 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11388 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11389 (thread_db_free): Delete declaration.
11390 (thread_db_detach, thread_db_mourn): Declare.
11391 * thread-db.c (thread_db_init): Use thread_db_mourn.
11392 (thread_db_free): Delete, split in two.
11393 (disable_thread_event_reporting): New.
11394 (thread_db_detach): New.
11395 (thread_db_mourn): New.
11397 * server.h (struct thread_info) <last_resume_kind>: New field.
11398 <attached>: Add comment.
11399 <gdb_detached>: New field.
11400 (handler_func): Change return type to int.
11401 (handle_serial_event, handle_target_event): Ditto.
11402 (gdb_connected): Declare.
11404 (disconnected_tracing): Declare.
11405 (stop_tracing): Declare.
11407 * server.c (handle_query) <qSupported>: Report support for
11408 disconnected tracing.
11409 (queue_stop_reply_callback): Account for running threads.
11410 (gdb_wants_thread_stopped): New.
11411 (gdb_wants_all_threads_stopped): New.
11412 (gdb_reattached_process): New.
11413 (handle_status): Clear the `gdb_detached' flag of all processes.
11414 In all-stop, stop all threads.
11415 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11416 (process_serial_event): If the remote connection breaks, or if an
11417 exit was forced with "monitor exit", force an event loop exit.
11418 Handle disconnected tracing on detach.
11419 (handle_serial_event): Adjust.
11420 (handle_target_event): If GDB isn't connected, forward events back
11421 to the inferior, unless the last process exited, in which case,
11422 exit gdbserver. Adjust interface.
11424 * remote-utils.c (remote_open): Don't block in accept. Instead
11425 register an event loop source on the listen socket file
11426 descriptor. Refactor bits into ...
11427 (listen_desc): ... this new global.
11428 (gdb_connected): ... this new function.
11429 (enable_async_notification): ... this new function.
11430 (handle_accept_event): ... this new function.
11431 (remote_close): Clear remote_desc.
11433 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11435 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11437 (mourn_inferior): Define.
11438 (target_process_qsupported): Avoid the dangling else problem.
11439 (thread_stopped): Define.
11440 (pause_all): Define.
11441 (target_waitstatus_to_string): Declare.
11442 * target.c (target_waitstatus_to_string): New.
11444 * tracepoint.c (tracing): Make extern.
11445 (disconnected_tracing): New.
11446 (stop_tracing): Make extern. Handle tracing stops due to GDB
11448 (cmd_qtdisconnected): New.
11449 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11450 (handle_tracepoint_general_set): Handle QTDisconnected.
11452 * event-loop.c (event_handler_func): Change return type to int.
11453 (process_event): Bail out if the event handler wants the event
11455 (handle_file_event): Ditto.
11456 (start_event_loop): Bail out if the event handler wants the event
11459 * nto-low.c (nto_target_ops): Adjust.
11460 * spu-low.c (spu_wait): Don't remove the process here.
11461 (spu_target_ops): Adjust.
11462 * win32-low.c (win32_wait): Don't remove the process here.
11463 (win32_target_ops): Adjust.
11465 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11467 * regcache.c (realloc_register_cache): Invalidate inferior's
11468 regcache before recreating it.
11470 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11472 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11474 2010-04-09 Stan Shebs <stan@codesourcery.com>
11475 Pedro Alves <pedro@codesourcery.com>
11477 * server.h (LONGEST): New.
11478 (struct thread_info) <while_stepping>: New field.
11479 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11481 (initialize_tracepoint, handle_tracepoint_general_set)
11482 (handle_tracepoint_query, tracepoint_finished_step)
11483 (tracepoint_was_hit, release_while_stepping_state_list):
11484 (current_traceframe): Declare.
11485 * server.c (handle_general_set): Handle tracepoint packets.
11486 (read_memory): New.
11487 (write_memory): New.
11488 (handle_search_memory_1): Use read_memory.
11489 (handle_query): Report support for conditional tracepoints, trace
11490 state variables, and tracepoint sources. Handle tracepoint
11492 (main): Initialize the tracepoints module.
11493 (process_serial_event): Handle traceframe reads/writes.
11495 * linux-low.c (handle_tracepoints): New.
11496 (linux_wait_1): Call it.
11497 (linux_resume_one_lwp): Handle while-stepping.
11498 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11499 (linux_target_ops): Install them.
11500 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11502 * linux-x86-low.c (x86_supports_tracepoints): New.
11503 (the_low_target). Install it.
11505 * mem-break.h (delete_breakpoint): Declare.
11506 * mem-break.c (delete_breakpoint): Make external.
11508 * target.h (struct target_ops): Add `supports_tracepoints',
11509 `read_pc', and `write_pc' fields.
11510 (target_supports_tracepoints): Define.
11511 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11514 * regcache.h (struct regcache) <registers_owned>: New field.
11515 (init_register_cache, regcache_cpy): Declare.
11516 (regcache_read_pc, regcache_write_pc): Declare.
11517 (register_cache_size): Declare.
11518 (supply_regblock): Declare.
11519 * regcache.c (init_register_cache): New.
11520 (new_register_cache): Use it.
11521 (regcache_cpy): New.
11522 (register_cache_size): New.
11523 (supply_regblock): New.
11524 (regcache_read_pc, regcache_write_pc): New.
11526 * tracepoint.c: New.
11528 * Makefile.in (OBS): Add tracepoint.o.
11529 (tracepoint.o): New rule.
11531 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11533 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11535 (i386-mmx.c): Likewise.
11536 (i386-mmx-linux.o): Likewise.
11537 (i386-mmx-linux.c): Likewise.
11539 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11540 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11541 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11542 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11544 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11545 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11546 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11548 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11550 * Makefile.in (clean): Updated.
11552 (i386-avx.c): Likewise.
11553 (i386-avx-linux.o): Likewise.
11554 (i386-avx-linux.c): Likewise.
11555 (amd64-avx.o): Likewise.
11556 (amd64-avx.c): Likewise.
11557 (amd64-avx-linux.o): Likewise.
11558 (amd64-avx-linux.c): Likewise.
11560 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11561 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11562 (srv_amd64_regobj): Add amd64-avx.o.
11563 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11564 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11565 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11566 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11567 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11568 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11569 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11571 * i387-fp.c: Include "i386-xstate.h".
11573 (i387_cache_to_xsave): Likewise.
11574 (i387_xsave_to_cache): Likewise.
11575 (x86_xcr0): Likewise.
11577 * i387-fp.h (i387_cache_to_xsave): Likewise.
11578 (i387_xsave_to_cache): Likewise.
11579 (x86_xcr0): Likewise.
11581 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11582 * linux-crisv32-low.c (target_regsets): Likewise.
11583 * linux-m68k-low.c (target_regsets): Likewise.
11584 * linux-mips-low.c (target_regsets): Likewise.
11585 * linux-ppc-low.c (target_regsets): Likewise.
11586 * linux-s390-low.c (target_regsets): Likewise.
11587 * linux-sh-low.c (target_regsets): Likewise.
11588 * linux-sparc-low.c (target_regsets): Likewise.
11589 * linux-xtensa-low.c (target_regsets): Likewise.
11591 * linux-low.c: Include <sys/uio.h>.
11592 (regsets_fetch_inferior_registers): Support nt_type.
11593 (regsets_store_inferior_registers): Likewise.
11594 (linux_process_qsupported): New.
11595 (linux_target_ops): Add linux_process_qsupported.
11597 * linux-low.h (regset_info): Add nt_type.
11598 (linux_target_ops): Add process_qsupported.
11600 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11602 (init_registers_i386_avx_linux): New.
11603 (init_registers_amd64_avx_linux): Likewise.
11604 (xmltarget_i386_linux_no_xml): Likewise.
11605 (xmltarget_amd64_linux_no_xml): Likewise.
11606 (PTRACE_GETREGSET): Likewise.
11607 (PTRACE_SETREGSET): Likewise.
11608 (x86_fill_xstateregset): Likewise.
11609 (x86_store_xstateregset): Likewise.
11610 (use_xml): Likewise.
11611 (x86_linux_update_xmltarget): Likewise.
11612 (x86_linux_process_qsupported): Likewise.
11613 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11614 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11615 init_registers_i386_linux here. Call
11616 x86_linux_update_xmltarget.
11617 (the_low_target): Add x86_linux_process_qsupported.
11619 * server.c (handle_query): Call target_process_qsupported.
11621 * target.h (target_ops): Add process_qsupported.
11622 (target_process_qsupported): New.
11624 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11626 * inferiors.c (add_thread): Set last_status kind to
11627 TARGET_WAITKIND_IGNORE.
11628 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11629 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11630 (linux_wait_1): Move `thread' local definition to block that uses
11631 it. Don't NULL initialize `event_child'.
11632 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11633 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11634 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11636 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11638 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11639 an extended waitstatus, or by a watchpoint.
11640 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11641 thread was stepping or has been stopped by a watchpoint.
11643 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11645 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11646 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11647 of another, then delete the previous, and validate all
11649 (validate_inserted_breakpoint): New.
11650 (delete_disabled_breakpoints): New.
11651 (validate_breakpoints): New.
11652 (check_mem_read): Validate breakpoints before trusting their
11653 shadow. Delete disabled breakpoints.
11654 (check_mem_write): Validate breakpoints before trusting they
11655 should be inserted. Delete disabled breakpoints.
11656 * mem-break.h (validate_breakpoints):
11657 * server.c (handle_query): Validate breakpoints when we see a
11660 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11662 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11663 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11664 if we could tell there's a GDB breakpoint at stop_pc.
11665 (need_step_over_p): Don't do a step over if we find a GDB
11666 breakpoint at the resume PC.
11668 * mem-break.c (struct raw_breakpoint): New.
11669 (enum bkpt_type): New type `gdb_breakpoint'.
11670 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11671 fields. New field `raw'.
11672 (find_raw_breakpoint_at): New.
11673 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11674 breakpoint instead.
11675 (set_breakpoint_at): Adjust.
11676 (delete_raw_breakpoint): New.
11677 (release_breakpoint): New.
11678 (delete_breakpoint): Rename to...
11679 (delete_breakpoint_1): ... this. Add proc parameter. Use
11680 release_breakpoint. Return ENOENT.
11681 (delete_breakpoint): Reimplement.
11682 (find_breakpoint_at): Delete.
11683 (find_gdb_breakpoint_at): New.
11684 (delete_breakpoint_at): Delete.
11685 (set_gdb_breakpoint_at): New.
11686 (delete_gdb_breakpoint_at): New.
11687 (gdb_breakpoint_here): New.
11688 (set_reinsert_breakpoint): Use release_breakpoint.
11689 (uninsert_breakpoint): Rename to ...
11690 (uninsert_raw_breakpoint): ... this.
11691 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11692 (reinsert_raw_breakpoint): Change parameter type to
11694 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11696 (check_breakpoints): Adjust. Use release_breakpoint.
11697 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11698 (breakpoint_inserted_here): Ditto.
11699 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11700 Don't trust the breakpoint's shadow if it is not inserted.
11701 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11702 (delete_all_breakpoints): Adjust.
11703 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11704 use delete_breakpoint_1.
11706 * mem-break.h (breakpoints_supported): Delete declaration.
11707 (set_gdb_breakpoint_at): Declare.
11708 (gdb_breakpoint_here): Declare.
11709 (delete_breakpoint_at): Delete.
11710 (delete_gdb_breakpoint_at): Declare.
11712 * server.h (struct raw_breakpoint): Forward declare.
11713 (struct process_info): New field `raw_breakpoints'.
11715 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11718 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11720 * linux-low.c (status_pending_p_callback): Fix comment.
11721 (linux_wait_for_event_1): Move most of the internal breakpoint
11722 handling from here...
11723 (linux_wait_1): ... to here.
11724 (count_events_callback): New.
11725 (select_singlestep_lwp_callback): New.
11726 (select_event_lwp_callback): New.
11727 (cancel_breakpoints_callback): New.
11728 (select_event_lwp): New.
11729 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11730 priority to all LWPs that have had events that should be reported
11731 to the client. Cancel breakpoints when about to reporting the
11732 event to the client, not while stopping lwps. No longer cancel
11733 finished single-steps here.
11734 (cancel_finished_single_step): Delete.
11735 (cancel_finished_single_steps): Delete.
11737 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11739 * mem-break.c (enum bkpt_type): New.
11740 (struct breakpoint): New field `type'.
11741 (set_breakpoint_at): Change return type to struct breakpoint
11742 pointer. Set type to `other_breakpoint' by default.
11743 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11744 in the breakpoint list.
11745 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11746 (reinsert_breakpoint): Rename to ...
11747 (reinsert_raw_breakpoint): ... this.
11748 (reinsert_breakpoints_at): Adjust.
11749 * mem-break.h (struct breakpoint): Declare.
11750 (set_breakpoint_at): Change return type to struct breakpoint
11753 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11755 * server.c (handle_query): Assign, not compare.
11757 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11759 Teach linux gdbserver to step-over-breakpoints.
11761 * linux-low.c (can_hardware_single_step): New.
11762 (supports_breakpoints): New.
11763 (handle_extended_wait): If stopping threads, read the stop pc of
11764 the new cloned LWP.
11766 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11767 low target doesn't support retrieving the PC.
11768 (add_lwp): Set last_resume_kind to resume_continue.
11769 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11770 (linux_attach): Don't clear stop_expected. Set the lwp's
11771 last_resume_kind to resume_stop.
11772 (linux_detach_one_lwp): Don't check for removed breakpoints.
11773 (check_removed_breakpoint): Delete.
11774 (status_pending_p): Rename to ...
11775 (status_pending_p_callback): ... this. Don't check for removed
11776 breakpoints. Don't consider threads that are stopped from GDB's
11778 (linux_wait_for_lwp): Always read the stop_pc here.
11779 (cancel_breakpoint): New.
11780 (step_over_bkpt): New global.
11781 (linux_wait_for_event_1): Implement stepping over breakpoints.
11782 (gdb_wants_lwp_stopped): New.
11783 (gdb_wants_all_stopped): New.
11784 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11785 single-step traps here. Store the thread's last reported target
11787 (send_sigstop): Don't clear stop_expected. Always set it,
11789 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11790 (cancel_finished_single_step): New.
11791 (cancel_finished_single_steps): New.
11792 (wait_for_sigstop): Don't cancel finished single-step traps here.
11793 (linux_resume_one_lwp): Don't check for removed breakpoints.
11794 Don't set `step' on non-hardware step archs.
11795 (linux_set_resume_request): Ignore resume_stop requests if already
11796 stopping or stopped. Set the lwp's last_resume_kind.
11797 (resume_status_pending_p): Don't check for removed breakpoints.
11798 (need_step_over_p): New.
11799 (start_step_over): New.
11800 (finish_step_over): New.
11801 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11802 requests. Clear the thread's last reported target waitstatus.
11803 Don't use the `suspended' flag. Don't consider pending breakpoints.
11804 (linux_resume): Start a step-over if necessary.
11805 (proceed_one_lwp): New.
11806 (proceed_all_lwps): New.
11807 (unstop_all_lwps): New.
11808 * linux-low.h (struct lwp_info): Rewrite comment for the
11809 `suspended' flag. Add the `stop_pc' field. Delete the
11810 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11811 Add `'last_resume_kind' and `need_step_over' fields.
11812 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11813 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11814 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11815 (set_raw_breakpoint_at): New.
11816 (set_breakpoint_at): Rewrite to use it.
11817 (reinsert_breakpoint_handler): Delete.
11818 (set_reinsert_breakpoint): New.
11819 (reinsert_breakpoint_by_bp): Delete.
11820 (delete_reinsert_breakpoints): New.
11821 (uninsert_breakpoint): Rewrite.
11822 (uninsert_breakpoints_at): New.
11823 (reinsert_breakpoint): Rewrite.
11824 (reinsert_breakpoints_at): New.
11825 (check_breakpoints): Rewrite.
11826 (breakpoint_here): New.
11827 (breakpoint_inserted_here): New.
11828 (check_mem_read): Adjust.
11829 * mem-break.h (breakpoints_supported, breakpoint_here)
11830 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11831 (reinsert_breakpoint_by_bp): Delete declaration.
11832 (delete_reinsert_breakpoints): Declare.
11833 (reinsert_breakpoint): Delete declaration.
11834 (reinsert_breakpoints_at): Declare.
11835 (uninsert_breakpoint): Delete declaration.
11836 (uninsert_breakpoints_at): Declare.
11837 (check_breakpoints): Adjust prototype.
11838 * server.h: Adjust include order.
11839 (struct thread_info): Declare here. Add a `last_status' field.
11841 2010-03-23 Michael Snyder <msnyder@vmware.com>
11843 * server.c (crc32): New function.
11844 (handle_query): Add handling for 'qCRC:' request.
11846 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11848 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11849 lwp had been stopped by a watchpoint.
11851 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11853 * server.h (internal_error): Declare.
11854 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11855 * utils.c (internal_error): New function.
11857 2010-03-15 Andreas Schwab <schwab@redhat.com>
11859 * configure.srv: Fix typo setting srv_regobj.
11861 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11863 * linux-low.c (fetch_register): Avoid passing a non string literal
11865 (usr_store_inferior_registers): Ditto.
11867 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11869 * linux-low.c (linux_write_memory): Bail out early if peeking
11872 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11874 * linux-low.h (struct lwp_info): New fields
11875 `stopped_by_watchpoint' and `stopped_data_address'.
11876 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11877 here, and cache them in the lwp object.
11878 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11880 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11882 (linux_stopped_by_watchpoint): Rewrite.
11883 (linux_stopped_data_address): Rewrite.
11885 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11887 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11888 switching the current inferior, not before.
11890 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11892 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11893 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11894 i386-linux.c and amd64-linux.c.
11895 (reg-i386.o): Removed.
11896 (reg-i386.c): Likewise.
11897 (reg-i386-linux.o): Likewise.
11898 (reg-i386-linux.c): Likewise.
11899 (reg-x86-64.o): Likewise.
11900 (reg-x86-64.c): Likewise.
11901 (reg-x86-64-linux.o): Likewise.
11902 (reg-x86-64-linux.c): Likewise.
11904 (i386.c): Likewise.
11905 (i386-linux.o): Likewise.
11906 (i386-linux.c): Likewise.
11907 (amd64.o): Likewise.
11908 (amd64.c): Likewise.
11909 (amd64-linux.o): Likewise.
11910 (amd64-linux.c): Likewise.
11912 * configure.srv (srv_i386_regobj): New.
11913 (srv_i386_linux_regobj): Likewise.
11914 (srv_amd64_regobj): Likewise.
11915 (srv_amd64_linux_regobj): Likewise.
11916 (srv_i386_32bit_xmlfiles): Likewise.
11917 (srv_i386_64bit_xmlfiles): Likewise.
11918 (srv_i386_xmlfiles): Likewise.
11919 (srv_amd64_xmlfiles): Likewise.
11920 (srv_i386_linux_xmlfiles): Likewise.
11921 (srv_amd64_linux_xmlfiles): Likewise.
11922 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11923 srv_xmlfiles to $srv_i386_xmlfiles.
11924 (i[34567]86-*-mingw32ce*): Likewise.
11925 (i[34567]86-*-mingw*): Likewise.
11926 (i[34567]86-*-nto*): Likewise.
11927 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11928 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11929 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11930 (x86_64-*-linux*): Likewise.
11932 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11933 (init_registers_amd64_linux): New.
11934 (x86_arch_setup): Replace init_registers_x86_64_linux with
11935 init_registers_amd64_linux.
11937 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11939 * configure.ac: Check for libdl. If it is not available link against
11940 static libthread_db.
11941 * configure: Regenerate.
11943 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11947 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11948 handing a read watchpoint.
11949 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11951 2010-02-12 Doug Evans <dje@google.com>
11953 * linux-low.c (linux_supports_tracefork_flag): Document.
11954 (linux_look_up_symbols): Add comment.
11956 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11958 * regcache.c (supply_register): Clear regcache if buf is NULL.
11960 2010-02-02 Nicolas Roche <roche@sourceware.org>
11961 Joel Brobecker <brobecker@adacore.com>
11963 * inferiors.c (find_inferior): Add function documentation.
11964 (unloaded_dll): Handle the case where the unloaded dll has not
11965 been previously registered in the dll list.
11967 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11969 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11970 (thumb2_breakpoint): New.
11971 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11973 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11975 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11976 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11979 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11981 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11983 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11985 * linux-s390-low.c (s390_collect_ptrace_register)
11986 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11988 2010-01-21 Doug Evans <dje@google.com>
11990 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11991 (PTRACE_ARG4_TYPE): New macro.
11992 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11993 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11994 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11995 (usr_store_inferior_registers): Ditto.
11996 (linux_read_memory, linux_write_memory): Ditto.
11997 (linux_test_for_tracefork): Ditto.
11999 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12000 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12002 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12004 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12007 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12009 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12010 prototype to take a regcache. Adjust.
12012 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12014 * regcache.h (struct thread_info): Forward declare.
12015 (struct regcache): New.
12016 (new_register_cache): Adjust prototype.
12017 (get_thread_regcache): Declare.
12018 (free_register_cache): Adjust prototype.
12019 (registers_to_string, registers_from_string): Ditto.
12020 (supply_register, supply_register_by_name, collect_register)
12021 (collect_register_as_string, collect_register_by_name): Ditto.
12022 * regcache.c (struct inferior_regcache_data): Delete.
12023 (get_regcache): Rename to ...
12024 (get_thread_regcache): ... this. Adjust. Switch inferior before
12025 fetching registers.
12026 (regcache_invalidate_one): Adjust.
12027 (regcache_invalidate): Fix prototype.
12028 (new_register_cache): Return the new register cache.
12029 (free_register_cache): Change prototype.
12030 (realloc_register_cache): Adjust.
12031 (registers_to_string): Change prototype to take a regcache. Adjust.
12032 (registers_from_string): Ditto.
12033 (register_data): Ditto.
12034 (supply_register): Ditto.
12035 (supply_register_by_name): Ditto.
12036 (collect_register): Ditto.
12037 (collect_register_as_string): Ditto.
12038 (collect_register_by_name): Ditto.
12039 * server.c (process_serial_event): Adjust.
12040 * linux-low.h (regset_fill_func, regset_store_func): Change
12042 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12044 * linux-low.c (get_stop_pc): Adjust.
12045 (check_removed_breakpoint): Adjust.
12046 (linux_wait_for_event): Adjust.
12047 (linux_resume_one_lwp): Adjust.
12048 (fetch_register): Add regcache parameter. Adjust.
12049 (usr_store_inferior_registers): Ditto.
12050 (regsets_fetch_inferior_registers): Ditto.
12051 (regsets_store_inferior_registers): Ditto.
12052 (linux_fetch_registers, linux_store_registers): Ditto.
12053 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12055 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12057 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12058 prototype to take a regcache.
12059 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12060 * remote-utils.c (convert_ascii_to_int, outreg)
12061 (prepare_resume_reply): Change prototype to take a regcache.
12063 * target.h (struct target_ops) <fetch_registers, store_registers>:
12064 Change prototype to take a regcache.
12065 (fetch_inferior_registers, store_inferior_registers): Change
12066 prototype to take a regcache. Adjust.
12067 * proc-service.c (ps_lgetregs): Adjust.
12068 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12069 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12070 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12071 take a regcache. Adjust.
12072 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12073 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12074 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12075 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12076 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12077 (cris_cannot_fetch_register):
12078 (cris_breakpoint_at): Change prototype to take a regcache.
12080 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12081 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12082 to take a regcache. Adjust.
12083 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12085 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12086 take a regcache. Adjust.
12087 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12088 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12089 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12090 * linux-mips-low.c (mips_get_pc):
12091 (mips_set_pc): Change prototype to take a regcache. Adjust.
12092 (mips_reinsert_addr): Adjust.
12093 (mips_collect_register): Change prototype to take a regcache.
12095 (mips_supply_register):
12096 (mips_collect_register_32bit, mips_supply_register_32bit)
12097 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12098 (mips_store_fpregset): Ditto.
12099 * linux-ppc-low.c (ppc_supply_ptrace_register)
12100 (ppc_supply_ptrace_register): Ditto.
12101 (parse_spufs_run): Adjust.
12102 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12103 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12104 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12105 take a regcache. Adjust.
12106 * linux-s390-low.c (s390_collect_ptrace_register)
12107 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12108 (s390_set_pc): Change prototype to take a regcache. Adjust.
12109 (s390_arch_setup): Adjust.
12110 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12111 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12112 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12113 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12114 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12116 (sparc_breakpoint_at): Adjust.
12117 * linux-xtensa-low.c (xtensa_fill_gregset):
12118 (xtensa_store_gregset):
12119 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12120 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12121 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12122 prototype to take a regcache. Adjust.
12123 * win32-arm-low.c (arm_fetch_inferior_register)
12124 (arm_store_inferior_register): Change prototype to take a
12126 * win32-i386-low.c (i386_fetch_inferior_register)
12127 (i386_store_inferior_register): Change prototype to take a
12129 * win32-low.c (child_fetch_inferior_registers)
12130 (child_store_inferior_registers): Change prototype to take a
12132 (win32_wait): Adjust.
12133 (win32_fetch_inferior_registers): Change prototype to take a
12135 (win32_store_inferior_registers): Adjust.
12136 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12137 store_inferior_register>: Change prototype to take a regcache.
12139 2010-01-20 Doug Evans <dje@google.com>
12141 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12143 (linux_wait_for_event1, linux_init_signals): Ditto.
12144 (W_STOPCODE): Provide definition if missing.
12146 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12148 * linux-low.c (linux_core_of_thread): New.
12149 (compare_ints, show_process, list_threads): New.
12150 (linux_qxfer_osdata): Report threads and cores.
12151 (linux_target_op): Register linux_core_of_thread.
12152 * remote-utils.c (prepare_resume_reply): Report the core.
12153 (buffer_xml_printf): Support %d specifier.
12154 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12156 (handle_query): Handle qXfer:threads. Announce availability
12158 * target.h (struct target_ops): New field core_of_thread.
12160 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12162 * Makefile.in (clean): Remove new generated files.
12163 (reg-s390.o, reg-s390.c): Remove rules.
12164 (reg-s390x.o, reg-s390x.c): Likewise.
12165 (s390-linux32.o, s390-linux32.c): Add rules.
12166 (s390-linux64.o, s390-linux64.c): Likewise.
12167 (s390x-linux64.o, s390x-linux64.c): Likewise.
12168 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12169 * linux-s390-low.c: Include <elf.h>.
12170 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12171 (init_registers_s390): Remove prototype.
12172 (init_registers_s390x): Likewise.
12173 (init_registers_s390_linux32): Add prototype.
12174 (init_registers_s390_linux64): Likewise.
12175 (init_registers_s390x_linux64): Likewise.
12176 (s390_num_regs_3264): New define.
12177 (s390_regmap_3264): New global variable.
12178 (s390_cannot_fetch_register): Remove obsolete check.
12179 (s390_cannot_store_register): Likewise.
12180 (s390_collect_ptrace_register): Handle upper/lower register halves.
12181 (s390_supply_ptrace_register): Likewise.
12182 (s390_fill_gregset): Update to register number changes.
12183 (s390_get_hwcap): New routine.
12184 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12185 Install appropriate regmap and register set.
12187 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12189 * server.c (gdbserver_version): Update copyright year to 2010.
12190 * gdbreplay.c (gdbreplay_version): Likewise.
12192 2009-12-28 Doug Evans <dje@google.com>
12194 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12195 elf/external.h. Include <elf.h> instead but only if necessary.
12197 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12199 * linux-low.c (linux_remove_process): Remove `detaching'
12200 parameter. Don't release/detach from thread_db here.
12201 (linux_kill): Release/detach from thread_db here, ...
12202 (linux_detach): ... and here, before actually detaching.
12203 (linux_wait_1): ... and here, when a process exits.
12204 * thread-db.c (any_thread_of): New.
12205 (thread_db_free): Switch the current inferior to a thread of the
12208 2009-12-21 Doug Evans <dje@google.com>
12210 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12212 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12213 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12214 warning ifndef __NR_tkill. Move setting of errno there too.
12215 Delete unnecessary resetting of errno after syscall.
12216 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12218 * configure.ac: Check for dladdr.
12219 * config.in: Regenerate.
12220 * configure: Regenerate.
12221 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12222 (try_thread_db_load): Update.
12224 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12226 2009-12-18 Doug Evans <dje@google.com>
12228 * event-loop.c: Include unistd.h if it exists.
12230 * linux-low.c (my_waitpid): Move definition away from being in
12231 between linux_tracefork_child/linux_test_for_tracefork.
12233 * gdb_proc_service.h (psaddr_t): Fix type.
12234 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12235 signature to match glibc.
12237 2009-12-16 Doug Evans <dje@google.com>
12239 * linux-low.c (linux_read_memory): Fix argument to read.
12241 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12243 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12244 events, don't leave current_inferior pointing at null.
12246 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12248 * win32-low.c (LOG): Delete.
12249 (OUTMSG): Output to stderr.
12250 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12251 on compile time LOG macro.
12252 (win32_wait): Fix debug output.
12254 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12256 * win32-low.c (win32_add_one_solib): If the dll name is
12257 "ntdll.dll", prepend the system directory to the dll path.
12259 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12261 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12263 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12264 Vladimir Prus <vladimir@codesourcery.com>
12266 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12267 * configure.ac: Check for __mcoldfire__ and set
12268 gdb_cv_m68k_is_coldfire.
12269 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12270 reg-cf.o and reg-m68k.o.
12271 * configure: Regenerated.
12273 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12275 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12276 Pass it to thread_db_free.
12277 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12278 proper `detaching' argument to linux_remove_process.
12279 * linux-low.h (thread_db_free): Add `detaching' parameter.
12280 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12282 (thread_db_free): Add `detaching' parameter. Only
12283 call td_ta_clear_event if detaching from process.
12285 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12287 * thread-db.c (thread_db_free): Fix typo.
12289 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12292 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12294 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12296 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12297 with an i686 compiler.
12298 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12300 * configure: Rebuilt.
12302 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12306 * server.c (handle_search_memory_1): Correct read_addr initialization
12307 in loop for searching subsequent chunks.
12309 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12311 * configure.ac: New --with-libthread-db option.
12312 * thread-db.c: Allow direct dependence on libthread_db.
12313 (thread_db_free): Adjust.
12314 * config.in: Regenerate.
12315 * configure: Likewise.
12317 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12320 * thread-db.c (attach_thread): New function.
12321 (maybe_attach_thread): Return success/failure.
12322 (find_new_threads_callback): Adjust.
12323 (thread_db_find_new_threads): Loop until no new threads.
12325 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12327 * proc-service.c (ps_lgetregs): Formatting.
12329 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12331 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12332 * configure.ac: Adjust.
12333 * linux-low.h (struct process_info_private): Move members to struct
12335 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12336 * linux-low.c (linux_remove_process): Adjust.
12337 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12338 * server.c (handle_query): Move code ...
12339 (handle_monitor_command): ... here. New function.
12340 * target.h (struct target_ops): New member.
12341 * thread-db.c (struct thread_db): New.
12342 (libthread_db_search_path): New variable.
12343 (thread_db_create_event, thread_db_enable_reporting)
12344 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12345 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12346 (try_thread_db_load_1, dladdr_to_soname): New functions.
12347 (try_thread_db_load, thread_db_load_search): New functions.
12348 (thread_db_init): Search for libthread_db.
12349 (thread_db_free): New function.
12350 (thread_db_handle_monitor_command): Likewise.
12351 * config.in: Regenerate.
12352 * configure: Regenerate.
12354 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12356 * spu-low.c (spu_kill): Wait for inferior to terminate.
12357 Call clear_inferiors.
12358 (spu_detach): Call clear_inferiors.
12360 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12362 * aclocal.m4: Regenerate.
12363 * config.in: Likewise.
12364 * configure: Likewise.
12366 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12368 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12369 (parse_spufs_run): New function.
12370 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12371 (ppc_breakpoint_at): Handle SPU breakpoints.
12373 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12375 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12376 (SPUFS_MAGIC): Define.
12377 (spu_enumerate_spu_ids): New function.
12378 (linux_qxfer_spu): New function.
12379 (linux_target_ops): Install linux_qxfer_spu.
12381 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12383 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12384 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12385 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12386 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12387 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12388 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12389 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12390 (init_registers_powerpc_cell32l): Add prototype.
12391 (init_registers_powerpc_cell64l): Likewise.
12392 (ppc_arch_setup): Detect Cell/B.E. architecture.
12394 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12396 * Makefile.in (datarootdir): New variable.
12398 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12400 * linux-low.c (linux_write_memory): Update debugging output.
12401 * Makefile.in (clean): Add new descriptions.
12402 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12403 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12404 * configure.srv: Add new files for arm*-*-linux*.
12405 * linux-arm-low.c: Add new declarations.
12406 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12407 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12408 (HWCAP_VFPv3D16): New.
12409 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12410 instead of __IWMMXT__.
12411 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12412 (arm_arch_setup): New.
12413 (target_regsets): Remove #ifdef. Add VFP regset.
12414 (the_low_target): Use arm_arch_setup.
12416 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12418 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12419 the main thread again.
12421 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12423 Adding Neutrino gdbserver.
12424 * configure: Regenerated.
12425 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12426 * configure.srv (i[34567]86-*-nto*): New target.
12427 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12428 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12429 (nto_comctrl) [__QNX__]: New function.
12430 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12432 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12434 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12437 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12438 Pedro Alves <pedro@codesourcery.com>
12440 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12441 don't support CONTEXT_EXTENDED_REGISTERS.
12442 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12443 (the_low_target): Install them.
12444 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12445 failing with ERROR_PIPE_NOT_CONNECTED.
12447 2009-06-30 Doug Evans <dje@google.com>
12448 Pierre Muller <muller@ics.u-strasbg.fr>
12450 Add h/w watchpoint support to x86-linux, win32-i386.
12451 * Makefile.in (SFILES): Add i386-low.c
12452 (i386_low_h): Define.
12453 (i386-low.o): Add dependencies.
12454 (linux-x86-low.o): Add i386-low.h dependency.
12455 (win32-i386-low.o): Ditto.
12456 * i386-low.c: New file.
12457 * i386-low.h: New file.
12458 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12459 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12460 * linux-low.c (linux_add_process): Initialize arch_private.
12461 (linux_remove_process): Free arch_private.
12462 (add_lwp): Initialize arch_private.
12463 (delete_lwp): Free arch_private.
12464 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12466 * linux-low.h (process_info_private): New member arch_private.
12467 (lwp_info): New member arch_private.
12468 (linux_target_ops): New members new_process, new_thread,
12470 (ptid_of): New macro.
12471 * linux-x86-low.c: Include stddef.h, i386-low.h.
12472 (arch_process_info): New struct.
12473 (arch_lwp_info): New struct.
12474 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12475 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12476 (i386_dr_low_get_status): New function.
12477 (x86_insert_point, x86_remove_point): New functions.
12478 (x86_stopped_by_watchpoint): New function.
12479 (x86_stopped_data_address): New function.
12480 (x86_linux_new_process, x86_linux_new_thread): New functions.
12481 (x86_linux_prepare_to_resume): New function.
12482 (the_low_target): Add entries for insert_point, remove_point,
12483 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12485 * server.c (debug_hw_points): New global.
12486 (monitor_show_help): Document set debug-hw-points.
12487 (handle_query): Process "set debug-hw-points".
12488 * server.h (debug_hw_points): Declare.
12489 (paddress): Declare.
12490 * utils.c (NUMCELLS, CELLSIZE): New macros.
12491 (get_sell, xsnprintf, paddress): New functions.
12492 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12493 remove_point, stopped_by_watchpoint, stopped_data_address.
12494 * win32-i386-low.c: Include i386-low.h.
12495 (debug_reg_state): Replaces dr.
12496 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12497 (i386_dr_low_get_status): New function.
12498 (i386_insert_point, i386_remove_point): New functions.
12499 (i386_stopped_by_watchpoint): New function.
12500 (i386_stopped_data_address): New function.
12501 (i386_initial_stuff): Update.
12502 (get_thread_context,set_thread_context,i386_thread_added): Update.
12503 (the_low_target): Add entries for insert_point,
12504 remove_point, stopped_by_watchpoint, stopped_data_address.
12505 * win32-low.c (win32_insert_watchpoint): New function.
12506 (win32_remove_watchpoint): New function.
12507 (win32_stopped_by_watchpoint): New function.
12508 (win32_stopped_data_address): New function.
12509 (win32_target_ops): Add entries for insert_watchpoint,
12510 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12511 * win32-low.h (win32_target_ops): New members insert_point,
12512 remove_point, stopped_by_watchpoint, stopped_data_address.
12514 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12516 * server.c (process_serial_event): Re-return unsupported, not
12517 error, if the type isn't recognized. Re-allow supporting only
12518 insert or remove packets. Also call require_running for
12519 breakpoints. Add missing break statement to default case. Tidy.
12520 * target.h (struct target_ops): Rename insert_watchpoint to
12521 insert_point, and remove_watchpoint to remove_point.
12523 * linux-low.h (struct linux_target_ops): Likewise.
12524 * linux-low.c (linux_insert_watchpoint): Rename to ...
12525 (linux_insert_point): ... this. Adjust.
12526 (linux_remove_watchpoint): Rename to ...
12527 (linux_remove_point): ... this. Adjust.
12528 (linux_target_ops): Adjust.
12529 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12530 (cris_insert_point): ... this.
12531 (cris_remove_watchpoint): Rename to ...
12532 (cris_remove_point): ... this.
12533 (the_low_target): Adjust.
12535 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12537 * server.c (handle_v_kill): Pass signal_pid to
12538 kill_inferior if multi_process is zero.
12540 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12542 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12543 * target.h (target_ops): Comment for *_watchpoint to make it clear
12544 the functions can get types '0' and '1'.
12546 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12548 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12549 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12550 * regcache.c (get_regcache): Likewise.
12551 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12552 * win32-low.c (child_fetch_inferior_registers): Remove check for
12555 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12556 Pedro Alves <pedro@codesourcery.com>
12558 * target.h (struct target_ops) <supports_multi_process>: New
12560 (target_supports_multi_process): New.
12561 * server.c (handle_query): Even if GDB reports support, only
12562 enable multi-process if the target also supports it. Report
12563 multi-process support only if the target backend supports it.
12564 * linux-low.c (linux_supports_multi_process): New function.
12565 (linux_target_ops): Install it as target_supports_multi_process
12568 2009-05-24 Doug Evans <dje@google.com>
12570 Global renaming of find_thread_pid to find_thread_ptid.
12571 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12572 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12573 All callers updated.
12575 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12576 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12579 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12580 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12581 (linux_resume_one_lwp): Ditto.
12583 2009-05-23 Doug Evans <dje@google.com>
12585 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12586 from struct inferior_list_entry * to struct lwp_info *.
12587 All callers updated.
12589 2009-05-13 Doug Evans <dje@google.com>
12591 * linux-x86-low.c: Don't include assert.h.
12592 (x86_siginfo_fixup): Use fatal, not assert.
12593 (x86_arch_setup): Fix comment.
12595 2009-05-12 Doug Evans <dje@google.com>
12597 Biarch support for i386/amd64 gdbserver.
12598 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12599 Add linux-x86-low.c.
12600 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12601 (linux-x86-low.o): Add.
12602 * linux-x86-64-low.c: Delete.
12603 * linux-i386-low.c: Delete.
12604 * linux-x86-low.c: New file.
12605 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12607 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12609 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12610 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12611 (linux_child_pid_to_exec_file): New function.
12612 (elf_64_header_p, elf_64_file_p): New functions.
12613 (siginfo_fixup): New function.
12614 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12615 give target a chance to convert layout.
12616 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12617 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12619 2009-05-07 Doug Evans <dje@google.com>
12621 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12622 (regsets_store_inferior_registers): Ditto.
12624 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12628 * linux-low.c (must_set_ptrace_flags): Delete.
12629 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12631 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12632 `lwp->must_set_ptrace_flags' instead.
12633 (linux_wait_for_event_1): Set ptrace options here.
12634 (linux_wait_1): ... not here.
12636 2009-04-30 Doug Evans <dje@google.com>
12638 * inferiors.c (started_inferior_callback): New function.
12639 (attached_inferior_callback): New function.
12640 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12641 * server.c (print_started_pid, print_attached_pid): New functions.
12642 (detach_or_kill_for_exit): New function.
12643 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12644 * server.h (have_started_inferiors_p): Declare.
12645 (have_attached_inferiors_p): Declare.
12647 * inferiors.c (remove_process): Fix memory leak, free process.
12648 * linux-low.c (linux_remove_process): New function.
12649 (linux_kill): Call it instead of remove_process.
12650 (linux_detach, linux_wait_1): Ditto.
12652 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12654 * configure.srv: Add x86 Windows CE target.
12656 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12658 * inferiors.c (get_thread_process): Make global.
12659 * server.h (get_thread_process): Add prototype.
12660 * thread-db.c (find_one_thread): Use get_thread_process
12661 instead of current_process.
12662 (thread_db_get_tls_address): Do not crash if called when
12663 thread layer is not yet initialized.
12665 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12667 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12668 * spu-low.c (current_tid): Rename to ...
12669 (current_ptid): ... this.
12670 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12671 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12672 ptid_get_lwp (current_ptid) instead of current_tid.
12673 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12674 instead of current_tid. Use find_process_pid to verify pid
12675 argument is valid. Pass proper argument to remove_process.
12676 (spu_thread_alive): Compare current_ptid instead of current_tid.
12677 (spu_resume): Likewise.
12679 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12681 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12684 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12686 Implement the multiprocess extensions, and add linux multiprocess
12689 * server.h (ULONGEST): Declare.
12690 (struct ptid, ptid_t): New.
12691 (minus_one_ptid, null_ptid): Declare.
12692 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12693 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12694 (struct inferior_list_entry): Change `id' type from unsigned from
12696 (struct sym_cache, struct breakpoint, struct
12697 process_info_private): Forward declare.
12698 (struct process_info): Declare.
12699 (current_process): Declare.
12700 (all_processes): Declare.
12701 (initialize_inferiors): Declare.
12702 (add_thread): Adjust to use ptid_t.
12703 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12704 (add_process, remove_process, find_thread_pid): Declare.
12705 (find_inferior_id): Adjust to use ptid_t.
12706 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12707 (multi_process): Declare.
12708 (push_event): Adjust to use ptid_t.
12709 (read_ptid, write_ptid): Declare.
12710 (prepare_resume_reply): Adjust to use ptid_t.
12711 (clear_symbol_cache): Declare.
12712 * inferiors.c (all_processes): New.
12713 (null_ptid, minus_one_ptid): New.
12714 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12715 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12716 (add_thread): Change unsigned long to ptid. Remove gdb_id
12718 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12719 (gdb_id_to_thread): Rename to ...
12720 (find_thread_pid): ... this. Change unsigned long to ptid.
12721 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12722 (loaded_dll, pull_pid_from_list): Adjust.
12723 (add_process, remove_process, find_process_pid)
12724 (get_thread_process, current_process, initialize_inferiors): New.
12725 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12726 (struct target_waitstatus) <related_pid>: Ditto.
12727 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12728 return type to int.
12729 (struct target_ops) <join>: Add `pid' argument.
12730 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12731 (struct target_ops) <wait>: Add `ptid' field. Change return type
12733 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12734 (mywait): Add `ptid' argument. Change return type to ptid_t.
12735 (target_pid_to_str): Declare.
12736 * target.c (set_desired_inferior): Adjust to use ptids.
12737 (mywait): Add new `ptid' argument. Adjust.
12738 (target_pid_to_str): New.
12739 * mem-break.h (free_all_breakpoints): Declare.
12740 * mem-break.c (breakpoints): Delelete.
12741 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12742 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12743 to use per-process breakpoint list.
12744 (free_all_breakpoints): New.
12745 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12746 (symbol_cache, all_symbols_looked_up): Delete.
12748 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12750 (prepare_resume_reply): Change ptid argument's type from unsigned
12751 long to ptid_t. Adjust. Implement W;process and X;process.
12752 (free_sym_cache, clear_symbol_cache): New.
12753 (look_up_one_symbol): Adjust to per-process symbol cache. *
12754 * server.c (cont_thread, general_thread, step_thread): Change type
12756 (attached): Delete.
12757 (multi_process): New.
12758 (last_ptid): Change type to ptid_t.
12759 (struct vstop_notif) <ptid>: Change type to ptid_t.
12760 (queue_stop_reply, push_event): Change `ptid' argument's type to
12762 (discard_queued_stop_replies): Add `pid' argument.
12763 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12764 changes. Don't reference the `attached' global.
12765 (attach_inferior): Adjust to mywait interface changes.
12766 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12767 features. Handle and report "multiprocess+". Handle
12769 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12771 (handle_v_kill): New.
12772 (handle_v_stopped): Adjust to use target_pid_to_str.
12773 (handle_v_requests): Allow multiple attaches and runs when
12774 multiprocess extensions are in effect. Handle "vKill".
12775 (myresume): Adjust to use ptids.
12776 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12777 (handle_status): Adjust to discard_queued_stop_replies interface
12779 (first_thread_of, kill_inferior_callback)
12780 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12781 (main): Call initialize_inferiors. Adjust to use ptids, killing
12782 and detaching from all inferiors. Handle multiprocess packet
12784 * linux-low.h: Include gdb_proc_service.h.
12785 (struct process_info_private): New.
12786 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12787 <lwpid_of>: Use ptid_get_lwp.
12788 (get_lwp_thread): Adjust.
12789 (struct lwp_info): Add `dead' member.
12790 (find_lwp_pid): Declare.
12791 * linux-low.c (thread_db_active): Delete.
12792 (new_inferior): Adjust comment.
12793 (inferior_pid): Delete.
12794 (linux_add_process): New.
12795 (handle_extended_wait): Adjust.
12796 (add_lwp): Change unsigned long to ptid.
12797 (linux_create_inferior): Add process to processes table. Adjust
12798 to use ptids. Don't set new_inferior here.
12799 (linux_attach_lwp): Rename to ...
12800 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12801 it. Adjust to use ptids.
12802 (linux_attach_lwp): New.
12803 (linux_attach): Add process to processes table. Don't set
12805 (struct counter): New.
12806 (second_thread_of_pid_p, last_thread_of_process_p): New.
12807 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12808 multiple processes.
12809 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12810 processes. Remove process from process table.
12811 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12812 to multiple processes.
12813 (any_thread_of): New.
12814 (linux_detach): Add `pid' argument, and handle it. Remove process
12815 from processes table.
12816 (linux_join): Add `pid' argument. Handle it.
12817 (linux_thread_alive): Change unsighed long argument to ptid_t.
12818 Consider dead lwps as not being alive.
12819 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12820 threads we're not interested in.
12821 (same_lwp, find_lwp_pid): New.
12822 (linux_wait_for_lwp): Change `pid' argument's type from int to
12824 (linux_wait_for_event): Rename to ...
12825 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12826 from int to ptid_t. Adjust.
12827 (linux_wait_for_event): New.
12828 (linux_wait_1): Add `ptid' argument. Change return type to
12829 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12830 that exit from the process table.
12831 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12833 (mark_lwp_dead): New.
12834 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12835 stopping all threads, mark its main lwp as dead.
12836 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12838 (fetch_register, usr_store_inferior_registers)
12839 (regsets_fetch_inferior_registers)
12840 (regsets_store_inferior_registers, linux_read_memory)
12841 (linux_write_memory): Inline `inferior_pid'.
12842 (linux_look_up_symbols): Adjust to use per-process
12843 `thread_db_active'.
12844 (linux_request_interrupt): Adjust to use ptids.
12845 (linux_read_auxv): Inline `inferior_pid'.
12846 (initialize_low): Don't reference thread_db_active.
12847 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12848 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12849 (ps_getpid): Return the pid of the current inferior.
12850 * thread-db.c (proc_handle, thread_agent): Delete.
12851 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12853 (find_one_thread): Change argument type to ptid_t. Adjust to
12855 (maybe_attach_thread): Adjust to per-process data and ptids.
12856 (thread_db_find_new_threads): Ditto.
12857 (thread_db_init): Ditto.
12858 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12859 processes table. Adjust to use ptids.
12860 (spu_kill, spu_detach): Adjust interface. Remove process from
12862 (spu_join, spu_thread_alive): Adjust interface.
12863 (spu_wait): Adjust interface. Remove process from processes
12864 table. Adjust to use ptids.
12865 * win32-low.c (current_inferior_tid): Delete.
12866 (current_inferior_ptid): New.
12867 (debug_event_ptid): New.
12868 (thread_rec): Take a ptid. Adjust.
12869 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12870 (child_delete_thread): Ditto.
12871 (do_initial_child_stuff): Add `attached' argument. Add process to
12873 (child_fetch_inferior_registers, child_store_inferior_registers):
12875 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12876 (win32_attach): Pass 1 to do_initial_child_stuff.
12877 (win32_kill): Adjust interface. Remove process from processes
12879 (win32_detach): Ditto.
12880 (win32_join): Adjust interface.
12881 (win32_thread_alive): Take a ptid.
12882 (win32_resume): Adjust to use ptids.
12883 (get_child_debug_event): Ditto.
12884 (win32_wait): Adjust interface. Remove exiting process from
12887 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12889 Non-stop mode support.
12891 * server.h (non_stop): Declare.
12892 (gdb_client_data, handler_func): Declare.
12893 (delete_file_handler, add_file_handler, start_event_loop):
12895 (handle_serial_event, handle_target_event, push_event)
12896 (putpkt_notif): Declare.
12897 * target.h (enum resume_kind): New.
12898 (struct thread_resume): Replace `step' field by `kind' field.
12899 (TARGET_WNOHANG): Define.
12900 (struct target_ops) <wait>: Add `options' argument.
12901 <supports_non_stop, async, start_non_stop>: New fields.
12902 (target_supports_non_stop, target_async): New.
12903 (start_non_stop): Declare.
12904 (mywait): Add `options' argument.
12905 * target.c (mywait): Add `options' argument. Print child exit
12906 notifications here.
12907 (start_non_stop): New.
12908 * server.c (non_stop, own_buf, mem_buf): New globals.
12909 (struct vstop_notif): New.
12910 (notif_queue): New global.
12911 (queue_stop_reply, push_event, discard_queued_stop_replies)
12912 (send_next_stop_reply): New.
12913 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12915 (attach_inferior): In non-stop mode, don't wait for the target
12917 (handle_general_set): Handle QNonStop.
12918 (handle_query): When handling qC, return the current general
12919 thread, instead of the first thread of the list.
12920 (handle_query): If the backend supports non-stop mode, include
12921 QNonStop+ in the qSupported query response.
12922 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12924 (handle_v_attach, handle_v_run): Handle non-stop mode.
12925 (handle_v_stopped): New.
12926 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12927 (myresume): Adjust to use resume_kind. Handle non-stop.
12928 (queue_stop_reply_callback): New.
12929 (handle_status): Handle non-stop mode.
12930 (main): Clear non_stop flag on reconnection. Use the event-loop.
12931 Refactor serial protocol handling from here ...
12932 (process_serial_event): ... to this new function. When GDB
12933 selects any thread, select one here. In non-stop mode, wait until
12934 GDB acks all pending events before exiting.
12935 (handle_serial_event, handle_target_event): New.
12936 * remote-utils.c (remote_open): Install remote_desc in the event
12938 (remote_close): Remove remote_desc from the event loop.
12939 (putpkt_binary): Rename to...
12940 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12941 (putpkt_binary): New as wrapper around putpkt_binary_1.
12942 (putpkt_notif): New.
12943 (prepare_resume_reply): In non-stop mode, don't change the
12945 * event-loop.c: New.
12946 * Makefile.in (OBJ): Add event-loop.o.
12947 (event-loop.o): New rule.
12949 * linux-low.h (pid_of): Moved here.
12951 (get_lwp_thread): Use lwpid_of.
12952 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12953 * linux-low.c (pid_of): Delete.
12954 (inferior_pid): Use lwpid_of.
12955 (linux_event_pipe): New.
12956 (target_is_async_p): New.
12958 (handle_extended_wait): Use lwpid_of.
12959 (add_lwp): Don't set lwpid field.
12960 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12961 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12962 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12963 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12964 first. Adjust to linux_wait_for_event interface changes. Use
12966 (linux_detach): Don't delete the main lwp here.
12967 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12968 (status_pending_p): Don't consider explicitly suspended lwps.
12969 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12970 pointer. Add OPTIONS argument. Change return type to int. Use
12971 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12972 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12973 pointer. Add status pointer argument. Return a pid instead of a
12974 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12975 changes. In non-stop mode, don't switch to a random thread.
12976 (linux_wait): Rename to...
12977 (linux_wait_1): ... this. Add target_options argument, and handle
12978 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12979 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12980 clean exit and signal exit code. Don't stop all threads in
12981 non-stop mode. In all-stop mode, only stop all threads when
12982 reporting a stop to GDB. Handle explicit thread stop requests.
12983 (async_file_flush, async_file_mark): New.
12985 (send_sigstop): Use lwpid_of.
12986 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12987 interface changes. In non-stop mode, don't switch to a random
12989 (linux_resume_one_lwp): Use lwpid_of.
12990 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12991 (linux_resume_one_thread): ... this. Handle resume_stop. In
12992 non-stop mode, don't look for pending flag in all threads.
12993 (resume_status_pending_p): Don't consider explicitly suspended
12995 (my_waitpid): Reimplement. Emulate __WALL.
12996 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12998 (sigchld_handler, linux_supports_non_stop, linux_async)
12999 (linux_start_non_stop): New.
13000 (linux_target_ops): Register linux_supports_non_stop, linux_async
13001 and linux_start_non_stop.
13002 (initialize_low): Install SIGCHLD handler.
13003 * thread-db.c (thread_db_create_event, find_one_thread)
13004 (thread_db_get_tls_address): Use lwpid_of.
13005 * win32-low.c (win32_detach): Adjust to use resume_kind.
13006 (win32_wait): Add `options' argument.
13007 * spu-low.c (spu_resume): Adjust to use resume_kind.
13008 (spu_wait): Add `options' argument.
13010 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13012 Decouple target code from remote protocol.
13014 * target.h (enum target_waitkind): New.
13015 (struct target_waitstatus): New.
13016 (struct target_ops) <wait>: Return an unsigned long. Take a
13017 target_waitstatus pointer instead of a char pointer.
13018 (mywait): Likewise.
13019 * target.c (mywait): Change prototype to return an unsigned long.
13020 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13021 * server.h (thread_from_wait, old_thread_from_wait): Delete
13023 (prepare_resume_reply): Change prototype to take a
13025 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13026 (last_status, last_ptid): New.
13027 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13028 pid instead of a signal.
13029 (attach_inferior): Remove "status" and "signal" parameters.
13031 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13033 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13034 (handle_v_requests, myresume): Remove "status" and "signal"
13035 parameters. Adjust.
13036 (handle_status): New.
13037 (main): Delete local `status'. Adjust.
13038 * remote-utils.c: Include target.h.
13039 (prepare_resume_reply): Change prototype to take a
13040 target_waitstatus. Adjust.
13042 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13044 * spu-low.c (spu_wait): Adjust.
13045 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13047 (win32_wait): Adjust.
13049 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13051 * target.h (struct thread_resume): Delete leave_stopped member.
13052 (struct target_ops): Add a `n' argument to the `resume' callback.
13053 * server.c (start_inferior): Adjust.
13054 (handle_v_cont, myresume): Adjust.
13055 * linux-low.c (check_removed_breakpoint): Adjust to resume
13056 interface change, and to removed leave_stopped field.
13057 (resume_ptr): Delete.
13058 (struct thread_resume_array): New.
13059 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13060 resume interface change.
13061 (linux_continue_one_thread, linux_queue_one_thread)
13062 (resume_status_pending_p): Check if the resume field is NULL
13063 instead of checking the leave_stopped member.
13064 (linux_resume): Adjust to the target resume interface change.
13065 * spu-low.c (spu_resume): Adjust to the target resume interface
13067 * win32-low.c (win32_detach, win32_resume): Ditto.
13069 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13071 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13073 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13075 (linux_continue_one_thread): Only preserve the stepping flag if
13076 there's a pending breakpoint.
13078 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13080 * server.c (main): After the inferior having exited, call
13081 remote_close before exiting gdbserver.
13083 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13085 Fix size of FPSCR in Power 7 processors.
13086 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13087 (PPC_FEATURE_HAS_DFP): New #define.
13088 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13091 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13093 * server.c (handle_query) Whitespace and formatting.
13095 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13097 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13098 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13099 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13100 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13101 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13102 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13103 Makefile.in, configure.ac: Fix whitespace throughout.
13104 * configure: Regenerate.
13106 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13108 * inferiors.c (find_inferior): Make it safe for the callback
13109 function to delete the currently iterated inferior.
13111 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13113 * Makefile.in (linuw_low_h): Move higher.
13114 (thread-db.o): Depend on $(linux_low_h).
13116 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13118 Rename "process" to "lwp" throughout.
13120 * linux-low.c (all_processes): Rename to...
13121 (all_lwps): ... this.
13122 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13123 (add_process): Rename to ...
13124 (add_lwp): ... this. Adjust.
13125 (linux_create_inferior): Adjust.
13126 (linux_attach_lwp): Adjust.
13127 (linux_attach): Adjust.
13128 (linux_kill_one_process): Rename to ...
13129 (linux_kill_one_lwp): ... this. Adjust.
13130 (linux_kill): Adjust.
13131 (linux_detach_one_process): Rename to ...
13132 (linux_detach_one_lwp): ... this. Adjust.
13133 (linux_detach): Adjust.
13134 (check_removed_breakpoint): Adjust.
13135 (status_pending_p): Adjust.
13136 (linux_wait_for_process): Rename to ...
13137 (linux_wait_for_lwp): ... this. Adjust.
13138 (linux_wait_for_event): Adjust.
13139 (send_sigstop): Adjust.
13140 (wait_for_sigstop): Adjust.
13141 (stop_all_processes): Rename to ...
13142 (stop_all_lwps): ... this.
13143 (linux_resume_one_process): Rename to ...
13144 (linux_resume_one_lwp): ... this. Adjust.
13145 (linux_set_resume_request, linux_continue_one_thread)
13146 (linux_queue_one_thread, resume_status_pending_p)
13147 (usr_store_inferior_registers, regsets_store_inferior_registers)
13148 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13150 * linux-low.h (get_process): Rename to ...
13151 (get_lwp): ... this. Adjust.
13152 (get_thread_process): Rename to ...
13153 (get_thread_lwp): ... this. Adjust.
13154 (get_process_thread): Rename to ...
13155 (get_lwp_thread): ... this. Adjust.
13156 (struct process_info): Rename to ...
13157 (struct lwp_info): ... this.
13158 (all_processes): Rename to ...
13159 (all_lwps): ... this.
13160 * proc-service.c (ps_lgetregs): Adjust.
13161 * thread-db.c (thread_db_create_event, find_one_thread)
13162 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13164 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13166 * server.c (handle_query): Handle "qAttached".
13168 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13170 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13171 GPLv3, update license URL.
13173 2009-03-01 Doug Evans <dje@google.com>
13175 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13176 (server_h): Add gdb_signals.h.
13177 (signals.o): Update.
13178 * server.h (target_signal_from_host,target_signal_to_host_p)
13179 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13181 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13183 * remote-utils.c (getpkt): Also generate remote-debug
13184 information if noack_mode is set.
13186 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13188 * server.c (handle_query): Report qXfer:siginfo:read and
13189 qXfer:siginfo:write as supported and handle them.
13190 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13191 * linux-low.c (linux_xfer_siginfo): New.
13192 (linux_target_ops): Set it.
13194 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13196 * server.c (gdbserver_usage): Mention --remote-debug.
13197 (main): Accept '--remote-debug' switch.
13199 2009-01-18 Doug Evans <dje@google.com>
13201 * regcache.c (new_register_cache): No need to check result of xcalloc.
13202 * server.c (handle_search_memory): Back out calls to xmalloc,
13203 result is checked and error is returned to user upon failure.
13204 (handle_query): Ditto. Add more checks for result of malloc.
13205 (handle_v_cont): Check result of malloc, report error back to
13207 (handle_v_run): Ditto. Call freeargv.
13208 * server.h (freeargv): Declare.
13209 * utils.c (freeargv): New fn.
13211 2009-01-15 Doug Evans <dje@google.com>
13213 * gdbreplay.c (perror_with_name): Make arg const char *.
13214 * server.h (target_signal_to_name): Make return type const char *.
13215 * thread-db.c (thread_db_err_str): Make return type const char *.
13216 * utils.c (perror_with_name): Make arg const char *.
13218 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13220 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13221 when handling a EXIT_PROCESS_DEBUG_EVENT.
13223 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13225 * gdbreplay.c (gdbreplay_version): Update copyright year.
13226 * server.c (gdbserver_version): Likewise.
13228 2009-01-05 Doug Evans <dje@google.com>
13230 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13231 (handle_extended_wait): Improve comment.
13233 2008-12-13 Doug Evans <dje@google.com>
13235 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13236 * server.h (ATTR_MALLOC): New macro.
13237 (xmalloc,xcalloc,xstrdup): Declare.
13238 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13239 * inferiors.c: Ditto.
13240 * linux-low.c: Ditto.
13241 * mem-break.c: Ditto.
13242 * regcache.c: Ditto.
13243 * remote-utils.c: Ditto.
13246 * win32-low.c: Ditto.
13248 2008-12-12 Doug Evans <dje@google.com>
13250 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13251 in debugging printf.
13253 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13255 2008-12-09 Doug Evans <dje@google.com>
13257 * linux-low.h (struct process_info): Delete member tid, unused.
13258 * thread-db.c (find_one_thread): Update.
13259 (maybe_attach_thread): Update.
13261 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13263 * target.h (struct target_ops): Add qxfer_osdata member.
13264 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13266 (linux_qxfer_osdata): New functions.
13267 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13269 * server.c (handle_query): Handle "qXfer:osdata:read:".
13270 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13271 (buffer_xml_printf): New functions.
13272 * server.h (struct buffer): New.
13273 (buffer_grow_str, buffer_grow_str0): New macros.
13274 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13275 (buffer_xml_printf): Declare.
13277 2008-11-24 Doug Evans <dje@google.com>
13279 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13281 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13283 * server.c (handle_v_run): Always use the supplied argument list.
13285 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13287 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13288 (xtensa_regmap_table): Add entry for scompare1.
13290 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13292 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13293 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13294 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13295 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13296 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13297 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13298 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13299 XML target descriptions.
13300 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13301 when inferior is running on an ISA 2.05 or later processor. Add
13302 special case to return offset for full 64-bit slot of FPSCR when
13305 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13307 * Makefile.in (SFILES, clean): Added sparc64 files.
13308 (reg-sparc64.o, reg-sparc64.c): New.
13309 * configure.srv (sparc*-*-linux*): New configuration.
13310 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13311 syscall arguments for SPARC.
13312 (regsets_store_inferior_registers): Likewise.
13313 * linux-sparc-low.c: New file.
13315 2008-10-21 Doug Evans <dje@google.com>
13317 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13318 (READLINE_DIR,READLINE_DEP): Delete.
13319 (INTERNAL_CFLAGS): Update.
13320 (LINTFLAGS): Update.
13322 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13324 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13325 whole argv from the last run, not just argv[0].
13327 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13329 * regcache.c (new_register_cache): Return NULL if the register
13330 cache size isn't known yet.
13331 (free_register_cache): Avoid dereferencing a NULL regcache.
13333 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13335 * configure.srv: Merge MIPS and MIPS64.
13337 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13339 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13341 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13343 * Makefile.in: Add required vsx dependencies.
13345 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13346 Declare init_registers_powerpc_vsx32l.
13347 Declare init_registers_powerpc_vsx64l.
13348 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13349 (ppc_arch_setup): Check for VSX in hwcap.
13350 (ppc_fill_vsxregset): New function.
13351 (ppc_store_vsxregset): New function.
13352 Add new VSX entry in regset_info target_regsets.
13354 * configure.srv: Add new VSX dependencies.
13356 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13358 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13359 (remote_open): Set or clear transport_is_reliable.
13360 (putpkt_binary): Don't expect acks in noack mode.
13361 (getpkt): Don't send ack/nac in noack mode.
13362 * server.c (handle_general_set): Handle QStartNoAckMode.
13363 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13365 (main): Reset noack_mode on every connection.
13366 * server.h (noack_mode): Declare.
13368 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13370 * Makefile.in (GDBREPLAY_OBS): New variable.
13371 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13373 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13374 Daniel Jacobowitz <dan@codesourcery.com>
13376 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13377 (usr_store_inferior_registers): Likewise.
13378 (regsets_store_inferior_registers): Likewise.
13380 2008-07-31 Rolf Jansen <rj@surtec.com>
13381 Pedro Alves <pedro@codesourcery.com>
13383 * configure.ac: Check for memmem declaration.
13384 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13385 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13386 (disable_packet_qfThreadInfo): Unconditionally compile.
13387 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13388 * configure, config.in: Regenerate.
13390 2008-07-28 Doug Kwan <dougkwan@google.com>
13392 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13393 (linux_write_memory): Remove declaration of errno.
13395 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13397 * linux-low.c (handle_extended_wait): Do not use "status"
13398 variable uninitialized.
13400 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13402 * server.c (handle_v_attach): Inhibit reporting dll changes.
13404 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13406 * remote-utils.c (prepare_resume_reply): If requested, don't
13407 output "thread:TID" in the T stop reply.
13409 * server.c (disable_packet_vCont, disable_packet_Tthread)
13410 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13411 (handle_query): If requested, disable support for qC, qfThreadInfo
13413 (handle_v_requests): If requested, disable support for vCont.
13414 (gdbserver_show_disableable): New.
13415 (main): Handle --disable-packet and --disable-packet=LIST.
13417 * server.h (disable_packet_vCont, disable_packet_Tthread)
13418 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13420 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13422 * server.c (gdbserver_usage): Mention --version.
13424 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13426 * Makefile.in (gdbreplay.o): New rule.
13428 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13430 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13431 message, not gdbserver.
13433 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13434 Nathan Sidwell <nathan@codesourcery.com>
13435 Joseph Myers <joseph@codesourcery.com>
13437 * acinclude.m4: Include ../../config/acx.m4.
13438 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13439 * configure, config.in: Regenerate.
13440 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13441 * server.c (gdbserver_version): Print PKGVERSION.
13442 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13443 (main): Adjust gdbserver_usage calls.
13444 * gdbreplay.c (version, host_name): Add declarations.
13445 (gdbreplay_version, gdbreplay_usage): New.
13446 (main): Accept --version and --help options.
13448 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13450 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13451 (arm_breakpoint_at): Handle Thumb.
13452 (the_low_target): Add comment.
13454 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13456 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13458 2008-05-09 Doug Evans <dje@google.com>
13460 * server.h (decode_search_memory_packet): Declare.
13461 * remote-utils.c (decode_search_memory_packet): New fn.
13462 * server.c (handle_search_memory_1): New fn.
13463 (handle_search_memory): New fn.
13464 (handle_query): Process qSearch:memory packets.
13466 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13468 * regcache.c (registers_length): Remove.
13469 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13470 full register packet.
13471 * regcache.h (registers_length): Remove prototype.
13472 * server.h (PBUFSIZ): Define to 16384.
13474 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13476 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13477 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13478 powerpc-64l.o, and powerpc-altivec64l.o.
13479 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13480 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13481 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13482 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13483 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13486 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13487 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13488 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13489 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13490 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13491 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13492 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13493 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13494 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13495 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13498 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13499 (init_registers_powerpc_32l): ... this new prototype.
13500 (init_registers_powerpc_32): Remove, replace by ...
13501 (init_registers_powerpc_altivec32l): ... this new prototype.
13502 (init_registers_powerpc_e500): Remove, replace by ...
13503 (init_registers_powerpc_e500l): ... this new prototype.
13504 (init_registers_ppc64): Remove, replace by ...
13505 (init_registers_powerpc_64l): ... this new prototype.
13506 (init_registers_powerpc_64): Remove, replace by ...
13507 (init_registers_powerpc_altivec64l): ... this new prototype.
13508 (ppc_num_regs): Set to 73.
13509 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13510 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13511 (ppc_cannot_store_register): Handle orig_r3 and trap.
13512 (ppc_arch_setup): Update init_registers_... calls.
13513 (ppc_fill_gregset): Handle orig_r3 and trap.
13515 * inferiors.c (clear_inferiors): Reset current_inferior.
13517 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13519 * acinclude.m4: Add override.m4.
13520 * configure: Regenerate.
13522 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13524 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13525 initial call to init_register_ppc64.
13527 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13529 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13530 single powerpc*-*-linux* case.
13531 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13533 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13535 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13536 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13538 * linux-ppc-low.c: Include <elf.h>.
13539 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13540 (ppc_hwcap): New global variable.
13541 (ppc_regmap): Remove __SPE__ #ifdef sections.
13542 (ppc_regmap_e500): New global variable.
13543 (ppc_cannot_store_register): Update __SPE__ special case.
13544 (ppc_get_hwcap): New function.
13545 (ppc_arch_setup): Use it to determine whether inferior supports
13546 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13547 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13548 Do not access registers if target does not support AltiVec.
13549 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13550 Do not access registers if target does not support SPE.
13551 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13553 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13555 * linux-low.c (disabled_regsets, num_regsets): New.
13556 (use_regsets_p): Delete.
13557 (linux_wait_for_process): Clear disabled_regsets.
13558 (regsets_fetch_inferior_registers): Check and set it.
13559 (regsets_store_inferior_registers): Likewise.
13560 (linux_fetch_registers, linux_store_registers): Do not use
13562 (initialize_low): Allocate disabled_regsets.
13564 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13566 * Makefile.in (LIBOBJS): New.
13567 (OBS): Use LIBOBJS.
13568 (memmem.o): New rule.
13569 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13570 * configure: Regenerated.
13572 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13574 * server.c (handle_query): Never return "unsupported" for
13575 qXfer:features:read queries.
13577 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13579 * server.c (get_features_xml): Fix inverted condition.
13580 (handle_query): Always support qXfer:feature:read.
13582 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13584 * server.c (wrapper_argv): New.
13585 (start_inferior): Handle wrapper_argv. If set, expect an extra
13587 (gdbserver_usage): Document --wrapper.
13588 (main): Parse --wrapper.
13590 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13592 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13593 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13594 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13595 (ppc_set_pc): Likewise.
13596 (ppc_arch_setup): New function.
13597 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13598 of collect_register.
13599 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13601 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13603 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13604 instead of linux-ppc64-low.o.
13605 * linux-ppc64-low.c: Remove file.
13606 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13607 (linux-ppc64-low.o): Remove rule.
13609 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13610 (init_registers_powerpc_64): Likewise.
13611 (ppc_regmap): Conditionally define depending on __powerpc64__.
13612 (ppc_cannot_store_register): Do not special-case "fpscr" when
13613 compiled on __powerpc64__.
13614 (ppc_collect_ptrace_register): New function.
13615 (ppc_supply_ptrace_register): New function.
13616 (ppc_breakpoint): Change type to "unsigned int".
13617 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13618 (the_low_target): Conditionally provide initializers for the
13619 arch_setup member depending on __powerpc64__. Install
13620 collect_ptrace_register and supply_ptrace_register members.
13622 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13624 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13625 * server.c (gdbserver_xmltarget): Define.
13626 (get_features_xml): Use it to replace "target.xml" and arch_string.
13628 * configure.srv: Remove srv_xmltarget. Add XML files that were
13629 mentioned there to srv_xmlfiles instead. Remove conditional tests
13630 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13631 srv_xmlfiles and srv_regobj to include all possible choices.
13632 * configure.ac (srv_xmltarget): Remove.
13633 (srv_xmlfiles): Do not add "target.xml".
13634 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13635 checks for supplementary target information.
13636 * configure: Regenerate.
13637 * Makefile.in (XML_TARGET): Remove.
13638 (target.xml): Remove rule.
13639 (clean): Do not clean up target.xml.
13640 (.PRECIOUS): Do not mention target.xml.
13642 * target.h (struct target_ops): Remove arch_string member.
13643 * linux-low.c (linux_arch_string): Remove.
13644 (linux_target_ops): Remove arch_string initializer.
13645 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13646 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13647 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13648 * spu-low.c (spu_arch_string): Remove.
13649 (spu_target_ops): Remove arch_string initializer.
13650 * win32-low.c (win32_arch_string): Remove.
13651 (win32_target_ops): Remove arch_string initializer.
13652 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13653 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13654 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13656 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13658 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13659 by collect_ptrace_register and supply_ptrace_register hooks.
13660 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13661 instead of checking for the_low_target.left_pad_xfer.
13662 (usr_store_inferior_registers): Use collect_ptrace_register callback
13663 instead of checking for the_low_target.left_pad_xfer.
13665 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13666 (s390_supply_ptrace_register): Likewise.
13667 (s390_fill_gregset): Call s390_collect_ptrace_register.
13668 (the_low_target): Update.
13670 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13671 (ppc_supply_ptrace_register): Likewise.
13672 (the_low_target): Update.
13674 * linux-i386-low.c (the_low_target): Update.
13675 * linux-x86-64-low.c (the_low_target): Update.
13677 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13679 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13680 reg-s390.o and reg-s390x.o.
13682 * linux-low.c (new_inferior): New global variable.
13683 (linux_create_inferior, linux_attach): Set it.
13684 (linux_wait_for_process): Call the_low_target.arch_setup after the
13685 target has stopped for the first time.
13686 (initialize_low): Do not call the_low_target.arch_setup.
13688 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13689 (s390_set_pc): Likewise.
13690 (s390_arch_setup): New function.
13691 (the_low_target): Use s390_arch_setup as arch_setup routine.
13693 * regcache.c (realloc_register_cache): New function.
13694 (set_register_cache): Call it for each existing regcache.
13696 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13698 * server.h (init_registers): Remove prototype.
13700 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13701 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13702 instead of init_registers ().
13703 * linux-arm-low.c (init_registers_arm): Add prototype.
13704 (init_registers_arm_with_iwmmxt): Likewise.
13705 (the_low_target): Add initializer for arch_setup field.
13706 * linux-cris-low.c (init_registers_cris): Add prototype.
13707 (the_low_target): Add initializer for arch_setup field.
13708 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13709 (the_low_target): Add initializer for arch_setup field.
13710 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13711 (the_low_target): Add initializer for arch_setup field.
13712 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13713 (the_low_target): Add initializer for arch_setup field.
13714 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13715 (the_low_target): Add initializer for arch_setup field.
13716 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13717 (the_low_target): Add initializer for arch_setup field.
13718 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13719 (init_registers_mips64_linux): Likewise.
13720 (the_low_target): Add initializer for arch_setup field.
13721 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13722 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13723 (the_low_target): Add initializer for arch_setup field.
13724 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13725 (init_registers_powerpc_64): Likewise.
13726 (the_low_target): Add initializer for arch_setup field.
13727 * linux-s390-low.c (init_registers_s390): Add prototype.
13728 (init_registers_s390x): Likewise.
13729 (the_low_target): Add initializer for arch_setup field.
13730 * linux-sh-low.c (init_registers_sh): Add prototype.
13731 (the_low_target): Add initializer for arch_setup field.
13732 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13733 (the_low_target): Add initializer for arch_setup field.
13734 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13735 (the_low_target): Add initializer for arch_setup field.
13737 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13738 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13739 instead of init_registers ().
13740 * win32-arm-low.c (init_registers_arm): Add prototype.
13741 (the_low_target): Add initializer for arch_setup field.
13742 * win32-i386-low.c (init_registers_i386): Add prototype.
13743 (the_low_target): Add initializer for arch_setup field.
13745 * spu-low.c (init_registers_spu): Add prototype.
13746 (initialize_low): Call initialie_registers_spu () instead of
13747 initialize_registers ().
13749 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13751 * server.c (handle_v_requests): When handling the vRun and vAttach
13752 packets, if already debugging a process, don't kill it. Return an
13755 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13757 * server.c (handle_query): Correct length check.
13759 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13761 * win32-low.c (do_initial_child_stuff): Add process handle
13762 parameter. Set current_process_handle and current_process_id from the
13763 parameters. Clear globals.
13764 (win32_create_inferior): Don't set current_process_handle and
13765 current_process_id here. Instead pass them on the call to
13766 do_initial_child_stuff.
13767 (win32_attach): Likewise.
13768 (win32_clear_inferiors): New.
13769 (win32_kill): Don't close the current process handle or the
13770 current thread handle here. Instead call win32_clear_inferiors.
13771 (win32_detach): Don't open a new handle to the process. Call
13772 win32_clear_inferiors.
13773 (win32_join): Don't rely on current_process_handle; open a new
13774 handle using the process id.
13775 (win32_wait): Call win32_clear_inferiors when the inferior process
13778 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13780 * server.c (monitor_show_help): Add "exit".
13782 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13784 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13785 (clean): Add reg-xtensa.c.
13786 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13787 * configure.srv (xtensa*-*-linux*) New target.
13788 * linux-xtensa-low.c: New.
13789 * xtensa-xtregs.c: New.
13791 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13793 * hostio.c: Don't include errno.h.
13794 (errno_to_fileio_errno): Move to hostio-errno.
13795 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13796 error number outputting to the target->hostio_last_error callback.
13797 (hostio_packet_error): Use FILEIO_EINVAL directly.
13798 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13799 calls to hostio_error.
13800 * hostio-errno.c: New.
13801 * server.h (hostio_last_error_from_errno): Declare.
13802 * target.h (target_ops): Add hostio_last_error member.
13803 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13804 as hostio_last_error handler.
13805 * spu-low.c (spu_target_ops): Likewise.
13806 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13807 (wince_hostio_last_error): New functions.
13808 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13809 as hostio_last_error handler.
13810 (win32_target_ops) [!_WIN32_WCE]: Register
13811 hostio_last_error_from_errno as hostio_last_error handler.
13812 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13813 (hostio-errno.o): New rule.
13814 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13815 * configure.srv (srv_hostio_err_objs): New variable. Default to
13817 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13818 * configure: Regenerate.
13820 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13822 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13823 (linux_kill, linux_detach): Clean up the process list.
13824 * remote-utils.c (remote_open): Improve port number parsing.
13825 (putpkt_binary, input_interrupt): Only send interrupts if the target
13827 * server.c (extended_protocol): Make static.
13828 (attached): Define earlier.
13829 (exit_requested, response_needed, program_argv): New variables.
13830 (target_running): New.
13831 (start_inferior): Clear attached here.
13832 (attach_inferior): Set attached here.
13833 (require_running): Define.
13834 (handle_query): Use require_running and target_running. Implement
13836 (handle_v_attach, handle_v_run): New.
13837 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13838 (gdbserver_usage): Update.
13839 (main): Redo argument parsing. Handle --debug and --multi. Handle
13840 --attach along with other options or after the port. Save
13841 program_argv. Support no initial program. Resynchronize
13842 communication with GDB after an error. Handle "monitor exit".
13843 Use require_running and target_running. Always allow the extended
13844 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13845 restart in extended mode.
13846 * README: Refer to the GDB manual. Update --attach usage.
13848 2007-12-20 Andreas Schwab <schwab@suse.de>
13850 * linux-low.c (STACK_SIZE): Define.
13851 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13852 (linux_test_for_tracefork): Likewise.
13854 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13856 * linux-low.c (linux_wait_for_event): Update messages. Do not
13857 reinsert auto-delete breakpoints.
13858 * mem-break.c (struct breakpoint): Change return type of handler to
13860 (set_breakpoint_at): Update handler type.
13861 (reinsert_breakpoint_handler): Return 1 instead of calling
13863 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13865 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13866 * mem-break.h (set_breakpoint_at): Update handler type.
13867 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13868 * win32-low.c (auto_delete_breakpoint): New.
13869 (get_child_debug_event): Use it.
13871 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13873 * configure.ac: Check for pread and pwrite.
13874 * hostio.c (handle_pread): Fall back to lseek and read.
13875 (handle_pwrite): Fall back to lseek and write.
13876 * config.in, configure: Regenerated.
13878 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13880 * server.c (myresume): Add own_buf argument.
13881 (main): Update calls.
13883 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13885 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13886 * remote-utils.c (remote_open): Do not call disable_async_io.
13887 (block_async_io): Delete.
13888 (unblock_async_io): Make static.
13889 (initialize_async_io): New.
13890 * server.c (handle_v_cont): Handle async I/O here.
13891 (myresume): Likewise. Move other common resume tasks here...
13892 (main): ... from here. Call initialize_async_io. Disable async
13893 I/O before the main loop.
13894 * server.h (initialize_async_io): Declare.
13895 (block_async_io, unblock_async_io): Delete prototypes.
13896 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13898 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13900 * remote-utils.c (readchar): Allow binary data in received messages.
13902 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13904 * win32-low.c (attaching): New global.
13905 (win32_create_inferior): Clear the `attaching' global.
13906 (win32_attach): Set the `attaching' global.
13907 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13908 attaching. Only set a breakpoint at the entry point if not
13911 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13913 * server.c (main): Don't report dll events on the initial
13914 connection on attaches.
13916 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13918 * server.c (main): Relax numerical bases supported for the pid of
13919 the --attach command line argument.
13921 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13923 * win32-low.c (win32_attach): Call OpenProcess before
13924 DebugActiveProcess, not after. Add last error output to error
13927 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13929 * win32-low.c (win32_get_thread_context)
13930 (win32_set_thread_context): New functions.
13931 (thread_rec): Use win32_get_thread_context.
13932 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13933 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13936 2007-12-03 Leo Zayas
13937 Pedro Alves <pedro_alves@portugalmail.pt>
13939 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13941 (child_add_thread): Minor cleanup.
13942 (child_continue): Resume artificially suspended threads before
13943 calling ContinueDebugEvent.
13944 (suspend_one_thread): New.
13945 (fake_breakpoint_event): New.
13946 (get_child_debug_event): Change return type to int. Check here if
13947 gdb sent an interrupt request. If a soft interrupt was requested,
13948 fake a breakpoint event. Return 0 if there is no event to handle,
13950 (win32_wait): Don't check here if gdb sent an interrupt request.
13951 Ensure there is a valid event to handle.
13952 (win32_request_interrupt): Add soft interruption method as last
13955 2007-12-03 Leo Zayas
13956 Pedro Alves <pedro_alves@portugalmail.pt>
13958 * win32-low.h (win32_thread_info): Add descriptions to the
13959 structure members. Replace `suspend_count' counter by a
13961 * win32-low.c (thread_rec): Update condition of when to get the
13962 context from the inferior. Rely on ContextFlags being set if it
13963 has already been retrieved. Only suspend the inferior thread if
13964 we haven't already. Warn if that fails.
13965 (continue_one_thread): s/suspend_count/suspended/. Only call
13966 ResumeThread once. Warn if that fails.
13968 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13970 * win32-low.c (win32_wait): Don't read from the inferior when it
13971 has already exited.
13973 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13975 * Makefile.in (win32_low_h): New variable.
13976 (win32-low.o): Add dependency on $(win32_low_h).
13977 (win32-arm-low.o, win32-i386-low.o): New rules.
13979 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13981 * hostio.c: Correct copyright year.
13983 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13985 * Makefile.in (OBS): Add hostio.o.
13986 (hostio.o): New rule.
13987 * server.h (handle_vFile): Declare.
13988 * hostio.c: New file.
13989 * server.c (handle_v_requests): Take packet_len and new_packet_len
13990 for binary packets. Call handle_vFile.
13991 (main): Update call to handle_v_requests.
13993 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13995 * linux-low.c: Include <sched.h>.
13997 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13999 * linux-low.c (linux_tracefork_grandchild): New.
14000 (linux_tracefork_child): Use clone.
14001 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14003 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14005 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14007 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14009 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14011 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14013 * inferiors.c (change_inferior_id): Delete.
14014 (add_pid_to_list, pull_pid_from_list): New.
14015 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14016 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14017 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14018 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14019 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14020 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14021 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14022 (using_threads): Always set to 1.
14023 (handle_extended_wait): New.
14024 (add_process): Do not set TID.
14025 (linux_create_inferior): Set must_set_ptrace_flags.
14026 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14027 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14028 (linux_thread_alive): Rename TID argument to LWPID.
14029 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14030 (linux_wait_for_event): Do not use TID or check using_threads. Update
14031 call to dead_thread_notify. Call handle_extended_wait.
14032 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14033 (send_sigstop): Delete sigstop_sent.
14034 (wait_for_sigstop): Avoid TID.
14035 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14036 (linux_test_for_tracefork): New.
14037 (linux_lookup_signals): Use thread_db_active and
14038 linux_supports_tracefork_flag.
14039 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14040 * linux-low.h (get_process_thread): Avoid TID.
14041 (struct process_ifo): Move thread_known and tid to the end. Remove
14043 (linux_attach_lwp, thread_db_init): Update prototypes.
14044 * server.h (change_inferior_id): Delete prototype.
14045 (add_pid_to_list, pull_pid_from_list): New prototypes.
14046 * thread-db.c (thread_db_use_events): New.
14047 (find_first_thread): Rename to...
14048 (find_one_thread): ...this. Update callers and messages. Do not
14049 call fatal. Check thread_db_use_events. Do not call
14050 change_inferior_id or new_thread_notify.
14051 (maybe_attach_thread): Update. Do not call new_thread_notify.
14052 (thread_db_init): Set thread_db_use_events. Check use_events.
14053 * utils.c (fatal, warning): Correct message prefix.
14055 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14057 * Makefile.in (clean): Remove new files.
14058 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14059 (powerpc-64.o, powerpc-64.c): New rules.
14060 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14061 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14063 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14065 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14066 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14067 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14068 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14069 (target_regsets): Add AltiVec and SPE register sets.
14070 * configure.ac: Check for AltiVec and SPE.
14071 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14072 (ppc_fill_vrregset, ppc_store_vrregset): New.
14073 (target_regsets): Add AltiVec register set.
14074 * configure: Regenerated.
14076 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14078 * linux-low.c (O_LARGEFILE): Define.
14079 (linux_read_memory): Use /proc/PID/mem.
14080 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14081 * configure, config.in: Regenerated.
14083 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14085 * linux-low.c (linux_wait_for_event): Do not pass signals while
14088 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14090 * win32-low.c (create_process): New.
14091 (win32_create_inferior): Use create_process instead of
14092 CreateProcess. If create_process failed retry appending an ".exe"
14093 suffix. Store the GetLastError result immediatelly after
14094 create_process calls and use it on the call to error.
14096 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14098 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14100 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14102 * configure.ac: Switch license to GPLv3.
14104 2007-08-01 Michael Snyder <msnyder@access-company.com>
14106 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14108 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14110 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14112 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14113 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14114 CloseToolhelp32Snapshot.
14115 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14116 CloseToolhelp32Snapshot.
14118 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14120 * server.c (main): Check for inferior exit before main loop.
14122 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14124 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14125 instead of on tmp_desc.
14127 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14128 Daniel Jacobowitz <dan@codesourcery.com>
14130 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14131 (add_thread): Minor cleanups.
14132 (clear_inferiors): Move lower in the file. Clear the DLL
14134 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14135 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14136 (xml_escape_text): New.
14137 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14139 (handle_v_cont): Report errors.
14140 (gdbserver_version): Update.
14141 (main): Correct size of own_buf. Do not report initial DLL events.
14142 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14143 (unloaded_dll, xml_escape_text): New.
14144 * win32-low.c (enum target_waitkind): Update comments.
14145 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14146 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14147 (win32_EnumProcessModules, win32_GetModuleInformation)
14148 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14149 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14150 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14151 (win32_Module32First, win32_Module32Next, load_toolhelp)
14152 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14153 (get_child_debug_event): Handle DLL events.
14154 (win32_wait): Likewise.
14156 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14158 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14159 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14161 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14163 * win32-low.c (handle_output_debug_string): Ignore event if not
14166 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14168 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14170 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14172 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14174 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14176 * inferiors.c (change_inferior_id): Add comment.
14177 * linux-low.c (check_removed_breakpoint): Add an early
14178 prototype. Improve debug output.
14179 (linux_attach): Doc update.
14180 (linux_detach_one_process, linux_detach): Clean up before releasing
14182 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14183 * linux-low.h (struct process_info): Doc improvement.
14184 * mem-break.c (delete_all_breakpoints): New.
14185 * mem-break.h (delete_all_breakpoints): New prototype.
14186 * thread-db.c (find_first_thread): New.
14187 (thread_db_create_event): Call it instead of
14188 thread_db_find_new_threads. Clean up unused variables.
14189 (maybe_attach_thread): Remove first thread handling.
14190 (thread_db_find_new_threads): Use find_first_thread.
14191 (thread_db_get_tls_address): Likewise.
14193 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14195 * thread-db.c (thread_db_find_new_threads): Add prototype.
14196 (thread_db_create_event): Check for the main thread before adding
14198 (maybe_attach_thread): Only enable event reporting if TID == 0.
14199 (thread_db_get_tls_address): Check for new threads.
14201 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14203 * linux-low.c (linux_create_inferior): Try execv before execvp.
14204 * spu-low.c (spu_create_inferior): Likewise.
14206 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14208 * linux-low.c (linux_create_inferior): Change execv to execvp.
14209 * spu-low.c (spu_create_inferior): Likewies.
14211 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14213 * Makefile.in (clean): Clean new files instead of deleted ones.
14214 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14215 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14217 * configure.srv: Specify XML files and new regformats for MIPS and
14219 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14220 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14221 an entry for the restart register.
14222 (mips_cannot_fetch_register, mips_cannot_store_register)
14223 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14224 register names to match the XML descriptions.
14225 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14226 restart register instead of $0.
14228 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14229 Markus Deuling <deuling@de.ibm.com>
14231 * remote-utils.c (decode_xfer_write): New function.
14232 * server.h (decode_xfer_write): Add prototype.
14233 * server.c (handle_query): Add PACKET_LEN argument. Support
14234 qXfer:spu:read and qXfer:spu:write packets.
14235 (main): Pass packet_len to handle_query.
14236 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14237 * target.h (target_ops): Add qxfer_spu.
14239 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14241 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14242 accessing non-seekable spufs files.
14244 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14246 * server.c (handle_query): Add reply for qC packet.
14248 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14249 Leo Zayas <lerele@champenstudios@com>
14251 * server.h (check_remote_input_interrupt_request): New function.
14252 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14253 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14254 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14255 (check_remote_input_interrupt_request): New function.
14256 * server.h (check_remote_input_interrupt_request): Declare.
14257 * win32-low.c (winapi_DebugBreakProcess,
14258 winapi_GenerateConsoleCtrlEvent): New typedefs.
14259 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14261 (win32_wait): Check for remote interrupt request
14262 with check_remote_input_interrupt_request.
14263 (win32_request_interrupt): New function.
14264 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14266 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14268 * win32-low.c (debug_registers_changed,
14269 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14270 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14271 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14272 (thread_rec): Get context using the low target.
14273 (child_add_thread): Call thread_added on the low target,
14274 which does the same thing.
14276 (do_initial_child_stuff): Remove debug registers references.
14277 Set context using the low target. Resume threads after
14278 setting the contexts.
14279 (child_continue): Remove dead variable. Remove debug
14280 registers references.
14281 (child_fetch_inferior_registers): Go through the low target.
14282 (do_child_store_inferior_registers): Remove.
14283 (child_store_inferior_registers): Go through the low target.
14284 (win32_resume): Remove debug registers references.
14285 Set context using the low target.
14286 (handle_exception): Change return type to void. Don't record
14287 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14288 first chance exception.
14289 (get_child_debug_event): Change return type to void. Remove
14290 goto loop. Always return after waiting for debug event.
14291 (win32_wait): Convert to switch statement. Handle spurious
14294 * win32-i386-low.c (debug_registers_changed,
14295 debug_registers_used): New.
14296 (initial_stuff): Rename to ...
14297 (i386_initial_stuff): ... this. Clear debug registers
14299 (store_debug_registers): Delete.
14300 (i386_get_thread_context): New.
14301 (load_debug_registers): Delete.
14302 (i386_set_thread_context): New.
14303 (i386_thread_added): New.
14304 (single_step): Rename to ...
14305 (i386_single_step): ... this.
14306 (do_fetch_inferior_registers): Rename to ...
14307 (i386_fetch_inferior_register): ... this.
14308 (i386_store_inferior_register): New.
14309 (the_low_target): Adapt to new interface.
14311 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14312 (arm_get_thread_context): New.
14313 (arm_set_thread_context): New.
14315 (do_fetch_inferior_registers): Rename to ...
14316 (arm_fetch_inferior_register): ... this.
14317 (arm_store_inferior_register): New.
14318 (arm_wince_breakpoint): Reimplement as unsigned long.
14319 (arm_wince_breakpoint_len): Define.
14320 (the_low_target): Adapt to new interface.
14322 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14323 load_debug_registers. Add get_thread_context, set_thread_context,
14324 thread_added and store_inferior_register. Rename
14325 fetch_inferior_registers to fetch_inferior_register.
14326 (regptr): Remove declaration.
14328 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14330 * linux-low.c (linux_detach): Change return type to int. Return 0.
14331 * spu-low.c (spu_detach): Likewise.
14333 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14335 * target.h (target_ops): Change return type of detach to int.
14337 (join_inferior): New.
14338 * server.c (main): Don't skip detach support on mingw32.
14339 If the inferior doesn't support detaching return error.
14340 Call join_inferior instead of using waitpid.
14341 * linux-low.c (linux_join): New.
14342 (linux_target_op): Add linux_join.
14343 * spu-low.c (spu_join): New.
14344 (spu_target_ops): Add spu_join.
14345 * win32-low.c (win32_detach): Adapt to new interface.
14346 Reopen current_process_handle before detaching. Issue a child
14347 resume before detaching.
14349 (win32_target_op): Add win32_join.
14351 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14353 * win32-low.c (win32-attach): Fix return value.
14354 * target.h (target_ops): Describe ATTACH return values.
14356 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14358 * win32-low.c (GETPROCADDRESS): Define.
14359 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14360 (winapi_DebugSetProcessKillOnExit): Likewise.
14361 (win32_create_inferior): Force usage of ansi CreateProcessA.
14362 (win32_attach): Use GETPROCADDRESS.
14363 (win32_detach): Likewise.
14365 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14367 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14369 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14371 * win32-low.c: Commit leftover changes from 2007-03-29.
14373 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14375 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14376 fields short instead of int. Add explicit padding.
14377 (i387_cache_to_fsave): Remove unnecessary casts.
14378 (i387_fsave_to_cache): Doc fix.
14379 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14381 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14383 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14384 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14386 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14388 * configure.srv (arm*-*-mingw32ce*): Move near the other
14391 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14393 * configure.ac: Add errno checking.
14394 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14395 sys/file.h and malloc.h.
14396 (AC_CHECK_DECLS): Add perror.
14397 (srv_mingwce): Handle.
14398 * configure.srv (i[34567]86-*-cygwin*): Add
14399 win32-i386-low.o to srv_tgtobj.
14400 (i[34567]86-*-mingw*): Likewise.
14401 (arm*-*-mingw32ce*): Add case.
14402 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14403 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14404 [__MINGW32CE__] (strerror): New function.
14405 [__MINGW32CE__] (errno): Define to GetLastError.
14406 [__MINGW32CE__] (COUNTOF): New macro.
14407 (remote_open): Remove extra close call.
14408 * mem-break.c (delete_breakpoint_at): New function.
14409 * mem-break.h (delete_breakpoint_at): Declare.
14410 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14411 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14412 [USE_WIN32API] (read, write): Add char* casts.
14413 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14414 * server.h: Include wincecompat.h on Windows CE.
14415 [HAVE_ERRNO_H]: Check.
14416 (perror): Declare if not declared.
14417 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14418 (perror_with_name): Remove errno declaration.
14419 * wincecompat.h: New.
14420 * wincecompat.c: New.
14421 * win32-low.h: New.
14422 * win32-arm-low.c: New.
14423 * win32-i386-low.c: New.
14424 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14425 (OUTMSG2): Make it safe.
14427 (COUNTOF): New macro.
14428 (NUM_REGS): Get it from the low target.
14429 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14430 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14431 (thread_rec): Let low target handle debug registers.
14432 (child_add_thread): Likewise.
14433 (child_init_thread_list): Likewise.
14434 (continue_one_thread): Likewise.
14436 (do_child_fetch_inferior_registers): Move to ...
14437 * win32-i386-low.c: ... here, and rename to ...
14438 (do_fetch_inferior_registers): ... this.
14439 * win32-low.c (child_fetch_inferior_registers):
14440 Go through the low target.
14441 (do_child_store_inferior_registers): Use regptr.
14442 (strwinerror): New function.
14443 (win32_create_inferior): Handle Windows CE.
14444 Use strwinerror instead of strerror on Windows error
14445 codes. Add program to the error output.
14446 Don't close the main thread handle on Windows CE.
14447 (win32_attach): Use coredll.dll on Windows CE.
14448 (win32_kill): Close current process and current
14450 (win32_detach): Use coredll.dll on Windows CE.
14451 (win32_resume): Let low target handle debug registers, and
14453 (handle_exception): Add/Remove initial breakpoint. Avoid
14454 non-existant WSTOPSIG on Windows CE.
14455 (win32_read_inferior_memory): Cast to remove warning.
14456 (win32_arch_string): Go through the low target.
14457 (initialize_low): Call set_breakpoint_data with the low
14458 target's breakpoint.
14459 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14460 FOP_REGNUM, mappings): Move to ...
14461 * win32-i386-low.c: ... here.
14462 * win32-low.c (win32_thread_info): Move to ...
14463 * win32-low.h: ... here.
14464 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14465 win32-arm-low.c and wincecompat.c.
14466 (all:): Add $EXEEXT.
14467 (install-only:): Likewise.
14468 (gdbserver:): Likewise.
14469 (gdbreplay:): Likewise.
14470 * config.in: Regenerate.
14471 * configure: Regenerate.
14473 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14475 * win32-low.c: Rename typedef thread_info to
14476 win32_thread_info throughout.
14478 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14480 * win32-i386-low.c: Rename to ...
14481 * win32-low.c: ... this.
14482 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14483 * Makefile.in: Likewise.
14485 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14487 * remote-utils.c (monitor_output): Constify msg parameter.
14488 * server.h (monitor_output): Likewise.
14489 * win32-i386-low.c (handle_output_debug_string): New.
14490 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14491 handle_output_debug_string.
14492 (get_child_debug_event): Likewise.
14494 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14496 * server.c (main): Correct strtoul check.
14498 2007-03-27 Jon Ringle <jon@ringle.org>
14500 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14502 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14504 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14506 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14508 * terminal.h: Check HAVE_SGTTY_H.
14510 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14512 * remote-utils.c (remote_open): Print out the assigned port number.
14514 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14516 * remote-utils.c (monitor_output): New function.
14517 * server.c (debug_threads): Define here.
14518 (monitor_show_help): New function.
14519 (handle_query): Handle qRcmd.
14520 (main): Do not handle 'd' packet.
14521 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14522 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14525 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14527 * Makefile.in (EXEEXT): New.
14528 (clean): Use $(EXEEXT).
14530 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14532 * target.h (target_ops): Rename send_signal to request_interrupt,
14533 and remove enum target_signal parameter.
14534 * linux-low.c (linux_request_interrupt): Rename from
14535 linux_send_signal, and always send SIGINT.
14536 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14537 and always send SIGINT.
14538 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14540 (input_interrupt): Likewise.
14542 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14544 * server.c (get_features_xml): Check if target implemented
14546 * win32-i386-low.c (win32_arch_string): New.
14547 (win32_target_ops): Add win32_arch_string as arch_string member.
14549 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14551 * spu-low.c (spu_arch_string): New.
14552 (spu_target_ops): Add spu_arch_string.
14554 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14556 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14557 * configure.ac: Do not check for terminal.h.
14558 * configure, config.in: Regenerated.
14560 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14562 * Makefile.in (OBS): Add $(XML_BUILTIN).
14563 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14565 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14566 (arm-with-iwmmxt.c): New.
14567 * config.in, configure: Regenerate.
14568 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14569 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14570 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14571 (arm*-*-linux*): Add iWMMXt and regset support.
14572 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14573 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14574 (arm_store_wmmxregset, target_regsets): New.
14575 * server.c (get_features_xml): Take annex argument. Check builtin
14577 (handle_query): Handle multiple annexes.
14579 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14581 * remote-utils.c [USE_WIN32API] (read, write): Define.
14582 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14585 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14587 * linux-i386-low.c (the_low_target): Set arch_string.
14588 * linux-x86-64-low.c (the_low_target): Likewise.
14589 * linux-low.c (linux_arch_string): New.
14590 (linux_target_ops): Add it.
14591 * linux-low.h (struct linux_target_ops): Add arch_string.
14592 * server.c (write_qxfer_response): Use const void * for DATA.
14593 (get_features_xml): New.
14594 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14595 * target.h (struct target_ops): Add arch_string method.
14597 2007-01-03 Denis Pilat <denis.pilat@st.com>
14598 Daniel Jacobowitz <dan@codesourcery.com>
14600 * linux-low.c (linux_kill): Handle being called with no threads.
14601 * win32-i386-low.c (win32_kill): Likewise.
14602 (get_child_debug_event): Clear current_process_handle.
14604 2006-12-30 Denis PILAT <denis.pilat@st.com>
14605 Daniel Jacobowitz <dan@codesourcery.com>
14607 * remote-utils.c (remote_open): Check the type of specified
14608 serial port devices before opening them.
14609 * server.c (main): Kill the inferior if an error occurs during
14610 the first remote_open.
14612 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14614 * README: Update supported targets.
14616 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14618 * Makefile.in (clean): Remove reg-mips64.c.
14619 (reg-mips64.c, reg-mips64.o): New rules.
14620 * configure.srv: Handle mips64. Include regset support for mips.
14621 * linux-mips-low.c (union mips_register): New.
14622 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14623 (mips_breakpoint, mips_breakpoint_at): Use int.
14624 (mips_collect_register, mips_supply_register)
14625 (mips_collect_register_32bit, mips_supply_register_32bit)
14626 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14627 (mips_store_fpregset, target_regsets): New.
14628 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14630 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14632 * configure.srv: Add target "spu*-*-*".
14633 * Makefile.in (clean): Remove reg-spu.c.
14634 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14635 * spu-low.c: New file.
14637 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14639 * configure.ac: Correct td_thr_tls_get_addr test.
14640 * configure: Regenerated.
14642 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14644 * linux-low.c (linux_wait_for_event): Reformat. Use the
14645 pass_signals array.
14646 * remote-utils.c (decode_address_to_semicolon): New.
14647 * server.c (pass_signals, handle_general_set): New.
14648 (handle_query): Mention QPassSignals for qSupported.
14649 (main): Call handle_general_set.
14650 * server.h (pass_signals, decode_address_to_semicolon): New.
14652 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14654 * server.c (handle_query): Correct error handling for read_auxv.
14656 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14658 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14659 and srv_linux_thread_db to yes.
14660 * linux-s390-low.c (s390_fill_gregset): New function.
14661 (target_regsets): Define data structure.
14663 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14665 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14666 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14667 * config.in, configure: Regenerated.
14668 * inferiors.c (gdb_id_to_thread): New function.
14669 (gdb_id_to_thread_id): Use it.
14670 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14671 * linux-low.h (struct process_info): Add th member.
14672 (thread_db_get_tls_address): New prototype.
14673 * remote-utils.c (decode_address): Make non-static.
14674 * server.c (handle_query): Handle qGetTLSAddr.
14675 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14676 * target.h (struct target_ops): Add get_tls_address.
14677 * thread-db.c (maybe_attach_thread): Save the thread handle.
14678 (thread_db_get_tls_address): New.
14680 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14682 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14683 (linux_resume_one_process): Take a siginfo_t *. Update all
14684 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14685 (struct pending_signals): Add a siginfo_t.
14686 (linux_wait_for_process): Always set last_status.
14687 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14688 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14689 * linux-low.h (struct process_info): Add last_status.
14691 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14693 * remote-utils.c (try_rle): New function.
14694 (putpkt_binary): Use it.
14696 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14698 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14699 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14700 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14701 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14702 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14705 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14707 * server.c (terminal_fd): New variable.
14708 (old_foreground_pgrp): Likewise.
14709 (restore_old_foreground_pgrp): New function.
14710 (start_inferior): Record the terminal file descriptor in terminal_fd
14711 and its original foreground group in old_foreground_pgrp. Register
14712 restore_old_foreground_pgrp with atexit().
14714 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14716 * server.c (handle_query): Correct qPart to qXfer.
14718 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14720 * configure.ac: Check for more headers which are missing on
14721 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14722 * configure.srv: Add Cygwin and mingw32.
14723 * remote-utils.c: Don't include headers unconditionally which
14724 are missing on mingw32. Include <winsock.h> for mingw32.
14725 (remote_open): Adjust for mingw32 support. Flush
14726 standard error after writing to it.
14727 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14728 (unblock_async_io, enable_async_io, disable_async_io)
14729 (readchar, getpkt): Update for Winsock support.
14730 (prepare_resume_reply): Expect a protocol signal number.
14731 * server.c: Disable <sys/wait.h> on mingw32.
14732 (start_inferior): Adjust for mingw32 support. Flush
14733 standard error after writing to it.
14734 (attach_inferior): Likewise. Use protocol signal
14736 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14738 * win32-i386-low.c: New file.
14739 * Makefile.in (XM_CLIBS): Set.
14740 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14741 (win32-i386-low.o): New dependency rule.
14742 * linux-low.c (linux_wait): Use target signal numbers.
14743 * target.h (struct target_ops): Doc fix.
14744 * server.h (target_signal_to_name): New prototype.
14745 * gdbreplay.c: Don't include headers unconditionally which
14746 are missing on mingw32. Include <winsock.h> for mingw32.
14747 (remote_close, remote_open): Adjust for Winsock support.
14748 * configure, config.in: Regenerated.
14750 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14752 * server.c (decode_xfer_read, write_qxfer_response): New.
14753 (handle_query): Take a packet length argument. Handle
14754 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14755 the qSupported response.
14756 (main): Update call to handle_query.
14758 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14760 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14761 (putpkt_binary): Renamed from putpkt and adjusted for binary
14763 (putpkt): New wrapper for putpkt_binary.
14764 (readchar): Don't mask off the high bit.
14765 (decode_X_packet): New function.
14766 * server.c (main): Call putpkt_binary if a handler sets the packet
14767 length. Save the length of the incoming packet. Handle 'X'.
14768 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14770 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14772 * server.c (handle_query): Handle qSupported.
14774 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14776 * remote-utils.c (all_symbols_looked_up): New variable.
14777 (look_up_one_symbol): Check it.
14778 * server.h (look_up_one_symbol): New declaration.
14779 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14781 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14783 * Makefile.in (linux-arm-low.o): Update dependencies.
14784 * linux-arm-low.c: Include "gdb_proc_service.h".
14785 (PTRACE_GET_THREAD_AREA): Define.
14786 (ps_get_thread_area): New function.
14788 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14790 * configure.srv (m68k*-*-uclinux*): New target.
14791 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14792 (linux_resume_one_process): Remove extraneous cast.
14793 (linux_read_offsets): New.
14794 (linux_target_op): Add linux_read_offsets on mmuless systems.
14795 * server.c (handle_query): Add qOffsets logic.
14796 * target.h (struct target_ops): Add read_offsets.
14798 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14800 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14801 (PTRACE_GET_THREAD_AREA): Define.
14802 (ps_get_thread_area): New function.
14803 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14804 (linux-x86-64-low.o): Update.
14806 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14808 * configure.ac: Remove checks for prfpregset_t.
14809 * gdb_proc_service.h: New file.
14810 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14811 new "gdb_proc_service.h".
14812 * proc-service.c: Likewise.
14813 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14814 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14815 * Makefile.in (gdb_proc_service_h): Updated.
14816 * configure, config.in: Regenerated.
14818 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14820 * remote-utils.c (prepare_resume_reply): Move declaration
14821 of gdb_id_from_wait to the top of the block.
14823 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14825 * linux-low.c (regsets_store_inferior_registers): Read the regset
14826 from the target before filling it.
14828 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14830 * server.c (attach_inferior): Return SIGTRAP for a successful
14833 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14835 * Makefile.in (OBS): Add version.o.
14836 (STAGESTUFF): Delete.
14837 (version.o): Add dependencies.
14838 (version.c): Replace rule.
14839 (clean): Remove version.c.
14840 * server.c (gdbserver_version): New.
14841 (gdbserver_usage): Use printf.
14842 (main): Handle --version and --help.
14843 * server.h (version, host_name): Add declarations.
14845 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14857 * linux-x86-64-low.c:
14859 * linux-s390-low.c:
14860 * linux-ppc64-low.c:
14862 * linux-mips-low.c:
14863 * linux-m68k-low.c:
14864 * linux-m32r-low.c:
14867 * linux-ia64-low.c:
14868 * linux-i386-low.c:
14869 * linux-crisv32-low.c:
14881 * gdbserver.1: Add (C) after Copyright. Update the FSF
14884 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14886 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14887 (arm_breakpoint_at): Recognize both breakpoints.
14888 (the_low_target): Use the correct breakpoint instruction.
14890 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14892 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14893 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14894 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14895 (the_low_target): Update.
14897 2005-10-25 Andreas Schwab <schwab@suse.de>
14899 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14901 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14902 (ia64_num_regs): Reduce to 462.
14904 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14906 * acinclude.m4: Correct quoting.
14907 * aclocal.m4: Regenerated.
14909 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14910 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14911 (thread_db_init): Call thread_db_err_str.
14912 * configure.ac: Check for TD_VERSION.
14913 * config.in, configure: Regenerated.
14915 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14917 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14919 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14921 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14922 is not available. Define HAVE_PTRACE_GETREGS if it is.
14923 * config.in, configure: Regenerated.
14924 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14925 * linux-i386-low.c, linux-m68k-low.c: Update to use
14926 HAVE_PTRACE_GETREGS.
14927 * linux-low.c (regsets_fetch_inferior_registers)
14928 (regsets_store_inferior_registers): Only return 0 if we processed
14930 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14931 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14933 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14935 * inferiors.c (struct thread_info): Add gdb_id.
14936 (add_thread): Add gdb_id argument.
14937 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14938 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14939 calls to add_thread.
14940 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14941 * server.c (handle_query): Use thread_to_gdb_id.
14942 (handle_v_cont, main): Use gdb_id_to_thread_id.
14943 * server.h (add_thread): Update prototype.
14944 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14947 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14949 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14950 left-padded registers.
14951 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14952 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14954 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14956 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14957 * configure: Regenerate.
14958 * config.in: Regenerate.
14959 * server.h (NEED_DECLARATION_STRERROR):
14960 Replace with !HAVE_DECL_STRERROR.
14962 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14964 * linux-low.c (linux_wait, linux_send_signal): Don't test
14965 an unsigned long variable for > 0 if it could be MAX_ULONG.
14966 * server.c (myresume): Likewise.
14967 * target.c (set_desired_inferior): Likewise.
14969 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14971 * configure.ac: Simplify and improve check for socklen_t.
14972 * configure, config.in: Regenerate.
14974 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14976 * acconfig.h: Remove.
14977 * configure.ac: Add a test for socklen_t. Use three-argument
14978 AC_DEFINE throughout.
14979 * config.in: Regenerated using autoheader 2.59.
14980 * configure: Regenerated.
14982 * gdbreplay.c (socklen_t): Provide a default.
14983 (remote_open): Use socklen_t.
14984 * remote-utils.c (socklen_t): Provide a default.
14985 (remote_open): Use socklen_t.
14986 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14989 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14991 * linux-low.c (linux_read_memory, linux_write_memory)
14992 (linux_read_auxv): Likewise.
14993 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14994 (check_mem_write): Likewise.
14995 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14997 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14998 (registers_from_string, register_data): Likewise.
14999 * server.c (handle_query, main): Likewise.
15000 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15001 (decode_M_packet): Likewise.
15002 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15003 * target.h (struct target_ops): Update read_memory, write_memory,
15005 (read_inferior_memory, write_inferior_memory): Update.
15006 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15007 to unsigned char *.
15008 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15009 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15010 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15011 linux-s390-low.c, linux-sh-low.c: Update for changes in
15012 read_inferior_memory and the_low_target->breakpoint.
15014 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15016 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15017 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15018 * configure.srv: Add powerpc64-*-linux*.
15019 * linux-ppc64-low.c: New file.
15021 2005-05-23 Orjan Friberg <orjanf@axis.com>
15023 * linux-cris-low.c: New file with support for CRIS.
15024 * linux-crisv32-low.c: Ditto for CRISv32.
15025 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15026 (clean): Add reg-cris.c and reg-crisv32.c.
15027 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15028 reg-crisv32.o, and reg-crisv32.c to make rules.
15029 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15030 recognized targets.
15032 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15034 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15035 of sizeof (PTRACE_XFER_TYPE).
15036 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15038 2005-05-12 Orjan Friberg <orjanf@axis.com>
15040 * target.h (struct target_ops): Add insert_watchpoint,
15041 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15042 pointers for hardware watchpoint support.
15043 * linux-low.h (struct linux_target_ops): Ditto.
15044 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15045 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15046 to linux_target_ops.
15047 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15049 * server.c (main): Recognize 'Z' and 'z' packets.
15051 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15053 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15054 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15055 (the_low_target): Add new members.
15057 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15059 * proc-service.c (ps_lgetregs): Search all_processes instead of
15062 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15064 * server.c (start_inferior): Change return type to int.
15065 (attach_inferior): Change sigptr to int *.
15066 (handle_v_cont, handle_v_requests): Change signal to int *.
15067 (main): Change signal to int.
15069 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15071 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15072 * configure.srv: Add m32r*-*-linux*.
15073 * linux-m32r-low.c: New file.
15075 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15077 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15079 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15081 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15082 Take unsigned long arguments for PIDs.
15083 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15084 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15085 (wait_for_sigstop, linux_resume_one_process)
15086 (regsets_fetch_inferior_registers, linux_send_signal)
15087 (linux_read_auxv): Likewise. Update the types of variables holding
15088 PIDs. Update format string specifiers.
15089 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15090 * remote-utils.c (prepare_resume_reply): Likewise.
15091 * server.c (cont_thread, general_thread, step_thread)
15092 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15094 (handle_query): Update format specifiers.
15095 (handle_v_cont, main): Use strtoul for thread IDs.
15096 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15097 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15098 (general_thread, step_thread, thread_from_wait)
15099 (old_thread_from_wait): Update.
15100 * target.h (struct thread_resume): Use unsigned long for THREAD.
15101 (struct target_ops): Use unsigned long for arguments to attach and
15104 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15106 * acinclude.m4: Include bfd/bfd.m4 directly.
15107 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15108 <agriffis@toolchain.org>.
15109 * aclocal.m4, configure: Regenerated.
15111 2005-01-07 Andrew Cagney <cagney@gnu.org>
15113 * configure.ac: Rename configure.in, require autoconf 2.59.
15114 * configure: Re-generate.
15116 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15118 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15119 LIBS when finished.
15120 * aclocal.m4: Regenerated.
15121 * configure: Regenerated.
15123 2004-11-21 Andreas Schwab <schwab@suse.de>
15125 * linux-m68k-low.c (m68k_num_gregs): Define.
15126 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15127 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15128 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15129 (m68k_breakpoint_at): New. Add to the_low_target.
15131 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15132 srv_linux_thread_db to yes.
15134 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15136 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15137 (ARCH_SET_FS): Likewise.
15138 (ARCH_GET_FS): Likewise.
15139 (ARCH_GET_GS): Likewise.
15141 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15143 * linux-i386-low.c (ps_get_thread_area): New.
15144 * linux-x86-64-low.c (ps_get_thread_area): New.
15145 * linux-low.c: Include <sys/syscall.h>.
15146 (linux_kill_one_process): Don't kill the first thread here.
15147 (linux_kill): Kill the first thread here.
15148 (kill_lwp): New function.
15149 (send_sigstop, linux_send_signal): Use it.
15150 * proc-service.c: Clean up #ifdefs.
15151 (fpregset_info): Delete.
15152 (ps_lgetregs): Update and enable implementation.
15153 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15155 * remote-utils.c (struct sym_cache, symbol_cache): New.
15156 (input_interrupt): Print a clearer message.
15157 (async_io_enabled): New variable.
15158 (enable_async_io, disable_async_io): Use it. Update comments.
15159 (look_up_one_symbol): Use the symbol cache.
15160 * thread-db.c (thread_db_look_up_symbols): New function.
15161 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15163 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15165 * configure.in: Test for -rdynamic.
15166 * configure: Regenerated.
15167 * Makefile (INTERNAL_LDFLAGS): New.
15168 (gdbserver, gdbreplay): Use it.
15170 2004-09-02 Andrew Cagney <cagney@gnu.org>
15172 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15174 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15176 * linux-low.c (linux_wait): Clear all_processes list also.
15178 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15180 * linux-low.c: Include <errno.h>. Remove extern declaration of
15183 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15185 * gdbreplay.c, server.h, utils.c: Update copyright years.
15187 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15189 * server.c (main): Print child status or termination signal from
15190 variable 'signal', not 'sig'.
15192 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15194 * linux-low.c (linux_read_memory): Change return type to
15195 int. Check for and return error from ptrace().
15196 * target.c (read_inferior_memory): Change return type to int. Pass
15197 back return status from the_target->read_memory().
15198 * target.h (struct target_ops): Adapt *read_memory() prototype.
15200 (read_inferior_memory): Adapt prototype.
15201 * server.c (main): Return an error packet if
15202 read_inferior_memory() returns an error.
15204 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15206 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15207 Unify with other clean targets.
15209 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15211 * server.c (handle_v_cont): Call set_desired_inferior.
15213 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15215 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15217 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15219 * linux-low.c (linux_wait): Unblock async I/O.
15220 (linux_resume): Block and enable async I/O.
15221 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15222 * server.h (block_async_io, unblock_async_io): Add prototypes.
15224 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15226 * remote-utils.c (remote_open): Print a status notice after
15227 opening a TCP port.
15228 * server.c (attach_inferior): Print a status notice after
15231 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15233 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15235 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15237 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15239 * server.c, target.h: Update copyright years.
15241 2004-02-25 Roland McGrath <roland@redhat.com>
15243 * target.h (struct target_ops): New member `read_auxv'.
15244 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15245 * linux-low.c (linux_read_auxv): New function.
15246 (linux_target_ops): Initialize `read_auxv' member to that.
15248 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15250 Committed by Jim Blandy <jimb@redhat.com>.
15252 * linux-s390-low.c (s390_num_regs): Update.
15253 (s390_regmap): Remove control registers. Use __s390x__ predefine
15254 instead of GPR_SIZE to distiguish s390 and s390x targets.
15256 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15258 * linux-low.c: Update copyright year.
15259 (check_removed_breakpoint): Clear pending_is_breakpoint.
15260 (linux_set_resume_request, linux_queue_one_thread)
15261 (resume_status_pending_p): New functions.
15262 (linux_continue_one_thread): Use process->resume.
15263 (linux_resume): Only resume threads if there are no pending events.
15264 * linux-low.h (struct process_info): Add resume request
15267 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15269 * regcache.c (new_register_cache): Clear the allocated register
15270 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15272 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15274 * linux-low.c (linux_resume): Take a struct thread_resume *
15276 (linux_wait): Update call.
15277 (resume_ptr): New static variable.
15278 (linux_continue_one_thread): Renamed from
15279 linux_continue_one_process. Use resume_ptr.
15280 (linux_resume): Use linux_continue_one_thread.
15281 * server.c (handle_v_cont, handle_v_requests): New functions.
15282 (myresume): New function.
15283 (main): Handle 'v' case.
15284 * target.h (struct thread_resume): New type.
15285 (struct target_ops): Change argument of "resume" to struct
15287 (myresume): Delete macro.
15289 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15291 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15292 (uninstall): Support DESTDIR.
15294 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15296 * configure.srv: Add xscale*linux copy of arm*linux entry.
15298 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15300 * linux-arm-low.c (arm_reinsert_addr): New function.
15301 (the_low_target): Add arm_reinsert_addr.
15303 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15305 * mem-break.c: Remove whitespace at end of file.
15307 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15309 * configure.in: Check whether we need to prototype strerror.
15310 * server.h: Optionally prototype strerror.
15311 * gdbreplay.c (perror_with_name): Use strerror.
15312 * linux-low.c (linux_attach_lwp): Use strerror.
15313 * utils.c (perror_with_name): Use strerror.
15314 * config.in, configure: Regenerated.
15316 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15318 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15319 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15321 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15323 * Makefile.in (SFILES): Update.
15324 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15325 low-sun3.c: Remove files.
15327 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15329 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15330 (linux_detach_one_process, linux_detach): New functions.
15331 (linux_target_ops): Add linux_detach.
15332 * server.c (main): Handle 'D' packet.
15333 * target.h (struct target_ops): Add "detach" member.
15334 (detach_inferior): Define.
15336 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15338 From Kelley Cook <kelleycook@wideopenwest.com>:
15339 * configure.srv: Accept i[34567]86 variants.
15341 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15343 * linux-low.c (linux_wait_for_event): Correct comment typos.
15344 (linux_resume_one_process): Call check_removed_breakpoint.
15345 (linux_send_signal): New function.
15346 (linux_target_ops): Add linux_send_signal.
15347 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15349 * target.h (struct target_ops): Add send_signal.
15351 2003-05-29 Jim Blandy <jimb@redhat.com>
15353 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15354 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15355 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15356 away part of the register's value.
15358 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15360 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15361 (linux_wait_for_event, linux_init_signals): Likewise.
15363 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15365 * configure.in: Check for stdlib.h.
15366 * configure: Regenerated.
15367 * config.in: Regenerated.
15369 2003-01-04 Andreas Schwab <schwab@suse.de>
15371 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15373 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15375 * Makefile.in: Remove obsolete code.
15377 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15379 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15380 defined(PT_FPR0_HI).
15382 2002-11-17 Stuart Hughes <seh@zee2.com>
15384 * linux-arm-low.c (arm_num_regs): Increase.
15385 (arm_regmap): Include status register.
15387 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15389 * linux-low.c (register_addr): Remove incorrect -1 check.
15391 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15393 * linux-low.c (linux_create_inferior): Call setpgid. Return
15395 (unstopped_p, linux_signal_pid): Remove.
15396 (linux_target_ops): Remove linux_signal_pid.
15397 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15398 global instead of target method.
15399 * target.h (struct target_ops): Remove signal_pid. Update comment
15400 for create_inferior.
15401 * server.c (signal_pid): New variable.
15402 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15403 gdbserver. Set the child to be the foreground process group.
15404 (attach_inferior): Set signal_pid.
15406 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15408 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15410 2002-08-20 Jim Blandy <jimb@redhat.com>
15412 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15415 2002-08-01 Andrew Cagney <cagney@redhat.com>
15417 * Makefile.in: Make chill references obsolete.
15419 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15421 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15422 * configure: Regenerate.
15423 * config.in: Regenerate.
15425 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15427 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15428 (perror_with_name, remote_close, remote_open, expect, play): Static.
15430 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15432 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15433 byte offsets instead of an array of indexes.
15434 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15436 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15438 * regcache.c: Add comment.
15440 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15442 * thread-db.c: New file.
15443 * proc-service.c: New file.
15444 * acinclude.m4: New file.
15445 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15446 proc-service.o, and thread-db.o.
15447 (linux-low.o): Add USE_THREAD_DB.
15448 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15449 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15450 * aclocal.m4: Regenerated.
15451 * config.in: Regenerated.
15452 * configure: Regenerated.
15453 * configure.in: Check for proc_service.h, sys/procfs.h,
15454 thread_db.h, and linux/elf.h headrs.
15455 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15456 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15457 Check for -lthread_db and thread support.
15458 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15459 PowerPC, and SuperH.
15460 * i387-fp.c: Constify arguments.
15461 * i387-fp.h: Likewise.
15462 * inferiors.c: (struct thread_info): Renamed from
15463 `struct inferior_info'. Remove PID member. Use generic inferior
15464 list header. All uses updated.
15465 (inferiors, signal_pid): Removed.
15466 (all_threads): New variable.
15467 (get_thread): Define.
15468 (add_inferior_to_list): New function.
15469 (for_each_inferior): New function.
15470 (change_inferior_id): New function.
15471 (add_inferior): Removed.
15472 (remove_inferior): New function.
15473 (add_thread): New function.
15474 (free_one_thread): New function.
15475 (remove_thread): New function.
15476 (clear_inferiors): Use for_each_inferior and free_one_thread.
15477 (find_inferior): New function.
15478 (find_inferior_id): New function.
15479 (inferior_target_data): Update argument type.
15480 (set_inferior_target_data): Likewise.
15481 (inferior_regcache_data): Likewise.
15482 (set_inferior_regcache_data): Likewise.
15483 * linux-low.c (linux_bp_reinsert): Remove.
15484 (all_processes, stopping_threads, using_thrads)
15485 (struct pending_signals, debug_threads, pid_of): New.
15486 (inferior_pid): Replace with macro.
15487 (struct inferior_linux_data): Remove.
15488 (get_stop_pc, add_process): New functions.
15489 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15490 Use add_process and add_thread.
15491 (linux_attach_lwp): New function, based on old linux_attach. Use
15492 add_process and add_thread. Set stop_expected for new threads.
15493 (linux_attach): New function.
15494 (linux_kill_one_process): New function.
15495 (linux_kill): Kill all LWPs.
15496 (linux_thread_alive): Use find_inferior_id.
15497 (check_removed_breakpoints, status_pending_p): New functions.
15498 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15499 Update. Use WNOHANG. Wait for cloned processes also. Update process
15500 struct for the found process.
15501 (linux_wait_for_event): New function.
15502 (linux_wait): Use it. Support LWPs.
15503 (send_sigstop, wait_for_sigstop, stop_all_processes)
15504 (linux_resume_one_process, linux_continue_one_process): New functions.
15505 (linux_resume): Support LWPs.
15506 (REGISTER_RAW_SIZE): Remove.
15507 (fetch_register): Use register_size instead. Call supply_register.
15508 (usr_store_inferior_registers): Likewise. Call collect_register.
15509 Fix recursive case.
15510 (regsets_fetch_inferior_registers): Improve error message.
15511 (regsets_store_inferior_registers): Add debugging.
15512 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15513 (unstopped_p, linux_signal_pid): New functions.
15514 (linux_target_ops): Add linux_signal_pid.
15515 (linux_init_signals): New function.
15516 (initialize_low): Call it. Initialize using_threads.
15517 * regcache.c (inferior_regcache_data): Add valid
15519 (get_regcache): Fetch registers lazily. Add fetch argument
15520 and update all callers.
15521 (regcache_invalidate_one, regcache_invalidate): New
15523 (new_register_cache): Renamed from create_register_cache.
15524 Return the new regcache.
15525 (free_register_cache): Change argument to a void *.
15526 (registers_to_string, registers_from_string): Call get_regcache
15527 with fetch flag set.
15528 (register_data): Make static. Pass fetch flag to get_regcache.
15529 (supply_register): Call get_regcache with fetch flag clear.
15530 (collect_register): Call get_regcache with fetch flag set.
15531 (collect_register_as_string): New function.
15532 * regcache.h: Update.
15533 * remote-utils.c (putpkt): Flush after debug output and use
15535 Handle input interrupts while waiting for an ACK.
15536 (input_interrupt): Use signal_pid method.
15537 (getpkt): Flush after debug output and use stderr.
15538 (outreg): Use collect_register_as_string.
15539 (new_thread_notify, dead_thread_notify): New functions.
15540 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15541 and general_thread.
15542 (look_up_one_symbol): Flush after debug output.
15543 * server.c (step_thread, server_waiting): New variables.
15544 (start_inferior): Don't use signal_pid. Update call to mywait.
15545 (attach_inferior): Update call to mywait.
15546 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15547 (main): Don't fetch/store registers explicitly. Use
15548 set_desired_inferior. Support proposed ``Hs'' packet. Update
15550 * server.h: Update.
15551 (struct inferior_list, struct_inferior_list_entry): New.
15552 * target.c (set_desired_inferior): New.
15553 (write_inferior_memory): Constify.
15554 (mywait): New function.
15555 * target.h: Update.
15556 (struct target_ops): New signal_pid method.
15557 (mywait): Removed macro, added prototype.
15559 * linux-low.h (regset_func): Removed.
15560 (regset_fill_func, regset_store_func): New.
15561 (enum regset_type): New.
15562 (struct regset_info): Add type field. Use new operation types.
15563 (struct linux_target_ops): stop_pc renamed to get_pc.
15564 Add decr_pc_after_break and breakpoint_at.
15565 (get_process, get_thread_proess, get_process_thread)
15566 (strut process_info, all_processes, linux_attach_lwp)
15567 (thread_db_init): New.
15569 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15570 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15571 (the_low_target): Add new members.
15572 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15573 (i386_store_fpxregset): Constify.
15574 (target_regsets): Add new kind identifier.
15575 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15576 (i386_set_pc): Add debugging.
15577 (i386_breakpoint_at): New function.
15578 (the_low_target): Add new members.
15579 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15580 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15581 (mips_breakpoint_at): New.
15582 (the_low_target): Add new members.
15583 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15584 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15585 (the_low_target): Add new members.
15586 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15587 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15588 (the_low_target): Add new members.
15589 * linux-x86-64-low.c (target_regsets): Add new kind
15592 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15594 From Martin Pool <mbp@samba.org>:
15595 * server.c (gdbserver_usage): New function.
15598 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15600 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15601 stop_at -> stop_pc.
15603 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15605 * Makefile.in: Remove obsolete code.
15607 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15609 * linux-low.c (regsets_fetch_inferior_registers),
15610 (regsets_store_inferior_registers): Removed cast to int from
15612 * regcache.h: Added declaration of struct inferior_info.
15614 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15616 * inferiors.c (struct inferior_info): Add regcache_data.
15617 (add_inferior): Call create_register_cache.
15618 (clear_inferiors): Call free_register_cache.
15619 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15620 * regcache.c (struct inferior_regcache_data): New.
15621 (registers): Remove.
15622 (get_regcache): New function.
15623 (create_register_cache, free_register_cache): New functions.
15624 (set_register_cache): Don't initialize the register cache here.
15625 (registers_to_string, registers_from_string, register_data): Call
15627 * regcache.h: Add prototypes.
15628 * server.h: Likewise.
15630 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15632 * mem-break.c: New file.
15633 * mem-break.h: New file.
15634 * Makefile.in: Add mem-break.o rule; update server.h
15636 * inferiors.c (struct inferior_info): Add target_data
15638 (clear_inferiors): Free target_data member if set.
15639 (inferior_target_data, set_inferior_target_data): New functions.
15640 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15641 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15642 * linux-low.c (linux_bp_reinsert): New variable.
15643 (struct inferior_linux_data): New.
15644 (linux_create_inferior): Use set_inferior_target_data.
15645 (linux_attach): Likewise. Call add_inferior.
15646 (linux_wait_for_one_inferior): New function.
15647 (linux_wait): Call it.
15648 (linux_write_memory): Add const.
15649 (initialize_low): Call set_breakpoint_data.
15650 * linux-low.h (struct linux_target_ops): Add breakpoint
15652 * server.c (attach_inferior): Remove extra add_inferior
15654 * server.h: Include mem-break.h. Update inferior.c
15656 * target.c (read_inferior_memory)
15657 (write_inferior_memory): New functions.
15658 * target.h (read_inferior_memory)
15659 (write_inferior_memory): Change macros to prototypes.
15660 (struct target_ops): Update comments. Add const to write_memory
15663 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15665 * linux-low.c (usr_store_inferior_registers): Support
15666 registers which are allowed to fail to store.
15667 * linux-low.h (linux_target_ops): Likewise.
15668 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15669 (ppc_cannot_store_register): FPSCR may not be storable.
15671 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15673 * server.h: Include <string.h> if HAVE_STRING_H.
15674 * ChangeLog: Correct paths in last ChangeLog entry.
15676 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15678 * linux-low.h: Remove obsolete prototypes.
15679 (struct linux_target_ops): New.
15680 (extern the_low_target): New.
15681 * linux-low.c (num_regs, regmap): Remove declarations.
15682 (register_addr): Use the_low_target explicitly.
15683 (fetch_register): Likewise.
15684 (usr_fetch_inferior_registers): Likewise.
15685 (usr_store_inferior_registers): Likewise.
15686 * linux-arm-low.c (num_regs): Remove.
15687 (arm_num_regs): Define.
15688 (arm_regmap): Renamed from regmap, made static.
15689 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15691 (arm_cannot_store_register): Renamed from cannot_store_register,
15693 (the_low_target): New.
15694 * linux-i386-low.c (num_regs): Remove.
15695 (i386_num_regs): Define.
15696 (i386_regmap): Renamed from regmap, made static.
15697 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15699 (i386_cannot_store_register): Renamed from cannot_store_register,
15701 (the_low_target): New.
15702 * linux-ia64-low.c (num_regs): Remove.
15703 (ia64_num_regs): Define.
15704 (ia64_regmap): Renamed from regmap, made static.
15705 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15707 (ia64_cannot_store_register): Renamed from cannot_store_register,
15709 (the_low_target): New.
15710 * linux-m68k-low.c (num_regs): Remove.
15711 (m68k_num_regs): Define.
15712 (m68k_regmap): Renamed from regmap, made static.
15713 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15715 (m68k_cannot_store_register): Renamed from cannot_store_register,
15717 (the_low_target): New.
15718 * linux-mips-low.c (num_regs): Remove.
15719 (mips_num_regs): Define.
15720 (mips_regmap): Renamed from regmap, made static.
15721 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15723 (mips_cannot_store_register): Renamed from cannot_store_register,
15725 (the_low_target): New.
15726 * linux-ppc-low.c (num_regs): Remove.
15727 (ppc_num_regs): Define.
15728 (ppc_regmap): Renamed from regmap, made static.
15729 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15731 (ppc_cannot_store_register): Renamed from cannot_store_register,
15733 (the_low_target): New.
15734 * linux-s390-low.c (num_regs): Remove.
15735 (s390_num_regs): Define.
15736 (s390_regmap): Renamed from regmap, made static.
15737 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15739 (s390_cannot_store_register): Renamed from cannot_store_register,
15741 (the_low_target): New.
15742 * linux-sh-low.c (num_regs): Remove.
15743 (sh_num_regs): Define.
15744 (sh_regmap): Renamed from regmap, made static.
15745 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15747 (sh_cannot_store_register): Renamed from cannot_store_register,
15749 (the_low_target): New.
15750 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15751 (the_low_target): New.
15753 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15755 * Makefile.in: Add stamp-h target.
15756 * configure.in: Create stamp-h.
15757 * configure: Regenerated.
15759 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15761 * inferiors.c: New file.
15762 * target.c: New file.
15763 * target.h: New file.
15764 * Makefile.in: Add target.o and inferiors.o. Update
15766 * linux-low.c (inferior_pid): New static variable,
15767 moved from server.c.
15768 (linux_create_inferior): Renamed from create_inferior.
15769 Call add_inferior. Return 0 on success instead of a PID.
15770 (linux_attach): Renamed from myattach.
15771 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15772 (linux_thread_alive): Renamed from mythread_alive.
15773 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15775 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15776 (regsets_store_inferior_registers): Correct error message.
15777 Add missing ``return 0''.
15778 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15779 (linux_store_registers): Renamed from store_inferior_registers.
15780 (linux_read_memory): Renamed from read_inferior_memory.
15781 (linux_write_memory): Renamed from write_inferior_memory.
15782 (linux_target_ops): New structure.
15783 (initialize_low): Call set_target_ops ().
15784 * remote-utils.c (unhexify): New function.
15785 (hexify): New function.
15786 (input_interrupt): Send signals to ``signal_pid''.
15787 * server.c (inferior_pid): Remove.
15788 (start_inferior): Update create_inferior call.
15789 (attach_inferior): Call add_inferior.
15790 (handle_query): New function.
15791 (main): Call handle_query for `q' packets.
15792 * server.h: Include "target.h". Remove obsolete prototypes.
15793 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15795 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15797 * Makefile.in: Add WARN_CFLAGS. Update configury
15799 * configure.in: Check for <string.h>
15800 * configure: Regenerate.
15801 * config.in: Regenerate.
15802 * gdbreplay.c: Include needed system headers.
15803 (remote_open): Remove strchr prototype.
15804 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15805 * regcache.c (supply_register): Change buf argument to const void *.
15806 (supply_register_by_name): Likewise.
15807 (collect_register): Change buf argument to void *.
15808 (collect_register_by_name): Likewise.
15809 * regcache.h: Add missing prototypes.
15810 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15811 * server.c (handle_query): New function.
15812 (attached): New static variable, moved out of main.
15813 (main): Quiet longjmp clobber warnings.
15814 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15815 * utils.c (error): Remove NORETURN.