1 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3 * server.c (struct visit_actioned_threads_data): Remove.
4 (visit_actioned_threads): Change prototype to take arguments
6 (resume): Use find_thread instead of find_inferior.
8 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
10 * server.c (queue_stop_reply_callback): Change prototype, return
12 (find_status_pending_thread_callback): Remove.
13 (handle_status): Replace find_inferior with find_thread and
16 2017-10-25 Alan Hayward <alan.hayward@arm.com>
18 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
20 (aarch64_store_gregset): Likewise.
21 (aarch64_fill_fpregset): Likewise.
22 (aarch64_store_fpregset): Likewise.
24 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
26 * gdbthread.h (find_thread, for_each_thread): New functions.
27 * inferiors.c (thread_of_pid): Remove.
28 (find_any_thread_of_pid): Use find_thread.
29 * linux-low.c (num_lwps): Use for_each_thread.
31 2017-10-17 Yao Qi <yao.qi@linaro.org>
33 * Makefile.in: Remove one rule.
34 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
36 2017-10-17 Yao Qi <yao.qi@linaro.org>
38 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
39 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
41 2017-10-17 Yao Qi <yao.qi@linaro.org>
43 * configure.srv: Rename arm.o with arch/arm.o.
45 2017-10-17 Yao Qi <yao.qi@linaro.org>
47 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
48 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
49 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
50 (arch-i386.o, arch-amd64.o): Remove rules.
52 Update POSTCOMPILE and COMPILE.pre.
53 * configure.ac: Invoke AC_CONFIG_COMMANDS.
54 * configure: Re-generated.
55 * configure.srv: Replace arch-i386.o with arch/i386.o.
56 Replace arch-amd64.o with arch/amd64.o.
58 2017-10-16 Yao Qi <yao.qi@linaro.org>
60 * configure: Regenerated.
62 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
64 * inferiors.h: (struct inferior_list): Remove.
65 (struct inferior_list_entry); Remove.
66 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
67 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
68 get_first_inferior): Remove.
69 (for_each_inferior, for_each_inferior_with_data, find_inferior,
70 find_inferior_id, find_inferior_in_random): Change signature.
71 * inferiors.c (all_threads): Change type to
72 std::list<thread_info *>.
73 (get_thread): Remove macro.
74 (find_inferior, find_inferior_id): Change signature, implement
76 (find_inferior_in_random): Change signature, implement using
77 find_thread_in_random.
78 (for_each_inferior, for_each_inferior_with_data): Change
79 signature, implement using for_each_thread.
80 (add_inferior_to_list, remove_inferior): Remove.
81 (add_thread, get_first_thread, thread_of_pid,
82 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
83 (get_first_inferior, one_inferior_p, clear_inferior_list):
85 (clear_inferiors, get_thread_process): Update.
86 * gdbthread.h: Include <list>.
87 (struct thread_info) <entry>: Remove field.
89 (all_threads): Change type to std::list<thread_info *>.
90 (get_first_inferior): Add doc.
91 (find_thread, for_each_thread, find_thread_in_random): New
93 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
94 * linux-arm-low.c (update_registers_callback): Update.
95 * linux-low.c (second_thread_of_pid_p): Update.
96 (kill_one_lwp_callback, linux_detach_lwp_callback,
97 delete_lwp_callback, status_pending_p_callback, same_lwp,
98 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
99 iterate_over_lwps, not_stopped_callback,
100 resume_stopped_resumed_lwps, count_events_callback,
101 select_singlestep_lwp_callback, select_event_lwp_callback,
102 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
103 suspend_and_send_sigstop_callback, wait_for_sigstop,
104 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
105 lwp_running, linux_set_resume_request, resume_status_pending_p,
106 need_step_over_p, start_step_over, linux_resume_one_thread,
107 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
108 reset_lwp_ptrace_options_callback): Update.
109 * linux-mips-low.c (update_watch_registers_callback): Update.
110 * regcache.c (regcache_invalidate_one, regcache_invalidate):
112 (free_register_cache_thread_one): Remove.
113 (regcache_release): Update.
114 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
115 handle_qxfer_threads_worker): Update.
116 (handle_query): Update, use list iterator.
117 (visit_actioned_threads, handle_pending_status,
118 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
119 clear_pending_status_callback, set_pending_status_callback,
120 find_status_pending_thread_callback, handle_status,
121 process_serial_event): Update.
122 * target.c (thread_search_callback): Update.
123 * thread-db.c (thread_db_get_tls_address): Update.
124 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
126 * win32-i386-low.c (update_debug_registers_callback): Update.
127 * win32-low.c (delete_thread_info, child_delete_thread,
128 continue_one_thread, suspend_one_thread,
129 get_child_debug_event): Adjust.
131 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
133 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
134 * inferiors.h: Include <list>.
135 (struct process_info) <entry>: Remove field.
137 (pid_of): Change macro to function.
138 (ptid_of, lwpid_of): Remove macro.
139 (all_processes): Change type to std::list<process_info *>.
140 (ALL_PROCESSES): Remove macro.
141 (for_each_process, find_process): New function.
142 * inferiors.c (all_processes): Change type to
143 std::list<process_info *>.
144 (find_thread_process): Adjust.
145 (add_process): Likewise.
146 (remove_process): Likewise.
147 (find_process_pid): Likewise.
148 (get_first_process): Likewise.
149 (started_inferior_callback): Remove.
150 (have_started_inferiors_p): Adjust.
151 (attached_inferior_callback): Remove.
152 (have_attached_inferiors_p): Adjust.
153 * linux-low.c (check_zombie_leaders): Likewise.
154 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
155 (x86_linux_update_xmltarget): Adjust.
156 * server.c (handle_query): Likewise.
157 (gdb_reattached_process): Remove.
158 (handle_status): Adjust.
159 (kill_inferior_callback): Likewise.
160 (detach_or_kill_inferior): Remove.
161 (print_started_pid): Likewise.
162 (print_attached_pid): Likewise.
163 (detach_or_kill_for_exit): Update.
164 (process_serial_event): Likewise.
165 * linux-arm-low.c (arm_new_fork): Likewise.
167 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
169 * dll.h: Include <list>.
170 (struct dll_info): Add constructor.
171 <entry>: Remove field.
172 (all_dlls): Change type to std::list<dll_info>.
173 * dll.c: Include <algorithm>.
174 (get_dll): Remove macro.
175 (all_dlls): Change type to std::list<dll_info *>.
176 (free_one_dll): Remove.
177 (match_dll): Likewise.
178 (loaded_dll): Adjust.
179 (unloaded_dll): Adjust to all_dlls type change, use
180 std::find_if. Inline code from match_dll.
181 (clear_dlls): Adjust to all_dlls type change.
182 * server.c (emit_dll_description): Remove.
183 (handle_qxfer_libraries): Adjust to all_dlls type change,
184 integrate emit_dll_description's functionality.
186 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
188 * linux-low.h (struct linux_target_ops) <delete_process>: New
190 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
191 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
192 (struct linux_target_ops): Add delete_process callback.
193 * linux-arm-low.c (arm_delete_process): New.
194 (struct linux_target_ops): Add delete_process callback.
195 * linux-bfin-low.c (struct linux_target_ops): Likewise.
196 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
197 * linux-m32r-low.c (struct linux_target_ops): Likewise.
198 * linux-mips-low.c (mips_linux_delete_process): New.
199 (struct linux_target_ops): Add delete_process callback.
200 * linux-ppc-low.c (struct linux_target_ops): Likewise.
201 * linux-s390-low.c (struct linux_target_ops): Likewise.
202 * linux-sh-low.c (struct linux_target_ops): Likewise.
203 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
204 * linux-tile-low.c (struct linux_target_ops): Likewise.
205 * linux-x86-low.c (x86_linux_delete_process): New.
206 (struct linux_target_ops): Add delete_process callback.
207 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
209 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
211 * linux-aarch64-low.c (the_low_target): Add thread delete
213 * linux-arm-low.c (arm_delete_thread): New function.
214 (the_low_target): Add thread delete callback.
215 * linux-bfin-low.c (the_low_target): Likewise.
216 * linux-crisv32-low.c (the_low_target): Likewise.
217 * linux-low.c (delete_lwp): Invoke delete_thread callback if
219 * linux-low.h (struct linux_target_ops) <delete_thread>: New
221 * linux-m32r-low.c (the_low_target): Add thread delete callback.
222 * linux-mips-low.c (mips_linux_delete_thread): New function.
223 (the_low_target): Add thread delete callback.
224 * linux-ppc-low.c (the_low_target): Likewise.
225 * linux-s390-low.c (the_low_target): Likewise.
226 * linux-sh-low.c (the_low_target): Likewise.
227 * linux-tic6x-low.c (the_low_target): Likewise.
228 * linux-tile-low.c (the_low_target): Likewise.
229 * linux-x86-low.c (the_low_target): Likewise.
230 * linux-xtensa-low.c (the_low_target): Likewise.
232 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
234 * win32-low.c: Include "common-inferior.h".
236 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
238 * inferiors.c (set_inferior_cwd): New function.
239 * server.c (handle_general_set): Handle QSetWorkingDir packet.
240 (handle_query): Inform that QSetWorkingDir is supported.
241 * win32-low.c (create_process): Pass the inferior's cwd to
244 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
246 * inferiors.c (current_inferior_cwd): New global variable.
247 (get_inferior_cwd): New function.
248 * inferiors.h (struct process_info) <cwd>: New field.
250 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
252 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
253 (OBS): Add gdb_tilde_expand.o.
255 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
257 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
258 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
260 2017-09-29 Pedro Alves <palves@redhat.com>
262 * ax.c (gdb_parse_agent_expr): Constify.
263 * ax.h (gdb_parse_agent_expr): Constify.
264 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
266 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
267 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
268 * remote-utils.h (read_ptid): Constify.
269 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
270 (process_point_options, process_serial_event): Constify.
271 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
272 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
273 (cmd_qtbuffer): Constify.
275 2017-09-29 Pedro Alves <palves@redhat.com>
277 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
280 2017-09-29 Pedro Alves <palves@redhat.com>
282 * linux-low.c (handle_extended_wait): Pass parent thread instead
283 of process to thread_db_notice_clone.
284 * linux-low.h (thread_db_notice_clone): Replace parent process
285 parameter with parent thread parameter.
286 * thread-db.c (find_one_thread): Add comment.
287 (thread_db_notice_clone): Replace parent process parameter with
288 parent thread parameter. Temporarily switch to the parent thread.
290 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
292 * gdbthread.h: Include "common-gdbthread.h".
293 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
294 "if" when validating the ptid.
295 * remote-utils.c: Include "gdbthread.h".
296 (prepare_resume_reply): Use "switch_to_thread".
297 * target.c (done_accessing_memory): Likewise.
299 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
301 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
302 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
303 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
304 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
305 s390x-gs-linux64-ipa.o to ipa_obj.
306 * linux-s390-low.c (HWCAP_S390_GS): New define.
307 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
309 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
310 (s390_arch_setup): Check for guarded-storage support and choose
312 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
313 init_registers_s390x_gs_linux64.
314 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
316 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
317 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
319 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
321 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
323 2017-09-21 Kevin Buettner <kevinb@redhat.com>
325 * linux-low.h (struct lwp_info): Add new field, thread_handle.
326 (thread_db_thread_handle): Declare.
327 * linux-low.c (linux_target_ops): Initialize thread_handle.
328 * server.c (handle_qxfer_threads_worker): Add support for
330 * target.h (struct target_ops): Add new function pointer,
332 (target_thread_handle): Define.
333 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
335 (thread_db_thread_handle): New function.
337 2017-09-21 Kevin Buettner <kevinb@redhat.com>
339 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
340 * linux-low.h (thread_db_notice_clone): Declare.
341 * thread-db.c (thread_db_notice_clone): New function.
343 2017-09-21 Pedro Alves <palves@redhat.com>
345 * server.c (gdb_read_memory, handle_status, process_serial_event)
346 (handle_serial_event, handle_target_event): Adjust to
347 set_desired_thread prototype change.
348 * target.c (set_desired_thread): Remove 'use_general' parameter
350 * target.h (set_desired_thread): Remove 'use_general' parameter.
352 2017-09-20 Tom Tromey <tom@tromey.com>
354 * target.c (target_terminal::terminal_state): Define.
355 (target_terminal::init): Rename from target_terminal_init.
356 (target_terminal::inferior): Rename from
357 target_terminal_inferior.
358 (target_terminal::ours): Rename from target_terminal_ours.
359 (target_terminal::ours_for_output, target_terminal::info): New.
361 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
363 * server.c (accumulate_file_name_length): Remove.
364 (emit_dll_description): Adjust to std::string change.
365 (handle_qxfer_libraries): Use std::string to hold document.
367 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
369 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
370 return type of xml_escape_text.
371 * server.c (emit_dll_description): Likewise.
373 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
375 * server.c (captured_main): Accept argument for --selftest.
376 Update run_tests call.
377 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
378 when registering selftests.
380 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
382 * regcache.c (get_thread_regcache): Update code to use "std::vector"
383 instead of "VEC" for "target_desc.reg_defs".
384 (regcache_cpy): Likewise.
385 (registers_to_string): Likewise.
386 (registers_from_string): Likewise.
387 (find_regno): Likewise.
388 (supply_regblock): Likewise.
389 (regcache_raw_read_unsigned): Likewise.
390 * tdesc.c (init_target_desc): Likewise.
391 (tdesc_create_reg): Likewise.
392 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
393 (struct target_desc) <reg_defs>: Convert to "std::vector".
394 (target_desc): Do not initialize "reg_defs".
395 (~target_desc): Update code to use "std::vector" instead of "VEC"
396 for "target_desc.reg_defs".
397 (operator==): Likewise.
399 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
401 * inferiors.h (thread_to_gdb_id): Remove.
402 * inferiors.c (thread_to_gdb_id): Remove.
403 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
404 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
405 lynx_store_registers, lynx_read_memory, lynx_write_memory):
407 * nto-low.c (nto_fetch_registers, nto_store_registers,
408 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
410 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
412 * inferiors.h (gdb_id_to_thread_id): Remove.
413 * inferiors.c (gdb_id_to_thread_id): Remove.
414 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
415 removal. Move pid declaration closer to where it's used.
417 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
419 * server.c (handle_detach): New function.
420 (process_serial_event): Move code out, call handle_detach.
422 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
424 * server.c (require_running): Rename to ...
425 (require_running_or_return): ... this ...
426 (require_running_or_break): ... and this.
427 (handle_query, process_serial_event): Adjust.
429 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
431 * linux-low.c (linux_set_resume_request): Remove unused
434 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
436 * server.c (first_thread_of): Remove.
437 (process_serial_event): Replace usage of first_thread_of with
438 find_any_thread_of_pid.
439 * tracepoint.c (same_process_p): Remove.
440 (gdb_agent_about_to_close): Replace usage of same_process_p with
441 find_any_thread_of_pid.
442 * linux-x86-low.c (same_process_callback): Remove.
443 (x86_arch_setup_process_callback): Replace usage of
444 same_process_callback with find_any_thread_of_pid.
445 * thread-db.c (any_thread_of): Remove.
446 (switch_to_process): Replace usage of any_thread_of with
447 find_any_thread_of_pid.
448 * inferiors.c (thread_pid_matches_callback): Remove.
449 (find_thread_process): Adjust to use find_any_thread_of_pid.
451 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
453 * regcache.c (get_thread_regcache): Guard calls to "memset"
456 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
458 * linux-low.c (handle_extended_wait): Use
459 "allocate_target_description" instead of "XNEW".
460 * linux-x86-low.c (initialize_low_arch): Likewise.
462 2017-09-05 Yao Qi <yao.qi@linaro.org>
464 * configure.srv (srv_i386_regobj): Remove.
465 (srv_amd64_regobj): Remove.
466 (srv_regobj): Set it to "" for x86 non-linux targets.
467 * linux-x86-tdesc.c (i386_linux_read_description):
468 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
469 (init_registers_i386): Remove the declaration.
470 (tdesc_i386): Remove the declaration.
471 (lynx_i386_arch_setup): Call i386_create_target_description.
472 * nto-x86-low.c: Likewise.
473 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
474 [!__x86_64__]: include arch/i386.h.
475 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
477 2017-09-05 Yao Qi <yao.qi@linaro.org>
479 * configure.srv (srv_amd64_linux_xmlfiles): Remove
480 i386/amd64-XXX-linux from it.
482 2017-09-05 Yao Qi <yao.qi@linaro.org>
484 * configure.srv: Empty srv_amd64_linux_regobj if $development is
486 (ipa_amd64_linux_regobj): Remove.
487 (ipa_x32_linux_regobj): Remove.
489 2017-09-05 Yao Qi <yao.qi@linaro.org>
491 * Makefile.in (arch-amd64.o): New rule.
492 * configure.srv: Append arch-amd64.o.
493 * linux-amd64-ipa.c: Include common/x86-xstate.h.
494 (get_ipa_tdesc): Call amd64_linux_read_description.
495 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
496 and init_registers_amd64_XXX.
497 * linux-x86-low.c (x86_linux_read_description): Call
498 amd64_linux_read_description.
499 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
500 (initialize_low_arch): Don't call init_registers_x32_XXX and
501 init_registers_amd64_XXX.
502 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
504 [__x86_64__] (amd64_tdesc_test): New function.
505 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
506 and init_registers_amd64_XXX.
507 * linux-x86-tdesc.c: Include arch/amd64.h.
508 (xcr0_to_tdesc_idx): New function.
509 (i386_linux_read_description): New function.
510 (amd64_get_ipa_tdesc_idx): New function.
511 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
512 (amd64_get_ipa_tdesc): Declare.
514 2017-09-05 Yao Qi <yao.qi@linaro.org>
516 * configure.srv (srv_i386_linux_xmlfiles): Remove
517 i386/i386-XXX-linux.xml from it.
519 2017-09-05 Yao Qi <yao.qi@linaro.org>
521 * configure.srv: Set srv_i386_linux_regobj empty if $development
523 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
524 initialize_low_tdesc.
525 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
526 with #if initialize_low_tdesc.
527 * linux-x86-tdesc-selftest.c: New file.
528 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
530 2017-09-05 Yao Qi <yao.qi@linaro.org>
532 * Makefile.in (arch-i386.o): New rule.
533 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
534 (x86_64-*-linux*): Likewise.
535 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
537 (i386_linux_read_description): Remove code and call
538 i386_create_target_description.
539 * tdesc.c (allocate_target_description): New function.
540 * tdesc.h (set_tdesc_architecture): Remove declaration.
541 (set_tdesc_osabi): Likewise.
543 2017-09-05 Yao Qi <yao.qi@linaro.org>
545 * linux-x86-tdesc.c: Don't include <inttypes.h>.
546 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
547 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
549 * server.c (get_features_xml): Call tdesc_get_features_xml.
550 * tdesc.c (set_tdesc_architecture): New function.
551 (set_tdesc_osabi): New function.
552 (tdesc_get_features_xml): New function.
553 (tdesc_create_feature): Add an argument.
554 * tdesc.h (struct target_desc) <features>: New field.
555 <arch, osabi>: New field.
556 (~target_desc): xfree features, arch, and osabi.
557 (target_desc::oerator==): Don't compare .xmltarget.
558 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
559 (set_tdesc_osabi): Likewise.
560 (tdesc_get_features_xml): Likewise.
562 2017-09-05 Yao Qi <yao.qi@linaro.org>
564 * linux-x86-tdesc.c: Include selftest.h.
565 (i386_tdesc_test): New function.
566 (initialize_low_tdesc): Call selftests::register_test.
567 * tdesc.h: Include regdef.h.
568 (target_desc): Override operator == and !=.
570 2017-09-05 Yao Qi <yao.qi@linaro.org>
572 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
574 * linux-i386-ipa.c: Include common/x86-xstate.h
575 (get_ipa_tdesc): Call i386_linux_read_description.
576 (initialize_low_tracepoint): Don't call init_registers_XXX
577 functions, call initialize_low_tdesc instead.
578 * linux-x86-low.c (x86_linux_read_description): Call
579 i386_linux_read_description.
580 (initialize_low_arch): Don't call init_registers_i386_XXX
581 functions, call initialize_low_tdesc.
582 * linux-x86-tdesc.c: New file.
583 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
584 (i386_get_ipa_tdesc_idx): Declare.
585 (i386_get_ipa_tdesc): Declare.
586 (initialize_low_tdesc): Declare.
588 2017-09-05 Yao Qi <yao.qi@linaro.org>
590 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
593 2017-09-05 Yao Qi <yao.qi@linaro.org>
595 * Makefile.in (IPA_OBJS): Add vec-ipa.o
596 * regcache.c (get_thread_regcache): Use VEC_length.
597 (init_register_cache): Likewise.
598 (regcache_cpy): Likewise.
599 (registers_to_string): Iterate reg_defs via VEC_iterate.
600 (find_regno): Likewise.
601 (find_register_by_number): Use VEC_index.
602 (register_size): Call find_register_by_number.
603 (register_data): Call find_register_by_number.
604 (supply_regblock): Use VEC_length.
605 (regcache_raw_read_unsigned): Likewise.
606 * tdesc.c (init_target_desc): Iterate reg_defs via
608 (default_description): Update initializer.
609 (copy_target_description): Don't update field num_registers.
610 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
611 <num_registers>: Remove.
613 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
615 * Makefile.in (.SECONDARY): Define target.
617 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
619 * linux-low.c (linux_wait_1): Adjust.
620 * server.c (queue_stop_reply_callback): Adjust.
622 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
624 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
625 QEnvironmentUnset and QEnvironmentReset packets.
626 (handle_query): Inform remote that QEnvironmentHexEncoded,
627 QEnvironmentUnset and QEnvironmentReset are supported.
629 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
631 * inferiors.h (inferior_target_data): Rename to ...
632 (thread_target_data): ... this.
633 (inferior_regcache_data): Rename to ...
634 (thread_regcache_data): ... this.
635 (set_inferior_regcache_data): Rename to ...
636 (set_thread_regcache_data): ... this.
637 * inferiors.c (inferior_target_data): Rename to ...
638 (thread_target_data): ... this.
639 (inferior_regcache_data): Rename to ...
640 (thread_regcache_data): ... this.
641 (set_inferior_regcache_data): Rename to ...
642 (set_thread_regcache_data): ... this.
643 (free_one_thread): Update.
644 * linux-low.h (get_thread_lwp): Update.
645 * regcache.c (get_thread_regcache): Update.
646 (regcache_invalidate_thread): Update.
647 (free_register_cache_thread): Update.
648 * win32-i386-low.c (update_debug_registers_callback): Update.
649 (win32_get_current_dr): Update.
650 * win32-low.c (thread_rec): Update.
651 (delete_thread_info): Update.
652 (continue_one_thread): Update.
653 (suspend_one_thread): Update.
655 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
657 * inferiors.c (set_inferior_target_data): Remove.
658 * inferiors.h (set_inferior_target_data): Remove.
660 2017-08-18 Yao Qi <yao.qi@linaro.org>
662 * Makefile.in (OBS): Add selftest.o.
663 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
664 * configure, config.in: Re-generated.
665 * server.c: Include common/sefltest.h.
666 (captured_main): Handle option --selftest.
668 2017-08-09 Yao Qi <yao.qi@linaro.org>
670 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
671 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
672 i386-avx-mpx.o and i386-mmx.o.
673 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
674 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
675 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
676 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
677 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
678 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
679 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
680 i386/amd64-avx-mpx.xml.
682 2017-08-09 Yao Qi <yao.qi@linaro.org>
684 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
685 and x32-avx-avx512.o.
686 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
687 i386/x32-avx-avx512.xml.
689 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
691 * tracepoint.h (enum class fast_tpoint_collect_result): New
693 (fast_tracepoint_collecting): Change return type to
694 fast_tpoint_collect_result.
695 * tracepoint.c (fast_tracepoint_collecting): Likewise.
696 * linux-low.h: Include tracepoint.h.
697 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
698 fast_tpoint_collect_result.
699 * linux-low.c (handle_tracepoints): Adjust.
700 (linux_fast_tracepoint_collecting): Change return type to
701 fast_tpoint_collect_result.
702 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
703 linux_wait_1, stuck_in_jump_pad_callback,
704 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
705 proceed_one_lwp): Adjust to type change.
707 2017-07-10 Yao Qi <yao.qi@linaro.org>
709 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
711 2017-06-29 Yao Qi <yao.qi@linaro.org>
713 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
715 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
717 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
719 * Makefile.in (IPA_OBJS): Sort and format one item per line.
721 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
723 * linux-low.c (linux_create_inferior): Adjust code to access the
724 environment information via 'gdb_environ' class.
725 * lynx-low.c (lynx_create_inferior): Likewise.
726 * server.c (our_environ): Make it an instance of 'gdb_environ'.
727 (get_environ): Return a pointer to 'our_environ'.
728 (captured_main): Initialize 'our_environ'.
729 * server.h (get_environ): Adjust prototype.
730 * spu-low.c (spu_create_inferior): Adjust code to access the
731 environment information via 'gdb_environ' class.
733 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
735 * linux-low.c (linux_read_memory, linux_write_memory): Remove
736 usage of "register" keyword.
738 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
740 * configure: Re-generate.
742 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
744 * configure: Re-generate.
746 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
748 * Makefile.in (COMPILE.pre): Add "-x c++".
750 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
752 * fork-child.c: Conditionally include <signal.h>.
754 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
756 * server.c (handle_general_set): Handle new packet
758 (handle_query): Add "QStartupWithShell" to the list of supported
760 (gdbserver_usage): Add help text explaining the
761 new "--startup-with-shell" and "--no-startup-with-shell" CLI
763 (captured_main): Recognize and act upon the presence of the new
766 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
767 Pedro Alves <palves@redhat.com>
769 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
770 * configure: Regenerate.
771 * configure.srv (srv_linux_obj): Add "fork-child.o" and
773 (i[34567]86-*-lynxos*): Likewise.
774 (spu*-*-*): Likewise.
775 * fork-child.c: New file.
776 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
778 (linux_ptrace_fun): New function.
779 (linux_create_inferior): Adjust function prototype to reflect
780 change on "target.h". Adjust function code to use
782 (linux_request_interrupt): Delete "signal_pid".
783 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
784 (lynx_ptrace_fun): New function.
785 (lynx_create_inferior): Adjust function prototype to reflect
786 change on "target.h". Adjust function code to use
788 * nto-low.c (nto_create_inferior): Adjust function prototype and
789 code to reflect change on "target.h". Update comments.
790 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
791 "common-terminal.h" and "environ.h".
792 (terminal_fd): Moved to fork-child.c.
793 (old_foreground_pgrp): Likewise.
794 (restore_old_foreground_pgrp): Likewise.
795 (last_status): Make it global.
796 (last_ptid): Likewise.
797 (our_environ): New variable.
798 (startup_with_shell): Likewise.
799 (program_name): Likewise.
800 (program_argv): Rename to...
801 (program_args): ...this.
802 (wrapper_argv): New variable.
803 (start_inferior): Delete function.
804 (get_exec_wrapper): New function.
805 (get_exec_file): Likewise.
806 (get_environ): Likewise.
807 (prefork_hook): Likewise.
808 (post_fork_inferior): Likewise.
809 (postfork_hook): Likewise.
810 (postfork_child_hook): Likewise.
811 (handle_v_run): Update code to deal with arguments coming from the
812 remote host. Update calls from "start_inferior" to
814 (captured_main): Likewise. Initialize environment variable. Call
816 * server.h (post_fork_inferior): New prototype.
817 (get_environ): Likewise.
818 (last_status): Declare.
819 (last_ptid): Likewise.
820 (signal_pid): Likewise.
821 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
822 (spu_ptrace_fun): New function.
823 (spu_create_inferior): Adjust function prototype to reflect change
824 on "target.h". Adjust function code to use "fork_inferior".
825 * target.c (target_terminal_init): New function.
826 (target_terminal_inferior): Likewise.
827 (target_terminal_ours): Likewise.
828 * target.h: Include <vector>.
829 (struct target_ops) <create_inferior>: Update prototype.
830 (create_inferior): Update macro.
831 * utils.c (gdb_flush_out_err): New function.
832 * win32-low.c (win32_create_inferior): Adjust function prototype
833 and code to reflect change on "target.h".
835 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
837 * inferiors.c (switch_to_thread): New function.
839 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
841 * Makefile.in (SFILE): Add "common/job-control.c".
842 (OBS): Add "job-control.o".
844 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
846 * Makefile: Remove "@host_makefile_frag@".
848 2017-05-05 Pedro Alves <palves@redhat.com>
850 * configure: Regenerate.
852 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
854 * configure: Regenerate.
856 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
858 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
859 software_single_step change of return type to
860 std::vector<CORE_ADDR>.
861 * linux-low.c (install_software_single_step_breakpoints):
863 * linux-low.h (install_software_single_step_breakpoints):
866 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
868 * remote-utils.c: Include "gdb_termios.h" instead of
870 * terminal.h: Delete file.
872 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
874 * server.c: Include <vector>.
875 <program_argv, wrapper_argv>: Convert to std::vector.
876 (start_inferior): Rewrite function to use C++.
877 (handle_v_run): Likewise. Update code that calculates the argv
878 based on the vRun packet; use C++.
879 (captured_main): Likewise.
881 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
883 * server.c (handle_v_cont): Initialize thread_resume::thread
886 2017-04-05 Pedro Alves <palves@redhat.com>
888 * configure: Regenerate.
890 2017-04-05 Pedro Alves <palves@redhat.com>
892 * gdbreplay.c (sync_error): Constify.
893 * linux-x86-low.c (push_opcode): Constify.
895 2017-04-05 Pedro Alves <palves@redhat.com>
897 * win32-low.c (get_child_debug_event)
898 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
899 Report TARGET_WAITKIND_SPURIOUS instead.
901 2017-04-05 Pedro Alves <palves@redhat.com>
903 * remote-utils.c (remote_prepare, remote_open): Constify.
904 * remote-utils.h (remote_prepare, remote_open): Constify.
905 * server.c (captured_main): Constify 'port' handling.
907 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
909 * Makefile.in (clean): Clear .deps.
911 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
913 * .gitignore: Remove generated files, replace with wildcard.
914 * (clean): Replace removal of generated files with wildcard.
915 (version.c): Replace with...
916 (version-generated.c): ...this.
917 (xml-builtin.c): Replace with...
918 (xml-builtin-generated.c): ...this.
919 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
920 (%.c: *regformats*): Replace with...
921 (%-generated.c: *regformats*): ...this.
923 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
925 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
926 (xtensa_fill_gregset): Call collect_register_by_name for
928 (xtensa_store_gregset): Call supply_register_by_name for
931 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
933 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
934 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
935 (xtensa_store_gregset): Call supply_register for all registers in
936 a0_regnum..a0_regnum + C0_NREGS range.
938 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
940 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
941 (ax-ipa.o: ax.c): Remove.
942 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
943 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
944 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
945 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
946 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
948 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
950 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
951 (print-utils-ipa.o: ../common/print-utils.c): Remove.
952 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
953 (errors-ipa.o: ../common/errors.c): Remove.
954 (format-ipa.o: ../common/format.c): Remove.
955 (common-utils-ipa.o: ../common/common-utils.c): Remove.
957 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
959 * Makefile.in (%-ipa.o: %.c): New rule.
960 (tracepoint-ipa.o: tracepoint.c): Remove.
961 (utils-ipa.o: utils.c): Remove.
962 (remote-utils-ipa.o: remote-utils.c): Remove.
963 (regcache-ipa.o: regcache.c): Remove.
964 (i386-linux-ipa.o: i386-linux.c): Remove.
965 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
966 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
967 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
968 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
969 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
970 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
971 (amd64-linux-ipa.o: amd64-linux.c): Remove.
972 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
973 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
974 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
975 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
976 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
977 (aarch64-ipa.o: aarch64.c): Remove.
978 (s390-linux32-ipa.o: s390-linux32.c): Remove.
979 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
980 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
981 (s390-linux64-ipa.o: s390-linux64.c): Remove.
982 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
983 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
984 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
985 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
986 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
987 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
988 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
989 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
990 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
991 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
992 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
993 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
994 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
995 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
996 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
997 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
998 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
999 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1000 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1001 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1002 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1003 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1004 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1005 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1006 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1007 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1008 (tdesc-ipa.o: tdesc.c): Remove.
1009 (x32-linux-ipa.o: x32-linux.c): Remove.
1010 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1011 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1013 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1015 * Makefile.in (%.o: ../arch/%.c): New rule.
1016 (arm.o: ../arch/arm.c): Remove.
1017 (arm-linux.o: ../arch/arm-linux.c): Remove.
1018 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1019 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1021 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1023 * Makefile.in (%.o: ../nat/%.c): New rule.
1024 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1025 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1026 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1027 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1028 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1029 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1030 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1031 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1032 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1033 (linux-personality.o: ../nat/linux-personality.c): Remove.
1034 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1035 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1036 (x86-linux.o: ../nat/x86-linux.c): Remove.
1037 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1038 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1040 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1042 * Makefile.in (%.o: ../common/%.c): New rule.
1043 (signals.o: ../common/signals.c): Remove.
1044 (print-utils.o: ../common/print-utils.c): Remove.
1045 (rsp-low.o: ../common/rsp-low.c): Remove.
1046 (common-utils.o: ../common/common-utils.c): Remove.
1047 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1048 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1049 (vec.o: ../common/vec.c): Remove.
1050 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1051 (xml-utils.o: ../common/xml-utils.c): Remove.
1052 (ptid.o: ../common/ptid.c): Remove.
1053 (buffer.o: ../common/buffer.c): Remove.
1054 (format.o: ../common/format.c): Remove.
1055 (filestuff.o: ../common/filestuff.c): Remove.
1056 (agent.o: ../common/agent.c): Remove.
1057 (errors.o: ../common/errors.c): Remove.
1058 (environ.o: ../common/environ.c): Remove.
1059 (common-debug.o: ../common/common-debug.c): Remove.
1060 (cleanups.o: ../common/cleanups.c): Remove.
1061 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1062 (fileio.o: ../common/fileio.c): Remove.
1063 (common-regcache.o: ../common/common-regcache.c): Remove.
1064 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1065 (new-op.o: ../common/new-op.c): Remove.
1066 (btrace-common.o: ../common/btrace-common.c): Remove.
1068 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1070 * Makefile.in (%.o: ../target/%.c): New rule.
1071 (waitstatus.o: ../target/waitstatus.c): Remove.
1073 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1076 (%.c: ../regformats/%.dat,
1077 (%.c: ../regformats/arm/%.dat,
1078 (%.c: ../regformats/i386/%.dat,
1079 (%.c: ../regformats/rs6000/%.dat): New rules.
1080 (aarch64.c): Remove.
1081 (reg-arm.c): Remove.
1082 (arm-with-iwmmxt.c): Remove.
1083 (arm-with-vfpv2.c): Remove.
1084 (arm-with-vfpv3.c): Remove.
1085 (arm-with-neon.c): Remove.
1086 (reg-bfin.c): Remove.
1087 (reg-cris.c): Remove.
1088 (reg-crisv32.c): Remove.
1090 (i386-linux.c): Remove.
1091 (i386-avx.c): Remove.
1092 (i386-avx-linux.c): Remove.
1093 (i386-avx-avx512.c): Remove.
1094 (i386-avx-avx512-linux.c): Remove.
1095 (i386-mpx.c): Remove.
1096 (i386-mpx-linux.c): Remove.
1097 (i386-avx-mpx-avx512-pku.c): Remove.
1098 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1099 (i386-avx-mpx.c): Remove.
1100 (i386-avx-mpx-linux.c): Remove.
1101 (i386-mmx.c): Remove.
1102 (i386-mmx-linux.c): Remove.
1103 (reg-ia64.c): Remove.
1104 (reg-m32r.c): Remove.
1105 (reg-m68k.c): Remove.
1107 (mips-linux.c): Remove.
1108 (mips-dsp-linux.c): Remove.
1109 (mips64-linux.c): Remove.
1110 (mips64-dsp-linux.c): Remove.
1111 (nios2-linux.c): Remove.
1112 (powerpc-32.c): Remove.
1113 (powerpc-32l.c): Remove.
1114 (powerpc-altivec32l.c): Remove.
1115 (powerpc-cell32l.c): Remove.
1116 (powerpc-vsx32l.c): Remove.
1117 (powerpc-isa205-32l.c): Remove.
1118 (powerpc-isa205-altivec32l.c): Remove.
1119 (powerpc-isa205-vsx32l.c): Remove.
1120 (powerpc-e500l.c): Remove.
1121 (powerpc-64l.c): Remove.
1122 (powerpc-altivec64l.c): Remove.
1123 (powerpc-cell64l.c): Remove.
1124 (powerpc-vsx64l.c): Remove.
1125 (powerpc-isa205-64l.c): Remove.
1126 (powerpc-isa205-altivec64l.c): Remove.
1127 (powerpc-isa205-vsx64l.c): Remove.
1128 (s390-linux32.c): Remove.
1129 (s390-linux32v1.c): Remove.
1130 (s390-linux32v2.c): Remove.
1131 (s390-linux64.c): Remove.
1132 (s390-linux64v1.c): Remove.
1133 (s390-linux64v2.c): Remove.
1134 (s390-te-linux64.c): Remove.
1135 (s390-vx-linux64.c): Remove.
1136 (s390-tevx-linux64.c): Remove.
1137 (s390x-linux64.c): Remove.
1138 (s390x-linux64v1.c): Remove.
1139 (s390x-linux64v2.c): Remove.
1140 (s390x-te-linux64.c): Remove.
1141 (s390x-vx-linux64.c): Remove.
1142 (s390x-tevx-linux64.c): Remove.
1143 (tic6x-c64xp-linux.c): Remove.
1144 (tic6x-c64x-linux.c): Remove.
1145 (tic6x-c62x-linux.c): Remove.
1147 (reg-sparc64.c): Remove.
1148 (reg-spu.c): Remove.
1150 (amd64-linux.c): Remove.
1151 (amd64-avx.c): Remove.
1152 (amd64-avx-linux.c): Remove.
1153 (amd64-avx-avx512.c): Remove.
1154 (amd64-avx-avx512-linux.c): Remove.
1155 (amd64-mpx.c): Remove.
1156 (amd64-mpx-linux.c): Remove.
1157 (amd64-avx-mpx-avx512-pku.c): Remove.
1158 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1159 (amd64-avx-mpx.c): Remove.
1160 (amd64-avx-mpx-linux.c): Remove.
1162 (x32-linux.c): Remove.
1163 (x32-avx.c): Remove.
1164 (x32-avx-linux.c): Remove.
1165 (x32-avx-avx512.c): Remove.
1166 (x32-avx-avx512-linux.c): Remove.
1167 (reg-xtensa.c): Remove.
1168 (reg-tilegx.c): Remove.
1169 (reg-tilegx32.c): Remove.
1171 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1173 * Makefile.in (SFILES): Add "common/environ.c".
1174 (OBJS): Add "common/environ.h".
1176 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1178 * configure.ac: Check if the fs_base and gs_base members of
1179 `struct user_regs_struct' exist.
1180 * config.in: Regenerated.
1181 * configure: Likewise.
1183 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1185 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1187 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1188 (get_next_pcs_syscall_next_pc): Likewise.
1190 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1192 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1193 * nto-x86-low.c: Likewise.
1195 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1197 * Makefile.in: Include disable-implicit-rules.mk.
1199 2016-11-23 Pedro Alves <palves@redhat.com>
1201 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1202 (debug_vprintf): Use std::chrono::steady_clock instead of
1203 gettimeofday. Use '.' instead of ':'.
1204 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1205 (get_timestamp): Use std::chrono::steady_clock instead of
1208 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1210 * Makefile.in: Fix whitespace formatting.
1212 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1214 * Makefile.in (SFILES, OBS): Flatten list and order
1217 2016-11-23 Pedro Alves <palves@redhat.com>
1219 * event-loop.c (handle_file_event): Use warning.
1220 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1221 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1224 2016-11-23 Pedro Alves <palves@redhat.com>
1226 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1228 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1229 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1230 debug_printf and debug_flush for debug output.
1231 * server.c (handle_general_set): Likewise.
1232 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1235 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1237 * Makefile.in (.c.o): Replace rule with ...
1238 (%.o: %.c): ... this one.
1240 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1242 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1243 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1245 * configure.ac: Remove checks for the make program.
1246 * configure: Re-generate.
1248 2016-10-28 Pedro Alves <palves@redhat.com>
1250 * Makefile.in (CXX_DIALECT): Get from configure.
1251 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1252 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1253 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1254 * config.in: Regenerate.
1255 * configure: Regenerate.
1257 2016-10-27 Yao Qi <yao.qi@linaro.org>
1259 * linux-low.c (linux_supports_range_stepping): Return true if
1260 can_software_single_step return true.
1262 2016-10-27 Yao Qi <yao.qi@linaro.org>
1264 * inferiors.c (find_inferior_in_random): New function.
1265 * inferiors.h (find_inferior_in_random): Declare.
1266 * linux-low.c (linux_wait_for_event_filtered): Call
1267 find_inferior_in_random instead of find_inferior.
1269 2016-10-27 Yao Qi <yao.qi@linaro.org>
1271 * linux-low.c (linux_wait_1): If single-step breakpoints are
1272 inserted, remove them.
1274 2016-10-26 Pedro Alves <palves@redhat.com>
1276 * linux-low.c (handle_extended_wait): Link parent/child fork
1278 (linux_wait_1): Unlink them.
1279 (linux_set_resume_request): Ignore resume requests for
1280 already-resumed and unhandled fork child threads.
1281 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1282 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1284 (handle_v_requests) <vCont>: Don't call require_running.
1285 * server.h (in_queued_stop_replies): New declaration.
1287 2016-10-24 Yao Qi <yao.qi@linaro.org>
1290 * linux-aarch64-low.c (append_insns): Cast the return value to
1293 2016-10-10 Yao Qi <yao.qi@linaro.org>
1295 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1297 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1299 * target.c (target_supports_multi_process): New function, moved
1301 * target.h (target_supports_multi_process): ... here. Remove
1304 2016-10-05 Tom Tromey <tom@tromey.com>
1307 * tracepoint.c (handle_tracepoint_bkpts): Check
1308 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1310 2016-10-05 Yao Qi <yao.qi@linaro.org>
1312 * configure.srv: Update the path of arm-*.xml files.
1314 2016-10-05 Terry Guo <terry.guo@arm.com>
1315 Yao Qi <yao.qi@linaro.org>
1317 * Makefile.in: Adjust the path of rules.
1318 * configure.srv: Update the path of xml files.
1319 * regformats/arm-with-iwmmxt.dat: Regenerated.
1320 * regformats/arm-with-neon.dat: Likewise.
1321 * regformats/arm-with-vfpv2.dat: Likewise.
1322 * regformats/arm-with-vfpv3.dat Likewise.
1324 2016-09-30 Yao Qi <yao.qi@linaro.org>
1327 * target.c (target_stop_and_wait): Don't call
1328 target_continue_no_signal, use resume_stop instead.
1330 2016-09-26 Yao Qi <yao.qi@linaro.org>
1332 * linux-low.c (linux_wait_1): Call debug_exit.
1334 2016-09-23 Pedro Alves <palves@redhat.com>
1336 * Makefile.in (SFILES): Add common/new-op.c.
1337 (OBS): Add common/new-op.o.
1338 (new-op.o): New rule.
1340 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1342 * .gitinore: Ignore more files.
1344 2016-09-21 Yao Qi <yao.qi@linaro.org>
1346 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1349 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1351 * server.c (start_inferior): Call target_mourn_inferior instead of
1352 mourn_inferior; pass ptid_t argument to it.
1354 (handle_target_event): Likewise.
1355 * target.c (target_mourn_inferior): New function.
1356 * target.h (mourn_inferior): Delete macro.
1358 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1360 * linux-low.c (lwp_is_stepping): New function.
1362 2016-09-06 Carl Love <cel@us.ibm.com>
1364 * server.c (start_inferior): Fixed comment, requested comment change
1365 didn't get updated correctly. Removed reference to ptrace () call as
1366 it is only true on Linux systems.
1368 2016-09-06 Carl Love <cel@us.ibm.com>
1370 * server.c (start_inferior): Do not call
1371 function target_post_create_inferior () if the
1372 inferior process has already exited.
1374 2016-09-05 Pedro Alves <palves@redhat.com>
1376 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1377 (COMPILE.pre, CC_LD): Use CXX directly.
1378 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1379 * acinclude.m4: Don't include build-with-cxx.m4.
1380 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1381 * configure: Regenerate.
1383 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1386 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1387 call writing data to own_buf.
1389 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1391 * target.c (mywait): Call target_wait instead of
1393 (target_wait): New function.
1395 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1397 * server.c (start_inferior): New variable 'ptid'. Replace calls
1398 to the_target->resume by target_continue{,_no_signal}, depending
1400 * target.c (target_stop_and_wait): Call target_continue_no_signal
1401 instead of the_target->resume.
1402 (target_continue): New function.
1404 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1406 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1408 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1411 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1413 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1414 * linux-arm-low.c (ps_get_thread_area): Likewise.
1415 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1416 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1417 * linux-mips-low.c (ps_get_thread_area): Likewise.
1418 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1419 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1420 * linux-x86-low.c (ps_get_thread_area): Likewise.
1421 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1423 2016-08-19 Pedro Alves <palves@redhat.com>
1425 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1427 2016-08-19 Pedro Alves <palves@redhat.com>
1429 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1430 comment. Use memcpy instead of casting through unsigned long.
1432 2016-08-19 Pedro Alves <palves@redhat.com>
1434 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1435 allocating around 0x80000000.
1437 2016-08-19 Pedro Alves <palves@redhat.com>
1440 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1441 (x32-avx512-linux-ipa.o): New rules.
1442 * configure.ac (x86_64-*-linux*): New x32 check.
1443 * configure.srv (ipa_x32_linux_regobj): New.
1444 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1445 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1447 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1449 * configure: Regenerate.
1451 2016-08-09 Pedro Alves <palves@redhat.com>
1454 * Makefile.in (OBS): Add signals-state-save-restore.o.
1455 (signals-state-save-restore.o): New rule.
1456 * config.in: Regenerate.
1457 * configure: Regenerate.
1458 * linux-low.c: Include "signals-state-save-restore.h".
1459 (linux_create_inferior): Call
1460 restore_original_signals_state.
1461 * server.c: Include "dispositions-save-restore.h".
1462 (captured_main): Call save_original_signals_state.
1464 2016-08-05 Pedro Alves <palves@redhat.com>
1466 * configure: Regenerate.
1468 2016-08-04 Yao Qi <yao.qi@linaro.org>
1470 * linux-low.c (regsets_fetch_inferior_registers): Check
1471 errno is ESRCH or not.
1473 2016-08-02 Yao Qi <yao.qi@linaro.org>
1475 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1476 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1477 (thread_db_load_search): Update.
1478 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1479 td_ta_set_event and td_ta_event_getmsg.
1481 2016-07-26 Pedro Alves <palves@redhat.com>
1484 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1485 of unsigned long for 64-bit registers and use uint32_t instead of
1486 unsigned int for 32-bit registers.
1488 2016-07-26 Pedro Alves <palves@redhat.com>
1490 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1493 2016-07-21 Tom Tromey <tom@tromey.com>
1495 * configure: Rebuild.
1497 2016-07-21 Yao Qi <yao.qi@linaro.org>
1499 * mem-break.c (find_gdb_breakpoint): Cast bp to
1500 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1502 2016-07-21 Yao Qi <yao.qi@linaro.org>
1504 * server.c (handle_v_requests): Support s and S actions
1505 if target_supports_software_single_step return true.
1507 2016-07-21 Yao Qi <yao.qi@linaro.org>
1509 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1510 is resume_step, call maybe_hw_step.
1511 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1513 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1515 (proceed_one_lwp): If resume request is resume_step, install
1516 reinsert breakpoints and call maybe_hw_step.
1518 2016-07-21 Yao Qi <yao.qi@linaro.org>
1520 * linux-low.c (proceed_one_lwp): Declare.
1521 (linux_resume_one_thread): Remove local variable 'step'.
1522 Lift code enqueue signal. Call proceed_one_lwp instead of
1523 linux_resume_one_lwp.
1525 2016-07-21 Yao Qi <yao.qi@linaro.org>
1527 * linux-low.c (linux_resume_one_thread): Call
1528 enqueue_pending_signal.
1530 2016-07-21 Yao Qi <yao.qi@linaro.org>
1532 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1533 * inferiors.c (do_restore_current_thread_cleanup): New function.
1534 (make_cleanup_restore_current_thread): Likewise.
1535 * linux-low.c (install_software_single_step_breakpoints): Call
1536 make_cleanup_restore_current_thread. Switch current_thread to
1539 2016-07-21 Yao Qi <yao.qi@linaro.org>
1541 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1542 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1543 (clone_one_breakpoint): Likewise.
1544 (delete_reinsert_breakpoints): Change parameter to thread.
1546 (has_reinsert_breakpoints): Likewise.
1547 (uninsert_reinsert_breakpoints): Likewise.
1548 (reinsert_reinsert_breakpoints): Likewise.
1549 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1550 (delete_reinsert_breakpoints): Likewise.
1551 (reinsert_reinsert_breakpoints): Likewise.
1552 (uninsert_reinsert_breakpoints): Likewise.
1553 (has_reinsert_breakpoints): Likewise.
1555 2016-07-21 Yao Qi <yao.qi@linaro.org>
1557 * inferiors.c (get_thread_process): Make parameter const.
1558 * inferiors.h (get_thread_process): Update declaration.
1559 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1560 Add new parameters child_thread and parent_thread. Callers
1562 * mem-break.h (clone_all_breakpoints): Update declaration.
1564 2016-07-21 Yao Qi <yao.qi@linaro.org>
1566 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1567 <command_list, handler>: Remove.
1568 (struct gdb_breakpoint): New.
1569 (struct other_breakpoint): New.
1570 (struct reinsert_breakpoint): New.
1571 (is_gdb_breakpoint): New function.
1572 (any_persistent_commands): Update command_list if
1573 is_gdb_breakpoint returns true.
1574 (set_breakpoint): Create breakpoints according to their types.
1575 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1576 (set_gdb_breakpoint_1): Likewise.
1577 (set_gdb_breakpoint): Likewise.
1578 (clear_breakpoint_conditions): Change parameter type to
1579 'struct gdb_breakpoint *'.
1580 (clear_breakpoint_commands): Likewise.
1581 (clear_breakpoint_conditions_and_commands): Likewise.
1582 (add_condition_to_breakpoint): Likewise.
1583 (add_breakpoint_condition): Likewise.
1584 (add_commands_to_breakpoint): Likewise.
1585 (check_breakpoints): Check other_breakpoint.
1586 (clone_one_breakpoint): Clone breakpopint according to its type.
1587 * mem-break.h (struct gdb_breakpoint): Declare.
1588 (set_gdb_breakpoint): Update declaration.
1589 (clear_breakpoint_conditions_and_commands): Likewise.
1590 (add_breakpoint_condition): Likewise.
1591 (add_breakpoint_commands): Likewise.
1592 * server.c (process_point_options): Change parameter type to
1593 'struct gdb_breakpoint *'.
1595 2016-07-21 Yao Qi <yao.qi@linaro.org>
1597 * mem-break.c (set_breakpoint_at): Rename it to ...
1598 (set_breakpoint_type_at): ... it.
1599 (set_breakpoint_at): Call set_breakpoint_type_at.
1600 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1601 * mem-break.h (set_breakpoint_at): Update comments.
1603 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1605 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1607 (nios2_store_gregset): Likewise.
1609 2016-07-01 Pedro Alves <palves@redhat.com>
1610 Antoine Tremblay <antoine.tremblay@ericsson.com>
1612 * linux-low.c: Change interface to take the target lwp_info
1613 pointer directly and return void. Handle detaching from a zombie
1615 (linux_detach_lwp_callback): New function.
1616 (linux_detach): Detach from the leader thread after detaching from
1619 2016-06-28 Yao Qi <yao.qi@linaro.org>
1621 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1622 for variable new_offset.
1623 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1624 (aarch64_ftrace_insn_reloc_cb): Likewise.
1625 (aarch64_ftrace_insn_reloc_tb): Likewise.
1626 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1627 PRIx64 instead of PRIx32.
1629 2016-06-28 Yao Qi <yao.qi@linaro.org>
1631 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1632 (the_low_target): Install arm_get_syscall_trapinfo.
1634 2016-06-28 Yao Qi <yao.qi@linaro.org>
1636 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1638 (the_low_target): Install aarch64_get_syscall_trapinfo.
1640 2016-06-28 Yao Qi <yao.qi@linaro.org>
1642 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1644 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1645 Remove parameter sysno.
1646 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1649 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1651 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1652 (s390_emit_ne_goto): Likewise.
1653 (s390_emit_lt_goto): Likewise.
1654 (s390_emit_le_goto): Likewise.
1655 (s390_emit_gt_goto): Likewise.
1656 (s390_emit_ge_goto): Likewise.
1657 (s390x_emit_eq_goto): Likewise.
1658 (s390x_emit_ne_goto): Likewise.
1659 (s390x_emit_lt_goto): Likewise.
1660 (s390x_emit_le_goto): Likewise.
1661 (s390x_emit_gt_goto): Likewise.
1662 (s390x_emit_ge_goto): Likewise.
1663 (s390_emit_ops_impl): Mark variable static.
1664 (s390x_emit_ops): Likewise.
1666 2016-06-17 Yao Qi <yao.qi@linaro.org>
1668 * linux-low.c (handle_extended_wait): Call
1669 uninsert_reinsert_breakpoints for the parent process. Remove
1670 reinsert breakpoints from the child process. Reinsert them to
1671 the parent process when vfork is done.
1672 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1673 (reinsert_reinsert_breakpoints): New function.
1674 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1675 (reinsert_reinsert_breakpoints): Declare.
1677 2016-06-17 Yao Qi <yao.qi@linaro.org>
1679 * linux-low.c (handle_extended_wait): If the parent is doing
1680 step-over, remove the reinsert breakpoints from the forked child.
1682 2016-06-17 Yao Qi <yao.qi@linaro.org>
1684 * linux-low.c (unsuspend_all_lwps): Declare.
1685 (linux_low_filter_event): If thread exited, call finish_step_over.
1686 If step-over is finished, unsuspend other threads.
1688 2016-06-17 Yao Qi <yao.qi@linaro.org>
1690 * linux-low.c (linux_resume_one_lwp_throw): Assert
1691 has_reinsert_breakpoints returns false.
1692 * mem-break.c (delete_disabled_breakpoints): Assert
1693 bp type isn't reinsert_breakpoint.
1695 2016-06-17 Yao Qi <yao.qi@linaro.org>
1697 * linux-low.c (maybe_hw_step): New function.
1698 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1699 (finish_step_over): Switch current_thread to lwp temporarily,
1700 and assert has_reinsert_breakpoints returns true.
1701 (proceed_one_lwp): Call maybe_hw_step.
1702 * mem-break.c (has_reinsert_breakpoints): New function.
1703 * mem-break.h (has_reinsert_breakpoints): Declare.
1705 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1707 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1709 2016-05-17 Yao Qi <yao.qi@linaro.org>
1711 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1712 instead of find_inferior.
1714 2016-05-05 Yao Qi <yao.qi@linaro.org>
1716 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1717 Initialize res to zero.
1719 2016-05-05 Yao Qi <yao.qi@linaro.org>
1721 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1724 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1726 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1727 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1728 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1730 2016-04-28 Par Olsson <par.olsson@windriver.com>
1731 Simon Marchi <simon.marchi@ericsson.com>
1733 * tracepoint.c (write_inferior_int8): New function.
1734 (cmd_qtenable_disable): Write enable flag using
1735 write_inferior_int8.
1737 2016-04-25 Yao Qi <yao.qi@linaro.org>
1739 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1740 (need_step_over_p): Return zero if the LWP has pending signals
1741 can be delivered on software single step target.
1743 2016-04-25 Yao Qi <yao.qi@linaro.org>
1745 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1746 return instead of error.
1748 2016-04-22 Yao Qi <yao.qi@linaro.org>
1750 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1753 2016-04-22 Yao Qi <yao.qi@linaro.org>
1755 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1756 signal when stepping over breakpoint with software single
1759 2016-04-21 Pedro Alves <palves@redhat.com>
1761 * linux-s390-low.c (s390_collect_ptrace_register)
1762 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1764 (s390_check_regset): Use void * instead of gdb_byte *.
1766 2016-04-20 Pedro Alves <palves@redhat.com>
1768 * configure: Renegerate.
1770 2016-04-20 Yao Qi <yao.qi@linaro.org>
1772 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1773 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1775 (arm_store_gregset): Likewise.
1777 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1779 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1780 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1781 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1782 (amd64-avx-mpx-linux.c): New rules.
1783 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1784 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1785 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1786 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1787 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1788 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1789 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1790 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1791 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1792 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1793 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1794 * linux-x86-low.c (x86_linux_read_description): Add case for
1795 X86_XSTATE_AVX_MPX_MASK.
1796 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1797 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1798 init_registers_i386_avx_mpx_linux.
1799 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1800 (initialize_low_tracepoint): Call
1801 init_registers_i386_avx_mpx_linux.
1802 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1803 (initialize_low_tracepoint): Call
1804 init_registers_amd64_avx_mpx_linux.
1805 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1806 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1807 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1810 2016-04-18 Pedro Alves <palves@redhat.com>
1812 * configure: Regenerate.
1814 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1816 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1817 (aarch64_emit_sub): Likewise.
1819 2016-04-12 Pedro Alves <palves@redhat.com>
1821 * utils.c (prepare_to_throw_exception): Delete.
1823 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1825 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1827 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1829 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1831 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1833 * linux-aarch64-ipa.c: Add <elf.h> include.
1834 * linux-ppc-ipa.c: Add <elf.h> include.
1835 * linux-s390-ipa.c: Add <elf.h> include.
1837 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1839 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1840 (get_raw_reg_ptr): Likewise.
1841 (get_trace_state_variable_value_ptr): Likewise.
1842 (set_trace_state_variable_value_ptr): Likewise.
1843 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1846 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1847 Marcin Kościelnicki <koriakin@0x04.net>
1850 * linux-ppc-low.c (emit_insns): New function.
1851 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1852 (ppc_emit_prologue): New function.
1853 (ppc_emit_epilogue): New function.
1854 (ppc_emit_add): New function.
1855 (ppc_emit_sub): New function.
1856 (ppc_emit_mul): New function.
1857 (ppc_emit_lsh): New function.
1858 (ppc_emit_rsh_signed): New function.
1859 (ppc_emit_rsh_unsigned): New function.
1860 (ppc_emit_ext): New function.
1861 (ppc_emit_zero_ext): New function.
1862 (ppc_emit_log_not): New function.
1863 (ppc_emit_bit_and): New function.
1864 (ppc_emit_bit_or): New function.
1865 (ppc_emit_bit_xor): New function.
1866 (ppc_emit_bit_not): New function.
1867 (ppc_emit_equal): New function.
1868 (ppc_emit_less_signed): New function.
1869 (ppc_emit_less_unsigned): New function.
1870 (ppc_emit_ref): New function.
1871 (ppc_emit_const): New function.
1872 (ppc_emit_reg): New function.
1873 (ppc_emit_pop): New function.
1874 (ppc_emit_stack_flush): New function.
1875 (ppc_emit_swap): New function.
1876 (ppc_emit_stack_adjust): New function.
1877 (ppc_emit_call): New function.
1878 (ppc_emit_int_call_1): New function.
1879 (ppc_emit_void_call_2): New function.
1880 (ppc_emit_if_goto): New function.
1881 (ppc_emit_goto): New function.
1882 (ppc_emit_eq_goto): New function.
1883 (ppc_emit_ne_goto): New function.
1884 (ppc_emit_lt_goto): New function.
1885 (ppc_emit_le_goto): New function.
1886 (ppc_emit_gt_goto): New function.
1887 (ppc_emit_ge_goto): New function.
1888 (ppc_write_goto_address): New function.
1889 (ppc_emit_ops_impl): New static variable.
1890 (ppc64v1_emit_prologue): New function.
1891 (ppc64v2_emit_prologue): New function.
1892 (ppc64_emit_epilogue): New function.
1893 (ppc64_emit_add): New function.
1894 (ppc64_emit_sub): New function.
1895 (ppc64_emit_mul): New function.
1896 (ppc64_emit_lsh): New function.
1897 (ppc64_emit_rsh_signed): New function.
1898 (ppc64_emit_rsh_unsigned): New function.
1899 (ppc64_emit_ext): New function.
1900 (ppc64_emit_zero_ext): New function.
1901 (ppc64_emit_log_not): New function.
1902 (ppc64_emit_bit_and): New function.
1903 (ppc64_emit_bit_or): New function.
1904 (ppc64_emit_bit_xor): New function.
1905 (ppc64_emit_bit_not): New function.
1906 (ppc64_emit_equal): New function.
1907 (ppc64_emit_less_signed): New function.
1908 (ppc64_emit_less_unsigned): New function.
1909 (ppc64_emit_ref): New function.
1910 (ppc64_emit_const): New function.
1911 (ppc64v1_emit_reg): New function.
1912 (ppc64v2_emit_reg): New function.
1913 (ppc64_emit_pop): New function.
1914 (ppc64_emit_stack_flush): New function.
1915 (ppc64_emit_swap): New function.
1916 (ppc64v1_emit_call): New function.
1917 (ppc64v2_emit_call): New function.
1918 (ppc64v1_emit_int_call_1): New function.
1919 (ppc64v2_emit_int_call_1): New function.
1920 (ppc64v1_emit_void_call_2): New function.
1921 (ppc64v2_emit_void_call_2): New function.
1922 (ppc64_emit_if_goto): New function.
1923 (ppc64_emit_eq_goto): New function.
1924 (ppc64_emit_ne_goto): New function.
1925 (ppc64_emit_lt_goto): New function.
1926 (ppc64_emit_le_goto): New function.
1927 (ppc64_emit_gt_goto): New function.
1928 (ppc64_emit_ge_goto): New function.
1929 (ppc64v1_emit_ops_impl): New static variable.
1930 (ppc64v2_emit_ops_impl): New static variable.
1931 (ppc_emit_ops): New function.
1932 (linux_low_target): Wire in ppc_emit_ops.
1934 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1935 Marcin Kościelnicki <koriakin@0x04.net>
1938 * Makefile.in: Add powerpc-*-ipa.o
1939 * configure.srv: Add ipa_obj for powerpc*-linux.
1940 * linux-ppc-ipa.c: New file.
1941 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1943 (PPC_FIELD): New macro.
1944 (PPC_SEXT): New macro.
1945 (PPC_OP6): New macro.
1946 (PPC_BO): New macro.
1947 (PPC_LI): New macro.
1948 (PPC_BD): New macro.
1949 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1950 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1951 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1952 (ppc_get_thread_area): New function.
1953 (is_elfv2_inferior): New function.
1954 (gen_ds_form): New function.
1955 (GEN_STD): New macro.
1956 (GEN_STDU): New macro.
1957 (GEN_LD): New macro.
1958 (GEN_LDU): New macro.
1959 (gen_d_form): New function.
1960 (GEN_ADDI): New macro.
1961 (GEN_ADDIS): New macro.
1962 (GEN_LI): New macro.
1963 (GEN_LIS): New macro.
1964 (GEN_ORI): New macro.
1965 (GEN_ORIS): New macro.
1966 (GEN_LWZ): New macro.
1967 (GEN_STW): New macro.
1968 (GEN_STWU): New macro.
1969 (gen_xfx_form): New function.
1970 (GEN_MFSPR): New macro.
1971 (GEN_MTSPR): New macro.
1972 (GEN_MFCR): New macro.
1973 (GEN_MTCR): New macro.
1974 (GEN_SYNC): New macro.
1975 (GEN_LWSYNC): New macro.
1976 (gen_x_form): New function.
1977 (GEN_OR): New macro.
1978 (GEN_MR): New macro.
1979 (GEN_LWARX): New macro.
1980 (GEN_STWCX): New macro.
1981 (GEN_CMPW): New macro.
1982 (gen_md_form): New function.
1983 (GEN_RLDICL): New macro.
1984 (GEN_RLDICR): New macro.
1985 (gen_i_form): New function.
1987 (GEN_BL): New macro.
1988 (gen_b_form): New function.
1989 (GEN_BNE): New macro.
1990 (GEN_LOAD): New macro.
1991 (GEN_STORE): New macro.
1992 (gen_limm): New function.
1993 (gen_atomic_xchg): New function.
1994 (gen_call): New function.
1995 (ppc_relocate_instruction): New function.
1996 (ppc_install_fast_tracepoint_jump_pad): New function.
1997 (ppc_get_min_fast_tracepoint_insn_len): New function.
1998 (ppc_get_ipa_tdesc_idx): New function.
1999 (the_low_target): Wire in the new functions.
2000 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2002 * linux-ppc-tdesc.h: New file.
2004 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2006 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2007 (alloc_jump_pad_buffer): New function.
2008 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2009 (alloc_jump_pad_buffer): New function.
2010 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2011 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2012 (alloc_jump_pad_buffer): New function.
2013 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2014 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2015 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2016 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2018 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2020 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2021 * linux-amd64-ipa.c: Likewise.
2022 * linux-i386-ipa.c: Likewise.
2023 * linux-s390-ipa.c: Likewise.
2024 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2025 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2026 set_trace_state_variable_value_ptr.
2027 (struct ipa_sym_addresses): Likewise.
2028 (symbol_list): Likewise.
2029 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2030 accessing gdb_collect directly.
2031 (gdb_collect_ptr_type): New typedef.
2032 (get_raw_reg_ptr_type): New typedef.
2033 (get_trace_state_variable_value_ptr_type): New typedef.
2034 (set_trace_state_variable_value_ptr_type): New typedef.
2035 (gdb_collect_ptr): New global.
2036 (get_raw_reg_ptr): New global.
2037 (get_trace_state_variable_value_ptr): New global.
2038 (set_trace_state_variable_value_ptr): New global.
2039 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2040 accessing get_raw_reg directly.
2041 (get_get_tsv_func_addr): Likewise for
2042 get_trace_state_variable_value_ptr.
2043 (get_set_tsv_func_addr): Likewise for
2044 set_trace_state_variable_value_ptr.
2045 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2047 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2049 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2051 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2053 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2055 (relocate_instruction): Remove own_buf.
2056 * server.c (own_buf): Make global.
2057 (handle_v_requests): Make global.
2058 * server.h (own_buf): New declaration.
2059 (handle_v_requests): New prototype.
2061 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2064 * linux-s390-low.c (add_insns): New function.
2065 (s390_emit_prologue): New function.
2066 (s390_emit_epilogue): New function.
2067 (s390_emit_add): New function.
2068 (s390_emit_sub): New function.
2069 (s390_emit_mul): New function.
2070 (s390_emit_lsh): New function.
2071 (s390_emit_rsh_signed): New function.
2072 (s390_emit_rsh_unsigned): New function.
2073 (s390_emit_ext): New function.
2074 (s390_emit_log_not): New function.
2075 (s390_emit_bit_and): New function.
2076 (s390_emit_bit_or): New function.
2077 (s390_emit_bit_xor): New function.
2078 (s390_emit_bit_not): New function.
2079 (s390_emit_equal): New function.
2080 (s390_emit_less_signed): New function.
2081 (s390_emit_less_unsigned): New function.
2082 (s390_emit_ref): New function.
2083 (s390_emit_if_goto): New function.
2084 (s390_emit_goto): New function.
2085 (s390_write_goto_address): New function.
2086 (s390_emit_litpool): New function.
2087 (s390_emit_const): New function.
2088 (s390_emit_call): New function.
2089 (s390_emit_reg): New function.
2090 (s390_emit_pop): New function.
2091 (s390_emit_stack_flush): New function.
2092 (s390_emit_zero_ext): New function.
2093 (s390_emit_swap): New function.
2094 (s390_emit_stack_adjust): New function.
2095 (s390_emit_set_r2): New function.
2096 (s390_emit_int_call_1): New function.
2097 (s390_emit_void_call_2): New function.
2098 (s390_emit_eq_goto): New function.
2099 (s390_emit_ne_goto): New function.
2100 (s390_emit_lt_goto): New function.
2101 (s390_emit_le_goto): New function.
2102 (s390_emit_gt_goto): New function.
2103 (s390_emit_ge_goto): New function.
2104 (s390x_emit_prologue): New function.
2105 (s390x_emit_epilogue): New function.
2106 (s390x_emit_add): New function.
2107 (s390x_emit_sub): New function.
2108 (s390x_emit_mul): New function.
2109 (s390x_emit_lsh): New function.
2110 (s390x_emit_rsh_signed): New function.
2111 (s390x_emit_rsh_unsigned): New function.
2112 (s390x_emit_ext): New function.
2113 (s390x_emit_log_not): New function.
2114 (s390x_emit_bit_and): New function.
2115 (s390x_emit_bit_or): New function.
2116 (s390x_emit_bit_xor): New function.
2117 (s390x_emit_bit_not): New function.
2118 (s390x_emit_equal): New function.
2119 (s390x_emit_less_signed): New function.
2120 (s390x_emit_less_unsigned): New function.
2121 (s390x_emit_ref): New function.
2122 (s390x_emit_if_goto): New function.
2123 (s390x_emit_const): New function.
2124 (s390x_emit_call): New function.
2125 (s390x_emit_reg): New function.
2126 (s390x_emit_pop): New function.
2127 (s390x_emit_stack_flush): New function.
2128 (s390x_emit_zero_ext): New function.
2129 (s390x_emit_swap): New function.
2130 (s390x_emit_stack_adjust): New function.
2131 (s390x_emit_int_call_1): New function.
2132 (s390x_emit_void_call_2): New function.
2133 (s390x_emit_eq_goto): New function.
2134 (s390x_emit_ne_goto): New function.
2135 (s390x_emit_lt_goto): New function.
2136 (s390x_emit_le_goto): New function.
2137 (s390x_emit_gt_goto): New function.
2138 (s390x_emit_ge_goto): New function.
2139 (s390_emit_ops): New function.
2140 (struct linux_target_ops): Fill in emit_ops hook.
2142 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2145 * Makefile.in: Add s390 IPA files.
2146 * configure.srv: Build IPA for s390.
2147 * linux-s390-ipa.c: New file.
2148 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2149 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2150 (tdesc_s390_linux32): Likewise.
2151 (init_registers_s390_linux32v1): Likewise.
2152 (tdesc_s390_linux32v1): Likewise.
2153 (init_registers_s390_linux32v2): Likewise.
2154 (tdesc_s390_linux32v2): Likewise.
2155 (init_registers_s390_linux64): Likewise.
2156 (tdesc_s390_linux64): Likewise.
2157 (init_registers_s390_linux64v1): Likewise.
2158 (tdesc_s390_linux64v1): Likewise.
2159 (init_registers_s390_linux64v2): Likewise.
2160 (tdesc_s390_linux64v2): Likewise.
2161 (init_registers_s390_te_linux64): Likewise.
2162 (tdesc_s390_te_linux64): Likewise.
2163 (init_registers_s390_vx_linux64): Likewise.
2164 (tdesc_s390_vx_linux64): Likewise.
2165 (init_registers_s390_tevx_linux64): Likewise.
2166 (tdesc_s390_tevx_linux64): Likewise.
2167 (init_registers_s390x_linux64): Likewise.
2168 (tdesc_s390x_linux64): Likewise.
2169 (init_registers_s390x_linux64v1): Likewise.
2170 (tdesc_s390x_linux64v1): Likewise.
2171 (init_registers_s390x_linux64v2): Likewise.
2172 (tdesc_s390x_linux64v2): Likewise.
2173 (init_registers_s390x_te_linux64): Likewise.
2174 (tdesc_s390x_te_linux64): Likewise.
2175 (init_registers_s390x_vx_linux64): Likewise.
2176 (tdesc_s390x_vx_linux64): Likewise.
2177 (init_registers_s390x_tevx_linux64): Likewise.
2178 (tdesc_s390x_tevx_linux64): Likewise.
2179 (have_hwcap_s390_vx): New static variable.
2180 (s390_arch_setup): Fill have_hwcap_s390_vx.
2181 (s390_get_thread_area): New function.
2182 (s390_ft_entry_gpr_esa): New const.
2183 (s390_ft_entry_gpr_zarch): New const.
2184 (s390_ft_entry_misc): New const.
2185 (s390_ft_entry_fr): New const.
2186 (s390_ft_entry_vr): New const.
2187 (s390_ft_main_31): New const.
2188 (s390_ft_main_64): New const.
2189 (s390_ft_exit_fr): New const.
2190 (s390_ft_exit_vr): New const.
2191 (s390_ft_exit_misc): New const.
2192 (s390_ft_exit_gpr_esa): New const.
2193 (s390_ft_exit_gpr_zarch): New const.
2194 (append_insns): New function.
2195 (s390_relocate_instruction): New function.
2196 (s390_install_fast_tracepoint_jump_pad): New function.
2197 (s390_get_min_fast_tracepoint_insn_len): New function.
2198 (s390_get_ipa_tdesc_idx): New function.
2199 (struct linux_target_ops): Wire in the above functions.
2200 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2201 * linux-s390-tdesc.h: New file.
2203 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2205 * linux-s390-low.c (s390_supports_tracepoints): New function.
2206 (struct linux_target_ops): Fill supports_tracepoints hook.
2208 2016-03-18 Yao Qi <yao.qi@linaro.org>
2210 * linux-low.c (lwp_signal_can_be_delivered): New function.
2211 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2213 2016-03-18 Yao Qi <yao.qi@linaro.org>
2215 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2216 0 if signal is enqueued. Remove 'signal' from one debugging
2217 message. Move one debugging message to some lines below.
2218 Remove code setting 'signal' to 0.
2220 2016-03-18 Yao Qi <yao.qi@linaro.org>
2222 * linux-low.c (linux_low_filter_event): Remove redundant
2223 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2225 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2227 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2228 (struct linux_target_ops): Wire in the above.
2230 2016-03-03 Yao Qi <yao.qi@linaro.org>
2232 * linux-low.c: Update comments to start_step_over.
2234 2016-03-03 Yao Qi <yao.qi@linaro.org>
2237 * linux-low.c (handle_extended_wait): Set child suspended
2238 if event_lwp->bp_reinsert isn't zero.
2240 2016-03-02 Yao Qi <yao.qi@linaro.org>
2242 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2243 enqueue_pending_signal.
2245 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2247 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2250 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2252 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2253 (s390_regmap_3264) [!__s390x__]: New global.
2254 (s390_collect_ptrace_register): Skip map entries containing -1.
2255 (s390_supply_ptrace_register): Ditto.
2256 (s390_fill_gprs_high): New function.
2257 (s390_store_gprs_high): New function.
2258 (s390_regsets): Add NT_S390_HIGH_GPRS.
2259 (s390_get_hwcap): Enable on 31-bit.
2260 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2261 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2262 Detect NT_S390_HIGH_GPRS.
2263 (s390_usrregs_info_3264): Enable on 31-bit.
2264 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2265 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2267 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2270 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2271 * configure.srv: Ditto.
2272 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2273 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2274 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2275 (init_registers_amd64_linux): Remove prototype.
2276 (tdesc_amd64_linux): Remove declaration.
2277 (get_ipa_tdesc): New function.
2278 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2279 initialize remaining tdescs.
2280 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2281 (init_registers_i386_linux): Remove prototype.
2282 (tdesc_i386_linux): Remove declaration.
2283 (get_ipa_tdesc): New function.
2284 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2285 initialize remaining tdescs.
2286 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2287 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2288 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2289 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2290 (x86_get_ipa_tdesc_idx): New function.
2291 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2292 * linux-x86-tdesc.h: New file.
2293 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2294 (target_get_ipa_tdesc_idx): New macro.
2295 * tracepoint.c (ipa_tdesc_idx): New macro.
2296 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2297 (symbol_list): Add ipa_tdesc_idx.
2298 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2299 (ipa_tdesc): Remove.
2300 (ipa_tdesc_idx): New variable.
2301 (get_context_regcache): Use get_ipa_tdesc.
2302 (gdb_collect): Ditto.
2304 * tracepoint.h (get_ipa_tdesc): New prototype.
2305 (ipa_tdesc): Remove.
2307 2016-02-24 Pedro Alves <palves@redhat.com>
2309 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2310 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2311 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2312 Factor out common code between the USE_SIGTRAP_SIGINFO and
2313 !USE_SIGTRAP_SIGINFO blocks.
2314 (linux_low_filter_event): Call save_stop_reason instead of
2315 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2317 (linux_wait_1): Update comments.
2319 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2321 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2322 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2323 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2324 ppc_insert_point, ppc_remove_point.
2326 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2328 * linux-s390-low.c (s390_supports_z_point_type): New function.
2329 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2331 2016-02-16 Yao Qi <yao.qi@linaro.org>
2333 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2334 PC. Get pc from regcache_read_pc.
2336 2016-02-12 Yao Qi <yao.qi@linaro.org>
2338 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2339 or linux_get_pc_32bit.
2340 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2342 2016-02-12 Yao Qi <yao.qi@linaro.org>
2344 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2345 arm_linux_get_next_pcs_fixup.
2347 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2349 * tracepoint.c (x_tracepoint_action_download): Change
2350 write_inferior_data_ptr to write_inferior_data_pointer.
2351 (cmd_qtstart): Likewise.
2352 (write_inferior_data_ptr): Remove.
2353 (download_agent_expr): Change write_inferior_data_ptr to
2354 write_inferior_data_pointer.
2355 (download_tracepoint_1): Likewise.
2356 (download_tracepoint): Likewise.
2357 (download_trace_state_variables): Likewise.
2359 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2360 Marcin Kościelnicki <koriakin@0x04.net>
2362 * tracepoint.c (struct tracepoint_action_ops): Remove.
2363 (struct tracepoint_action): Remove ops.
2364 (m_tracepoint_action_download, r_tracepoint_action_download)
2365 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2366 size and offset accordingly.
2367 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2368 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2369 (tracepoint_action_send, tracepoint_action_download): New functions.
2370 Helpers for trace action handlers.
2371 (add_tracepoint_action): Remove setup actions ops.
2372 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2374 2016-02-10 Yao Qi <yao.qi@linaro.org>
2376 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2378 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2380 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2382 * configure: Regenerate.
2384 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2386 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2387 void * to gdb_byte *.
2388 * linux-low.c (siginfo_fixup): Likewise.
2389 (linux_xfer_siginfo): Likewise.
2390 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2392 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2394 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2396 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2398 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2400 * linux-x86-low.c [__x86_64__]: Include
2401 "nat/amd64-linux-siginfo.h".
2402 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2403 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2404 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2405 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2406 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2407 (cpt_si_fd, si_timerid, si_overrun): Move from
2408 nat/amd64-linux-siginfo.c.
2409 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2411 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2413 * server.c (skip_to_semicolon): Remove.
2414 (process_point_options): Use strchrnul instead of
2417 2016-01-26 Yao Qi <yao.qi@linaro.org>
2419 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2420 * linux-low.c (install_software_single_step_breakpoints): Don't
2421 call regcache_read_pc.
2422 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2425 2016-01-26 Yao Qi <yao.qi@linaro.org>
2427 * linux-low.c (install_software_single_step_breakpoints): Call
2428 regcache_read_pc instead of get_pc.
2430 2016-01-26 Yao Qi <yao.qi@linaro.org>
2432 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2433 (unblock_async_io): Rename to ...
2434 (block_unblock_async_io): ... it. New function.
2435 (enable_async_io): Don't install SIGIO handler. Unblock it
2437 (disable_async_io): Don't ignore SIGIO. Block it instead.
2438 (initialize_async_io): Install SIGIO handler. Don't call
2441 2016-01-26 Yao Qi <yao.qi@linaro.org>
2443 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2444 first character is '\003', call *the_target->request_interrupt.
2446 2016-01-25 Yao Qi <yao.qi@linaro.org>
2448 * remote-utils.c (new_thread_notify): Remove.
2449 (dead_thread_notify): Likewise.
2450 * remote-utils.h (new_thread_notify): Remove declaration.
2451 (dead_thread_notify): Likewise.
2453 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2455 * gdb.trace/pending.exp: Fix expected message on continue.
2457 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2459 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2460 it works properly on big-endian machines where sizeof (CORE_ADDR)
2463 2016-01-21 Pedro Alves <palves@redhat.com>
2465 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2466 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2467 * configure: Regenerate.
2469 2016-01-21 Yao Qi <yao.qi@linaro.org>
2471 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2472 is_thumb and set it according to CPSR saved on the stack.
2473 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2474 arm_sigreturn_next_pc.
2476 2016-01-18 Yao Qi <yao.qi@linaro.org>
2478 * linux-low.c (linux_set_pc_64bit): New function.
2479 (linux_get_pc_64bit): New function.
2480 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2482 * linux-sparc-low.c (debug_threads): Remove declaration.
2483 (sparc_get_pc): Remove.
2484 (the_low_target): Use linux_get_pc_64bit instead of
2486 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2487 (the_low_target): Use linux_get_pc_64bit and
2490 2016-01-18 Yao Qi <yao.qi@linaro.org>
2492 * linux-arm-low.c (debug_threads): Remove declaration.
2493 (arm_get_pc, arm_set_pc): Remove.
2494 (the_low_target): Use linux_get_pc_32bit and
2496 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2497 (the_low_target): Use linux_get_pc_32bit and
2499 * linux-cris-low.c (debug_threads): Remove declaration.
2500 (cris_get_pc, cris_set_pc,): Remove.
2501 (the_low_target): Use linux_get_pc_32bit and
2503 * linux-crisv32-low.c (debug_threads): Remove declaration.
2504 (cris_get_pc, cris_set_pc): Remove.
2505 (the_low_target): Use linux_get_pc_32bit and
2507 * linux-low.c: Include inttypes.h.
2508 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2509 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2510 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2511 (the_low_target): Use linux_get_pc_32bit and
2513 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2514 (the_low_target): Use linux_get_pc_32bit and
2516 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2517 (the_low_target): Use linux_get_pc_32bit and
2519 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2520 (the_low_target): Use linux_get_pc_32bit and
2522 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2523 (the_low_target): Use linux_get_pc_32bit and
2526 2016-01-18 Gary Benson <gbenson@redhat.com>
2528 * configure.ac (AC_FUNC_FORK): New check.
2529 * config.in: Regenerate.
2530 * configure: Likewise.
2532 2016-01-14 Yao Qi <yao.qi@linaro.org>
2534 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2535 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2536 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2537 arm_get_next_pcs_ctor.
2539 2016-01-12 Josh Stone <jistone@redhat.com>
2540 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2542 * inferiors.h: Include "gdb_vecs.h".
2543 (struct process_info): Add syscalls_to_catch.
2544 * inferiors.c (remove_process): Free syscalls_to_catch.
2545 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2546 syscall_return stops.
2547 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2548 * server.c (handle_general_set): Handle QCatchSyscalls.
2549 (handle_query): Report support for QCatchSyscalls.
2550 * target.h (struct target_ops): Add supports_catch_syscall.
2551 (target_supports_catch_syscall): New macro.
2552 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2553 (struct lwp_info): Add syscall_state.
2554 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2555 Maintain syscall_state and syscalls_to_catch across exec.
2556 (get_syscall_trapinfo): New function, proxy to the_low_target.
2557 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2558 (linux_low_filter_event): Toggle syscall_state entry/return for
2559 syscall traps, and set it ignored for all others.
2560 (gdb_catching_syscalls_p): New function.
2561 (gdb_catch_this_syscall_p): New function.
2562 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2563 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2564 (linux_supports_catch_syscall): New function.
2565 (linux_target_ops): Install it.
2566 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2567 (the_low_target): Install it.
2569 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2571 * acinclude.m4: Include new ../warning.m4 file.
2572 * configure: Regenerated.
2573 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2575 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2577 * ax.c (is_goto_target): Mark static.
2578 * linux-low.c (register_addr): Likewise.
2579 (linux_fetch_registers, linux_store_registers): Likewise.
2580 * mem-break.c (any_persistent_commands): Fix old prototype.
2581 (add_commands_to_breakpoint): Mark static.
2582 * regcache.c (find_register_by_name): Delete unused func.
2583 * remote-utils.c (hex_or_minus_one): Mark static.
2584 * server.c (monitor_show_help): Mark static.
2585 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2586 handle_v_requests): Likewise.
2588 2016-01-12 Pedro Alves <palves@redhat.com>
2590 Remove use of the registered trademark symbol throughout.
2592 2016-01-08 Yao Qi <yao.qi@linaro.org>
2594 * remote-utils.c (getpkt): If c is '\003', call target hook
2597 2016-01-06 Yao Qi <yao.qi@linaro.org>
2599 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2600 linux-aarch32-low.c.
2601 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2602 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2603 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2604 (thumb2_breakpoint): Declare.
2605 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2606 linux-aarch32-low.h.
2607 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2608 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2609 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2611 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2613 * gdbreplay.c (gdbreplay_version): Change copyright year in
2615 * server.c (gdbserver_version): Likewise.
2617 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2619 * server.c (crc32_table): Delete.
2620 (crc32): Use libiberty's xcrc32 function.
2622 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2624 * lynx-low.c (lynx_delete_thread_callback): New function.
2625 (lynx_mourn): Properly delete our process and all of its
2626 threads. Remove call to clear_inferiors.
2628 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2630 * target.c (thread_search_callback): Add check that
2631 the thread_stopped target callback is not NULL before
2634 2015-12-21 Yao Qi <yao.qi@linaro.org>
2636 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2639 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2641 * server.c (handle_query): Call target_supports_software_single_step.
2643 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2645 * linux-low.c (single_step): New function.
2646 (linux_resume_one_lwp_throw): Call single_step.
2647 (start_step_over): Likewise.
2649 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2651 * Makefile.in (SFILES): Append arch/arm-linux.c,
2652 arch/arm-get-next-pcs.c.
2653 (arm-linux.o): New rule.
2654 (arm-get-next-pcs.o): New rule.
2655 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2657 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2658 to linux-aarch32-low.c.
2659 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2660 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2661 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2662 (thumb2_breakpoint_len): Likewise.
2663 (arm_is_thumb_mode): Make non-static.
2664 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2665 from linux-aarch32-low.c.
2666 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2667 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2668 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2669 (thumb2_breakpoint_len): Likewise.
2670 (arm_is_thumb_mode): New declaration.
2671 * linux-arm-low.c: Include arch/arm-linux.h
2672 aarch/arm-get-next-pcs.h, sys/syscall.h.
2673 (get_next_pcs_ops): New struct.
2674 (get_next_pcs_addr_bits_remove): New function.
2675 (get_next_pcs_is_thumb): New function.
2676 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2677 (arm_sigreturn_next_pc): Likewise.
2678 (get_next_pcs_syscall_next_pc): Likewise.
2679 (arm_gdbserver_get_next_pcs): Likewise.
2680 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2682 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2683 * server.h: Include gdb_vecs.h.
2685 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2687 * Makefile.in (SFILES): Append common/common-regcache.c.
2688 (OBS): Append common-regcache.o.
2689 (common-regcache.o): New rule.
2690 * regcache.c (init_register_cache): Initialize cache to
2692 (regcache_raw_read_unsigned): New function.
2693 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2694 register_status enum.
2696 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2698 * linux-aarch64-low.c (the_low_targets): Rename
2699 breakpoint_reinsert_addr to get_next_pcs.
2700 * linux-arm-low.c (the_low_targets): Likewise.
2701 * linux-bfin-low.c (the_low_targets): Likewise.
2702 * linux-cris-low.c (the_low_targets): Likewise.
2703 * linux-crisv32-low.c (the_low_targets): Likewise.
2704 * linux-low.c (can_software_single_step): Likewise.
2705 (install_software_single_step_breakpoints): New function.
2706 (start_step_over): Use install_software_single_step_breakpoints.
2707 * linux-low.h: New CORE_ADDR vector.
2708 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2710 * linux-mips-low.c (the_low_targets): Likewise.
2711 * linux-nios2-low.c (the_low_targets): Likewise.
2712 * linux-sparc-low.c (the_low_targets): Likewise.
2714 2015-12-17 Pedro Alves <palves@redhat.com>
2716 * linux-low.c (linux_kill_one_lwp): Remove references to
2718 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2720 (linux_init_signals): Delete.
2721 (initialize_low): Adjust.
2722 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2724 2015-12-16 Pedro Alves <palves@redhat.com>
2726 * configure.ac (compiler warning flags): When testing a
2727 -Wno-foo option, check whether -Wfoo works instead.
2728 * configure: Regenerate.
2730 2015-12-11 Don Breazeal <donb@codesourcery.com>
2732 * server.c (process_serial_event): Don't exit from gdbserver
2733 in remote mode if there are still active inferiors.
2735 2015-12-11 Yao Qi <yao.qi@linaro.org>
2737 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2738 arm_breakpoint_at if the process is 32-bit.
2740 2015-12-11 Yao Qi <yao.qi@linaro.org>
2742 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2745 2015-12-07 Yao Qi <yao.qi@linaro.org>
2747 * configure.srv: Append arm.o to srv_tgtobj for
2748 aarch64*-*-linux* target.
2749 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2750 from linux-arm-low.c.
2751 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2752 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2753 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2754 (thumb2_breakpoint_len): Likewise.
2755 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2756 (arm_breakpoint_kinds): Likewise.
2757 (arm_breakpoint_kind_from_pc): Likewise.
2758 (arm_sw_breakpoint_from_kind): Likewise.
2759 (arm_breakpoint_kind_from_current_state): Likewise.
2760 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2761 (arm_sw_breakpoint_from_kind): Declare.
2762 (arm_breakpoint_kind_from_current_state): Declare.
2763 (arm_breakpoint_at): Declare.
2764 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2765 arm_sw_breakpoint_from_kind if process is 32-bit.
2766 (aarch64_breakpoint_kind_from_pc): New function.
2767 (aarch64_breakpoint_kind_from_current_state): New function.
2768 (the_low_target): Initialize fields breakpoint_kind_from_pc
2769 and breakpoint_kind_from_current_state.
2770 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2771 linux-aarch32-low.c.
2772 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2773 (arm_breakpoint, arm_breakpoint_len): Likewise.
2774 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2775 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2776 (arm_is_thumb_mode): Likewise.
2777 (arm_breakpoint_at): Likewise.
2778 (arm_breakpoint_kind_from_pc): Likewise.
2779 (arm_sw_breakpoint_from_kind): Likewise.
2780 (arm_breakpoint_kind_from_current_state): Likewise.
2783 2015-08-04 Yao Qi <yao.qi@linaro.org>
2785 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2786 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2787 * server.c (extended_protocol): Remove "static".
2788 * server.h (extended_protocol): Declare it.
2790 2015-12-04 Josh Stone <jistone@redhat.com>
2792 * target.h (struct target_ops) <arch_setup>: Rename to ...
2793 (struct target_ops) <post_create_inferior>: ... this.
2794 (target_arch_setup): Rename to ...
2795 (target_post_create_inferior): ... this, calling post_create_inferior.
2796 * server.c (start_inferior): Update target_arch_setup calls to
2797 target_post_create_inferior.
2798 * linux-low.c (linux_low_ptrace_options): Forward declare.
2799 (linux_arch_setup): Update its comment for general use.
2800 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2801 (struct linux_target_ops): Use linux_post_create_inferior.
2802 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2803 to post_create_inferior.
2804 * nto-low.c (struct nto_target_ops): Likewise.
2805 * spu-low.c (struct spu_target_ops): Likewise.
2806 * win32-low.c (struct win32_target_ops): Likewise.
2808 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2810 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2812 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2814 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2815 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2816 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2817 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2818 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2819 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2820 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2821 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2822 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2823 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2824 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2825 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2827 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2829 * linux-low.c (linux_look_up_symbols): Don't call
2830 linux_supports_traceclone.
2831 * linux-low.h (thread_db_init): Remove use_events argument.
2832 * thread-db.c (thread_db_use_event): Remove global variable.
2833 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2834 (struct thread_db) <td_create_bp>: Remove field.
2835 (thread_db_create_event): Remove function.
2836 (thread_db_enable_reporting): Likewise.
2837 (find_one_thread): Don't check for thread_db_use_events.
2838 (attach_thread): Likewise.
2839 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2840 (try_thread_db_load_1): Don't check for thread_db_use_events.
2841 (thread_db_init): Remove use_events argument and thread events
2843 (remove_thread_event_breakpoints): Remove function.
2844 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2846 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2848 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2850 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2851 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2852 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2853 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2854 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2856 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2858 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2859 * linux-low.c (can_hardware_single_step): Use
2860 supports_hardware_single_step.
2861 (can_software_single_step): New function.
2862 (start_step_over): Call can_software_single_step.
2863 (linux_supports_hardware_single_step): New function.
2864 (struct target_ops) <supports_software_single_step>: Initialize.
2865 * linux-low.h (struct linux_target_ops)
2866 <supports_hardware_single_step>: Initialize.
2867 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2868 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2869 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2870 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2871 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2872 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2873 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2874 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2875 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2876 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2878 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2879 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2881 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2882 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2883 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2885 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2886 * target.h (struct target_ops): <supports_software_single_step>:
2888 (target_supports_software_single_step): New macro.
2890 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2892 * linux-low.c (linux_wait_1): Fix pc advance condition.
2893 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2894 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2896 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2898 * linux-arm-low.c (arm_is_thumb_mode): New function.
2899 (arm_breakpoint_at): Use arm_is_thumb_mode.
2900 (arm_breakpoint_kind_from_current_state): New function.
2901 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2903 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2904 (linux_breakpoint_kind_from_current_state): New function.
2905 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2906 * linux-low.h (struct linux_target_ops)
2907 <breakpoint_kind_from_current_state>: New field.
2908 * target.h (struct target_ops): Likewise.
2909 (target_breakpoint_kind_from_current_state): New macro.
2911 2015-11-30 Pedro Alves <palves@redhat.com>
2913 * linux-low.c (linux_resume): Wake up the event loop before
2916 2015-11-30 Pedro Alves <palves@redhat.com>
2918 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2920 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2922 * target.c (struct thread_search): New structure.
2923 (thread_search_callback): New function.
2924 (prev_general_thread): New global.
2925 (prepare_to_access_memory, done_accessing_memory): New functions.
2926 * target.h (prepare_to_access_memory, done_accessing_memory):
2927 Replace macros with function declarations.
2929 2015-11-30 Pedro Alves <palves@redhat.com>
2932 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2933 report TARGET_WAITKIND_NO_RESUMED.
2934 * remote-utils.c (prepare_resume_reply): Handle
2935 TARGET_WAITKIND_NO_RESUMED.
2936 * server.c (report_no_resumed): New global.
2937 (handle_query) <qSupported>: Handle "no-resumed+". Report
2938 "no-resumed+" support.
2939 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2940 return error if the client doesn't support no-resumed events.
2941 (push_stop_notification): New function.
2942 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2943 events if the client supports them.
2945 2015-11-30 Pedro Alves <palves@redhat.com>
2947 * linux-low.c (thread_still_has_status_pending_p): Don't check
2949 (lwp_resumed): New function.
2950 (status_pending_p_callback): Return early if the LWP is not
2951 supposed to be resumed.
2953 2015-11-30 Pedro Alves <palves@redhat.com>
2955 * linux-low.c (handle_extended_wait): Assert that the LWP's
2956 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2957 thread create events, leave the new child's status pending.
2958 (linux_low_filter_event): If GDB wants to hear about thread exit
2959 events, leave the LWP marked dead and don't delete it.
2960 (linux_wait_for_event_filtered): Don't check for thread exit.
2961 (filter_exit_event): New function.
2962 (linux_wait_1): Use it, when returning an exit event.
2963 (linux_resume_one_lwp_throw): Assert that the LWP's
2964 waitstatus is TARGET_WAITKIND_IGNORE.
2965 * remote-utils.c (prepare_resume_reply): Handle
2966 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2967 * server.c (report_thread_events): New global.
2968 (handle_general_set): Handle QThreadEvents.
2969 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2970 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2971 TARGET_WAITKIND_THREAD_EXITED.
2972 * server.h (report_thread_events): Declare.
2974 2015-11-30 Pedro Alves <palves@redhat.com>
2976 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2977 the thread's last_resume_kind was resume_stop.
2979 2015-11-30 Pedro Alves <palves@redhat.com>
2981 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2984 2015-11-30 Pedro Alves <palves@redhat.com>
2986 * server.c (handle_v_requests): Handle vCtrlC.
2988 2015-11-30 Pedro Alves <palves@redhat.com>
2990 * gdbthread.h (find_any_thread_of_pid): Declare.
2991 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2993 * server.c (handle_query): If current_thread is NULL, look for
2994 another thread of the selected process.
2996 2015-11-26 Daniel Colascione <dancol@dancol.org>
2997 Simon Marchi <simon.marchi@ericsson.com>
2999 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3000 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3002 * target.h (struct target_ops) <thread_name>: New field.
3003 (target_thread_name): New macro.
3005 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3007 * regcache.h (regcache_invalidate_pid): Add declaration.
3008 * regcache.c (regcache_invalidate_pid): New function, extracted
3009 from regcache_invalidate.
3010 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3011 Add trivial documentation comment.
3012 * lynx-low.c: Use regcache_invalidate_pid instead of
3013 regcache_invalidate.
3015 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3017 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3018 and Elf64_auxv_t if the target is Android.
3020 2015-11-22 Doug Evans <xdje42@gmail.com>
3022 * target.h: #include <sys/types.h>.
3024 2015-11-19 Pedro Alves <palves@redhat.com>
3026 * linux-low.c (linux_process_qsupported): Change prototype.
3028 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3030 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3031 and adjust to loop over all features.
3032 * server.c (handle_query) <qSupported>: Adjust to call
3033 target_process_qsupported once, passing it a vector of unprocessed
3035 * target.h (struct target_ops) <process_qsupported>: Change
3037 (target_process_qsupported): Adjust.
3039 2015-11-19 Pedro Alves <palves@redhat.com>
3041 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3043 * configure: Regenerate.
3045 2015-11-19 Pedro Alves <palves@redhat.com>
3047 * configure: Regenerate.
3049 2015-11-19 Yao Qi <yao.qi@linaro.org>
3051 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3054 2015-11-19 Yao Qi <yao.qi@linaro.org>
3056 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3057 (struct aarch64_operand): Move enum out.
3059 2015-11-19 Yao Qi <yao.qi@linaro.org>
3061 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3062 struct user_fpsimd_state *.
3063 (aarch64_store_fpregset): Likewise.
3065 2015-11-19 Yao Qi <yao.qi@linaro.org>
3067 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3068 struct user_pt_regs *.
3069 (aarch64_store_gregset): Likewise.
3071 2015-11-18 Pedro Alves <palves@redhat.com>
3073 * Makefile.in (all_object_files): Add $IPA_OBJS.
3075 2015-11-17 Pedro Alves <palves@redhat.com>
3077 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3078 GDB_SIGNAL_0 and gdb_signal_to_string.
3080 2015-11-17 Pedro Alves <palves@redhat.com>
3082 * win32-low.c (handle_output_debug_string): Remove parameter.
3083 (win32_kill): Remove our_status local and adjust call to
3084 handle_output_debug_string.
3085 (get_child_debug_event): Adjust call to
3086 handle_output_debug_string.
3088 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3090 * linux-mips-low.c (mips_fill_gregset): Add cast.
3091 (mips_store_gregset): Likewise.
3092 (mips_fill_fpregset): Likewise.
3093 (mips_store_fpregset): Likewise.
3095 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3097 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3100 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3102 * linux-mips-low.c (mips_linux_new_thread): Change type of
3103 watch_type to enum target_hw_bp_type.
3105 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3107 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3108 Change return type to arm_hwbp_type.
3110 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3112 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3113 (arm_store_gregset): Likewise.
3114 * linux-arm-low.c (arm_get_hwcap): Likewise.
3115 (arm_read_description): Likewise.
3117 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3119 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3121 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3123 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3124 (ppc_fill_vsxregset): Likewise.
3125 (ppc_store_vsxregset): Likewise.
3126 (ppc_fill_vrregset): Likewise.
3127 (ppc_store_vrregset): Likewise.
3128 (ppc_fill_evrregset): Likewise.
3129 (ppc_store_evrregset): Likewise.
3131 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3133 * linux-ppc-low.c (ppc_usrregs_info): Remove
3134 forward-declaration.
3135 (ppc_arch_setup): Move lower in file.
3137 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3139 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3140 (ps_pdwrite): Likewise.
3142 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3144 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3145 to after assert checks.
3147 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3149 * proc-service.c (ps_pdread): Add/adjust casts.
3150 (ps_pdwrite): Add/adjust casts.
3152 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3154 * server.c (handle_search_memory_1): Cast return value of
3157 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3159 * server.c (write_qxfer_response): Change type of data to
3162 2015-10-29 Pedro Alves <palves@redhat.com>
3164 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3166 2015-10-29 Pedro Alves <palves@redhat.com>
3168 * tracepoint.c (clear_installed_tracepoints): Add casts.
3170 2015-10-29 Pedro Alves <palves@redhat.com>
3172 * server.c (handle_v_cont, process_serial_event): Add enum
3173 gdb_signal casts to signal parsing code.
3175 2015-10-29 Pedro Alves <palves@redhat.com>
3177 * linux-low.h (NULL_REGSET): Define.
3178 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3179 * linux-arm-low.c (arm_regsets): Likewise.
3180 * linux-crisv32-low.c (cris_regsets): Likewise.
3181 * linux-m68k-low.c (m68k_regsets): Likewise.
3182 * linux-mips-low.c (mips_regsets): Likewise.
3183 * linux-nios2-low.c (nios2_regsets): Likewise.
3184 * linux-ppc-low.c (ppc_regsets): Likewise.
3185 * linux-s390-low.c (s390_regsets): Likewise.
3186 * linux-sh-low.c (sh_regsets): Likewise.
3187 * linux-sparc-low.c (sparc_regsets): Likewise.
3188 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3189 * linux-tile-low.c (tile_regsets): Likewise.
3190 * linux-x86-low.c (x86_regsets): Likewise.
3191 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3193 2015-10-29 Pedro Alves <palves@redhat.com>
3195 * linux-low.h (NULL_REGSET): Define.
3196 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3197 * linux-arm-low.c (arm_regsets): Likewise.
3198 * linux-crisv32-low.c (cris_regsets): Likewise.
3199 * linux-m68k-low.c (m68k_regsets): Likewise.
3200 * linux-mips-low.c (mips_regsets): Likewise.
3201 * linux-nios2-low.c (nios2_regsets): Likewise.
3202 * linux-ppc-low.c (ppc_regsets): Likewise.
3203 * linux-s390-low.c (s390_regsets): Likewise.
3204 * linux-sh-low.c (sh_regsets): Likewise.
3205 * linux-sparc-low.c (sparc_regsets): Likewise.
3206 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3207 * linux-tile-low.c (tile_regsets): Likewise.
3208 * linux-x86-low.c (x86_regsets): Likewise.
3209 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3211 2015-10-26 Doug Evans <dje@google.com>
3213 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3215 2015-10-26 Doug Evans <dje@google.com>
3217 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3219 2015-10-26 Doug Evans <dje@google.com>
3221 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3223 (attach_thread, find_new_threads_callback): Ditto.
3225 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3227 * mem-break.h (set_breakpoint_data): Remove.
3229 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3231 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3232 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3233 (initialize_low): Remove set_breakpoint_data call.
3234 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3235 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3236 (initialize_low): Remove set_breakpoint_data call.
3237 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3238 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3239 (initialize_low): Remove set_breakpoint_data call.
3241 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3243 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3244 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3245 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3246 * target.h (target_breakpoint_kind_from_pc): New macro.
3248 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3250 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3251 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3252 the default breakpoint kind.
3254 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3256 * linux-arm-low.c (arm_supports_z_point_type): Add software
3259 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3261 * linux-arm-low.c: Refactor breakpoint definitions.
3262 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3263 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3265 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3267 * Makefile.in: Add arm.c/o.
3268 * configure.srv: Likewise.
3269 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3270 (arm_breakpoint_kind_from_pc): New function.
3271 (arm_sw_breakpoint_from_kind): Return proper kind.
3272 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3274 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3276 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3278 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3279 (struct raw_breakpoint) <size>: Remove.
3280 (struct raw_breakpoint) <kind>: Add.
3281 (bp_size): New function.
3282 (bp_opcode): Likewise.
3283 (find_raw_breakpoint_at): Adjust for kind.
3284 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3285 (remove_memory_breakpoint): Adjust for kind call bp_size.
3286 (set_raw_breakpoint_at): Adjust for kind.
3287 (set_breakpoint): Likewise.
3288 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3289 (delete_raw_breakpoint): Adjust for kind.
3290 (delete_breakpoint): Likewise.
3291 (find_gdb_breakpoint): Likewise.
3292 (set_gdb_breakpoint_1): Likewise.
3293 (set_gdb_breakpoint): Likewise.
3294 (delete_gdb_breakpoint_1): Likewise.
3295 (delete_gdb_breakpoint): Likewise.
3296 (uninsert_raw_breakpoint): Likewise.
3297 (reinsert_raw_breakpoint): Likewise.
3298 (set_breakpoint_data): Remove.
3299 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3300 (check_mem_read): Adjust for kind call bp_size.
3301 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3302 (clone_one_breakpoint): Adjust for kind.
3303 * mem-break.h (set_gdb_breakpoint): Likewise.
3304 (delete_gdb_breakpoint): Likewise.
3305 * server.c (process_serial_event): Likewise.
3307 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3309 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3310 (struct linux_target_ops) <breakpoint>: Remove.
3311 (struct linux_target_ops) <breakpoint_len>: Remove.
3312 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3313 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3314 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3315 (arm_sw_breakpoint_from_kind): New function.
3316 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3317 (struct linux_target_ops) <breakpoint>: Remove.
3318 (struct linux_target_ops) <breakpoint_len>: Remove.
3319 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3320 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3321 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3322 (struct linux_target_ops) <breakpoint>: Remove.
3323 (struct linux_target_ops) <breakpoint_len>: Remove.
3324 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3325 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3326 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3327 (struct linux_target_ops) <breakpoint>: Remove.
3328 (struct linux_target_ops) <breakpoint_len>: Remove.
3329 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3330 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3331 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3332 and sw_breakpoint_from_kind to increment the pc.
3333 (linux_breakpoint_kind_from_pc): New function.
3334 (linux_sw_breakpoint_from_kind): New function.
3335 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3336 (initialize_low): Call breakpoint_kind_from_pc and
3337 sw_breakpoint_from_kind to replace breakpoint_data/len.
3338 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3340 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3341 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3342 (struct linux_target_ops) <breakpoint>: Remove.
3343 (struct linux_target_ops) <breakpoint_len>: Remove.
3344 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3345 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3346 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3347 (struct linux_target_ops) <breakpoint>: Remove.
3348 (struct linux_target_ops) <breakpoint_len>: Remove.
3349 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3350 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3351 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3352 (struct linux_target_ops) <breakpoint>: Remove.
3353 (struct linux_target_ops) <breakpoint_len>: Remove.
3354 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3355 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3356 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3357 (struct linux_target_ops) <breakpoint>: Remove.
3358 (struct linux_target_ops) <breakpoint_len>: Remove.
3359 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3360 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3361 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3362 (struct linux_target_ops) <breakpoint>: Remove.
3363 (struct linux_target_ops) <breakpoint_len>: Remove.
3364 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3365 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3366 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3367 (struct linux_target_ops) <breakpoint>: Remove.
3368 (struct linux_target_ops) <breakpoint_len>: Remove.
3369 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3370 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3371 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3372 (struct linux_target_ops) <breakpoint>: Remove.
3373 (struct linux_target_ops) <breakpoint_len>: Remove.
3374 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3375 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3376 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3377 (struct linux_target_ops) <breakpoint>: Remove.
3378 (struct linux_target_ops) <breakpoint_len>: Remove.
3379 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3380 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3381 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3382 (struct linux_target_ops) <breakpoint>: Remove.
3383 (struct linux_target_ops) <breakpoint_len>: Remove.
3384 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3385 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3386 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3387 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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.
3398 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3400 * linux-cris-low.c (cris_get_pc): Remove void arg.
3402 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3404 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3407 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3409 * inferiors.c (thread_pid_matches_callback): New function.
3410 (find_thread_process): New function.
3411 (remove_thread): Reset current_thread.
3412 (remove_process): Assert threads have been removed first.
3414 2015-10-15 Yao Qi <yao.qi@linaro.org>
3416 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3418 (aarch64_remove_point): Likewise.
3419 * regcache.c (regcache_register_size): New function.
3421 2015-10-12 Yao Qi <yao.qi@linaro.org>
3423 * linux-aarch64-low.c: Update all callers as emit_load_store
3424 is renamed to aarch64_emit_load_store.
3426 2015-10-12 Yao Qi <yao.qi@linaro.org>
3428 * linux-aarch64-low.c: Update all callers of function renaming
3429 from emit_insn to aarch64_emit_insn.
3431 2015-10-12 Yao Qi <yao.qi@linaro.org>
3433 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3434 arch/aarch64-insn.h.
3435 (struct aarch64_memory_operand): Likewise.
3437 (emit_insn): Move to arch/aarch64-insn.c.
3438 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3439 (emit_load_store): Move to arch/aarch64-insn.c.
3440 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3441 (can_encode_int32): Remove.
3443 2015-10-12 Yao Qi <yao.qi@linaro.org>
3445 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3446 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3447 (aarch64_relocate_instruction): Likewise.
3448 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3449 (struct aarch64_insn_visitor): Likewise.
3451 2015-10-12 Yao Qi <yao.qi@linaro.org>
3453 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3454 (struct aarch64_insn_visitor): New.
3455 (struct aarch64_insn_relocation_data): New.
3456 (aarch64_ftrace_insn_reloc_b): New function.
3457 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3458 (aarch64_ftrace_insn_reloc_cb): Likewise.
3459 (aarch64_ftrace_insn_reloc_tb): Likewise.
3460 (aarch64_ftrace_insn_reloc_adr): Likewise.
3461 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3462 (aarch64_ftrace_insn_reloc_others): Likewise.
3464 (aarch64_relocate_instruction): Use visitor.
3466 2015-10-12 Yao Qi <yao.qi@linaro.org>
3468 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3469 int. Add argument buf.
3470 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3471 aarch64_relocate_instruction.
3473 2015-10-12 Yao Qi <yao.qi@linaro.org>
3475 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3476 argument insn. Remove local variable insn. Don't call
3478 (aarch64_install_fast_tracepoint_jump_pad): Call
3481 2015-09-30 Yao Qi <yao.qi@linaro.org>
3483 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3484 (emit_load_store_pair): Likewise.
3486 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3488 * dll.c (match_dll): Add cast(s).
3489 (unloaded_dll): Likewise.
3490 * linux-low.c (second_thread_of_pid_p): Likewise.
3491 (delete_lwp_callback): Likewise.
3492 (count_events_callback): Likewise.
3493 (select_event_lwp_callback): Likewise.
3494 (linux_set_resume_request): Likewise.
3495 * server.c (accumulate_file_name_length): Likewise.
3496 (emit_dll_description): Likewise.
3497 (handle_qxfer_threads_worker): Likewise.
3498 (visit_actioned_threads): Likewise.
3499 * thread-db.c (any_thread_of): Likewise.
3500 * tracepoint.c (same_process_p): Likewise.
3501 (match_blocktype): Likewise.
3502 (build_traceframe_info_xml): Likewise.
3504 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3506 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3508 (gdb_unparse_agent_expr): Likewise.
3509 * hostio.c (require_data): Likewise.
3510 (handle_pread): Likewise.
3511 * linux-low.c (disable_regset): Likewise.
3512 (fetch_register): Likewise.
3513 (store_register): Likewise.
3514 (get_dynamic): Likewise.
3515 (linux_qxfer_libraries_svr4): Likewise.
3516 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3517 (set_fast_tracepoint_jump): Likewise.
3518 (uninsert_fast_tracepoint_jumps_at): Likewise.
3519 (reinsert_fast_tracepoint_jumps_at): Likewise.
3520 (validate_inserted_breakpoint): Likewise.
3521 (clone_agent_expr): Likewise.
3522 * regcache.c (init_register_cache): Likewise.
3523 * remote-utils.c (putpkt_binary_1): Likewise.
3524 (decode_M_packet): Likewise.
3525 (decode_X_packet): Likewise.
3526 (look_up_one_symbol): Likewise.
3527 (relocate_instruction): Likewise.
3528 (monitor_output): Likewise.
3529 * server.c (handle_search_memory): Likewise.
3530 (handle_qxfer_exec_file): Likewise.
3531 (handle_qxfer_libraries): Likewise.
3532 (handle_qxfer): Likewise.
3533 (handle_query): Likewise.
3534 (handle_v_cont): Likewise.
3535 (handle_v_run): Likewise.
3536 (captured_main): Likewise.
3537 * target.c (write_inferior_memory): Likewise.
3538 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3539 * tracepoint.c (init_trace_buffer): Likewise.
3540 (add_tracepoint_action): Likewise.
3541 (add_traceframe): Likewise.
3542 (add_traceframe_block): Likewise.
3543 (cmd_qtdpsrc): Likewise.
3544 (cmd_qtdv): Likewise.
3545 (cmd_qtstatus): Likewise.
3546 (response_source): Likewise.
3547 (response_tsv): Likewise.
3548 (cmd_qtnotes): Likewise.
3549 (gdb_collect): Likewise.
3550 (initialize_tracepoint): Likewise.
3552 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3554 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3555 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3556 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3558 (enum aarch64_condition_codes): New enum.
3559 (w0): New static global.
3562 (struct aarch64_memory_operand) <type>: New
3563 MEMORY_OPERAND_POSTINDEX type.
3564 (postindex_memory_operand): New helper function.
3565 (emit_ret): New function.
3566 (emit_load_store_pair): New function, factored out of emit_stp
3567 with support for MEMORY_OPERAND_POSTINDEX.
3568 (emit_stp): Rewrite using emit_load_store_pair.
3569 (emit_ldp): New function.
3570 (emit_load_store): Likewise.
3571 (emit_ldr): Mention post-index instruction in comment.
3572 (emit_ldrh): New function.
3573 (emit_ldrb): New function.
3574 (emit_ldrsw): Mention post-index instruction in comment.
3575 (emit_str): Likewise.
3576 (emit_subs): New function.
3577 (emit_cmp): Likewise.
3578 (emit_and): Likewise.
3579 (emit_orr): Likewise.
3580 (emit_orn): Likewise.
3581 (emit_eor): Likewise.
3582 (emit_mvn): Likewise.
3583 (emit_lslv): Likewise.
3584 (emit_lsrv): Likewise.
3585 (emit_asrv): Likewise.
3586 (emit_mul): Likewise.
3587 (emit_sbfm): Likewise.
3588 (emit_sbfx): Likewise.
3589 (emit_ubfm): Likewise.
3590 (emit_ubfx): Likewise.
3591 (emit_csinc): Likewise.
3592 (emit_cset): Likewise.
3593 (emit_nop): Likewise.
3594 (emit_ops_insns): New helper function.
3595 (emit_pop): Likewise.
3596 (emit_push): Likewise.
3597 (aarch64_emit_prologue): New function.
3598 (aarch64_emit_epilogue): Likewise.
3599 (aarch64_emit_add): Likewise.
3600 (aarch64_emit_sub): Likewise.
3601 (aarch64_emit_mul): Likewise.
3602 (aarch64_emit_lsh): Likewise.
3603 (aarch64_emit_rsh_signed): Likewise.
3604 (aarch64_emit_rsh_unsigned): Likewise.
3605 (aarch64_emit_ext): Likewise.
3606 (aarch64_emit_log_not): Likewise.
3607 (aarch64_emit_bit_and): Likewise.
3608 (aarch64_emit_bit_or): Likewise.
3609 (aarch64_emit_bit_xor): Likewise.
3610 (aarch64_emit_bit_not): Likewise.
3611 (aarch64_emit_equal): Likewise.
3612 (aarch64_emit_less_signed): Likewise.
3613 (aarch64_emit_less_unsigned): Likewise.
3614 (aarch64_emit_ref): Likewise.
3615 (aarch64_emit_if_goto): Likewise.
3616 (aarch64_emit_goto): Likewise.
3617 (aarch64_write_goto_address): Likewise.
3618 (aarch64_emit_const): Likewise.
3619 (aarch64_emit_call): Likewise.
3620 (aarch64_emit_reg): Likewise.
3621 (aarch64_emit_pop): Likewise.
3622 (aarch64_emit_stack_flush): Likewise.
3623 (aarch64_emit_zero_ext): Likewise.
3624 (aarch64_emit_swap): Likewise.
3625 (aarch64_emit_stack_adjust): Likewise.
3626 (aarch64_emit_int_call_1): Likewise.
3627 (aarch64_emit_void_call_2): Likewise.
3628 (aarch64_emit_eq_goto): Likewise.
3629 (aarch64_emit_ne_goto): Likewise.
3630 (aarch64_emit_lt_goto): Likewise.
3631 (aarch64_emit_le_goto): Likewise.
3632 (aarch64_emit_gt_goto): Likewise.
3633 (aarch64_emit_ge_got): Likewise.
3634 (aarch64_emit_ops_impl): New static global variable.
3635 (aarch64_emit_ops): New target function, return
3636 &aarch64_emit_ops_impl.
3637 (struct linux_target_ops): Install it.
3639 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3641 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3642 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3644 * linux-aarch64-ipa.c: New file.
3645 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3647 (aarch64_get_thread_area): New target method.
3648 (extract_signed_bitfield): New helper function.
3649 (aarch64_decode_ldr_literal): New function.
3650 (enum aarch64_opcodes): New enum.
3651 (struct aarch64_register): New struct.
3652 (struct aarch64_operand): New struct.
3653 (x0): New static global.
3662 (aarch64_register): New helper function.
3663 (register_operand): Likewise.
3664 (immediate_operand): Likewise.
3665 (struct aarch64_memory_operand): New struct.
3666 (offset_memory_operand): New helper function.
3667 (preindex_memory_operand): Likewise.
3668 (enum aarch64_system_control_registers): New enum.
3669 (ENCODE): New macro.
3670 (emit_insn): New helper function.
3671 (emit_b): New function.
3672 (emit_bcond): Likewise.
3673 (emit_cb): Likewise.
3674 (emit_tb): Likewise.
3675 (emit_blr): Likewise.
3676 (emit_stp): Likewise.
3677 (emit_ldp_q_offset): Likewise.
3678 (emit_stp_q_offset): Likewise.
3679 (emit_load_store): Likewise.
3680 (emit_ldr): Likewise.
3681 (emit_ldrsw): Likewise.
3682 (emit_str): Likewise.
3683 (emit_ldaxr): Likewise.
3684 (emit_stxr): Likewise.
3685 (emit_stlr): Likewise.
3686 (emit_data_processing_reg): Likewise.
3687 (emit_data_processing): Likewise.
3688 (emit_add): Likewise.
3689 (emit_sub): Likewise.
3690 (emit_mov): Likewise.
3691 (emit_movk): Likewise.
3692 (emit_mov_addr): Likewise.
3693 (emit_mrs): Likewise.
3694 (emit_msr): Likewise.
3695 (emit_sevl): Likewise.
3696 (emit_wfe): Likewise.
3697 (append_insns): Likewise.
3698 (can_encode_int32_in): New helper function.
3699 (aarch64_relocate_instruction): New function.
3700 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3701 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3702 (struct linux_target_ops): Install aarch64_get_thread_area,
3703 aarch64_install_fast_tracepoint_jump_pad and
3704 aarch64_get_min_fast_tracepoint_insn_len.
3706 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3708 * Makefile.in (aarch64-insn.o): New rule.
3709 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3711 2015-09-21 Yao Qi <yao.qi@linaro.org>
3713 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3715 2015-09-21 Yao Qi <yao.qi@linaro.org>
3717 * tracepoint.c (max_jump_pad_size): Remove.
3719 2015-09-18 Yao Qi <yao.qi@linaro.org>
3721 * linux-aarch64-low.c: Don't include sys/uio.h.
3722 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3724 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3726 * tracepoint.c (eval_result_type): Change prototype.
3727 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3729 2015-09-15 Pedro Alves <palves@redhat.com>
3731 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3732 Check whether to report exec events instead of checking whether
3733 multiprocess is enabled.
3735 2015-09-15 Pedro Alves <palves@redhat.com>
3738 * remote-utils.c (prepare_resume_reply): Merge
3739 TARGET_WAITKIND_VFORK_DONE switch case with the
3740 TARGET_WAITKIND_FORKED case.
3742 2015-09-15 Yao Qi <yao.qi@linaro.org>
3744 * server.c (handle_query): Check string comparison using
3745 "else if" instead of "if".
3747 2015-09-15 Yao Qi <yao.qi@linaro.org>
3749 * server.c (vCont_supported): New global variable.
3750 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3751 matches. Append ";vContSupported+" to own_buf.
3752 (handle_v_requests): Append ";s;S" to own_buf if target supports
3753 hardware single step or vCont_supported is false.
3754 (capture_main): Set vCont_supported to zero.
3756 2015-09-15 Yao Qi <yao.qi@linaro.org>
3758 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3760 (linux_supports_hardware_single_step): ... New function.
3761 (linux_target_ops): Update.
3762 * lynx-low.c (lynx_target_ops): Set field
3763 supports_hardware_single_step to target_can_do_hardware_single_step.
3764 * nto-low.c (nto_target_ops): Likewise.
3765 * spu-low.c (spu_target_ops): Likewise.
3766 * win32-low.c (win32_target_ops): Likewise.
3767 * target.c (target_can_do_hardware_single_step): New function.
3768 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3769 Remove. <supports_hardware_single_step>: New field.
3770 (target_supports_conditional_breakpoints): Remove.
3771 (target_supports_hardware_single_step): New macro.
3772 (target_can_do_hardware_single_step): Declare.
3773 * server.c (handle_query): Use target_supports_hardware_single_step
3774 instead of target_supports_conditional_breakpoints.
3776 2015-09-15 Yao Qi <yao.qi@linaro.org>
3778 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3780 (struct linux_target_ops the_low_target): Install
3781 aarch64_linux_siginfo_fixup.
3783 2015-09-11 Don Breazeal <donb@codesourcery.com>
3784 Luis Machado <lgustavo@codesourcery.com>
3786 * linux-low.c (linux_mourn): Static declaration.
3787 (linux_arch_setup): Move in front of
3788 handle_extended_wait.
3789 (linux_arch_setup_thread): New function.
3790 (handle_extended_wait): Handle exec events. Call
3791 linux_arch_setup_thread. Make event_lwp argument a
3792 pointer-to-a-pointer.
3793 (check_zombie_leaders): Do not check stopped threads.
3794 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3795 (linux_low_filter_event): Add lwp and thread for exec'ing
3796 non-leader thread if leader thread has been deleted.
3797 Refactor code into linux_arch_setup_thread and call it.
3798 Pass child lwp pointer by reference to handle_extended_wait.
3799 (linux_wait_for_event_filtered): Update comment.
3800 (linux_wait_1): Prevent clobbering exec event status.
3801 (linux_supports_exec_events): New function.
3802 (linux_target_ops) <supports_exec_events>: Initialize new member.
3803 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3805 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3806 * server.c (report_exec_events): New global variable.
3807 (handle_query): Handle qSupported query for exec-events feature.
3808 (captured_main): Initialize report_exec_events.
3809 * server.h (report_exec_events): Declare new global variable.
3810 * target.h (struct target_ops) <supports_exec_events>: New
3812 (target_supports_exec_events): New macro.
3813 * win32-low.c (win32_target_ops) <supports_exec_events>:
3814 Initialize new member.
3816 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3818 * linux-low.c (linux_low_enable_btrace): Remove.
3819 (linux_target_ops): Replace linux_low_enable_btrace with
3820 linux_enable_btrace.
3822 2015-09-03 Yao Qi <yao.qi@linaro.org>
3824 * linux-aarch64-low.c (aarch64_insert_point): Call
3825 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3828 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3830 * linux-low.c (check_stopped_by_breakpoint): Use
3831 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3833 2015-08-27 Pedro Alves <palves@redhat.com>
3835 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3837 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3839 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3840 the XNEW-family equivalent.
3841 (compile_bytecodes): Likewise.
3842 * dll.c (loaded_dll): Likewise.
3843 * event-loop.c (append_callback_event): Likewise.
3844 (create_file_handler): Likewise.
3845 (create_file_event): Likewise.
3846 * hostio.c (handle_open): Likewise.
3847 * inferiors.c (add_thread): Likewise.
3848 (add_process): Likewise.
3849 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3850 * linux-arm-low.c (arm_new_process): Likewise.
3851 (arm_new_thread): Likewise.
3852 * linux-low.c (add_to_pid_list): Likewise.
3853 (linux_add_process): Likewise.
3854 (handle_extended_wait): Likewise.
3855 (add_lwp): Likewise.
3856 (enqueue_one_deferred_signal): Likewise.
3857 (enqueue_pending_signal): Likewise.
3858 (linux_resume_one_lwp_throw): Likewise.
3859 (linux_resume_one_thread): Likewise.
3860 (linux_read_memory): Likewise.
3861 (linux_write_memory): Likewise.
3862 * linux-mips-low.c (mips_linux_new_process): Likewise.
3863 (mips_linux_new_thread): Likewise.
3864 (mips_add_watchpoint): Likewise.
3865 * linux-x86-low.c (initialize_low_arch): Likewise.
3866 * lynx-low.c (lynx_add_process): Likewise.
3867 * mem-break.c (set_raw_breakpoint_at): Likewise.
3868 (set_breakpoint): Likewise.
3869 (add_condition_to_breakpoint): Likewise.
3870 (add_commands_to_breakpoint): Likewise.
3871 (clone_agent_expr): Likewise.
3872 (clone_one_breakpoint): Likewise.
3873 * regcache.c (new_register_cache): Likewise.
3874 * remote-utils.c (look_up_one_symbol): Likewise.
3875 * server.c (queue_stop_reply): Likewise.
3876 (start_inferior): Likewise.
3877 (queue_stop_reply_callback): Likewise.
3878 (handle_target_event): Likewise.
3879 * spu-low.c (fetch_ppc_memory): Likewise.
3880 (store_ppc_memory): Likewise.
3881 * target.c (set_target_ops): Likewise.
3882 * thread-db.c (thread_db_load_search): Likewise.
3883 (try_thread_db_load_1): Likewise.
3884 * tracepoint.c (add_tracepoint): Likewise.
3885 (add_tracepoint_action): Likewise.
3886 (create_trace_state_variable): Likewise.
3887 (cmd_qtdpsrc): Likewise.
3888 (cmd_qtro): Likewise.
3889 (add_while_stepping_state): Likewise.
3890 * win32-low.c (child_add_thread): Likewise.
3891 (get_image_name): Likewise.
3893 2015-08-25 Yao Qi <yao.qi@linaro.org>
3895 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3897 2015-08-25 Yao Qi <yao.qi@linaro.org>
3899 * Makefile.in (aarch64-linux.o): New rule.
3900 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3902 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3903 (aarch64_init_debug_reg_state): Make it extern.
3904 (aarch64_linux_prepare_to_resume): Remove.
3906 2015-08-25 Yao Qi <yao.qi@linaro.org>
3908 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3909 lwp_arch_private_info and ptid_of_lwp.
3911 2015-08-25 Yao Qi <yao.qi@linaro.org>
3913 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3914 Find proc_info by find_process_pid. All callers updated.
3916 2015-08-25 Yao Qi <yao.qi@linaro.org>
3918 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3920 (debug_reg_change_callback): Remove.
3921 (aarch64_notify_debug_reg_change): Remove.
3923 2015-08-25 Yao Qi <yao.qi@linaro.org>
3925 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3926 Call current_lwp_ptid.
3928 2015-08-25 Yao Qi <yao.qi@linaro.org>
3930 * linux-aarch64-low.c (debug_reg_change_callback): Use
3933 2015-08-25 Yao Qi <yao.qi@linaro.org>
3935 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3937 2015-08-25 Yao Qi <yao.qi@linaro.org>
3939 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3941 2015-08-25 Yao Qi <yao.qi@linaro.org>
3943 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3946 2015-08-25 Yao Qi <yao.qi@linaro.org>
3948 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3950 (debug_reg_change_callback): Remove argument entry and add argument
3951 lwp. Remove local variable thread. Don't print thread id in the
3952 debugging output. Don't check whether pid of thread equals to pid.
3953 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3954 iterate_over_lwps instead find_inferior.
3956 2015-08-24 Pedro Alves <palves@redhat.com>
3958 * inferiors.c (get_first_process): New function.
3959 * inferiors.h (get_first_process): New declaration.
3960 * remote-utils.c (read_ptid): Default to the first process in the
3961 list, instead of to the current thread's process.
3963 2015-08-24 Pedro Alves <palves@redhat.com>
3965 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3966 * event-loop.c: Likewise.
3967 * remote-utils.c: Likewise.
3968 * tracepoint.c: Likewise.
3970 2015-08-24 Pedro Alves <palves@redhat.com>
3972 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3975 2015-08-21 Pedro Alves <palves@redhat.com>
3977 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3978 instead of literal 1.
3980 2015-08-21 Pedro Alves <palves@redhat.com>
3982 * tdesc.c (default_description): Explicitly zero-initialize.
3984 2015-08-21 Pedro Alves <palves@redhat.com>
3987 * inferiors.c (remove_thread): Discard any pending stop reply for
3989 * server.c (remove_all_on_match_pid): Rename to ...
3990 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3992 (discard_queued_stop_replies): Change parameter to a ptid. Now
3994 (handle_v_kill, kill_inferior_callback, captured_main)
3995 (process_serial_event): Adjust.
3996 * server.h (discard_queued_stop_replies): Declare.
3998 2015-08-21 Pedro Alves <palves@redhat.com>
4000 * linux-low.c (wait_for_sigstop): Always switch to no thread
4001 selected if the previously current thread dies.
4002 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4003 process instead of the current thread's.
4004 * remote-utils.c (input_interrupt): Don't check if there's no
4006 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4007 current thread to the general thread fails, error out.
4008 (handle_qxfer_auxv, handle_qxfer_libraries)
4009 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4010 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4011 (handle_query): Check if there's a thread selected instead of
4012 checking whether there's any thread in the thread list.
4013 (handle_qxfer_threads, handle_qxfer_btrace)
4014 (handle_qxfer_btrace_conf): Don't error out early if there's no
4015 thread in the thread list.
4016 (handle_v_cont, myresume): Don't set the current thread to the
4018 (process_serial_event) <Hg handling>: Also set thread_id if the
4019 previous general thread is still alive.
4020 (process_serial_event) <g/G handling>: If setting the current
4021 thread to the general thread fails, error out.
4022 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4023 thread's lwp instead of the current thread's.
4024 * target.c (set_desired_thread): If the desired thread was not
4025 found, leave the current thread pointing to NULL. Return an int
4026 (boolean) indicating success.
4027 * target.h (set_desired_thread): Change return type to int.
4029 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4031 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4032 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4034 (ps_get_thread_area): New function.
4036 2015-08-19 Gary Benson <gbenson@redhat.com>
4038 * hostio.c (handle_pread): Do not attempt to read more data
4039 than hostio_reply_with_data can fit in a packet.
4041 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4043 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4045 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4047 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4049 2015-08-06 Pedro Alves <palves@redhat.com>
4051 * tracepoint.c (expr_eval_result): Now an int.
4053 2015-08-06 Pedro Alves <palves@redhat.com>
4055 * gdbthread.h (struct regcache): Forward declare.
4056 (struct thread_info) <regcache_data>: Now a struct regcache
4058 * inferiors.c (inferior_regcache_data)
4059 (set_inferior_regcache_data): Now work with struct regcache
4061 * inferiors.h (struct regcache): Forward declare.
4062 (inferior_regcache_data, set_inferior_regcache_data): Now work
4063 with struct regcache pointers.
4064 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4065 (free_register_cache_thread): Remove struct regcache pointer
4068 2015-08-06 Pedro Alves <palves@redhat.com>
4070 * server.c (captured_main): On error, print the exception message
4071 to stderr, and if run_once is set, throw a quit.
4073 2015-08-06 Pedro Alves <palves@redhat.com>
4075 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4078 2015-08-06 Pedro Alves <palves@redhat.com>
4080 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4081 reading beyond the passed in buffer length.
4083 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4085 * tracepoint.c (symbol_list) <required>: Remove.
4087 2015-08-06 Pedro Alves <palves@redhat.com>
4089 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4090 count if stopping and suspending threads.
4091 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4092 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4093 (linux_detach): Complete an ongoing step-over.
4094 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4096 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4097 (linux_wait_1): If passing a signal to the inferior after
4098 finishing a step-over, unsuspend and re-resume all lwps. If we
4099 see a single-step event but the thread should be continuing, don't
4100 pass the trap to gdb.
4101 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4102 internal_error instead of gdb_assert.
4103 (enqueue_pending_signal): New function.
4104 (check_ptrace_stopped_lwp_gone): Add debug output.
4105 (start_step_over): Use internal_error instead of gdb_assert.
4106 (complete_ongoing_step_over): New function.
4107 (linux_resume_one_thread): Don't resume a suspended thread.
4108 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4111 2015-08-06 Pedro Alves <palves@redhat.com>
4113 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4114 (linux_thread_alive): Use lwp_is_marked_dead.
4115 (extended_event_reported): Delete.
4116 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4117 instead of extended_event_reported.
4118 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4120 (lwp_is_marked_dead): New function.
4121 (lwp_running): Use lwp_is_marked_dead.
4122 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4125 2015-08-06 Pedro Alves <palves@redhat.com>
4127 * linux-low.c (linux_wait_1): Move fork event output out of the
4128 !report_to_gdb check. Pass event_child->waitstatus to
4129 target_waitstatus_to_string instead of ourstatus.
4131 2015-08-04 Yao Qi <yao.qi@linaro.org>
4133 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4134 if current_thread is 32 bit.
4136 2015-08-04 Yao Qi <yao.qi@linaro.org>
4138 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4139 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4140 * server.c (extended_protocol): Remove "static".
4141 * server.h (extended_protocol): Declare it.
4143 2015-08-04 Yao Qi <yao.qi@linaro.org>
4145 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4146 both aarch64 and aarch32.
4147 (aarch64_set_pc): Likewise.
4149 2015-08-04 Yao Qi <yao.qi@linaro.org>
4151 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4152 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4153 arm-with-neon.xml to srv_xmlfiles.
4154 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4155 (is_64bit_tdesc): New function.
4156 (aarch64_linux_read_description): New function.
4157 (aarch64_arch_setup): Call aarch64_linux_read_description.
4158 (regs_info): Rename to regs_info_aarch64.
4159 (aarch64_regs_info): Return right regs_info.
4160 (initialize_low_arch): Call initialize_low_arch_aarch32.
4162 2015-08-04 Yao Qi <yao.qi@linaro.org>
4164 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4165 * linux-aarch32-low.c: New file.
4166 * linux-aarch32-low.h: New file.
4167 * linux-arm-low.c (arm_fill_gregset): Move it to
4168 linux-aarch32-low.c.
4169 (arm_store_gregset): Likewise.
4170 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4171 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4172 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4173 (regs_info): Rename to regs_info_arm.
4174 (arm_regs_info): Return regs_info_aarch32 if
4175 have_ptrace_getregset is 1 and target description is
4176 arm_with_neon or arm_with_vfpv3.
4177 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4178 Call initialize_low_arch_aarch32 instead.
4180 2015-08-04 Yao Qi <yao.qi@linaro.org>
4182 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4183 * linux-low.c: ... here.
4184 * linux-low.h (have_ptrace_getregset): Declare it.
4186 2015-08-04 Pedro Alves <palves@redhat.com>
4188 * thread-db.c (struct thread_db): Use new typedefs.
4189 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4191 (disable_thread_event_reporting): Cast result of dlsym to
4192 destination function pointer type.
4193 (thread_db_mourn): Use td_ta_delete_ftype.
4195 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4197 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4199 (CDX_BREAKPOINT): Define for R2.
4200 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4201 (the_low_target): Add comments.
4203 2015-07-30 Yao Qi <yao.qi@linaro.org>
4205 * linux-arm-low.c (arm_hwcap): Remove it.
4206 (arm_read_description): New local variable arm_hwcap. Don't
4207 set arm_hwcap to zero.
4209 2015-07-30 Yao Qi <yao.qi@linaro.org>
4211 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4212 Use regcache->tdesc instead.
4213 (arm_store_wmmxregset): Likewise.
4214 (arm_fill_vfpregset): Likewise.
4215 (arm_store_vfpregset): Likewise.
4217 2015-07-30 Yao Qi <yao.qi@linaro.org>
4219 * linux-arm-low.c: Include arch/arm.h.
4220 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4221 (arm_store_gregset): Likewise.
4223 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4225 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4226 ptrace's 4th parameter.
4228 2015-07-27 Yao Qi <yao.qi@linaro.org>
4230 * configure.srv (case aarch64*-*-linux*): Don't set
4233 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4235 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4237 * linux-arm-low.c: Likewise.
4238 * linux-cris-low.c: Likewise.
4239 * linux-crisv32-low.c: Likewise.
4240 * linux-low.c: Likewise.
4241 * linux-m68k-low.c: Likewise.
4242 * linux-mips-low.c: Likewise.
4243 * linux-nios2-low.c: Likewise.
4244 * linux-s390-low.c: Likewise.
4245 * linux-sparc-low.c: Likewise.
4246 * linux-tic6x-low.c: Likewise.
4247 * linux-tile-low.c: Likewise.
4248 * linux-x86-low.c: Likewise.
4250 2015-07-24 Pedro Alves <palves@redhat.com>
4252 * config.in: Regenerate.
4253 * configure: Regenerate.
4255 2015-07-24 Pedro Alves <palves@redhat.com>
4257 * acinclude.m4: Include ../ptrace.m4.
4258 * configure.ac: Call GDB_AC_PTRACE.
4259 * config.in, configure: Regenerate.
4261 2015-07-24 Yao Qi <yao.qi@linaro.org>
4263 * linux-low.c (linux_create_inferior): Remove setting to
4264 proc->priv->new_inferior.
4265 (linux_attach): Likewise.
4266 (linux_low_filter_event): Likewise.
4267 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4269 2015-07-24 Yao Qi <yao.qi@linaro.org>
4271 * linux-low.c (linux_arch_setup): New function.
4272 (linux_low_filter_event): If proc->tdesc is NULL and
4273 proc->attached is true, call the_low_target.arch_setup.
4274 Otherwise, keep status pending, and return.
4275 (linux_resume_one_lwp_throw): Don't call get_pc if
4276 thread->while_stepping isn't NULL. Don't call
4277 get_thread_regcache if proc->tdesc is NULL.
4278 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4279 (linux_target_ops): Install arch_setup.
4280 * server.c (start_inferior): Call the_target->arch_setup.
4281 * target.h (struct target_ops) <arch_setup>: New field.
4282 (target_arch_setup): New marco.
4283 * lynx-low.c (lynx_target_ops): Update.
4284 * nto-low.c (nto_target_ops): Update.
4285 * spu-low.c (spu_target_ops): Update.
4286 * win32-low.c (win32_target_ops): Update.
4288 2015-07-24 Yao Qi <yao.qi@linaro.org>
4290 * linux-low.c (linux_add_process): Don't set
4291 proc->priv->new_inferior.
4292 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4293 (linux_attach): Likewise.
4295 2015-07-24 Yao Qi <yao.qi@linaro.org>
4297 * server.c (start_inferior): Code refactor.
4299 2015-07-24 Yao Qi <yao.qi@linaro.org>
4301 * server.c (process_serial_event): Set general_thread.
4303 2015-07-21 Yao Qi <yao.qi@linaro.org>
4305 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4306 aarch64_linux_get_debug_reg_capacity.
4308 2015-07-17 Yao Qi <yao.qi@linaro.org>
4310 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4311 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4312 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4313 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4314 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4315 (AARCH64_HWP_ALIGNMENT): Likewise.
4316 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4317 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4318 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4319 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4320 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4321 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4322 (struct aarch64_debug_reg_state): Likewise.
4323 (struct arch_lwp_info): Likewise.
4324 (aarch64_align_watchpoint): Likewise.
4325 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4326 (aarch64_watchpoint_length): Likewise.
4327 (aarch64_point_encode_ctrl_reg): Likewise
4328 (aarch64_point_is_aligned): Likewise.
4329 (aarch64_align_watchpoint): Likewise.
4330 (aarch64_linux_set_debug_regs):
4331 (aarch64_dr_state_insert_one_point): Likewise.
4332 (aarch64_dr_state_remove_one_point): Likewise.
4333 (aarch64_handle_breakpoint): Likewise.
4334 (aarch64_handle_aligned_watchpoint): Likewise.
4335 (aarch64_handle_unaligned_watchpoint): Likewise.
4336 (aarch64_handle_watchpoint): Likewise.
4338 2015-07-17 Yao Qi <yao.qi@linaro.org>
4340 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4341 and don't aarch64_get_debug_reg_state. All callers update.
4342 (aarch64_handle_aligned_watchpoint): Likewise.
4343 (aarch64_handle_unaligned_watchpoint): Likewise.
4344 (aarch64_handle_watchpoint): Likewise.
4345 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4346 (aarch64_remove_point): Likewise.
4348 2015-07-17 Yao Qi <yao.qi@linaro.org>
4350 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4352 (aarch64_handle_unaligned_watchpoint): Likewise.
4354 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4356 Revert the previous 3 commits:
4357 Move gdb_regex* to common/
4358 Move linux_find_memory_regions_full & co.
4359 gdbserver build-id attribute generator
4361 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4362 Jan Kratochvil <jan.kratochvil@redhat.com>
4364 gdbserver build-id attribute generator.
4365 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4366 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4367 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4369 (get_dynamic): Use find_pdhr to traverse program headers.
4370 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4371 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4372 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4373 (get_hex_build_id): New.
4374 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4375 to reply XML document.
4377 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4378 Jan Kratochvil <jan.kratochvil@redhat.com>
4380 * target.c: Include target/target-utils.h and fcntl.h.
4381 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4382 (target_fileio_read_stralloc): New functions.
4384 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4386 * Makefile.in (OBS): Add gdb_regex.o.
4388 * config.in: Rebuilt.
4389 * configure: Rebuilt.
4391 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4392 Jan Kratochvil <jan.kratochvil@redhat.com>
4394 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4395 * Makefile.in (OBS): Add target-utils.o.
4396 (linux-maps.o, target-utils.o): New.
4397 * configure.srv (srv_linux_obj): Add linux-maps.o.
4399 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4401 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4403 (the_low_target): Install it.
4405 2015-07-14 Pedro Alves <palves@redhat.com>
4407 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4408 Instead, ignore ECHILD, and throw an error for other errnos.
4410 2015-07-10 Pedro Alves <palves@redhat.com>
4412 * event-loop.c (struct callback_event) <data>: Change type to
4413 gdb_client_data instance instead of gdb_client_data pointer.
4414 (append_callback_event): Adjust.
4416 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4418 * linux-aarch64-low.c: Add comments for each linux_target_ops
4419 method. Remove comments already covered in target_ops and
4420 linux_target_ops definitions.
4421 (the_low_target): Add comments for each unimplemented method.
4423 2015-07-09 Yao Qi <yao.qi@linaro.org>
4425 * linux-aarch64-low.c (aarch64_regmap): Remove.
4426 (aarch64_usrregs_info): Remove.
4427 (regs_info): Set field usrregs to NULL.
4429 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4431 * linux-low.c: Include "rsp-low.h"
4432 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4433 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4434 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4435 (handle_btrace_enable_pt): New.
4436 (handle_btrace_general_set): Support "pt".
4437 (handle_btrace_conf_general_set): Support "pt:size".
4439 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4441 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4444 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4446 * linux-aarch64-low.c: Remove comment about endianness.
4447 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4448 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4451 2015-06-24 Gary Benson <gbenson@redhat.com>
4453 * linux-i386-ipa.c (stdint.h): Do not include.
4454 * lynx-i386-low.c (stdint.h): Likewise.
4455 * lynx-ppc-low.c (stdint.h): Likewise.
4456 * mem-break.c (stdint.h): Likewise.
4457 * thread-db.c (stdint.h): Likewise.
4458 * tracepoint.c (stdint.h): Likewise.
4459 * win32-low.c (stdint.h): Likewise.
4461 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4463 * server.c (write_qxfer_response): Update call to
4464 remote_escape_output.
4466 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4467 Jan Kratochvil <jan.kratochvil@redhat.com>
4469 Merge multiple hex conversions.
4470 * gdbreplay.c (tohex): Rename to 'fromhex'.
4471 (logchar): Use fromhex.
4473 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4475 * server.c (handle_qxfer_libraries): Set `version' attribute for
4478 2015-06-10 Gary Benson <gbenson@redhat.com>
4480 * target.h (struct target_ops) <multifs_open>: New field.
4481 <multifs_unlink>: Likewise.
4482 <multifs_readlink>: Likewise.
4483 * linux-low.c (nat/linux-namespaces.h): New include.
4484 (linux_target_ops): Initialize the_target->multifs_open,
4485 the_target->multifs_unlink and the_target->multifs_readlink.
4486 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4487 * hostio.c (hostio_fs_pid): New static variable.
4488 (hostio_handle_new_gdb_connection): New function.
4489 (handle_setfs): Likewise.
4490 (handle_open): Use the_target->multifs_open as appropriate.
4491 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4492 (handle_readlink): Use the_target->multifs_readlink as
4494 (handle_vFile): Handle vFile:setfs packets.
4495 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4496 after target_handle_new_gdb_connection.
4498 2015-06-10 Gary Benson <gbenson@redhat.com>
4500 * configure.ac (AC_CHECK_FUNCS): Add setns.
4501 * config.in: Regenerate.
4502 * configure: Likewise.
4503 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4504 (linux-namespaces.o): New rule.
4505 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4507 2015-06-09 Gary Benson <gbenson@redhat.com>
4509 * hostio.c (handle_open): Process mode argument with
4510 fileio_to_host_mode.
4512 2015-06-01 Yao Qi <yao.qi@linaro.org>
4514 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4515 * linux-x86-low.c: Likewise.
4517 2015-05-28 Don Breazeal <donb@codesourcery.com>
4519 * linux-low.c (handle_extended_wait): Initialize
4520 thread_info.last_resume_kind for new fork children.
4522 2015-05-15 Pedro Alves <palves@redhat.com>
4524 * target.h (target_handle_new_gdb_connection): Rewrite using if
4525 wrapped in do/while.
4527 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4529 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4530 * configure, config.in: Regenerate.
4531 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4534 2015-05-12 Don Breazeal <donb@codesourcery.com>
4536 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4537 PTRACE_EVENT_VFORK_DONE.
4538 (linux_low_ptrace_options, extended_event_reported): Add vfork
4540 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4541 and "vforkdone" for RSP 'T' Stop Reply Packet.
4542 * server.h (report_vfork_events): Declare
4545 2015-05-12 Don Breazeal <donb@codesourcery.com>
4547 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4548 (the_low_target) <new_fork>: Initialize new member.
4549 * linux-arm-low.c (arm_new_fork): New function.
4550 (the_low_target) <new_fork>: Initialize new member.
4551 * linux-low.c (handle_extended_wait): Call new target function
4553 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4554 * linux-mips-low.c (mips_add_watchpoint): New function
4555 extracted from mips_insert_point.
4556 (the_low_target) <new_fork>: Initialize new member.
4557 (mips_linux_new_fork): New function.
4558 (mips_insert_point): Call mips_add_watchpoint.
4559 * linux-x86-low.c (x86_linux_new_fork): New function.
4560 (the_low_target) <new_fork>: Initialize new member.
4562 2015-05-12 Don Breazeal <donb@codesourcery.com>
4564 * linux-low.c (handle_extended_wait): Implement return value,
4565 rename argument 'event_child' to 'event_lwp', handle
4566 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4567 (linux_low_ptrace_options): New function.
4568 (linux_low_filter_event): Call linux_low_ptrace_options,
4569 use different argument fo linux_enable_event_reporting,
4570 use return value from handle_extended_wait.
4571 (extended_event_reported): New function.
4572 (linux_wait_1): Call extended_event_reported and set
4573 status to report fork events.
4574 (linux_write_memory): Add pid to debug message.
4575 (reset_lwp_ptrace_options_callback): New function.
4576 (linux_handle_new_gdb_connection): New function.
4577 (linux_target_ops): Initialize new structure member.
4578 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4579 * lynx-low.c: Initialize new structure member.
4580 * remote-utils.c (prepare_resume_reply): Implement stop reason
4581 "fork" for "T" stop message.
4582 * server.c (handle_query): Call handle_new_gdb_connection.
4583 * server.h (report_fork_events): Declare global flag.
4584 * target.h (struct target_ops) <handle_new_gdb_connection>:
4586 (target_handle_new_gdb_connection): New macro.
4587 * win32-low.c: Initialize new structure member.
4589 2015-05-12 Don Breazeal <donb@codesourcery.com>
4591 * mem-break.c (APPEND_TO_LIST): Define macro.
4592 (clone_agent_expr): New function.
4593 (clone_one_breakpoint): New function.
4594 (clone_all_breakpoints): New function.
4595 * mem-break.h: Declare new functions.
4597 2015-05-12 Don Breazeal <donb@codesourcery.com>
4599 * linux-low.c (linux_supports_fork_events): New function.
4600 (linux_supports_vfork_events): New function.
4601 (linux_target_ops): Initialize new structure members.
4602 (initialize_low): Call linux_check_ptrace_features.
4603 * lynx-low.c (lynx_target_ops): Initialize new structure
4605 * server.c (report_fork_events, report_vfork_events):
4607 (handle_query): Add new features to qSupported packet and
4609 (captured_main): Initialize new global variables.
4610 * target.h (struct target_ops) <supports_fork_events>:
4612 <supports_vfork_events>: New member.
4613 (target_supports_fork_events): New macro.
4614 (target_supports_vfork_events): New macro.
4615 * win32-low.c (win32_target_ops): Initialize new structure
4618 2015-05-12 Gary Benson <gbenson@redhat.com>
4620 * server.c (handle_qxfer_exec_file): Use current process
4623 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4625 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4626 Remove HAVE_PTRACE_GETREGS conditionals.
4627 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4628 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4630 2015-05-08 Yao Qi <yao.qi@linaro.org>
4632 * linux-low.c (linux_supports_conditional_breakpoints): New
4634 (linux_target_ops): Install new target method.
4635 * lynx-low.c (lynx_target_ops): Install NULL hook for
4636 supports_conditional_breakpoints.
4637 * nto-low.c (nto_target_ops): Likewise.
4638 * spu-low.c (spu_target_ops): Likewise.
4639 * win32-low.c (win32_target_ops): Likewise.
4640 * server.c (handle_query): Check
4641 target_supports_conditional_breakpoints.
4642 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4644 (target_supports_conditional_breakpoints): New macro.
4646 2015-05-06 Pedro Alves <palves@redhat.com>
4649 * server.c (start_inferior): If the process exits, mourn it.
4651 2015-04-21 Gary Benson <gbenson@redhat.com>
4653 * hostio.c (fileio_open_flags_to_host): Factored out to
4654 fileio_to_host_openflags in common/fileio.c. Single use
4657 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4659 * linux-xtensa-low.c (xtensa_fill_gregset)
4660 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4663 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4665 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4666 (regs_info): Replace usrregs pointer with NULL.
4668 2015-04-17 Gary Benson <gbenson@redhat.com>
4670 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4671 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4672 * server.c (handle_qxfer_exec_file): New function.
4673 (qxfer_packets): Add exec-file entry.
4674 (handle_query): Report qXfer:exec-file:read as supported packet.
4676 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4678 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4680 2015-04-09 Gary Benson <gbenson@redhat.com>
4682 * hostio-errno.c (errno_to_fileio_error): Remove function.
4683 Update caller to use remote_fileio_to_fio_error.
4685 2015-04-09 Yao Qi <yao.qi@linaro.org>
4687 * linux-low.c (linux_insert_point): Call
4688 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4689 (linux_remove_point): Call remove_memory_breakpoint if type is
4691 * linux-x86-low.c (x86_insert_point): Don't call
4692 insert_memory_breakpoint.
4693 (x86_remove_point): Don't call remove_memory_breakpoint.
4695 2015-04-01 Pedro Alves <palves@redhat.com>
4696 Cleber Rosa <crosa@redhat.com>
4698 * server.c (gdbserver_usage): Reorganize and extend the usage
4701 2015-03-24 Pedro Alves <palves@redhat.com>
4703 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4704 output. Also dump TRAP_TRACE.
4705 (linux_low_filter_event): In debug output, distinguish a
4706 resume_stop SIGSTOP from a delayed SIGSTOP.
4708 2015-03-24 Gary Benson <gbenson@redhat.com>
4710 * linux-x86-low.c (x86_linux_new_thread): Moved to
4712 (x86_linux_prepare_to_resume): Likewise.
4714 2015-03-24 Gary Benson <gbenson@redhat.com>
4716 * Makefile.in (x86-linux-dregs.o): New rule.
4717 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4718 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4719 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4720 (x86_linux_dr_get): Likewise.
4721 (x86_linux_dr_set): Likewise.
4722 (update_debug_registers_callback): Likewise.
4723 (x86_linux_dr_set_addr): Likewise.
4724 (x86_linux_dr_get_addr): Likewise.
4725 (x86_linux_dr_set_control): Likewise.
4726 (x86_linux_dr_get_control): Likewise.
4727 (x86_linux_dr_get_status): Likewise.
4728 (x86_linux_update_debug_registers): Likewise.
4730 2015-03-24 Gary Benson <gbenson@redhat.com>
4732 * linux-x86-low.c (x86_linux_update_debug_registers):
4733 New function, factored out from...
4734 (x86_linux_prepare_to_resume): ...this.
4736 2015-03-24 Gary Benson <gbenson@redhat.com>
4738 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4739 (x86_linux_dr_set): Likewise.
4740 (update_debug_registers_callback): Likewise.
4741 (x86_linux_dr_set_addr): Likewise.
4742 (x86_linux_dr_get_addr): Likewise.
4743 (x86_linux_dr_set_control): Likewise.
4744 (x86_linux_dr_get_control): Likewise.
4745 (x86_linux_dr_get_status): Likewise.
4746 (x86_linux_prepare_to_resume): Likewise.
4748 2015-03-24 Gary Benson <gbenson@redhat.com>
4750 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4751 Use perror_with_name. Pass string through gettext.
4752 (x86_linux_dr_set): Likewise.
4754 2015-03-24 Gary Benson <gbenson@redhat.com>
4756 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4757 (x86_linux_dr_set_addr): ...this.
4758 (x86_dr_low_get_addr): Rename to...
4759 (x86_linux_dr_get_addr): ...this.
4760 (x86_dr_low_set_control): Rename to...
4761 (x86_linux_dr_set_control): ...this.
4762 (x86_dr_low_get_control): Rename to...
4763 (x86_linux_dr_get_control): ...this.
4764 (x86_dr_low_get_status): Rename to...
4765 (x86_linux_dr_get_status): ...this.
4766 (x86_dr_low): Update with new function names.
4768 2015-03-24 Gary Benson <gbenson@redhat.com>
4770 * Makefile.in (x86-linux.o): New rule.
4771 * configure.srv: Add x86-linux.o to relevant targets.
4772 * linux-low.c (lwp_set_arch_private_info): New function.
4773 (lwp_arch_private_info): Likewise.
4774 * linux-x86-low.c: Include nat/x86-linux.h.
4775 (arch_lwp_info): Removed structure.
4776 (update_debug_registers_callback):
4777 Use lwp_set_debug_registers_changed.
4778 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4779 and lwp_set_debug_registers_changed.
4780 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4782 2015-03-24 Gary Benson <gbenson@redhat.com>
4784 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4785 * linux-arm-low.c (arm_new_thread): Likewise.
4786 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4787 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4788 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4789 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4791 2015-03-24 Gary Benson <gbenson@redhat.com>
4793 * linux-low.c (ptid_of_lwp): New function.
4794 (lwp_is_stopped): Likewise.
4795 (lwp_stop_reason): Likewise.
4796 * linux-x86-low.c (update_debug_registers_callback):
4798 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4801 2015-03-24 Gary Benson <gbenson@redhat.com>
4803 * linux-low.h (linux_stop_lwp): Remove declaration.
4805 2015-03-24 Gary Benson <gbenson@redhat.com>
4807 * linux-low.h: Include nat/linux-nat.h.
4808 * linux-low.c (iterate_over_lwps_args): New structure.
4809 (iterate_over_lwps_filter): New function.
4810 (iterate_over_lwps): Likewise.
4811 * linux-x86-low.c (update_debug_registers_callback):
4812 Update signature to what iterate_over_lwps expects.
4813 Remove PID check that iterate_over_lwps now performs.
4814 (x86_dr_low_set_addr): Use iterate_over_lwps.
4815 (x86_dr_low_set_control): Likewise.
4817 2015-03-24 Gary Benson <gbenson@redhat.com>
4819 * linux-x86-low.c (x86_debug_reg_state): New function.
4820 (x86_linux_prepare_to_resume): Use the above.
4822 2015-03-24 Gary Benson <gbenson@redhat.com>
4824 * linux-low.c (current_lwp_ptid): New function.
4825 * linux-x86-low.c: Include nat/linux-nat.h.
4826 (x86_dr_low_get_addr): Use current_lwp_ptid.
4827 (x86_dr_low_get_control): Likewise.
4828 (x86_dr_low_get_status): Likewise.
4830 2015-03-20 Pedro Alves <palves@redhat.com>
4832 * tracepoint.c (cmd_qtstatus): Make "str" const.
4834 2015-03-20 Pedro Alves <palves@redhat.com>
4836 * server.c (handle_general_set): Make "req_str" const.
4838 2015-03-19 Pedro Alves <palves@redhat.com>
4840 * linux-low.c (linux_resume_one_lwp): Rename to ...
4841 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4842 instead call perror_with_name.
4843 (check_ptrace_stopped_lwp_gone): New function.
4844 (linux_resume_one_lwp): Reimplement as wrapper around
4845 linux_resume_one_lwp_throw that swallows errors if the LWP is
4848 2015-03-19 Pedro Alves <palves@redhat.com>
4850 * linux-low.c (count_events_callback, select_event_lwp_callback):
4851 No longer check whether the thread has resume_stop as last resume
4854 2015-03-19 Pedro Alves <palves@redhat.com>
4856 * linux-low.c (count_events_callback, select_event_lwp_callback):
4857 Use the lwp's status_pending_p field, not the thread's.
4859 2015-03-19 Pedro Alves <palves@redhat.com>
4861 * linux-low.c (select_event_lwp_callback): Update comments to
4862 no longer mention SIGTRAP.
4864 2015-03-18 Gary Benson <gbenson@redhat.com>
4866 * server.c (handle_query): Do not report vFile:fstat as supported.
4868 2015-03-11 Gary Benson <gbenson@redhat.com>
4870 * hostio.c (sys/types.h): New include.
4871 (sys/stat.h): Likewise.
4872 (common-remote-fileio.h): Likewise.
4873 (handle_fstat): New function.
4874 (handle_vFile): Handle vFile:fstat packets.
4876 2015-03-11 Gary Benson <gbenson@redhat.com>
4878 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4879 struct stat.st_blocks and struct stat.st_blksize.
4880 * configure: Regenerate.
4881 * config.in: Likewise.
4882 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4883 (OBS): Add common-remote-fileio.o.
4884 (common-remote-fileio.o): New rule.
4886 2015-03-09 Pedro Alves <palves@redhat.com>
4888 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4889 'struct sockaddr' pointer in 'accept' call.
4891 2015-03-09 Pedro Alves <palves@redhat.com>
4894 2015-03-07 Pedro Alves <palves@redhat.com>
4895 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4896 or <winsock2.h> here. Instead include "gdb_socket.h".
4897 (remote_open): Use union gdb_sockaddr_u.
4898 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4899 or <winsock2.h> here. Instead include "gdb_socket.h".
4900 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4901 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4903 (init_named_socket, gdb_agent_helper_thread): Use union
4906 2015-03-07 Pedro Alves <palves@redhat.com>
4908 * configure.ac (build_warnings): Move
4909 -Wdeclaration-after-statement to the C-specific set.
4910 * configure: Regenerate.
4912 2015-03-07 Pedro Alves <palves@redhat.com>
4914 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4915 or <winsock2.h> here. Instead include "gdb_socket.h".
4916 (remote_open): Use union gdb_sockaddr_u.
4917 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4918 or <winsock2.h> here. Instead include "gdb_socket.h".
4919 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4920 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4922 (init_named_socket, gdb_agent_helper_thread): Use union
4925 2015-03-07 Pedro Alves <palves@redhat.com>
4927 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4930 2015-03-06 Yao Qi <yao.qi@linaro.org>
4932 * linux-aarch64-low.c (aarch64_insert_point): Use
4933 show_debug_regs as a boolean.
4934 (aarch64_remove_point): Likewise.
4936 2015-03-05 Pedro Alves <palves@redhat.com>
4938 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4939 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4940 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4941 * nto-low.c (nto_target_ops): Likewise.
4942 * spu-low.c (spu_target_ops): Likewise.
4943 * win32-low.c (win32_target_ops): Likewise.
4945 2015-03-04 Pedro Alves <palves@redhat.com>
4947 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4948 Decide whether a breakpoint triggered based on the SIGTRAP's
4950 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4951 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4952 (linux_low_filter_event): Check for breakpoints before checking
4954 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4956 (linux_stopped_by_sw_breakpoint)
4957 (linux_supports_stopped_by_sw_breakpoint)
4958 (linux_stopped_by_hw_breakpoint)
4959 (linux_supports_stopped_by_hw_breakpoint): New functions.
4960 (linux_target_ops): Install new target methods.
4962 2015-03-04 Pedro Alves <palves@redhat.com>
4964 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4965 * server.c (swbreak_feature, hwbreak_feature): New globals.
4966 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4967 (captured_main): Clear swbreak_feature and hwbreak_feature.
4968 * server.h (swbreak_feature, hwbreak_feature): Declare.
4969 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4970 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4971 supports_stopped_by_hw_breakpoint>: New fields.
4972 (target_supports_stopped_by_sw_breakpoint)
4973 (target_stopped_by_sw_breakpoint)
4974 (target_supports_stopped_by_hw_breakpoint)
4975 (target_stopped_by_hw_breakpoint): Declare.
4977 2015-03-04 Pedro Alves <palves@redhat.com>
4979 enum lwp_stop_reason -> enum target_stop_reason
4980 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4981 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4982 (linux_wait_1, stuck_in_jump_pad_callback)
4983 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4984 (linux_stopped_by_watchpoint):
4985 * linux-low.h (enum lwp_stop_reason): Delete.
4986 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4987 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4989 2015-03-04 Yao Qi <yao.qi@linaro.org>
4991 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4993 2015-03-03 Gary Benson <gbenson@redhat.com>
4995 * hostio.c (handle_vFile): Fix prefix lengths.
4997 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4999 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5002 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5004 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5005 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5006 (clean): Add "rm -f" for above C files.
5007 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5008 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5009 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5010 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5011 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5012 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5013 (init_registers_s390x_vx_linux64)
5014 (init_registers_s390x_tevx_linux64)
5015 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5016 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5018 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5019 (s390_store_vxrs_high): New functions.
5020 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5022 (s390_arch_setup): Add logic for selecting one of the new target
5023 descriptions. Activate the new vector regsets if applicable.
5024 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5025 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5026 and init_registers_s390x_tevx_linux64.
5028 2015-03-01 Pedro Alves <palves@redhat.com>
5030 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5033 2015-02-27 Pedro Alves <palves@redhat.com>
5035 * linux-x86-low.c (u_debugreg_offset): New function.
5036 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5038 2015-02-27 Pedro Alves <palves@redhat.com>
5040 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5041 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5042 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5043 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5044 (ps_lsetfpregs, ps_getpid)
5045 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5046 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5047 (ps_lsetxregs, ps_plog): Declare.
5049 2015-02-27 Pedro Alves <palves@redhat.com>
5051 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5052 IP_AGENT_EXPORT_FUNC.
5053 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5054 IP_AGENT_EXPORT_FUNC.
5055 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5056 (IP_AGENT_EXPORT): Delete.
5057 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5058 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5059 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5060 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5061 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5062 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5063 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5064 (traceframe_read_count, traceframe_write_count)
5065 (traceframes_created, trace_state_variables, get_raw_reg)
5066 (get_trace_state_variable_value, set_trace_state_variable_value)
5067 (ust_loaded, helper_thread_id, cmd_buf): Use
5068 IPA_SYM_EXPORTED_NAME.
5069 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5070 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5071 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5072 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5073 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5074 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5075 EXTERN_C_PUSH/EXTERN_C_POP.
5076 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5077 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5078 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5079 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5080 (traceframe_write_count, traceframe_read_count)
5081 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5082 (about_to_request_buffer_space, get_trace_state_variable_value)
5083 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5084 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5085 EXTERN_C_PUSH/EXTERN_C_POP.
5086 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5087 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5088 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5089 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5090 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5091 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5092 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5093 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5095 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5096 (IP_AGENT_EXPORT_VAR_DECL): Define.
5098 (gdb_agent_get_raw_reg): Declare.
5100 2015-02-27 Tom Tromey <tromey@redhat.com>
5101 Pedro Alves <palves@redhat.com>
5103 Rename symbols whose names are reserved C++ keywords throughout.
5105 2015-02-27 Pedro Alves <palves@redhat.com>
5107 * Makefile.in (COMPILER): New, get it from autoconf.
5108 (CXX): Get from autoconf instead.
5109 (COMPILE.pre): Use COMPILER.
5110 (CC-LD): Rename to ...
5111 (CC_LD): ... this. Use COMPILER.
5112 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5113 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5114 * acinclude.m4: Include build-with-cxx.m4.
5115 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5116 Disable -Werror by default if building in C++ mode.
5117 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5118 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5119 the C++ compiler. Save/restore CXXFLAGS too.
5120 * configure: Regenerate.
5122 2015-02-27 Pedro Alves <palves@redhat.com>
5124 * acinclude.m4: Include libiberty.m4.
5125 * configure.ac: Call libiberty_INIT.
5126 * config.in, configure: Regenerate.
5128 2015-02-26 Pedro Alves <palves@redhat.com>
5130 * linux-low.c (linux_wait_1): When incrementing the PC past a
5131 program breakpoint always use the_low_target.breakpoint_len as
5132 increment, rather than the maximum between that and
5133 the_low_target.decr_pc_after_break.
5135 2015-02-23 Pedro Alves <palves@redhat.com>
5137 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5138 thread was doing a step-over; always adjust the PC if
5139 we stepped over a permanent breakpoint.
5140 (linux_wait_1): If we stepped over breakpoint that was on top of a
5141 permanent breakpoint, manually advance the PC past it.
5143 2015-02-23 Pedro Alves <palves@redhat.com>
5145 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5147 (x86_fill_gregset, x86_store_gregset): Use it when handling
5150 2015-02-20 Pedro Alves <palves@redhat.com>
5152 * thread-db.c: Include "nat/linux-procfs.h".
5153 (thread_db_init): Skip listing new threads if the kernel supports
5154 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5156 2015-02-20 Pedro Alves <palves@redhat.com>
5158 * linux-low.c (status_pending_p_callback): Use ptid_match.
5160 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5162 PR breakpoints/16812
5163 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5164 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5165 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5167 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5169 PR breakpoints/15956
5170 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5172 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5174 * linux-low.c (linux_low_btrace_conf): Print size.
5175 * server.c (handle_btrace_conf_general_set): New.
5176 (hanle_general_set): Call handle_btrace_conf_general_set.
5177 (handle_query): Report Qbtrace-conf:bts:size as supported.
5179 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5181 * linux-low.c (linux_low_enable_btrace): Update parameters.
5182 (linux_low_btrace_conf): New.
5183 (linux_target_ops)<to_btrace_conf>: Initialize.
5184 * server.c (current_btrace_conf): New.
5185 (handle_btrace_enable): Rename to ...
5186 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5187 to target_enable_btrace. Update comment. Update users.
5188 (handle_qxfer_btrace_conf): New.
5189 (qxfer_packets): Add btrace-conf entry.
5190 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5191 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5192 (target_ops)<read_btrace_conf>: New.
5193 (target_enable_btrace): Update parameters.
5194 (target_read_btrace_conf): New.
5196 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5198 * server.c (handle_btrace_general_set): Remove call to
5199 target_supports_btrace.
5200 (supported_btrace_packets): New.
5201 (handle_query): Call supported_btrace_packets.
5202 * target.h: include btrace-common.h.
5203 (btrace_target_info): Removed.
5204 (supports_btrace, target_supports_btrace): Update parameters.
5206 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5208 * Makefile.in (SFILES): Add common/btrace-common.c.
5209 (OBS): Add common/btrace-common.o.
5210 (btrace-common.o): Add build rules.
5211 * linux-low: Include btrace-common.h.
5212 (linux_low_read_btrace): Use struct btrace_data. Call
5213 btrace_data_init and btrace_data_fini.
5215 2015-02-06 Pedro Alves <palves@redhat.com>
5217 * thread-db.c (find_new_threads_callback): Add debug output.
5219 2015-02-04 Pedro Alves <palves@redhat.com>
5221 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5222 (resume_stopped_resumed_lwps): New function.
5223 (linux_wait_for_event_filtered): Use it.
5225 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5227 * Makefile.in (SFILES): Add linux-personality.c.
5228 (linux-personality.o): New rule.
5229 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5230 list of objects to be built.
5231 * linux-low.c: Include nat/linux-personality.h.
5232 (linux_create_inferior): Remove code to disable address space
5233 randomization (moved to ../nat/linux-personality.c). Create
5234 cleanup to disable address space randomization.
5236 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5238 * Makefile.in (posix-strerror.o): New rule.
5239 (mingw-strerror.o): Likewise.
5240 * configure: Regenerated.
5241 * configure.ac: Source file ../common/common.host. Initialize new
5242 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5244 2015-01-14 Yao Qi <yao@codesourcery.com>
5246 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5247 (ppc-linux.o): New rule.
5248 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5249 * configure.ac: AC_CHECK_FUNCS(getauxval).
5250 * config.in: Re-generated.
5251 * configure: Re-generated.
5252 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5253 ppc64_64bit_inferior_p
5255 2015-01-14 Yao Qi <yao@codesourcery.com>
5257 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5258 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5259 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5260 (PT_ORIG_R3, PT_TRAP): Likewise.
5261 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5262 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5263 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5265 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5267 * i387-fp.c (i387_cache_to_xsave): In look over
5268 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5269 zmmh_low_space field by use of zmmh_high_space.
5271 2015-01-09 Pedro Alves <palves@redhat.com>
5273 * linux-low.c (step_over_bkpt): Move higher up in the file.
5274 (handle_extended_wait): Don't store the stop_pc here.
5275 (get_stop_pc): Adjust comments and rename to ...
5276 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5277 stopped for a software breakpoint or hardware breakpoint.
5278 (thread_still_has_status_pending_p): New function.
5279 (status_pending_p_callback): Use
5280 thread_still_has_status_pending_p. If the event is no longer
5281 interesting, resume the LWP.
5282 (handle_tracepoints): Add assert.
5283 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5284 (wstatus_maybe_breakpoint): New function.
5285 (cancel_breakpoint): Delete function.
5286 (check_stopped_by_watchpoint): New function, factored out from
5287 linux_low_filter_event.
5288 (lp_status_maybe_breakpoint): Delete function.
5289 (linux_low_filter_event): Remove filter_ptid argument.
5290 Leave thread group exits pending here. Store the LWP's stop PC.
5291 Always leave events pending.
5292 (linux_wait_for_event_filtered): Pull all events out of the
5293 kernel, and leave them all pending.
5294 (count_events_callback, select_event_lwp_callback): Consider all
5296 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5297 (select_event_lwp): Only give preference to the stepping LWP in
5298 all-stop mode. Adjust comments.
5299 (ignore_event): New function.
5300 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5301 references to cancel_breakpoints. Adjust to renames. Also give
5302 equal priority to all LWPs that have had events in non-stop mode.
5303 If reporting a software breakpoint event, unadjust the LWP's PC.
5304 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5305 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5307 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5308 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5309 (linux_stopped_by_watchpoint): Adjust.
5310 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5311 * linux-low.h (enum lwp_stop_reason): New.
5312 (struct lwp_info) <stop_pc>: Adjust comment.
5313 <stopped_by_watchpoint>: Delete field.
5314 <stop_reason>: New field.
5315 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5316 * mem-break.c (software_breakpoint_inserted_here)
5317 (hardware_breakpoint_inserted_here): New function.
5318 * mem-break.h (software_breakpoint_inserted_here)
5319 (hardware_breakpoint_inserted_here): Declare.
5320 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5321 (cancel_breakpoints): Delete.
5322 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5323 (upload_fast_traceframes): Remove references to
5326 2015-01-09 Pedro Alves <palves@redhat.com>
5328 * thread-db.c (find_new_threads_callback): Ignore thread if the
5329 kernel thread ID is -1.
5331 2015-01-09 Pedro Alves <palves@redhat.com>
5333 * linux-low.c (linux_attach_fail_reason_string): Move to
5334 nat/linux-ptrace.c, and rename.
5335 (linux_attach_lwp): Update comment.
5336 (attach_proc_task_lwp_callback): New function.
5337 (linux_attach): Adjust to rename and use
5338 linux_proc_attach_tgid_threads.
5339 (linux_attach_fail_reason_string): Delete declaration.
5341 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5343 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5344 * server.c (gdbserver_version): Likewise.
5346 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5348 * remote-utils.c: Include ctype.h.
5349 (input_interrupt): Explicitly handle the case when the char
5350 received is the NUL byte. Improve the printing of non-ASCII
5353 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5355 * linux-low.c (linux_low_filter_event): Update call to
5356 linux_enable_event_reporting following the addition of
5357 a new parameter to that function.
5359 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5362 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5363 (AARCH64_FPCR_REGNO): Likewise.
5364 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5365 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5366 (aarch64_store_fpregset): Likewise.
5368 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5370 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5371 Remove FIXME comment about assumption about N.
5373 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5375 * configure.ac: If large-file support is disabled in GDBserver,
5376 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5377 * configure: Regenerate.
5379 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5381 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5382 warning upon ENODATA from ptrace.
5383 * linux-s390-low.c (s390_store_tdb): New.
5384 (s390_regsets): Add regset for NT_S390_TDB.
5386 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5388 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5389 without a fill_function.
5390 * linux-s390-low.c (s390_fill_last_break): Remove.
5391 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5392 (s390_arch_setup): Use regset's size instead of fill_function for
5395 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5397 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5398 the regset's store function when ptrace returned an error.
5399 * regcache.c (get_thread_regcache): Invalidate register cache
5400 before fetching inferior's registers.
5402 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5404 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5405 while-loop as for-loop.
5406 (regsets_store_inferior_registers): Likewise.
5408 2014-11-28 Yao Qi <yao@codesourcery.com>
5410 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5411 * config.in, configure: Re-generate.
5412 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5415 2014-11-21 Yao Qi <yao@codesourcery.com>
5417 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5418 (AC_CHECK_HEADERS): Remove malloc.h.
5419 * configure: Re-generated.
5420 * config.in: Re-generated.
5421 * server.h: Don't include alloca.h and malloc.h.
5422 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5423 Don't include malloc.h.
5425 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5427 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5428 corresponding ERRNO check in same block.
5430 2014-11-12 Pedro Alves <palves@redhat.com>
5432 * server.c (cont_thread): Update comment.
5433 (start_inferior, attach_inferior): No longer clear cont_thread.
5434 (handle_v_cont): No longer set cont_thread.
5435 (captured_main): Clear cont_thread each time a GDB connects.
5437 2014-11-12 Pedro Alves <palves@redhat.com>
5439 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5440 thread, and don't resume all threads if the Hc thread has exited.
5442 2014-11-12 Pedro Alves <palves@redhat.com>
5444 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5445 the process group instead of to a specific LWP.
5447 2014-10-15 Pedro Alves <palves@redhat.com>
5450 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5452 (arm_set_thread_context): Delete.
5453 (the_low_target): Adjust.
5454 * win32-i386-low.c (debug_registers_changed)
5455 (debug_registers_used): Delete.
5456 (update_debug_registers_callback): New function.
5457 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5458 needing to update their debug registers.
5459 (win32_get_current_dr): New function.
5460 (x86_dr_low_get_addr, x86_dr_low_get_control)
5461 (x86_dr_low_get_status): Fetch the debug register from the thread
5463 (i386_initial_stuff): Adjust.
5464 (i386_get_thread_context): Remove current_event parameter. Don't
5465 clear debug_registers_changed nor copy DR values to
5467 (i386_set_thread_context): Delete.
5468 (i386_prepare_to_resume): New function.
5469 (i386_thread_added): Mark the thread as needing to update irs
5471 (the_low_target): Remove i386_set_thread_context and install
5472 i386_prepare_to_resume.
5473 * win32-low.c (win32_get_thread_context): Adjust.
5474 (win32_set_thread_context): Use SetThreadContext
5476 (win32_prepare_to_resume): New function.
5477 (win32_require_context): New function, factored out from ...
5478 (thread_rec): ... this.
5479 (continue_one_thread): Call win32_prepare_to_resume on each thread
5480 we're about to continue.
5481 (win32_resume): Call win32_prepare_to_resume on the event thread.
5482 * win32-low.h (struct win32_thread_info)
5483 <debug_registers_changed>: New field.
5484 (struct win32_target_ops): Change prototype of set_thread_context,
5485 delete set_thread_context and add prepare_to_resume.
5486 (win32_require_context): New declaration.
5488 2014-10-08 Gary Benson <gbenson@redhat.com>
5490 * server.h: Do not include common-exceptions.h.
5492 2014-10-08 Gary Benson <gbenson@redhat.com>
5494 * server.h: Do not include cleanups.h.
5496 2014-09-30 James Hogan <james.hogan@imgtec.com>
5498 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5501 2014-09-23 Yao Qi <yao@codesourcery.com>
5503 * linux-low.c (lp_status_maybe_breakpoint): New function.
5504 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5505 (count_events_callback): Likewise.
5506 (select_event_lwp_callback): Likewise.
5507 (cancel_breakpoints_callback): Likewise.
5509 2014-09-19 Don Breazeal <donb@codesourcery.com>
5511 * linux-low.c (handle_extended_wait): Call
5512 linux_ptrace_get_extended_event.
5513 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5514 linux_is_extended_waitstatus.
5516 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5518 * Makefile.in (CPPFLAGS): Define.
5519 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5520 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5522 2014-09-16 Gary Benson <gbenson@redhat.com>
5524 * inferiors.h (current_inferior): Renamed as...
5525 (current_thread): New variable. All uses updated.
5526 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5527 (maybe_move_out_of_jump_pad): Likewise.
5528 (cancel_breakpoint): Likewise.
5529 (linux_low_filter_event): Likewise.
5530 (wait_for_sigstop): Likewise.
5531 (linux_resume_one_lwp): Likewise.
5532 (need_step_over_p): Likewise.
5533 (start_step_over): Likewise.
5534 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5535 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5536 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5537 and save_inferior as saved_thread.
5538 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5540 (regcache_invalidate_thread): Likewise.
5541 * remote-utils.c (prepare_resume_reply): Likewise.
5542 * thread-db.c (thread_db_get_tls_address): Likewise.
5543 (disable_thread_event_reporting): Likewise.
5544 (remove_thread_event_breakpoints): Likewise.
5545 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5547 * target.h (set_desired_inferior): Renamed as...
5548 (set_desired_thread): New declaration. All uses updated.
5549 * server.c (myresume): Updated comment to reference thread instead
5551 (handle_serial_event): Likewise.
5552 (handle_target_event): Likewise.
5554 2014-09-12 Tom Tromey <tromey@redhat.com>
5555 Gary Benson <gbenson@redhat.com>
5557 * regcache.h: Include common-regcache.h.
5558 (regcache_read_pc): Don't declare.
5559 * regcache.c (get_thread_regcache_for_ptid): New function.
5561 2014-09-11 Tom Tromey <tromey@redhat.com>
5562 Gary Benson <gbenson@redhat.com>
5564 * symbol.c: New file.
5565 * Makefile.in (SFILES): Add symbol.c.
5566 (OBS): Add symbol.o.
5568 2014-09-11 Gary Benson <gbenson@redhat.com>
5570 * target.c (target_stop_ptid, target_continue_ptid): New
5573 2014-09-11 Tom Tromey <tromey@redhat.com>
5574 Gary Benson <gbenson@redhat.com>
5576 * target.h: Include target/target.h.
5577 * target.c (target_read_memory, target_read_uint32)
5578 (target_write_memory): New functions.
5580 2014-09-11 Gary Benson <gbenson@redhat.com>
5582 * server.h (debug_hw_points): Don't declare.
5583 * server.c (debug_hw_points): Don't define. Replace all uses
5584 with show_debug_regs.
5585 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5586 all uses with show_debug_regs.
5588 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5590 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5591 endianness into account.
5592 (ppc_supply_ptrace_register): Likewise.
5594 2014-09-03 James Hogan <james.hogan@imgtec.com>
5596 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5597 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5599 2014-09-03 Gary Benson <gbenson@redhat.com>
5601 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5602 ALL_DEBUG_ADDRESS_REGISTERS.
5604 2014-09-02 Gary Benson <gbenson@redhat.com>
5606 * i386-low.h: Renamed as...
5607 * x86-low.h: New file. All type, function and variable name
5608 prefixes changed from "i386_" to "x86_". All references updated.
5609 * i386-low.c: Renamed as...
5610 * x86-low.c: New file. All type, function and variable name
5611 prefixes changed from "i386_" to "x86_". All references updated.
5613 2014-09-02 Gary Benson <gbenson@redhat.com>
5615 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5616 (x86_linux_new_thread): Likewise.
5618 2014-08-29 Gary Benson <gbenson@redhat.com>
5620 * server.h (setjmp.h): Do not include.
5621 (toplevel): Do not declare.
5622 (common-exceptions.h): Include.
5623 (cleanups.h): Likewise.
5624 * server.c (toplevel): Do not define.
5625 (exit_code): New static global.
5626 (detach_or_kill_for_exit_cleanup): New function.
5627 (main): New function. Original main renamed to...
5628 (captured_main): New function.
5629 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5631 2014-08-29 Gary Benson <gbenson@redhat.com>
5633 * Makefile.in (SFILES): Add common/common-exceptions.c.
5634 (OBS): Add common-exceptions.o.
5635 (common-exceptions.o): New rule.
5636 * utils.c (prepare_to_throw_exception): New function.
5638 2014-08-29 Gary Benson <gbenson@redhat.com>
5640 * config.in: Regenerate.
5641 * configure: Likewise.
5643 2014-08-29 Gary Benson <gbenson@redhat.com>
5645 * Makefile.in (SFILES): Add common/cleanups.c.
5647 (cleanups.o): New rule.
5649 2014-08-29 Gary Benson <gbenson@redhat.com>
5651 * utils.c (internal_vwarning): New function.
5653 2014-08-28 Gary Benson <gbenson@redhat.com>
5655 * utils.h (fatal): Remove declaration.
5656 * utils.c (fatal): Remove function.
5658 2014-08-28 Gary Benson <gbenson@redhat.com>
5660 * tracepoint.c (gdb_agent_init): Replace fatal with
5662 (initialize_tracepoint): Likewise.
5664 2014-08-28 Gary Benson <gbenson@redhat.com>
5666 * remote-utils.c (remote_prepare): Replace fatal with error.
5668 2014-08-28 Gary Benson <gbenson@redhat.com>
5670 * linux-low.c (linux_async): Replace fatal with warning.
5672 (linux_start_non_stop): Return -1 if linux_async failed.
5674 2014-08-28 Gary Benson <gbenson@redhat.com>
5676 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5678 (i386_dr_low_get_addr): Remove vague comment.
5679 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5682 2014-08-28 Gary Benson <gbenson@redhat.com>
5684 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5685 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5687 (linux_resume_one_lwp): Likewise.
5688 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5690 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5691 with internal_error.
5692 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5693 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5694 (find_register_by_name): Replace fatal with internal_error.
5695 (find_regno): Likewise.
5696 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5697 * thread-db.c (thread_db_create_event): Likewise.
5698 (thread_db_load_search): Likewise.
5699 (try_thread_db_load_1): Likewise.
5700 * tracepoint.c (get_jump_space_head): Replace fatal with
5702 (claim_trampoline_space): Likewise.
5703 (have_fast_tracepoint_trampoline_buffer): Likewise.
5704 (cmd_qtstart): Likewise.
5705 (stop_tracing): Likewise.
5706 (fast_tracepoint_collecting): Likewise.
5707 (target_malloc): Likewise.
5708 (download_tracepoint): Likewise.
5709 (download_trace_state_variables): Replace check with gdb_assert.
5710 (upload_fast_traceframes): Replace fatal with internal_error.
5712 2014-08-19 Tom Tromey <tromey@redhat.com>
5713 Gary Benson <gbenson@redhat.com>
5715 * Makefile.in (SFILES): Add common/common-debug.c.
5716 (OBS): Add common-debug.o.
5717 (common-debug.o): New rule.
5718 * debug.h (debug_printf): Don't declare.
5719 * debug.c (debug_printf): Renamed and rewritten as...
5720 (debug_vprintf): New function.
5722 2014-08-19 Gary Benson <gbenson@redhat.com>
5724 * utils.h: Do not include print-utils.h.
5726 2014-08-19 Tom Tromey <tromey@redhat.com>
5727 Gary Benson <gbenson@redhat.com>
5729 * server.h: Add static assertion.
5730 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5732 2014-08-19 Tom Tromey <tromey@redhat.com>
5733 Gary Benson <gbenson@redhat.com>
5735 * Makefile.in (SFILES): Add common/errors.c.
5736 (OBS): Add errors.o.
5737 (IPA_OBS): Add errors-ipa.o.
5738 (errors.o): New rule.
5739 (errors-ipa.o): Likewise.
5740 * utils.h (perror_with_name, error, warning): Don't declare.
5741 * utils.c (warning): Renamed and rewritten as...
5742 (vwarning): New function.
5743 (error): Renamed and rewritten as...
5744 (verror): New function.
5745 (internal_error): Renamed and rewritten as...
5746 (internal_verror): New function.
5748 2014-08-07 Gary Benson <gbenson@redhat.com>
5750 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5751 * configure: Regenerate.
5752 * config.in: Likewise.
5753 * server.h: Do not include errno.h.
5754 * event-loop.c: Likewise.
5755 * hostio-errno.c: Likewise.
5756 * linux-low.c: Likewise.
5757 * remote-utils.c: Likewise.
5758 * spu-low.c: Likewise.
5759 * utils.c: Likewise.
5760 * gdbreplay.c: Unconditionally include errno.h.
5762 2014-08-07 Gary Benson <gbenson@redhat.com>
5764 * server.h: Do not include string.h.
5765 * event-loop.c: Likewise.
5766 * linux-low.c: Likewise.
5767 * regcache.c: Likewise.
5768 * remote-utils.c: Likewise.
5769 * spu-low.c: Likewise.
5770 * utils.c: Likewise.
5772 2014-08-07 Gary Benson <gbenson@redhat.com>
5774 * server.h: Do not include gdb_assert.h.
5776 2014-08-07 Gary Benson <gbenson@redhat.com>
5778 * server.h: Do not include common-utils.h.
5780 2014-08-07 Gary Benson <gbenson@redhat.com>
5782 * server.h: Do not include ptid.h.
5783 * notif.h: Likewise.
5785 2014-08-07 Gary Benson <gbenson@redhat.com>
5787 * server.h: Do not include gdb_locale.h.
5789 2014-08-07 Gary Benson <gbenson@redhat.com>
5791 * server.h: Do not include gdb/signals.h.
5792 * win32-low.c: Likewise.
5794 2014-08-07 Gary Benson <gbenson@redhat.com>
5796 * server.h: Do not include pathmax.h.
5798 2014-08-07 Gary Benson <gbenson@redhat.com>
5800 * server.h: Do not include libiberty.h.
5801 * linux-bfin-low.c: Likewise.
5803 2014-08-07 Gary Benson <gbenson@redhat.com>
5805 * server.h: Do not include ansidecl.h.
5807 2014-08-07 Gary Benson <gbenson@redhat.com>
5809 * linux-x86-low.c: Do not include stddef.h.
5810 * lynx-ppc-low.c: Likewise.
5811 * tracepoint.c: Likewise.
5813 2014-08-07 Gary Benson <gbenson@redhat.com>
5815 * server.h: Do not include stdarg.h.
5816 * nto-low.c: Likewise.
5818 2014-08-07 Gary Benson <gbenson@redhat.com>
5820 * server.h: Do not include stdlib.h.
5821 * inferiors.c: Likewise.
5822 * linux-low.c: Likewise.
5823 * regcache.c: Likewise.
5824 * spu-low.c: Likewise.
5825 * tracepoint.c: Likewise.
5826 * utils.c: Likewise.
5828 2014-08-07 Gary Benson <gbenson@redhat.com>
5830 * server.h: Do not include stdio.h.
5831 * linux-low.c: Likewise.
5832 * remote-utils.c: Likewise.
5833 * spu-low.c: Likewise.
5834 * utils.c: Likewise.
5835 * wincecompat.c: Likewise.
5837 2014-08-06 Gary Benson <gbenson@redhat.com>
5839 * regcache.c (init_register_cache): Move conditionals inside if.
5841 2014-08-06 Gary Benson <gbenson@redhat.com>
5843 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5845 2014-07-31 Gary Benson <gbenson@redhat.com>
5847 * ax.h: Do not include server.h.
5848 * gdbthread.h: Likewise.
5849 * lynx-low.h: Likewise.
5850 * notif.h: Likewise.
5852 2014-07-30 Gary Benson <gbenson@redhat.com>
5854 * server.h: Include common-defs.h.
5855 Do not include config.h or build-gnulib-gdbserver/config.h.
5857 2014-07-30 Gary Benson <gbenson@redhat.com>
5859 * hostio-errno.c: Move server.h to top of includes list.
5860 * inferiors.c: Likewise.
5861 * linux-x86-low.c: Likewise.
5862 * notif.c: Include server.h.
5864 2014-07-24 Tom Tromey <tromey@redhat.com>
5865 Gary Benson <gbenson@redhat.com>
5867 * server.h (CORE_ADDR): Now unsigned.
5869 2014-07-16 Pedro Alves <palves@redhat.com>
5871 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5873 2014-07-15 Pedro Alves <palves@redhat.com>
5875 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5878 2014-07-11 Pedro Alves <palves@redhat.com>
5880 * linux-low.c (kill_wait_lwp): New function, based on
5881 kill_one_lwp_callback, but use my_waitpid directly.
5882 (kill_one_lwp_callback, linux_kill): Use it.
5884 2014-06-23 Pedro Alves <palves@redhat.com>
5886 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5887 before setting DR0..DR3.
5889 2014-06-20 Gary Benson <gbenson@redhat.com>
5891 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5892 * configure: Regenerated.
5893 * config.in: Likewise.
5895 2014-06-20 Gary Benson <gbenson@redhat.com>
5897 * Makefile.in (SFILES): Update locations for files moved
5899 (object file files): Reordered.
5901 2014-06-20 Gary Benson <gbenson@redhat.com>
5903 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5904 (i386_dr_low_set_addr): Likewise.
5905 (i386_dr_low_get_addr): Likewise.
5906 (i386_dr_low_can_set_control): Likewise.
5907 (i386_dr_low_set_control): Likewise.
5908 (i386_dr_low_get_control): Likewise.
5909 (i386_dr_low_get_status): Likewise.
5910 (i386_get_debug_register_length): Likewise.
5911 * linux-x86-low.c (i386_dr_low_set_addr):
5912 Changed signature. Made static.
5913 (i386_dr_low_get_addr): Likewise.
5914 (i386_dr_low_set_control): Likewise.
5915 (i386_dr_low_get_control): Likewise.
5916 (i386_dr_low_get_status): Likewise.
5917 (i386_dr_low): New global variable.
5918 * win32-i386-low.c (i386_dr_low_set_addr):
5919 Changed signature. Made static.
5920 (i386_dr_low_get_addr): Likewise.
5921 (i386_dr_low_set_control): Likewise.
5922 (i386_dr_low_get_control): Likewise.
5923 (i386_dr_low_get_status): Likewise.
5924 (i386_dr_low): New global variable.
5926 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5928 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5929 * Makefile.in (AR, AR_FLAGS): Define.
5930 * configure: Regenerate.
5932 2014-06-19 Gary Benson <gbenson@redhat.com>
5934 * Makefile.in (i386-dregs.o): New rule.
5935 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5936 * i386-low.c (target.h): Remove include.
5937 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5938 (DR_CONTROL_SHIFT): Likewise.
5939 (DR_CONTROL_SIZE): Likewise.
5940 (DR_RW_EXECUTE): Likewise.
5941 (DR_RW_WRITE): Likewise.
5942 (DR_RW_READ): Likewise.
5943 (DR_RW_IORW): Likewise.
5944 (DR_LEN_1): Likewise.
5945 (DR_LEN_2): Likewise.
5946 (DR_LEN_4): Likewise.
5947 (DR_LEN_8): Likewise.
5948 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5949 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5950 (DR_ENABLE_SIZE): Likewise.
5951 (DR_LOCAL_SLOWDOWN): Likewise.
5952 (DR_GLOBAL_SLOWDOWN): Likewise.
5953 (DR_CONTROL_RESERVED): Likewise.
5954 (I386_DR_CONTROL_MASK): Likewise.
5955 (I386_DR_VACANT): Likewise.
5956 (I386_DR_LOCAL_ENABLE): Likewise.
5957 (I386_DR_GLOBAL_ENABLE): Likewise.
5958 (I386_DR_DISABLE): Likewise.
5959 (I386_DR_SET_RW_LEN): Likewise.
5960 (I386_DR_GET_RW_LEN): Likewise.
5961 (I386_DR_WATCH_HIT): Likewise.
5962 (i386_wp_op_t): Likewise.
5963 (i386_show_dr): Likewise.
5964 (i386_length_and_rw_bits): Likewise.
5965 (i386_insert_aligned_watchpoint): Likewise.
5966 (i386_remove_aligned_watchpoint): Likewise.
5967 (i386_handle_nonaligned_watchpoint): Likewise.
5968 i386_update_inferior_debug_regs(): Likewise.
5969 (i386_dr_insert_watchpoint): Likewise.
5970 (i386_dr_remove_watchpoint): Likewise.
5971 (i386_dr_region_ok_for_watchpoint): Likewise.
5972 (i386_dr_stopped_data_address): Likewise.
5973 (i386_dr_stopped_by_watchpoint): Likewise.
5975 2014-06-19 Gary Benson <gbenson@redhat.com>
5977 * i386-low.c (i386_dr_show): Renamed to
5978 i386_show_dr and made static. All uses updated.
5979 (i386_dr_length_and_rw_bits): Renamed to
5980 i386_length_and_rw_bits and made static.
5982 (i386_dr_insert_aligned_watchpoint): Renamed to
5983 i386_insert_aligned_watchpoint and made static.
5985 (i386_dr_remove_aligned_watchpoint): Renamed to
5986 i386_remove_aligned_watchpoint and made static.
5988 (i386_dr_update_inferior_debug_regs): Renamed to
5989 i386_update_inferior_debug_regs and made static.
5992 2014-06-18 Gary Benson <gbenson@redhat.com>
5994 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5995 (i386_dr_low_can_set_control): Likewise.
5996 (i386_get_debug_register_length): Likewise.
5997 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5998 (i386_dr_low_can_set_control): Likewise.
5999 (i386_get_debug_register_length): Likewise.
6001 2014-06-17 Gary Benson <gbenson@redhat.com>
6003 * i386-low.h (i386-dregs.h): New include.
6004 (DR_FIRSTADDR): Now in i386-dregs.h.
6005 (DR_LASTADDR): Likewise.
6006 (DR_NADDR): Likewise.
6007 (DR_STATUS): Likewise.
6008 (DR_CONTROL): Likewise.
6009 (i386_debug_reg_state): Likewise.
6010 (i386_dr_insert_watchpoint): Likewise.
6011 (i386_dr_remove_watchpoint): Likewise.
6012 (i386_dr_region_ok_for_watchpoint): Likewise.
6013 (i386_dr_stopped_data_address): Likewise.
6014 (i386_dr_stopped_by_watchpoint): Likewise.
6015 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6017 2014-06-18 Gary Benson <gbenson@redhat.com>
6019 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6020 i386_dr_insert_watchpoint.
6021 (i386_low_remove_watchpoint): Renamed to
6022 i386_dr_remove_watchpoint.
6023 (i386_low_region_ok_for_watchpoint): Renamed to
6024 i386_dr_region_ok_for_watchpoint.
6025 (i386_low_stopped_data_address): Renamed to
6026 i386_dr_stopped_data_address.
6027 (i386_low_stopped_by_watchpoint): Renamed to
6028 i386_dr_stopped_by_watchpoint.
6029 * i386-low.c (i386_show_dr): Renamed to
6030 i386_dr_show and made nonstatic. All uses updated.
6031 (i386_length_and_rw_bits): Renamed to
6032 i386_dr_length_and_rw_bits and made nonstatic.
6034 (i386_insert_aligned_watchpoint): Renamed to
6035 i386_dr_insert_aligned_watchpoint and made nonstatic.
6037 (i386_remove_aligned_watchpoint): Renamed to
6038 i386_dr_remove_aligned_watchpoint and made nonstatic.
6040 (i386_update_inferior_debug_regs): Renamed to
6041 i386_dr_update_inferior_debug_regs and made nonstatic.
6043 (i386_low_insert_watchpoint): Renamed to
6044 i386_dr_insert_watchpoint. All uses updated.
6045 (i386_low_remove_watchpoint): Renamed to
6046 i386_dr_remove_watchpoint. All uses updated.
6047 (i386_low_region_ok_for_watchpoint): Renamed to
6048 i386_dr_region_ok_for_watchpoint. All uses updated.
6049 (i386_low_stopped_data_address): Renamed to
6050 i386_dr_stopped_data_address. All uses updated.
6051 (i386_low_stopped_by_watchpoint): Renamed to
6052 i386_dr_stopped_by_watchpoint. All uses updated.
6054 2014-06-18 Gary Benson <gbenson@redhat.com>
6056 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6057 (i386_dr_low_can_set_control): Likewise.
6058 (i386_insert_aligned_watchpoint): New check.
6060 2014-06-18 Gary Benson <gbenson@redhat.com>
6062 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6065 2014-06-18 Gary Benson <gbenson@redhat.com>
6067 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6068 instead of fatal and error.
6069 (i386_handle_nonaligned_watchpoint): Likewise.
6071 2014-06-18 Gary Benson <gbenson@redhat.com>
6073 * i386-low.c (i386_get_debug_register_length): New macro.
6074 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6075 (i386_show_dr): Use debug_printf instead of fprintf. Use
6076 phex to format values.
6078 2014-06-18 Gary Benson <gbenson@redhat.com>
6080 * i386-low.h: Comment changes.
6081 * i386-low.c: Likewise.
6083 2014-06-18 Gary Benson <gbenson@redhat.com>
6085 * i386-low.c: Whitespace changes.
6087 2014-06-12 Tom Tromey <tromey@redhat.com>
6089 * utils.c (freeargv): Remove.
6091 2014-06-12 Tom Tromey <tromey@redhat.com>
6093 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6094 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6095 (parse_debug_format_options): Likewise.
6096 (gdbserver_usage): Likewise.
6097 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6098 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6099 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6101 ($(LIBGNU)): Depend on libiberty.
6102 (all-lib): Recurse into all subdirs.
6103 (install-only): Invoke "install" target in subdirs.
6104 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6106 * configure: Rebuild.
6107 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6108 for vasprintf, vsnprintf, or gettimeofday.
6109 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6112 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6114 * development.sh: Delete.
6115 * Makefile.in (config.status): Adjust dependency on development.sh.
6116 * configure.ac: Adjust development.sh source call.
6117 * configure: Regenerate.
6119 2014-06-02 Pedro Alves <palves@redhat.com>
6121 * ax.c (gdb_free_agent_expr): New function.
6122 * ax.h (gdb_free_agent_expr): New declaration.
6123 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6125 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6127 (clear_breakpoint_conditions_and_commands): New function.
6128 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6129 (clear_breakpoint_conditions_and_commands): New declaration.
6131 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6133 * linux-aarch64-low.c (asm/ptrace.h): Include.
6135 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6137 Fix TLS access for -static -pthread.
6138 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6139 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6140 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6142 2014-05-20 Pedro Alves <palves@redhat.com>
6144 * linux-aarch64-low.c (aarch64_insert_point)
6145 (aarch64_remove_point): No longer check whether the type is
6146 supported here. Adjust to new interface.
6147 (the_low_target): Install aarch64_supports_z_point_type as
6148 supports_z_point_type method.
6149 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6150 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6151 instead of a Z packet char. Adjust.
6152 (arm_supports_z_point_type): New function.
6153 (arm_insert_point, arm_remove_point): Adjust to new interface.
6154 (the_low_target): Install arm_supports_z_point_type.
6155 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6156 (cris_insert_point, cris_remove_point): Adjust to new interface.
6157 Don't check whether the type is supported here.
6158 (the_low_target): Install cris_supports_z_point_type.
6159 * linux-low.c (linux_supports_z_point_type): New function.
6160 (linux_insert_point, linux_remove_point): Adjust to new interface.
6161 * linux-low.h (struct linux_target_ops) <insert_point,
6162 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6163 raw_breakpoint pointer parameter.
6164 <supports_z_point_type>: New method.
6165 * linux-mips-low.c (mips_supports_z_point_type): New function.
6166 (mips_insert_point, mips_remove_point): Adjust to new interface.
6167 Use mips_supports_z_point_type.
6168 (the_low_target): Install mips_supports_z_point_type.
6169 * linux-ppc-low.c (the_low_target): Install NULL as
6170 supports_z_point_type method.
6171 * linux-s390-low.c (the_low_target): Install NULL as
6172 supports_z_point_type method.
6173 * linux-sparc-low.c (the_low_target): Install NULL as
6174 supports_z_point_type method.
6175 * linux-x86-low.c (x86_supports_z_point_type): New function.
6176 (x86_insert_point): Adjust to new insert_point interface. Use
6177 insert_memory_breakpoint. Adjust to new
6178 i386_low_insert_watchpoint interface.
6179 (x86_remove_point): Adjust to remove_point interface. Use
6180 remove_memory_breakpoint. Adjust to new
6181 i386_low_remove_watchpoint interface.
6182 (the_low_target): Install x86_supports_z_point_type.
6183 * lynx-low.c (lynx_target_ops): Install NULL as
6184 supports_z_point_type callback.
6185 * nto-low.c (nto_supports_z_point_type): New.
6186 (nto_insert_point, nto_remove_point): Adjust to new interface.
6187 (nto_target_ops): Install nto_supports_z_point_type.
6188 * mem-break.c: Adjust intro comment.
6189 (struct raw_breakpoint) <raw_type, size>: New fields.
6190 <inserted>: Update comment.
6191 <shlib_disabled>: Delete field.
6192 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6193 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6194 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6195 (raw_bkpt_type_to_target_hw_bp_type): New function.
6196 (find_enabled_raw_code_breakpoint_at): New function.
6197 (find_raw_breakpoint_at): New type and size parameters. Use them.
6198 (insert_memory_breakpoint): New function, based off
6199 set_raw_breakpoint_at.
6200 (remove_memory_breakpoint): New function.
6201 (set_raw_breakpoint_at): Reimplement.
6202 (set_breakpoint): New, based on set_breakpoint_at.
6203 (set_breakpoint_at): Reimplement.
6204 (delete_raw_breakpoint): Go through the_target->remove_point
6205 instead of assuming memory breakpoints.
6206 (find_gdb_breakpoint_at): Delete.
6207 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6208 (find_gdb_breakpoint): New function.
6209 (set_gdb_breakpoint_at): Delete.
6210 (z_type_supported): New function.
6211 (set_gdb_breakpoint_1): New function, loosely based off
6212 set_gdb_breakpoint_at.
6213 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6214 (delete_gdb_breakpoint_at): Delete.
6215 (delete_gdb_breakpoint_1): New function, loosely based off
6216 delete_gdb_breakpoint_at.
6217 (delete_gdb_breakpoint): New function.
6218 (clear_gdb_breakpoint_conditions): Rename to ...
6219 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6221 (add_condition_to_breakpoint): Make static.
6222 (add_breakpoint_condition): Take a struct breakpoint pointer
6223 instead of an address. Adjust.
6224 (gdb_condition_true_at_breakpoint): Rename to ...
6225 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6227 (gdb_condition_true_at_breakpoint): Reimplement.
6228 (add_breakpoint_commands): Take a struct breakpoint pointer
6229 instead of an address. Adjust.
6230 (gdb_no_commands_at_breakpoint): Rename to ...
6231 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6232 parameter. Return true if no breakpoint was found. Change debug
6234 (gdb_no_commands_at_breakpoint): Reimplement.
6235 (run_breakpoint_commands): Rename to ...
6236 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6237 and change return type to boolean.
6238 (run_breakpoint_commands): New function.
6239 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6240 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6241 breakpoint. Go through the_target->remove_point instead of
6242 assuming memory breakpoint.
6243 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6244 software and hardware breakpoints.
6245 (reinsert_raw_breakpoint): Go through the_target->insert_point
6246 instead of assuming memory breakpoint.
6247 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6248 software and hardware breakpoints.
6249 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6250 Check both software and hardware breakpoints.
6251 (validate_inserted_breakpoint): Assert the breakpoint is a
6252 software breakpoint. Set the inserted flag to -1 instead of
6253 setting shlib_disabled.
6254 (delete_disabled_breakpoints): Adjust.
6255 (validate_breakpoints): Only validate software breakpoints.
6256 Adjust to inserted flag change.
6257 (check_mem_read, check_mem_write): Skip breakpoint types other
6258 than software breakpoints. Adjust to inserted flag change.
6259 * mem-break.h (enum raw_bkpt_type): New enum.
6260 (raw_breakpoint, struct process_info): Forward declare.
6261 (Z_packet_to_target_hw_bp_type): Delete declaration.
6262 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6263 (set_gdb_breakpoint, delete_gdb_breakpoint)
6264 (clear_breakpoint_conditions): New declarations.
6265 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6266 (breakpoint_inserted_here): Update comment.
6267 (add_breakpoint_condition, add_breakpoint_commands): Replace
6268 address parameter with a breakpoint pointer parameter.
6269 (gdb_breakpoint_here): Update comment.
6270 (delete_gdb_breakpoint_at): Delete.
6271 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6272 * server.c (process_point_options): Take a struct breakpoint
6273 pointer instead of an address. Adjust.
6274 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6275 delete_gdb_breakpoint.
6276 * spu-low.c (spu_target_ops): Install NULL as
6277 supports_z_point_type method.
6278 * target.h: Include mem-break.h.
6279 (struct target_ops) <prepare_to_access_memory>: Update comment.
6280 <supports_z_point_type>: New field.
6281 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6282 instead of a char. Also take a raw breakpoint pointer.
6283 * win32-arm-low.c (the_low_target): Install NULL as
6284 supports_z_point_type.
6285 * win32-i386-low.c (i386_supports_z_point_type): New function.
6286 (i386_insert_point, i386_remove_point): Adjust to new interface.
6287 (the_low_target): Install i386_supports_z_point_type.
6288 * win32-low.c (win32_supports_z_point_type): New function.
6289 (win32_insert_point, win32_remove_point): Adjust to new interface.
6290 (win32_target_ops): Install win32_supports_z_point_type.
6291 * win32-low.h (struct win32_target_ops):
6292 <supports_z_point_type>: New method.
6293 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6294 instead of a char. Also take a raw breakpoint pointer.
6296 2014-05-20 Pedro Alves <palves@redhat.com>
6298 * mem-break.h: Include break-common.h.
6299 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6300 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6301 (Z_packet_to_target_hw_bp_type): New declaration.
6302 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6303 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6304 (Z_PACKET_ACCESS_WP): Delete macros.
6305 (Z_packet_to_hw_type): Delete function.
6306 * i386-low.h: Don't include break-common.h here.
6307 (Z_packet_to_hw_type): Delete declaration.
6308 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6309 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6310 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6311 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6312 * linux-aarch64-low.c: Don't include break-common.h here.
6313 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6314 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6315 (Z_packet_to_target_hw_bp_type): Delete function.
6316 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6318 (mips_insert_point, mips_remove_point): Use
6319 Z_packet_to_target_hw_bp_type.
6321 2014-05-20 Pedro Alves <palves@redhat.com>
6323 * linux-aarch64-low.c: Include break-common.h.
6324 (enum target_point_type): Delete.
6325 (Z_packet_to_point_type): Rename to ...
6326 (Z_packet_to_target_hw_bp_type): ... this, and return a
6327 target_hw_bp_type instead.
6328 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6329 instead of an enum target_point_type.
6330 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6332 (aarch64_dr_state_insert_one_point)
6333 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6334 (aarch64_handle_aligned_watchpoint)
6335 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6336 Take an enum target_hw_bp_type instead of an enum
6338 (aarch64_supports_z_point_type): New function.
6339 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6340 use Z_packet_to_target_hw_bp_type.
6342 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6344 * configure.ac: Only use -Werror by default when DEVELOPMENT
6346 * configure: Regenerate.
6348 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6350 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6351 * linux-x86-low.c (X86_64_USER_REGS): New.
6352 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6354 2014-04-28 Yao Qi <yao@codesourcery.com>
6356 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6359 2014-04-25 Pedro Alves <palves@redhat.com>
6362 * linux-low.c (linux_attach_fail_reason_string): New function.
6363 (linux_attach_lwp): Delete.
6364 (linux_attach_lwp_1): Rename to ...
6365 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6366 argument. Remove "initial" parameter. Return int instead of
6367 void. Don't error or warn here.
6368 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6369 failure to attach to the tgid. Call warning when failing to
6371 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6372 argument. Remove "initial" parameter. Return int instead of
6373 void. Don't error or warn here.
6374 (linux_attach_fail_reason_string): New declaration.
6375 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6376 interface change. Use linux_attach_fail_reason_string.
6378 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6379 Walfred Tedeschi <walfred.tedeschi@intel.com>
6381 * Makefile.in: Added rules to handle new files
6382 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6383 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6384 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6385 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6386 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6387 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6389 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6390 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6391 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6392 i386/x32-avx512.xml.
6393 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6394 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6395 i386/x32-avx512-linux.xml.
6396 * i387-fp.c (num_avx512_k_registers): New constant for number
6398 (num_avx512_zmmh_low_registers): New constant for number of
6399 lower ZMM registers (0-15).
6400 (num_avx512_zmmh_high_registers): New constant for number of
6401 higher ZMM registers (16-31).
6402 (num_avx512_ymmh_registers): New contant for number of higher
6403 YMM registers (ymm16-31 added by avx521 on x86_64).
6404 (num_avx512_xmm_registers): New constant for number of higher
6405 XMM registers (xmm16-31 added by AVX512 on x86_64).
6406 (struct i387_xsave): Add space for AVX512 registers.
6407 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6408 Add code to handle AVX512 registers.
6409 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6410 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6411 prototypei from generated file.
6412 (tdesc_amd64_avx512_linux): Likewise.
6413 (init_registers_x32_avx512_linux): Likewise.
6414 (tdesc_x32_avx512_linux): Likewise.
6415 (init_registers_i386_avx512_linux): Likewise.
6416 (tdesc_i386_avx512_linux): Likewise.
6417 (x86_64_regmap): Add AVX512 registers.
6418 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6420 (initialize_low_arch): Add code to initialize AVX512 registers.
6422 2014-04-23 Pedro Alves <palves@redhat.com>
6424 * mem-break.c (find_gdb_breakpoint_at): Make static.
6425 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6427 2014-04-23 Pedro Alves <palves@redhat.com>
6429 * i386-low.c: Don't include break-common.h here.
6430 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6431 prototype to take target_hw_bp_type as argument instead of a Z
6433 * i386-low.h: Include break-common.h here.
6434 (Z_packet_to_hw_type): Declare.
6435 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6437 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6438 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6439 (x86_remove_point): Convert the packet number to a
6440 target_hw_bp_type before calling i386_low_remove_watchpoint.
6441 * win32-i386-low.c (i386_insert_point): Convert the packet number
6442 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6443 (i386_remove_point): Convert the packet number to a
6444 target_hw_bp_type before calling i386_low_remove_watchpoint.
6446 2014-04-23 Pedro Alves <palves@redhat.com>
6448 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6450 2014-04-10 Pedro Alves <palves@redhat.com>
6452 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6453 Check if the condition or command is NULL before checking if the
6454 breakpoint is known. On success, return true.
6455 * mem-break.h (add_breakpoint_condition): Document return.
6456 (add_breakpoint_commands): Add describing comment.
6457 * server.c (skip_to_semicolon): New function.
6458 (process_point_options): Use it.
6460 2014-04-09 Pedro Alves <palves@redhat.com>
6462 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6465 2014-02-27 Pedro Alves <palves@redhat.com>
6468 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6470 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6472 (last_thread_of_process_p): Take a PID argument instead of a
6474 (linux_wait_for_lwp): Delete.
6475 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6477 (linux_low_filter_event): New function, party factored out from
6478 linux_wait_for_event.
6479 (linux_wait_for_event): Rename to ...
6480 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6481 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6482 sigsuspend. Check for zombie leaders.
6483 (linux_wait_for_event): Reimplement as wrapper around
6484 linux_wait_for_event_filtered.
6485 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6486 a normal or signal exit is seen, it's the whole process exiting.
6487 (wait_for_sigstop): No longer a for_each_inferior callback.
6488 Rewrite on top of linux_wait_for_event_filtered.
6489 (stop_all_lwps): Call wait_for_sigstop directly.
6490 * server.c (resume, handle_target_event): Handle
6491 TARGET_WAITKIND_NO_RESUMED.
6493 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6495 * win32-low.c (psapi_get_dll_name,
6496 * win32_CreateToolhelp32Snapshot): Delete.
6497 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6498 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6500 (handle_load_dll): Add function description.
6501 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6503 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6505 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6507 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6508 base address when calling win32_add_one_solib.
6509 (handle_load_dll): Delete local variable load_addr.
6510 Remove 0x1000 offset applied to DLL base address when calling
6511 win32_add_one_solib.
6512 (handle_unload_dll): Add comment.
6514 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6516 * win32-low.c (win32_add_all_dlls): Renames
6517 win32_ensure_ntdll_loaded. Rewrite function documentation.
6518 Adjust implementation to always load all DLLs.
6519 Add 0x1000 offset to DLL base address when calling
6520 win32_add_one_solib.
6521 (child_initialization_done): New static global.
6522 (do_initial_child_stuff): Set child_initialization_done to
6523 zero during child initialization, and 1 after. Replace call
6524 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6526 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6527 (handle_unload_dll): Add function documentation.
6528 (get_child_debug_event): Ignore load and unload DLL events
6529 during child initialization.
6531 2014-02-20 Doug Evans <dje@google.com>
6533 Remove global all_lwps.
6534 * inferiors.h (ptid_of): Move here from linux-low.h.
6535 (pid_of, lwpid_of): Ditto.
6536 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6537 parameter is a struct thread_info * now.
6538 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6539 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6540 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6542 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6543 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6544 * linux-arm-low.c (update_registers_callback): Update, "entry"
6545 parameter is a struct thread_info * now.
6546 Fetch lwpid from current_inferior directly.
6547 (arm_insert_point): Pass &all_threads to find_inferior instead of
6549 (arm_remove_point): Ditto.
6550 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6551 (arm_prepare_to_resume): Fetch pid from thread.
6552 (arm_read_description): Fetch lwpid from current_inferior directly.
6553 * linux-low.c (all_lwps): Delete.
6554 (delete_lwp): Delete call to remove_inferior.
6555 (handle_extended_wait): Fetch lwpid from thread.
6556 (add_lwp): Don't set lwp->entry.id. Remove call to
6557 add_inferior_to_list.
6558 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6559 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6560 (kill_one_lwp_callback): Ditto.
6561 (linux_kill): Don't dereference NULL pointer.
6562 Fetch ptid,lwpid from thread.
6563 (get_detach_signal): Fetch ptid from thread.
6564 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6565 Simplify call to regcache_invalidate_thread.
6566 (delete_lwp_callback): Update, "entry" parameter is a
6567 struct thread_info * now. Fetch pid from thread.
6568 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6569 (status_pending_p_callback): Update, "entry" parameter is a
6570 struct thread_info * now. Fetch ptid from thread.
6571 (find_lwp_pid): Update, "entry" parameter is a
6572 struct thread_info * now.
6573 (linux_wait_for_lwp): Fetch pid from thread.
6574 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6575 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6576 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6577 (dequeue_one_deferred_signal): Ditto.
6578 (cancel_breakpoint): Fetch ptid from current_inferior.
6579 (linux_wait_for_event): Pass &all_threads to find_inferior,
6580 not &all_lwps. Fetch ptid, lwpid from thread.
6581 (count_events_callback): Update, "entry" parameter is a
6582 struct thread_info * now.
6583 (select_singlestep_lwp_callback): Ditto.
6584 (select_event_lwp_callback): Ditto.
6585 (cancel_breakpoints_callback): Ditto.
6586 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6588 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6589 (unsuspend_one_lwp): Update, "entry" parameter is a
6590 struct thread_info * now.
6591 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6593 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6594 Fetch lwpid from thread, not lwp.
6595 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6596 Pass &all_threads to find_inferior, not &all_lwps.
6597 (send_sigstop): Fetch lwpid from thread, not lwp.
6598 (send_sigstop_callback): Update, "entry" parameter is a
6599 struct thread_info * now.
6600 (suspend_and_send_sigstop_callback): Ditto.
6601 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6602 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6603 struct thread_info * now.
6604 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6606 (lwp_running): Update, "entry" parameter is a
6607 struct thread_info * now.
6608 (stop_all_lwps): Fetch ptid from thread.
6609 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6610 (linux_resume_one_lwp): Fetch lwpid from thread.
6611 (linux_set_resume_request): Update, "entry" parameter is a
6612 struct thread_info * now. Fetch pid, lwpid from thread.
6613 (resume_status_pending_p): Update, "entry" parameter is a
6614 struct thread_info * now.
6615 (need_step_over_p): Ditto. Fetch lwpid from thread.
6616 (start_step_over): Fetch lwpid from thread.
6617 (linux_resume_one_thread): Update, "entry" parameter is a
6618 struct thread_info * now. Fetch lwpid from thread.
6619 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6620 (proceed_one_lwp): Update, "entry" parameter is a
6621 struct thread_info * now. Fetch lwpid from thread.
6622 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6623 struct thread_info * now.
6624 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6625 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6626 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6628 (regsets_store_inferior_registers): Ditto.
6629 (fetch_register, store_register): Ditto.
6630 (linux_read_memory, linux_write_memory): Ditto.
6631 (linux_request_interrupt): Ditto.
6632 (linux_read_auxv): Ditto.
6633 (linux_xfer_siginfo): Ditto.
6634 (linux_qxfer_spu): Ditto.
6635 (linux_qxfer_libraries_svr4): Ditto.
6636 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6637 moved to inferiors.h.
6639 (get_thread_lwp): Update.
6640 (struct lwp_info): Delete member "entry". Simplify comment for
6643 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6644 current_inferior directly.
6645 (update_watch_registers_callback): Update, "entry" parameter is a
6646 struct thread_info * now. Fetch pid from thread.
6647 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6648 (mips_insert_point): Fetch lwpid from current_inferior.
6649 Pass &all_threads to find_inferior, not &all_lwps.
6650 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6651 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6653 (mips_stopped_data_address): Ditto.
6654 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6656 * linux-tile-low.c (tile_arch_setup): Ditto.
6657 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6658 (update_debug_registers_callback): Update, "entry" parameter is a
6659 struct thread_info * now. Fetch pid from thread.
6660 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6661 Pass &all_threads to find_inferior, not &all_lwps.
6662 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6663 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6664 Pass &all_threads to find_inferior, not &all_lwps.
6665 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6666 (i386_dr_low_get_status): Ditto.
6667 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6668 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6669 (x86_linux_read_description): Ditto.
6670 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6672 2014-02-20 Doug Evans <dje@google.com>
6674 * inferiors.c (get_first_inferior): Fix buglet.
6676 2014-02-19 Doug Evans <dje@google.com>
6678 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6679 * inferiors.c (add_thread): Change result type to struct thread_info *.
6680 All callers updated.
6681 (add_lwp): Call add_thread here instead of in callers.
6682 All callers updated.
6683 * linux-low.h (get_lwp_thread): Rewrite.
6684 (struct lwp_info): New member "thread".
6686 2014-02-19 Doug Evans <dje@google.com>
6688 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6689 All callers updated.
6691 2014-02-19 Doug Evans <dje@google.com>
6693 * inferiors.c (add_thread): Fix whitespace.
6695 2014-02-19 Doug Evans <dje@google.com>
6697 * dll.c (clear_dlls): Replace accessing list implemention details
6699 * gdbthread.h (get_first_thread): Declare.
6700 * inferiors.c (for_each_inferior_with_data): New function.
6701 (get_first_thread): New function.
6702 (find_thread_ptid): Simplify.
6703 (get_first_inferior): New function.
6704 (clear_list): Delete.
6705 (one_inferior_p): New function.
6706 (clear_inferior_list): New function.
6707 (clear_inferiors): Update.
6708 * inferiors.h (for_each_inferior_with_data): Declare.
6709 (clear_inferior_list): Declare.
6710 (one_inferior_p): Declare.
6711 (get_first_inferior): Declare.
6712 * linux-low.c (linux_wait_for_event): Replace accessing list
6713 implemention details with API function.
6714 * server.c (target_running): Ditto.
6715 (accumulate_file_name_length): New function.
6716 (emit_dll_description): New function.
6717 (handle_qxfer_libraries): Replace accessing list implemention
6718 details with API function.
6719 (handle_qxfer_threads_worker): New function.
6720 (handle_qxfer_threads_proper): Replace accessing list implemention
6721 details with API function.
6722 (handle_query): Ditto.
6723 (visit_actioned_threads_callback_ftype): New typedef.
6724 (visit_actioned_threads_data): New struct.
6725 (visit_actioned_threads): Rewrite to be find_inferior callback.
6726 (resume): Call find_inferior.
6727 (handle_status): Replace accessing list implemention
6728 details with API function.
6729 (process_serial_event): Replace accessing list implemention details
6731 * target.c (set_desired_inferior): Replace accessing list implemention
6732 details with API function.
6733 * tracepoint.c (same_process_p): New function.
6734 (gdb_agent_about_to_close): Replace accessing list implemention
6735 details with API function.
6736 * win32-low.c (child_delete_thread): Replace accessing list
6737 implemention details with API function.
6738 (match_dll_by_basename): New function.
6739 (dll_is_loaded_by_basename): New function.
6740 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6741 details call to dll_is_loaded_by_basename.
6743 2014-02-19 Doug Evans <dje@google.com>
6745 * dll.h (struct dll_info): Add comment.
6746 * gdbthread.h (struct thread_info): Add comment.
6747 (current_ptid): Simplify.
6748 * inferiors.c (add_process): Update.
6749 (remove_process): Update.
6750 * inferiors.h (struct process_info): Rename member "head" to "entry".
6751 * linux-low.c (delete_lwp): Update.
6753 (last_thread_of_process_p): Update.
6754 (kill_one_lwp_callback, linux_kill): Update.
6755 (status_pending_p_callback): Update.
6756 (wait_for_sigstop): Update. Simplify read of ptid.
6757 (start_step_over): Update.
6758 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6759 (get_lwp_thread): Update.
6760 (struct lwp_info): Rename member "head" to "entry".
6761 * regcache.h (inferior_list_entry): Delete.
6762 * server.c (kill_inferior_callback): Update.
6763 (detach_or_kill_inferior_callback): Update.
6764 (print_started_pid): Update.
6765 (print_attached_pid): Update.
6766 (process_serial_event): Simplify read of ptid.
6767 * thread-db.c (thread_db_create_event): Update.
6768 (thread_db_get_tls_address): Update.
6769 * win32-low.c (current_inferior_ptid): Simplify.
6771 2014-02-19 Tom Tromey <tromey@redhat.com>
6773 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6775 (target_supports_btrace): Update.
6777 2014-02-14 Yao Qi <yao@codesourcery.com>
6779 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6780 (rsp-low-ipa.o): New target.
6782 2014-02-12 Tom Tromey <tromey@redhat.com>
6784 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6785 convert_ascii_to_int.
6786 * regcache.c (registers_to_string): Likewise.
6787 * remote-utils.c (decode_M_packet): Likewise.
6788 * server.c (process_serial_event): Likewise.
6790 2014-02-12 Tom Tromey <tromey@redhat.com>
6792 * server.c (handle_query, handle_v_run): Use hex2bin, not
6794 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6796 2014-02-12 Tom Tromey <tromey@redhat.com>
6798 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6799 convert_int_to_ascii.
6800 * regcache.c (registers_to_string, collect_register_as_string):
6802 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6804 * server.c (process_serial_event): Likewise.
6805 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6806 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6808 2014-02-12 Tom Tromey <tromey@redhat.com>
6810 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6811 bin2hex, not hexify.
6812 * tracepoint.c (cmd_qtstatus): Likewise.
6814 2014-02-12 Tom Tromey <tromey@redhat.com>
6816 * remote-utils.c (monitor_output): Pass explicit length to
6819 2014-02-12 Tom Tromey <tromey@redhat.com>
6821 * tracepoint.c: Include rsp-low.h.
6822 * server.c: Include rsp-low.h.
6823 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6824 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6826 * remote-utils.c: Include rsp-low.h.
6827 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6828 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6829 (convert_int_to_ascii, convert_ascii_to_int): Move to
6831 * regcache.c: Include rsp-low.h.
6832 * ax.c: Include rsp-low.h.
6833 * Makefile.in (SFILES): Add common/rsp-low.c.
6834 (OBS): Add rsp-low.o.
6835 (rsp-low.o): New target.
6837 2014-02-12 Tom Tromey <tromey@redhat.com>
6839 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6840 Include print-utils.h.
6841 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6842 (plongest, thirty_two, phex_nz): Remove.
6843 * Makefile.in (SFILES): Add common/print-utils.c.
6844 (OBS): Add print-utils.o.
6845 (print-utils-ipa.o): New target.
6846 (print-utils.o): New target.
6847 (IPA_OBJS): Add print-utils-ipa.o.
6849 2014-02-06 Tom Tromey <tromey@redhat.com>
6851 * Makefile.in (SFILES): Fix indentation.
6853 2014-02-05 Doug Evans <dje@google.com>
6855 * linux-low.c (linux_wait_for_event): Improve comment.
6856 (linux_wait_1): Keep current_inferior in sync with event_child.
6858 2014-01-22 Doug Evans <dje@google.com>
6860 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6862 2014-01-22 Doug Evans <dje@google.com>
6864 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6865 * configure: Regenerate.
6866 * config.in: Regenerate.
6867 * Makefile.in (SFILES): Add debug.c.
6869 * debug.c: New file.
6870 * debug.h: New file.
6871 * linux-aarch64-low.c (*): Update all debugging printfs to use
6872 debug_printf instead of fprintf.
6873 * linux-arm-low.c (*): Ditto.
6874 * linux-cris-low.c (*): Ditto.
6875 * linux-crisv32-low.c (*): Ditto.
6876 * linux-m32r-low.c (*): Ditto.
6877 * linux-sparc-low.c (*): Ditto.
6878 * linux-x86.c (*): Ditto.
6879 * linux-low.c (*): Ditto.
6880 (linux_wait_1): Add calls to debug_enter, debug_exit.
6881 (linux_wait): Remove redundant debugging printf.
6882 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6883 (linux_resume, unstop_all_lwps): Ditto.
6884 * mem-break.c (*): Update all debugging printfs to use
6885 debug_printf instead of fprintf.
6886 * remote-utils.c (*): Ditto.
6887 * thread-db.c (*): Ditto.
6888 * server.c #include <ctype.h>, "gdb_vecs.h".
6889 (debug_threads): Moved to debug.c.
6890 (*): Update all debugging printfs to use debug_printf instead of
6892 (start_inferior): Replace call to fflush with call to debug_flush.
6893 (monitor_show_help): Mention set debug-format.
6894 (parse_debug_format_options): New function.
6895 (handle_monitor_command): Handle "monitor set debug-format".
6896 (gdbserver_usage): Mention --debug-format.
6897 (main): Parse --debug-format.
6898 * server.h (debug_threads): Declaration moved to debug.h.
6900 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6901 trace_debug_1 that uses debug_printf.
6902 (tracepoint_look_up_symbols): Update all debugging printfs to use
6903 debug_printf instead of fprintf.
6905 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6907 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6910 2014-01-17 Pedro Alves <palves@redhat.com>
6913 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6914 defined after including gdb_proc_service.h.
6916 2014-01-16 Doug Evans <dje@google.com>
6918 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6919 (match_dll): Use it.
6921 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6923 * target.h (target_ops) <read_btrace>: Change parameters and
6924 return type to allow error reporting.
6925 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6926 trace reading errors on.
6927 * linux-low.c (linux_low_read_btrace): Pass trace reading
6929 (linux_low_disable_btrace): New.
6931 2014-01-15 Doug Evans <dje@google.com>
6933 * inferiors.c (thread_id_to_gdb_id): Delete.
6934 * inferiors.h (thread_id_to_gdb_id): Delete.
6936 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6938 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6939 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6942 2014-01-08 Pedro Alves <palves@redhat.com>
6944 * server.c (handle_status): Don't discard previous queued stop
6945 replies or thread's pending status here.
6946 (main) <disconnection>: Do it here instead.
6948 2014-01-08 Pedro Alves <palves@redhat.com>
6950 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6951 * server.c (visit_actioned_threads, handle_pending_status): New
6953 (handle_v_cont): Factor out parts to ...
6954 (resume): ... this new function. If in all-stop, and a thread
6955 being resumed has a pending status, report it without actually
6957 (myresume): Adjust to use the new 'resume' function.
6958 (clear_pending_status_callback, set_pending_status_callback)
6959 (find_status_pending_thread_callback): New functions.
6960 (handle_status): Handle the case of multiple threads having
6961 interesting statuses to report. Report threads' real last signal
6962 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6963 with an interesting thread to report the status for, instead of
6964 always reporting the status of the first thread.
6966 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6968 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6969 * gdbreplay.c (gdbreplay_version): Likewise.
6971 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6973 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6974 iov.iov_len with the real length in use.
6976 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6978 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6979 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6980 for all targets that use win32-low.c.
6981 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6982 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6984 2013-12-13 Pedro Alves <palves@redhat.com>
6986 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6987 if equal to TARGET_WAITKIND_LOADED.
6988 * win32-low.c (cached_status): New static global.
6989 (win32_wait): Add declaration.
6990 (do_initial_child_stuff): Flush all initial pending debug events
6991 up to the initial breakpoint.
6992 (win32_wait): If CACHED_STATUS was set, return that instead
6993 of doing a real wait. Remove the code resuming the execution
6994 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6995 during the initial phase. Also remove the code changing
6996 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6997 TARGET_WAITKIND_STOPPED.
6999 2013-12-11 Yao Qi <yao@codesourcery.com>
7001 * notif.c (handle_notif_ack): Return 0 if no notification
7004 2013-11-20 Doug Evans <dje@google.com>
7006 * linux-low.c (linux_set_resume_request): Fix comment.
7008 2013-11-20 Doug Evans <dje@google.com>
7010 * linux-low.c (resume_status_pending_p): Tweak comment.
7012 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7014 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7015 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7016 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7017 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7018 (srv_amd64_regobj): Add amd64-mpx.o.
7019 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7020 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7021 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7022 * i387-fp.c (num_pl_bnd_register) Added constant.
7023 (num_pl_bnd_cfg_registers) Added constant.
7024 (struct i387_xsave) Added reserved area and MPX fields.
7025 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7026 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7028 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7029 (init_registers_amd64_mpx_linux): Declare new function.
7030 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7031 (x86_64_regmap): Add MPX registers.
7032 (x86_linux_read_description): Add MPX case.
7033 (initialize_low_arch): Initialize MPX targets.
7035 2013-11-18 Tom Tromey <tromey@redhat.com>
7037 * configure: Rebuild.
7038 * configure.ac: Don't check for stdlib.h.
7039 * gdbreplay.c: Unconditionally include stdlib.h.
7041 2013-11-18 Tom Tromey <tromey@redhat.com>
7043 * config.in: Rebuild.
7044 * configure: Rebuild.
7045 * configure.ac: Don't use AC_HEADER_DIRENT.
7047 2013-11-18 Tom Tromey <tromey@redhat.com>
7049 * server.h: Don't check HAVE_STRING_H.
7050 * gdbreplay.c: Don't check HAVE_STRING_H.
7051 * configure: Rebuild.
7053 2013-11-18 Tom Tromey <tromey@redhat.com>
7055 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7058 2013-11-08 Tom Tromey <tromey@redhat.com>
7060 * configure, config.in: Rebuild.
7061 * configure.ac: Remove unused configury.
7063 2013-11-08 Tom Tromey <tromey@redhat.com>
7065 * acinclude.m4: Include common.m4, codeset.m4.
7066 * configure, config.in: Rebuild.
7067 * configure.ac: Use GDB_AC_COMMON.
7069 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7071 * linux-s390-low.c (HWCAP_S390_TE): New define.
7072 (s390_arch_setup): Consider the TE field in the HWCAP for
7073 determining 'have_regset_tdb'.
7075 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7078 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7081 2013-10-02 Pedro Alves <palves@redhat.com>
7083 * server.c (process_serial_event): Don't output "GDBserver
7084 exiting" if GDB is connected through stdio.
7085 * target.c (mywait): Likewise, be silent if GDB is connected
7088 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7090 * lynx-low.c (lynx_add_threads_after_attach): New function.
7091 (lynx_attach): Remove call to add_thread. Add call to
7092 lynx_add_threads_after_attach instead.
7094 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7096 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7097 * config.in, configure: Regenerated.
7099 2013-09-18 Yao Qi <yao@codesourcery.com>
7102 * server.c (start_inferior): Clear 'resume_info'.
7104 2013-09-16 Jiong Wang <jiwang@tilera.com>
7106 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7109 2013-09-16 Jiong Wang <jiwang@tilera.com>
7111 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7112 linux-tile-low.o to srv_tgtobj.
7114 2013-09-16 Will Newton <will.newton@linaro.org>
7116 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7119 2013-09-06 Pedro Alves <palves@redhat.com>
7121 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7122 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7123 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7124 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7125 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7126 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7128 2013-09-06 Pedro Alves <palves@redhat.com>
7130 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7131 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7133 2013-09-06 Pedro Alves <palves@redhat.com>
7135 * linux-amd64-ipa.c: Include tracepoint.h.
7136 * linux-i386-ipa.c: Include tracepoint.h.
7138 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7140 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7141 (ps_get_thread_area): New function.
7143 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7145 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7146 (initialize_low_arch): Call init_registers_crisv32 rather than
7147 init_register_crisv32.
7149 2013-09-05 Pedro Alves <palves@redhat.com>
7151 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7153 * hostio.h: ... this new file.
7154 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7155 win32-low.c: Include hostio.h.
7157 2013-09-05 Pedro Alves <palves@redhat.com>
7159 * server.h (gdb_client_data, handler_func, callback_handler_func)
7160 (delete_file_handler, add_file_handler, append_callback_event)
7161 (delete_callback_event, start_event_loop, initialize_event_loop):
7162 Move to event-loop.h and include it.
7163 * event-loop.h: New file.
7165 2013-09-05 Pedro Alves <palves@redhat.com>
7167 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7168 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7169 (loaded_dll, unloaded_dll): Move to ...
7170 * dll.h: ... this new file.
7171 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7173 2013-09-05 Pedro Alves <palves@redhat.com>
7175 * server.h (current_process, get_thread_process, all_processes)
7176 (add_inferior_to_list, for_each_inferior, current_inferior)
7177 (remove_inferior, add_process, remove_process, find_process_pid)
7178 (have_started_inferiors_p, have_attached_inferiors_p)
7179 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7180 (clear_inferiors, find_inferior, find_inferior_id)
7181 (inferior_target_data, set_inferior_target_data)
7182 (inferior_regcache_data, set_inferior_regcache_data): Move to
7183 inferiors.h, and include it.
7184 * inferiors.h: New file.
7186 2013-09-05 Pedro Alves <palves@redhat.com>
7188 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7192 2013-09-05 Pedro Alves <palves@redhat.com>
7194 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7196 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7197 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7198 (handle_tracepoint_general_set, handle_tracepoint_query)
7199 (tracepoint_finished_step, tracepoint_was_hit)
7200 (release_while_stepping_state_list, current_traceframe)
7201 (in_readonly_region, traceframe_read_mem)
7202 (fetch_traceframe_registers, traceframe_read_sdata)
7203 (traceframe_read_info, struct fast_tpoint_collect_status)
7204 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7205 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7206 (supply_fast_tracepoint_registers)
7207 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7208 (ipa_tdesc, claim_trampoline_space)
7209 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7210 (agent_mem_read, agent_get_trace_state_variable_value)
7211 (agent_set_trace_state_variable_value, agent_tsv_read)
7212 (agent_mem_read_string, get_raw_reg_func_addr)
7213 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7214 * tracepoint.h: ... this new file.
7216 2013-09-05 Pedro Alves <palves@redhat.com>
7218 * server.h (perror_with_name, error, fatal, warning, paddress)
7219 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7221 * utils.h: New file.
7223 2013-09-05 Pedro Alves <palves@redhat.com>
7225 * server.h (remote_debug, noack_mode, transport_is_reliable)
7226 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7227 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7228 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7229 (write_enn, initialize_async_io, enable_async_io)
7230 (disable_async_io, check_remote_input_interrupt_request)
7231 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7232 (dead_thread_notify, prepare_resume_reply)
7233 (decode_address_to_semicolon, decode_address, decode_m_packet)
7234 (decode_M_packet, decode_X_packet, decode_xfer_write)
7235 (decode_search_memory_packet, unhexify, hexify)
7236 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7237 (look_up_one_symbol, relocate_instruction)
7238 (monitor_output): Move to remote-utils.h, and include it.
7239 * remote-utils.h: New file.
7241 2013-09-05 Pedro Alves <palves@redhat.com>
7243 * server.h (_): Delete.
7245 2013-09-02 Pedro Alves <palves@redhat.com>
7247 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7248 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7250 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7252 2013-09-02 Pierre Muller <muller@sourceware.org>
7254 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7255 or WriteProcessMemory complete successfully and handle
7256 ERROR_PARTIAL_COPY error.
7258 2013-09-02 Pedro Alves <palves@redhat.com>
7260 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7261 error instead of EIO.
7263 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7266 * linux-low.c: Include filestuff.h.
7267 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7268 * lynx-low.c: Include filestuff.h.
7269 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7270 * server.c: Include filestuff.h.
7271 (main): Call notice_open_fds.
7272 * spu-low.c: Include filestuff.h.
7273 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7275 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7277 * Makefile.in: Explain why ../target and ../nat are not
7278 listed as include file search paths.
7279 (linux-waitpid.o): New object file rule.
7280 * configure.srv (srv_native_linux_obj): New variable.
7281 Replace all occurrences of linux native object files with
7282 $srv_native_linux_obj.
7283 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7284 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7285 (linux_enable_event_reporting): Remove declaration.
7286 (my_waitpid): Moved to common/linux-waitpid.c.
7287 (linux_wait_for_event): Pass ptid when calling
7288 linux_enable_event_reporting.
7289 (linux_supports_tracefork_flag): Remove.
7290 (linux_enable_event_reporting): Likewise.
7291 (linux_tracefork_grandchild): Remove.
7292 (STACK_SIZE): Moved to common/linux-ptrace.c.
7293 (linux_tracefork_child): Remove.
7294 (linux_test_for_tracefork): Remove.
7295 (linux_look_up_symbols): Call linux_supports_traceclone.
7296 (initialize_low): Remove call to linux_test_for_tracefork.
7297 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7298 common/linux-ptrace.h.
7299 (PTRACE_TYPE_ARG4): Likewise.
7300 Include linux-ptrace.h.
7302 2013-08-21 Pedro Alves <palves@redhat.com>
7304 * config.in: Renegerate.
7306 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7308 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7309 (SFILES): Remove $(srcdir)/common/target-common.c and
7310 add $(srcdir)/target/waitstatus.c.
7311 (OBS): Remove target-common.o and add waitstatus.o.
7312 (server_h): Remove $(srcdir)/../common/target-common.h and
7313 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7314 and $(srcdir)/../target/waitstatus.h.
7315 (target-common.o): Remove.
7316 (waitstatus.o): New target object file.
7317 * target.h: Do not include target-common.h and
7318 include target/resume.h, target/wait.h and
7319 target/waitstatus.h.
7321 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7323 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7324 to PTRACE_TYPE_ARG3.
7325 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7326 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7328 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7329 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7331 2013-07-27 Jie Zhang <jie@codesourcery.com>
7332 Daniel Jacobowitz <dan@codesourcery.com>
7333 Yao Qi <yao@codesourcery.com>
7335 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7336 (mips-linux-watch.o): New rule.
7337 (mips_linux_watch_h): New variable.
7338 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7340 * linux-mips-low.c: Include mips-linux-watch.h.
7341 (struct arch_process_info, struct arch_lwp_info): New.
7342 (update_watch_registers_callback): New function.
7343 (mips_linux_new_process, mips_linux_new_thread) New functions.
7344 (mips_linux_prepare_to_resume, mips_insert_point): New
7346 (mips_remove_point, mips_stopped_by_watchpoint): New
7348 (rsp_bp_type_to_target_hw_bp_type): New function.
7349 (mips_stopped_data_address): New function.
7350 (the_low_target): Add watchpoint support functions.
7352 2013-07-27 Yao Qi <yao@codesourcery.com>
7354 * i386-low.c: Include break-common.h.
7355 (enum target_hw_bp_type): Remove.
7357 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7359 * Makefile.in (SFILES): /common/target-common.c.
7360 (OBS): Add target-common.o.
7361 (server_h): Add $(srcdir)/../common/target-common.h.
7362 (target-common.o): New target.
7363 * server.c (queue_stop_reply_callback): Free
7364 status string after use.
7365 * target.c (target_waitstatus_to_string): Remove.
7366 * target.h: Include target-common.h.
7367 (resume_kind): Likewise.
7368 (target_waitkind): Likewise.
7369 (target_waitstatus): Likewise.
7370 (TARGET_WNOHANG): Likewise.
7372 2013-07-04 Yao Qi <yao@codesourcery.com>
7374 * Makefile.in (host_alias): Use @host_noncanonical@.
7375 (target_alias): Use @target_noncanonical@.
7376 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7377 ACX_NONCANONICAL_HOST.
7378 * configure: Regenerated.
7381 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7383 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7384 * configure: Rebuild.
7385 * Makefile.in (version_host, version_target): Get from configure.
7386 (version.c): Use $(version_host) and $(version_target).
7388 2013-07-03 Pedro Alves <palves@redhat.com>
7390 * Makefile.in (config.status): Depend on development.sh.
7391 * acinclude.m4: Include libmcheck.m4.
7392 * configure: Regenerate.
7394 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7396 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7397 attribute inside the parentheses.
7398 (winapi_DebugSetProcessKillOnExit): Ditto.
7399 (winapi_DebugBreakProcess): Ditto.
7400 (winapi_GenerateConsoleCtrlEvent): Ditto.
7402 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7404 * notif.h (notif_event): Add a dummy member to avoid compiler
7407 2013-07-01 Pedro Alves <palves@redhat.com>
7409 * hostio.c (HOSTIO_PATH_MAX): Define.
7410 (require_filename, handle_open, handle_unlink, handle_readlink):
7413 2013-07-01 Pedro Alves <palves@redhat.com>
7415 * server.h: Include "pathmax.h".
7416 * linux-low.c: Don't include sys/param.h.
7417 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7419 * win32-low.c: Don't include sys/param.h.
7420 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7422 2013-07-01 Pedro Alves <palves@redhat.com>
7424 * event-loop.c: Don't check HAVE_UNISTD_H before including
7426 * gdbreplay.c: Likewise.
7427 * remote-utils.c: Likewise.
7428 * server.c: Likewise.
7429 * configure.ac: Don't check for unistd.h.
7430 * configure: Regenerate.
7432 2013-06-28 Tom Tromey <tromey@redhat.com>
7434 * Makefile.in (version.c): Use version.in, not
7437 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7439 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7440 * configure: Rebuild.
7441 * Makefile.in (version_host, version_target): Get from configure.
7442 (version.c): Use $(version_host) and $(version_target).
7444 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7446 Fix trace-status to output user name without trailing colon.
7447 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7449 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7451 Fix trace-status to output proper start-time and stop-time.
7452 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7453 output start time and stop time in hex as gdb expects.
7455 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7457 * tracepoint.c (build_traceframe_info_xml): Output trace state
7458 variables present in the trace buffer.
7460 2013-06-24 Tom Tromey <tromey@redhat.com>
7462 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7464 (version.o): Remove.
7465 * gdbreplay.c: Include version.h.
7466 (version, host_name): Don't declare.
7467 * server.h: Include version.h.
7468 (version, host_name): Don't declare.
7470 2013-06-12 Pedro Alves <palves@redhat.com>
7472 * linux-x86-low.c (linux_is_elf64): Delete global.
7473 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7474 with local linux_pid_exe_is_elf_64_file use.
7476 2013-06-11 Pedro Alves <palves@redhat.com>
7478 * linux-low.c (regset_disabled, disable_regset): New functions.
7479 (regsets_fetch_inferior_registers)
7480 (regsets_store_inferior_registers): Use them.
7481 (initialize_regsets_info); Don't allocate the disabled_regsets
7483 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7486 2013-06-11 Pedro Alves <palves@redhat.com>
7488 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7491 2013-06-11 Pedro Alves <palves@redhat.com>
7493 * linux-x86-low.c (initialize_low_arch): Call
7494 init_registers_x32_avx_linux.
7496 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7498 Fix compatibility with Android Bionic.
7499 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7502 2013-06-07 Pedro Alves <palves@redhat.com>
7505 * Makefile.in (OBS): Add tdesc.o.
7506 (IPA_OBJS): Add tdesc-ipa.o.
7507 (tdesc-ipa.o): New rule.
7508 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7510 * linux-low.c (new_inferior): Delete.
7511 (disabled_regsets, num_regsets): Delete.
7512 (linux_add_process): Adjust to set the new per-process
7514 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7515 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7516 was a stop. When calling arch_setup, switch the current inferior
7517 to the thread that got an event.
7518 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7519 (regsets_fetch_inferior_registers)
7520 (regsets_store_inferior_registers): New regsets_info parameter.
7522 (linux_register_in_regsets): New regs_info parameter. Adjust to
7524 (register_addr, fetch_register, store_register): New usrregs_info
7525 parameter. Adjust to use it.
7526 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7527 parameter regs_info. Adjust to use it.
7528 (linux_fetch_registers): Get the current inferior's regs_info, and
7530 (linux_store_registers): Ditto.
7531 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7532 (initialize_low): Don't initialize the target_regsets here. Call
7533 initialize_low_arch.
7534 * linux-low.h (target_regsets): Delete declaration.
7535 (struct regsets_info): New.
7536 (struct usrregs_info): New.
7537 (struct regs_info): New.
7538 (struct process_info_private) <new_inferior>: New field.
7539 (struct linux_target_ops): Delete the num_regs, regmap, and
7540 regset_bitmap fields. New field regs_info.
7541 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7542 * i387-fp.c (num_xmm_registers): Delete.
7543 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7544 calls to new interface.
7545 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7546 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7547 Infer the number of xmm registers from the regcache's target
7549 * i387-fp.h (num_xmm_registers): Delete.
7550 * inferiors.c (add_thread): Don't install the thread's regcache
7552 * proc-service.c (gregset_info): Fetch the current inferior's
7553 regs_info. Adjust to use it.
7554 * regcache.c: Include tdesc.h.
7555 (register_bytes, reg_defs, num_registers)
7556 (gdbserver_expedite_regs): Delete.
7557 (get_thread_regcache): If the thread doesn't have a regcache yet,
7558 create one, instead of aborting gdbserver.
7559 (regcache_invalidate_one): Rename to ...
7560 (regcache_invalidate_thread): ... this.
7561 (regcache_invalidate_one): New.
7562 (regcache_invalidate): Only invalidate registers of the current
7564 (init_register_cache): Add target_desc parameter, and use it.
7565 (new_register_cache): Ditto. Assert the target description has a
7566 non zero registers_size.
7567 (regcache_cpy): Add assertions. Adjust.
7568 (realloc_register_cache, set_register_cache): Delete.
7569 (registers_to_string, registers_from_string): Adjust.
7570 (find_register_by_name, find_regno, find_register_by_number)
7571 (register_cache_size): Add target_desc parameter, and use it.
7572 (free_register_cache_thread, free_register_cache_thread_one)
7573 (regcache_release, register_cache_size): New.
7574 (register_size): Add target_desc parameter, and use it.
7575 (register_data, supply_register, supply_register_zeroed)
7576 (supply_regblock, supply_register_by_name, collect_register)
7577 (collect_register_as_string, collect_register_by_name): Adjust.
7578 * regcache.h (struct target_desc): Forward declare.
7579 (struct regcache) <tdesc>: New field.
7580 (init_register_cache, new_register_cache): Add target_desc
7582 (regcache_invalidate_thread): Declare.
7583 (regcache_invalidate_one): Delete declaration.
7584 (regcache_release): Declare.
7585 (find_register_by_number, register_cache_size, register_size)
7586 (find_regno): Add target_desc parameter.
7587 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7589 * remote-utils.c: Include tdesc.h.
7590 (outreg, prepare_resume_reply): Adjust.
7591 * server.c: Include tdesc.h.
7592 (gdbserver_xmltarget): Delete declaration.
7593 (get_features_xml, process_serial_event): Adjust.
7594 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7596 (struct process_info) <tdesc>: New field.
7597 (ipa_tdesc): Declare.
7598 * tdesc.c: New file.
7599 * tdesc.h: New file.
7600 * tracepoint.c: Include tdesc.h.
7601 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7602 (get_context_regcache): Adjust to pass ipa_tdesc down.
7603 (do_action_at_tracepoint): Adjust to get the register cache size
7604 from the context regcache's description.
7605 (traceframe_walk_blocks): Adjust to get the register cache size
7606 from the current trace frame's description.
7607 (traceframe_get_pc): Adjust to get current trace frame's
7608 description and pass it down.
7609 (gdb_collect): Adjust to get the register cache size from the
7611 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7612 (gdbserver_xmltarget): Delete.
7613 (initialize_low_tracepoint): Set the ipa's target description.
7614 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7615 (initialize_low_tracepoint): Set the ipa's target description.
7616 * linux-x86-low.c: Include tdesc.h.
7617 [__x86_64__] (is_64bit_tdesc): New.
7618 (ps_get_thread_area, x86_get_thread_area): Use it.
7619 (i386_cannot_store_register): Rename to ...
7620 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7621 (i386_cannot_fetch_register): Rename to ...
7622 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7623 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7625 (target_regsets): Rename to ...
7626 (x86_regsets): ... this.
7627 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7629 (x86_siginfo_fixup): Use is_64bit_tdesc.
7630 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7631 (tdesc_x32_avx_linux, tdesc_x32_linux)
7632 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7634 (x86_linux_update_xmltarget): Delete.
7635 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7636 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7637 (AMD64_LINUX_USER64_CS): New.
7638 (x86_linux_read_description): New, based on
7639 x86_linux_update_xmltarget.
7640 (same_process_callback): New.
7641 (x86_arch_setup_process_callback): New.
7642 (x86_linux_update_xmltarget): New.
7643 (x86_regsets_info): New.
7644 (amd64_linux_regs_info): New.
7645 (i386_linux_usrregs_info): New.
7646 (i386_linux_regs_info): New.
7647 (x86_linux_regs_info): New.
7648 (x86_arch_setup): Reimplement.
7649 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7650 (x86_emit_ops): Ditto.
7651 (the_low_target): Adjust. Install x86_linux_regs_info,
7652 x86_cannot_fetch_register, and x86_cannot_store_register.
7653 (initialize_low_arch): New.
7654 * linux-ia64-low.c (tdesc_ia64): Declare.
7655 (ia64_fetch_register): Adjust.
7656 (ia64_usrregs_info, regs_info): New globals.
7657 (ia64_regs_info): New function.
7658 (the_low_target): Adjust.
7659 (initialize_low_arch): New function.
7660 * linux-sparc-low.c (tdesc_sparc64): Declare.
7661 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7663 (sparc_arch_setup): New function.
7664 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7665 (the_low_target): Adjust.
7666 (initialize_low_arch): New function.
7667 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7668 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7669 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7670 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7671 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7672 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7673 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7674 (tdesc_powerpc_isa205_vsx64l): Declare.
7675 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7676 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7677 (ppc_set_pc, ppc_get_hwcap): Adjust.
7678 (ppc_usrregs_info): Forward declare.
7679 (!__powerpc64__) ppc_regmap_adjusted: New global.
7680 (ppc_arch_setup): Adjust to the current process'es target
7682 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7683 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7684 (ppc_store_evrregset): Adjust.
7685 (target_regsets): Rename to ...
7686 (ppc_regsets): ... this, and make static.
7687 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7688 (ppc_regs_info): New function.
7689 (the_low_target): Adjust.
7690 (initialize_low_arch): New function.
7691 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7692 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7693 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7694 (tdesc_s390x_linux64v2): Declare.
7695 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7696 (s390_fill_gregset, s390_store_last_break): Adjust.
7697 (target_regsets): Rename to ...
7698 (s390_regsets): ... this, and make static.
7699 (s390_get_pc, s390_set_pc): Adjust.
7700 (s390_get_hwcap): New target_desc parameter, and use it.
7701 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7702 (s390_arch_setup): Adjust to set the current process'es target
7703 description. Don't adjust the regmap.
7704 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7705 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7706 (regs_info_3264): New globals.
7707 (s390_regs_info): New function.
7708 (the_low_target): Adjust.
7709 (initialize_low_arch): New function.
7710 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7711 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7712 [__mips64] (init_registers_mips_linux)
7713 (init_registers_mips_dsp_linux): Delete defines.
7714 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7715 (have_dsp): New global.
7716 (mips_read_description): New, based on mips_arch_setup.
7717 (mips_arch_setup): Reimplement.
7718 (get_usrregs_info): New function.
7719 (mips_cannot_fetch_register, mips_cannot_store_register)
7720 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7721 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7722 (target_regsets): Rename to ...
7723 (mips_regsets): ... this, and make static.
7724 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7725 (dsp_regs_info, regs_info): New globals.
7726 (mips_regs_info): New function.
7727 (the_low_target): Adjust.
7728 (initialize_low_arch): New function.
7729 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7730 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7732 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7733 (arm_read_description): New, with bits factored from
7735 (arm_arch_setup): Reimplement.
7736 (target_regsets): Rename to ...
7737 (arm_regsets): ... this, and make static.
7738 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7739 (arm_regs_info): New function.
7740 (the_low_target): Adjust.
7741 (initialize_low_arch): New function.
7742 * linux-m68k-low.c (tdesc_m68k): Declare.
7743 (target_regsets): Rename to ...
7744 (m68k_regsets): ... this, and make static.
7745 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7746 (m68k_regs_info): New function.
7747 (m68k_arch_setup): New function.
7748 (the_low_target): Adjust.
7749 (initialize_low_arch): New function.
7750 * linux-sh-low.c (tdesc_sharch): Declare.
7751 (target_regsets): Rename to ...
7752 (sh_regsets): ... this, and make static.
7753 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7754 (sh_regs_info, sh_arch_setup): New functions.
7755 (the_low_target): Adjust.
7756 (initialize_low_arch): New function.
7757 * linux-bfin-low.c (tdesc_bfin): Declare.
7758 (bfin_arch_setup): New function.
7759 (bfin_usrregs_info, regs_info): New globals.
7760 (bfin_regs_info): New function.
7761 (the_low_target): Adjust.
7762 (initialize_low_arch): New function.
7763 * linux-cris-low.c (tdesc_cris): Declare.
7764 (cris_arch_setup): New function.
7765 (cris_usrregs_info, regs_info): New globals.
7766 (cris_regs_info): New function.
7767 (the_low_target): Adjust.
7768 (initialize_low_arch): New function.
7769 * linux-cris-low.c (tdesc_crisv32): Declare.
7770 (cris_arch_setup): New function.
7771 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7772 (cris_regs_info): New function.
7773 (the_low_target): Adjust.
7774 (initialize_low_arch): New function.
7775 * linux-m32r-low.c (tdesc_m32r): Declare.
7776 (m32r_arch_setup): New function.
7777 (m32r_usrregs_info, regs_info): New globals.
7778 (m32r_regs_info): Adjust.
7779 (initialize_low_arch): New function.
7780 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7781 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7782 (tic6x_usrregs_info): Forward declare.
7783 (tic6x_read_description): New function, based on ...
7784 (tic6x_arch_setup): ... this. Reimplement.
7785 (target_regsets): Rename to ...
7786 (tic6x_regsets): ... this, and make static.
7787 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7788 (tic6x_regs_info): New function.
7789 (the_low_target): Adjust.
7790 (initialize_low_arch): New function.
7791 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7792 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7793 (target_regsets): Rename to ...
7794 (xtensa_regsets): ... this, and make static.
7795 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7797 (xtensa_arch_setup, xtensa_regs_info): New functions.
7798 (the_low_target): Adjust.
7799 (initialize_low_arch): New function.
7800 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7801 (nios2_arch_setup): Set the current process'es tdesc.
7802 (target_regsets): Rename to ...
7803 (nios2_regsets): ... this.
7804 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7805 (nios2_regs_info): New function.
7806 (the_low_target): Adjust.
7807 (initialize_low_arch): New function.
7808 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7809 (aarch64_arch_setup): Set the current process'es tdesc.
7810 (target_regsets): Rename to ...
7811 (aarch64_regsets): ... this.
7812 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7813 (aarch64_regs_info): New function.
7814 (the_low_target): Adjust.
7815 (initialize_low_arch): New function.
7816 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7818 (target_regsets): Rename to ...
7819 (tile_regsets): ... this.
7820 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7821 (tile_regs_info): New function.
7822 (tile_arch_setup): Set the current process'es tdesc.
7823 (the_low_target): Adjust.
7824 (initialize_low_arch): New function.
7825 * spu-low.c (tdesc_spu): Declare.
7826 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7827 * win32-arm-low.c (tdesc_arm): Declare.
7828 (arm_arch_setup): New function.
7829 (the_low_target): Install arm_arch_setup instead of
7831 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7832 (init_windows_x86): Rename to ...
7833 (i386_arch_setup): ... this. Set `win32_tdesc'.
7834 (the_low_target): Adjust.
7835 * win32-low.c (win32_tdesc): New global.
7836 (child_add_thread): Don't create the thread cache here.
7837 (do_initial_child_stuff): Set the new process'es tdesc.
7838 * win32-low.h (struct target_desc): Forward declare.
7839 (win32_tdesc): Declare.
7840 * lynx-i386-low.c (tdesc_i386): Declare global.
7841 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7842 * lynx-low.c (lynx_tdesc): New global.
7843 (lynx_add_process): Set the new process'es tdesc.
7844 * lynx-low.h (struct target_desc): Forward declare.
7845 (lynx_tdesc): Declare global.
7846 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7847 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7848 * nto-low.c (nto_tdesc): New global.
7849 (do_attach): Set the new process'es tdesc.
7850 * nto-low.h (struct target_desc): Forward declare.
7851 (nto_tdesc): Declare.
7852 * nto-x86-low.c (tdesc_i386): Declare.
7853 (nto_x86_arch_setup): Set `nto_tdesc'.
7855 2013-06-04 Gary Benson <gbenson@redhat.com>
7857 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7858 to qSupported response when appropriate.
7859 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7860 with nonzero-length annex.
7861 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7862 arguments supplied in annex.
7864 2013-05-31 Doug Evans <dje@google.com>
7867 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7868 64 bits in 64-cross-32 environment.
7870 2013-05-28 Pedro Alves <palves@redhat.com>
7872 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7873 (aarch64-without-fpu.c): Delete rule.
7874 * configure.srv (aarch64*-*-linux*): Remove references to
7875 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7876 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7879 2013-05-24 Pedro Alves <palves@redhat.com>
7881 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7882 instead of strchr/decode_address. Error if the range isn't split
7883 with a ','. Don't assume there's be a ':' in the action.
7885 2013-05-23 Yao Qi <yao@codesourcery.com>
7886 Pedro Alves <palves@redhat.com>
7888 * linux-low.c (lwp_in_step_range): New function.
7889 (linux_wait_1): If the thread was range stepping and stopped
7890 outside the stepping range, report the stop to GDB. Otherwise,
7891 continue stepping. Add range stepping debug output.
7892 (linux_set_resume_request): Copy the step range from the resume
7894 (linux_supports_range_stepping): New.
7895 (linux_target_ops) <supports_range_stepping>: Set to
7896 linux_supports_range_stepping.
7897 * linux-low.h (struct linux_target_ops)
7898 <supports_range_stepping>: New field.
7899 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7900 * linux-x86-low.c (x86_supports_range_stepping): New.
7901 (the_low_target) <supports_range_stepping>: Set to
7902 x86_supports_range_stepping.
7903 * server.c (handle_v_cont): Handle 'r' action.
7904 (handle_v_requests): Append ";r" if the target supports range
7906 * target.h (struct thread_resume) <step_range_start,
7907 step_range_end>: New fields.
7908 (struct target_ops) <supports_range_stepping>:
7910 (target_supports_range_stepping): New macro.
7912 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7914 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7915 confusion in comment.
7917 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7919 * lynx-low.c (struct process_info_private): New type.
7920 (lynx_add_process): New function.
7921 (lynx_create_inferior, lynx_attach): Replace calls to
7922 add_process by calls to lynx_add_process.
7923 (lynx_resume): If PTID is null, then try using
7924 current_process()->private->last_wait_event_ptid.
7926 (lynx_clear_inferiors): Delete. The contents of that function
7927 has been inlined in lynx_mourn;
7928 (lynx_wait_1): Save the ptid in the process's private data.
7929 (lynx_mourn): Free the process' private data. Replace call
7930 to lynx_clear_inferiors by call to clear_inferiors.
7932 2013-05-17 Yao Qi <yao@codesourcery.com>
7934 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7937 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7939 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7940 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7941 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7942 PT_TEXT_END_ADDR guards. Update comments.
7943 (linux_target_op) <read_offsets>: Conditionally define to
7944 linux_read_offsets if the target is UCLIBC and if it defines
7945 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7947 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7948 Andrew Jenner <andrew@codesourcery.com>
7950 * Makefile.in (SFILES): Add linux-nios2-low.c.
7951 (clean): Add action to delete nios2-linux.c.
7952 (nios2-linux.c): New rule.
7953 * configure.srv: Add nios2*-*-linux*.
7954 * linux-nios2-low.c: New.
7956 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7958 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7960 2013-04-25 Hui Zhu <hui@codesourcery.com>
7963 * ax.c (ax_printf): Add fflush.
7965 2013-04-22 Tom Tromey <tromey@redhat.com>
7967 * Makefile.in (SFILES): Add filestuff.c.
7968 (OBS): Add filestuff.o.
7969 (filestuff.o): New target.
7970 * config.in, configure: Rebuild.
7971 * configure.ac: Check for fdwalk, pipe2.
7973 2013-04-17 Pedro Alves <palves@redhat.com>
7975 * configure.ac (USE_THREAD_DB): Delete variable.
7976 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7977 Don't AC_SUBST USE_THREAD_DB.
7978 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7979 * config.in, configure: Regenerate.
7981 2013-04-16 Pedro Alves <palves@redhat.com>
7983 * linux-low.h (struct lwp_info) <thread_known>: Move under
7984 the USE_THREAD_DB #ifdef.
7986 2013-04-16 Pedro Alves <palves@redhat.com>
7988 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7989 (linux-low.o): Delete rule.
7990 * linux-low.h: Always include "gdb_thread_db.h" instead of
7991 conditionally including thread_db.h.
7992 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7995 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7997 * Makefile.in (install-only): Fix make install regression.
7999 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8001 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8002 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8004 * gdbserver.1: Remove.
8006 2013-03-22 Pedro Alves <palves@redhat.com>
8008 * linux-low.c (handle_extended_wait): Don't call
8009 linux_enable_event_reporting.
8011 2013-03-15 Tony Theodore <tonyt@logyst.com>
8014 * Makefile.in (SHELL): Use @SHELL@.
8016 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8018 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8021 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8023 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8024 Remove extraneous NULL element.
8026 2013-03-13 Yao Qi <yao@codesourcery.com>
8028 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8029 'V' block in trace frame.
8031 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8033 * target.h (struct target_ops): Add btrace ops.
8034 (target_supports_btrace): New macro.
8035 (target_enable_btrace): New macro.
8036 (target_disable_btrace): New macro.
8037 (target_read_btrace): New macro.
8038 * gdbthread.h (struct thread_info): Add btrace field.
8039 * server.c: Include btrace-common.h.
8040 (handle_btrace_general_set): New function.
8041 (handle_btrace_enable): New function.
8042 (handle_btrace_disable): New function.
8043 (handle_general_set): Call handle_btrace_general_set.
8044 (handle_qxfer_btrace): New function.
8045 (struct qxfer qxfer_packets[]): Add btrace entry.
8046 * inferiors.c (remove_thread): Disable btrace.
8047 * linux-low: Include linux-btrace.h.
8048 (linux_low_enable_btrace): New function.
8049 (linux_low_read_btrace): New function.
8050 (linux_target_ops): Add btrace ops.
8051 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8052 Add srv_linux_btrace=yes.
8053 (x86_64-*-linux*): Add linux-btrace.o.
8054 Add srv_linux_btrace=yes.
8055 * configure.ac: Define HAVE_LINUX_BTRACE.
8056 * config.in: Regenerated.
8057 * configure: Regenerated.
8059 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8061 * server.c (handle_qxfer): Preserve error message if -3 is
8063 (qxfer): Document the -3 return value.
8065 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8067 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8068 (linux_btrace_h): New variable.
8069 (linux-btrace.o): New rule.
8071 2013-03-08 Stan Shebs <stan@codesourcery.com>
8072 Hafiz Abid Qadeer <abidh@codesourcery.com>
8074 * tracepoint.c (trace_buffer_size): New global.
8075 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8076 (init_trace_buffer): Change to one-argument function. Allocate
8077 trace buffer memory.
8078 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8079 handle QTBuffer:size packet.
8080 (cmd_bigqtbuffer_size): New function.
8081 (initialize_tracepoint): Call init_trace_buffer with
8082 DEFAULT_TRACE_BUFFER_SIZE.
8083 * server.c (handle_query): Add QTBuffer:size in the
8086 2013-03-07 Yao Qi <yao@codesourcery.com>
8088 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8089 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8091 (cmd_qtsp): Adjust condition. Do post increment.
8092 Set cur_action and cur_step_action back to 0.
8094 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8097 * linux-low.c (linux_write_memory): Return early success if LEN is
8100 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8102 * configure.srv: Add x86_64-*-cygwin* as target.
8104 2013-02-28 Tom Tromey <tromey@redhat.com>
8106 * configure.ac: Invoke AC_SYS_LARGEFILE.
8107 * configure, config.in: Rebuild.
8109 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8111 * win32-low.c: Throughout, fix format strings and casts of
8112 printf-like functions to avoid type related warnings on all
8114 (get_child_debug_event): Print dwDebugEventCode as hex since
8115 that's how it's usually documented.
8117 2013-02-28 Yao Qi <yao@codesourcery.com>
8119 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8122 2013-02-27 Jiong Wang <jiwang@tilera.com>
8124 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8125 (reg-tilegx32.c): New rule.
8126 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8127 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8128 different register info initializer according to elf class.
8129 (init_registers_tilgx32): New function. The tilegx32 register info
8131 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8132 (tile_store_gregset): Likewise.
8134 2013-02-27 Yao Qi <yao@codesourcery.com>
8136 * server.c (process_point_options): Print debug message when
8137 debug_threads is true.
8139 2013-02-26 Yao Qi <yao@codesourcery.com>
8141 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8143 2013-02-19 Pedro Alves <palves@redhat.com>
8144 Kai Tietz <ktietz@redhat.com>
8148 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8149 instead of strtoul to extract address from packet.
8150 (process_serial_event) <'z'>: Likewise.
8152 2013-02-18 Yao Qi <yao@codesourcery.com>
8154 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8156 2013-02-14 Pedro Alves <palves@redhat.com>
8160 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8161 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8163 2013-02-14 Pedro Alves <palves@redhat.com>
8165 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8167 2013-02-14 Pedro Alves <palves@redhat.com>
8169 * tracepoint.c (save_string): Delete.
8170 (add_tracepoint_action): Use savestring instead of save_string.
8172 2013-02-12 Pedro Alves <palves@redhat.com>
8174 * linux-xtensa-low.c: Ditto.
8175 * xtensa-xtregs.c: Ditto.
8177 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8179 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8182 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8184 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8185 aarch64_num_wp_regs and aarch64_num_bp_regs to
8186 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8188 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8190 * linux-aarch64-low.c (ps_get_thread_area): Replace
8191 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8193 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8194 Marcus Shawcroft <marcus.shawcroft@arm.com>
8195 Nigel Stephens <nigel.stephens@arm.com>
8196 Yufeng Zhang <yufeng.zhang@arm.com>
8198 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8199 (aarch64.c, aarch64-without-fpu.c): New targets.
8200 * configure.srv (aarch64*-*-linux*): New.
8201 * linux-aarch64-low.c: New file.
8203 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8205 * linux-low.c (handle_extended_wait, linux_create_inferior)
8206 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8207 (dequeue_one_deferred_signal, linux_resume_one_thread)
8208 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8209 (linux_tracefork_grandchild, linux_test_for_tracefork)
8210 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8211 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8212 where the argument is 0.
8214 2013-01-25 Yao Qi <yao@codesourcery.com>
8216 * event-loop.c: Include "queue.h".
8217 (gdb_event_p): New typedef.
8218 (struct gdb_event) <next_event>: Remove.
8219 (event_queue): Change to QUEUE(gdb_event_p).
8220 (async_queue_event): Remove.
8221 (gdb_event_xfree): New.
8222 (initialize_event_loop): New.
8223 (process_event): Use API from QUEUE.
8224 (wait_for_event): Likewise.
8225 * server.c (main): Call initialize_event_loop.
8226 * server.h (initialize_event_loop): Declare.
8228 2013-01-18 Yao Qi <yao@codesourcery.com>
8230 * ax.h (struct eval_agent_expr_context): New.
8231 (gdb_eval_agent_expr): Update declaration.
8232 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8233 TFRAME. Add new argument CTX.
8234 * server.h (struct eval_agent_expr_context): Declare.
8235 (agent_mem_read, agent_tsv_read): Update declaration.
8236 (agent_mem_read_string): Likewise.
8237 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8238 (add_traceframe_block): Add new argument TPOINT.
8239 Increase TPOINT->traceframe_usage.
8240 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8241 eval_tracepoint_agent_expr.
8242 (condition_true_at_tracepoint): Likewise.
8243 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8244 (agent_mem_read_string, agent_tsv_read): Likewise.
8246 2013-01-16 Yao Qi <yao@codesourcery.com>
8248 * linux-low.c (linux_resume_one_lwp): Don't check
8249 'lwp->bp_reinsert != 0'.
8251 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8252 Pedro Alves <palves@redhat.com>
8254 * lynx-low.c (ptrace_request_to_str): Define a temporary
8255 macro and use it to simplify this function's implementation.
8257 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8259 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8262 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8264 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8266 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8268 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8270 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8272 * lynx-low.c (lynx_resume): Use the resume_info parameter
8273 to determine the ptid for the lynx_ptrace call, unless
8274 it is equal to minus_one_ptid, in which case we use the
8275 ptid of the current_inferior.
8276 (lynx_wait_1): After having received a thread create/exit
8277 event, resume the inferior's execution using the signaling
8278 thread's ptid, rather than the old ptid.
8280 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8282 * lynx-low.c (lynx_resume): Delete variable ret.
8284 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8286 * gdbreplay.c (gdbreplay_version): Update copyright year.
8287 * server.c (gdbserver_version): Likewise.
8289 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8291 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8294 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8296 * lynx-low.c (ptrace_request_to_str): Add handling for
8299 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8301 * lynx-low.c (lynx_attach): Delete variable new_process.
8303 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8305 * lynx-low.c (lynx_create_inferior): Delete variable
8308 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8310 * lynx-low.c (ptrace_request_to_str): Do not handle
8311 PTRACE_GETTHREADLIST if this macro does not exist.
8313 2012-12-15 Yao Qi <yao@codesourcery.com>
8315 * Makefile.in (OBS): Add notif.o.
8316 * notif.c, notif.h: New.
8317 * server.c: Include "notif.h".
8318 (struct vstop_notif) <next>: Remove.
8320 (queue_stop_reply): Update.
8321 (push_event, send_next_stop_reply): Remove.
8322 (discard_queued_stop_replies): Update.
8323 (notif_stop): New variable.
8324 (handle_v_stopped): Remove.
8325 (handle_v_requests): Don't call handle_v_stopped. Call
8326 handle_ack_notif instead.
8327 (queue_stop_reply_callback): Call notif_event_enque instead
8328 of queue_stop_reply.
8329 (handle_status): Don't call send_next_stop_reply, call
8330 notif_write_event instead.
8331 (kill_inferior_callback): Likewise.
8332 (detach_or_kill_inferior_callback): Likewise.
8333 (main): Call initialize_notif.
8334 (process_serial_event): Call QUEUE_is_empty.
8335 (handle_target_event): Call notif_push instead of push event.
8336 * server.h (push_event): Remove declaration.
8338 2012-12-10 Tom Tromey <tromey@redhat.com>
8340 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8341 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8344 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8345 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8346 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8347 (amd64-linux-ipa.o, ax.o): Rewrite.
8348 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8349 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8350 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8351 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8352 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8353 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8354 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8355 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8356 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8357 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8358 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8359 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8360 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8361 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8362 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8363 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8364 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8365 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8366 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8367 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8368 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8369 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8370 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8371 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8372 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8373 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8374 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8375 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8376 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8377 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8378 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8379 (reg-tilegx.o): Remove.
8380 (all_object_files): New macro.
8381 Include .deps files.
8382 * aclocal.m4, configure: Rebuild.
8383 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8384 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8385 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8387 2012-12-05 Tom Tromey <tromey@redhat.com>
8390 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8392 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8394 * configure.ac: Check for linux/perf_event.h.
8395 * config.in: Regenerated.
8396 * configure: Regenerated.
8398 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8400 * hostio.c (handle_readlink): Decrease buffer size
8401 parameter passed to readlink by one byte.
8403 2012-11-26 Yao Qi <yao@codesourcery.com>
8405 * configure.ac (build_warnings): Append '-Wempty-body'.
8406 * configure: Regenerated.
8407 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8410 2012-11-15 Pierre Muller <muller@sourceware.org>
8412 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8413 * config.in: Regenerate.
8414 * configure: Regenerate.
8415 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8416 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8417 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8418 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8420 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8421 instead of <sys/wait.h> header.
8422 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8424 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8426 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8427 (various make rules): Remove -DGDBSERVER
8429 2012-11-09 Yao Qi <yao@codesourcery.com>
8431 * spu-low.c (current_ptid): Move it to ..
8432 * gdbthread.h: ... here. New.
8433 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8434 * server.c (myresume, process_serial_event): Likewise.
8435 * thread-db.c (thread_db_find_new_threads): Likewise.
8436 * tracepoint.c (run_inferior_command): Likewise.
8438 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8440 * server.c (handle_search_memory_1): Include access length in
8443 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8445 * linux-crisv32-low.c: Fix compile errors.
8447 2012-09-04 Yao Qi <yao@codesourcery.com>
8449 * tracepoint.c (cmd_qtsv): Adjust debug message.
8450 Don't check CUR_TPOINT.
8452 2012-08-28 Yao Qi <yao@codesourcery.com>
8454 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8455 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8456 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8457 Remove declarations of xmalloc, xreallloc, xstrdup and
8459 * Makefile.in (libiberty_h): New.
8460 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8461 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8463 2012-08-23 Yao Qi <yao@codesourcery.com>
8465 * server.h: Remove declaration of 'xsnprintf'.
8467 2012-08-22 Keith Seitz <keiths@redhat.com>
8469 * server.h: Include build-gnulib-gbserver/config.h.
8470 * gdbreplay.c: Likewise.
8472 2012-08-08 Doug Evans <dje@google.com>
8474 * Makefile.in (SFILES): Add gdb_vecs.c.
8475 (OBS): Add gdb_vecs.o.
8476 (gdb_vecs_h, host_defs_h): New variables.
8477 (thread-db.o): Add $(gdb_vecs_h) dependency.
8478 (gdb_vecs.o): New rule.
8479 * thread-db.c: #include "gdb_vecs.h".
8480 (thread_db_load_search): Use a vector to iterate over path elements.
8481 Handle text appearing after "$pdir".
8483 * configure.ac: Add check for strstr.
8484 * config.in: Regenerate.
8485 * configure: Regenerate.
8487 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8489 * hostio.c (handle_pread): If pread fails, fall back to attempting
8491 (handle_pwrite): Likewise for pwrite.
8493 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8495 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8496 between unsupported TYPE and unimplementable ADDR/LEN combination.
8497 (arm_insert_point): Act on new return value.
8499 2012-07-31 Pedro Alves <palves@redhat.com>
8501 * server.c (process_point_options): Only skip tokens if we find
8502 one that is unrecognized. Don't treat 'X' specially while
8503 skipping unrecognized tokens.
8505 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8507 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8508 to 4-byte-align HW breakpoint addresses for Thumb.
8510 2012-07-27 Yao Qi <yao@codesourcery.com>
8514 * server.h: Declare gdb_agent_about_to_close.
8515 * target.c (kill_inferior): Include "agent.h".
8516 New. Send command 'kill'.
8517 * target.h (kill_inferior): Removed macro.
8518 * tracepoint.c (gdb_agent_about_to_close): New.
8519 (gdb_agent_helper_thread): Handle command 'close'.
8520 Wait endlessly until the inferior stops.
8521 Install gdb_agent_remove_socket to atexit hook.
8522 (agent_socket_name): New static variable.
8523 (gdb_agent_socket_init): Replace local variable 'name' with
8524 'agent_socket_name'.
8525 (gdb_agent_remove_socket): New.
8527 2012-07-27 Yao Qi <yao@codesourcery.com>
8529 * server.c (process_point_options): Stop at 'X' when parsing.
8531 2012-07-19 Michael Eager <eager@eagercon.com>
8533 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8535 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8536 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8537 hardware breakpoint.
8539 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8541 * gdbserver/linux-low.c (initialize_low): Call
8542 linux_ptrace_init_warnings.
8544 2012-07-02 Doug Evans <dje@google.com>
8546 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8549 2012-07-02 Stan Shebs <stan@codesourcery.com>
8551 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8552 (ax.o): Add it to build rule.
8554 (OBS): Add format.o.
8555 (IPA_OBS): Add format.o.
8556 * server.c (handle_query): Claim support for breakpoint commands.
8557 (process_point_options): Add command case.
8558 (process_serial_event): Leave running if there are printfs in
8560 * mem-break.h (any_persistent_commands): Declare.
8561 (add_breakpoint_commands): Declare.
8562 (gdb_no_commands_at_breakpoint): Declare.
8563 (run_breakpoint_commands): Declare.
8564 * mem-break.c (struct point_command_list): New struct.
8565 (struct breakpoint): New field command_list.
8566 (any_persistent_commands): New function.
8567 (add_commands_to_breakpoint): New function.
8568 (add_breakpoint_commands): New function.
8569 (gdb_no_commands_at_breakpoint): New function.
8570 (run_breakpoint_commands): New function.
8571 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8573 * ax.c: Include format.h.
8574 (ax_printf): New function.
8575 (gdb_eval_agent_expr): Add printf opcode.
8577 2012-06-13 Yao Qi <yao@codesourcery.com>
8579 * server.c (start_inferior): Remove duplicated writes to fields
8580 'last_resume_kind' and 'last_status' of 'current_inferior'.
8582 2012-06-12 Yao Qi <yao@codesourcery.com>
8583 Pedro Alves <palves@redhat.com>
8585 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8587 * server.c (handle_v_cont): Extend comment.
8589 2012-06-11 Yao Qi <yao@codesourcery.com>
8591 * linux-low.c (linux_attach): Add 'static'.
8593 2012-06-06 Yao Qi <yao@codesourcery.com>
8595 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8597 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8599 Fix gcc -flto compilation warning.
8600 * server.c (main): Make variable multi_mode and attach volatile.
8602 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8604 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8605 if the platform doesn't know about it.
8607 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8609 * Makefile.in (SFILES): Add linux-tile-low.c.
8610 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8611 * configure.srv: Handle tilegx-*-linux*.
8612 * linux-tile-low.c: New file.
8614 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8616 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8618 2012-05-24 Pedro Alves <palves@redhat.com>
8622 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8624 2012-05-24 Pedro Alves <palves@redhat.com>
8628 Replace target_signal with gdb_signal throughout.
8630 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8632 * linux-low.c (linux_store_registers): Avoid the copying sequence
8633 when no data has been retrieved by ptrace.
8635 2012-05-22 Will Deacon <will.deacon@arm.com>
8637 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8638 Include asm/ptrace.h.
8639 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8642 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8644 * linux-low.c (linux_store_registers): Don't re-retrieve data
8645 with ptrace that has already been obtained from /proc. Always
8646 copy any data retrieved with ptrace to the buffer supplied.
8648 2012-05-11 Yao Qi <yao@codesourcery.com>
8649 Pedro Alves <palves@redhat.com>
8651 * linux-low.c (enum stopping_threads_kind): New.
8652 (stopping_threads): Change type to `enum stopping_threads_kind'.
8653 (handle_extended_wait): If stopping and suspending threads, leave
8654 the new_lwp suspended too.
8655 (linux_wait_for_event): Adjust.
8656 (stop_all_lwps): Set `stopping_threads' to
8657 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8658 whether we're suspending threads or just stopping them. Assert no
8661 2012-04-29 Yao Qi <yao@codesourcery.com>
8663 * server.h: Move some code to ...
8664 * gdbthread.h: ... here. New.
8665 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8666 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8667 (nto-low.o, win32-low.o): Likewise.
8668 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8669 * regcache.c, remote-utils.c, server.c: Likewise.
8670 * target.c, tracepoint.c, win32-low.c: Likewise.
8672 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8674 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8675 (PTRACE_ARG4_TYPE): Likewise.
8676 (PTRACE_XFER_TYPE): Likewise.
8677 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8678 ptrace to PTRACE_ARG3_TYPE.
8679 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8680 (PTRACE_ARG4_TYPE): Likewise.
8681 (PTRACE_XFER_TYPE): Likewise.
8682 (linux_detach_one_lwp): Cast fourth argument of
8683 ptrace to long then PTRACE_ARG4_TYPE.
8684 (regsets_fetch_inferior_registers): Cast third argument of
8685 ptrace to long then PTRACE_ARG3_TYPE.
8686 (regsets_store_inferior_registers): Likewise.
8688 2012-04-20 Pedro Alves <palves@redhat.com>
8690 * configure: Regenerate.
8692 2012-04-19 Pedro Alves <palves@redhat.com>
8694 * Makefile.in (GNULIB_BUILDDIR): New.
8695 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8696 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8697 (all, install-only, uninstall, clean-info, all-lib, clean): No
8698 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8699 (maintainer-clean realclean distclean): Use subdir_do.
8701 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8702 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8703 * acinclude.m4: Include acx_configure_dir.m4.
8704 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8705 calls. Call AC_PROG_RANLIB. Configure gnulib using
8708 (GNULIB_STDINT_H): Adjust.
8709 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8710 * gdbreplay.c: Include build-gnulib/config.h.
8711 * server.h: Likewise.
8712 * aclocal.m4: Regenerate.
8713 * config.in: Regenerate.
8714 * configure: Regenerate.
8716 2012-04-19 Pedro Alves <palves@redhat.com>
8718 * Makefile.in (LIBGNU, INCGNU): Adjust.
8719 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8720 (all, install-only, uninstall, clean-info, all-lib, clean)
8721 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8722 * configure.ac: Adjust AC_OUTPUT output.
8723 * aclocal.m4: Regenerate.
8724 * configure: Regenerate.
8726 2012-04-19 Pedro Alves <palves@redhat.com>
8728 * Makefile.in (generated_files): New.
8729 (server_h): Remove the explicit dependency on config.h, and depend
8730 on $generated_files.
8732 2012-04-19 Pedro Alves <palves@redhat.com>
8734 * Makefile.in (INCGNU): Add -Ignulib.
8736 2012-04-19 Pedro Alves <palves@redhat.com>
8738 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8739 (INCGNU): ... this, and spell out -I here.
8740 (GNULIB_LIB): Rename to ...
8742 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8744 2012-04-19 Pedro Alves <palves@redhat.com>
8746 * config.in: Regenerate.
8748 2012-04-19 Pedro Alves <palves@redhat.com>
8750 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8751 * server.h (memmem): Remove declaration.
8752 * config.in: Regenerate.
8753 * configure: Regenerate.
8755 2012-04-19 Yao Qi <yao@codesourcery.com>
8757 * Makefile.in (SFILES): Add common/vec.c.
8761 2012-04-19 Yao Qi <yao@codesourcery.com>
8763 * remote-utils.c (prepare_resume_reply): Replace with macro
8764 target_core_of_thread.
8765 * server.c (handle_qxfer_threads_proper): Likewise.
8766 * target.h (traget_core_of_thread): New macro.
8768 2012-04-18 Pedro Alves <palves@redhat.com>
8770 * aclocal.m4: Regenerate.
8771 * configure: Regenerate.
8773 2012-04-16 Yao Qi <yao@codesourcery.com>
8775 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8776 duplicated on address.
8778 2012-04-16 Yao Qi <yao@codesourcery.com>
8780 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8781 (struct tracepoint_action_ops) <send>: New field.
8782 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8783 (agent_expr_send, x_tracepoint_action_send): New.
8784 (l_tracepoint_action_send): New.
8785 (cmd_qtdp): Download and install tracepoint
8786 according to `use_agent'.
8787 (run_inferior_command): Add one more parameter `len'.
8789 (tracepoint_send_agent): New.
8790 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8792 2012-04-16 Yao Qi <yao@codesourcery.com>
8794 * tracepoint.c (download_tracepoints): Moved to ...
8795 (cmd_qtstart): ... here.
8797 2012-04-14 Yao Qi <yao@codesourcery.com>
8799 * tracepoint.c: Include inttypes.h.
8800 (struct collect_memory_action): Use sized types.
8801 (struct tracepoint): Likewise.
8802 (cmd_qtdp, stop_tracing): Update print specifiers.
8803 (cmd_qtp, response_tracepoint): Likewise.
8804 (collect_data_at_tracepoint): Likewise.
8805 (collect_data_at_step): Likewise.
8807 2012-04-14 Yao Qi <yao@codesourcery.com>
8809 Import gnulib module inttypes.
8810 * aclocal.m4, config.in, configure: Regenerated.
8812 2012-04-14 Yao Qi <yao@codesourcery.com>
8814 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8815 Makefile and config.status at last.
8817 2012-04-13 Yao Qi <yao@codesourcery.com>
8819 * tracepoint.c: Include stdint.h unconditionally.
8821 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8823 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8824 on BFD_HAVE_SYS_PROCFS_TYPE.
8825 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8826 * configure: Regenerate.
8827 * config.in: Likewise.
8829 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8831 * Makefile.in (clean): Also remove x32.c x32-linux.c
8832 x32-avx.c x32-avx-linux.c.
8833 (x32.o): New target.
8835 (x32-linux.o): Likewise.
8836 (x32-linux.c): Likewise.
8837 (x32-avx.o): Likewise.
8838 (x32-avx.c): Likewise.
8839 (x32-avx-linux.o): Likewise.
8840 (x32-avx-linux.c): Likewise.
8842 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8843 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8844 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8845 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8846 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8847 i386/x32-avx-linux.xml.
8849 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8850 (init_registers_x32_avx_linux): Likwise.
8851 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8852 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8854 2012-04-13 Pedro Alves <palves@redhat.com>
8856 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8857 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8858 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8859 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8862 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8864 * linux-x86-low.c (compat_x32_clock_t): New.
8865 (compat_x32_siginfo_t): Likewise.
8866 (compat_x32_siginfo_from_siginfo): Likewise.
8867 (siginfo_from_compat_x32_siginfo): Likewise.
8868 (linux_is_elf64): Likewise.
8869 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8870 and siginfo_from_compat_x32_siginfo for x32.
8871 (x86_arch_setup): Set linux_is_elf64.
8873 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8876 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8878 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8879 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8880 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8881 compatible with process.
8883 2012-04-12 Yao Qi <yao@codesourcery.com>
8885 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8886 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8887 (install-only, install-info, clean): Handle sub dir gnulib.
8888 (all-lib, am--refresh): New targets.
8889 (memmem.o): Remove target.
8890 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8891 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8892 (AC_REPLACE_FUNCS): Remove memmem.
8893 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8894 (AC_OUTPUT): Generate Makefile in gnulib/.
8895 * aclocal.m4, config.in, configure: Regenerated.
8897 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8899 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8901 2012-04-05 Pedro Alves <palves@redhat.com>
8903 -Werror=strict-aliasing
8905 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8908 2012-04-04 Pedro Alves <palves@redhat.com>
8910 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8911 (sparc_store_gregset_from_stack, sparc_store_gregset)
8912 (sparc_breakpoint_at): Fix formatting.
8914 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8916 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8918 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8919 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8920 * config.in: Regenerate.
8921 * configure: Likewise.
8923 2012-03-29 Pedro Alves <palves@redhat.com>
8925 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8926 Correct ptrace arguments.
8928 2012-03-28 Pedro Alves <palves@redhat.com>
8930 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8931 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8932 (IA64_FR1_REGNUM): New defines.
8933 (ia64_fetch_register): New.
8934 (the_low_target): Install it.
8935 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8937 * linux-low.c (linux_fetch_registers): Try the
8938 the_low_target.fetch_register hook first.
8940 * linux-arm-low.c (the_low_target): Adjust.
8941 * linux-bfin-low.c (the_low_target): Adjust.
8942 * linux-cris-low.c (the_low_target): Adjust.
8943 * linux-crisv32-low.c (the_low_target): Adjust.
8944 * linux-m32r-low.c (the_low_target): Adjust.
8945 * linux-m68k-low.c (the_low_target): Adjust.
8946 * linux-mips-low.c (the_low_target): Adjust.
8947 * linux-ppc-low.c (the_low_target): Adjust.
8948 * linux-s390-low.c (the_low_target): Adjust.
8949 * linux-sh-low.c (the_low_target): Adjust.
8950 * linux-sparc-low.c (the_low_target): Adjust.
8951 * linux-tic6x-low.c (the_low_target): Adjust.
8952 * linux-x86-low.c (the_low_target): Adjust.
8953 * linux-xtensa-low.c (the_low_target): Adjust.
8955 2012-03-26 Pedro Alves <palves@redhat.com>
8957 * server.c (handle_qxfer_libraries): Don't bail early if
8958 the_target->qxfer_libraries_svr4 is not NULL.
8960 2012-03-26 Pedro Alves <palves@redhat.com>
8962 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8964 2012-03-23 Pedro Alves <palves@redhat.com>
8966 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8967 "library-list-svr4" element's start tag when the the DSO list is
8970 2012-03-23 Pedro Alves <palves@redhat.com>
8972 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8973 a variable whose type size is the same as the inferior's pointer
8976 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8978 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8980 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8981 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8982 * linux-low.h: Include <signal.h>.
8983 (struct siginfo): Remove forward declaration.
8984 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8987 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8989 * .gitignore: Ignore more files.
8991 2012-03-19 Pedro Alves <palves@redhat.com>
8992 Jan Kratochvil <jan.kratochvil@redhat.com>
8994 * server.c (cont_thread, general_thread): Add describing comments.
8995 (start_inferior): Clear `cont_thread'.
8996 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8999 2012-03-15 Yao Qi <yao@codesourcery.com>
9001 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9003 (cmd_qtdp): ... here.
9005 2012-03-15 Yao Qi <yao@codesourcery.com>
9007 * tracepoint.c (struct tracepoint_action_ops): New.
9008 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9009 (m_tracepoint_action_download): New.
9010 (r_tracepoint_action_download): New.
9011 (x_tracepoint_action_download): New.
9012 (l_tracepoint_action_download): New.
9013 (add_tracepoint_action): Install `action->ops' according type.
9014 (download_tracepoint_1): Move code `download' function pointer
9015 of various tracepoint_action_ops.
9017 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9019 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9020 linux_ptrace_attach_warnings.
9022 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9024 * Makefile.in (linux-ptrace.o): New.
9025 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9026 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9027 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9028 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9029 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9031 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9033 2012-03-08 Yao Qi <yao@codesourcery.com>
9034 Pedro Alves <palves@redhat.com>
9036 Fix PR server/13392.
9037 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9039 * tracepoint.c (remove_tracepoint): New.
9040 (cmd_qtdp): Call remove_tracepoint when failed to install.
9042 2012-03-07 Pedro Alves <palves@redhat.com>
9044 * linux-low.c (get_detach_signal): New.
9045 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9046 Pass on pending signals to PTRACE_DETACH. Check the result of the
9048 * server.c (program_signals, program_signals_p): New.
9049 (handle_general_set): Handle QProgramSignals.
9050 * server.h (program_signals, program_signals_p): Declare.
9052 2012-03-05 Pedro Alves <palves@redhat.com>
9053 Jan Kratochvil <jan.kratochvil@redhat.com>
9055 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9058 2012-03-03 Yao Qi <yao@codesourcery.com>
9060 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9061 agent_look_up_symbols.
9063 2012-03-03 Yao Qi <yao@codesourcery.com>
9065 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9066 (linux-x86-low.o): Likewise.
9067 * server.h: Remove in_process_agent_loaded.
9068 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9072 2012-03-03 Yao Qi <yao@codesourcery.com>
9074 * tracepoint.c (gdb_agent_capability): New global.
9075 (in_process_agent_loaded_ust): Renamed to
9076 `in_process_agent_supports_ust'.
9078 (in_process_agent_supports_ust): Call agent_capability_check.
9079 (clear_installed_tracepoints): Assert that agent supports
9082 2012-03-03 Yao Qi <yao@codesourcery.com>
9084 * linux-low.c (linux_supports_agent): New.
9085 (linux_target_ops): Initialize field `supports_agent' with
9086 linux_supports_agent.
9087 * target.h (struct target_ops) <supports_agent>: New.
9088 (target_supports_agent): New macro.
9089 * server.c (handle_general_set): Handle packet 'QAgent'.
9090 (handle_query): Send `QAgent+'.
9091 * Makefile.in (server.o): Depends on agent.h.
9093 2012-03-03 Yao Qi <yao@codesourcery.com>
9095 * Makefile.in (OBS): Add agent.o.
9096 Add new rule for agent.o.
9097 Track dependence of tracepoint.c on agent.h.
9098 * tracepoint.c (run_inferior_command_1):
9099 (run_inferior_command): Call agent_run_command.
9100 (gdb_ust_connect_sync_socket): Deleted. Move it to
9102 (resume_thread, stop_thread): Likewise.
9103 (gdb_ust_socket_init): Renamed to ...
9104 (gdb_agent_socket_init): ... New.
9105 (gdb_ust_thread): Renamed to ...
9106 (gdb_agent_helper_thread): ... New.
9107 (gdb_ust_init): Move some code to ...
9108 (gdb_agent_init): ... here. New.
9109 [HAVE_UST]: Call gdb_ust_init.
9110 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9111 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9112 * config.in, configure: Regenerated.
9114 2012-03-02 Pedro Alves <palves@redhat.com>
9116 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9117 * linux-low.c (struct simple_pid_list): New.
9118 (stopped_pids): New a struct simple_pid_list pointer.
9119 (add_to_pid_list, pull_pid_from_list): New.
9120 (handle_extended_wait): Don't assume the first signal new children
9121 report is SIGSTOP. Adjust call to pull_pid_from_list.
9122 (linux_wait_for_lwp): Adjust.
9124 2012-03-02 Yao Qi <yao@codesourcery.com>
9126 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9129 2012-03-02 Yao Qi <yao@codesourcery.com>
9131 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9132 `stop_pc' and `tpoint'. Update caller.
9134 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9136 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9137 * linux-low.c (use_linux_regsets): New macro.
9138 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9139 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9140 (linux_register_in_regsets): New function.
9141 (usr_fetch_inferior_registers): Skip registers covered by
9143 (usr_store_inferior_registers): Likewise.
9144 (usr_fetch_inferior_registers): New macro.
9145 (usr_store_inferior_registers): Likewise.
9146 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9147 (linux_store_registers): Likewise.
9148 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9150 (init_registers_mips64_dsp_linux): Likewise.
9151 (init_registers_mips_linux): New macro.
9152 (init_registers_mips_dsp_linux): Likewise.
9153 (mips_dsp_num_regs): Likewise.
9154 (DSP_BASE, DSP_CONTROL): New fallback macros.
9155 (mips_base_regs): New macro.
9156 (mips_regmap): Use it. Fix the size.
9157 (mips_dsp_regmap): New variable.
9158 (mips_dsp_regset_bitmap): Likewise.
9159 (mips_arch_setup): New function.
9160 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9162 (mips_cannot_store_register): Likewise.
9163 (the_low_target): Update .arch_setup, .num_regs and .regmap
9164 initializers. Add .regset_bitmap initializer.
9165 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9167 * linux-bfin-low.c (the_low_target): Likewise.
9168 * linux-cris-low.c (the_low_target): Likewise.
9169 * linux-crisv32-low.c (the_low_target): Likewise.
9170 * linux-ia64-low.c (the_low_target): Likewise.
9171 * linux-m32r-low.c (the_low_target): Likewise.
9172 * linux-m68k-low.c (the_low_target): Likewise.
9173 * linux-ppc-low.c (the_low_target): Likewise.
9174 * linux-s390-low.c (the_low_target): Likewise.
9175 * linux-sh-low.c (the_low_target): Likewise.
9176 * linux-sparc-low.c (the_low_target): Likewise.
9177 * linux-tic6x-low.c (the_low_target): Likewise.
9178 * linux-x86-low.c (the_low_target): Likewise.
9179 * linux-xtensa-low.c (the_low_target): Likewise.
9180 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9181 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9182 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9184 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9185 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9187 2012-02-29 Yao Qi <yao@codesourcery.com>
9188 Pedro Alves <palves@redhat.com>
9190 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9191 `step_over_finished' is true.
9193 2012-02-27 Pedro Alves <palves@redhat.com>
9195 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9196 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9198 2012-02-27 Pedro Alves <palves@redhat.com>
9201 * linux-low.c (pid_is_stopped): New.
9202 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9204 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9206 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9209 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9211 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9213 2012-02-24 Luis Machado <lgustavo@codesourcery>
9215 * server.c (handle_query): Advertise support for target-side
9216 breakpoint condition evaluation.
9217 (process_point_options): New function.
9218 (process_serial_event): When inserting a breakpoint, check for
9219 a target-side condition that should be evaluated.
9221 * mem-break.c: Include regcache.h and ax.h.
9222 (point_cond_list_t): New data structure.
9223 (breakpoint) <cond_list>: New field.
9224 (find_gdb_breakpoint_at): Make non-static.
9225 (delete_gdb_breakpoint_at): Clear any target-side
9227 (clear_gdb_breakpoint_conditions): New function.
9228 (add_condition_to_breakpoint): Likewise.
9229 (add_breakpoint_condition): Likewise.
9230 (gdb_condition_true_at_breakpoint): Likewise.
9231 (gdb_breakpoint_here): Return result directly instead
9232 of going through a local variable.
9234 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9235 (clear_gdb_breakpoint_conditions): Likewise.
9236 (add_breakpoint_condition): Likewise.
9237 (gdb_condition_true_at_breakpoint): Likewise.
9239 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9240 (need_step_over_p): Take target-side breakpoint condition into
9243 2012-02-24 Luis Machado <lgustavo@codesourcery>
9245 * server.h: Include tracepoint.h.
9246 (agent_mem_read, agent_get_trace_state_variable_value,
9247 agent_set_trace_state_variable_value,
9248 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9249 get_set_tsv_func_addr): New prototypes.
9251 * ax.h: New include file.
9252 * ax.c: New source file.
9254 * tracepoint.c: Include ax.h.
9255 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9256 agent_expr, eval_result_type): Move to ax.h.
9257 (parse_agent_expr): Rename to ...
9258 (gdb_parse_agent_expr): ... this, make it non-static and move
9260 (unparse_agent_expr) Rename to ...
9261 (gdb_unparse_agent_expr): ... this, make it non-static and move
9263 (eval_agent_expr): Rename to ...
9264 (eval_tracepoint_agent_expr): ... this.
9265 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9266 forward declarations.
9267 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9268 (agent_get_trace_state_variable_value): New function.
9269 (agent_set_trace_state_variable_value): New function.
9270 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9271 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9272 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9273 (condition_true_at_tracepoint): Likewise.
9274 (parse_agent_expr): Rename to ...
9275 (gdb_parse_agent_expr): ... this and move to ax.c.
9276 (unparse_agent_expr): Rename to ...
9277 (gdb_unparse_agent_expr): ... this and move to ax.c.
9278 (gdb_agent_op_name): Move to ax.c.
9279 (eval_agent_expr): Rename to ...
9280 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9282 (eval_tracepoint_agent_expr): New function.
9283 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9285 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9287 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9288 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9289 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9290 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9291 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9292 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9293 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9294 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9295 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9296 (compile_bytecodes): Remove forward declaration.
9297 (is_goto_target): Move to ax.c.
9298 (compile_bytecodes): Move to ax.c and call
9299 agent_get_trace_state_variable_value (...) and
9300 agent_set_trace_state_variable_value (...).
9302 * Makefile.in: Update ax.c and IPA dependencies.
9304 2012-02-24 Pedro Alves <palves@redhat.com>
9306 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9307 (cmd_bigqtbuffer_circular): ... this. Only handle
9308 'QTBuffer:circular:'.
9309 (handle_tracepoint_general_set): Adjust.
9311 2012-02-16 Yao Qi <yao@codesourcery.com>
9313 * inferiors.c: Move code to ...
9314 * dll.c: .... here. New.
9315 * server.h: Declare clear_dlls.
9316 * Makefile.in (SFILES): Add dll.c.
9320 2012-02-11 Yao Qi <yao@codesourcery.com>
9322 * server.c: (handle_monitor_command): Add a new parameter
9324 (handle_query): Update caller.
9326 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9328 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9329 * configure, config.in: Regenerate.
9330 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9333 2012-02-02 Pedro Alves <palves@redhat.com>
9335 Try SIGKILL first, then PTRACE_KILL.
9336 * linux-low.c (linux_kill_one_lwp): New.
9337 (linux_kill_one_lwp): Rename to ...
9338 (kill_one_lwp_callback): ... this. Use the new
9341 2012-02-02 Pedro Alves <palves@redhat.com>
9343 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9346 2012-01-27 Pedro Alves <palves@redhat.com>
9348 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9349 (elf_64_file_p): Make static.
9350 (linux_pid_exe_is_elf_64_file): New.
9351 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9352 Delete declarations.
9353 (linux_pid_exe_is_elf_64_file): Declare.
9354 * linux-x86-low.c (x86_arch_setup): Use
9355 linux_pid_exe_is_elf_64_file.
9357 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9359 * linux-low.c (linux_wait_for_event_1): Rename to ...
9360 (linux_wait_for_event): ... here and merge it with former
9361 linux_wait_for_event - new variable wait_ptid, use it.
9362 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9364 2012-01-23 Pedro Alves <palves@redhat.com>
9366 * server.c (main): Avoid yet another case of infinite loop while
9367 detaching/killing after a longjmp.
9369 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9372 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9374 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9376 * hostio.c (handle_readlink): New function.
9377 (handle_vFile): Call it to handle "vFile:readlink" packets.
9379 2012-01-20 Pedro Alves <palves@redhat.com>
9380 Ulrich Weigand <ulrich.weigand@linaro.org>
9382 * server.c (handle_v_requests): Only support vAttach and vRun to
9383 start multiple processes when in extended protocol mode.
9385 2012-01-17 Pedro Alves <palves@redhat.com>
9387 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9388 memalign plus mprotect to allocate the scratch buffer.
9390 2012-01-13 Pedro Alves <palves@redhat.com>
9392 * server.c (attach_inferior): Clear `cont_thread'.
9394 2012-01-13 Pedro Alves <palves@redhat.com>
9396 * server.c (main): Avoid infinite loop while detaching/killing
9399 2012-01-09 Doug Evans <dje@google.com>
9401 * server.c (start_inferior): Set last_ptid in --wrapper case.
9403 2012-01-06 Yao Qi <yao@codesourcery.com>
9405 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9407 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9409 2012-01-04 Yao Qi <yao@codesourcery.com>
9411 * tracepoint.c (cmd_qtdp): Print debug message
9412 for static tracepoint.
9414 2012-01-04 Yao Qi <yao@codesourcery.com>
9416 * tracepoint.c (trace_vdebug): Differentiate debug message
9417 between gdbserver and IPA.
9419 2012-01-03 Yao Qi <yao@codesourcery.com>
9421 * tracepoint.c (tracepoint_was_hit): Don't collect for
9424 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9426 * terminal.h: Reformat copyright header.
9428 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9430 * server.c (gdbserver_version): Update copyright year.
9431 * gdbreplay.c (gdbreplay_version): Likewise.
9433 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9435 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9438 2011-12-18 Hui Zhu <teawater@gmail.com>
9439 * linux-low.c (linux_create_inferior): Save return value to ret.
9441 2011-12-18 Hui Zhu <teawater@gmail.com>
9443 * linux-low.c (linux_create_inferior): Save return value to ret.
9445 2011-12-16 Doug Evans <dje@google.com>
9447 * linux-low.c (linux_create_inferior): If stdio connection,
9448 redirect stdin from /dev/null, stdout to stderr.
9449 * remote-utils.c (remote_is_stdio): New static global.
9450 (remote_connection_is_stdio): New function.
9451 (remote_prepare): Handle stdio connection.
9452 (remote_open): Ditto.
9453 (remote_close): Don't close stdin for stdio connections.
9454 (read_prim,write_prim): New functions. Replace all calls to
9455 read/write to these.
9456 * server.c (main): Watch for "-" argument. Move call to
9457 remote_prepare before start_inferior.
9458 * server.h (STDIO_CONNECTION_NAME): New macro.
9459 (remote_connection_is_stdio): Declare.
9461 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9462 in debugging output.
9464 2011-12-15 Yao Qi <yao@codesourcery.com>
9466 * tracepoint.c: Include sys/syscall.h.
9467 (gdb_ust_thread): Remove preprocessor conditional.
9469 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9471 * linux-low.c (linux_detach_one_lwp): Call
9472 the_low_target.prepare_to_resume before detaching.
9474 2011-12-14 Yao Qi <yao@codesourcery.com>
9476 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9479 2011-12-14 Yao Qi <yao@codesourcery.com>
9481 * i386-low.c (i386_low_stopped_data_address): Initialize local
9484 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9488 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9489 DR_CONTROL unless necessary. Extend comments.
9490 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9491 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9493 2011-12-13 Yao Qi <yao@codesourcery.com>
9495 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9497 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9499 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9501 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9502 Print new debug message for such case.
9504 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9506 Fix overlapping memcpy.
9507 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9508 the read_inferior_memory transfer.
9509 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9510 write_inferior_memory transfer.
9511 (set_fast_tracepoint_jump): New variable buf. Use it for the
9512 read_inferior_memory and write_inferior_memory transfers.
9513 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9514 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9515 Use it for the write_inferior_memory transfer.
9516 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9519 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9521 * linux-low.c (fetch_register, store_register): Make code
9522 consistent, fix formatting.
9524 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9526 * linux-low.c (usr_store_inferior_registers): Factor out code
9527 to handle individual registers into...
9528 (store_register): ... this new function.
9530 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9532 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9533 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9534 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9535 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9536 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9537 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9538 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9539 (srv_xmlfiles): Add new XML files.
9541 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9543 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9544 (init_registers_s390_linux32v1): Add prototype.
9545 (init_registers_s390_linux32v2): Likewise.
9546 (init_registers_s390_linux64v1): Likewise.
9547 (init_registers_s390_linux64v2): Likewise.
9548 (init_registers_s390x_linux64v1): Likewise.
9549 (init_registers_s390x_linux64v2): Likewise.
9550 (s390_num_regs): Increment to 52.
9551 (s390_regmap): Add orig_r2 register.
9552 (s390_num_regs_3264): Increment to 68.
9553 (s390_regmap_3264): Add orig_r2 register.
9554 (s390_collect_ptrace_register): Handle orig_r2 register.
9555 (s390_supply_ptrace_register): Likewise.
9556 (s390_fill_last_break): New function.
9557 (s390_store_last_break): Likewise.
9558 (s390_fill_system_call): New function.
9559 (s390_store_system_call): Likewise.
9560 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9562 (s390_check_regset): New function.
9563 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9564 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9565 Update target_regsets for available register sets.
9567 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9568 Jan Kratochvil <jan.kratochvil@redhat.com>
9570 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9571 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9573 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9574 * linux-low.h (struct process_info_private): New member r_debug.
9575 * server.c (handle_qxfer_libraries): Call
9576 the_target->qxfer_libraries_svr4.
9577 (handle_qxfer_libraries_svr4): New function.
9578 (qxfer_packets): New entry "libraries-svr4".
9579 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9580 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9581 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9582 PACKET_qXfer_libraries_svr4.
9584 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9586 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9587 PSW address/mask between 8-byte and 16-byte formats.
9588 (s390_supply_ptrace_register): Likewise.
9589 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9590 basic addressing mode bit.
9592 2011-11-24 Stan Shebs <stan@codesourcery.com>
9594 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9596 2011-11-17 Stan Shebs <stan@codesourcery.com>
9598 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9599 (tracing_start_time): New global.
9600 (tracing_stop_time): New global.
9601 (tracing_user_name): New global.
9602 (tracing_notes): New global.
9603 (tracing_stop_note): New global.
9604 (cmd_qtstart): Set traceframe_usage, start_time.
9605 (stop_tracing): Set stop_time.
9606 (cmd_qtstatus): Report additional status.
9607 (cmd_qtp): New function.
9608 (handle_tracepoint_query): Call it.
9609 (cmd_qtnotes): New function.
9610 (handle_tracepoint_general_set): Call it.
9611 (get_timestamp): Rename from tsv_get_timestamp.
9613 2011-11-14 Stan Shebs <stan@codesourcery.com>
9614 Kwok Cheung Yeung <kcy@codesourcery.com>
9616 * linux-x86-low.c (small_jump_insn): New.
9617 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9618 trampoline and error message, build a trampoline and issue a small
9619 jump instruction to it.
9620 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9621 trampoline and error message.
9622 (x86_get_min_fast_tracepoint_insn_len): New.
9623 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9624 * linux-low.h (struct linux_target_ops): Add arguments to
9625 install_fast_tracepoint_jump_pad operation, add new operation.
9626 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9628 (linux_get_min_fast_tracepoint_insn_len): New function.
9629 (linux_target_op): Add new operation.
9630 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9631 (gdb_trampoline_buffer_end): Ditto.
9632 (gdb_trampoline_buffer_error): Ditto.
9633 (struct ipa_sym_addresses): Add fields for new IPA variables.
9634 (symbol_list): Add entries for new IPA variables.
9635 (struct tracepoint): Add fields to hold the address range of the
9636 trampoline used by the tracepoint.
9637 (trampoline_buffer_head): New static variable.
9638 (trampoline_buffer_tail): Ditto.
9639 (claim_trampoline_space): New function.
9640 (have_fast_tracepoint_trampoline_buffer): New function.
9641 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9643 (install_fast_tracepoint): Ditto, also add error buffer argument.
9644 (cmd_qtminftpilen): New function.
9645 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9646 (fast_tracepoint_from_trampoline_address): New function.
9647 (fast_tracepoint_collecting): Handle trampoline as part of jump
9649 (set_trampoline_buffer_space): New function.
9650 (initialize_tracepoint): Initialize new IPA variables.
9651 * target.h (struct target_ops): Add arguments to
9652 install_fast_tracepoint_jump_pad operation, add new
9653 get_min_fast_tracepoint_insn_len operation.
9654 (target_get_min_fast_tracepoint_insn_len): New.
9655 (install_fast_tracepoint_jump_pad): Add arguments.
9656 * server.h (IPA_BUFSIZ): Define.
9657 * linux-i386-ipa.c: Include extra header files.
9658 (initialize_fast_tracepoint_trampoline_buffer): New function.
9659 (initialize_low_tracepoint): Call it.
9660 * server.h (set_trampoline_buffer_space): Declare.
9661 (claim_trampoline_space): Ditto.
9662 (have_fast_tracepoint_trampoline_buffer): Ditto.
9664 2011-11-14 Yao Qi <yao@codesourcery.com>
9666 * server.c (handle_query): Handle InstallInTrace for qSupported.
9667 * tracepoint.c (add_tracepoint): Sort list.
9668 (install_tracepoint, download_tracepoint): New.
9669 (cmd_qtdp): Call them to install and download tracepoints.
9670 (sort_tracepoints): Removed.
9671 (cmd_qtstart): Update.
9673 2011-11-14 Yao Qi <yao@codesourcery.com>
9675 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9676 * mem-break.h: Declare.
9677 * tracepoint.c (cmd_qtstart): Move some code to ...
9678 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9680 (download_tracepoints): Move some code to ...
9681 (download_tracepoint_1): ... here. New.
9683 2011-11-08 Yao Qi <yao@codesourcery.com>
9685 * remote-utils.c (relocate_instruction): A comment fix.
9687 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9689 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9690 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9691 dr_status_mirror and dr_control_mirror from debug_reg_state.
9692 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9693 (i386_initial_stuff): Remove use of deleted globals.
9694 (i386_get_thread_context, i386_set_thread_context,
9695 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9696 from debug_reg_state.
9698 2011-11-05 Yao Qi <yao@codesourcery.com>
9700 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9701 address as TPOINT's.
9703 2011-11-02 Stan Shebs <stan@codesourcery.com>
9705 * tracepoint.c (agent_mem_read_string): New function.
9706 (eval_agent_expr): Call it for tracenz.
9707 * server.c (handle_query): Report support for tracenz.
9709 2011-11-02 Yao Qi <yao@codesourcery.com>
9711 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9713 2011-11-02 Yao Qi <yao@codesourcery.com>
9715 * target.h: Fix a typo in comment.
9717 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9719 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9720 clobber the breakpoints' shadows with fast tracepoint jumps.
9721 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9722 * target.c (write_inferior_memory): Also pass MYADDR down to
9725 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9727 * configure.ac: Check support for personality routine.
9728 * configure: Regenerate.
9729 * config.in: Likewise.
9730 * linux-low.c: Include <sys/personality.h>.
9731 Define ADDR_NO_RANDOMIZE if necessary.
9732 (linux_create_inferior): Disable address space randomization when
9733 forking inferior, if requested.
9734 (linux_supports_disable_randomization): New function.
9735 (linux_target_ops): Install it.
9736 * server.h (disable_randomization): Declare.
9737 * server.c (disable_randomization): New global variable.
9738 (handle_general_set): Handle QDisableRandomization.
9739 (handle_query): Likewise for qSupported.
9740 (main): Support --disable-randomization and --no-disable-randomization
9741 command line arguments.
9742 * target.h (struct target_ops): Add supports_disable_randomization.
9743 (target_supports_disable_randomization): New macro.
9745 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9747 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9749 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9750 [!PT_GETDSBT] (target_loadmap): New definition.
9751 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9752 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9753 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9754 and PT_GETDSBT to LINUX_LOADMAP.
9755 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9756 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9758 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9760 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9761 (arm_linux_hwbp_cap): New static variable.
9762 (arm_linux_get_hwbp_cap): Replace by ...
9763 (arm_linux_init_hwbp_cap): ... this new function.
9764 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9765 (arm_linux_get_hw_watchpoint_count): Likewise.
9766 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9767 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9768 (arm_prepare_to_resume): Use perror_with_name instead of error.
9770 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9772 * linux-arm-low.c: Include <signal.h>.
9773 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9774 (struct arm_linux_hwbp_cap): New data type.
9775 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9776 (struct arm_linux_hw_breakpoint): New data type.
9777 (MAX_BPTS, MAX_WPTS): Define.
9778 (struct arch_process_info, struct arch_lwp_info): New data types.
9779 (arm_linux_get_hwbp_cap): New function.
9780 (arm_linux_get_hw_breakpoint_count): Likewise.
9781 (arm_linux_get_hw_watchpoint_count): Likewise.
9782 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9783 (arm_hwbp_control_initialize): Likewise.
9784 (arm_hwbp_control_is_enabled): Likewise.
9785 (arm_hwbp_control_is_initialized): Likewise.
9786 (arm_hwbp_control_disable): Likewise.
9787 (arm_linux_hw_breakpoint_equal): Likewise.
9788 (arm_linux_hw_point_initialize): Likewise.
9789 (struct update_registers_data): New data structure.
9790 (update_registers_callback: New function.
9791 (arm_insert_point): Likewise.
9792 (arm_remove_point): Likewise.
9793 (arm_stopped_by_watchpoint): Likewise.
9794 (arm_stopped_data_address): Likewise.
9795 (arm_new_process): Likewise.
9796 (arm_new_thread): Likewise.
9797 (arm_prepare_to_resume): Likewise.
9798 (the_low_target): Register arm_insert_point, arm_remove_point,
9799 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9800 arm_new_thread, and arm_prepare_to_resume.
9802 2011-09-15 Stan Shebs <stan@codesourcery.com>
9804 * server.h (struct emit_ops): Add compare-goto fields.
9805 * tracepoint.c (gdb_agent_op_sizes): New table.
9806 (emit_eq_goto): New function.
9807 (emit_ne_goto): New function.
9808 (emit_lt_goto): New function.
9809 (emit_le_goto): New function.
9810 (emit_gt_goto): New function.
9811 (emit_ge_goto): New function.
9812 (is_goto_target): New function.
9813 (compile_bytecodes): Recognize special cases of compare-goto
9814 combinations and call specialized emitters for them.
9815 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9816 (amd64_emit_ne_goto): New function.
9817 (amd64_emit_lt_goto): New function.
9818 (amd64_emit_le_goto): New function.
9819 (amd64_emit_gt_goto): New function.
9820 (amd64_emit_ge_goto): New function.
9821 (amd64_emit_ops): Add the new functions.
9822 (i386_emit_eq_goto): New function.
9823 (i386_emit_ne_goto): New function.
9824 (i386_emit_lt_goto): New function.
9825 (i386_emit_le_goto): New function.
9826 (i386_emit_gt_goto): New function.
9827 (i386_emit_ge_goto): New function.
9828 (i386_emit_ops): Add the new functions.
9830 2011-09-08 Stan Shebs <stan@codesourcery.com>
9832 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9833 (i386_emit_epilogue): Restore %ebx.
9835 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9837 * server.c (step_thread): Remove definition.
9838 (process_serial_event): Don't handle Hs.
9839 * server.h (step_thread): Remove declaration.
9840 * target.c (set_desired_inferior): Remove use of step_thread.
9842 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9844 * linux-low.c: Include linux-procfs.h.
9845 (linux_attach_lwp_1): Update comments.
9846 (linux_attach): Scan for existing threads when attaching to a
9847 process that is the tgid.
9848 * Makefile.in: Update dependencies.
9850 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9852 * configure.srv: Add linux-procfs.o dependencies.
9854 2011-08-14 Yao Qi <yao@codesourcery.com>
9856 * target.h (struct target_ops): Fix indent.
9857 * win32-low.c (win32_target_ops): Fix comment.
9859 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9860 Yao Qi <yao@codesourcery.com>
9862 * Makefile.in (clean): Remove tic6x-*.c files.
9863 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9864 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9865 (tic6x-c64xp-linux.c): Likewise.
9866 * configure.srv: Add support for tic6x-*-uclinux.
9867 * linux-tic6x-low.c: New.
9868 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9870 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9871 Yao Qi <yao@codesourcery.com>
9873 * target.h (struct target_ops): Add read_loadmap.
9874 * linux-low.c (struct target_loadseg): New type.
9875 (struct target_loadmap): New type.
9876 (linux_read_loadmap): New function.
9877 (linux_target_ops): Add linux_read_loadmap.
9878 * server.c (handle_query): Support qXfer:fdpic:read packet.
9879 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9882 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9884 * win32-low.c: Include <stdint.h>.
9886 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9888 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9889 to the inferior here.
9890 (i386_remove_aligned_watchpoint): Ditto.
9891 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9892 fit part of the watchpoint in the debug registers.
9893 (i386_update_inferior_debug_regs): New.
9894 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9895 registers, and only update the inferior on success.
9896 (i386_low_remove_watchpoint): Ditto.
9898 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9900 * linux-low.c (compare_ints, unique, list_threads, show_process,
9901 linux_core_of_thread): Delete.
9902 (linux_target_ops): Change linux_core_of_thread to
9903 linux_common_core_of_thread.
9904 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9905 * utils.c (malloc_failure): Change type of argument.
9906 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9907 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9908 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9909 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9910 (IPA_OBJS): Add common-utils-ipa.o.
9911 (ptid_h, linux_osdata_h): New macros.
9912 (server_h): Add common/common-utils.h, common/xml-utils.h,
9913 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9915 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9916 ptid.o, buffer.o): New rules.
9917 (linux-low.o): Add common/linux-osdata.h as a dependency.
9918 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9919 * configure.ac: Add AC_HEADER_DIRENT check.
9920 * config.in: Regenerate.
9921 * configure: Regenerate.
9922 * remote-utils.c (xml_escape_text): Delete.
9923 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9924 buffer_xml_printf): Move to common/buffer.c.
9925 * server.c (main): Remove call to initialize_inferiors.
9926 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9927 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9928 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9929 internal_error, gdb_assert, gdb_assert_fail): Delete.
9930 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9931 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9933 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9934 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9935 initialize_inferiors): Delete.
9937 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9939 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9942 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9944 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9946 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9948 2011-05-26 Yao Qi <yao@codesourcery.com>
9950 * Makefile.in (thread-db.o): Track dependence to
9951 common/gdb_thread_db.h.
9952 * thread-db.c: include gdb_thread_db.h from right place.
9954 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9956 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9957 __FILE__ and __LINE__ to internal_error.
9959 2011-05-13 Doug Evans <dje@google.com>
9961 * thread-db.c (try_thread_db_load_from_sdir): New function.
9962 (try_thread_db_load_from_dir): New function.
9963 (thread_db_load_search): Handle $sdir, ignore $pdir.
9964 Remove trying of system directories if search of
9965 libthread-db-search-path fails, that is now done via $sdir.
9967 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9969 * server.c (handle_query): Add EnableDisableTracepoints to the list
9970 of supported features.
9971 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9973 (cmd_qtenable_disable): New.
9974 (cmd_qtstart): Install tracepoints even if disabled.
9975 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9976 receiving a QTEnable or QTDisable packet.
9977 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9978 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9980 (gdb_probe): Skip data collection if static tracepoint is disabled.
9982 2011-05-10 Doug Evans <dje@google.com>
9984 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9986 2011-05-04 Doug Evans <dje@google.com>
9988 * linux-low.c (linux_join): Skip process lookup.
9989 * spu-low.c (spu_join): Ditto.
9990 * server.c (join_inferiors_callback): Delete.
9991 (process_serial_event): For 'D' packet (detach) call join_inferior
9994 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9996 * README: Don't mention xscale*-*-linux*.
9997 * configure.srv (xscale*-*-linux*): Don't handle target.
9999 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10001 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10003 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10004 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10005 (i386_emit_void_call_2): Likewise.
10007 2011-04-26 Yao Qi <yao@codesourcery.com>
10009 * linux-low.c: Move common macros to linux-ptrace.h.
10010 Include linux-ptrace.h.
10011 * Makefile.in (linux_ptrace_h): New.
10012 (linux-low.o): Depends on linux-ptrace.h.
10014 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10016 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10017 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10018 (remote_prepare): New function with most of the TCP code from ...
10019 (remote_open): ... here. Detect PORT here unconditionally. Move also
10020 setting transport_is_reliable.
10021 * server.c (run_once): New variable.
10022 (gdbserver_usage): Document it.
10023 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10024 the first run if RUN_ONCE.
10025 * server.h (run_once, remote_prepare): New declarations.
10027 2011-04-19 Tom Tromey <tromey@redhat.com>
10029 * win32-low.c (handle_load_dll): Remove duplicate "the".
10031 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10033 Remove support for old Cygwin 1.5 versions.
10034 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10035 function to avoid warning.
10036 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10039 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10041 * gdbserver/server.h (Macro _): Define it if not available.
10043 2011-03-14 Michael Snyder <msnyder@vmware.com>
10045 * hostio.c (handle_close): Remove unnecessary null test.
10047 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10049 * Makefile.in (maintainer-clean realclean distclean): Remove
10050 "make ... subdir_do" command.
10052 2011-03-10 Michael Snyder <msnyder@vmware.com>
10054 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10056 * server.c (handle_v_run): Free alloced buffer on early return.
10058 2011-03-09 Yao Qi <yao@codesourcery.com>
10061 2011-03-04 Yao Qi <yao@codesourcery.com>
10063 * Makefile.in: Remove GNU make feature --directory.
10065 2011-03-05 Yao Qi <yao@codesourcery.com>
10067 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10068 (subdir_do): New make target. Copied from gdb/Makefile.
10069 (maintainer-clean, realclean, distclean, clean): Call corresponding
10070 make targets in common/Makefile.
10072 2011-02-11 Yao Qi <yao@codesourcery.com>
10074 * configure.ac: Call AC_PROG_RANLIB.
10075 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10076 * configure: Regenerate.
10078 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10080 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10082 2011-03-06 Yao Qi <yao@codesourcery.com>
10084 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10086 2011-03-05 Yao Qi <yao@codesourcery.com>
10088 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10089 (subdir_do): New make target. Copied from gdb/Makefile.
10090 (maintainer-clean, realclean, distclean, clean): Call corresponding
10091 make targets in common/Makefile.
10093 2011-03-04 Yao Qi <yao@codesourcery.com>
10095 * Makefile.in: Remove GNU make feature --directory.
10097 2011-03-04 Michael Snyder <msnyder@vmware.com>
10099 * server.c (queue_stop_reply): Call xmalloc not malloc.
10101 2011-03-02 Michael Snyder <msnyder@vmware.com>
10103 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10105 2011-02-28 Michael Snyder <msnyder@vmware.com>
10107 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10108 (cmd_qtframe): Ditto.
10109 (cmd_qtbuffer): Ditto.
10110 (cmd_bigqtbuffer): Ditto.
10112 * utils.c (decimal2str): Initialize 'width' to nine, then
10113 don't mess with it.
10115 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10117 * hostio.c (require_data): Free *data, not data.
10119 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10121 * hostio.c (require_data): Use free, not xfree.
10123 2011-02-27 Michael Snyder <msnyder@vmware.com>
10125 * server.c (handle_query): Discard unused value.
10127 * hostio.c (require_data): Free malloc memory before returning
10130 2011-02-26 Michael Snyder <msnyder@vmware.com>
10132 * linux-low.c (list_threads): Call closedir for dirent.
10134 2011-02-27 Michael Snyder <msnyder@vmware.com>
10136 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10137 a case statement falls through.
10139 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10141 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10144 2011-02-26 Michael Snyder <msnyder@vmware.com>
10146 * utils.c (decimal2str): Eliminate dead code and dead param.
10147 (pulongest): Drop dead param from call to decimal2str.
10150 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10152 Revert the following patch (not approved yet):
10153 2011-02-21 Hui Zhu <teawater@gmail.com>
10154 * tracepoint.c (tp_printf): New function.
10155 (eval_agent_expr): Handle gdb_agent_op_printf.
10157 2011-02-21 Hui Zhu <teawater@gmail.com>
10159 * tracepoint.c (tp_printf): New function.
10160 (eval_agent_expr): Handle gdb_agent_op_printf.
10162 2011-02-18 Tom Tromey <tromey@redhat.com>
10164 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10165 (tracepoint.o): Likewise.
10166 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10167 (gdb_agent_op_names): Likewise.
10169 2011-02-18 Tom Tromey <tromey@redhat.com>
10171 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10172 gdb_agent_op_rot>: New constants.
10173 (gdb_agent_op_names): Add pick and roll.
10174 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10177 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10179 * aclocal.m4: Regenerated with aclocal-1.11.1.
10181 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10183 * server.c (handle_qxfer_traceframe_info): New.
10184 (qxfer_packets): Register "traceframe-info".
10185 (handle_query): Report support for qXfer:traceframe-info:read+.
10186 * tracepoint.c (match_blocktype): New.
10187 (traceframe_find_block_type): Rename to ...
10188 (traceframe_walk_blocks): ... this. Add callback filter argument,
10190 (traceframe_find_block_type): New, reimplemented on top of
10191 traceframe_walk_blocks.
10192 (build_traceframe_info_xml): New.
10193 (traceframe_read_info): New.
10194 * server.h (traceframe_read_info): Declare.
10196 2011-02-11 Yao Qi <yao@codesourcery.com>
10198 * configure.ac: Call AC_PROG_RANLIB.
10199 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10200 * configure: Regenerate.
10202 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10204 * server.c (gdb_read_memory): Change return semantics to allow
10206 (handle_search_memory_1): Adjust.
10207 (process_serial_event) <'m' packet>: Handle partial transfers.
10208 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10210 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10212 * regcache.c (init_register_cache): Initialize
10213 regcache->register_status.
10214 (free_register_cache): Release regcache->register_status.
10215 (regcache_cpy): Copy register_status.
10216 (registers_to_string): Print 'x's for unavailable registers.
10217 (supply_register): Mark the register's status valid or
10218 unavailable, depending on whether a buffer was passed in or not.
10219 (supply_register_zeroed): New.
10220 (supply_regblock): Mark the registers' status valid or
10221 unavailable, depending on whether a buffer was passed in or not.
10222 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10223 (struct regcache): New `register_status' field.
10224 (supply_register_zeroed): Declare.
10225 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10226 supply_register_zeroed, rather than passing a NULL buffer to
10228 * tracepoint.c (fetch_traceframe_registers): Update comment.
10230 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10232 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10235 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10237 * server.h (decode_xfer_write): Change prototype.
10238 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10239 and don't extract the annex here.
10240 * server.c (decode_xfer_read): Remove `annex' parameter,
10241 and don't extract the annex here.
10242 (decode_xfer): New.
10243 (struct qxfer): New.
10244 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10245 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10246 (handle_qxfer_statictrace): New functions, abstracted out from
10247 handle_query, and made to use the struct qxfer interface.
10248 (handle_threads_qxfer_proper): Rename to ...
10249 (handle_qxfer_threads_proper): ... this.
10250 (handle_threads_qxfer): Rename to ...
10251 (handle_qxfer_threads): ... this. Adjust.
10252 (qxfer_packets): New array.
10253 (handle_qxfer): New function.
10254 (handle_query): Use handle_qxfer.
10256 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10258 * gdbreplay.c: Shorten lines of >= 80 columns.
10259 * linux-low.c: Ditto.
10260 * linux-ppc-low.c: Ditto.
10261 * linux-s390-low.c: Ditto.
10262 * linux-sparc-low.c: Ditto.
10263 * linux-x86-low.c: Ditto.
10264 * linux-xtensa-low.c: Ditto.
10265 * mem-break.c: Ditto.
10266 * nto-low.c: Ditto.
10267 * regcache.h: Ditto.
10268 * remote-utils.c: Ditto.
10271 * thread-db.c: Ditto.
10272 * tracepoint.c: Ditto.
10274 * win32-low.h: Ditto.
10276 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10278 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10281 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10283 * server.c (gdbserver_version): Update copyright year in version
10285 * gdbreplay.c (gdbreplay_version): Ditto.
10287 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10289 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10290 * linux-bfin-low.c: New file.
10291 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10292 PT_DATA_ADDR for BFIN targets.
10293 * Makefile.in (SFILES): Add linux-bfin-low.c.
10294 (clean): Remove reg-bfin.c.
10295 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10296 * README: Mention supported Blackfin targets.
10298 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10300 * .gitignore: New file.
10302 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10304 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10306 2010-10-22 Jie Zhang <jie@codesourcery.com>
10308 * Makefile.in: Add FLAGS_TO_PASS variable.
10309 (install): Remove dependency of install-only and recursively
10310 invoke make for install-only.
10312 2010-10-04 Doug Evans <dje@google.com>
10314 * Makefile.in (uninstall): Use $(DESTDIR).
10316 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10320 * linux-x86-low.c (compat_siginfo_from_siginfo)
10321 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10322 si_code is < 0. Check for si_code == SI_TIMER before checking for
10325 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10327 * lynx-i386-low.c: New file.
10328 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10330 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10332 * lynx-low.c (ptrace_request_to_str): Remove handling for
10333 request values that have been removed in LynxOS 5.x.
10335 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10337 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10340 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10342 * configure.ac: Add --enable-inprocess-agent option.
10343 * configure: Rebuilt.
10345 2010-09-06 Yao Qi <yao@codesourcery.com>
10347 * linux-low.c (linux_kill): Remove unused variable.
10348 (linux_stabilize_threads): Likewise.
10349 * server.c (start_inferior): Likewise.
10350 (queue_stop_reply_callback): Likewise.
10351 * tracepoint.c (do_action_at_tracepoint): Likewise.
10353 2010-09-06 Yao Qi <yao@codesourcery.com>
10355 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10358 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10360 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10362 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10364 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10367 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10369 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10370 gdbserver/lynx-ppc-low.c: New files.
10371 * Makefile.in (lynx_low_h): New variable.
10372 (lynx-low.o, lynx-ppc-low.o): New rules.
10373 * configure.ac: On LynxOS, link with -lnetinet.
10374 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10375 * configure: regenerate.
10377 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10379 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10380 * configure.ac: Add check for vasprintf and vsnprintf.
10381 * configure, config.in: Regenerate.
10382 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10384 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10386 * gdbreplay.c: Move include of alloca.h up, next to include of
10388 * server.h: Add include of malloc.h.
10389 * mem-break.c: Remove include of malloc.h.
10390 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10392 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10394 * Makefile.in (memmem.o): Build with -Wno-error.
10396 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10398 * utils.c (xsnprintf): Make non-static.
10399 * server.h: Add xsnprintf declaration.
10400 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10401 replace calls to snprintf by calls to xsnprintf throughout.
10403 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10405 * configure.ac: Add configure check for alloca.
10406 * configure, config.in: Regenerate.
10407 * server.h: Include alloca.h if it exists.
10408 * gdbreplay.c: Include alloca.h if it exists.
10410 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10412 * linux-low.c (__SIGRTMIN): Define if not already defined.
10413 (linux_create_inferior): Check for __ANDROID__ rather than
10415 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10416 are already deferred.
10417 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10418 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10419 stopped and already has a pending signal to report.
10420 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10421 a pending signal to report or is moving out of a jump pad.
10422 (linux_init_signals): Check for __ANDROID__ rather than
10425 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10427 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10428 debug_threads check. Avoid a linear search when not doing debug
10431 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10433 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10434 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10435 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10436 (process_event): Change local fd's type to gdb_fildes_t.
10437 (create_file_handler): Adjust prototype.
10438 (delete_file_handler): Adjust prototype.
10439 (handle_file_event): Adjust prototype. Use pfildes.
10440 (create_file_event): Adjsut prototype.
10441 * remote-utils.c (remote_desc, listen_desc): Change type to
10443 * server.h: New gdb_fildes_t typedef.
10444 [USE_WIN32API]: Include winsock2.h.
10445 (delete_file_handler, add_file_handler): Adjust prototypes.
10446 (pfildes): Declare.
10447 * utils.c (pfildes): New.
10449 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10451 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10452 * configure: Regenerate.
10454 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10456 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10457 (linux_done_accessing_memory): ... this.
10458 (linux_target_ops): Adjust.
10459 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10460 * nto-low.c (nto_target_ops): Adjust comment.
10461 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10462 * spu-low.c (spu_target_ops): Adjust comment.
10463 * target.h (target_ops): Rename unprepare_to_access_memory field
10464 to done_accessing_memory.
10465 (unprepare_to_access_memory): Rename to ...
10466 (done_accessing_memory): ... this.
10468 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10470 * linux-low.c (linux_prepare_to_access_memory): New.
10471 (linux_unprepare_to_access_memory): New.
10472 (linux_target_ops): Install them.
10473 * server.c (read_memory): Rename to ...
10474 (gdb_read_memory): ... this. Use
10475 prepare_to_access_memory/prepare_to_access_memory.
10476 (write_memory): Rename to ...
10477 (gdb_write_memory): ... this. Use
10478 prepare_to_access_memory/prepare_to_access_memory.
10479 (handle_search_memory_1): Adjust.
10480 (process_serial_event): Adjust.
10481 * target.h (struct target_ops): New fields
10482 prepare_to_access_memory and unprepare_to_access_memory.
10483 (prepare_to_access_memory, unprepare_to_access_memory): New.
10484 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10485 prepare_to_access_memory/prepare_to_access_memory.
10486 * nto-low.c (nto_target_ops): Adjust.
10487 * spu-low.c (spu_target_ops): Adjust.
10488 * win32-low.c (win32_target_ops): Adjust.
10490 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10492 * Makefile.in (WARN_CFLAGS): Get it from configure.
10493 (WERROR_CFLAGS): New.
10494 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10495 * configure.ac: Introduce --enable-werror, which adds -Werror to
10496 the compiler command line. Enabled by default. Disable with
10497 --disable-werror. Add -Wdeclaration-after-statement
10498 Wpointer-arith and -Wformat-nonliteral to warning flags.
10499 * configure: Regenerate.
10501 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10503 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10505 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10507 * gdbreplay.c (remote_error): New.
10509 (expect): Use gdbchar. Check for error reading from GDB.
10510 Clarify sync error output.
10511 (play): Check for errors writing to GDB.
10512 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10513 * remote-utils.c (getpkt): Check for errors writing to the remote
10516 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10518 * linux-low.c (linux_wait_1): Move non-debugging code out of
10519 `debug_threads' control.
10521 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10523 * linux-low.c (linux_wait_1): Don't set last_status here.
10524 * server.c (push_event, queue_stop_reply_callback): Assert we're
10525 not pushing a TARGET_WAITKIND_IGNORE event.
10526 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10527 (myresume, handle_target_event): Set the thread's last_resume_kind
10528 and last_status from the target returned status.
10530 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10534 * linux-x86-low.c (update_debug_registers_callback): New.
10535 (i386_dr_low_set_addr): Use it.
10536 (i386_dr_low_get_addr): New.
10537 (i386_dr_low_set_control): Use update_debug_registers_callback.
10538 (i386_dr_low_get_control): New.
10539 (i386_dr_low_get_status): Adjust.
10540 * linux-low.c (linux_stop_lwp): New.
10541 * linux-low.h (linux_stop_lwp): Declare.
10543 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10544 argument instead of a i386_debug_reg_state.
10545 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10546 a i386_debug_reg_state.
10547 (i386_insert_aligned_watchpoint): Adjust.
10548 (i386_remove_aligned_watchpoint): Adjust.
10549 (i386_low_stopped_data_address): Read the debug registers from the
10550 inferior instead of from the mirrors.
10551 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10552 (i386_dr_low_get_addr): Declare.
10553 (i386_dr_low_get_control): Declare.
10554 (i386_dr_low_get_status): Change prototype.
10556 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10557 (i386_dr_low_get_addr): New.
10558 (i386_dr_low_get_control): New.
10559 (i386_dr_low_get_status): Adjust prototype. Return
10561 (i386_initial_stuff): Clear dr_status_mirror and
10563 (i386_get_thread_context): Adjust.
10564 (i386_set_thread_context): Adjust.
10565 (i386_thread_added): Adjust.
10567 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10569 * linux-low.h (linux_thread_area): Delete declaration.
10571 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10573 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10574 after its termination.
10576 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10578 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10579 (gdb_wants_all_stopped): Delete.
10580 (linux_wait_1): Don't call them.
10581 * server.c (handle_v_cont): Tag all threads as want-stopped.
10582 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10583 stopped as "client-wants-stopped".
10585 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10587 * Makefile.in (signals_h): New.
10588 (server_h): Depend on it.
10589 (server.o): Don't depend on $(signals_def).
10590 (signals.o): Depend on $(signals_def).
10592 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10594 * Makefile.in (signals_def): New.
10595 (server_h): Append include/gdb/signals.h and signals_def.
10596 (server.o): Append signals_def.
10598 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10600 * server.c (handle_target_event): Use target_signal_to_host for
10601 resume_info.sig initialization.
10602 * target.h (struct thread_resume) <sig>: New comment.
10604 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10606 * server.c (handle_query): strcpy() the returned string from paddress()
10607 instead of sprintf().
10608 * utils.c (paddress): Return phex_nz().
10610 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10612 * server.c (handle_v_cont): Call mourn_inferior if process
10614 (myresume): Likewise.
10616 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10618 Static tracepoints, and integration with UST.
10620 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10621 * mem-break.c (uninsert_all_breakpoints)
10622 (reinsert_all_breakpoints): New.
10623 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10624 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10625 (gdb_agent_ust_loaded, helper_thread_id)
10626 (gdb_agent_helper_thread_id): New macros.
10627 (struct ipa_sym_addresses): Add addr_ust_loaded,
10628 addr_helper_thread_id, addr_cmd_buf.
10629 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10630 (in_process_agent_loaded_ust): New.
10631 (write_e_ust_not_loaded): New.
10632 (maybe_write_ipa_ust_not_loaded): New.
10633 (struct collect_static_trace_data_action): New.
10634 (enum tracepoint_type) <static_tracepoint>: New.
10635 (struct tracepoint) <handle>: Mention static tracepoints.
10636 (struct static_tracepoint_ctx): New.
10637 (CMD_BUF_SIZE): New.
10638 (add_tracepoint_action): Handle static tracepoint actions.
10639 (unprobe_marker_at): New.
10640 (clear_installed_tracepoints): Handle static tracepoints.
10641 (cmd_qtdp): Handle static tracepoints.
10642 (probe_marker_at): New.
10643 (cmd_qtstart): Handle static tracepoints.
10644 (response_tracepoint): Handle static tracepoints.
10645 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10646 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10647 (get_context_regcache): Handle static tracepoints.
10648 (do_action_at_tracepoint): Handle static tracepoint actions.
10649 (traceframe_find_block_type): Handle static trace data blocks.
10650 (traceframe_read_sdata): New.
10651 (download_tracepoints): Download static tracepoint actions.
10652 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10653 (GDB_PROBE_NAME): New.
10655 (GET_UST_SYM): New.
10658 (ust_marker_to_static_tracepoint): New.
10660 (collect_ust_data_at_tracepoint): New.
10661 (gdb_ust_probe): New.
10662 (UNIX_PATH_MAX, SOCK_DIR): New.
10663 (gdb_ust_connect_sync_socket): New.
10664 (resume_thread, stop_thread): New.
10665 (run_inferior_command): New.
10666 (init_named_socket): New.
10667 (gdb_ust_socket_init): New.
10668 (cstr_to_hexstr): New.
10670 (first_marker, next_marker): New.
10671 (response_ust_marker): New.
10672 (cmd_qtfstm, cmd_qtsstm): New.
10673 (unprobe_marker_at, probe_marker_at): New.
10674 (cmd_qtstmat, gdb_ust_thread): New.
10675 (gdb_ust_init): New.
10676 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10677 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10678 (ST_REGENTRY): New.
10679 (x86_64_st_collect_regmap): New.
10680 (X86_64_NUM_ST_COLLECT_GREGS): New.
10681 (AMD64_RIP_REGNUM): New.
10682 (supply_static_tracepoint_registers): New.
10683 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10684 (ST_REGENTRY): New.
10685 (i386_st_collect_regmap): New.
10686 (i386_NUM_ST_COLLECT_GREGS): New.
10687 (supply_static_tracepoint_registers): New.
10688 * server.c (handle_query): Handle qXfer:statictrace:read.
10689 <qSupported>: Report support for StaticTracepoints, and
10690 qXfer:statictrace:read features.
10691 * server.h (traceframe_read_sdata)
10692 (supply_static_tracepoint_registers): Declare.
10693 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10694 (unpack_varlen_hex): Include in IPA build.
10695 * Makefile.in (ustlibs, ustinc): New.
10696 (IPA_OBJS): Add remote-utils-ipa.o.
10697 ($(IPA_LIB)): Link -ldl and -lpthread.
10699 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10700 * config.in, configure: Regenerate.
10702 2010-06-20 Ian Lance Taylor <iant@google.com>
10703 Pedro Alves <pedro@codesourcery.com>
10705 * linux-x86-low.c (always_true): Delete.
10706 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10707 trying to fool the compiler with always_true.
10709 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10711 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10712 conditions in gdbserver.
10714 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10716 * spu-low.c (spu_read_memory): Wrap around local store limit.
10717 (spu_write_memory): Likewise.
10719 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10721 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10722 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10724 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10726 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10727 uses with LONGEST uses.
10729 2010-06-14 Stan Shebs <stan@codesourcery.com>
10730 Pedro Alves <pedro@codesourcery.com>
10734 * linux-x86-low.c: Include limits.h.
10736 (always_true): New.
10739 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10740 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10741 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10742 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10743 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10744 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10745 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10746 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10747 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10748 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10749 (amd64_emit_void_call_2): New.
10750 (amd64_emit_ops): New.
10751 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10752 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10753 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10754 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10755 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10756 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10757 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10758 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10759 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10760 (i386_emit_stack_adjust, i386_emit_int_call_1)
10761 (i386_emit_void_call_2): New.
10762 (i386_emit_ops): New.
10763 (x86_emit_ops): New.
10764 (the_low_target): Install x86_emit_ops.
10765 * server.h (struct emit_ops): New.
10766 (get_raw_reg_func_addr): Declare.
10767 (current_insn_ptr, emit_error): Declare.
10768 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10769 (set_trace_state_variable_value): New defines.
10770 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10771 addr_get_trace_state_variable_value and
10772 addr_set_trace_state_variable_value.
10773 (symbol_list): New fields for get_raw_reg,
10774 get_trace_state_variable_value and set_trace_state_variable_value.
10775 (condfn): New typedef.
10776 (struct tracepoint): New field `compiled_cond'.
10777 (do_action_at_tracepoint): Clear compiled_cond.
10778 (get_trace_state_variable_value, set_trace_state_variable_value):
10780 (condition_true_at_tracepoint): If there's a compiled condition,
10782 (current_insn_ptr, emit_error): New globals.
10783 (struct bytecode_address): New.
10784 (get_raw_reg_func_addr): New.
10785 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10786 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10787 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10788 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10789 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10790 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10791 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10792 (compile_tracepoint_condition, compile_bytecodes): New.
10793 * target.h (emit_ops): Forward declare.
10794 (struct target_ops): New field emit_ops.
10795 (target_emit_ops): New.
10796 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10797 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10798 * linux-low.c (linux_emit_ops): New.
10799 (linux_target_ops): Install it.
10800 * linux-low.h (struct linux_target_ops): New field emit_ops.
10802 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10804 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10805 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10807 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10808 Stan Shebs <stan@codesourcery.com>
10810 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10811 (all): Depend on $(extra_libraries).
10812 (install-only): Install the IPA.
10813 (IPA_OBJS, IPA_LIB): New.
10814 (clean): Remove the IPA lib.
10815 (IPAGENT_CFLAGS): New.
10816 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10817 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10818 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10819 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10820 * configure.ac: Check for atomic builtins support in the compiler.
10821 (IPA_DEPFILES, extra_libraries): Define.
10822 * configure.srv (ipa_obj): Add description.
10823 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10824 (i[34567]86-*-linux*): Set ipa_obj.
10825 (x86_64-*-linux*): Set ipa_obj.
10826 * linux-low.c (stabilizing_threads): New.
10827 (supports_fast_tracepoints): New.
10828 (linux_detach): Stabilize threads before detaching.
10829 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10830 the lwp is either not stabilizing, or is moving out of a jump pad.
10831 (linux_fast_tracepoint_collecting): New.
10832 (maybe_move_out_of_jump_pad): New.
10833 (enqueue_one_deferred_signal): New.
10834 (dequeue_one_deferred_signal): New.
10835 (linux_wait_for_event_1): If moving out of a jump pad, defer
10836 pending signals to later.
10837 (linux_stabilize_threads): New.
10838 (linux_wait_1): Check if threads need moving out of jump pads, and
10840 (stuck_in_jump_pad_callback): New.
10841 (move_out_of_jump_pad_callback): New.
10842 (lwp_running): New.
10843 (linux_resume_one_lwp): Handle moving out of jump pads.
10844 (linux_set_resume_request): Dequeue deferred signals.
10845 (need_step_over_p): Also step over fast tracepoint jumps.
10846 (start_step_over): Also uninsert fast tracepoint jumps.
10847 (finish_step_over): Also reinsert fast tracepoint jumps.
10848 (linux_install_fast_tracepoint_jump): New.
10849 (linux_target_ops): Install linux_stabilize_threads and
10850 linux_install_fast_tracepoint_jump_pad.
10851 * linux-low.h (linux_target_ops) <get_thread_area,
10852 install_fast_tracepoint_jump_pad>: New fields.
10853 (struct lwp_info) <collecting_fast_tracepoint,
10854 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10855 (linux_get_thread_area): Declare.
10856 * linux-x86-low.c (jump_insn): New.
10857 (x86_get_thread_area): New.
10858 (append_insns): New.
10859 (push_opcode): New.
10860 (amd64_install_fast_tracepoint_jump_pad): New.
10861 (i386_install_fast_tracepoint_jump_pad): New.
10862 (x86_install_fast_tracepoint_jump_pad): New.
10863 (the_low_target): Install x86_get_thread_area and
10864 x86_install_fast_tracepoint_jump_pad.
10865 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10866 (struct fast_tracepoint_jump): New.
10867 (fast_tracepoint_jump_insn): New.
10868 (fast_tracepoint_jump_shadow): New.
10869 (find_fast_tracepoint_jump_at): New.
10870 (fast_tracepoint_jump_here): New.
10871 (delete_fast_tracepoint_jump): New.
10872 (set_fast_tracepoint_jump): New.
10873 (uninsert_fast_tracepoint_jumps_at): New.
10874 (reinsert_fast_tracepoint_jumps_at): New.
10875 (set_breakpoint_at): Use write_inferior_memory.
10876 (uninsert_raw_breakpoint): Use write_inferior_memory.
10877 (check_mem_read): Mask out fast tracepoint jumps.
10878 (check_mem_write): Mask out fast tracepoint jumps.
10879 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10880 (set_fast_tracepoint_jump): Declare.
10881 (delete_fast_tracepoint_jump)
10882 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10883 (reinsert_fast_tracepoint_jumps_at): Declare.
10884 * regcache.c: Don't compile many functions when building the
10885 in-process agent library.
10886 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10887 the register buffer in the heap.
10888 (free_register_cache): If the register buffer isn't owned by the
10889 regcache, don't free it.
10890 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10891 pre-existing register caches.
10892 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10894 (convert_ascii_to_int): : Constify `from' parameter type.
10895 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10896 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10897 the needed buffer in-place.
10898 (relocate_instruction): New.
10899 * server.c (handle_query) <qSymbols>: If the target supports
10900 tracepoints, give it a chance of looking up symbols. Report
10901 support for fast tracepoints.
10902 (handle_status): Stabilize threads.
10903 (process_serial_event): Adjust.
10904 * server.h (struct fast_tracepoint_jump): Forward declare.
10905 (struct process_info) <fast_tracepoint_jumps>: New field.
10906 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10907 (decode_X_packet, decode_M_packet): Adjust.
10908 (relocate_instruction): Declare.
10909 (in_process_agent_loaded): Declare.
10910 (tracepoint_look_up_symbols): Declare.
10911 (struct fast_tpoint_collect_status): Declare.
10912 (fast_tracepoint_collecting): Declare.
10913 (force_unlock_trace_buffer): Declare.
10914 (handle_tracepoint_bkpts): Declare.
10915 (initialize_low_tracepoint)
10916 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10917 * target.h (struct target_ops) <stabilize_threads,
10918 install_fast_tracepoint_jump_pad>: New fields.
10919 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10920 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10921 [HAVE_STDINT_H]: Include stdint.h.
10922 (trace_debug_1): Rename to ...
10923 (trace_vdebug): ... this.
10924 (trace_debug): Rename to ...
10925 (trace_debug_1): ... this. Add `level' parameter.
10926 (trace_debug): New.
10927 (ATTR_USED, ATTR_NOINLINE): New.
10928 (IP_AGENT_EXPORT): New.
10929 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10930 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10931 (about_to_request_buffer_space, trace_buffer_is_full)
10932 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10933 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10934 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10935 (traceframe_write_count, traceframes_created)
10936 (trace_state_variables)
10937 New renaming defines.
10938 (struct ipa_sym_addresses): New.
10939 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10940 (symbol_list): New.
10941 (ipa_sym_addrs): New.
10942 (all_tracepoint_symbols_looked_up): New.
10943 (in_process_agent_loaded): New.
10944 (write_e_ipa_not_loaded): New.
10945 (maybe_write_ipa_not_loaded): New.
10946 (tracepoint_look_up_symbols): New.
10947 (debug_threads) [IN_PROCESS_AGENT]: New.
10948 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10949 (UNKNOWN_SIDE_EFFECTS): New.
10950 (stop_tracing): New.
10951 (flush_trace_buffer): New.
10952 (stop_tracing_bkpt): New.
10953 (flush_trace_buffer_bkpt): New.
10954 (read_inferior_integer): New.
10955 (read_inferior_uinteger): New.
10956 (read_inferior_data_pointer): New.
10957 (write_inferior_data_pointer): New.
10958 (write_inferior_integer): New.
10959 (write_inferior_uinteger): New.
10960 (struct collect_static_trace_data_action): Delete.
10961 (enum tracepoint_type): New.
10962 (struct tracepoint) <type>: New field `type'.
10963 <actions_str, step_actions, step_actions_str>: Only include in
10965 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10966 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10967 (tracepoints): Use IP_AGENT_EXPORT.
10968 (last_tracepoint): Don't include in the IPA.
10969 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10970 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10971 (alloced_trace_state_variables): New.
10972 (trace_state_variables): Use IP_AGENT_EXPORT.
10973 (traceframe_t): Delete unused variable.
10974 (circular_trace_buffer): Don't include in the IPA.
10975 (trace_buffer_start): Delete.
10976 (struct trace_buffer_control): New.
10977 (trace_buffer_free): Delete.
10978 (struct ipa_trace_buffer_control): New.
10979 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10980 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10982 (trace_buffer_ctrl): New.
10983 (TRACE_BUFFER_CTRL_CURR): New.
10984 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10985 Reimplement as macros.
10986 (trace_buffer_wrap): Delete.
10987 (traceframe_write_count, traceframe_read_count)
10988 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10989 (struct tracepoint_hit_ctx) <type>: New field.
10990 (struct fast_tracepoint_ctx): New.
10991 (memory_barrier): New.
10993 (record_tracepoint_error): Update atomically in the IPA.
10994 (clear_inferior_trace_buffer): New.
10995 (about_to_request_buffer_space): New.
10996 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10997 updating the same buffer.
10998 (add_tracepoint): Default the tracepoint's type to trap
10999 tracepoint, and orig_size to -1.
11000 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11001 internal variables.
11002 (create_trace_state_variable): New parameter `gdb'. Handle it.
11003 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11004 (cmd_qtdp): Handle fast tracepoints.
11005 (cmd_qtdv): Adjust.
11006 (max_jump_pad_size): New.
11007 (gdb_jump_pad_head): New.
11008 (get_jump_space_head): New.
11009 (claim_jump_space): New.
11010 (sort_tracepoints): New.
11011 (MAX_JUMP_SIZE): New.
11012 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11014 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11015 support. Upload fast traceframes, and delete internal IPA
11017 (stop_tracing_handler): New.
11018 (flush_trace_buffer_handler): New.
11019 (cmd_qtstop): Upload fast tracepoints.
11020 (response_tracepoint): Handle fast tracepoints.
11021 (tracepoint_finished_step): Upload fast traceframes. Set the
11022 tracepoint hit context's tracepoint type.
11023 (handle_tracepoint_bkpts): New.
11024 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11025 type. Add comment about fast tracepoints.
11026 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11027 non-existing action_str field.
11028 (get_context_regcache): Handle fast tracepoints.
11029 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11031 (fast_tracepoint_from_jump_pad_address): New.
11032 (fast_tracepoint_from_ipa_tpoint_address): New.
11033 (collecting_t): New.
11034 (force_unlock_trace_buffer): New.
11035 (fast_tracepoint_collecting): New.
11037 (gdb_collect): New.
11038 (write_inferior_data_ptr): New.
11039 (target_tp_heap): New.
11040 (target_malloc): New.
11041 (download_agent_expr): New.
11043 (download_tracepoints): New.
11044 (download_trace_state_variables): New.
11045 (upload_fast_traceframes): New.
11046 (IPA_FIRST_TRACEFRAME): New.
11047 (IPA_NEXT_TRACEFRAME_1): New.
11048 (IPA_NEXT_TRACEFRAME): New.
11049 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11050 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11051 (gdb_jump_pad_buffer_end): New.
11052 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11053 (initialize_tracepoint): Adjust.
11054 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11055 buffer. Initialize the low module.
11056 * utils.c (PREFIX, TOOLNAME): New.
11057 (malloc_failure): Use PREFIX.
11058 (error): In the IPA, an error causes an exit.
11059 (fatal, warning): Use PREFIX.
11060 (internal_error): Use TOOLNAME.
11061 (NUMCELLS): Increase to 10.
11062 * configure, config.in: Regenerate.
11064 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11066 * server.c (handle_query) <qSupported>: Do two passes over the
11067 qSupported string to avoid nesting strtok.
11069 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11071 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11073 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11074 -Wl,--dynamic-list.
11075 * configure: Regenerate.
11076 * proc-service.list: New.
11078 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11080 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11083 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11085 * gdbreplay.c (remote_open): Check error return from socket() call by
11086 its equality to -1 not by it being negative.
11087 * remote-utils.c (remote_open): Likewise.
11089 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11091 * config.h: Regenerate.
11093 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11095 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11096 doesn't provide PTRACE_GET_THREAD_AREA.
11098 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11100 * linux-m68k-low.c: Include <asm/ptrace.h>
11101 (ps_get_thread_area): Implement.
11103 2010-05-03 Doug Evans <dje@google.com>
11105 * event-loop.c (struct callback_event): New struct.
11106 (callback_list): New global.
11107 (append_callback_event, delete_callback_event): New functions.
11108 (process_callback): New function.
11109 (start_event_loop): Call it.
11110 * remote-utils.c (NOT_SCHEDULED): Define.
11111 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11112 moved out of readchar.
11113 (readchar): Rewrite. Call reschedule before returning.
11114 (reset_readchar): New function.
11115 (remote_close): Call it.
11116 (process_remaining, reschedule): New functions.
11117 * server.h (callback_handler_func): New typedef.
11118 (append_callback_event, delete_callback_event): Declare.
11120 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11122 * proc-service.c (ps_pglobal_lookup): Use
11123 thread_db_look_up_one_symbol.
11124 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11125 parameter. Use it instead of all_symbols_looked_up.
11126 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11128 (all_symbols_looked_up): Don't declare.
11129 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11130 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11132 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11133 Set all_symbols_looked_up here.
11134 (thread_db_look_up_one_symbol): New.
11135 (thread_db_get_tls_address): Adjust.
11136 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11137 thread_db object on the heap, and tentatively set it in the
11139 (thread_db_init): Don't set all_symbols_looked_up here.
11140 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11142 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11144 * linux-low.c (linux_kill, linux_detach): Adjust.
11145 (status_pending_p_callback): Remove redundant statement. Check
11146 for !TARGET_WAITIKIND_IGNORE, instead of
11147 TARGET_WAITKIND_STOPPED.
11148 (handle_tracepoints): Make sure LWP is locked. Adjust.
11149 (linux_wait_for_event_1): Adjust.
11150 (linux_cancel_breakpoints): New.
11151 (unsuspend_one_lwp): New.
11152 (unsuspend_all_lwps): New.
11153 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11154 (send_sigstop_callback): Change return type to int, add new
11155 `except' parameter and handle it.
11156 (suspend_and_send_sigstop_callback): New.
11157 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11158 pass them down. If SUSPEND, also increment the lwp's suspend
11160 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11161 (need_step_over_p): Don't consider suspended LWPs.
11162 (start_step_over): Adjust.
11163 (proceed_one_lwp): Change return type to int, add new `except'
11164 parameter and handle it.
11165 (unsuspend_and_proceed_one_lwp): New.
11166 (proceed_all_lwps): Use find_inferior instead of
11168 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11169 also decrement the suspend count of LWPs. Pass `except' down,
11170 instead of hacking its suspend count.
11171 (linux_pause_all): Add `freeze' parameter. Adjust.
11172 (linux_unpause_all): New.
11173 (linux_target_ops): Install linux_unpause_all.
11174 * server.c (handle_status): Adjust.
11175 * target.h (struct target_ops): New fields `unpause_all' and
11176 `cancel_breakpoints'. Add new parameter to `pause_all'.
11177 (pause_all): Add new `freeze' parameter.
11178 (unpause_all): New.
11179 (cancel_breakpoints): New.
11180 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11181 cancel breakpoints.
11182 (cmd_qtstart): Pause threads.
11183 (stop_tracing): Pause threads, and cancel breakpoints.
11184 * win32-low.c (win32_target_ops): Adjust.
11186 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11188 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11189 the inferior right away from here...
11190 (linux_wait_1): ... to here, and adjust to check the thread's
11191 last_resume_kind instead of the lwp's step or stop_expected flags.
11193 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11195 * README: Use consistent `GDB' and `GDBserver' spellings.
11197 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11199 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11200 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11201 (linux_detach_one_lwp): Assume the lwp is stopped.
11202 (any_thread_of): Delete.
11203 (linux_detach): Stop all lwps here. Don't blindly delete all
11205 (delete_lwp_callback): New.
11206 (linux_mourn): Delete all lwps of the process that is gone.
11207 (linux_wait_1): Don't delete the last lwp of the process here.
11208 * mem-break.h (mark_breakpoints_out): Declare.
11209 * mem-break.c (mark_breakpoints_out): New.
11210 (free_all_breakpoints): Use it.
11211 * server.c (handle_target_event): If the process is gone, mark
11213 * thread-db.c (struct thread_db) <create_bp>: New field.
11214 (thread_db_enable_reporting): Fix prototype. Store a thread event
11215 breakpoint reference in the thread_db struct.
11216 (thread_db_load_search): Clear the thread_db object.
11217 (try_thread_db_load_1): Ditto.
11218 (switch_to_process): New.
11219 (disable_thread_event_reporting): Use it.
11220 (remove_thread_event_breakpoints): New.
11221 (thread_db_detach, thread_db_mourn): Use it.
11223 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11225 * linux-low.c (linux_enable_event_reporting): New.
11226 (linux_wait_for_event_1, handle_extended_wait): Use it.
11228 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11230 * linux-low.c (linux_kill_one_lwp, linux_kill)
11231 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11232 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11233 SIGSTOP even if the LWP is stopped.
11234 (send_sigstop_callback): New.
11235 (stop_all_lwps): Use send_sigstop_callback instead.
11236 (linux_resume_one_thread): Adjust.
11237 (proceed_one_lwp): Still proceed an LWP that the client has
11238 requested to stop, if we haven't reported it as stopped yet. Make
11239 sure that LWPs the client want stopped, have a pending SIGSTOP.
11241 2010-04-26 Doug Evans <dje@google.com>
11243 * server.c (handle_general_set): Make static.
11245 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11246 Print received char after testing for error/eof instead of before.
11247 (input_interrupt): Tweak comment.
11249 2010-04-23 Doug Evans <dje@google.com>
11251 * server.c (start_inferior): Print inferior argv if --debug.
11253 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11255 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11256 * nto-x86-low.c: Include server.h
11258 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11260 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11261 be consistent with other sources of this directory.
11262 (init_registers_amd64): Correct name of source file of this function
11265 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11267 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11268 64-bit executables.
11270 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11272 * win32-i386-low.c: Add 64-bit support.
11273 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11274 (init_registers_amd64): Declare.
11275 (mappings): Add 64-bit version of array.
11276 (init_windows_x86): New function.
11277 (the_low_target): Change init_arch field to init_windows_x86.
11279 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11281 * win32-low.c: Adapt to support also 64-bit architecture.
11282 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11283 (get_image_name): Use SIZE_T type for local variable `done'.
11284 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11285 (toolhelp_get_dll_name): Idem.
11286 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11287 Use uintptr_t typecast to avoid warning.
11288 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11289 (handle_exception): Use phex_nz to avoid warning.
11290 (win32_wait): Remove unused local variable `process'.
11292 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11294 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11297 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11299 * configure.ac: Use `ws2_32' library for srv_mingw.
11300 * configure: Regenerate.
11301 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11302 * remote-utils.c: Likewise.
11304 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11306 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11307 if __x86_64__ is defined.
11309 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11311 * configure: Regenerate.
11313 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11315 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11316 * target.h (target_ops): New get_tib_address field.
11317 * win32-low.h (win32_thread_info): Add thread_local_base field.
11318 * win32-low.c (child_add_thread): Add tlb argument.
11319 Set thread_local_base field to TLB.
11320 (get_child_debug_event): Adapt to child_add_thread change.
11321 (win32_get_tib_address): New function.
11322 (win32_target_ops): Set get_tib_address field to
11323 win32_get_tib_address.
11324 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11326 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11328 * linux-low.c (linux_mourn): Also remove the process.
11329 * server.c (handle_target_event): Don't remove the process here.
11330 * nto-low.c (nto_mourn): New.
11331 (nto_target_ops): Install it.
11332 * spu-low.c (spu_mourn): New.
11333 (spu_target_ops): Install it.
11334 * win32-low.c (win32_mourn): New.
11335 (win32_target_ops): Install it.
11337 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11339 * server.h (buffer_xml_printf): Remove redundant `;'.
11341 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11343 * regcache.c (set_register_cache): Invalidate regcaches before
11344 changing the register cache layout.
11345 (regcache_invalidate_one): Allow a NULL regcache.
11346 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11347 regcaches before changing the register cache layout or the target
11350 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11352 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11353 variable warning on Linux/x86-64.
11355 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11357 GDBserver disconnected tracing support.
11359 * linux-low.c (linux_remove_process): Delete.
11360 (add_lwp): Don't set last_resume_kind here.
11361 (linux_kill): Use `mourn'.
11362 (linux_detach): Use `thread_db_detach', and `mourn'.
11363 (linux_mourn): New.
11364 (linux_attach_lwp_1): Adjust comment.
11365 (linux_attach): last_resume_kind moved the thread_info; adjust.
11366 (status_pending_p_callback): Adjust.
11367 (linux_wait_for_event_1): Adjust.
11368 (count_events_callback, select_singlestep_lwp_callback)
11369 (select_event_lwp_callback, cancel_breakpoints_callback)
11370 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11371 (proceed_one_lwp): Adjust.
11372 (linux_async): Add debug output.
11373 (linux_thread_stopped): New.
11374 (linux_pause_all): New.
11375 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11377 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11378 (thread_db_free): Delete declaration.
11379 (thread_db_detach, thread_db_mourn): Declare.
11380 * thread-db.c (thread_db_init): Use thread_db_mourn.
11381 (thread_db_free): Delete, split in two.
11382 (disable_thread_event_reporting): New.
11383 (thread_db_detach): New.
11384 (thread_db_mourn): New.
11386 * server.h (struct thread_info) <last_resume_kind>: New field.
11387 <attached>: Add comment.
11388 <gdb_detached>: New field.
11389 (handler_func): Change return type to int.
11390 (handle_serial_event, handle_target_event): Ditto.
11391 (gdb_connected): Declare.
11393 (disconnected_tracing): Declare.
11394 (stop_tracing): Declare.
11396 * server.c (handle_query) <qSupported>: Report support for
11397 disconnected tracing.
11398 (queue_stop_reply_callback): Account for running threads.
11399 (gdb_wants_thread_stopped): New.
11400 (gdb_wants_all_threads_stopped): New.
11401 (gdb_reattached_process): New.
11402 (handle_status): Clear the `gdb_detached' flag of all processes.
11403 In all-stop, stop all threads.
11404 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11405 (process_serial_event): If the remote connection breaks, or if an
11406 exit was forced with "monitor exit", force an event loop exit.
11407 Handle disconnected tracing on detach.
11408 (handle_serial_event): Adjust.
11409 (handle_target_event): If GDB isn't connected, forward events back
11410 to the inferior, unless the last process exited, in which case,
11411 exit gdbserver. Adjust interface.
11413 * remote-utils.c (remote_open): Don't block in accept. Instead
11414 register an event loop source on the listen socket file
11415 descriptor. Refactor bits into ...
11416 (listen_desc): ... this new global.
11417 (gdb_connected): ... this new function.
11418 (enable_async_notification): ... this new function.
11419 (handle_accept_event): ... this new function.
11420 (remote_close): Clear remote_desc.
11422 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11424 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11426 (mourn_inferior): Define.
11427 (target_process_qsupported): Avoid the dangling else problem.
11428 (thread_stopped): Define.
11429 (pause_all): Define.
11430 (target_waitstatus_to_string): Declare.
11431 * target.c (target_waitstatus_to_string): New.
11433 * tracepoint.c (tracing): Make extern.
11434 (disconnected_tracing): New.
11435 (stop_tracing): Make extern. Handle tracing stops due to GDB
11437 (cmd_qtdisconnected): New.
11438 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11439 (handle_tracepoint_general_set): Handle QTDisconnected.
11441 * event-loop.c (event_handler_func): Change return type to int.
11442 (process_event): Bail out if the event handler wants the event
11444 (handle_file_event): Ditto.
11445 (start_event_loop): Bail out if the event handler wants the event
11448 * nto-low.c (nto_target_ops): Adjust.
11449 * spu-low.c (spu_wait): Don't remove the process here.
11450 (spu_target_ops): Adjust.
11451 * win32-low.c (win32_wait): Don't remove the process here.
11452 (win32_target_ops): Adjust.
11454 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11456 * regcache.c (realloc_register_cache): Invalidate inferior's
11457 regcache before recreating it.
11459 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11461 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11463 2010-04-09 Stan Shebs <stan@codesourcery.com>
11464 Pedro Alves <pedro@codesourcery.com>
11466 * server.h (LONGEST): New.
11467 (struct thread_info) <while_stepping>: New field.
11468 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11470 (initialize_tracepoint, handle_tracepoint_general_set)
11471 (handle_tracepoint_query, tracepoint_finished_step)
11472 (tracepoint_was_hit, release_while_stepping_state_list):
11473 (current_traceframe): Declare.
11474 * server.c (handle_general_set): Handle tracepoint packets.
11475 (read_memory): New.
11476 (write_memory): New.
11477 (handle_search_memory_1): Use read_memory.
11478 (handle_query): Report support for conditional tracepoints, trace
11479 state variables, and tracepoint sources. Handle tracepoint
11481 (main): Initialize the tracepoints module.
11482 (process_serial_event): Handle traceframe reads/writes.
11484 * linux-low.c (handle_tracepoints): New.
11485 (linux_wait_1): Call it.
11486 (linux_resume_one_lwp): Handle while-stepping.
11487 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11488 (linux_target_ops): Install them.
11489 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11491 * linux-x86-low.c (x86_supports_tracepoints): New.
11492 (the_low_target). Install it.
11494 * mem-break.h (delete_breakpoint): Declare.
11495 * mem-break.c (delete_breakpoint): Make external.
11497 * target.h (struct target_ops): Add `supports_tracepoints',
11498 `read_pc', and `write_pc' fields.
11499 (target_supports_tracepoints): Define.
11500 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11503 * regcache.h (struct regcache) <registers_owned>: New field.
11504 (init_register_cache, regcache_cpy): Declare.
11505 (regcache_read_pc, regcache_write_pc): Declare.
11506 (register_cache_size): Declare.
11507 (supply_regblock): Declare.
11508 * regcache.c (init_register_cache): New.
11509 (new_register_cache): Use it.
11510 (regcache_cpy): New.
11511 (register_cache_size): New.
11512 (supply_regblock): New.
11513 (regcache_read_pc, regcache_write_pc): New.
11515 * tracepoint.c: New.
11517 * Makefile.in (OBS): Add tracepoint.o.
11518 (tracepoint.o): New rule.
11520 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11522 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11524 (i386-mmx.c): Likewise.
11525 (i386-mmx-linux.o): Likewise.
11526 (i386-mmx-linux.c): Likewise.
11528 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11529 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11530 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11531 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11533 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11534 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11535 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11537 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11539 * Makefile.in (clean): Updated.
11541 (i386-avx.c): Likewise.
11542 (i386-avx-linux.o): Likewise.
11543 (i386-avx-linux.c): Likewise.
11544 (amd64-avx.o): Likewise.
11545 (amd64-avx.c): Likewise.
11546 (amd64-avx-linux.o): Likewise.
11547 (amd64-avx-linux.c): Likewise.
11549 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11550 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11551 (srv_amd64_regobj): Add amd64-avx.o.
11552 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11553 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11554 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11555 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11556 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11557 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11558 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11560 * i387-fp.c: Include "i386-xstate.h".
11562 (i387_cache_to_xsave): Likewise.
11563 (i387_xsave_to_cache): Likewise.
11564 (x86_xcr0): Likewise.
11566 * i387-fp.h (i387_cache_to_xsave): Likewise.
11567 (i387_xsave_to_cache): Likewise.
11568 (x86_xcr0): Likewise.
11570 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11571 * linux-crisv32-low.c (target_regsets): Likewise.
11572 * linux-m68k-low.c (target_regsets): Likewise.
11573 * linux-mips-low.c (target_regsets): Likewise.
11574 * linux-ppc-low.c (target_regsets): Likewise.
11575 * linux-s390-low.c (target_regsets): Likewise.
11576 * linux-sh-low.c (target_regsets): Likewise.
11577 * linux-sparc-low.c (target_regsets): Likewise.
11578 * linux-xtensa-low.c (target_regsets): Likewise.
11580 * linux-low.c: Include <sys/uio.h>.
11581 (regsets_fetch_inferior_registers): Support nt_type.
11582 (regsets_store_inferior_registers): Likewise.
11583 (linux_process_qsupported): New.
11584 (linux_target_ops): Add linux_process_qsupported.
11586 * linux-low.h (regset_info): Add nt_type.
11587 (linux_target_ops): Add process_qsupported.
11589 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11591 (init_registers_i386_avx_linux): New.
11592 (init_registers_amd64_avx_linux): Likewise.
11593 (xmltarget_i386_linux_no_xml): Likewise.
11594 (xmltarget_amd64_linux_no_xml): Likewise.
11595 (PTRACE_GETREGSET): Likewise.
11596 (PTRACE_SETREGSET): Likewise.
11597 (x86_fill_xstateregset): Likewise.
11598 (x86_store_xstateregset): Likewise.
11599 (use_xml): Likewise.
11600 (x86_linux_update_xmltarget): Likewise.
11601 (x86_linux_process_qsupported): Likewise.
11602 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11603 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11604 init_registers_i386_linux here. Call
11605 x86_linux_update_xmltarget.
11606 (the_low_target): Add x86_linux_process_qsupported.
11608 * server.c (handle_query): Call target_process_qsupported.
11610 * target.h (target_ops): Add process_qsupported.
11611 (target_process_qsupported): New.
11613 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11615 * inferiors.c (add_thread): Set last_status kind to
11616 TARGET_WAITKIND_IGNORE.
11617 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11618 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11619 (linux_wait_1): Move `thread' local definition to block that uses
11620 it. Don't NULL initialize `event_child'.
11621 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11622 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11623 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11625 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11627 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11628 an extended waitstatus, or by a watchpoint.
11629 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11630 thread was stepping or has been stopped by a watchpoint.
11632 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11634 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11635 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11636 of another, then delete the previous, and validate all
11638 (validate_inserted_breakpoint): New.
11639 (delete_disabled_breakpoints): New.
11640 (validate_breakpoints): New.
11641 (check_mem_read): Validate breakpoints before trusting their
11642 shadow. Delete disabled breakpoints.
11643 (check_mem_write): Validate breakpoints before trusting they
11644 should be inserted. Delete disabled breakpoints.
11645 * mem-break.h (validate_breakpoints):
11646 * server.c (handle_query): Validate breakpoints when we see a
11649 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11651 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11652 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11653 if we could tell there's a GDB breakpoint at stop_pc.
11654 (need_step_over_p): Don't do a step over if we find a GDB
11655 breakpoint at the resume PC.
11657 * mem-break.c (struct raw_breakpoint): New.
11658 (enum bkpt_type): New type `gdb_breakpoint'.
11659 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11660 fields. New field `raw'.
11661 (find_raw_breakpoint_at): New.
11662 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11663 breakpoint instead.
11664 (set_breakpoint_at): Adjust.
11665 (delete_raw_breakpoint): New.
11666 (release_breakpoint): New.
11667 (delete_breakpoint): Rename to...
11668 (delete_breakpoint_1): ... this. Add proc parameter. Use
11669 release_breakpoint. Return ENOENT.
11670 (delete_breakpoint): Reimplement.
11671 (find_breakpoint_at): Delete.
11672 (find_gdb_breakpoint_at): New.
11673 (delete_breakpoint_at): Delete.
11674 (set_gdb_breakpoint_at): New.
11675 (delete_gdb_breakpoint_at): New.
11676 (gdb_breakpoint_here): New.
11677 (set_reinsert_breakpoint): Use release_breakpoint.
11678 (uninsert_breakpoint): Rename to ...
11679 (uninsert_raw_breakpoint): ... this.
11680 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11681 (reinsert_raw_breakpoint): Change parameter type to
11683 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11685 (check_breakpoints): Adjust. Use release_breakpoint.
11686 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11687 (breakpoint_inserted_here): Ditto.
11688 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11689 Don't trust the breakpoint's shadow if it is not inserted.
11690 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11691 (delete_all_breakpoints): Adjust.
11692 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11693 use delete_breakpoint_1.
11695 * mem-break.h (breakpoints_supported): Delete declaration.
11696 (set_gdb_breakpoint_at): Declare.
11697 (gdb_breakpoint_here): Declare.
11698 (delete_breakpoint_at): Delete.
11699 (delete_gdb_breakpoint_at): Declare.
11701 * server.h (struct raw_breakpoint): Forward declare.
11702 (struct process_info): New field `raw_breakpoints'.
11704 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11707 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11709 * linux-low.c (status_pending_p_callback): Fix comment.
11710 (linux_wait_for_event_1): Move most of the internal breakpoint
11711 handling from here...
11712 (linux_wait_1): ... to here.
11713 (count_events_callback): New.
11714 (select_singlestep_lwp_callback): New.
11715 (select_event_lwp_callback): New.
11716 (cancel_breakpoints_callback): New.
11717 (select_event_lwp): New.
11718 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11719 priority to all LWPs that have had events that should be reported
11720 to the client. Cancel breakpoints when about to reporting the
11721 event to the client, not while stopping lwps. No longer cancel
11722 finished single-steps here.
11723 (cancel_finished_single_step): Delete.
11724 (cancel_finished_single_steps): Delete.
11726 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11728 * mem-break.c (enum bkpt_type): New.
11729 (struct breakpoint): New field `type'.
11730 (set_breakpoint_at): Change return type to struct breakpoint
11731 pointer. Set type to `other_breakpoint' by default.
11732 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11733 in the breakpoint list.
11734 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11735 (reinsert_breakpoint): Rename to ...
11736 (reinsert_raw_breakpoint): ... this.
11737 (reinsert_breakpoints_at): Adjust.
11738 * mem-break.h (struct breakpoint): Declare.
11739 (set_breakpoint_at): Change return type to struct breakpoint
11742 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11744 * server.c (handle_query): Assign, not compare.
11746 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11748 Teach linux gdbserver to step-over-breakpoints.
11750 * linux-low.c (can_hardware_single_step): New.
11751 (supports_breakpoints): New.
11752 (handle_extended_wait): If stopping threads, read the stop pc of
11753 the new cloned LWP.
11755 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11756 low target doesn't support retrieving the PC.
11757 (add_lwp): Set last_resume_kind to resume_continue.
11758 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11759 (linux_attach): Don't clear stop_expected. Set the lwp's
11760 last_resume_kind to resume_stop.
11761 (linux_detach_one_lwp): Don't check for removed breakpoints.
11762 (check_removed_breakpoint): Delete.
11763 (status_pending_p): Rename to ...
11764 (status_pending_p_callback): ... this. Don't check for removed
11765 breakpoints. Don't consider threads that are stopped from GDB's
11767 (linux_wait_for_lwp): Always read the stop_pc here.
11768 (cancel_breakpoint): New.
11769 (step_over_bkpt): New global.
11770 (linux_wait_for_event_1): Implement stepping over breakpoints.
11771 (gdb_wants_lwp_stopped): New.
11772 (gdb_wants_all_stopped): New.
11773 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11774 single-step traps here. Store the thread's last reported target
11776 (send_sigstop): Don't clear stop_expected. Always set it,
11778 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11779 (cancel_finished_single_step): New.
11780 (cancel_finished_single_steps): New.
11781 (wait_for_sigstop): Don't cancel finished single-step traps here.
11782 (linux_resume_one_lwp): Don't check for removed breakpoints.
11783 Don't set `step' on non-hardware step archs.
11784 (linux_set_resume_request): Ignore resume_stop requests if already
11785 stopping or stopped. Set the lwp's last_resume_kind.
11786 (resume_status_pending_p): Don't check for removed breakpoints.
11787 (need_step_over_p): New.
11788 (start_step_over): New.
11789 (finish_step_over): New.
11790 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11791 requests. Clear the thread's last reported target waitstatus.
11792 Don't use the `suspended' flag. Don't consider pending breakpoints.
11793 (linux_resume): Start a step-over if necessary.
11794 (proceed_one_lwp): New.
11795 (proceed_all_lwps): New.
11796 (unstop_all_lwps): New.
11797 * linux-low.h (struct lwp_info): Rewrite comment for the
11798 `suspended' flag. Add the `stop_pc' field. Delete the
11799 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11800 Add `'last_resume_kind' and `need_step_over' fields.
11801 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11802 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11803 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11804 (set_raw_breakpoint_at): New.
11805 (set_breakpoint_at): Rewrite to use it.
11806 (reinsert_breakpoint_handler): Delete.
11807 (set_reinsert_breakpoint): New.
11808 (reinsert_breakpoint_by_bp): Delete.
11809 (delete_reinsert_breakpoints): New.
11810 (uninsert_breakpoint): Rewrite.
11811 (uninsert_breakpoints_at): New.
11812 (reinsert_breakpoint): Rewrite.
11813 (reinsert_breakpoints_at): New.
11814 (check_breakpoints): Rewrite.
11815 (breakpoint_here): New.
11816 (breakpoint_inserted_here): New.
11817 (check_mem_read): Adjust.
11818 * mem-break.h (breakpoints_supported, breakpoint_here)
11819 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11820 (reinsert_breakpoint_by_bp): Delete declaration.
11821 (delete_reinsert_breakpoints): Declare.
11822 (reinsert_breakpoint): Delete declaration.
11823 (reinsert_breakpoints_at): Declare.
11824 (uninsert_breakpoint): Delete declaration.
11825 (uninsert_breakpoints_at): Declare.
11826 (check_breakpoints): Adjust prototype.
11827 * server.h: Adjust include order.
11828 (struct thread_info): Declare here. Add a `last_status' field.
11830 2010-03-23 Michael Snyder <msnyder@vmware.com>
11832 * server.c (crc32): New function.
11833 (handle_query): Add handling for 'qCRC:' request.
11835 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11837 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11838 lwp had been stopped by a watchpoint.
11840 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11842 * server.h (internal_error): Declare.
11843 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11844 * utils.c (internal_error): New function.
11846 2010-03-15 Andreas Schwab <schwab@redhat.com>
11848 * configure.srv: Fix typo setting srv_regobj.
11850 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11852 * linux-low.c (fetch_register): Avoid passing a non string literal
11854 (usr_store_inferior_registers): Ditto.
11856 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11858 * linux-low.c (linux_write_memory): Bail out early if peeking
11861 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11863 * linux-low.h (struct lwp_info): New fields
11864 `stopped_by_watchpoint' and `stopped_data_address'.
11865 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11866 here, and cache them in the lwp object.
11867 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11869 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11871 (linux_stopped_by_watchpoint): Rewrite.
11872 (linux_stopped_data_address): Rewrite.
11874 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11876 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11877 switching the current inferior, not before.
11879 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11881 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11882 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11883 i386-linux.c and amd64-linux.c.
11884 (reg-i386.o): Removed.
11885 (reg-i386.c): Likewise.
11886 (reg-i386-linux.o): Likewise.
11887 (reg-i386-linux.c): Likewise.
11888 (reg-x86-64.o): Likewise.
11889 (reg-x86-64.c): Likewise.
11890 (reg-x86-64-linux.o): Likewise.
11891 (reg-x86-64-linux.c): Likewise.
11893 (i386.c): Likewise.
11894 (i386-linux.o): Likewise.
11895 (i386-linux.c): Likewise.
11896 (amd64.o): Likewise.
11897 (amd64.c): Likewise.
11898 (amd64-linux.o): Likewise.
11899 (amd64-linux.c): Likewise.
11901 * configure.srv (srv_i386_regobj): New.
11902 (srv_i386_linux_regobj): Likewise.
11903 (srv_amd64_regobj): Likewise.
11904 (srv_amd64_linux_regobj): Likewise.
11905 (srv_i386_32bit_xmlfiles): Likewise.
11906 (srv_i386_64bit_xmlfiles): Likewise.
11907 (srv_i386_xmlfiles): Likewise.
11908 (srv_amd64_xmlfiles): Likewise.
11909 (srv_i386_linux_xmlfiles): Likewise.
11910 (srv_amd64_linux_xmlfiles): Likewise.
11911 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11912 srv_xmlfiles to $srv_i386_xmlfiles.
11913 (i[34567]86-*-mingw32ce*): Likewise.
11914 (i[34567]86-*-mingw*): Likewise.
11915 (i[34567]86-*-nto*): Likewise.
11916 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11917 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11918 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11919 (x86_64-*-linux*): Likewise.
11921 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11922 (init_registers_amd64_linux): New.
11923 (x86_arch_setup): Replace init_registers_x86_64_linux with
11924 init_registers_amd64_linux.
11926 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11928 * configure.ac: Check for libdl. If it is not available link against
11929 static libthread_db.
11930 * configure: Regenerate.
11932 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11936 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11937 handing a read watchpoint.
11938 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11940 2010-02-12 Doug Evans <dje@google.com>
11942 * linux-low.c (linux_supports_tracefork_flag): Document.
11943 (linux_look_up_symbols): Add comment.
11945 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11947 * regcache.c (supply_register): Clear regcache if buf is NULL.
11949 2010-02-02 Nicolas Roche <roche@sourceware.org>
11950 Joel Brobecker <brobecker@adacore.com>
11952 * inferiors.c (find_inferior): Add function documentation.
11953 (unloaded_dll): Handle the case where the unloaded dll has not
11954 been previously registered in the dll list.
11956 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11958 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11959 (thumb2_breakpoint): New.
11960 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11962 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11964 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11965 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11968 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11970 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11972 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11974 * linux-s390-low.c (s390_collect_ptrace_register)
11975 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11977 2010-01-21 Doug Evans <dje@google.com>
11979 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11980 (PTRACE_ARG4_TYPE): New macro.
11981 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11982 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11983 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11984 (usr_store_inferior_registers): Ditto.
11985 (linux_read_memory, linux_write_memory): Ditto.
11986 (linux_test_for_tracefork): Ditto.
11988 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11989 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11991 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11993 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11996 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11998 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11999 prototype to take a regcache. Adjust.
12001 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12003 * regcache.h (struct thread_info): Forward declare.
12004 (struct regcache): New.
12005 (new_register_cache): Adjust prototype.
12006 (get_thread_regcache): Declare.
12007 (free_register_cache): Adjust prototype.
12008 (registers_to_string, registers_from_string): Ditto.
12009 (supply_register, supply_register_by_name, collect_register)
12010 (collect_register_as_string, collect_register_by_name): Ditto.
12011 * regcache.c (struct inferior_regcache_data): Delete.
12012 (get_regcache): Rename to ...
12013 (get_thread_regcache): ... this. Adjust. Switch inferior before
12014 fetching registers.
12015 (regcache_invalidate_one): Adjust.
12016 (regcache_invalidate): Fix prototype.
12017 (new_register_cache): Return the new register cache.
12018 (free_register_cache): Change prototype.
12019 (realloc_register_cache): Adjust.
12020 (registers_to_string): Change prototype to take a regcache. Adjust.
12021 (registers_from_string): Ditto.
12022 (register_data): Ditto.
12023 (supply_register): Ditto.
12024 (supply_register_by_name): Ditto.
12025 (collect_register): Ditto.
12026 (collect_register_as_string): Ditto.
12027 (collect_register_by_name): Ditto.
12028 * server.c (process_serial_event): Adjust.
12029 * linux-low.h (regset_fill_func, regset_store_func): Change
12031 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12033 * linux-low.c (get_stop_pc): Adjust.
12034 (check_removed_breakpoint): Adjust.
12035 (linux_wait_for_event): Adjust.
12036 (linux_resume_one_lwp): Adjust.
12037 (fetch_register): Add regcache parameter. Adjust.
12038 (usr_store_inferior_registers): Ditto.
12039 (regsets_fetch_inferior_registers): Ditto.
12040 (regsets_store_inferior_registers): Ditto.
12041 (linux_fetch_registers, linux_store_registers): Ditto.
12042 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12044 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12046 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12047 prototype to take a regcache.
12048 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12049 * remote-utils.c (convert_ascii_to_int, outreg)
12050 (prepare_resume_reply): Change prototype to take a regcache.
12052 * target.h (struct target_ops) <fetch_registers, store_registers>:
12053 Change prototype to take a regcache.
12054 (fetch_inferior_registers, store_inferior_registers): Change
12055 prototype to take a regcache. Adjust.
12056 * proc-service.c (ps_lgetregs): Adjust.
12057 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12058 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12059 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12060 take a regcache. Adjust.
12061 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12062 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12063 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12064 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12065 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12066 (cris_cannot_fetch_register):
12067 (cris_breakpoint_at): Change prototype to take a regcache.
12069 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12070 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12071 to take a regcache. Adjust.
12072 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12074 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12075 take a regcache. Adjust.
12076 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12077 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12078 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12079 * linux-mips-low.c (mips_get_pc):
12080 (mips_set_pc): Change prototype to take a regcache. Adjust.
12081 (mips_reinsert_addr): Adjust.
12082 (mips_collect_register): Change prototype to take a regcache.
12084 (mips_supply_register):
12085 (mips_collect_register_32bit, mips_supply_register_32bit)
12086 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12087 (mips_store_fpregset): Ditto.
12088 * linux-ppc-low.c (ppc_supply_ptrace_register)
12089 (ppc_supply_ptrace_register): Ditto.
12090 (parse_spufs_run): Adjust.
12091 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12092 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12093 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12094 take a regcache. Adjust.
12095 * linux-s390-low.c (s390_collect_ptrace_register)
12096 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12097 (s390_set_pc): Change prototype to take a regcache. Adjust.
12098 (s390_arch_setup): Adjust.
12099 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12100 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12101 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12102 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12103 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12105 (sparc_breakpoint_at): Adjust.
12106 * linux-xtensa-low.c (xtensa_fill_gregset):
12107 (xtensa_store_gregset):
12108 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12109 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12110 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12111 prototype to take a regcache. Adjust.
12112 * win32-arm-low.c (arm_fetch_inferior_register)
12113 (arm_store_inferior_register): Change prototype to take a
12115 * win32-i386-low.c (i386_fetch_inferior_register)
12116 (i386_store_inferior_register): Change prototype to take a
12118 * win32-low.c (child_fetch_inferior_registers)
12119 (child_store_inferior_registers): Change prototype to take a
12121 (win32_wait): Adjust.
12122 (win32_fetch_inferior_registers): Change prototype to take a
12124 (win32_store_inferior_registers): Adjust.
12125 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12126 store_inferior_register>: Change prototype to take a regcache.
12128 2010-01-20 Doug Evans <dje@google.com>
12130 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12132 (linux_wait_for_event1, linux_init_signals): Ditto.
12133 (W_STOPCODE): Provide definition if missing.
12135 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12137 * linux-low.c (linux_core_of_thread): New.
12138 (compare_ints, show_process, list_threads): New.
12139 (linux_qxfer_osdata): Report threads and cores.
12140 (linux_target_op): Register linux_core_of_thread.
12141 * remote-utils.c (prepare_resume_reply): Report the core.
12142 (buffer_xml_printf): Support %d specifier.
12143 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12145 (handle_query): Handle qXfer:threads. Announce availability
12147 * target.h (struct target_ops): New field core_of_thread.
12149 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12151 * Makefile.in (clean): Remove new generated files.
12152 (reg-s390.o, reg-s390.c): Remove rules.
12153 (reg-s390x.o, reg-s390x.c): Likewise.
12154 (s390-linux32.o, s390-linux32.c): Add rules.
12155 (s390-linux64.o, s390-linux64.c): Likewise.
12156 (s390x-linux64.o, s390x-linux64.c): Likewise.
12157 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12158 * linux-s390-low.c: Include <elf.h>.
12159 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12160 (init_registers_s390): Remove prototype.
12161 (init_registers_s390x): Likewise.
12162 (init_registers_s390_linux32): Add prototype.
12163 (init_registers_s390_linux64): Likewise.
12164 (init_registers_s390x_linux64): Likewise.
12165 (s390_num_regs_3264): New define.
12166 (s390_regmap_3264): New global variable.
12167 (s390_cannot_fetch_register): Remove obsolete check.
12168 (s390_cannot_store_register): Likewise.
12169 (s390_collect_ptrace_register): Handle upper/lower register halves.
12170 (s390_supply_ptrace_register): Likewise.
12171 (s390_fill_gregset): Update to register number changes.
12172 (s390_get_hwcap): New routine.
12173 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12174 Install appropriate regmap and register set.
12176 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12178 * server.c (gdbserver_version): Update copyright year to 2010.
12179 * gdbreplay.c (gdbreplay_version): Likewise.
12181 2009-12-28 Doug Evans <dje@google.com>
12183 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12184 elf/external.h. Include <elf.h> instead but only if necessary.
12186 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12188 * linux-low.c (linux_remove_process): Remove `detaching'
12189 parameter. Don't release/detach from thread_db here.
12190 (linux_kill): Release/detach from thread_db here, ...
12191 (linux_detach): ... and here, before actually detaching.
12192 (linux_wait_1): ... and here, when a process exits.
12193 * thread-db.c (any_thread_of): New.
12194 (thread_db_free): Switch the current inferior to a thread of the
12197 2009-12-21 Doug Evans <dje@google.com>
12199 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12201 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12202 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12203 warning ifndef __NR_tkill. Move setting of errno there too.
12204 Delete unnecessary resetting of errno after syscall.
12205 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12207 * configure.ac: Check for dladdr.
12208 * config.in: Regenerate.
12209 * configure: Regenerate.
12210 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12211 (try_thread_db_load): Update.
12213 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12215 2009-12-18 Doug Evans <dje@google.com>
12217 * event-loop.c: Include unistd.h if it exists.
12219 * linux-low.c (my_waitpid): Move definition away from being in
12220 between linux_tracefork_child/linux_test_for_tracefork.
12222 * gdb_proc_service.h (psaddr_t): Fix type.
12223 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12224 signature to match glibc.
12226 2009-12-16 Doug Evans <dje@google.com>
12228 * linux-low.c (linux_read_memory): Fix argument to read.
12230 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12232 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12233 events, don't leave current_inferior pointing at null.
12235 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12237 * win32-low.c (LOG): Delete.
12238 (OUTMSG): Output to stderr.
12239 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12240 on compile time LOG macro.
12241 (win32_wait): Fix debug output.
12243 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12245 * win32-low.c (win32_add_one_solib): If the dll name is
12246 "ntdll.dll", prepend the system directory to the dll path.
12248 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12250 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12252 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12253 Vladimir Prus <vladimir@codesourcery.com>
12255 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12256 * configure.ac: Check for __mcoldfire__ and set
12257 gdb_cv_m68k_is_coldfire.
12258 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12259 reg-cf.o and reg-m68k.o.
12260 * configure: Regenerated.
12262 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12264 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12265 Pass it to thread_db_free.
12266 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12267 proper `detaching' argument to linux_remove_process.
12268 * linux-low.h (thread_db_free): Add `detaching' parameter.
12269 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12271 (thread_db_free): Add `detaching' parameter. Only
12272 call td_ta_clear_event if detaching from process.
12274 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12276 * thread-db.c (thread_db_free): Fix typo.
12278 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12281 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12283 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12285 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12286 with an i686 compiler.
12287 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12289 * configure: Rebuilt.
12291 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12295 * server.c (handle_search_memory_1): Correct read_addr initialization
12296 in loop for searching subsequent chunks.
12298 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12300 * configure.ac: New --with-libthread-db option.
12301 * thread-db.c: Allow direct dependence on libthread_db.
12302 (thread_db_free): Adjust.
12303 * config.in: Regenerate.
12304 * configure: Likewise.
12306 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12309 * thread-db.c (attach_thread): New function.
12310 (maybe_attach_thread): Return success/failure.
12311 (find_new_threads_callback): Adjust.
12312 (thread_db_find_new_threads): Loop until no new threads.
12314 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12316 * proc-service.c (ps_lgetregs): Formatting.
12318 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12320 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12321 * configure.ac: Adjust.
12322 * linux-low.h (struct process_info_private): Move members to struct
12324 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12325 * linux-low.c (linux_remove_process): Adjust.
12326 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12327 * server.c (handle_query): Move code ...
12328 (handle_monitor_command): ... here. New function.
12329 * target.h (struct target_ops): New member.
12330 * thread-db.c (struct thread_db): New.
12331 (libthread_db_search_path): New variable.
12332 (thread_db_create_event, thread_db_enable_reporting)
12333 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12334 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12335 (try_thread_db_load_1, dladdr_to_soname): New functions.
12336 (try_thread_db_load, thread_db_load_search): New functions.
12337 (thread_db_init): Search for libthread_db.
12338 (thread_db_free): New function.
12339 (thread_db_handle_monitor_command): Likewise.
12340 * config.in: Regenerate.
12341 * configure: Regenerate.
12343 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12345 * spu-low.c (spu_kill): Wait for inferior to terminate.
12346 Call clear_inferiors.
12347 (spu_detach): Call clear_inferiors.
12349 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12351 * aclocal.m4: Regenerate.
12352 * config.in: Likewise.
12353 * configure: Likewise.
12355 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12357 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12358 (parse_spufs_run): New function.
12359 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12360 (ppc_breakpoint_at): Handle SPU breakpoints.
12362 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12364 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12365 (SPUFS_MAGIC): Define.
12366 (spu_enumerate_spu_ids): New function.
12367 (linux_qxfer_spu): New function.
12368 (linux_target_ops): Install linux_qxfer_spu.
12370 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12372 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12373 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12374 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12375 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12376 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12377 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12378 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12379 (init_registers_powerpc_cell32l): Add prototype.
12380 (init_registers_powerpc_cell64l): Likewise.
12381 (ppc_arch_setup): Detect Cell/B.E. architecture.
12383 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12385 * Makefile.in (datarootdir): New variable.
12387 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12389 * linux-low.c (linux_write_memory): Update debugging output.
12390 * Makefile.in (clean): Add new descriptions.
12391 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12392 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12393 * configure.srv: Add new files for arm*-*-linux*.
12394 * linux-arm-low.c: Add new declarations.
12395 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12396 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12397 (HWCAP_VFPv3D16): New.
12398 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12399 instead of __IWMMXT__.
12400 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12401 (arm_arch_setup): New.
12402 (target_regsets): Remove #ifdef. Add VFP regset.
12403 (the_low_target): Use arm_arch_setup.
12405 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12407 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12408 the main thread again.
12410 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12412 Adding Neutrino gdbserver.
12413 * configure: Regenerated.
12414 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12415 * configure.srv (i[34567]86-*-nto*): New target.
12416 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12417 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12418 (nto_comctrl) [__QNX__]: New function.
12419 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12421 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12423 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12426 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12427 Pedro Alves <pedro@codesourcery.com>
12429 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12430 don't support CONTEXT_EXTENDED_REGISTERS.
12431 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12432 (the_low_target): Install them.
12433 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12434 failing with ERROR_PIPE_NOT_CONNECTED.
12436 2009-06-30 Doug Evans <dje@google.com>
12437 Pierre Muller <muller@ics.u-strasbg.fr>
12439 Add h/w watchpoint support to x86-linux, win32-i386.
12440 * Makefile.in (SFILES): Add i386-low.c
12441 (i386_low_h): Define.
12442 (i386-low.o): Add dependencies.
12443 (linux-x86-low.o): Add i386-low.h dependency.
12444 (win32-i386-low.o): Ditto.
12445 * i386-low.c: New file.
12446 * i386-low.h: New file.
12447 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12448 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12449 * linux-low.c (linux_add_process): Initialize arch_private.
12450 (linux_remove_process): Free arch_private.
12451 (add_lwp): Initialize arch_private.
12452 (delete_lwp): Free arch_private.
12453 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12455 * linux-low.h (process_info_private): New member arch_private.
12456 (lwp_info): New member arch_private.
12457 (linux_target_ops): New members new_process, new_thread,
12459 (ptid_of): New macro.
12460 * linux-x86-low.c: Include stddef.h, i386-low.h.
12461 (arch_process_info): New struct.
12462 (arch_lwp_info): New struct.
12463 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12464 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12465 (i386_dr_low_get_status): New function.
12466 (x86_insert_point, x86_remove_point): New functions.
12467 (x86_stopped_by_watchpoint): New function.
12468 (x86_stopped_data_address): New function.
12469 (x86_linux_new_process, x86_linux_new_thread): New functions.
12470 (x86_linux_prepare_to_resume): New function.
12471 (the_low_target): Add entries for insert_point, remove_point,
12472 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12474 * server.c (debug_hw_points): New global.
12475 (monitor_show_help): Document set debug-hw-points.
12476 (handle_query): Process "set debug-hw-points".
12477 * server.h (debug_hw_points): Declare.
12478 (paddress): Declare.
12479 * utils.c (NUMCELLS, CELLSIZE): New macros.
12480 (get_sell, xsnprintf, paddress): New functions.
12481 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12482 remove_point, stopped_by_watchpoint, stopped_data_address.
12483 * win32-i386-low.c: Include i386-low.h.
12484 (debug_reg_state): Replaces dr.
12485 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12486 (i386_dr_low_get_status): New function.
12487 (i386_insert_point, i386_remove_point): New functions.
12488 (i386_stopped_by_watchpoint): New function.
12489 (i386_stopped_data_address): New function.
12490 (i386_initial_stuff): Update.
12491 (get_thread_context,set_thread_context,i386_thread_added): Update.
12492 (the_low_target): Add entries for insert_point,
12493 remove_point, stopped_by_watchpoint, stopped_data_address.
12494 * win32-low.c (win32_insert_watchpoint): New function.
12495 (win32_remove_watchpoint): New function.
12496 (win32_stopped_by_watchpoint): New function.
12497 (win32_stopped_data_address): New function.
12498 (win32_target_ops): Add entries for insert_watchpoint,
12499 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12500 * win32-low.h (win32_target_ops): New members insert_point,
12501 remove_point, stopped_by_watchpoint, stopped_data_address.
12503 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12505 * server.c (process_serial_event): Re-return unsupported, not
12506 error, if the type isn't recognized. Re-allow supporting only
12507 insert or remove packets. Also call require_running for
12508 breakpoints. Add missing break statement to default case. Tidy.
12509 * target.h (struct target_ops): Rename insert_watchpoint to
12510 insert_point, and remove_watchpoint to remove_point.
12512 * linux-low.h (struct linux_target_ops): Likewise.
12513 * linux-low.c (linux_insert_watchpoint): Rename to ...
12514 (linux_insert_point): ... this. Adjust.
12515 (linux_remove_watchpoint): Rename to ...
12516 (linux_remove_point): ... this. Adjust.
12517 (linux_target_ops): Adjust.
12518 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12519 (cris_insert_point): ... this.
12520 (cris_remove_watchpoint): Rename to ...
12521 (cris_remove_point): ... this.
12522 (the_low_target): Adjust.
12524 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12526 * server.c (handle_v_kill): Pass signal_pid to
12527 kill_inferior if multi_process is zero.
12529 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12531 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12532 * target.h (target_ops): Comment for *_watchpoint to make it clear
12533 the functions can get types '0' and '1'.
12535 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12537 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12538 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12539 * regcache.c (get_regcache): Likewise.
12540 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12541 * win32-low.c (child_fetch_inferior_registers): Remove check for
12544 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12545 Pedro Alves <pedro@codesourcery.com>
12547 * target.h (struct target_ops) <supports_multi_process>: New
12549 (target_supports_multi_process): New.
12550 * server.c (handle_query): Even if GDB reports support, only
12551 enable multi-process if the target also supports it. Report
12552 multi-process support only if the target backend supports it.
12553 * linux-low.c (linux_supports_multi_process): New function.
12554 (linux_target_ops): Install it as target_supports_multi_process
12557 2009-05-24 Doug Evans <dje@google.com>
12559 Global renaming of find_thread_pid to find_thread_ptid.
12560 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12561 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12562 All callers updated.
12564 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12565 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12568 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12569 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12570 (linux_resume_one_lwp): Ditto.
12572 2009-05-23 Doug Evans <dje@google.com>
12574 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12575 from struct inferior_list_entry * to struct lwp_info *.
12576 All callers updated.
12578 2009-05-13 Doug Evans <dje@google.com>
12580 * linux-x86-low.c: Don't include assert.h.
12581 (x86_siginfo_fixup): Use fatal, not assert.
12582 (x86_arch_setup): Fix comment.
12584 2009-05-12 Doug Evans <dje@google.com>
12586 Biarch support for i386/amd64 gdbserver.
12587 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12588 Add linux-x86-low.c.
12589 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12590 (linux-x86-low.o): Add.
12591 * linux-x86-64-low.c: Delete.
12592 * linux-i386-low.c: Delete.
12593 * linux-x86-low.c: New file.
12594 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12596 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12598 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12599 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12600 (linux_child_pid_to_exec_file): New function.
12601 (elf_64_header_p, elf_64_file_p): New functions.
12602 (siginfo_fixup): New function.
12603 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12604 give target a chance to convert layout.
12605 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12606 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12608 2009-05-07 Doug Evans <dje@google.com>
12610 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12611 (regsets_store_inferior_registers): Ditto.
12613 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12617 * linux-low.c (must_set_ptrace_flags): Delete.
12618 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12620 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12621 `lwp->must_set_ptrace_flags' instead.
12622 (linux_wait_for_event_1): Set ptrace options here.
12623 (linux_wait_1): ... not here.
12625 2009-04-30 Doug Evans <dje@google.com>
12627 * inferiors.c (started_inferior_callback): New function.
12628 (attached_inferior_callback): New function.
12629 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12630 * server.c (print_started_pid, print_attached_pid): New functions.
12631 (detach_or_kill_for_exit): New function.
12632 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12633 * server.h (have_started_inferiors_p): Declare.
12634 (have_attached_inferiors_p): Declare.
12636 * inferiors.c (remove_process): Fix memory leak, free process.
12637 * linux-low.c (linux_remove_process): New function.
12638 (linux_kill): Call it instead of remove_process.
12639 (linux_detach, linux_wait_1): Ditto.
12641 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12643 * configure.srv: Add x86 Windows CE target.
12645 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12647 * inferiors.c (get_thread_process): Make global.
12648 * server.h (get_thread_process): Add prototype.
12649 * thread-db.c (find_one_thread): Use get_thread_process
12650 instead of current_process.
12651 (thread_db_get_tls_address): Do not crash if called when
12652 thread layer is not yet initialized.
12654 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12656 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12657 * spu-low.c (current_tid): Rename to ...
12658 (current_ptid): ... this.
12659 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12660 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12661 ptid_get_lwp (current_ptid) instead of current_tid.
12662 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12663 instead of current_tid. Use find_process_pid to verify pid
12664 argument is valid. Pass proper argument to remove_process.
12665 (spu_thread_alive): Compare current_ptid instead of current_tid.
12666 (spu_resume): Likewise.
12668 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12670 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12673 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12675 Implement the multiprocess extensions, and add linux multiprocess
12678 * server.h (ULONGEST): Declare.
12679 (struct ptid, ptid_t): New.
12680 (minus_one_ptid, null_ptid): Declare.
12681 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12682 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12683 (struct inferior_list_entry): Change `id' type from unsigned from
12685 (struct sym_cache, struct breakpoint, struct
12686 process_info_private): Forward declare.
12687 (struct process_info): Declare.
12688 (current_process): Declare.
12689 (all_processes): Declare.
12690 (initialize_inferiors): Declare.
12691 (add_thread): Adjust to use ptid_t.
12692 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12693 (add_process, remove_process, find_thread_pid): Declare.
12694 (find_inferior_id): Adjust to use ptid_t.
12695 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12696 (multi_process): Declare.
12697 (push_event): Adjust to use ptid_t.
12698 (read_ptid, write_ptid): Declare.
12699 (prepare_resume_reply): Adjust to use ptid_t.
12700 (clear_symbol_cache): Declare.
12701 * inferiors.c (all_processes): New.
12702 (null_ptid, minus_one_ptid): New.
12703 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12704 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12705 (add_thread): Change unsigned long to ptid. Remove gdb_id
12707 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12708 (gdb_id_to_thread): Rename to ...
12709 (find_thread_pid): ... this. Change unsigned long to ptid.
12710 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12711 (loaded_dll, pull_pid_from_list): Adjust.
12712 (add_process, remove_process, find_process_pid)
12713 (get_thread_process, current_process, initialize_inferiors): New.
12714 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12715 (struct target_waitstatus) <related_pid>: Ditto.
12716 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12717 return type to int.
12718 (struct target_ops) <join>: Add `pid' argument.
12719 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12720 (struct target_ops) <wait>: Add `ptid' field. Change return type
12722 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12723 (mywait): Add `ptid' argument. Change return type to ptid_t.
12724 (target_pid_to_str): Declare.
12725 * target.c (set_desired_inferior): Adjust to use ptids.
12726 (mywait): Add new `ptid' argument. Adjust.
12727 (target_pid_to_str): New.
12728 * mem-break.h (free_all_breakpoints): Declare.
12729 * mem-break.c (breakpoints): Delelete.
12730 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12731 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12732 to use per-process breakpoint list.
12733 (free_all_breakpoints): New.
12734 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12735 (symbol_cache, all_symbols_looked_up): Delete.
12737 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12739 (prepare_resume_reply): Change ptid argument's type from unsigned
12740 long to ptid_t. Adjust. Implement W;process and X;process.
12741 (free_sym_cache, clear_symbol_cache): New.
12742 (look_up_one_symbol): Adjust to per-process symbol cache. *
12743 * server.c (cont_thread, general_thread, step_thread): Change type
12745 (attached): Delete.
12746 (multi_process): New.
12747 (last_ptid): Change type to ptid_t.
12748 (struct vstop_notif) <ptid>: Change type to ptid_t.
12749 (queue_stop_reply, push_event): Change `ptid' argument's type to
12751 (discard_queued_stop_replies): Add `pid' argument.
12752 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12753 changes. Don't reference the `attached' global.
12754 (attach_inferior): Adjust to mywait interface changes.
12755 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12756 features. Handle and report "multiprocess+". Handle
12758 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12760 (handle_v_kill): New.
12761 (handle_v_stopped): Adjust to use target_pid_to_str.
12762 (handle_v_requests): Allow multiple attaches and runs when
12763 multiprocess extensions are in effect. Handle "vKill".
12764 (myresume): Adjust to use ptids.
12765 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12766 (handle_status): Adjust to discard_queued_stop_replies interface
12768 (first_thread_of, kill_inferior_callback)
12769 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12770 (main): Call initialize_inferiors. Adjust to use ptids, killing
12771 and detaching from all inferiors. Handle multiprocess packet
12773 * linux-low.h: Include gdb_proc_service.h.
12774 (struct process_info_private): New.
12775 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12776 <lwpid_of>: Use ptid_get_lwp.
12777 (get_lwp_thread): Adjust.
12778 (struct lwp_info): Add `dead' member.
12779 (find_lwp_pid): Declare.
12780 * linux-low.c (thread_db_active): Delete.
12781 (new_inferior): Adjust comment.
12782 (inferior_pid): Delete.
12783 (linux_add_process): New.
12784 (handle_extended_wait): Adjust.
12785 (add_lwp): Change unsigned long to ptid.
12786 (linux_create_inferior): Add process to processes table. Adjust
12787 to use ptids. Don't set new_inferior here.
12788 (linux_attach_lwp): Rename to ...
12789 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12790 it. Adjust to use ptids.
12791 (linux_attach_lwp): New.
12792 (linux_attach): Add process to processes table. Don't set
12794 (struct counter): New.
12795 (second_thread_of_pid_p, last_thread_of_process_p): New.
12796 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12797 multiple processes.
12798 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12799 processes. Remove process from process table.
12800 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12801 to multiple processes.
12802 (any_thread_of): New.
12803 (linux_detach): Add `pid' argument, and handle it. Remove process
12804 from processes table.
12805 (linux_join): Add `pid' argument. Handle it.
12806 (linux_thread_alive): Change unsighed long argument to ptid_t.
12807 Consider dead lwps as not being alive.
12808 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12809 threads we're not interested in.
12810 (same_lwp, find_lwp_pid): New.
12811 (linux_wait_for_lwp): Change `pid' argument's type from int to
12813 (linux_wait_for_event): Rename to ...
12814 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12815 from int to ptid_t. Adjust.
12816 (linux_wait_for_event): New.
12817 (linux_wait_1): Add `ptid' argument. Change return type to
12818 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12819 that exit from the process table.
12820 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12822 (mark_lwp_dead): New.
12823 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12824 stopping all threads, mark its main lwp as dead.
12825 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12827 (fetch_register, usr_store_inferior_registers)
12828 (regsets_fetch_inferior_registers)
12829 (regsets_store_inferior_registers, linux_read_memory)
12830 (linux_write_memory): Inline `inferior_pid'.
12831 (linux_look_up_symbols): Adjust to use per-process
12832 `thread_db_active'.
12833 (linux_request_interrupt): Adjust to use ptids.
12834 (linux_read_auxv): Inline `inferior_pid'.
12835 (initialize_low): Don't reference thread_db_active.
12836 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12837 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12838 (ps_getpid): Return the pid of the current inferior.
12839 * thread-db.c (proc_handle, thread_agent): Delete.
12840 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12842 (find_one_thread): Change argument type to ptid_t. Adjust to
12844 (maybe_attach_thread): Adjust to per-process data and ptids.
12845 (thread_db_find_new_threads): Ditto.
12846 (thread_db_init): Ditto.
12847 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12848 processes table. Adjust to use ptids.
12849 (spu_kill, spu_detach): Adjust interface. Remove process from
12851 (spu_join, spu_thread_alive): Adjust interface.
12852 (spu_wait): Adjust interface. Remove process from processes
12853 table. Adjust to use ptids.
12854 * win32-low.c (current_inferior_tid): Delete.
12855 (current_inferior_ptid): New.
12856 (debug_event_ptid): New.
12857 (thread_rec): Take a ptid. Adjust.
12858 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12859 (child_delete_thread): Ditto.
12860 (do_initial_child_stuff): Add `attached' argument. Add process to
12862 (child_fetch_inferior_registers, child_store_inferior_registers):
12864 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12865 (win32_attach): Pass 1 to do_initial_child_stuff.
12866 (win32_kill): Adjust interface. Remove process from processes
12868 (win32_detach): Ditto.
12869 (win32_join): Adjust interface.
12870 (win32_thread_alive): Take a ptid.
12871 (win32_resume): Adjust to use ptids.
12872 (get_child_debug_event): Ditto.
12873 (win32_wait): Adjust interface. Remove exiting process from
12876 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12878 Non-stop mode support.
12880 * server.h (non_stop): Declare.
12881 (gdb_client_data, handler_func): Declare.
12882 (delete_file_handler, add_file_handler, start_event_loop):
12884 (handle_serial_event, handle_target_event, push_event)
12885 (putpkt_notif): Declare.
12886 * target.h (enum resume_kind): New.
12887 (struct thread_resume): Replace `step' field by `kind' field.
12888 (TARGET_WNOHANG): Define.
12889 (struct target_ops) <wait>: Add `options' argument.
12890 <supports_non_stop, async, start_non_stop>: New fields.
12891 (target_supports_non_stop, target_async): New.
12892 (start_non_stop): Declare.
12893 (mywait): Add `options' argument.
12894 * target.c (mywait): Add `options' argument. Print child exit
12895 notifications here.
12896 (start_non_stop): New.
12897 * server.c (non_stop, own_buf, mem_buf): New globals.
12898 (struct vstop_notif): New.
12899 (notif_queue): New global.
12900 (queue_stop_reply, push_event, discard_queued_stop_replies)
12901 (send_next_stop_reply): New.
12902 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12904 (attach_inferior): In non-stop mode, don't wait for the target
12906 (handle_general_set): Handle QNonStop.
12907 (handle_query): When handling qC, return the current general
12908 thread, instead of the first thread of the list.
12909 (handle_query): If the backend supports non-stop mode, include
12910 QNonStop+ in the qSupported query response.
12911 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12913 (handle_v_attach, handle_v_run): Handle non-stop mode.
12914 (handle_v_stopped): New.
12915 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12916 (myresume): Adjust to use resume_kind. Handle non-stop.
12917 (queue_stop_reply_callback): New.
12918 (handle_status): Handle non-stop mode.
12919 (main): Clear non_stop flag on reconnection. Use the event-loop.
12920 Refactor serial protocol handling from here ...
12921 (process_serial_event): ... to this new function. When GDB
12922 selects any thread, select one here. In non-stop mode, wait until
12923 GDB acks all pending events before exiting.
12924 (handle_serial_event, handle_target_event): New.
12925 * remote-utils.c (remote_open): Install remote_desc in the event
12927 (remote_close): Remove remote_desc from the event loop.
12928 (putpkt_binary): Rename to...
12929 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12930 (putpkt_binary): New as wrapper around putpkt_binary_1.
12931 (putpkt_notif): New.
12932 (prepare_resume_reply): In non-stop mode, don't change the
12934 * event-loop.c: New.
12935 * Makefile.in (OBJ): Add event-loop.o.
12936 (event-loop.o): New rule.
12938 * linux-low.h (pid_of): Moved here.
12940 (get_lwp_thread): Use lwpid_of.
12941 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12942 * linux-low.c (pid_of): Delete.
12943 (inferior_pid): Use lwpid_of.
12944 (linux_event_pipe): New.
12945 (target_is_async_p): New.
12947 (handle_extended_wait): Use lwpid_of.
12948 (add_lwp): Don't set lwpid field.
12949 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12950 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12951 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12952 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12953 first. Adjust to linux_wait_for_event interface changes. Use
12955 (linux_detach): Don't delete the main lwp here.
12956 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12957 (status_pending_p): Don't consider explicitly suspended lwps.
12958 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12959 pointer. Add OPTIONS argument. Change return type to int. Use
12960 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12961 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12962 pointer. Add status pointer argument. Return a pid instead of a
12963 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12964 changes. In non-stop mode, don't switch to a random thread.
12965 (linux_wait): Rename to...
12966 (linux_wait_1): ... this. Add target_options argument, and handle
12967 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12968 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12969 clean exit and signal exit code. Don't stop all threads in
12970 non-stop mode. In all-stop mode, only stop all threads when
12971 reporting a stop to GDB. Handle explicit thread stop requests.
12972 (async_file_flush, async_file_mark): New.
12974 (send_sigstop): Use lwpid_of.
12975 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12976 interface changes. In non-stop mode, don't switch to a random
12978 (linux_resume_one_lwp): Use lwpid_of.
12979 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12980 (linux_resume_one_thread): ... this. Handle resume_stop. In
12981 non-stop mode, don't look for pending flag in all threads.
12982 (resume_status_pending_p): Don't consider explicitly suspended
12984 (my_waitpid): Reimplement. Emulate __WALL.
12985 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12987 (sigchld_handler, linux_supports_non_stop, linux_async)
12988 (linux_start_non_stop): New.
12989 (linux_target_ops): Register linux_supports_non_stop, linux_async
12990 and linux_start_non_stop.
12991 (initialize_low): Install SIGCHLD handler.
12992 * thread-db.c (thread_db_create_event, find_one_thread)
12993 (thread_db_get_tls_address): Use lwpid_of.
12994 * win32-low.c (win32_detach): Adjust to use resume_kind.
12995 (win32_wait): Add `options' argument.
12996 * spu-low.c (spu_resume): Adjust to use resume_kind.
12997 (spu_wait): Add `options' argument.
12999 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13001 Decouple target code from remote protocol.
13003 * target.h (enum target_waitkind): New.
13004 (struct target_waitstatus): New.
13005 (struct target_ops) <wait>: Return an unsigned long. Take a
13006 target_waitstatus pointer instead of a char pointer.
13007 (mywait): Likewise.
13008 * target.c (mywait): Change prototype to return an unsigned long.
13009 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13010 * server.h (thread_from_wait, old_thread_from_wait): Delete
13012 (prepare_resume_reply): Change prototype to take a
13014 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13015 (last_status, last_ptid): New.
13016 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13017 pid instead of a signal.
13018 (attach_inferior): Remove "status" and "signal" parameters.
13020 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13022 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13023 (handle_v_requests, myresume): Remove "status" and "signal"
13024 parameters. Adjust.
13025 (handle_status): New.
13026 (main): Delete local `status'. Adjust.
13027 * remote-utils.c: Include target.h.
13028 (prepare_resume_reply): Change prototype to take a
13029 target_waitstatus. Adjust.
13031 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13033 * spu-low.c (spu_wait): Adjust.
13034 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13036 (win32_wait): Adjust.
13038 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13040 * target.h (struct thread_resume): Delete leave_stopped member.
13041 (struct target_ops): Add a `n' argument to the `resume' callback.
13042 * server.c (start_inferior): Adjust.
13043 (handle_v_cont, myresume): Adjust.
13044 * linux-low.c (check_removed_breakpoint): Adjust to resume
13045 interface change, and to removed leave_stopped field.
13046 (resume_ptr): Delete.
13047 (struct thread_resume_array): New.
13048 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13049 resume interface change.
13050 (linux_continue_one_thread, linux_queue_one_thread)
13051 (resume_status_pending_p): Check if the resume field is NULL
13052 instead of checking the leave_stopped member.
13053 (linux_resume): Adjust to the target resume interface change.
13054 * spu-low.c (spu_resume): Adjust to the target resume interface
13056 * win32-low.c (win32_detach, win32_resume): Ditto.
13058 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13060 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13062 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13064 (linux_continue_one_thread): Only preserve the stepping flag if
13065 there's a pending breakpoint.
13067 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13069 * server.c (main): After the inferior having exited, call
13070 remote_close before exiting gdbserver.
13072 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13074 Fix size of FPSCR in Power 7 processors.
13075 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13076 (PPC_FEATURE_HAS_DFP): New #define.
13077 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13080 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13082 * server.c (handle_query) Whitespace and formatting.
13084 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13086 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13087 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13088 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13089 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13090 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13091 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13092 Makefile.in, configure.ac: Fix whitespace throughout.
13093 * configure: Regenerate.
13095 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13097 * inferiors.c (find_inferior): Make it safe for the callback
13098 function to delete the currently iterated inferior.
13100 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13102 * Makefile.in (linuw_low_h): Move higher.
13103 (thread-db.o): Depend on $(linux_low_h).
13105 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13107 Rename "process" to "lwp" throughout.
13109 * linux-low.c (all_processes): Rename to...
13110 (all_lwps): ... this.
13111 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13112 (add_process): Rename to ...
13113 (add_lwp): ... this. Adjust.
13114 (linux_create_inferior): Adjust.
13115 (linux_attach_lwp): Adjust.
13116 (linux_attach): Adjust.
13117 (linux_kill_one_process): Rename to ...
13118 (linux_kill_one_lwp): ... this. Adjust.
13119 (linux_kill): Adjust.
13120 (linux_detach_one_process): Rename to ...
13121 (linux_detach_one_lwp): ... this. Adjust.
13122 (linux_detach): Adjust.
13123 (check_removed_breakpoint): Adjust.
13124 (status_pending_p): Adjust.
13125 (linux_wait_for_process): Rename to ...
13126 (linux_wait_for_lwp): ... this. Adjust.
13127 (linux_wait_for_event): Adjust.
13128 (send_sigstop): Adjust.
13129 (wait_for_sigstop): Adjust.
13130 (stop_all_processes): Rename to ...
13131 (stop_all_lwps): ... this.
13132 (linux_resume_one_process): Rename to ...
13133 (linux_resume_one_lwp): ... this. Adjust.
13134 (linux_set_resume_request, linux_continue_one_thread)
13135 (linux_queue_one_thread, resume_status_pending_p)
13136 (usr_store_inferior_registers, regsets_store_inferior_registers)
13137 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13139 * linux-low.h (get_process): Rename to ...
13140 (get_lwp): ... this. Adjust.
13141 (get_thread_process): Rename to ...
13142 (get_thread_lwp): ... this. Adjust.
13143 (get_process_thread): Rename to ...
13144 (get_lwp_thread): ... this. Adjust.
13145 (struct process_info): Rename to ...
13146 (struct lwp_info): ... this.
13147 (all_processes): Rename to ...
13148 (all_lwps): ... this.
13149 * proc-service.c (ps_lgetregs): Adjust.
13150 * thread-db.c (thread_db_create_event, find_one_thread)
13151 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13153 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13155 * server.c (handle_query): Handle "qAttached".
13157 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13159 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13160 GPLv3, update license URL.
13162 2009-03-01 Doug Evans <dje@google.com>
13164 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13165 (server_h): Add gdb_signals.h.
13166 (signals.o): Update.
13167 * server.h (target_signal_from_host,target_signal_to_host_p)
13168 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13170 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13172 * remote-utils.c (getpkt): Also generate remote-debug
13173 information if noack_mode is set.
13175 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13177 * server.c (handle_query): Report qXfer:siginfo:read and
13178 qXfer:siginfo:write as supported and handle them.
13179 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13180 * linux-low.c (linux_xfer_siginfo): New.
13181 (linux_target_ops): Set it.
13183 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13185 * server.c (gdbserver_usage): Mention --remote-debug.
13186 (main): Accept '--remote-debug' switch.
13188 2009-01-18 Doug Evans <dje@google.com>
13190 * regcache.c (new_register_cache): No need to check result of xcalloc.
13191 * server.c (handle_search_memory): Back out calls to xmalloc,
13192 result is checked and error is returned to user upon failure.
13193 (handle_query): Ditto. Add more checks for result of malloc.
13194 (handle_v_cont): Check result of malloc, report error back to
13196 (handle_v_run): Ditto. Call freeargv.
13197 * server.h (freeargv): Declare.
13198 * utils.c (freeargv): New fn.
13200 2009-01-15 Doug Evans <dje@google.com>
13202 * gdbreplay.c (perror_with_name): Make arg const char *.
13203 * server.h (target_signal_to_name): Make return type const char *.
13204 * thread-db.c (thread_db_err_str): Make return type const char *.
13205 * utils.c (perror_with_name): Make arg const char *.
13207 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13209 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13210 when handling a EXIT_PROCESS_DEBUG_EVENT.
13212 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13214 * gdbreplay.c (gdbreplay_version): Update copyright year.
13215 * server.c (gdbserver_version): Likewise.
13217 2009-01-05 Doug Evans <dje@google.com>
13219 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13220 (handle_extended_wait): Improve comment.
13222 2008-12-13 Doug Evans <dje@google.com>
13224 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13225 * server.h (ATTR_MALLOC): New macro.
13226 (xmalloc,xcalloc,xstrdup): Declare.
13227 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13228 * inferiors.c: Ditto.
13229 * linux-low.c: Ditto.
13230 * mem-break.c: Ditto.
13231 * regcache.c: Ditto.
13232 * remote-utils.c: Ditto.
13235 * win32-low.c: Ditto.
13237 2008-12-12 Doug Evans <dje@google.com>
13239 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13240 in debugging printf.
13242 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13244 2008-12-09 Doug Evans <dje@google.com>
13246 * linux-low.h (struct process_info): Delete member tid, unused.
13247 * thread-db.c (find_one_thread): Update.
13248 (maybe_attach_thread): Update.
13250 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13252 * target.h (struct target_ops): Add qxfer_osdata member.
13253 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13255 (linux_qxfer_osdata): New functions.
13256 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13258 * server.c (handle_query): Handle "qXfer:osdata:read:".
13259 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13260 (buffer_xml_printf): New functions.
13261 * server.h (struct buffer): New.
13262 (buffer_grow_str, buffer_grow_str0): New macros.
13263 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13264 (buffer_xml_printf): Declare.
13266 2008-11-24 Doug Evans <dje@google.com>
13268 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13270 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13272 * server.c (handle_v_run): Always use the supplied argument list.
13274 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13276 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13277 (xtensa_regmap_table): Add entry for scompare1.
13279 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13281 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13282 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13283 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13284 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13285 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13286 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13287 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13288 XML target descriptions.
13289 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13290 when inferior is running on an ISA 2.05 or later processor. Add
13291 special case to return offset for full 64-bit slot of FPSCR when
13294 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13296 * Makefile.in (SFILES, clean): Added sparc64 files.
13297 (reg-sparc64.o, reg-sparc64.c): New.
13298 * configure.srv (sparc*-*-linux*): New configuration.
13299 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13300 syscall arguments for SPARC.
13301 (regsets_store_inferior_registers): Likewise.
13302 * linux-sparc-low.c: New file.
13304 2008-10-21 Doug Evans <dje@google.com>
13306 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13307 (READLINE_DIR,READLINE_DEP): Delete.
13308 (INTERNAL_CFLAGS): Update.
13309 (LINTFLAGS): Update.
13311 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13313 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13314 whole argv from the last run, not just argv[0].
13316 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13318 * regcache.c (new_register_cache): Return NULL if the register
13319 cache size isn't known yet.
13320 (free_register_cache): Avoid dereferencing a NULL regcache.
13322 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13324 * configure.srv: Merge MIPS and MIPS64.
13326 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13328 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13330 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13332 * Makefile.in: Add required vsx dependencies.
13334 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13335 Declare init_registers_powerpc_vsx32l.
13336 Declare init_registers_powerpc_vsx64l.
13337 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13338 (ppc_arch_setup): Check for VSX in hwcap.
13339 (ppc_fill_vsxregset): New function.
13340 (ppc_store_vsxregset): New function.
13341 Add new VSX entry in regset_info target_regsets.
13343 * configure.srv: Add new VSX dependencies.
13345 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13347 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13348 (remote_open): Set or clear transport_is_reliable.
13349 (putpkt_binary): Don't expect acks in noack mode.
13350 (getpkt): Don't send ack/nac in noack mode.
13351 * server.c (handle_general_set): Handle QStartNoAckMode.
13352 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13354 (main): Reset noack_mode on every connection.
13355 * server.h (noack_mode): Declare.
13357 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13359 * Makefile.in (GDBREPLAY_OBS): New variable.
13360 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13362 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13363 Daniel Jacobowitz <dan@codesourcery.com>
13365 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13366 (usr_store_inferior_registers): Likewise.
13367 (regsets_store_inferior_registers): Likewise.
13369 2008-07-31 Rolf Jansen <rj@surtec.com>
13370 Pedro Alves <pedro@codesourcery.com>
13372 * configure.ac: Check for memmem declaration.
13373 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13374 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13375 (disable_packet_qfThreadInfo): Unconditionally compile.
13376 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13377 * configure, config.in: Regenerate.
13379 2008-07-28 Doug Kwan <dougkwan@google.com>
13381 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13382 (linux_write_memory): Remove declaration of errno.
13384 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13386 * linux-low.c (handle_extended_wait): Do not use "status"
13387 variable uninitialized.
13389 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13391 * server.c (handle_v_attach): Inhibit reporting dll changes.
13393 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13395 * remote-utils.c (prepare_resume_reply): If requested, don't
13396 output "thread:TID" in the T stop reply.
13398 * server.c (disable_packet_vCont, disable_packet_Tthread)
13399 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13400 (handle_query): If requested, disable support for qC, qfThreadInfo
13402 (handle_v_requests): If requested, disable support for vCont.
13403 (gdbserver_show_disableable): New.
13404 (main): Handle --disable-packet and --disable-packet=LIST.
13406 * server.h (disable_packet_vCont, disable_packet_Tthread)
13407 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13409 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13411 * server.c (gdbserver_usage): Mention --version.
13413 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13415 * Makefile.in (gdbreplay.o): New rule.
13417 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13419 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13420 message, not gdbserver.
13422 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13423 Nathan Sidwell <nathan@codesourcery.com>
13424 Joseph Myers <joseph@codesourcery.com>
13426 * acinclude.m4: Include ../../config/acx.m4.
13427 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13428 * configure, config.in: Regenerate.
13429 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13430 * server.c (gdbserver_version): Print PKGVERSION.
13431 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13432 (main): Adjust gdbserver_usage calls.
13433 * gdbreplay.c (version, host_name): Add declarations.
13434 (gdbreplay_version, gdbreplay_usage): New.
13435 (main): Accept --version and --help options.
13437 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13439 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13440 (arm_breakpoint_at): Handle Thumb.
13441 (the_low_target): Add comment.
13443 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13445 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13447 2008-05-09 Doug Evans <dje@google.com>
13449 * server.h (decode_search_memory_packet): Declare.
13450 * remote-utils.c (decode_search_memory_packet): New fn.
13451 * server.c (handle_search_memory_1): New fn.
13452 (handle_search_memory): New fn.
13453 (handle_query): Process qSearch:memory packets.
13455 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13457 * regcache.c (registers_length): Remove.
13458 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13459 full register packet.
13460 * regcache.h (registers_length): Remove prototype.
13461 * server.h (PBUFSIZ): Define to 16384.
13463 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13465 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13466 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13467 powerpc-64l.o, and powerpc-altivec64l.o.
13468 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13469 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13470 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13471 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13472 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13475 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13476 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13477 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13478 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13479 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13480 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13481 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13482 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13483 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13484 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13487 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13488 (init_registers_powerpc_32l): ... this new prototype.
13489 (init_registers_powerpc_32): Remove, replace by ...
13490 (init_registers_powerpc_altivec32l): ... this new prototype.
13491 (init_registers_powerpc_e500): Remove, replace by ...
13492 (init_registers_powerpc_e500l): ... this new prototype.
13493 (init_registers_ppc64): Remove, replace by ...
13494 (init_registers_powerpc_64l): ... this new prototype.
13495 (init_registers_powerpc_64): Remove, replace by ...
13496 (init_registers_powerpc_altivec64l): ... this new prototype.
13497 (ppc_num_regs): Set to 73.
13498 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13499 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13500 (ppc_cannot_store_register): Handle orig_r3 and trap.
13501 (ppc_arch_setup): Update init_registers_... calls.
13502 (ppc_fill_gregset): Handle orig_r3 and trap.
13504 * inferiors.c (clear_inferiors): Reset current_inferior.
13506 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13508 * acinclude.m4: Add override.m4.
13509 * configure: Regenerate.
13511 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13513 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13514 initial call to init_register_ppc64.
13516 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13518 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13519 single powerpc*-*-linux* case.
13520 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13522 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13524 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13525 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13527 * linux-ppc-low.c: Include <elf.h>.
13528 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13529 (ppc_hwcap): New global variable.
13530 (ppc_regmap): Remove __SPE__ #ifdef sections.
13531 (ppc_regmap_e500): New global variable.
13532 (ppc_cannot_store_register): Update __SPE__ special case.
13533 (ppc_get_hwcap): New function.
13534 (ppc_arch_setup): Use it to determine whether inferior supports
13535 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13536 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13537 Do not access registers if target does not support AltiVec.
13538 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13539 Do not access registers if target does not support SPE.
13540 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13542 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13544 * linux-low.c (disabled_regsets, num_regsets): New.
13545 (use_regsets_p): Delete.
13546 (linux_wait_for_process): Clear disabled_regsets.
13547 (regsets_fetch_inferior_registers): Check and set it.
13548 (regsets_store_inferior_registers): Likewise.
13549 (linux_fetch_registers, linux_store_registers): Do not use
13551 (initialize_low): Allocate disabled_regsets.
13553 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13555 * Makefile.in (LIBOBJS): New.
13556 (OBS): Use LIBOBJS.
13557 (memmem.o): New rule.
13558 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13559 * configure: Regenerated.
13561 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13563 * server.c (handle_query): Never return "unsupported" for
13564 qXfer:features:read queries.
13566 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13568 * server.c (get_features_xml): Fix inverted condition.
13569 (handle_query): Always support qXfer:feature:read.
13571 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13573 * server.c (wrapper_argv): New.
13574 (start_inferior): Handle wrapper_argv. If set, expect an extra
13576 (gdbserver_usage): Document --wrapper.
13577 (main): Parse --wrapper.
13579 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13581 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13582 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13583 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13584 (ppc_set_pc): Likewise.
13585 (ppc_arch_setup): New function.
13586 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13587 of collect_register.
13588 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13590 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13592 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13593 instead of linux-ppc64-low.o.
13594 * linux-ppc64-low.c: Remove file.
13595 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13596 (linux-ppc64-low.o): Remove rule.
13598 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13599 (init_registers_powerpc_64): Likewise.
13600 (ppc_regmap): Conditionally define depending on __powerpc64__.
13601 (ppc_cannot_store_register): Do not special-case "fpscr" when
13602 compiled on __powerpc64__.
13603 (ppc_collect_ptrace_register): New function.
13604 (ppc_supply_ptrace_register): New function.
13605 (ppc_breakpoint): Change type to "unsigned int".
13606 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13607 (the_low_target): Conditionally provide initializers for the
13608 arch_setup member depending on __powerpc64__. Install
13609 collect_ptrace_register and supply_ptrace_register members.
13611 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13613 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13614 * server.c (gdbserver_xmltarget): Define.
13615 (get_features_xml): Use it to replace "target.xml" and arch_string.
13617 * configure.srv: Remove srv_xmltarget. Add XML files that were
13618 mentioned there to srv_xmlfiles instead. Remove conditional tests
13619 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13620 srv_xmlfiles and srv_regobj to include all possible choices.
13621 * configure.ac (srv_xmltarget): Remove.
13622 (srv_xmlfiles): Do not add "target.xml".
13623 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13624 checks for supplementary target information.
13625 * configure: Regenerate.
13626 * Makefile.in (XML_TARGET): Remove.
13627 (target.xml): Remove rule.
13628 (clean): Do not clean up target.xml.
13629 (.PRECIOUS): Do not mention target.xml.
13631 * target.h (struct target_ops): Remove arch_string member.
13632 * linux-low.c (linux_arch_string): Remove.
13633 (linux_target_ops): Remove arch_string initializer.
13634 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13635 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13636 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13637 * spu-low.c (spu_arch_string): Remove.
13638 (spu_target_ops): Remove arch_string initializer.
13639 * win32-low.c (win32_arch_string): Remove.
13640 (win32_target_ops): Remove arch_string initializer.
13641 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13642 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13643 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13645 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13647 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13648 by collect_ptrace_register and supply_ptrace_register hooks.
13649 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13650 instead of checking for the_low_target.left_pad_xfer.
13651 (usr_store_inferior_registers): Use collect_ptrace_register callback
13652 instead of checking for the_low_target.left_pad_xfer.
13654 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13655 (s390_supply_ptrace_register): Likewise.
13656 (s390_fill_gregset): Call s390_collect_ptrace_register.
13657 (the_low_target): Update.
13659 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13660 (ppc_supply_ptrace_register): Likewise.
13661 (the_low_target): Update.
13663 * linux-i386-low.c (the_low_target): Update.
13664 * linux-x86-64-low.c (the_low_target): Update.
13666 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13668 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13669 reg-s390.o and reg-s390x.o.
13671 * linux-low.c (new_inferior): New global variable.
13672 (linux_create_inferior, linux_attach): Set it.
13673 (linux_wait_for_process): Call the_low_target.arch_setup after the
13674 target has stopped for the first time.
13675 (initialize_low): Do not call the_low_target.arch_setup.
13677 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13678 (s390_set_pc): Likewise.
13679 (s390_arch_setup): New function.
13680 (the_low_target): Use s390_arch_setup as arch_setup routine.
13682 * regcache.c (realloc_register_cache): New function.
13683 (set_register_cache): Call it for each existing regcache.
13685 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13687 * server.h (init_registers): Remove prototype.
13689 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13690 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13691 instead of init_registers ().
13692 * linux-arm-low.c (init_registers_arm): Add prototype.
13693 (init_registers_arm_with_iwmmxt): Likewise.
13694 (the_low_target): Add initializer for arch_setup field.
13695 * linux-cris-low.c (init_registers_cris): Add prototype.
13696 (the_low_target): Add initializer for arch_setup field.
13697 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13698 (the_low_target): Add initializer for arch_setup field.
13699 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13700 (the_low_target): Add initializer for arch_setup field.
13701 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13702 (the_low_target): Add initializer for arch_setup field.
13703 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13704 (the_low_target): Add initializer for arch_setup field.
13705 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13706 (the_low_target): Add initializer for arch_setup field.
13707 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13708 (init_registers_mips64_linux): Likewise.
13709 (the_low_target): Add initializer for arch_setup field.
13710 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13711 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13712 (the_low_target): Add initializer for arch_setup field.
13713 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13714 (init_registers_powerpc_64): Likewise.
13715 (the_low_target): Add initializer for arch_setup field.
13716 * linux-s390-low.c (init_registers_s390): Add prototype.
13717 (init_registers_s390x): Likewise.
13718 (the_low_target): Add initializer for arch_setup field.
13719 * linux-sh-low.c (init_registers_sh): Add prototype.
13720 (the_low_target): Add initializer for arch_setup field.
13721 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13722 (the_low_target): Add initializer for arch_setup field.
13723 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13724 (the_low_target): Add initializer for arch_setup field.
13726 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13727 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13728 instead of init_registers ().
13729 * win32-arm-low.c (init_registers_arm): Add prototype.
13730 (the_low_target): Add initializer for arch_setup field.
13731 * win32-i386-low.c (init_registers_i386): Add prototype.
13732 (the_low_target): Add initializer for arch_setup field.
13734 * spu-low.c (init_registers_spu): Add prototype.
13735 (initialize_low): Call initialie_registers_spu () instead of
13736 initialize_registers ().
13738 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13740 * server.c (handle_v_requests): When handling the vRun and vAttach
13741 packets, if already debugging a process, don't kill it. Return an
13744 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13746 * server.c (handle_query): Correct length check.
13748 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13750 * win32-low.c (do_initial_child_stuff): Add process handle
13751 parameter. Set current_process_handle and current_process_id from the
13752 parameters. Clear globals.
13753 (win32_create_inferior): Don't set current_process_handle and
13754 current_process_id here. Instead pass them on the call to
13755 do_initial_child_stuff.
13756 (win32_attach): Likewise.
13757 (win32_clear_inferiors): New.
13758 (win32_kill): Don't close the current process handle or the
13759 current thread handle here. Instead call win32_clear_inferiors.
13760 (win32_detach): Don't open a new handle to the process. Call
13761 win32_clear_inferiors.
13762 (win32_join): Don't rely on current_process_handle; open a new
13763 handle using the process id.
13764 (win32_wait): Call win32_clear_inferiors when the inferior process
13767 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13769 * server.c (monitor_show_help): Add "exit".
13771 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13773 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13774 (clean): Add reg-xtensa.c.
13775 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13776 * configure.srv (xtensa*-*-linux*) New target.
13777 * linux-xtensa-low.c: New.
13778 * xtensa-xtregs.c: New.
13780 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13782 * hostio.c: Don't include errno.h.
13783 (errno_to_fileio_errno): Move to hostio-errno.
13784 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13785 error number outputting to the target->hostio_last_error callback.
13786 (hostio_packet_error): Use FILEIO_EINVAL directly.
13787 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13788 calls to hostio_error.
13789 * hostio-errno.c: New.
13790 * server.h (hostio_last_error_from_errno): Declare.
13791 * target.h (target_ops): Add hostio_last_error member.
13792 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13793 as hostio_last_error handler.
13794 * spu-low.c (spu_target_ops): Likewise.
13795 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13796 (wince_hostio_last_error): New functions.
13797 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13798 as hostio_last_error handler.
13799 (win32_target_ops) [!_WIN32_WCE]: Register
13800 hostio_last_error_from_errno as hostio_last_error handler.
13801 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13802 (hostio-errno.o): New rule.
13803 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13804 * configure.srv (srv_hostio_err_objs): New variable. Default to
13806 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13807 * configure: Regenerate.
13809 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13811 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13812 (linux_kill, linux_detach): Clean up the process list.
13813 * remote-utils.c (remote_open): Improve port number parsing.
13814 (putpkt_binary, input_interrupt): Only send interrupts if the target
13816 * server.c (extended_protocol): Make static.
13817 (attached): Define earlier.
13818 (exit_requested, response_needed, program_argv): New variables.
13819 (target_running): New.
13820 (start_inferior): Clear attached here.
13821 (attach_inferior): Set attached here.
13822 (require_running): Define.
13823 (handle_query): Use require_running and target_running. Implement
13825 (handle_v_attach, handle_v_run): New.
13826 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13827 (gdbserver_usage): Update.
13828 (main): Redo argument parsing. Handle --debug and --multi. Handle
13829 --attach along with other options or after the port. Save
13830 program_argv. Support no initial program. Resynchronize
13831 communication with GDB after an error. Handle "monitor exit".
13832 Use require_running and target_running. Always allow the extended
13833 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13834 restart in extended mode.
13835 * README: Refer to the GDB manual. Update --attach usage.
13837 2007-12-20 Andreas Schwab <schwab@suse.de>
13839 * linux-low.c (STACK_SIZE): Define.
13840 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13841 (linux_test_for_tracefork): Likewise.
13843 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13845 * linux-low.c (linux_wait_for_event): Update messages. Do not
13846 reinsert auto-delete breakpoints.
13847 * mem-break.c (struct breakpoint): Change return type of handler to
13849 (set_breakpoint_at): Update handler type.
13850 (reinsert_breakpoint_handler): Return 1 instead of calling
13852 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13854 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13855 * mem-break.h (set_breakpoint_at): Update handler type.
13856 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13857 * win32-low.c (auto_delete_breakpoint): New.
13858 (get_child_debug_event): Use it.
13860 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13862 * configure.ac: Check for pread and pwrite.
13863 * hostio.c (handle_pread): Fall back to lseek and read.
13864 (handle_pwrite): Fall back to lseek and write.
13865 * config.in, configure: Regenerated.
13867 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13869 * server.c (myresume): Add own_buf argument.
13870 (main): Update calls.
13872 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13874 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13875 * remote-utils.c (remote_open): Do not call disable_async_io.
13876 (block_async_io): Delete.
13877 (unblock_async_io): Make static.
13878 (initialize_async_io): New.
13879 * server.c (handle_v_cont): Handle async I/O here.
13880 (myresume): Likewise. Move other common resume tasks here...
13881 (main): ... from here. Call initialize_async_io. Disable async
13882 I/O before the main loop.
13883 * server.h (initialize_async_io): Declare.
13884 (block_async_io, unblock_async_io): Delete prototypes.
13885 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13887 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13889 * remote-utils.c (readchar): Allow binary data in received messages.
13891 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13893 * win32-low.c (attaching): New global.
13894 (win32_create_inferior): Clear the `attaching' global.
13895 (win32_attach): Set the `attaching' global.
13896 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13897 attaching. Only set a breakpoint at the entry point if not
13900 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13902 * server.c (main): Don't report dll events on the initial
13903 connection on attaches.
13905 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13907 * server.c (main): Relax numerical bases supported for the pid of
13908 the --attach command line argument.
13910 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13912 * win32-low.c (win32_attach): Call OpenProcess before
13913 DebugActiveProcess, not after. Add last error output to error
13916 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13918 * win32-low.c (win32_get_thread_context)
13919 (win32_set_thread_context): New functions.
13920 (thread_rec): Use win32_get_thread_context.
13921 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13922 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13925 2007-12-03 Leo Zayas
13926 Pedro Alves <pedro_alves@portugalmail.pt>
13928 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13930 (child_add_thread): Minor cleanup.
13931 (child_continue): Resume artificially suspended threads before
13932 calling ContinueDebugEvent.
13933 (suspend_one_thread): New.
13934 (fake_breakpoint_event): New.
13935 (get_child_debug_event): Change return type to int. Check here if
13936 gdb sent an interrupt request. If a soft interrupt was requested,
13937 fake a breakpoint event. Return 0 if there is no event to handle,
13939 (win32_wait): Don't check here if gdb sent an interrupt request.
13940 Ensure there is a valid event to handle.
13941 (win32_request_interrupt): Add soft interruption method as last
13944 2007-12-03 Leo Zayas
13945 Pedro Alves <pedro_alves@portugalmail.pt>
13947 * win32-low.h (win32_thread_info): Add descriptions to the
13948 structure members. Replace `suspend_count' counter by a
13950 * win32-low.c (thread_rec): Update condition of when to get the
13951 context from the inferior. Rely on ContextFlags being set if it
13952 has already been retrieved. Only suspend the inferior thread if
13953 we haven't already. Warn if that fails.
13954 (continue_one_thread): s/suspend_count/suspended/. Only call
13955 ResumeThread once. Warn if that fails.
13957 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13959 * win32-low.c (win32_wait): Don't read from the inferior when it
13960 has already exited.
13962 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13964 * Makefile.in (win32_low_h): New variable.
13965 (win32-low.o): Add dependency on $(win32_low_h).
13966 (win32-arm-low.o, win32-i386-low.o): New rules.
13968 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13970 * hostio.c: Correct copyright year.
13972 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13974 * Makefile.in (OBS): Add hostio.o.
13975 (hostio.o): New rule.
13976 * server.h (handle_vFile): Declare.
13977 * hostio.c: New file.
13978 * server.c (handle_v_requests): Take packet_len and new_packet_len
13979 for binary packets. Call handle_vFile.
13980 (main): Update call to handle_v_requests.
13982 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13984 * linux-low.c: Include <sched.h>.
13986 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13988 * linux-low.c (linux_tracefork_grandchild): New.
13989 (linux_tracefork_child): Use clone.
13990 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13992 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13994 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13996 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13998 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14000 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14002 * inferiors.c (change_inferior_id): Delete.
14003 (add_pid_to_list, pull_pid_from_list): New.
14004 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14005 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14006 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14007 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14008 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14009 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14010 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14011 (using_threads): Always set to 1.
14012 (handle_extended_wait): New.
14013 (add_process): Do not set TID.
14014 (linux_create_inferior): Set must_set_ptrace_flags.
14015 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14016 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14017 (linux_thread_alive): Rename TID argument to LWPID.
14018 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14019 (linux_wait_for_event): Do not use TID or check using_threads. Update
14020 call to dead_thread_notify. Call handle_extended_wait.
14021 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14022 (send_sigstop): Delete sigstop_sent.
14023 (wait_for_sigstop): Avoid TID.
14024 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14025 (linux_test_for_tracefork): New.
14026 (linux_lookup_signals): Use thread_db_active and
14027 linux_supports_tracefork_flag.
14028 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14029 * linux-low.h (get_process_thread): Avoid TID.
14030 (struct process_ifo): Move thread_known and tid to the end. Remove
14032 (linux_attach_lwp, thread_db_init): Update prototypes.
14033 * server.h (change_inferior_id): Delete prototype.
14034 (add_pid_to_list, pull_pid_from_list): New prototypes.
14035 * thread-db.c (thread_db_use_events): New.
14036 (find_first_thread): Rename to...
14037 (find_one_thread): ...this. Update callers and messages. Do not
14038 call fatal. Check thread_db_use_events. Do not call
14039 change_inferior_id or new_thread_notify.
14040 (maybe_attach_thread): Update. Do not call new_thread_notify.
14041 (thread_db_init): Set thread_db_use_events. Check use_events.
14042 * utils.c (fatal, warning): Correct message prefix.
14044 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14046 * Makefile.in (clean): Remove new files.
14047 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14048 (powerpc-64.o, powerpc-64.c): New rules.
14049 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14050 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14052 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14054 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14055 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14056 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14057 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14058 (target_regsets): Add AltiVec and SPE register sets.
14059 * configure.ac: Check for AltiVec and SPE.
14060 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14061 (ppc_fill_vrregset, ppc_store_vrregset): New.
14062 (target_regsets): Add AltiVec register set.
14063 * configure: Regenerated.
14065 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14067 * linux-low.c (O_LARGEFILE): Define.
14068 (linux_read_memory): Use /proc/PID/mem.
14069 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14070 * configure, config.in: Regenerated.
14072 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14074 * linux-low.c (linux_wait_for_event): Do not pass signals while
14077 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14079 * win32-low.c (create_process): New.
14080 (win32_create_inferior): Use create_process instead of
14081 CreateProcess. If create_process failed retry appending an ".exe"
14082 suffix. Store the GetLastError result immediatelly after
14083 create_process calls and use it on the call to error.
14085 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14087 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14089 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14091 * configure.ac: Switch license to GPLv3.
14093 2007-08-01 Michael Snyder <msnyder@access-company.com>
14095 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14097 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14099 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14101 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14102 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14103 CloseToolhelp32Snapshot.
14104 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14105 CloseToolhelp32Snapshot.
14107 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14109 * server.c (main): Check for inferior exit before main loop.
14111 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14113 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14114 instead of on tmp_desc.
14116 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14117 Daniel Jacobowitz <dan@codesourcery.com>
14119 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14120 (add_thread): Minor cleanups.
14121 (clear_inferiors): Move lower in the file. Clear the DLL
14123 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14124 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14125 (xml_escape_text): New.
14126 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14128 (handle_v_cont): Report errors.
14129 (gdbserver_version): Update.
14130 (main): Correct size of own_buf. Do not report initial DLL events.
14131 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14132 (unloaded_dll, xml_escape_text): New.
14133 * win32-low.c (enum target_waitkind): Update comments.
14134 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14135 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14136 (win32_EnumProcessModules, win32_GetModuleInformation)
14137 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14138 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14139 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14140 (win32_Module32First, win32_Module32Next, load_toolhelp)
14141 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14142 (get_child_debug_event): Handle DLL events.
14143 (win32_wait): Likewise.
14145 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14147 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14148 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14150 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14152 * win32-low.c (handle_output_debug_string): Ignore event if not
14155 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14157 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14159 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14161 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14163 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14165 * inferiors.c (change_inferior_id): Add comment.
14166 * linux-low.c (check_removed_breakpoint): Add an early
14167 prototype. Improve debug output.
14168 (linux_attach): Doc update.
14169 (linux_detach_one_process, linux_detach): Clean up before releasing
14171 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14172 * linux-low.h (struct process_info): Doc improvement.
14173 * mem-break.c (delete_all_breakpoints): New.
14174 * mem-break.h (delete_all_breakpoints): New prototype.
14175 * thread-db.c (find_first_thread): New.
14176 (thread_db_create_event): Call it instead of
14177 thread_db_find_new_threads. Clean up unused variables.
14178 (maybe_attach_thread): Remove first thread handling.
14179 (thread_db_find_new_threads): Use find_first_thread.
14180 (thread_db_get_tls_address): Likewise.
14182 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14184 * thread-db.c (thread_db_find_new_threads): Add prototype.
14185 (thread_db_create_event): Check for the main thread before adding
14187 (maybe_attach_thread): Only enable event reporting if TID == 0.
14188 (thread_db_get_tls_address): Check for new threads.
14190 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14192 * linux-low.c (linux_create_inferior): Try execv before execvp.
14193 * spu-low.c (spu_create_inferior): Likewise.
14195 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14197 * linux-low.c (linux_create_inferior): Change execv to execvp.
14198 * spu-low.c (spu_create_inferior): Likewies.
14200 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14202 * Makefile.in (clean): Clean new files instead of deleted ones.
14203 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14204 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14206 * configure.srv: Specify XML files and new regformats for MIPS and
14208 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14209 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14210 an entry for the restart register.
14211 (mips_cannot_fetch_register, mips_cannot_store_register)
14212 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14213 register names to match the XML descriptions.
14214 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14215 restart register instead of $0.
14217 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14218 Markus Deuling <deuling@de.ibm.com>
14220 * remote-utils.c (decode_xfer_write): New function.
14221 * server.h (decode_xfer_write): Add prototype.
14222 * server.c (handle_query): Add PACKET_LEN argument. Support
14223 qXfer:spu:read and qXfer:spu:write packets.
14224 (main): Pass packet_len to handle_query.
14225 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14226 * target.h (target_ops): Add qxfer_spu.
14228 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14230 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14231 accessing non-seekable spufs files.
14233 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14235 * server.c (handle_query): Add reply for qC packet.
14237 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14238 Leo Zayas <lerele@champenstudios@com>
14240 * server.h (check_remote_input_interrupt_request): New function.
14241 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14242 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14243 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14244 (check_remote_input_interrupt_request): New function.
14245 * server.h (check_remote_input_interrupt_request): Declare.
14246 * win32-low.c (winapi_DebugBreakProcess,
14247 winapi_GenerateConsoleCtrlEvent): New typedefs.
14248 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14250 (win32_wait): Check for remote interrupt request
14251 with check_remote_input_interrupt_request.
14252 (win32_request_interrupt): New function.
14253 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14255 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14257 * win32-low.c (debug_registers_changed,
14258 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14259 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14260 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14261 (thread_rec): Get context using the low target.
14262 (child_add_thread): Call thread_added on the low target,
14263 which does the same thing.
14265 (do_initial_child_stuff): Remove debug registers references.
14266 Set context using the low target. Resume threads after
14267 setting the contexts.
14268 (child_continue): Remove dead variable. Remove debug
14269 registers references.
14270 (child_fetch_inferior_registers): Go through the low target.
14271 (do_child_store_inferior_registers): Remove.
14272 (child_store_inferior_registers): Go through the low target.
14273 (win32_resume): Remove debug registers references.
14274 Set context using the low target.
14275 (handle_exception): Change return type to void. Don't record
14276 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14277 first chance exception.
14278 (get_child_debug_event): Change return type to void. Remove
14279 goto loop. Always return after waiting for debug event.
14280 (win32_wait): Convert to switch statement. Handle spurious
14283 * win32-i386-low.c (debug_registers_changed,
14284 debug_registers_used): New.
14285 (initial_stuff): Rename to ...
14286 (i386_initial_stuff): ... this. Clear debug registers
14288 (store_debug_registers): Delete.
14289 (i386_get_thread_context): New.
14290 (load_debug_registers): Delete.
14291 (i386_set_thread_context): New.
14292 (i386_thread_added): New.
14293 (single_step): Rename to ...
14294 (i386_single_step): ... this.
14295 (do_fetch_inferior_registers): Rename to ...
14296 (i386_fetch_inferior_register): ... this.
14297 (i386_store_inferior_register): New.
14298 (the_low_target): Adapt to new interface.
14300 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14301 (arm_get_thread_context): New.
14302 (arm_set_thread_context): New.
14304 (do_fetch_inferior_registers): Rename to ...
14305 (arm_fetch_inferior_register): ... this.
14306 (arm_store_inferior_register): New.
14307 (arm_wince_breakpoint): Reimplement as unsigned long.
14308 (arm_wince_breakpoint_len): Define.
14309 (the_low_target): Adapt to new interface.
14311 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14312 load_debug_registers. Add get_thread_context, set_thread_context,
14313 thread_added and store_inferior_register. Rename
14314 fetch_inferior_registers to fetch_inferior_register.
14315 (regptr): Remove declaration.
14317 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14319 * linux-low.c (linux_detach): Change return type to int. Return 0.
14320 * spu-low.c (spu_detach): Likewise.
14322 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14324 * target.h (target_ops): Change return type of detach to int.
14326 (join_inferior): New.
14327 * server.c (main): Don't skip detach support on mingw32.
14328 If the inferior doesn't support detaching return error.
14329 Call join_inferior instead of using waitpid.
14330 * linux-low.c (linux_join): New.
14331 (linux_target_op): Add linux_join.
14332 * spu-low.c (spu_join): New.
14333 (spu_target_ops): Add spu_join.
14334 * win32-low.c (win32_detach): Adapt to new interface.
14335 Reopen current_process_handle before detaching. Issue a child
14336 resume before detaching.
14338 (win32_target_op): Add win32_join.
14340 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14342 * win32-low.c (win32-attach): Fix return value.
14343 * target.h (target_ops): Describe ATTACH return values.
14345 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14347 * win32-low.c (GETPROCADDRESS): Define.
14348 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14349 (winapi_DebugSetProcessKillOnExit): Likewise.
14350 (win32_create_inferior): Force usage of ansi CreateProcessA.
14351 (win32_attach): Use GETPROCADDRESS.
14352 (win32_detach): Likewise.
14354 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14356 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14358 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14360 * win32-low.c: Commit leftover changes from 2007-03-29.
14362 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14364 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14365 fields short instead of int. Add explicit padding.
14366 (i387_cache_to_fsave): Remove unnecessary casts.
14367 (i387_fsave_to_cache): Doc fix.
14368 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14370 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14372 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14373 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14375 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14377 * configure.srv (arm*-*-mingw32ce*): Move near the other
14380 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14382 * configure.ac: Add errno checking.
14383 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14384 sys/file.h and malloc.h.
14385 (AC_CHECK_DECLS): Add perror.
14386 (srv_mingwce): Handle.
14387 * configure.srv (i[34567]86-*-cygwin*): Add
14388 win32-i386-low.o to srv_tgtobj.
14389 (i[34567]86-*-mingw*): Likewise.
14390 (arm*-*-mingw32ce*): Add case.
14391 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14392 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14393 [__MINGW32CE__] (strerror): New function.
14394 [__MINGW32CE__] (errno): Define to GetLastError.
14395 [__MINGW32CE__] (COUNTOF): New macro.
14396 (remote_open): Remove extra close call.
14397 * mem-break.c (delete_breakpoint_at): New function.
14398 * mem-break.h (delete_breakpoint_at): Declare.
14399 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14400 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14401 [USE_WIN32API] (read, write): Add char* casts.
14402 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14403 * server.h: Include wincecompat.h on Windows CE.
14404 [HAVE_ERRNO_H]: Check.
14405 (perror): Declare if not declared.
14406 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14407 (perror_with_name): Remove errno declaration.
14408 * wincecompat.h: New.
14409 * wincecompat.c: New.
14410 * win32-low.h: New.
14411 * win32-arm-low.c: New.
14412 * win32-i386-low.c: New.
14413 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14414 (OUTMSG2): Make it safe.
14416 (COUNTOF): New macro.
14417 (NUM_REGS): Get it from the low target.
14418 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14419 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14420 (thread_rec): Let low target handle debug registers.
14421 (child_add_thread): Likewise.
14422 (child_init_thread_list): Likewise.
14423 (continue_one_thread): Likewise.
14425 (do_child_fetch_inferior_registers): Move to ...
14426 * win32-i386-low.c: ... here, and rename to ...
14427 (do_fetch_inferior_registers): ... this.
14428 * win32-low.c (child_fetch_inferior_registers):
14429 Go through the low target.
14430 (do_child_store_inferior_registers): Use regptr.
14431 (strwinerror): New function.
14432 (win32_create_inferior): Handle Windows CE.
14433 Use strwinerror instead of strerror on Windows error
14434 codes. Add program to the error output.
14435 Don't close the main thread handle on Windows CE.
14436 (win32_attach): Use coredll.dll on Windows CE.
14437 (win32_kill): Close current process and current
14439 (win32_detach): Use coredll.dll on Windows CE.
14440 (win32_resume): Let low target handle debug registers, and
14442 (handle_exception): Add/Remove initial breakpoint. Avoid
14443 non-existant WSTOPSIG on Windows CE.
14444 (win32_read_inferior_memory): Cast to remove warning.
14445 (win32_arch_string): Go through the low target.
14446 (initialize_low): Call set_breakpoint_data with the low
14447 target's breakpoint.
14448 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14449 FOP_REGNUM, mappings): Move to ...
14450 * win32-i386-low.c: ... here.
14451 * win32-low.c (win32_thread_info): Move to ...
14452 * win32-low.h: ... here.
14453 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14454 win32-arm-low.c and wincecompat.c.
14455 (all:): Add $EXEEXT.
14456 (install-only:): Likewise.
14457 (gdbserver:): Likewise.
14458 (gdbreplay:): Likewise.
14459 * config.in: Regenerate.
14460 * configure: Regenerate.
14462 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14464 * win32-low.c: Rename typedef thread_info to
14465 win32_thread_info throughout.
14467 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14469 * win32-i386-low.c: Rename to ...
14470 * win32-low.c: ... this.
14471 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14472 * Makefile.in: Likewise.
14474 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14476 * remote-utils.c (monitor_output): Constify msg parameter.
14477 * server.h (monitor_output): Likewise.
14478 * win32-i386-low.c (handle_output_debug_string): New.
14479 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14480 handle_output_debug_string.
14481 (get_child_debug_event): Likewise.
14483 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14485 * server.c (main): Correct strtoul check.
14487 2007-03-27 Jon Ringle <jon@ringle.org>
14489 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14491 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14493 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14495 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14497 * terminal.h: Check HAVE_SGTTY_H.
14499 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14501 * remote-utils.c (remote_open): Print out the assigned port number.
14503 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14505 * remote-utils.c (monitor_output): New function.
14506 * server.c (debug_threads): Define here.
14507 (monitor_show_help): New function.
14508 (handle_query): Handle qRcmd.
14509 (main): Do not handle 'd' packet.
14510 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14511 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14514 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14516 * Makefile.in (EXEEXT): New.
14517 (clean): Use $(EXEEXT).
14519 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14521 * target.h (target_ops): Rename send_signal to request_interrupt,
14522 and remove enum target_signal parameter.
14523 * linux-low.c (linux_request_interrupt): Rename from
14524 linux_send_signal, and always send SIGINT.
14525 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14526 and always send SIGINT.
14527 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14529 (input_interrupt): Likewise.
14531 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14533 * server.c (get_features_xml): Check if target implemented
14535 * win32-i386-low.c (win32_arch_string): New.
14536 (win32_target_ops): Add win32_arch_string as arch_string member.
14538 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14540 * spu-low.c (spu_arch_string): New.
14541 (spu_target_ops): Add spu_arch_string.
14543 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14545 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14546 * configure.ac: Do not check for terminal.h.
14547 * configure, config.in: Regenerated.
14549 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14551 * Makefile.in (OBS): Add $(XML_BUILTIN).
14552 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14554 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14555 (arm-with-iwmmxt.c): New.
14556 * config.in, configure: Regenerate.
14557 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14558 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14559 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14560 (arm*-*-linux*): Add iWMMXt and regset support.
14561 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14562 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14563 (arm_store_wmmxregset, target_regsets): New.
14564 * server.c (get_features_xml): Take annex argument. Check builtin
14566 (handle_query): Handle multiple annexes.
14568 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14570 * remote-utils.c [USE_WIN32API] (read, write): Define.
14571 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14574 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14576 * linux-i386-low.c (the_low_target): Set arch_string.
14577 * linux-x86-64-low.c (the_low_target): Likewise.
14578 * linux-low.c (linux_arch_string): New.
14579 (linux_target_ops): Add it.
14580 * linux-low.h (struct linux_target_ops): Add arch_string.
14581 * server.c (write_qxfer_response): Use const void * for DATA.
14582 (get_features_xml): New.
14583 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14584 * target.h (struct target_ops): Add arch_string method.
14586 2007-01-03 Denis Pilat <denis.pilat@st.com>
14587 Daniel Jacobowitz <dan@codesourcery.com>
14589 * linux-low.c (linux_kill): Handle being called with no threads.
14590 * win32-i386-low.c (win32_kill): Likewise.
14591 (get_child_debug_event): Clear current_process_handle.
14593 2006-12-30 Denis PILAT <denis.pilat@st.com>
14594 Daniel Jacobowitz <dan@codesourcery.com>
14596 * remote-utils.c (remote_open): Check the type of specified
14597 serial port devices before opening them.
14598 * server.c (main): Kill the inferior if an error occurs during
14599 the first remote_open.
14601 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14603 * README: Update supported targets.
14605 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14607 * Makefile.in (clean): Remove reg-mips64.c.
14608 (reg-mips64.c, reg-mips64.o): New rules.
14609 * configure.srv: Handle mips64. Include regset support for mips.
14610 * linux-mips-low.c (union mips_register): New.
14611 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14612 (mips_breakpoint, mips_breakpoint_at): Use int.
14613 (mips_collect_register, mips_supply_register)
14614 (mips_collect_register_32bit, mips_supply_register_32bit)
14615 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14616 (mips_store_fpregset, target_regsets): New.
14617 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14619 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14621 * configure.srv: Add target "spu*-*-*".
14622 * Makefile.in (clean): Remove reg-spu.c.
14623 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14624 * spu-low.c: New file.
14626 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14628 * configure.ac: Correct td_thr_tls_get_addr test.
14629 * configure: Regenerated.
14631 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14633 * linux-low.c (linux_wait_for_event): Reformat. Use the
14634 pass_signals array.
14635 * remote-utils.c (decode_address_to_semicolon): New.
14636 * server.c (pass_signals, handle_general_set): New.
14637 (handle_query): Mention QPassSignals for qSupported.
14638 (main): Call handle_general_set.
14639 * server.h (pass_signals, decode_address_to_semicolon): New.
14641 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14643 * server.c (handle_query): Correct error handling for read_auxv.
14645 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14647 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14648 and srv_linux_thread_db to yes.
14649 * linux-s390-low.c (s390_fill_gregset): New function.
14650 (target_regsets): Define data structure.
14652 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14654 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14655 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14656 * config.in, configure: Regenerated.
14657 * inferiors.c (gdb_id_to_thread): New function.
14658 (gdb_id_to_thread_id): Use it.
14659 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14660 * linux-low.h (struct process_info): Add th member.
14661 (thread_db_get_tls_address): New prototype.
14662 * remote-utils.c (decode_address): Make non-static.
14663 * server.c (handle_query): Handle qGetTLSAddr.
14664 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14665 * target.h (struct target_ops): Add get_tls_address.
14666 * thread-db.c (maybe_attach_thread): Save the thread handle.
14667 (thread_db_get_tls_address): New.
14669 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14671 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14672 (linux_resume_one_process): Take a siginfo_t *. Update all
14673 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14674 (struct pending_signals): Add a siginfo_t.
14675 (linux_wait_for_process): Always set last_status.
14676 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14677 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14678 * linux-low.h (struct process_info): Add last_status.
14680 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14682 * remote-utils.c (try_rle): New function.
14683 (putpkt_binary): Use it.
14685 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14687 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14688 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14689 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14690 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14691 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14694 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14696 * server.c (terminal_fd): New variable.
14697 (old_foreground_pgrp): Likewise.
14698 (restore_old_foreground_pgrp): New function.
14699 (start_inferior): Record the terminal file descriptor in terminal_fd
14700 and its original foreground group in old_foreground_pgrp. Register
14701 restore_old_foreground_pgrp with atexit().
14703 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14705 * server.c (handle_query): Correct qPart to qXfer.
14707 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14709 * configure.ac: Check for more headers which are missing on
14710 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14711 * configure.srv: Add Cygwin and mingw32.
14712 * remote-utils.c: Don't include headers unconditionally which
14713 are missing on mingw32. Include <winsock.h> for mingw32.
14714 (remote_open): Adjust for mingw32 support. Flush
14715 standard error after writing to it.
14716 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14717 (unblock_async_io, enable_async_io, disable_async_io)
14718 (readchar, getpkt): Update for Winsock support.
14719 (prepare_resume_reply): Expect a protocol signal number.
14720 * server.c: Disable <sys/wait.h> on mingw32.
14721 (start_inferior): Adjust for mingw32 support. Flush
14722 standard error after writing to it.
14723 (attach_inferior): Likewise. Use protocol signal
14725 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14727 * win32-i386-low.c: New file.
14728 * Makefile.in (XM_CLIBS): Set.
14729 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14730 (win32-i386-low.o): New dependency rule.
14731 * linux-low.c (linux_wait): Use target signal numbers.
14732 * target.h (struct target_ops): Doc fix.
14733 * server.h (target_signal_to_name): New prototype.
14734 * gdbreplay.c: Don't include headers unconditionally which
14735 are missing on mingw32. Include <winsock.h> for mingw32.
14736 (remote_close, remote_open): Adjust for Winsock support.
14737 * configure, config.in: Regenerated.
14739 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14741 * server.c (decode_xfer_read, write_qxfer_response): New.
14742 (handle_query): Take a packet length argument. Handle
14743 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14744 the qSupported response.
14745 (main): Update call to handle_query.
14747 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14749 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14750 (putpkt_binary): Renamed from putpkt and adjusted for binary
14752 (putpkt): New wrapper for putpkt_binary.
14753 (readchar): Don't mask off the high bit.
14754 (decode_X_packet): New function.
14755 * server.c (main): Call putpkt_binary if a handler sets the packet
14756 length. Save the length of the incoming packet. Handle 'X'.
14757 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14759 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14761 * server.c (handle_query): Handle qSupported.
14763 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14765 * remote-utils.c (all_symbols_looked_up): New variable.
14766 (look_up_one_symbol): Check it.
14767 * server.h (look_up_one_symbol): New declaration.
14768 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14770 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14772 * Makefile.in (linux-arm-low.o): Update dependencies.
14773 * linux-arm-low.c: Include "gdb_proc_service.h".
14774 (PTRACE_GET_THREAD_AREA): Define.
14775 (ps_get_thread_area): New function.
14777 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14779 * configure.srv (m68k*-*-uclinux*): New target.
14780 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14781 (linux_resume_one_process): Remove extraneous cast.
14782 (linux_read_offsets): New.
14783 (linux_target_op): Add linux_read_offsets on mmuless systems.
14784 * server.c (handle_query): Add qOffsets logic.
14785 * target.h (struct target_ops): Add read_offsets.
14787 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14789 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14790 (PTRACE_GET_THREAD_AREA): Define.
14791 (ps_get_thread_area): New function.
14792 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14793 (linux-x86-64-low.o): Update.
14795 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14797 * configure.ac: Remove checks for prfpregset_t.
14798 * gdb_proc_service.h: New file.
14799 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14800 new "gdb_proc_service.h".
14801 * proc-service.c: Likewise.
14802 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14803 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14804 * Makefile.in (gdb_proc_service_h): Updated.
14805 * configure, config.in: Regenerated.
14807 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14809 * remote-utils.c (prepare_resume_reply): Move declaration
14810 of gdb_id_from_wait to the top of the block.
14812 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14814 * linux-low.c (regsets_store_inferior_registers): Read the regset
14815 from the target before filling it.
14817 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14819 * server.c (attach_inferior): Return SIGTRAP for a successful
14822 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14824 * Makefile.in (OBS): Add version.o.
14825 (STAGESTUFF): Delete.
14826 (version.o): Add dependencies.
14827 (version.c): Replace rule.
14828 (clean): Remove version.c.
14829 * server.c (gdbserver_version): New.
14830 (gdbserver_usage): Use printf.
14831 (main): Handle --version and --help.
14832 * server.h (version, host_name): Add declarations.
14834 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14846 * linux-x86-64-low.c:
14848 * linux-s390-low.c:
14849 * linux-ppc64-low.c:
14851 * linux-mips-low.c:
14852 * linux-m68k-low.c:
14853 * linux-m32r-low.c:
14856 * linux-ia64-low.c:
14857 * linux-i386-low.c:
14858 * linux-crisv32-low.c:
14870 * gdbserver.1: Add (C) after Copyright. Update the FSF
14873 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14875 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14876 (arm_breakpoint_at): Recognize both breakpoints.
14877 (the_low_target): Use the correct breakpoint instruction.
14879 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14881 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14882 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14883 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14884 (the_low_target): Update.
14886 2005-10-25 Andreas Schwab <schwab@suse.de>
14888 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14890 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14891 (ia64_num_regs): Reduce to 462.
14893 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14895 * acinclude.m4: Correct quoting.
14896 * aclocal.m4: Regenerated.
14898 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14899 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14900 (thread_db_init): Call thread_db_err_str.
14901 * configure.ac: Check for TD_VERSION.
14902 * config.in, configure: Regenerated.
14904 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14906 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14908 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14910 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14911 is not available. Define HAVE_PTRACE_GETREGS if it is.
14912 * config.in, configure: Regenerated.
14913 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14914 * linux-i386-low.c, linux-m68k-low.c: Update to use
14915 HAVE_PTRACE_GETREGS.
14916 * linux-low.c (regsets_fetch_inferior_registers)
14917 (regsets_store_inferior_registers): Only return 0 if we processed
14919 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14920 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14922 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14924 * inferiors.c (struct thread_info): Add gdb_id.
14925 (add_thread): Add gdb_id argument.
14926 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14927 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14928 calls to add_thread.
14929 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14930 * server.c (handle_query): Use thread_to_gdb_id.
14931 (handle_v_cont, main): Use gdb_id_to_thread_id.
14932 * server.h (add_thread): Update prototype.
14933 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14936 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14938 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14939 left-padded registers.
14940 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14941 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14943 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14945 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14946 * configure: Regenerate.
14947 * config.in: Regenerate.
14948 * server.h (NEED_DECLARATION_STRERROR):
14949 Replace with !HAVE_DECL_STRERROR.
14951 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14953 * linux-low.c (linux_wait, linux_send_signal): Don't test
14954 an unsigned long variable for > 0 if it could be MAX_ULONG.
14955 * server.c (myresume): Likewise.
14956 * target.c (set_desired_inferior): Likewise.
14958 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14960 * configure.ac: Simplify and improve check for socklen_t.
14961 * configure, config.in: Regenerate.
14963 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14965 * acconfig.h: Remove.
14966 * configure.ac: Add a test for socklen_t. Use three-argument
14967 AC_DEFINE throughout.
14968 * config.in: Regenerated using autoheader 2.59.
14969 * configure: Regenerated.
14971 * gdbreplay.c (socklen_t): Provide a default.
14972 (remote_open): Use socklen_t.
14973 * remote-utils.c (socklen_t): Provide a default.
14974 (remote_open): Use socklen_t.
14975 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14978 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14980 * linux-low.c (linux_read_memory, linux_write_memory)
14981 (linux_read_auxv): Likewise.
14982 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14983 (check_mem_write): Likewise.
14984 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14986 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14987 (registers_from_string, register_data): Likewise.
14988 * server.c (handle_query, main): Likewise.
14989 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14990 (decode_M_packet): Likewise.
14991 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14992 * target.h (struct target_ops): Update read_memory, write_memory,
14994 (read_inferior_memory, write_inferior_memory): Update.
14995 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14996 to unsigned char *.
14997 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14998 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14999 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15000 linux-s390-low.c, linux-sh-low.c: Update for changes in
15001 read_inferior_memory and the_low_target->breakpoint.
15003 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15005 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15006 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15007 * configure.srv: Add powerpc64-*-linux*.
15008 * linux-ppc64-low.c: New file.
15010 2005-05-23 Orjan Friberg <orjanf@axis.com>
15012 * linux-cris-low.c: New file with support for CRIS.
15013 * linux-crisv32-low.c: Ditto for CRISv32.
15014 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15015 (clean): Add reg-cris.c and reg-crisv32.c.
15016 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15017 reg-crisv32.o, and reg-crisv32.c to make rules.
15018 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15019 recognized targets.
15021 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15023 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15024 of sizeof (PTRACE_XFER_TYPE).
15025 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15027 2005-05-12 Orjan Friberg <orjanf@axis.com>
15029 * target.h (struct target_ops): Add insert_watchpoint,
15030 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15031 pointers for hardware watchpoint support.
15032 * linux-low.h (struct linux_target_ops): Ditto.
15033 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15034 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15035 to linux_target_ops.
15036 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15038 * server.c (main): Recognize 'Z' and 'z' packets.
15040 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15042 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15043 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15044 (the_low_target): Add new members.
15046 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15048 * proc-service.c (ps_lgetregs): Search all_processes instead of
15051 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15053 * server.c (start_inferior): Change return type to int.
15054 (attach_inferior): Change sigptr to int *.
15055 (handle_v_cont, handle_v_requests): Change signal to int *.
15056 (main): Change signal to int.
15058 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15060 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15061 * configure.srv: Add m32r*-*-linux*.
15062 * linux-m32r-low.c: New file.
15064 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15066 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15068 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15070 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15071 Take unsigned long arguments for PIDs.
15072 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15073 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15074 (wait_for_sigstop, linux_resume_one_process)
15075 (regsets_fetch_inferior_registers, linux_send_signal)
15076 (linux_read_auxv): Likewise. Update the types of variables holding
15077 PIDs. Update format string specifiers.
15078 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15079 * remote-utils.c (prepare_resume_reply): Likewise.
15080 * server.c (cont_thread, general_thread, step_thread)
15081 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15083 (handle_query): Update format specifiers.
15084 (handle_v_cont, main): Use strtoul for thread IDs.
15085 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15086 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15087 (general_thread, step_thread, thread_from_wait)
15088 (old_thread_from_wait): Update.
15089 * target.h (struct thread_resume): Use unsigned long for THREAD.
15090 (struct target_ops): Use unsigned long for arguments to attach and
15093 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15095 * acinclude.m4: Include bfd/bfd.m4 directly.
15096 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15097 <agriffis@toolchain.org>.
15098 * aclocal.m4, configure: Regenerated.
15100 2005-01-07 Andrew Cagney <cagney@gnu.org>
15102 * configure.ac: Rename configure.in, require autoconf 2.59.
15103 * configure: Re-generate.
15105 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15107 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15108 LIBS when finished.
15109 * aclocal.m4: Regenerated.
15110 * configure: Regenerated.
15112 2004-11-21 Andreas Schwab <schwab@suse.de>
15114 * linux-m68k-low.c (m68k_num_gregs): Define.
15115 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15116 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15117 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15118 (m68k_breakpoint_at): New. Add to the_low_target.
15120 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15121 srv_linux_thread_db to yes.
15123 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15125 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15126 (ARCH_SET_FS): Likewise.
15127 (ARCH_GET_FS): Likewise.
15128 (ARCH_GET_GS): Likewise.
15130 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15132 * linux-i386-low.c (ps_get_thread_area): New.
15133 * linux-x86-64-low.c (ps_get_thread_area): New.
15134 * linux-low.c: Include <sys/syscall.h>.
15135 (linux_kill_one_process): Don't kill the first thread here.
15136 (linux_kill): Kill the first thread here.
15137 (kill_lwp): New function.
15138 (send_sigstop, linux_send_signal): Use it.
15139 * proc-service.c: Clean up #ifdefs.
15140 (fpregset_info): Delete.
15141 (ps_lgetregs): Update and enable implementation.
15142 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15144 * remote-utils.c (struct sym_cache, symbol_cache): New.
15145 (input_interrupt): Print a clearer message.
15146 (async_io_enabled): New variable.
15147 (enable_async_io, disable_async_io): Use it. Update comments.
15148 (look_up_one_symbol): Use the symbol cache.
15149 * thread-db.c (thread_db_look_up_symbols): New function.
15150 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15152 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15154 * configure.in: Test for -rdynamic.
15155 * configure: Regenerated.
15156 * Makefile (INTERNAL_LDFLAGS): New.
15157 (gdbserver, gdbreplay): Use it.
15159 2004-09-02 Andrew Cagney <cagney@gnu.org>
15161 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15163 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15165 * linux-low.c (linux_wait): Clear all_processes list also.
15167 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15169 * linux-low.c: Include <errno.h>. Remove extern declaration of
15172 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15174 * gdbreplay.c, server.h, utils.c: Update copyright years.
15176 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15178 * server.c (main): Print child status or termination signal from
15179 variable 'signal', not 'sig'.
15181 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15183 * linux-low.c (linux_read_memory): Change return type to
15184 int. Check for and return error from ptrace().
15185 * target.c (read_inferior_memory): Change return type to int. Pass
15186 back return status from the_target->read_memory().
15187 * target.h (struct target_ops): Adapt *read_memory() prototype.
15189 (read_inferior_memory): Adapt prototype.
15190 * server.c (main): Return an error packet if
15191 read_inferior_memory() returns an error.
15193 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15195 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15196 Unify with other clean targets.
15198 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15200 * server.c (handle_v_cont): Call set_desired_inferior.
15202 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15204 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15206 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15208 * linux-low.c (linux_wait): Unblock async I/O.
15209 (linux_resume): Block and enable async I/O.
15210 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15211 * server.h (block_async_io, unblock_async_io): Add prototypes.
15213 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15215 * remote-utils.c (remote_open): Print a status notice after
15216 opening a TCP port.
15217 * server.c (attach_inferior): Print a status notice after
15220 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15222 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15224 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15226 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15228 * server.c, target.h: Update copyright years.
15230 2004-02-25 Roland McGrath <roland@redhat.com>
15232 * target.h (struct target_ops): New member `read_auxv'.
15233 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15234 * linux-low.c (linux_read_auxv): New function.
15235 (linux_target_ops): Initialize `read_auxv' member to that.
15237 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15239 Committed by Jim Blandy <jimb@redhat.com>.
15241 * linux-s390-low.c (s390_num_regs): Update.
15242 (s390_regmap): Remove control registers. Use __s390x__ predefine
15243 instead of GPR_SIZE to distiguish s390 and s390x targets.
15245 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15247 * linux-low.c: Update copyright year.
15248 (check_removed_breakpoint): Clear pending_is_breakpoint.
15249 (linux_set_resume_request, linux_queue_one_thread)
15250 (resume_status_pending_p): New functions.
15251 (linux_continue_one_thread): Use process->resume.
15252 (linux_resume): Only resume threads if there are no pending events.
15253 * linux-low.h (struct process_info): Add resume request
15256 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15258 * regcache.c (new_register_cache): Clear the allocated register
15259 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15261 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15263 * linux-low.c (linux_resume): Take a struct thread_resume *
15265 (linux_wait): Update call.
15266 (resume_ptr): New static variable.
15267 (linux_continue_one_thread): Renamed from
15268 linux_continue_one_process. Use resume_ptr.
15269 (linux_resume): Use linux_continue_one_thread.
15270 * server.c (handle_v_cont, handle_v_requests): New functions.
15271 (myresume): New function.
15272 (main): Handle 'v' case.
15273 * target.h (struct thread_resume): New type.
15274 (struct target_ops): Change argument of "resume" to struct
15276 (myresume): Delete macro.
15278 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15280 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15281 (uninstall): Support DESTDIR.
15283 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15285 * configure.srv: Add xscale*linux copy of arm*linux entry.
15287 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15289 * linux-arm-low.c (arm_reinsert_addr): New function.
15290 (the_low_target): Add arm_reinsert_addr.
15292 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15294 * mem-break.c: Remove whitespace at end of file.
15296 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15298 * configure.in: Check whether we need to prototype strerror.
15299 * server.h: Optionally prototype strerror.
15300 * gdbreplay.c (perror_with_name): Use strerror.
15301 * linux-low.c (linux_attach_lwp): Use strerror.
15302 * utils.c (perror_with_name): Use strerror.
15303 * config.in, configure: Regenerated.
15305 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15307 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15308 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15310 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15312 * Makefile.in (SFILES): Update.
15313 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15314 low-sun3.c: Remove files.
15316 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15318 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15319 (linux_detach_one_process, linux_detach): New functions.
15320 (linux_target_ops): Add linux_detach.
15321 * server.c (main): Handle 'D' packet.
15322 * target.h (struct target_ops): Add "detach" member.
15323 (detach_inferior): Define.
15325 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15327 From Kelley Cook <kelleycook@wideopenwest.com>:
15328 * configure.srv: Accept i[34567]86 variants.
15330 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15332 * linux-low.c (linux_wait_for_event): Correct comment typos.
15333 (linux_resume_one_process): Call check_removed_breakpoint.
15334 (linux_send_signal): New function.
15335 (linux_target_ops): Add linux_send_signal.
15336 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15338 * target.h (struct target_ops): Add send_signal.
15340 2003-05-29 Jim Blandy <jimb@redhat.com>
15342 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15343 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15344 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15345 away part of the register's value.
15347 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15349 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15350 (linux_wait_for_event, linux_init_signals): Likewise.
15352 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15354 * configure.in: Check for stdlib.h.
15355 * configure: Regenerated.
15356 * config.in: Regenerated.
15358 2003-01-04 Andreas Schwab <schwab@suse.de>
15360 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15362 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15364 * Makefile.in: Remove obsolete code.
15366 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15368 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15369 defined(PT_FPR0_HI).
15371 2002-11-17 Stuart Hughes <seh@zee2.com>
15373 * linux-arm-low.c (arm_num_regs): Increase.
15374 (arm_regmap): Include status register.
15376 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15378 * linux-low.c (register_addr): Remove incorrect -1 check.
15380 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15382 * linux-low.c (linux_create_inferior): Call setpgid. Return
15384 (unstopped_p, linux_signal_pid): Remove.
15385 (linux_target_ops): Remove linux_signal_pid.
15386 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15387 global instead of target method.
15388 * target.h (struct target_ops): Remove signal_pid. Update comment
15389 for create_inferior.
15390 * server.c (signal_pid): New variable.
15391 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15392 gdbserver. Set the child to be the foreground process group.
15393 (attach_inferior): Set signal_pid.
15395 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15397 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15399 2002-08-20 Jim Blandy <jimb@redhat.com>
15401 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15404 2002-08-01 Andrew Cagney <cagney@redhat.com>
15406 * Makefile.in: Make chill references obsolete.
15408 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15410 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15411 * configure: Regenerate.
15412 * config.in: Regenerate.
15414 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15416 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15417 (perror_with_name, remote_close, remote_open, expect, play): Static.
15419 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15421 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15422 byte offsets instead of an array of indexes.
15423 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15425 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15427 * regcache.c: Add comment.
15429 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15431 * thread-db.c: New file.
15432 * proc-service.c: New file.
15433 * acinclude.m4: New file.
15434 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15435 proc-service.o, and thread-db.o.
15436 (linux-low.o): Add USE_THREAD_DB.
15437 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15438 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15439 * aclocal.m4: Regenerated.
15440 * config.in: Regenerated.
15441 * configure: Regenerated.
15442 * configure.in: Check for proc_service.h, sys/procfs.h,
15443 thread_db.h, and linux/elf.h headrs.
15444 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15445 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15446 Check for -lthread_db and thread support.
15447 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15448 PowerPC, and SuperH.
15449 * i387-fp.c: Constify arguments.
15450 * i387-fp.h: Likewise.
15451 * inferiors.c: (struct thread_info): Renamed from
15452 `struct inferior_info'. Remove PID member. Use generic inferior
15453 list header. All uses updated.
15454 (inferiors, signal_pid): Removed.
15455 (all_threads): New variable.
15456 (get_thread): Define.
15457 (add_inferior_to_list): New function.
15458 (for_each_inferior): New function.
15459 (change_inferior_id): New function.
15460 (add_inferior): Removed.
15461 (remove_inferior): New function.
15462 (add_thread): New function.
15463 (free_one_thread): New function.
15464 (remove_thread): New function.
15465 (clear_inferiors): Use for_each_inferior and free_one_thread.
15466 (find_inferior): New function.
15467 (find_inferior_id): New function.
15468 (inferior_target_data): Update argument type.
15469 (set_inferior_target_data): Likewise.
15470 (inferior_regcache_data): Likewise.
15471 (set_inferior_regcache_data): Likewise.
15472 * linux-low.c (linux_bp_reinsert): Remove.
15473 (all_processes, stopping_threads, using_thrads)
15474 (struct pending_signals, debug_threads, pid_of): New.
15475 (inferior_pid): Replace with macro.
15476 (struct inferior_linux_data): Remove.
15477 (get_stop_pc, add_process): New functions.
15478 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15479 Use add_process and add_thread.
15480 (linux_attach_lwp): New function, based on old linux_attach. Use
15481 add_process and add_thread. Set stop_expected for new threads.
15482 (linux_attach): New function.
15483 (linux_kill_one_process): New function.
15484 (linux_kill): Kill all LWPs.
15485 (linux_thread_alive): Use find_inferior_id.
15486 (check_removed_breakpoints, status_pending_p): New functions.
15487 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15488 Update. Use WNOHANG. Wait for cloned processes also. Update process
15489 struct for the found process.
15490 (linux_wait_for_event): New function.
15491 (linux_wait): Use it. Support LWPs.
15492 (send_sigstop, wait_for_sigstop, stop_all_processes)
15493 (linux_resume_one_process, linux_continue_one_process): New functions.
15494 (linux_resume): Support LWPs.
15495 (REGISTER_RAW_SIZE): Remove.
15496 (fetch_register): Use register_size instead. Call supply_register.
15497 (usr_store_inferior_registers): Likewise. Call collect_register.
15498 Fix recursive case.
15499 (regsets_fetch_inferior_registers): Improve error message.
15500 (regsets_store_inferior_registers): Add debugging.
15501 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15502 (unstopped_p, linux_signal_pid): New functions.
15503 (linux_target_ops): Add linux_signal_pid.
15504 (linux_init_signals): New function.
15505 (initialize_low): Call it. Initialize using_threads.
15506 * regcache.c (inferior_regcache_data): Add valid
15508 (get_regcache): Fetch registers lazily. Add fetch argument
15509 and update all callers.
15510 (regcache_invalidate_one, regcache_invalidate): New
15512 (new_register_cache): Renamed from create_register_cache.
15513 Return the new regcache.
15514 (free_register_cache): Change argument to a void *.
15515 (registers_to_string, registers_from_string): Call get_regcache
15516 with fetch flag set.
15517 (register_data): Make static. Pass fetch flag to get_regcache.
15518 (supply_register): Call get_regcache with fetch flag clear.
15519 (collect_register): Call get_regcache with fetch flag set.
15520 (collect_register_as_string): New function.
15521 * regcache.h: Update.
15522 * remote-utils.c (putpkt): Flush after debug output and use
15524 Handle input interrupts while waiting for an ACK.
15525 (input_interrupt): Use signal_pid method.
15526 (getpkt): Flush after debug output and use stderr.
15527 (outreg): Use collect_register_as_string.
15528 (new_thread_notify, dead_thread_notify): New functions.
15529 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15530 and general_thread.
15531 (look_up_one_symbol): Flush after debug output.
15532 * server.c (step_thread, server_waiting): New variables.
15533 (start_inferior): Don't use signal_pid. Update call to mywait.
15534 (attach_inferior): Update call to mywait.
15535 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15536 (main): Don't fetch/store registers explicitly. Use
15537 set_desired_inferior. Support proposed ``Hs'' packet. Update
15539 * server.h: Update.
15540 (struct inferior_list, struct_inferior_list_entry): New.
15541 * target.c (set_desired_inferior): New.
15542 (write_inferior_memory): Constify.
15543 (mywait): New function.
15544 * target.h: Update.
15545 (struct target_ops): New signal_pid method.
15546 (mywait): Removed macro, added prototype.
15548 * linux-low.h (regset_func): Removed.
15549 (regset_fill_func, regset_store_func): New.
15550 (enum regset_type): New.
15551 (struct regset_info): Add type field. Use new operation types.
15552 (struct linux_target_ops): stop_pc renamed to get_pc.
15553 Add decr_pc_after_break and breakpoint_at.
15554 (get_process, get_thread_proess, get_process_thread)
15555 (strut process_info, all_processes, linux_attach_lwp)
15556 (thread_db_init): New.
15558 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15559 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15560 (the_low_target): Add new members.
15561 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15562 (i386_store_fpxregset): Constify.
15563 (target_regsets): Add new kind identifier.
15564 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15565 (i386_set_pc): Add debugging.
15566 (i386_breakpoint_at): New function.
15567 (the_low_target): Add new members.
15568 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15569 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15570 (mips_breakpoint_at): New.
15571 (the_low_target): Add new members.
15572 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15573 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15574 (the_low_target): Add new members.
15575 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15576 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15577 (the_low_target): Add new members.
15578 * linux-x86-64-low.c (target_regsets): Add new kind
15581 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15583 From Martin Pool <mbp@samba.org>:
15584 * server.c (gdbserver_usage): New function.
15587 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15589 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15590 stop_at -> stop_pc.
15592 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15594 * Makefile.in: Remove obsolete code.
15596 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15598 * linux-low.c (regsets_fetch_inferior_registers),
15599 (regsets_store_inferior_registers): Removed cast to int from
15601 * regcache.h: Added declaration of struct inferior_info.
15603 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15605 * inferiors.c (struct inferior_info): Add regcache_data.
15606 (add_inferior): Call create_register_cache.
15607 (clear_inferiors): Call free_register_cache.
15608 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15609 * regcache.c (struct inferior_regcache_data): New.
15610 (registers): Remove.
15611 (get_regcache): New function.
15612 (create_register_cache, free_register_cache): New functions.
15613 (set_register_cache): Don't initialize the register cache here.
15614 (registers_to_string, registers_from_string, register_data): Call
15616 * regcache.h: Add prototypes.
15617 * server.h: Likewise.
15619 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15621 * mem-break.c: New file.
15622 * mem-break.h: New file.
15623 * Makefile.in: Add mem-break.o rule; update server.h
15625 * inferiors.c (struct inferior_info): Add target_data
15627 (clear_inferiors): Free target_data member if set.
15628 (inferior_target_data, set_inferior_target_data): New functions.
15629 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15630 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15631 * linux-low.c (linux_bp_reinsert): New variable.
15632 (struct inferior_linux_data): New.
15633 (linux_create_inferior): Use set_inferior_target_data.
15634 (linux_attach): Likewise. Call add_inferior.
15635 (linux_wait_for_one_inferior): New function.
15636 (linux_wait): Call it.
15637 (linux_write_memory): Add const.
15638 (initialize_low): Call set_breakpoint_data.
15639 * linux-low.h (struct linux_target_ops): Add breakpoint
15641 * server.c (attach_inferior): Remove extra add_inferior
15643 * server.h: Include mem-break.h. Update inferior.c
15645 * target.c (read_inferior_memory)
15646 (write_inferior_memory): New functions.
15647 * target.h (read_inferior_memory)
15648 (write_inferior_memory): Change macros to prototypes.
15649 (struct target_ops): Update comments. Add const to write_memory
15652 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15654 * linux-low.c (usr_store_inferior_registers): Support
15655 registers which are allowed to fail to store.
15656 * linux-low.h (linux_target_ops): Likewise.
15657 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15658 (ppc_cannot_store_register): FPSCR may not be storable.
15660 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15662 * server.h: Include <string.h> if HAVE_STRING_H.
15663 * ChangeLog: Correct paths in last ChangeLog entry.
15665 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15667 * linux-low.h: Remove obsolete prototypes.
15668 (struct linux_target_ops): New.
15669 (extern the_low_target): New.
15670 * linux-low.c (num_regs, regmap): Remove declarations.
15671 (register_addr): Use the_low_target explicitly.
15672 (fetch_register): Likewise.
15673 (usr_fetch_inferior_registers): Likewise.
15674 (usr_store_inferior_registers): Likewise.
15675 * linux-arm-low.c (num_regs): Remove.
15676 (arm_num_regs): Define.
15677 (arm_regmap): Renamed from regmap, made static.
15678 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15680 (arm_cannot_store_register): Renamed from cannot_store_register,
15682 (the_low_target): New.
15683 * linux-i386-low.c (num_regs): Remove.
15684 (i386_num_regs): Define.
15685 (i386_regmap): Renamed from regmap, made static.
15686 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15688 (i386_cannot_store_register): Renamed from cannot_store_register,
15690 (the_low_target): New.
15691 * linux-ia64-low.c (num_regs): Remove.
15692 (ia64_num_regs): Define.
15693 (ia64_regmap): Renamed from regmap, made static.
15694 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15696 (ia64_cannot_store_register): Renamed from cannot_store_register,
15698 (the_low_target): New.
15699 * linux-m68k-low.c (num_regs): Remove.
15700 (m68k_num_regs): Define.
15701 (m68k_regmap): Renamed from regmap, made static.
15702 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15704 (m68k_cannot_store_register): Renamed from cannot_store_register,
15706 (the_low_target): New.
15707 * linux-mips-low.c (num_regs): Remove.
15708 (mips_num_regs): Define.
15709 (mips_regmap): Renamed from regmap, made static.
15710 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15712 (mips_cannot_store_register): Renamed from cannot_store_register,
15714 (the_low_target): New.
15715 * linux-ppc-low.c (num_regs): Remove.
15716 (ppc_num_regs): Define.
15717 (ppc_regmap): Renamed from regmap, made static.
15718 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15720 (ppc_cannot_store_register): Renamed from cannot_store_register,
15722 (the_low_target): New.
15723 * linux-s390-low.c (num_regs): Remove.
15724 (s390_num_regs): Define.
15725 (s390_regmap): Renamed from regmap, made static.
15726 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15728 (s390_cannot_store_register): Renamed from cannot_store_register,
15730 (the_low_target): New.
15731 * linux-sh-low.c (num_regs): Remove.
15732 (sh_num_regs): Define.
15733 (sh_regmap): Renamed from regmap, made static.
15734 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15736 (sh_cannot_store_register): Renamed from cannot_store_register,
15738 (the_low_target): New.
15739 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15740 (the_low_target): New.
15742 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15744 * Makefile.in: Add stamp-h target.
15745 * configure.in: Create stamp-h.
15746 * configure: Regenerated.
15748 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15750 * inferiors.c: New file.
15751 * target.c: New file.
15752 * target.h: New file.
15753 * Makefile.in: Add target.o and inferiors.o. Update
15755 * linux-low.c (inferior_pid): New static variable,
15756 moved from server.c.
15757 (linux_create_inferior): Renamed from create_inferior.
15758 Call add_inferior. Return 0 on success instead of a PID.
15759 (linux_attach): Renamed from myattach.
15760 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15761 (linux_thread_alive): Renamed from mythread_alive.
15762 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15764 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15765 (regsets_store_inferior_registers): Correct error message.
15766 Add missing ``return 0''.
15767 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15768 (linux_store_registers): Renamed from store_inferior_registers.
15769 (linux_read_memory): Renamed from read_inferior_memory.
15770 (linux_write_memory): Renamed from write_inferior_memory.
15771 (linux_target_ops): New structure.
15772 (initialize_low): Call set_target_ops ().
15773 * remote-utils.c (unhexify): New function.
15774 (hexify): New function.
15775 (input_interrupt): Send signals to ``signal_pid''.
15776 * server.c (inferior_pid): Remove.
15777 (start_inferior): Update create_inferior call.
15778 (attach_inferior): Call add_inferior.
15779 (handle_query): New function.
15780 (main): Call handle_query for `q' packets.
15781 * server.h: Include "target.h". Remove obsolete prototypes.
15782 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15784 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15786 * Makefile.in: Add WARN_CFLAGS. Update configury
15788 * configure.in: Check for <string.h>
15789 * configure: Regenerate.
15790 * config.in: Regenerate.
15791 * gdbreplay.c: Include needed system headers.
15792 (remote_open): Remove strchr prototype.
15793 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15794 * regcache.c (supply_register): Change buf argument to const void *.
15795 (supply_register_by_name): Likewise.
15796 (collect_register): Change buf argument to void *.
15797 (collect_register_by_name): Likewise.
15798 * regcache.h: Add missing prototypes.
15799 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15800 * server.c (handle_query): New function.
15801 (attached): New static variable, moved out of main.
15802 (main): Quiet longjmp clobber warnings.
15803 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15804 * utils.c (error): Remove NORETURN.