1 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
4 (linux_handle_new_gdb_connection): Use for_each_thread, inline
5 code from reset_lwp_ptrace_options_callback.
7 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
9 * linux-arm-low.c (struct update_registers_data): Remove.
10 (update_registers_callback): Return void, take arguments
11 directly, don't check thread's pid.
12 (arm_insert_point, arm_remove_point): Use for_each_thread.
14 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
16 * win32-low.c (continue_one_thread): Return void, take argument
18 (child_continue): Use for_each_thread.
20 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
22 * win32-i386-low.c (update_debug_registers_callback): Rename
24 (update_debug_registers): ... this, return void, remove pid_p arg.
25 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
27 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
29 * inferiors.h (struct process_info): Add constructor, initialize
31 <syscalls_to_catch>: Change type to std::vector<int>.
32 * inferiors.c (add_process): Allocate process_info with new.
33 (remove_process): Free process_info with delete.
34 * linux-low.c (handle_extended_wait): Adjust.
35 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
36 * server.c (handle_general_set): Adjust.
38 2017-11-16 Pedro Alves <palves@redhat.com>
40 * remote-utils.c (remote_close): Block SIGIO signals instead of
41 uninstalling the SIGIO handler.
43 2017-11-16 Alan Hayward <alan.hayward@arm.com>
45 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
47 2017-11-16 Yao Qi <yao.qi@linaro.org>
49 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
50 (tic6x_store_gregset): Likewise.
51 (tic6x_usrregs_info): Move it up.
53 2017-11-15 Alan Hayward <alan.hayward@arm.com>
55 * Makefile.in: Update arch rules.
56 * configure.srv: Explicitly mark arch/ files.
58 2017-11-13 Andreas Schwab <schwab@suse.de>
60 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
62 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
64 2017-11-06 Pedro Alves <palves@redhat.com>
66 * config.in, configure: Regenerate.
68 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
70 * target.c (struct thread_search): Remove.
71 (thread_search_callback): Remove.
72 (prepare_to_access_memory): Use for_each_thread instead of
73 find_inferior. Inline code from thread_search_callback.
75 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
77 * server.c (struct visit_actioned_threads_data): Remove.
78 (visit_actioned_threads): Change prototype to take arguments
80 (resume): Use find_thread instead of find_inferior.
82 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
84 * server.c (queue_stop_reply_callback): Change prototype, return
86 (find_status_pending_thread_callback): Remove.
87 (handle_status): Replace find_inferior with find_thread and
90 2017-10-25 Alan Hayward <alan.hayward@arm.com>
92 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
94 (aarch64_store_gregset): Likewise.
95 (aarch64_fill_fpregset): Likewise.
96 (aarch64_store_fpregset): Likewise.
98 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
100 * gdbthread.h (find_thread, for_each_thread): New functions.
101 * inferiors.c (thread_of_pid): Remove.
102 (find_any_thread_of_pid): Use find_thread.
103 * linux-low.c (num_lwps): Use for_each_thread.
105 2017-10-17 Yao Qi <yao.qi@linaro.org>
107 * Makefile.in: Remove one rule.
108 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
110 2017-10-17 Yao Qi <yao.qi@linaro.org>
112 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
113 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
115 2017-10-17 Yao Qi <yao.qi@linaro.org>
117 * configure.srv: Rename arm.o with arch/arm.o.
119 2017-10-17 Yao Qi <yao.qi@linaro.org>
121 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
122 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
123 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
124 (arch-i386.o, arch-amd64.o): Remove rules.
125 (arch/%.o): New rule.
126 Update POSTCOMPILE and COMPILE.pre.
127 * configure.ac: Invoke AC_CONFIG_COMMANDS.
128 * configure: Re-generated.
129 * configure.srv: Replace arch-i386.o with arch/i386.o.
130 Replace arch-amd64.o with arch/amd64.o.
132 2017-10-16 Yao Qi <yao.qi@linaro.org>
134 * configure: Regenerated.
136 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
138 * inferiors.h: (struct inferior_list): Remove.
139 (struct inferior_list_entry); Remove.
140 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
141 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
142 get_first_inferior): Remove.
143 (for_each_inferior, for_each_inferior_with_data, find_inferior,
144 find_inferior_id, find_inferior_in_random): Change signature.
145 * inferiors.c (all_threads): Change type to
146 std::list<thread_info *>.
147 (get_thread): Remove macro.
148 (find_inferior, find_inferior_id): Change signature, implement
150 (find_inferior_in_random): Change signature, implement using
151 find_thread_in_random.
152 (for_each_inferior, for_each_inferior_with_data): Change
153 signature, implement using for_each_thread.
154 (add_inferior_to_list, remove_inferior): Remove.
155 (add_thread, get_first_thread, thread_of_pid,
156 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
157 (get_first_inferior, one_inferior_p, clear_inferior_list):
159 (clear_inferiors, get_thread_process): Update.
160 * gdbthread.h: Include <list>.
161 (struct thread_info) <entry>: Remove field.
163 (all_threads): Change type to std::list<thread_info *>.
164 (get_first_inferior): Add doc.
165 (find_thread, for_each_thread, find_thread_in_random): New
167 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
168 * linux-arm-low.c (update_registers_callback): Update.
169 * linux-low.c (second_thread_of_pid_p): Update.
170 (kill_one_lwp_callback, linux_detach_lwp_callback,
171 delete_lwp_callback, status_pending_p_callback, same_lwp,
172 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
173 iterate_over_lwps, not_stopped_callback,
174 resume_stopped_resumed_lwps, count_events_callback,
175 select_singlestep_lwp_callback, select_event_lwp_callback,
176 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
177 suspend_and_send_sigstop_callback, wait_for_sigstop,
178 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
179 lwp_running, linux_set_resume_request, resume_status_pending_p,
180 need_step_over_p, start_step_over, linux_resume_one_thread,
181 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
182 reset_lwp_ptrace_options_callback): Update.
183 * linux-mips-low.c (update_watch_registers_callback): Update.
184 * regcache.c (regcache_invalidate_one, regcache_invalidate):
186 (free_register_cache_thread_one): Remove.
187 (regcache_release): Update.
188 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
189 handle_qxfer_threads_worker): Update.
190 (handle_query): Update, use list iterator.
191 (visit_actioned_threads, handle_pending_status,
192 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
193 clear_pending_status_callback, set_pending_status_callback,
194 find_status_pending_thread_callback, handle_status,
195 process_serial_event): Update.
196 * target.c (thread_search_callback): Update.
197 * thread-db.c (thread_db_get_tls_address): Update.
198 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
200 * win32-i386-low.c (update_debug_registers_callback): Update.
201 * win32-low.c (delete_thread_info, child_delete_thread,
202 continue_one_thread, suspend_one_thread,
203 get_child_debug_event): Adjust.
205 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
207 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
208 * inferiors.h: Include <list>.
209 (struct process_info) <entry>: Remove field.
211 (pid_of): Change macro to function.
212 (ptid_of, lwpid_of): Remove macro.
213 (all_processes): Change type to std::list<process_info *>.
214 (ALL_PROCESSES): Remove macro.
215 (for_each_process, find_process): New function.
216 * inferiors.c (all_processes): Change type to
217 std::list<process_info *>.
218 (find_thread_process): Adjust.
219 (add_process): Likewise.
220 (remove_process): Likewise.
221 (find_process_pid): Likewise.
222 (get_first_process): Likewise.
223 (started_inferior_callback): Remove.
224 (have_started_inferiors_p): Adjust.
225 (attached_inferior_callback): Remove.
226 (have_attached_inferiors_p): Adjust.
227 * linux-low.c (check_zombie_leaders): Likewise.
228 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
229 (x86_linux_update_xmltarget): Adjust.
230 * server.c (handle_query): Likewise.
231 (gdb_reattached_process): Remove.
232 (handle_status): Adjust.
233 (kill_inferior_callback): Likewise.
234 (detach_or_kill_inferior): Remove.
235 (print_started_pid): Likewise.
236 (print_attached_pid): Likewise.
237 (detach_or_kill_for_exit): Update.
238 (process_serial_event): Likewise.
239 * linux-arm-low.c (arm_new_fork): Likewise.
241 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
243 * dll.h: Include <list>.
244 (struct dll_info): Add constructor.
245 <entry>: Remove field.
246 (all_dlls): Change type to std::list<dll_info>.
247 * dll.c: Include <algorithm>.
248 (get_dll): Remove macro.
249 (all_dlls): Change type to std::list<dll_info *>.
250 (free_one_dll): Remove.
251 (match_dll): Likewise.
252 (loaded_dll): Adjust.
253 (unloaded_dll): Adjust to all_dlls type change, use
254 std::find_if. Inline code from match_dll.
255 (clear_dlls): Adjust to all_dlls type change.
256 * server.c (emit_dll_description): Remove.
257 (handle_qxfer_libraries): Adjust to all_dlls type change,
258 integrate emit_dll_description's functionality.
260 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
262 * linux-low.h (struct linux_target_ops) <delete_process>: New
264 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
265 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
266 (struct linux_target_ops): Add delete_process callback.
267 * linux-arm-low.c (arm_delete_process): New.
268 (struct linux_target_ops): Add delete_process callback.
269 * linux-bfin-low.c (struct linux_target_ops): Likewise.
270 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
271 * linux-m32r-low.c (struct linux_target_ops): Likewise.
272 * linux-mips-low.c (mips_linux_delete_process): New.
273 (struct linux_target_ops): Add delete_process callback.
274 * linux-ppc-low.c (struct linux_target_ops): Likewise.
275 * linux-s390-low.c (struct linux_target_ops): Likewise.
276 * linux-sh-low.c (struct linux_target_ops): Likewise.
277 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
278 * linux-tile-low.c (struct linux_target_ops): Likewise.
279 * linux-x86-low.c (x86_linux_delete_process): New.
280 (struct linux_target_ops): Add delete_process callback.
281 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
283 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
285 * linux-aarch64-low.c (the_low_target): Add thread delete
287 * linux-arm-low.c (arm_delete_thread): New function.
288 (the_low_target): Add thread delete callback.
289 * linux-bfin-low.c (the_low_target): Likewise.
290 * linux-crisv32-low.c (the_low_target): Likewise.
291 * linux-low.c (delete_lwp): Invoke delete_thread callback if
293 * linux-low.h (struct linux_target_ops) <delete_thread>: New
295 * linux-m32r-low.c (the_low_target): Add thread delete callback.
296 * linux-mips-low.c (mips_linux_delete_thread): New function.
297 (the_low_target): Add thread delete callback.
298 * linux-ppc-low.c (the_low_target): Likewise.
299 * linux-s390-low.c (the_low_target): Likewise.
300 * linux-sh-low.c (the_low_target): Likewise.
301 * linux-tic6x-low.c (the_low_target): Likewise.
302 * linux-tile-low.c (the_low_target): Likewise.
303 * linux-x86-low.c (the_low_target): Likewise.
304 * linux-xtensa-low.c (the_low_target): Likewise.
306 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
308 * win32-low.c: Include "common-inferior.h".
310 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
312 * inferiors.c (set_inferior_cwd): New function.
313 * server.c (handle_general_set): Handle QSetWorkingDir packet.
314 (handle_query): Inform that QSetWorkingDir is supported.
315 * win32-low.c (create_process): Pass the inferior's cwd to
318 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
320 * inferiors.c (current_inferior_cwd): New global variable.
321 (get_inferior_cwd): New function.
322 * inferiors.h (struct process_info) <cwd>: New field.
324 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
326 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
327 (OBS): Add gdb_tilde_expand.o.
329 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
331 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
332 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
334 2017-09-29 Pedro Alves <palves@redhat.com>
336 * ax.c (gdb_parse_agent_expr): Constify.
337 * ax.h (gdb_parse_agent_expr): Constify.
338 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
340 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
341 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
342 * remote-utils.h (read_ptid): Constify.
343 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
344 (process_point_options, process_serial_event): Constify.
345 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
346 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
347 (cmd_qtbuffer): Constify.
349 2017-09-29 Pedro Alves <palves@redhat.com>
351 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
354 2017-09-29 Pedro Alves <palves@redhat.com>
356 * linux-low.c (handle_extended_wait): Pass parent thread instead
357 of process to thread_db_notice_clone.
358 * linux-low.h (thread_db_notice_clone): Replace parent process
359 parameter with parent thread parameter.
360 * thread-db.c (find_one_thread): Add comment.
361 (thread_db_notice_clone): Replace parent process parameter with
362 parent thread parameter. Temporarily switch to the parent thread.
364 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
366 * gdbthread.h: Include "common-gdbthread.h".
367 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
368 "if" when validating the ptid.
369 * remote-utils.c: Include "gdbthread.h".
370 (prepare_resume_reply): Use "switch_to_thread".
371 * target.c (done_accessing_memory): Likewise.
373 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
375 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
376 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
377 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
378 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
379 s390x-gs-linux64-ipa.o to ipa_obj.
380 * linux-s390-low.c (HWCAP_S390_GS): New define.
381 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
383 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
384 (s390_arch_setup): Check for guarded-storage support and choose
386 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
387 init_registers_s390x_gs_linux64.
388 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
390 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
391 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
393 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
395 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
397 2017-09-21 Kevin Buettner <kevinb@redhat.com>
399 * linux-low.h (struct lwp_info): Add new field, thread_handle.
400 (thread_db_thread_handle): Declare.
401 * linux-low.c (linux_target_ops): Initialize thread_handle.
402 * server.c (handle_qxfer_threads_worker): Add support for
404 * target.h (struct target_ops): Add new function pointer,
406 (target_thread_handle): Define.
407 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
409 (thread_db_thread_handle): New function.
411 2017-09-21 Kevin Buettner <kevinb@redhat.com>
413 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
414 * linux-low.h (thread_db_notice_clone): Declare.
415 * thread-db.c (thread_db_notice_clone): New function.
417 2017-09-21 Pedro Alves <palves@redhat.com>
419 * server.c (gdb_read_memory, handle_status, process_serial_event)
420 (handle_serial_event, handle_target_event): Adjust to
421 set_desired_thread prototype change.
422 * target.c (set_desired_thread): Remove 'use_general' parameter
424 * target.h (set_desired_thread): Remove 'use_general' parameter.
426 2017-09-20 Tom Tromey <tom@tromey.com>
428 * target.c (target_terminal::terminal_state): Define.
429 (target_terminal::init): Rename from target_terminal_init.
430 (target_terminal::inferior): Rename from
431 target_terminal_inferior.
432 (target_terminal::ours): Rename from target_terminal_ours.
433 (target_terminal::ours_for_output, target_terminal::info): New.
435 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
437 * server.c (accumulate_file_name_length): Remove.
438 (emit_dll_description): Adjust to std::string change.
439 (handle_qxfer_libraries): Use std::string to hold document.
441 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
443 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
444 return type of xml_escape_text.
445 * server.c (emit_dll_description): Likewise.
447 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
449 * server.c (captured_main): Accept argument for --selftest.
450 Update run_tests call.
451 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
452 when registering selftests.
454 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
456 * regcache.c (get_thread_regcache): Update code to use "std::vector"
457 instead of "VEC" for "target_desc.reg_defs".
458 (regcache_cpy): Likewise.
459 (registers_to_string): Likewise.
460 (registers_from_string): Likewise.
461 (find_regno): Likewise.
462 (supply_regblock): Likewise.
463 (regcache_raw_read_unsigned): Likewise.
464 * tdesc.c (init_target_desc): Likewise.
465 (tdesc_create_reg): Likewise.
466 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
467 (struct target_desc) <reg_defs>: Convert to "std::vector".
468 (target_desc): Do not initialize "reg_defs".
469 (~target_desc): Update code to use "std::vector" instead of "VEC"
470 for "target_desc.reg_defs".
471 (operator==): Likewise.
473 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
475 * inferiors.h (thread_to_gdb_id): Remove.
476 * inferiors.c (thread_to_gdb_id): Remove.
477 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
478 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
479 lynx_store_registers, lynx_read_memory, lynx_write_memory):
481 * nto-low.c (nto_fetch_registers, nto_store_registers,
482 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
484 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
486 * inferiors.h (gdb_id_to_thread_id): Remove.
487 * inferiors.c (gdb_id_to_thread_id): Remove.
488 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
489 removal. Move pid declaration closer to where it's used.
491 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
493 * server.c (handle_detach): New function.
494 (process_serial_event): Move code out, call handle_detach.
496 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
498 * server.c (require_running): Rename to ...
499 (require_running_or_return): ... this ...
500 (require_running_or_break): ... and this.
501 (handle_query, process_serial_event): Adjust.
503 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
505 * linux-low.c (linux_set_resume_request): Remove unused
508 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
510 * server.c (first_thread_of): Remove.
511 (process_serial_event): Replace usage of first_thread_of with
512 find_any_thread_of_pid.
513 * tracepoint.c (same_process_p): Remove.
514 (gdb_agent_about_to_close): Replace usage of same_process_p with
515 find_any_thread_of_pid.
516 * linux-x86-low.c (same_process_callback): Remove.
517 (x86_arch_setup_process_callback): Replace usage of
518 same_process_callback with find_any_thread_of_pid.
519 * thread-db.c (any_thread_of): Remove.
520 (switch_to_process): Replace usage of any_thread_of with
521 find_any_thread_of_pid.
522 * inferiors.c (thread_pid_matches_callback): Remove.
523 (find_thread_process): Adjust to use find_any_thread_of_pid.
525 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
527 * regcache.c (get_thread_regcache): Guard calls to "memset"
530 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
532 * linux-low.c (handle_extended_wait): Use
533 "allocate_target_description" instead of "XNEW".
534 * linux-x86-low.c (initialize_low_arch): Likewise.
536 2017-09-05 Yao Qi <yao.qi@linaro.org>
538 * configure.srv (srv_i386_regobj): Remove.
539 (srv_amd64_regobj): Remove.
540 (srv_regobj): Set it to "" for x86 non-linux targets.
541 * linux-x86-tdesc.c (i386_linux_read_description):
542 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
543 (init_registers_i386): Remove the declaration.
544 (tdesc_i386): Remove the declaration.
545 (lynx_i386_arch_setup): Call i386_create_target_description.
546 * nto-x86-low.c: Likewise.
547 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
548 [!__x86_64__]: include arch/i386.h.
549 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
551 2017-09-05 Yao Qi <yao.qi@linaro.org>
553 * configure.srv (srv_amd64_linux_xmlfiles): Remove
554 i386/amd64-XXX-linux from it.
556 2017-09-05 Yao Qi <yao.qi@linaro.org>
558 * configure.srv: Empty srv_amd64_linux_regobj if $development is
560 (ipa_amd64_linux_regobj): Remove.
561 (ipa_x32_linux_regobj): Remove.
563 2017-09-05 Yao Qi <yao.qi@linaro.org>
565 * Makefile.in (arch-amd64.o): New rule.
566 * configure.srv: Append arch-amd64.o.
567 * linux-amd64-ipa.c: Include common/x86-xstate.h.
568 (get_ipa_tdesc): Call amd64_linux_read_description.
569 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
570 and init_registers_amd64_XXX.
571 * linux-x86-low.c (x86_linux_read_description): Call
572 amd64_linux_read_description.
573 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
574 (initialize_low_arch): Don't call init_registers_x32_XXX and
575 init_registers_amd64_XXX.
576 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
578 [__x86_64__] (amd64_tdesc_test): New function.
579 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
580 and init_registers_amd64_XXX.
581 * linux-x86-tdesc.c: Include arch/amd64.h.
582 (xcr0_to_tdesc_idx): New function.
583 (i386_linux_read_description): New function.
584 (amd64_get_ipa_tdesc_idx): New function.
585 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
586 (amd64_get_ipa_tdesc): Declare.
588 2017-09-05 Yao Qi <yao.qi@linaro.org>
590 * configure.srv (srv_i386_linux_xmlfiles): Remove
591 i386/i386-XXX-linux.xml from it.
593 2017-09-05 Yao Qi <yao.qi@linaro.org>
595 * configure.srv: Set srv_i386_linux_regobj empty if $development
597 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
598 initialize_low_tdesc.
599 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
600 with #if initialize_low_tdesc.
601 * linux-x86-tdesc-selftest.c: New file.
602 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
604 2017-09-05 Yao Qi <yao.qi@linaro.org>
606 * Makefile.in (arch-i386.o): New rule.
607 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
608 (x86_64-*-linux*): Likewise.
609 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
611 (i386_linux_read_description): Remove code and call
612 i386_create_target_description.
613 * tdesc.c (allocate_target_description): New function.
614 * tdesc.h (set_tdesc_architecture): Remove declaration.
615 (set_tdesc_osabi): Likewise.
617 2017-09-05 Yao Qi <yao.qi@linaro.org>
619 * linux-x86-tdesc.c: Don't include <inttypes.h>.
620 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
621 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
623 * server.c (get_features_xml): Call tdesc_get_features_xml.
624 * tdesc.c (set_tdesc_architecture): New function.
625 (set_tdesc_osabi): New function.
626 (tdesc_get_features_xml): New function.
627 (tdesc_create_feature): Add an argument.
628 * tdesc.h (struct target_desc) <features>: New field.
629 <arch, osabi>: New field.
630 (~target_desc): xfree features, arch, and osabi.
631 (target_desc::oerator==): Don't compare .xmltarget.
632 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
633 (set_tdesc_osabi): Likewise.
634 (tdesc_get_features_xml): Likewise.
636 2017-09-05 Yao Qi <yao.qi@linaro.org>
638 * linux-x86-tdesc.c: Include selftest.h.
639 (i386_tdesc_test): New function.
640 (initialize_low_tdesc): Call selftests::register_test.
641 * tdesc.h: Include regdef.h.
642 (target_desc): Override operator == and !=.
644 2017-09-05 Yao Qi <yao.qi@linaro.org>
646 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
648 * linux-i386-ipa.c: Include common/x86-xstate.h
649 (get_ipa_tdesc): Call i386_linux_read_description.
650 (initialize_low_tracepoint): Don't call init_registers_XXX
651 functions, call initialize_low_tdesc instead.
652 * linux-x86-low.c (x86_linux_read_description): Call
653 i386_linux_read_description.
654 (initialize_low_arch): Don't call init_registers_i386_XXX
655 functions, call initialize_low_tdesc.
656 * linux-x86-tdesc.c: New file.
657 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
658 (i386_get_ipa_tdesc_idx): Declare.
659 (i386_get_ipa_tdesc): Declare.
660 (initialize_low_tdesc): Declare.
662 2017-09-05 Yao Qi <yao.qi@linaro.org>
664 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
667 2017-09-05 Yao Qi <yao.qi@linaro.org>
669 * Makefile.in (IPA_OBJS): Add vec-ipa.o
670 * regcache.c (get_thread_regcache): Use VEC_length.
671 (init_register_cache): Likewise.
672 (regcache_cpy): Likewise.
673 (registers_to_string): Iterate reg_defs via VEC_iterate.
674 (find_regno): Likewise.
675 (find_register_by_number): Use VEC_index.
676 (register_size): Call find_register_by_number.
677 (register_data): Call find_register_by_number.
678 (supply_regblock): Use VEC_length.
679 (regcache_raw_read_unsigned): Likewise.
680 * tdesc.c (init_target_desc): Iterate reg_defs via
682 (default_description): Update initializer.
683 (copy_target_description): Don't update field num_registers.
684 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
685 <num_registers>: Remove.
687 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
689 * Makefile.in (.SECONDARY): Define target.
691 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
693 * linux-low.c (linux_wait_1): Adjust.
694 * server.c (queue_stop_reply_callback): Adjust.
696 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
698 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
699 QEnvironmentUnset and QEnvironmentReset packets.
700 (handle_query): Inform remote that QEnvironmentHexEncoded,
701 QEnvironmentUnset and QEnvironmentReset are supported.
703 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
705 * inferiors.h (inferior_target_data): Rename to ...
706 (thread_target_data): ... this.
707 (inferior_regcache_data): Rename to ...
708 (thread_regcache_data): ... this.
709 (set_inferior_regcache_data): Rename to ...
710 (set_thread_regcache_data): ... this.
711 * inferiors.c (inferior_target_data): Rename to ...
712 (thread_target_data): ... this.
713 (inferior_regcache_data): Rename to ...
714 (thread_regcache_data): ... this.
715 (set_inferior_regcache_data): Rename to ...
716 (set_thread_regcache_data): ... this.
717 (free_one_thread): Update.
718 * linux-low.h (get_thread_lwp): Update.
719 * regcache.c (get_thread_regcache): Update.
720 (regcache_invalidate_thread): Update.
721 (free_register_cache_thread): Update.
722 * win32-i386-low.c (update_debug_registers_callback): Update.
723 (win32_get_current_dr): Update.
724 * win32-low.c (thread_rec): Update.
725 (delete_thread_info): Update.
726 (continue_one_thread): Update.
727 (suspend_one_thread): Update.
729 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
731 * inferiors.c (set_inferior_target_data): Remove.
732 * inferiors.h (set_inferior_target_data): Remove.
734 2017-08-18 Yao Qi <yao.qi@linaro.org>
736 * Makefile.in (OBS): Add selftest.o.
737 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
738 * configure, config.in: Re-generated.
739 * server.c: Include common/sefltest.h.
740 (captured_main): Handle option --selftest.
742 2017-08-09 Yao Qi <yao.qi@linaro.org>
744 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
745 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
746 i386-avx-mpx.o and i386-mmx.o.
747 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
748 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
749 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
750 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
751 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
752 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
753 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
754 i386/amd64-avx-mpx.xml.
756 2017-08-09 Yao Qi <yao.qi@linaro.org>
758 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
759 and x32-avx-avx512.o.
760 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
761 i386/x32-avx-avx512.xml.
763 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
765 * tracepoint.h (enum class fast_tpoint_collect_result): New
767 (fast_tracepoint_collecting): Change return type to
768 fast_tpoint_collect_result.
769 * tracepoint.c (fast_tracepoint_collecting): Likewise.
770 * linux-low.h: Include tracepoint.h.
771 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
772 fast_tpoint_collect_result.
773 * linux-low.c (handle_tracepoints): Adjust.
774 (linux_fast_tracepoint_collecting): Change return type to
775 fast_tpoint_collect_result.
776 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
777 linux_wait_1, stuck_in_jump_pad_callback,
778 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
779 proceed_one_lwp): Adjust to type change.
781 2017-07-10 Yao Qi <yao.qi@linaro.org>
783 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
785 2017-06-29 Yao Qi <yao.qi@linaro.org>
787 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
789 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
791 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
793 * Makefile.in (IPA_OBJS): Sort and format one item per line.
795 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
797 * linux-low.c (linux_create_inferior): Adjust code to access the
798 environment information via 'gdb_environ' class.
799 * lynx-low.c (lynx_create_inferior): Likewise.
800 * server.c (our_environ): Make it an instance of 'gdb_environ'.
801 (get_environ): Return a pointer to 'our_environ'.
802 (captured_main): Initialize 'our_environ'.
803 * server.h (get_environ): Adjust prototype.
804 * spu-low.c (spu_create_inferior): Adjust code to access the
805 environment information via 'gdb_environ' class.
807 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
809 * linux-low.c (linux_read_memory, linux_write_memory): Remove
810 usage of "register" keyword.
812 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
814 * configure: Re-generate.
816 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
818 * configure: Re-generate.
820 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
822 * Makefile.in (COMPILE.pre): Add "-x c++".
824 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
826 * fork-child.c: Conditionally include <signal.h>.
828 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
830 * server.c (handle_general_set): Handle new packet
832 (handle_query): Add "QStartupWithShell" to the list of supported
834 (gdbserver_usage): Add help text explaining the
835 new "--startup-with-shell" and "--no-startup-with-shell" CLI
837 (captured_main): Recognize and act upon the presence of the new
840 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
841 Pedro Alves <palves@redhat.com>
843 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
844 * configure: Regenerate.
845 * configure.srv (srv_linux_obj): Add "fork-child.o" and
847 (i[34567]86-*-lynxos*): Likewise.
848 (spu*-*-*): Likewise.
849 * fork-child.c: New file.
850 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
852 (linux_ptrace_fun): New function.
853 (linux_create_inferior): Adjust function prototype to reflect
854 change on "target.h". Adjust function code to use
856 (linux_request_interrupt): Delete "signal_pid".
857 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
858 (lynx_ptrace_fun): New function.
859 (lynx_create_inferior): Adjust function prototype to reflect
860 change on "target.h". Adjust function code to use
862 * nto-low.c (nto_create_inferior): Adjust function prototype and
863 code to reflect change on "target.h". Update comments.
864 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
865 "common-terminal.h" and "environ.h".
866 (terminal_fd): Moved to fork-child.c.
867 (old_foreground_pgrp): Likewise.
868 (restore_old_foreground_pgrp): Likewise.
869 (last_status): Make it global.
870 (last_ptid): Likewise.
871 (our_environ): New variable.
872 (startup_with_shell): Likewise.
873 (program_name): Likewise.
874 (program_argv): Rename to...
875 (program_args): ...this.
876 (wrapper_argv): New variable.
877 (start_inferior): Delete function.
878 (get_exec_wrapper): New function.
879 (get_exec_file): Likewise.
880 (get_environ): Likewise.
881 (prefork_hook): Likewise.
882 (post_fork_inferior): Likewise.
883 (postfork_hook): Likewise.
884 (postfork_child_hook): Likewise.
885 (handle_v_run): Update code to deal with arguments coming from the
886 remote host. Update calls from "start_inferior" to
888 (captured_main): Likewise. Initialize environment variable. Call
890 * server.h (post_fork_inferior): New prototype.
891 (get_environ): Likewise.
892 (last_status): Declare.
893 (last_ptid): Likewise.
894 (signal_pid): Likewise.
895 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
896 (spu_ptrace_fun): New function.
897 (spu_create_inferior): Adjust function prototype to reflect change
898 on "target.h". Adjust function code to use "fork_inferior".
899 * target.c (target_terminal_init): New function.
900 (target_terminal_inferior): Likewise.
901 (target_terminal_ours): Likewise.
902 * target.h: Include <vector>.
903 (struct target_ops) <create_inferior>: Update prototype.
904 (create_inferior): Update macro.
905 * utils.c (gdb_flush_out_err): New function.
906 * win32-low.c (win32_create_inferior): Adjust function prototype
907 and code to reflect change on "target.h".
909 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
911 * inferiors.c (switch_to_thread): New function.
913 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
915 * Makefile.in (SFILE): Add "common/job-control.c".
916 (OBS): Add "job-control.o".
918 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
920 * Makefile: Remove "@host_makefile_frag@".
922 2017-05-05 Pedro Alves <palves@redhat.com>
924 * configure: Regenerate.
926 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
928 * configure: Regenerate.
930 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
932 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
933 software_single_step change of return type to
934 std::vector<CORE_ADDR>.
935 * linux-low.c (install_software_single_step_breakpoints):
937 * linux-low.h (install_software_single_step_breakpoints):
940 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
942 * remote-utils.c: Include "gdb_termios.h" instead of
944 * terminal.h: Delete file.
946 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
948 * server.c: Include <vector>.
949 <program_argv, wrapper_argv>: Convert to std::vector.
950 (start_inferior): Rewrite function to use C++.
951 (handle_v_run): Likewise. Update code that calculates the argv
952 based on the vRun packet; use C++.
953 (captured_main): Likewise.
955 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
957 * server.c (handle_v_cont): Initialize thread_resume::thread
960 2017-04-05 Pedro Alves <palves@redhat.com>
962 * configure: Regenerate.
964 2017-04-05 Pedro Alves <palves@redhat.com>
966 * gdbreplay.c (sync_error): Constify.
967 * linux-x86-low.c (push_opcode): Constify.
969 2017-04-05 Pedro Alves <palves@redhat.com>
971 * win32-low.c (get_child_debug_event)
972 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
973 Report TARGET_WAITKIND_SPURIOUS instead.
975 2017-04-05 Pedro Alves <palves@redhat.com>
977 * remote-utils.c (remote_prepare, remote_open): Constify.
978 * remote-utils.h (remote_prepare, remote_open): Constify.
979 * server.c (captured_main): Constify 'port' handling.
981 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
983 * Makefile.in (clean): Clear .deps.
985 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
987 * .gitignore: Remove generated files, replace with wildcard.
988 * (clean): Replace removal of generated files with wildcard.
989 (version.c): Replace with...
990 (version-generated.c): ...this.
991 (xml-builtin.c): Replace with...
992 (xml-builtin-generated.c): ...this.
993 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
994 (%.c: *regformats*): Replace with...
995 (%-generated.c: *regformats*): ...this.
997 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
999 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1000 (xtensa_fill_gregset): Call collect_register_by_name for
1002 (xtensa_store_gregset): Call supply_register_by_name for
1005 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1007 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1008 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1009 (xtensa_store_gregset): Call supply_register for all registers in
1010 a0_regnum..a0_regnum + C0_NREGS range.
1012 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1014 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1015 (ax-ipa.o: ax.c): Remove.
1016 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1017 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1018 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1019 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1020 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1022 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1024 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1025 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1026 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1027 (errors-ipa.o: ../common/errors.c): Remove.
1028 (format-ipa.o: ../common/format.c): Remove.
1029 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1031 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1033 * Makefile.in (%-ipa.o: %.c): New rule.
1034 (tracepoint-ipa.o: tracepoint.c): Remove.
1035 (utils-ipa.o: utils.c): Remove.
1036 (remote-utils-ipa.o: remote-utils.c): Remove.
1037 (regcache-ipa.o: regcache.c): Remove.
1038 (i386-linux-ipa.o: i386-linux.c): Remove.
1039 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1040 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1041 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1042 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1043 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1044 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1045 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1046 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1047 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1048 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1049 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1050 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1051 (aarch64-ipa.o: aarch64.c): Remove.
1052 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1053 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1054 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1055 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1056 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1057 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1058 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1059 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1060 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1061 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1062 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1063 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1064 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1065 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1066 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1067 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1068 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1069 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1070 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1071 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1072 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1073 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1074 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1075 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1076 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1077 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1078 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1079 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1080 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1081 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1082 (tdesc-ipa.o: tdesc.c): Remove.
1083 (x32-linux-ipa.o: x32-linux.c): Remove.
1084 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1085 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1087 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1089 * Makefile.in (%.o: ../arch/%.c): New rule.
1090 (arm.o: ../arch/arm.c): Remove.
1091 (arm-linux.o: ../arch/arm-linux.c): Remove.
1092 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1093 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1095 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1097 * Makefile.in (%.o: ../nat/%.c): New rule.
1098 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1099 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1100 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1101 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1102 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1103 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1104 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1105 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1106 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1107 (linux-personality.o: ../nat/linux-personality.c): Remove.
1108 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1109 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1110 (x86-linux.o: ../nat/x86-linux.c): Remove.
1111 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1112 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1114 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1116 * Makefile.in (%.o: ../common/%.c): New rule.
1117 (signals.o: ../common/signals.c): Remove.
1118 (print-utils.o: ../common/print-utils.c): Remove.
1119 (rsp-low.o: ../common/rsp-low.c): Remove.
1120 (common-utils.o: ../common/common-utils.c): Remove.
1121 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1122 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1123 (vec.o: ../common/vec.c): Remove.
1124 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1125 (xml-utils.o: ../common/xml-utils.c): Remove.
1126 (ptid.o: ../common/ptid.c): Remove.
1127 (buffer.o: ../common/buffer.c): Remove.
1128 (format.o: ../common/format.c): Remove.
1129 (filestuff.o: ../common/filestuff.c): Remove.
1130 (agent.o: ../common/agent.c): Remove.
1131 (errors.o: ../common/errors.c): Remove.
1132 (environ.o: ../common/environ.c): Remove.
1133 (common-debug.o: ../common/common-debug.c): Remove.
1134 (cleanups.o: ../common/cleanups.c): Remove.
1135 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1136 (fileio.o: ../common/fileio.c): Remove.
1137 (common-regcache.o: ../common/common-regcache.c): Remove.
1138 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1139 (new-op.o: ../common/new-op.c): Remove.
1140 (btrace-common.o: ../common/btrace-common.c): Remove.
1142 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1144 * Makefile.in (%.o: ../target/%.c): New rule.
1145 (waitstatus.o: ../target/waitstatus.c): Remove.
1147 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1150 (%.c: ../regformats/%.dat,
1151 (%.c: ../regformats/arm/%.dat,
1152 (%.c: ../regformats/i386/%.dat,
1153 (%.c: ../regformats/rs6000/%.dat): New rules.
1154 (aarch64.c): Remove.
1155 (reg-arm.c): Remove.
1156 (arm-with-iwmmxt.c): Remove.
1157 (arm-with-vfpv2.c): Remove.
1158 (arm-with-vfpv3.c): Remove.
1159 (arm-with-neon.c): Remove.
1160 (reg-bfin.c): Remove.
1161 (reg-cris.c): Remove.
1162 (reg-crisv32.c): Remove.
1164 (i386-linux.c): Remove.
1165 (i386-avx.c): Remove.
1166 (i386-avx-linux.c): Remove.
1167 (i386-avx-avx512.c): Remove.
1168 (i386-avx-avx512-linux.c): Remove.
1169 (i386-mpx.c): Remove.
1170 (i386-mpx-linux.c): Remove.
1171 (i386-avx-mpx-avx512-pku.c): Remove.
1172 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1173 (i386-avx-mpx.c): Remove.
1174 (i386-avx-mpx-linux.c): Remove.
1175 (i386-mmx.c): Remove.
1176 (i386-mmx-linux.c): Remove.
1177 (reg-ia64.c): Remove.
1178 (reg-m32r.c): Remove.
1179 (reg-m68k.c): Remove.
1181 (mips-linux.c): Remove.
1182 (mips-dsp-linux.c): Remove.
1183 (mips64-linux.c): Remove.
1184 (mips64-dsp-linux.c): Remove.
1185 (nios2-linux.c): Remove.
1186 (powerpc-32.c): Remove.
1187 (powerpc-32l.c): Remove.
1188 (powerpc-altivec32l.c): Remove.
1189 (powerpc-cell32l.c): Remove.
1190 (powerpc-vsx32l.c): Remove.
1191 (powerpc-isa205-32l.c): Remove.
1192 (powerpc-isa205-altivec32l.c): Remove.
1193 (powerpc-isa205-vsx32l.c): Remove.
1194 (powerpc-e500l.c): Remove.
1195 (powerpc-64l.c): Remove.
1196 (powerpc-altivec64l.c): Remove.
1197 (powerpc-cell64l.c): Remove.
1198 (powerpc-vsx64l.c): Remove.
1199 (powerpc-isa205-64l.c): Remove.
1200 (powerpc-isa205-altivec64l.c): Remove.
1201 (powerpc-isa205-vsx64l.c): Remove.
1202 (s390-linux32.c): Remove.
1203 (s390-linux32v1.c): Remove.
1204 (s390-linux32v2.c): Remove.
1205 (s390-linux64.c): Remove.
1206 (s390-linux64v1.c): Remove.
1207 (s390-linux64v2.c): Remove.
1208 (s390-te-linux64.c): Remove.
1209 (s390-vx-linux64.c): Remove.
1210 (s390-tevx-linux64.c): Remove.
1211 (s390x-linux64.c): Remove.
1212 (s390x-linux64v1.c): Remove.
1213 (s390x-linux64v2.c): Remove.
1214 (s390x-te-linux64.c): Remove.
1215 (s390x-vx-linux64.c): Remove.
1216 (s390x-tevx-linux64.c): Remove.
1217 (tic6x-c64xp-linux.c): Remove.
1218 (tic6x-c64x-linux.c): Remove.
1219 (tic6x-c62x-linux.c): Remove.
1221 (reg-sparc64.c): Remove.
1222 (reg-spu.c): Remove.
1224 (amd64-linux.c): Remove.
1225 (amd64-avx.c): Remove.
1226 (amd64-avx-linux.c): Remove.
1227 (amd64-avx-avx512.c): Remove.
1228 (amd64-avx-avx512-linux.c): Remove.
1229 (amd64-mpx.c): Remove.
1230 (amd64-mpx-linux.c): Remove.
1231 (amd64-avx-mpx-avx512-pku.c): Remove.
1232 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1233 (amd64-avx-mpx.c): Remove.
1234 (amd64-avx-mpx-linux.c): Remove.
1236 (x32-linux.c): Remove.
1237 (x32-avx.c): Remove.
1238 (x32-avx-linux.c): Remove.
1239 (x32-avx-avx512.c): Remove.
1240 (x32-avx-avx512-linux.c): Remove.
1241 (reg-xtensa.c): Remove.
1242 (reg-tilegx.c): Remove.
1243 (reg-tilegx32.c): Remove.
1245 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1247 * Makefile.in (SFILES): Add "common/environ.c".
1248 (OBJS): Add "common/environ.h".
1250 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1252 * configure.ac: Check if the fs_base and gs_base members of
1253 `struct user_regs_struct' exist.
1254 * config.in: Regenerated.
1255 * configure: Likewise.
1257 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1259 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1261 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1262 (get_next_pcs_syscall_next_pc): Likewise.
1264 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1266 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1267 * nto-x86-low.c: Likewise.
1269 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1271 * Makefile.in: Include disable-implicit-rules.mk.
1273 2016-11-23 Pedro Alves <palves@redhat.com>
1275 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1276 (debug_vprintf): Use std::chrono::steady_clock instead of
1277 gettimeofday. Use '.' instead of ':'.
1278 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1279 (get_timestamp): Use std::chrono::steady_clock instead of
1282 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1284 * Makefile.in: Fix whitespace formatting.
1286 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1288 * Makefile.in (SFILES, OBS): Flatten list and order
1291 2016-11-23 Pedro Alves <palves@redhat.com>
1293 * event-loop.c (handle_file_event): Use warning.
1294 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1295 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1298 2016-11-23 Pedro Alves <palves@redhat.com>
1300 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1302 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1303 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1304 debug_printf and debug_flush for debug output.
1305 * server.c (handle_general_set): Likewise.
1306 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1309 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1311 * Makefile.in (.c.o): Replace rule with ...
1312 (%.o: %.c): ... this one.
1314 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1316 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1317 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1319 * configure.ac: Remove checks for the make program.
1320 * configure: Re-generate.
1322 2016-10-28 Pedro Alves <palves@redhat.com>
1324 * Makefile.in (CXX_DIALECT): Get from configure.
1325 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1326 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1327 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1328 * config.in: Regenerate.
1329 * configure: Regenerate.
1331 2016-10-27 Yao Qi <yao.qi@linaro.org>
1333 * linux-low.c (linux_supports_range_stepping): Return true if
1334 can_software_single_step return true.
1336 2016-10-27 Yao Qi <yao.qi@linaro.org>
1338 * inferiors.c (find_inferior_in_random): New function.
1339 * inferiors.h (find_inferior_in_random): Declare.
1340 * linux-low.c (linux_wait_for_event_filtered): Call
1341 find_inferior_in_random instead of find_inferior.
1343 2016-10-27 Yao Qi <yao.qi@linaro.org>
1345 * linux-low.c (linux_wait_1): If single-step breakpoints are
1346 inserted, remove them.
1348 2016-10-26 Pedro Alves <palves@redhat.com>
1350 * linux-low.c (handle_extended_wait): Link parent/child fork
1352 (linux_wait_1): Unlink them.
1353 (linux_set_resume_request): Ignore resume requests for
1354 already-resumed and unhandled fork child threads.
1355 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1356 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1358 (handle_v_requests) <vCont>: Don't call require_running.
1359 * server.h (in_queued_stop_replies): New declaration.
1361 2016-10-24 Yao Qi <yao.qi@linaro.org>
1364 * linux-aarch64-low.c (append_insns): Cast the return value to
1367 2016-10-10 Yao Qi <yao.qi@linaro.org>
1369 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1371 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1373 * target.c (target_supports_multi_process): New function, moved
1375 * target.h (target_supports_multi_process): ... here. Remove
1378 2016-10-05 Tom Tromey <tom@tromey.com>
1381 * tracepoint.c (handle_tracepoint_bkpts): Check
1382 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1384 2016-10-05 Yao Qi <yao.qi@linaro.org>
1386 * configure.srv: Update the path of arm-*.xml files.
1388 2016-10-05 Terry Guo <terry.guo@arm.com>
1389 Yao Qi <yao.qi@linaro.org>
1391 * Makefile.in: Adjust the path of rules.
1392 * configure.srv: Update the path of xml files.
1393 * regformats/arm-with-iwmmxt.dat: Regenerated.
1394 * regformats/arm-with-neon.dat: Likewise.
1395 * regformats/arm-with-vfpv2.dat: Likewise.
1396 * regformats/arm-with-vfpv3.dat Likewise.
1398 2016-09-30 Yao Qi <yao.qi@linaro.org>
1401 * target.c (target_stop_and_wait): Don't call
1402 target_continue_no_signal, use resume_stop instead.
1404 2016-09-26 Yao Qi <yao.qi@linaro.org>
1406 * linux-low.c (linux_wait_1): Call debug_exit.
1408 2016-09-23 Pedro Alves <palves@redhat.com>
1410 * Makefile.in (SFILES): Add common/new-op.c.
1411 (OBS): Add common/new-op.o.
1412 (new-op.o): New rule.
1414 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1416 * .gitinore: Ignore more files.
1418 2016-09-21 Yao Qi <yao.qi@linaro.org>
1420 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1423 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1425 * server.c (start_inferior): Call target_mourn_inferior instead of
1426 mourn_inferior; pass ptid_t argument to it.
1428 (handle_target_event): Likewise.
1429 * target.c (target_mourn_inferior): New function.
1430 * target.h (mourn_inferior): Delete macro.
1432 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1434 * linux-low.c (lwp_is_stepping): New function.
1436 2016-09-06 Carl Love <cel@us.ibm.com>
1438 * server.c (start_inferior): Fixed comment, requested comment change
1439 didn't get updated correctly. Removed reference to ptrace () call as
1440 it is only true on Linux systems.
1442 2016-09-06 Carl Love <cel@us.ibm.com>
1444 * server.c (start_inferior): Do not call
1445 function target_post_create_inferior () if the
1446 inferior process has already exited.
1448 2016-09-05 Pedro Alves <palves@redhat.com>
1450 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1451 (COMPILE.pre, CC_LD): Use CXX directly.
1452 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1453 * acinclude.m4: Don't include build-with-cxx.m4.
1454 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1455 * configure: Regenerate.
1457 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1460 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1461 call writing data to own_buf.
1463 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1465 * target.c (mywait): Call target_wait instead of
1467 (target_wait): New function.
1469 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1471 * server.c (start_inferior): New variable 'ptid'. Replace calls
1472 to the_target->resume by target_continue{,_no_signal}, depending
1474 * target.c (target_stop_and_wait): Call target_continue_no_signal
1475 instead of the_target->resume.
1476 (target_continue): New function.
1478 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1480 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1482 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1485 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1487 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1488 * linux-arm-low.c (ps_get_thread_area): Likewise.
1489 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1490 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1491 * linux-mips-low.c (ps_get_thread_area): Likewise.
1492 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1493 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1494 * linux-x86-low.c (ps_get_thread_area): Likewise.
1495 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1497 2016-08-19 Pedro Alves <palves@redhat.com>
1499 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1501 2016-08-19 Pedro Alves <palves@redhat.com>
1503 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1504 comment. Use memcpy instead of casting through unsigned long.
1506 2016-08-19 Pedro Alves <palves@redhat.com>
1508 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1509 allocating around 0x80000000.
1511 2016-08-19 Pedro Alves <palves@redhat.com>
1514 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1515 (x32-avx512-linux-ipa.o): New rules.
1516 * configure.ac (x86_64-*-linux*): New x32 check.
1517 * configure.srv (ipa_x32_linux_regobj): New.
1518 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1519 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1521 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1523 * configure: Regenerate.
1525 2016-08-09 Pedro Alves <palves@redhat.com>
1528 * Makefile.in (OBS): Add signals-state-save-restore.o.
1529 (signals-state-save-restore.o): New rule.
1530 * config.in: Regenerate.
1531 * configure: Regenerate.
1532 * linux-low.c: Include "signals-state-save-restore.h".
1533 (linux_create_inferior): Call
1534 restore_original_signals_state.
1535 * server.c: Include "dispositions-save-restore.h".
1536 (captured_main): Call save_original_signals_state.
1538 2016-08-05 Pedro Alves <palves@redhat.com>
1540 * configure: Regenerate.
1542 2016-08-04 Yao Qi <yao.qi@linaro.org>
1544 * linux-low.c (regsets_fetch_inferior_registers): Check
1545 errno is ESRCH or not.
1547 2016-08-02 Yao Qi <yao.qi@linaro.org>
1549 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1550 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1551 (thread_db_load_search): Update.
1552 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1553 td_ta_set_event and td_ta_event_getmsg.
1555 2016-07-26 Pedro Alves <palves@redhat.com>
1558 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1559 of unsigned long for 64-bit registers and use uint32_t instead of
1560 unsigned int for 32-bit registers.
1562 2016-07-26 Pedro Alves <palves@redhat.com>
1564 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1567 2016-07-21 Tom Tromey <tom@tromey.com>
1569 * configure: Rebuild.
1571 2016-07-21 Yao Qi <yao.qi@linaro.org>
1573 * mem-break.c (find_gdb_breakpoint): Cast bp to
1574 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1576 2016-07-21 Yao Qi <yao.qi@linaro.org>
1578 * server.c (handle_v_requests): Support s and S actions
1579 if target_supports_software_single_step return true.
1581 2016-07-21 Yao Qi <yao.qi@linaro.org>
1583 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1584 is resume_step, call maybe_hw_step.
1585 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1587 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1589 (proceed_one_lwp): If resume request is resume_step, install
1590 reinsert breakpoints and call maybe_hw_step.
1592 2016-07-21 Yao Qi <yao.qi@linaro.org>
1594 * linux-low.c (proceed_one_lwp): Declare.
1595 (linux_resume_one_thread): Remove local variable 'step'.
1596 Lift code enqueue signal. Call proceed_one_lwp instead of
1597 linux_resume_one_lwp.
1599 2016-07-21 Yao Qi <yao.qi@linaro.org>
1601 * linux-low.c (linux_resume_one_thread): Call
1602 enqueue_pending_signal.
1604 2016-07-21 Yao Qi <yao.qi@linaro.org>
1606 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1607 * inferiors.c (do_restore_current_thread_cleanup): New function.
1608 (make_cleanup_restore_current_thread): Likewise.
1609 * linux-low.c (install_software_single_step_breakpoints): Call
1610 make_cleanup_restore_current_thread. Switch current_thread to
1613 2016-07-21 Yao Qi <yao.qi@linaro.org>
1615 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1616 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1617 (clone_one_breakpoint): Likewise.
1618 (delete_reinsert_breakpoints): Change parameter to thread.
1620 (has_reinsert_breakpoints): Likewise.
1621 (uninsert_reinsert_breakpoints): Likewise.
1622 (reinsert_reinsert_breakpoints): Likewise.
1623 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1624 (delete_reinsert_breakpoints): Likewise.
1625 (reinsert_reinsert_breakpoints): Likewise.
1626 (uninsert_reinsert_breakpoints): Likewise.
1627 (has_reinsert_breakpoints): Likewise.
1629 2016-07-21 Yao Qi <yao.qi@linaro.org>
1631 * inferiors.c (get_thread_process): Make parameter const.
1632 * inferiors.h (get_thread_process): Update declaration.
1633 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1634 Add new parameters child_thread and parent_thread. Callers
1636 * mem-break.h (clone_all_breakpoints): Update declaration.
1638 2016-07-21 Yao Qi <yao.qi@linaro.org>
1640 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1641 <command_list, handler>: Remove.
1642 (struct gdb_breakpoint): New.
1643 (struct other_breakpoint): New.
1644 (struct reinsert_breakpoint): New.
1645 (is_gdb_breakpoint): New function.
1646 (any_persistent_commands): Update command_list if
1647 is_gdb_breakpoint returns true.
1648 (set_breakpoint): Create breakpoints according to their types.
1649 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1650 (set_gdb_breakpoint_1): Likewise.
1651 (set_gdb_breakpoint): Likewise.
1652 (clear_breakpoint_conditions): Change parameter type to
1653 'struct gdb_breakpoint *'.
1654 (clear_breakpoint_commands): Likewise.
1655 (clear_breakpoint_conditions_and_commands): Likewise.
1656 (add_condition_to_breakpoint): Likewise.
1657 (add_breakpoint_condition): Likewise.
1658 (add_commands_to_breakpoint): Likewise.
1659 (check_breakpoints): Check other_breakpoint.
1660 (clone_one_breakpoint): Clone breakpopint according to its type.
1661 * mem-break.h (struct gdb_breakpoint): Declare.
1662 (set_gdb_breakpoint): Update declaration.
1663 (clear_breakpoint_conditions_and_commands): Likewise.
1664 (add_breakpoint_condition): Likewise.
1665 (add_breakpoint_commands): Likewise.
1666 * server.c (process_point_options): Change parameter type to
1667 'struct gdb_breakpoint *'.
1669 2016-07-21 Yao Qi <yao.qi@linaro.org>
1671 * mem-break.c (set_breakpoint_at): Rename it to ...
1672 (set_breakpoint_type_at): ... it.
1673 (set_breakpoint_at): Call set_breakpoint_type_at.
1674 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1675 * mem-break.h (set_breakpoint_at): Update comments.
1677 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1679 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1681 (nios2_store_gregset): Likewise.
1683 2016-07-01 Pedro Alves <palves@redhat.com>
1684 Antoine Tremblay <antoine.tremblay@ericsson.com>
1686 * linux-low.c: Change interface to take the target lwp_info
1687 pointer directly and return void. Handle detaching from a zombie
1689 (linux_detach_lwp_callback): New function.
1690 (linux_detach): Detach from the leader thread after detaching from
1693 2016-06-28 Yao Qi <yao.qi@linaro.org>
1695 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1696 for variable new_offset.
1697 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1698 (aarch64_ftrace_insn_reloc_cb): Likewise.
1699 (aarch64_ftrace_insn_reloc_tb): Likewise.
1700 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1701 PRIx64 instead of PRIx32.
1703 2016-06-28 Yao Qi <yao.qi@linaro.org>
1705 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1706 (the_low_target): Install arm_get_syscall_trapinfo.
1708 2016-06-28 Yao Qi <yao.qi@linaro.org>
1710 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1712 (the_low_target): Install aarch64_get_syscall_trapinfo.
1714 2016-06-28 Yao Qi <yao.qi@linaro.org>
1716 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1718 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1719 Remove parameter sysno.
1720 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1723 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1725 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1726 (s390_emit_ne_goto): Likewise.
1727 (s390_emit_lt_goto): Likewise.
1728 (s390_emit_le_goto): Likewise.
1729 (s390_emit_gt_goto): Likewise.
1730 (s390_emit_ge_goto): Likewise.
1731 (s390x_emit_eq_goto): Likewise.
1732 (s390x_emit_ne_goto): Likewise.
1733 (s390x_emit_lt_goto): Likewise.
1734 (s390x_emit_le_goto): Likewise.
1735 (s390x_emit_gt_goto): Likewise.
1736 (s390x_emit_ge_goto): Likewise.
1737 (s390_emit_ops_impl): Mark variable static.
1738 (s390x_emit_ops): Likewise.
1740 2016-06-17 Yao Qi <yao.qi@linaro.org>
1742 * linux-low.c (handle_extended_wait): Call
1743 uninsert_reinsert_breakpoints for the parent process. Remove
1744 reinsert breakpoints from the child process. Reinsert them to
1745 the parent process when vfork is done.
1746 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1747 (reinsert_reinsert_breakpoints): New function.
1748 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1749 (reinsert_reinsert_breakpoints): Declare.
1751 2016-06-17 Yao Qi <yao.qi@linaro.org>
1753 * linux-low.c (handle_extended_wait): If the parent is doing
1754 step-over, remove the reinsert breakpoints from the forked child.
1756 2016-06-17 Yao Qi <yao.qi@linaro.org>
1758 * linux-low.c (unsuspend_all_lwps): Declare.
1759 (linux_low_filter_event): If thread exited, call finish_step_over.
1760 If step-over is finished, unsuspend other threads.
1762 2016-06-17 Yao Qi <yao.qi@linaro.org>
1764 * linux-low.c (linux_resume_one_lwp_throw): Assert
1765 has_reinsert_breakpoints returns false.
1766 * mem-break.c (delete_disabled_breakpoints): Assert
1767 bp type isn't reinsert_breakpoint.
1769 2016-06-17 Yao Qi <yao.qi@linaro.org>
1771 * linux-low.c (maybe_hw_step): New function.
1772 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1773 (finish_step_over): Switch current_thread to lwp temporarily,
1774 and assert has_reinsert_breakpoints returns true.
1775 (proceed_one_lwp): Call maybe_hw_step.
1776 * mem-break.c (has_reinsert_breakpoints): New function.
1777 * mem-break.h (has_reinsert_breakpoints): Declare.
1779 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1781 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1783 2016-05-17 Yao Qi <yao.qi@linaro.org>
1785 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1786 instead of find_inferior.
1788 2016-05-05 Yao Qi <yao.qi@linaro.org>
1790 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1791 Initialize res to zero.
1793 2016-05-05 Yao Qi <yao.qi@linaro.org>
1795 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1798 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1800 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1801 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1802 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1804 2016-04-28 Par Olsson <par.olsson@windriver.com>
1805 Simon Marchi <simon.marchi@ericsson.com>
1807 * tracepoint.c (write_inferior_int8): New function.
1808 (cmd_qtenable_disable): Write enable flag using
1809 write_inferior_int8.
1811 2016-04-25 Yao Qi <yao.qi@linaro.org>
1813 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1814 (need_step_over_p): Return zero if the LWP has pending signals
1815 can be delivered on software single step target.
1817 2016-04-25 Yao Qi <yao.qi@linaro.org>
1819 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1820 return instead of error.
1822 2016-04-22 Yao Qi <yao.qi@linaro.org>
1824 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1827 2016-04-22 Yao Qi <yao.qi@linaro.org>
1829 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1830 signal when stepping over breakpoint with software single
1833 2016-04-21 Pedro Alves <palves@redhat.com>
1835 * linux-s390-low.c (s390_collect_ptrace_register)
1836 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1838 (s390_check_regset): Use void * instead of gdb_byte *.
1840 2016-04-20 Pedro Alves <palves@redhat.com>
1842 * configure: Renegerate.
1844 2016-04-20 Yao Qi <yao.qi@linaro.org>
1846 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1847 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1849 (arm_store_gregset): Likewise.
1851 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1853 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1854 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1855 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1856 (amd64-avx-mpx-linux.c): New rules.
1857 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1858 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1859 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1860 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1861 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1862 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1863 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1864 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1865 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1866 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1867 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1868 * linux-x86-low.c (x86_linux_read_description): Add case for
1869 X86_XSTATE_AVX_MPX_MASK.
1870 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1871 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1872 init_registers_i386_avx_mpx_linux.
1873 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1874 (initialize_low_tracepoint): Call
1875 init_registers_i386_avx_mpx_linux.
1876 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1877 (initialize_low_tracepoint): Call
1878 init_registers_amd64_avx_mpx_linux.
1879 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1880 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1881 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1884 2016-04-18 Pedro Alves <palves@redhat.com>
1886 * configure: Regenerate.
1888 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1890 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1891 (aarch64_emit_sub): Likewise.
1893 2016-04-12 Pedro Alves <palves@redhat.com>
1895 * utils.c (prepare_to_throw_exception): Delete.
1897 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1899 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1901 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1903 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1905 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1907 * linux-aarch64-ipa.c: Add <elf.h> include.
1908 * linux-ppc-ipa.c: Add <elf.h> include.
1909 * linux-s390-ipa.c: Add <elf.h> include.
1911 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1913 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1914 (get_raw_reg_ptr): Likewise.
1915 (get_trace_state_variable_value_ptr): Likewise.
1916 (set_trace_state_variable_value_ptr): Likewise.
1917 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1920 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1921 Marcin Kościelnicki <koriakin@0x04.net>
1924 * linux-ppc-low.c (emit_insns): New function.
1925 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1926 (ppc_emit_prologue): New function.
1927 (ppc_emit_epilogue): New function.
1928 (ppc_emit_add): New function.
1929 (ppc_emit_sub): New function.
1930 (ppc_emit_mul): New function.
1931 (ppc_emit_lsh): New function.
1932 (ppc_emit_rsh_signed): New function.
1933 (ppc_emit_rsh_unsigned): New function.
1934 (ppc_emit_ext): New function.
1935 (ppc_emit_zero_ext): New function.
1936 (ppc_emit_log_not): New function.
1937 (ppc_emit_bit_and): New function.
1938 (ppc_emit_bit_or): New function.
1939 (ppc_emit_bit_xor): New function.
1940 (ppc_emit_bit_not): New function.
1941 (ppc_emit_equal): New function.
1942 (ppc_emit_less_signed): New function.
1943 (ppc_emit_less_unsigned): New function.
1944 (ppc_emit_ref): New function.
1945 (ppc_emit_const): New function.
1946 (ppc_emit_reg): New function.
1947 (ppc_emit_pop): New function.
1948 (ppc_emit_stack_flush): New function.
1949 (ppc_emit_swap): New function.
1950 (ppc_emit_stack_adjust): New function.
1951 (ppc_emit_call): New function.
1952 (ppc_emit_int_call_1): New function.
1953 (ppc_emit_void_call_2): New function.
1954 (ppc_emit_if_goto): New function.
1955 (ppc_emit_goto): New function.
1956 (ppc_emit_eq_goto): New function.
1957 (ppc_emit_ne_goto): New function.
1958 (ppc_emit_lt_goto): New function.
1959 (ppc_emit_le_goto): New function.
1960 (ppc_emit_gt_goto): New function.
1961 (ppc_emit_ge_goto): New function.
1962 (ppc_write_goto_address): New function.
1963 (ppc_emit_ops_impl): New static variable.
1964 (ppc64v1_emit_prologue): New function.
1965 (ppc64v2_emit_prologue): New function.
1966 (ppc64_emit_epilogue): New function.
1967 (ppc64_emit_add): New function.
1968 (ppc64_emit_sub): New function.
1969 (ppc64_emit_mul): New function.
1970 (ppc64_emit_lsh): New function.
1971 (ppc64_emit_rsh_signed): New function.
1972 (ppc64_emit_rsh_unsigned): New function.
1973 (ppc64_emit_ext): New function.
1974 (ppc64_emit_zero_ext): New function.
1975 (ppc64_emit_log_not): New function.
1976 (ppc64_emit_bit_and): New function.
1977 (ppc64_emit_bit_or): New function.
1978 (ppc64_emit_bit_xor): New function.
1979 (ppc64_emit_bit_not): New function.
1980 (ppc64_emit_equal): New function.
1981 (ppc64_emit_less_signed): New function.
1982 (ppc64_emit_less_unsigned): New function.
1983 (ppc64_emit_ref): New function.
1984 (ppc64_emit_const): New function.
1985 (ppc64v1_emit_reg): New function.
1986 (ppc64v2_emit_reg): New function.
1987 (ppc64_emit_pop): New function.
1988 (ppc64_emit_stack_flush): New function.
1989 (ppc64_emit_swap): New function.
1990 (ppc64v1_emit_call): New function.
1991 (ppc64v2_emit_call): New function.
1992 (ppc64v1_emit_int_call_1): New function.
1993 (ppc64v2_emit_int_call_1): New function.
1994 (ppc64v1_emit_void_call_2): New function.
1995 (ppc64v2_emit_void_call_2): New function.
1996 (ppc64_emit_if_goto): New function.
1997 (ppc64_emit_eq_goto): New function.
1998 (ppc64_emit_ne_goto): New function.
1999 (ppc64_emit_lt_goto): New function.
2000 (ppc64_emit_le_goto): New function.
2001 (ppc64_emit_gt_goto): New function.
2002 (ppc64_emit_ge_goto): New function.
2003 (ppc64v1_emit_ops_impl): New static variable.
2004 (ppc64v2_emit_ops_impl): New static variable.
2005 (ppc_emit_ops): New function.
2006 (linux_low_target): Wire in ppc_emit_ops.
2008 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2009 Marcin Kościelnicki <koriakin@0x04.net>
2012 * Makefile.in: Add powerpc-*-ipa.o
2013 * configure.srv: Add ipa_obj for powerpc*-linux.
2014 * linux-ppc-ipa.c: New file.
2015 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2017 (PPC_FIELD): New macro.
2018 (PPC_SEXT): New macro.
2019 (PPC_OP6): New macro.
2020 (PPC_BO): New macro.
2021 (PPC_LI): New macro.
2022 (PPC_BD): New macro.
2023 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2024 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2025 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2026 (ppc_get_thread_area): New function.
2027 (is_elfv2_inferior): New function.
2028 (gen_ds_form): New function.
2029 (GEN_STD): New macro.
2030 (GEN_STDU): New macro.
2031 (GEN_LD): New macro.
2032 (GEN_LDU): New macro.
2033 (gen_d_form): New function.
2034 (GEN_ADDI): New macro.
2035 (GEN_ADDIS): New macro.
2036 (GEN_LI): New macro.
2037 (GEN_LIS): New macro.
2038 (GEN_ORI): New macro.
2039 (GEN_ORIS): New macro.
2040 (GEN_LWZ): New macro.
2041 (GEN_STW): New macro.
2042 (GEN_STWU): New macro.
2043 (gen_xfx_form): New function.
2044 (GEN_MFSPR): New macro.
2045 (GEN_MTSPR): New macro.
2046 (GEN_MFCR): New macro.
2047 (GEN_MTCR): New macro.
2048 (GEN_SYNC): New macro.
2049 (GEN_LWSYNC): New macro.
2050 (gen_x_form): New function.
2051 (GEN_OR): New macro.
2052 (GEN_MR): New macro.
2053 (GEN_LWARX): New macro.
2054 (GEN_STWCX): New macro.
2055 (GEN_CMPW): New macro.
2056 (gen_md_form): New function.
2057 (GEN_RLDICL): New macro.
2058 (GEN_RLDICR): New macro.
2059 (gen_i_form): New function.
2061 (GEN_BL): New macro.
2062 (gen_b_form): New function.
2063 (GEN_BNE): New macro.
2064 (GEN_LOAD): New macro.
2065 (GEN_STORE): New macro.
2066 (gen_limm): New function.
2067 (gen_atomic_xchg): New function.
2068 (gen_call): New function.
2069 (ppc_relocate_instruction): New function.
2070 (ppc_install_fast_tracepoint_jump_pad): New function.
2071 (ppc_get_min_fast_tracepoint_insn_len): New function.
2072 (ppc_get_ipa_tdesc_idx): New function.
2073 (the_low_target): Wire in the new functions.
2074 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2076 * linux-ppc-tdesc.h: New file.
2078 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2080 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2081 (alloc_jump_pad_buffer): New function.
2082 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2083 (alloc_jump_pad_buffer): New function.
2084 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2085 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2086 (alloc_jump_pad_buffer): New function.
2087 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2088 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2089 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2090 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2092 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2094 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2095 * linux-amd64-ipa.c: Likewise.
2096 * linux-i386-ipa.c: Likewise.
2097 * linux-s390-ipa.c: Likewise.
2098 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2099 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2100 set_trace_state_variable_value_ptr.
2101 (struct ipa_sym_addresses): Likewise.
2102 (symbol_list): Likewise.
2103 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2104 accessing gdb_collect directly.
2105 (gdb_collect_ptr_type): New typedef.
2106 (get_raw_reg_ptr_type): New typedef.
2107 (get_trace_state_variable_value_ptr_type): New typedef.
2108 (set_trace_state_variable_value_ptr_type): New typedef.
2109 (gdb_collect_ptr): New global.
2110 (get_raw_reg_ptr): New global.
2111 (get_trace_state_variable_value_ptr): New global.
2112 (set_trace_state_variable_value_ptr): New global.
2113 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2114 accessing get_raw_reg directly.
2115 (get_get_tsv_func_addr): Likewise for
2116 get_trace_state_variable_value_ptr.
2117 (get_set_tsv_func_addr): Likewise for
2118 set_trace_state_variable_value_ptr.
2119 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2121 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2123 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2125 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2127 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2129 (relocate_instruction): Remove own_buf.
2130 * server.c (own_buf): Make global.
2131 (handle_v_requests): Make global.
2132 * server.h (own_buf): New declaration.
2133 (handle_v_requests): New prototype.
2135 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2138 * linux-s390-low.c (add_insns): New function.
2139 (s390_emit_prologue): New function.
2140 (s390_emit_epilogue): New function.
2141 (s390_emit_add): New function.
2142 (s390_emit_sub): New function.
2143 (s390_emit_mul): New function.
2144 (s390_emit_lsh): New function.
2145 (s390_emit_rsh_signed): New function.
2146 (s390_emit_rsh_unsigned): New function.
2147 (s390_emit_ext): New function.
2148 (s390_emit_log_not): New function.
2149 (s390_emit_bit_and): New function.
2150 (s390_emit_bit_or): New function.
2151 (s390_emit_bit_xor): New function.
2152 (s390_emit_bit_not): New function.
2153 (s390_emit_equal): New function.
2154 (s390_emit_less_signed): New function.
2155 (s390_emit_less_unsigned): New function.
2156 (s390_emit_ref): New function.
2157 (s390_emit_if_goto): New function.
2158 (s390_emit_goto): New function.
2159 (s390_write_goto_address): New function.
2160 (s390_emit_litpool): New function.
2161 (s390_emit_const): New function.
2162 (s390_emit_call): New function.
2163 (s390_emit_reg): New function.
2164 (s390_emit_pop): New function.
2165 (s390_emit_stack_flush): New function.
2166 (s390_emit_zero_ext): New function.
2167 (s390_emit_swap): New function.
2168 (s390_emit_stack_adjust): New function.
2169 (s390_emit_set_r2): New function.
2170 (s390_emit_int_call_1): New function.
2171 (s390_emit_void_call_2): New function.
2172 (s390_emit_eq_goto): New function.
2173 (s390_emit_ne_goto): New function.
2174 (s390_emit_lt_goto): New function.
2175 (s390_emit_le_goto): New function.
2176 (s390_emit_gt_goto): New function.
2177 (s390_emit_ge_goto): New function.
2178 (s390x_emit_prologue): New function.
2179 (s390x_emit_epilogue): New function.
2180 (s390x_emit_add): New function.
2181 (s390x_emit_sub): New function.
2182 (s390x_emit_mul): New function.
2183 (s390x_emit_lsh): New function.
2184 (s390x_emit_rsh_signed): New function.
2185 (s390x_emit_rsh_unsigned): New function.
2186 (s390x_emit_ext): New function.
2187 (s390x_emit_log_not): New function.
2188 (s390x_emit_bit_and): New function.
2189 (s390x_emit_bit_or): New function.
2190 (s390x_emit_bit_xor): New function.
2191 (s390x_emit_bit_not): New function.
2192 (s390x_emit_equal): New function.
2193 (s390x_emit_less_signed): New function.
2194 (s390x_emit_less_unsigned): New function.
2195 (s390x_emit_ref): New function.
2196 (s390x_emit_if_goto): New function.
2197 (s390x_emit_const): New function.
2198 (s390x_emit_call): New function.
2199 (s390x_emit_reg): New function.
2200 (s390x_emit_pop): New function.
2201 (s390x_emit_stack_flush): New function.
2202 (s390x_emit_zero_ext): New function.
2203 (s390x_emit_swap): New function.
2204 (s390x_emit_stack_adjust): New function.
2205 (s390x_emit_int_call_1): New function.
2206 (s390x_emit_void_call_2): New function.
2207 (s390x_emit_eq_goto): New function.
2208 (s390x_emit_ne_goto): New function.
2209 (s390x_emit_lt_goto): New function.
2210 (s390x_emit_le_goto): New function.
2211 (s390x_emit_gt_goto): New function.
2212 (s390x_emit_ge_goto): New function.
2213 (s390_emit_ops): New function.
2214 (struct linux_target_ops): Fill in emit_ops hook.
2216 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2219 * Makefile.in: Add s390 IPA files.
2220 * configure.srv: Build IPA for s390.
2221 * linux-s390-ipa.c: New file.
2222 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2223 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2224 (tdesc_s390_linux32): Likewise.
2225 (init_registers_s390_linux32v1): Likewise.
2226 (tdesc_s390_linux32v1): Likewise.
2227 (init_registers_s390_linux32v2): Likewise.
2228 (tdesc_s390_linux32v2): Likewise.
2229 (init_registers_s390_linux64): Likewise.
2230 (tdesc_s390_linux64): Likewise.
2231 (init_registers_s390_linux64v1): Likewise.
2232 (tdesc_s390_linux64v1): Likewise.
2233 (init_registers_s390_linux64v2): Likewise.
2234 (tdesc_s390_linux64v2): Likewise.
2235 (init_registers_s390_te_linux64): Likewise.
2236 (tdesc_s390_te_linux64): Likewise.
2237 (init_registers_s390_vx_linux64): Likewise.
2238 (tdesc_s390_vx_linux64): Likewise.
2239 (init_registers_s390_tevx_linux64): Likewise.
2240 (tdesc_s390_tevx_linux64): Likewise.
2241 (init_registers_s390x_linux64): Likewise.
2242 (tdesc_s390x_linux64): Likewise.
2243 (init_registers_s390x_linux64v1): Likewise.
2244 (tdesc_s390x_linux64v1): Likewise.
2245 (init_registers_s390x_linux64v2): Likewise.
2246 (tdesc_s390x_linux64v2): Likewise.
2247 (init_registers_s390x_te_linux64): Likewise.
2248 (tdesc_s390x_te_linux64): Likewise.
2249 (init_registers_s390x_vx_linux64): Likewise.
2250 (tdesc_s390x_vx_linux64): Likewise.
2251 (init_registers_s390x_tevx_linux64): Likewise.
2252 (tdesc_s390x_tevx_linux64): Likewise.
2253 (have_hwcap_s390_vx): New static variable.
2254 (s390_arch_setup): Fill have_hwcap_s390_vx.
2255 (s390_get_thread_area): New function.
2256 (s390_ft_entry_gpr_esa): New const.
2257 (s390_ft_entry_gpr_zarch): New const.
2258 (s390_ft_entry_misc): New const.
2259 (s390_ft_entry_fr): New const.
2260 (s390_ft_entry_vr): New const.
2261 (s390_ft_main_31): New const.
2262 (s390_ft_main_64): New const.
2263 (s390_ft_exit_fr): New const.
2264 (s390_ft_exit_vr): New const.
2265 (s390_ft_exit_misc): New const.
2266 (s390_ft_exit_gpr_esa): New const.
2267 (s390_ft_exit_gpr_zarch): New const.
2268 (append_insns): New function.
2269 (s390_relocate_instruction): New function.
2270 (s390_install_fast_tracepoint_jump_pad): New function.
2271 (s390_get_min_fast_tracepoint_insn_len): New function.
2272 (s390_get_ipa_tdesc_idx): New function.
2273 (struct linux_target_ops): Wire in the above functions.
2274 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2275 * linux-s390-tdesc.h: New file.
2277 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2279 * linux-s390-low.c (s390_supports_tracepoints): New function.
2280 (struct linux_target_ops): Fill supports_tracepoints hook.
2282 2016-03-18 Yao Qi <yao.qi@linaro.org>
2284 * linux-low.c (lwp_signal_can_be_delivered): New function.
2285 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2287 2016-03-18 Yao Qi <yao.qi@linaro.org>
2289 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2290 0 if signal is enqueued. Remove 'signal' from one debugging
2291 message. Move one debugging message to some lines below.
2292 Remove code setting 'signal' to 0.
2294 2016-03-18 Yao Qi <yao.qi@linaro.org>
2296 * linux-low.c (linux_low_filter_event): Remove redundant
2297 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2299 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2301 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2302 (struct linux_target_ops): Wire in the above.
2304 2016-03-03 Yao Qi <yao.qi@linaro.org>
2306 * linux-low.c: Update comments to start_step_over.
2308 2016-03-03 Yao Qi <yao.qi@linaro.org>
2311 * linux-low.c (handle_extended_wait): Set child suspended
2312 if event_lwp->bp_reinsert isn't zero.
2314 2016-03-02 Yao Qi <yao.qi@linaro.org>
2316 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2317 enqueue_pending_signal.
2319 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2321 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2324 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2326 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2327 (s390_regmap_3264) [!__s390x__]: New global.
2328 (s390_collect_ptrace_register): Skip map entries containing -1.
2329 (s390_supply_ptrace_register): Ditto.
2330 (s390_fill_gprs_high): New function.
2331 (s390_store_gprs_high): New function.
2332 (s390_regsets): Add NT_S390_HIGH_GPRS.
2333 (s390_get_hwcap): Enable on 31-bit.
2334 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2335 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2336 Detect NT_S390_HIGH_GPRS.
2337 (s390_usrregs_info_3264): Enable on 31-bit.
2338 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2339 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2341 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2344 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2345 * configure.srv: Ditto.
2346 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2347 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2348 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2349 (init_registers_amd64_linux): Remove prototype.
2350 (tdesc_amd64_linux): Remove declaration.
2351 (get_ipa_tdesc): New function.
2352 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2353 initialize remaining tdescs.
2354 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2355 (init_registers_i386_linux): Remove prototype.
2356 (tdesc_i386_linux): Remove declaration.
2357 (get_ipa_tdesc): New function.
2358 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2359 initialize remaining tdescs.
2360 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2361 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2362 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2363 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2364 (x86_get_ipa_tdesc_idx): New function.
2365 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2366 * linux-x86-tdesc.h: New file.
2367 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2368 (target_get_ipa_tdesc_idx): New macro.
2369 * tracepoint.c (ipa_tdesc_idx): New macro.
2370 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2371 (symbol_list): Add ipa_tdesc_idx.
2372 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2373 (ipa_tdesc): Remove.
2374 (ipa_tdesc_idx): New variable.
2375 (get_context_regcache): Use get_ipa_tdesc.
2376 (gdb_collect): Ditto.
2378 * tracepoint.h (get_ipa_tdesc): New prototype.
2379 (ipa_tdesc): Remove.
2381 2016-02-24 Pedro Alves <palves@redhat.com>
2383 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2384 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2385 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2386 Factor out common code between the USE_SIGTRAP_SIGINFO and
2387 !USE_SIGTRAP_SIGINFO blocks.
2388 (linux_low_filter_event): Call save_stop_reason instead of
2389 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2391 (linux_wait_1): Update comments.
2393 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2395 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2396 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2397 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2398 ppc_insert_point, ppc_remove_point.
2400 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2402 * linux-s390-low.c (s390_supports_z_point_type): New function.
2403 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2405 2016-02-16 Yao Qi <yao.qi@linaro.org>
2407 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2408 PC. Get pc from regcache_read_pc.
2410 2016-02-12 Yao Qi <yao.qi@linaro.org>
2412 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2413 or linux_get_pc_32bit.
2414 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2416 2016-02-12 Yao Qi <yao.qi@linaro.org>
2418 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2419 arm_linux_get_next_pcs_fixup.
2421 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2423 * tracepoint.c (x_tracepoint_action_download): Change
2424 write_inferior_data_ptr to write_inferior_data_pointer.
2425 (cmd_qtstart): Likewise.
2426 (write_inferior_data_ptr): Remove.
2427 (download_agent_expr): Change write_inferior_data_ptr to
2428 write_inferior_data_pointer.
2429 (download_tracepoint_1): Likewise.
2430 (download_tracepoint): Likewise.
2431 (download_trace_state_variables): Likewise.
2433 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2434 Marcin Kościelnicki <koriakin@0x04.net>
2436 * tracepoint.c (struct tracepoint_action_ops): Remove.
2437 (struct tracepoint_action): Remove ops.
2438 (m_tracepoint_action_download, r_tracepoint_action_download)
2439 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2440 size and offset accordingly.
2441 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2442 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2443 (tracepoint_action_send, tracepoint_action_download): New functions.
2444 Helpers for trace action handlers.
2445 (add_tracepoint_action): Remove setup actions ops.
2446 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2448 2016-02-10 Yao Qi <yao.qi@linaro.org>
2450 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2452 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2454 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2456 * configure: Regenerate.
2458 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2460 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2461 void * to gdb_byte *.
2462 * linux-low.c (siginfo_fixup): Likewise.
2463 (linux_xfer_siginfo): Likewise.
2464 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2466 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2468 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2470 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2472 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2474 * linux-x86-low.c [__x86_64__]: Include
2475 "nat/amd64-linux-siginfo.h".
2476 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2477 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2478 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2479 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2480 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2481 (cpt_si_fd, si_timerid, si_overrun): Move from
2482 nat/amd64-linux-siginfo.c.
2483 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2485 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2487 * server.c (skip_to_semicolon): Remove.
2488 (process_point_options): Use strchrnul instead of
2491 2016-01-26 Yao Qi <yao.qi@linaro.org>
2493 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2494 * linux-low.c (install_software_single_step_breakpoints): Don't
2495 call regcache_read_pc.
2496 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2499 2016-01-26 Yao Qi <yao.qi@linaro.org>
2501 * linux-low.c (install_software_single_step_breakpoints): Call
2502 regcache_read_pc instead of get_pc.
2504 2016-01-26 Yao Qi <yao.qi@linaro.org>
2506 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2507 (unblock_async_io): Rename to ...
2508 (block_unblock_async_io): ... it. New function.
2509 (enable_async_io): Don't install SIGIO handler. Unblock it
2511 (disable_async_io): Don't ignore SIGIO. Block it instead.
2512 (initialize_async_io): Install SIGIO handler. Don't call
2515 2016-01-26 Yao Qi <yao.qi@linaro.org>
2517 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2518 first character is '\003', call *the_target->request_interrupt.
2520 2016-01-25 Yao Qi <yao.qi@linaro.org>
2522 * remote-utils.c (new_thread_notify): Remove.
2523 (dead_thread_notify): Likewise.
2524 * remote-utils.h (new_thread_notify): Remove declaration.
2525 (dead_thread_notify): Likewise.
2527 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2529 * gdb.trace/pending.exp: Fix expected message on continue.
2531 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2533 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2534 it works properly on big-endian machines where sizeof (CORE_ADDR)
2537 2016-01-21 Pedro Alves <palves@redhat.com>
2539 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2540 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2541 * configure: Regenerate.
2543 2016-01-21 Yao Qi <yao.qi@linaro.org>
2545 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2546 is_thumb and set it according to CPSR saved on the stack.
2547 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2548 arm_sigreturn_next_pc.
2550 2016-01-18 Yao Qi <yao.qi@linaro.org>
2552 * linux-low.c (linux_set_pc_64bit): New function.
2553 (linux_get_pc_64bit): New function.
2554 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2556 * linux-sparc-low.c (debug_threads): Remove declaration.
2557 (sparc_get_pc): Remove.
2558 (the_low_target): Use linux_get_pc_64bit instead of
2560 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2561 (the_low_target): Use linux_get_pc_64bit and
2564 2016-01-18 Yao Qi <yao.qi@linaro.org>
2566 * linux-arm-low.c (debug_threads): Remove declaration.
2567 (arm_get_pc, arm_set_pc): Remove.
2568 (the_low_target): Use linux_get_pc_32bit and
2570 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2571 (the_low_target): Use linux_get_pc_32bit and
2573 * linux-cris-low.c (debug_threads): Remove declaration.
2574 (cris_get_pc, cris_set_pc,): Remove.
2575 (the_low_target): Use linux_get_pc_32bit and
2577 * linux-crisv32-low.c (debug_threads): Remove declaration.
2578 (cris_get_pc, cris_set_pc): Remove.
2579 (the_low_target): Use linux_get_pc_32bit and
2581 * linux-low.c: Include inttypes.h.
2582 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2583 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2584 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2585 (the_low_target): Use linux_get_pc_32bit and
2587 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2588 (the_low_target): Use linux_get_pc_32bit and
2590 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2591 (the_low_target): Use linux_get_pc_32bit and
2593 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2594 (the_low_target): Use linux_get_pc_32bit and
2596 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2597 (the_low_target): Use linux_get_pc_32bit and
2600 2016-01-18 Gary Benson <gbenson@redhat.com>
2602 * configure.ac (AC_FUNC_FORK): New check.
2603 * config.in: Regenerate.
2604 * configure: Likewise.
2606 2016-01-14 Yao Qi <yao.qi@linaro.org>
2608 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2609 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2610 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2611 arm_get_next_pcs_ctor.
2613 2016-01-12 Josh Stone <jistone@redhat.com>
2614 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2616 * inferiors.h: Include "gdb_vecs.h".
2617 (struct process_info): Add syscalls_to_catch.
2618 * inferiors.c (remove_process): Free syscalls_to_catch.
2619 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2620 syscall_return stops.
2621 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2622 * server.c (handle_general_set): Handle QCatchSyscalls.
2623 (handle_query): Report support for QCatchSyscalls.
2624 * target.h (struct target_ops): Add supports_catch_syscall.
2625 (target_supports_catch_syscall): New macro.
2626 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2627 (struct lwp_info): Add syscall_state.
2628 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2629 Maintain syscall_state and syscalls_to_catch across exec.
2630 (get_syscall_trapinfo): New function, proxy to the_low_target.
2631 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2632 (linux_low_filter_event): Toggle syscall_state entry/return for
2633 syscall traps, and set it ignored for all others.
2634 (gdb_catching_syscalls_p): New function.
2635 (gdb_catch_this_syscall_p): New function.
2636 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2637 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2638 (linux_supports_catch_syscall): New function.
2639 (linux_target_ops): Install it.
2640 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2641 (the_low_target): Install it.
2643 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2645 * acinclude.m4: Include new ../warning.m4 file.
2646 * configure: Regenerated.
2647 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2649 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2651 * ax.c (is_goto_target): Mark static.
2652 * linux-low.c (register_addr): Likewise.
2653 (linux_fetch_registers, linux_store_registers): Likewise.
2654 * mem-break.c (any_persistent_commands): Fix old prototype.
2655 (add_commands_to_breakpoint): Mark static.
2656 * regcache.c (find_register_by_name): Delete unused func.
2657 * remote-utils.c (hex_or_minus_one): Mark static.
2658 * server.c (monitor_show_help): Mark static.
2659 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2660 handle_v_requests): Likewise.
2662 2016-01-12 Pedro Alves <palves@redhat.com>
2664 Remove use of the registered trademark symbol throughout.
2666 2016-01-08 Yao Qi <yao.qi@linaro.org>
2668 * remote-utils.c (getpkt): If c is '\003', call target hook
2671 2016-01-06 Yao Qi <yao.qi@linaro.org>
2673 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2674 linux-aarch32-low.c.
2675 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2676 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2677 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2678 (thumb2_breakpoint): Declare.
2679 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2680 linux-aarch32-low.h.
2681 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2682 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2683 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2685 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2687 * gdbreplay.c (gdbreplay_version): Change copyright year in
2689 * server.c (gdbserver_version): Likewise.
2691 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2693 * server.c (crc32_table): Delete.
2694 (crc32): Use libiberty's xcrc32 function.
2696 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2698 * lynx-low.c (lynx_delete_thread_callback): New function.
2699 (lynx_mourn): Properly delete our process and all of its
2700 threads. Remove call to clear_inferiors.
2702 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2704 * target.c (thread_search_callback): Add check that
2705 the thread_stopped target callback is not NULL before
2708 2015-12-21 Yao Qi <yao.qi@linaro.org>
2710 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2713 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2715 * server.c (handle_query): Call target_supports_software_single_step.
2717 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2719 * linux-low.c (single_step): New function.
2720 (linux_resume_one_lwp_throw): Call single_step.
2721 (start_step_over): Likewise.
2723 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2725 * Makefile.in (SFILES): Append arch/arm-linux.c,
2726 arch/arm-get-next-pcs.c.
2727 (arm-linux.o): New rule.
2728 (arm-get-next-pcs.o): New rule.
2729 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2731 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2732 to linux-aarch32-low.c.
2733 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2734 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2735 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2736 (thumb2_breakpoint_len): Likewise.
2737 (arm_is_thumb_mode): Make non-static.
2738 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2739 from linux-aarch32-low.c.
2740 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2741 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2742 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2743 (thumb2_breakpoint_len): Likewise.
2744 (arm_is_thumb_mode): New declaration.
2745 * linux-arm-low.c: Include arch/arm-linux.h
2746 aarch/arm-get-next-pcs.h, sys/syscall.h.
2747 (get_next_pcs_ops): New struct.
2748 (get_next_pcs_addr_bits_remove): New function.
2749 (get_next_pcs_is_thumb): New function.
2750 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2751 (arm_sigreturn_next_pc): Likewise.
2752 (get_next_pcs_syscall_next_pc): Likewise.
2753 (arm_gdbserver_get_next_pcs): Likewise.
2754 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2756 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2757 * server.h: Include gdb_vecs.h.
2759 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2761 * Makefile.in (SFILES): Append common/common-regcache.c.
2762 (OBS): Append common-regcache.o.
2763 (common-regcache.o): New rule.
2764 * regcache.c (init_register_cache): Initialize cache to
2766 (regcache_raw_read_unsigned): New function.
2767 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2768 register_status enum.
2770 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2772 * linux-aarch64-low.c (the_low_targets): Rename
2773 breakpoint_reinsert_addr to get_next_pcs.
2774 * linux-arm-low.c (the_low_targets): Likewise.
2775 * linux-bfin-low.c (the_low_targets): Likewise.
2776 * linux-cris-low.c (the_low_targets): Likewise.
2777 * linux-crisv32-low.c (the_low_targets): Likewise.
2778 * linux-low.c (can_software_single_step): Likewise.
2779 (install_software_single_step_breakpoints): New function.
2780 (start_step_over): Use install_software_single_step_breakpoints.
2781 * linux-low.h: New CORE_ADDR vector.
2782 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2784 * linux-mips-low.c (the_low_targets): Likewise.
2785 * linux-nios2-low.c (the_low_targets): Likewise.
2786 * linux-sparc-low.c (the_low_targets): Likewise.
2788 2015-12-17 Pedro Alves <palves@redhat.com>
2790 * linux-low.c (linux_kill_one_lwp): Remove references to
2792 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2794 (linux_init_signals): Delete.
2795 (initialize_low): Adjust.
2796 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2798 2015-12-16 Pedro Alves <palves@redhat.com>
2800 * configure.ac (compiler warning flags): When testing a
2801 -Wno-foo option, check whether -Wfoo works instead.
2802 * configure: Regenerate.
2804 2015-12-11 Don Breazeal <donb@codesourcery.com>
2806 * server.c (process_serial_event): Don't exit from gdbserver
2807 in remote mode if there are still active inferiors.
2809 2015-12-11 Yao Qi <yao.qi@linaro.org>
2811 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2812 arm_breakpoint_at if the process is 32-bit.
2814 2015-12-11 Yao Qi <yao.qi@linaro.org>
2816 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2819 2015-12-07 Yao Qi <yao.qi@linaro.org>
2821 * configure.srv: Append arm.o to srv_tgtobj for
2822 aarch64*-*-linux* target.
2823 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2824 from linux-arm-low.c.
2825 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2826 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2827 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2828 (thumb2_breakpoint_len): Likewise.
2829 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2830 (arm_breakpoint_kinds): Likewise.
2831 (arm_breakpoint_kind_from_pc): Likewise.
2832 (arm_sw_breakpoint_from_kind): Likewise.
2833 (arm_breakpoint_kind_from_current_state): Likewise.
2834 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2835 (arm_sw_breakpoint_from_kind): Declare.
2836 (arm_breakpoint_kind_from_current_state): Declare.
2837 (arm_breakpoint_at): Declare.
2838 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2839 arm_sw_breakpoint_from_kind if process is 32-bit.
2840 (aarch64_breakpoint_kind_from_pc): New function.
2841 (aarch64_breakpoint_kind_from_current_state): New function.
2842 (the_low_target): Initialize fields breakpoint_kind_from_pc
2843 and breakpoint_kind_from_current_state.
2844 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2845 linux-aarch32-low.c.
2846 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2847 (arm_breakpoint, arm_breakpoint_len): Likewise.
2848 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2849 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2850 (arm_is_thumb_mode): Likewise.
2851 (arm_breakpoint_at): Likewise.
2852 (arm_breakpoint_kind_from_pc): Likewise.
2853 (arm_sw_breakpoint_from_kind): Likewise.
2854 (arm_breakpoint_kind_from_current_state): Likewise.
2857 2015-08-04 Yao Qi <yao.qi@linaro.org>
2859 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2860 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2861 * server.c (extended_protocol): Remove "static".
2862 * server.h (extended_protocol): Declare it.
2864 2015-12-04 Josh Stone <jistone@redhat.com>
2866 * target.h (struct target_ops) <arch_setup>: Rename to ...
2867 (struct target_ops) <post_create_inferior>: ... this.
2868 (target_arch_setup): Rename to ...
2869 (target_post_create_inferior): ... this, calling post_create_inferior.
2870 * server.c (start_inferior): Update target_arch_setup calls to
2871 target_post_create_inferior.
2872 * linux-low.c (linux_low_ptrace_options): Forward declare.
2873 (linux_arch_setup): Update its comment for general use.
2874 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2875 (struct linux_target_ops): Use linux_post_create_inferior.
2876 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2877 to post_create_inferior.
2878 * nto-low.c (struct nto_target_ops): Likewise.
2879 * spu-low.c (struct spu_target_ops): Likewise.
2880 * win32-low.c (struct win32_target_ops): Likewise.
2882 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2884 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2886 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2888 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2889 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2890 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2891 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2892 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2893 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2894 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2895 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2896 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2897 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2898 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2899 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2901 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2903 * linux-low.c (linux_look_up_symbols): Don't call
2904 linux_supports_traceclone.
2905 * linux-low.h (thread_db_init): Remove use_events argument.
2906 * thread-db.c (thread_db_use_event): Remove global variable.
2907 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2908 (struct thread_db) <td_create_bp>: Remove field.
2909 (thread_db_create_event): Remove function.
2910 (thread_db_enable_reporting): Likewise.
2911 (find_one_thread): Don't check for thread_db_use_events.
2912 (attach_thread): Likewise.
2913 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2914 (try_thread_db_load_1): Don't check for thread_db_use_events.
2915 (thread_db_init): Remove use_events argument and thread events
2917 (remove_thread_event_breakpoints): Remove function.
2918 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2920 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2922 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2924 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2925 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2926 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2927 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2928 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2930 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2932 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2933 * linux-low.c (can_hardware_single_step): Use
2934 supports_hardware_single_step.
2935 (can_software_single_step): New function.
2936 (start_step_over): Call can_software_single_step.
2937 (linux_supports_hardware_single_step): New function.
2938 (struct target_ops) <supports_software_single_step>: Initialize.
2939 * linux-low.h (struct linux_target_ops)
2940 <supports_hardware_single_step>: Initialize.
2941 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2942 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2943 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2944 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2945 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2946 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2947 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2948 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2949 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2950 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2952 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2953 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2955 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2956 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2957 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2959 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2960 * target.h (struct target_ops): <supports_software_single_step>:
2962 (target_supports_software_single_step): New macro.
2964 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2966 * linux-low.c (linux_wait_1): Fix pc advance condition.
2967 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2968 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2970 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2972 * linux-arm-low.c (arm_is_thumb_mode): New function.
2973 (arm_breakpoint_at): Use arm_is_thumb_mode.
2974 (arm_breakpoint_kind_from_current_state): New function.
2975 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2977 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2978 (linux_breakpoint_kind_from_current_state): New function.
2979 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2980 * linux-low.h (struct linux_target_ops)
2981 <breakpoint_kind_from_current_state>: New field.
2982 * target.h (struct target_ops): Likewise.
2983 (target_breakpoint_kind_from_current_state): New macro.
2985 2015-11-30 Pedro Alves <palves@redhat.com>
2987 * linux-low.c (linux_resume): Wake up the event loop before
2990 2015-11-30 Pedro Alves <palves@redhat.com>
2992 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2994 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2996 * target.c (struct thread_search): New structure.
2997 (thread_search_callback): New function.
2998 (prev_general_thread): New global.
2999 (prepare_to_access_memory, done_accessing_memory): New functions.
3000 * target.h (prepare_to_access_memory, done_accessing_memory):
3001 Replace macros with function declarations.
3003 2015-11-30 Pedro Alves <palves@redhat.com>
3006 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3007 report TARGET_WAITKIND_NO_RESUMED.
3008 * remote-utils.c (prepare_resume_reply): Handle
3009 TARGET_WAITKIND_NO_RESUMED.
3010 * server.c (report_no_resumed): New global.
3011 (handle_query) <qSupported>: Handle "no-resumed+". Report
3012 "no-resumed+" support.
3013 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3014 return error if the client doesn't support no-resumed events.
3015 (push_stop_notification): New function.
3016 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3017 events if the client supports them.
3019 2015-11-30 Pedro Alves <palves@redhat.com>
3021 * linux-low.c (thread_still_has_status_pending_p): Don't check
3023 (lwp_resumed): New function.
3024 (status_pending_p_callback): Return early if the LWP is not
3025 supposed to be resumed.
3027 2015-11-30 Pedro Alves <palves@redhat.com>
3029 * linux-low.c (handle_extended_wait): Assert that the LWP's
3030 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3031 thread create events, leave the new child's status pending.
3032 (linux_low_filter_event): If GDB wants to hear about thread exit
3033 events, leave the LWP marked dead and don't delete it.
3034 (linux_wait_for_event_filtered): Don't check for thread exit.
3035 (filter_exit_event): New function.
3036 (linux_wait_1): Use it, when returning an exit event.
3037 (linux_resume_one_lwp_throw): Assert that the LWP's
3038 waitstatus is TARGET_WAITKIND_IGNORE.
3039 * remote-utils.c (prepare_resume_reply): Handle
3040 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3041 * server.c (report_thread_events): New global.
3042 (handle_general_set): Handle QThreadEvents.
3043 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3044 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3045 TARGET_WAITKIND_THREAD_EXITED.
3046 * server.h (report_thread_events): Declare.
3048 2015-11-30 Pedro Alves <palves@redhat.com>
3050 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3051 the thread's last_resume_kind was resume_stop.
3053 2015-11-30 Pedro Alves <palves@redhat.com>
3055 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3058 2015-11-30 Pedro Alves <palves@redhat.com>
3060 * server.c (handle_v_requests): Handle vCtrlC.
3062 2015-11-30 Pedro Alves <palves@redhat.com>
3064 * gdbthread.h (find_any_thread_of_pid): Declare.
3065 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3067 * server.c (handle_query): If current_thread is NULL, look for
3068 another thread of the selected process.
3070 2015-11-26 Daniel Colascione <dancol@dancol.org>
3071 Simon Marchi <simon.marchi@ericsson.com>
3073 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3074 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3076 * target.h (struct target_ops) <thread_name>: New field.
3077 (target_thread_name): New macro.
3079 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3081 * regcache.h (regcache_invalidate_pid): Add declaration.
3082 * regcache.c (regcache_invalidate_pid): New function, extracted
3083 from regcache_invalidate.
3084 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3085 Add trivial documentation comment.
3086 * lynx-low.c: Use regcache_invalidate_pid instead of
3087 regcache_invalidate.
3089 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3091 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3092 and Elf64_auxv_t if the target is Android.
3094 2015-11-22 Doug Evans <xdje42@gmail.com>
3096 * target.h: #include <sys/types.h>.
3098 2015-11-19 Pedro Alves <palves@redhat.com>
3100 * linux-low.c (linux_process_qsupported): Change prototype.
3102 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3104 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3105 and adjust to loop over all features.
3106 * server.c (handle_query) <qSupported>: Adjust to call
3107 target_process_qsupported once, passing it a vector of unprocessed
3109 * target.h (struct target_ops) <process_qsupported>: Change
3111 (target_process_qsupported): Adjust.
3113 2015-11-19 Pedro Alves <palves@redhat.com>
3115 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3117 * configure: Regenerate.
3119 2015-11-19 Pedro Alves <palves@redhat.com>
3121 * configure: Regenerate.
3123 2015-11-19 Yao Qi <yao.qi@linaro.org>
3125 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3128 2015-11-19 Yao Qi <yao.qi@linaro.org>
3130 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3131 (struct aarch64_operand): Move enum out.
3133 2015-11-19 Yao Qi <yao.qi@linaro.org>
3135 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3136 struct user_fpsimd_state *.
3137 (aarch64_store_fpregset): Likewise.
3139 2015-11-19 Yao Qi <yao.qi@linaro.org>
3141 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3142 struct user_pt_regs *.
3143 (aarch64_store_gregset): Likewise.
3145 2015-11-18 Pedro Alves <palves@redhat.com>
3147 * Makefile.in (all_object_files): Add $IPA_OBJS.
3149 2015-11-17 Pedro Alves <palves@redhat.com>
3151 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3152 GDB_SIGNAL_0 and gdb_signal_to_string.
3154 2015-11-17 Pedro Alves <palves@redhat.com>
3156 * win32-low.c (handle_output_debug_string): Remove parameter.
3157 (win32_kill): Remove our_status local and adjust call to
3158 handle_output_debug_string.
3159 (get_child_debug_event): Adjust call to
3160 handle_output_debug_string.
3162 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3164 * linux-mips-low.c (mips_fill_gregset): Add cast.
3165 (mips_store_gregset): Likewise.
3166 (mips_fill_fpregset): Likewise.
3167 (mips_store_fpregset): Likewise.
3169 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3171 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3174 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3176 * linux-mips-low.c (mips_linux_new_thread): Change type of
3177 watch_type to enum target_hw_bp_type.
3179 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3181 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3182 Change return type to arm_hwbp_type.
3184 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3186 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3187 (arm_store_gregset): Likewise.
3188 * linux-arm-low.c (arm_get_hwcap): Likewise.
3189 (arm_read_description): Likewise.
3191 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3193 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3195 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3197 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3198 (ppc_fill_vsxregset): Likewise.
3199 (ppc_store_vsxregset): Likewise.
3200 (ppc_fill_vrregset): Likewise.
3201 (ppc_store_vrregset): Likewise.
3202 (ppc_fill_evrregset): Likewise.
3203 (ppc_store_evrregset): Likewise.
3205 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3207 * linux-ppc-low.c (ppc_usrregs_info): Remove
3208 forward-declaration.
3209 (ppc_arch_setup): Move lower in file.
3211 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3213 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3214 (ps_pdwrite): Likewise.
3216 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3218 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3219 to after assert checks.
3221 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3223 * proc-service.c (ps_pdread): Add/adjust casts.
3224 (ps_pdwrite): Add/adjust casts.
3226 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3228 * server.c (handle_search_memory_1): Cast return value of
3231 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3233 * server.c (write_qxfer_response): Change type of data to
3236 2015-10-29 Pedro Alves <palves@redhat.com>
3238 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3240 2015-10-29 Pedro Alves <palves@redhat.com>
3242 * tracepoint.c (clear_installed_tracepoints): Add casts.
3244 2015-10-29 Pedro Alves <palves@redhat.com>
3246 * server.c (handle_v_cont, process_serial_event): Add enum
3247 gdb_signal casts to signal parsing code.
3249 2015-10-29 Pedro Alves <palves@redhat.com>
3251 * linux-low.h (NULL_REGSET): Define.
3252 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3253 * linux-arm-low.c (arm_regsets): Likewise.
3254 * linux-crisv32-low.c (cris_regsets): Likewise.
3255 * linux-m68k-low.c (m68k_regsets): Likewise.
3256 * linux-mips-low.c (mips_regsets): Likewise.
3257 * linux-nios2-low.c (nios2_regsets): Likewise.
3258 * linux-ppc-low.c (ppc_regsets): Likewise.
3259 * linux-s390-low.c (s390_regsets): Likewise.
3260 * linux-sh-low.c (sh_regsets): Likewise.
3261 * linux-sparc-low.c (sparc_regsets): Likewise.
3262 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3263 * linux-tile-low.c (tile_regsets): Likewise.
3264 * linux-x86-low.c (x86_regsets): Likewise.
3265 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3267 2015-10-29 Pedro Alves <palves@redhat.com>
3269 * linux-low.h (NULL_REGSET): Define.
3270 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3271 * linux-arm-low.c (arm_regsets): Likewise.
3272 * linux-crisv32-low.c (cris_regsets): Likewise.
3273 * linux-m68k-low.c (m68k_regsets): Likewise.
3274 * linux-mips-low.c (mips_regsets): Likewise.
3275 * linux-nios2-low.c (nios2_regsets): Likewise.
3276 * linux-ppc-low.c (ppc_regsets): Likewise.
3277 * linux-s390-low.c (s390_regsets): Likewise.
3278 * linux-sh-low.c (sh_regsets): Likewise.
3279 * linux-sparc-low.c (sparc_regsets): Likewise.
3280 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3281 * linux-tile-low.c (tile_regsets): Likewise.
3282 * linux-x86-low.c (x86_regsets): Likewise.
3283 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3285 2015-10-26 Doug Evans <dje@google.com>
3287 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3289 2015-10-26 Doug Evans <dje@google.com>
3291 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3293 2015-10-26 Doug Evans <dje@google.com>
3295 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3297 (attach_thread, find_new_threads_callback): Ditto.
3299 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3301 * mem-break.h (set_breakpoint_data): Remove.
3303 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3305 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3306 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3307 (initialize_low): Remove set_breakpoint_data call.
3308 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3309 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3310 (initialize_low): Remove set_breakpoint_data call.
3311 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3312 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3313 (initialize_low): Remove set_breakpoint_data call.
3315 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3317 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3318 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3319 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3320 * target.h (target_breakpoint_kind_from_pc): New macro.
3322 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3324 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3325 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3326 the default breakpoint kind.
3328 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3330 * linux-arm-low.c (arm_supports_z_point_type): Add software
3333 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3335 * linux-arm-low.c: Refactor breakpoint definitions.
3336 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3337 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3339 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3341 * Makefile.in: Add arm.c/o.
3342 * configure.srv: Likewise.
3343 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3344 (arm_breakpoint_kind_from_pc): New function.
3345 (arm_sw_breakpoint_from_kind): Return proper kind.
3346 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3348 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3350 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3352 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3353 (struct raw_breakpoint) <size>: Remove.
3354 (struct raw_breakpoint) <kind>: Add.
3355 (bp_size): New function.
3356 (bp_opcode): Likewise.
3357 (find_raw_breakpoint_at): Adjust for kind.
3358 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3359 (remove_memory_breakpoint): Adjust for kind call bp_size.
3360 (set_raw_breakpoint_at): Adjust for kind.
3361 (set_breakpoint): Likewise.
3362 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3363 (delete_raw_breakpoint): Adjust for kind.
3364 (delete_breakpoint): Likewise.
3365 (find_gdb_breakpoint): Likewise.
3366 (set_gdb_breakpoint_1): Likewise.
3367 (set_gdb_breakpoint): Likewise.
3368 (delete_gdb_breakpoint_1): Likewise.
3369 (delete_gdb_breakpoint): Likewise.
3370 (uninsert_raw_breakpoint): Likewise.
3371 (reinsert_raw_breakpoint): Likewise.
3372 (set_breakpoint_data): Remove.
3373 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3374 (check_mem_read): Adjust for kind call bp_size.
3375 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3376 (clone_one_breakpoint): Adjust for kind.
3377 * mem-break.h (set_gdb_breakpoint): Likewise.
3378 (delete_gdb_breakpoint): Likewise.
3379 * server.c (process_serial_event): Likewise.
3381 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3383 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3384 (struct linux_target_ops) <breakpoint>: Remove.
3385 (struct linux_target_ops) <breakpoint_len>: Remove.
3386 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3387 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3388 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3389 (arm_sw_breakpoint_from_kind): New function.
3390 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3391 (struct linux_target_ops) <breakpoint>: Remove.
3392 (struct linux_target_ops) <breakpoint_len>: Remove.
3393 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3394 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3395 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3396 (struct linux_target_ops) <breakpoint>: Remove.
3397 (struct linux_target_ops) <breakpoint_len>: Remove.
3398 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3399 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3400 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3401 (struct linux_target_ops) <breakpoint>: Remove.
3402 (struct linux_target_ops) <breakpoint_len>: Remove.
3403 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3404 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3405 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3406 and sw_breakpoint_from_kind to increment the pc.
3407 (linux_breakpoint_kind_from_pc): New function.
3408 (linux_sw_breakpoint_from_kind): New function.
3409 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3410 (initialize_low): Call breakpoint_kind_from_pc and
3411 sw_breakpoint_from_kind to replace breakpoint_data/len.
3412 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3414 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3415 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3416 (struct linux_target_ops) <breakpoint>: Remove.
3417 (struct linux_target_ops) <breakpoint_len>: Remove.
3418 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3419 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3420 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3421 (struct linux_target_ops) <breakpoint>: Remove.
3422 (struct linux_target_ops) <breakpoint_len>: Remove.
3423 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3424 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3425 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3426 (struct linux_target_ops) <breakpoint>: Remove.
3427 (struct linux_target_ops) <breakpoint_len>: Remove.
3428 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3429 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3430 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3431 (struct linux_target_ops) <breakpoint>: Remove.
3432 (struct linux_target_ops) <breakpoint_len>: Remove.
3433 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3434 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3435 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3436 (struct linux_target_ops) <breakpoint>: Remove.
3437 (struct linux_target_ops) <breakpoint_len>: Remove.
3438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3439 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3440 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3441 (struct linux_target_ops) <breakpoint>: Remove.
3442 (struct linux_target_ops) <breakpoint_len>: Remove.
3443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3445 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3446 (struct linux_target_ops) <breakpoint>: Remove.
3447 (struct linux_target_ops) <breakpoint_len>: Remove.
3448 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3449 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3450 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3451 (struct linux_target_ops) <breakpoint>: Remove.
3452 (struct linux_target_ops) <breakpoint_len>: Remove.
3453 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3455 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3456 (struct linux_target_ops) <breakpoint>: Remove.
3457 (struct linux_target_ops) <breakpoint_len>: Remove.
3458 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3459 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3460 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3461 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3462 (struct linux_target_ops) <breakpoint>: Remove.
3463 (struct linux_target_ops) <breakpoint_len>: Remove.
3464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3466 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3467 (struct linux_target_ops) <breakpoint>: Remove.
3468 (struct linux_target_ops) <breakpoint_len>: Remove.
3469 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3470 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3472 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3474 * linux-cris-low.c (cris_get_pc): Remove void arg.
3476 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3478 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3481 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3483 * inferiors.c (thread_pid_matches_callback): New function.
3484 (find_thread_process): New function.
3485 (remove_thread): Reset current_thread.
3486 (remove_process): Assert threads have been removed first.
3488 2015-10-15 Yao Qi <yao.qi@linaro.org>
3490 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3492 (aarch64_remove_point): Likewise.
3493 * regcache.c (regcache_register_size): New function.
3495 2015-10-12 Yao Qi <yao.qi@linaro.org>
3497 * linux-aarch64-low.c: Update all callers as emit_load_store
3498 is renamed to aarch64_emit_load_store.
3500 2015-10-12 Yao Qi <yao.qi@linaro.org>
3502 * linux-aarch64-low.c: Update all callers of function renaming
3503 from emit_insn to aarch64_emit_insn.
3505 2015-10-12 Yao Qi <yao.qi@linaro.org>
3507 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3508 arch/aarch64-insn.h.
3509 (struct aarch64_memory_operand): Likewise.
3511 (emit_insn): Move to arch/aarch64-insn.c.
3512 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3513 (emit_load_store): Move to arch/aarch64-insn.c.
3514 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3515 (can_encode_int32): Remove.
3517 2015-10-12 Yao Qi <yao.qi@linaro.org>
3519 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3520 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3521 (aarch64_relocate_instruction): Likewise.
3522 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3523 (struct aarch64_insn_visitor): Likewise.
3525 2015-10-12 Yao Qi <yao.qi@linaro.org>
3527 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3528 (struct aarch64_insn_visitor): New.
3529 (struct aarch64_insn_relocation_data): New.
3530 (aarch64_ftrace_insn_reloc_b): New function.
3531 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3532 (aarch64_ftrace_insn_reloc_cb): Likewise.
3533 (aarch64_ftrace_insn_reloc_tb): Likewise.
3534 (aarch64_ftrace_insn_reloc_adr): Likewise.
3535 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3536 (aarch64_ftrace_insn_reloc_others): Likewise.
3538 (aarch64_relocate_instruction): Use visitor.
3540 2015-10-12 Yao Qi <yao.qi@linaro.org>
3542 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3543 int. Add argument buf.
3544 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3545 aarch64_relocate_instruction.
3547 2015-10-12 Yao Qi <yao.qi@linaro.org>
3549 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3550 argument insn. Remove local variable insn. Don't call
3552 (aarch64_install_fast_tracepoint_jump_pad): Call
3555 2015-09-30 Yao Qi <yao.qi@linaro.org>
3557 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3558 (emit_load_store_pair): Likewise.
3560 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3562 * dll.c (match_dll): Add cast(s).
3563 (unloaded_dll): Likewise.
3564 * linux-low.c (second_thread_of_pid_p): Likewise.
3565 (delete_lwp_callback): Likewise.
3566 (count_events_callback): Likewise.
3567 (select_event_lwp_callback): Likewise.
3568 (linux_set_resume_request): Likewise.
3569 * server.c (accumulate_file_name_length): Likewise.
3570 (emit_dll_description): Likewise.
3571 (handle_qxfer_threads_worker): Likewise.
3572 (visit_actioned_threads): Likewise.
3573 * thread-db.c (any_thread_of): Likewise.
3574 * tracepoint.c (same_process_p): Likewise.
3575 (match_blocktype): Likewise.
3576 (build_traceframe_info_xml): Likewise.
3578 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3580 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3582 (gdb_unparse_agent_expr): Likewise.
3583 * hostio.c (require_data): Likewise.
3584 (handle_pread): Likewise.
3585 * linux-low.c (disable_regset): Likewise.
3586 (fetch_register): Likewise.
3587 (store_register): Likewise.
3588 (get_dynamic): Likewise.
3589 (linux_qxfer_libraries_svr4): Likewise.
3590 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3591 (set_fast_tracepoint_jump): Likewise.
3592 (uninsert_fast_tracepoint_jumps_at): Likewise.
3593 (reinsert_fast_tracepoint_jumps_at): Likewise.
3594 (validate_inserted_breakpoint): Likewise.
3595 (clone_agent_expr): Likewise.
3596 * regcache.c (init_register_cache): Likewise.
3597 * remote-utils.c (putpkt_binary_1): Likewise.
3598 (decode_M_packet): Likewise.
3599 (decode_X_packet): Likewise.
3600 (look_up_one_symbol): Likewise.
3601 (relocate_instruction): Likewise.
3602 (monitor_output): Likewise.
3603 * server.c (handle_search_memory): Likewise.
3604 (handle_qxfer_exec_file): Likewise.
3605 (handle_qxfer_libraries): Likewise.
3606 (handle_qxfer): Likewise.
3607 (handle_query): Likewise.
3608 (handle_v_cont): Likewise.
3609 (handle_v_run): Likewise.
3610 (captured_main): Likewise.
3611 * target.c (write_inferior_memory): Likewise.
3612 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3613 * tracepoint.c (init_trace_buffer): Likewise.
3614 (add_tracepoint_action): Likewise.
3615 (add_traceframe): Likewise.
3616 (add_traceframe_block): Likewise.
3617 (cmd_qtdpsrc): Likewise.
3618 (cmd_qtdv): Likewise.
3619 (cmd_qtstatus): Likewise.
3620 (response_source): Likewise.
3621 (response_tsv): Likewise.
3622 (cmd_qtnotes): Likewise.
3623 (gdb_collect): Likewise.
3624 (initialize_tracepoint): Likewise.
3626 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3628 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3629 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3630 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3632 (enum aarch64_condition_codes): New enum.
3633 (w0): New static global.
3636 (struct aarch64_memory_operand) <type>: New
3637 MEMORY_OPERAND_POSTINDEX type.
3638 (postindex_memory_operand): New helper function.
3639 (emit_ret): New function.
3640 (emit_load_store_pair): New function, factored out of emit_stp
3641 with support for MEMORY_OPERAND_POSTINDEX.
3642 (emit_stp): Rewrite using emit_load_store_pair.
3643 (emit_ldp): New function.
3644 (emit_load_store): Likewise.
3645 (emit_ldr): Mention post-index instruction in comment.
3646 (emit_ldrh): New function.
3647 (emit_ldrb): New function.
3648 (emit_ldrsw): Mention post-index instruction in comment.
3649 (emit_str): Likewise.
3650 (emit_subs): New function.
3651 (emit_cmp): Likewise.
3652 (emit_and): Likewise.
3653 (emit_orr): Likewise.
3654 (emit_orn): Likewise.
3655 (emit_eor): Likewise.
3656 (emit_mvn): Likewise.
3657 (emit_lslv): Likewise.
3658 (emit_lsrv): Likewise.
3659 (emit_asrv): Likewise.
3660 (emit_mul): Likewise.
3661 (emit_sbfm): Likewise.
3662 (emit_sbfx): Likewise.
3663 (emit_ubfm): Likewise.
3664 (emit_ubfx): Likewise.
3665 (emit_csinc): Likewise.
3666 (emit_cset): Likewise.
3667 (emit_nop): Likewise.
3668 (emit_ops_insns): New helper function.
3669 (emit_pop): Likewise.
3670 (emit_push): Likewise.
3671 (aarch64_emit_prologue): New function.
3672 (aarch64_emit_epilogue): Likewise.
3673 (aarch64_emit_add): Likewise.
3674 (aarch64_emit_sub): Likewise.
3675 (aarch64_emit_mul): Likewise.
3676 (aarch64_emit_lsh): Likewise.
3677 (aarch64_emit_rsh_signed): Likewise.
3678 (aarch64_emit_rsh_unsigned): Likewise.
3679 (aarch64_emit_ext): Likewise.
3680 (aarch64_emit_log_not): Likewise.
3681 (aarch64_emit_bit_and): Likewise.
3682 (aarch64_emit_bit_or): Likewise.
3683 (aarch64_emit_bit_xor): Likewise.
3684 (aarch64_emit_bit_not): Likewise.
3685 (aarch64_emit_equal): Likewise.
3686 (aarch64_emit_less_signed): Likewise.
3687 (aarch64_emit_less_unsigned): Likewise.
3688 (aarch64_emit_ref): Likewise.
3689 (aarch64_emit_if_goto): Likewise.
3690 (aarch64_emit_goto): Likewise.
3691 (aarch64_write_goto_address): Likewise.
3692 (aarch64_emit_const): Likewise.
3693 (aarch64_emit_call): Likewise.
3694 (aarch64_emit_reg): Likewise.
3695 (aarch64_emit_pop): Likewise.
3696 (aarch64_emit_stack_flush): Likewise.
3697 (aarch64_emit_zero_ext): Likewise.
3698 (aarch64_emit_swap): Likewise.
3699 (aarch64_emit_stack_adjust): Likewise.
3700 (aarch64_emit_int_call_1): Likewise.
3701 (aarch64_emit_void_call_2): Likewise.
3702 (aarch64_emit_eq_goto): Likewise.
3703 (aarch64_emit_ne_goto): Likewise.
3704 (aarch64_emit_lt_goto): Likewise.
3705 (aarch64_emit_le_goto): Likewise.
3706 (aarch64_emit_gt_goto): Likewise.
3707 (aarch64_emit_ge_got): Likewise.
3708 (aarch64_emit_ops_impl): New static global variable.
3709 (aarch64_emit_ops): New target function, return
3710 &aarch64_emit_ops_impl.
3711 (struct linux_target_ops): Install it.
3713 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3715 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3716 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3718 * linux-aarch64-ipa.c: New file.
3719 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3721 (aarch64_get_thread_area): New target method.
3722 (extract_signed_bitfield): New helper function.
3723 (aarch64_decode_ldr_literal): New function.
3724 (enum aarch64_opcodes): New enum.
3725 (struct aarch64_register): New struct.
3726 (struct aarch64_operand): New struct.
3727 (x0): New static global.
3736 (aarch64_register): New helper function.
3737 (register_operand): Likewise.
3738 (immediate_operand): Likewise.
3739 (struct aarch64_memory_operand): New struct.
3740 (offset_memory_operand): New helper function.
3741 (preindex_memory_operand): Likewise.
3742 (enum aarch64_system_control_registers): New enum.
3743 (ENCODE): New macro.
3744 (emit_insn): New helper function.
3745 (emit_b): New function.
3746 (emit_bcond): Likewise.
3747 (emit_cb): Likewise.
3748 (emit_tb): Likewise.
3749 (emit_blr): Likewise.
3750 (emit_stp): Likewise.
3751 (emit_ldp_q_offset): Likewise.
3752 (emit_stp_q_offset): Likewise.
3753 (emit_load_store): Likewise.
3754 (emit_ldr): Likewise.
3755 (emit_ldrsw): Likewise.
3756 (emit_str): Likewise.
3757 (emit_ldaxr): Likewise.
3758 (emit_stxr): Likewise.
3759 (emit_stlr): Likewise.
3760 (emit_data_processing_reg): Likewise.
3761 (emit_data_processing): Likewise.
3762 (emit_add): Likewise.
3763 (emit_sub): Likewise.
3764 (emit_mov): Likewise.
3765 (emit_movk): Likewise.
3766 (emit_mov_addr): Likewise.
3767 (emit_mrs): Likewise.
3768 (emit_msr): Likewise.
3769 (emit_sevl): Likewise.
3770 (emit_wfe): Likewise.
3771 (append_insns): Likewise.
3772 (can_encode_int32_in): New helper function.
3773 (aarch64_relocate_instruction): New function.
3774 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3775 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3776 (struct linux_target_ops): Install aarch64_get_thread_area,
3777 aarch64_install_fast_tracepoint_jump_pad and
3778 aarch64_get_min_fast_tracepoint_insn_len.
3780 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3782 * Makefile.in (aarch64-insn.o): New rule.
3783 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3785 2015-09-21 Yao Qi <yao.qi@linaro.org>
3787 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3789 2015-09-21 Yao Qi <yao.qi@linaro.org>
3791 * tracepoint.c (max_jump_pad_size): Remove.
3793 2015-09-18 Yao Qi <yao.qi@linaro.org>
3795 * linux-aarch64-low.c: Don't include sys/uio.h.
3796 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3798 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3800 * tracepoint.c (eval_result_type): Change prototype.
3801 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3803 2015-09-15 Pedro Alves <palves@redhat.com>
3805 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3806 Check whether to report exec events instead of checking whether
3807 multiprocess is enabled.
3809 2015-09-15 Pedro Alves <palves@redhat.com>
3812 * remote-utils.c (prepare_resume_reply): Merge
3813 TARGET_WAITKIND_VFORK_DONE switch case with the
3814 TARGET_WAITKIND_FORKED case.
3816 2015-09-15 Yao Qi <yao.qi@linaro.org>
3818 * server.c (handle_query): Check string comparison using
3819 "else if" instead of "if".
3821 2015-09-15 Yao Qi <yao.qi@linaro.org>
3823 * server.c (vCont_supported): New global variable.
3824 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3825 matches. Append ";vContSupported+" to own_buf.
3826 (handle_v_requests): Append ";s;S" to own_buf if target supports
3827 hardware single step or vCont_supported is false.
3828 (capture_main): Set vCont_supported to zero.
3830 2015-09-15 Yao Qi <yao.qi@linaro.org>
3832 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3834 (linux_supports_hardware_single_step): ... New function.
3835 (linux_target_ops): Update.
3836 * lynx-low.c (lynx_target_ops): Set field
3837 supports_hardware_single_step to target_can_do_hardware_single_step.
3838 * nto-low.c (nto_target_ops): Likewise.
3839 * spu-low.c (spu_target_ops): Likewise.
3840 * win32-low.c (win32_target_ops): Likewise.
3841 * target.c (target_can_do_hardware_single_step): New function.
3842 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3843 Remove. <supports_hardware_single_step>: New field.
3844 (target_supports_conditional_breakpoints): Remove.
3845 (target_supports_hardware_single_step): New macro.
3846 (target_can_do_hardware_single_step): Declare.
3847 * server.c (handle_query): Use target_supports_hardware_single_step
3848 instead of target_supports_conditional_breakpoints.
3850 2015-09-15 Yao Qi <yao.qi@linaro.org>
3852 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3854 (struct linux_target_ops the_low_target): Install
3855 aarch64_linux_siginfo_fixup.
3857 2015-09-11 Don Breazeal <donb@codesourcery.com>
3858 Luis Machado <lgustavo@codesourcery.com>
3860 * linux-low.c (linux_mourn): Static declaration.
3861 (linux_arch_setup): Move in front of
3862 handle_extended_wait.
3863 (linux_arch_setup_thread): New function.
3864 (handle_extended_wait): Handle exec events. Call
3865 linux_arch_setup_thread. Make event_lwp argument a
3866 pointer-to-a-pointer.
3867 (check_zombie_leaders): Do not check stopped threads.
3868 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3869 (linux_low_filter_event): Add lwp and thread for exec'ing
3870 non-leader thread if leader thread has been deleted.
3871 Refactor code into linux_arch_setup_thread and call it.
3872 Pass child lwp pointer by reference to handle_extended_wait.
3873 (linux_wait_for_event_filtered): Update comment.
3874 (linux_wait_1): Prevent clobbering exec event status.
3875 (linux_supports_exec_events): New function.
3876 (linux_target_ops) <supports_exec_events>: Initialize new member.
3877 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3879 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3880 * server.c (report_exec_events): New global variable.
3881 (handle_query): Handle qSupported query for exec-events feature.
3882 (captured_main): Initialize report_exec_events.
3883 * server.h (report_exec_events): Declare new global variable.
3884 * target.h (struct target_ops) <supports_exec_events>: New
3886 (target_supports_exec_events): New macro.
3887 * win32-low.c (win32_target_ops) <supports_exec_events>:
3888 Initialize new member.
3890 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3892 * linux-low.c (linux_low_enable_btrace): Remove.
3893 (linux_target_ops): Replace linux_low_enable_btrace with
3894 linux_enable_btrace.
3896 2015-09-03 Yao Qi <yao.qi@linaro.org>
3898 * linux-aarch64-low.c (aarch64_insert_point): Call
3899 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3902 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3904 * linux-low.c (check_stopped_by_breakpoint): Use
3905 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3907 2015-08-27 Pedro Alves <palves@redhat.com>
3909 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3911 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3913 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3914 the XNEW-family equivalent.
3915 (compile_bytecodes): Likewise.
3916 * dll.c (loaded_dll): Likewise.
3917 * event-loop.c (append_callback_event): Likewise.
3918 (create_file_handler): Likewise.
3919 (create_file_event): Likewise.
3920 * hostio.c (handle_open): Likewise.
3921 * inferiors.c (add_thread): Likewise.
3922 (add_process): Likewise.
3923 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3924 * linux-arm-low.c (arm_new_process): Likewise.
3925 (arm_new_thread): Likewise.
3926 * linux-low.c (add_to_pid_list): Likewise.
3927 (linux_add_process): Likewise.
3928 (handle_extended_wait): Likewise.
3929 (add_lwp): Likewise.
3930 (enqueue_one_deferred_signal): Likewise.
3931 (enqueue_pending_signal): Likewise.
3932 (linux_resume_one_lwp_throw): Likewise.
3933 (linux_resume_one_thread): Likewise.
3934 (linux_read_memory): Likewise.
3935 (linux_write_memory): Likewise.
3936 * linux-mips-low.c (mips_linux_new_process): Likewise.
3937 (mips_linux_new_thread): Likewise.
3938 (mips_add_watchpoint): Likewise.
3939 * linux-x86-low.c (initialize_low_arch): Likewise.
3940 * lynx-low.c (lynx_add_process): Likewise.
3941 * mem-break.c (set_raw_breakpoint_at): Likewise.
3942 (set_breakpoint): Likewise.
3943 (add_condition_to_breakpoint): Likewise.
3944 (add_commands_to_breakpoint): Likewise.
3945 (clone_agent_expr): Likewise.
3946 (clone_one_breakpoint): Likewise.
3947 * regcache.c (new_register_cache): Likewise.
3948 * remote-utils.c (look_up_one_symbol): Likewise.
3949 * server.c (queue_stop_reply): Likewise.
3950 (start_inferior): Likewise.
3951 (queue_stop_reply_callback): Likewise.
3952 (handle_target_event): Likewise.
3953 * spu-low.c (fetch_ppc_memory): Likewise.
3954 (store_ppc_memory): Likewise.
3955 * target.c (set_target_ops): Likewise.
3956 * thread-db.c (thread_db_load_search): Likewise.
3957 (try_thread_db_load_1): Likewise.
3958 * tracepoint.c (add_tracepoint): Likewise.
3959 (add_tracepoint_action): Likewise.
3960 (create_trace_state_variable): Likewise.
3961 (cmd_qtdpsrc): Likewise.
3962 (cmd_qtro): Likewise.
3963 (add_while_stepping_state): Likewise.
3964 * win32-low.c (child_add_thread): Likewise.
3965 (get_image_name): Likewise.
3967 2015-08-25 Yao Qi <yao.qi@linaro.org>
3969 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3971 2015-08-25 Yao Qi <yao.qi@linaro.org>
3973 * Makefile.in (aarch64-linux.o): New rule.
3974 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3976 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3977 (aarch64_init_debug_reg_state): Make it extern.
3978 (aarch64_linux_prepare_to_resume): Remove.
3980 2015-08-25 Yao Qi <yao.qi@linaro.org>
3982 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3983 lwp_arch_private_info and ptid_of_lwp.
3985 2015-08-25 Yao Qi <yao.qi@linaro.org>
3987 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3988 Find proc_info by find_process_pid. All callers updated.
3990 2015-08-25 Yao Qi <yao.qi@linaro.org>
3992 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3994 (debug_reg_change_callback): Remove.
3995 (aarch64_notify_debug_reg_change): Remove.
3997 2015-08-25 Yao Qi <yao.qi@linaro.org>
3999 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4000 Call current_lwp_ptid.
4002 2015-08-25 Yao Qi <yao.qi@linaro.org>
4004 * linux-aarch64-low.c (debug_reg_change_callback): Use
4007 2015-08-25 Yao Qi <yao.qi@linaro.org>
4009 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4011 2015-08-25 Yao Qi <yao.qi@linaro.org>
4013 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4015 2015-08-25 Yao Qi <yao.qi@linaro.org>
4017 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4020 2015-08-25 Yao Qi <yao.qi@linaro.org>
4022 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4024 (debug_reg_change_callback): Remove argument entry and add argument
4025 lwp. Remove local variable thread. Don't print thread id in the
4026 debugging output. Don't check whether pid of thread equals to pid.
4027 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4028 iterate_over_lwps instead find_inferior.
4030 2015-08-24 Pedro Alves <palves@redhat.com>
4032 * inferiors.c (get_first_process): New function.
4033 * inferiors.h (get_first_process): New declaration.
4034 * remote-utils.c (read_ptid): Default to the first process in the
4035 list, instead of to the current thread's process.
4037 2015-08-24 Pedro Alves <palves@redhat.com>
4039 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4040 * event-loop.c: Likewise.
4041 * remote-utils.c: Likewise.
4042 * tracepoint.c: Likewise.
4044 2015-08-24 Pedro Alves <palves@redhat.com>
4046 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4049 2015-08-21 Pedro Alves <palves@redhat.com>
4051 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4052 instead of literal 1.
4054 2015-08-21 Pedro Alves <palves@redhat.com>
4056 * tdesc.c (default_description): Explicitly zero-initialize.
4058 2015-08-21 Pedro Alves <palves@redhat.com>
4061 * inferiors.c (remove_thread): Discard any pending stop reply for
4063 * server.c (remove_all_on_match_pid): Rename to ...
4064 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4066 (discard_queued_stop_replies): Change parameter to a ptid. Now
4068 (handle_v_kill, kill_inferior_callback, captured_main)
4069 (process_serial_event): Adjust.
4070 * server.h (discard_queued_stop_replies): Declare.
4072 2015-08-21 Pedro Alves <palves@redhat.com>
4074 * linux-low.c (wait_for_sigstop): Always switch to no thread
4075 selected if the previously current thread dies.
4076 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4077 process instead of the current thread's.
4078 * remote-utils.c (input_interrupt): Don't check if there's no
4080 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4081 current thread to the general thread fails, error out.
4082 (handle_qxfer_auxv, handle_qxfer_libraries)
4083 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4084 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4085 (handle_query): Check if there's a thread selected instead of
4086 checking whether there's any thread in the thread list.
4087 (handle_qxfer_threads, handle_qxfer_btrace)
4088 (handle_qxfer_btrace_conf): Don't error out early if there's no
4089 thread in the thread list.
4090 (handle_v_cont, myresume): Don't set the current thread to the
4092 (process_serial_event) <Hg handling>: Also set thread_id if the
4093 previous general thread is still alive.
4094 (process_serial_event) <g/G handling>: If setting the current
4095 thread to the general thread fails, error out.
4096 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4097 thread's lwp instead of the current thread's.
4098 * target.c (set_desired_thread): If the desired thread was not
4099 found, leave the current thread pointing to NULL. Return an int
4100 (boolean) indicating success.
4101 * target.h (set_desired_thread): Change return type to int.
4103 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4105 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4106 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4108 (ps_get_thread_area): New function.
4110 2015-08-19 Gary Benson <gbenson@redhat.com>
4112 * hostio.c (handle_pread): Do not attempt to read more data
4113 than hostio_reply_with_data can fit in a packet.
4115 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4117 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4119 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4121 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4123 2015-08-06 Pedro Alves <palves@redhat.com>
4125 * tracepoint.c (expr_eval_result): Now an int.
4127 2015-08-06 Pedro Alves <palves@redhat.com>
4129 * gdbthread.h (struct regcache): Forward declare.
4130 (struct thread_info) <regcache_data>: Now a struct regcache
4132 * inferiors.c (inferior_regcache_data)
4133 (set_inferior_regcache_data): Now work with struct regcache
4135 * inferiors.h (struct regcache): Forward declare.
4136 (inferior_regcache_data, set_inferior_regcache_data): Now work
4137 with struct regcache pointers.
4138 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4139 (free_register_cache_thread): Remove struct regcache pointer
4142 2015-08-06 Pedro Alves <palves@redhat.com>
4144 * server.c (captured_main): On error, print the exception message
4145 to stderr, and if run_once is set, throw a quit.
4147 2015-08-06 Pedro Alves <palves@redhat.com>
4149 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4152 2015-08-06 Pedro Alves <palves@redhat.com>
4154 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4155 reading beyond the passed in buffer length.
4157 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4159 * tracepoint.c (symbol_list) <required>: Remove.
4161 2015-08-06 Pedro Alves <palves@redhat.com>
4163 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4164 count if stopping and suspending threads.
4165 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4166 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4167 (linux_detach): Complete an ongoing step-over.
4168 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4170 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4171 (linux_wait_1): If passing a signal to the inferior after
4172 finishing a step-over, unsuspend and re-resume all lwps. If we
4173 see a single-step event but the thread should be continuing, don't
4174 pass the trap to gdb.
4175 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4176 internal_error instead of gdb_assert.
4177 (enqueue_pending_signal): New function.
4178 (check_ptrace_stopped_lwp_gone): Add debug output.
4179 (start_step_over): Use internal_error instead of gdb_assert.
4180 (complete_ongoing_step_over): New function.
4181 (linux_resume_one_thread): Don't resume a suspended thread.
4182 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4185 2015-08-06 Pedro Alves <palves@redhat.com>
4187 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4188 (linux_thread_alive): Use lwp_is_marked_dead.
4189 (extended_event_reported): Delete.
4190 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4191 instead of extended_event_reported.
4192 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4194 (lwp_is_marked_dead): New function.
4195 (lwp_running): Use lwp_is_marked_dead.
4196 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4199 2015-08-06 Pedro Alves <palves@redhat.com>
4201 * linux-low.c (linux_wait_1): Move fork event output out of the
4202 !report_to_gdb check. Pass event_child->waitstatus to
4203 target_waitstatus_to_string instead of ourstatus.
4205 2015-08-04 Yao Qi <yao.qi@linaro.org>
4207 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4208 if current_thread is 32 bit.
4210 2015-08-04 Yao Qi <yao.qi@linaro.org>
4212 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4213 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4214 * server.c (extended_protocol): Remove "static".
4215 * server.h (extended_protocol): Declare it.
4217 2015-08-04 Yao Qi <yao.qi@linaro.org>
4219 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4220 both aarch64 and aarch32.
4221 (aarch64_set_pc): Likewise.
4223 2015-08-04 Yao Qi <yao.qi@linaro.org>
4225 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4226 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4227 arm-with-neon.xml to srv_xmlfiles.
4228 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4229 (is_64bit_tdesc): New function.
4230 (aarch64_linux_read_description): New function.
4231 (aarch64_arch_setup): Call aarch64_linux_read_description.
4232 (regs_info): Rename to regs_info_aarch64.
4233 (aarch64_regs_info): Return right regs_info.
4234 (initialize_low_arch): Call initialize_low_arch_aarch32.
4236 2015-08-04 Yao Qi <yao.qi@linaro.org>
4238 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4239 * linux-aarch32-low.c: New file.
4240 * linux-aarch32-low.h: New file.
4241 * linux-arm-low.c (arm_fill_gregset): Move it to
4242 linux-aarch32-low.c.
4243 (arm_store_gregset): Likewise.
4244 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4245 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4246 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4247 (regs_info): Rename to regs_info_arm.
4248 (arm_regs_info): Return regs_info_aarch32 if
4249 have_ptrace_getregset is 1 and target description is
4250 arm_with_neon or arm_with_vfpv3.
4251 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4252 Call initialize_low_arch_aarch32 instead.
4254 2015-08-04 Yao Qi <yao.qi@linaro.org>
4256 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4257 * linux-low.c: ... here.
4258 * linux-low.h (have_ptrace_getregset): Declare it.
4260 2015-08-04 Pedro Alves <palves@redhat.com>
4262 * thread-db.c (struct thread_db): Use new typedefs.
4263 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4265 (disable_thread_event_reporting): Cast result of dlsym to
4266 destination function pointer type.
4267 (thread_db_mourn): Use td_ta_delete_ftype.
4269 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4271 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4273 (CDX_BREAKPOINT): Define for R2.
4274 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4275 (the_low_target): Add comments.
4277 2015-07-30 Yao Qi <yao.qi@linaro.org>
4279 * linux-arm-low.c (arm_hwcap): Remove it.
4280 (arm_read_description): New local variable arm_hwcap. Don't
4281 set arm_hwcap to zero.
4283 2015-07-30 Yao Qi <yao.qi@linaro.org>
4285 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4286 Use regcache->tdesc instead.
4287 (arm_store_wmmxregset): Likewise.
4288 (arm_fill_vfpregset): Likewise.
4289 (arm_store_vfpregset): Likewise.
4291 2015-07-30 Yao Qi <yao.qi@linaro.org>
4293 * linux-arm-low.c: Include arch/arm.h.
4294 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4295 (arm_store_gregset): Likewise.
4297 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4299 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4300 ptrace's 4th parameter.
4302 2015-07-27 Yao Qi <yao.qi@linaro.org>
4304 * configure.srv (case aarch64*-*-linux*): Don't set
4307 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4309 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4311 * linux-arm-low.c: Likewise.
4312 * linux-cris-low.c: Likewise.
4313 * linux-crisv32-low.c: Likewise.
4314 * linux-low.c: Likewise.
4315 * linux-m68k-low.c: Likewise.
4316 * linux-mips-low.c: Likewise.
4317 * linux-nios2-low.c: Likewise.
4318 * linux-s390-low.c: Likewise.
4319 * linux-sparc-low.c: Likewise.
4320 * linux-tic6x-low.c: Likewise.
4321 * linux-tile-low.c: Likewise.
4322 * linux-x86-low.c: Likewise.
4324 2015-07-24 Pedro Alves <palves@redhat.com>
4326 * config.in: Regenerate.
4327 * configure: Regenerate.
4329 2015-07-24 Pedro Alves <palves@redhat.com>
4331 * acinclude.m4: Include ../ptrace.m4.
4332 * configure.ac: Call GDB_AC_PTRACE.
4333 * config.in, configure: Regenerate.
4335 2015-07-24 Yao Qi <yao.qi@linaro.org>
4337 * linux-low.c (linux_create_inferior): Remove setting to
4338 proc->priv->new_inferior.
4339 (linux_attach): Likewise.
4340 (linux_low_filter_event): Likewise.
4341 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4343 2015-07-24 Yao Qi <yao.qi@linaro.org>
4345 * linux-low.c (linux_arch_setup): New function.
4346 (linux_low_filter_event): If proc->tdesc is NULL and
4347 proc->attached is true, call the_low_target.arch_setup.
4348 Otherwise, keep status pending, and return.
4349 (linux_resume_one_lwp_throw): Don't call get_pc if
4350 thread->while_stepping isn't NULL. Don't call
4351 get_thread_regcache if proc->tdesc is NULL.
4352 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4353 (linux_target_ops): Install arch_setup.
4354 * server.c (start_inferior): Call the_target->arch_setup.
4355 * target.h (struct target_ops) <arch_setup>: New field.
4356 (target_arch_setup): New marco.
4357 * lynx-low.c (lynx_target_ops): Update.
4358 * nto-low.c (nto_target_ops): Update.
4359 * spu-low.c (spu_target_ops): Update.
4360 * win32-low.c (win32_target_ops): Update.
4362 2015-07-24 Yao Qi <yao.qi@linaro.org>
4364 * linux-low.c (linux_add_process): Don't set
4365 proc->priv->new_inferior.
4366 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4367 (linux_attach): Likewise.
4369 2015-07-24 Yao Qi <yao.qi@linaro.org>
4371 * server.c (start_inferior): Code refactor.
4373 2015-07-24 Yao Qi <yao.qi@linaro.org>
4375 * server.c (process_serial_event): Set general_thread.
4377 2015-07-21 Yao Qi <yao.qi@linaro.org>
4379 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4380 aarch64_linux_get_debug_reg_capacity.
4382 2015-07-17 Yao Qi <yao.qi@linaro.org>
4384 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4385 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4386 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4387 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4388 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4389 (AARCH64_HWP_ALIGNMENT): Likewise.
4390 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4391 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4392 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4393 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4394 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4395 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4396 (struct aarch64_debug_reg_state): Likewise.
4397 (struct arch_lwp_info): Likewise.
4398 (aarch64_align_watchpoint): Likewise.
4399 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4400 (aarch64_watchpoint_length): Likewise.
4401 (aarch64_point_encode_ctrl_reg): Likewise
4402 (aarch64_point_is_aligned): Likewise.
4403 (aarch64_align_watchpoint): Likewise.
4404 (aarch64_linux_set_debug_regs):
4405 (aarch64_dr_state_insert_one_point): Likewise.
4406 (aarch64_dr_state_remove_one_point): Likewise.
4407 (aarch64_handle_breakpoint): Likewise.
4408 (aarch64_handle_aligned_watchpoint): Likewise.
4409 (aarch64_handle_unaligned_watchpoint): Likewise.
4410 (aarch64_handle_watchpoint): Likewise.
4412 2015-07-17 Yao Qi <yao.qi@linaro.org>
4414 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4415 and don't aarch64_get_debug_reg_state. All callers update.
4416 (aarch64_handle_aligned_watchpoint): Likewise.
4417 (aarch64_handle_unaligned_watchpoint): Likewise.
4418 (aarch64_handle_watchpoint): Likewise.
4419 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4420 (aarch64_remove_point): Likewise.
4422 2015-07-17 Yao Qi <yao.qi@linaro.org>
4424 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4426 (aarch64_handle_unaligned_watchpoint): Likewise.
4428 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4430 Revert the previous 3 commits:
4431 Move gdb_regex* to common/
4432 Move linux_find_memory_regions_full & co.
4433 gdbserver build-id attribute generator
4435 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4436 Jan Kratochvil <jan.kratochvil@redhat.com>
4438 gdbserver build-id attribute generator.
4439 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4440 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4441 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4443 (get_dynamic): Use find_pdhr to traverse program headers.
4444 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4445 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4446 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4447 (get_hex_build_id): New.
4448 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4449 to reply XML document.
4451 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4452 Jan Kratochvil <jan.kratochvil@redhat.com>
4454 * target.c: Include target/target-utils.h and fcntl.h.
4455 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4456 (target_fileio_read_stralloc): New functions.
4458 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4460 * Makefile.in (OBS): Add gdb_regex.o.
4462 * config.in: Rebuilt.
4463 * configure: Rebuilt.
4465 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4466 Jan Kratochvil <jan.kratochvil@redhat.com>
4468 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4469 * Makefile.in (OBS): Add target-utils.o.
4470 (linux-maps.o, target-utils.o): New.
4471 * configure.srv (srv_linux_obj): Add linux-maps.o.
4473 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4475 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4477 (the_low_target): Install it.
4479 2015-07-14 Pedro Alves <palves@redhat.com>
4481 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4482 Instead, ignore ECHILD, and throw an error for other errnos.
4484 2015-07-10 Pedro Alves <palves@redhat.com>
4486 * event-loop.c (struct callback_event) <data>: Change type to
4487 gdb_client_data instance instead of gdb_client_data pointer.
4488 (append_callback_event): Adjust.
4490 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4492 * linux-aarch64-low.c: Add comments for each linux_target_ops
4493 method. Remove comments already covered in target_ops and
4494 linux_target_ops definitions.
4495 (the_low_target): Add comments for each unimplemented method.
4497 2015-07-09 Yao Qi <yao.qi@linaro.org>
4499 * linux-aarch64-low.c (aarch64_regmap): Remove.
4500 (aarch64_usrregs_info): Remove.
4501 (regs_info): Set field usrregs to NULL.
4503 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4505 * linux-low.c: Include "rsp-low.h"
4506 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4507 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4508 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4509 (handle_btrace_enable_pt): New.
4510 (handle_btrace_general_set): Support "pt".
4511 (handle_btrace_conf_general_set): Support "pt:size".
4513 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4515 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4518 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4520 * linux-aarch64-low.c: Remove comment about endianness.
4521 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4522 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4525 2015-06-24 Gary Benson <gbenson@redhat.com>
4527 * linux-i386-ipa.c (stdint.h): Do not include.
4528 * lynx-i386-low.c (stdint.h): Likewise.
4529 * lynx-ppc-low.c (stdint.h): Likewise.
4530 * mem-break.c (stdint.h): Likewise.
4531 * thread-db.c (stdint.h): Likewise.
4532 * tracepoint.c (stdint.h): Likewise.
4533 * win32-low.c (stdint.h): Likewise.
4535 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4537 * server.c (write_qxfer_response): Update call to
4538 remote_escape_output.
4540 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4541 Jan Kratochvil <jan.kratochvil@redhat.com>
4543 Merge multiple hex conversions.
4544 * gdbreplay.c (tohex): Rename to 'fromhex'.
4545 (logchar): Use fromhex.
4547 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4549 * server.c (handle_qxfer_libraries): Set `version' attribute for
4552 2015-06-10 Gary Benson <gbenson@redhat.com>
4554 * target.h (struct target_ops) <multifs_open>: New field.
4555 <multifs_unlink>: Likewise.
4556 <multifs_readlink>: Likewise.
4557 * linux-low.c (nat/linux-namespaces.h): New include.
4558 (linux_target_ops): Initialize the_target->multifs_open,
4559 the_target->multifs_unlink and the_target->multifs_readlink.
4560 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4561 * hostio.c (hostio_fs_pid): New static variable.
4562 (hostio_handle_new_gdb_connection): New function.
4563 (handle_setfs): Likewise.
4564 (handle_open): Use the_target->multifs_open as appropriate.
4565 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4566 (handle_readlink): Use the_target->multifs_readlink as
4568 (handle_vFile): Handle vFile:setfs packets.
4569 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4570 after target_handle_new_gdb_connection.
4572 2015-06-10 Gary Benson <gbenson@redhat.com>
4574 * configure.ac (AC_CHECK_FUNCS): Add setns.
4575 * config.in: Regenerate.
4576 * configure: Likewise.
4577 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4578 (linux-namespaces.o): New rule.
4579 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4581 2015-06-09 Gary Benson <gbenson@redhat.com>
4583 * hostio.c (handle_open): Process mode argument with
4584 fileio_to_host_mode.
4586 2015-06-01 Yao Qi <yao.qi@linaro.org>
4588 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4589 * linux-x86-low.c: Likewise.
4591 2015-05-28 Don Breazeal <donb@codesourcery.com>
4593 * linux-low.c (handle_extended_wait): Initialize
4594 thread_info.last_resume_kind for new fork children.
4596 2015-05-15 Pedro Alves <palves@redhat.com>
4598 * target.h (target_handle_new_gdb_connection): Rewrite using if
4599 wrapped in do/while.
4601 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4603 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4604 * configure, config.in: Regenerate.
4605 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4608 2015-05-12 Don Breazeal <donb@codesourcery.com>
4610 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4611 PTRACE_EVENT_VFORK_DONE.
4612 (linux_low_ptrace_options, extended_event_reported): Add vfork
4614 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4615 and "vforkdone" for RSP 'T' Stop Reply Packet.
4616 * server.h (report_vfork_events): Declare
4619 2015-05-12 Don Breazeal <donb@codesourcery.com>
4621 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4622 (the_low_target) <new_fork>: Initialize new member.
4623 * linux-arm-low.c (arm_new_fork): New function.
4624 (the_low_target) <new_fork>: Initialize new member.
4625 * linux-low.c (handle_extended_wait): Call new target function
4627 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4628 * linux-mips-low.c (mips_add_watchpoint): New function
4629 extracted from mips_insert_point.
4630 (the_low_target) <new_fork>: Initialize new member.
4631 (mips_linux_new_fork): New function.
4632 (mips_insert_point): Call mips_add_watchpoint.
4633 * linux-x86-low.c (x86_linux_new_fork): New function.
4634 (the_low_target) <new_fork>: Initialize new member.
4636 2015-05-12 Don Breazeal <donb@codesourcery.com>
4638 * linux-low.c (handle_extended_wait): Implement return value,
4639 rename argument 'event_child' to 'event_lwp', handle
4640 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4641 (linux_low_ptrace_options): New function.
4642 (linux_low_filter_event): Call linux_low_ptrace_options,
4643 use different argument fo linux_enable_event_reporting,
4644 use return value from handle_extended_wait.
4645 (extended_event_reported): New function.
4646 (linux_wait_1): Call extended_event_reported and set
4647 status to report fork events.
4648 (linux_write_memory): Add pid to debug message.
4649 (reset_lwp_ptrace_options_callback): New function.
4650 (linux_handle_new_gdb_connection): New function.
4651 (linux_target_ops): Initialize new structure member.
4652 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4653 * lynx-low.c: Initialize new structure member.
4654 * remote-utils.c (prepare_resume_reply): Implement stop reason
4655 "fork" for "T" stop message.
4656 * server.c (handle_query): Call handle_new_gdb_connection.
4657 * server.h (report_fork_events): Declare global flag.
4658 * target.h (struct target_ops) <handle_new_gdb_connection>:
4660 (target_handle_new_gdb_connection): New macro.
4661 * win32-low.c: Initialize new structure member.
4663 2015-05-12 Don Breazeal <donb@codesourcery.com>
4665 * mem-break.c (APPEND_TO_LIST): Define macro.
4666 (clone_agent_expr): New function.
4667 (clone_one_breakpoint): New function.
4668 (clone_all_breakpoints): New function.
4669 * mem-break.h: Declare new functions.
4671 2015-05-12 Don Breazeal <donb@codesourcery.com>
4673 * linux-low.c (linux_supports_fork_events): New function.
4674 (linux_supports_vfork_events): New function.
4675 (linux_target_ops): Initialize new structure members.
4676 (initialize_low): Call linux_check_ptrace_features.
4677 * lynx-low.c (lynx_target_ops): Initialize new structure
4679 * server.c (report_fork_events, report_vfork_events):
4681 (handle_query): Add new features to qSupported packet and
4683 (captured_main): Initialize new global variables.
4684 * target.h (struct target_ops) <supports_fork_events>:
4686 <supports_vfork_events>: New member.
4687 (target_supports_fork_events): New macro.
4688 (target_supports_vfork_events): New macro.
4689 * win32-low.c (win32_target_ops): Initialize new structure
4692 2015-05-12 Gary Benson <gbenson@redhat.com>
4694 * server.c (handle_qxfer_exec_file): Use current process
4697 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4699 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4700 Remove HAVE_PTRACE_GETREGS conditionals.
4701 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4702 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4704 2015-05-08 Yao Qi <yao.qi@linaro.org>
4706 * linux-low.c (linux_supports_conditional_breakpoints): New
4708 (linux_target_ops): Install new target method.
4709 * lynx-low.c (lynx_target_ops): Install NULL hook for
4710 supports_conditional_breakpoints.
4711 * nto-low.c (nto_target_ops): Likewise.
4712 * spu-low.c (spu_target_ops): Likewise.
4713 * win32-low.c (win32_target_ops): Likewise.
4714 * server.c (handle_query): Check
4715 target_supports_conditional_breakpoints.
4716 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4718 (target_supports_conditional_breakpoints): New macro.
4720 2015-05-06 Pedro Alves <palves@redhat.com>
4723 * server.c (start_inferior): If the process exits, mourn it.
4725 2015-04-21 Gary Benson <gbenson@redhat.com>
4727 * hostio.c (fileio_open_flags_to_host): Factored out to
4728 fileio_to_host_openflags in common/fileio.c. Single use
4731 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4733 * linux-xtensa-low.c (xtensa_fill_gregset)
4734 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4737 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4739 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4740 (regs_info): Replace usrregs pointer with NULL.
4742 2015-04-17 Gary Benson <gbenson@redhat.com>
4744 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4745 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4746 * server.c (handle_qxfer_exec_file): New function.
4747 (qxfer_packets): Add exec-file entry.
4748 (handle_query): Report qXfer:exec-file:read as supported packet.
4750 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4752 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4754 2015-04-09 Gary Benson <gbenson@redhat.com>
4756 * hostio-errno.c (errno_to_fileio_error): Remove function.
4757 Update caller to use remote_fileio_to_fio_error.
4759 2015-04-09 Yao Qi <yao.qi@linaro.org>
4761 * linux-low.c (linux_insert_point): Call
4762 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4763 (linux_remove_point): Call remove_memory_breakpoint if type is
4765 * linux-x86-low.c (x86_insert_point): Don't call
4766 insert_memory_breakpoint.
4767 (x86_remove_point): Don't call remove_memory_breakpoint.
4769 2015-04-01 Pedro Alves <palves@redhat.com>
4770 Cleber Rosa <crosa@redhat.com>
4772 * server.c (gdbserver_usage): Reorganize and extend the usage
4775 2015-03-24 Pedro Alves <palves@redhat.com>
4777 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4778 output. Also dump TRAP_TRACE.
4779 (linux_low_filter_event): In debug output, distinguish a
4780 resume_stop SIGSTOP from a delayed SIGSTOP.
4782 2015-03-24 Gary Benson <gbenson@redhat.com>
4784 * linux-x86-low.c (x86_linux_new_thread): Moved to
4786 (x86_linux_prepare_to_resume): Likewise.
4788 2015-03-24 Gary Benson <gbenson@redhat.com>
4790 * Makefile.in (x86-linux-dregs.o): New rule.
4791 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4792 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4793 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4794 (x86_linux_dr_get): Likewise.
4795 (x86_linux_dr_set): Likewise.
4796 (update_debug_registers_callback): Likewise.
4797 (x86_linux_dr_set_addr): Likewise.
4798 (x86_linux_dr_get_addr): Likewise.
4799 (x86_linux_dr_set_control): Likewise.
4800 (x86_linux_dr_get_control): Likewise.
4801 (x86_linux_dr_get_status): Likewise.
4802 (x86_linux_update_debug_registers): Likewise.
4804 2015-03-24 Gary Benson <gbenson@redhat.com>
4806 * linux-x86-low.c (x86_linux_update_debug_registers):
4807 New function, factored out from...
4808 (x86_linux_prepare_to_resume): ...this.
4810 2015-03-24 Gary Benson <gbenson@redhat.com>
4812 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4813 (x86_linux_dr_set): Likewise.
4814 (update_debug_registers_callback): Likewise.
4815 (x86_linux_dr_set_addr): Likewise.
4816 (x86_linux_dr_get_addr): Likewise.
4817 (x86_linux_dr_set_control): Likewise.
4818 (x86_linux_dr_get_control): Likewise.
4819 (x86_linux_dr_get_status): Likewise.
4820 (x86_linux_prepare_to_resume): Likewise.
4822 2015-03-24 Gary Benson <gbenson@redhat.com>
4824 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4825 Use perror_with_name. Pass string through gettext.
4826 (x86_linux_dr_set): Likewise.
4828 2015-03-24 Gary Benson <gbenson@redhat.com>
4830 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4831 (x86_linux_dr_set_addr): ...this.
4832 (x86_dr_low_get_addr): Rename to...
4833 (x86_linux_dr_get_addr): ...this.
4834 (x86_dr_low_set_control): Rename to...
4835 (x86_linux_dr_set_control): ...this.
4836 (x86_dr_low_get_control): Rename to...
4837 (x86_linux_dr_get_control): ...this.
4838 (x86_dr_low_get_status): Rename to...
4839 (x86_linux_dr_get_status): ...this.
4840 (x86_dr_low): Update with new function names.
4842 2015-03-24 Gary Benson <gbenson@redhat.com>
4844 * Makefile.in (x86-linux.o): New rule.
4845 * configure.srv: Add x86-linux.o to relevant targets.
4846 * linux-low.c (lwp_set_arch_private_info): New function.
4847 (lwp_arch_private_info): Likewise.
4848 * linux-x86-low.c: Include nat/x86-linux.h.
4849 (arch_lwp_info): Removed structure.
4850 (update_debug_registers_callback):
4851 Use lwp_set_debug_registers_changed.
4852 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4853 and lwp_set_debug_registers_changed.
4854 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4856 2015-03-24 Gary Benson <gbenson@redhat.com>
4858 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4859 * linux-arm-low.c (arm_new_thread): Likewise.
4860 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4861 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4862 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4863 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4865 2015-03-24 Gary Benson <gbenson@redhat.com>
4867 * linux-low.c (ptid_of_lwp): New function.
4868 (lwp_is_stopped): Likewise.
4869 (lwp_stop_reason): Likewise.
4870 * linux-x86-low.c (update_debug_registers_callback):
4872 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4875 2015-03-24 Gary Benson <gbenson@redhat.com>
4877 * linux-low.h (linux_stop_lwp): Remove declaration.
4879 2015-03-24 Gary Benson <gbenson@redhat.com>
4881 * linux-low.h: Include nat/linux-nat.h.
4882 * linux-low.c (iterate_over_lwps_args): New structure.
4883 (iterate_over_lwps_filter): New function.
4884 (iterate_over_lwps): Likewise.
4885 * linux-x86-low.c (update_debug_registers_callback):
4886 Update signature to what iterate_over_lwps expects.
4887 Remove PID check that iterate_over_lwps now performs.
4888 (x86_dr_low_set_addr): Use iterate_over_lwps.
4889 (x86_dr_low_set_control): Likewise.
4891 2015-03-24 Gary Benson <gbenson@redhat.com>
4893 * linux-x86-low.c (x86_debug_reg_state): New function.
4894 (x86_linux_prepare_to_resume): Use the above.
4896 2015-03-24 Gary Benson <gbenson@redhat.com>
4898 * linux-low.c (current_lwp_ptid): New function.
4899 * linux-x86-low.c: Include nat/linux-nat.h.
4900 (x86_dr_low_get_addr): Use current_lwp_ptid.
4901 (x86_dr_low_get_control): Likewise.
4902 (x86_dr_low_get_status): Likewise.
4904 2015-03-20 Pedro Alves <palves@redhat.com>
4906 * tracepoint.c (cmd_qtstatus): Make "str" const.
4908 2015-03-20 Pedro Alves <palves@redhat.com>
4910 * server.c (handle_general_set): Make "req_str" const.
4912 2015-03-19 Pedro Alves <palves@redhat.com>
4914 * linux-low.c (linux_resume_one_lwp): Rename to ...
4915 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4916 instead call perror_with_name.
4917 (check_ptrace_stopped_lwp_gone): New function.
4918 (linux_resume_one_lwp): Reimplement as wrapper around
4919 linux_resume_one_lwp_throw that swallows errors if the LWP is
4922 2015-03-19 Pedro Alves <palves@redhat.com>
4924 * linux-low.c (count_events_callback, select_event_lwp_callback):
4925 No longer check whether the thread has resume_stop as last resume
4928 2015-03-19 Pedro Alves <palves@redhat.com>
4930 * linux-low.c (count_events_callback, select_event_lwp_callback):
4931 Use the lwp's status_pending_p field, not the thread's.
4933 2015-03-19 Pedro Alves <palves@redhat.com>
4935 * linux-low.c (select_event_lwp_callback): Update comments to
4936 no longer mention SIGTRAP.
4938 2015-03-18 Gary Benson <gbenson@redhat.com>
4940 * server.c (handle_query): Do not report vFile:fstat as supported.
4942 2015-03-11 Gary Benson <gbenson@redhat.com>
4944 * hostio.c (sys/types.h): New include.
4945 (sys/stat.h): Likewise.
4946 (common-remote-fileio.h): Likewise.
4947 (handle_fstat): New function.
4948 (handle_vFile): Handle vFile:fstat packets.
4950 2015-03-11 Gary Benson <gbenson@redhat.com>
4952 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4953 struct stat.st_blocks and struct stat.st_blksize.
4954 * configure: Regenerate.
4955 * config.in: Likewise.
4956 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4957 (OBS): Add common-remote-fileio.o.
4958 (common-remote-fileio.o): New rule.
4960 2015-03-09 Pedro Alves <palves@redhat.com>
4962 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4963 'struct sockaddr' pointer in 'accept' call.
4965 2015-03-09 Pedro Alves <palves@redhat.com>
4968 2015-03-07 Pedro Alves <palves@redhat.com>
4969 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4970 or <winsock2.h> here. Instead include "gdb_socket.h".
4971 (remote_open): Use union gdb_sockaddr_u.
4972 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4973 or <winsock2.h> here. Instead include "gdb_socket.h".
4974 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4975 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4977 (init_named_socket, gdb_agent_helper_thread): Use union
4980 2015-03-07 Pedro Alves <palves@redhat.com>
4982 * configure.ac (build_warnings): Move
4983 -Wdeclaration-after-statement to the C-specific set.
4984 * configure: Regenerate.
4986 2015-03-07 Pedro Alves <palves@redhat.com>
4988 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4989 or <winsock2.h> here. Instead include "gdb_socket.h".
4990 (remote_open): Use union gdb_sockaddr_u.
4991 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4992 or <winsock2.h> here. Instead include "gdb_socket.h".
4993 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4994 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4996 (init_named_socket, gdb_agent_helper_thread): Use union
4999 2015-03-07 Pedro Alves <palves@redhat.com>
5001 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5004 2015-03-06 Yao Qi <yao.qi@linaro.org>
5006 * linux-aarch64-low.c (aarch64_insert_point): Use
5007 show_debug_regs as a boolean.
5008 (aarch64_remove_point): Likewise.
5010 2015-03-05 Pedro Alves <palves@redhat.com>
5012 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5013 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5014 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5015 * nto-low.c (nto_target_ops): Likewise.
5016 * spu-low.c (spu_target_ops): Likewise.
5017 * win32-low.c (win32_target_ops): Likewise.
5019 2015-03-04 Pedro Alves <palves@redhat.com>
5021 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5022 Decide whether a breakpoint triggered based on the SIGTRAP's
5024 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5025 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5026 (linux_low_filter_event): Check for breakpoints before checking
5028 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5030 (linux_stopped_by_sw_breakpoint)
5031 (linux_supports_stopped_by_sw_breakpoint)
5032 (linux_stopped_by_hw_breakpoint)
5033 (linux_supports_stopped_by_hw_breakpoint): New functions.
5034 (linux_target_ops): Install new target methods.
5036 2015-03-04 Pedro Alves <palves@redhat.com>
5038 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5039 * server.c (swbreak_feature, hwbreak_feature): New globals.
5040 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5041 (captured_main): Clear swbreak_feature and hwbreak_feature.
5042 * server.h (swbreak_feature, hwbreak_feature): Declare.
5043 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5044 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5045 supports_stopped_by_hw_breakpoint>: New fields.
5046 (target_supports_stopped_by_sw_breakpoint)
5047 (target_stopped_by_sw_breakpoint)
5048 (target_supports_stopped_by_hw_breakpoint)
5049 (target_stopped_by_hw_breakpoint): Declare.
5051 2015-03-04 Pedro Alves <palves@redhat.com>
5053 enum lwp_stop_reason -> enum target_stop_reason
5054 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5055 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5056 (linux_wait_1, stuck_in_jump_pad_callback)
5057 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5058 (linux_stopped_by_watchpoint):
5059 * linux-low.h (enum lwp_stop_reason): Delete.
5060 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5061 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5063 2015-03-04 Yao Qi <yao.qi@linaro.org>
5065 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5067 2015-03-03 Gary Benson <gbenson@redhat.com>
5069 * hostio.c (handle_vFile): Fix prefix lengths.
5071 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5073 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5076 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5078 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5079 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5080 (clean): Add "rm -f" for above C files.
5081 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5082 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5083 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5084 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5085 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5086 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5087 (init_registers_s390x_vx_linux64)
5088 (init_registers_s390x_tevx_linux64)
5089 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5090 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5092 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5093 (s390_store_vxrs_high): New functions.
5094 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5096 (s390_arch_setup): Add logic for selecting one of the new target
5097 descriptions. Activate the new vector regsets if applicable.
5098 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5099 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5100 and init_registers_s390x_tevx_linux64.
5102 2015-03-01 Pedro Alves <palves@redhat.com>
5104 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5107 2015-02-27 Pedro Alves <palves@redhat.com>
5109 * linux-x86-low.c (u_debugreg_offset): New function.
5110 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5112 2015-02-27 Pedro Alves <palves@redhat.com>
5114 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5115 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5116 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5117 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5118 (ps_lsetfpregs, ps_getpid)
5119 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5120 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5121 (ps_lsetxregs, ps_plog): Declare.
5123 2015-02-27 Pedro Alves <palves@redhat.com>
5125 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5126 IP_AGENT_EXPORT_FUNC.
5127 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5128 IP_AGENT_EXPORT_FUNC.
5129 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5130 (IP_AGENT_EXPORT): Delete.
5131 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5132 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5133 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5134 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5135 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5136 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5137 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5138 (traceframe_read_count, traceframe_write_count)
5139 (traceframes_created, trace_state_variables, get_raw_reg)
5140 (get_trace_state_variable_value, set_trace_state_variable_value)
5141 (ust_loaded, helper_thread_id, cmd_buf): Use
5142 IPA_SYM_EXPORTED_NAME.
5143 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5144 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5145 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5146 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5147 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5148 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5149 EXTERN_C_PUSH/EXTERN_C_POP.
5150 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5151 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5152 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5153 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5154 (traceframe_write_count, traceframe_read_count)
5155 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5156 (about_to_request_buffer_space, get_trace_state_variable_value)
5157 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5158 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5159 EXTERN_C_PUSH/EXTERN_C_POP.
5160 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5161 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5162 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5163 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5164 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5165 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5166 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5167 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5169 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5170 (IP_AGENT_EXPORT_VAR_DECL): Define.
5172 (gdb_agent_get_raw_reg): Declare.
5174 2015-02-27 Tom Tromey <tromey@redhat.com>
5175 Pedro Alves <palves@redhat.com>
5177 Rename symbols whose names are reserved C++ keywords throughout.
5179 2015-02-27 Pedro Alves <palves@redhat.com>
5181 * Makefile.in (COMPILER): New, get it from autoconf.
5182 (CXX): Get from autoconf instead.
5183 (COMPILE.pre): Use COMPILER.
5184 (CC-LD): Rename to ...
5185 (CC_LD): ... this. Use COMPILER.
5186 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5187 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5188 * acinclude.m4: Include build-with-cxx.m4.
5189 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5190 Disable -Werror by default if building in C++ mode.
5191 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5192 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5193 the C++ compiler. Save/restore CXXFLAGS too.
5194 * configure: Regenerate.
5196 2015-02-27 Pedro Alves <palves@redhat.com>
5198 * acinclude.m4: Include libiberty.m4.
5199 * configure.ac: Call libiberty_INIT.
5200 * config.in, configure: Regenerate.
5202 2015-02-26 Pedro Alves <palves@redhat.com>
5204 * linux-low.c (linux_wait_1): When incrementing the PC past a
5205 program breakpoint always use the_low_target.breakpoint_len as
5206 increment, rather than the maximum between that and
5207 the_low_target.decr_pc_after_break.
5209 2015-02-23 Pedro Alves <palves@redhat.com>
5211 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5212 thread was doing a step-over; always adjust the PC if
5213 we stepped over a permanent breakpoint.
5214 (linux_wait_1): If we stepped over breakpoint that was on top of a
5215 permanent breakpoint, manually advance the PC past it.
5217 2015-02-23 Pedro Alves <palves@redhat.com>
5219 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5221 (x86_fill_gregset, x86_store_gregset): Use it when handling
5224 2015-02-20 Pedro Alves <palves@redhat.com>
5226 * thread-db.c: Include "nat/linux-procfs.h".
5227 (thread_db_init): Skip listing new threads if the kernel supports
5228 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5230 2015-02-20 Pedro Alves <palves@redhat.com>
5232 * linux-low.c (status_pending_p_callback): Use ptid_match.
5234 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5236 PR breakpoints/16812
5237 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5238 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5239 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5241 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5243 PR breakpoints/15956
5244 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5246 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5248 * linux-low.c (linux_low_btrace_conf): Print size.
5249 * server.c (handle_btrace_conf_general_set): New.
5250 (hanle_general_set): Call handle_btrace_conf_general_set.
5251 (handle_query): Report Qbtrace-conf:bts:size as supported.
5253 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5255 * linux-low.c (linux_low_enable_btrace): Update parameters.
5256 (linux_low_btrace_conf): New.
5257 (linux_target_ops)<to_btrace_conf>: Initialize.
5258 * server.c (current_btrace_conf): New.
5259 (handle_btrace_enable): Rename to ...
5260 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5261 to target_enable_btrace. Update comment. Update users.
5262 (handle_qxfer_btrace_conf): New.
5263 (qxfer_packets): Add btrace-conf entry.
5264 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5265 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5266 (target_ops)<read_btrace_conf>: New.
5267 (target_enable_btrace): Update parameters.
5268 (target_read_btrace_conf): New.
5270 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5272 * server.c (handle_btrace_general_set): Remove call to
5273 target_supports_btrace.
5274 (supported_btrace_packets): New.
5275 (handle_query): Call supported_btrace_packets.
5276 * target.h: include btrace-common.h.
5277 (btrace_target_info): Removed.
5278 (supports_btrace, target_supports_btrace): Update parameters.
5280 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5282 * Makefile.in (SFILES): Add common/btrace-common.c.
5283 (OBS): Add common/btrace-common.o.
5284 (btrace-common.o): Add build rules.
5285 * linux-low: Include btrace-common.h.
5286 (linux_low_read_btrace): Use struct btrace_data. Call
5287 btrace_data_init and btrace_data_fini.
5289 2015-02-06 Pedro Alves <palves@redhat.com>
5291 * thread-db.c (find_new_threads_callback): Add debug output.
5293 2015-02-04 Pedro Alves <palves@redhat.com>
5295 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5296 (resume_stopped_resumed_lwps): New function.
5297 (linux_wait_for_event_filtered): Use it.
5299 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5301 * Makefile.in (SFILES): Add linux-personality.c.
5302 (linux-personality.o): New rule.
5303 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5304 list of objects to be built.
5305 * linux-low.c: Include nat/linux-personality.h.
5306 (linux_create_inferior): Remove code to disable address space
5307 randomization (moved to ../nat/linux-personality.c). Create
5308 cleanup to disable address space randomization.
5310 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5312 * Makefile.in (posix-strerror.o): New rule.
5313 (mingw-strerror.o): Likewise.
5314 * configure: Regenerated.
5315 * configure.ac: Source file ../common/common.host. Initialize new
5316 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5318 2015-01-14 Yao Qi <yao@codesourcery.com>
5320 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5321 (ppc-linux.o): New rule.
5322 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5323 * configure.ac: AC_CHECK_FUNCS(getauxval).
5324 * config.in: Re-generated.
5325 * configure: Re-generated.
5326 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5327 ppc64_64bit_inferior_p
5329 2015-01-14 Yao Qi <yao@codesourcery.com>
5331 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5332 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5333 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5334 (PT_ORIG_R3, PT_TRAP): Likewise.
5335 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5336 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5337 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5339 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5341 * i387-fp.c (i387_cache_to_xsave): In look over
5342 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5343 zmmh_low_space field by use of zmmh_high_space.
5345 2015-01-09 Pedro Alves <palves@redhat.com>
5347 * linux-low.c (step_over_bkpt): Move higher up in the file.
5348 (handle_extended_wait): Don't store the stop_pc here.
5349 (get_stop_pc): Adjust comments and rename to ...
5350 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5351 stopped for a software breakpoint or hardware breakpoint.
5352 (thread_still_has_status_pending_p): New function.
5353 (status_pending_p_callback): Use
5354 thread_still_has_status_pending_p. If the event is no longer
5355 interesting, resume the LWP.
5356 (handle_tracepoints): Add assert.
5357 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5358 (wstatus_maybe_breakpoint): New function.
5359 (cancel_breakpoint): Delete function.
5360 (check_stopped_by_watchpoint): New function, factored out from
5361 linux_low_filter_event.
5362 (lp_status_maybe_breakpoint): Delete function.
5363 (linux_low_filter_event): Remove filter_ptid argument.
5364 Leave thread group exits pending here. Store the LWP's stop PC.
5365 Always leave events pending.
5366 (linux_wait_for_event_filtered): Pull all events out of the
5367 kernel, and leave them all pending.
5368 (count_events_callback, select_event_lwp_callback): Consider all
5370 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5371 (select_event_lwp): Only give preference to the stepping LWP in
5372 all-stop mode. Adjust comments.
5373 (ignore_event): New function.
5374 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5375 references to cancel_breakpoints. Adjust to renames. Also give
5376 equal priority to all LWPs that have had events in non-stop mode.
5377 If reporting a software breakpoint event, unadjust the LWP's PC.
5378 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5379 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5381 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5382 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5383 (linux_stopped_by_watchpoint): Adjust.
5384 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5385 * linux-low.h (enum lwp_stop_reason): New.
5386 (struct lwp_info) <stop_pc>: Adjust comment.
5387 <stopped_by_watchpoint>: Delete field.
5388 <stop_reason>: New field.
5389 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5390 * mem-break.c (software_breakpoint_inserted_here)
5391 (hardware_breakpoint_inserted_here): New function.
5392 * mem-break.h (software_breakpoint_inserted_here)
5393 (hardware_breakpoint_inserted_here): Declare.
5394 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5395 (cancel_breakpoints): Delete.
5396 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5397 (upload_fast_traceframes): Remove references to
5400 2015-01-09 Pedro Alves <palves@redhat.com>
5402 * thread-db.c (find_new_threads_callback): Ignore thread if the
5403 kernel thread ID is -1.
5405 2015-01-09 Pedro Alves <palves@redhat.com>
5407 * linux-low.c (linux_attach_fail_reason_string): Move to
5408 nat/linux-ptrace.c, and rename.
5409 (linux_attach_lwp): Update comment.
5410 (attach_proc_task_lwp_callback): New function.
5411 (linux_attach): Adjust to rename and use
5412 linux_proc_attach_tgid_threads.
5413 (linux_attach_fail_reason_string): Delete declaration.
5415 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5417 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5418 * server.c (gdbserver_version): Likewise.
5420 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5422 * remote-utils.c: Include ctype.h.
5423 (input_interrupt): Explicitly handle the case when the char
5424 received is the NUL byte. Improve the printing of non-ASCII
5427 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5429 * linux-low.c (linux_low_filter_event): Update call to
5430 linux_enable_event_reporting following the addition of
5431 a new parameter to that function.
5433 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5436 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5437 (AARCH64_FPCR_REGNO): Likewise.
5438 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5439 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5440 (aarch64_store_fpregset): Likewise.
5442 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5444 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5445 Remove FIXME comment about assumption about N.
5447 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5449 * configure.ac: If large-file support is disabled in GDBserver,
5450 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5451 * configure: Regenerate.
5453 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5455 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5456 warning upon ENODATA from ptrace.
5457 * linux-s390-low.c (s390_store_tdb): New.
5458 (s390_regsets): Add regset for NT_S390_TDB.
5460 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5462 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5463 without a fill_function.
5464 * linux-s390-low.c (s390_fill_last_break): Remove.
5465 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5466 (s390_arch_setup): Use regset's size instead of fill_function for
5469 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5471 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5472 the regset's store function when ptrace returned an error.
5473 * regcache.c (get_thread_regcache): Invalidate register cache
5474 before fetching inferior's registers.
5476 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5478 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5479 while-loop as for-loop.
5480 (regsets_store_inferior_registers): Likewise.
5482 2014-11-28 Yao Qi <yao@codesourcery.com>
5484 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5485 * config.in, configure: Re-generate.
5486 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5489 2014-11-21 Yao Qi <yao@codesourcery.com>
5491 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5492 (AC_CHECK_HEADERS): Remove malloc.h.
5493 * configure: Re-generated.
5494 * config.in: Re-generated.
5495 * server.h: Don't include alloca.h and malloc.h.
5496 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5497 Don't include malloc.h.
5499 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5501 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5502 corresponding ERRNO check in same block.
5504 2014-11-12 Pedro Alves <palves@redhat.com>
5506 * server.c (cont_thread): Update comment.
5507 (start_inferior, attach_inferior): No longer clear cont_thread.
5508 (handle_v_cont): No longer set cont_thread.
5509 (captured_main): Clear cont_thread each time a GDB connects.
5511 2014-11-12 Pedro Alves <palves@redhat.com>
5513 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5514 thread, and don't resume all threads if the Hc thread has exited.
5516 2014-11-12 Pedro Alves <palves@redhat.com>
5518 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5519 the process group instead of to a specific LWP.
5521 2014-10-15 Pedro Alves <palves@redhat.com>
5524 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5526 (arm_set_thread_context): Delete.
5527 (the_low_target): Adjust.
5528 * win32-i386-low.c (debug_registers_changed)
5529 (debug_registers_used): Delete.
5530 (update_debug_registers_callback): New function.
5531 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5532 needing to update their debug registers.
5533 (win32_get_current_dr): New function.
5534 (x86_dr_low_get_addr, x86_dr_low_get_control)
5535 (x86_dr_low_get_status): Fetch the debug register from the thread
5537 (i386_initial_stuff): Adjust.
5538 (i386_get_thread_context): Remove current_event parameter. Don't
5539 clear debug_registers_changed nor copy DR values to
5541 (i386_set_thread_context): Delete.
5542 (i386_prepare_to_resume): New function.
5543 (i386_thread_added): Mark the thread as needing to update irs
5545 (the_low_target): Remove i386_set_thread_context and install
5546 i386_prepare_to_resume.
5547 * win32-low.c (win32_get_thread_context): Adjust.
5548 (win32_set_thread_context): Use SetThreadContext
5550 (win32_prepare_to_resume): New function.
5551 (win32_require_context): New function, factored out from ...
5552 (thread_rec): ... this.
5553 (continue_one_thread): Call win32_prepare_to_resume on each thread
5554 we're about to continue.
5555 (win32_resume): Call win32_prepare_to_resume on the event thread.
5556 * win32-low.h (struct win32_thread_info)
5557 <debug_registers_changed>: New field.
5558 (struct win32_target_ops): Change prototype of set_thread_context,
5559 delete set_thread_context and add prepare_to_resume.
5560 (win32_require_context): New declaration.
5562 2014-10-08 Gary Benson <gbenson@redhat.com>
5564 * server.h: Do not include common-exceptions.h.
5566 2014-10-08 Gary Benson <gbenson@redhat.com>
5568 * server.h: Do not include cleanups.h.
5570 2014-09-30 James Hogan <james.hogan@imgtec.com>
5572 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5575 2014-09-23 Yao Qi <yao@codesourcery.com>
5577 * linux-low.c (lp_status_maybe_breakpoint): New function.
5578 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5579 (count_events_callback): Likewise.
5580 (select_event_lwp_callback): Likewise.
5581 (cancel_breakpoints_callback): Likewise.
5583 2014-09-19 Don Breazeal <donb@codesourcery.com>
5585 * linux-low.c (handle_extended_wait): Call
5586 linux_ptrace_get_extended_event.
5587 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5588 linux_is_extended_waitstatus.
5590 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5592 * Makefile.in (CPPFLAGS): Define.
5593 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5594 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5596 2014-09-16 Gary Benson <gbenson@redhat.com>
5598 * inferiors.h (current_inferior): Renamed as...
5599 (current_thread): New variable. All uses updated.
5600 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5601 (maybe_move_out_of_jump_pad): Likewise.
5602 (cancel_breakpoint): Likewise.
5603 (linux_low_filter_event): Likewise.
5604 (wait_for_sigstop): Likewise.
5605 (linux_resume_one_lwp): Likewise.
5606 (need_step_over_p): Likewise.
5607 (start_step_over): Likewise.
5608 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5609 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5610 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5611 and save_inferior as saved_thread.
5612 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5614 (regcache_invalidate_thread): Likewise.
5615 * remote-utils.c (prepare_resume_reply): Likewise.
5616 * thread-db.c (thread_db_get_tls_address): Likewise.
5617 (disable_thread_event_reporting): Likewise.
5618 (remove_thread_event_breakpoints): Likewise.
5619 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5621 * target.h (set_desired_inferior): Renamed as...
5622 (set_desired_thread): New declaration. All uses updated.
5623 * server.c (myresume): Updated comment to reference thread instead
5625 (handle_serial_event): Likewise.
5626 (handle_target_event): Likewise.
5628 2014-09-12 Tom Tromey <tromey@redhat.com>
5629 Gary Benson <gbenson@redhat.com>
5631 * regcache.h: Include common-regcache.h.
5632 (regcache_read_pc): Don't declare.
5633 * regcache.c (get_thread_regcache_for_ptid): New function.
5635 2014-09-11 Tom Tromey <tromey@redhat.com>
5636 Gary Benson <gbenson@redhat.com>
5638 * symbol.c: New file.
5639 * Makefile.in (SFILES): Add symbol.c.
5640 (OBS): Add symbol.o.
5642 2014-09-11 Gary Benson <gbenson@redhat.com>
5644 * target.c (target_stop_ptid, target_continue_ptid): New
5647 2014-09-11 Tom Tromey <tromey@redhat.com>
5648 Gary Benson <gbenson@redhat.com>
5650 * target.h: Include target/target.h.
5651 * target.c (target_read_memory, target_read_uint32)
5652 (target_write_memory): New functions.
5654 2014-09-11 Gary Benson <gbenson@redhat.com>
5656 * server.h (debug_hw_points): Don't declare.
5657 * server.c (debug_hw_points): Don't define. Replace all uses
5658 with show_debug_regs.
5659 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5660 all uses with show_debug_regs.
5662 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5664 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5665 endianness into account.
5666 (ppc_supply_ptrace_register): Likewise.
5668 2014-09-03 James Hogan <james.hogan@imgtec.com>
5670 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5671 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5673 2014-09-03 Gary Benson <gbenson@redhat.com>
5675 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5676 ALL_DEBUG_ADDRESS_REGISTERS.
5678 2014-09-02 Gary Benson <gbenson@redhat.com>
5680 * i386-low.h: Renamed as...
5681 * x86-low.h: New file. All type, function and variable name
5682 prefixes changed from "i386_" to "x86_". All references updated.
5683 * i386-low.c: Renamed as...
5684 * x86-low.c: New file. All type, function and variable name
5685 prefixes changed from "i386_" to "x86_". All references updated.
5687 2014-09-02 Gary Benson <gbenson@redhat.com>
5689 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5690 (x86_linux_new_thread): Likewise.
5692 2014-08-29 Gary Benson <gbenson@redhat.com>
5694 * server.h (setjmp.h): Do not include.
5695 (toplevel): Do not declare.
5696 (common-exceptions.h): Include.
5697 (cleanups.h): Likewise.
5698 * server.c (toplevel): Do not define.
5699 (exit_code): New static global.
5700 (detach_or_kill_for_exit_cleanup): New function.
5701 (main): New function. Original main renamed to...
5702 (captured_main): New function.
5703 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5705 2014-08-29 Gary Benson <gbenson@redhat.com>
5707 * Makefile.in (SFILES): Add common/common-exceptions.c.
5708 (OBS): Add common-exceptions.o.
5709 (common-exceptions.o): New rule.
5710 * utils.c (prepare_to_throw_exception): New function.
5712 2014-08-29 Gary Benson <gbenson@redhat.com>
5714 * config.in: Regenerate.
5715 * configure: Likewise.
5717 2014-08-29 Gary Benson <gbenson@redhat.com>
5719 * Makefile.in (SFILES): Add common/cleanups.c.
5721 (cleanups.o): New rule.
5723 2014-08-29 Gary Benson <gbenson@redhat.com>
5725 * utils.c (internal_vwarning): New function.
5727 2014-08-28 Gary Benson <gbenson@redhat.com>
5729 * utils.h (fatal): Remove declaration.
5730 * utils.c (fatal): Remove function.
5732 2014-08-28 Gary Benson <gbenson@redhat.com>
5734 * tracepoint.c (gdb_agent_init): Replace fatal with
5736 (initialize_tracepoint): Likewise.
5738 2014-08-28 Gary Benson <gbenson@redhat.com>
5740 * remote-utils.c (remote_prepare): Replace fatal with error.
5742 2014-08-28 Gary Benson <gbenson@redhat.com>
5744 * linux-low.c (linux_async): Replace fatal with warning.
5746 (linux_start_non_stop): Return -1 if linux_async failed.
5748 2014-08-28 Gary Benson <gbenson@redhat.com>
5750 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5752 (i386_dr_low_get_addr): Remove vague comment.
5753 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5756 2014-08-28 Gary Benson <gbenson@redhat.com>
5758 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5759 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5761 (linux_resume_one_lwp): Likewise.
5762 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5764 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5765 with internal_error.
5766 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5767 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5768 (find_register_by_name): Replace fatal with internal_error.
5769 (find_regno): Likewise.
5770 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5771 * thread-db.c (thread_db_create_event): Likewise.
5772 (thread_db_load_search): Likewise.
5773 (try_thread_db_load_1): Likewise.
5774 * tracepoint.c (get_jump_space_head): Replace fatal with
5776 (claim_trampoline_space): Likewise.
5777 (have_fast_tracepoint_trampoline_buffer): Likewise.
5778 (cmd_qtstart): Likewise.
5779 (stop_tracing): Likewise.
5780 (fast_tracepoint_collecting): Likewise.
5781 (target_malloc): Likewise.
5782 (download_tracepoint): Likewise.
5783 (download_trace_state_variables): Replace check with gdb_assert.
5784 (upload_fast_traceframes): Replace fatal with internal_error.
5786 2014-08-19 Tom Tromey <tromey@redhat.com>
5787 Gary Benson <gbenson@redhat.com>
5789 * Makefile.in (SFILES): Add common/common-debug.c.
5790 (OBS): Add common-debug.o.
5791 (common-debug.o): New rule.
5792 * debug.h (debug_printf): Don't declare.
5793 * debug.c (debug_printf): Renamed and rewritten as...
5794 (debug_vprintf): New function.
5796 2014-08-19 Gary Benson <gbenson@redhat.com>
5798 * utils.h: Do not include print-utils.h.
5800 2014-08-19 Tom Tromey <tromey@redhat.com>
5801 Gary Benson <gbenson@redhat.com>
5803 * server.h: Add static assertion.
5804 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5806 2014-08-19 Tom Tromey <tromey@redhat.com>
5807 Gary Benson <gbenson@redhat.com>
5809 * Makefile.in (SFILES): Add common/errors.c.
5810 (OBS): Add errors.o.
5811 (IPA_OBS): Add errors-ipa.o.
5812 (errors.o): New rule.
5813 (errors-ipa.o): Likewise.
5814 * utils.h (perror_with_name, error, warning): Don't declare.
5815 * utils.c (warning): Renamed and rewritten as...
5816 (vwarning): New function.
5817 (error): Renamed and rewritten as...
5818 (verror): New function.
5819 (internal_error): Renamed and rewritten as...
5820 (internal_verror): New function.
5822 2014-08-07 Gary Benson <gbenson@redhat.com>
5824 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5825 * configure: Regenerate.
5826 * config.in: Likewise.
5827 * server.h: Do not include errno.h.
5828 * event-loop.c: Likewise.
5829 * hostio-errno.c: Likewise.
5830 * linux-low.c: Likewise.
5831 * remote-utils.c: Likewise.
5832 * spu-low.c: Likewise.
5833 * utils.c: Likewise.
5834 * gdbreplay.c: Unconditionally include errno.h.
5836 2014-08-07 Gary Benson <gbenson@redhat.com>
5838 * server.h: Do not include string.h.
5839 * event-loop.c: Likewise.
5840 * linux-low.c: Likewise.
5841 * regcache.c: Likewise.
5842 * remote-utils.c: Likewise.
5843 * spu-low.c: Likewise.
5844 * utils.c: Likewise.
5846 2014-08-07 Gary Benson <gbenson@redhat.com>
5848 * server.h: Do not include gdb_assert.h.
5850 2014-08-07 Gary Benson <gbenson@redhat.com>
5852 * server.h: Do not include common-utils.h.
5854 2014-08-07 Gary Benson <gbenson@redhat.com>
5856 * server.h: Do not include ptid.h.
5857 * notif.h: Likewise.
5859 2014-08-07 Gary Benson <gbenson@redhat.com>
5861 * server.h: Do not include gdb_locale.h.
5863 2014-08-07 Gary Benson <gbenson@redhat.com>
5865 * server.h: Do not include gdb/signals.h.
5866 * win32-low.c: Likewise.
5868 2014-08-07 Gary Benson <gbenson@redhat.com>
5870 * server.h: Do not include pathmax.h.
5872 2014-08-07 Gary Benson <gbenson@redhat.com>
5874 * server.h: Do not include libiberty.h.
5875 * linux-bfin-low.c: Likewise.
5877 2014-08-07 Gary Benson <gbenson@redhat.com>
5879 * server.h: Do not include ansidecl.h.
5881 2014-08-07 Gary Benson <gbenson@redhat.com>
5883 * linux-x86-low.c: Do not include stddef.h.
5884 * lynx-ppc-low.c: Likewise.
5885 * tracepoint.c: Likewise.
5887 2014-08-07 Gary Benson <gbenson@redhat.com>
5889 * server.h: Do not include stdarg.h.
5890 * nto-low.c: Likewise.
5892 2014-08-07 Gary Benson <gbenson@redhat.com>
5894 * server.h: Do not include stdlib.h.
5895 * inferiors.c: Likewise.
5896 * linux-low.c: Likewise.
5897 * regcache.c: Likewise.
5898 * spu-low.c: Likewise.
5899 * tracepoint.c: Likewise.
5900 * utils.c: Likewise.
5902 2014-08-07 Gary Benson <gbenson@redhat.com>
5904 * server.h: Do not include stdio.h.
5905 * linux-low.c: Likewise.
5906 * remote-utils.c: Likewise.
5907 * spu-low.c: Likewise.
5908 * utils.c: Likewise.
5909 * wincecompat.c: Likewise.
5911 2014-08-06 Gary Benson <gbenson@redhat.com>
5913 * regcache.c (init_register_cache): Move conditionals inside if.
5915 2014-08-06 Gary Benson <gbenson@redhat.com>
5917 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5919 2014-07-31 Gary Benson <gbenson@redhat.com>
5921 * ax.h: Do not include server.h.
5922 * gdbthread.h: Likewise.
5923 * lynx-low.h: Likewise.
5924 * notif.h: Likewise.
5926 2014-07-30 Gary Benson <gbenson@redhat.com>
5928 * server.h: Include common-defs.h.
5929 Do not include config.h or build-gnulib-gdbserver/config.h.
5931 2014-07-30 Gary Benson <gbenson@redhat.com>
5933 * hostio-errno.c: Move server.h to top of includes list.
5934 * inferiors.c: Likewise.
5935 * linux-x86-low.c: Likewise.
5936 * notif.c: Include server.h.
5938 2014-07-24 Tom Tromey <tromey@redhat.com>
5939 Gary Benson <gbenson@redhat.com>
5941 * server.h (CORE_ADDR): Now unsigned.
5943 2014-07-16 Pedro Alves <palves@redhat.com>
5945 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5947 2014-07-15 Pedro Alves <palves@redhat.com>
5949 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5952 2014-07-11 Pedro Alves <palves@redhat.com>
5954 * linux-low.c (kill_wait_lwp): New function, based on
5955 kill_one_lwp_callback, but use my_waitpid directly.
5956 (kill_one_lwp_callback, linux_kill): Use it.
5958 2014-06-23 Pedro Alves <palves@redhat.com>
5960 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5961 before setting DR0..DR3.
5963 2014-06-20 Gary Benson <gbenson@redhat.com>
5965 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5966 * configure: Regenerated.
5967 * config.in: Likewise.
5969 2014-06-20 Gary Benson <gbenson@redhat.com>
5971 * Makefile.in (SFILES): Update locations for files moved
5973 (object file files): Reordered.
5975 2014-06-20 Gary Benson <gbenson@redhat.com>
5977 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5978 (i386_dr_low_set_addr): Likewise.
5979 (i386_dr_low_get_addr): Likewise.
5980 (i386_dr_low_can_set_control): Likewise.
5981 (i386_dr_low_set_control): Likewise.
5982 (i386_dr_low_get_control): Likewise.
5983 (i386_dr_low_get_status): Likewise.
5984 (i386_get_debug_register_length): Likewise.
5985 * linux-x86-low.c (i386_dr_low_set_addr):
5986 Changed signature. Made static.
5987 (i386_dr_low_get_addr): Likewise.
5988 (i386_dr_low_set_control): Likewise.
5989 (i386_dr_low_get_control): Likewise.
5990 (i386_dr_low_get_status): Likewise.
5991 (i386_dr_low): New global variable.
5992 * win32-i386-low.c (i386_dr_low_set_addr):
5993 Changed signature. Made static.
5994 (i386_dr_low_get_addr): Likewise.
5995 (i386_dr_low_set_control): Likewise.
5996 (i386_dr_low_get_control): Likewise.
5997 (i386_dr_low_get_status): Likewise.
5998 (i386_dr_low): New global variable.
6000 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6002 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6003 * Makefile.in (AR, AR_FLAGS): Define.
6004 * configure: Regenerate.
6006 2014-06-19 Gary Benson <gbenson@redhat.com>
6008 * Makefile.in (i386-dregs.o): New rule.
6009 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6010 * i386-low.c (target.h): Remove include.
6011 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6012 (DR_CONTROL_SHIFT): Likewise.
6013 (DR_CONTROL_SIZE): Likewise.
6014 (DR_RW_EXECUTE): Likewise.
6015 (DR_RW_WRITE): Likewise.
6016 (DR_RW_READ): Likewise.
6017 (DR_RW_IORW): Likewise.
6018 (DR_LEN_1): Likewise.
6019 (DR_LEN_2): Likewise.
6020 (DR_LEN_4): Likewise.
6021 (DR_LEN_8): Likewise.
6022 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6023 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6024 (DR_ENABLE_SIZE): Likewise.
6025 (DR_LOCAL_SLOWDOWN): Likewise.
6026 (DR_GLOBAL_SLOWDOWN): Likewise.
6027 (DR_CONTROL_RESERVED): Likewise.
6028 (I386_DR_CONTROL_MASK): Likewise.
6029 (I386_DR_VACANT): Likewise.
6030 (I386_DR_LOCAL_ENABLE): Likewise.
6031 (I386_DR_GLOBAL_ENABLE): Likewise.
6032 (I386_DR_DISABLE): Likewise.
6033 (I386_DR_SET_RW_LEN): Likewise.
6034 (I386_DR_GET_RW_LEN): Likewise.
6035 (I386_DR_WATCH_HIT): Likewise.
6036 (i386_wp_op_t): Likewise.
6037 (i386_show_dr): Likewise.
6038 (i386_length_and_rw_bits): Likewise.
6039 (i386_insert_aligned_watchpoint): Likewise.
6040 (i386_remove_aligned_watchpoint): Likewise.
6041 (i386_handle_nonaligned_watchpoint): Likewise.
6042 i386_update_inferior_debug_regs(): Likewise.
6043 (i386_dr_insert_watchpoint): Likewise.
6044 (i386_dr_remove_watchpoint): Likewise.
6045 (i386_dr_region_ok_for_watchpoint): Likewise.
6046 (i386_dr_stopped_data_address): Likewise.
6047 (i386_dr_stopped_by_watchpoint): Likewise.
6049 2014-06-19 Gary Benson <gbenson@redhat.com>
6051 * i386-low.c (i386_dr_show): Renamed to
6052 i386_show_dr and made static. All uses updated.
6053 (i386_dr_length_and_rw_bits): Renamed to
6054 i386_length_and_rw_bits and made static.
6056 (i386_dr_insert_aligned_watchpoint): Renamed to
6057 i386_insert_aligned_watchpoint and made static.
6059 (i386_dr_remove_aligned_watchpoint): Renamed to
6060 i386_remove_aligned_watchpoint and made static.
6062 (i386_dr_update_inferior_debug_regs): Renamed to
6063 i386_update_inferior_debug_regs and made static.
6066 2014-06-18 Gary Benson <gbenson@redhat.com>
6068 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6069 (i386_dr_low_can_set_control): Likewise.
6070 (i386_get_debug_register_length): Likewise.
6071 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6072 (i386_dr_low_can_set_control): Likewise.
6073 (i386_get_debug_register_length): Likewise.
6075 2014-06-17 Gary Benson <gbenson@redhat.com>
6077 * i386-low.h (i386-dregs.h): New include.
6078 (DR_FIRSTADDR): Now in i386-dregs.h.
6079 (DR_LASTADDR): Likewise.
6080 (DR_NADDR): Likewise.
6081 (DR_STATUS): Likewise.
6082 (DR_CONTROL): Likewise.
6083 (i386_debug_reg_state): Likewise.
6084 (i386_dr_insert_watchpoint): Likewise.
6085 (i386_dr_remove_watchpoint): Likewise.
6086 (i386_dr_region_ok_for_watchpoint): Likewise.
6087 (i386_dr_stopped_data_address): Likewise.
6088 (i386_dr_stopped_by_watchpoint): Likewise.
6089 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6091 2014-06-18 Gary Benson <gbenson@redhat.com>
6093 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6094 i386_dr_insert_watchpoint.
6095 (i386_low_remove_watchpoint): Renamed to
6096 i386_dr_remove_watchpoint.
6097 (i386_low_region_ok_for_watchpoint): Renamed to
6098 i386_dr_region_ok_for_watchpoint.
6099 (i386_low_stopped_data_address): Renamed to
6100 i386_dr_stopped_data_address.
6101 (i386_low_stopped_by_watchpoint): Renamed to
6102 i386_dr_stopped_by_watchpoint.
6103 * i386-low.c (i386_show_dr): Renamed to
6104 i386_dr_show and made nonstatic. All uses updated.
6105 (i386_length_and_rw_bits): Renamed to
6106 i386_dr_length_and_rw_bits and made nonstatic.
6108 (i386_insert_aligned_watchpoint): Renamed to
6109 i386_dr_insert_aligned_watchpoint and made nonstatic.
6111 (i386_remove_aligned_watchpoint): Renamed to
6112 i386_dr_remove_aligned_watchpoint and made nonstatic.
6114 (i386_update_inferior_debug_regs): Renamed to
6115 i386_dr_update_inferior_debug_regs and made nonstatic.
6117 (i386_low_insert_watchpoint): Renamed to
6118 i386_dr_insert_watchpoint. All uses updated.
6119 (i386_low_remove_watchpoint): Renamed to
6120 i386_dr_remove_watchpoint. All uses updated.
6121 (i386_low_region_ok_for_watchpoint): Renamed to
6122 i386_dr_region_ok_for_watchpoint. All uses updated.
6123 (i386_low_stopped_data_address): Renamed to
6124 i386_dr_stopped_data_address. All uses updated.
6125 (i386_low_stopped_by_watchpoint): Renamed to
6126 i386_dr_stopped_by_watchpoint. All uses updated.
6128 2014-06-18 Gary Benson <gbenson@redhat.com>
6130 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6131 (i386_dr_low_can_set_control): Likewise.
6132 (i386_insert_aligned_watchpoint): New check.
6134 2014-06-18 Gary Benson <gbenson@redhat.com>
6136 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6139 2014-06-18 Gary Benson <gbenson@redhat.com>
6141 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6142 instead of fatal and error.
6143 (i386_handle_nonaligned_watchpoint): Likewise.
6145 2014-06-18 Gary Benson <gbenson@redhat.com>
6147 * i386-low.c (i386_get_debug_register_length): New macro.
6148 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6149 (i386_show_dr): Use debug_printf instead of fprintf. Use
6150 phex to format values.
6152 2014-06-18 Gary Benson <gbenson@redhat.com>
6154 * i386-low.h: Comment changes.
6155 * i386-low.c: Likewise.
6157 2014-06-18 Gary Benson <gbenson@redhat.com>
6159 * i386-low.c: Whitespace changes.
6161 2014-06-12 Tom Tromey <tromey@redhat.com>
6163 * utils.c (freeargv): Remove.
6165 2014-06-12 Tom Tromey <tromey@redhat.com>
6167 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6168 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6169 (parse_debug_format_options): Likewise.
6170 (gdbserver_usage): Likewise.
6171 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6172 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6173 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6175 ($(LIBGNU)): Depend on libiberty.
6176 (all-lib): Recurse into all subdirs.
6177 (install-only): Invoke "install" target in subdirs.
6178 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6180 * configure: Rebuild.
6181 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6182 for vasprintf, vsnprintf, or gettimeofday.
6183 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6186 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6188 * development.sh: Delete.
6189 * Makefile.in (config.status): Adjust dependency on development.sh.
6190 * configure.ac: Adjust development.sh source call.
6191 * configure: Regenerate.
6193 2014-06-02 Pedro Alves <palves@redhat.com>
6195 * ax.c (gdb_free_agent_expr): New function.
6196 * ax.h (gdb_free_agent_expr): New declaration.
6197 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6199 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6201 (clear_breakpoint_conditions_and_commands): New function.
6202 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6203 (clear_breakpoint_conditions_and_commands): New declaration.
6205 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6207 * linux-aarch64-low.c (asm/ptrace.h): Include.
6209 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6211 Fix TLS access for -static -pthread.
6212 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6213 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6214 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6216 2014-05-20 Pedro Alves <palves@redhat.com>
6218 * linux-aarch64-low.c (aarch64_insert_point)
6219 (aarch64_remove_point): No longer check whether the type is
6220 supported here. Adjust to new interface.
6221 (the_low_target): Install aarch64_supports_z_point_type as
6222 supports_z_point_type method.
6223 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6224 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6225 instead of a Z packet char. Adjust.
6226 (arm_supports_z_point_type): New function.
6227 (arm_insert_point, arm_remove_point): Adjust to new interface.
6228 (the_low_target): Install arm_supports_z_point_type.
6229 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6230 (cris_insert_point, cris_remove_point): Adjust to new interface.
6231 Don't check whether the type is supported here.
6232 (the_low_target): Install cris_supports_z_point_type.
6233 * linux-low.c (linux_supports_z_point_type): New function.
6234 (linux_insert_point, linux_remove_point): Adjust to new interface.
6235 * linux-low.h (struct linux_target_ops) <insert_point,
6236 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6237 raw_breakpoint pointer parameter.
6238 <supports_z_point_type>: New method.
6239 * linux-mips-low.c (mips_supports_z_point_type): New function.
6240 (mips_insert_point, mips_remove_point): Adjust to new interface.
6241 Use mips_supports_z_point_type.
6242 (the_low_target): Install mips_supports_z_point_type.
6243 * linux-ppc-low.c (the_low_target): Install NULL as
6244 supports_z_point_type method.
6245 * linux-s390-low.c (the_low_target): Install NULL as
6246 supports_z_point_type method.
6247 * linux-sparc-low.c (the_low_target): Install NULL as
6248 supports_z_point_type method.
6249 * linux-x86-low.c (x86_supports_z_point_type): New function.
6250 (x86_insert_point): Adjust to new insert_point interface. Use
6251 insert_memory_breakpoint. Adjust to new
6252 i386_low_insert_watchpoint interface.
6253 (x86_remove_point): Adjust to remove_point interface. Use
6254 remove_memory_breakpoint. Adjust to new
6255 i386_low_remove_watchpoint interface.
6256 (the_low_target): Install x86_supports_z_point_type.
6257 * lynx-low.c (lynx_target_ops): Install NULL as
6258 supports_z_point_type callback.
6259 * nto-low.c (nto_supports_z_point_type): New.
6260 (nto_insert_point, nto_remove_point): Adjust to new interface.
6261 (nto_target_ops): Install nto_supports_z_point_type.
6262 * mem-break.c: Adjust intro comment.
6263 (struct raw_breakpoint) <raw_type, size>: New fields.
6264 <inserted>: Update comment.
6265 <shlib_disabled>: Delete field.
6266 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6267 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6268 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6269 (raw_bkpt_type_to_target_hw_bp_type): New function.
6270 (find_enabled_raw_code_breakpoint_at): New function.
6271 (find_raw_breakpoint_at): New type and size parameters. Use them.
6272 (insert_memory_breakpoint): New function, based off
6273 set_raw_breakpoint_at.
6274 (remove_memory_breakpoint): New function.
6275 (set_raw_breakpoint_at): Reimplement.
6276 (set_breakpoint): New, based on set_breakpoint_at.
6277 (set_breakpoint_at): Reimplement.
6278 (delete_raw_breakpoint): Go through the_target->remove_point
6279 instead of assuming memory breakpoints.
6280 (find_gdb_breakpoint_at): Delete.
6281 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6282 (find_gdb_breakpoint): New function.
6283 (set_gdb_breakpoint_at): Delete.
6284 (z_type_supported): New function.
6285 (set_gdb_breakpoint_1): New function, loosely based off
6286 set_gdb_breakpoint_at.
6287 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6288 (delete_gdb_breakpoint_at): Delete.
6289 (delete_gdb_breakpoint_1): New function, loosely based off
6290 delete_gdb_breakpoint_at.
6291 (delete_gdb_breakpoint): New function.
6292 (clear_gdb_breakpoint_conditions): Rename to ...
6293 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6295 (add_condition_to_breakpoint): Make static.
6296 (add_breakpoint_condition): Take a struct breakpoint pointer
6297 instead of an address. Adjust.
6298 (gdb_condition_true_at_breakpoint): Rename to ...
6299 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6301 (gdb_condition_true_at_breakpoint): Reimplement.
6302 (add_breakpoint_commands): Take a struct breakpoint pointer
6303 instead of an address. Adjust.
6304 (gdb_no_commands_at_breakpoint): Rename to ...
6305 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6306 parameter. Return true if no breakpoint was found. Change debug
6308 (gdb_no_commands_at_breakpoint): Reimplement.
6309 (run_breakpoint_commands): Rename to ...
6310 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6311 and change return type to boolean.
6312 (run_breakpoint_commands): New function.
6313 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6314 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6315 breakpoint. Go through the_target->remove_point instead of
6316 assuming memory breakpoint.
6317 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6318 software and hardware breakpoints.
6319 (reinsert_raw_breakpoint): Go through the_target->insert_point
6320 instead of assuming memory breakpoint.
6321 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6322 software and hardware breakpoints.
6323 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6324 Check both software and hardware breakpoints.
6325 (validate_inserted_breakpoint): Assert the breakpoint is a
6326 software breakpoint. Set the inserted flag to -1 instead of
6327 setting shlib_disabled.
6328 (delete_disabled_breakpoints): Adjust.
6329 (validate_breakpoints): Only validate software breakpoints.
6330 Adjust to inserted flag change.
6331 (check_mem_read, check_mem_write): Skip breakpoint types other
6332 than software breakpoints. Adjust to inserted flag change.
6333 * mem-break.h (enum raw_bkpt_type): New enum.
6334 (raw_breakpoint, struct process_info): Forward declare.
6335 (Z_packet_to_target_hw_bp_type): Delete declaration.
6336 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6337 (set_gdb_breakpoint, delete_gdb_breakpoint)
6338 (clear_breakpoint_conditions): New declarations.
6339 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6340 (breakpoint_inserted_here): Update comment.
6341 (add_breakpoint_condition, add_breakpoint_commands): Replace
6342 address parameter with a breakpoint pointer parameter.
6343 (gdb_breakpoint_here): Update comment.
6344 (delete_gdb_breakpoint_at): Delete.
6345 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6346 * server.c (process_point_options): Take a struct breakpoint
6347 pointer instead of an address. Adjust.
6348 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6349 delete_gdb_breakpoint.
6350 * spu-low.c (spu_target_ops): Install NULL as
6351 supports_z_point_type method.
6352 * target.h: Include mem-break.h.
6353 (struct target_ops) <prepare_to_access_memory>: Update comment.
6354 <supports_z_point_type>: New field.
6355 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6356 instead of a char. Also take a raw breakpoint pointer.
6357 * win32-arm-low.c (the_low_target): Install NULL as
6358 supports_z_point_type.
6359 * win32-i386-low.c (i386_supports_z_point_type): New function.
6360 (i386_insert_point, i386_remove_point): Adjust to new interface.
6361 (the_low_target): Install i386_supports_z_point_type.
6362 * win32-low.c (win32_supports_z_point_type): New function.
6363 (win32_insert_point, win32_remove_point): Adjust to new interface.
6364 (win32_target_ops): Install win32_supports_z_point_type.
6365 * win32-low.h (struct win32_target_ops):
6366 <supports_z_point_type>: New method.
6367 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6368 instead of a char. Also take a raw breakpoint pointer.
6370 2014-05-20 Pedro Alves <palves@redhat.com>
6372 * mem-break.h: Include break-common.h.
6373 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6374 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6375 (Z_packet_to_target_hw_bp_type): New declaration.
6376 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6377 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6378 (Z_PACKET_ACCESS_WP): Delete macros.
6379 (Z_packet_to_hw_type): Delete function.
6380 * i386-low.h: Don't include break-common.h here.
6381 (Z_packet_to_hw_type): Delete declaration.
6382 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6383 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6384 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6385 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6386 * linux-aarch64-low.c: Don't include break-common.h here.
6387 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6388 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6389 (Z_packet_to_target_hw_bp_type): Delete function.
6390 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6392 (mips_insert_point, mips_remove_point): Use
6393 Z_packet_to_target_hw_bp_type.
6395 2014-05-20 Pedro Alves <palves@redhat.com>
6397 * linux-aarch64-low.c: Include break-common.h.
6398 (enum target_point_type): Delete.
6399 (Z_packet_to_point_type): Rename to ...
6400 (Z_packet_to_target_hw_bp_type): ... this, and return a
6401 target_hw_bp_type instead.
6402 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6403 instead of an enum target_point_type.
6404 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6406 (aarch64_dr_state_insert_one_point)
6407 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6408 (aarch64_handle_aligned_watchpoint)
6409 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6410 Take an enum target_hw_bp_type instead of an enum
6412 (aarch64_supports_z_point_type): New function.
6413 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6414 use Z_packet_to_target_hw_bp_type.
6416 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6418 * configure.ac: Only use -Werror by default when DEVELOPMENT
6420 * configure: Regenerate.
6422 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6424 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6425 * linux-x86-low.c (X86_64_USER_REGS): New.
6426 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6428 2014-04-28 Yao Qi <yao@codesourcery.com>
6430 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6433 2014-04-25 Pedro Alves <palves@redhat.com>
6436 * linux-low.c (linux_attach_fail_reason_string): New function.
6437 (linux_attach_lwp): Delete.
6438 (linux_attach_lwp_1): Rename to ...
6439 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6440 argument. Remove "initial" parameter. Return int instead of
6441 void. Don't error or warn here.
6442 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6443 failure to attach to the tgid. Call warning when failing to
6445 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6446 argument. Remove "initial" parameter. Return int instead of
6447 void. Don't error or warn here.
6448 (linux_attach_fail_reason_string): New declaration.
6449 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6450 interface change. Use linux_attach_fail_reason_string.
6452 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6453 Walfred Tedeschi <walfred.tedeschi@intel.com>
6455 * Makefile.in: Added rules to handle new files
6456 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6457 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6458 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6459 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6460 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6461 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6463 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6464 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6465 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6466 i386/x32-avx512.xml.
6467 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6468 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6469 i386/x32-avx512-linux.xml.
6470 * i387-fp.c (num_avx512_k_registers): New constant for number
6472 (num_avx512_zmmh_low_registers): New constant for number of
6473 lower ZMM registers (0-15).
6474 (num_avx512_zmmh_high_registers): New constant for number of
6475 higher ZMM registers (16-31).
6476 (num_avx512_ymmh_registers): New contant for number of higher
6477 YMM registers (ymm16-31 added by avx521 on x86_64).
6478 (num_avx512_xmm_registers): New constant for number of higher
6479 XMM registers (xmm16-31 added by AVX512 on x86_64).
6480 (struct i387_xsave): Add space for AVX512 registers.
6481 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6482 Add code to handle AVX512 registers.
6483 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6484 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6485 prototypei from generated file.
6486 (tdesc_amd64_avx512_linux): Likewise.
6487 (init_registers_x32_avx512_linux): Likewise.
6488 (tdesc_x32_avx512_linux): Likewise.
6489 (init_registers_i386_avx512_linux): Likewise.
6490 (tdesc_i386_avx512_linux): Likewise.
6491 (x86_64_regmap): Add AVX512 registers.
6492 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6494 (initialize_low_arch): Add code to initialize AVX512 registers.
6496 2014-04-23 Pedro Alves <palves@redhat.com>
6498 * mem-break.c (find_gdb_breakpoint_at): Make static.
6499 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6501 2014-04-23 Pedro Alves <palves@redhat.com>
6503 * i386-low.c: Don't include break-common.h here.
6504 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6505 prototype to take target_hw_bp_type as argument instead of a Z
6507 * i386-low.h: Include break-common.h here.
6508 (Z_packet_to_hw_type): Declare.
6509 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6511 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6512 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6513 (x86_remove_point): Convert the packet number to a
6514 target_hw_bp_type before calling i386_low_remove_watchpoint.
6515 * win32-i386-low.c (i386_insert_point): Convert the packet number
6516 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6517 (i386_remove_point): Convert the packet number to a
6518 target_hw_bp_type before calling i386_low_remove_watchpoint.
6520 2014-04-23 Pedro Alves <palves@redhat.com>
6522 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6524 2014-04-10 Pedro Alves <palves@redhat.com>
6526 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6527 Check if the condition or command is NULL before checking if the
6528 breakpoint is known. On success, return true.
6529 * mem-break.h (add_breakpoint_condition): Document return.
6530 (add_breakpoint_commands): Add describing comment.
6531 * server.c (skip_to_semicolon): New function.
6532 (process_point_options): Use it.
6534 2014-04-09 Pedro Alves <palves@redhat.com>
6536 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6539 2014-02-27 Pedro Alves <palves@redhat.com>
6542 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6544 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6546 (last_thread_of_process_p): Take a PID argument instead of a
6548 (linux_wait_for_lwp): Delete.
6549 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6551 (linux_low_filter_event): New function, party factored out from
6552 linux_wait_for_event.
6553 (linux_wait_for_event): Rename to ...
6554 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6555 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6556 sigsuspend. Check for zombie leaders.
6557 (linux_wait_for_event): Reimplement as wrapper around
6558 linux_wait_for_event_filtered.
6559 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6560 a normal or signal exit is seen, it's the whole process exiting.
6561 (wait_for_sigstop): No longer a for_each_inferior callback.
6562 Rewrite on top of linux_wait_for_event_filtered.
6563 (stop_all_lwps): Call wait_for_sigstop directly.
6564 * server.c (resume, handle_target_event): Handle
6565 TARGET_WAITKIND_NO_RESUMED.
6567 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6569 * win32-low.c (psapi_get_dll_name,
6570 * win32_CreateToolhelp32Snapshot): Delete.
6571 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6572 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6574 (handle_load_dll): Add function description.
6575 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6577 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6579 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6581 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6582 base address when calling win32_add_one_solib.
6583 (handle_load_dll): Delete local variable load_addr.
6584 Remove 0x1000 offset applied to DLL base address when calling
6585 win32_add_one_solib.
6586 (handle_unload_dll): Add comment.
6588 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6590 * win32-low.c (win32_add_all_dlls): Renames
6591 win32_ensure_ntdll_loaded. Rewrite function documentation.
6592 Adjust implementation to always load all DLLs.
6593 Add 0x1000 offset to DLL base address when calling
6594 win32_add_one_solib.
6595 (child_initialization_done): New static global.
6596 (do_initial_child_stuff): Set child_initialization_done to
6597 zero during child initialization, and 1 after. Replace call
6598 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6600 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6601 (handle_unload_dll): Add function documentation.
6602 (get_child_debug_event): Ignore load and unload DLL events
6603 during child initialization.
6605 2014-02-20 Doug Evans <dje@google.com>
6607 Remove global all_lwps.
6608 * inferiors.h (ptid_of): Move here from linux-low.h.
6609 (pid_of, lwpid_of): Ditto.
6610 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6611 parameter is a struct thread_info * now.
6612 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6613 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6614 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6616 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6617 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6618 * linux-arm-low.c (update_registers_callback): Update, "entry"
6619 parameter is a struct thread_info * now.
6620 Fetch lwpid from current_inferior directly.
6621 (arm_insert_point): Pass &all_threads to find_inferior instead of
6623 (arm_remove_point): Ditto.
6624 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6625 (arm_prepare_to_resume): Fetch pid from thread.
6626 (arm_read_description): Fetch lwpid from current_inferior directly.
6627 * linux-low.c (all_lwps): Delete.
6628 (delete_lwp): Delete call to remove_inferior.
6629 (handle_extended_wait): Fetch lwpid from thread.
6630 (add_lwp): Don't set lwp->entry.id. Remove call to
6631 add_inferior_to_list.
6632 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6633 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6634 (kill_one_lwp_callback): Ditto.
6635 (linux_kill): Don't dereference NULL pointer.
6636 Fetch ptid,lwpid from thread.
6637 (get_detach_signal): Fetch ptid from thread.
6638 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6639 Simplify call to regcache_invalidate_thread.
6640 (delete_lwp_callback): Update, "entry" parameter is a
6641 struct thread_info * now. Fetch pid from thread.
6642 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6643 (status_pending_p_callback): Update, "entry" parameter is a
6644 struct thread_info * now. Fetch ptid from thread.
6645 (find_lwp_pid): Update, "entry" parameter is a
6646 struct thread_info * now.
6647 (linux_wait_for_lwp): Fetch pid from thread.
6648 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6649 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6650 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6651 (dequeue_one_deferred_signal): Ditto.
6652 (cancel_breakpoint): Fetch ptid from current_inferior.
6653 (linux_wait_for_event): Pass &all_threads to find_inferior,
6654 not &all_lwps. Fetch ptid, lwpid from thread.
6655 (count_events_callback): Update, "entry" parameter is a
6656 struct thread_info * now.
6657 (select_singlestep_lwp_callback): Ditto.
6658 (select_event_lwp_callback): Ditto.
6659 (cancel_breakpoints_callback): Ditto.
6660 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6662 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6663 (unsuspend_one_lwp): Update, "entry" parameter is a
6664 struct thread_info * now.
6665 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6667 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6668 Fetch lwpid from thread, not lwp.
6669 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6670 Pass &all_threads to find_inferior, not &all_lwps.
6671 (send_sigstop): Fetch lwpid from thread, not lwp.
6672 (send_sigstop_callback): Update, "entry" parameter is a
6673 struct thread_info * now.
6674 (suspend_and_send_sigstop_callback): Ditto.
6675 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6676 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6677 struct thread_info * now.
6678 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6680 (lwp_running): Update, "entry" parameter is a
6681 struct thread_info * now.
6682 (stop_all_lwps): Fetch ptid from thread.
6683 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6684 (linux_resume_one_lwp): Fetch lwpid from thread.
6685 (linux_set_resume_request): Update, "entry" parameter is a
6686 struct thread_info * now. Fetch pid, lwpid from thread.
6687 (resume_status_pending_p): Update, "entry" parameter is a
6688 struct thread_info * now.
6689 (need_step_over_p): Ditto. Fetch lwpid from thread.
6690 (start_step_over): Fetch lwpid from thread.
6691 (linux_resume_one_thread): Update, "entry" parameter is a
6692 struct thread_info * now. Fetch lwpid from thread.
6693 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6694 (proceed_one_lwp): Update, "entry" parameter is a
6695 struct thread_info * now. Fetch lwpid from thread.
6696 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6697 struct thread_info * now.
6698 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6699 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6700 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6702 (regsets_store_inferior_registers): Ditto.
6703 (fetch_register, store_register): Ditto.
6704 (linux_read_memory, linux_write_memory): Ditto.
6705 (linux_request_interrupt): Ditto.
6706 (linux_read_auxv): Ditto.
6707 (linux_xfer_siginfo): Ditto.
6708 (linux_qxfer_spu): Ditto.
6709 (linux_qxfer_libraries_svr4): Ditto.
6710 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6711 moved to inferiors.h.
6713 (get_thread_lwp): Update.
6714 (struct lwp_info): Delete member "entry". Simplify comment for
6717 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6718 current_inferior directly.
6719 (update_watch_registers_callback): Update, "entry" parameter is a
6720 struct thread_info * now. Fetch pid from thread.
6721 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6722 (mips_insert_point): Fetch lwpid from current_inferior.
6723 Pass &all_threads to find_inferior, not &all_lwps.
6724 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6725 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6727 (mips_stopped_data_address): Ditto.
6728 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6730 * linux-tile-low.c (tile_arch_setup): Ditto.
6731 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6732 (update_debug_registers_callback): Update, "entry" parameter is a
6733 struct thread_info * now. Fetch pid from thread.
6734 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6735 Pass &all_threads to find_inferior, not &all_lwps.
6736 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6737 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6738 Pass &all_threads to find_inferior, not &all_lwps.
6739 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6740 (i386_dr_low_get_status): Ditto.
6741 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6742 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6743 (x86_linux_read_description): Ditto.
6744 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6746 2014-02-20 Doug Evans <dje@google.com>
6748 * inferiors.c (get_first_inferior): Fix buglet.
6750 2014-02-19 Doug Evans <dje@google.com>
6752 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6753 * inferiors.c (add_thread): Change result type to struct thread_info *.
6754 All callers updated.
6755 (add_lwp): Call add_thread here instead of in callers.
6756 All callers updated.
6757 * linux-low.h (get_lwp_thread): Rewrite.
6758 (struct lwp_info): New member "thread".
6760 2014-02-19 Doug Evans <dje@google.com>
6762 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6763 All callers updated.
6765 2014-02-19 Doug Evans <dje@google.com>
6767 * inferiors.c (add_thread): Fix whitespace.
6769 2014-02-19 Doug Evans <dje@google.com>
6771 * dll.c (clear_dlls): Replace accessing list implemention details
6773 * gdbthread.h (get_first_thread): Declare.
6774 * inferiors.c (for_each_inferior_with_data): New function.
6775 (get_first_thread): New function.
6776 (find_thread_ptid): Simplify.
6777 (get_first_inferior): New function.
6778 (clear_list): Delete.
6779 (one_inferior_p): New function.
6780 (clear_inferior_list): New function.
6781 (clear_inferiors): Update.
6782 * inferiors.h (for_each_inferior_with_data): Declare.
6783 (clear_inferior_list): Declare.
6784 (one_inferior_p): Declare.
6785 (get_first_inferior): Declare.
6786 * linux-low.c (linux_wait_for_event): Replace accessing list
6787 implemention details with API function.
6788 * server.c (target_running): Ditto.
6789 (accumulate_file_name_length): New function.
6790 (emit_dll_description): New function.
6791 (handle_qxfer_libraries): Replace accessing list implemention
6792 details with API function.
6793 (handle_qxfer_threads_worker): New function.
6794 (handle_qxfer_threads_proper): Replace accessing list implemention
6795 details with API function.
6796 (handle_query): Ditto.
6797 (visit_actioned_threads_callback_ftype): New typedef.
6798 (visit_actioned_threads_data): New struct.
6799 (visit_actioned_threads): Rewrite to be find_inferior callback.
6800 (resume): Call find_inferior.
6801 (handle_status): Replace accessing list implemention
6802 details with API function.
6803 (process_serial_event): Replace accessing list implemention details
6805 * target.c (set_desired_inferior): Replace accessing list implemention
6806 details with API function.
6807 * tracepoint.c (same_process_p): New function.
6808 (gdb_agent_about_to_close): Replace accessing list implemention
6809 details with API function.
6810 * win32-low.c (child_delete_thread): Replace accessing list
6811 implemention details with API function.
6812 (match_dll_by_basename): New function.
6813 (dll_is_loaded_by_basename): New function.
6814 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6815 details call to dll_is_loaded_by_basename.
6817 2014-02-19 Doug Evans <dje@google.com>
6819 * dll.h (struct dll_info): Add comment.
6820 * gdbthread.h (struct thread_info): Add comment.
6821 (current_ptid): Simplify.
6822 * inferiors.c (add_process): Update.
6823 (remove_process): Update.
6824 * inferiors.h (struct process_info): Rename member "head" to "entry".
6825 * linux-low.c (delete_lwp): Update.
6827 (last_thread_of_process_p): Update.
6828 (kill_one_lwp_callback, linux_kill): Update.
6829 (status_pending_p_callback): Update.
6830 (wait_for_sigstop): Update. Simplify read of ptid.
6831 (start_step_over): Update.
6832 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6833 (get_lwp_thread): Update.
6834 (struct lwp_info): Rename member "head" to "entry".
6835 * regcache.h (inferior_list_entry): Delete.
6836 * server.c (kill_inferior_callback): Update.
6837 (detach_or_kill_inferior_callback): Update.
6838 (print_started_pid): Update.
6839 (print_attached_pid): Update.
6840 (process_serial_event): Simplify read of ptid.
6841 * thread-db.c (thread_db_create_event): Update.
6842 (thread_db_get_tls_address): Update.
6843 * win32-low.c (current_inferior_ptid): Simplify.
6845 2014-02-19 Tom Tromey <tromey@redhat.com>
6847 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6849 (target_supports_btrace): Update.
6851 2014-02-14 Yao Qi <yao@codesourcery.com>
6853 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6854 (rsp-low-ipa.o): New target.
6856 2014-02-12 Tom Tromey <tromey@redhat.com>
6858 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6859 convert_ascii_to_int.
6860 * regcache.c (registers_to_string): Likewise.
6861 * remote-utils.c (decode_M_packet): Likewise.
6862 * server.c (process_serial_event): Likewise.
6864 2014-02-12 Tom Tromey <tromey@redhat.com>
6866 * server.c (handle_query, handle_v_run): Use hex2bin, not
6868 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6870 2014-02-12 Tom Tromey <tromey@redhat.com>
6872 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6873 convert_int_to_ascii.
6874 * regcache.c (registers_to_string, collect_register_as_string):
6876 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6878 * server.c (process_serial_event): Likewise.
6879 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6880 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6882 2014-02-12 Tom Tromey <tromey@redhat.com>
6884 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6885 bin2hex, not hexify.
6886 * tracepoint.c (cmd_qtstatus): Likewise.
6888 2014-02-12 Tom Tromey <tromey@redhat.com>
6890 * remote-utils.c (monitor_output): Pass explicit length to
6893 2014-02-12 Tom Tromey <tromey@redhat.com>
6895 * tracepoint.c: Include rsp-low.h.
6896 * server.c: Include rsp-low.h.
6897 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6898 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6900 * remote-utils.c: Include rsp-low.h.
6901 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6902 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6903 (convert_int_to_ascii, convert_ascii_to_int): Move to
6905 * regcache.c: Include rsp-low.h.
6906 * ax.c: Include rsp-low.h.
6907 * Makefile.in (SFILES): Add common/rsp-low.c.
6908 (OBS): Add rsp-low.o.
6909 (rsp-low.o): New target.
6911 2014-02-12 Tom Tromey <tromey@redhat.com>
6913 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6914 Include print-utils.h.
6915 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6916 (plongest, thirty_two, phex_nz): Remove.
6917 * Makefile.in (SFILES): Add common/print-utils.c.
6918 (OBS): Add print-utils.o.
6919 (print-utils-ipa.o): New target.
6920 (print-utils.o): New target.
6921 (IPA_OBJS): Add print-utils-ipa.o.
6923 2014-02-06 Tom Tromey <tromey@redhat.com>
6925 * Makefile.in (SFILES): Fix indentation.
6927 2014-02-05 Doug Evans <dje@google.com>
6929 * linux-low.c (linux_wait_for_event): Improve comment.
6930 (linux_wait_1): Keep current_inferior in sync with event_child.
6932 2014-01-22 Doug Evans <dje@google.com>
6934 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6936 2014-01-22 Doug Evans <dje@google.com>
6938 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6939 * configure: Regenerate.
6940 * config.in: Regenerate.
6941 * Makefile.in (SFILES): Add debug.c.
6943 * debug.c: New file.
6944 * debug.h: New file.
6945 * linux-aarch64-low.c (*): Update all debugging printfs to use
6946 debug_printf instead of fprintf.
6947 * linux-arm-low.c (*): Ditto.
6948 * linux-cris-low.c (*): Ditto.
6949 * linux-crisv32-low.c (*): Ditto.
6950 * linux-m32r-low.c (*): Ditto.
6951 * linux-sparc-low.c (*): Ditto.
6952 * linux-x86.c (*): Ditto.
6953 * linux-low.c (*): Ditto.
6954 (linux_wait_1): Add calls to debug_enter, debug_exit.
6955 (linux_wait): Remove redundant debugging printf.
6956 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6957 (linux_resume, unstop_all_lwps): Ditto.
6958 * mem-break.c (*): Update all debugging printfs to use
6959 debug_printf instead of fprintf.
6960 * remote-utils.c (*): Ditto.
6961 * thread-db.c (*): Ditto.
6962 * server.c #include <ctype.h>, "gdb_vecs.h".
6963 (debug_threads): Moved to debug.c.
6964 (*): Update all debugging printfs to use debug_printf instead of
6966 (start_inferior): Replace call to fflush with call to debug_flush.
6967 (monitor_show_help): Mention set debug-format.
6968 (parse_debug_format_options): New function.
6969 (handle_monitor_command): Handle "monitor set debug-format".
6970 (gdbserver_usage): Mention --debug-format.
6971 (main): Parse --debug-format.
6972 * server.h (debug_threads): Declaration moved to debug.h.
6974 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6975 trace_debug_1 that uses debug_printf.
6976 (tracepoint_look_up_symbols): Update all debugging printfs to use
6977 debug_printf instead of fprintf.
6979 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6981 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6984 2014-01-17 Pedro Alves <palves@redhat.com>
6987 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6988 defined after including gdb_proc_service.h.
6990 2014-01-16 Doug Evans <dje@google.com>
6992 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6993 (match_dll): Use it.
6995 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6997 * target.h (target_ops) <read_btrace>: Change parameters and
6998 return type to allow error reporting.
6999 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7000 trace reading errors on.
7001 * linux-low.c (linux_low_read_btrace): Pass trace reading
7003 (linux_low_disable_btrace): New.
7005 2014-01-15 Doug Evans <dje@google.com>
7007 * inferiors.c (thread_id_to_gdb_id): Delete.
7008 * inferiors.h (thread_id_to_gdb_id): Delete.
7010 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7012 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7013 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7016 2014-01-08 Pedro Alves <palves@redhat.com>
7018 * server.c (handle_status): Don't discard previous queued stop
7019 replies or thread's pending status here.
7020 (main) <disconnection>: Do it here instead.
7022 2014-01-08 Pedro Alves <palves@redhat.com>
7024 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7025 * server.c (visit_actioned_threads, handle_pending_status): New
7027 (handle_v_cont): Factor out parts to ...
7028 (resume): ... this new function. If in all-stop, and a thread
7029 being resumed has a pending status, report it without actually
7031 (myresume): Adjust to use the new 'resume' function.
7032 (clear_pending_status_callback, set_pending_status_callback)
7033 (find_status_pending_thread_callback): New functions.
7034 (handle_status): Handle the case of multiple threads having
7035 interesting statuses to report. Report threads' real last signal
7036 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7037 with an interesting thread to report the status for, instead of
7038 always reporting the status of the first thread.
7040 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7042 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7043 * gdbreplay.c (gdbreplay_version): Likewise.
7045 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7047 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7048 iov.iov_len with the real length in use.
7050 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7052 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7053 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7054 for all targets that use win32-low.c.
7055 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7056 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7058 2013-12-13 Pedro Alves <palves@redhat.com>
7060 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7061 if equal to TARGET_WAITKIND_LOADED.
7062 * win32-low.c (cached_status): New static global.
7063 (win32_wait): Add declaration.
7064 (do_initial_child_stuff): Flush all initial pending debug events
7065 up to the initial breakpoint.
7066 (win32_wait): If CACHED_STATUS was set, return that instead
7067 of doing a real wait. Remove the code resuming the execution
7068 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7069 during the initial phase. Also remove the code changing
7070 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7071 TARGET_WAITKIND_STOPPED.
7073 2013-12-11 Yao Qi <yao@codesourcery.com>
7075 * notif.c (handle_notif_ack): Return 0 if no notification
7078 2013-11-20 Doug Evans <dje@google.com>
7080 * linux-low.c (linux_set_resume_request): Fix comment.
7082 2013-11-20 Doug Evans <dje@google.com>
7084 * linux-low.c (resume_status_pending_p): Tweak comment.
7086 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7088 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7089 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7090 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7091 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7092 (srv_amd64_regobj): Add amd64-mpx.o.
7093 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7094 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7095 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7096 * i387-fp.c (num_pl_bnd_register) Added constant.
7097 (num_pl_bnd_cfg_registers) Added constant.
7098 (struct i387_xsave) Added reserved area and MPX fields.
7099 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7100 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7102 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7103 (init_registers_amd64_mpx_linux): Declare new function.
7104 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7105 (x86_64_regmap): Add MPX registers.
7106 (x86_linux_read_description): Add MPX case.
7107 (initialize_low_arch): Initialize MPX targets.
7109 2013-11-18 Tom Tromey <tromey@redhat.com>
7111 * configure: Rebuild.
7112 * configure.ac: Don't check for stdlib.h.
7113 * gdbreplay.c: Unconditionally include stdlib.h.
7115 2013-11-18 Tom Tromey <tromey@redhat.com>
7117 * config.in: Rebuild.
7118 * configure: Rebuild.
7119 * configure.ac: Don't use AC_HEADER_DIRENT.
7121 2013-11-18 Tom Tromey <tromey@redhat.com>
7123 * server.h: Don't check HAVE_STRING_H.
7124 * gdbreplay.c: Don't check HAVE_STRING_H.
7125 * configure: Rebuild.
7127 2013-11-18 Tom Tromey <tromey@redhat.com>
7129 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7132 2013-11-08 Tom Tromey <tromey@redhat.com>
7134 * configure, config.in: Rebuild.
7135 * configure.ac: Remove unused configury.
7137 2013-11-08 Tom Tromey <tromey@redhat.com>
7139 * acinclude.m4: Include common.m4, codeset.m4.
7140 * configure, config.in: Rebuild.
7141 * configure.ac: Use GDB_AC_COMMON.
7143 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7145 * linux-s390-low.c (HWCAP_S390_TE): New define.
7146 (s390_arch_setup): Consider the TE field in the HWCAP for
7147 determining 'have_regset_tdb'.
7149 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7152 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7155 2013-10-02 Pedro Alves <palves@redhat.com>
7157 * server.c (process_serial_event): Don't output "GDBserver
7158 exiting" if GDB is connected through stdio.
7159 * target.c (mywait): Likewise, be silent if GDB is connected
7162 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7164 * lynx-low.c (lynx_add_threads_after_attach): New function.
7165 (lynx_attach): Remove call to add_thread. Add call to
7166 lynx_add_threads_after_attach instead.
7168 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7170 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7171 * config.in, configure: Regenerated.
7173 2013-09-18 Yao Qi <yao@codesourcery.com>
7176 * server.c (start_inferior): Clear 'resume_info'.
7178 2013-09-16 Jiong Wang <jiwang@tilera.com>
7180 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7183 2013-09-16 Jiong Wang <jiwang@tilera.com>
7185 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7186 linux-tile-low.o to srv_tgtobj.
7188 2013-09-16 Will Newton <will.newton@linaro.org>
7190 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7193 2013-09-06 Pedro Alves <palves@redhat.com>
7195 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7196 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7197 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7198 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7199 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7200 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7202 2013-09-06 Pedro Alves <palves@redhat.com>
7204 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7205 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7207 2013-09-06 Pedro Alves <palves@redhat.com>
7209 * linux-amd64-ipa.c: Include tracepoint.h.
7210 * linux-i386-ipa.c: Include tracepoint.h.
7212 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7214 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7215 (ps_get_thread_area): New function.
7217 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7219 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7220 (initialize_low_arch): Call init_registers_crisv32 rather than
7221 init_register_crisv32.
7223 2013-09-05 Pedro Alves <palves@redhat.com>
7225 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7227 * hostio.h: ... this new file.
7228 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7229 win32-low.c: Include hostio.h.
7231 2013-09-05 Pedro Alves <palves@redhat.com>
7233 * server.h (gdb_client_data, handler_func, callback_handler_func)
7234 (delete_file_handler, add_file_handler, append_callback_event)
7235 (delete_callback_event, start_event_loop, initialize_event_loop):
7236 Move to event-loop.h and include it.
7237 * event-loop.h: New file.
7239 2013-09-05 Pedro Alves <palves@redhat.com>
7241 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7242 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7243 (loaded_dll, unloaded_dll): Move to ...
7244 * dll.h: ... this new file.
7245 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7247 2013-09-05 Pedro Alves <palves@redhat.com>
7249 * server.h (current_process, get_thread_process, all_processes)
7250 (add_inferior_to_list, for_each_inferior, current_inferior)
7251 (remove_inferior, add_process, remove_process, find_process_pid)
7252 (have_started_inferiors_p, have_attached_inferiors_p)
7253 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7254 (clear_inferiors, find_inferior, find_inferior_id)
7255 (inferior_target_data, set_inferior_target_data)
7256 (inferior_regcache_data, set_inferior_regcache_data): Move to
7257 inferiors.h, and include it.
7258 * inferiors.h: New file.
7260 2013-09-05 Pedro Alves <palves@redhat.com>
7262 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7266 2013-09-05 Pedro Alves <palves@redhat.com>
7268 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7270 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7271 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7272 (handle_tracepoint_general_set, handle_tracepoint_query)
7273 (tracepoint_finished_step, tracepoint_was_hit)
7274 (release_while_stepping_state_list, current_traceframe)
7275 (in_readonly_region, traceframe_read_mem)
7276 (fetch_traceframe_registers, traceframe_read_sdata)
7277 (traceframe_read_info, struct fast_tpoint_collect_status)
7278 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7279 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7280 (supply_fast_tracepoint_registers)
7281 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7282 (ipa_tdesc, claim_trampoline_space)
7283 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7284 (agent_mem_read, agent_get_trace_state_variable_value)
7285 (agent_set_trace_state_variable_value, agent_tsv_read)
7286 (agent_mem_read_string, get_raw_reg_func_addr)
7287 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7288 * tracepoint.h: ... this new file.
7290 2013-09-05 Pedro Alves <palves@redhat.com>
7292 * server.h (perror_with_name, error, fatal, warning, paddress)
7293 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7295 * utils.h: New file.
7297 2013-09-05 Pedro Alves <palves@redhat.com>
7299 * server.h (remote_debug, noack_mode, transport_is_reliable)
7300 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7301 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7302 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7303 (write_enn, initialize_async_io, enable_async_io)
7304 (disable_async_io, check_remote_input_interrupt_request)
7305 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7306 (dead_thread_notify, prepare_resume_reply)
7307 (decode_address_to_semicolon, decode_address, decode_m_packet)
7308 (decode_M_packet, decode_X_packet, decode_xfer_write)
7309 (decode_search_memory_packet, unhexify, hexify)
7310 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7311 (look_up_one_symbol, relocate_instruction)
7312 (monitor_output): Move to remote-utils.h, and include it.
7313 * remote-utils.h: New file.
7315 2013-09-05 Pedro Alves <palves@redhat.com>
7317 * server.h (_): Delete.
7319 2013-09-02 Pedro Alves <palves@redhat.com>
7321 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7322 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7324 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7326 2013-09-02 Pierre Muller <muller@sourceware.org>
7328 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7329 or WriteProcessMemory complete successfully and handle
7330 ERROR_PARTIAL_COPY error.
7332 2013-09-02 Pedro Alves <palves@redhat.com>
7334 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7335 error instead of EIO.
7337 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7340 * linux-low.c: Include filestuff.h.
7341 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7342 * lynx-low.c: Include filestuff.h.
7343 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7344 * server.c: Include filestuff.h.
7345 (main): Call notice_open_fds.
7346 * spu-low.c: Include filestuff.h.
7347 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7349 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7351 * Makefile.in: Explain why ../target and ../nat are not
7352 listed as include file search paths.
7353 (linux-waitpid.o): New object file rule.
7354 * configure.srv (srv_native_linux_obj): New variable.
7355 Replace all occurrences of linux native object files with
7356 $srv_native_linux_obj.
7357 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7358 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7359 (linux_enable_event_reporting): Remove declaration.
7360 (my_waitpid): Moved to common/linux-waitpid.c.
7361 (linux_wait_for_event): Pass ptid when calling
7362 linux_enable_event_reporting.
7363 (linux_supports_tracefork_flag): Remove.
7364 (linux_enable_event_reporting): Likewise.
7365 (linux_tracefork_grandchild): Remove.
7366 (STACK_SIZE): Moved to common/linux-ptrace.c.
7367 (linux_tracefork_child): Remove.
7368 (linux_test_for_tracefork): Remove.
7369 (linux_look_up_symbols): Call linux_supports_traceclone.
7370 (initialize_low): Remove call to linux_test_for_tracefork.
7371 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7372 common/linux-ptrace.h.
7373 (PTRACE_TYPE_ARG4): Likewise.
7374 Include linux-ptrace.h.
7376 2013-08-21 Pedro Alves <palves@redhat.com>
7378 * config.in: Renegerate.
7380 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7382 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7383 (SFILES): Remove $(srcdir)/common/target-common.c and
7384 add $(srcdir)/target/waitstatus.c.
7385 (OBS): Remove target-common.o and add waitstatus.o.
7386 (server_h): Remove $(srcdir)/../common/target-common.h and
7387 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7388 and $(srcdir)/../target/waitstatus.h.
7389 (target-common.o): Remove.
7390 (waitstatus.o): New target object file.
7391 * target.h: Do not include target-common.h and
7392 include target/resume.h, target/wait.h and
7393 target/waitstatus.h.
7395 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7397 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7398 to PTRACE_TYPE_ARG3.
7399 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7400 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7402 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7403 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7405 2013-07-27 Jie Zhang <jie@codesourcery.com>
7406 Daniel Jacobowitz <dan@codesourcery.com>
7407 Yao Qi <yao@codesourcery.com>
7409 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7410 (mips-linux-watch.o): New rule.
7411 (mips_linux_watch_h): New variable.
7412 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7414 * linux-mips-low.c: Include mips-linux-watch.h.
7415 (struct arch_process_info, struct arch_lwp_info): New.
7416 (update_watch_registers_callback): New function.
7417 (mips_linux_new_process, mips_linux_new_thread) New functions.
7418 (mips_linux_prepare_to_resume, mips_insert_point): New
7420 (mips_remove_point, mips_stopped_by_watchpoint): New
7422 (rsp_bp_type_to_target_hw_bp_type): New function.
7423 (mips_stopped_data_address): New function.
7424 (the_low_target): Add watchpoint support functions.
7426 2013-07-27 Yao Qi <yao@codesourcery.com>
7428 * i386-low.c: Include break-common.h.
7429 (enum target_hw_bp_type): Remove.
7431 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7433 * Makefile.in (SFILES): /common/target-common.c.
7434 (OBS): Add target-common.o.
7435 (server_h): Add $(srcdir)/../common/target-common.h.
7436 (target-common.o): New target.
7437 * server.c (queue_stop_reply_callback): Free
7438 status string after use.
7439 * target.c (target_waitstatus_to_string): Remove.
7440 * target.h: Include target-common.h.
7441 (resume_kind): Likewise.
7442 (target_waitkind): Likewise.
7443 (target_waitstatus): Likewise.
7444 (TARGET_WNOHANG): Likewise.
7446 2013-07-04 Yao Qi <yao@codesourcery.com>
7448 * Makefile.in (host_alias): Use @host_noncanonical@.
7449 (target_alias): Use @target_noncanonical@.
7450 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7451 ACX_NONCANONICAL_HOST.
7452 * configure: Regenerated.
7455 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7457 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7458 * configure: Rebuild.
7459 * Makefile.in (version_host, version_target): Get from configure.
7460 (version.c): Use $(version_host) and $(version_target).
7462 2013-07-03 Pedro Alves <palves@redhat.com>
7464 * Makefile.in (config.status): Depend on development.sh.
7465 * acinclude.m4: Include libmcheck.m4.
7466 * configure: Regenerate.
7468 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7470 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7471 attribute inside the parentheses.
7472 (winapi_DebugSetProcessKillOnExit): Ditto.
7473 (winapi_DebugBreakProcess): Ditto.
7474 (winapi_GenerateConsoleCtrlEvent): Ditto.
7476 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7478 * notif.h (notif_event): Add a dummy member to avoid compiler
7481 2013-07-01 Pedro Alves <palves@redhat.com>
7483 * hostio.c (HOSTIO_PATH_MAX): Define.
7484 (require_filename, handle_open, handle_unlink, handle_readlink):
7487 2013-07-01 Pedro Alves <palves@redhat.com>
7489 * server.h: Include "pathmax.h".
7490 * linux-low.c: Don't include sys/param.h.
7491 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7493 * win32-low.c: Don't include sys/param.h.
7494 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7496 2013-07-01 Pedro Alves <palves@redhat.com>
7498 * event-loop.c: Don't check HAVE_UNISTD_H before including
7500 * gdbreplay.c: Likewise.
7501 * remote-utils.c: Likewise.
7502 * server.c: Likewise.
7503 * configure.ac: Don't check for unistd.h.
7504 * configure: Regenerate.
7506 2013-06-28 Tom Tromey <tromey@redhat.com>
7508 * Makefile.in (version.c): Use version.in, not
7511 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7513 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7514 * configure: Rebuild.
7515 * Makefile.in (version_host, version_target): Get from configure.
7516 (version.c): Use $(version_host) and $(version_target).
7518 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7520 Fix trace-status to output user name without trailing colon.
7521 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7523 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7525 Fix trace-status to output proper start-time and stop-time.
7526 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7527 output start time and stop time in hex as gdb expects.
7529 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7531 * tracepoint.c (build_traceframe_info_xml): Output trace state
7532 variables present in the trace buffer.
7534 2013-06-24 Tom Tromey <tromey@redhat.com>
7536 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7538 (version.o): Remove.
7539 * gdbreplay.c: Include version.h.
7540 (version, host_name): Don't declare.
7541 * server.h: Include version.h.
7542 (version, host_name): Don't declare.
7544 2013-06-12 Pedro Alves <palves@redhat.com>
7546 * linux-x86-low.c (linux_is_elf64): Delete global.
7547 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7548 with local linux_pid_exe_is_elf_64_file use.
7550 2013-06-11 Pedro Alves <palves@redhat.com>
7552 * linux-low.c (regset_disabled, disable_regset): New functions.
7553 (regsets_fetch_inferior_registers)
7554 (regsets_store_inferior_registers): Use them.
7555 (initialize_regsets_info); Don't allocate the disabled_regsets
7557 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7560 2013-06-11 Pedro Alves <palves@redhat.com>
7562 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7565 2013-06-11 Pedro Alves <palves@redhat.com>
7567 * linux-x86-low.c (initialize_low_arch): Call
7568 init_registers_x32_avx_linux.
7570 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7572 Fix compatibility with Android Bionic.
7573 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7576 2013-06-07 Pedro Alves <palves@redhat.com>
7579 * Makefile.in (OBS): Add tdesc.o.
7580 (IPA_OBJS): Add tdesc-ipa.o.
7581 (tdesc-ipa.o): New rule.
7582 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7584 * linux-low.c (new_inferior): Delete.
7585 (disabled_regsets, num_regsets): Delete.
7586 (linux_add_process): Adjust to set the new per-process
7588 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7589 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7590 was a stop. When calling arch_setup, switch the current inferior
7591 to the thread that got an event.
7592 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7593 (regsets_fetch_inferior_registers)
7594 (regsets_store_inferior_registers): New regsets_info parameter.
7596 (linux_register_in_regsets): New regs_info parameter. Adjust to
7598 (register_addr, fetch_register, store_register): New usrregs_info
7599 parameter. Adjust to use it.
7600 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7601 parameter regs_info. Adjust to use it.
7602 (linux_fetch_registers): Get the current inferior's regs_info, and
7604 (linux_store_registers): Ditto.
7605 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7606 (initialize_low): Don't initialize the target_regsets here. Call
7607 initialize_low_arch.
7608 * linux-low.h (target_regsets): Delete declaration.
7609 (struct regsets_info): New.
7610 (struct usrregs_info): New.
7611 (struct regs_info): New.
7612 (struct process_info_private) <new_inferior>: New field.
7613 (struct linux_target_ops): Delete the num_regs, regmap, and
7614 regset_bitmap fields. New field regs_info.
7615 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7616 * i387-fp.c (num_xmm_registers): Delete.
7617 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7618 calls to new interface.
7619 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7620 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7621 Infer the number of xmm registers from the regcache's target
7623 * i387-fp.h (num_xmm_registers): Delete.
7624 * inferiors.c (add_thread): Don't install the thread's regcache
7626 * proc-service.c (gregset_info): Fetch the current inferior's
7627 regs_info. Adjust to use it.
7628 * regcache.c: Include tdesc.h.
7629 (register_bytes, reg_defs, num_registers)
7630 (gdbserver_expedite_regs): Delete.
7631 (get_thread_regcache): If the thread doesn't have a regcache yet,
7632 create one, instead of aborting gdbserver.
7633 (regcache_invalidate_one): Rename to ...
7634 (regcache_invalidate_thread): ... this.
7635 (regcache_invalidate_one): New.
7636 (regcache_invalidate): Only invalidate registers of the current
7638 (init_register_cache): Add target_desc parameter, and use it.
7639 (new_register_cache): Ditto. Assert the target description has a
7640 non zero registers_size.
7641 (regcache_cpy): Add assertions. Adjust.
7642 (realloc_register_cache, set_register_cache): Delete.
7643 (registers_to_string, registers_from_string): Adjust.
7644 (find_register_by_name, find_regno, find_register_by_number)
7645 (register_cache_size): Add target_desc parameter, and use it.
7646 (free_register_cache_thread, free_register_cache_thread_one)
7647 (regcache_release, register_cache_size): New.
7648 (register_size): Add target_desc parameter, and use it.
7649 (register_data, supply_register, supply_register_zeroed)
7650 (supply_regblock, supply_register_by_name, collect_register)
7651 (collect_register_as_string, collect_register_by_name): Adjust.
7652 * regcache.h (struct target_desc): Forward declare.
7653 (struct regcache) <tdesc>: New field.
7654 (init_register_cache, new_register_cache): Add target_desc
7656 (regcache_invalidate_thread): Declare.
7657 (regcache_invalidate_one): Delete declaration.
7658 (regcache_release): Declare.
7659 (find_register_by_number, register_cache_size, register_size)
7660 (find_regno): Add target_desc parameter.
7661 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7663 * remote-utils.c: Include tdesc.h.
7664 (outreg, prepare_resume_reply): Adjust.
7665 * server.c: Include tdesc.h.
7666 (gdbserver_xmltarget): Delete declaration.
7667 (get_features_xml, process_serial_event): Adjust.
7668 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7670 (struct process_info) <tdesc>: New field.
7671 (ipa_tdesc): Declare.
7672 * tdesc.c: New file.
7673 * tdesc.h: New file.
7674 * tracepoint.c: Include tdesc.h.
7675 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7676 (get_context_regcache): Adjust to pass ipa_tdesc down.
7677 (do_action_at_tracepoint): Adjust to get the register cache size
7678 from the context regcache's description.
7679 (traceframe_walk_blocks): Adjust to get the register cache size
7680 from the current trace frame's description.
7681 (traceframe_get_pc): Adjust to get current trace frame's
7682 description and pass it down.
7683 (gdb_collect): Adjust to get the register cache size from the
7685 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7686 (gdbserver_xmltarget): Delete.
7687 (initialize_low_tracepoint): Set the ipa's target description.
7688 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7689 (initialize_low_tracepoint): Set the ipa's target description.
7690 * linux-x86-low.c: Include tdesc.h.
7691 [__x86_64__] (is_64bit_tdesc): New.
7692 (ps_get_thread_area, x86_get_thread_area): Use it.
7693 (i386_cannot_store_register): Rename to ...
7694 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7695 (i386_cannot_fetch_register): Rename to ...
7696 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7697 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7699 (target_regsets): Rename to ...
7700 (x86_regsets): ... this.
7701 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7703 (x86_siginfo_fixup): Use is_64bit_tdesc.
7704 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7705 (tdesc_x32_avx_linux, tdesc_x32_linux)
7706 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7708 (x86_linux_update_xmltarget): Delete.
7709 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7710 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7711 (AMD64_LINUX_USER64_CS): New.
7712 (x86_linux_read_description): New, based on
7713 x86_linux_update_xmltarget.
7714 (same_process_callback): New.
7715 (x86_arch_setup_process_callback): New.
7716 (x86_linux_update_xmltarget): New.
7717 (x86_regsets_info): New.
7718 (amd64_linux_regs_info): New.
7719 (i386_linux_usrregs_info): New.
7720 (i386_linux_regs_info): New.
7721 (x86_linux_regs_info): New.
7722 (x86_arch_setup): Reimplement.
7723 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7724 (x86_emit_ops): Ditto.
7725 (the_low_target): Adjust. Install x86_linux_regs_info,
7726 x86_cannot_fetch_register, and x86_cannot_store_register.
7727 (initialize_low_arch): New.
7728 * linux-ia64-low.c (tdesc_ia64): Declare.
7729 (ia64_fetch_register): Adjust.
7730 (ia64_usrregs_info, regs_info): New globals.
7731 (ia64_regs_info): New function.
7732 (the_low_target): Adjust.
7733 (initialize_low_arch): New function.
7734 * linux-sparc-low.c (tdesc_sparc64): Declare.
7735 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7737 (sparc_arch_setup): New function.
7738 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7739 (the_low_target): Adjust.
7740 (initialize_low_arch): New function.
7741 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7742 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7743 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7744 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7745 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7746 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7747 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7748 (tdesc_powerpc_isa205_vsx64l): Declare.
7749 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7750 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7751 (ppc_set_pc, ppc_get_hwcap): Adjust.
7752 (ppc_usrregs_info): Forward declare.
7753 (!__powerpc64__) ppc_regmap_adjusted: New global.
7754 (ppc_arch_setup): Adjust to the current process'es target
7756 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7757 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7758 (ppc_store_evrregset): Adjust.
7759 (target_regsets): Rename to ...
7760 (ppc_regsets): ... this, and make static.
7761 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7762 (ppc_regs_info): New function.
7763 (the_low_target): Adjust.
7764 (initialize_low_arch): New function.
7765 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7766 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7767 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7768 (tdesc_s390x_linux64v2): Declare.
7769 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7770 (s390_fill_gregset, s390_store_last_break): Adjust.
7771 (target_regsets): Rename to ...
7772 (s390_regsets): ... this, and make static.
7773 (s390_get_pc, s390_set_pc): Adjust.
7774 (s390_get_hwcap): New target_desc parameter, and use it.
7775 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7776 (s390_arch_setup): Adjust to set the current process'es target
7777 description. Don't adjust the regmap.
7778 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7779 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7780 (regs_info_3264): New globals.
7781 (s390_regs_info): New function.
7782 (the_low_target): Adjust.
7783 (initialize_low_arch): New function.
7784 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7785 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7786 [__mips64] (init_registers_mips_linux)
7787 (init_registers_mips_dsp_linux): Delete defines.
7788 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7789 (have_dsp): New global.
7790 (mips_read_description): New, based on mips_arch_setup.
7791 (mips_arch_setup): Reimplement.
7792 (get_usrregs_info): New function.
7793 (mips_cannot_fetch_register, mips_cannot_store_register)
7794 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7795 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7796 (target_regsets): Rename to ...
7797 (mips_regsets): ... this, and make static.
7798 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7799 (dsp_regs_info, regs_info): New globals.
7800 (mips_regs_info): New function.
7801 (the_low_target): Adjust.
7802 (initialize_low_arch): New function.
7803 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7804 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7806 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7807 (arm_read_description): New, with bits factored from
7809 (arm_arch_setup): Reimplement.
7810 (target_regsets): Rename to ...
7811 (arm_regsets): ... this, and make static.
7812 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7813 (arm_regs_info): New function.
7814 (the_low_target): Adjust.
7815 (initialize_low_arch): New function.
7816 * linux-m68k-low.c (tdesc_m68k): Declare.
7817 (target_regsets): Rename to ...
7818 (m68k_regsets): ... this, and make static.
7819 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7820 (m68k_regs_info): New function.
7821 (m68k_arch_setup): New function.
7822 (the_low_target): Adjust.
7823 (initialize_low_arch): New function.
7824 * linux-sh-low.c (tdesc_sharch): Declare.
7825 (target_regsets): Rename to ...
7826 (sh_regsets): ... this, and make static.
7827 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7828 (sh_regs_info, sh_arch_setup): New functions.
7829 (the_low_target): Adjust.
7830 (initialize_low_arch): New function.
7831 * linux-bfin-low.c (tdesc_bfin): Declare.
7832 (bfin_arch_setup): New function.
7833 (bfin_usrregs_info, regs_info): New globals.
7834 (bfin_regs_info): New function.
7835 (the_low_target): Adjust.
7836 (initialize_low_arch): New function.
7837 * linux-cris-low.c (tdesc_cris): Declare.
7838 (cris_arch_setup): New function.
7839 (cris_usrregs_info, regs_info): New globals.
7840 (cris_regs_info): New function.
7841 (the_low_target): Adjust.
7842 (initialize_low_arch): New function.
7843 * linux-cris-low.c (tdesc_crisv32): Declare.
7844 (cris_arch_setup): New function.
7845 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7846 (cris_regs_info): New function.
7847 (the_low_target): Adjust.
7848 (initialize_low_arch): New function.
7849 * linux-m32r-low.c (tdesc_m32r): Declare.
7850 (m32r_arch_setup): New function.
7851 (m32r_usrregs_info, regs_info): New globals.
7852 (m32r_regs_info): Adjust.
7853 (initialize_low_arch): New function.
7854 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7855 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7856 (tic6x_usrregs_info): Forward declare.
7857 (tic6x_read_description): New function, based on ...
7858 (tic6x_arch_setup): ... this. Reimplement.
7859 (target_regsets): Rename to ...
7860 (tic6x_regsets): ... this, and make static.
7861 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7862 (tic6x_regs_info): New function.
7863 (the_low_target): Adjust.
7864 (initialize_low_arch): New function.
7865 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7866 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7867 (target_regsets): Rename to ...
7868 (xtensa_regsets): ... this, and make static.
7869 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7871 (xtensa_arch_setup, xtensa_regs_info): New functions.
7872 (the_low_target): Adjust.
7873 (initialize_low_arch): New function.
7874 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7875 (nios2_arch_setup): Set the current process'es tdesc.
7876 (target_regsets): Rename to ...
7877 (nios2_regsets): ... this.
7878 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7879 (nios2_regs_info): New function.
7880 (the_low_target): Adjust.
7881 (initialize_low_arch): New function.
7882 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7883 (aarch64_arch_setup): Set the current process'es tdesc.
7884 (target_regsets): Rename to ...
7885 (aarch64_regsets): ... this.
7886 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7887 (aarch64_regs_info): New function.
7888 (the_low_target): Adjust.
7889 (initialize_low_arch): New function.
7890 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7892 (target_regsets): Rename to ...
7893 (tile_regsets): ... this.
7894 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7895 (tile_regs_info): New function.
7896 (tile_arch_setup): Set the current process'es tdesc.
7897 (the_low_target): Adjust.
7898 (initialize_low_arch): New function.
7899 * spu-low.c (tdesc_spu): Declare.
7900 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7901 * win32-arm-low.c (tdesc_arm): Declare.
7902 (arm_arch_setup): New function.
7903 (the_low_target): Install arm_arch_setup instead of
7905 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7906 (init_windows_x86): Rename to ...
7907 (i386_arch_setup): ... this. Set `win32_tdesc'.
7908 (the_low_target): Adjust.
7909 * win32-low.c (win32_tdesc): New global.
7910 (child_add_thread): Don't create the thread cache here.
7911 (do_initial_child_stuff): Set the new process'es tdesc.
7912 * win32-low.h (struct target_desc): Forward declare.
7913 (win32_tdesc): Declare.
7914 * lynx-i386-low.c (tdesc_i386): Declare global.
7915 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7916 * lynx-low.c (lynx_tdesc): New global.
7917 (lynx_add_process): Set the new process'es tdesc.
7918 * lynx-low.h (struct target_desc): Forward declare.
7919 (lynx_tdesc): Declare global.
7920 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7921 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7922 * nto-low.c (nto_tdesc): New global.
7923 (do_attach): Set the new process'es tdesc.
7924 * nto-low.h (struct target_desc): Forward declare.
7925 (nto_tdesc): Declare.
7926 * nto-x86-low.c (tdesc_i386): Declare.
7927 (nto_x86_arch_setup): Set `nto_tdesc'.
7929 2013-06-04 Gary Benson <gbenson@redhat.com>
7931 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7932 to qSupported response when appropriate.
7933 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7934 with nonzero-length annex.
7935 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7936 arguments supplied in annex.
7938 2013-05-31 Doug Evans <dje@google.com>
7941 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7942 64 bits in 64-cross-32 environment.
7944 2013-05-28 Pedro Alves <palves@redhat.com>
7946 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7947 (aarch64-without-fpu.c): Delete rule.
7948 * configure.srv (aarch64*-*-linux*): Remove references to
7949 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7950 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7953 2013-05-24 Pedro Alves <palves@redhat.com>
7955 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7956 instead of strchr/decode_address. Error if the range isn't split
7957 with a ','. Don't assume there's be a ':' in the action.
7959 2013-05-23 Yao Qi <yao@codesourcery.com>
7960 Pedro Alves <palves@redhat.com>
7962 * linux-low.c (lwp_in_step_range): New function.
7963 (linux_wait_1): If the thread was range stepping and stopped
7964 outside the stepping range, report the stop to GDB. Otherwise,
7965 continue stepping. Add range stepping debug output.
7966 (linux_set_resume_request): Copy the step range from the resume
7968 (linux_supports_range_stepping): New.
7969 (linux_target_ops) <supports_range_stepping>: Set to
7970 linux_supports_range_stepping.
7971 * linux-low.h (struct linux_target_ops)
7972 <supports_range_stepping>: New field.
7973 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7974 * linux-x86-low.c (x86_supports_range_stepping): New.
7975 (the_low_target) <supports_range_stepping>: Set to
7976 x86_supports_range_stepping.
7977 * server.c (handle_v_cont): Handle 'r' action.
7978 (handle_v_requests): Append ";r" if the target supports range
7980 * target.h (struct thread_resume) <step_range_start,
7981 step_range_end>: New fields.
7982 (struct target_ops) <supports_range_stepping>:
7984 (target_supports_range_stepping): New macro.
7986 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7988 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7989 confusion in comment.
7991 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7993 * lynx-low.c (struct process_info_private): New type.
7994 (lynx_add_process): New function.
7995 (lynx_create_inferior, lynx_attach): Replace calls to
7996 add_process by calls to lynx_add_process.
7997 (lynx_resume): If PTID is null, then try using
7998 current_process()->private->last_wait_event_ptid.
8000 (lynx_clear_inferiors): Delete. The contents of that function
8001 has been inlined in lynx_mourn;
8002 (lynx_wait_1): Save the ptid in the process's private data.
8003 (lynx_mourn): Free the process' private data. Replace call
8004 to lynx_clear_inferiors by call to clear_inferiors.
8006 2013-05-17 Yao Qi <yao@codesourcery.com>
8008 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8011 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8013 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8014 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8015 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8016 PT_TEXT_END_ADDR guards. Update comments.
8017 (linux_target_op) <read_offsets>: Conditionally define to
8018 linux_read_offsets if the target is UCLIBC and if it defines
8019 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8021 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8022 Andrew Jenner <andrew@codesourcery.com>
8024 * Makefile.in (SFILES): Add linux-nios2-low.c.
8025 (clean): Add action to delete nios2-linux.c.
8026 (nios2-linux.c): New rule.
8027 * configure.srv: Add nios2*-*-linux*.
8028 * linux-nios2-low.c: New.
8030 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8032 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8034 2013-04-25 Hui Zhu <hui@codesourcery.com>
8037 * ax.c (ax_printf): Add fflush.
8039 2013-04-22 Tom Tromey <tromey@redhat.com>
8041 * Makefile.in (SFILES): Add filestuff.c.
8042 (OBS): Add filestuff.o.
8043 (filestuff.o): New target.
8044 * config.in, configure: Rebuild.
8045 * configure.ac: Check for fdwalk, pipe2.
8047 2013-04-17 Pedro Alves <palves@redhat.com>
8049 * configure.ac (USE_THREAD_DB): Delete variable.
8050 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8051 Don't AC_SUBST USE_THREAD_DB.
8052 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8053 * config.in, configure: Regenerate.
8055 2013-04-16 Pedro Alves <palves@redhat.com>
8057 * linux-low.h (struct lwp_info) <thread_known>: Move under
8058 the USE_THREAD_DB #ifdef.
8060 2013-04-16 Pedro Alves <palves@redhat.com>
8062 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8063 (linux-low.o): Delete rule.
8064 * linux-low.h: Always include "gdb_thread_db.h" instead of
8065 conditionally including thread_db.h.
8066 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8069 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8071 * Makefile.in (install-only): Fix make install regression.
8073 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8075 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8076 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8078 * gdbserver.1: Remove.
8080 2013-03-22 Pedro Alves <palves@redhat.com>
8082 * linux-low.c (handle_extended_wait): Don't call
8083 linux_enable_event_reporting.
8085 2013-03-15 Tony Theodore <tonyt@logyst.com>
8088 * Makefile.in (SHELL): Use @SHELL@.
8090 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8092 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8095 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8097 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8098 Remove extraneous NULL element.
8100 2013-03-13 Yao Qi <yao@codesourcery.com>
8102 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8103 'V' block in trace frame.
8105 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8107 * target.h (struct target_ops): Add btrace ops.
8108 (target_supports_btrace): New macro.
8109 (target_enable_btrace): New macro.
8110 (target_disable_btrace): New macro.
8111 (target_read_btrace): New macro.
8112 * gdbthread.h (struct thread_info): Add btrace field.
8113 * server.c: Include btrace-common.h.
8114 (handle_btrace_general_set): New function.
8115 (handle_btrace_enable): New function.
8116 (handle_btrace_disable): New function.
8117 (handle_general_set): Call handle_btrace_general_set.
8118 (handle_qxfer_btrace): New function.
8119 (struct qxfer qxfer_packets[]): Add btrace entry.
8120 * inferiors.c (remove_thread): Disable btrace.
8121 * linux-low: Include linux-btrace.h.
8122 (linux_low_enable_btrace): New function.
8123 (linux_low_read_btrace): New function.
8124 (linux_target_ops): Add btrace ops.
8125 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8126 Add srv_linux_btrace=yes.
8127 (x86_64-*-linux*): Add linux-btrace.o.
8128 Add srv_linux_btrace=yes.
8129 * configure.ac: Define HAVE_LINUX_BTRACE.
8130 * config.in: Regenerated.
8131 * configure: Regenerated.
8133 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8135 * server.c (handle_qxfer): Preserve error message if -3 is
8137 (qxfer): Document the -3 return value.
8139 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8141 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8142 (linux_btrace_h): New variable.
8143 (linux-btrace.o): New rule.
8145 2013-03-08 Stan Shebs <stan@codesourcery.com>
8146 Hafiz Abid Qadeer <abidh@codesourcery.com>
8148 * tracepoint.c (trace_buffer_size): New global.
8149 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8150 (init_trace_buffer): Change to one-argument function. Allocate
8151 trace buffer memory.
8152 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8153 handle QTBuffer:size packet.
8154 (cmd_bigqtbuffer_size): New function.
8155 (initialize_tracepoint): Call init_trace_buffer with
8156 DEFAULT_TRACE_BUFFER_SIZE.
8157 * server.c (handle_query): Add QTBuffer:size in the
8160 2013-03-07 Yao Qi <yao@codesourcery.com>
8162 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8163 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8165 (cmd_qtsp): Adjust condition. Do post increment.
8166 Set cur_action and cur_step_action back to 0.
8168 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8171 * linux-low.c (linux_write_memory): Return early success if LEN is
8174 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8176 * configure.srv: Add x86_64-*-cygwin* as target.
8178 2013-02-28 Tom Tromey <tromey@redhat.com>
8180 * configure.ac: Invoke AC_SYS_LARGEFILE.
8181 * configure, config.in: Rebuild.
8183 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8185 * win32-low.c: Throughout, fix format strings and casts of
8186 printf-like functions to avoid type related warnings on all
8188 (get_child_debug_event): Print dwDebugEventCode as hex since
8189 that's how it's usually documented.
8191 2013-02-28 Yao Qi <yao@codesourcery.com>
8193 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8196 2013-02-27 Jiong Wang <jiwang@tilera.com>
8198 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8199 (reg-tilegx32.c): New rule.
8200 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8201 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8202 different register info initializer according to elf class.
8203 (init_registers_tilgx32): New function. The tilegx32 register info
8205 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8206 (tile_store_gregset): Likewise.
8208 2013-02-27 Yao Qi <yao@codesourcery.com>
8210 * server.c (process_point_options): Print debug message when
8211 debug_threads is true.
8213 2013-02-26 Yao Qi <yao@codesourcery.com>
8215 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8217 2013-02-19 Pedro Alves <palves@redhat.com>
8218 Kai Tietz <ktietz@redhat.com>
8222 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8223 instead of strtoul to extract address from packet.
8224 (process_serial_event) <'z'>: Likewise.
8226 2013-02-18 Yao Qi <yao@codesourcery.com>
8228 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8230 2013-02-14 Pedro Alves <palves@redhat.com>
8234 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8235 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8237 2013-02-14 Pedro Alves <palves@redhat.com>
8239 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8241 2013-02-14 Pedro Alves <palves@redhat.com>
8243 * tracepoint.c (save_string): Delete.
8244 (add_tracepoint_action): Use savestring instead of save_string.
8246 2013-02-12 Pedro Alves <palves@redhat.com>
8248 * linux-xtensa-low.c: Ditto.
8249 * xtensa-xtregs.c: Ditto.
8251 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8253 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8256 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8258 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8259 aarch64_num_wp_regs and aarch64_num_bp_regs to
8260 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8262 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8264 * linux-aarch64-low.c (ps_get_thread_area): Replace
8265 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8267 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8268 Marcus Shawcroft <marcus.shawcroft@arm.com>
8269 Nigel Stephens <nigel.stephens@arm.com>
8270 Yufeng Zhang <yufeng.zhang@arm.com>
8272 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8273 (aarch64.c, aarch64-without-fpu.c): New targets.
8274 * configure.srv (aarch64*-*-linux*): New.
8275 * linux-aarch64-low.c: New file.
8277 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8279 * linux-low.c (handle_extended_wait, linux_create_inferior)
8280 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8281 (dequeue_one_deferred_signal, linux_resume_one_thread)
8282 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8283 (linux_tracefork_grandchild, linux_test_for_tracefork)
8284 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8285 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8286 where the argument is 0.
8288 2013-01-25 Yao Qi <yao@codesourcery.com>
8290 * event-loop.c: Include "queue.h".
8291 (gdb_event_p): New typedef.
8292 (struct gdb_event) <next_event>: Remove.
8293 (event_queue): Change to QUEUE(gdb_event_p).
8294 (async_queue_event): Remove.
8295 (gdb_event_xfree): New.
8296 (initialize_event_loop): New.
8297 (process_event): Use API from QUEUE.
8298 (wait_for_event): Likewise.
8299 * server.c (main): Call initialize_event_loop.
8300 * server.h (initialize_event_loop): Declare.
8302 2013-01-18 Yao Qi <yao@codesourcery.com>
8304 * ax.h (struct eval_agent_expr_context): New.
8305 (gdb_eval_agent_expr): Update declaration.
8306 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8307 TFRAME. Add new argument CTX.
8308 * server.h (struct eval_agent_expr_context): Declare.
8309 (agent_mem_read, agent_tsv_read): Update declaration.
8310 (agent_mem_read_string): Likewise.
8311 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8312 (add_traceframe_block): Add new argument TPOINT.
8313 Increase TPOINT->traceframe_usage.
8314 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8315 eval_tracepoint_agent_expr.
8316 (condition_true_at_tracepoint): Likewise.
8317 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8318 (agent_mem_read_string, agent_tsv_read): Likewise.
8320 2013-01-16 Yao Qi <yao@codesourcery.com>
8322 * linux-low.c (linux_resume_one_lwp): Don't check
8323 'lwp->bp_reinsert != 0'.
8325 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8326 Pedro Alves <palves@redhat.com>
8328 * lynx-low.c (ptrace_request_to_str): Define a temporary
8329 macro and use it to simplify this function's implementation.
8331 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8333 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8336 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8338 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8340 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8342 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8344 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8346 * lynx-low.c (lynx_resume): Use the resume_info parameter
8347 to determine the ptid for the lynx_ptrace call, unless
8348 it is equal to minus_one_ptid, in which case we use the
8349 ptid of the current_inferior.
8350 (lynx_wait_1): After having received a thread create/exit
8351 event, resume the inferior's execution using the signaling
8352 thread's ptid, rather than the old ptid.
8354 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8356 * lynx-low.c (lynx_resume): Delete variable ret.
8358 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8360 * gdbreplay.c (gdbreplay_version): Update copyright year.
8361 * server.c (gdbserver_version): Likewise.
8363 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8365 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8368 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8370 * lynx-low.c (ptrace_request_to_str): Add handling for
8373 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8375 * lynx-low.c (lynx_attach): Delete variable new_process.
8377 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8379 * lynx-low.c (lynx_create_inferior): Delete variable
8382 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8384 * lynx-low.c (ptrace_request_to_str): Do not handle
8385 PTRACE_GETTHREADLIST if this macro does not exist.
8387 2012-12-15 Yao Qi <yao@codesourcery.com>
8389 * Makefile.in (OBS): Add notif.o.
8390 * notif.c, notif.h: New.
8391 * server.c: Include "notif.h".
8392 (struct vstop_notif) <next>: Remove.
8394 (queue_stop_reply): Update.
8395 (push_event, send_next_stop_reply): Remove.
8396 (discard_queued_stop_replies): Update.
8397 (notif_stop): New variable.
8398 (handle_v_stopped): Remove.
8399 (handle_v_requests): Don't call handle_v_stopped. Call
8400 handle_ack_notif instead.
8401 (queue_stop_reply_callback): Call notif_event_enque instead
8402 of queue_stop_reply.
8403 (handle_status): Don't call send_next_stop_reply, call
8404 notif_write_event instead.
8405 (kill_inferior_callback): Likewise.
8406 (detach_or_kill_inferior_callback): Likewise.
8407 (main): Call initialize_notif.
8408 (process_serial_event): Call QUEUE_is_empty.
8409 (handle_target_event): Call notif_push instead of push event.
8410 * server.h (push_event): Remove declaration.
8412 2012-12-10 Tom Tromey <tromey@redhat.com>
8414 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8415 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8418 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8419 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8420 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8421 (amd64-linux-ipa.o, ax.o): Rewrite.
8422 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8423 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8424 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8425 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8426 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8427 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8428 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8429 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8430 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8431 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8432 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8433 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8434 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8435 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8436 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8437 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8438 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8439 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8440 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8441 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8442 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8443 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8444 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8445 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8446 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8447 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8448 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8449 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8450 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8451 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8452 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8453 (reg-tilegx.o): Remove.
8454 (all_object_files): New macro.
8455 Include .deps files.
8456 * aclocal.m4, configure: Rebuild.
8457 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8458 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8459 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8461 2012-12-05 Tom Tromey <tromey@redhat.com>
8464 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8466 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8468 * configure.ac: Check for linux/perf_event.h.
8469 * config.in: Regenerated.
8470 * configure: Regenerated.
8472 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8474 * hostio.c (handle_readlink): Decrease buffer size
8475 parameter passed to readlink by one byte.
8477 2012-11-26 Yao Qi <yao@codesourcery.com>
8479 * configure.ac (build_warnings): Append '-Wempty-body'.
8480 * configure: Regenerated.
8481 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8484 2012-11-15 Pierre Muller <muller@sourceware.org>
8486 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8487 * config.in: Regenerate.
8488 * configure: Regenerate.
8489 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8490 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8491 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8492 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8494 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8495 instead of <sys/wait.h> header.
8496 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8498 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8500 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8501 (various make rules): Remove -DGDBSERVER
8503 2012-11-09 Yao Qi <yao@codesourcery.com>
8505 * spu-low.c (current_ptid): Move it to ..
8506 * gdbthread.h: ... here. New.
8507 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8508 * server.c (myresume, process_serial_event): Likewise.
8509 * thread-db.c (thread_db_find_new_threads): Likewise.
8510 * tracepoint.c (run_inferior_command): Likewise.
8512 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8514 * server.c (handle_search_memory_1): Include access length in
8517 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8519 * linux-crisv32-low.c: Fix compile errors.
8521 2012-09-04 Yao Qi <yao@codesourcery.com>
8523 * tracepoint.c (cmd_qtsv): Adjust debug message.
8524 Don't check CUR_TPOINT.
8526 2012-08-28 Yao Qi <yao@codesourcery.com>
8528 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8529 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8530 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8531 Remove declarations of xmalloc, xreallloc, xstrdup and
8533 * Makefile.in (libiberty_h): New.
8534 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8535 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8537 2012-08-23 Yao Qi <yao@codesourcery.com>
8539 * server.h: Remove declaration of 'xsnprintf'.
8541 2012-08-22 Keith Seitz <keiths@redhat.com>
8543 * server.h: Include build-gnulib-gbserver/config.h.
8544 * gdbreplay.c: Likewise.
8546 2012-08-08 Doug Evans <dje@google.com>
8548 * Makefile.in (SFILES): Add gdb_vecs.c.
8549 (OBS): Add gdb_vecs.o.
8550 (gdb_vecs_h, host_defs_h): New variables.
8551 (thread-db.o): Add $(gdb_vecs_h) dependency.
8552 (gdb_vecs.o): New rule.
8553 * thread-db.c: #include "gdb_vecs.h".
8554 (thread_db_load_search): Use a vector to iterate over path elements.
8555 Handle text appearing after "$pdir".
8557 * configure.ac: Add check for strstr.
8558 * config.in: Regenerate.
8559 * configure: Regenerate.
8561 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8563 * hostio.c (handle_pread): If pread fails, fall back to attempting
8565 (handle_pwrite): Likewise for pwrite.
8567 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8569 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8570 between unsupported TYPE and unimplementable ADDR/LEN combination.
8571 (arm_insert_point): Act on new return value.
8573 2012-07-31 Pedro Alves <palves@redhat.com>
8575 * server.c (process_point_options): Only skip tokens if we find
8576 one that is unrecognized. Don't treat 'X' specially while
8577 skipping unrecognized tokens.
8579 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8581 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8582 to 4-byte-align HW breakpoint addresses for Thumb.
8584 2012-07-27 Yao Qi <yao@codesourcery.com>
8588 * server.h: Declare gdb_agent_about_to_close.
8589 * target.c (kill_inferior): Include "agent.h".
8590 New. Send command 'kill'.
8591 * target.h (kill_inferior): Removed macro.
8592 * tracepoint.c (gdb_agent_about_to_close): New.
8593 (gdb_agent_helper_thread): Handle command 'close'.
8594 Wait endlessly until the inferior stops.
8595 Install gdb_agent_remove_socket to atexit hook.
8596 (agent_socket_name): New static variable.
8597 (gdb_agent_socket_init): Replace local variable 'name' with
8598 'agent_socket_name'.
8599 (gdb_agent_remove_socket): New.
8601 2012-07-27 Yao Qi <yao@codesourcery.com>
8603 * server.c (process_point_options): Stop at 'X' when parsing.
8605 2012-07-19 Michael Eager <eager@eagercon.com>
8607 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8609 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8610 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8611 hardware breakpoint.
8613 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8615 * gdbserver/linux-low.c (initialize_low): Call
8616 linux_ptrace_init_warnings.
8618 2012-07-02 Doug Evans <dje@google.com>
8620 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8623 2012-07-02 Stan Shebs <stan@codesourcery.com>
8625 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8626 (ax.o): Add it to build rule.
8628 (OBS): Add format.o.
8629 (IPA_OBS): Add format.o.
8630 * server.c (handle_query): Claim support for breakpoint commands.
8631 (process_point_options): Add command case.
8632 (process_serial_event): Leave running if there are printfs in
8634 * mem-break.h (any_persistent_commands): Declare.
8635 (add_breakpoint_commands): Declare.
8636 (gdb_no_commands_at_breakpoint): Declare.
8637 (run_breakpoint_commands): Declare.
8638 * mem-break.c (struct point_command_list): New struct.
8639 (struct breakpoint): New field command_list.
8640 (any_persistent_commands): New function.
8641 (add_commands_to_breakpoint): New function.
8642 (add_breakpoint_commands): New function.
8643 (gdb_no_commands_at_breakpoint): New function.
8644 (run_breakpoint_commands): New function.
8645 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8647 * ax.c: Include format.h.
8648 (ax_printf): New function.
8649 (gdb_eval_agent_expr): Add printf opcode.
8651 2012-06-13 Yao Qi <yao@codesourcery.com>
8653 * server.c (start_inferior): Remove duplicated writes to fields
8654 'last_resume_kind' and 'last_status' of 'current_inferior'.
8656 2012-06-12 Yao Qi <yao@codesourcery.com>
8657 Pedro Alves <palves@redhat.com>
8659 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8661 * server.c (handle_v_cont): Extend comment.
8663 2012-06-11 Yao Qi <yao@codesourcery.com>
8665 * linux-low.c (linux_attach): Add 'static'.
8667 2012-06-06 Yao Qi <yao@codesourcery.com>
8669 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8671 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8673 Fix gcc -flto compilation warning.
8674 * server.c (main): Make variable multi_mode and attach volatile.
8676 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8678 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8679 if the platform doesn't know about it.
8681 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8683 * Makefile.in (SFILES): Add linux-tile-low.c.
8684 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8685 * configure.srv: Handle tilegx-*-linux*.
8686 * linux-tile-low.c: New file.
8688 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8690 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8692 2012-05-24 Pedro Alves <palves@redhat.com>
8696 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8698 2012-05-24 Pedro Alves <palves@redhat.com>
8702 Replace target_signal with gdb_signal throughout.
8704 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8706 * linux-low.c (linux_store_registers): Avoid the copying sequence
8707 when no data has been retrieved by ptrace.
8709 2012-05-22 Will Deacon <will.deacon@arm.com>
8711 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8712 Include asm/ptrace.h.
8713 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8716 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8718 * linux-low.c (linux_store_registers): Don't re-retrieve data
8719 with ptrace that has already been obtained from /proc. Always
8720 copy any data retrieved with ptrace to the buffer supplied.
8722 2012-05-11 Yao Qi <yao@codesourcery.com>
8723 Pedro Alves <palves@redhat.com>
8725 * linux-low.c (enum stopping_threads_kind): New.
8726 (stopping_threads): Change type to `enum stopping_threads_kind'.
8727 (handle_extended_wait): If stopping and suspending threads, leave
8728 the new_lwp suspended too.
8729 (linux_wait_for_event): Adjust.
8730 (stop_all_lwps): Set `stopping_threads' to
8731 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8732 whether we're suspending threads or just stopping them. Assert no
8735 2012-04-29 Yao Qi <yao@codesourcery.com>
8737 * server.h: Move some code to ...
8738 * gdbthread.h: ... here. New.
8739 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8740 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8741 (nto-low.o, win32-low.o): Likewise.
8742 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8743 * regcache.c, remote-utils.c, server.c: Likewise.
8744 * target.c, tracepoint.c, win32-low.c: Likewise.
8746 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8748 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8749 (PTRACE_ARG4_TYPE): Likewise.
8750 (PTRACE_XFER_TYPE): Likewise.
8751 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8752 ptrace to PTRACE_ARG3_TYPE.
8753 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8754 (PTRACE_ARG4_TYPE): Likewise.
8755 (PTRACE_XFER_TYPE): Likewise.
8756 (linux_detach_one_lwp): Cast fourth argument of
8757 ptrace to long then PTRACE_ARG4_TYPE.
8758 (regsets_fetch_inferior_registers): Cast third argument of
8759 ptrace to long then PTRACE_ARG3_TYPE.
8760 (regsets_store_inferior_registers): Likewise.
8762 2012-04-20 Pedro Alves <palves@redhat.com>
8764 * configure: Regenerate.
8766 2012-04-19 Pedro Alves <palves@redhat.com>
8768 * Makefile.in (GNULIB_BUILDDIR): New.
8769 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8770 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8771 (all, install-only, uninstall, clean-info, all-lib, clean): No
8772 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8773 (maintainer-clean realclean distclean): Use subdir_do.
8775 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8776 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8777 * acinclude.m4: Include acx_configure_dir.m4.
8778 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8779 calls. Call AC_PROG_RANLIB. Configure gnulib using
8782 (GNULIB_STDINT_H): Adjust.
8783 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8784 * gdbreplay.c: Include build-gnulib/config.h.
8785 * server.h: Likewise.
8786 * aclocal.m4: Regenerate.
8787 * config.in: Regenerate.
8788 * configure: Regenerate.
8790 2012-04-19 Pedro Alves <palves@redhat.com>
8792 * Makefile.in (LIBGNU, INCGNU): Adjust.
8793 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8794 (all, install-only, uninstall, clean-info, all-lib, clean)
8795 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8796 * configure.ac: Adjust AC_OUTPUT output.
8797 * aclocal.m4: Regenerate.
8798 * configure: Regenerate.
8800 2012-04-19 Pedro Alves <palves@redhat.com>
8802 * Makefile.in (generated_files): New.
8803 (server_h): Remove the explicit dependency on config.h, and depend
8804 on $generated_files.
8806 2012-04-19 Pedro Alves <palves@redhat.com>
8808 * Makefile.in (INCGNU): Add -Ignulib.
8810 2012-04-19 Pedro Alves <palves@redhat.com>
8812 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8813 (INCGNU): ... this, and spell out -I here.
8814 (GNULIB_LIB): Rename to ...
8816 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8818 2012-04-19 Pedro Alves <palves@redhat.com>
8820 * config.in: Regenerate.
8822 2012-04-19 Pedro Alves <palves@redhat.com>
8824 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8825 * server.h (memmem): Remove declaration.
8826 * config.in: Regenerate.
8827 * configure: Regenerate.
8829 2012-04-19 Yao Qi <yao@codesourcery.com>
8831 * Makefile.in (SFILES): Add common/vec.c.
8835 2012-04-19 Yao Qi <yao@codesourcery.com>
8837 * remote-utils.c (prepare_resume_reply): Replace with macro
8838 target_core_of_thread.
8839 * server.c (handle_qxfer_threads_proper): Likewise.
8840 * target.h (traget_core_of_thread): New macro.
8842 2012-04-18 Pedro Alves <palves@redhat.com>
8844 * aclocal.m4: Regenerate.
8845 * configure: Regenerate.
8847 2012-04-16 Yao Qi <yao@codesourcery.com>
8849 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8850 duplicated on address.
8852 2012-04-16 Yao Qi <yao@codesourcery.com>
8854 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8855 (struct tracepoint_action_ops) <send>: New field.
8856 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8857 (agent_expr_send, x_tracepoint_action_send): New.
8858 (l_tracepoint_action_send): New.
8859 (cmd_qtdp): Download and install tracepoint
8860 according to `use_agent'.
8861 (run_inferior_command): Add one more parameter `len'.
8863 (tracepoint_send_agent): New.
8864 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8866 2012-04-16 Yao Qi <yao@codesourcery.com>
8868 * tracepoint.c (download_tracepoints): Moved to ...
8869 (cmd_qtstart): ... here.
8871 2012-04-14 Yao Qi <yao@codesourcery.com>
8873 * tracepoint.c: Include inttypes.h.
8874 (struct collect_memory_action): Use sized types.
8875 (struct tracepoint): Likewise.
8876 (cmd_qtdp, stop_tracing): Update print specifiers.
8877 (cmd_qtp, response_tracepoint): Likewise.
8878 (collect_data_at_tracepoint): Likewise.
8879 (collect_data_at_step): Likewise.
8881 2012-04-14 Yao Qi <yao@codesourcery.com>
8883 Import gnulib module inttypes.
8884 * aclocal.m4, config.in, configure: Regenerated.
8886 2012-04-14 Yao Qi <yao@codesourcery.com>
8888 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8889 Makefile and config.status at last.
8891 2012-04-13 Yao Qi <yao@codesourcery.com>
8893 * tracepoint.c: Include stdint.h unconditionally.
8895 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8897 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8898 on BFD_HAVE_SYS_PROCFS_TYPE.
8899 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8900 * configure: Regenerate.
8901 * config.in: Likewise.
8903 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8905 * Makefile.in (clean): Also remove x32.c x32-linux.c
8906 x32-avx.c x32-avx-linux.c.
8907 (x32.o): New target.
8909 (x32-linux.o): Likewise.
8910 (x32-linux.c): Likewise.
8911 (x32-avx.o): Likewise.
8912 (x32-avx.c): Likewise.
8913 (x32-avx-linux.o): Likewise.
8914 (x32-avx-linux.c): Likewise.
8916 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8917 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8918 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8919 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8920 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8921 i386/x32-avx-linux.xml.
8923 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8924 (init_registers_x32_avx_linux): Likwise.
8925 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8926 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8928 2012-04-13 Pedro Alves <palves@redhat.com>
8930 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8931 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8932 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8933 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8936 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8938 * linux-x86-low.c (compat_x32_clock_t): New.
8939 (compat_x32_siginfo_t): Likewise.
8940 (compat_x32_siginfo_from_siginfo): Likewise.
8941 (siginfo_from_compat_x32_siginfo): Likewise.
8942 (linux_is_elf64): Likewise.
8943 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8944 and siginfo_from_compat_x32_siginfo for x32.
8945 (x86_arch_setup): Set linux_is_elf64.
8947 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8950 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8952 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8953 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8954 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8955 compatible with process.
8957 2012-04-12 Yao Qi <yao@codesourcery.com>
8959 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8960 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8961 (install-only, install-info, clean): Handle sub dir gnulib.
8962 (all-lib, am--refresh): New targets.
8963 (memmem.o): Remove target.
8964 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8965 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8966 (AC_REPLACE_FUNCS): Remove memmem.
8967 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8968 (AC_OUTPUT): Generate Makefile in gnulib/.
8969 * aclocal.m4, config.in, configure: Regenerated.
8971 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8973 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8975 2012-04-05 Pedro Alves <palves@redhat.com>
8977 -Werror=strict-aliasing
8979 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8982 2012-04-04 Pedro Alves <palves@redhat.com>
8984 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8985 (sparc_store_gregset_from_stack, sparc_store_gregset)
8986 (sparc_breakpoint_at): Fix formatting.
8988 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8990 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8992 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8993 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8994 * config.in: Regenerate.
8995 * configure: Likewise.
8997 2012-03-29 Pedro Alves <palves@redhat.com>
8999 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9000 Correct ptrace arguments.
9002 2012-03-28 Pedro Alves <palves@redhat.com>
9004 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9005 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9006 (IA64_FR1_REGNUM): New defines.
9007 (ia64_fetch_register): New.
9008 (the_low_target): Install it.
9009 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9011 * linux-low.c (linux_fetch_registers): Try the
9012 the_low_target.fetch_register hook first.
9014 * linux-arm-low.c (the_low_target): Adjust.
9015 * linux-bfin-low.c (the_low_target): Adjust.
9016 * linux-cris-low.c (the_low_target): Adjust.
9017 * linux-crisv32-low.c (the_low_target): Adjust.
9018 * linux-m32r-low.c (the_low_target): Adjust.
9019 * linux-m68k-low.c (the_low_target): Adjust.
9020 * linux-mips-low.c (the_low_target): Adjust.
9021 * linux-ppc-low.c (the_low_target): Adjust.
9022 * linux-s390-low.c (the_low_target): Adjust.
9023 * linux-sh-low.c (the_low_target): Adjust.
9024 * linux-sparc-low.c (the_low_target): Adjust.
9025 * linux-tic6x-low.c (the_low_target): Adjust.
9026 * linux-x86-low.c (the_low_target): Adjust.
9027 * linux-xtensa-low.c (the_low_target): Adjust.
9029 2012-03-26 Pedro Alves <palves@redhat.com>
9031 * server.c (handle_qxfer_libraries): Don't bail early if
9032 the_target->qxfer_libraries_svr4 is not NULL.
9034 2012-03-26 Pedro Alves <palves@redhat.com>
9036 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9038 2012-03-23 Pedro Alves <palves@redhat.com>
9040 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9041 "library-list-svr4" element's start tag when the the DSO list is
9044 2012-03-23 Pedro Alves <palves@redhat.com>
9046 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9047 a variable whose type size is the same as the inferior's pointer
9050 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9052 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9054 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9055 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9056 * linux-low.h: Include <signal.h>.
9057 (struct siginfo): Remove forward declaration.
9058 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9061 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9063 * .gitignore: Ignore more files.
9065 2012-03-19 Pedro Alves <palves@redhat.com>
9066 Jan Kratochvil <jan.kratochvil@redhat.com>
9068 * server.c (cont_thread, general_thread): Add describing comments.
9069 (start_inferior): Clear `cont_thread'.
9070 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9073 2012-03-15 Yao Qi <yao@codesourcery.com>
9075 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9077 (cmd_qtdp): ... here.
9079 2012-03-15 Yao Qi <yao@codesourcery.com>
9081 * tracepoint.c (struct tracepoint_action_ops): New.
9082 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9083 (m_tracepoint_action_download): New.
9084 (r_tracepoint_action_download): New.
9085 (x_tracepoint_action_download): New.
9086 (l_tracepoint_action_download): New.
9087 (add_tracepoint_action): Install `action->ops' according type.
9088 (download_tracepoint_1): Move code `download' function pointer
9089 of various tracepoint_action_ops.
9091 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9093 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9094 linux_ptrace_attach_warnings.
9096 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9098 * Makefile.in (linux-ptrace.o): New.
9099 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9100 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9101 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9102 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9103 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9105 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9107 2012-03-08 Yao Qi <yao@codesourcery.com>
9108 Pedro Alves <palves@redhat.com>
9110 Fix PR server/13392.
9111 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9113 * tracepoint.c (remove_tracepoint): New.
9114 (cmd_qtdp): Call remove_tracepoint when failed to install.
9116 2012-03-07 Pedro Alves <palves@redhat.com>
9118 * linux-low.c (get_detach_signal): New.
9119 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9120 Pass on pending signals to PTRACE_DETACH. Check the result of the
9122 * server.c (program_signals, program_signals_p): New.
9123 (handle_general_set): Handle QProgramSignals.
9124 * server.h (program_signals, program_signals_p): Declare.
9126 2012-03-05 Pedro Alves <palves@redhat.com>
9127 Jan Kratochvil <jan.kratochvil@redhat.com>
9129 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9132 2012-03-03 Yao Qi <yao@codesourcery.com>
9134 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9135 agent_look_up_symbols.
9137 2012-03-03 Yao Qi <yao@codesourcery.com>
9139 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9140 (linux-x86-low.o): Likewise.
9141 * server.h: Remove in_process_agent_loaded.
9142 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9146 2012-03-03 Yao Qi <yao@codesourcery.com>
9148 * tracepoint.c (gdb_agent_capability): New global.
9149 (in_process_agent_loaded_ust): Renamed to
9150 `in_process_agent_supports_ust'.
9152 (in_process_agent_supports_ust): Call agent_capability_check.
9153 (clear_installed_tracepoints): Assert that agent supports
9156 2012-03-03 Yao Qi <yao@codesourcery.com>
9158 * linux-low.c (linux_supports_agent): New.
9159 (linux_target_ops): Initialize field `supports_agent' with
9160 linux_supports_agent.
9161 * target.h (struct target_ops) <supports_agent>: New.
9162 (target_supports_agent): New macro.
9163 * server.c (handle_general_set): Handle packet 'QAgent'.
9164 (handle_query): Send `QAgent+'.
9165 * Makefile.in (server.o): Depends on agent.h.
9167 2012-03-03 Yao Qi <yao@codesourcery.com>
9169 * Makefile.in (OBS): Add agent.o.
9170 Add new rule for agent.o.
9171 Track dependence of tracepoint.c on agent.h.
9172 * tracepoint.c (run_inferior_command_1):
9173 (run_inferior_command): Call agent_run_command.
9174 (gdb_ust_connect_sync_socket): Deleted. Move it to
9176 (resume_thread, stop_thread): Likewise.
9177 (gdb_ust_socket_init): Renamed to ...
9178 (gdb_agent_socket_init): ... New.
9179 (gdb_ust_thread): Renamed to ...
9180 (gdb_agent_helper_thread): ... New.
9181 (gdb_ust_init): Move some code to ...
9182 (gdb_agent_init): ... here. New.
9183 [HAVE_UST]: Call gdb_ust_init.
9184 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9185 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9186 * config.in, configure: Regenerated.
9188 2012-03-02 Pedro Alves <palves@redhat.com>
9190 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9191 * linux-low.c (struct simple_pid_list): New.
9192 (stopped_pids): New a struct simple_pid_list pointer.
9193 (add_to_pid_list, pull_pid_from_list): New.
9194 (handle_extended_wait): Don't assume the first signal new children
9195 report is SIGSTOP. Adjust call to pull_pid_from_list.
9196 (linux_wait_for_lwp): Adjust.
9198 2012-03-02 Yao Qi <yao@codesourcery.com>
9200 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9203 2012-03-02 Yao Qi <yao@codesourcery.com>
9205 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9206 `stop_pc' and `tpoint'. Update caller.
9208 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9210 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9211 * linux-low.c (use_linux_regsets): New macro.
9212 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9213 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9214 (linux_register_in_regsets): New function.
9215 (usr_fetch_inferior_registers): Skip registers covered by
9217 (usr_store_inferior_registers): Likewise.
9218 (usr_fetch_inferior_registers): New macro.
9219 (usr_store_inferior_registers): Likewise.
9220 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9221 (linux_store_registers): Likewise.
9222 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9224 (init_registers_mips64_dsp_linux): Likewise.
9225 (init_registers_mips_linux): New macro.
9226 (init_registers_mips_dsp_linux): Likewise.
9227 (mips_dsp_num_regs): Likewise.
9228 (DSP_BASE, DSP_CONTROL): New fallback macros.
9229 (mips_base_regs): New macro.
9230 (mips_regmap): Use it. Fix the size.
9231 (mips_dsp_regmap): New variable.
9232 (mips_dsp_regset_bitmap): Likewise.
9233 (mips_arch_setup): New function.
9234 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9236 (mips_cannot_store_register): Likewise.
9237 (the_low_target): Update .arch_setup, .num_regs and .regmap
9238 initializers. Add .regset_bitmap initializer.
9239 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9241 * linux-bfin-low.c (the_low_target): Likewise.
9242 * linux-cris-low.c (the_low_target): Likewise.
9243 * linux-crisv32-low.c (the_low_target): Likewise.
9244 * linux-ia64-low.c (the_low_target): Likewise.
9245 * linux-m32r-low.c (the_low_target): Likewise.
9246 * linux-m68k-low.c (the_low_target): Likewise.
9247 * linux-ppc-low.c (the_low_target): Likewise.
9248 * linux-s390-low.c (the_low_target): Likewise.
9249 * linux-sh-low.c (the_low_target): Likewise.
9250 * linux-sparc-low.c (the_low_target): Likewise.
9251 * linux-tic6x-low.c (the_low_target): Likewise.
9252 * linux-x86-low.c (the_low_target): Likewise.
9253 * linux-xtensa-low.c (the_low_target): Likewise.
9254 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9255 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9256 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9258 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9259 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9261 2012-02-29 Yao Qi <yao@codesourcery.com>
9262 Pedro Alves <palves@redhat.com>
9264 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9265 `step_over_finished' is true.
9267 2012-02-27 Pedro Alves <palves@redhat.com>
9269 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9270 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9272 2012-02-27 Pedro Alves <palves@redhat.com>
9275 * linux-low.c (pid_is_stopped): New.
9276 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9278 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9280 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9283 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9285 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9287 2012-02-24 Luis Machado <lgustavo@codesourcery>
9289 * server.c (handle_query): Advertise support for target-side
9290 breakpoint condition evaluation.
9291 (process_point_options): New function.
9292 (process_serial_event): When inserting a breakpoint, check for
9293 a target-side condition that should be evaluated.
9295 * mem-break.c: Include regcache.h and ax.h.
9296 (point_cond_list_t): New data structure.
9297 (breakpoint) <cond_list>: New field.
9298 (find_gdb_breakpoint_at): Make non-static.
9299 (delete_gdb_breakpoint_at): Clear any target-side
9301 (clear_gdb_breakpoint_conditions): New function.
9302 (add_condition_to_breakpoint): Likewise.
9303 (add_breakpoint_condition): Likewise.
9304 (gdb_condition_true_at_breakpoint): Likewise.
9305 (gdb_breakpoint_here): Return result directly instead
9306 of going through a local variable.
9308 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9309 (clear_gdb_breakpoint_conditions): Likewise.
9310 (add_breakpoint_condition): Likewise.
9311 (gdb_condition_true_at_breakpoint): Likewise.
9313 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9314 (need_step_over_p): Take target-side breakpoint condition into
9317 2012-02-24 Luis Machado <lgustavo@codesourcery>
9319 * server.h: Include tracepoint.h.
9320 (agent_mem_read, agent_get_trace_state_variable_value,
9321 agent_set_trace_state_variable_value,
9322 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9323 get_set_tsv_func_addr): New prototypes.
9325 * ax.h: New include file.
9326 * ax.c: New source file.
9328 * tracepoint.c: Include ax.h.
9329 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9330 agent_expr, eval_result_type): Move to ax.h.
9331 (parse_agent_expr): Rename to ...
9332 (gdb_parse_agent_expr): ... this, make it non-static and move
9334 (unparse_agent_expr) Rename to ...
9335 (gdb_unparse_agent_expr): ... this, make it non-static and move
9337 (eval_agent_expr): Rename to ...
9338 (eval_tracepoint_agent_expr): ... this.
9339 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9340 forward declarations.
9341 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9342 (agent_get_trace_state_variable_value): New function.
9343 (agent_set_trace_state_variable_value): New function.
9344 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9345 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9346 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9347 (condition_true_at_tracepoint): Likewise.
9348 (parse_agent_expr): Rename to ...
9349 (gdb_parse_agent_expr): ... this and move to ax.c.
9350 (unparse_agent_expr): Rename to ...
9351 (gdb_unparse_agent_expr): ... this and move to ax.c.
9352 (gdb_agent_op_name): Move to ax.c.
9353 (eval_agent_expr): Rename to ...
9354 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9356 (eval_tracepoint_agent_expr): New function.
9357 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9359 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9361 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9362 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9363 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9364 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9365 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9366 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9367 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9368 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9369 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9370 (compile_bytecodes): Remove forward declaration.
9371 (is_goto_target): Move to ax.c.
9372 (compile_bytecodes): Move to ax.c and call
9373 agent_get_trace_state_variable_value (...) and
9374 agent_set_trace_state_variable_value (...).
9376 * Makefile.in: Update ax.c and IPA dependencies.
9378 2012-02-24 Pedro Alves <palves@redhat.com>
9380 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9381 (cmd_bigqtbuffer_circular): ... this. Only handle
9382 'QTBuffer:circular:'.
9383 (handle_tracepoint_general_set): Adjust.
9385 2012-02-16 Yao Qi <yao@codesourcery.com>
9387 * inferiors.c: Move code to ...
9388 * dll.c: .... here. New.
9389 * server.h: Declare clear_dlls.
9390 * Makefile.in (SFILES): Add dll.c.
9394 2012-02-11 Yao Qi <yao@codesourcery.com>
9396 * server.c: (handle_monitor_command): Add a new parameter
9398 (handle_query): Update caller.
9400 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9402 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9403 * configure, config.in: Regenerate.
9404 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9407 2012-02-02 Pedro Alves <palves@redhat.com>
9409 Try SIGKILL first, then PTRACE_KILL.
9410 * linux-low.c (linux_kill_one_lwp): New.
9411 (linux_kill_one_lwp): Rename to ...
9412 (kill_one_lwp_callback): ... this. Use the new
9415 2012-02-02 Pedro Alves <palves@redhat.com>
9417 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9420 2012-01-27 Pedro Alves <palves@redhat.com>
9422 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9423 (elf_64_file_p): Make static.
9424 (linux_pid_exe_is_elf_64_file): New.
9425 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9426 Delete declarations.
9427 (linux_pid_exe_is_elf_64_file): Declare.
9428 * linux-x86-low.c (x86_arch_setup): Use
9429 linux_pid_exe_is_elf_64_file.
9431 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9433 * linux-low.c (linux_wait_for_event_1): Rename to ...
9434 (linux_wait_for_event): ... here and merge it with former
9435 linux_wait_for_event - new variable wait_ptid, use it.
9436 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9438 2012-01-23 Pedro Alves <palves@redhat.com>
9440 * server.c (main): Avoid yet another case of infinite loop while
9441 detaching/killing after a longjmp.
9443 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9446 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9448 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9450 * hostio.c (handle_readlink): New function.
9451 (handle_vFile): Call it to handle "vFile:readlink" packets.
9453 2012-01-20 Pedro Alves <palves@redhat.com>
9454 Ulrich Weigand <ulrich.weigand@linaro.org>
9456 * server.c (handle_v_requests): Only support vAttach and vRun to
9457 start multiple processes when in extended protocol mode.
9459 2012-01-17 Pedro Alves <palves@redhat.com>
9461 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9462 memalign plus mprotect to allocate the scratch buffer.
9464 2012-01-13 Pedro Alves <palves@redhat.com>
9466 * server.c (attach_inferior): Clear `cont_thread'.
9468 2012-01-13 Pedro Alves <palves@redhat.com>
9470 * server.c (main): Avoid infinite loop while detaching/killing
9473 2012-01-09 Doug Evans <dje@google.com>
9475 * server.c (start_inferior): Set last_ptid in --wrapper case.
9477 2012-01-06 Yao Qi <yao@codesourcery.com>
9479 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9481 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9483 2012-01-04 Yao Qi <yao@codesourcery.com>
9485 * tracepoint.c (cmd_qtdp): Print debug message
9486 for static tracepoint.
9488 2012-01-04 Yao Qi <yao@codesourcery.com>
9490 * tracepoint.c (trace_vdebug): Differentiate debug message
9491 between gdbserver and IPA.
9493 2012-01-03 Yao Qi <yao@codesourcery.com>
9495 * tracepoint.c (tracepoint_was_hit): Don't collect for
9498 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9500 * terminal.h: Reformat copyright header.
9502 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9504 * server.c (gdbserver_version): Update copyright year.
9505 * gdbreplay.c (gdbreplay_version): Likewise.
9507 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9509 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9512 2011-12-18 Hui Zhu <teawater@gmail.com>
9513 * linux-low.c (linux_create_inferior): Save return value to ret.
9515 2011-12-18 Hui Zhu <teawater@gmail.com>
9517 * linux-low.c (linux_create_inferior): Save return value to ret.
9519 2011-12-16 Doug Evans <dje@google.com>
9521 * linux-low.c (linux_create_inferior): If stdio connection,
9522 redirect stdin from /dev/null, stdout to stderr.
9523 * remote-utils.c (remote_is_stdio): New static global.
9524 (remote_connection_is_stdio): New function.
9525 (remote_prepare): Handle stdio connection.
9526 (remote_open): Ditto.
9527 (remote_close): Don't close stdin for stdio connections.
9528 (read_prim,write_prim): New functions. Replace all calls to
9529 read/write to these.
9530 * server.c (main): Watch for "-" argument. Move call to
9531 remote_prepare before start_inferior.
9532 * server.h (STDIO_CONNECTION_NAME): New macro.
9533 (remote_connection_is_stdio): Declare.
9535 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9536 in debugging output.
9538 2011-12-15 Yao Qi <yao@codesourcery.com>
9540 * tracepoint.c: Include sys/syscall.h.
9541 (gdb_ust_thread): Remove preprocessor conditional.
9543 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9545 * linux-low.c (linux_detach_one_lwp): Call
9546 the_low_target.prepare_to_resume before detaching.
9548 2011-12-14 Yao Qi <yao@codesourcery.com>
9550 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9553 2011-12-14 Yao Qi <yao@codesourcery.com>
9555 * i386-low.c (i386_low_stopped_data_address): Initialize local
9558 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9562 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9563 DR_CONTROL unless necessary. Extend comments.
9564 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9565 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9567 2011-12-13 Yao Qi <yao@codesourcery.com>
9569 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9571 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9573 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9575 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9576 Print new debug message for such case.
9578 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9580 Fix overlapping memcpy.
9581 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9582 the read_inferior_memory transfer.
9583 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9584 write_inferior_memory transfer.
9585 (set_fast_tracepoint_jump): New variable buf. Use it for the
9586 read_inferior_memory and write_inferior_memory transfers.
9587 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9588 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9589 Use it for the write_inferior_memory transfer.
9590 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9593 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9595 * linux-low.c (fetch_register, store_register): Make code
9596 consistent, fix formatting.
9598 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9600 * linux-low.c (usr_store_inferior_registers): Factor out code
9601 to handle individual registers into...
9602 (store_register): ... this new function.
9604 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9606 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9607 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9608 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9609 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9610 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9611 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9612 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9613 (srv_xmlfiles): Add new XML files.
9615 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9617 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9618 (init_registers_s390_linux32v1): Add prototype.
9619 (init_registers_s390_linux32v2): Likewise.
9620 (init_registers_s390_linux64v1): Likewise.
9621 (init_registers_s390_linux64v2): Likewise.
9622 (init_registers_s390x_linux64v1): Likewise.
9623 (init_registers_s390x_linux64v2): Likewise.
9624 (s390_num_regs): Increment to 52.
9625 (s390_regmap): Add orig_r2 register.
9626 (s390_num_regs_3264): Increment to 68.
9627 (s390_regmap_3264): Add orig_r2 register.
9628 (s390_collect_ptrace_register): Handle orig_r2 register.
9629 (s390_supply_ptrace_register): Likewise.
9630 (s390_fill_last_break): New function.
9631 (s390_store_last_break): Likewise.
9632 (s390_fill_system_call): New function.
9633 (s390_store_system_call): Likewise.
9634 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9636 (s390_check_regset): New function.
9637 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9638 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9639 Update target_regsets for available register sets.
9641 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9642 Jan Kratochvil <jan.kratochvil@redhat.com>
9644 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9645 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9647 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9648 * linux-low.h (struct process_info_private): New member r_debug.
9649 * server.c (handle_qxfer_libraries): Call
9650 the_target->qxfer_libraries_svr4.
9651 (handle_qxfer_libraries_svr4): New function.
9652 (qxfer_packets): New entry "libraries-svr4".
9653 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9654 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9655 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9656 PACKET_qXfer_libraries_svr4.
9658 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9660 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9661 PSW address/mask between 8-byte and 16-byte formats.
9662 (s390_supply_ptrace_register): Likewise.
9663 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9664 basic addressing mode bit.
9666 2011-11-24 Stan Shebs <stan@codesourcery.com>
9668 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9670 2011-11-17 Stan Shebs <stan@codesourcery.com>
9672 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9673 (tracing_start_time): New global.
9674 (tracing_stop_time): New global.
9675 (tracing_user_name): New global.
9676 (tracing_notes): New global.
9677 (tracing_stop_note): New global.
9678 (cmd_qtstart): Set traceframe_usage, start_time.
9679 (stop_tracing): Set stop_time.
9680 (cmd_qtstatus): Report additional status.
9681 (cmd_qtp): New function.
9682 (handle_tracepoint_query): Call it.
9683 (cmd_qtnotes): New function.
9684 (handle_tracepoint_general_set): Call it.
9685 (get_timestamp): Rename from tsv_get_timestamp.
9687 2011-11-14 Stan Shebs <stan@codesourcery.com>
9688 Kwok Cheung Yeung <kcy@codesourcery.com>
9690 * linux-x86-low.c (small_jump_insn): New.
9691 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9692 trampoline and error message, build a trampoline and issue a small
9693 jump instruction to it.
9694 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9695 trampoline and error message.
9696 (x86_get_min_fast_tracepoint_insn_len): New.
9697 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9698 * linux-low.h (struct linux_target_ops): Add arguments to
9699 install_fast_tracepoint_jump_pad operation, add new operation.
9700 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9702 (linux_get_min_fast_tracepoint_insn_len): New function.
9703 (linux_target_op): Add new operation.
9704 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9705 (gdb_trampoline_buffer_end): Ditto.
9706 (gdb_trampoline_buffer_error): Ditto.
9707 (struct ipa_sym_addresses): Add fields for new IPA variables.
9708 (symbol_list): Add entries for new IPA variables.
9709 (struct tracepoint): Add fields to hold the address range of the
9710 trampoline used by the tracepoint.
9711 (trampoline_buffer_head): New static variable.
9712 (trampoline_buffer_tail): Ditto.
9713 (claim_trampoline_space): New function.
9714 (have_fast_tracepoint_trampoline_buffer): New function.
9715 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9717 (install_fast_tracepoint): Ditto, also add error buffer argument.
9718 (cmd_qtminftpilen): New function.
9719 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9720 (fast_tracepoint_from_trampoline_address): New function.
9721 (fast_tracepoint_collecting): Handle trampoline as part of jump
9723 (set_trampoline_buffer_space): New function.
9724 (initialize_tracepoint): Initialize new IPA variables.
9725 * target.h (struct target_ops): Add arguments to
9726 install_fast_tracepoint_jump_pad operation, add new
9727 get_min_fast_tracepoint_insn_len operation.
9728 (target_get_min_fast_tracepoint_insn_len): New.
9729 (install_fast_tracepoint_jump_pad): Add arguments.
9730 * server.h (IPA_BUFSIZ): Define.
9731 * linux-i386-ipa.c: Include extra header files.
9732 (initialize_fast_tracepoint_trampoline_buffer): New function.
9733 (initialize_low_tracepoint): Call it.
9734 * server.h (set_trampoline_buffer_space): Declare.
9735 (claim_trampoline_space): Ditto.
9736 (have_fast_tracepoint_trampoline_buffer): Ditto.
9738 2011-11-14 Yao Qi <yao@codesourcery.com>
9740 * server.c (handle_query): Handle InstallInTrace for qSupported.
9741 * tracepoint.c (add_tracepoint): Sort list.
9742 (install_tracepoint, download_tracepoint): New.
9743 (cmd_qtdp): Call them to install and download tracepoints.
9744 (sort_tracepoints): Removed.
9745 (cmd_qtstart): Update.
9747 2011-11-14 Yao Qi <yao@codesourcery.com>
9749 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9750 * mem-break.h: Declare.
9751 * tracepoint.c (cmd_qtstart): Move some code to ...
9752 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9754 (download_tracepoints): Move some code to ...
9755 (download_tracepoint_1): ... here. New.
9757 2011-11-08 Yao Qi <yao@codesourcery.com>
9759 * remote-utils.c (relocate_instruction): A comment fix.
9761 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9763 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9764 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9765 dr_status_mirror and dr_control_mirror from debug_reg_state.
9766 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9767 (i386_initial_stuff): Remove use of deleted globals.
9768 (i386_get_thread_context, i386_set_thread_context,
9769 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9770 from debug_reg_state.
9772 2011-11-05 Yao Qi <yao@codesourcery.com>
9774 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9775 address as TPOINT's.
9777 2011-11-02 Stan Shebs <stan@codesourcery.com>
9779 * tracepoint.c (agent_mem_read_string): New function.
9780 (eval_agent_expr): Call it for tracenz.
9781 * server.c (handle_query): Report support for tracenz.
9783 2011-11-02 Yao Qi <yao@codesourcery.com>
9785 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9787 2011-11-02 Yao Qi <yao@codesourcery.com>
9789 * target.h: Fix a typo in comment.
9791 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9793 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9794 clobber the breakpoints' shadows with fast tracepoint jumps.
9795 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9796 * target.c (write_inferior_memory): Also pass MYADDR down to
9799 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9801 * configure.ac: Check support for personality routine.
9802 * configure: Regenerate.
9803 * config.in: Likewise.
9804 * linux-low.c: Include <sys/personality.h>.
9805 Define ADDR_NO_RANDOMIZE if necessary.
9806 (linux_create_inferior): Disable address space randomization when
9807 forking inferior, if requested.
9808 (linux_supports_disable_randomization): New function.
9809 (linux_target_ops): Install it.
9810 * server.h (disable_randomization): Declare.
9811 * server.c (disable_randomization): New global variable.
9812 (handle_general_set): Handle QDisableRandomization.
9813 (handle_query): Likewise for qSupported.
9814 (main): Support --disable-randomization and --no-disable-randomization
9815 command line arguments.
9816 * target.h (struct target_ops): Add supports_disable_randomization.
9817 (target_supports_disable_randomization): New macro.
9819 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9821 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9823 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9824 [!PT_GETDSBT] (target_loadmap): New definition.
9825 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9826 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9827 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9828 and PT_GETDSBT to LINUX_LOADMAP.
9829 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9830 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9832 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9834 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9835 (arm_linux_hwbp_cap): New static variable.
9836 (arm_linux_get_hwbp_cap): Replace by ...
9837 (arm_linux_init_hwbp_cap): ... this new function.
9838 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9839 (arm_linux_get_hw_watchpoint_count): Likewise.
9840 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9841 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9842 (arm_prepare_to_resume): Use perror_with_name instead of error.
9844 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9846 * linux-arm-low.c: Include <signal.h>.
9847 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9848 (struct arm_linux_hwbp_cap): New data type.
9849 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9850 (struct arm_linux_hw_breakpoint): New data type.
9851 (MAX_BPTS, MAX_WPTS): Define.
9852 (struct arch_process_info, struct arch_lwp_info): New data types.
9853 (arm_linux_get_hwbp_cap): New function.
9854 (arm_linux_get_hw_breakpoint_count): Likewise.
9855 (arm_linux_get_hw_watchpoint_count): Likewise.
9856 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9857 (arm_hwbp_control_initialize): Likewise.
9858 (arm_hwbp_control_is_enabled): Likewise.
9859 (arm_hwbp_control_is_initialized): Likewise.
9860 (arm_hwbp_control_disable): Likewise.
9861 (arm_linux_hw_breakpoint_equal): Likewise.
9862 (arm_linux_hw_point_initialize): Likewise.
9863 (struct update_registers_data): New data structure.
9864 (update_registers_callback: New function.
9865 (arm_insert_point): Likewise.
9866 (arm_remove_point): Likewise.
9867 (arm_stopped_by_watchpoint): Likewise.
9868 (arm_stopped_data_address): Likewise.
9869 (arm_new_process): Likewise.
9870 (arm_new_thread): Likewise.
9871 (arm_prepare_to_resume): Likewise.
9872 (the_low_target): Register arm_insert_point, arm_remove_point,
9873 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9874 arm_new_thread, and arm_prepare_to_resume.
9876 2011-09-15 Stan Shebs <stan@codesourcery.com>
9878 * server.h (struct emit_ops): Add compare-goto fields.
9879 * tracepoint.c (gdb_agent_op_sizes): New table.
9880 (emit_eq_goto): New function.
9881 (emit_ne_goto): New function.
9882 (emit_lt_goto): New function.
9883 (emit_le_goto): New function.
9884 (emit_gt_goto): New function.
9885 (emit_ge_goto): New function.
9886 (is_goto_target): New function.
9887 (compile_bytecodes): Recognize special cases of compare-goto
9888 combinations and call specialized emitters for them.
9889 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9890 (amd64_emit_ne_goto): New function.
9891 (amd64_emit_lt_goto): New function.
9892 (amd64_emit_le_goto): New function.
9893 (amd64_emit_gt_goto): New function.
9894 (amd64_emit_ge_goto): New function.
9895 (amd64_emit_ops): Add the new functions.
9896 (i386_emit_eq_goto): New function.
9897 (i386_emit_ne_goto): New function.
9898 (i386_emit_lt_goto): New function.
9899 (i386_emit_le_goto): New function.
9900 (i386_emit_gt_goto): New function.
9901 (i386_emit_ge_goto): New function.
9902 (i386_emit_ops): Add the new functions.
9904 2011-09-08 Stan Shebs <stan@codesourcery.com>
9906 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9907 (i386_emit_epilogue): Restore %ebx.
9909 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9911 * server.c (step_thread): Remove definition.
9912 (process_serial_event): Don't handle Hs.
9913 * server.h (step_thread): Remove declaration.
9914 * target.c (set_desired_inferior): Remove use of step_thread.
9916 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9918 * linux-low.c: Include linux-procfs.h.
9919 (linux_attach_lwp_1): Update comments.
9920 (linux_attach): Scan for existing threads when attaching to a
9921 process that is the tgid.
9922 * Makefile.in: Update dependencies.
9924 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9926 * configure.srv: Add linux-procfs.o dependencies.
9928 2011-08-14 Yao Qi <yao@codesourcery.com>
9930 * target.h (struct target_ops): Fix indent.
9931 * win32-low.c (win32_target_ops): Fix comment.
9933 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9934 Yao Qi <yao@codesourcery.com>
9936 * Makefile.in (clean): Remove tic6x-*.c files.
9937 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9938 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9939 (tic6x-c64xp-linux.c): Likewise.
9940 * configure.srv: Add support for tic6x-*-uclinux.
9941 * linux-tic6x-low.c: New.
9942 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9944 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9945 Yao Qi <yao@codesourcery.com>
9947 * target.h (struct target_ops): Add read_loadmap.
9948 * linux-low.c (struct target_loadseg): New type.
9949 (struct target_loadmap): New type.
9950 (linux_read_loadmap): New function.
9951 (linux_target_ops): Add linux_read_loadmap.
9952 * server.c (handle_query): Support qXfer:fdpic:read packet.
9953 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9956 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9958 * win32-low.c: Include <stdint.h>.
9960 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9962 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9963 to the inferior here.
9964 (i386_remove_aligned_watchpoint): Ditto.
9965 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9966 fit part of the watchpoint in the debug registers.
9967 (i386_update_inferior_debug_regs): New.
9968 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9969 registers, and only update the inferior on success.
9970 (i386_low_remove_watchpoint): Ditto.
9972 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9974 * linux-low.c (compare_ints, unique, list_threads, show_process,
9975 linux_core_of_thread): Delete.
9976 (linux_target_ops): Change linux_core_of_thread to
9977 linux_common_core_of_thread.
9978 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9979 * utils.c (malloc_failure): Change type of argument.
9980 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9981 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9982 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9983 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9984 (IPA_OBJS): Add common-utils-ipa.o.
9985 (ptid_h, linux_osdata_h): New macros.
9986 (server_h): Add common/common-utils.h, common/xml-utils.h,
9987 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9989 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9990 ptid.o, buffer.o): New rules.
9991 (linux-low.o): Add common/linux-osdata.h as a dependency.
9992 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9993 * configure.ac: Add AC_HEADER_DIRENT check.
9994 * config.in: Regenerate.
9995 * configure: Regenerate.
9996 * remote-utils.c (xml_escape_text): Delete.
9997 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9998 buffer_xml_printf): Move to common/buffer.c.
9999 * server.c (main): Remove call to initialize_inferiors.
10000 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10001 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10002 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10003 internal_error, gdb_assert, gdb_assert_fail): Delete.
10004 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10005 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10007 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10008 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10009 initialize_inferiors): Delete.
10011 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10013 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10016 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10018 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10020 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10022 2011-05-26 Yao Qi <yao@codesourcery.com>
10024 * Makefile.in (thread-db.o): Track dependence to
10025 common/gdb_thread_db.h.
10026 * thread-db.c: include gdb_thread_db.h from right place.
10028 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10030 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10031 __FILE__ and __LINE__ to internal_error.
10033 2011-05-13 Doug Evans <dje@google.com>
10035 * thread-db.c (try_thread_db_load_from_sdir): New function.
10036 (try_thread_db_load_from_dir): New function.
10037 (thread_db_load_search): Handle $sdir, ignore $pdir.
10038 Remove trying of system directories if search of
10039 libthread-db-search-path fails, that is now done via $sdir.
10041 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10043 * server.c (handle_query): Add EnableDisableTracepoints to the list
10044 of supported features.
10045 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10047 (cmd_qtenable_disable): New.
10048 (cmd_qtstart): Install tracepoints even if disabled.
10049 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10050 receiving a QTEnable or QTDisable packet.
10051 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10052 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10054 (gdb_probe): Skip data collection if static tracepoint is disabled.
10056 2011-05-10 Doug Evans <dje@google.com>
10058 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10060 2011-05-04 Doug Evans <dje@google.com>
10062 * linux-low.c (linux_join): Skip process lookup.
10063 * spu-low.c (spu_join): Ditto.
10064 * server.c (join_inferiors_callback): Delete.
10065 (process_serial_event): For 'D' packet (detach) call join_inferior
10068 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10070 * README: Don't mention xscale*-*-linux*.
10071 * configure.srv (xscale*-*-linux*): Don't handle target.
10073 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10075 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10077 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10078 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10079 (i386_emit_void_call_2): Likewise.
10081 2011-04-26 Yao Qi <yao@codesourcery.com>
10083 * linux-low.c: Move common macros to linux-ptrace.h.
10084 Include linux-ptrace.h.
10085 * Makefile.in (linux_ptrace_h): New.
10086 (linux-low.o): Depends on linux-ptrace.h.
10088 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10090 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10091 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10092 (remote_prepare): New function with most of the TCP code from ...
10093 (remote_open): ... here. Detect PORT here unconditionally. Move also
10094 setting transport_is_reliable.
10095 * server.c (run_once): New variable.
10096 (gdbserver_usage): Document it.
10097 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10098 the first run if RUN_ONCE.
10099 * server.h (run_once, remote_prepare): New declarations.
10101 2011-04-19 Tom Tromey <tromey@redhat.com>
10103 * win32-low.c (handle_load_dll): Remove duplicate "the".
10105 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10107 Remove support for old Cygwin 1.5 versions.
10108 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10109 function to avoid warning.
10110 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10113 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10115 * gdbserver/server.h (Macro _): Define it if not available.
10117 2011-03-14 Michael Snyder <msnyder@vmware.com>
10119 * hostio.c (handle_close): Remove unnecessary null test.
10121 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10123 * Makefile.in (maintainer-clean realclean distclean): Remove
10124 "make ... subdir_do" command.
10126 2011-03-10 Michael Snyder <msnyder@vmware.com>
10128 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10130 * server.c (handle_v_run): Free alloced buffer on early return.
10132 2011-03-09 Yao Qi <yao@codesourcery.com>
10135 2011-03-04 Yao Qi <yao@codesourcery.com>
10137 * Makefile.in: Remove GNU make feature --directory.
10139 2011-03-05 Yao Qi <yao@codesourcery.com>
10141 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10142 (subdir_do): New make target. Copied from gdb/Makefile.
10143 (maintainer-clean, realclean, distclean, clean): Call corresponding
10144 make targets in common/Makefile.
10146 2011-02-11 Yao Qi <yao@codesourcery.com>
10148 * configure.ac: Call AC_PROG_RANLIB.
10149 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10150 * configure: Regenerate.
10152 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10154 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10156 2011-03-06 Yao Qi <yao@codesourcery.com>
10158 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10160 2011-03-05 Yao Qi <yao@codesourcery.com>
10162 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10163 (subdir_do): New make target. Copied from gdb/Makefile.
10164 (maintainer-clean, realclean, distclean, clean): Call corresponding
10165 make targets in common/Makefile.
10167 2011-03-04 Yao Qi <yao@codesourcery.com>
10169 * Makefile.in: Remove GNU make feature --directory.
10171 2011-03-04 Michael Snyder <msnyder@vmware.com>
10173 * server.c (queue_stop_reply): Call xmalloc not malloc.
10175 2011-03-02 Michael Snyder <msnyder@vmware.com>
10177 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10179 2011-02-28 Michael Snyder <msnyder@vmware.com>
10181 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10182 (cmd_qtframe): Ditto.
10183 (cmd_qtbuffer): Ditto.
10184 (cmd_bigqtbuffer): Ditto.
10186 * utils.c (decimal2str): Initialize 'width' to nine, then
10187 don't mess with it.
10189 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10191 * hostio.c (require_data): Free *data, not data.
10193 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10195 * hostio.c (require_data): Use free, not xfree.
10197 2011-02-27 Michael Snyder <msnyder@vmware.com>
10199 * server.c (handle_query): Discard unused value.
10201 * hostio.c (require_data): Free malloc memory before returning
10204 2011-02-26 Michael Snyder <msnyder@vmware.com>
10206 * linux-low.c (list_threads): Call closedir for dirent.
10208 2011-02-27 Michael Snyder <msnyder@vmware.com>
10210 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10211 a case statement falls through.
10213 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10215 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10218 2011-02-26 Michael Snyder <msnyder@vmware.com>
10220 * utils.c (decimal2str): Eliminate dead code and dead param.
10221 (pulongest): Drop dead param from call to decimal2str.
10224 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10226 Revert the following patch (not approved yet):
10227 2011-02-21 Hui Zhu <teawater@gmail.com>
10228 * tracepoint.c (tp_printf): New function.
10229 (eval_agent_expr): Handle gdb_agent_op_printf.
10231 2011-02-21 Hui Zhu <teawater@gmail.com>
10233 * tracepoint.c (tp_printf): New function.
10234 (eval_agent_expr): Handle gdb_agent_op_printf.
10236 2011-02-18 Tom Tromey <tromey@redhat.com>
10238 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10239 (tracepoint.o): Likewise.
10240 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10241 (gdb_agent_op_names): Likewise.
10243 2011-02-18 Tom Tromey <tromey@redhat.com>
10245 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10246 gdb_agent_op_rot>: New constants.
10247 (gdb_agent_op_names): Add pick and roll.
10248 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10251 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10253 * aclocal.m4: Regenerated with aclocal-1.11.1.
10255 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10257 * server.c (handle_qxfer_traceframe_info): New.
10258 (qxfer_packets): Register "traceframe-info".
10259 (handle_query): Report support for qXfer:traceframe-info:read+.
10260 * tracepoint.c (match_blocktype): New.
10261 (traceframe_find_block_type): Rename to ...
10262 (traceframe_walk_blocks): ... this. Add callback filter argument,
10264 (traceframe_find_block_type): New, reimplemented on top of
10265 traceframe_walk_blocks.
10266 (build_traceframe_info_xml): New.
10267 (traceframe_read_info): New.
10268 * server.h (traceframe_read_info): Declare.
10270 2011-02-11 Yao Qi <yao@codesourcery.com>
10272 * configure.ac: Call AC_PROG_RANLIB.
10273 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10274 * configure: Regenerate.
10276 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10278 * server.c (gdb_read_memory): Change return semantics to allow
10280 (handle_search_memory_1): Adjust.
10281 (process_serial_event) <'m' packet>: Handle partial transfers.
10282 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10284 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10286 * regcache.c (init_register_cache): Initialize
10287 regcache->register_status.
10288 (free_register_cache): Release regcache->register_status.
10289 (regcache_cpy): Copy register_status.
10290 (registers_to_string): Print 'x's for unavailable registers.
10291 (supply_register): Mark the register's status valid or
10292 unavailable, depending on whether a buffer was passed in or not.
10293 (supply_register_zeroed): New.
10294 (supply_regblock): Mark the registers' status valid or
10295 unavailable, depending on whether a buffer was passed in or not.
10296 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10297 (struct regcache): New `register_status' field.
10298 (supply_register_zeroed): Declare.
10299 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10300 supply_register_zeroed, rather than passing a NULL buffer to
10302 * tracepoint.c (fetch_traceframe_registers): Update comment.
10304 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10306 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10309 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10311 * server.h (decode_xfer_write): Change prototype.
10312 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10313 and don't extract the annex here.
10314 * server.c (decode_xfer_read): Remove `annex' parameter,
10315 and don't extract the annex here.
10316 (decode_xfer): New.
10317 (struct qxfer): New.
10318 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10319 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10320 (handle_qxfer_statictrace): New functions, abstracted out from
10321 handle_query, and made to use the struct qxfer interface.
10322 (handle_threads_qxfer_proper): Rename to ...
10323 (handle_qxfer_threads_proper): ... this.
10324 (handle_threads_qxfer): Rename to ...
10325 (handle_qxfer_threads): ... this. Adjust.
10326 (qxfer_packets): New array.
10327 (handle_qxfer): New function.
10328 (handle_query): Use handle_qxfer.
10330 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10332 * gdbreplay.c: Shorten lines of >= 80 columns.
10333 * linux-low.c: Ditto.
10334 * linux-ppc-low.c: Ditto.
10335 * linux-s390-low.c: Ditto.
10336 * linux-sparc-low.c: Ditto.
10337 * linux-x86-low.c: Ditto.
10338 * linux-xtensa-low.c: Ditto.
10339 * mem-break.c: Ditto.
10340 * nto-low.c: Ditto.
10341 * regcache.h: Ditto.
10342 * remote-utils.c: Ditto.
10345 * thread-db.c: Ditto.
10346 * tracepoint.c: Ditto.
10348 * win32-low.h: Ditto.
10350 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10352 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10355 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10357 * server.c (gdbserver_version): Update copyright year in version
10359 * gdbreplay.c (gdbreplay_version): Ditto.
10361 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10363 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10364 * linux-bfin-low.c: New file.
10365 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10366 PT_DATA_ADDR for BFIN targets.
10367 * Makefile.in (SFILES): Add linux-bfin-low.c.
10368 (clean): Remove reg-bfin.c.
10369 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10370 * README: Mention supported Blackfin targets.
10372 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10374 * .gitignore: New file.
10376 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10378 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10380 2010-10-22 Jie Zhang <jie@codesourcery.com>
10382 * Makefile.in: Add FLAGS_TO_PASS variable.
10383 (install): Remove dependency of install-only and recursively
10384 invoke make for install-only.
10386 2010-10-04 Doug Evans <dje@google.com>
10388 * Makefile.in (uninstall): Use $(DESTDIR).
10390 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10394 * linux-x86-low.c (compat_siginfo_from_siginfo)
10395 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10396 si_code is < 0. Check for si_code == SI_TIMER before checking for
10399 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10401 * lynx-i386-low.c: New file.
10402 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10404 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10406 * lynx-low.c (ptrace_request_to_str): Remove handling for
10407 request values that have been removed in LynxOS 5.x.
10409 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10411 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10414 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10416 * configure.ac: Add --enable-inprocess-agent option.
10417 * configure: Rebuilt.
10419 2010-09-06 Yao Qi <yao@codesourcery.com>
10421 * linux-low.c (linux_kill): Remove unused variable.
10422 (linux_stabilize_threads): Likewise.
10423 * server.c (start_inferior): Likewise.
10424 (queue_stop_reply_callback): Likewise.
10425 * tracepoint.c (do_action_at_tracepoint): Likewise.
10427 2010-09-06 Yao Qi <yao@codesourcery.com>
10429 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10432 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10434 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10436 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10438 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10441 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10443 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10444 gdbserver/lynx-ppc-low.c: New files.
10445 * Makefile.in (lynx_low_h): New variable.
10446 (lynx-low.o, lynx-ppc-low.o): New rules.
10447 * configure.ac: On LynxOS, link with -lnetinet.
10448 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10449 * configure: regenerate.
10451 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10453 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10454 * configure.ac: Add check for vasprintf and vsnprintf.
10455 * configure, config.in: Regenerate.
10456 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10458 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10460 * gdbreplay.c: Move include of alloca.h up, next to include of
10462 * server.h: Add include of malloc.h.
10463 * mem-break.c: Remove include of malloc.h.
10464 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10466 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10468 * Makefile.in (memmem.o): Build with -Wno-error.
10470 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10472 * utils.c (xsnprintf): Make non-static.
10473 * server.h: Add xsnprintf declaration.
10474 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10475 replace calls to snprintf by calls to xsnprintf throughout.
10477 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10479 * configure.ac: Add configure check for alloca.
10480 * configure, config.in: Regenerate.
10481 * server.h: Include alloca.h if it exists.
10482 * gdbreplay.c: Include alloca.h if it exists.
10484 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10486 * linux-low.c (__SIGRTMIN): Define if not already defined.
10487 (linux_create_inferior): Check for __ANDROID__ rather than
10489 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10490 are already deferred.
10491 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10492 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10493 stopped and already has a pending signal to report.
10494 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10495 a pending signal to report or is moving out of a jump pad.
10496 (linux_init_signals): Check for __ANDROID__ rather than
10499 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10501 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10502 debug_threads check. Avoid a linear search when not doing debug
10505 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10507 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10508 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10509 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10510 (process_event): Change local fd's type to gdb_fildes_t.
10511 (create_file_handler): Adjust prototype.
10512 (delete_file_handler): Adjust prototype.
10513 (handle_file_event): Adjust prototype. Use pfildes.
10514 (create_file_event): Adjsut prototype.
10515 * remote-utils.c (remote_desc, listen_desc): Change type to
10517 * server.h: New gdb_fildes_t typedef.
10518 [USE_WIN32API]: Include winsock2.h.
10519 (delete_file_handler, add_file_handler): Adjust prototypes.
10520 (pfildes): Declare.
10521 * utils.c (pfildes): New.
10523 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10525 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10526 * configure: Regenerate.
10528 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10530 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10531 (linux_done_accessing_memory): ... this.
10532 (linux_target_ops): Adjust.
10533 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10534 * nto-low.c (nto_target_ops): Adjust comment.
10535 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10536 * spu-low.c (spu_target_ops): Adjust comment.
10537 * target.h (target_ops): Rename unprepare_to_access_memory field
10538 to done_accessing_memory.
10539 (unprepare_to_access_memory): Rename to ...
10540 (done_accessing_memory): ... this.
10542 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10544 * linux-low.c (linux_prepare_to_access_memory): New.
10545 (linux_unprepare_to_access_memory): New.
10546 (linux_target_ops): Install them.
10547 * server.c (read_memory): Rename to ...
10548 (gdb_read_memory): ... this. Use
10549 prepare_to_access_memory/prepare_to_access_memory.
10550 (write_memory): Rename to ...
10551 (gdb_write_memory): ... this. Use
10552 prepare_to_access_memory/prepare_to_access_memory.
10553 (handle_search_memory_1): Adjust.
10554 (process_serial_event): Adjust.
10555 * target.h (struct target_ops): New fields
10556 prepare_to_access_memory and unprepare_to_access_memory.
10557 (prepare_to_access_memory, unprepare_to_access_memory): New.
10558 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10559 prepare_to_access_memory/prepare_to_access_memory.
10560 * nto-low.c (nto_target_ops): Adjust.
10561 * spu-low.c (spu_target_ops): Adjust.
10562 * win32-low.c (win32_target_ops): Adjust.
10564 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10566 * Makefile.in (WARN_CFLAGS): Get it from configure.
10567 (WERROR_CFLAGS): New.
10568 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10569 * configure.ac: Introduce --enable-werror, which adds -Werror to
10570 the compiler command line. Enabled by default. Disable with
10571 --disable-werror. Add -Wdeclaration-after-statement
10572 Wpointer-arith and -Wformat-nonliteral to warning flags.
10573 * configure: Regenerate.
10575 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10577 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10579 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10581 * gdbreplay.c (remote_error): New.
10583 (expect): Use gdbchar. Check for error reading from GDB.
10584 Clarify sync error output.
10585 (play): Check for errors writing to GDB.
10586 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10587 * remote-utils.c (getpkt): Check for errors writing to the remote
10590 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10592 * linux-low.c (linux_wait_1): Move non-debugging code out of
10593 `debug_threads' control.
10595 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10597 * linux-low.c (linux_wait_1): Don't set last_status here.
10598 * server.c (push_event, queue_stop_reply_callback): Assert we're
10599 not pushing a TARGET_WAITKIND_IGNORE event.
10600 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10601 (myresume, handle_target_event): Set the thread's last_resume_kind
10602 and last_status from the target returned status.
10604 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10608 * linux-x86-low.c (update_debug_registers_callback): New.
10609 (i386_dr_low_set_addr): Use it.
10610 (i386_dr_low_get_addr): New.
10611 (i386_dr_low_set_control): Use update_debug_registers_callback.
10612 (i386_dr_low_get_control): New.
10613 (i386_dr_low_get_status): Adjust.
10614 * linux-low.c (linux_stop_lwp): New.
10615 * linux-low.h (linux_stop_lwp): Declare.
10617 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10618 argument instead of a i386_debug_reg_state.
10619 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10620 a i386_debug_reg_state.
10621 (i386_insert_aligned_watchpoint): Adjust.
10622 (i386_remove_aligned_watchpoint): Adjust.
10623 (i386_low_stopped_data_address): Read the debug registers from the
10624 inferior instead of from the mirrors.
10625 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10626 (i386_dr_low_get_addr): Declare.
10627 (i386_dr_low_get_control): Declare.
10628 (i386_dr_low_get_status): Change prototype.
10630 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10631 (i386_dr_low_get_addr): New.
10632 (i386_dr_low_get_control): New.
10633 (i386_dr_low_get_status): Adjust prototype. Return
10635 (i386_initial_stuff): Clear dr_status_mirror and
10637 (i386_get_thread_context): Adjust.
10638 (i386_set_thread_context): Adjust.
10639 (i386_thread_added): Adjust.
10641 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10643 * linux-low.h (linux_thread_area): Delete declaration.
10645 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10647 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10648 after its termination.
10650 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10652 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10653 (gdb_wants_all_stopped): Delete.
10654 (linux_wait_1): Don't call them.
10655 * server.c (handle_v_cont): Tag all threads as want-stopped.
10656 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10657 stopped as "client-wants-stopped".
10659 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10661 * Makefile.in (signals_h): New.
10662 (server_h): Depend on it.
10663 (server.o): Don't depend on $(signals_def).
10664 (signals.o): Depend on $(signals_def).
10666 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10668 * Makefile.in (signals_def): New.
10669 (server_h): Append include/gdb/signals.h and signals_def.
10670 (server.o): Append signals_def.
10672 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10674 * server.c (handle_target_event): Use target_signal_to_host for
10675 resume_info.sig initialization.
10676 * target.h (struct thread_resume) <sig>: New comment.
10678 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10680 * server.c (handle_query): strcpy() the returned string from paddress()
10681 instead of sprintf().
10682 * utils.c (paddress): Return phex_nz().
10684 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10686 * server.c (handle_v_cont): Call mourn_inferior if process
10688 (myresume): Likewise.
10690 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10692 Static tracepoints, and integration with UST.
10694 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10695 * mem-break.c (uninsert_all_breakpoints)
10696 (reinsert_all_breakpoints): New.
10697 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10698 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10699 (gdb_agent_ust_loaded, helper_thread_id)
10700 (gdb_agent_helper_thread_id): New macros.
10701 (struct ipa_sym_addresses): Add addr_ust_loaded,
10702 addr_helper_thread_id, addr_cmd_buf.
10703 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10704 (in_process_agent_loaded_ust): New.
10705 (write_e_ust_not_loaded): New.
10706 (maybe_write_ipa_ust_not_loaded): New.
10707 (struct collect_static_trace_data_action): New.
10708 (enum tracepoint_type) <static_tracepoint>: New.
10709 (struct tracepoint) <handle>: Mention static tracepoints.
10710 (struct static_tracepoint_ctx): New.
10711 (CMD_BUF_SIZE): New.
10712 (add_tracepoint_action): Handle static tracepoint actions.
10713 (unprobe_marker_at): New.
10714 (clear_installed_tracepoints): Handle static tracepoints.
10715 (cmd_qtdp): Handle static tracepoints.
10716 (probe_marker_at): New.
10717 (cmd_qtstart): Handle static tracepoints.
10718 (response_tracepoint): Handle static tracepoints.
10719 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10720 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10721 (get_context_regcache): Handle static tracepoints.
10722 (do_action_at_tracepoint): Handle static tracepoint actions.
10723 (traceframe_find_block_type): Handle static trace data blocks.
10724 (traceframe_read_sdata): New.
10725 (download_tracepoints): Download static tracepoint actions.
10726 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10727 (GDB_PROBE_NAME): New.
10729 (GET_UST_SYM): New.
10732 (ust_marker_to_static_tracepoint): New.
10734 (collect_ust_data_at_tracepoint): New.
10735 (gdb_ust_probe): New.
10736 (UNIX_PATH_MAX, SOCK_DIR): New.
10737 (gdb_ust_connect_sync_socket): New.
10738 (resume_thread, stop_thread): New.
10739 (run_inferior_command): New.
10740 (init_named_socket): New.
10741 (gdb_ust_socket_init): New.
10742 (cstr_to_hexstr): New.
10744 (first_marker, next_marker): New.
10745 (response_ust_marker): New.
10746 (cmd_qtfstm, cmd_qtsstm): New.
10747 (unprobe_marker_at, probe_marker_at): New.
10748 (cmd_qtstmat, gdb_ust_thread): New.
10749 (gdb_ust_init): New.
10750 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10751 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10752 (ST_REGENTRY): New.
10753 (x86_64_st_collect_regmap): New.
10754 (X86_64_NUM_ST_COLLECT_GREGS): New.
10755 (AMD64_RIP_REGNUM): New.
10756 (supply_static_tracepoint_registers): New.
10757 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10758 (ST_REGENTRY): New.
10759 (i386_st_collect_regmap): New.
10760 (i386_NUM_ST_COLLECT_GREGS): New.
10761 (supply_static_tracepoint_registers): New.
10762 * server.c (handle_query): Handle qXfer:statictrace:read.
10763 <qSupported>: Report support for StaticTracepoints, and
10764 qXfer:statictrace:read features.
10765 * server.h (traceframe_read_sdata)
10766 (supply_static_tracepoint_registers): Declare.
10767 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10768 (unpack_varlen_hex): Include in IPA build.
10769 * Makefile.in (ustlibs, ustinc): New.
10770 (IPA_OBJS): Add remote-utils-ipa.o.
10771 ($(IPA_LIB)): Link -ldl and -lpthread.
10773 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10774 * config.in, configure: Regenerate.
10776 2010-06-20 Ian Lance Taylor <iant@google.com>
10777 Pedro Alves <pedro@codesourcery.com>
10779 * linux-x86-low.c (always_true): Delete.
10780 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10781 trying to fool the compiler with always_true.
10783 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10785 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10786 conditions in gdbserver.
10788 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10790 * spu-low.c (spu_read_memory): Wrap around local store limit.
10791 (spu_write_memory): Likewise.
10793 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10795 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10796 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10798 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10800 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10801 uses with LONGEST uses.
10803 2010-06-14 Stan Shebs <stan@codesourcery.com>
10804 Pedro Alves <pedro@codesourcery.com>
10808 * linux-x86-low.c: Include limits.h.
10810 (always_true): New.
10813 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10814 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10815 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10816 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10817 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10818 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10819 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10820 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10821 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10822 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10823 (amd64_emit_void_call_2): New.
10824 (amd64_emit_ops): New.
10825 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10826 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10827 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10828 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10829 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10830 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10831 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10832 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10833 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10834 (i386_emit_stack_adjust, i386_emit_int_call_1)
10835 (i386_emit_void_call_2): New.
10836 (i386_emit_ops): New.
10837 (x86_emit_ops): New.
10838 (the_low_target): Install x86_emit_ops.
10839 * server.h (struct emit_ops): New.
10840 (get_raw_reg_func_addr): Declare.
10841 (current_insn_ptr, emit_error): Declare.
10842 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10843 (set_trace_state_variable_value): New defines.
10844 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10845 addr_get_trace_state_variable_value and
10846 addr_set_trace_state_variable_value.
10847 (symbol_list): New fields for get_raw_reg,
10848 get_trace_state_variable_value and set_trace_state_variable_value.
10849 (condfn): New typedef.
10850 (struct tracepoint): New field `compiled_cond'.
10851 (do_action_at_tracepoint): Clear compiled_cond.
10852 (get_trace_state_variable_value, set_trace_state_variable_value):
10854 (condition_true_at_tracepoint): If there's a compiled condition,
10856 (current_insn_ptr, emit_error): New globals.
10857 (struct bytecode_address): New.
10858 (get_raw_reg_func_addr): New.
10859 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10860 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10861 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10862 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10863 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10864 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10865 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10866 (compile_tracepoint_condition, compile_bytecodes): New.
10867 * target.h (emit_ops): Forward declare.
10868 (struct target_ops): New field emit_ops.
10869 (target_emit_ops): New.
10870 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10871 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10872 * linux-low.c (linux_emit_ops): New.
10873 (linux_target_ops): Install it.
10874 * linux-low.h (struct linux_target_ops): New field emit_ops.
10876 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10878 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10879 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10881 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10882 Stan Shebs <stan@codesourcery.com>
10884 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10885 (all): Depend on $(extra_libraries).
10886 (install-only): Install the IPA.
10887 (IPA_OBJS, IPA_LIB): New.
10888 (clean): Remove the IPA lib.
10889 (IPAGENT_CFLAGS): New.
10890 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10891 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10892 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10893 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10894 * configure.ac: Check for atomic builtins support in the compiler.
10895 (IPA_DEPFILES, extra_libraries): Define.
10896 * configure.srv (ipa_obj): Add description.
10897 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10898 (i[34567]86-*-linux*): Set ipa_obj.
10899 (x86_64-*-linux*): Set ipa_obj.
10900 * linux-low.c (stabilizing_threads): New.
10901 (supports_fast_tracepoints): New.
10902 (linux_detach): Stabilize threads before detaching.
10903 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10904 the lwp is either not stabilizing, or is moving out of a jump pad.
10905 (linux_fast_tracepoint_collecting): New.
10906 (maybe_move_out_of_jump_pad): New.
10907 (enqueue_one_deferred_signal): New.
10908 (dequeue_one_deferred_signal): New.
10909 (linux_wait_for_event_1): If moving out of a jump pad, defer
10910 pending signals to later.
10911 (linux_stabilize_threads): New.
10912 (linux_wait_1): Check if threads need moving out of jump pads, and
10914 (stuck_in_jump_pad_callback): New.
10915 (move_out_of_jump_pad_callback): New.
10916 (lwp_running): New.
10917 (linux_resume_one_lwp): Handle moving out of jump pads.
10918 (linux_set_resume_request): Dequeue deferred signals.
10919 (need_step_over_p): Also step over fast tracepoint jumps.
10920 (start_step_over): Also uninsert fast tracepoint jumps.
10921 (finish_step_over): Also reinsert fast tracepoint jumps.
10922 (linux_install_fast_tracepoint_jump): New.
10923 (linux_target_ops): Install linux_stabilize_threads and
10924 linux_install_fast_tracepoint_jump_pad.
10925 * linux-low.h (linux_target_ops) <get_thread_area,
10926 install_fast_tracepoint_jump_pad>: New fields.
10927 (struct lwp_info) <collecting_fast_tracepoint,
10928 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10929 (linux_get_thread_area): Declare.
10930 * linux-x86-low.c (jump_insn): New.
10931 (x86_get_thread_area): New.
10932 (append_insns): New.
10933 (push_opcode): New.
10934 (amd64_install_fast_tracepoint_jump_pad): New.
10935 (i386_install_fast_tracepoint_jump_pad): New.
10936 (x86_install_fast_tracepoint_jump_pad): New.
10937 (the_low_target): Install x86_get_thread_area and
10938 x86_install_fast_tracepoint_jump_pad.
10939 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10940 (struct fast_tracepoint_jump): New.
10941 (fast_tracepoint_jump_insn): New.
10942 (fast_tracepoint_jump_shadow): New.
10943 (find_fast_tracepoint_jump_at): New.
10944 (fast_tracepoint_jump_here): New.
10945 (delete_fast_tracepoint_jump): New.
10946 (set_fast_tracepoint_jump): New.
10947 (uninsert_fast_tracepoint_jumps_at): New.
10948 (reinsert_fast_tracepoint_jumps_at): New.
10949 (set_breakpoint_at): Use write_inferior_memory.
10950 (uninsert_raw_breakpoint): Use write_inferior_memory.
10951 (check_mem_read): Mask out fast tracepoint jumps.
10952 (check_mem_write): Mask out fast tracepoint jumps.
10953 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10954 (set_fast_tracepoint_jump): Declare.
10955 (delete_fast_tracepoint_jump)
10956 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10957 (reinsert_fast_tracepoint_jumps_at): Declare.
10958 * regcache.c: Don't compile many functions when building the
10959 in-process agent library.
10960 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10961 the register buffer in the heap.
10962 (free_register_cache): If the register buffer isn't owned by the
10963 regcache, don't free it.
10964 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10965 pre-existing register caches.
10966 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10968 (convert_ascii_to_int): : Constify `from' parameter type.
10969 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10970 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10971 the needed buffer in-place.
10972 (relocate_instruction): New.
10973 * server.c (handle_query) <qSymbols>: If the target supports
10974 tracepoints, give it a chance of looking up symbols. Report
10975 support for fast tracepoints.
10976 (handle_status): Stabilize threads.
10977 (process_serial_event): Adjust.
10978 * server.h (struct fast_tracepoint_jump): Forward declare.
10979 (struct process_info) <fast_tracepoint_jumps>: New field.
10980 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10981 (decode_X_packet, decode_M_packet): Adjust.
10982 (relocate_instruction): Declare.
10983 (in_process_agent_loaded): Declare.
10984 (tracepoint_look_up_symbols): Declare.
10985 (struct fast_tpoint_collect_status): Declare.
10986 (fast_tracepoint_collecting): Declare.
10987 (force_unlock_trace_buffer): Declare.
10988 (handle_tracepoint_bkpts): Declare.
10989 (initialize_low_tracepoint)
10990 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10991 * target.h (struct target_ops) <stabilize_threads,
10992 install_fast_tracepoint_jump_pad>: New fields.
10993 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10994 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10995 [HAVE_STDINT_H]: Include stdint.h.
10996 (trace_debug_1): Rename to ...
10997 (trace_vdebug): ... this.
10998 (trace_debug): Rename to ...
10999 (trace_debug_1): ... this. Add `level' parameter.
11000 (trace_debug): New.
11001 (ATTR_USED, ATTR_NOINLINE): New.
11002 (IP_AGENT_EXPORT): New.
11003 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11004 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11005 (about_to_request_buffer_space, trace_buffer_is_full)
11006 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11007 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11008 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11009 (traceframe_write_count, traceframes_created)
11010 (trace_state_variables)
11011 New renaming defines.
11012 (struct ipa_sym_addresses): New.
11013 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11014 (symbol_list): New.
11015 (ipa_sym_addrs): New.
11016 (all_tracepoint_symbols_looked_up): New.
11017 (in_process_agent_loaded): New.
11018 (write_e_ipa_not_loaded): New.
11019 (maybe_write_ipa_not_loaded): New.
11020 (tracepoint_look_up_symbols): New.
11021 (debug_threads) [IN_PROCESS_AGENT]: New.
11022 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11023 (UNKNOWN_SIDE_EFFECTS): New.
11024 (stop_tracing): New.
11025 (flush_trace_buffer): New.
11026 (stop_tracing_bkpt): New.
11027 (flush_trace_buffer_bkpt): New.
11028 (read_inferior_integer): New.
11029 (read_inferior_uinteger): New.
11030 (read_inferior_data_pointer): New.
11031 (write_inferior_data_pointer): New.
11032 (write_inferior_integer): New.
11033 (write_inferior_uinteger): New.
11034 (struct collect_static_trace_data_action): Delete.
11035 (enum tracepoint_type): New.
11036 (struct tracepoint) <type>: New field `type'.
11037 <actions_str, step_actions, step_actions_str>: Only include in
11039 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11040 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11041 (tracepoints): Use IP_AGENT_EXPORT.
11042 (last_tracepoint): Don't include in the IPA.
11043 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11044 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11045 (alloced_trace_state_variables): New.
11046 (trace_state_variables): Use IP_AGENT_EXPORT.
11047 (traceframe_t): Delete unused variable.
11048 (circular_trace_buffer): Don't include in the IPA.
11049 (trace_buffer_start): Delete.
11050 (struct trace_buffer_control): New.
11051 (trace_buffer_free): Delete.
11052 (struct ipa_trace_buffer_control): New.
11053 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11054 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11056 (trace_buffer_ctrl): New.
11057 (TRACE_BUFFER_CTRL_CURR): New.
11058 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11059 Reimplement as macros.
11060 (trace_buffer_wrap): Delete.
11061 (traceframe_write_count, traceframe_read_count)
11062 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11063 (struct tracepoint_hit_ctx) <type>: New field.
11064 (struct fast_tracepoint_ctx): New.
11065 (memory_barrier): New.
11067 (record_tracepoint_error): Update atomically in the IPA.
11068 (clear_inferior_trace_buffer): New.
11069 (about_to_request_buffer_space): New.
11070 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11071 updating the same buffer.
11072 (add_tracepoint): Default the tracepoint's type to trap
11073 tracepoint, and orig_size to -1.
11074 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11075 internal variables.
11076 (create_trace_state_variable): New parameter `gdb'. Handle it.
11077 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11078 (cmd_qtdp): Handle fast tracepoints.
11079 (cmd_qtdv): Adjust.
11080 (max_jump_pad_size): New.
11081 (gdb_jump_pad_head): New.
11082 (get_jump_space_head): New.
11083 (claim_jump_space): New.
11084 (sort_tracepoints): New.
11085 (MAX_JUMP_SIZE): New.
11086 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11088 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11089 support. Upload fast traceframes, and delete internal IPA
11091 (stop_tracing_handler): New.
11092 (flush_trace_buffer_handler): New.
11093 (cmd_qtstop): Upload fast tracepoints.
11094 (response_tracepoint): Handle fast tracepoints.
11095 (tracepoint_finished_step): Upload fast traceframes. Set the
11096 tracepoint hit context's tracepoint type.
11097 (handle_tracepoint_bkpts): New.
11098 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11099 type. Add comment about fast tracepoints.
11100 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11101 non-existing action_str field.
11102 (get_context_regcache): Handle fast tracepoints.
11103 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11105 (fast_tracepoint_from_jump_pad_address): New.
11106 (fast_tracepoint_from_ipa_tpoint_address): New.
11107 (collecting_t): New.
11108 (force_unlock_trace_buffer): New.
11109 (fast_tracepoint_collecting): New.
11111 (gdb_collect): New.
11112 (write_inferior_data_ptr): New.
11113 (target_tp_heap): New.
11114 (target_malloc): New.
11115 (download_agent_expr): New.
11117 (download_tracepoints): New.
11118 (download_trace_state_variables): New.
11119 (upload_fast_traceframes): New.
11120 (IPA_FIRST_TRACEFRAME): New.
11121 (IPA_NEXT_TRACEFRAME_1): New.
11122 (IPA_NEXT_TRACEFRAME): New.
11123 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11124 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11125 (gdb_jump_pad_buffer_end): New.
11126 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11127 (initialize_tracepoint): Adjust.
11128 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11129 buffer. Initialize the low module.
11130 * utils.c (PREFIX, TOOLNAME): New.
11131 (malloc_failure): Use PREFIX.
11132 (error): In the IPA, an error causes an exit.
11133 (fatal, warning): Use PREFIX.
11134 (internal_error): Use TOOLNAME.
11135 (NUMCELLS): Increase to 10.
11136 * configure, config.in: Regenerate.
11138 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11140 * server.c (handle_query) <qSupported>: Do two passes over the
11141 qSupported string to avoid nesting strtok.
11143 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11145 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11147 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11148 -Wl,--dynamic-list.
11149 * configure: Regenerate.
11150 * proc-service.list: New.
11152 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11154 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11157 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11159 * gdbreplay.c (remote_open): Check error return from socket() call by
11160 its equality to -1 not by it being negative.
11161 * remote-utils.c (remote_open): Likewise.
11163 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11165 * config.h: Regenerate.
11167 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11169 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11170 doesn't provide PTRACE_GET_THREAD_AREA.
11172 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11174 * linux-m68k-low.c: Include <asm/ptrace.h>
11175 (ps_get_thread_area): Implement.
11177 2010-05-03 Doug Evans <dje@google.com>
11179 * event-loop.c (struct callback_event): New struct.
11180 (callback_list): New global.
11181 (append_callback_event, delete_callback_event): New functions.
11182 (process_callback): New function.
11183 (start_event_loop): Call it.
11184 * remote-utils.c (NOT_SCHEDULED): Define.
11185 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11186 moved out of readchar.
11187 (readchar): Rewrite. Call reschedule before returning.
11188 (reset_readchar): New function.
11189 (remote_close): Call it.
11190 (process_remaining, reschedule): New functions.
11191 * server.h (callback_handler_func): New typedef.
11192 (append_callback_event, delete_callback_event): Declare.
11194 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11196 * proc-service.c (ps_pglobal_lookup): Use
11197 thread_db_look_up_one_symbol.
11198 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11199 parameter. Use it instead of all_symbols_looked_up.
11200 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11202 (all_symbols_looked_up): Don't declare.
11203 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11204 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11206 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11207 Set all_symbols_looked_up here.
11208 (thread_db_look_up_one_symbol): New.
11209 (thread_db_get_tls_address): Adjust.
11210 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11211 thread_db object on the heap, and tentatively set it in the
11213 (thread_db_init): Don't set all_symbols_looked_up here.
11214 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11216 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11218 * linux-low.c (linux_kill, linux_detach): Adjust.
11219 (status_pending_p_callback): Remove redundant statement. Check
11220 for !TARGET_WAITIKIND_IGNORE, instead of
11221 TARGET_WAITKIND_STOPPED.
11222 (handle_tracepoints): Make sure LWP is locked. Adjust.
11223 (linux_wait_for_event_1): Adjust.
11224 (linux_cancel_breakpoints): New.
11225 (unsuspend_one_lwp): New.
11226 (unsuspend_all_lwps): New.
11227 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11228 (send_sigstop_callback): Change return type to int, add new
11229 `except' parameter and handle it.
11230 (suspend_and_send_sigstop_callback): New.
11231 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11232 pass them down. If SUSPEND, also increment the lwp's suspend
11234 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11235 (need_step_over_p): Don't consider suspended LWPs.
11236 (start_step_over): Adjust.
11237 (proceed_one_lwp): Change return type to int, add new `except'
11238 parameter and handle it.
11239 (unsuspend_and_proceed_one_lwp): New.
11240 (proceed_all_lwps): Use find_inferior instead of
11242 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11243 also decrement the suspend count of LWPs. Pass `except' down,
11244 instead of hacking its suspend count.
11245 (linux_pause_all): Add `freeze' parameter. Adjust.
11246 (linux_unpause_all): New.
11247 (linux_target_ops): Install linux_unpause_all.
11248 * server.c (handle_status): Adjust.
11249 * target.h (struct target_ops): New fields `unpause_all' and
11250 `cancel_breakpoints'. Add new parameter to `pause_all'.
11251 (pause_all): Add new `freeze' parameter.
11252 (unpause_all): New.
11253 (cancel_breakpoints): New.
11254 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11255 cancel breakpoints.
11256 (cmd_qtstart): Pause threads.
11257 (stop_tracing): Pause threads, and cancel breakpoints.
11258 * win32-low.c (win32_target_ops): Adjust.
11260 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11262 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11263 the inferior right away from here...
11264 (linux_wait_1): ... to here, and adjust to check the thread's
11265 last_resume_kind instead of the lwp's step or stop_expected flags.
11267 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11269 * README: Use consistent `GDB' and `GDBserver' spellings.
11271 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11273 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11274 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11275 (linux_detach_one_lwp): Assume the lwp is stopped.
11276 (any_thread_of): Delete.
11277 (linux_detach): Stop all lwps here. Don't blindly delete all
11279 (delete_lwp_callback): New.
11280 (linux_mourn): Delete all lwps of the process that is gone.
11281 (linux_wait_1): Don't delete the last lwp of the process here.
11282 * mem-break.h (mark_breakpoints_out): Declare.
11283 * mem-break.c (mark_breakpoints_out): New.
11284 (free_all_breakpoints): Use it.
11285 * server.c (handle_target_event): If the process is gone, mark
11287 * thread-db.c (struct thread_db) <create_bp>: New field.
11288 (thread_db_enable_reporting): Fix prototype. Store a thread event
11289 breakpoint reference in the thread_db struct.
11290 (thread_db_load_search): Clear the thread_db object.
11291 (try_thread_db_load_1): Ditto.
11292 (switch_to_process): New.
11293 (disable_thread_event_reporting): Use it.
11294 (remove_thread_event_breakpoints): New.
11295 (thread_db_detach, thread_db_mourn): Use it.
11297 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11299 * linux-low.c (linux_enable_event_reporting): New.
11300 (linux_wait_for_event_1, handle_extended_wait): Use it.
11302 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11304 * linux-low.c (linux_kill_one_lwp, linux_kill)
11305 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11306 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11307 SIGSTOP even if the LWP is stopped.
11308 (send_sigstop_callback): New.
11309 (stop_all_lwps): Use send_sigstop_callback instead.
11310 (linux_resume_one_thread): Adjust.
11311 (proceed_one_lwp): Still proceed an LWP that the client has
11312 requested to stop, if we haven't reported it as stopped yet. Make
11313 sure that LWPs the client want stopped, have a pending SIGSTOP.
11315 2010-04-26 Doug Evans <dje@google.com>
11317 * server.c (handle_general_set): Make static.
11319 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11320 Print received char after testing for error/eof instead of before.
11321 (input_interrupt): Tweak comment.
11323 2010-04-23 Doug Evans <dje@google.com>
11325 * server.c (start_inferior): Print inferior argv if --debug.
11327 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11329 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11330 * nto-x86-low.c: Include server.h
11332 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11334 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11335 be consistent with other sources of this directory.
11336 (init_registers_amd64): Correct name of source file of this function
11339 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11341 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11342 64-bit executables.
11344 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11346 * win32-i386-low.c: Add 64-bit support.
11347 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11348 (init_registers_amd64): Declare.
11349 (mappings): Add 64-bit version of array.
11350 (init_windows_x86): New function.
11351 (the_low_target): Change init_arch field to init_windows_x86.
11353 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11355 * win32-low.c: Adapt to support also 64-bit architecture.
11356 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11357 (get_image_name): Use SIZE_T type for local variable `done'.
11358 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11359 (toolhelp_get_dll_name): Idem.
11360 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11361 Use uintptr_t typecast to avoid warning.
11362 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11363 (handle_exception): Use phex_nz to avoid warning.
11364 (win32_wait): Remove unused local variable `process'.
11366 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11368 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11371 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11373 * configure.ac: Use `ws2_32' library for srv_mingw.
11374 * configure: Regenerate.
11375 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11376 * remote-utils.c: Likewise.
11378 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11380 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11381 if __x86_64__ is defined.
11383 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11385 * configure: Regenerate.
11387 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11389 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11390 * target.h (target_ops): New get_tib_address field.
11391 * win32-low.h (win32_thread_info): Add thread_local_base field.
11392 * win32-low.c (child_add_thread): Add tlb argument.
11393 Set thread_local_base field to TLB.
11394 (get_child_debug_event): Adapt to child_add_thread change.
11395 (win32_get_tib_address): New function.
11396 (win32_target_ops): Set get_tib_address field to
11397 win32_get_tib_address.
11398 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11400 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11402 * linux-low.c (linux_mourn): Also remove the process.
11403 * server.c (handle_target_event): Don't remove the process here.
11404 * nto-low.c (nto_mourn): New.
11405 (nto_target_ops): Install it.
11406 * spu-low.c (spu_mourn): New.
11407 (spu_target_ops): Install it.
11408 * win32-low.c (win32_mourn): New.
11409 (win32_target_ops): Install it.
11411 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11413 * server.h (buffer_xml_printf): Remove redundant `;'.
11415 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11417 * regcache.c (set_register_cache): Invalidate regcaches before
11418 changing the register cache layout.
11419 (regcache_invalidate_one): Allow a NULL regcache.
11420 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11421 regcaches before changing the register cache layout or the target
11424 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11426 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11427 variable warning on Linux/x86-64.
11429 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11431 GDBserver disconnected tracing support.
11433 * linux-low.c (linux_remove_process): Delete.
11434 (add_lwp): Don't set last_resume_kind here.
11435 (linux_kill): Use `mourn'.
11436 (linux_detach): Use `thread_db_detach', and `mourn'.
11437 (linux_mourn): New.
11438 (linux_attach_lwp_1): Adjust comment.
11439 (linux_attach): last_resume_kind moved the thread_info; adjust.
11440 (status_pending_p_callback): Adjust.
11441 (linux_wait_for_event_1): Adjust.
11442 (count_events_callback, select_singlestep_lwp_callback)
11443 (select_event_lwp_callback, cancel_breakpoints_callback)
11444 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11445 (proceed_one_lwp): Adjust.
11446 (linux_async): Add debug output.
11447 (linux_thread_stopped): New.
11448 (linux_pause_all): New.
11449 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11451 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11452 (thread_db_free): Delete declaration.
11453 (thread_db_detach, thread_db_mourn): Declare.
11454 * thread-db.c (thread_db_init): Use thread_db_mourn.
11455 (thread_db_free): Delete, split in two.
11456 (disable_thread_event_reporting): New.
11457 (thread_db_detach): New.
11458 (thread_db_mourn): New.
11460 * server.h (struct thread_info) <last_resume_kind>: New field.
11461 <attached>: Add comment.
11462 <gdb_detached>: New field.
11463 (handler_func): Change return type to int.
11464 (handle_serial_event, handle_target_event): Ditto.
11465 (gdb_connected): Declare.
11467 (disconnected_tracing): Declare.
11468 (stop_tracing): Declare.
11470 * server.c (handle_query) <qSupported>: Report support for
11471 disconnected tracing.
11472 (queue_stop_reply_callback): Account for running threads.
11473 (gdb_wants_thread_stopped): New.
11474 (gdb_wants_all_threads_stopped): New.
11475 (gdb_reattached_process): New.
11476 (handle_status): Clear the `gdb_detached' flag of all processes.
11477 In all-stop, stop all threads.
11478 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11479 (process_serial_event): If the remote connection breaks, or if an
11480 exit was forced with "monitor exit", force an event loop exit.
11481 Handle disconnected tracing on detach.
11482 (handle_serial_event): Adjust.
11483 (handle_target_event): If GDB isn't connected, forward events back
11484 to the inferior, unless the last process exited, in which case,
11485 exit gdbserver. Adjust interface.
11487 * remote-utils.c (remote_open): Don't block in accept. Instead
11488 register an event loop source on the listen socket file
11489 descriptor. Refactor bits into ...
11490 (listen_desc): ... this new global.
11491 (gdb_connected): ... this new function.
11492 (enable_async_notification): ... this new function.
11493 (handle_accept_event): ... this new function.
11494 (remote_close): Clear remote_desc.
11496 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11498 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11500 (mourn_inferior): Define.
11501 (target_process_qsupported): Avoid the dangling else problem.
11502 (thread_stopped): Define.
11503 (pause_all): Define.
11504 (target_waitstatus_to_string): Declare.
11505 * target.c (target_waitstatus_to_string): New.
11507 * tracepoint.c (tracing): Make extern.
11508 (disconnected_tracing): New.
11509 (stop_tracing): Make extern. Handle tracing stops due to GDB
11511 (cmd_qtdisconnected): New.
11512 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11513 (handle_tracepoint_general_set): Handle QTDisconnected.
11515 * event-loop.c (event_handler_func): Change return type to int.
11516 (process_event): Bail out if the event handler wants the event
11518 (handle_file_event): Ditto.
11519 (start_event_loop): Bail out if the event handler wants the event
11522 * nto-low.c (nto_target_ops): Adjust.
11523 * spu-low.c (spu_wait): Don't remove the process here.
11524 (spu_target_ops): Adjust.
11525 * win32-low.c (win32_wait): Don't remove the process here.
11526 (win32_target_ops): Adjust.
11528 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11530 * regcache.c (realloc_register_cache): Invalidate inferior's
11531 regcache before recreating it.
11533 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11535 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11537 2010-04-09 Stan Shebs <stan@codesourcery.com>
11538 Pedro Alves <pedro@codesourcery.com>
11540 * server.h (LONGEST): New.
11541 (struct thread_info) <while_stepping>: New field.
11542 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11544 (initialize_tracepoint, handle_tracepoint_general_set)
11545 (handle_tracepoint_query, tracepoint_finished_step)
11546 (tracepoint_was_hit, release_while_stepping_state_list):
11547 (current_traceframe): Declare.
11548 * server.c (handle_general_set): Handle tracepoint packets.
11549 (read_memory): New.
11550 (write_memory): New.
11551 (handle_search_memory_1): Use read_memory.
11552 (handle_query): Report support for conditional tracepoints, trace
11553 state variables, and tracepoint sources. Handle tracepoint
11555 (main): Initialize the tracepoints module.
11556 (process_serial_event): Handle traceframe reads/writes.
11558 * linux-low.c (handle_tracepoints): New.
11559 (linux_wait_1): Call it.
11560 (linux_resume_one_lwp): Handle while-stepping.
11561 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11562 (linux_target_ops): Install them.
11563 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11565 * linux-x86-low.c (x86_supports_tracepoints): New.
11566 (the_low_target). Install it.
11568 * mem-break.h (delete_breakpoint): Declare.
11569 * mem-break.c (delete_breakpoint): Make external.
11571 * target.h (struct target_ops): Add `supports_tracepoints',
11572 `read_pc', and `write_pc' fields.
11573 (target_supports_tracepoints): Define.
11574 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11577 * regcache.h (struct regcache) <registers_owned>: New field.
11578 (init_register_cache, regcache_cpy): Declare.
11579 (regcache_read_pc, regcache_write_pc): Declare.
11580 (register_cache_size): Declare.
11581 (supply_regblock): Declare.
11582 * regcache.c (init_register_cache): New.
11583 (new_register_cache): Use it.
11584 (regcache_cpy): New.
11585 (register_cache_size): New.
11586 (supply_regblock): New.
11587 (regcache_read_pc, regcache_write_pc): New.
11589 * tracepoint.c: New.
11591 * Makefile.in (OBS): Add tracepoint.o.
11592 (tracepoint.o): New rule.
11594 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11596 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11598 (i386-mmx.c): Likewise.
11599 (i386-mmx-linux.o): Likewise.
11600 (i386-mmx-linux.c): Likewise.
11602 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11603 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11604 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11605 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11607 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11608 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11609 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11611 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11613 * Makefile.in (clean): Updated.
11615 (i386-avx.c): Likewise.
11616 (i386-avx-linux.o): Likewise.
11617 (i386-avx-linux.c): Likewise.
11618 (amd64-avx.o): Likewise.
11619 (amd64-avx.c): Likewise.
11620 (amd64-avx-linux.o): Likewise.
11621 (amd64-avx-linux.c): Likewise.
11623 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11624 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11625 (srv_amd64_regobj): Add amd64-avx.o.
11626 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11627 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11628 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11629 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11630 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11631 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11632 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11634 * i387-fp.c: Include "i386-xstate.h".
11636 (i387_cache_to_xsave): Likewise.
11637 (i387_xsave_to_cache): Likewise.
11638 (x86_xcr0): Likewise.
11640 * i387-fp.h (i387_cache_to_xsave): Likewise.
11641 (i387_xsave_to_cache): Likewise.
11642 (x86_xcr0): Likewise.
11644 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11645 * linux-crisv32-low.c (target_regsets): Likewise.
11646 * linux-m68k-low.c (target_regsets): Likewise.
11647 * linux-mips-low.c (target_regsets): Likewise.
11648 * linux-ppc-low.c (target_regsets): Likewise.
11649 * linux-s390-low.c (target_regsets): Likewise.
11650 * linux-sh-low.c (target_regsets): Likewise.
11651 * linux-sparc-low.c (target_regsets): Likewise.
11652 * linux-xtensa-low.c (target_regsets): Likewise.
11654 * linux-low.c: Include <sys/uio.h>.
11655 (regsets_fetch_inferior_registers): Support nt_type.
11656 (regsets_store_inferior_registers): Likewise.
11657 (linux_process_qsupported): New.
11658 (linux_target_ops): Add linux_process_qsupported.
11660 * linux-low.h (regset_info): Add nt_type.
11661 (linux_target_ops): Add process_qsupported.
11663 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11665 (init_registers_i386_avx_linux): New.
11666 (init_registers_amd64_avx_linux): Likewise.
11667 (xmltarget_i386_linux_no_xml): Likewise.
11668 (xmltarget_amd64_linux_no_xml): Likewise.
11669 (PTRACE_GETREGSET): Likewise.
11670 (PTRACE_SETREGSET): Likewise.
11671 (x86_fill_xstateregset): Likewise.
11672 (x86_store_xstateregset): Likewise.
11673 (use_xml): Likewise.
11674 (x86_linux_update_xmltarget): Likewise.
11675 (x86_linux_process_qsupported): Likewise.
11676 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11677 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11678 init_registers_i386_linux here. Call
11679 x86_linux_update_xmltarget.
11680 (the_low_target): Add x86_linux_process_qsupported.
11682 * server.c (handle_query): Call target_process_qsupported.
11684 * target.h (target_ops): Add process_qsupported.
11685 (target_process_qsupported): New.
11687 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11689 * inferiors.c (add_thread): Set last_status kind to
11690 TARGET_WAITKIND_IGNORE.
11691 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11692 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11693 (linux_wait_1): Move `thread' local definition to block that uses
11694 it. Don't NULL initialize `event_child'.
11695 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11696 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11697 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11699 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11701 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11702 an extended waitstatus, or by a watchpoint.
11703 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11704 thread was stepping or has been stopped by a watchpoint.
11706 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11708 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11709 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11710 of another, then delete the previous, and validate all
11712 (validate_inserted_breakpoint): New.
11713 (delete_disabled_breakpoints): New.
11714 (validate_breakpoints): New.
11715 (check_mem_read): Validate breakpoints before trusting their
11716 shadow. Delete disabled breakpoints.
11717 (check_mem_write): Validate breakpoints before trusting they
11718 should be inserted. Delete disabled breakpoints.
11719 * mem-break.h (validate_breakpoints):
11720 * server.c (handle_query): Validate breakpoints when we see a
11723 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11725 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11726 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11727 if we could tell there's a GDB breakpoint at stop_pc.
11728 (need_step_over_p): Don't do a step over if we find a GDB
11729 breakpoint at the resume PC.
11731 * mem-break.c (struct raw_breakpoint): New.
11732 (enum bkpt_type): New type `gdb_breakpoint'.
11733 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11734 fields. New field `raw'.
11735 (find_raw_breakpoint_at): New.
11736 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11737 breakpoint instead.
11738 (set_breakpoint_at): Adjust.
11739 (delete_raw_breakpoint): New.
11740 (release_breakpoint): New.
11741 (delete_breakpoint): Rename to...
11742 (delete_breakpoint_1): ... this. Add proc parameter. Use
11743 release_breakpoint. Return ENOENT.
11744 (delete_breakpoint): Reimplement.
11745 (find_breakpoint_at): Delete.
11746 (find_gdb_breakpoint_at): New.
11747 (delete_breakpoint_at): Delete.
11748 (set_gdb_breakpoint_at): New.
11749 (delete_gdb_breakpoint_at): New.
11750 (gdb_breakpoint_here): New.
11751 (set_reinsert_breakpoint): Use release_breakpoint.
11752 (uninsert_breakpoint): Rename to ...
11753 (uninsert_raw_breakpoint): ... this.
11754 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11755 (reinsert_raw_breakpoint): Change parameter type to
11757 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11759 (check_breakpoints): Adjust. Use release_breakpoint.
11760 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11761 (breakpoint_inserted_here): Ditto.
11762 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11763 Don't trust the breakpoint's shadow if it is not inserted.
11764 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11765 (delete_all_breakpoints): Adjust.
11766 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11767 use delete_breakpoint_1.
11769 * mem-break.h (breakpoints_supported): Delete declaration.
11770 (set_gdb_breakpoint_at): Declare.
11771 (gdb_breakpoint_here): Declare.
11772 (delete_breakpoint_at): Delete.
11773 (delete_gdb_breakpoint_at): Declare.
11775 * server.h (struct raw_breakpoint): Forward declare.
11776 (struct process_info): New field `raw_breakpoints'.
11778 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11781 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11783 * linux-low.c (status_pending_p_callback): Fix comment.
11784 (linux_wait_for_event_1): Move most of the internal breakpoint
11785 handling from here...
11786 (linux_wait_1): ... to here.
11787 (count_events_callback): New.
11788 (select_singlestep_lwp_callback): New.
11789 (select_event_lwp_callback): New.
11790 (cancel_breakpoints_callback): New.
11791 (select_event_lwp): New.
11792 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11793 priority to all LWPs that have had events that should be reported
11794 to the client. Cancel breakpoints when about to reporting the
11795 event to the client, not while stopping lwps. No longer cancel
11796 finished single-steps here.
11797 (cancel_finished_single_step): Delete.
11798 (cancel_finished_single_steps): Delete.
11800 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11802 * mem-break.c (enum bkpt_type): New.
11803 (struct breakpoint): New field `type'.
11804 (set_breakpoint_at): Change return type to struct breakpoint
11805 pointer. Set type to `other_breakpoint' by default.
11806 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11807 in the breakpoint list.
11808 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11809 (reinsert_breakpoint): Rename to ...
11810 (reinsert_raw_breakpoint): ... this.
11811 (reinsert_breakpoints_at): Adjust.
11812 * mem-break.h (struct breakpoint): Declare.
11813 (set_breakpoint_at): Change return type to struct breakpoint
11816 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11818 * server.c (handle_query): Assign, not compare.
11820 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11822 Teach linux gdbserver to step-over-breakpoints.
11824 * linux-low.c (can_hardware_single_step): New.
11825 (supports_breakpoints): New.
11826 (handle_extended_wait): If stopping threads, read the stop pc of
11827 the new cloned LWP.
11829 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11830 low target doesn't support retrieving the PC.
11831 (add_lwp): Set last_resume_kind to resume_continue.
11832 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11833 (linux_attach): Don't clear stop_expected. Set the lwp's
11834 last_resume_kind to resume_stop.
11835 (linux_detach_one_lwp): Don't check for removed breakpoints.
11836 (check_removed_breakpoint): Delete.
11837 (status_pending_p): Rename to ...
11838 (status_pending_p_callback): ... this. Don't check for removed
11839 breakpoints. Don't consider threads that are stopped from GDB's
11841 (linux_wait_for_lwp): Always read the stop_pc here.
11842 (cancel_breakpoint): New.
11843 (step_over_bkpt): New global.
11844 (linux_wait_for_event_1): Implement stepping over breakpoints.
11845 (gdb_wants_lwp_stopped): New.
11846 (gdb_wants_all_stopped): New.
11847 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11848 single-step traps here. Store the thread's last reported target
11850 (send_sigstop): Don't clear stop_expected. Always set it,
11852 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11853 (cancel_finished_single_step): New.
11854 (cancel_finished_single_steps): New.
11855 (wait_for_sigstop): Don't cancel finished single-step traps here.
11856 (linux_resume_one_lwp): Don't check for removed breakpoints.
11857 Don't set `step' on non-hardware step archs.
11858 (linux_set_resume_request): Ignore resume_stop requests if already
11859 stopping or stopped. Set the lwp's last_resume_kind.
11860 (resume_status_pending_p): Don't check for removed breakpoints.
11861 (need_step_over_p): New.
11862 (start_step_over): New.
11863 (finish_step_over): New.
11864 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11865 requests. Clear the thread's last reported target waitstatus.
11866 Don't use the `suspended' flag. Don't consider pending breakpoints.
11867 (linux_resume): Start a step-over if necessary.
11868 (proceed_one_lwp): New.
11869 (proceed_all_lwps): New.
11870 (unstop_all_lwps): New.
11871 * linux-low.h (struct lwp_info): Rewrite comment for the
11872 `suspended' flag. Add the `stop_pc' field. Delete the
11873 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11874 Add `'last_resume_kind' and `need_step_over' fields.
11875 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11876 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11877 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11878 (set_raw_breakpoint_at): New.
11879 (set_breakpoint_at): Rewrite to use it.
11880 (reinsert_breakpoint_handler): Delete.
11881 (set_reinsert_breakpoint): New.
11882 (reinsert_breakpoint_by_bp): Delete.
11883 (delete_reinsert_breakpoints): New.
11884 (uninsert_breakpoint): Rewrite.
11885 (uninsert_breakpoints_at): New.
11886 (reinsert_breakpoint): Rewrite.
11887 (reinsert_breakpoints_at): New.
11888 (check_breakpoints): Rewrite.
11889 (breakpoint_here): New.
11890 (breakpoint_inserted_here): New.
11891 (check_mem_read): Adjust.
11892 * mem-break.h (breakpoints_supported, breakpoint_here)
11893 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11894 (reinsert_breakpoint_by_bp): Delete declaration.
11895 (delete_reinsert_breakpoints): Declare.
11896 (reinsert_breakpoint): Delete declaration.
11897 (reinsert_breakpoints_at): Declare.
11898 (uninsert_breakpoint): Delete declaration.
11899 (uninsert_breakpoints_at): Declare.
11900 (check_breakpoints): Adjust prototype.
11901 * server.h: Adjust include order.
11902 (struct thread_info): Declare here. Add a `last_status' field.
11904 2010-03-23 Michael Snyder <msnyder@vmware.com>
11906 * server.c (crc32): New function.
11907 (handle_query): Add handling for 'qCRC:' request.
11909 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11911 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11912 lwp had been stopped by a watchpoint.
11914 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11916 * server.h (internal_error): Declare.
11917 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11918 * utils.c (internal_error): New function.
11920 2010-03-15 Andreas Schwab <schwab@redhat.com>
11922 * configure.srv: Fix typo setting srv_regobj.
11924 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11926 * linux-low.c (fetch_register): Avoid passing a non string literal
11928 (usr_store_inferior_registers): Ditto.
11930 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11932 * linux-low.c (linux_write_memory): Bail out early if peeking
11935 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11937 * linux-low.h (struct lwp_info): New fields
11938 `stopped_by_watchpoint' and `stopped_data_address'.
11939 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11940 here, and cache them in the lwp object.
11941 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11943 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11945 (linux_stopped_by_watchpoint): Rewrite.
11946 (linux_stopped_data_address): Rewrite.
11948 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11950 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11951 switching the current inferior, not before.
11953 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11955 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11956 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11957 i386-linux.c and amd64-linux.c.
11958 (reg-i386.o): Removed.
11959 (reg-i386.c): Likewise.
11960 (reg-i386-linux.o): Likewise.
11961 (reg-i386-linux.c): Likewise.
11962 (reg-x86-64.o): Likewise.
11963 (reg-x86-64.c): Likewise.
11964 (reg-x86-64-linux.o): Likewise.
11965 (reg-x86-64-linux.c): Likewise.
11967 (i386.c): Likewise.
11968 (i386-linux.o): Likewise.
11969 (i386-linux.c): Likewise.
11970 (amd64.o): Likewise.
11971 (amd64.c): Likewise.
11972 (amd64-linux.o): Likewise.
11973 (amd64-linux.c): Likewise.
11975 * configure.srv (srv_i386_regobj): New.
11976 (srv_i386_linux_regobj): Likewise.
11977 (srv_amd64_regobj): Likewise.
11978 (srv_amd64_linux_regobj): Likewise.
11979 (srv_i386_32bit_xmlfiles): Likewise.
11980 (srv_i386_64bit_xmlfiles): Likewise.
11981 (srv_i386_xmlfiles): Likewise.
11982 (srv_amd64_xmlfiles): Likewise.
11983 (srv_i386_linux_xmlfiles): Likewise.
11984 (srv_amd64_linux_xmlfiles): Likewise.
11985 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11986 srv_xmlfiles to $srv_i386_xmlfiles.
11987 (i[34567]86-*-mingw32ce*): Likewise.
11988 (i[34567]86-*-mingw*): Likewise.
11989 (i[34567]86-*-nto*): Likewise.
11990 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11991 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11992 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11993 (x86_64-*-linux*): Likewise.
11995 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11996 (init_registers_amd64_linux): New.
11997 (x86_arch_setup): Replace init_registers_x86_64_linux with
11998 init_registers_amd64_linux.
12000 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12002 * configure.ac: Check for libdl. If it is not available link against
12003 static libthread_db.
12004 * configure: Regenerate.
12006 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12010 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12011 handing a read watchpoint.
12012 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12014 2010-02-12 Doug Evans <dje@google.com>
12016 * linux-low.c (linux_supports_tracefork_flag): Document.
12017 (linux_look_up_symbols): Add comment.
12019 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12021 * regcache.c (supply_register): Clear regcache if buf is NULL.
12023 2010-02-02 Nicolas Roche <roche@sourceware.org>
12024 Joel Brobecker <brobecker@adacore.com>
12026 * inferiors.c (find_inferior): Add function documentation.
12027 (unloaded_dll): Handle the case where the unloaded dll has not
12028 been previously registered in the dll list.
12030 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12032 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12033 (thumb2_breakpoint): New.
12034 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12036 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12038 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12039 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12042 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12044 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12046 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12048 * linux-s390-low.c (s390_collect_ptrace_register)
12049 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12051 2010-01-21 Doug Evans <dje@google.com>
12053 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12054 (PTRACE_ARG4_TYPE): New macro.
12055 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12056 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12057 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12058 (usr_store_inferior_registers): Ditto.
12059 (linux_read_memory, linux_write_memory): Ditto.
12060 (linux_test_for_tracefork): Ditto.
12062 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12063 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12065 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12067 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12070 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12072 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12073 prototype to take a regcache. Adjust.
12075 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12077 * regcache.h (struct thread_info): Forward declare.
12078 (struct regcache): New.
12079 (new_register_cache): Adjust prototype.
12080 (get_thread_regcache): Declare.
12081 (free_register_cache): Adjust prototype.
12082 (registers_to_string, registers_from_string): Ditto.
12083 (supply_register, supply_register_by_name, collect_register)
12084 (collect_register_as_string, collect_register_by_name): Ditto.
12085 * regcache.c (struct inferior_regcache_data): Delete.
12086 (get_regcache): Rename to ...
12087 (get_thread_regcache): ... this. Adjust. Switch inferior before
12088 fetching registers.
12089 (regcache_invalidate_one): Adjust.
12090 (regcache_invalidate): Fix prototype.
12091 (new_register_cache): Return the new register cache.
12092 (free_register_cache): Change prototype.
12093 (realloc_register_cache): Adjust.
12094 (registers_to_string): Change prototype to take a regcache. Adjust.
12095 (registers_from_string): Ditto.
12096 (register_data): Ditto.
12097 (supply_register): Ditto.
12098 (supply_register_by_name): Ditto.
12099 (collect_register): Ditto.
12100 (collect_register_as_string): Ditto.
12101 (collect_register_by_name): Ditto.
12102 * server.c (process_serial_event): Adjust.
12103 * linux-low.h (regset_fill_func, regset_store_func): Change
12105 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12107 * linux-low.c (get_stop_pc): Adjust.
12108 (check_removed_breakpoint): Adjust.
12109 (linux_wait_for_event): Adjust.
12110 (linux_resume_one_lwp): Adjust.
12111 (fetch_register): Add regcache parameter. Adjust.
12112 (usr_store_inferior_registers): Ditto.
12113 (regsets_fetch_inferior_registers): Ditto.
12114 (regsets_store_inferior_registers): Ditto.
12115 (linux_fetch_registers, linux_store_registers): Ditto.
12116 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12118 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12120 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12121 prototype to take a regcache.
12122 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12123 * remote-utils.c (convert_ascii_to_int, outreg)
12124 (prepare_resume_reply): Change prototype to take a regcache.
12126 * target.h (struct target_ops) <fetch_registers, store_registers>:
12127 Change prototype to take a regcache.
12128 (fetch_inferior_registers, store_inferior_registers): Change
12129 prototype to take a regcache. Adjust.
12130 * proc-service.c (ps_lgetregs): Adjust.
12131 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12132 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12133 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12134 take a regcache. Adjust.
12135 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12136 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12137 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12138 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12139 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12140 (cris_cannot_fetch_register):
12141 (cris_breakpoint_at): Change prototype to take a regcache.
12143 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12144 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12145 to take a regcache. Adjust.
12146 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12148 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12149 take a regcache. Adjust.
12150 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12151 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12152 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12153 * linux-mips-low.c (mips_get_pc):
12154 (mips_set_pc): Change prototype to take a regcache. Adjust.
12155 (mips_reinsert_addr): Adjust.
12156 (mips_collect_register): Change prototype to take a regcache.
12158 (mips_supply_register):
12159 (mips_collect_register_32bit, mips_supply_register_32bit)
12160 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12161 (mips_store_fpregset): Ditto.
12162 * linux-ppc-low.c (ppc_supply_ptrace_register)
12163 (ppc_supply_ptrace_register): Ditto.
12164 (parse_spufs_run): Adjust.
12165 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12166 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12167 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12168 take a regcache. Adjust.
12169 * linux-s390-low.c (s390_collect_ptrace_register)
12170 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12171 (s390_set_pc): Change prototype to take a regcache. Adjust.
12172 (s390_arch_setup): Adjust.
12173 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12174 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12175 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12176 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12177 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12179 (sparc_breakpoint_at): Adjust.
12180 * linux-xtensa-low.c (xtensa_fill_gregset):
12181 (xtensa_store_gregset):
12182 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12183 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12184 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12185 prototype to take a regcache. Adjust.
12186 * win32-arm-low.c (arm_fetch_inferior_register)
12187 (arm_store_inferior_register): Change prototype to take a
12189 * win32-i386-low.c (i386_fetch_inferior_register)
12190 (i386_store_inferior_register): Change prototype to take a
12192 * win32-low.c (child_fetch_inferior_registers)
12193 (child_store_inferior_registers): Change prototype to take a
12195 (win32_wait): Adjust.
12196 (win32_fetch_inferior_registers): Change prototype to take a
12198 (win32_store_inferior_registers): Adjust.
12199 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12200 store_inferior_register>: Change prototype to take a regcache.
12202 2010-01-20 Doug Evans <dje@google.com>
12204 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12206 (linux_wait_for_event1, linux_init_signals): Ditto.
12207 (W_STOPCODE): Provide definition if missing.
12209 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12211 * linux-low.c (linux_core_of_thread): New.
12212 (compare_ints, show_process, list_threads): New.
12213 (linux_qxfer_osdata): Report threads and cores.
12214 (linux_target_op): Register linux_core_of_thread.
12215 * remote-utils.c (prepare_resume_reply): Report the core.
12216 (buffer_xml_printf): Support %d specifier.
12217 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12219 (handle_query): Handle qXfer:threads. Announce availability
12221 * target.h (struct target_ops): New field core_of_thread.
12223 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12225 * Makefile.in (clean): Remove new generated files.
12226 (reg-s390.o, reg-s390.c): Remove rules.
12227 (reg-s390x.o, reg-s390x.c): Likewise.
12228 (s390-linux32.o, s390-linux32.c): Add rules.
12229 (s390-linux64.o, s390-linux64.c): Likewise.
12230 (s390x-linux64.o, s390x-linux64.c): Likewise.
12231 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12232 * linux-s390-low.c: Include <elf.h>.
12233 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12234 (init_registers_s390): Remove prototype.
12235 (init_registers_s390x): Likewise.
12236 (init_registers_s390_linux32): Add prototype.
12237 (init_registers_s390_linux64): Likewise.
12238 (init_registers_s390x_linux64): Likewise.
12239 (s390_num_regs_3264): New define.
12240 (s390_regmap_3264): New global variable.
12241 (s390_cannot_fetch_register): Remove obsolete check.
12242 (s390_cannot_store_register): Likewise.
12243 (s390_collect_ptrace_register): Handle upper/lower register halves.
12244 (s390_supply_ptrace_register): Likewise.
12245 (s390_fill_gregset): Update to register number changes.
12246 (s390_get_hwcap): New routine.
12247 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12248 Install appropriate regmap and register set.
12250 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12252 * server.c (gdbserver_version): Update copyright year to 2010.
12253 * gdbreplay.c (gdbreplay_version): Likewise.
12255 2009-12-28 Doug Evans <dje@google.com>
12257 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12258 elf/external.h. Include <elf.h> instead but only if necessary.
12260 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12262 * linux-low.c (linux_remove_process): Remove `detaching'
12263 parameter. Don't release/detach from thread_db here.
12264 (linux_kill): Release/detach from thread_db here, ...
12265 (linux_detach): ... and here, before actually detaching.
12266 (linux_wait_1): ... and here, when a process exits.
12267 * thread-db.c (any_thread_of): New.
12268 (thread_db_free): Switch the current inferior to a thread of the
12271 2009-12-21 Doug Evans <dje@google.com>
12273 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12275 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12276 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12277 warning ifndef __NR_tkill. Move setting of errno there too.
12278 Delete unnecessary resetting of errno after syscall.
12279 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12281 * configure.ac: Check for dladdr.
12282 * config.in: Regenerate.
12283 * configure: Regenerate.
12284 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12285 (try_thread_db_load): Update.
12287 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12289 2009-12-18 Doug Evans <dje@google.com>
12291 * event-loop.c: Include unistd.h if it exists.
12293 * linux-low.c (my_waitpid): Move definition away from being in
12294 between linux_tracefork_child/linux_test_for_tracefork.
12296 * gdb_proc_service.h (psaddr_t): Fix type.
12297 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12298 signature to match glibc.
12300 2009-12-16 Doug Evans <dje@google.com>
12302 * linux-low.c (linux_read_memory): Fix argument to read.
12304 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12306 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12307 events, don't leave current_inferior pointing at null.
12309 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12311 * win32-low.c (LOG): Delete.
12312 (OUTMSG): Output to stderr.
12313 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12314 on compile time LOG macro.
12315 (win32_wait): Fix debug output.
12317 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12319 * win32-low.c (win32_add_one_solib): If the dll name is
12320 "ntdll.dll", prepend the system directory to the dll path.
12322 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12324 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12326 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12327 Vladimir Prus <vladimir@codesourcery.com>
12329 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12330 * configure.ac: Check for __mcoldfire__ and set
12331 gdb_cv_m68k_is_coldfire.
12332 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12333 reg-cf.o and reg-m68k.o.
12334 * configure: Regenerated.
12336 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12338 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12339 Pass it to thread_db_free.
12340 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12341 proper `detaching' argument to linux_remove_process.
12342 * linux-low.h (thread_db_free): Add `detaching' parameter.
12343 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12345 (thread_db_free): Add `detaching' parameter. Only
12346 call td_ta_clear_event if detaching from process.
12348 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12350 * thread-db.c (thread_db_free): Fix typo.
12352 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12355 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12357 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12359 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12360 with an i686 compiler.
12361 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12363 * configure: Rebuilt.
12365 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12369 * server.c (handle_search_memory_1): Correct read_addr initialization
12370 in loop for searching subsequent chunks.
12372 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12374 * configure.ac: New --with-libthread-db option.
12375 * thread-db.c: Allow direct dependence on libthread_db.
12376 (thread_db_free): Adjust.
12377 * config.in: Regenerate.
12378 * configure: Likewise.
12380 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12383 * thread-db.c (attach_thread): New function.
12384 (maybe_attach_thread): Return success/failure.
12385 (find_new_threads_callback): Adjust.
12386 (thread_db_find_new_threads): Loop until no new threads.
12388 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12390 * proc-service.c (ps_lgetregs): Formatting.
12392 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12394 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12395 * configure.ac: Adjust.
12396 * linux-low.h (struct process_info_private): Move members to struct
12398 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12399 * linux-low.c (linux_remove_process): Adjust.
12400 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12401 * server.c (handle_query): Move code ...
12402 (handle_monitor_command): ... here. New function.
12403 * target.h (struct target_ops): New member.
12404 * thread-db.c (struct thread_db): New.
12405 (libthread_db_search_path): New variable.
12406 (thread_db_create_event, thread_db_enable_reporting)
12407 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12408 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12409 (try_thread_db_load_1, dladdr_to_soname): New functions.
12410 (try_thread_db_load, thread_db_load_search): New functions.
12411 (thread_db_init): Search for libthread_db.
12412 (thread_db_free): New function.
12413 (thread_db_handle_monitor_command): Likewise.
12414 * config.in: Regenerate.
12415 * configure: Regenerate.
12417 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12419 * spu-low.c (spu_kill): Wait for inferior to terminate.
12420 Call clear_inferiors.
12421 (spu_detach): Call clear_inferiors.
12423 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12425 * aclocal.m4: Regenerate.
12426 * config.in: Likewise.
12427 * configure: Likewise.
12429 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12431 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12432 (parse_spufs_run): New function.
12433 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12434 (ppc_breakpoint_at): Handle SPU breakpoints.
12436 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12438 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12439 (SPUFS_MAGIC): Define.
12440 (spu_enumerate_spu_ids): New function.
12441 (linux_qxfer_spu): New function.
12442 (linux_target_ops): Install linux_qxfer_spu.
12444 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12446 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12447 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12448 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12449 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12450 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12451 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12452 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12453 (init_registers_powerpc_cell32l): Add prototype.
12454 (init_registers_powerpc_cell64l): Likewise.
12455 (ppc_arch_setup): Detect Cell/B.E. architecture.
12457 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12459 * Makefile.in (datarootdir): New variable.
12461 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12463 * linux-low.c (linux_write_memory): Update debugging output.
12464 * Makefile.in (clean): Add new descriptions.
12465 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12466 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12467 * configure.srv: Add new files for arm*-*-linux*.
12468 * linux-arm-low.c: Add new declarations.
12469 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12470 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12471 (HWCAP_VFPv3D16): New.
12472 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12473 instead of __IWMMXT__.
12474 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12475 (arm_arch_setup): New.
12476 (target_regsets): Remove #ifdef. Add VFP regset.
12477 (the_low_target): Use arm_arch_setup.
12479 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12481 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12482 the main thread again.
12484 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12486 Adding Neutrino gdbserver.
12487 * configure: Regenerated.
12488 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12489 * configure.srv (i[34567]86-*-nto*): New target.
12490 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12491 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12492 (nto_comctrl) [__QNX__]: New function.
12493 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12495 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12497 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12500 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12501 Pedro Alves <pedro@codesourcery.com>
12503 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12504 don't support CONTEXT_EXTENDED_REGISTERS.
12505 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12506 (the_low_target): Install them.
12507 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12508 failing with ERROR_PIPE_NOT_CONNECTED.
12510 2009-06-30 Doug Evans <dje@google.com>
12511 Pierre Muller <muller@ics.u-strasbg.fr>
12513 Add h/w watchpoint support to x86-linux, win32-i386.
12514 * Makefile.in (SFILES): Add i386-low.c
12515 (i386_low_h): Define.
12516 (i386-low.o): Add dependencies.
12517 (linux-x86-low.o): Add i386-low.h dependency.
12518 (win32-i386-low.o): Ditto.
12519 * i386-low.c: New file.
12520 * i386-low.h: New file.
12521 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12522 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12523 * linux-low.c (linux_add_process): Initialize arch_private.
12524 (linux_remove_process): Free arch_private.
12525 (add_lwp): Initialize arch_private.
12526 (delete_lwp): Free arch_private.
12527 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12529 * linux-low.h (process_info_private): New member arch_private.
12530 (lwp_info): New member arch_private.
12531 (linux_target_ops): New members new_process, new_thread,
12533 (ptid_of): New macro.
12534 * linux-x86-low.c: Include stddef.h, i386-low.h.
12535 (arch_process_info): New struct.
12536 (arch_lwp_info): New struct.
12537 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12538 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12539 (i386_dr_low_get_status): New function.
12540 (x86_insert_point, x86_remove_point): New functions.
12541 (x86_stopped_by_watchpoint): New function.
12542 (x86_stopped_data_address): New function.
12543 (x86_linux_new_process, x86_linux_new_thread): New functions.
12544 (x86_linux_prepare_to_resume): New function.
12545 (the_low_target): Add entries for insert_point, remove_point,
12546 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12548 * server.c (debug_hw_points): New global.
12549 (monitor_show_help): Document set debug-hw-points.
12550 (handle_query): Process "set debug-hw-points".
12551 * server.h (debug_hw_points): Declare.
12552 (paddress): Declare.
12553 * utils.c (NUMCELLS, CELLSIZE): New macros.
12554 (get_sell, xsnprintf, paddress): New functions.
12555 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12556 remove_point, stopped_by_watchpoint, stopped_data_address.
12557 * win32-i386-low.c: Include i386-low.h.
12558 (debug_reg_state): Replaces dr.
12559 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12560 (i386_dr_low_get_status): New function.
12561 (i386_insert_point, i386_remove_point): New functions.
12562 (i386_stopped_by_watchpoint): New function.
12563 (i386_stopped_data_address): New function.
12564 (i386_initial_stuff): Update.
12565 (get_thread_context,set_thread_context,i386_thread_added): Update.
12566 (the_low_target): Add entries for insert_point,
12567 remove_point, stopped_by_watchpoint, stopped_data_address.
12568 * win32-low.c (win32_insert_watchpoint): New function.
12569 (win32_remove_watchpoint): New function.
12570 (win32_stopped_by_watchpoint): New function.
12571 (win32_stopped_data_address): New function.
12572 (win32_target_ops): Add entries for insert_watchpoint,
12573 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12574 * win32-low.h (win32_target_ops): New members insert_point,
12575 remove_point, stopped_by_watchpoint, stopped_data_address.
12577 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12579 * server.c (process_serial_event): Re-return unsupported, not
12580 error, if the type isn't recognized. Re-allow supporting only
12581 insert or remove packets. Also call require_running for
12582 breakpoints. Add missing break statement to default case. Tidy.
12583 * target.h (struct target_ops): Rename insert_watchpoint to
12584 insert_point, and remove_watchpoint to remove_point.
12586 * linux-low.h (struct linux_target_ops): Likewise.
12587 * linux-low.c (linux_insert_watchpoint): Rename to ...
12588 (linux_insert_point): ... this. Adjust.
12589 (linux_remove_watchpoint): Rename to ...
12590 (linux_remove_point): ... this. Adjust.
12591 (linux_target_ops): Adjust.
12592 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12593 (cris_insert_point): ... this.
12594 (cris_remove_watchpoint): Rename to ...
12595 (cris_remove_point): ... this.
12596 (the_low_target): Adjust.
12598 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12600 * server.c (handle_v_kill): Pass signal_pid to
12601 kill_inferior if multi_process is zero.
12603 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12605 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12606 * target.h (target_ops): Comment for *_watchpoint to make it clear
12607 the functions can get types '0' and '1'.
12609 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12611 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12612 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12613 * regcache.c (get_regcache): Likewise.
12614 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12615 * win32-low.c (child_fetch_inferior_registers): Remove check for
12618 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12619 Pedro Alves <pedro@codesourcery.com>
12621 * target.h (struct target_ops) <supports_multi_process>: New
12623 (target_supports_multi_process): New.
12624 * server.c (handle_query): Even if GDB reports support, only
12625 enable multi-process if the target also supports it. Report
12626 multi-process support only if the target backend supports it.
12627 * linux-low.c (linux_supports_multi_process): New function.
12628 (linux_target_ops): Install it as target_supports_multi_process
12631 2009-05-24 Doug Evans <dje@google.com>
12633 Global renaming of find_thread_pid to find_thread_ptid.
12634 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12635 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12636 All callers updated.
12638 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12639 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12642 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12643 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12644 (linux_resume_one_lwp): Ditto.
12646 2009-05-23 Doug Evans <dje@google.com>
12648 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12649 from struct inferior_list_entry * to struct lwp_info *.
12650 All callers updated.
12652 2009-05-13 Doug Evans <dje@google.com>
12654 * linux-x86-low.c: Don't include assert.h.
12655 (x86_siginfo_fixup): Use fatal, not assert.
12656 (x86_arch_setup): Fix comment.
12658 2009-05-12 Doug Evans <dje@google.com>
12660 Biarch support for i386/amd64 gdbserver.
12661 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12662 Add linux-x86-low.c.
12663 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12664 (linux-x86-low.o): Add.
12665 * linux-x86-64-low.c: Delete.
12666 * linux-i386-low.c: Delete.
12667 * linux-x86-low.c: New file.
12668 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12670 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12672 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12673 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12674 (linux_child_pid_to_exec_file): New function.
12675 (elf_64_header_p, elf_64_file_p): New functions.
12676 (siginfo_fixup): New function.
12677 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12678 give target a chance to convert layout.
12679 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12680 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12682 2009-05-07 Doug Evans <dje@google.com>
12684 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12685 (regsets_store_inferior_registers): Ditto.
12687 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12691 * linux-low.c (must_set_ptrace_flags): Delete.
12692 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12694 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12695 `lwp->must_set_ptrace_flags' instead.
12696 (linux_wait_for_event_1): Set ptrace options here.
12697 (linux_wait_1): ... not here.
12699 2009-04-30 Doug Evans <dje@google.com>
12701 * inferiors.c (started_inferior_callback): New function.
12702 (attached_inferior_callback): New function.
12703 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12704 * server.c (print_started_pid, print_attached_pid): New functions.
12705 (detach_or_kill_for_exit): New function.
12706 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12707 * server.h (have_started_inferiors_p): Declare.
12708 (have_attached_inferiors_p): Declare.
12710 * inferiors.c (remove_process): Fix memory leak, free process.
12711 * linux-low.c (linux_remove_process): New function.
12712 (linux_kill): Call it instead of remove_process.
12713 (linux_detach, linux_wait_1): Ditto.
12715 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12717 * configure.srv: Add x86 Windows CE target.
12719 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12721 * inferiors.c (get_thread_process): Make global.
12722 * server.h (get_thread_process): Add prototype.
12723 * thread-db.c (find_one_thread): Use get_thread_process
12724 instead of current_process.
12725 (thread_db_get_tls_address): Do not crash if called when
12726 thread layer is not yet initialized.
12728 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12730 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12731 * spu-low.c (current_tid): Rename to ...
12732 (current_ptid): ... this.
12733 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12734 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12735 ptid_get_lwp (current_ptid) instead of current_tid.
12736 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12737 instead of current_tid. Use find_process_pid to verify pid
12738 argument is valid. Pass proper argument to remove_process.
12739 (spu_thread_alive): Compare current_ptid instead of current_tid.
12740 (spu_resume): Likewise.
12742 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12744 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12747 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12749 Implement the multiprocess extensions, and add linux multiprocess
12752 * server.h (ULONGEST): Declare.
12753 (struct ptid, ptid_t): New.
12754 (minus_one_ptid, null_ptid): Declare.
12755 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12756 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12757 (struct inferior_list_entry): Change `id' type from unsigned from
12759 (struct sym_cache, struct breakpoint, struct
12760 process_info_private): Forward declare.
12761 (struct process_info): Declare.
12762 (current_process): Declare.
12763 (all_processes): Declare.
12764 (initialize_inferiors): Declare.
12765 (add_thread): Adjust to use ptid_t.
12766 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12767 (add_process, remove_process, find_thread_pid): Declare.
12768 (find_inferior_id): Adjust to use ptid_t.
12769 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12770 (multi_process): Declare.
12771 (push_event): Adjust to use ptid_t.
12772 (read_ptid, write_ptid): Declare.
12773 (prepare_resume_reply): Adjust to use ptid_t.
12774 (clear_symbol_cache): Declare.
12775 * inferiors.c (all_processes): New.
12776 (null_ptid, minus_one_ptid): New.
12777 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12778 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12779 (add_thread): Change unsigned long to ptid. Remove gdb_id
12781 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12782 (gdb_id_to_thread): Rename to ...
12783 (find_thread_pid): ... this. Change unsigned long to ptid.
12784 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12785 (loaded_dll, pull_pid_from_list): Adjust.
12786 (add_process, remove_process, find_process_pid)
12787 (get_thread_process, current_process, initialize_inferiors): New.
12788 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12789 (struct target_waitstatus) <related_pid>: Ditto.
12790 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12791 return type to int.
12792 (struct target_ops) <join>: Add `pid' argument.
12793 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12794 (struct target_ops) <wait>: Add `ptid' field. Change return type
12796 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12797 (mywait): Add `ptid' argument. Change return type to ptid_t.
12798 (target_pid_to_str): Declare.
12799 * target.c (set_desired_inferior): Adjust to use ptids.
12800 (mywait): Add new `ptid' argument. Adjust.
12801 (target_pid_to_str): New.
12802 * mem-break.h (free_all_breakpoints): Declare.
12803 * mem-break.c (breakpoints): Delelete.
12804 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12805 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12806 to use per-process breakpoint list.
12807 (free_all_breakpoints): New.
12808 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12809 (symbol_cache, all_symbols_looked_up): Delete.
12811 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12813 (prepare_resume_reply): Change ptid argument's type from unsigned
12814 long to ptid_t. Adjust. Implement W;process and X;process.
12815 (free_sym_cache, clear_symbol_cache): New.
12816 (look_up_one_symbol): Adjust to per-process symbol cache. *
12817 * server.c (cont_thread, general_thread, step_thread): Change type
12819 (attached): Delete.
12820 (multi_process): New.
12821 (last_ptid): Change type to ptid_t.
12822 (struct vstop_notif) <ptid>: Change type to ptid_t.
12823 (queue_stop_reply, push_event): Change `ptid' argument's type to
12825 (discard_queued_stop_replies): Add `pid' argument.
12826 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12827 changes. Don't reference the `attached' global.
12828 (attach_inferior): Adjust to mywait interface changes.
12829 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12830 features. Handle and report "multiprocess+". Handle
12832 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12834 (handle_v_kill): New.
12835 (handle_v_stopped): Adjust to use target_pid_to_str.
12836 (handle_v_requests): Allow multiple attaches and runs when
12837 multiprocess extensions are in effect. Handle "vKill".
12838 (myresume): Adjust to use ptids.
12839 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12840 (handle_status): Adjust to discard_queued_stop_replies interface
12842 (first_thread_of, kill_inferior_callback)
12843 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12844 (main): Call initialize_inferiors. Adjust to use ptids, killing
12845 and detaching from all inferiors. Handle multiprocess packet
12847 * linux-low.h: Include gdb_proc_service.h.
12848 (struct process_info_private): New.
12849 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12850 <lwpid_of>: Use ptid_get_lwp.
12851 (get_lwp_thread): Adjust.
12852 (struct lwp_info): Add `dead' member.
12853 (find_lwp_pid): Declare.
12854 * linux-low.c (thread_db_active): Delete.
12855 (new_inferior): Adjust comment.
12856 (inferior_pid): Delete.
12857 (linux_add_process): New.
12858 (handle_extended_wait): Adjust.
12859 (add_lwp): Change unsigned long to ptid.
12860 (linux_create_inferior): Add process to processes table. Adjust
12861 to use ptids. Don't set new_inferior here.
12862 (linux_attach_lwp): Rename to ...
12863 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12864 it. Adjust to use ptids.
12865 (linux_attach_lwp): New.
12866 (linux_attach): Add process to processes table. Don't set
12868 (struct counter): New.
12869 (second_thread_of_pid_p, last_thread_of_process_p): New.
12870 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12871 multiple processes.
12872 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12873 processes. Remove process from process table.
12874 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12875 to multiple processes.
12876 (any_thread_of): New.
12877 (linux_detach): Add `pid' argument, and handle it. Remove process
12878 from processes table.
12879 (linux_join): Add `pid' argument. Handle it.
12880 (linux_thread_alive): Change unsighed long argument to ptid_t.
12881 Consider dead lwps as not being alive.
12882 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12883 threads we're not interested in.
12884 (same_lwp, find_lwp_pid): New.
12885 (linux_wait_for_lwp): Change `pid' argument's type from int to
12887 (linux_wait_for_event): Rename to ...
12888 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12889 from int to ptid_t. Adjust.
12890 (linux_wait_for_event): New.
12891 (linux_wait_1): Add `ptid' argument. Change return type to
12892 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12893 that exit from the process table.
12894 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12896 (mark_lwp_dead): New.
12897 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12898 stopping all threads, mark its main lwp as dead.
12899 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12901 (fetch_register, usr_store_inferior_registers)
12902 (regsets_fetch_inferior_registers)
12903 (regsets_store_inferior_registers, linux_read_memory)
12904 (linux_write_memory): Inline `inferior_pid'.
12905 (linux_look_up_symbols): Adjust to use per-process
12906 `thread_db_active'.
12907 (linux_request_interrupt): Adjust to use ptids.
12908 (linux_read_auxv): Inline `inferior_pid'.
12909 (initialize_low): Don't reference thread_db_active.
12910 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12911 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12912 (ps_getpid): Return the pid of the current inferior.
12913 * thread-db.c (proc_handle, thread_agent): Delete.
12914 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12916 (find_one_thread): Change argument type to ptid_t. Adjust to
12918 (maybe_attach_thread): Adjust to per-process data and ptids.
12919 (thread_db_find_new_threads): Ditto.
12920 (thread_db_init): Ditto.
12921 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12922 processes table. Adjust to use ptids.
12923 (spu_kill, spu_detach): Adjust interface. Remove process from
12925 (spu_join, spu_thread_alive): Adjust interface.
12926 (spu_wait): Adjust interface. Remove process from processes
12927 table. Adjust to use ptids.
12928 * win32-low.c (current_inferior_tid): Delete.
12929 (current_inferior_ptid): New.
12930 (debug_event_ptid): New.
12931 (thread_rec): Take a ptid. Adjust.
12932 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12933 (child_delete_thread): Ditto.
12934 (do_initial_child_stuff): Add `attached' argument. Add process to
12936 (child_fetch_inferior_registers, child_store_inferior_registers):
12938 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12939 (win32_attach): Pass 1 to do_initial_child_stuff.
12940 (win32_kill): Adjust interface. Remove process from processes
12942 (win32_detach): Ditto.
12943 (win32_join): Adjust interface.
12944 (win32_thread_alive): Take a ptid.
12945 (win32_resume): Adjust to use ptids.
12946 (get_child_debug_event): Ditto.
12947 (win32_wait): Adjust interface. Remove exiting process from
12950 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12952 Non-stop mode support.
12954 * server.h (non_stop): Declare.
12955 (gdb_client_data, handler_func): Declare.
12956 (delete_file_handler, add_file_handler, start_event_loop):
12958 (handle_serial_event, handle_target_event, push_event)
12959 (putpkt_notif): Declare.
12960 * target.h (enum resume_kind): New.
12961 (struct thread_resume): Replace `step' field by `kind' field.
12962 (TARGET_WNOHANG): Define.
12963 (struct target_ops) <wait>: Add `options' argument.
12964 <supports_non_stop, async, start_non_stop>: New fields.
12965 (target_supports_non_stop, target_async): New.
12966 (start_non_stop): Declare.
12967 (mywait): Add `options' argument.
12968 * target.c (mywait): Add `options' argument. Print child exit
12969 notifications here.
12970 (start_non_stop): New.
12971 * server.c (non_stop, own_buf, mem_buf): New globals.
12972 (struct vstop_notif): New.
12973 (notif_queue): New global.
12974 (queue_stop_reply, push_event, discard_queued_stop_replies)
12975 (send_next_stop_reply): New.
12976 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12978 (attach_inferior): In non-stop mode, don't wait for the target
12980 (handle_general_set): Handle QNonStop.
12981 (handle_query): When handling qC, return the current general
12982 thread, instead of the first thread of the list.
12983 (handle_query): If the backend supports non-stop mode, include
12984 QNonStop+ in the qSupported query response.
12985 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12987 (handle_v_attach, handle_v_run): Handle non-stop mode.
12988 (handle_v_stopped): New.
12989 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12990 (myresume): Adjust to use resume_kind. Handle non-stop.
12991 (queue_stop_reply_callback): New.
12992 (handle_status): Handle non-stop mode.
12993 (main): Clear non_stop flag on reconnection. Use the event-loop.
12994 Refactor serial protocol handling from here ...
12995 (process_serial_event): ... to this new function. When GDB
12996 selects any thread, select one here. In non-stop mode, wait until
12997 GDB acks all pending events before exiting.
12998 (handle_serial_event, handle_target_event): New.
12999 * remote-utils.c (remote_open): Install remote_desc in the event
13001 (remote_close): Remove remote_desc from the event loop.
13002 (putpkt_binary): Rename to...
13003 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13004 (putpkt_binary): New as wrapper around putpkt_binary_1.
13005 (putpkt_notif): New.
13006 (prepare_resume_reply): In non-stop mode, don't change the
13008 * event-loop.c: New.
13009 * Makefile.in (OBJ): Add event-loop.o.
13010 (event-loop.o): New rule.
13012 * linux-low.h (pid_of): Moved here.
13014 (get_lwp_thread): Use lwpid_of.
13015 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13016 * linux-low.c (pid_of): Delete.
13017 (inferior_pid): Use lwpid_of.
13018 (linux_event_pipe): New.
13019 (target_is_async_p): New.
13021 (handle_extended_wait): Use lwpid_of.
13022 (add_lwp): Don't set lwpid field.
13023 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13024 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13025 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13026 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13027 first. Adjust to linux_wait_for_event interface changes. Use
13029 (linux_detach): Don't delete the main lwp here.
13030 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13031 (status_pending_p): Don't consider explicitly suspended lwps.
13032 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13033 pointer. Add OPTIONS argument. Change return type to int. Use
13034 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13035 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13036 pointer. Add status pointer argument. Return a pid instead of a
13037 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13038 changes. In non-stop mode, don't switch to a random thread.
13039 (linux_wait): Rename to...
13040 (linux_wait_1): ... this. Add target_options argument, and handle
13041 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13042 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13043 clean exit and signal exit code. Don't stop all threads in
13044 non-stop mode. In all-stop mode, only stop all threads when
13045 reporting a stop to GDB. Handle explicit thread stop requests.
13046 (async_file_flush, async_file_mark): New.
13048 (send_sigstop): Use lwpid_of.
13049 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13050 interface changes. In non-stop mode, don't switch to a random
13052 (linux_resume_one_lwp): Use lwpid_of.
13053 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13054 (linux_resume_one_thread): ... this. Handle resume_stop. In
13055 non-stop mode, don't look for pending flag in all threads.
13056 (resume_status_pending_p): Don't consider explicitly suspended
13058 (my_waitpid): Reimplement. Emulate __WALL.
13059 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13061 (sigchld_handler, linux_supports_non_stop, linux_async)
13062 (linux_start_non_stop): New.
13063 (linux_target_ops): Register linux_supports_non_stop, linux_async
13064 and linux_start_non_stop.
13065 (initialize_low): Install SIGCHLD handler.
13066 * thread-db.c (thread_db_create_event, find_one_thread)
13067 (thread_db_get_tls_address): Use lwpid_of.
13068 * win32-low.c (win32_detach): Adjust to use resume_kind.
13069 (win32_wait): Add `options' argument.
13070 * spu-low.c (spu_resume): Adjust to use resume_kind.
13071 (spu_wait): Add `options' argument.
13073 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13075 Decouple target code from remote protocol.
13077 * target.h (enum target_waitkind): New.
13078 (struct target_waitstatus): New.
13079 (struct target_ops) <wait>: Return an unsigned long. Take a
13080 target_waitstatus pointer instead of a char pointer.
13081 (mywait): Likewise.
13082 * target.c (mywait): Change prototype to return an unsigned long.
13083 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13084 * server.h (thread_from_wait, old_thread_from_wait): Delete
13086 (prepare_resume_reply): Change prototype to take a
13088 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13089 (last_status, last_ptid): New.
13090 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13091 pid instead of a signal.
13092 (attach_inferior): Remove "status" and "signal" parameters.
13094 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13096 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13097 (handle_v_requests, myresume): Remove "status" and "signal"
13098 parameters. Adjust.
13099 (handle_status): New.
13100 (main): Delete local `status'. Adjust.
13101 * remote-utils.c: Include target.h.
13102 (prepare_resume_reply): Change prototype to take a
13103 target_waitstatus. Adjust.
13105 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13107 * spu-low.c (spu_wait): Adjust.
13108 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13110 (win32_wait): Adjust.
13112 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13114 * target.h (struct thread_resume): Delete leave_stopped member.
13115 (struct target_ops): Add a `n' argument to the `resume' callback.
13116 * server.c (start_inferior): Adjust.
13117 (handle_v_cont, myresume): Adjust.
13118 * linux-low.c (check_removed_breakpoint): Adjust to resume
13119 interface change, and to removed leave_stopped field.
13120 (resume_ptr): Delete.
13121 (struct thread_resume_array): New.
13122 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13123 resume interface change.
13124 (linux_continue_one_thread, linux_queue_one_thread)
13125 (resume_status_pending_p): Check if the resume field is NULL
13126 instead of checking the leave_stopped member.
13127 (linux_resume): Adjust to the target resume interface change.
13128 * spu-low.c (spu_resume): Adjust to the target resume interface
13130 * win32-low.c (win32_detach, win32_resume): Ditto.
13132 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13134 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13136 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13138 (linux_continue_one_thread): Only preserve the stepping flag if
13139 there's a pending breakpoint.
13141 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13143 * server.c (main): After the inferior having exited, call
13144 remote_close before exiting gdbserver.
13146 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13148 Fix size of FPSCR in Power 7 processors.
13149 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13150 (PPC_FEATURE_HAS_DFP): New #define.
13151 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13154 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13156 * server.c (handle_query) Whitespace and formatting.
13158 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13160 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13161 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13162 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13163 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13164 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13165 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13166 Makefile.in, configure.ac: Fix whitespace throughout.
13167 * configure: Regenerate.
13169 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13171 * inferiors.c (find_inferior): Make it safe for the callback
13172 function to delete the currently iterated inferior.
13174 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13176 * Makefile.in (linuw_low_h): Move higher.
13177 (thread-db.o): Depend on $(linux_low_h).
13179 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13181 Rename "process" to "lwp" throughout.
13183 * linux-low.c (all_processes): Rename to...
13184 (all_lwps): ... this.
13185 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13186 (add_process): Rename to ...
13187 (add_lwp): ... this. Adjust.
13188 (linux_create_inferior): Adjust.
13189 (linux_attach_lwp): Adjust.
13190 (linux_attach): Adjust.
13191 (linux_kill_one_process): Rename to ...
13192 (linux_kill_one_lwp): ... this. Adjust.
13193 (linux_kill): Adjust.
13194 (linux_detach_one_process): Rename to ...
13195 (linux_detach_one_lwp): ... this. Adjust.
13196 (linux_detach): Adjust.
13197 (check_removed_breakpoint): Adjust.
13198 (status_pending_p): Adjust.
13199 (linux_wait_for_process): Rename to ...
13200 (linux_wait_for_lwp): ... this. Adjust.
13201 (linux_wait_for_event): Adjust.
13202 (send_sigstop): Adjust.
13203 (wait_for_sigstop): Adjust.
13204 (stop_all_processes): Rename to ...
13205 (stop_all_lwps): ... this.
13206 (linux_resume_one_process): Rename to ...
13207 (linux_resume_one_lwp): ... this. Adjust.
13208 (linux_set_resume_request, linux_continue_one_thread)
13209 (linux_queue_one_thread, resume_status_pending_p)
13210 (usr_store_inferior_registers, regsets_store_inferior_registers)
13211 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13213 * linux-low.h (get_process): Rename to ...
13214 (get_lwp): ... this. Adjust.
13215 (get_thread_process): Rename to ...
13216 (get_thread_lwp): ... this. Adjust.
13217 (get_process_thread): Rename to ...
13218 (get_lwp_thread): ... this. Adjust.
13219 (struct process_info): Rename to ...
13220 (struct lwp_info): ... this.
13221 (all_processes): Rename to ...
13222 (all_lwps): ... this.
13223 * proc-service.c (ps_lgetregs): Adjust.
13224 * thread-db.c (thread_db_create_event, find_one_thread)
13225 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13227 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13229 * server.c (handle_query): Handle "qAttached".
13231 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13233 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13234 GPLv3, update license URL.
13236 2009-03-01 Doug Evans <dje@google.com>
13238 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13239 (server_h): Add gdb_signals.h.
13240 (signals.o): Update.
13241 * server.h (target_signal_from_host,target_signal_to_host_p)
13242 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13244 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13246 * remote-utils.c (getpkt): Also generate remote-debug
13247 information if noack_mode is set.
13249 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13251 * server.c (handle_query): Report qXfer:siginfo:read and
13252 qXfer:siginfo:write as supported and handle them.
13253 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13254 * linux-low.c (linux_xfer_siginfo): New.
13255 (linux_target_ops): Set it.
13257 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13259 * server.c (gdbserver_usage): Mention --remote-debug.
13260 (main): Accept '--remote-debug' switch.
13262 2009-01-18 Doug Evans <dje@google.com>
13264 * regcache.c (new_register_cache): No need to check result of xcalloc.
13265 * server.c (handle_search_memory): Back out calls to xmalloc,
13266 result is checked and error is returned to user upon failure.
13267 (handle_query): Ditto. Add more checks for result of malloc.
13268 (handle_v_cont): Check result of malloc, report error back to
13270 (handle_v_run): Ditto. Call freeargv.
13271 * server.h (freeargv): Declare.
13272 * utils.c (freeargv): New fn.
13274 2009-01-15 Doug Evans <dje@google.com>
13276 * gdbreplay.c (perror_with_name): Make arg const char *.
13277 * server.h (target_signal_to_name): Make return type const char *.
13278 * thread-db.c (thread_db_err_str): Make return type const char *.
13279 * utils.c (perror_with_name): Make arg const char *.
13281 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13283 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13284 when handling a EXIT_PROCESS_DEBUG_EVENT.
13286 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13288 * gdbreplay.c (gdbreplay_version): Update copyright year.
13289 * server.c (gdbserver_version): Likewise.
13291 2009-01-05 Doug Evans <dje@google.com>
13293 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13294 (handle_extended_wait): Improve comment.
13296 2008-12-13 Doug Evans <dje@google.com>
13298 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13299 * server.h (ATTR_MALLOC): New macro.
13300 (xmalloc,xcalloc,xstrdup): Declare.
13301 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13302 * inferiors.c: Ditto.
13303 * linux-low.c: Ditto.
13304 * mem-break.c: Ditto.
13305 * regcache.c: Ditto.
13306 * remote-utils.c: Ditto.
13309 * win32-low.c: Ditto.
13311 2008-12-12 Doug Evans <dje@google.com>
13313 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13314 in debugging printf.
13316 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13318 2008-12-09 Doug Evans <dje@google.com>
13320 * linux-low.h (struct process_info): Delete member tid, unused.
13321 * thread-db.c (find_one_thread): Update.
13322 (maybe_attach_thread): Update.
13324 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13326 * target.h (struct target_ops): Add qxfer_osdata member.
13327 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13329 (linux_qxfer_osdata): New functions.
13330 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13332 * server.c (handle_query): Handle "qXfer:osdata:read:".
13333 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13334 (buffer_xml_printf): New functions.
13335 * server.h (struct buffer): New.
13336 (buffer_grow_str, buffer_grow_str0): New macros.
13337 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13338 (buffer_xml_printf): Declare.
13340 2008-11-24 Doug Evans <dje@google.com>
13342 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13344 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13346 * server.c (handle_v_run): Always use the supplied argument list.
13348 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13350 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13351 (xtensa_regmap_table): Add entry for scompare1.
13353 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13355 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13356 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13357 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13358 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13359 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13360 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13361 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13362 XML target descriptions.
13363 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13364 when inferior is running on an ISA 2.05 or later processor. Add
13365 special case to return offset for full 64-bit slot of FPSCR when
13368 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13370 * Makefile.in (SFILES, clean): Added sparc64 files.
13371 (reg-sparc64.o, reg-sparc64.c): New.
13372 * configure.srv (sparc*-*-linux*): New configuration.
13373 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13374 syscall arguments for SPARC.
13375 (regsets_store_inferior_registers): Likewise.
13376 * linux-sparc-low.c: New file.
13378 2008-10-21 Doug Evans <dje@google.com>
13380 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13381 (READLINE_DIR,READLINE_DEP): Delete.
13382 (INTERNAL_CFLAGS): Update.
13383 (LINTFLAGS): Update.
13385 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13387 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13388 whole argv from the last run, not just argv[0].
13390 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13392 * regcache.c (new_register_cache): Return NULL if the register
13393 cache size isn't known yet.
13394 (free_register_cache): Avoid dereferencing a NULL regcache.
13396 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13398 * configure.srv: Merge MIPS and MIPS64.
13400 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13402 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13404 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13406 * Makefile.in: Add required vsx dependencies.
13408 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13409 Declare init_registers_powerpc_vsx32l.
13410 Declare init_registers_powerpc_vsx64l.
13411 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13412 (ppc_arch_setup): Check for VSX in hwcap.
13413 (ppc_fill_vsxregset): New function.
13414 (ppc_store_vsxregset): New function.
13415 Add new VSX entry in regset_info target_regsets.
13417 * configure.srv: Add new VSX dependencies.
13419 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13421 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13422 (remote_open): Set or clear transport_is_reliable.
13423 (putpkt_binary): Don't expect acks in noack mode.
13424 (getpkt): Don't send ack/nac in noack mode.
13425 * server.c (handle_general_set): Handle QStartNoAckMode.
13426 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13428 (main): Reset noack_mode on every connection.
13429 * server.h (noack_mode): Declare.
13431 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13433 * Makefile.in (GDBREPLAY_OBS): New variable.
13434 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13436 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13437 Daniel Jacobowitz <dan@codesourcery.com>
13439 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13440 (usr_store_inferior_registers): Likewise.
13441 (regsets_store_inferior_registers): Likewise.
13443 2008-07-31 Rolf Jansen <rj@surtec.com>
13444 Pedro Alves <pedro@codesourcery.com>
13446 * configure.ac: Check for memmem declaration.
13447 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13448 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13449 (disable_packet_qfThreadInfo): Unconditionally compile.
13450 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13451 * configure, config.in: Regenerate.
13453 2008-07-28 Doug Kwan <dougkwan@google.com>
13455 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13456 (linux_write_memory): Remove declaration of errno.
13458 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13460 * linux-low.c (handle_extended_wait): Do not use "status"
13461 variable uninitialized.
13463 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13465 * server.c (handle_v_attach): Inhibit reporting dll changes.
13467 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13469 * remote-utils.c (prepare_resume_reply): If requested, don't
13470 output "thread:TID" in the T stop reply.
13472 * server.c (disable_packet_vCont, disable_packet_Tthread)
13473 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13474 (handle_query): If requested, disable support for qC, qfThreadInfo
13476 (handle_v_requests): If requested, disable support for vCont.
13477 (gdbserver_show_disableable): New.
13478 (main): Handle --disable-packet and --disable-packet=LIST.
13480 * server.h (disable_packet_vCont, disable_packet_Tthread)
13481 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13483 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13485 * server.c (gdbserver_usage): Mention --version.
13487 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13489 * Makefile.in (gdbreplay.o): New rule.
13491 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13493 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13494 message, not gdbserver.
13496 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13497 Nathan Sidwell <nathan@codesourcery.com>
13498 Joseph Myers <joseph@codesourcery.com>
13500 * acinclude.m4: Include ../../config/acx.m4.
13501 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13502 * configure, config.in: Regenerate.
13503 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13504 * server.c (gdbserver_version): Print PKGVERSION.
13505 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13506 (main): Adjust gdbserver_usage calls.
13507 * gdbreplay.c (version, host_name): Add declarations.
13508 (gdbreplay_version, gdbreplay_usage): New.
13509 (main): Accept --version and --help options.
13511 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13513 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13514 (arm_breakpoint_at): Handle Thumb.
13515 (the_low_target): Add comment.
13517 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13519 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13521 2008-05-09 Doug Evans <dje@google.com>
13523 * server.h (decode_search_memory_packet): Declare.
13524 * remote-utils.c (decode_search_memory_packet): New fn.
13525 * server.c (handle_search_memory_1): New fn.
13526 (handle_search_memory): New fn.
13527 (handle_query): Process qSearch:memory packets.
13529 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13531 * regcache.c (registers_length): Remove.
13532 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13533 full register packet.
13534 * regcache.h (registers_length): Remove prototype.
13535 * server.h (PBUFSIZ): Define to 16384.
13537 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13539 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13540 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13541 powerpc-64l.o, and powerpc-altivec64l.o.
13542 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13543 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13544 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13545 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13546 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13549 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13550 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13551 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13552 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13553 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13554 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13555 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13556 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13557 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13558 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13561 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13562 (init_registers_powerpc_32l): ... this new prototype.
13563 (init_registers_powerpc_32): Remove, replace by ...
13564 (init_registers_powerpc_altivec32l): ... this new prototype.
13565 (init_registers_powerpc_e500): Remove, replace by ...
13566 (init_registers_powerpc_e500l): ... this new prototype.
13567 (init_registers_ppc64): Remove, replace by ...
13568 (init_registers_powerpc_64l): ... this new prototype.
13569 (init_registers_powerpc_64): Remove, replace by ...
13570 (init_registers_powerpc_altivec64l): ... this new prototype.
13571 (ppc_num_regs): Set to 73.
13572 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13573 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13574 (ppc_cannot_store_register): Handle orig_r3 and trap.
13575 (ppc_arch_setup): Update init_registers_... calls.
13576 (ppc_fill_gregset): Handle orig_r3 and trap.
13578 * inferiors.c (clear_inferiors): Reset current_inferior.
13580 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13582 * acinclude.m4: Add override.m4.
13583 * configure: Regenerate.
13585 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13587 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13588 initial call to init_register_ppc64.
13590 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13592 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13593 single powerpc*-*-linux* case.
13594 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13596 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13598 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13599 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13601 * linux-ppc-low.c: Include <elf.h>.
13602 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13603 (ppc_hwcap): New global variable.
13604 (ppc_regmap): Remove __SPE__ #ifdef sections.
13605 (ppc_regmap_e500): New global variable.
13606 (ppc_cannot_store_register): Update __SPE__ special case.
13607 (ppc_get_hwcap): New function.
13608 (ppc_arch_setup): Use it to determine whether inferior supports
13609 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13610 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13611 Do not access registers if target does not support AltiVec.
13612 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13613 Do not access registers if target does not support SPE.
13614 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13616 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13618 * linux-low.c (disabled_regsets, num_regsets): New.
13619 (use_regsets_p): Delete.
13620 (linux_wait_for_process): Clear disabled_regsets.
13621 (regsets_fetch_inferior_registers): Check and set it.
13622 (regsets_store_inferior_registers): Likewise.
13623 (linux_fetch_registers, linux_store_registers): Do not use
13625 (initialize_low): Allocate disabled_regsets.
13627 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13629 * Makefile.in (LIBOBJS): New.
13630 (OBS): Use LIBOBJS.
13631 (memmem.o): New rule.
13632 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13633 * configure: Regenerated.
13635 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13637 * server.c (handle_query): Never return "unsupported" for
13638 qXfer:features:read queries.
13640 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13642 * server.c (get_features_xml): Fix inverted condition.
13643 (handle_query): Always support qXfer:feature:read.
13645 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13647 * server.c (wrapper_argv): New.
13648 (start_inferior): Handle wrapper_argv. If set, expect an extra
13650 (gdbserver_usage): Document --wrapper.
13651 (main): Parse --wrapper.
13653 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13655 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13656 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13657 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13658 (ppc_set_pc): Likewise.
13659 (ppc_arch_setup): New function.
13660 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13661 of collect_register.
13662 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13664 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13666 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13667 instead of linux-ppc64-low.o.
13668 * linux-ppc64-low.c: Remove file.
13669 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13670 (linux-ppc64-low.o): Remove rule.
13672 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13673 (init_registers_powerpc_64): Likewise.
13674 (ppc_regmap): Conditionally define depending on __powerpc64__.
13675 (ppc_cannot_store_register): Do not special-case "fpscr" when
13676 compiled on __powerpc64__.
13677 (ppc_collect_ptrace_register): New function.
13678 (ppc_supply_ptrace_register): New function.
13679 (ppc_breakpoint): Change type to "unsigned int".
13680 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13681 (the_low_target): Conditionally provide initializers for the
13682 arch_setup member depending on __powerpc64__. Install
13683 collect_ptrace_register and supply_ptrace_register members.
13685 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13687 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13688 * server.c (gdbserver_xmltarget): Define.
13689 (get_features_xml): Use it to replace "target.xml" and arch_string.
13691 * configure.srv: Remove srv_xmltarget. Add XML files that were
13692 mentioned there to srv_xmlfiles instead. Remove conditional tests
13693 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13694 srv_xmlfiles and srv_regobj to include all possible choices.
13695 * configure.ac (srv_xmltarget): Remove.
13696 (srv_xmlfiles): Do not add "target.xml".
13697 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13698 checks for supplementary target information.
13699 * configure: Regenerate.
13700 * Makefile.in (XML_TARGET): Remove.
13701 (target.xml): Remove rule.
13702 (clean): Do not clean up target.xml.
13703 (.PRECIOUS): Do not mention target.xml.
13705 * target.h (struct target_ops): Remove arch_string member.
13706 * linux-low.c (linux_arch_string): Remove.
13707 (linux_target_ops): Remove arch_string initializer.
13708 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13709 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13710 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13711 * spu-low.c (spu_arch_string): Remove.
13712 (spu_target_ops): Remove arch_string initializer.
13713 * win32-low.c (win32_arch_string): Remove.
13714 (win32_target_ops): Remove arch_string initializer.
13715 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13716 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13717 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13719 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13721 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13722 by collect_ptrace_register and supply_ptrace_register hooks.
13723 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13724 instead of checking for the_low_target.left_pad_xfer.
13725 (usr_store_inferior_registers): Use collect_ptrace_register callback
13726 instead of checking for the_low_target.left_pad_xfer.
13728 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13729 (s390_supply_ptrace_register): Likewise.
13730 (s390_fill_gregset): Call s390_collect_ptrace_register.
13731 (the_low_target): Update.
13733 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13734 (ppc_supply_ptrace_register): Likewise.
13735 (the_low_target): Update.
13737 * linux-i386-low.c (the_low_target): Update.
13738 * linux-x86-64-low.c (the_low_target): Update.
13740 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13742 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13743 reg-s390.o and reg-s390x.o.
13745 * linux-low.c (new_inferior): New global variable.
13746 (linux_create_inferior, linux_attach): Set it.
13747 (linux_wait_for_process): Call the_low_target.arch_setup after the
13748 target has stopped for the first time.
13749 (initialize_low): Do not call the_low_target.arch_setup.
13751 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13752 (s390_set_pc): Likewise.
13753 (s390_arch_setup): New function.
13754 (the_low_target): Use s390_arch_setup as arch_setup routine.
13756 * regcache.c (realloc_register_cache): New function.
13757 (set_register_cache): Call it for each existing regcache.
13759 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13761 * server.h (init_registers): Remove prototype.
13763 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13764 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13765 instead of init_registers ().
13766 * linux-arm-low.c (init_registers_arm): Add prototype.
13767 (init_registers_arm_with_iwmmxt): Likewise.
13768 (the_low_target): Add initializer for arch_setup field.
13769 * linux-cris-low.c (init_registers_cris): Add prototype.
13770 (the_low_target): Add initializer for arch_setup field.
13771 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13772 (the_low_target): Add initializer for arch_setup field.
13773 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13774 (the_low_target): Add initializer for arch_setup field.
13775 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13776 (the_low_target): Add initializer for arch_setup field.
13777 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13778 (the_low_target): Add initializer for arch_setup field.
13779 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13780 (the_low_target): Add initializer for arch_setup field.
13781 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13782 (init_registers_mips64_linux): Likewise.
13783 (the_low_target): Add initializer for arch_setup field.
13784 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13785 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13786 (the_low_target): Add initializer for arch_setup field.
13787 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13788 (init_registers_powerpc_64): Likewise.
13789 (the_low_target): Add initializer for arch_setup field.
13790 * linux-s390-low.c (init_registers_s390): Add prototype.
13791 (init_registers_s390x): Likewise.
13792 (the_low_target): Add initializer for arch_setup field.
13793 * linux-sh-low.c (init_registers_sh): Add prototype.
13794 (the_low_target): Add initializer for arch_setup field.
13795 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13796 (the_low_target): Add initializer for arch_setup field.
13797 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13798 (the_low_target): Add initializer for arch_setup field.
13800 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13801 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13802 instead of init_registers ().
13803 * win32-arm-low.c (init_registers_arm): Add prototype.
13804 (the_low_target): Add initializer for arch_setup field.
13805 * win32-i386-low.c (init_registers_i386): Add prototype.
13806 (the_low_target): Add initializer for arch_setup field.
13808 * spu-low.c (init_registers_spu): Add prototype.
13809 (initialize_low): Call initialie_registers_spu () instead of
13810 initialize_registers ().
13812 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13814 * server.c (handle_v_requests): When handling the vRun and vAttach
13815 packets, if already debugging a process, don't kill it. Return an
13818 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13820 * server.c (handle_query): Correct length check.
13822 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13824 * win32-low.c (do_initial_child_stuff): Add process handle
13825 parameter. Set current_process_handle and current_process_id from the
13826 parameters. Clear globals.
13827 (win32_create_inferior): Don't set current_process_handle and
13828 current_process_id here. Instead pass them on the call to
13829 do_initial_child_stuff.
13830 (win32_attach): Likewise.
13831 (win32_clear_inferiors): New.
13832 (win32_kill): Don't close the current process handle or the
13833 current thread handle here. Instead call win32_clear_inferiors.
13834 (win32_detach): Don't open a new handle to the process. Call
13835 win32_clear_inferiors.
13836 (win32_join): Don't rely on current_process_handle; open a new
13837 handle using the process id.
13838 (win32_wait): Call win32_clear_inferiors when the inferior process
13841 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13843 * server.c (monitor_show_help): Add "exit".
13845 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13847 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13848 (clean): Add reg-xtensa.c.
13849 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13850 * configure.srv (xtensa*-*-linux*) New target.
13851 * linux-xtensa-low.c: New.
13852 * xtensa-xtregs.c: New.
13854 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13856 * hostio.c: Don't include errno.h.
13857 (errno_to_fileio_errno): Move to hostio-errno.
13858 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13859 error number outputting to the target->hostio_last_error callback.
13860 (hostio_packet_error): Use FILEIO_EINVAL directly.
13861 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13862 calls to hostio_error.
13863 * hostio-errno.c: New.
13864 * server.h (hostio_last_error_from_errno): Declare.
13865 * target.h (target_ops): Add hostio_last_error member.
13866 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13867 as hostio_last_error handler.
13868 * spu-low.c (spu_target_ops): Likewise.
13869 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13870 (wince_hostio_last_error): New functions.
13871 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13872 as hostio_last_error handler.
13873 (win32_target_ops) [!_WIN32_WCE]: Register
13874 hostio_last_error_from_errno as hostio_last_error handler.
13875 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13876 (hostio-errno.o): New rule.
13877 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13878 * configure.srv (srv_hostio_err_objs): New variable. Default to
13880 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13881 * configure: Regenerate.
13883 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13885 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13886 (linux_kill, linux_detach): Clean up the process list.
13887 * remote-utils.c (remote_open): Improve port number parsing.
13888 (putpkt_binary, input_interrupt): Only send interrupts if the target
13890 * server.c (extended_protocol): Make static.
13891 (attached): Define earlier.
13892 (exit_requested, response_needed, program_argv): New variables.
13893 (target_running): New.
13894 (start_inferior): Clear attached here.
13895 (attach_inferior): Set attached here.
13896 (require_running): Define.
13897 (handle_query): Use require_running and target_running. Implement
13899 (handle_v_attach, handle_v_run): New.
13900 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13901 (gdbserver_usage): Update.
13902 (main): Redo argument parsing. Handle --debug and --multi. Handle
13903 --attach along with other options or after the port. Save
13904 program_argv. Support no initial program. Resynchronize
13905 communication with GDB after an error. Handle "monitor exit".
13906 Use require_running and target_running. Always allow the extended
13907 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13908 restart in extended mode.
13909 * README: Refer to the GDB manual. Update --attach usage.
13911 2007-12-20 Andreas Schwab <schwab@suse.de>
13913 * linux-low.c (STACK_SIZE): Define.
13914 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13915 (linux_test_for_tracefork): Likewise.
13917 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13919 * linux-low.c (linux_wait_for_event): Update messages. Do not
13920 reinsert auto-delete breakpoints.
13921 * mem-break.c (struct breakpoint): Change return type of handler to
13923 (set_breakpoint_at): Update handler type.
13924 (reinsert_breakpoint_handler): Return 1 instead of calling
13926 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13928 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13929 * mem-break.h (set_breakpoint_at): Update handler type.
13930 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13931 * win32-low.c (auto_delete_breakpoint): New.
13932 (get_child_debug_event): Use it.
13934 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13936 * configure.ac: Check for pread and pwrite.
13937 * hostio.c (handle_pread): Fall back to lseek and read.
13938 (handle_pwrite): Fall back to lseek and write.
13939 * config.in, configure: Regenerated.
13941 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13943 * server.c (myresume): Add own_buf argument.
13944 (main): Update calls.
13946 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13948 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13949 * remote-utils.c (remote_open): Do not call disable_async_io.
13950 (block_async_io): Delete.
13951 (unblock_async_io): Make static.
13952 (initialize_async_io): New.
13953 * server.c (handle_v_cont): Handle async I/O here.
13954 (myresume): Likewise. Move other common resume tasks here...
13955 (main): ... from here. Call initialize_async_io. Disable async
13956 I/O before the main loop.
13957 * server.h (initialize_async_io): Declare.
13958 (block_async_io, unblock_async_io): Delete prototypes.
13959 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13961 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13963 * remote-utils.c (readchar): Allow binary data in received messages.
13965 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13967 * win32-low.c (attaching): New global.
13968 (win32_create_inferior): Clear the `attaching' global.
13969 (win32_attach): Set the `attaching' global.
13970 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13971 attaching. Only set a breakpoint at the entry point if not
13974 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13976 * server.c (main): Don't report dll events on the initial
13977 connection on attaches.
13979 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13981 * server.c (main): Relax numerical bases supported for the pid of
13982 the --attach command line argument.
13984 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13986 * win32-low.c (win32_attach): Call OpenProcess before
13987 DebugActiveProcess, not after. Add last error output to error
13990 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13992 * win32-low.c (win32_get_thread_context)
13993 (win32_set_thread_context): New functions.
13994 (thread_rec): Use win32_get_thread_context.
13995 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13996 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13999 2007-12-03 Leo Zayas
14000 Pedro Alves <pedro_alves@portugalmail.pt>
14002 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14004 (child_add_thread): Minor cleanup.
14005 (child_continue): Resume artificially suspended threads before
14006 calling ContinueDebugEvent.
14007 (suspend_one_thread): New.
14008 (fake_breakpoint_event): New.
14009 (get_child_debug_event): Change return type to int. Check here if
14010 gdb sent an interrupt request. If a soft interrupt was requested,
14011 fake a breakpoint event. Return 0 if there is no event to handle,
14013 (win32_wait): Don't check here if gdb sent an interrupt request.
14014 Ensure there is a valid event to handle.
14015 (win32_request_interrupt): Add soft interruption method as last
14018 2007-12-03 Leo Zayas
14019 Pedro Alves <pedro_alves@portugalmail.pt>
14021 * win32-low.h (win32_thread_info): Add descriptions to the
14022 structure members. Replace `suspend_count' counter by a
14024 * win32-low.c (thread_rec): Update condition of when to get the
14025 context from the inferior. Rely on ContextFlags being set if it
14026 has already been retrieved. Only suspend the inferior thread if
14027 we haven't already. Warn if that fails.
14028 (continue_one_thread): s/suspend_count/suspended/. Only call
14029 ResumeThread once. Warn if that fails.
14031 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14033 * win32-low.c (win32_wait): Don't read from the inferior when it
14034 has already exited.
14036 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14038 * Makefile.in (win32_low_h): New variable.
14039 (win32-low.o): Add dependency on $(win32_low_h).
14040 (win32-arm-low.o, win32-i386-low.o): New rules.
14042 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14044 * hostio.c: Correct copyright year.
14046 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14048 * Makefile.in (OBS): Add hostio.o.
14049 (hostio.o): New rule.
14050 * server.h (handle_vFile): Declare.
14051 * hostio.c: New file.
14052 * server.c (handle_v_requests): Take packet_len and new_packet_len
14053 for binary packets. Call handle_vFile.
14054 (main): Update call to handle_v_requests.
14056 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14058 * linux-low.c: Include <sched.h>.
14060 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14062 * linux-low.c (linux_tracefork_grandchild): New.
14063 (linux_tracefork_child): Use clone.
14064 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14066 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14068 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14070 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14072 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14074 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14076 * inferiors.c (change_inferior_id): Delete.
14077 (add_pid_to_list, pull_pid_from_list): New.
14078 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14079 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14080 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14081 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14082 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14083 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14084 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14085 (using_threads): Always set to 1.
14086 (handle_extended_wait): New.
14087 (add_process): Do not set TID.
14088 (linux_create_inferior): Set must_set_ptrace_flags.
14089 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14090 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14091 (linux_thread_alive): Rename TID argument to LWPID.
14092 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14093 (linux_wait_for_event): Do not use TID or check using_threads. Update
14094 call to dead_thread_notify. Call handle_extended_wait.
14095 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14096 (send_sigstop): Delete sigstop_sent.
14097 (wait_for_sigstop): Avoid TID.
14098 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14099 (linux_test_for_tracefork): New.
14100 (linux_lookup_signals): Use thread_db_active and
14101 linux_supports_tracefork_flag.
14102 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14103 * linux-low.h (get_process_thread): Avoid TID.
14104 (struct process_ifo): Move thread_known and tid to the end. Remove
14106 (linux_attach_lwp, thread_db_init): Update prototypes.
14107 * server.h (change_inferior_id): Delete prototype.
14108 (add_pid_to_list, pull_pid_from_list): New prototypes.
14109 * thread-db.c (thread_db_use_events): New.
14110 (find_first_thread): Rename to...
14111 (find_one_thread): ...this. Update callers and messages. Do not
14112 call fatal. Check thread_db_use_events. Do not call
14113 change_inferior_id or new_thread_notify.
14114 (maybe_attach_thread): Update. Do not call new_thread_notify.
14115 (thread_db_init): Set thread_db_use_events. Check use_events.
14116 * utils.c (fatal, warning): Correct message prefix.
14118 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14120 * Makefile.in (clean): Remove new files.
14121 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14122 (powerpc-64.o, powerpc-64.c): New rules.
14123 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14124 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14126 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14128 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14129 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14130 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14131 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14132 (target_regsets): Add AltiVec and SPE register sets.
14133 * configure.ac: Check for AltiVec and SPE.
14134 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14135 (ppc_fill_vrregset, ppc_store_vrregset): New.
14136 (target_regsets): Add AltiVec register set.
14137 * configure: Regenerated.
14139 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14141 * linux-low.c (O_LARGEFILE): Define.
14142 (linux_read_memory): Use /proc/PID/mem.
14143 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14144 * configure, config.in: Regenerated.
14146 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14148 * linux-low.c (linux_wait_for_event): Do not pass signals while
14151 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14153 * win32-low.c (create_process): New.
14154 (win32_create_inferior): Use create_process instead of
14155 CreateProcess. If create_process failed retry appending an ".exe"
14156 suffix. Store the GetLastError result immediatelly after
14157 create_process calls and use it on the call to error.
14159 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14161 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14163 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14165 * configure.ac: Switch license to GPLv3.
14167 2007-08-01 Michael Snyder <msnyder@access-company.com>
14169 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14171 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14173 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14175 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14176 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14177 CloseToolhelp32Snapshot.
14178 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14179 CloseToolhelp32Snapshot.
14181 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14183 * server.c (main): Check for inferior exit before main loop.
14185 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14187 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14188 instead of on tmp_desc.
14190 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14191 Daniel Jacobowitz <dan@codesourcery.com>
14193 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14194 (add_thread): Minor cleanups.
14195 (clear_inferiors): Move lower in the file. Clear the DLL
14197 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14198 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14199 (xml_escape_text): New.
14200 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14202 (handle_v_cont): Report errors.
14203 (gdbserver_version): Update.
14204 (main): Correct size of own_buf. Do not report initial DLL events.
14205 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14206 (unloaded_dll, xml_escape_text): New.
14207 * win32-low.c (enum target_waitkind): Update comments.
14208 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14209 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14210 (win32_EnumProcessModules, win32_GetModuleInformation)
14211 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14212 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14213 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14214 (win32_Module32First, win32_Module32Next, load_toolhelp)
14215 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14216 (get_child_debug_event): Handle DLL events.
14217 (win32_wait): Likewise.
14219 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14221 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14222 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14224 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14226 * win32-low.c (handle_output_debug_string): Ignore event if not
14229 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14231 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14233 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14235 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14237 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14239 * inferiors.c (change_inferior_id): Add comment.
14240 * linux-low.c (check_removed_breakpoint): Add an early
14241 prototype. Improve debug output.
14242 (linux_attach): Doc update.
14243 (linux_detach_one_process, linux_detach): Clean up before releasing
14245 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14246 * linux-low.h (struct process_info): Doc improvement.
14247 * mem-break.c (delete_all_breakpoints): New.
14248 * mem-break.h (delete_all_breakpoints): New prototype.
14249 * thread-db.c (find_first_thread): New.
14250 (thread_db_create_event): Call it instead of
14251 thread_db_find_new_threads. Clean up unused variables.
14252 (maybe_attach_thread): Remove first thread handling.
14253 (thread_db_find_new_threads): Use find_first_thread.
14254 (thread_db_get_tls_address): Likewise.
14256 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14258 * thread-db.c (thread_db_find_new_threads): Add prototype.
14259 (thread_db_create_event): Check for the main thread before adding
14261 (maybe_attach_thread): Only enable event reporting if TID == 0.
14262 (thread_db_get_tls_address): Check for new threads.
14264 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14266 * linux-low.c (linux_create_inferior): Try execv before execvp.
14267 * spu-low.c (spu_create_inferior): Likewise.
14269 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14271 * linux-low.c (linux_create_inferior): Change execv to execvp.
14272 * spu-low.c (spu_create_inferior): Likewies.
14274 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14276 * Makefile.in (clean): Clean new files instead of deleted ones.
14277 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14278 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14280 * configure.srv: Specify XML files and new regformats for MIPS and
14282 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14283 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14284 an entry for the restart register.
14285 (mips_cannot_fetch_register, mips_cannot_store_register)
14286 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14287 register names to match the XML descriptions.
14288 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14289 restart register instead of $0.
14291 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14292 Markus Deuling <deuling@de.ibm.com>
14294 * remote-utils.c (decode_xfer_write): New function.
14295 * server.h (decode_xfer_write): Add prototype.
14296 * server.c (handle_query): Add PACKET_LEN argument. Support
14297 qXfer:spu:read and qXfer:spu:write packets.
14298 (main): Pass packet_len to handle_query.
14299 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14300 * target.h (target_ops): Add qxfer_spu.
14302 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14304 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14305 accessing non-seekable spufs files.
14307 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14309 * server.c (handle_query): Add reply for qC packet.
14311 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14312 Leo Zayas <lerele@champenstudios@com>
14314 * server.h (check_remote_input_interrupt_request): New function.
14315 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14316 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14317 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14318 (check_remote_input_interrupt_request): New function.
14319 * server.h (check_remote_input_interrupt_request): Declare.
14320 * win32-low.c (winapi_DebugBreakProcess,
14321 winapi_GenerateConsoleCtrlEvent): New typedefs.
14322 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14324 (win32_wait): Check for remote interrupt request
14325 with check_remote_input_interrupt_request.
14326 (win32_request_interrupt): New function.
14327 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14329 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14331 * win32-low.c (debug_registers_changed,
14332 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14333 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14334 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14335 (thread_rec): Get context using the low target.
14336 (child_add_thread): Call thread_added on the low target,
14337 which does the same thing.
14339 (do_initial_child_stuff): Remove debug registers references.
14340 Set context using the low target. Resume threads after
14341 setting the contexts.
14342 (child_continue): Remove dead variable. Remove debug
14343 registers references.
14344 (child_fetch_inferior_registers): Go through the low target.
14345 (do_child_store_inferior_registers): Remove.
14346 (child_store_inferior_registers): Go through the low target.
14347 (win32_resume): Remove debug registers references.
14348 Set context using the low target.
14349 (handle_exception): Change return type to void. Don't record
14350 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14351 first chance exception.
14352 (get_child_debug_event): Change return type to void. Remove
14353 goto loop. Always return after waiting for debug event.
14354 (win32_wait): Convert to switch statement. Handle spurious
14357 * win32-i386-low.c (debug_registers_changed,
14358 debug_registers_used): New.
14359 (initial_stuff): Rename to ...
14360 (i386_initial_stuff): ... this. Clear debug registers
14362 (store_debug_registers): Delete.
14363 (i386_get_thread_context): New.
14364 (load_debug_registers): Delete.
14365 (i386_set_thread_context): New.
14366 (i386_thread_added): New.
14367 (single_step): Rename to ...
14368 (i386_single_step): ... this.
14369 (do_fetch_inferior_registers): Rename to ...
14370 (i386_fetch_inferior_register): ... this.
14371 (i386_store_inferior_register): New.
14372 (the_low_target): Adapt to new interface.
14374 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14375 (arm_get_thread_context): New.
14376 (arm_set_thread_context): New.
14378 (do_fetch_inferior_registers): Rename to ...
14379 (arm_fetch_inferior_register): ... this.
14380 (arm_store_inferior_register): New.
14381 (arm_wince_breakpoint): Reimplement as unsigned long.
14382 (arm_wince_breakpoint_len): Define.
14383 (the_low_target): Adapt to new interface.
14385 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14386 load_debug_registers. Add get_thread_context, set_thread_context,
14387 thread_added and store_inferior_register. Rename
14388 fetch_inferior_registers to fetch_inferior_register.
14389 (regptr): Remove declaration.
14391 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14393 * linux-low.c (linux_detach): Change return type to int. Return 0.
14394 * spu-low.c (spu_detach): Likewise.
14396 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14398 * target.h (target_ops): Change return type of detach to int.
14400 (join_inferior): New.
14401 * server.c (main): Don't skip detach support on mingw32.
14402 If the inferior doesn't support detaching return error.
14403 Call join_inferior instead of using waitpid.
14404 * linux-low.c (linux_join): New.
14405 (linux_target_op): Add linux_join.
14406 * spu-low.c (spu_join): New.
14407 (spu_target_ops): Add spu_join.
14408 * win32-low.c (win32_detach): Adapt to new interface.
14409 Reopen current_process_handle before detaching. Issue a child
14410 resume before detaching.
14412 (win32_target_op): Add win32_join.
14414 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14416 * win32-low.c (win32-attach): Fix return value.
14417 * target.h (target_ops): Describe ATTACH return values.
14419 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14421 * win32-low.c (GETPROCADDRESS): Define.
14422 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14423 (winapi_DebugSetProcessKillOnExit): Likewise.
14424 (win32_create_inferior): Force usage of ansi CreateProcessA.
14425 (win32_attach): Use GETPROCADDRESS.
14426 (win32_detach): Likewise.
14428 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14430 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14432 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14434 * win32-low.c: Commit leftover changes from 2007-03-29.
14436 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14438 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14439 fields short instead of int. Add explicit padding.
14440 (i387_cache_to_fsave): Remove unnecessary casts.
14441 (i387_fsave_to_cache): Doc fix.
14442 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14444 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14446 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14447 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14449 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14451 * configure.srv (arm*-*-mingw32ce*): Move near the other
14454 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14456 * configure.ac: Add errno checking.
14457 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14458 sys/file.h and malloc.h.
14459 (AC_CHECK_DECLS): Add perror.
14460 (srv_mingwce): Handle.
14461 * configure.srv (i[34567]86-*-cygwin*): Add
14462 win32-i386-low.o to srv_tgtobj.
14463 (i[34567]86-*-mingw*): Likewise.
14464 (arm*-*-mingw32ce*): Add case.
14465 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14466 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14467 [__MINGW32CE__] (strerror): New function.
14468 [__MINGW32CE__] (errno): Define to GetLastError.
14469 [__MINGW32CE__] (COUNTOF): New macro.
14470 (remote_open): Remove extra close call.
14471 * mem-break.c (delete_breakpoint_at): New function.
14472 * mem-break.h (delete_breakpoint_at): Declare.
14473 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14474 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14475 [USE_WIN32API] (read, write): Add char* casts.
14476 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14477 * server.h: Include wincecompat.h on Windows CE.
14478 [HAVE_ERRNO_H]: Check.
14479 (perror): Declare if not declared.
14480 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14481 (perror_with_name): Remove errno declaration.
14482 * wincecompat.h: New.
14483 * wincecompat.c: New.
14484 * win32-low.h: New.
14485 * win32-arm-low.c: New.
14486 * win32-i386-low.c: New.
14487 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14488 (OUTMSG2): Make it safe.
14490 (COUNTOF): New macro.
14491 (NUM_REGS): Get it from the low target.
14492 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14493 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14494 (thread_rec): Let low target handle debug registers.
14495 (child_add_thread): Likewise.
14496 (child_init_thread_list): Likewise.
14497 (continue_one_thread): Likewise.
14499 (do_child_fetch_inferior_registers): Move to ...
14500 * win32-i386-low.c: ... here, and rename to ...
14501 (do_fetch_inferior_registers): ... this.
14502 * win32-low.c (child_fetch_inferior_registers):
14503 Go through the low target.
14504 (do_child_store_inferior_registers): Use regptr.
14505 (strwinerror): New function.
14506 (win32_create_inferior): Handle Windows CE.
14507 Use strwinerror instead of strerror on Windows error
14508 codes. Add program to the error output.
14509 Don't close the main thread handle on Windows CE.
14510 (win32_attach): Use coredll.dll on Windows CE.
14511 (win32_kill): Close current process and current
14513 (win32_detach): Use coredll.dll on Windows CE.
14514 (win32_resume): Let low target handle debug registers, and
14516 (handle_exception): Add/Remove initial breakpoint. Avoid
14517 non-existant WSTOPSIG on Windows CE.
14518 (win32_read_inferior_memory): Cast to remove warning.
14519 (win32_arch_string): Go through the low target.
14520 (initialize_low): Call set_breakpoint_data with the low
14521 target's breakpoint.
14522 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14523 FOP_REGNUM, mappings): Move to ...
14524 * win32-i386-low.c: ... here.
14525 * win32-low.c (win32_thread_info): Move to ...
14526 * win32-low.h: ... here.
14527 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14528 win32-arm-low.c and wincecompat.c.
14529 (all:): Add $EXEEXT.
14530 (install-only:): Likewise.
14531 (gdbserver:): Likewise.
14532 (gdbreplay:): Likewise.
14533 * config.in: Regenerate.
14534 * configure: Regenerate.
14536 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14538 * win32-low.c: Rename typedef thread_info to
14539 win32_thread_info throughout.
14541 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14543 * win32-i386-low.c: Rename to ...
14544 * win32-low.c: ... this.
14545 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14546 * Makefile.in: Likewise.
14548 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14550 * remote-utils.c (monitor_output): Constify msg parameter.
14551 * server.h (monitor_output): Likewise.
14552 * win32-i386-low.c (handle_output_debug_string): New.
14553 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14554 handle_output_debug_string.
14555 (get_child_debug_event): Likewise.
14557 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14559 * server.c (main): Correct strtoul check.
14561 2007-03-27 Jon Ringle <jon@ringle.org>
14563 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14565 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14567 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14569 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14571 * terminal.h: Check HAVE_SGTTY_H.
14573 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14575 * remote-utils.c (remote_open): Print out the assigned port number.
14577 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14579 * remote-utils.c (monitor_output): New function.
14580 * server.c (debug_threads): Define here.
14581 (monitor_show_help): New function.
14582 (handle_query): Handle qRcmd.
14583 (main): Do not handle 'd' packet.
14584 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14585 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14588 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14590 * Makefile.in (EXEEXT): New.
14591 (clean): Use $(EXEEXT).
14593 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14595 * target.h (target_ops): Rename send_signal to request_interrupt,
14596 and remove enum target_signal parameter.
14597 * linux-low.c (linux_request_interrupt): Rename from
14598 linux_send_signal, and always send SIGINT.
14599 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14600 and always send SIGINT.
14601 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14603 (input_interrupt): Likewise.
14605 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14607 * server.c (get_features_xml): Check if target implemented
14609 * win32-i386-low.c (win32_arch_string): New.
14610 (win32_target_ops): Add win32_arch_string as arch_string member.
14612 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14614 * spu-low.c (spu_arch_string): New.
14615 (spu_target_ops): Add spu_arch_string.
14617 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14619 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14620 * configure.ac: Do not check for terminal.h.
14621 * configure, config.in: Regenerated.
14623 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14625 * Makefile.in (OBS): Add $(XML_BUILTIN).
14626 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14628 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14629 (arm-with-iwmmxt.c): New.
14630 * config.in, configure: Regenerate.
14631 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14632 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14633 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14634 (arm*-*-linux*): Add iWMMXt and regset support.
14635 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14636 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14637 (arm_store_wmmxregset, target_regsets): New.
14638 * server.c (get_features_xml): Take annex argument. Check builtin
14640 (handle_query): Handle multiple annexes.
14642 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14644 * remote-utils.c [USE_WIN32API] (read, write): Define.
14645 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14648 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14650 * linux-i386-low.c (the_low_target): Set arch_string.
14651 * linux-x86-64-low.c (the_low_target): Likewise.
14652 * linux-low.c (linux_arch_string): New.
14653 (linux_target_ops): Add it.
14654 * linux-low.h (struct linux_target_ops): Add arch_string.
14655 * server.c (write_qxfer_response): Use const void * for DATA.
14656 (get_features_xml): New.
14657 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14658 * target.h (struct target_ops): Add arch_string method.
14660 2007-01-03 Denis Pilat <denis.pilat@st.com>
14661 Daniel Jacobowitz <dan@codesourcery.com>
14663 * linux-low.c (linux_kill): Handle being called with no threads.
14664 * win32-i386-low.c (win32_kill): Likewise.
14665 (get_child_debug_event): Clear current_process_handle.
14667 2006-12-30 Denis PILAT <denis.pilat@st.com>
14668 Daniel Jacobowitz <dan@codesourcery.com>
14670 * remote-utils.c (remote_open): Check the type of specified
14671 serial port devices before opening them.
14672 * server.c (main): Kill the inferior if an error occurs during
14673 the first remote_open.
14675 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14677 * README: Update supported targets.
14679 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14681 * Makefile.in (clean): Remove reg-mips64.c.
14682 (reg-mips64.c, reg-mips64.o): New rules.
14683 * configure.srv: Handle mips64. Include regset support for mips.
14684 * linux-mips-low.c (union mips_register): New.
14685 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14686 (mips_breakpoint, mips_breakpoint_at): Use int.
14687 (mips_collect_register, mips_supply_register)
14688 (mips_collect_register_32bit, mips_supply_register_32bit)
14689 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14690 (mips_store_fpregset, target_regsets): New.
14691 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14693 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14695 * configure.srv: Add target "spu*-*-*".
14696 * Makefile.in (clean): Remove reg-spu.c.
14697 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14698 * spu-low.c: New file.
14700 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14702 * configure.ac: Correct td_thr_tls_get_addr test.
14703 * configure: Regenerated.
14705 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14707 * linux-low.c (linux_wait_for_event): Reformat. Use the
14708 pass_signals array.
14709 * remote-utils.c (decode_address_to_semicolon): New.
14710 * server.c (pass_signals, handle_general_set): New.
14711 (handle_query): Mention QPassSignals for qSupported.
14712 (main): Call handle_general_set.
14713 * server.h (pass_signals, decode_address_to_semicolon): New.
14715 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14717 * server.c (handle_query): Correct error handling for read_auxv.
14719 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14721 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14722 and srv_linux_thread_db to yes.
14723 * linux-s390-low.c (s390_fill_gregset): New function.
14724 (target_regsets): Define data structure.
14726 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14728 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14729 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14730 * config.in, configure: Regenerated.
14731 * inferiors.c (gdb_id_to_thread): New function.
14732 (gdb_id_to_thread_id): Use it.
14733 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14734 * linux-low.h (struct process_info): Add th member.
14735 (thread_db_get_tls_address): New prototype.
14736 * remote-utils.c (decode_address): Make non-static.
14737 * server.c (handle_query): Handle qGetTLSAddr.
14738 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14739 * target.h (struct target_ops): Add get_tls_address.
14740 * thread-db.c (maybe_attach_thread): Save the thread handle.
14741 (thread_db_get_tls_address): New.
14743 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14745 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14746 (linux_resume_one_process): Take a siginfo_t *. Update all
14747 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14748 (struct pending_signals): Add a siginfo_t.
14749 (linux_wait_for_process): Always set last_status.
14750 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14751 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14752 * linux-low.h (struct process_info): Add last_status.
14754 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14756 * remote-utils.c (try_rle): New function.
14757 (putpkt_binary): Use it.
14759 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14761 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14762 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14763 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14764 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14765 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14768 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14770 * server.c (terminal_fd): New variable.
14771 (old_foreground_pgrp): Likewise.
14772 (restore_old_foreground_pgrp): New function.
14773 (start_inferior): Record the terminal file descriptor in terminal_fd
14774 and its original foreground group in old_foreground_pgrp. Register
14775 restore_old_foreground_pgrp with atexit().
14777 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14779 * server.c (handle_query): Correct qPart to qXfer.
14781 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14783 * configure.ac: Check for more headers which are missing on
14784 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14785 * configure.srv: Add Cygwin and mingw32.
14786 * remote-utils.c: Don't include headers unconditionally which
14787 are missing on mingw32. Include <winsock.h> for mingw32.
14788 (remote_open): Adjust for mingw32 support. Flush
14789 standard error after writing to it.
14790 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14791 (unblock_async_io, enable_async_io, disable_async_io)
14792 (readchar, getpkt): Update for Winsock support.
14793 (prepare_resume_reply): Expect a protocol signal number.
14794 * server.c: Disable <sys/wait.h> on mingw32.
14795 (start_inferior): Adjust for mingw32 support. Flush
14796 standard error after writing to it.
14797 (attach_inferior): Likewise. Use protocol signal
14799 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14801 * win32-i386-low.c: New file.
14802 * Makefile.in (XM_CLIBS): Set.
14803 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14804 (win32-i386-low.o): New dependency rule.
14805 * linux-low.c (linux_wait): Use target signal numbers.
14806 * target.h (struct target_ops): Doc fix.
14807 * server.h (target_signal_to_name): New prototype.
14808 * gdbreplay.c: Don't include headers unconditionally which
14809 are missing on mingw32. Include <winsock.h> for mingw32.
14810 (remote_close, remote_open): Adjust for Winsock support.
14811 * configure, config.in: Regenerated.
14813 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14815 * server.c (decode_xfer_read, write_qxfer_response): New.
14816 (handle_query): Take a packet length argument. Handle
14817 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14818 the qSupported response.
14819 (main): Update call to handle_query.
14821 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14823 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14824 (putpkt_binary): Renamed from putpkt and adjusted for binary
14826 (putpkt): New wrapper for putpkt_binary.
14827 (readchar): Don't mask off the high bit.
14828 (decode_X_packet): New function.
14829 * server.c (main): Call putpkt_binary if a handler sets the packet
14830 length. Save the length of the incoming packet. Handle 'X'.
14831 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14833 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14835 * server.c (handle_query): Handle qSupported.
14837 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14839 * remote-utils.c (all_symbols_looked_up): New variable.
14840 (look_up_one_symbol): Check it.
14841 * server.h (look_up_one_symbol): New declaration.
14842 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14844 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14846 * Makefile.in (linux-arm-low.o): Update dependencies.
14847 * linux-arm-low.c: Include "gdb_proc_service.h".
14848 (PTRACE_GET_THREAD_AREA): Define.
14849 (ps_get_thread_area): New function.
14851 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14853 * configure.srv (m68k*-*-uclinux*): New target.
14854 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14855 (linux_resume_one_process): Remove extraneous cast.
14856 (linux_read_offsets): New.
14857 (linux_target_op): Add linux_read_offsets on mmuless systems.
14858 * server.c (handle_query): Add qOffsets logic.
14859 * target.h (struct target_ops): Add read_offsets.
14861 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14863 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14864 (PTRACE_GET_THREAD_AREA): Define.
14865 (ps_get_thread_area): New function.
14866 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14867 (linux-x86-64-low.o): Update.
14869 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14871 * configure.ac: Remove checks for prfpregset_t.
14872 * gdb_proc_service.h: New file.
14873 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14874 new "gdb_proc_service.h".
14875 * proc-service.c: Likewise.
14876 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14877 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14878 * Makefile.in (gdb_proc_service_h): Updated.
14879 * configure, config.in: Regenerated.
14881 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14883 * remote-utils.c (prepare_resume_reply): Move declaration
14884 of gdb_id_from_wait to the top of the block.
14886 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14888 * linux-low.c (regsets_store_inferior_registers): Read the regset
14889 from the target before filling it.
14891 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14893 * server.c (attach_inferior): Return SIGTRAP for a successful
14896 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14898 * Makefile.in (OBS): Add version.o.
14899 (STAGESTUFF): Delete.
14900 (version.o): Add dependencies.
14901 (version.c): Replace rule.
14902 (clean): Remove version.c.
14903 * server.c (gdbserver_version): New.
14904 (gdbserver_usage): Use printf.
14905 (main): Handle --version and --help.
14906 * server.h (version, host_name): Add declarations.
14908 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14920 * linux-x86-64-low.c:
14922 * linux-s390-low.c:
14923 * linux-ppc64-low.c:
14925 * linux-mips-low.c:
14926 * linux-m68k-low.c:
14927 * linux-m32r-low.c:
14930 * linux-ia64-low.c:
14931 * linux-i386-low.c:
14932 * linux-crisv32-low.c:
14944 * gdbserver.1: Add (C) after Copyright. Update the FSF
14947 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14949 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14950 (arm_breakpoint_at): Recognize both breakpoints.
14951 (the_low_target): Use the correct breakpoint instruction.
14953 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14955 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14956 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14957 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14958 (the_low_target): Update.
14960 2005-10-25 Andreas Schwab <schwab@suse.de>
14962 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14964 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14965 (ia64_num_regs): Reduce to 462.
14967 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14969 * acinclude.m4: Correct quoting.
14970 * aclocal.m4: Regenerated.
14972 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14973 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14974 (thread_db_init): Call thread_db_err_str.
14975 * configure.ac: Check for TD_VERSION.
14976 * config.in, configure: Regenerated.
14978 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14980 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14982 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14984 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14985 is not available. Define HAVE_PTRACE_GETREGS if it is.
14986 * config.in, configure: Regenerated.
14987 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14988 * linux-i386-low.c, linux-m68k-low.c: Update to use
14989 HAVE_PTRACE_GETREGS.
14990 * linux-low.c (regsets_fetch_inferior_registers)
14991 (regsets_store_inferior_registers): Only return 0 if we processed
14993 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14994 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14996 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14998 * inferiors.c (struct thread_info): Add gdb_id.
14999 (add_thread): Add gdb_id argument.
15000 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15001 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15002 calls to add_thread.
15003 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15004 * server.c (handle_query): Use thread_to_gdb_id.
15005 (handle_v_cont, main): Use gdb_id_to_thread_id.
15006 * server.h (add_thread): Update prototype.
15007 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15010 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15012 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15013 left-padded registers.
15014 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15015 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15017 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15019 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15020 * configure: Regenerate.
15021 * config.in: Regenerate.
15022 * server.h (NEED_DECLARATION_STRERROR):
15023 Replace with !HAVE_DECL_STRERROR.
15025 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15027 * linux-low.c (linux_wait, linux_send_signal): Don't test
15028 an unsigned long variable for > 0 if it could be MAX_ULONG.
15029 * server.c (myresume): Likewise.
15030 * target.c (set_desired_inferior): Likewise.
15032 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15034 * configure.ac: Simplify and improve check for socklen_t.
15035 * configure, config.in: Regenerate.
15037 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15039 * acconfig.h: Remove.
15040 * configure.ac: Add a test for socklen_t. Use three-argument
15041 AC_DEFINE throughout.
15042 * config.in: Regenerated using autoheader 2.59.
15043 * configure: Regenerated.
15045 * gdbreplay.c (socklen_t): Provide a default.
15046 (remote_open): Use socklen_t.
15047 * remote-utils.c (socklen_t): Provide a default.
15048 (remote_open): Use socklen_t.
15049 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15052 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15054 * linux-low.c (linux_read_memory, linux_write_memory)
15055 (linux_read_auxv): Likewise.
15056 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15057 (check_mem_write): Likewise.
15058 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15060 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15061 (registers_from_string, register_data): Likewise.
15062 * server.c (handle_query, main): Likewise.
15063 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15064 (decode_M_packet): Likewise.
15065 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15066 * target.h (struct target_ops): Update read_memory, write_memory,
15068 (read_inferior_memory, write_inferior_memory): Update.
15069 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15070 to unsigned char *.
15071 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15072 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15073 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15074 linux-s390-low.c, linux-sh-low.c: Update for changes in
15075 read_inferior_memory and the_low_target->breakpoint.
15077 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15079 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15080 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15081 * configure.srv: Add powerpc64-*-linux*.
15082 * linux-ppc64-low.c: New file.
15084 2005-05-23 Orjan Friberg <orjanf@axis.com>
15086 * linux-cris-low.c: New file with support for CRIS.
15087 * linux-crisv32-low.c: Ditto for CRISv32.
15088 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15089 (clean): Add reg-cris.c and reg-crisv32.c.
15090 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15091 reg-crisv32.o, and reg-crisv32.c to make rules.
15092 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15093 recognized targets.
15095 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15097 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15098 of sizeof (PTRACE_XFER_TYPE).
15099 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15101 2005-05-12 Orjan Friberg <orjanf@axis.com>
15103 * target.h (struct target_ops): Add insert_watchpoint,
15104 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15105 pointers for hardware watchpoint support.
15106 * linux-low.h (struct linux_target_ops): Ditto.
15107 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15108 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15109 to linux_target_ops.
15110 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15112 * server.c (main): Recognize 'Z' and 'z' packets.
15114 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15116 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15117 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15118 (the_low_target): Add new members.
15120 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15122 * proc-service.c (ps_lgetregs): Search all_processes instead of
15125 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15127 * server.c (start_inferior): Change return type to int.
15128 (attach_inferior): Change sigptr to int *.
15129 (handle_v_cont, handle_v_requests): Change signal to int *.
15130 (main): Change signal to int.
15132 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15134 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15135 * configure.srv: Add m32r*-*-linux*.
15136 * linux-m32r-low.c: New file.
15138 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15140 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15142 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15144 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15145 Take unsigned long arguments for PIDs.
15146 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15147 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15148 (wait_for_sigstop, linux_resume_one_process)
15149 (regsets_fetch_inferior_registers, linux_send_signal)
15150 (linux_read_auxv): Likewise. Update the types of variables holding
15151 PIDs. Update format string specifiers.
15152 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15153 * remote-utils.c (prepare_resume_reply): Likewise.
15154 * server.c (cont_thread, general_thread, step_thread)
15155 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15157 (handle_query): Update format specifiers.
15158 (handle_v_cont, main): Use strtoul for thread IDs.
15159 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15160 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15161 (general_thread, step_thread, thread_from_wait)
15162 (old_thread_from_wait): Update.
15163 * target.h (struct thread_resume): Use unsigned long for THREAD.
15164 (struct target_ops): Use unsigned long for arguments to attach and
15167 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15169 * acinclude.m4: Include bfd/bfd.m4 directly.
15170 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15171 <agriffis@toolchain.org>.
15172 * aclocal.m4, configure: Regenerated.
15174 2005-01-07 Andrew Cagney <cagney@gnu.org>
15176 * configure.ac: Rename configure.in, require autoconf 2.59.
15177 * configure: Re-generate.
15179 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15181 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15182 LIBS when finished.
15183 * aclocal.m4: Regenerated.
15184 * configure: Regenerated.
15186 2004-11-21 Andreas Schwab <schwab@suse.de>
15188 * linux-m68k-low.c (m68k_num_gregs): Define.
15189 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15190 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15191 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15192 (m68k_breakpoint_at): New. Add to the_low_target.
15194 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15195 srv_linux_thread_db to yes.
15197 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15199 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15200 (ARCH_SET_FS): Likewise.
15201 (ARCH_GET_FS): Likewise.
15202 (ARCH_GET_GS): Likewise.
15204 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15206 * linux-i386-low.c (ps_get_thread_area): New.
15207 * linux-x86-64-low.c (ps_get_thread_area): New.
15208 * linux-low.c: Include <sys/syscall.h>.
15209 (linux_kill_one_process): Don't kill the first thread here.
15210 (linux_kill): Kill the first thread here.
15211 (kill_lwp): New function.
15212 (send_sigstop, linux_send_signal): Use it.
15213 * proc-service.c: Clean up #ifdefs.
15214 (fpregset_info): Delete.
15215 (ps_lgetregs): Update and enable implementation.
15216 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15218 * remote-utils.c (struct sym_cache, symbol_cache): New.
15219 (input_interrupt): Print a clearer message.
15220 (async_io_enabled): New variable.
15221 (enable_async_io, disable_async_io): Use it. Update comments.
15222 (look_up_one_symbol): Use the symbol cache.
15223 * thread-db.c (thread_db_look_up_symbols): New function.
15224 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15226 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15228 * configure.in: Test for -rdynamic.
15229 * configure: Regenerated.
15230 * Makefile (INTERNAL_LDFLAGS): New.
15231 (gdbserver, gdbreplay): Use it.
15233 2004-09-02 Andrew Cagney <cagney@gnu.org>
15235 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15237 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15239 * linux-low.c (linux_wait): Clear all_processes list also.
15241 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15243 * linux-low.c: Include <errno.h>. Remove extern declaration of
15246 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15248 * gdbreplay.c, server.h, utils.c: Update copyright years.
15250 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15252 * server.c (main): Print child status or termination signal from
15253 variable 'signal', not 'sig'.
15255 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15257 * linux-low.c (linux_read_memory): Change return type to
15258 int. Check for and return error from ptrace().
15259 * target.c (read_inferior_memory): Change return type to int. Pass
15260 back return status from the_target->read_memory().
15261 * target.h (struct target_ops): Adapt *read_memory() prototype.
15263 (read_inferior_memory): Adapt prototype.
15264 * server.c (main): Return an error packet if
15265 read_inferior_memory() returns an error.
15267 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15269 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15270 Unify with other clean targets.
15272 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15274 * server.c (handle_v_cont): Call set_desired_inferior.
15276 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15278 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15280 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15282 * linux-low.c (linux_wait): Unblock async I/O.
15283 (linux_resume): Block and enable async I/O.
15284 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15285 * server.h (block_async_io, unblock_async_io): Add prototypes.
15287 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15289 * remote-utils.c (remote_open): Print a status notice after
15290 opening a TCP port.
15291 * server.c (attach_inferior): Print a status notice after
15294 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15296 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15298 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15300 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15302 * server.c, target.h: Update copyright years.
15304 2004-02-25 Roland McGrath <roland@redhat.com>
15306 * target.h (struct target_ops): New member `read_auxv'.
15307 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15308 * linux-low.c (linux_read_auxv): New function.
15309 (linux_target_ops): Initialize `read_auxv' member to that.
15311 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15313 Committed by Jim Blandy <jimb@redhat.com>.
15315 * linux-s390-low.c (s390_num_regs): Update.
15316 (s390_regmap): Remove control registers. Use __s390x__ predefine
15317 instead of GPR_SIZE to distiguish s390 and s390x targets.
15319 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15321 * linux-low.c: Update copyright year.
15322 (check_removed_breakpoint): Clear pending_is_breakpoint.
15323 (linux_set_resume_request, linux_queue_one_thread)
15324 (resume_status_pending_p): New functions.
15325 (linux_continue_one_thread): Use process->resume.
15326 (linux_resume): Only resume threads if there are no pending events.
15327 * linux-low.h (struct process_info): Add resume request
15330 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15332 * regcache.c (new_register_cache): Clear the allocated register
15333 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15335 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15337 * linux-low.c (linux_resume): Take a struct thread_resume *
15339 (linux_wait): Update call.
15340 (resume_ptr): New static variable.
15341 (linux_continue_one_thread): Renamed from
15342 linux_continue_one_process. Use resume_ptr.
15343 (linux_resume): Use linux_continue_one_thread.
15344 * server.c (handle_v_cont, handle_v_requests): New functions.
15345 (myresume): New function.
15346 (main): Handle 'v' case.
15347 * target.h (struct thread_resume): New type.
15348 (struct target_ops): Change argument of "resume" to struct
15350 (myresume): Delete macro.
15352 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15354 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15355 (uninstall): Support DESTDIR.
15357 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15359 * configure.srv: Add xscale*linux copy of arm*linux entry.
15361 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15363 * linux-arm-low.c (arm_reinsert_addr): New function.
15364 (the_low_target): Add arm_reinsert_addr.
15366 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15368 * mem-break.c: Remove whitespace at end of file.
15370 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15372 * configure.in: Check whether we need to prototype strerror.
15373 * server.h: Optionally prototype strerror.
15374 * gdbreplay.c (perror_with_name): Use strerror.
15375 * linux-low.c (linux_attach_lwp): Use strerror.
15376 * utils.c (perror_with_name): Use strerror.
15377 * config.in, configure: Regenerated.
15379 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15381 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15382 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15384 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15386 * Makefile.in (SFILES): Update.
15387 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15388 low-sun3.c: Remove files.
15390 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15392 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15393 (linux_detach_one_process, linux_detach): New functions.
15394 (linux_target_ops): Add linux_detach.
15395 * server.c (main): Handle 'D' packet.
15396 * target.h (struct target_ops): Add "detach" member.
15397 (detach_inferior): Define.
15399 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15401 From Kelley Cook <kelleycook@wideopenwest.com>:
15402 * configure.srv: Accept i[34567]86 variants.
15404 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15406 * linux-low.c (linux_wait_for_event): Correct comment typos.
15407 (linux_resume_one_process): Call check_removed_breakpoint.
15408 (linux_send_signal): New function.
15409 (linux_target_ops): Add linux_send_signal.
15410 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15412 * target.h (struct target_ops): Add send_signal.
15414 2003-05-29 Jim Blandy <jimb@redhat.com>
15416 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15417 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15418 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15419 away part of the register's value.
15421 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15423 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15424 (linux_wait_for_event, linux_init_signals): Likewise.
15426 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15428 * configure.in: Check for stdlib.h.
15429 * configure: Regenerated.
15430 * config.in: Regenerated.
15432 2003-01-04 Andreas Schwab <schwab@suse.de>
15434 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15436 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15438 * Makefile.in: Remove obsolete code.
15440 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15442 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15443 defined(PT_FPR0_HI).
15445 2002-11-17 Stuart Hughes <seh@zee2.com>
15447 * linux-arm-low.c (arm_num_regs): Increase.
15448 (arm_regmap): Include status register.
15450 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15452 * linux-low.c (register_addr): Remove incorrect -1 check.
15454 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15456 * linux-low.c (linux_create_inferior): Call setpgid. Return
15458 (unstopped_p, linux_signal_pid): Remove.
15459 (linux_target_ops): Remove linux_signal_pid.
15460 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15461 global instead of target method.
15462 * target.h (struct target_ops): Remove signal_pid. Update comment
15463 for create_inferior.
15464 * server.c (signal_pid): New variable.
15465 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15466 gdbserver. Set the child to be the foreground process group.
15467 (attach_inferior): Set signal_pid.
15469 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15471 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15473 2002-08-20 Jim Blandy <jimb@redhat.com>
15475 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15478 2002-08-01 Andrew Cagney <cagney@redhat.com>
15480 * Makefile.in: Make chill references obsolete.
15482 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15484 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15485 * configure: Regenerate.
15486 * config.in: Regenerate.
15488 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15490 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15491 (perror_with_name, remote_close, remote_open, expect, play): Static.
15493 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15495 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15496 byte offsets instead of an array of indexes.
15497 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15499 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15501 * regcache.c: Add comment.
15503 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15505 * thread-db.c: New file.
15506 * proc-service.c: New file.
15507 * acinclude.m4: New file.
15508 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15509 proc-service.o, and thread-db.o.
15510 (linux-low.o): Add USE_THREAD_DB.
15511 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15512 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15513 * aclocal.m4: Regenerated.
15514 * config.in: Regenerated.
15515 * configure: Regenerated.
15516 * configure.in: Check for proc_service.h, sys/procfs.h,
15517 thread_db.h, and linux/elf.h headrs.
15518 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15519 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15520 Check for -lthread_db and thread support.
15521 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15522 PowerPC, and SuperH.
15523 * i387-fp.c: Constify arguments.
15524 * i387-fp.h: Likewise.
15525 * inferiors.c: (struct thread_info): Renamed from
15526 `struct inferior_info'. Remove PID member. Use generic inferior
15527 list header. All uses updated.
15528 (inferiors, signal_pid): Removed.
15529 (all_threads): New variable.
15530 (get_thread): Define.
15531 (add_inferior_to_list): New function.
15532 (for_each_inferior): New function.
15533 (change_inferior_id): New function.
15534 (add_inferior): Removed.
15535 (remove_inferior): New function.
15536 (add_thread): New function.
15537 (free_one_thread): New function.
15538 (remove_thread): New function.
15539 (clear_inferiors): Use for_each_inferior and free_one_thread.
15540 (find_inferior): New function.
15541 (find_inferior_id): New function.
15542 (inferior_target_data): Update argument type.
15543 (set_inferior_target_data): Likewise.
15544 (inferior_regcache_data): Likewise.
15545 (set_inferior_regcache_data): Likewise.
15546 * linux-low.c (linux_bp_reinsert): Remove.
15547 (all_processes, stopping_threads, using_thrads)
15548 (struct pending_signals, debug_threads, pid_of): New.
15549 (inferior_pid): Replace with macro.
15550 (struct inferior_linux_data): Remove.
15551 (get_stop_pc, add_process): New functions.
15552 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15553 Use add_process and add_thread.
15554 (linux_attach_lwp): New function, based on old linux_attach. Use
15555 add_process and add_thread. Set stop_expected for new threads.
15556 (linux_attach): New function.
15557 (linux_kill_one_process): New function.
15558 (linux_kill): Kill all LWPs.
15559 (linux_thread_alive): Use find_inferior_id.
15560 (check_removed_breakpoints, status_pending_p): New functions.
15561 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15562 Update. Use WNOHANG. Wait for cloned processes also. Update process
15563 struct for the found process.
15564 (linux_wait_for_event): New function.
15565 (linux_wait): Use it. Support LWPs.
15566 (send_sigstop, wait_for_sigstop, stop_all_processes)
15567 (linux_resume_one_process, linux_continue_one_process): New functions.
15568 (linux_resume): Support LWPs.
15569 (REGISTER_RAW_SIZE): Remove.
15570 (fetch_register): Use register_size instead. Call supply_register.
15571 (usr_store_inferior_registers): Likewise. Call collect_register.
15572 Fix recursive case.
15573 (regsets_fetch_inferior_registers): Improve error message.
15574 (regsets_store_inferior_registers): Add debugging.
15575 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15576 (unstopped_p, linux_signal_pid): New functions.
15577 (linux_target_ops): Add linux_signal_pid.
15578 (linux_init_signals): New function.
15579 (initialize_low): Call it. Initialize using_threads.
15580 * regcache.c (inferior_regcache_data): Add valid
15582 (get_regcache): Fetch registers lazily. Add fetch argument
15583 and update all callers.
15584 (regcache_invalidate_one, regcache_invalidate): New
15586 (new_register_cache): Renamed from create_register_cache.
15587 Return the new regcache.
15588 (free_register_cache): Change argument to a void *.
15589 (registers_to_string, registers_from_string): Call get_regcache
15590 with fetch flag set.
15591 (register_data): Make static. Pass fetch flag to get_regcache.
15592 (supply_register): Call get_regcache with fetch flag clear.
15593 (collect_register): Call get_regcache with fetch flag set.
15594 (collect_register_as_string): New function.
15595 * regcache.h: Update.
15596 * remote-utils.c (putpkt): Flush after debug output and use
15598 Handle input interrupts while waiting for an ACK.
15599 (input_interrupt): Use signal_pid method.
15600 (getpkt): Flush after debug output and use stderr.
15601 (outreg): Use collect_register_as_string.
15602 (new_thread_notify, dead_thread_notify): New functions.
15603 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15604 and general_thread.
15605 (look_up_one_symbol): Flush after debug output.
15606 * server.c (step_thread, server_waiting): New variables.
15607 (start_inferior): Don't use signal_pid. Update call to mywait.
15608 (attach_inferior): Update call to mywait.
15609 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15610 (main): Don't fetch/store registers explicitly. Use
15611 set_desired_inferior. Support proposed ``Hs'' packet. Update
15613 * server.h: Update.
15614 (struct inferior_list, struct_inferior_list_entry): New.
15615 * target.c (set_desired_inferior): New.
15616 (write_inferior_memory): Constify.
15617 (mywait): New function.
15618 * target.h: Update.
15619 (struct target_ops): New signal_pid method.
15620 (mywait): Removed macro, added prototype.
15622 * linux-low.h (regset_func): Removed.
15623 (regset_fill_func, regset_store_func): New.
15624 (enum regset_type): New.
15625 (struct regset_info): Add type field. Use new operation types.
15626 (struct linux_target_ops): stop_pc renamed to get_pc.
15627 Add decr_pc_after_break and breakpoint_at.
15628 (get_process, get_thread_proess, get_process_thread)
15629 (strut process_info, all_processes, linux_attach_lwp)
15630 (thread_db_init): New.
15632 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15633 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15634 (the_low_target): Add new members.
15635 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15636 (i386_store_fpxregset): Constify.
15637 (target_regsets): Add new kind identifier.
15638 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15639 (i386_set_pc): Add debugging.
15640 (i386_breakpoint_at): New function.
15641 (the_low_target): Add new members.
15642 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15643 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15644 (mips_breakpoint_at): New.
15645 (the_low_target): Add new members.
15646 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15647 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15648 (the_low_target): Add new members.
15649 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15650 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15651 (the_low_target): Add new members.
15652 * linux-x86-64-low.c (target_regsets): Add new kind
15655 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15657 From Martin Pool <mbp@samba.org>:
15658 * server.c (gdbserver_usage): New function.
15661 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15663 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15664 stop_at -> stop_pc.
15666 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15668 * Makefile.in: Remove obsolete code.
15670 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15672 * linux-low.c (regsets_fetch_inferior_registers),
15673 (regsets_store_inferior_registers): Removed cast to int from
15675 * regcache.h: Added declaration of struct inferior_info.
15677 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15679 * inferiors.c (struct inferior_info): Add regcache_data.
15680 (add_inferior): Call create_register_cache.
15681 (clear_inferiors): Call free_register_cache.
15682 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15683 * regcache.c (struct inferior_regcache_data): New.
15684 (registers): Remove.
15685 (get_regcache): New function.
15686 (create_register_cache, free_register_cache): New functions.
15687 (set_register_cache): Don't initialize the register cache here.
15688 (registers_to_string, registers_from_string, register_data): Call
15690 * regcache.h: Add prototypes.
15691 * server.h: Likewise.
15693 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15695 * mem-break.c: New file.
15696 * mem-break.h: New file.
15697 * Makefile.in: Add mem-break.o rule; update server.h
15699 * inferiors.c (struct inferior_info): Add target_data
15701 (clear_inferiors): Free target_data member if set.
15702 (inferior_target_data, set_inferior_target_data): New functions.
15703 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15704 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15705 * linux-low.c (linux_bp_reinsert): New variable.
15706 (struct inferior_linux_data): New.
15707 (linux_create_inferior): Use set_inferior_target_data.
15708 (linux_attach): Likewise. Call add_inferior.
15709 (linux_wait_for_one_inferior): New function.
15710 (linux_wait): Call it.
15711 (linux_write_memory): Add const.
15712 (initialize_low): Call set_breakpoint_data.
15713 * linux-low.h (struct linux_target_ops): Add breakpoint
15715 * server.c (attach_inferior): Remove extra add_inferior
15717 * server.h: Include mem-break.h. Update inferior.c
15719 * target.c (read_inferior_memory)
15720 (write_inferior_memory): New functions.
15721 * target.h (read_inferior_memory)
15722 (write_inferior_memory): Change macros to prototypes.
15723 (struct target_ops): Update comments. Add const to write_memory
15726 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15728 * linux-low.c (usr_store_inferior_registers): Support
15729 registers which are allowed to fail to store.
15730 * linux-low.h (linux_target_ops): Likewise.
15731 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15732 (ppc_cannot_store_register): FPSCR may not be storable.
15734 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15736 * server.h: Include <string.h> if HAVE_STRING_H.
15737 * ChangeLog: Correct paths in last ChangeLog entry.
15739 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15741 * linux-low.h: Remove obsolete prototypes.
15742 (struct linux_target_ops): New.
15743 (extern the_low_target): New.
15744 * linux-low.c (num_regs, regmap): Remove declarations.
15745 (register_addr): Use the_low_target explicitly.
15746 (fetch_register): Likewise.
15747 (usr_fetch_inferior_registers): Likewise.
15748 (usr_store_inferior_registers): Likewise.
15749 * linux-arm-low.c (num_regs): Remove.
15750 (arm_num_regs): Define.
15751 (arm_regmap): Renamed from regmap, made static.
15752 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15754 (arm_cannot_store_register): Renamed from cannot_store_register,
15756 (the_low_target): New.
15757 * linux-i386-low.c (num_regs): Remove.
15758 (i386_num_regs): Define.
15759 (i386_regmap): Renamed from regmap, made static.
15760 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15762 (i386_cannot_store_register): Renamed from cannot_store_register,
15764 (the_low_target): New.
15765 * linux-ia64-low.c (num_regs): Remove.
15766 (ia64_num_regs): Define.
15767 (ia64_regmap): Renamed from regmap, made static.
15768 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15770 (ia64_cannot_store_register): Renamed from cannot_store_register,
15772 (the_low_target): New.
15773 * linux-m68k-low.c (num_regs): Remove.
15774 (m68k_num_regs): Define.
15775 (m68k_regmap): Renamed from regmap, made static.
15776 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15778 (m68k_cannot_store_register): Renamed from cannot_store_register,
15780 (the_low_target): New.
15781 * linux-mips-low.c (num_regs): Remove.
15782 (mips_num_regs): Define.
15783 (mips_regmap): Renamed from regmap, made static.
15784 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15786 (mips_cannot_store_register): Renamed from cannot_store_register,
15788 (the_low_target): New.
15789 * linux-ppc-low.c (num_regs): Remove.
15790 (ppc_num_regs): Define.
15791 (ppc_regmap): Renamed from regmap, made static.
15792 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15794 (ppc_cannot_store_register): Renamed from cannot_store_register,
15796 (the_low_target): New.
15797 * linux-s390-low.c (num_regs): Remove.
15798 (s390_num_regs): Define.
15799 (s390_regmap): Renamed from regmap, made static.
15800 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15802 (s390_cannot_store_register): Renamed from cannot_store_register,
15804 (the_low_target): New.
15805 * linux-sh-low.c (num_regs): Remove.
15806 (sh_num_regs): Define.
15807 (sh_regmap): Renamed from regmap, made static.
15808 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15810 (sh_cannot_store_register): Renamed from cannot_store_register,
15812 (the_low_target): New.
15813 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15814 (the_low_target): New.
15816 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15818 * Makefile.in: Add stamp-h target.
15819 * configure.in: Create stamp-h.
15820 * configure: Regenerated.
15822 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15824 * inferiors.c: New file.
15825 * target.c: New file.
15826 * target.h: New file.
15827 * Makefile.in: Add target.o and inferiors.o. Update
15829 * linux-low.c (inferior_pid): New static variable,
15830 moved from server.c.
15831 (linux_create_inferior): Renamed from create_inferior.
15832 Call add_inferior. Return 0 on success instead of a PID.
15833 (linux_attach): Renamed from myattach.
15834 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15835 (linux_thread_alive): Renamed from mythread_alive.
15836 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15838 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15839 (regsets_store_inferior_registers): Correct error message.
15840 Add missing ``return 0''.
15841 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15842 (linux_store_registers): Renamed from store_inferior_registers.
15843 (linux_read_memory): Renamed from read_inferior_memory.
15844 (linux_write_memory): Renamed from write_inferior_memory.
15845 (linux_target_ops): New structure.
15846 (initialize_low): Call set_target_ops ().
15847 * remote-utils.c (unhexify): New function.
15848 (hexify): New function.
15849 (input_interrupt): Send signals to ``signal_pid''.
15850 * server.c (inferior_pid): Remove.
15851 (start_inferior): Update create_inferior call.
15852 (attach_inferior): Call add_inferior.
15853 (handle_query): New function.
15854 (main): Call handle_query for `q' packets.
15855 * server.h: Include "target.h". Remove obsolete prototypes.
15856 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15858 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15860 * Makefile.in: Add WARN_CFLAGS. Update configury
15862 * configure.in: Check for <string.h>
15863 * configure: Regenerate.
15864 * config.in: Regenerate.
15865 * gdbreplay.c: Include needed system headers.
15866 (remote_open): Remove strchr prototype.
15867 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15868 * regcache.c (supply_register): Change buf argument to const void *.
15869 (supply_register_by_name): Likewise.
15870 (collect_register): Change buf argument to void *.
15871 (collect_register_by_name): Likewise.
15872 * regcache.h: Add missing prototypes.
15873 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15874 * server.c (handle_query): New function.
15875 (attached): New static variable, moved out of main.
15876 (main): Quiet longjmp clobber warnings.
15877 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15878 * utils.c (error): Remove NORETURN.