1 2017-10-16 Yao Qi <yao.qi@linaro.org>
3 * configure: Regenerated.
5 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
7 * inferiors.h: (struct inferior_list): Remove.
8 (struct inferior_list_entry); Remove.
9 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
10 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
11 get_first_inferior): Remove.
12 (for_each_inferior, for_each_inferior_with_data, find_inferior,
13 find_inferior_id, find_inferior_in_random): Change signature.
14 * inferiors.c (all_threads): Change type to
15 std::list<thread_info *>.
16 (get_thread): Remove macro.
17 (find_inferior, find_inferior_id): Change signature, implement
19 (find_inferior_in_random): Change signature, implement using
20 find_thread_in_random.
21 (for_each_inferior, for_each_inferior_with_data): Change
22 signature, implement using for_each_thread.
23 (add_inferior_to_list, remove_inferior): Remove.
24 (add_thread, get_first_thread, thread_of_pid,
25 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
26 (get_first_inferior, one_inferior_p, clear_inferior_list):
28 (clear_inferiors, get_thread_process): Update.
29 * gdbthread.h: Include <list>.
30 (struct thread_info) <entry>: Remove field.
32 (all_threads): Change type to std::list<thread_info *>.
33 (get_first_inferior): Add doc.
34 (find_thread, for_each_thread, find_thread_in_random): New
36 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
37 * linux-arm-low.c (update_registers_callback): Update.
38 * linux-low.c (second_thread_of_pid_p): Update.
39 (kill_one_lwp_callback, linux_detach_lwp_callback,
40 delete_lwp_callback, status_pending_p_callback, same_lwp,
41 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
42 iterate_over_lwps, not_stopped_callback,
43 resume_stopped_resumed_lwps, count_events_callback,
44 select_singlestep_lwp_callback, select_event_lwp_callback,
45 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
46 suspend_and_send_sigstop_callback, wait_for_sigstop,
47 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
48 lwp_running, linux_set_resume_request, resume_status_pending_p,
49 need_step_over_p, start_step_over, linux_resume_one_thread,
50 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
51 reset_lwp_ptrace_options_callback): Update.
52 * linux-mips-low.c (update_watch_registers_callback): Update.
53 * regcache.c (regcache_invalidate_one, regcache_invalidate):
55 (free_register_cache_thread_one): Remove.
56 (regcache_release): Update.
57 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
58 handle_qxfer_threads_worker): Update.
59 (handle_query): Update, use list iterator.
60 (visit_actioned_threads, handle_pending_status,
61 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
62 clear_pending_status_callback, set_pending_status_callback,
63 find_status_pending_thread_callback, handle_status,
64 process_serial_event): Update.
65 * target.c (thread_search_callback): Update.
66 * thread-db.c (thread_db_get_tls_address): Update.
67 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
69 * win32-i386-low.c (update_debug_registers_callback): Update.
70 * win32-low.c (delete_thread_info, child_delete_thread,
71 continue_one_thread, suspend_one_thread,
72 get_child_debug_event): Adjust.
74 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
76 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
77 * inferiors.h: Include <list>.
78 (struct process_info) <entry>: Remove field.
80 (pid_of): Change macro to function.
81 (ptid_of, lwpid_of): Remove macro.
82 (all_processes): Change type to std::list<process_info *>.
83 (ALL_PROCESSES): Remove macro.
84 (for_each_process, find_process): New function.
85 * inferiors.c (all_processes): Change type to
86 std::list<process_info *>.
87 (find_thread_process): Adjust.
88 (add_process): Likewise.
89 (remove_process): Likewise.
90 (find_process_pid): Likewise.
91 (get_first_process): Likewise.
92 (started_inferior_callback): Remove.
93 (have_started_inferiors_p): Adjust.
94 (attached_inferior_callback): Remove.
95 (have_attached_inferiors_p): Adjust.
96 * linux-low.c (check_zombie_leaders): Likewise.
97 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
98 (x86_linux_update_xmltarget): Adjust.
99 * server.c (handle_query): Likewise.
100 (gdb_reattached_process): Remove.
101 (handle_status): Adjust.
102 (kill_inferior_callback): Likewise.
103 (detach_or_kill_inferior): Remove.
104 (print_started_pid): Likewise.
105 (print_attached_pid): Likewise.
106 (detach_or_kill_for_exit): Update.
107 (process_serial_event): Likewise.
108 * linux-arm-low.c (arm_new_fork): Likewise.
110 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
112 * dll.h: Include <list>.
113 (struct dll_info): Add constructor.
114 <entry>: Remove field.
115 (all_dlls): Change type to std::list<dll_info>.
116 * dll.c: Include <algorithm>.
117 (get_dll): Remove macro.
118 (all_dlls): Change type to std::list<dll_info *>.
119 (free_one_dll): Remove.
120 (match_dll): Likewise.
121 (loaded_dll): Adjust.
122 (unloaded_dll): Adjust to all_dlls type change, use
123 std::find_if. Inline code from match_dll.
124 (clear_dlls): Adjust to all_dlls type change.
125 * server.c (emit_dll_description): Remove.
126 (handle_qxfer_libraries): Adjust to all_dlls type change,
127 integrate emit_dll_description's functionality.
129 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
131 * linux-low.h (struct linux_target_ops) <delete_process>: New
133 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
134 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
135 (struct linux_target_ops): Add delete_process callback.
136 * linux-arm-low.c (arm_delete_process): New.
137 (struct linux_target_ops): Add delete_process callback.
138 * linux-bfin-low.c (struct linux_target_ops): Likewise.
139 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
140 * linux-m32r-low.c (struct linux_target_ops): Likewise.
141 * linux-mips-low.c (mips_linux_delete_process): New.
142 (struct linux_target_ops): Add delete_process callback.
143 * linux-ppc-low.c (struct linux_target_ops): Likewise.
144 * linux-s390-low.c (struct linux_target_ops): Likewise.
145 * linux-sh-low.c (struct linux_target_ops): Likewise.
146 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
147 * linux-tile-low.c (struct linux_target_ops): Likewise.
148 * linux-x86-low.c (x86_linux_delete_process): New.
149 (struct linux_target_ops): Add delete_process callback.
150 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
152 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
154 * linux-aarch64-low.c (the_low_target): Add thread delete
156 * linux-arm-low.c (arm_delete_thread): New function.
157 (the_low_target): Add thread delete callback.
158 * linux-bfin-low.c (the_low_target): Likewise.
159 * linux-crisv32-low.c (the_low_target): Likewise.
160 * linux-low.c (delete_lwp): Invoke delete_thread callback if
162 * linux-low.h (struct linux_target_ops) <delete_thread>: New
164 * linux-m32r-low.c (the_low_target): Add thread delete callback.
165 * linux-mips-low.c (mips_linux_delete_thread): New function.
166 (the_low_target): Add thread delete callback.
167 * linux-ppc-low.c (the_low_target): Likewise.
168 * linux-s390-low.c (the_low_target): Likewise.
169 * linux-sh-low.c (the_low_target): Likewise.
170 * linux-tic6x-low.c (the_low_target): Likewise.
171 * linux-tile-low.c (the_low_target): Likewise.
172 * linux-x86-low.c (the_low_target): Likewise.
173 * linux-xtensa-low.c (the_low_target): Likewise.
175 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
177 * win32-low.c: Include "common-inferior.h".
179 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
181 * inferiors.c (set_inferior_cwd): New function.
182 * server.c (handle_general_set): Handle QSetWorkingDir packet.
183 (handle_query): Inform that QSetWorkingDir is supported.
184 * win32-low.c (create_process): Pass the inferior's cwd to
187 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
189 * inferiors.c (current_inferior_cwd): New global variable.
190 (get_inferior_cwd): New function.
191 * inferiors.h (struct process_info) <cwd>: New field.
193 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
195 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
196 (OBS): Add gdb_tilde_expand.o.
198 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
200 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
201 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
203 2017-09-29 Pedro Alves <palves@redhat.com>
205 * ax.c (gdb_parse_agent_expr): Constify.
206 * ax.h (gdb_parse_agent_expr): Constify.
207 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
209 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
210 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
211 * remote-utils.h (read_ptid): Constify.
212 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
213 (process_point_options, process_serial_event): Constify.
214 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
215 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
216 (cmd_qtbuffer): Constify.
218 2017-09-29 Pedro Alves <palves@redhat.com>
220 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
223 2017-09-29 Pedro Alves <palves@redhat.com>
225 * linux-low.c (handle_extended_wait): Pass parent thread instead
226 of process to thread_db_notice_clone.
227 * linux-low.h (thread_db_notice_clone): Replace parent process
228 parameter with parent thread parameter.
229 * thread-db.c (find_one_thread): Add comment.
230 (thread_db_notice_clone): Replace parent process parameter with
231 parent thread parameter. Temporarily switch to the parent thread.
233 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
235 * gdbthread.h: Include "common-gdbthread.h".
236 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
237 "if" when validating the ptid.
238 * remote-utils.c: Include "gdbthread.h".
239 (prepare_resume_reply): Use "switch_to_thread".
240 * target.c (done_accessing_memory): Likewise.
242 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
244 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
245 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
246 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
247 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
248 s390x-gs-linux64-ipa.o to ipa_obj.
249 * linux-s390-low.c (HWCAP_S390_GS): New define.
250 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
252 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
253 (s390_arch_setup): Check for guarded-storage support and choose
255 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
256 init_registers_s390x_gs_linux64.
257 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
259 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
260 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
262 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
264 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
266 2017-09-21 Kevin Buettner <kevinb@redhat.com>
268 * linux-low.h (struct lwp_info): Add new field, thread_handle.
269 (thread_db_thread_handle): Declare.
270 * linux-low.c (linux_target_ops): Initialize thread_handle.
271 * server.c (handle_qxfer_threads_worker): Add support for
273 * target.h (struct target_ops): Add new function pointer,
275 (target_thread_handle): Define.
276 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
278 (thread_db_thread_handle): New function.
280 2017-09-21 Kevin Buettner <kevinb@redhat.com>
282 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
283 * linux-low.h (thread_db_notice_clone): Declare.
284 * thread-db.c (thread_db_notice_clone): New function.
286 2017-09-21 Pedro Alves <palves@redhat.com>
288 * server.c (gdb_read_memory, handle_status, process_serial_event)
289 (handle_serial_event, handle_target_event): Adjust to
290 set_desired_thread prototype change.
291 * target.c (set_desired_thread): Remove 'use_general' parameter
293 * target.h (set_desired_thread): Remove 'use_general' parameter.
295 2017-09-20 Tom Tromey <tom@tromey.com>
297 * target.c (target_terminal::terminal_state): Define.
298 (target_terminal::init): Rename from target_terminal_init.
299 (target_terminal::inferior): Rename from
300 target_terminal_inferior.
301 (target_terminal::ours): Rename from target_terminal_ours.
302 (target_terminal::ours_for_output, target_terminal::info): New.
304 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
306 * server.c (accumulate_file_name_length): Remove.
307 (emit_dll_description): Adjust to std::string change.
308 (handle_qxfer_libraries): Use std::string to hold document.
310 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
312 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
313 return type of xml_escape_text.
314 * server.c (emit_dll_description): Likewise.
316 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
318 * server.c (captured_main): Accept argument for --selftest.
319 Update run_tests call.
320 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
321 when registering selftests.
323 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
325 * regcache.c (get_thread_regcache): Update code to use "std::vector"
326 instead of "VEC" for "target_desc.reg_defs".
327 (regcache_cpy): Likewise.
328 (registers_to_string): Likewise.
329 (registers_from_string): Likewise.
330 (find_regno): Likewise.
331 (supply_regblock): Likewise.
332 (regcache_raw_read_unsigned): Likewise.
333 * tdesc.c (init_target_desc): Likewise.
334 (tdesc_create_reg): Likewise.
335 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
336 (struct target_desc) <reg_defs>: Convert to "std::vector".
337 (target_desc): Do not initialize "reg_defs".
338 (~target_desc): Update code to use "std::vector" instead of "VEC"
339 for "target_desc.reg_defs".
340 (operator==): Likewise.
342 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
344 * inferiors.h (thread_to_gdb_id): Remove.
345 * inferiors.c (thread_to_gdb_id): Remove.
346 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
347 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
348 lynx_store_registers, lynx_read_memory, lynx_write_memory):
350 * nto-low.c (nto_fetch_registers, nto_store_registers,
351 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
353 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
355 * inferiors.h (gdb_id_to_thread_id): Remove.
356 * inferiors.c (gdb_id_to_thread_id): Remove.
357 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
358 removal. Move pid declaration closer to where it's used.
360 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
362 * server.c (handle_detach): New function.
363 (process_serial_event): Move code out, call handle_detach.
365 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
367 * server.c (require_running): Rename to ...
368 (require_running_or_return): ... this ...
369 (require_running_or_break): ... and this.
370 (handle_query, process_serial_event): Adjust.
372 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
374 * linux-low.c (linux_set_resume_request): Remove unused
377 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
379 * server.c (first_thread_of): Remove.
380 (process_serial_event): Replace usage of first_thread_of with
381 find_any_thread_of_pid.
382 * tracepoint.c (same_process_p): Remove.
383 (gdb_agent_about_to_close): Replace usage of same_process_p with
384 find_any_thread_of_pid.
385 * linux-x86-low.c (same_process_callback): Remove.
386 (x86_arch_setup_process_callback): Replace usage of
387 same_process_callback with find_any_thread_of_pid.
388 * thread-db.c (any_thread_of): Remove.
389 (switch_to_process): Replace usage of any_thread_of with
390 find_any_thread_of_pid.
391 * inferiors.c (thread_pid_matches_callback): Remove.
392 (find_thread_process): Adjust to use find_any_thread_of_pid.
394 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
396 * regcache.c (get_thread_regcache): Guard calls to "memset"
399 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
401 * linux-low.c (handle_extended_wait): Use
402 "allocate_target_description" instead of "XNEW".
403 * linux-x86-low.c (initialize_low_arch): Likewise.
405 2017-09-05 Yao Qi <yao.qi@linaro.org>
407 * configure.srv (srv_i386_regobj): Remove.
408 (srv_amd64_regobj): Remove.
409 (srv_regobj): Set it to "" for x86 non-linux targets.
410 * linux-x86-tdesc.c (i386_linux_read_description):
411 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
412 (init_registers_i386): Remove the declaration.
413 (tdesc_i386): Remove the declaration.
414 (lynx_i386_arch_setup): Call i386_create_target_description.
415 * nto-x86-low.c: Likewise.
416 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
417 [!__x86_64__]: include arch/i386.h.
418 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
420 2017-09-05 Yao Qi <yao.qi@linaro.org>
422 * configure.srv (srv_amd64_linux_xmlfiles): Remove
423 i386/amd64-XXX-linux from it.
425 2017-09-05 Yao Qi <yao.qi@linaro.org>
427 * configure.srv: Empty srv_amd64_linux_regobj if $development is
429 (ipa_amd64_linux_regobj): Remove.
430 (ipa_x32_linux_regobj): Remove.
432 2017-09-05 Yao Qi <yao.qi@linaro.org>
434 * Makefile.in (arch-amd64.o): New rule.
435 * configure.srv: Append arch-amd64.o.
436 * linux-amd64-ipa.c: Include common/x86-xstate.h.
437 (get_ipa_tdesc): Call amd64_linux_read_description.
438 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
439 and init_registers_amd64_XXX.
440 * linux-x86-low.c (x86_linux_read_description): Call
441 amd64_linux_read_description.
442 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
443 (initialize_low_arch): Don't call init_registers_x32_XXX and
444 init_registers_amd64_XXX.
445 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
447 [__x86_64__] (amd64_tdesc_test): New function.
448 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
449 and init_registers_amd64_XXX.
450 * linux-x86-tdesc.c: Include arch/amd64.h.
451 (xcr0_to_tdesc_idx): New function.
452 (i386_linux_read_description): New function.
453 (amd64_get_ipa_tdesc_idx): New function.
454 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
455 (amd64_get_ipa_tdesc): Declare.
457 2017-09-05 Yao Qi <yao.qi@linaro.org>
459 * configure.srv (srv_i386_linux_xmlfiles): Remove
460 i386/i386-XXX-linux.xml from it.
462 2017-09-05 Yao Qi <yao.qi@linaro.org>
464 * configure.srv: Set srv_i386_linux_regobj empty if $development
466 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
467 initialize_low_tdesc.
468 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
469 with #if initialize_low_tdesc.
470 * linux-x86-tdesc-selftest.c: New file.
471 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
473 2017-09-05 Yao Qi <yao.qi@linaro.org>
475 * Makefile.in (arch-i386.o): New rule.
476 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
477 (x86_64-*-linux*): Likewise.
478 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
480 (i386_linux_read_description): Remove code and call
481 i386_create_target_description.
482 * tdesc.c (allocate_target_description): New function.
483 * tdesc.h (set_tdesc_architecture): Remove declaration.
484 (set_tdesc_osabi): Likewise.
486 2017-09-05 Yao Qi <yao.qi@linaro.org>
488 * linux-x86-tdesc.c: Don't include <inttypes.h>.
489 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
490 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
492 * server.c (get_features_xml): Call tdesc_get_features_xml.
493 * tdesc.c (set_tdesc_architecture): New function.
494 (set_tdesc_osabi): New function.
495 (tdesc_get_features_xml): New function.
496 (tdesc_create_feature): Add an argument.
497 * tdesc.h (struct target_desc) <features>: New field.
498 <arch, osabi>: New field.
499 (~target_desc): xfree features, arch, and osabi.
500 (target_desc::oerator==): Don't compare .xmltarget.
501 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
502 (set_tdesc_osabi): Likewise.
503 (tdesc_get_features_xml): Likewise.
505 2017-09-05 Yao Qi <yao.qi@linaro.org>
507 * linux-x86-tdesc.c: Include selftest.h.
508 (i386_tdesc_test): New function.
509 (initialize_low_tdesc): Call selftests::register_test.
510 * tdesc.h: Include regdef.h.
511 (target_desc): Override operator == and !=.
513 2017-09-05 Yao Qi <yao.qi@linaro.org>
515 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
517 * linux-i386-ipa.c: Include common/x86-xstate.h
518 (get_ipa_tdesc): Call i386_linux_read_description.
519 (initialize_low_tracepoint): Don't call init_registers_XXX
520 functions, call initialize_low_tdesc instead.
521 * linux-x86-low.c (x86_linux_read_description): Call
522 i386_linux_read_description.
523 (initialize_low_arch): Don't call init_registers_i386_XXX
524 functions, call initialize_low_tdesc.
525 * linux-x86-tdesc.c: New file.
526 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
527 (i386_get_ipa_tdesc_idx): Declare.
528 (i386_get_ipa_tdesc): Declare.
529 (initialize_low_tdesc): Declare.
531 2017-09-05 Yao Qi <yao.qi@linaro.org>
533 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
536 2017-09-05 Yao Qi <yao.qi@linaro.org>
538 * Makefile.in (IPA_OBJS): Add vec-ipa.o
539 * regcache.c (get_thread_regcache): Use VEC_length.
540 (init_register_cache): Likewise.
541 (regcache_cpy): Likewise.
542 (registers_to_string): Iterate reg_defs via VEC_iterate.
543 (find_regno): Likewise.
544 (find_register_by_number): Use VEC_index.
545 (register_size): Call find_register_by_number.
546 (register_data): Call find_register_by_number.
547 (supply_regblock): Use VEC_length.
548 (regcache_raw_read_unsigned): Likewise.
549 * tdesc.c (init_target_desc): Iterate reg_defs via
551 (default_description): Update initializer.
552 (copy_target_description): Don't update field num_registers.
553 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
554 <num_registers>: Remove.
556 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
558 * Makefile.in (.SECONDARY): Define target.
560 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
562 * linux-low.c (linux_wait_1): Adjust.
563 * server.c (queue_stop_reply_callback): Adjust.
565 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
567 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
568 QEnvironmentUnset and QEnvironmentReset packets.
569 (handle_query): Inform remote that QEnvironmentHexEncoded,
570 QEnvironmentUnset and QEnvironmentReset are supported.
572 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
574 * inferiors.h (inferior_target_data): Rename to ...
575 (thread_target_data): ... this.
576 (inferior_regcache_data): Rename to ...
577 (thread_regcache_data): ... this.
578 (set_inferior_regcache_data): Rename to ...
579 (set_thread_regcache_data): ... this.
580 * inferiors.c (inferior_target_data): Rename to ...
581 (thread_target_data): ... this.
582 (inferior_regcache_data): Rename to ...
583 (thread_regcache_data): ... this.
584 (set_inferior_regcache_data): Rename to ...
585 (set_thread_regcache_data): ... this.
586 (free_one_thread): Update.
587 * linux-low.h (get_thread_lwp): Update.
588 * regcache.c (get_thread_regcache): Update.
589 (regcache_invalidate_thread): Update.
590 (free_register_cache_thread): Update.
591 * win32-i386-low.c (update_debug_registers_callback): Update.
592 (win32_get_current_dr): Update.
593 * win32-low.c (thread_rec): Update.
594 (delete_thread_info): Update.
595 (continue_one_thread): Update.
596 (suspend_one_thread): Update.
598 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
600 * inferiors.c (set_inferior_target_data): Remove.
601 * inferiors.h (set_inferior_target_data): Remove.
603 2017-08-18 Yao Qi <yao.qi@linaro.org>
605 * Makefile.in (OBS): Add selftest.o.
606 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
607 * configure, config.in: Re-generated.
608 * server.c: Include common/sefltest.h.
609 (captured_main): Handle option --selftest.
611 2017-08-09 Yao Qi <yao.qi@linaro.org>
613 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
614 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
615 i386-avx-mpx.o and i386-mmx.o.
616 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
617 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
618 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
619 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
620 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
621 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
622 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
623 i386/amd64-avx-mpx.xml.
625 2017-08-09 Yao Qi <yao.qi@linaro.org>
627 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
628 and x32-avx-avx512.o.
629 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
630 i386/x32-avx-avx512.xml.
632 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
634 * tracepoint.h (enum class fast_tpoint_collect_result): New
636 (fast_tracepoint_collecting): Change return type to
637 fast_tpoint_collect_result.
638 * tracepoint.c (fast_tracepoint_collecting): Likewise.
639 * linux-low.h: Include tracepoint.h.
640 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
641 fast_tpoint_collect_result.
642 * linux-low.c (handle_tracepoints): Adjust.
643 (linux_fast_tracepoint_collecting): Change return type to
644 fast_tpoint_collect_result.
645 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
646 linux_wait_1, stuck_in_jump_pad_callback,
647 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
648 proceed_one_lwp): Adjust to type change.
650 2017-07-10 Yao Qi <yao.qi@linaro.org>
652 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
654 2017-06-29 Yao Qi <yao.qi@linaro.org>
656 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
658 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
660 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
662 * Makefile.in (IPA_OBJS): Sort and format one item per line.
664 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
666 * linux-low.c (linux_create_inferior): Adjust code to access the
667 environment information via 'gdb_environ' class.
668 * lynx-low.c (lynx_create_inferior): Likewise.
669 * server.c (our_environ): Make it an instance of 'gdb_environ'.
670 (get_environ): Return a pointer to 'our_environ'.
671 (captured_main): Initialize 'our_environ'.
672 * server.h (get_environ): Adjust prototype.
673 * spu-low.c (spu_create_inferior): Adjust code to access the
674 environment information via 'gdb_environ' class.
676 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
678 * linux-low.c (linux_read_memory, linux_write_memory): Remove
679 usage of "register" keyword.
681 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
683 * configure: Re-generate.
685 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
687 * configure: Re-generate.
689 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
691 * Makefile.in (COMPILE.pre): Add "-x c++".
693 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
695 * fork-child.c: Conditionally include <signal.h>.
697 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
699 * server.c (handle_general_set): Handle new packet
701 (handle_query): Add "QStartupWithShell" to the list of supported
703 (gdbserver_usage): Add help text explaining the
704 new "--startup-with-shell" and "--no-startup-with-shell" CLI
706 (captured_main): Recognize and act upon the presence of the new
709 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
710 Pedro Alves <palves@redhat.com>
712 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
713 * configure: Regenerate.
714 * configure.srv (srv_linux_obj): Add "fork-child.o" and
716 (i[34567]86-*-lynxos*): Likewise.
717 (spu*-*-*): Likewise.
718 * fork-child.c: New file.
719 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
721 (linux_ptrace_fun): New function.
722 (linux_create_inferior): Adjust function prototype to reflect
723 change on "target.h". Adjust function code to use
725 (linux_request_interrupt): Delete "signal_pid".
726 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
727 (lynx_ptrace_fun): New function.
728 (lynx_create_inferior): Adjust function prototype to reflect
729 change on "target.h". Adjust function code to use
731 * nto-low.c (nto_create_inferior): Adjust function prototype and
732 code to reflect change on "target.h". Update comments.
733 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
734 "common-terminal.h" and "environ.h".
735 (terminal_fd): Moved to fork-child.c.
736 (old_foreground_pgrp): Likewise.
737 (restore_old_foreground_pgrp): Likewise.
738 (last_status): Make it global.
739 (last_ptid): Likewise.
740 (our_environ): New variable.
741 (startup_with_shell): Likewise.
742 (program_name): Likewise.
743 (program_argv): Rename to...
744 (program_args): ...this.
745 (wrapper_argv): New variable.
746 (start_inferior): Delete function.
747 (get_exec_wrapper): New function.
748 (get_exec_file): Likewise.
749 (get_environ): Likewise.
750 (prefork_hook): Likewise.
751 (post_fork_inferior): Likewise.
752 (postfork_hook): Likewise.
753 (postfork_child_hook): Likewise.
754 (handle_v_run): Update code to deal with arguments coming from the
755 remote host. Update calls from "start_inferior" to
757 (captured_main): Likewise. Initialize environment variable. Call
759 * server.h (post_fork_inferior): New prototype.
760 (get_environ): Likewise.
761 (last_status): Declare.
762 (last_ptid): Likewise.
763 (signal_pid): Likewise.
764 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
765 (spu_ptrace_fun): New function.
766 (spu_create_inferior): Adjust function prototype to reflect change
767 on "target.h". Adjust function code to use "fork_inferior".
768 * target.c (target_terminal_init): New function.
769 (target_terminal_inferior): Likewise.
770 (target_terminal_ours): Likewise.
771 * target.h: Include <vector>.
772 (struct target_ops) <create_inferior>: Update prototype.
773 (create_inferior): Update macro.
774 * utils.c (gdb_flush_out_err): New function.
775 * win32-low.c (win32_create_inferior): Adjust function prototype
776 and code to reflect change on "target.h".
778 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
780 * inferiors.c (switch_to_thread): New function.
782 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
784 * Makefile.in (SFILE): Add "common/job-control.c".
785 (OBS): Add "job-control.o".
787 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
789 * Makefile: Remove "@host_makefile_frag@".
791 2017-05-05 Pedro Alves <palves@redhat.com>
793 * configure: Regenerate.
795 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
797 * configure: Regenerate.
799 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
801 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
802 software_single_step change of return type to
803 std::vector<CORE_ADDR>.
804 * linux-low.c (install_software_single_step_breakpoints):
806 * linux-low.h (install_software_single_step_breakpoints):
809 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
811 * remote-utils.c: Include "gdb_termios.h" instead of
813 * terminal.h: Delete file.
815 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
817 * server.c: Include <vector>.
818 <program_argv, wrapper_argv>: Convert to std::vector.
819 (start_inferior): Rewrite function to use C++.
820 (handle_v_run): Likewise. Update code that calculates the argv
821 based on the vRun packet; use C++.
822 (captured_main): Likewise.
824 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
826 * server.c (handle_v_cont): Initialize thread_resume::thread
829 2017-04-05 Pedro Alves <palves@redhat.com>
831 * configure: Regenerate.
833 2017-04-05 Pedro Alves <palves@redhat.com>
835 * gdbreplay.c (sync_error): Constify.
836 * linux-x86-low.c (push_opcode): Constify.
838 2017-04-05 Pedro Alves <palves@redhat.com>
840 * win32-low.c (get_child_debug_event)
841 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
842 Report TARGET_WAITKIND_SPURIOUS instead.
844 2017-04-05 Pedro Alves <palves@redhat.com>
846 * remote-utils.c (remote_prepare, remote_open): Constify.
847 * remote-utils.h (remote_prepare, remote_open): Constify.
848 * server.c (captured_main): Constify 'port' handling.
850 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
852 * Makefile.in (clean): Clear .deps.
854 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
856 * .gitignore: Remove generated files, replace with wildcard.
857 * (clean): Replace removal of generated files with wildcard.
858 (version.c): Replace with...
859 (version-generated.c): ...this.
860 (xml-builtin.c): Replace with...
861 (xml-builtin-generated.c): ...this.
862 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
863 (%.c: *regformats*): Replace with...
864 (%-generated.c: *regformats*): ...this.
866 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
868 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
869 (xtensa_fill_gregset): Call collect_register_by_name for
871 (xtensa_store_gregset): Call supply_register_by_name for
874 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
876 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
877 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
878 (xtensa_store_gregset): Call supply_register for all registers in
879 a0_regnum..a0_regnum + C0_NREGS range.
881 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
883 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
884 (ax-ipa.o: ax.c): Remove.
885 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
886 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
887 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
888 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
889 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
891 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
893 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
894 (print-utils-ipa.o: ../common/print-utils.c): Remove.
895 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
896 (errors-ipa.o: ../common/errors.c): Remove.
897 (format-ipa.o: ../common/format.c): Remove.
898 (common-utils-ipa.o: ../common/common-utils.c): Remove.
900 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
902 * Makefile.in (%-ipa.o: %.c): New rule.
903 (tracepoint-ipa.o: tracepoint.c): Remove.
904 (utils-ipa.o: utils.c): Remove.
905 (remote-utils-ipa.o: remote-utils.c): Remove.
906 (regcache-ipa.o: regcache.c): Remove.
907 (i386-linux-ipa.o: i386-linux.c): Remove.
908 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
909 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
910 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
911 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
912 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
913 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
914 (amd64-linux-ipa.o: amd64-linux.c): Remove.
915 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
916 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
917 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
918 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
919 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
920 (aarch64-ipa.o: aarch64.c): Remove.
921 (s390-linux32-ipa.o: s390-linux32.c): Remove.
922 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
923 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
924 (s390-linux64-ipa.o: s390-linux64.c): Remove.
925 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
926 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
927 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
928 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
929 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
930 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
931 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
932 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
933 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
934 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
935 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
936 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
937 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
938 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
939 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
940 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
941 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
942 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
943 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
944 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
945 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
946 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
947 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
948 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
949 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
950 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
951 (tdesc-ipa.o: tdesc.c): Remove.
952 (x32-linux-ipa.o: x32-linux.c): Remove.
953 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
954 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
956 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
958 * Makefile.in (%.o: ../arch/%.c): New rule.
959 (arm.o: ../arch/arm.c): Remove.
960 (arm-linux.o: ../arch/arm-linux.c): Remove.
961 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
962 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
964 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
966 * Makefile.in (%.o: ../nat/%.c): New rule.
967 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
968 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
969 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
970 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
971 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
972 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
973 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
974 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
975 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
976 (linux-personality.o: ../nat/linux-personality.c): Remove.
977 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
978 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
979 (x86-linux.o: ../nat/x86-linux.c): Remove.
980 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
981 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
983 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
985 * Makefile.in (%.o: ../common/%.c): New rule.
986 (signals.o: ../common/signals.c): Remove.
987 (print-utils.o: ../common/print-utils.c): Remove.
988 (rsp-low.o: ../common/rsp-low.c): Remove.
989 (common-utils.o: ../common/common-utils.c): Remove.
990 (posix-strerror.o: ../common/posix-strerror.c): Remove.
991 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
992 (vec.o: ../common/vec.c): Remove.
993 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
994 (xml-utils.o: ../common/xml-utils.c): Remove.
995 (ptid.o: ../common/ptid.c): Remove.
996 (buffer.o: ../common/buffer.c): Remove.
997 (format.o: ../common/format.c): Remove.
998 (filestuff.o: ../common/filestuff.c): Remove.
999 (agent.o: ../common/agent.c): Remove.
1000 (errors.o: ../common/errors.c): Remove.
1001 (environ.o: ../common/environ.c): Remove.
1002 (common-debug.o: ../common/common-debug.c): Remove.
1003 (cleanups.o: ../common/cleanups.c): Remove.
1004 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1005 (fileio.o: ../common/fileio.c): Remove.
1006 (common-regcache.o: ../common/common-regcache.c): Remove.
1007 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1008 (new-op.o: ../common/new-op.c): Remove.
1009 (btrace-common.o: ../common/btrace-common.c): Remove.
1011 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1013 * Makefile.in (%.o: ../target/%.c): New rule.
1014 (waitstatus.o: ../target/waitstatus.c): Remove.
1016 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1019 (%.c: ../regformats/%.dat,
1020 (%.c: ../regformats/arm/%.dat,
1021 (%.c: ../regformats/i386/%.dat,
1022 (%.c: ../regformats/rs6000/%.dat): New rules.
1023 (aarch64.c): Remove.
1024 (reg-arm.c): Remove.
1025 (arm-with-iwmmxt.c): Remove.
1026 (arm-with-vfpv2.c): Remove.
1027 (arm-with-vfpv3.c): Remove.
1028 (arm-with-neon.c): Remove.
1029 (reg-bfin.c): Remove.
1030 (reg-cris.c): Remove.
1031 (reg-crisv32.c): Remove.
1033 (i386-linux.c): Remove.
1034 (i386-avx.c): Remove.
1035 (i386-avx-linux.c): Remove.
1036 (i386-avx-avx512.c): Remove.
1037 (i386-avx-avx512-linux.c): Remove.
1038 (i386-mpx.c): Remove.
1039 (i386-mpx-linux.c): Remove.
1040 (i386-avx-mpx-avx512-pku.c): Remove.
1041 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1042 (i386-avx-mpx.c): Remove.
1043 (i386-avx-mpx-linux.c): Remove.
1044 (i386-mmx.c): Remove.
1045 (i386-mmx-linux.c): Remove.
1046 (reg-ia64.c): Remove.
1047 (reg-m32r.c): Remove.
1048 (reg-m68k.c): Remove.
1050 (mips-linux.c): Remove.
1051 (mips-dsp-linux.c): Remove.
1052 (mips64-linux.c): Remove.
1053 (mips64-dsp-linux.c): Remove.
1054 (nios2-linux.c): Remove.
1055 (powerpc-32.c): Remove.
1056 (powerpc-32l.c): Remove.
1057 (powerpc-altivec32l.c): Remove.
1058 (powerpc-cell32l.c): Remove.
1059 (powerpc-vsx32l.c): Remove.
1060 (powerpc-isa205-32l.c): Remove.
1061 (powerpc-isa205-altivec32l.c): Remove.
1062 (powerpc-isa205-vsx32l.c): Remove.
1063 (powerpc-e500l.c): Remove.
1064 (powerpc-64l.c): Remove.
1065 (powerpc-altivec64l.c): Remove.
1066 (powerpc-cell64l.c): Remove.
1067 (powerpc-vsx64l.c): Remove.
1068 (powerpc-isa205-64l.c): Remove.
1069 (powerpc-isa205-altivec64l.c): Remove.
1070 (powerpc-isa205-vsx64l.c): Remove.
1071 (s390-linux32.c): Remove.
1072 (s390-linux32v1.c): Remove.
1073 (s390-linux32v2.c): Remove.
1074 (s390-linux64.c): Remove.
1075 (s390-linux64v1.c): Remove.
1076 (s390-linux64v2.c): Remove.
1077 (s390-te-linux64.c): Remove.
1078 (s390-vx-linux64.c): Remove.
1079 (s390-tevx-linux64.c): Remove.
1080 (s390x-linux64.c): Remove.
1081 (s390x-linux64v1.c): Remove.
1082 (s390x-linux64v2.c): Remove.
1083 (s390x-te-linux64.c): Remove.
1084 (s390x-vx-linux64.c): Remove.
1085 (s390x-tevx-linux64.c): Remove.
1086 (tic6x-c64xp-linux.c): Remove.
1087 (tic6x-c64x-linux.c): Remove.
1088 (tic6x-c62x-linux.c): Remove.
1090 (reg-sparc64.c): Remove.
1091 (reg-spu.c): Remove.
1093 (amd64-linux.c): Remove.
1094 (amd64-avx.c): Remove.
1095 (amd64-avx-linux.c): Remove.
1096 (amd64-avx-avx512.c): Remove.
1097 (amd64-avx-avx512-linux.c): Remove.
1098 (amd64-mpx.c): Remove.
1099 (amd64-mpx-linux.c): Remove.
1100 (amd64-avx-mpx-avx512-pku.c): Remove.
1101 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1102 (amd64-avx-mpx.c): Remove.
1103 (amd64-avx-mpx-linux.c): Remove.
1105 (x32-linux.c): Remove.
1106 (x32-avx.c): Remove.
1107 (x32-avx-linux.c): Remove.
1108 (x32-avx-avx512.c): Remove.
1109 (x32-avx-avx512-linux.c): Remove.
1110 (reg-xtensa.c): Remove.
1111 (reg-tilegx.c): Remove.
1112 (reg-tilegx32.c): Remove.
1114 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1116 * Makefile.in (SFILES): Add "common/environ.c".
1117 (OBJS): Add "common/environ.h".
1119 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1121 * configure.ac: Check if the fs_base and gs_base members of
1122 `struct user_regs_struct' exist.
1123 * config.in: Regenerated.
1124 * configure: Likewise.
1126 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1128 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1130 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1131 (get_next_pcs_syscall_next_pc): Likewise.
1133 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1135 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1136 * nto-x86-low.c: Likewise.
1138 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1140 * Makefile.in: Include disable-implicit-rules.mk.
1142 2016-11-23 Pedro Alves <palves@redhat.com>
1144 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1145 (debug_vprintf): Use std::chrono::steady_clock instead of
1146 gettimeofday. Use '.' instead of ':'.
1147 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1148 (get_timestamp): Use std::chrono::steady_clock instead of
1151 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1153 * Makefile.in: Fix whitespace formatting.
1155 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1157 * Makefile.in (SFILES, OBS): Flatten list and order
1160 2016-11-23 Pedro Alves <palves@redhat.com>
1162 * event-loop.c (handle_file_event): Use warning.
1163 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1164 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1167 2016-11-23 Pedro Alves <palves@redhat.com>
1169 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1171 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1172 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1173 debug_printf and debug_flush for debug output.
1174 * server.c (handle_general_set): Likewise.
1175 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1178 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1180 * Makefile.in (.c.o): Replace rule with ...
1181 (%.o: %.c): ... this one.
1183 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1185 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1186 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1188 * configure.ac: Remove checks for the make program.
1189 * configure: Re-generate.
1191 2016-10-28 Pedro Alves <palves@redhat.com>
1193 * Makefile.in (CXX_DIALECT): Get from configure.
1194 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1195 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1196 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1197 * config.in: Regenerate.
1198 * configure: Regenerate.
1200 2016-10-27 Yao Qi <yao.qi@linaro.org>
1202 * linux-low.c (linux_supports_range_stepping): Return true if
1203 can_software_single_step return true.
1205 2016-10-27 Yao Qi <yao.qi@linaro.org>
1207 * inferiors.c (find_inferior_in_random): New function.
1208 * inferiors.h (find_inferior_in_random): Declare.
1209 * linux-low.c (linux_wait_for_event_filtered): Call
1210 find_inferior_in_random instead of find_inferior.
1212 2016-10-27 Yao Qi <yao.qi@linaro.org>
1214 * linux-low.c (linux_wait_1): If single-step breakpoints are
1215 inserted, remove them.
1217 2016-10-26 Pedro Alves <palves@redhat.com>
1219 * linux-low.c (handle_extended_wait): Link parent/child fork
1221 (linux_wait_1): Unlink them.
1222 (linux_set_resume_request): Ignore resume requests for
1223 already-resumed and unhandled fork child threads.
1224 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1225 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1227 (handle_v_requests) <vCont>: Don't call require_running.
1228 * server.h (in_queued_stop_replies): New declaration.
1230 2016-10-24 Yao Qi <yao.qi@linaro.org>
1233 * linux-aarch64-low.c (append_insns): Cast the return value to
1236 2016-10-10 Yao Qi <yao.qi@linaro.org>
1238 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1240 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1242 * target.c (target_supports_multi_process): New function, moved
1244 * target.h (target_supports_multi_process): ... here. Remove
1247 2016-10-05 Tom Tromey <tom@tromey.com>
1250 * tracepoint.c (handle_tracepoint_bkpts): Check
1251 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1253 2016-10-05 Yao Qi <yao.qi@linaro.org>
1255 * configure.srv: Update the path of arm-*.xml files.
1257 2016-10-05 Terry Guo <terry.guo@arm.com>
1258 Yao Qi <yao.qi@linaro.org>
1260 * Makefile.in: Adjust the path of rules.
1261 * configure.srv: Update the path of xml files.
1262 * regformats/arm-with-iwmmxt.dat: Regenerated.
1263 * regformats/arm-with-neon.dat: Likewise.
1264 * regformats/arm-with-vfpv2.dat: Likewise.
1265 * regformats/arm-with-vfpv3.dat Likewise.
1267 2016-09-30 Yao Qi <yao.qi@linaro.org>
1270 * target.c (target_stop_and_wait): Don't call
1271 target_continue_no_signal, use resume_stop instead.
1273 2016-09-26 Yao Qi <yao.qi@linaro.org>
1275 * linux-low.c (linux_wait_1): Call debug_exit.
1277 2016-09-23 Pedro Alves <palves@redhat.com>
1279 * Makefile.in (SFILES): Add common/new-op.c.
1280 (OBS): Add common/new-op.o.
1281 (new-op.o): New rule.
1283 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1285 * .gitinore: Ignore more files.
1287 2016-09-21 Yao Qi <yao.qi@linaro.org>
1289 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1292 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1294 * server.c (start_inferior): Call target_mourn_inferior instead of
1295 mourn_inferior; pass ptid_t argument to it.
1297 (handle_target_event): Likewise.
1298 * target.c (target_mourn_inferior): New function.
1299 * target.h (mourn_inferior): Delete macro.
1301 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1303 * linux-low.c (lwp_is_stepping): New function.
1305 2016-09-06 Carl Love <cel@us.ibm.com>
1307 * server.c (start_inferior): Fixed comment, requested comment change
1308 didn't get updated correctly. Removed reference to ptrace () call as
1309 it is only true on Linux systems.
1311 2016-09-06 Carl Love <cel@us.ibm.com>
1313 * server.c (start_inferior): Do not call
1314 function target_post_create_inferior () if the
1315 inferior process has already exited.
1317 2016-09-05 Pedro Alves <palves@redhat.com>
1319 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1320 (COMPILE.pre, CC_LD): Use CXX directly.
1321 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1322 * acinclude.m4: Don't include build-with-cxx.m4.
1323 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1324 * configure: Regenerate.
1326 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1329 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1330 call writing data to own_buf.
1332 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1334 * target.c (mywait): Call target_wait instead of
1336 (target_wait): New function.
1338 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1340 * server.c (start_inferior): New variable 'ptid'. Replace calls
1341 to the_target->resume by target_continue{,_no_signal}, depending
1343 * target.c (target_stop_and_wait): Call target_continue_no_signal
1344 instead of the_target->resume.
1345 (target_continue): New function.
1347 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1349 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1351 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1354 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1356 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1357 * linux-arm-low.c (ps_get_thread_area): Likewise.
1358 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1359 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1360 * linux-mips-low.c (ps_get_thread_area): Likewise.
1361 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1362 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1363 * linux-x86-low.c (ps_get_thread_area): Likewise.
1364 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1366 2016-08-19 Pedro Alves <palves@redhat.com>
1368 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1370 2016-08-19 Pedro Alves <palves@redhat.com>
1372 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1373 comment. Use memcpy instead of casting through unsigned long.
1375 2016-08-19 Pedro Alves <palves@redhat.com>
1377 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1378 allocating around 0x80000000.
1380 2016-08-19 Pedro Alves <palves@redhat.com>
1383 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1384 (x32-avx512-linux-ipa.o): New rules.
1385 * configure.ac (x86_64-*-linux*): New x32 check.
1386 * configure.srv (ipa_x32_linux_regobj): New.
1387 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1388 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1390 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1392 * configure: Regenerate.
1394 2016-08-09 Pedro Alves <palves@redhat.com>
1397 * Makefile.in (OBS): Add signals-state-save-restore.o.
1398 (signals-state-save-restore.o): New rule.
1399 * config.in: Regenerate.
1400 * configure: Regenerate.
1401 * linux-low.c: Include "signals-state-save-restore.h".
1402 (linux_create_inferior): Call
1403 restore_original_signals_state.
1404 * server.c: Include "dispositions-save-restore.h".
1405 (captured_main): Call save_original_signals_state.
1407 2016-08-05 Pedro Alves <palves@redhat.com>
1409 * configure: Regenerate.
1411 2016-08-04 Yao Qi <yao.qi@linaro.org>
1413 * linux-low.c (regsets_fetch_inferior_registers): Check
1414 errno is ESRCH or not.
1416 2016-08-02 Yao Qi <yao.qi@linaro.org>
1418 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1419 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1420 (thread_db_load_search): Update.
1421 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1422 td_ta_set_event and td_ta_event_getmsg.
1424 2016-07-26 Pedro Alves <palves@redhat.com>
1427 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1428 of unsigned long for 64-bit registers and use uint32_t instead of
1429 unsigned int for 32-bit registers.
1431 2016-07-26 Pedro Alves <palves@redhat.com>
1433 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1436 2016-07-21 Tom Tromey <tom@tromey.com>
1438 * configure: Rebuild.
1440 2016-07-21 Yao Qi <yao.qi@linaro.org>
1442 * mem-break.c (find_gdb_breakpoint): Cast bp to
1443 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1445 2016-07-21 Yao Qi <yao.qi@linaro.org>
1447 * server.c (handle_v_requests): Support s and S actions
1448 if target_supports_software_single_step return true.
1450 2016-07-21 Yao Qi <yao.qi@linaro.org>
1452 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1453 is resume_step, call maybe_hw_step.
1454 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1456 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1458 (proceed_one_lwp): If resume request is resume_step, install
1459 reinsert breakpoints and call maybe_hw_step.
1461 2016-07-21 Yao Qi <yao.qi@linaro.org>
1463 * linux-low.c (proceed_one_lwp): Declare.
1464 (linux_resume_one_thread): Remove local variable 'step'.
1465 Lift code enqueue signal. Call proceed_one_lwp instead of
1466 linux_resume_one_lwp.
1468 2016-07-21 Yao Qi <yao.qi@linaro.org>
1470 * linux-low.c (linux_resume_one_thread): Call
1471 enqueue_pending_signal.
1473 2016-07-21 Yao Qi <yao.qi@linaro.org>
1475 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1476 * inferiors.c (do_restore_current_thread_cleanup): New function.
1477 (make_cleanup_restore_current_thread): Likewise.
1478 * linux-low.c (install_software_single_step_breakpoints): Call
1479 make_cleanup_restore_current_thread. Switch current_thread to
1482 2016-07-21 Yao Qi <yao.qi@linaro.org>
1484 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1485 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1486 (clone_one_breakpoint): Likewise.
1487 (delete_reinsert_breakpoints): Change parameter to thread.
1489 (has_reinsert_breakpoints): Likewise.
1490 (uninsert_reinsert_breakpoints): Likewise.
1491 (reinsert_reinsert_breakpoints): Likewise.
1492 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1493 (delete_reinsert_breakpoints): Likewise.
1494 (reinsert_reinsert_breakpoints): Likewise.
1495 (uninsert_reinsert_breakpoints): Likewise.
1496 (has_reinsert_breakpoints): Likewise.
1498 2016-07-21 Yao Qi <yao.qi@linaro.org>
1500 * inferiors.c (get_thread_process): Make parameter const.
1501 * inferiors.h (get_thread_process): Update declaration.
1502 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1503 Add new parameters child_thread and parent_thread. Callers
1505 * mem-break.h (clone_all_breakpoints): Update declaration.
1507 2016-07-21 Yao Qi <yao.qi@linaro.org>
1509 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1510 <command_list, handler>: Remove.
1511 (struct gdb_breakpoint): New.
1512 (struct other_breakpoint): New.
1513 (struct reinsert_breakpoint): New.
1514 (is_gdb_breakpoint): New function.
1515 (any_persistent_commands): Update command_list if
1516 is_gdb_breakpoint returns true.
1517 (set_breakpoint): Create breakpoints according to their types.
1518 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1519 (set_gdb_breakpoint_1): Likewise.
1520 (set_gdb_breakpoint): Likewise.
1521 (clear_breakpoint_conditions): Change parameter type to
1522 'struct gdb_breakpoint *'.
1523 (clear_breakpoint_commands): Likewise.
1524 (clear_breakpoint_conditions_and_commands): Likewise.
1525 (add_condition_to_breakpoint): Likewise.
1526 (add_breakpoint_condition): Likewise.
1527 (add_commands_to_breakpoint): Likewise.
1528 (check_breakpoints): Check other_breakpoint.
1529 (clone_one_breakpoint): Clone breakpopint according to its type.
1530 * mem-break.h (struct gdb_breakpoint): Declare.
1531 (set_gdb_breakpoint): Update declaration.
1532 (clear_breakpoint_conditions_and_commands): Likewise.
1533 (add_breakpoint_condition): Likewise.
1534 (add_breakpoint_commands): Likewise.
1535 * server.c (process_point_options): Change parameter type to
1536 'struct gdb_breakpoint *'.
1538 2016-07-21 Yao Qi <yao.qi@linaro.org>
1540 * mem-break.c (set_breakpoint_at): Rename it to ...
1541 (set_breakpoint_type_at): ... it.
1542 (set_breakpoint_at): Call set_breakpoint_type_at.
1543 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1544 * mem-break.h (set_breakpoint_at): Update comments.
1546 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1548 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1550 (nios2_store_gregset): Likewise.
1552 2016-07-01 Pedro Alves <palves@redhat.com>
1553 Antoine Tremblay <antoine.tremblay@ericsson.com>
1555 * linux-low.c: Change interface to take the target lwp_info
1556 pointer directly and return void. Handle detaching from a zombie
1558 (linux_detach_lwp_callback): New function.
1559 (linux_detach): Detach from the leader thread after detaching from
1562 2016-06-28 Yao Qi <yao.qi@linaro.org>
1564 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1565 for variable new_offset.
1566 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1567 (aarch64_ftrace_insn_reloc_cb): Likewise.
1568 (aarch64_ftrace_insn_reloc_tb): Likewise.
1569 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1570 PRIx64 instead of PRIx32.
1572 2016-06-28 Yao Qi <yao.qi@linaro.org>
1574 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1575 (the_low_target): Install arm_get_syscall_trapinfo.
1577 2016-06-28 Yao Qi <yao.qi@linaro.org>
1579 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1581 (the_low_target): Install aarch64_get_syscall_trapinfo.
1583 2016-06-28 Yao Qi <yao.qi@linaro.org>
1585 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1587 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1588 Remove parameter sysno.
1589 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1592 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1594 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1595 (s390_emit_ne_goto): Likewise.
1596 (s390_emit_lt_goto): Likewise.
1597 (s390_emit_le_goto): Likewise.
1598 (s390_emit_gt_goto): Likewise.
1599 (s390_emit_ge_goto): Likewise.
1600 (s390x_emit_eq_goto): Likewise.
1601 (s390x_emit_ne_goto): Likewise.
1602 (s390x_emit_lt_goto): Likewise.
1603 (s390x_emit_le_goto): Likewise.
1604 (s390x_emit_gt_goto): Likewise.
1605 (s390x_emit_ge_goto): Likewise.
1606 (s390_emit_ops_impl): Mark variable static.
1607 (s390x_emit_ops): Likewise.
1609 2016-06-17 Yao Qi <yao.qi@linaro.org>
1611 * linux-low.c (handle_extended_wait): Call
1612 uninsert_reinsert_breakpoints for the parent process. Remove
1613 reinsert breakpoints from the child process. Reinsert them to
1614 the parent process when vfork is done.
1615 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1616 (reinsert_reinsert_breakpoints): New function.
1617 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1618 (reinsert_reinsert_breakpoints): Declare.
1620 2016-06-17 Yao Qi <yao.qi@linaro.org>
1622 * linux-low.c (handle_extended_wait): If the parent is doing
1623 step-over, remove the reinsert breakpoints from the forked child.
1625 2016-06-17 Yao Qi <yao.qi@linaro.org>
1627 * linux-low.c (unsuspend_all_lwps): Declare.
1628 (linux_low_filter_event): If thread exited, call finish_step_over.
1629 If step-over is finished, unsuspend other threads.
1631 2016-06-17 Yao Qi <yao.qi@linaro.org>
1633 * linux-low.c (linux_resume_one_lwp_throw): Assert
1634 has_reinsert_breakpoints returns false.
1635 * mem-break.c (delete_disabled_breakpoints): Assert
1636 bp type isn't reinsert_breakpoint.
1638 2016-06-17 Yao Qi <yao.qi@linaro.org>
1640 * linux-low.c (maybe_hw_step): New function.
1641 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1642 (finish_step_over): Switch current_thread to lwp temporarily,
1643 and assert has_reinsert_breakpoints returns true.
1644 (proceed_one_lwp): Call maybe_hw_step.
1645 * mem-break.c (has_reinsert_breakpoints): New function.
1646 * mem-break.h (has_reinsert_breakpoints): Declare.
1648 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1650 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1652 2016-05-17 Yao Qi <yao.qi@linaro.org>
1654 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1655 instead of find_inferior.
1657 2016-05-05 Yao Qi <yao.qi@linaro.org>
1659 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1660 Initialize res to zero.
1662 2016-05-05 Yao Qi <yao.qi@linaro.org>
1664 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1667 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1669 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1670 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1671 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1673 2016-04-28 Par Olsson <par.olsson@windriver.com>
1674 Simon Marchi <simon.marchi@ericsson.com>
1676 * tracepoint.c (write_inferior_int8): New function.
1677 (cmd_qtenable_disable): Write enable flag using
1678 write_inferior_int8.
1680 2016-04-25 Yao Qi <yao.qi@linaro.org>
1682 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1683 (need_step_over_p): Return zero if the LWP has pending signals
1684 can be delivered on software single step target.
1686 2016-04-25 Yao Qi <yao.qi@linaro.org>
1688 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1689 return instead of error.
1691 2016-04-22 Yao Qi <yao.qi@linaro.org>
1693 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1696 2016-04-22 Yao Qi <yao.qi@linaro.org>
1698 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1699 signal when stepping over breakpoint with software single
1702 2016-04-21 Pedro Alves <palves@redhat.com>
1704 * linux-s390-low.c (s390_collect_ptrace_register)
1705 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1707 (s390_check_regset): Use void * instead of gdb_byte *.
1709 2016-04-20 Pedro Alves <palves@redhat.com>
1711 * configure: Renegerate.
1713 2016-04-20 Yao Qi <yao.qi@linaro.org>
1715 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1716 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1718 (arm_store_gregset): Likewise.
1720 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1722 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1723 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1724 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1725 (amd64-avx-mpx-linux.c): New rules.
1726 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1727 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1728 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1729 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1730 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1731 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1732 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1733 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1734 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1735 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1736 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1737 * linux-x86-low.c (x86_linux_read_description): Add case for
1738 X86_XSTATE_AVX_MPX_MASK.
1739 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1740 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1741 init_registers_i386_avx_mpx_linux.
1742 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1743 (initialize_low_tracepoint): Call
1744 init_registers_i386_avx_mpx_linux.
1745 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1746 (initialize_low_tracepoint): Call
1747 init_registers_amd64_avx_mpx_linux.
1748 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1749 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1750 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1753 2016-04-18 Pedro Alves <palves@redhat.com>
1755 * configure: Regenerate.
1757 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1759 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1760 (aarch64_emit_sub): Likewise.
1762 2016-04-12 Pedro Alves <palves@redhat.com>
1764 * utils.c (prepare_to_throw_exception): Delete.
1766 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1768 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1770 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1772 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1774 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1776 * linux-aarch64-ipa.c: Add <elf.h> include.
1777 * linux-ppc-ipa.c: Add <elf.h> include.
1778 * linux-s390-ipa.c: Add <elf.h> include.
1780 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1782 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1783 (get_raw_reg_ptr): Likewise.
1784 (get_trace_state_variable_value_ptr): Likewise.
1785 (set_trace_state_variable_value_ptr): Likewise.
1786 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1789 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1790 Marcin Kościelnicki <koriakin@0x04.net>
1793 * linux-ppc-low.c (emit_insns): New function.
1794 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1795 (ppc_emit_prologue): New function.
1796 (ppc_emit_epilogue): New function.
1797 (ppc_emit_add): New function.
1798 (ppc_emit_sub): New function.
1799 (ppc_emit_mul): New function.
1800 (ppc_emit_lsh): New function.
1801 (ppc_emit_rsh_signed): New function.
1802 (ppc_emit_rsh_unsigned): New function.
1803 (ppc_emit_ext): New function.
1804 (ppc_emit_zero_ext): New function.
1805 (ppc_emit_log_not): New function.
1806 (ppc_emit_bit_and): New function.
1807 (ppc_emit_bit_or): New function.
1808 (ppc_emit_bit_xor): New function.
1809 (ppc_emit_bit_not): New function.
1810 (ppc_emit_equal): New function.
1811 (ppc_emit_less_signed): New function.
1812 (ppc_emit_less_unsigned): New function.
1813 (ppc_emit_ref): New function.
1814 (ppc_emit_const): New function.
1815 (ppc_emit_reg): New function.
1816 (ppc_emit_pop): New function.
1817 (ppc_emit_stack_flush): New function.
1818 (ppc_emit_swap): New function.
1819 (ppc_emit_stack_adjust): New function.
1820 (ppc_emit_call): New function.
1821 (ppc_emit_int_call_1): New function.
1822 (ppc_emit_void_call_2): New function.
1823 (ppc_emit_if_goto): New function.
1824 (ppc_emit_goto): New function.
1825 (ppc_emit_eq_goto): New function.
1826 (ppc_emit_ne_goto): New function.
1827 (ppc_emit_lt_goto): New function.
1828 (ppc_emit_le_goto): New function.
1829 (ppc_emit_gt_goto): New function.
1830 (ppc_emit_ge_goto): New function.
1831 (ppc_write_goto_address): New function.
1832 (ppc_emit_ops_impl): New static variable.
1833 (ppc64v1_emit_prologue): New function.
1834 (ppc64v2_emit_prologue): New function.
1835 (ppc64_emit_epilogue): New function.
1836 (ppc64_emit_add): New function.
1837 (ppc64_emit_sub): New function.
1838 (ppc64_emit_mul): New function.
1839 (ppc64_emit_lsh): New function.
1840 (ppc64_emit_rsh_signed): New function.
1841 (ppc64_emit_rsh_unsigned): New function.
1842 (ppc64_emit_ext): New function.
1843 (ppc64_emit_zero_ext): New function.
1844 (ppc64_emit_log_not): New function.
1845 (ppc64_emit_bit_and): New function.
1846 (ppc64_emit_bit_or): New function.
1847 (ppc64_emit_bit_xor): New function.
1848 (ppc64_emit_bit_not): New function.
1849 (ppc64_emit_equal): New function.
1850 (ppc64_emit_less_signed): New function.
1851 (ppc64_emit_less_unsigned): New function.
1852 (ppc64_emit_ref): New function.
1853 (ppc64_emit_const): New function.
1854 (ppc64v1_emit_reg): New function.
1855 (ppc64v2_emit_reg): New function.
1856 (ppc64_emit_pop): New function.
1857 (ppc64_emit_stack_flush): New function.
1858 (ppc64_emit_swap): New function.
1859 (ppc64v1_emit_call): New function.
1860 (ppc64v2_emit_call): New function.
1861 (ppc64v1_emit_int_call_1): New function.
1862 (ppc64v2_emit_int_call_1): New function.
1863 (ppc64v1_emit_void_call_2): New function.
1864 (ppc64v2_emit_void_call_2): New function.
1865 (ppc64_emit_if_goto): New function.
1866 (ppc64_emit_eq_goto): New function.
1867 (ppc64_emit_ne_goto): New function.
1868 (ppc64_emit_lt_goto): New function.
1869 (ppc64_emit_le_goto): New function.
1870 (ppc64_emit_gt_goto): New function.
1871 (ppc64_emit_ge_goto): New function.
1872 (ppc64v1_emit_ops_impl): New static variable.
1873 (ppc64v2_emit_ops_impl): New static variable.
1874 (ppc_emit_ops): New function.
1875 (linux_low_target): Wire in ppc_emit_ops.
1877 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1878 Marcin Kościelnicki <koriakin@0x04.net>
1881 * Makefile.in: Add powerpc-*-ipa.o
1882 * configure.srv: Add ipa_obj for powerpc*-linux.
1883 * linux-ppc-ipa.c: New file.
1884 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1886 (PPC_FIELD): New macro.
1887 (PPC_SEXT): New macro.
1888 (PPC_OP6): New macro.
1889 (PPC_BO): New macro.
1890 (PPC_LI): New macro.
1891 (PPC_BD): New macro.
1892 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1893 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1894 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1895 (ppc_get_thread_area): New function.
1896 (is_elfv2_inferior): New function.
1897 (gen_ds_form): New function.
1898 (GEN_STD): New macro.
1899 (GEN_STDU): New macro.
1900 (GEN_LD): New macro.
1901 (GEN_LDU): New macro.
1902 (gen_d_form): New function.
1903 (GEN_ADDI): New macro.
1904 (GEN_ADDIS): New macro.
1905 (GEN_LI): New macro.
1906 (GEN_LIS): New macro.
1907 (GEN_ORI): New macro.
1908 (GEN_ORIS): New macro.
1909 (GEN_LWZ): New macro.
1910 (GEN_STW): New macro.
1911 (GEN_STWU): New macro.
1912 (gen_xfx_form): New function.
1913 (GEN_MFSPR): New macro.
1914 (GEN_MTSPR): New macro.
1915 (GEN_MFCR): New macro.
1916 (GEN_MTCR): New macro.
1917 (GEN_SYNC): New macro.
1918 (GEN_LWSYNC): New macro.
1919 (gen_x_form): New function.
1920 (GEN_OR): New macro.
1921 (GEN_MR): New macro.
1922 (GEN_LWARX): New macro.
1923 (GEN_STWCX): New macro.
1924 (GEN_CMPW): New macro.
1925 (gen_md_form): New function.
1926 (GEN_RLDICL): New macro.
1927 (GEN_RLDICR): New macro.
1928 (gen_i_form): New function.
1930 (GEN_BL): New macro.
1931 (gen_b_form): New function.
1932 (GEN_BNE): New macro.
1933 (GEN_LOAD): New macro.
1934 (GEN_STORE): New macro.
1935 (gen_limm): New function.
1936 (gen_atomic_xchg): New function.
1937 (gen_call): New function.
1938 (ppc_relocate_instruction): New function.
1939 (ppc_install_fast_tracepoint_jump_pad): New function.
1940 (ppc_get_min_fast_tracepoint_insn_len): New function.
1941 (ppc_get_ipa_tdesc_idx): New function.
1942 (the_low_target): Wire in the new functions.
1943 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1945 * linux-ppc-tdesc.h: New file.
1947 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1949 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1950 (alloc_jump_pad_buffer): New function.
1951 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1952 (alloc_jump_pad_buffer): New function.
1953 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1954 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1955 (alloc_jump_pad_buffer): New function.
1956 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1957 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1958 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1959 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1961 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1963 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1964 * linux-amd64-ipa.c: Likewise.
1965 * linux-i386-ipa.c: Likewise.
1966 * linux-s390-ipa.c: Likewise.
1967 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1968 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1969 set_trace_state_variable_value_ptr.
1970 (struct ipa_sym_addresses): Likewise.
1971 (symbol_list): Likewise.
1972 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1973 accessing gdb_collect directly.
1974 (gdb_collect_ptr_type): New typedef.
1975 (get_raw_reg_ptr_type): New typedef.
1976 (get_trace_state_variable_value_ptr_type): New typedef.
1977 (set_trace_state_variable_value_ptr_type): New typedef.
1978 (gdb_collect_ptr): New global.
1979 (get_raw_reg_ptr): New global.
1980 (get_trace_state_variable_value_ptr): New global.
1981 (set_trace_state_variable_value_ptr): New global.
1982 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1983 accessing get_raw_reg directly.
1984 (get_get_tsv_func_addr): Likewise for
1985 get_trace_state_variable_value_ptr.
1986 (get_set_tsv_func_addr): Likewise for
1987 set_trace_state_variable_value_ptr.
1988 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1990 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
1992 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1994 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
1996 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1998 (relocate_instruction): Remove own_buf.
1999 * server.c (own_buf): Make global.
2000 (handle_v_requests): Make global.
2001 * server.h (own_buf): New declaration.
2002 (handle_v_requests): New prototype.
2004 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2007 * linux-s390-low.c (add_insns): New function.
2008 (s390_emit_prologue): New function.
2009 (s390_emit_epilogue): New function.
2010 (s390_emit_add): New function.
2011 (s390_emit_sub): New function.
2012 (s390_emit_mul): New function.
2013 (s390_emit_lsh): New function.
2014 (s390_emit_rsh_signed): New function.
2015 (s390_emit_rsh_unsigned): New function.
2016 (s390_emit_ext): New function.
2017 (s390_emit_log_not): New function.
2018 (s390_emit_bit_and): New function.
2019 (s390_emit_bit_or): New function.
2020 (s390_emit_bit_xor): New function.
2021 (s390_emit_bit_not): New function.
2022 (s390_emit_equal): New function.
2023 (s390_emit_less_signed): New function.
2024 (s390_emit_less_unsigned): New function.
2025 (s390_emit_ref): New function.
2026 (s390_emit_if_goto): New function.
2027 (s390_emit_goto): New function.
2028 (s390_write_goto_address): New function.
2029 (s390_emit_litpool): New function.
2030 (s390_emit_const): New function.
2031 (s390_emit_call): New function.
2032 (s390_emit_reg): New function.
2033 (s390_emit_pop): New function.
2034 (s390_emit_stack_flush): New function.
2035 (s390_emit_zero_ext): New function.
2036 (s390_emit_swap): New function.
2037 (s390_emit_stack_adjust): New function.
2038 (s390_emit_set_r2): New function.
2039 (s390_emit_int_call_1): New function.
2040 (s390_emit_void_call_2): New function.
2041 (s390_emit_eq_goto): New function.
2042 (s390_emit_ne_goto): New function.
2043 (s390_emit_lt_goto): New function.
2044 (s390_emit_le_goto): New function.
2045 (s390_emit_gt_goto): New function.
2046 (s390_emit_ge_goto): New function.
2047 (s390x_emit_prologue): New function.
2048 (s390x_emit_epilogue): New function.
2049 (s390x_emit_add): New function.
2050 (s390x_emit_sub): New function.
2051 (s390x_emit_mul): New function.
2052 (s390x_emit_lsh): New function.
2053 (s390x_emit_rsh_signed): New function.
2054 (s390x_emit_rsh_unsigned): New function.
2055 (s390x_emit_ext): New function.
2056 (s390x_emit_log_not): New function.
2057 (s390x_emit_bit_and): New function.
2058 (s390x_emit_bit_or): New function.
2059 (s390x_emit_bit_xor): New function.
2060 (s390x_emit_bit_not): New function.
2061 (s390x_emit_equal): New function.
2062 (s390x_emit_less_signed): New function.
2063 (s390x_emit_less_unsigned): New function.
2064 (s390x_emit_ref): New function.
2065 (s390x_emit_if_goto): New function.
2066 (s390x_emit_const): New function.
2067 (s390x_emit_call): New function.
2068 (s390x_emit_reg): New function.
2069 (s390x_emit_pop): New function.
2070 (s390x_emit_stack_flush): New function.
2071 (s390x_emit_zero_ext): New function.
2072 (s390x_emit_swap): New function.
2073 (s390x_emit_stack_adjust): New function.
2074 (s390x_emit_int_call_1): New function.
2075 (s390x_emit_void_call_2): New function.
2076 (s390x_emit_eq_goto): New function.
2077 (s390x_emit_ne_goto): New function.
2078 (s390x_emit_lt_goto): New function.
2079 (s390x_emit_le_goto): New function.
2080 (s390x_emit_gt_goto): New function.
2081 (s390x_emit_ge_goto): New function.
2082 (s390_emit_ops): New function.
2083 (struct linux_target_ops): Fill in emit_ops hook.
2085 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2088 * Makefile.in: Add s390 IPA files.
2089 * configure.srv: Build IPA for s390.
2090 * linux-s390-ipa.c: New file.
2091 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2092 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2093 (tdesc_s390_linux32): Likewise.
2094 (init_registers_s390_linux32v1): Likewise.
2095 (tdesc_s390_linux32v1): Likewise.
2096 (init_registers_s390_linux32v2): Likewise.
2097 (tdesc_s390_linux32v2): Likewise.
2098 (init_registers_s390_linux64): Likewise.
2099 (tdesc_s390_linux64): Likewise.
2100 (init_registers_s390_linux64v1): Likewise.
2101 (tdesc_s390_linux64v1): Likewise.
2102 (init_registers_s390_linux64v2): Likewise.
2103 (tdesc_s390_linux64v2): Likewise.
2104 (init_registers_s390_te_linux64): Likewise.
2105 (tdesc_s390_te_linux64): Likewise.
2106 (init_registers_s390_vx_linux64): Likewise.
2107 (tdesc_s390_vx_linux64): Likewise.
2108 (init_registers_s390_tevx_linux64): Likewise.
2109 (tdesc_s390_tevx_linux64): Likewise.
2110 (init_registers_s390x_linux64): Likewise.
2111 (tdesc_s390x_linux64): Likewise.
2112 (init_registers_s390x_linux64v1): Likewise.
2113 (tdesc_s390x_linux64v1): Likewise.
2114 (init_registers_s390x_linux64v2): Likewise.
2115 (tdesc_s390x_linux64v2): Likewise.
2116 (init_registers_s390x_te_linux64): Likewise.
2117 (tdesc_s390x_te_linux64): Likewise.
2118 (init_registers_s390x_vx_linux64): Likewise.
2119 (tdesc_s390x_vx_linux64): Likewise.
2120 (init_registers_s390x_tevx_linux64): Likewise.
2121 (tdesc_s390x_tevx_linux64): Likewise.
2122 (have_hwcap_s390_vx): New static variable.
2123 (s390_arch_setup): Fill have_hwcap_s390_vx.
2124 (s390_get_thread_area): New function.
2125 (s390_ft_entry_gpr_esa): New const.
2126 (s390_ft_entry_gpr_zarch): New const.
2127 (s390_ft_entry_misc): New const.
2128 (s390_ft_entry_fr): New const.
2129 (s390_ft_entry_vr): New const.
2130 (s390_ft_main_31): New const.
2131 (s390_ft_main_64): New const.
2132 (s390_ft_exit_fr): New const.
2133 (s390_ft_exit_vr): New const.
2134 (s390_ft_exit_misc): New const.
2135 (s390_ft_exit_gpr_esa): New const.
2136 (s390_ft_exit_gpr_zarch): New const.
2137 (append_insns): New function.
2138 (s390_relocate_instruction): New function.
2139 (s390_install_fast_tracepoint_jump_pad): New function.
2140 (s390_get_min_fast_tracepoint_insn_len): New function.
2141 (s390_get_ipa_tdesc_idx): New function.
2142 (struct linux_target_ops): Wire in the above functions.
2143 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2144 * linux-s390-tdesc.h: New file.
2146 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2148 * linux-s390-low.c (s390_supports_tracepoints): New function.
2149 (struct linux_target_ops): Fill supports_tracepoints hook.
2151 2016-03-18 Yao Qi <yao.qi@linaro.org>
2153 * linux-low.c (lwp_signal_can_be_delivered): New function.
2154 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2156 2016-03-18 Yao Qi <yao.qi@linaro.org>
2158 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2159 0 if signal is enqueued. Remove 'signal' from one debugging
2160 message. Move one debugging message to some lines below.
2161 Remove code setting 'signal' to 0.
2163 2016-03-18 Yao Qi <yao.qi@linaro.org>
2165 * linux-low.c (linux_low_filter_event): Remove redundant
2166 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2168 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2170 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2171 (struct linux_target_ops): Wire in the above.
2173 2016-03-03 Yao Qi <yao.qi@linaro.org>
2175 * linux-low.c: Update comments to start_step_over.
2177 2016-03-03 Yao Qi <yao.qi@linaro.org>
2180 * linux-low.c (handle_extended_wait): Set child suspended
2181 if event_lwp->bp_reinsert isn't zero.
2183 2016-03-02 Yao Qi <yao.qi@linaro.org>
2185 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2186 enqueue_pending_signal.
2188 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2190 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2193 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2195 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2196 (s390_regmap_3264) [!__s390x__]: New global.
2197 (s390_collect_ptrace_register): Skip map entries containing -1.
2198 (s390_supply_ptrace_register): Ditto.
2199 (s390_fill_gprs_high): New function.
2200 (s390_store_gprs_high): New function.
2201 (s390_regsets): Add NT_S390_HIGH_GPRS.
2202 (s390_get_hwcap): Enable on 31-bit.
2203 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2204 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2205 Detect NT_S390_HIGH_GPRS.
2206 (s390_usrregs_info_3264): Enable on 31-bit.
2207 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2208 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2210 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2213 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2214 * configure.srv: Ditto.
2215 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2216 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2217 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2218 (init_registers_amd64_linux): Remove prototype.
2219 (tdesc_amd64_linux): Remove declaration.
2220 (get_ipa_tdesc): New function.
2221 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2222 initialize remaining tdescs.
2223 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2224 (init_registers_i386_linux): Remove prototype.
2225 (tdesc_i386_linux): Remove declaration.
2226 (get_ipa_tdesc): New function.
2227 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2228 initialize remaining tdescs.
2229 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2230 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2231 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2232 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2233 (x86_get_ipa_tdesc_idx): New function.
2234 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2235 * linux-x86-tdesc.h: New file.
2236 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2237 (target_get_ipa_tdesc_idx): New macro.
2238 * tracepoint.c (ipa_tdesc_idx): New macro.
2239 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2240 (symbol_list): Add ipa_tdesc_idx.
2241 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2242 (ipa_tdesc): Remove.
2243 (ipa_tdesc_idx): New variable.
2244 (get_context_regcache): Use get_ipa_tdesc.
2245 (gdb_collect): Ditto.
2247 * tracepoint.h (get_ipa_tdesc): New prototype.
2248 (ipa_tdesc): Remove.
2250 2016-02-24 Pedro Alves <palves@redhat.com>
2252 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2253 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2254 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2255 Factor out common code between the USE_SIGTRAP_SIGINFO and
2256 !USE_SIGTRAP_SIGINFO blocks.
2257 (linux_low_filter_event): Call save_stop_reason instead of
2258 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2260 (linux_wait_1): Update comments.
2262 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2264 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2265 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2266 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2267 ppc_insert_point, ppc_remove_point.
2269 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2271 * linux-s390-low.c (s390_supports_z_point_type): New function.
2272 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2274 2016-02-16 Yao Qi <yao.qi@linaro.org>
2276 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2277 PC. Get pc from regcache_read_pc.
2279 2016-02-12 Yao Qi <yao.qi@linaro.org>
2281 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2282 or linux_get_pc_32bit.
2283 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2285 2016-02-12 Yao Qi <yao.qi@linaro.org>
2287 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2288 arm_linux_get_next_pcs_fixup.
2290 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2292 * tracepoint.c (x_tracepoint_action_download): Change
2293 write_inferior_data_ptr to write_inferior_data_pointer.
2294 (cmd_qtstart): Likewise.
2295 (write_inferior_data_ptr): Remove.
2296 (download_agent_expr): Change write_inferior_data_ptr to
2297 write_inferior_data_pointer.
2298 (download_tracepoint_1): Likewise.
2299 (download_tracepoint): Likewise.
2300 (download_trace_state_variables): Likewise.
2302 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2303 Marcin Kościelnicki <koriakin@0x04.net>
2305 * tracepoint.c (struct tracepoint_action_ops): Remove.
2306 (struct tracepoint_action): Remove ops.
2307 (m_tracepoint_action_download, r_tracepoint_action_download)
2308 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2309 size and offset accordingly.
2310 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2311 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2312 (tracepoint_action_send, tracepoint_action_download): New functions.
2313 Helpers for trace action handlers.
2314 (add_tracepoint_action): Remove setup actions ops.
2315 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2317 2016-02-10 Yao Qi <yao.qi@linaro.org>
2319 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2321 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2323 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2325 * configure: Regenerate.
2327 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2329 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2330 void * to gdb_byte *.
2331 * linux-low.c (siginfo_fixup): Likewise.
2332 (linux_xfer_siginfo): Likewise.
2333 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2335 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2337 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2339 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2341 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2343 * linux-x86-low.c [__x86_64__]: Include
2344 "nat/amd64-linux-siginfo.h".
2345 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2346 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2347 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2348 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2349 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2350 (cpt_si_fd, si_timerid, si_overrun): Move from
2351 nat/amd64-linux-siginfo.c.
2352 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2354 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2356 * server.c (skip_to_semicolon): Remove.
2357 (process_point_options): Use strchrnul instead of
2360 2016-01-26 Yao Qi <yao.qi@linaro.org>
2362 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2363 * linux-low.c (install_software_single_step_breakpoints): Don't
2364 call regcache_read_pc.
2365 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2368 2016-01-26 Yao Qi <yao.qi@linaro.org>
2370 * linux-low.c (install_software_single_step_breakpoints): Call
2371 regcache_read_pc instead of get_pc.
2373 2016-01-26 Yao Qi <yao.qi@linaro.org>
2375 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2376 (unblock_async_io): Rename to ...
2377 (block_unblock_async_io): ... it. New function.
2378 (enable_async_io): Don't install SIGIO handler. Unblock it
2380 (disable_async_io): Don't ignore SIGIO. Block it instead.
2381 (initialize_async_io): Install SIGIO handler. Don't call
2384 2016-01-26 Yao Qi <yao.qi@linaro.org>
2386 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2387 first character is '\003', call *the_target->request_interrupt.
2389 2016-01-25 Yao Qi <yao.qi@linaro.org>
2391 * remote-utils.c (new_thread_notify): Remove.
2392 (dead_thread_notify): Likewise.
2393 * remote-utils.h (new_thread_notify): Remove declaration.
2394 (dead_thread_notify): Likewise.
2396 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2398 * gdb.trace/pending.exp: Fix expected message on continue.
2400 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2402 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2403 it works properly on big-endian machines where sizeof (CORE_ADDR)
2406 2016-01-21 Pedro Alves <palves@redhat.com>
2408 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2409 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2410 * configure: Regenerate.
2412 2016-01-21 Yao Qi <yao.qi@linaro.org>
2414 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2415 is_thumb and set it according to CPSR saved on the stack.
2416 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2417 arm_sigreturn_next_pc.
2419 2016-01-18 Yao Qi <yao.qi@linaro.org>
2421 * linux-low.c (linux_set_pc_64bit): New function.
2422 (linux_get_pc_64bit): New function.
2423 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2425 * linux-sparc-low.c (debug_threads): Remove declaration.
2426 (sparc_get_pc): Remove.
2427 (the_low_target): Use linux_get_pc_64bit instead of
2429 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2430 (the_low_target): Use linux_get_pc_64bit and
2433 2016-01-18 Yao Qi <yao.qi@linaro.org>
2435 * linux-arm-low.c (debug_threads): Remove declaration.
2436 (arm_get_pc, arm_set_pc): Remove.
2437 (the_low_target): Use linux_get_pc_32bit and
2439 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2440 (the_low_target): Use linux_get_pc_32bit and
2442 * linux-cris-low.c (debug_threads): Remove declaration.
2443 (cris_get_pc, cris_set_pc,): Remove.
2444 (the_low_target): Use linux_get_pc_32bit and
2446 * linux-crisv32-low.c (debug_threads): Remove declaration.
2447 (cris_get_pc, cris_set_pc): Remove.
2448 (the_low_target): Use linux_get_pc_32bit and
2450 * linux-low.c: Include inttypes.h.
2451 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2452 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2453 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2454 (the_low_target): Use linux_get_pc_32bit and
2456 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2457 (the_low_target): Use linux_get_pc_32bit and
2459 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2460 (the_low_target): Use linux_get_pc_32bit and
2462 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2463 (the_low_target): Use linux_get_pc_32bit and
2465 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2466 (the_low_target): Use linux_get_pc_32bit and
2469 2016-01-18 Gary Benson <gbenson@redhat.com>
2471 * configure.ac (AC_FUNC_FORK): New check.
2472 * config.in: Regenerate.
2473 * configure: Likewise.
2475 2016-01-14 Yao Qi <yao.qi@linaro.org>
2477 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2478 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2479 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2480 arm_get_next_pcs_ctor.
2482 2016-01-12 Josh Stone <jistone@redhat.com>
2483 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2485 * inferiors.h: Include "gdb_vecs.h".
2486 (struct process_info): Add syscalls_to_catch.
2487 * inferiors.c (remove_process): Free syscalls_to_catch.
2488 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2489 syscall_return stops.
2490 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2491 * server.c (handle_general_set): Handle QCatchSyscalls.
2492 (handle_query): Report support for QCatchSyscalls.
2493 * target.h (struct target_ops): Add supports_catch_syscall.
2494 (target_supports_catch_syscall): New macro.
2495 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2496 (struct lwp_info): Add syscall_state.
2497 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2498 Maintain syscall_state and syscalls_to_catch across exec.
2499 (get_syscall_trapinfo): New function, proxy to the_low_target.
2500 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2501 (linux_low_filter_event): Toggle syscall_state entry/return for
2502 syscall traps, and set it ignored for all others.
2503 (gdb_catching_syscalls_p): New function.
2504 (gdb_catch_this_syscall_p): New function.
2505 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2506 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2507 (linux_supports_catch_syscall): New function.
2508 (linux_target_ops): Install it.
2509 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2510 (the_low_target): Install it.
2512 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2514 * acinclude.m4: Include new ../warning.m4 file.
2515 * configure: Regenerated.
2516 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2518 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2520 * ax.c (is_goto_target): Mark static.
2521 * linux-low.c (register_addr): Likewise.
2522 (linux_fetch_registers, linux_store_registers): Likewise.
2523 * mem-break.c (any_persistent_commands): Fix old prototype.
2524 (add_commands_to_breakpoint): Mark static.
2525 * regcache.c (find_register_by_name): Delete unused func.
2526 * remote-utils.c (hex_or_minus_one): Mark static.
2527 * server.c (monitor_show_help): Mark static.
2528 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2529 handle_v_requests): Likewise.
2531 2016-01-12 Pedro Alves <palves@redhat.com>
2533 Remove use of the registered trademark symbol throughout.
2535 2016-01-08 Yao Qi <yao.qi@linaro.org>
2537 * remote-utils.c (getpkt): If c is '\003', call target hook
2540 2016-01-06 Yao Qi <yao.qi@linaro.org>
2542 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2543 linux-aarch32-low.c.
2544 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2545 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2546 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2547 (thumb2_breakpoint): Declare.
2548 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2549 linux-aarch32-low.h.
2550 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2551 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2552 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2554 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2556 * gdbreplay.c (gdbreplay_version): Change copyright year in
2558 * server.c (gdbserver_version): Likewise.
2560 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2562 * server.c (crc32_table): Delete.
2563 (crc32): Use libiberty's xcrc32 function.
2565 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2567 * lynx-low.c (lynx_delete_thread_callback): New function.
2568 (lynx_mourn): Properly delete our process and all of its
2569 threads. Remove call to clear_inferiors.
2571 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2573 * target.c (thread_search_callback): Add check that
2574 the thread_stopped target callback is not NULL before
2577 2015-12-21 Yao Qi <yao.qi@linaro.org>
2579 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2582 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2584 * server.c (handle_query): Call target_supports_software_single_step.
2586 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2588 * linux-low.c (single_step): New function.
2589 (linux_resume_one_lwp_throw): Call single_step.
2590 (start_step_over): Likewise.
2592 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2594 * Makefile.in (SFILES): Append arch/arm-linux.c,
2595 arch/arm-get-next-pcs.c.
2596 (arm-linux.o): New rule.
2597 (arm-get-next-pcs.o): New rule.
2598 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2600 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2601 to linux-aarch32-low.c.
2602 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2603 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2604 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2605 (thumb2_breakpoint_len): Likewise.
2606 (arm_is_thumb_mode): Make non-static.
2607 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2608 from linux-aarch32-low.c.
2609 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2610 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2611 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2612 (thumb2_breakpoint_len): Likewise.
2613 (arm_is_thumb_mode): New declaration.
2614 * linux-arm-low.c: Include arch/arm-linux.h
2615 aarch/arm-get-next-pcs.h, sys/syscall.h.
2616 (get_next_pcs_ops): New struct.
2617 (get_next_pcs_addr_bits_remove): New function.
2618 (get_next_pcs_is_thumb): New function.
2619 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2620 (arm_sigreturn_next_pc): Likewise.
2621 (get_next_pcs_syscall_next_pc): Likewise.
2622 (arm_gdbserver_get_next_pcs): Likewise.
2623 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2625 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2626 * server.h: Include gdb_vecs.h.
2628 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2630 * Makefile.in (SFILES): Append common/common-regcache.c.
2631 (OBS): Append common-regcache.o.
2632 (common-regcache.o): New rule.
2633 * regcache.c (init_register_cache): Initialize cache to
2635 (regcache_raw_read_unsigned): New function.
2636 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2637 register_status enum.
2639 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2641 * linux-aarch64-low.c (the_low_targets): Rename
2642 breakpoint_reinsert_addr to get_next_pcs.
2643 * linux-arm-low.c (the_low_targets): Likewise.
2644 * linux-bfin-low.c (the_low_targets): Likewise.
2645 * linux-cris-low.c (the_low_targets): Likewise.
2646 * linux-crisv32-low.c (the_low_targets): Likewise.
2647 * linux-low.c (can_software_single_step): Likewise.
2648 (install_software_single_step_breakpoints): New function.
2649 (start_step_over): Use install_software_single_step_breakpoints.
2650 * linux-low.h: New CORE_ADDR vector.
2651 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2653 * linux-mips-low.c (the_low_targets): Likewise.
2654 * linux-nios2-low.c (the_low_targets): Likewise.
2655 * linux-sparc-low.c (the_low_targets): Likewise.
2657 2015-12-17 Pedro Alves <palves@redhat.com>
2659 * linux-low.c (linux_kill_one_lwp): Remove references to
2661 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2663 (linux_init_signals): Delete.
2664 (initialize_low): Adjust.
2665 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2667 2015-12-16 Pedro Alves <palves@redhat.com>
2669 * configure.ac (compiler warning flags): When testing a
2670 -Wno-foo option, check whether -Wfoo works instead.
2671 * configure: Regenerate.
2673 2015-12-11 Don Breazeal <donb@codesourcery.com>
2675 * server.c (process_serial_event): Don't exit from gdbserver
2676 in remote mode if there are still active inferiors.
2678 2015-12-11 Yao Qi <yao.qi@linaro.org>
2680 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2681 arm_breakpoint_at if the process is 32-bit.
2683 2015-12-11 Yao Qi <yao.qi@linaro.org>
2685 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2688 2015-12-07 Yao Qi <yao.qi@linaro.org>
2690 * configure.srv: Append arm.o to srv_tgtobj for
2691 aarch64*-*-linux* target.
2692 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2693 from linux-arm-low.c.
2694 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2695 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2696 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2697 (thumb2_breakpoint_len): Likewise.
2698 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2699 (arm_breakpoint_kinds): Likewise.
2700 (arm_breakpoint_kind_from_pc): Likewise.
2701 (arm_sw_breakpoint_from_kind): Likewise.
2702 (arm_breakpoint_kind_from_current_state): Likewise.
2703 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2704 (arm_sw_breakpoint_from_kind): Declare.
2705 (arm_breakpoint_kind_from_current_state): Declare.
2706 (arm_breakpoint_at): Declare.
2707 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2708 arm_sw_breakpoint_from_kind if process is 32-bit.
2709 (aarch64_breakpoint_kind_from_pc): New function.
2710 (aarch64_breakpoint_kind_from_current_state): New function.
2711 (the_low_target): Initialize fields breakpoint_kind_from_pc
2712 and breakpoint_kind_from_current_state.
2713 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2714 linux-aarch32-low.c.
2715 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2716 (arm_breakpoint, arm_breakpoint_len): Likewise.
2717 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2718 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2719 (arm_is_thumb_mode): Likewise.
2720 (arm_breakpoint_at): Likewise.
2721 (arm_breakpoint_kind_from_pc): Likewise.
2722 (arm_sw_breakpoint_from_kind): Likewise.
2723 (arm_breakpoint_kind_from_current_state): Likewise.
2726 2015-08-04 Yao Qi <yao.qi@linaro.org>
2728 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2729 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2730 * server.c (extended_protocol): Remove "static".
2731 * server.h (extended_protocol): Declare it.
2733 2015-12-04 Josh Stone <jistone@redhat.com>
2735 * target.h (struct target_ops) <arch_setup>: Rename to ...
2736 (struct target_ops) <post_create_inferior>: ... this.
2737 (target_arch_setup): Rename to ...
2738 (target_post_create_inferior): ... this, calling post_create_inferior.
2739 * server.c (start_inferior): Update target_arch_setup calls to
2740 target_post_create_inferior.
2741 * linux-low.c (linux_low_ptrace_options): Forward declare.
2742 (linux_arch_setup): Update its comment for general use.
2743 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2744 (struct linux_target_ops): Use linux_post_create_inferior.
2745 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2746 to post_create_inferior.
2747 * nto-low.c (struct nto_target_ops): Likewise.
2748 * spu-low.c (struct spu_target_ops): Likewise.
2749 * win32-low.c (struct win32_target_ops): Likewise.
2751 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2753 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2755 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2757 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2758 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2759 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2760 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2761 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2762 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2763 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2764 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2765 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2766 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2767 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2768 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2770 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2772 * linux-low.c (linux_look_up_symbols): Don't call
2773 linux_supports_traceclone.
2774 * linux-low.h (thread_db_init): Remove use_events argument.
2775 * thread-db.c (thread_db_use_event): Remove global variable.
2776 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2777 (struct thread_db) <td_create_bp>: Remove field.
2778 (thread_db_create_event): Remove function.
2779 (thread_db_enable_reporting): Likewise.
2780 (find_one_thread): Don't check for thread_db_use_events.
2781 (attach_thread): Likewise.
2782 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2783 (try_thread_db_load_1): Don't check for thread_db_use_events.
2784 (thread_db_init): Remove use_events argument and thread events
2786 (remove_thread_event_breakpoints): Remove function.
2787 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2789 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2791 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2793 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2794 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2795 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2796 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2797 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2799 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2801 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2802 * linux-low.c (can_hardware_single_step): Use
2803 supports_hardware_single_step.
2804 (can_software_single_step): New function.
2805 (start_step_over): Call can_software_single_step.
2806 (linux_supports_hardware_single_step): New function.
2807 (struct target_ops) <supports_software_single_step>: Initialize.
2808 * linux-low.h (struct linux_target_ops)
2809 <supports_hardware_single_step>: Initialize.
2810 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2811 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2812 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2813 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2814 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2815 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2816 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2817 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2818 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2819 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2821 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2822 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2824 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2825 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2826 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2828 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2829 * target.h (struct target_ops): <supports_software_single_step>:
2831 (target_supports_software_single_step): New macro.
2833 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2835 * linux-low.c (linux_wait_1): Fix pc advance condition.
2836 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2837 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2839 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2841 * linux-arm-low.c (arm_is_thumb_mode): New function.
2842 (arm_breakpoint_at): Use arm_is_thumb_mode.
2843 (arm_breakpoint_kind_from_current_state): New function.
2844 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2846 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2847 (linux_breakpoint_kind_from_current_state): New function.
2848 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2849 * linux-low.h (struct linux_target_ops)
2850 <breakpoint_kind_from_current_state>: New field.
2851 * target.h (struct target_ops): Likewise.
2852 (target_breakpoint_kind_from_current_state): New macro.
2854 2015-11-30 Pedro Alves <palves@redhat.com>
2856 * linux-low.c (linux_resume): Wake up the event loop before
2859 2015-11-30 Pedro Alves <palves@redhat.com>
2861 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2863 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2865 * target.c (struct thread_search): New structure.
2866 (thread_search_callback): New function.
2867 (prev_general_thread): New global.
2868 (prepare_to_access_memory, done_accessing_memory): New functions.
2869 * target.h (prepare_to_access_memory, done_accessing_memory):
2870 Replace macros with function declarations.
2872 2015-11-30 Pedro Alves <palves@redhat.com>
2875 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2876 report TARGET_WAITKIND_NO_RESUMED.
2877 * remote-utils.c (prepare_resume_reply): Handle
2878 TARGET_WAITKIND_NO_RESUMED.
2879 * server.c (report_no_resumed): New global.
2880 (handle_query) <qSupported>: Handle "no-resumed+". Report
2881 "no-resumed+" support.
2882 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2883 return error if the client doesn't support no-resumed events.
2884 (push_stop_notification): New function.
2885 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2886 events if the client supports them.
2888 2015-11-30 Pedro Alves <palves@redhat.com>
2890 * linux-low.c (thread_still_has_status_pending_p): Don't check
2892 (lwp_resumed): New function.
2893 (status_pending_p_callback): Return early if the LWP is not
2894 supposed to be resumed.
2896 2015-11-30 Pedro Alves <palves@redhat.com>
2898 * linux-low.c (handle_extended_wait): Assert that the LWP's
2899 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2900 thread create events, leave the new child's status pending.
2901 (linux_low_filter_event): If GDB wants to hear about thread exit
2902 events, leave the LWP marked dead and don't delete it.
2903 (linux_wait_for_event_filtered): Don't check for thread exit.
2904 (filter_exit_event): New function.
2905 (linux_wait_1): Use it, when returning an exit event.
2906 (linux_resume_one_lwp_throw): Assert that the LWP's
2907 waitstatus is TARGET_WAITKIND_IGNORE.
2908 * remote-utils.c (prepare_resume_reply): Handle
2909 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2910 * server.c (report_thread_events): New global.
2911 (handle_general_set): Handle QThreadEvents.
2912 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2913 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2914 TARGET_WAITKIND_THREAD_EXITED.
2915 * server.h (report_thread_events): Declare.
2917 2015-11-30 Pedro Alves <palves@redhat.com>
2919 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2920 the thread's last_resume_kind was resume_stop.
2922 2015-11-30 Pedro Alves <palves@redhat.com>
2924 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2927 2015-11-30 Pedro Alves <palves@redhat.com>
2929 * server.c (handle_v_requests): Handle vCtrlC.
2931 2015-11-30 Pedro Alves <palves@redhat.com>
2933 * gdbthread.h (find_any_thread_of_pid): Declare.
2934 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2936 * server.c (handle_query): If current_thread is NULL, look for
2937 another thread of the selected process.
2939 2015-11-26 Daniel Colascione <dancol@dancol.org>
2940 Simon Marchi <simon.marchi@ericsson.com>
2942 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2943 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2945 * target.h (struct target_ops) <thread_name>: New field.
2946 (target_thread_name): New macro.
2948 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2950 * regcache.h (regcache_invalidate_pid): Add declaration.
2951 * regcache.c (regcache_invalidate_pid): New function, extracted
2952 from regcache_invalidate.
2953 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2954 Add trivial documentation comment.
2955 * lynx-low.c: Use regcache_invalidate_pid instead of
2956 regcache_invalidate.
2958 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2960 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2961 and Elf64_auxv_t if the target is Android.
2963 2015-11-22 Doug Evans <xdje42@gmail.com>
2965 * target.h: #include <sys/types.h>.
2967 2015-11-19 Pedro Alves <palves@redhat.com>
2969 * linux-low.c (linux_process_qsupported): Change prototype.
2971 * linux-low.h (struct linux_target_ops) <process_qsupported>:
2973 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2974 and adjust to loop over all features.
2975 * server.c (handle_query) <qSupported>: Adjust to call
2976 target_process_qsupported once, passing it a vector of unprocessed
2978 * target.h (struct target_ops) <process_qsupported>: Change
2980 (target_process_qsupported): Adjust.
2982 2015-11-19 Pedro Alves <palves@redhat.com>
2984 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2986 * configure: Regenerate.
2988 2015-11-19 Pedro Alves <palves@redhat.com>
2990 * configure: Regenerate.
2992 2015-11-19 Yao Qi <yao.qi@linaro.org>
2994 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2997 2015-11-19 Yao Qi <yao.qi@linaro.org>
2999 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3000 (struct aarch64_operand): Move enum out.
3002 2015-11-19 Yao Qi <yao.qi@linaro.org>
3004 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3005 struct user_fpsimd_state *.
3006 (aarch64_store_fpregset): Likewise.
3008 2015-11-19 Yao Qi <yao.qi@linaro.org>
3010 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3011 struct user_pt_regs *.
3012 (aarch64_store_gregset): Likewise.
3014 2015-11-18 Pedro Alves <palves@redhat.com>
3016 * Makefile.in (all_object_files): Add $IPA_OBJS.
3018 2015-11-17 Pedro Alves <palves@redhat.com>
3020 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3021 GDB_SIGNAL_0 and gdb_signal_to_string.
3023 2015-11-17 Pedro Alves <palves@redhat.com>
3025 * win32-low.c (handle_output_debug_string): Remove parameter.
3026 (win32_kill): Remove our_status local and adjust call to
3027 handle_output_debug_string.
3028 (get_child_debug_event): Adjust call to
3029 handle_output_debug_string.
3031 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3033 * linux-mips-low.c (mips_fill_gregset): Add cast.
3034 (mips_store_gregset): Likewise.
3035 (mips_fill_fpregset): Likewise.
3036 (mips_store_fpregset): Likewise.
3038 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3040 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3043 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3045 * linux-mips-low.c (mips_linux_new_thread): Change type of
3046 watch_type to enum target_hw_bp_type.
3048 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3050 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3051 Change return type to arm_hwbp_type.
3053 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3055 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3056 (arm_store_gregset): Likewise.
3057 * linux-arm-low.c (arm_get_hwcap): Likewise.
3058 (arm_read_description): Likewise.
3060 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3062 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3064 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3066 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3067 (ppc_fill_vsxregset): Likewise.
3068 (ppc_store_vsxregset): Likewise.
3069 (ppc_fill_vrregset): Likewise.
3070 (ppc_store_vrregset): Likewise.
3071 (ppc_fill_evrregset): Likewise.
3072 (ppc_store_evrregset): Likewise.
3074 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3076 * linux-ppc-low.c (ppc_usrregs_info): Remove
3077 forward-declaration.
3078 (ppc_arch_setup): Move lower in file.
3080 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3082 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3083 (ps_pdwrite): Likewise.
3085 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3087 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3088 to after assert checks.
3090 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3092 * proc-service.c (ps_pdread): Add/adjust casts.
3093 (ps_pdwrite): Add/adjust casts.
3095 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3097 * server.c (handle_search_memory_1): Cast return value of
3100 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3102 * server.c (write_qxfer_response): Change type of data to
3105 2015-10-29 Pedro Alves <palves@redhat.com>
3107 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3109 2015-10-29 Pedro Alves <palves@redhat.com>
3111 * tracepoint.c (clear_installed_tracepoints): Add casts.
3113 2015-10-29 Pedro Alves <palves@redhat.com>
3115 * server.c (handle_v_cont, process_serial_event): Add enum
3116 gdb_signal casts to signal parsing code.
3118 2015-10-29 Pedro Alves <palves@redhat.com>
3120 * linux-low.h (NULL_REGSET): Define.
3121 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3122 * linux-arm-low.c (arm_regsets): Likewise.
3123 * linux-crisv32-low.c (cris_regsets): Likewise.
3124 * linux-m68k-low.c (m68k_regsets): Likewise.
3125 * linux-mips-low.c (mips_regsets): Likewise.
3126 * linux-nios2-low.c (nios2_regsets): Likewise.
3127 * linux-ppc-low.c (ppc_regsets): Likewise.
3128 * linux-s390-low.c (s390_regsets): Likewise.
3129 * linux-sh-low.c (sh_regsets): Likewise.
3130 * linux-sparc-low.c (sparc_regsets): Likewise.
3131 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3132 * linux-tile-low.c (tile_regsets): Likewise.
3133 * linux-x86-low.c (x86_regsets): Likewise.
3134 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3136 2015-10-29 Pedro Alves <palves@redhat.com>
3138 * linux-low.h (NULL_REGSET): Define.
3139 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3140 * linux-arm-low.c (arm_regsets): Likewise.
3141 * linux-crisv32-low.c (cris_regsets): Likewise.
3142 * linux-m68k-low.c (m68k_regsets): Likewise.
3143 * linux-mips-low.c (mips_regsets): Likewise.
3144 * linux-nios2-low.c (nios2_regsets): Likewise.
3145 * linux-ppc-low.c (ppc_regsets): Likewise.
3146 * linux-s390-low.c (s390_regsets): Likewise.
3147 * linux-sh-low.c (sh_regsets): Likewise.
3148 * linux-sparc-low.c (sparc_regsets): Likewise.
3149 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3150 * linux-tile-low.c (tile_regsets): Likewise.
3151 * linux-x86-low.c (x86_regsets): Likewise.
3152 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3154 2015-10-26 Doug Evans <dje@google.com>
3156 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3158 2015-10-26 Doug Evans <dje@google.com>
3160 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3162 2015-10-26 Doug Evans <dje@google.com>
3164 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3166 (attach_thread, find_new_threads_callback): Ditto.
3168 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3170 * mem-break.h (set_breakpoint_data): Remove.
3172 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3174 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3175 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3176 (initialize_low): Remove set_breakpoint_data call.
3177 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3178 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3179 (initialize_low): Remove set_breakpoint_data call.
3180 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3181 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3182 (initialize_low): Remove set_breakpoint_data call.
3184 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3186 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3187 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3188 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3189 * target.h (target_breakpoint_kind_from_pc): New macro.
3191 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3193 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3194 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3195 the default breakpoint kind.
3197 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3199 * linux-arm-low.c (arm_supports_z_point_type): Add software
3202 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3204 * linux-arm-low.c: Refactor breakpoint definitions.
3205 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3206 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3208 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3210 * Makefile.in: Add arm.c/o.
3211 * configure.srv: Likewise.
3212 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3213 (arm_breakpoint_kind_from_pc): New function.
3214 (arm_sw_breakpoint_from_kind): Return proper kind.
3215 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3217 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3219 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3221 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3222 (struct raw_breakpoint) <size>: Remove.
3223 (struct raw_breakpoint) <kind>: Add.
3224 (bp_size): New function.
3225 (bp_opcode): Likewise.
3226 (find_raw_breakpoint_at): Adjust for kind.
3227 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3228 (remove_memory_breakpoint): Adjust for kind call bp_size.
3229 (set_raw_breakpoint_at): Adjust for kind.
3230 (set_breakpoint): Likewise.
3231 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3232 (delete_raw_breakpoint): Adjust for kind.
3233 (delete_breakpoint): Likewise.
3234 (find_gdb_breakpoint): Likewise.
3235 (set_gdb_breakpoint_1): Likewise.
3236 (set_gdb_breakpoint): Likewise.
3237 (delete_gdb_breakpoint_1): Likewise.
3238 (delete_gdb_breakpoint): Likewise.
3239 (uninsert_raw_breakpoint): Likewise.
3240 (reinsert_raw_breakpoint): Likewise.
3241 (set_breakpoint_data): Remove.
3242 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3243 (check_mem_read): Adjust for kind call bp_size.
3244 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3245 (clone_one_breakpoint): Adjust for kind.
3246 * mem-break.h (set_gdb_breakpoint): Likewise.
3247 (delete_gdb_breakpoint): Likewise.
3248 * server.c (process_serial_event): Likewise.
3250 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3252 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3253 (struct linux_target_ops) <breakpoint>: Remove.
3254 (struct linux_target_ops) <breakpoint_len>: Remove.
3255 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3256 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3257 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3258 (arm_sw_breakpoint_from_kind): New function.
3259 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3260 (struct linux_target_ops) <breakpoint>: Remove.
3261 (struct linux_target_ops) <breakpoint_len>: Remove.
3262 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3263 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3264 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3265 (struct linux_target_ops) <breakpoint>: Remove.
3266 (struct linux_target_ops) <breakpoint_len>: Remove.
3267 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3268 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3269 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3270 (struct linux_target_ops) <breakpoint>: Remove.
3271 (struct linux_target_ops) <breakpoint_len>: Remove.
3272 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3273 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3274 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3275 and sw_breakpoint_from_kind to increment the pc.
3276 (linux_breakpoint_kind_from_pc): New function.
3277 (linux_sw_breakpoint_from_kind): New function.
3278 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3279 (initialize_low): Call breakpoint_kind_from_pc and
3280 sw_breakpoint_from_kind to replace breakpoint_data/len.
3281 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3283 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3284 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3285 (struct linux_target_ops) <breakpoint>: Remove.
3286 (struct linux_target_ops) <breakpoint_len>: Remove.
3287 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3288 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3289 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3290 (struct linux_target_ops) <breakpoint>: Remove.
3291 (struct linux_target_ops) <breakpoint_len>: Remove.
3292 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3293 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3294 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3295 (struct linux_target_ops) <breakpoint>: Remove.
3296 (struct linux_target_ops) <breakpoint_len>: Remove.
3297 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3298 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3299 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3300 (struct linux_target_ops) <breakpoint>: Remove.
3301 (struct linux_target_ops) <breakpoint_len>: Remove.
3302 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3303 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3304 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3305 (struct linux_target_ops) <breakpoint>: Remove.
3306 (struct linux_target_ops) <breakpoint_len>: Remove.
3307 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3308 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3309 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3310 (struct linux_target_ops) <breakpoint>: Remove.
3311 (struct linux_target_ops) <breakpoint_len>: Remove.
3312 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3313 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3314 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3315 (struct linux_target_ops) <breakpoint>: Remove.
3316 (struct linux_target_ops) <breakpoint_len>: Remove.
3317 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3318 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3319 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3320 (struct linux_target_ops) <breakpoint>: Remove.
3321 (struct linux_target_ops) <breakpoint_len>: Remove.
3322 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3323 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3324 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3325 (struct linux_target_ops) <breakpoint>: Remove.
3326 (struct linux_target_ops) <breakpoint_len>: Remove.
3327 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3328 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3329 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3330 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3331 (struct linux_target_ops) <breakpoint>: Remove.
3332 (struct linux_target_ops) <breakpoint_len>: Remove.
3333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3334 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3335 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3336 (struct linux_target_ops) <breakpoint>: Remove.
3337 (struct linux_target_ops) <breakpoint_len>: Remove.
3338 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3339 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3341 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3343 * linux-cris-low.c (cris_get_pc): Remove void arg.
3345 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3347 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3350 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3352 * inferiors.c (thread_pid_matches_callback): New function.
3353 (find_thread_process): New function.
3354 (remove_thread): Reset current_thread.
3355 (remove_process): Assert threads have been removed first.
3357 2015-10-15 Yao Qi <yao.qi@linaro.org>
3359 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3361 (aarch64_remove_point): Likewise.
3362 * regcache.c (regcache_register_size): New function.
3364 2015-10-12 Yao Qi <yao.qi@linaro.org>
3366 * linux-aarch64-low.c: Update all callers as emit_load_store
3367 is renamed to aarch64_emit_load_store.
3369 2015-10-12 Yao Qi <yao.qi@linaro.org>
3371 * linux-aarch64-low.c: Update all callers of function renaming
3372 from emit_insn to aarch64_emit_insn.
3374 2015-10-12 Yao Qi <yao.qi@linaro.org>
3376 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3377 arch/aarch64-insn.h.
3378 (struct aarch64_memory_operand): Likewise.
3380 (emit_insn): Move to arch/aarch64-insn.c.
3381 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3382 (emit_load_store): Move to arch/aarch64-insn.c.
3383 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3384 (can_encode_int32): Remove.
3386 2015-10-12 Yao Qi <yao.qi@linaro.org>
3388 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3389 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3390 (aarch64_relocate_instruction): Likewise.
3391 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3392 (struct aarch64_insn_visitor): Likewise.
3394 2015-10-12 Yao Qi <yao.qi@linaro.org>
3396 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3397 (struct aarch64_insn_visitor): New.
3398 (struct aarch64_insn_relocation_data): New.
3399 (aarch64_ftrace_insn_reloc_b): New function.
3400 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3401 (aarch64_ftrace_insn_reloc_cb): Likewise.
3402 (aarch64_ftrace_insn_reloc_tb): Likewise.
3403 (aarch64_ftrace_insn_reloc_adr): Likewise.
3404 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3405 (aarch64_ftrace_insn_reloc_others): Likewise.
3407 (aarch64_relocate_instruction): Use visitor.
3409 2015-10-12 Yao Qi <yao.qi@linaro.org>
3411 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3412 int. Add argument buf.
3413 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3414 aarch64_relocate_instruction.
3416 2015-10-12 Yao Qi <yao.qi@linaro.org>
3418 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3419 argument insn. Remove local variable insn. Don't call
3421 (aarch64_install_fast_tracepoint_jump_pad): Call
3424 2015-09-30 Yao Qi <yao.qi@linaro.org>
3426 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3427 (emit_load_store_pair): Likewise.
3429 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3431 * dll.c (match_dll): Add cast(s).
3432 (unloaded_dll): Likewise.
3433 * linux-low.c (second_thread_of_pid_p): Likewise.
3434 (delete_lwp_callback): Likewise.
3435 (count_events_callback): Likewise.
3436 (select_event_lwp_callback): Likewise.
3437 (linux_set_resume_request): Likewise.
3438 * server.c (accumulate_file_name_length): Likewise.
3439 (emit_dll_description): Likewise.
3440 (handle_qxfer_threads_worker): Likewise.
3441 (visit_actioned_threads): Likewise.
3442 * thread-db.c (any_thread_of): Likewise.
3443 * tracepoint.c (same_process_p): Likewise.
3444 (match_blocktype): Likewise.
3445 (build_traceframe_info_xml): Likewise.
3447 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3449 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3451 (gdb_unparse_agent_expr): Likewise.
3452 * hostio.c (require_data): Likewise.
3453 (handle_pread): Likewise.
3454 * linux-low.c (disable_regset): Likewise.
3455 (fetch_register): Likewise.
3456 (store_register): Likewise.
3457 (get_dynamic): Likewise.
3458 (linux_qxfer_libraries_svr4): Likewise.
3459 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3460 (set_fast_tracepoint_jump): Likewise.
3461 (uninsert_fast_tracepoint_jumps_at): Likewise.
3462 (reinsert_fast_tracepoint_jumps_at): Likewise.
3463 (validate_inserted_breakpoint): Likewise.
3464 (clone_agent_expr): Likewise.
3465 * regcache.c (init_register_cache): Likewise.
3466 * remote-utils.c (putpkt_binary_1): Likewise.
3467 (decode_M_packet): Likewise.
3468 (decode_X_packet): Likewise.
3469 (look_up_one_symbol): Likewise.
3470 (relocate_instruction): Likewise.
3471 (monitor_output): Likewise.
3472 * server.c (handle_search_memory): Likewise.
3473 (handle_qxfer_exec_file): Likewise.
3474 (handle_qxfer_libraries): Likewise.
3475 (handle_qxfer): Likewise.
3476 (handle_query): Likewise.
3477 (handle_v_cont): Likewise.
3478 (handle_v_run): Likewise.
3479 (captured_main): Likewise.
3480 * target.c (write_inferior_memory): Likewise.
3481 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3482 * tracepoint.c (init_trace_buffer): Likewise.
3483 (add_tracepoint_action): Likewise.
3484 (add_traceframe): Likewise.
3485 (add_traceframe_block): Likewise.
3486 (cmd_qtdpsrc): Likewise.
3487 (cmd_qtdv): Likewise.
3488 (cmd_qtstatus): Likewise.
3489 (response_source): Likewise.
3490 (response_tsv): Likewise.
3491 (cmd_qtnotes): Likewise.
3492 (gdb_collect): Likewise.
3493 (initialize_tracepoint): Likewise.
3495 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3497 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3498 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3499 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3501 (enum aarch64_condition_codes): New enum.
3502 (w0): New static global.
3505 (struct aarch64_memory_operand) <type>: New
3506 MEMORY_OPERAND_POSTINDEX type.
3507 (postindex_memory_operand): New helper function.
3508 (emit_ret): New function.
3509 (emit_load_store_pair): New function, factored out of emit_stp
3510 with support for MEMORY_OPERAND_POSTINDEX.
3511 (emit_stp): Rewrite using emit_load_store_pair.
3512 (emit_ldp): New function.
3513 (emit_load_store): Likewise.
3514 (emit_ldr): Mention post-index instruction in comment.
3515 (emit_ldrh): New function.
3516 (emit_ldrb): New function.
3517 (emit_ldrsw): Mention post-index instruction in comment.
3518 (emit_str): Likewise.
3519 (emit_subs): New function.
3520 (emit_cmp): Likewise.
3521 (emit_and): Likewise.
3522 (emit_orr): Likewise.
3523 (emit_orn): Likewise.
3524 (emit_eor): Likewise.
3525 (emit_mvn): Likewise.
3526 (emit_lslv): Likewise.
3527 (emit_lsrv): Likewise.
3528 (emit_asrv): Likewise.
3529 (emit_mul): Likewise.
3530 (emit_sbfm): Likewise.
3531 (emit_sbfx): Likewise.
3532 (emit_ubfm): Likewise.
3533 (emit_ubfx): Likewise.
3534 (emit_csinc): Likewise.
3535 (emit_cset): Likewise.
3536 (emit_nop): Likewise.
3537 (emit_ops_insns): New helper function.
3538 (emit_pop): Likewise.
3539 (emit_push): Likewise.
3540 (aarch64_emit_prologue): New function.
3541 (aarch64_emit_epilogue): Likewise.
3542 (aarch64_emit_add): Likewise.
3543 (aarch64_emit_sub): Likewise.
3544 (aarch64_emit_mul): Likewise.
3545 (aarch64_emit_lsh): Likewise.
3546 (aarch64_emit_rsh_signed): Likewise.
3547 (aarch64_emit_rsh_unsigned): Likewise.
3548 (aarch64_emit_ext): Likewise.
3549 (aarch64_emit_log_not): Likewise.
3550 (aarch64_emit_bit_and): Likewise.
3551 (aarch64_emit_bit_or): Likewise.
3552 (aarch64_emit_bit_xor): Likewise.
3553 (aarch64_emit_bit_not): Likewise.
3554 (aarch64_emit_equal): Likewise.
3555 (aarch64_emit_less_signed): Likewise.
3556 (aarch64_emit_less_unsigned): Likewise.
3557 (aarch64_emit_ref): Likewise.
3558 (aarch64_emit_if_goto): Likewise.
3559 (aarch64_emit_goto): Likewise.
3560 (aarch64_write_goto_address): Likewise.
3561 (aarch64_emit_const): Likewise.
3562 (aarch64_emit_call): Likewise.
3563 (aarch64_emit_reg): Likewise.
3564 (aarch64_emit_pop): Likewise.
3565 (aarch64_emit_stack_flush): Likewise.
3566 (aarch64_emit_zero_ext): Likewise.
3567 (aarch64_emit_swap): Likewise.
3568 (aarch64_emit_stack_adjust): Likewise.
3569 (aarch64_emit_int_call_1): Likewise.
3570 (aarch64_emit_void_call_2): Likewise.
3571 (aarch64_emit_eq_goto): Likewise.
3572 (aarch64_emit_ne_goto): Likewise.
3573 (aarch64_emit_lt_goto): Likewise.
3574 (aarch64_emit_le_goto): Likewise.
3575 (aarch64_emit_gt_goto): Likewise.
3576 (aarch64_emit_ge_got): Likewise.
3577 (aarch64_emit_ops_impl): New static global variable.
3578 (aarch64_emit_ops): New target function, return
3579 &aarch64_emit_ops_impl.
3580 (struct linux_target_ops): Install it.
3582 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3584 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3585 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3587 * linux-aarch64-ipa.c: New file.
3588 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3590 (aarch64_get_thread_area): New target method.
3591 (extract_signed_bitfield): New helper function.
3592 (aarch64_decode_ldr_literal): New function.
3593 (enum aarch64_opcodes): New enum.
3594 (struct aarch64_register): New struct.
3595 (struct aarch64_operand): New struct.
3596 (x0): New static global.
3605 (aarch64_register): New helper function.
3606 (register_operand): Likewise.
3607 (immediate_operand): Likewise.
3608 (struct aarch64_memory_operand): New struct.
3609 (offset_memory_operand): New helper function.
3610 (preindex_memory_operand): Likewise.
3611 (enum aarch64_system_control_registers): New enum.
3612 (ENCODE): New macro.
3613 (emit_insn): New helper function.
3614 (emit_b): New function.
3615 (emit_bcond): Likewise.
3616 (emit_cb): Likewise.
3617 (emit_tb): Likewise.
3618 (emit_blr): Likewise.
3619 (emit_stp): Likewise.
3620 (emit_ldp_q_offset): Likewise.
3621 (emit_stp_q_offset): Likewise.
3622 (emit_load_store): Likewise.
3623 (emit_ldr): Likewise.
3624 (emit_ldrsw): Likewise.
3625 (emit_str): Likewise.
3626 (emit_ldaxr): Likewise.
3627 (emit_stxr): Likewise.
3628 (emit_stlr): Likewise.
3629 (emit_data_processing_reg): Likewise.
3630 (emit_data_processing): Likewise.
3631 (emit_add): Likewise.
3632 (emit_sub): Likewise.
3633 (emit_mov): Likewise.
3634 (emit_movk): Likewise.
3635 (emit_mov_addr): Likewise.
3636 (emit_mrs): Likewise.
3637 (emit_msr): Likewise.
3638 (emit_sevl): Likewise.
3639 (emit_wfe): Likewise.
3640 (append_insns): Likewise.
3641 (can_encode_int32_in): New helper function.
3642 (aarch64_relocate_instruction): New function.
3643 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3644 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3645 (struct linux_target_ops): Install aarch64_get_thread_area,
3646 aarch64_install_fast_tracepoint_jump_pad and
3647 aarch64_get_min_fast_tracepoint_insn_len.
3649 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3651 * Makefile.in (aarch64-insn.o): New rule.
3652 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3654 2015-09-21 Yao Qi <yao.qi@linaro.org>
3656 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3658 2015-09-21 Yao Qi <yao.qi@linaro.org>
3660 * tracepoint.c (max_jump_pad_size): Remove.
3662 2015-09-18 Yao Qi <yao.qi@linaro.org>
3664 * linux-aarch64-low.c: Don't include sys/uio.h.
3665 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3667 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3669 * tracepoint.c (eval_result_type): Change prototype.
3670 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3672 2015-09-15 Pedro Alves <palves@redhat.com>
3674 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3675 Check whether to report exec events instead of checking whether
3676 multiprocess is enabled.
3678 2015-09-15 Pedro Alves <palves@redhat.com>
3681 * remote-utils.c (prepare_resume_reply): Merge
3682 TARGET_WAITKIND_VFORK_DONE switch case with the
3683 TARGET_WAITKIND_FORKED case.
3685 2015-09-15 Yao Qi <yao.qi@linaro.org>
3687 * server.c (handle_query): Check string comparison using
3688 "else if" instead of "if".
3690 2015-09-15 Yao Qi <yao.qi@linaro.org>
3692 * server.c (vCont_supported): New global variable.
3693 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3694 matches. Append ";vContSupported+" to own_buf.
3695 (handle_v_requests): Append ";s;S" to own_buf if target supports
3696 hardware single step or vCont_supported is false.
3697 (capture_main): Set vCont_supported to zero.
3699 2015-09-15 Yao Qi <yao.qi@linaro.org>
3701 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3703 (linux_supports_hardware_single_step): ... New function.
3704 (linux_target_ops): Update.
3705 * lynx-low.c (lynx_target_ops): Set field
3706 supports_hardware_single_step to target_can_do_hardware_single_step.
3707 * nto-low.c (nto_target_ops): Likewise.
3708 * spu-low.c (spu_target_ops): Likewise.
3709 * win32-low.c (win32_target_ops): Likewise.
3710 * target.c (target_can_do_hardware_single_step): New function.
3711 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3712 Remove. <supports_hardware_single_step>: New field.
3713 (target_supports_conditional_breakpoints): Remove.
3714 (target_supports_hardware_single_step): New macro.
3715 (target_can_do_hardware_single_step): Declare.
3716 * server.c (handle_query): Use target_supports_hardware_single_step
3717 instead of target_supports_conditional_breakpoints.
3719 2015-09-15 Yao Qi <yao.qi@linaro.org>
3721 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3723 (struct linux_target_ops the_low_target): Install
3724 aarch64_linux_siginfo_fixup.
3726 2015-09-11 Don Breazeal <donb@codesourcery.com>
3727 Luis Machado <lgustavo@codesourcery.com>
3729 * linux-low.c (linux_mourn): Static declaration.
3730 (linux_arch_setup): Move in front of
3731 handle_extended_wait.
3732 (linux_arch_setup_thread): New function.
3733 (handle_extended_wait): Handle exec events. Call
3734 linux_arch_setup_thread. Make event_lwp argument a
3735 pointer-to-a-pointer.
3736 (check_zombie_leaders): Do not check stopped threads.
3737 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3738 (linux_low_filter_event): Add lwp and thread for exec'ing
3739 non-leader thread if leader thread has been deleted.
3740 Refactor code into linux_arch_setup_thread and call it.
3741 Pass child lwp pointer by reference to handle_extended_wait.
3742 (linux_wait_for_event_filtered): Update comment.
3743 (linux_wait_1): Prevent clobbering exec event status.
3744 (linux_supports_exec_events): New function.
3745 (linux_target_ops) <supports_exec_events>: Initialize new member.
3746 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3748 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3749 * server.c (report_exec_events): New global variable.
3750 (handle_query): Handle qSupported query for exec-events feature.
3751 (captured_main): Initialize report_exec_events.
3752 * server.h (report_exec_events): Declare new global variable.
3753 * target.h (struct target_ops) <supports_exec_events>: New
3755 (target_supports_exec_events): New macro.
3756 * win32-low.c (win32_target_ops) <supports_exec_events>:
3757 Initialize new member.
3759 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3761 * linux-low.c (linux_low_enable_btrace): Remove.
3762 (linux_target_ops): Replace linux_low_enable_btrace with
3763 linux_enable_btrace.
3765 2015-09-03 Yao Qi <yao.qi@linaro.org>
3767 * linux-aarch64-low.c (aarch64_insert_point): Call
3768 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3771 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3773 * linux-low.c (check_stopped_by_breakpoint): Use
3774 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3776 2015-08-27 Pedro Alves <palves@redhat.com>
3778 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3780 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3782 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3783 the XNEW-family equivalent.
3784 (compile_bytecodes): Likewise.
3785 * dll.c (loaded_dll): Likewise.
3786 * event-loop.c (append_callback_event): Likewise.
3787 (create_file_handler): Likewise.
3788 (create_file_event): Likewise.
3789 * hostio.c (handle_open): Likewise.
3790 * inferiors.c (add_thread): Likewise.
3791 (add_process): Likewise.
3792 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3793 * linux-arm-low.c (arm_new_process): Likewise.
3794 (arm_new_thread): Likewise.
3795 * linux-low.c (add_to_pid_list): Likewise.
3796 (linux_add_process): Likewise.
3797 (handle_extended_wait): Likewise.
3798 (add_lwp): Likewise.
3799 (enqueue_one_deferred_signal): Likewise.
3800 (enqueue_pending_signal): Likewise.
3801 (linux_resume_one_lwp_throw): Likewise.
3802 (linux_resume_one_thread): Likewise.
3803 (linux_read_memory): Likewise.
3804 (linux_write_memory): Likewise.
3805 * linux-mips-low.c (mips_linux_new_process): Likewise.
3806 (mips_linux_new_thread): Likewise.
3807 (mips_add_watchpoint): Likewise.
3808 * linux-x86-low.c (initialize_low_arch): Likewise.
3809 * lynx-low.c (lynx_add_process): Likewise.
3810 * mem-break.c (set_raw_breakpoint_at): Likewise.
3811 (set_breakpoint): Likewise.
3812 (add_condition_to_breakpoint): Likewise.
3813 (add_commands_to_breakpoint): Likewise.
3814 (clone_agent_expr): Likewise.
3815 (clone_one_breakpoint): Likewise.
3816 * regcache.c (new_register_cache): Likewise.
3817 * remote-utils.c (look_up_one_symbol): Likewise.
3818 * server.c (queue_stop_reply): Likewise.
3819 (start_inferior): Likewise.
3820 (queue_stop_reply_callback): Likewise.
3821 (handle_target_event): Likewise.
3822 * spu-low.c (fetch_ppc_memory): Likewise.
3823 (store_ppc_memory): Likewise.
3824 * target.c (set_target_ops): Likewise.
3825 * thread-db.c (thread_db_load_search): Likewise.
3826 (try_thread_db_load_1): Likewise.
3827 * tracepoint.c (add_tracepoint): Likewise.
3828 (add_tracepoint_action): Likewise.
3829 (create_trace_state_variable): Likewise.
3830 (cmd_qtdpsrc): Likewise.
3831 (cmd_qtro): Likewise.
3832 (add_while_stepping_state): Likewise.
3833 * win32-low.c (child_add_thread): Likewise.
3834 (get_image_name): Likewise.
3836 2015-08-25 Yao Qi <yao.qi@linaro.org>
3838 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3840 2015-08-25 Yao Qi <yao.qi@linaro.org>
3842 * Makefile.in (aarch64-linux.o): New rule.
3843 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3845 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3846 (aarch64_init_debug_reg_state): Make it extern.
3847 (aarch64_linux_prepare_to_resume): Remove.
3849 2015-08-25 Yao Qi <yao.qi@linaro.org>
3851 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3852 lwp_arch_private_info and ptid_of_lwp.
3854 2015-08-25 Yao Qi <yao.qi@linaro.org>
3856 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3857 Find proc_info by find_process_pid. All callers updated.
3859 2015-08-25 Yao Qi <yao.qi@linaro.org>
3861 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3863 (debug_reg_change_callback): Remove.
3864 (aarch64_notify_debug_reg_change): Remove.
3866 2015-08-25 Yao Qi <yao.qi@linaro.org>
3868 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3869 Call current_lwp_ptid.
3871 2015-08-25 Yao Qi <yao.qi@linaro.org>
3873 * linux-aarch64-low.c (debug_reg_change_callback): Use
3876 2015-08-25 Yao Qi <yao.qi@linaro.org>
3878 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3880 2015-08-25 Yao Qi <yao.qi@linaro.org>
3882 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3884 2015-08-25 Yao Qi <yao.qi@linaro.org>
3886 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3889 2015-08-25 Yao Qi <yao.qi@linaro.org>
3891 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3893 (debug_reg_change_callback): Remove argument entry and add argument
3894 lwp. Remove local variable thread. Don't print thread id in the
3895 debugging output. Don't check whether pid of thread equals to pid.
3896 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3897 iterate_over_lwps instead find_inferior.
3899 2015-08-24 Pedro Alves <palves@redhat.com>
3901 * inferiors.c (get_first_process): New function.
3902 * inferiors.h (get_first_process): New declaration.
3903 * remote-utils.c (read_ptid): Default to the first process in the
3904 list, instead of to the current thread's process.
3906 2015-08-24 Pedro Alves <palves@redhat.com>
3908 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3909 * event-loop.c: Likewise.
3910 * remote-utils.c: Likewise.
3911 * tracepoint.c: Likewise.
3913 2015-08-24 Pedro Alves <palves@redhat.com>
3915 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3918 2015-08-21 Pedro Alves <palves@redhat.com>
3920 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3921 instead of literal 1.
3923 2015-08-21 Pedro Alves <palves@redhat.com>
3925 * tdesc.c (default_description): Explicitly zero-initialize.
3927 2015-08-21 Pedro Alves <palves@redhat.com>
3930 * inferiors.c (remove_thread): Discard any pending stop reply for
3932 * server.c (remove_all_on_match_pid): Rename to ...
3933 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3935 (discard_queued_stop_replies): Change parameter to a ptid. Now
3937 (handle_v_kill, kill_inferior_callback, captured_main)
3938 (process_serial_event): Adjust.
3939 * server.h (discard_queued_stop_replies): Declare.
3941 2015-08-21 Pedro Alves <palves@redhat.com>
3943 * linux-low.c (wait_for_sigstop): Always switch to no thread
3944 selected if the previously current thread dies.
3945 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3946 process instead of the current thread's.
3947 * remote-utils.c (input_interrupt): Don't check if there's no
3949 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3950 current thread to the general thread fails, error out.
3951 (handle_qxfer_auxv, handle_qxfer_libraries)
3952 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3953 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3954 (handle_query): Check if there's a thread selected instead of
3955 checking whether there's any thread in the thread list.
3956 (handle_qxfer_threads, handle_qxfer_btrace)
3957 (handle_qxfer_btrace_conf): Don't error out early if there's no
3958 thread in the thread list.
3959 (handle_v_cont, myresume): Don't set the current thread to the
3961 (process_serial_event) <Hg handling>: Also set thread_id if the
3962 previous general thread is still alive.
3963 (process_serial_event) <g/G handling>: If setting the current
3964 thread to the general thread fails, error out.
3965 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3966 thread's lwp instead of the current thread's.
3967 * target.c (set_desired_thread): If the desired thread was not
3968 found, leave the current thread pointing to NULL. Return an int
3969 (boolean) indicating success.
3970 * target.h (set_desired_thread): Change return type to int.
3972 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
3974 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3975 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3977 (ps_get_thread_area): New function.
3979 2015-08-19 Gary Benson <gbenson@redhat.com>
3981 * hostio.c (handle_pread): Do not attempt to read more data
3982 than hostio_reply_with_data can fit in a packet.
3984 2015-08-18 Joel Brobecker <brobecker@adacore.com>
3986 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3988 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
3990 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3992 2015-08-06 Pedro Alves <palves@redhat.com>
3994 * tracepoint.c (expr_eval_result): Now an int.
3996 2015-08-06 Pedro Alves <palves@redhat.com>
3998 * gdbthread.h (struct regcache): Forward declare.
3999 (struct thread_info) <regcache_data>: Now a struct regcache
4001 * inferiors.c (inferior_regcache_data)
4002 (set_inferior_regcache_data): Now work with struct regcache
4004 * inferiors.h (struct regcache): Forward declare.
4005 (inferior_regcache_data, set_inferior_regcache_data): Now work
4006 with struct regcache pointers.
4007 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4008 (free_register_cache_thread): Remove struct regcache pointer
4011 2015-08-06 Pedro Alves <palves@redhat.com>
4013 * server.c (captured_main): On error, print the exception message
4014 to stderr, and if run_once is set, throw a quit.
4016 2015-08-06 Pedro Alves <palves@redhat.com>
4018 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4021 2015-08-06 Pedro Alves <palves@redhat.com>
4023 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4024 reading beyond the passed in buffer length.
4026 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4028 * tracepoint.c (symbol_list) <required>: Remove.
4030 2015-08-06 Pedro Alves <palves@redhat.com>
4032 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4033 count if stopping and suspending threads.
4034 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4035 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4036 (linux_detach): Complete an ongoing step-over.
4037 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4039 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4040 (linux_wait_1): If passing a signal to the inferior after
4041 finishing a step-over, unsuspend and re-resume all lwps. If we
4042 see a single-step event but the thread should be continuing, don't
4043 pass the trap to gdb.
4044 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4045 internal_error instead of gdb_assert.
4046 (enqueue_pending_signal): New function.
4047 (check_ptrace_stopped_lwp_gone): Add debug output.
4048 (start_step_over): Use internal_error instead of gdb_assert.
4049 (complete_ongoing_step_over): New function.
4050 (linux_resume_one_thread): Don't resume a suspended thread.
4051 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4054 2015-08-06 Pedro Alves <palves@redhat.com>
4056 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4057 (linux_thread_alive): Use lwp_is_marked_dead.
4058 (extended_event_reported): Delete.
4059 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4060 instead of extended_event_reported.
4061 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4063 (lwp_is_marked_dead): New function.
4064 (lwp_running): Use lwp_is_marked_dead.
4065 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4068 2015-08-06 Pedro Alves <palves@redhat.com>
4070 * linux-low.c (linux_wait_1): Move fork event output out of the
4071 !report_to_gdb check. Pass event_child->waitstatus to
4072 target_waitstatus_to_string instead of ourstatus.
4074 2015-08-04 Yao Qi <yao.qi@linaro.org>
4076 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4077 if current_thread is 32 bit.
4079 2015-08-04 Yao Qi <yao.qi@linaro.org>
4081 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4082 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4083 * server.c (extended_protocol): Remove "static".
4084 * server.h (extended_protocol): Declare it.
4086 2015-08-04 Yao Qi <yao.qi@linaro.org>
4088 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4089 both aarch64 and aarch32.
4090 (aarch64_set_pc): Likewise.
4092 2015-08-04 Yao Qi <yao.qi@linaro.org>
4094 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4095 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4096 arm-with-neon.xml to srv_xmlfiles.
4097 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4098 (is_64bit_tdesc): New function.
4099 (aarch64_linux_read_description): New function.
4100 (aarch64_arch_setup): Call aarch64_linux_read_description.
4101 (regs_info): Rename to regs_info_aarch64.
4102 (aarch64_regs_info): Return right regs_info.
4103 (initialize_low_arch): Call initialize_low_arch_aarch32.
4105 2015-08-04 Yao Qi <yao.qi@linaro.org>
4107 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4108 * linux-aarch32-low.c: New file.
4109 * linux-aarch32-low.h: New file.
4110 * linux-arm-low.c (arm_fill_gregset): Move it to
4111 linux-aarch32-low.c.
4112 (arm_store_gregset): Likewise.
4113 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4114 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4115 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4116 (regs_info): Rename to regs_info_arm.
4117 (arm_regs_info): Return regs_info_aarch32 if
4118 have_ptrace_getregset is 1 and target description is
4119 arm_with_neon or arm_with_vfpv3.
4120 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4121 Call initialize_low_arch_aarch32 instead.
4123 2015-08-04 Yao Qi <yao.qi@linaro.org>
4125 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4126 * linux-low.c: ... here.
4127 * linux-low.h (have_ptrace_getregset): Declare it.
4129 2015-08-04 Pedro Alves <palves@redhat.com>
4131 * thread-db.c (struct thread_db): Use new typedefs.
4132 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4134 (disable_thread_event_reporting): Cast result of dlsym to
4135 destination function pointer type.
4136 (thread_db_mourn): Use td_ta_delete_ftype.
4138 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4140 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4142 (CDX_BREAKPOINT): Define for R2.
4143 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4144 (the_low_target): Add comments.
4146 2015-07-30 Yao Qi <yao.qi@linaro.org>
4148 * linux-arm-low.c (arm_hwcap): Remove it.
4149 (arm_read_description): New local variable arm_hwcap. Don't
4150 set arm_hwcap to zero.
4152 2015-07-30 Yao Qi <yao.qi@linaro.org>
4154 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4155 Use regcache->tdesc instead.
4156 (arm_store_wmmxregset): Likewise.
4157 (arm_fill_vfpregset): Likewise.
4158 (arm_store_vfpregset): Likewise.
4160 2015-07-30 Yao Qi <yao.qi@linaro.org>
4162 * linux-arm-low.c: Include arch/arm.h.
4163 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4164 (arm_store_gregset): Likewise.
4166 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4168 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4169 ptrace's 4th parameter.
4171 2015-07-27 Yao Qi <yao.qi@linaro.org>
4173 * configure.srv (case aarch64*-*-linux*): Don't set
4176 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4178 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4180 * linux-arm-low.c: Likewise.
4181 * linux-cris-low.c: Likewise.
4182 * linux-crisv32-low.c: Likewise.
4183 * linux-low.c: Likewise.
4184 * linux-m68k-low.c: Likewise.
4185 * linux-mips-low.c: Likewise.
4186 * linux-nios2-low.c: Likewise.
4187 * linux-s390-low.c: Likewise.
4188 * linux-sparc-low.c: Likewise.
4189 * linux-tic6x-low.c: Likewise.
4190 * linux-tile-low.c: Likewise.
4191 * linux-x86-low.c: Likewise.
4193 2015-07-24 Pedro Alves <palves@redhat.com>
4195 * config.in: Regenerate.
4196 * configure: Regenerate.
4198 2015-07-24 Pedro Alves <palves@redhat.com>
4200 * acinclude.m4: Include ../ptrace.m4.
4201 * configure.ac: Call GDB_AC_PTRACE.
4202 * config.in, configure: Regenerate.
4204 2015-07-24 Yao Qi <yao.qi@linaro.org>
4206 * linux-low.c (linux_create_inferior): Remove setting to
4207 proc->priv->new_inferior.
4208 (linux_attach): Likewise.
4209 (linux_low_filter_event): Likewise.
4210 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4212 2015-07-24 Yao Qi <yao.qi@linaro.org>
4214 * linux-low.c (linux_arch_setup): New function.
4215 (linux_low_filter_event): If proc->tdesc is NULL and
4216 proc->attached is true, call the_low_target.arch_setup.
4217 Otherwise, keep status pending, and return.
4218 (linux_resume_one_lwp_throw): Don't call get_pc if
4219 thread->while_stepping isn't NULL. Don't call
4220 get_thread_regcache if proc->tdesc is NULL.
4221 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4222 (linux_target_ops): Install arch_setup.
4223 * server.c (start_inferior): Call the_target->arch_setup.
4224 * target.h (struct target_ops) <arch_setup>: New field.
4225 (target_arch_setup): New marco.
4226 * lynx-low.c (lynx_target_ops): Update.
4227 * nto-low.c (nto_target_ops): Update.
4228 * spu-low.c (spu_target_ops): Update.
4229 * win32-low.c (win32_target_ops): Update.
4231 2015-07-24 Yao Qi <yao.qi@linaro.org>
4233 * linux-low.c (linux_add_process): Don't set
4234 proc->priv->new_inferior.
4235 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4236 (linux_attach): Likewise.
4238 2015-07-24 Yao Qi <yao.qi@linaro.org>
4240 * server.c (start_inferior): Code refactor.
4242 2015-07-24 Yao Qi <yao.qi@linaro.org>
4244 * server.c (process_serial_event): Set general_thread.
4246 2015-07-21 Yao Qi <yao.qi@linaro.org>
4248 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4249 aarch64_linux_get_debug_reg_capacity.
4251 2015-07-17 Yao Qi <yao.qi@linaro.org>
4253 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4254 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4255 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4256 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4257 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4258 (AARCH64_HWP_ALIGNMENT): Likewise.
4259 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4260 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4261 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4262 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4263 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4264 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4265 (struct aarch64_debug_reg_state): Likewise.
4266 (struct arch_lwp_info): Likewise.
4267 (aarch64_align_watchpoint): Likewise.
4268 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4269 (aarch64_watchpoint_length): Likewise.
4270 (aarch64_point_encode_ctrl_reg): Likewise
4271 (aarch64_point_is_aligned): Likewise.
4272 (aarch64_align_watchpoint): Likewise.
4273 (aarch64_linux_set_debug_regs):
4274 (aarch64_dr_state_insert_one_point): Likewise.
4275 (aarch64_dr_state_remove_one_point): Likewise.
4276 (aarch64_handle_breakpoint): Likewise.
4277 (aarch64_handle_aligned_watchpoint): Likewise.
4278 (aarch64_handle_unaligned_watchpoint): Likewise.
4279 (aarch64_handle_watchpoint): Likewise.
4281 2015-07-17 Yao Qi <yao.qi@linaro.org>
4283 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4284 and don't aarch64_get_debug_reg_state. All callers update.
4285 (aarch64_handle_aligned_watchpoint): Likewise.
4286 (aarch64_handle_unaligned_watchpoint): Likewise.
4287 (aarch64_handle_watchpoint): Likewise.
4288 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4289 (aarch64_remove_point): Likewise.
4291 2015-07-17 Yao Qi <yao.qi@linaro.org>
4293 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4295 (aarch64_handle_unaligned_watchpoint): Likewise.
4297 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4299 Revert the previous 3 commits:
4300 Move gdb_regex* to common/
4301 Move linux_find_memory_regions_full & co.
4302 gdbserver build-id attribute generator
4304 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4305 Jan Kratochvil <jan.kratochvil@redhat.com>
4307 gdbserver build-id attribute generator.
4308 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4309 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4310 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4312 (get_dynamic): Use find_pdhr to traverse program headers.
4313 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4314 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4315 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4316 (get_hex_build_id): New.
4317 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4318 to reply XML document.
4320 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4321 Jan Kratochvil <jan.kratochvil@redhat.com>
4323 * target.c: Include target/target-utils.h and fcntl.h.
4324 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4325 (target_fileio_read_stralloc): New functions.
4327 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4329 * Makefile.in (OBS): Add gdb_regex.o.
4331 * config.in: Rebuilt.
4332 * configure: Rebuilt.
4334 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4335 Jan Kratochvil <jan.kratochvil@redhat.com>
4337 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4338 * Makefile.in (OBS): Add target-utils.o.
4339 (linux-maps.o, target-utils.o): New.
4340 * configure.srv (srv_linux_obj): Add linux-maps.o.
4342 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4344 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4346 (the_low_target): Install it.
4348 2015-07-14 Pedro Alves <palves@redhat.com>
4350 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4351 Instead, ignore ECHILD, and throw an error for other errnos.
4353 2015-07-10 Pedro Alves <palves@redhat.com>
4355 * event-loop.c (struct callback_event) <data>: Change type to
4356 gdb_client_data instance instead of gdb_client_data pointer.
4357 (append_callback_event): Adjust.
4359 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4361 * linux-aarch64-low.c: Add comments for each linux_target_ops
4362 method. Remove comments already covered in target_ops and
4363 linux_target_ops definitions.
4364 (the_low_target): Add comments for each unimplemented method.
4366 2015-07-09 Yao Qi <yao.qi@linaro.org>
4368 * linux-aarch64-low.c (aarch64_regmap): Remove.
4369 (aarch64_usrregs_info): Remove.
4370 (regs_info): Set field usrregs to NULL.
4372 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4374 * linux-low.c: Include "rsp-low.h"
4375 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4376 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4377 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4378 (handle_btrace_enable_pt): New.
4379 (handle_btrace_general_set): Support "pt".
4380 (handle_btrace_conf_general_set): Support "pt:size".
4382 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4384 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4387 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4389 * linux-aarch64-low.c: Remove comment about endianness.
4390 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4391 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4394 2015-06-24 Gary Benson <gbenson@redhat.com>
4396 * linux-i386-ipa.c (stdint.h): Do not include.
4397 * lynx-i386-low.c (stdint.h): Likewise.
4398 * lynx-ppc-low.c (stdint.h): Likewise.
4399 * mem-break.c (stdint.h): Likewise.
4400 * thread-db.c (stdint.h): Likewise.
4401 * tracepoint.c (stdint.h): Likewise.
4402 * win32-low.c (stdint.h): Likewise.
4404 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4406 * server.c (write_qxfer_response): Update call to
4407 remote_escape_output.
4409 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4410 Jan Kratochvil <jan.kratochvil@redhat.com>
4412 Merge multiple hex conversions.
4413 * gdbreplay.c (tohex): Rename to 'fromhex'.
4414 (logchar): Use fromhex.
4416 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4418 * server.c (handle_qxfer_libraries): Set `version' attribute for
4421 2015-06-10 Gary Benson <gbenson@redhat.com>
4423 * target.h (struct target_ops) <multifs_open>: New field.
4424 <multifs_unlink>: Likewise.
4425 <multifs_readlink>: Likewise.
4426 * linux-low.c (nat/linux-namespaces.h): New include.
4427 (linux_target_ops): Initialize the_target->multifs_open,
4428 the_target->multifs_unlink and the_target->multifs_readlink.
4429 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4430 * hostio.c (hostio_fs_pid): New static variable.
4431 (hostio_handle_new_gdb_connection): New function.
4432 (handle_setfs): Likewise.
4433 (handle_open): Use the_target->multifs_open as appropriate.
4434 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4435 (handle_readlink): Use the_target->multifs_readlink as
4437 (handle_vFile): Handle vFile:setfs packets.
4438 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4439 after target_handle_new_gdb_connection.
4441 2015-06-10 Gary Benson <gbenson@redhat.com>
4443 * configure.ac (AC_CHECK_FUNCS): Add setns.
4444 * config.in: Regenerate.
4445 * configure: Likewise.
4446 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4447 (linux-namespaces.o): New rule.
4448 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4450 2015-06-09 Gary Benson <gbenson@redhat.com>
4452 * hostio.c (handle_open): Process mode argument with
4453 fileio_to_host_mode.
4455 2015-06-01 Yao Qi <yao.qi@linaro.org>
4457 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4458 * linux-x86-low.c: Likewise.
4460 2015-05-28 Don Breazeal <donb@codesourcery.com>
4462 * linux-low.c (handle_extended_wait): Initialize
4463 thread_info.last_resume_kind for new fork children.
4465 2015-05-15 Pedro Alves <palves@redhat.com>
4467 * target.h (target_handle_new_gdb_connection): Rewrite using if
4468 wrapped in do/while.
4470 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4472 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4473 * configure, config.in: Regenerate.
4474 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4477 2015-05-12 Don Breazeal <donb@codesourcery.com>
4479 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4480 PTRACE_EVENT_VFORK_DONE.
4481 (linux_low_ptrace_options, extended_event_reported): Add vfork
4483 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4484 and "vforkdone" for RSP 'T' Stop Reply Packet.
4485 * server.h (report_vfork_events): Declare
4488 2015-05-12 Don Breazeal <donb@codesourcery.com>
4490 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4491 (the_low_target) <new_fork>: Initialize new member.
4492 * linux-arm-low.c (arm_new_fork): New function.
4493 (the_low_target) <new_fork>: Initialize new member.
4494 * linux-low.c (handle_extended_wait): Call new target function
4496 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4497 * linux-mips-low.c (mips_add_watchpoint): New function
4498 extracted from mips_insert_point.
4499 (the_low_target) <new_fork>: Initialize new member.
4500 (mips_linux_new_fork): New function.
4501 (mips_insert_point): Call mips_add_watchpoint.
4502 * linux-x86-low.c (x86_linux_new_fork): New function.
4503 (the_low_target) <new_fork>: Initialize new member.
4505 2015-05-12 Don Breazeal <donb@codesourcery.com>
4507 * linux-low.c (handle_extended_wait): Implement return value,
4508 rename argument 'event_child' to 'event_lwp', handle
4509 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4510 (linux_low_ptrace_options): New function.
4511 (linux_low_filter_event): Call linux_low_ptrace_options,
4512 use different argument fo linux_enable_event_reporting,
4513 use return value from handle_extended_wait.
4514 (extended_event_reported): New function.
4515 (linux_wait_1): Call extended_event_reported and set
4516 status to report fork events.
4517 (linux_write_memory): Add pid to debug message.
4518 (reset_lwp_ptrace_options_callback): New function.
4519 (linux_handle_new_gdb_connection): New function.
4520 (linux_target_ops): Initialize new structure member.
4521 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4522 * lynx-low.c: Initialize new structure member.
4523 * remote-utils.c (prepare_resume_reply): Implement stop reason
4524 "fork" for "T" stop message.
4525 * server.c (handle_query): Call handle_new_gdb_connection.
4526 * server.h (report_fork_events): Declare global flag.
4527 * target.h (struct target_ops) <handle_new_gdb_connection>:
4529 (target_handle_new_gdb_connection): New macro.
4530 * win32-low.c: Initialize new structure member.
4532 2015-05-12 Don Breazeal <donb@codesourcery.com>
4534 * mem-break.c (APPEND_TO_LIST): Define macro.
4535 (clone_agent_expr): New function.
4536 (clone_one_breakpoint): New function.
4537 (clone_all_breakpoints): New function.
4538 * mem-break.h: Declare new functions.
4540 2015-05-12 Don Breazeal <donb@codesourcery.com>
4542 * linux-low.c (linux_supports_fork_events): New function.
4543 (linux_supports_vfork_events): New function.
4544 (linux_target_ops): Initialize new structure members.
4545 (initialize_low): Call linux_check_ptrace_features.
4546 * lynx-low.c (lynx_target_ops): Initialize new structure
4548 * server.c (report_fork_events, report_vfork_events):
4550 (handle_query): Add new features to qSupported packet and
4552 (captured_main): Initialize new global variables.
4553 * target.h (struct target_ops) <supports_fork_events>:
4555 <supports_vfork_events>: New member.
4556 (target_supports_fork_events): New macro.
4557 (target_supports_vfork_events): New macro.
4558 * win32-low.c (win32_target_ops): Initialize new structure
4561 2015-05-12 Gary Benson <gbenson@redhat.com>
4563 * server.c (handle_qxfer_exec_file): Use current process
4566 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4568 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4569 Remove HAVE_PTRACE_GETREGS conditionals.
4570 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4571 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4573 2015-05-08 Yao Qi <yao.qi@linaro.org>
4575 * linux-low.c (linux_supports_conditional_breakpoints): New
4577 (linux_target_ops): Install new target method.
4578 * lynx-low.c (lynx_target_ops): Install NULL hook for
4579 supports_conditional_breakpoints.
4580 * nto-low.c (nto_target_ops): Likewise.
4581 * spu-low.c (spu_target_ops): Likewise.
4582 * win32-low.c (win32_target_ops): Likewise.
4583 * server.c (handle_query): Check
4584 target_supports_conditional_breakpoints.
4585 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4587 (target_supports_conditional_breakpoints): New macro.
4589 2015-05-06 Pedro Alves <palves@redhat.com>
4592 * server.c (start_inferior): If the process exits, mourn it.
4594 2015-04-21 Gary Benson <gbenson@redhat.com>
4596 * hostio.c (fileio_open_flags_to_host): Factored out to
4597 fileio_to_host_openflags in common/fileio.c. Single use
4600 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4602 * linux-xtensa-low.c (xtensa_fill_gregset)
4603 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4606 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4608 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4609 (regs_info): Replace usrregs pointer with NULL.
4611 2015-04-17 Gary Benson <gbenson@redhat.com>
4613 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4614 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4615 * server.c (handle_qxfer_exec_file): New function.
4616 (qxfer_packets): Add exec-file entry.
4617 (handle_query): Report qXfer:exec-file:read as supported packet.
4619 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4621 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4623 2015-04-09 Gary Benson <gbenson@redhat.com>
4625 * hostio-errno.c (errno_to_fileio_error): Remove function.
4626 Update caller to use remote_fileio_to_fio_error.
4628 2015-04-09 Yao Qi <yao.qi@linaro.org>
4630 * linux-low.c (linux_insert_point): Call
4631 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4632 (linux_remove_point): Call remove_memory_breakpoint if type is
4634 * linux-x86-low.c (x86_insert_point): Don't call
4635 insert_memory_breakpoint.
4636 (x86_remove_point): Don't call remove_memory_breakpoint.
4638 2015-04-01 Pedro Alves <palves@redhat.com>
4639 Cleber Rosa <crosa@redhat.com>
4641 * server.c (gdbserver_usage): Reorganize and extend the usage
4644 2015-03-24 Pedro Alves <palves@redhat.com>
4646 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4647 output. Also dump TRAP_TRACE.
4648 (linux_low_filter_event): In debug output, distinguish a
4649 resume_stop SIGSTOP from a delayed SIGSTOP.
4651 2015-03-24 Gary Benson <gbenson@redhat.com>
4653 * linux-x86-low.c (x86_linux_new_thread): Moved to
4655 (x86_linux_prepare_to_resume): Likewise.
4657 2015-03-24 Gary Benson <gbenson@redhat.com>
4659 * Makefile.in (x86-linux-dregs.o): New rule.
4660 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4661 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4662 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4663 (x86_linux_dr_get): Likewise.
4664 (x86_linux_dr_set): Likewise.
4665 (update_debug_registers_callback): Likewise.
4666 (x86_linux_dr_set_addr): Likewise.
4667 (x86_linux_dr_get_addr): Likewise.
4668 (x86_linux_dr_set_control): Likewise.
4669 (x86_linux_dr_get_control): Likewise.
4670 (x86_linux_dr_get_status): Likewise.
4671 (x86_linux_update_debug_registers): Likewise.
4673 2015-03-24 Gary Benson <gbenson@redhat.com>
4675 * linux-x86-low.c (x86_linux_update_debug_registers):
4676 New function, factored out from...
4677 (x86_linux_prepare_to_resume): ...this.
4679 2015-03-24 Gary Benson <gbenson@redhat.com>
4681 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4682 (x86_linux_dr_set): Likewise.
4683 (update_debug_registers_callback): Likewise.
4684 (x86_linux_dr_set_addr): Likewise.
4685 (x86_linux_dr_get_addr): Likewise.
4686 (x86_linux_dr_set_control): Likewise.
4687 (x86_linux_dr_get_control): Likewise.
4688 (x86_linux_dr_get_status): Likewise.
4689 (x86_linux_prepare_to_resume): Likewise.
4691 2015-03-24 Gary Benson <gbenson@redhat.com>
4693 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4694 Use perror_with_name. Pass string through gettext.
4695 (x86_linux_dr_set): Likewise.
4697 2015-03-24 Gary Benson <gbenson@redhat.com>
4699 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4700 (x86_linux_dr_set_addr): ...this.
4701 (x86_dr_low_get_addr): Rename to...
4702 (x86_linux_dr_get_addr): ...this.
4703 (x86_dr_low_set_control): Rename to...
4704 (x86_linux_dr_set_control): ...this.
4705 (x86_dr_low_get_control): Rename to...
4706 (x86_linux_dr_get_control): ...this.
4707 (x86_dr_low_get_status): Rename to...
4708 (x86_linux_dr_get_status): ...this.
4709 (x86_dr_low): Update with new function names.
4711 2015-03-24 Gary Benson <gbenson@redhat.com>
4713 * Makefile.in (x86-linux.o): New rule.
4714 * configure.srv: Add x86-linux.o to relevant targets.
4715 * linux-low.c (lwp_set_arch_private_info): New function.
4716 (lwp_arch_private_info): Likewise.
4717 * linux-x86-low.c: Include nat/x86-linux.h.
4718 (arch_lwp_info): Removed structure.
4719 (update_debug_registers_callback):
4720 Use lwp_set_debug_registers_changed.
4721 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4722 and lwp_set_debug_registers_changed.
4723 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4725 2015-03-24 Gary Benson <gbenson@redhat.com>
4727 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4728 * linux-arm-low.c (arm_new_thread): Likewise.
4729 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4730 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4731 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4732 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4734 2015-03-24 Gary Benson <gbenson@redhat.com>
4736 * linux-low.c (ptid_of_lwp): New function.
4737 (lwp_is_stopped): Likewise.
4738 (lwp_stop_reason): Likewise.
4739 * linux-x86-low.c (update_debug_registers_callback):
4741 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4744 2015-03-24 Gary Benson <gbenson@redhat.com>
4746 * linux-low.h (linux_stop_lwp): Remove declaration.
4748 2015-03-24 Gary Benson <gbenson@redhat.com>
4750 * linux-low.h: Include nat/linux-nat.h.
4751 * linux-low.c (iterate_over_lwps_args): New structure.
4752 (iterate_over_lwps_filter): New function.
4753 (iterate_over_lwps): Likewise.
4754 * linux-x86-low.c (update_debug_registers_callback):
4755 Update signature to what iterate_over_lwps expects.
4756 Remove PID check that iterate_over_lwps now performs.
4757 (x86_dr_low_set_addr): Use iterate_over_lwps.
4758 (x86_dr_low_set_control): Likewise.
4760 2015-03-24 Gary Benson <gbenson@redhat.com>
4762 * linux-x86-low.c (x86_debug_reg_state): New function.
4763 (x86_linux_prepare_to_resume): Use the above.
4765 2015-03-24 Gary Benson <gbenson@redhat.com>
4767 * linux-low.c (current_lwp_ptid): New function.
4768 * linux-x86-low.c: Include nat/linux-nat.h.
4769 (x86_dr_low_get_addr): Use current_lwp_ptid.
4770 (x86_dr_low_get_control): Likewise.
4771 (x86_dr_low_get_status): Likewise.
4773 2015-03-20 Pedro Alves <palves@redhat.com>
4775 * tracepoint.c (cmd_qtstatus): Make "str" const.
4777 2015-03-20 Pedro Alves <palves@redhat.com>
4779 * server.c (handle_general_set): Make "req_str" const.
4781 2015-03-19 Pedro Alves <palves@redhat.com>
4783 * linux-low.c (linux_resume_one_lwp): Rename to ...
4784 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4785 instead call perror_with_name.
4786 (check_ptrace_stopped_lwp_gone): New function.
4787 (linux_resume_one_lwp): Reimplement as wrapper around
4788 linux_resume_one_lwp_throw that swallows errors if the LWP is
4791 2015-03-19 Pedro Alves <palves@redhat.com>
4793 * linux-low.c (count_events_callback, select_event_lwp_callback):
4794 No longer check whether the thread has resume_stop as last resume
4797 2015-03-19 Pedro Alves <palves@redhat.com>
4799 * linux-low.c (count_events_callback, select_event_lwp_callback):
4800 Use the lwp's status_pending_p field, not the thread's.
4802 2015-03-19 Pedro Alves <palves@redhat.com>
4804 * linux-low.c (select_event_lwp_callback): Update comments to
4805 no longer mention SIGTRAP.
4807 2015-03-18 Gary Benson <gbenson@redhat.com>
4809 * server.c (handle_query): Do not report vFile:fstat as supported.
4811 2015-03-11 Gary Benson <gbenson@redhat.com>
4813 * hostio.c (sys/types.h): New include.
4814 (sys/stat.h): Likewise.
4815 (common-remote-fileio.h): Likewise.
4816 (handle_fstat): New function.
4817 (handle_vFile): Handle vFile:fstat packets.
4819 2015-03-11 Gary Benson <gbenson@redhat.com>
4821 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4822 struct stat.st_blocks and struct stat.st_blksize.
4823 * configure: Regenerate.
4824 * config.in: Likewise.
4825 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4826 (OBS): Add common-remote-fileio.o.
4827 (common-remote-fileio.o): New rule.
4829 2015-03-09 Pedro Alves <palves@redhat.com>
4831 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4832 'struct sockaddr' pointer in 'accept' call.
4834 2015-03-09 Pedro Alves <palves@redhat.com>
4837 2015-03-07 Pedro Alves <palves@redhat.com>
4838 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4839 or <winsock2.h> here. Instead include "gdb_socket.h".
4840 (remote_open): Use union gdb_sockaddr_u.
4841 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4842 or <winsock2.h> here. Instead include "gdb_socket.h".
4843 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4844 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4846 (init_named_socket, gdb_agent_helper_thread): Use union
4849 2015-03-07 Pedro Alves <palves@redhat.com>
4851 * configure.ac (build_warnings): Move
4852 -Wdeclaration-after-statement to the C-specific set.
4853 * configure: Regenerate.
4855 2015-03-07 Pedro Alves <palves@redhat.com>
4857 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4858 or <winsock2.h> here. Instead include "gdb_socket.h".
4859 (remote_open): Use union gdb_sockaddr_u.
4860 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4861 or <winsock2.h> here. Instead include "gdb_socket.h".
4862 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4863 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4865 (init_named_socket, gdb_agent_helper_thread): Use union
4868 2015-03-07 Pedro Alves <palves@redhat.com>
4870 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4873 2015-03-06 Yao Qi <yao.qi@linaro.org>
4875 * linux-aarch64-low.c (aarch64_insert_point): Use
4876 show_debug_regs as a boolean.
4877 (aarch64_remove_point): Likewise.
4879 2015-03-05 Pedro Alves <palves@redhat.com>
4881 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4882 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4883 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4884 * nto-low.c (nto_target_ops): Likewise.
4885 * spu-low.c (spu_target_ops): Likewise.
4886 * win32-low.c (win32_target_ops): Likewise.
4888 2015-03-04 Pedro Alves <palves@redhat.com>
4890 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4891 Decide whether a breakpoint triggered based on the SIGTRAP's
4893 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4894 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4895 (linux_low_filter_event): Check for breakpoints before checking
4897 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4899 (linux_stopped_by_sw_breakpoint)
4900 (linux_supports_stopped_by_sw_breakpoint)
4901 (linux_stopped_by_hw_breakpoint)
4902 (linux_supports_stopped_by_hw_breakpoint): New functions.
4903 (linux_target_ops): Install new target methods.
4905 2015-03-04 Pedro Alves <palves@redhat.com>
4907 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4908 * server.c (swbreak_feature, hwbreak_feature): New globals.
4909 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4910 (captured_main): Clear swbreak_feature and hwbreak_feature.
4911 * server.h (swbreak_feature, hwbreak_feature): Declare.
4912 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4913 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4914 supports_stopped_by_hw_breakpoint>: New fields.
4915 (target_supports_stopped_by_sw_breakpoint)
4916 (target_stopped_by_sw_breakpoint)
4917 (target_supports_stopped_by_hw_breakpoint)
4918 (target_stopped_by_hw_breakpoint): Declare.
4920 2015-03-04 Pedro Alves <palves@redhat.com>
4922 enum lwp_stop_reason -> enum target_stop_reason
4923 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4924 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4925 (linux_wait_1, stuck_in_jump_pad_callback)
4926 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4927 (linux_stopped_by_watchpoint):
4928 * linux-low.h (enum lwp_stop_reason): Delete.
4929 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4930 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4932 2015-03-04 Yao Qi <yao.qi@linaro.org>
4934 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4936 2015-03-03 Gary Benson <gbenson@redhat.com>
4938 * hostio.c (handle_vFile): Fix prefix lengths.
4940 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4942 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4945 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4947 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4948 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4949 (clean): Add "rm -f" for above C files.
4950 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4951 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4952 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4953 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4954 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4955 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4956 (init_registers_s390x_vx_linux64)
4957 (init_registers_s390x_tevx_linux64)
4958 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4959 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4961 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4962 (s390_store_vxrs_high): New functions.
4963 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4965 (s390_arch_setup): Add logic for selecting one of the new target
4966 descriptions. Activate the new vector regsets if applicable.
4967 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4968 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4969 and init_registers_s390x_tevx_linux64.
4971 2015-03-01 Pedro Alves <palves@redhat.com>
4973 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4976 2015-02-27 Pedro Alves <palves@redhat.com>
4978 * linux-x86-low.c (u_debugreg_offset): New function.
4979 (x86_linux_dr_get, x86_linux_dr_set): Use it.
4981 2015-02-27 Pedro Alves <palves@redhat.com>
4983 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4984 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4985 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4986 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4987 (ps_lsetfpregs, ps_getpid)
4988 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4989 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4990 (ps_lsetxregs, ps_plog): Declare.
4992 2015-02-27 Pedro Alves <palves@redhat.com>
4994 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4995 IP_AGENT_EXPORT_FUNC.
4996 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4997 IP_AGENT_EXPORT_FUNC.
4998 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4999 (IP_AGENT_EXPORT): Delete.
5000 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5001 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5002 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5003 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5004 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5005 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5006 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5007 (traceframe_read_count, traceframe_write_count)
5008 (traceframes_created, trace_state_variables, get_raw_reg)
5009 (get_trace_state_variable_value, set_trace_state_variable_value)
5010 (ust_loaded, helper_thread_id, cmd_buf): Use
5011 IPA_SYM_EXPORTED_NAME.
5012 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5013 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5014 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5015 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5016 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5017 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5018 EXTERN_C_PUSH/EXTERN_C_POP.
5019 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5020 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5021 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5022 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5023 (traceframe_write_count, traceframe_read_count)
5024 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5025 (about_to_request_buffer_space, get_trace_state_variable_value)
5026 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5027 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5028 EXTERN_C_PUSH/EXTERN_C_POP.
5029 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5030 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5031 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5032 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5033 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5034 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5035 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5036 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5038 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5039 (IP_AGENT_EXPORT_VAR_DECL): Define.
5041 (gdb_agent_get_raw_reg): Declare.
5043 2015-02-27 Tom Tromey <tromey@redhat.com>
5044 Pedro Alves <palves@redhat.com>
5046 Rename symbols whose names are reserved C++ keywords throughout.
5048 2015-02-27 Pedro Alves <palves@redhat.com>
5050 * Makefile.in (COMPILER): New, get it from autoconf.
5051 (CXX): Get from autoconf instead.
5052 (COMPILE.pre): Use COMPILER.
5053 (CC-LD): Rename to ...
5054 (CC_LD): ... this. Use COMPILER.
5055 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5056 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5057 * acinclude.m4: Include build-with-cxx.m4.
5058 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5059 Disable -Werror by default if building in C++ mode.
5060 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5061 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5062 the C++ compiler. Save/restore CXXFLAGS too.
5063 * configure: Regenerate.
5065 2015-02-27 Pedro Alves <palves@redhat.com>
5067 * acinclude.m4: Include libiberty.m4.
5068 * configure.ac: Call libiberty_INIT.
5069 * config.in, configure: Regenerate.
5071 2015-02-26 Pedro Alves <palves@redhat.com>
5073 * linux-low.c (linux_wait_1): When incrementing the PC past a
5074 program breakpoint always use the_low_target.breakpoint_len as
5075 increment, rather than the maximum between that and
5076 the_low_target.decr_pc_after_break.
5078 2015-02-23 Pedro Alves <palves@redhat.com>
5080 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5081 thread was doing a step-over; always adjust the PC if
5082 we stepped over a permanent breakpoint.
5083 (linux_wait_1): If we stepped over breakpoint that was on top of a
5084 permanent breakpoint, manually advance the PC past it.
5086 2015-02-23 Pedro Alves <palves@redhat.com>
5088 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5090 (x86_fill_gregset, x86_store_gregset): Use it when handling
5093 2015-02-20 Pedro Alves <palves@redhat.com>
5095 * thread-db.c: Include "nat/linux-procfs.h".
5096 (thread_db_init): Skip listing new threads if the kernel supports
5097 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5099 2015-02-20 Pedro Alves <palves@redhat.com>
5101 * linux-low.c (status_pending_p_callback): Use ptid_match.
5103 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5105 PR breakpoints/16812
5106 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5107 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5108 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5110 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5112 PR breakpoints/15956
5113 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5115 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5117 * linux-low.c (linux_low_btrace_conf): Print size.
5118 * server.c (handle_btrace_conf_general_set): New.
5119 (hanle_general_set): Call handle_btrace_conf_general_set.
5120 (handle_query): Report Qbtrace-conf:bts:size as supported.
5122 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5124 * linux-low.c (linux_low_enable_btrace): Update parameters.
5125 (linux_low_btrace_conf): New.
5126 (linux_target_ops)<to_btrace_conf>: Initialize.
5127 * server.c (current_btrace_conf): New.
5128 (handle_btrace_enable): Rename to ...
5129 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5130 to target_enable_btrace. Update comment. Update users.
5131 (handle_qxfer_btrace_conf): New.
5132 (qxfer_packets): Add btrace-conf entry.
5133 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5134 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5135 (target_ops)<read_btrace_conf>: New.
5136 (target_enable_btrace): Update parameters.
5137 (target_read_btrace_conf): New.
5139 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5141 * server.c (handle_btrace_general_set): Remove call to
5142 target_supports_btrace.
5143 (supported_btrace_packets): New.
5144 (handle_query): Call supported_btrace_packets.
5145 * target.h: include btrace-common.h.
5146 (btrace_target_info): Removed.
5147 (supports_btrace, target_supports_btrace): Update parameters.
5149 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5151 * Makefile.in (SFILES): Add common/btrace-common.c.
5152 (OBS): Add common/btrace-common.o.
5153 (btrace-common.o): Add build rules.
5154 * linux-low: Include btrace-common.h.
5155 (linux_low_read_btrace): Use struct btrace_data. Call
5156 btrace_data_init and btrace_data_fini.
5158 2015-02-06 Pedro Alves <palves@redhat.com>
5160 * thread-db.c (find_new_threads_callback): Add debug output.
5162 2015-02-04 Pedro Alves <palves@redhat.com>
5164 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5165 (resume_stopped_resumed_lwps): New function.
5166 (linux_wait_for_event_filtered): Use it.
5168 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5170 * Makefile.in (SFILES): Add linux-personality.c.
5171 (linux-personality.o): New rule.
5172 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5173 list of objects to be built.
5174 * linux-low.c: Include nat/linux-personality.h.
5175 (linux_create_inferior): Remove code to disable address space
5176 randomization (moved to ../nat/linux-personality.c). Create
5177 cleanup to disable address space randomization.
5179 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5181 * Makefile.in (posix-strerror.o): New rule.
5182 (mingw-strerror.o): Likewise.
5183 * configure: Regenerated.
5184 * configure.ac: Source file ../common/common.host. Initialize new
5185 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5187 2015-01-14 Yao Qi <yao@codesourcery.com>
5189 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5190 (ppc-linux.o): New rule.
5191 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5192 * configure.ac: AC_CHECK_FUNCS(getauxval).
5193 * config.in: Re-generated.
5194 * configure: Re-generated.
5195 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5196 ppc64_64bit_inferior_p
5198 2015-01-14 Yao Qi <yao@codesourcery.com>
5200 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5201 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5202 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5203 (PT_ORIG_R3, PT_TRAP): Likewise.
5204 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5205 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5206 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5208 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5210 * i387-fp.c (i387_cache_to_xsave): In look over
5211 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5212 zmmh_low_space field by use of zmmh_high_space.
5214 2015-01-09 Pedro Alves <palves@redhat.com>
5216 * linux-low.c (step_over_bkpt): Move higher up in the file.
5217 (handle_extended_wait): Don't store the stop_pc here.
5218 (get_stop_pc): Adjust comments and rename to ...
5219 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5220 stopped for a software breakpoint or hardware breakpoint.
5221 (thread_still_has_status_pending_p): New function.
5222 (status_pending_p_callback): Use
5223 thread_still_has_status_pending_p. If the event is no longer
5224 interesting, resume the LWP.
5225 (handle_tracepoints): Add assert.
5226 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5227 (wstatus_maybe_breakpoint): New function.
5228 (cancel_breakpoint): Delete function.
5229 (check_stopped_by_watchpoint): New function, factored out from
5230 linux_low_filter_event.
5231 (lp_status_maybe_breakpoint): Delete function.
5232 (linux_low_filter_event): Remove filter_ptid argument.
5233 Leave thread group exits pending here. Store the LWP's stop PC.
5234 Always leave events pending.
5235 (linux_wait_for_event_filtered): Pull all events out of the
5236 kernel, and leave them all pending.
5237 (count_events_callback, select_event_lwp_callback): Consider all
5239 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5240 (select_event_lwp): Only give preference to the stepping LWP in
5241 all-stop mode. Adjust comments.
5242 (ignore_event): New function.
5243 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5244 references to cancel_breakpoints. Adjust to renames. Also give
5245 equal priority to all LWPs that have had events in non-stop mode.
5246 If reporting a software breakpoint event, unadjust the LWP's PC.
5247 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5248 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5250 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5251 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5252 (linux_stopped_by_watchpoint): Adjust.
5253 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5254 * linux-low.h (enum lwp_stop_reason): New.
5255 (struct lwp_info) <stop_pc>: Adjust comment.
5256 <stopped_by_watchpoint>: Delete field.
5257 <stop_reason>: New field.
5258 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5259 * mem-break.c (software_breakpoint_inserted_here)
5260 (hardware_breakpoint_inserted_here): New function.
5261 * mem-break.h (software_breakpoint_inserted_here)
5262 (hardware_breakpoint_inserted_here): Declare.
5263 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5264 (cancel_breakpoints): Delete.
5265 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5266 (upload_fast_traceframes): Remove references to
5269 2015-01-09 Pedro Alves <palves@redhat.com>
5271 * thread-db.c (find_new_threads_callback): Ignore thread if the
5272 kernel thread ID is -1.
5274 2015-01-09 Pedro Alves <palves@redhat.com>
5276 * linux-low.c (linux_attach_fail_reason_string): Move to
5277 nat/linux-ptrace.c, and rename.
5278 (linux_attach_lwp): Update comment.
5279 (attach_proc_task_lwp_callback): New function.
5280 (linux_attach): Adjust to rename and use
5281 linux_proc_attach_tgid_threads.
5282 (linux_attach_fail_reason_string): Delete declaration.
5284 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5286 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5287 * server.c (gdbserver_version): Likewise.
5289 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5291 * remote-utils.c: Include ctype.h.
5292 (input_interrupt): Explicitly handle the case when the char
5293 received is the NUL byte. Improve the printing of non-ASCII
5296 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5298 * linux-low.c (linux_low_filter_event): Update call to
5299 linux_enable_event_reporting following the addition of
5300 a new parameter to that function.
5302 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5305 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5306 (AARCH64_FPCR_REGNO): Likewise.
5307 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5308 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5309 (aarch64_store_fpregset): Likewise.
5311 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5313 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5314 Remove FIXME comment about assumption about N.
5316 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5318 * configure.ac: If large-file support is disabled in GDBserver,
5319 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5320 * configure: Regenerate.
5322 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5324 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5325 warning upon ENODATA from ptrace.
5326 * linux-s390-low.c (s390_store_tdb): New.
5327 (s390_regsets): Add regset for NT_S390_TDB.
5329 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5331 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5332 without a fill_function.
5333 * linux-s390-low.c (s390_fill_last_break): Remove.
5334 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5335 (s390_arch_setup): Use regset's size instead of fill_function for
5338 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5340 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5341 the regset's store function when ptrace returned an error.
5342 * regcache.c (get_thread_regcache): Invalidate register cache
5343 before fetching inferior's registers.
5345 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5347 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5348 while-loop as for-loop.
5349 (regsets_store_inferior_registers): Likewise.
5351 2014-11-28 Yao Qi <yao@codesourcery.com>
5353 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5354 * config.in, configure: Re-generate.
5355 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5358 2014-11-21 Yao Qi <yao@codesourcery.com>
5360 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5361 (AC_CHECK_HEADERS): Remove malloc.h.
5362 * configure: Re-generated.
5363 * config.in: Re-generated.
5364 * server.h: Don't include alloca.h and malloc.h.
5365 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5366 Don't include malloc.h.
5368 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5370 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5371 corresponding ERRNO check in same block.
5373 2014-11-12 Pedro Alves <palves@redhat.com>
5375 * server.c (cont_thread): Update comment.
5376 (start_inferior, attach_inferior): No longer clear cont_thread.
5377 (handle_v_cont): No longer set cont_thread.
5378 (captured_main): Clear cont_thread each time a GDB connects.
5380 2014-11-12 Pedro Alves <palves@redhat.com>
5382 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5383 thread, and don't resume all threads if the Hc thread has exited.
5385 2014-11-12 Pedro Alves <palves@redhat.com>
5387 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5388 the process group instead of to a specific LWP.
5390 2014-10-15 Pedro Alves <palves@redhat.com>
5393 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5395 (arm_set_thread_context): Delete.
5396 (the_low_target): Adjust.
5397 * win32-i386-low.c (debug_registers_changed)
5398 (debug_registers_used): Delete.
5399 (update_debug_registers_callback): New function.
5400 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5401 needing to update their debug registers.
5402 (win32_get_current_dr): New function.
5403 (x86_dr_low_get_addr, x86_dr_low_get_control)
5404 (x86_dr_low_get_status): Fetch the debug register from the thread
5406 (i386_initial_stuff): Adjust.
5407 (i386_get_thread_context): Remove current_event parameter. Don't
5408 clear debug_registers_changed nor copy DR values to
5410 (i386_set_thread_context): Delete.
5411 (i386_prepare_to_resume): New function.
5412 (i386_thread_added): Mark the thread as needing to update irs
5414 (the_low_target): Remove i386_set_thread_context and install
5415 i386_prepare_to_resume.
5416 * win32-low.c (win32_get_thread_context): Adjust.
5417 (win32_set_thread_context): Use SetThreadContext
5419 (win32_prepare_to_resume): New function.
5420 (win32_require_context): New function, factored out from ...
5421 (thread_rec): ... this.
5422 (continue_one_thread): Call win32_prepare_to_resume on each thread
5423 we're about to continue.
5424 (win32_resume): Call win32_prepare_to_resume on the event thread.
5425 * win32-low.h (struct win32_thread_info)
5426 <debug_registers_changed>: New field.
5427 (struct win32_target_ops): Change prototype of set_thread_context,
5428 delete set_thread_context and add prepare_to_resume.
5429 (win32_require_context): New declaration.
5431 2014-10-08 Gary Benson <gbenson@redhat.com>
5433 * server.h: Do not include common-exceptions.h.
5435 2014-10-08 Gary Benson <gbenson@redhat.com>
5437 * server.h: Do not include cleanups.h.
5439 2014-09-30 James Hogan <james.hogan@imgtec.com>
5441 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5444 2014-09-23 Yao Qi <yao@codesourcery.com>
5446 * linux-low.c (lp_status_maybe_breakpoint): New function.
5447 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5448 (count_events_callback): Likewise.
5449 (select_event_lwp_callback): Likewise.
5450 (cancel_breakpoints_callback): Likewise.
5452 2014-09-19 Don Breazeal <donb@codesourcery.com>
5454 * linux-low.c (handle_extended_wait): Call
5455 linux_ptrace_get_extended_event.
5456 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5457 linux_is_extended_waitstatus.
5459 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5461 * Makefile.in (CPPFLAGS): Define.
5462 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5463 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5465 2014-09-16 Gary Benson <gbenson@redhat.com>
5467 * inferiors.h (current_inferior): Renamed as...
5468 (current_thread): New variable. All uses updated.
5469 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5470 (maybe_move_out_of_jump_pad): Likewise.
5471 (cancel_breakpoint): Likewise.
5472 (linux_low_filter_event): Likewise.
5473 (wait_for_sigstop): Likewise.
5474 (linux_resume_one_lwp): Likewise.
5475 (need_step_over_p): Likewise.
5476 (start_step_over): Likewise.
5477 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5478 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5479 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5480 and save_inferior as saved_thread.
5481 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5483 (regcache_invalidate_thread): Likewise.
5484 * remote-utils.c (prepare_resume_reply): Likewise.
5485 * thread-db.c (thread_db_get_tls_address): Likewise.
5486 (disable_thread_event_reporting): Likewise.
5487 (remove_thread_event_breakpoints): Likewise.
5488 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5490 * target.h (set_desired_inferior): Renamed as...
5491 (set_desired_thread): New declaration. All uses updated.
5492 * server.c (myresume): Updated comment to reference thread instead
5494 (handle_serial_event): Likewise.
5495 (handle_target_event): Likewise.
5497 2014-09-12 Tom Tromey <tromey@redhat.com>
5498 Gary Benson <gbenson@redhat.com>
5500 * regcache.h: Include common-regcache.h.
5501 (regcache_read_pc): Don't declare.
5502 * regcache.c (get_thread_regcache_for_ptid): New function.
5504 2014-09-11 Tom Tromey <tromey@redhat.com>
5505 Gary Benson <gbenson@redhat.com>
5507 * symbol.c: New file.
5508 * Makefile.in (SFILES): Add symbol.c.
5509 (OBS): Add symbol.o.
5511 2014-09-11 Gary Benson <gbenson@redhat.com>
5513 * target.c (target_stop_ptid, target_continue_ptid): New
5516 2014-09-11 Tom Tromey <tromey@redhat.com>
5517 Gary Benson <gbenson@redhat.com>
5519 * target.h: Include target/target.h.
5520 * target.c (target_read_memory, target_read_uint32)
5521 (target_write_memory): New functions.
5523 2014-09-11 Gary Benson <gbenson@redhat.com>
5525 * server.h (debug_hw_points): Don't declare.
5526 * server.c (debug_hw_points): Don't define. Replace all uses
5527 with show_debug_regs.
5528 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5529 all uses with show_debug_regs.
5531 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5533 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5534 endianness into account.
5535 (ppc_supply_ptrace_register): Likewise.
5537 2014-09-03 James Hogan <james.hogan@imgtec.com>
5539 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5540 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5542 2014-09-03 Gary Benson <gbenson@redhat.com>
5544 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5545 ALL_DEBUG_ADDRESS_REGISTERS.
5547 2014-09-02 Gary Benson <gbenson@redhat.com>
5549 * i386-low.h: Renamed as...
5550 * x86-low.h: New file. All type, function and variable name
5551 prefixes changed from "i386_" to "x86_". All references updated.
5552 * i386-low.c: Renamed as...
5553 * x86-low.c: New file. All type, function and variable name
5554 prefixes changed from "i386_" to "x86_". All references updated.
5556 2014-09-02 Gary Benson <gbenson@redhat.com>
5558 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5559 (x86_linux_new_thread): Likewise.
5561 2014-08-29 Gary Benson <gbenson@redhat.com>
5563 * server.h (setjmp.h): Do not include.
5564 (toplevel): Do not declare.
5565 (common-exceptions.h): Include.
5566 (cleanups.h): Likewise.
5567 * server.c (toplevel): Do not define.
5568 (exit_code): New static global.
5569 (detach_or_kill_for_exit_cleanup): New function.
5570 (main): New function. Original main renamed to...
5571 (captured_main): New function.
5572 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5574 2014-08-29 Gary Benson <gbenson@redhat.com>
5576 * Makefile.in (SFILES): Add common/common-exceptions.c.
5577 (OBS): Add common-exceptions.o.
5578 (common-exceptions.o): New rule.
5579 * utils.c (prepare_to_throw_exception): New function.
5581 2014-08-29 Gary Benson <gbenson@redhat.com>
5583 * config.in: Regenerate.
5584 * configure: Likewise.
5586 2014-08-29 Gary Benson <gbenson@redhat.com>
5588 * Makefile.in (SFILES): Add common/cleanups.c.
5590 (cleanups.o): New rule.
5592 2014-08-29 Gary Benson <gbenson@redhat.com>
5594 * utils.c (internal_vwarning): New function.
5596 2014-08-28 Gary Benson <gbenson@redhat.com>
5598 * utils.h (fatal): Remove declaration.
5599 * utils.c (fatal): Remove function.
5601 2014-08-28 Gary Benson <gbenson@redhat.com>
5603 * tracepoint.c (gdb_agent_init): Replace fatal with
5605 (initialize_tracepoint): Likewise.
5607 2014-08-28 Gary Benson <gbenson@redhat.com>
5609 * remote-utils.c (remote_prepare): Replace fatal with error.
5611 2014-08-28 Gary Benson <gbenson@redhat.com>
5613 * linux-low.c (linux_async): Replace fatal with warning.
5615 (linux_start_non_stop): Return -1 if linux_async failed.
5617 2014-08-28 Gary Benson <gbenson@redhat.com>
5619 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5621 (i386_dr_low_get_addr): Remove vague comment.
5622 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5625 2014-08-28 Gary Benson <gbenson@redhat.com>
5627 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5628 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5630 (linux_resume_one_lwp): Likewise.
5631 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5633 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5634 with internal_error.
5635 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5636 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5637 (find_register_by_name): Replace fatal with internal_error.
5638 (find_regno): Likewise.
5639 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5640 * thread-db.c (thread_db_create_event): Likewise.
5641 (thread_db_load_search): Likewise.
5642 (try_thread_db_load_1): Likewise.
5643 * tracepoint.c (get_jump_space_head): Replace fatal with
5645 (claim_trampoline_space): Likewise.
5646 (have_fast_tracepoint_trampoline_buffer): Likewise.
5647 (cmd_qtstart): Likewise.
5648 (stop_tracing): Likewise.
5649 (fast_tracepoint_collecting): Likewise.
5650 (target_malloc): Likewise.
5651 (download_tracepoint): Likewise.
5652 (download_trace_state_variables): Replace check with gdb_assert.
5653 (upload_fast_traceframes): Replace fatal with internal_error.
5655 2014-08-19 Tom Tromey <tromey@redhat.com>
5656 Gary Benson <gbenson@redhat.com>
5658 * Makefile.in (SFILES): Add common/common-debug.c.
5659 (OBS): Add common-debug.o.
5660 (common-debug.o): New rule.
5661 * debug.h (debug_printf): Don't declare.
5662 * debug.c (debug_printf): Renamed and rewritten as...
5663 (debug_vprintf): New function.
5665 2014-08-19 Gary Benson <gbenson@redhat.com>
5667 * utils.h: Do not include print-utils.h.
5669 2014-08-19 Tom Tromey <tromey@redhat.com>
5670 Gary Benson <gbenson@redhat.com>
5672 * server.h: Add static assertion.
5673 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5675 2014-08-19 Tom Tromey <tromey@redhat.com>
5676 Gary Benson <gbenson@redhat.com>
5678 * Makefile.in (SFILES): Add common/errors.c.
5679 (OBS): Add errors.o.
5680 (IPA_OBS): Add errors-ipa.o.
5681 (errors.o): New rule.
5682 (errors-ipa.o): Likewise.
5683 * utils.h (perror_with_name, error, warning): Don't declare.
5684 * utils.c (warning): Renamed and rewritten as...
5685 (vwarning): New function.
5686 (error): Renamed and rewritten as...
5687 (verror): New function.
5688 (internal_error): Renamed and rewritten as...
5689 (internal_verror): New function.
5691 2014-08-07 Gary Benson <gbenson@redhat.com>
5693 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5694 * configure: Regenerate.
5695 * config.in: Likewise.
5696 * server.h: Do not include errno.h.
5697 * event-loop.c: Likewise.
5698 * hostio-errno.c: Likewise.
5699 * linux-low.c: Likewise.
5700 * remote-utils.c: Likewise.
5701 * spu-low.c: Likewise.
5702 * utils.c: Likewise.
5703 * gdbreplay.c: Unconditionally include errno.h.
5705 2014-08-07 Gary Benson <gbenson@redhat.com>
5707 * server.h: Do not include string.h.
5708 * event-loop.c: Likewise.
5709 * linux-low.c: Likewise.
5710 * regcache.c: Likewise.
5711 * remote-utils.c: Likewise.
5712 * spu-low.c: Likewise.
5713 * utils.c: Likewise.
5715 2014-08-07 Gary Benson <gbenson@redhat.com>
5717 * server.h: Do not include gdb_assert.h.
5719 2014-08-07 Gary Benson <gbenson@redhat.com>
5721 * server.h: Do not include common-utils.h.
5723 2014-08-07 Gary Benson <gbenson@redhat.com>
5725 * server.h: Do not include ptid.h.
5726 * notif.h: Likewise.
5728 2014-08-07 Gary Benson <gbenson@redhat.com>
5730 * server.h: Do not include gdb_locale.h.
5732 2014-08-07 Gary Benson <gbenson@redhat.com>
5734 * server.h: Do not include gdb/signals.h.
5735 * win32-low.c: Likewise.
5737 2014-08-07 Gary Benson <gbenson@redhat.com>
5739 * server.h: Do not include pathmax.h.
5741 2014-08-07 Gary Benson <gbenson@redhat.com>
5743 * server.h: Do not include libiberty.h.
5744 * linux-bfin-low.c: Likewise.
5746 2014-08-07 Gary Benson <gbenson@redhat.com>
5748 * server.h: Do not include ansidecl.h.
5750 2014-08-07 Gary Benson <gbenson@redhat.com>
5752 * linux-x86-low.c: Do not include stddef.h.
5753 * lynx-ppc-low.c: Likewise.
5754 * tracepoint.c: Likewise.
5756 2014-08-07 Gary Benson <gbenson@redhat.com>
5758 * server.h: Do not include stdarg.h.
5759 * nto-low.c: Likewise.
5761 2014-08-07 Gary Benson <gbenson@redhat.com>
5763 * server.h: Do not include stdlib.h.
5764 * inferiors.c: Likewise.
5765 * linux-low.c: Likewise.
5766 * regcache.c: Likewise.
5767 * spu-low.c: Likewise.
5768 * tracepoint.c: Likewise.
5769 * utils.c: Likewise.
5771 2014-08-07 Gary Benson <gbenson@redhat.com>
5773 * server.h: Do not include stdio.h.
5774 * linux-low.c: Likewise.
5775 * remote-utils.c: Likewise.
5776 * spu-low.c: Likewise.
5777 * utils.c: Likewise.
5778 * wincecompat.c: Likewise.
5780 2014-08-06 Gary Benson <gbenson@redhat.com>
5782 * regcache.c (init_register_cache): Move conditionals inside if.
5784 2014-08-06 Gary Benson <gbenson@redhat.com>
5786 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5788 2014-07-31 Gary Benson <gbenson@redhat.com>
5790 * ax.h: Do not include server.h.
5791 * gdbthread.h: Likewise.
5792 * lynx-low.h: Likewise.
5793 * notif.h: Likewise.
5795 2014-07-30 Gary Benson <gbenson@redhat.com>
5797 * server.h: Include common-defs.h.
5798 Do not include config.h or build-gnulib-gdbserver/config.h.
5800 2014-07-30 Gary Benson <gbenson@redhat.com>
5802 * hostio-errno.c: Move server.h to top of includes list.
5803 * inferiors.c: Likewise.
5804 * linux-x86-low.c: Likewise.
5805 * notif.c: Include server.h.
5807 2014-07-24 Tom Tromey <tromey@redhat.com>
5808 Gary Benson <gbenson@redhat.com>
5810 * server.h (CORE_ADDR): Now unsigned.
5812 2014-07-16 Pedro Alves <palves@redhat.com>
5814 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5816 2014-07-15 Pedro Alves <palves@redhat.com>
5818 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5821 2014-07-11 Pedro Alves <palves@redhat.com>
5823 * linux-low.c (kill_wait_lwp): New function, based on
5824 kill_one_lwp_callback, but use my_waitpid directly.
5825 (kill_one_lwp_callback, linux_kill): Use it.
5827 2014-06-23 Pedro Alves <palves@redhat.com>
5829 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5830 before setting DR0..DR3.
5832 2014-06-20 Gary Benson <gbenson@redhat.com>
5834 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5835 * configure: Regenerated.
5836 * config.in: Likewise.
5838 2014-06-20 Gary Benson <gbenson@redhat.com>
5840 * Makefile.in (SFILES): Update locations for files moved
5842 (object file files): Reordered.
5844 2014-06-20 Gary Benson <gbenson@redhat.com>
5846 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5847 (i386_dr_low_set_addr): Likewise.
5848 (i386_dr_low_get_addr): Likewise.
5849 (i386_dr_low_can_set_control): Likewise.
5850 (i386_dr_low_set_control): Likewise.
5851 (i386_dr_low_get_control): Likewise.
5852 (i386_dr_low_get_status): Likewise.
5853 (i386_get_debug_register_length): Likewise.
5854 * linux-x86-low.c (i386_dr_low_set_addr):
5855 Changed signature. Made static.
5856 (i386_dr_low_get_addr): Likewise.
5857 (i386_dr_low_set_control): Likewise.
5858 (i386_dr_low_get_control): Likewise.
5859 (i386_dr_low_get_status): Likewise.
5860 (i386_dr_low): New global variable.
5861 * win32-i386-low.c (i386_dr_low_set_addr):
5862 Changed signature. Made static.
5863 (i386_dr_low_get_addr): Likewise.
5864 (i386_dr_low_set_control): Likewise.
5865 (i386_dr_low_get_control): Likewise.
5866 (i386_dr_low_get_status): Likewise.
5867 (i386_dr_low): New global variable.
5869 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5871 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5872 * Makefile.in (AR, AR_FLAGS): Define.
5873 * configure: Regenerate.
5875 2014-06-19 Gary Benson <gbenson@redhat.com>
5877 * Makefile.in (i386-dregs.o): New rule.
5878 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5879 * i386-low.c (target.h): Remove include.
5880 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5881 (DR_CONTROL_SHIFT): Likewise.
5882 (DR_CONTROL_SIZE): Likewise.
5883 (DR_RW_EXECUTE): Likewise.
5884 (DR_RW_WRITE): Likewise.
5885 (DR_RW_READ): Likewise.
5886 (DR_RW_IORW): Likewise.
5887 (DR_LEN_1): Likewise.
5888 (DR_LEN_2): Likewise.
5889 (DR_LEN_4): Likewise.
5890 (DR_LEN_8): Likewise.
5891 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5892 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5893 (DR_ENABLE_SIZE): Likewise.
5894 (DR_LOCAL_SLOWDOWN): Likewise.
5895 (DR_GLOBAL_SLOWDOWN): Likewise.
5896 (DR_CONTROL_RESERVED): Likewise.
5897 (I386_DR_CONTROL_MASK): Likewise.
5898 (I386_DR_VACANT): Likewise.
5899 (I386_DR_LOCAL_ENABLE): Likewise.
5900 (I386_DR_GLOBAL_ENABLE): Likewise.
5901 (I386_DR_DISABLE): Likewise.
5902 (I386_DR_SET_RW_LEN): Likewise.
5903 (I386_DR_GET_RW_LEN): Likewise.
5904 (I386_DR_WATCH_HIT): Likewise.
5905 (i386_wp_op_t): Likewise.
5906 (i386_show_dr): Likewise.
5907 (i386_length_and_rw_bits): Likewise.
5908 (i386_insert_aligned_watchpoint): Likewise.
5909 (i386_remove_aligned_watchpoint): Likewise.
5910 (i386_handle_nonaligned_watchpoint): Likewise.
5911 i386_update_inferior_debug_regs(): Likewise.
5912 (i386_dr_insert_watchpoint): Likewise.
5913 (i386_dr_remove_watchpoint): Likewise.
5914 (i386_dr_region_ok_for_watchpoint): Likewise.
5915 (i386_dr_stopped_data_address): Likewise.
5916 (i386_dr_stopped_by_watchpoint): Likewise.
5918 2014-06-19 Gary Benson <gbenson@redhat.com>
5920 * i386-low.c (i386_dr_show): Renamed to
5921 i386_show_dr and made static. All uses updated.
5922 (i386_dr_length_and_rw_bits): Renamed to
5923 i386_length_and_rw_bits and made static.
5925 (i386_dr_insert_aligned_watchpoint): Renamed to
5926 i386_insert_aligned_watchpoint and made static.
5928 (i386_dr_remove_aligned_watchpoint): Renamed to
5929 i386_remove_aligned_watchpoint and made static.
5931 (i386_dr_update_inferior_debug_regs): Renamed to
5932 i386_update_inferior_debug_regs and made static.
5935 2014-06-18 Gary Benson <gbenson@redhat.com>
5937 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5938 (i386_dr_low_can_set_control): Likewise.
5939 (i386_get_debug_register_length): Likewise.
5940 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5941 (i386_dr_low_can_set_control): Likewise.
5942 (i386_get_debug_register_length): Likewise.
5944 2014-06-17 Gary Benson <gbenson@redhat.com>
5946 * i386-low.h (i386-dregs.h): New include.
5947 (DR_FIRSTADDR): Now in i386-dregs.h.
5948 (DR_LASTADDR): Likewise.
5949 (DR_NADDR): Likewise.
5950 (DR_STATUS): Likewise.
5951 (DR_CONTROL): Likewise.
5952 (i386_debug_reg_state): Likewise.
5953 (i386_dr_insert_watchpoint): Likewise.
5954 (i386_dr_remove_watchpoint): Likewise.
5955 (i386_dr_region_ok_for_watchpoint): Likewise.
5956 (i386_dr_stopped_data_address): Likewise.
5957 (i386_dr_stopped_by_watchpoint): Likewise.
5958 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5960 2014-06-18 Gary Benson <gbenson@redhat.com>
5962 * i386-low.h (i386_low_insert_watchpoint): Renamed to
5963 i386_dr_insert_watchpoint.
5964 (i386_low_remove_watchpoint): Renamed to
5965 i386_dr_remove_watchpoint.
5966 (i386_low_region_ok_for_watchpoint): Renamed to
5967 i386_dr_region_ok_for_watchpoint.
5968 (i386_low_stopped_data_address): Renamed to
5969 i386_dr_stopped_data_address.
5970 (i386_low_stopped_by_watchpoint): Renamed to
5971 i386_dr_stopped_by_watchpoint.
5972 * i386-low.c (i386_show_dr): Renamed to
5973 i386_dr_show and made nonstatic. All uses updated.
5974 (i386_length_and_rw_bits): Renamed to
5975 i386_dr_length_and_rw_bits and made nonstatic.
5977 (i386_insert_aligned_watchpoint): Renamed to
5978 i386_dr_insert_aligned_watchpoint and made nonstatic.
5980 (i386_remove_aligned_watchpoint): Renamed to
5981 i386_dr_remove_aligned_watchpoint and made nonstatic.
5983 (i386_update_inferior_debug_regs): Renamed to
5984 i386_dr_update_inferior_debug_regs and made nonstatic.
5986 (i386_low_insert_watchpoint): Renamed to
5987 i386_dr_insert_watchpoint. All uses updated.
5988 (i386_low_remove_watchpoint): Renamed to
5989 i386_dr_remove_watchpoint. All uses updated.
5990 (i386_low_region_ok_for_watchpoint): Renamed to
5991 i386_dr_region_ok_for_watchpoint. All uses updated.
5992 (i386_low_stopped_data_address): Renamed to
5993 i386_dr_stopped_data_address. All uses updated.
5994 (i386_low_stopped_by_watchpoint): Renamed to
5995 i386_dr_stopped_by_watchpoint. All uses updated.
5997 2014-06-18 Gary Benson <gbenson@redhat.com>
5999 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6000 (i386_dr_low_can_set_control): Likewise.
6001 (i386_insert_aligned_watchpoint): New check.
6003 2014-06-18 Gary Benson <gbenson@redhat.com>
6005 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6008 2014-06-18 Gary Benson <gbenson@redhat.com>
6010 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6011 instead of fatal and error.
6012 (i386_handle_nonaligned_watchpoint): Likewise.
6014 2014-06-18 Gary Benson <gbenson@redhat.com>
6016 * i386-low.c (i386_get_debug_register_length): New macro.
6017 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6018 (i386_show_dr): Use debug_printf instead of fprintf. Use
6019 phex to format values.
6021 2014-06-18 Gary Benson <gbenson@redhat.com>
6023 * i386-low.h: Comment changes.
6024 * i386-low.c: Likewise.
6026 2014-06-18 Gary Benson <gbenson@redhat.com>
6028 * i386-low.c: Whitespace changes.
6030 2014-06-12 Tom Tromey <tromey@redhat.com>
6032 * utils.c (freeargv): Remove.
6034 2014-06-12 Tom Tromey <tromey@redhat.com>
6036 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6037 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6038 (parse_debug_format_options): Likewise.
6039 (gdbserver_usage): Likewise.
6040 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6041 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6042 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6044 ($(LIBGNU)): Depend on libiberty.
6045 (all-lib): Recurse into all subdirs.
6046 (install-only): Invoke "install" target in subdirs.
6047 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6049 * configure: Rebuild.
6050 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6051 for vasprintf, vsnprintf, or gettimeofday.
6052 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6055 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6057 * development.sh: Delete.
6058 * Makefile.in (config.status): Adjust dependency on development.sh.
6059 * configure.ac: Adjust development.sh source call.
6060 * configure: Regenerate.
6062 2014-06-02 Pedro Alves <palves@redhat.com>
6064 * ax.c (gdb_free_agent_expr): New function.
6065 * ax.h (gdb_free_agent_expr): New declaration.
6066 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6068 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6070 (clear_breakpoint_conditions_and_commands): New function.
6071 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6072 (clear_breakpoint_conditions_and_commands): New declaration.
6074 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6076 * linux-aarch64-low.c (asm/ptrace.h): Include.
6078 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6080 Fix TLS access for -static -pthread.
6081 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6082 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6083 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6085 2014-05-20 Pedro Alves <palves@redhat.com>
6087 * linux-aarch64-low.c (aarch64_insert_point)
6088 (aarch64_remove_point): No longer check whether the type is
6089 supported here. Adjust to new interface.
6090 (the_low_target): Install aarch64_supports_z_point_type as
6091 supports_z_point_type method.
6092 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6093 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6094 instead of a Z packet char. Adjust.
6095 (arm_supports_z_point_type): New function.
6096 (arm_insert_point, arm_remove_point): Adjust to new interface.
6097 (the_low_target): Install arm_supports_z_point_type.
6098 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6099 (cris_insert_point, cris_remove_point): Adjust to new interface.
6100 Don't check whether the type is supported here.
6101 (the_low_target): Install cris_supports_z_point_type.
6102 * linux-low.c (linux_supports_z_point_type): New function.
6103 (linux_insert_point, linux_remove_point): Adjust to new interface.
6104 * linux-low.h (struct linux_target_ops) <insert_point,
6105 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6106 raw_breakpoint pointer parameter.
6107 <supports_z_point_type>: New method.
6108 * linux-mips-low.c (mips_supports_z_point_type): New function.
6109 (mips_insert_point, mips_remove_point): Adjust to new interface.
6110 Use mips_supports_z_point_type.
6111 (the_low_target): Install mips_supports_z_point_type.
6112 * linux-ppc-low.c (the_low_target): Install NULL as
6113 supports_z_point_type method.
6114 * linux-s390-low.c (the_low_target): Install NULL as
6115 supports_z_point_type method.
6116 * linux-sparc-low.c (the_low_target): Install NULL as
6117 supports_z_point_type method.
6118 * linux-x86-low.c (x86_supports_z_point_type): New function.
6119 (x86_insert_point): Adjust to new insert_point interface. Use
6120 insert_memory_breakpoint. Adjust to new
6121 i386_low_insert_watchpoint interface.
6122 (x86_remove_point): Adjust to remove_point interface. Use
6123 remove_memory_breakpoint. Adjust to new
6124 i386_low_remove_watchpoint interface.
6125 (the_low_target): Install x86_supports_z_point_type.
6126 * lynx-low.c (lynx_target_ops): Install NULL as
6127 supports_z_point_type callback.
6128 * nto-low.c (nto_supports_z_point_type): New.
6129 (nto_insert_point, nto_remove_point): Adjust to new interface.
6130 (nto_target_ops): Install nto_supports_z_point_type.
6131 * mem-break.c: Adjust intro comment.
6132 (struct raw_breakpoint) <raw_type, size>: New fields.
6133 <inserted>: Update comment.
6134 <shlib_disabled>: Delete field.
6135 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6136 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6137 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6138 (raw_bkpt_type_to_target_hw_bp_type): New function.
6139 (find_enabled_raw_code_breakpoint_at): New function.
6140 (find_raw_breakpoint_at): New type and size parameters. Use them.
6141 (insert_memory_breakpoint): New function, based off
6142 set_raw_breakpoint_at.
6143 (remove_memory_breakpoint): New function.
6144 (set_raw_breakpoint_at): Reimplement.
6145 (set_breakpoint): New, based on set_breakpoint_at.
6146 (set_breakpoint_at): Reimplement.
6147 (delete_raw_breakpoint): Go through the_target->remove_point
6148 instead of assuming memory breakpoints.
6149 (find_gdb_breakpoint_at): Delete.
6150 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6151 (find_gdb_breakpoint): New function.
6152 (set_gdb_breakpoint_at): Delete.
6153 (z_type_supported): New function.
6154 (set_gdb_breakpoint_1): New function, loosely based off
6155 set_gdb_breakpoint_at.
6156 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6157 (delete_gdb_breakpoint_at): Delete.
6158 (delete_gdb_breakpoint_1): New function, loosely based off
6159 delete_gdb_breakpoint_at.
6160 (delete_gdb_breakpoint): New function.
6161 (clear_gdb_breakpoint_conditions): Rename to ...
6162 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6164 (add_condition_to_breakpoint): Make static.
6165 (add_breakpoint_condition): Take a struct breakpoint pointer
6166 instead of an address. Adjust.
6167 (gdb_condition_true_at_breakpoint): Rename to ...
6168 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6170 (gdb_condition_true_at_breakpoint): Reimplement.
6171 (add_breakpoint_commands): Take a struct breakpoint pointer
6172 instead of an address. Adjust.
6173 (gdb_no_commands_at_breakpoint): Rename to ...
6174 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6175 parameter. Return true if no breakpoint was found. Change debug
6177 (gdb_no_commands_at_breakpoint): Reimplement.
6178 (run_breakpoint_commands): Rename to ...
6179 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6180 and change return type to boolean.
6181 (run_breakpoint_commands): New function.
6182 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6183 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6184 breakpoint. Go through the_target->remove_point instead of
6185 assuming memory breakpoint.
6186 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6187 software and hardware breakpoints.
6188 (reinsert_raw_breakpoint): Go through the_target->insert_point
6189 instead of assuming memory breakpoint.
6190 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6191 software and hardware breakpoints.
6192 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6193 Check both software and hardware breakpoints.
6194 (validate_inserted_breakpoint): Assert the breakpoint is a
6195 software breakpoint. Set the inserted flag to -1 instead of
6196 setting shlib_disabled.
6197 (delete_disabled_breakpoints): Adjust.
6198 (validate_breakpoints): Only validate software breakpoints.
6199 Adjust to inserted flag change.
6200 (check_mem_read, check_mem_write): Skip breakpoint types other
6201 than software breakpoints. Adjust to inserted flag change.
6202 * mem-break.h (enum raw_bkpt_type): New enum.
6203 (raw_breakpoint, struct process_info): Forward declare.
6204 (Z_packet_to_target_hw_bp_type): Delete declaration.
6205 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6206 (set_gdb_breakpoint, delete_gdb_breakpoint)
6207 (clear_breakpoint_conditions): New declarations.
6208 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6209 (breakpoint_inserted_here): Update comment.
6210 (add_breakpoint_condition, add_breakpoint_commands): Replace
6211 address parameter with a breakpoint pointer parameter.
6212 (gdb_breakpoint_here): Update comment.
6213 (delete_gdb_breakpoint_at): Delete.
6214 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6215 * server.c (process_point_options): Take a struct breakpoint
6216 pointer instead of an address. Adjust.
6217 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6218 delete_gdb_breakpoint.
6219 * spu-low.c (spu_target_ops): Install NULL as
6220 supports_z_point_type method.
6221 * target.h: Include mem-break.h.
6222 (struct target_ops) <prepare_to_access_memory>: Update comment.
6223 <supports_z_point_type>: New field.
6224 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6225 instead of a char. Also take a raw breakpoint pointer.
6226 * win32-arm-low.c (the_low_target): Install NULL as
6227 supports_z_point_type.
6228 * win32-i386-low.c (i386_supports_z_point_type): New function.
6229 (i386_insert_point, i386_remove_point): Adjust to new interface.
6230 (the_low_target): Install i386_supports_z_point_type.
6231 * win32-low.c (win32_supports_z_point_type): New function.
6232 (win32_insert_point, win32_remove_point): Adjust to new interface.
6233 (win32_target_ops): Install win32_supports_z_point_type.
6234 * win32-low.h (struct win32_target_ops):
6235 <supports_z_point_type>: New method.
6236 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6237 instead of a char. Also take a raw breakpoint pointer.
6239 2014-05-20 Pedro Alves <palves@redhat.com>
6241 * mem-break.h: Include break-common.h.
6242 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6243 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6244 (Z_packet_to_target_hw_bp_type): New declaration.
6245 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6246 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6247 (Z_PACKET_ACCESS_WP): Delete macros.
6248 (Z_packet_to_hw_type): Delete function.
6249 * i386-low.h: Don't include break-common.h here.
6250 (Z_packet_to_hw_type): Delete declaration.
6251 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6252 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6253 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6254 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6255 * linux-aarch64-low.c: Don't include break-common.h here.
6256 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6257 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6258 (Z_packet_to_target_hw_bp_type): Delete function.
6259 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6261 (mips_insert_point, mips_remove_point): Use
6262 Z_packet_to_target_hw_bp_type.
6264 2014-05-20 Pedro Alves <palves@redhat.com>
6266 * linux-aarch64-low.c: Include break-common.h.
6267 (enum target_point_type): Delete.
6268 (Z_packet_to_point_type): Rename to ...
6269 (Z_packet_to_target_hw_bp_type): ... this, and return a
6270 target_hw_bp_type instead.
6271 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6272 instead of an enum target_point_type.
6273 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6275 (aarch64_dr_state_insert_one_point)
6276 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6277 (aarch64_handle_aligned_watchpoint)
6278 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6279 Take an enum target_hw_bp_type instead of an enum
6281 (aarch64_supports_z_point_type): New function.
6282 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6283 use Z_packet_to_target_hw_bp_type.
6285 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6287 * configure.ac: Only use -Werror by default when DEVELOPMENT
6289 * configure: Regenerate.
6291 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6293 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6294 * linux-x86-low.c (X86_64_USER_REGS): New.
6295 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6297 2014-04-28 Yao Qi <yao@codesourcery.com>
6299 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6302 2014-04-25 Pedro Alves <palves@redhat.com>
6305 * linux-low.c (linux_attach_fail_reason_string): New function.
6306 (linux_attach_lwp): Delete.
6307 (linux_attach_lwp_1): Rename to ...
6308 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6309 argument. Remove "initial" parameter. Return int instead of
6310 void. Don't error or warn here.
6311 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6312 failure to attach to the tgid. Call warning when failing to
6314 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6315 argument. Remove "initial" parameter. Return int instead of
6316 void. Don't error or warn here.
6317 (linux_attach_fail_reason_string): New declaration.
6318 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6319 interface change. Use linux_attach_fail_reason_string.
6321 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6322 Walfred Tedeschi <walfred.tedeschi@intel.com>
6324 * Makefile.in: Added rules to handle new files
6325 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6326 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6327 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6328 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6329 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6330 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6332 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6333 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6334 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6335 i386/x32-avx512.xml.
6336 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6337 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6338 i386/x32-avx512-linux.xml.
6339 * i387-fp.c (num_avx512_k_registers): New constant for number
6341 (num_avx512_zmmh_low_registers): New constant for number of
6342 lower ZMM registers (0-15).
6343 (num_avx512_zmmh_high_registers): New constant for number of
6344 higher ZMM registers (16-31).
6345 (num_avx512_ymmh_registers): New contant for number of higher
6346 YMM registers (ymm16-31 added by avx521 on x86_64).
6347 (num_avx512_xmm_registers): New constant for number of higher
6348 XMM registers (xmm16-31 added by AVX512 on x86_64).
6349 (struct i387_xsave): Add space for AVX512 registers.
6350 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6351 Add code to handle AVX512 registers.
6352 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6353 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6354 prototypei from generated file.
6355 (tdesc_amd64_avx512_linux): Likewise.
6356 (init_registers_x32_avx512_linux): Likewise.
6357 (tdesc_x32_avx512_linux): Likewise.
6358 (init_registers_i386_avx512_linux): Likewise.
6359 (tdesc_i386_avx512_linux): Likewise.
6360 (x86_64_regmap): Add AVX512 registers.
6361 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6363 (initialize_low_arch): Add code to initialize AVX512 registers.
6365 2014-04-23 Pedro Alves <palves@redhat.com>
6367 * mem-break.c (find_gdb_breakpoint_at): Make static.
6368 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6370 2014-04-23 Pedro Alves <palves@redhat.com>
6372 * i386-low.c: Don't include break-common.h here.
6373 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6374 prototype to take target_hw_bp_type as argument instead of a Z
6376 * i386-low.h: Include break-common.h here.
6377 (Z_packet_to_hw_type): Declare.
6378 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6380 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6381 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6382 (x86_remove_point): Convert the packet number to a
6383 target_hw_bp_type before calling i386_low_remove_watchpoint.
6384 * win32-i386-low.c (i386_insert_point): Convert the packet number
6385 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6386 (i386_remove_point): Convert the packet number to a
6387 target_hw_bp_type before calling i386_low_remove_watchpoint.
6389 2014-04-23 Pedro Alves <palves@redhat.com>
6391 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6393 2014-04-10 Pedro Alves <palves@redhat.com>
6395 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6396 Check if the condition or command is NULL before checking if the
6397 breakpoint is known. On success, return true.
6398 * mem-break.h (add_breakpoint_condition): Document return.
6399 (add_breakpoint_commands): Add describing comment.
6400 * server.c (skip_to_semicolon): New function.
6401 (process_point_options): Use it.
6403 2014-04-09 Pedro Alves <palves@redhat.com>
6405 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6408 2014-02-27 Pedro Alves <palves@redhat.com>
6411 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6413 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6415 (last_thread_of_process_p): Take a PID argument instead of a
6417 (linux_wait_for_lwp): Delete.
6418 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6420 (linux_low_filter_event): New function, party factored out from
6421 linux_wait_for_event.
6422 (linux_wait_for_event): Rename to ...
6423 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6424 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6425 sigsuspend. Check for zombie leaders.
6426 (linux_wait_for_event): Reimplement as wrapper around
6427 linux_wait_for_event_filtered.
6428 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6429 a normal or signal exit is seen, it's the whole process exiting.
6430 (wait_for_sigstop): No longer a for_each_inferior callback.
6431 Rewrite on top of linux_wait_for_event_filtered.
6432 (stop_all_lwps): Call wait_for_sigstop directly.
6433 * server.c (resume, handle_target_event): Handle
6434 TARGET_WAITKIND_NO_RESUMED.
6436 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6438 * win32-low.c (psapi_get_dll_name,
6439 * win32_CreateToolhelp32Snapshot): Delete.
6440 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6441 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6443 (handle_load_dll): Add function description.
6444 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6446 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6448 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6450 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6451 base address when calling win32_add_one_solib.
6452 (handle_load_dll): Delete local variable load_addr.
6453 Remove 0x1000 offset applied to DLL base address when calling
6454 win32_add_one_solib.
6455 (handle_unload_dll): Add comment.
6457 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6459 * win32-low.c (win32_add_all_dlls): Renames
6460 win32_ensure_ntdll_loaded. Rewrite function documentation.
6461 Adjust implementation to always load all DLLs.
6462 Add 0x1000 offset to DLL base address when calling
6463 win32_add_one_solib.
6464 (child_initialization_done): New static global.
6465 (do_initial_child_stuff): Set child_initialization_done to
6466 zero during child initialization, and 1 after. Replace call
6467 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6469 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6470 (handle_unload_dll): Add function documentation.
6471 (get_child_debug_event): Ignore load and unload DLL events
6472 during child initialization.
6474 2014-02-20 Doug Evans <dje@google.com>
6476 Remove global all_lwps.
6477 * inferiors.h (ptid_of): Move here from linux-low.h.
6478 (pid_of, lwpid_of): Ditto.
6479 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6480 parameter is a struct thread_info * now.
6481 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6482 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6483 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6485 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6486 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6487 * linux-arm-low.c (update_registers_callback): Update, "entry"
6488 parameter is a struct thread_info * now.
6489 Fetch lwpid from current_inferior directly.
6490 (arm_insert_point): Pass &all_threads to find_inferior instead of
6492 (arm_remove_point): Ditto.
6493 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6494 (arm_prepare_to_resume): Fetch pid from thread.
6495 (arm_read_description): Fetch lwpid from current_inferior directly.
6496 * linux-low.c (all_lwps): Delete.
6497 (delete_lwp): Delete call to remove_inferior.
6498 (handle_extended_wait): Fetch lwpid from thread.
6499 (add_lwp): Don't set lwp->entry.id. Remove call to
6500 add_inferior_to_list.
6501 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6502 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6503 (kill_one_lwp_callback): Ditto.
6504 (linux_kill): Don't dereference NULL pointer.
6505 Fetch ptid,lwpid from thread.
6506 (get_detach_signal): Fetch ptid from thread.
6507 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6508 Simplify call to regcache_invalidate_thread.
6509 (delete_lwp_callback): Update, "entry" parameter is a
6510 struct thread_info * now. Fetch pid from thread.
6511 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6512 (status_pending_p_callback): Update, "entry" parameter is a
6513 struct thread_info * now. Fetch ptid from thread.
6514 (find_lwp_pid): Update, "entry" parameter is a
6515 struct thread_info * now.
6516 (linux_wait_for_lwp): Fetch pid from thread.
6517 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6518 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6519 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6520 (dequeue_one_deferred_signal): Ditto.
6521 (cancel_breakpoint): Fetch ptid from current_inferior.
6522 (linux_wait_for_event): Pass &all_threads to find_inferior,
6523 not &all_lwps. Fetch ptid, lwpid from thread.
6524 (count_events_callback): Update, "entry" parameter is a
6525 struct thread_info * now.
6526 (select_singlestep_lwp_callback): Ditto.
6527 (select_event_lwp_callback): Ditto.
6528 (cancel_breakpoints_callback): Ditto.
6529 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6531 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6532 (unsuspend_one_lwp): Update, "entry" parameter is a
6533 struct thread_info * now.
6534 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6536 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6537 Fetch lwpid from thread, not lwp.
6538 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6539 Pass &all_threads to find_inferior, not &all_lwps.
6540 (send_sigstop): Fetch lwpid from thread, not lwp.
6541 (send_sigstop_callback): Update, "entry" parameter is a
6542 struct thread_info * now.
6543 (suspend_and_send_sigstop_callback): Ditto.
6544 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6545 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6546 struct thread_info * now.
6547 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6549 (lwp_running): Update, "entry" parameter is a
6550 struct thread_info * now.
6551 (stop_all_lwps): Fetch ptid from thread.
6552 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6553 (linux_resume_one_lwp): Fetch lwpid from thread.
6554 (linux_set_resume_request): Update, "entry" parameter is a
6555 struct thread_info * now. Fetch pid, lwpid from thread.
6556 (resume_status_pending_p): Update, "entry" parameter is a
6557 struct thread_info * now.
6558 (need_step_over_p): Ditto. Fetch lwpid from thread.
6559 (start_step_over): Fetch lwpid from thread.
6560 (linux_resume_one_thread): Update, "entry" parameter is a
6561 struct thread_info * now. Fetch lwpid from thread.
6562 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6563 (proceed_one_lwp): Update, "entry" parameter is a
6564 struct thread_info * now. Fetch lwpid from thread.
6565 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6566 struct thread_info * now.
6567 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6568 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6569 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6571 (regsets_store_inferior_registers): Ditto.
6572 (fetch_register, store_register): Ditto.
6573 (linux_read_memory, linux_write_memory): Ditto.
6574 (linux_request_interrupt): Ditto.
6575 (linux_read_auxv): Ditto.
6576 (linux_xfer_siginfo): Ditto.
6577 (linux_qxfer_spu): Ditto.
6578 (linux_qxfer_libraries_svr4): Ditto.
6579 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6580 moved to inferiors.h.
6582 (get_thread_lwp): Update.
6583 (struct lwp_info): Delete member "entry". Simplify comment for
6586 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6587 current_inferior directly.
6588 (update_watch_registers_callback): Update, "entry" parameter is a
6589 struct thread_info * now. Fetch pid from thread.
6590 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6591 (mips_insert_point): Fetch lwpid from current_inferior.
6592 Pass &all_threads to find_inferior, not &all_lwps.
6593 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6594 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6596 (mips_stopped_data_address): Ditto.
6597 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6599 * linux-tile-low.c (tile_arch_setup): Ditto.
6600 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6601 (update_debug_registers_callback): Update, "entry" parameter is a
6602 struct thread_info * now. Fetch pid from thread.
6603 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6604 Pass &all_threads to find_inferior, not &all_lwps.
6605 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6606 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6607 Pass &all_threads to find_inferior, not &all_lwps.
6608 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6609 (i386_dr_low_get_status): Ditto.
6610 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6611 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6612 (x86_linux_read_description): Ditto.
6613 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6615 2014-02-20 Doug Evans <dje@google.com>
6617 * inferiors.c (get_first_inferior): Fix buglet.
6619 2014-02-19 Doug Evans <dje@google.com>
6621 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6622 * inferiors.c (add_thread): Change result type to struct thread_info *.
6623 All callers updated.
6624 (add_lwp): Call add_thread here instead of in callers.
6625 All callers updated.
6626 * linux-low.h (get_lwp_thread): Rewrite.
6627 (struct lwp_info): New member "thread".
6629 2014-02-19 Doug Evans <dje@google.com>
6631 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6632 All callers updated.
6634 2014-02-19 Doug Evans <dje@google.com>
6636 * inferiors.c (add_thread): Fix whitespace.
6638 2014-02-19 Doug Evans <dje@google.com>
6640 * dll.c (clear_dlls): Replace accessing list implemention details
6642 * gdbthread.h (get_first_thread): Declare.
6643 * inferiors.c (for_each_inferior_with_data): New function.
6644 (get_first_thread): New function.
6645 (find_thread_ptid): Simplify.
6646 (get_first_inferior): New function.
6647 (clear_list): Delete.
6648 (one_inferior_p): New function.
6649 (clear_inferior_list): New function.
6650 (clear_inferiors): Update.
6651 * inferiors.h (for_each_inferior_with_data): Declare.
6652 (clear_inferior_list): Declare.
6653 (one_inferior_p): Declare.
6654 (get_first_inferior): Declare.
6655 * linux-low.c (linux_wait_for_event): Replace accessing list
6656 implemention details with API function.
6657 * server.c (target_running): Ditto.
6658 (accumulate_file_name_length): New function.
6659 (emit_dll_description): New function.
6660 (handle_qxfer_libraries): Replace accessing list implemention
6661 details with API function.
6662 (handle_qxfer_threads_worker): New function.
6663 (handle_qxfer_threads_proper): Replace accessing list implemention
6664 details with API function.
6665 (handle_query): Ditto.
6666 (visit_actioned_threads_callback_ftype): New typedef.
6667 (visit_actioned_threads_data): New struct.
6668 (visit_actioned_threads): Rewrite to be find_inferior callback.
6669 (resume): Call find_inferior.
6670 (handle_status): Replace accessing list implemention
6671 details with API function.
6672 (process_serial_event): Replace accessing list implemention details
6674 * target.c (set_desired_inferior): Replace accessing list implemention
6675 details with API function.
6676 * tracepoint.c (same_process_p): New function.
6677 (gdb_agent_about_to_close): Replace accessing list implemention
6678 details with API function.
6679 * win32-low.c (child_delete_thread): Replace accessing list
6680 implemention details with API function.
6681 (match_dll_by_basename): New function.
6682 (dll_is_loaded_by_basename): New function.
6683 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6684 details call to dll_is_loaded_by_basename.
6686 2014-02-19 Doug Evans <dje@google.com>
6688 * dll.h (struct dll_info): Add comment.
6689 * gdbthread.h (struct thread_info): Add comment.
6690 (current_ptid): Simplify.
6691 * inferiors.c (add_process): Update.
6692 (remove_process): Update.
6693 * inferiors.h (struct process_info): Rename member "head" to "entry".
6694 * linux-low.c (delete_lwp): Update.
6696 (last_thread_of_process_p): Update.
6697 (kill_one_lwp_callback, linux_kill): Update.
6698 (status_pending_p_callback): Update.
6699 (wait_for_sigstop): Update. Simplify read of ptid.
6700 (start_step_over): Update.
6701 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6702 (get_lwp_thread): Update.
6703 (struct lwp_info): Rename member "head" to "entry".
6704 * regcache.h (inferior_list_entry): Delete.
6705 * server.c (kill_inferior_callback): Update.
6706 (detach_or_kill_inferior_callback): Update.
6707 (print_started_pid): Update.
6708 (print_attached_pid): Update.
6709 (process_serial_event): Simplify read of ptid.
6710 * thread-db.c (thread_db_create_event): Update.
6711 (thread_db_get_tls_address): Update.
6712 * win32-low.c (current_inferior_ptid): Simplify.
6714 2014-02-19 Tom Tromey <tromey@redhat.com>
6716 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6718 (target_supports_btrace): Update.
6720 2014-02-14 Yao Qi <yao@codesourcery.com>
6722 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6723 (rsp-low-ipa.o): New target.
6725 2014-02-12 Tom Tromey <tromey@redhat.com>
6727 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6728 convert_ascii_to_int.
6729 * regcache.c (registers_to_string): Likewise.
6730 * remote-utils.c (decode_M_packet): Likewise.
6731 * server.c (process_serial_event): Likewise.
6733 2014-02-12 Tom Tromey <tromey@redhat.com>
6735 * server.c (handle_query, handle_v_run): Use hex2bin, not
6737 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6739 2014-02-12 Tom Tromey <tromey@redhat.com>
6741 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6742 convert_int_to_ascii.
6743 * regcache.c (registers_to_string, collect_register_as_string):
6745 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6747 * server.c (process_serial_event): Likewise.
6748 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6749 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6751 2014-02-12 Tom Tromey <tromey@redhat.com>
6753 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6754 bin2hex, not hexify.
6755 * tracepoint.c (cmd_qtstatus): Likewise.
6757 2014-02-12 Tom Tromey <tromey@redhat.com>
6759 * remote-utils.c (monitor_output): Pass explicit length to
6762 2014-02-12 Tom Tromey <tromey@redhat.com>
6764 * tracepoint.c: Include rsp-low.h.
6765 * server.c: Include rsp-low.h.
6766 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6767 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6769 * remote-utils.c: Include rsp-low.h.
6770 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6771 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6772 (convert_int_to_ascii, convert_ascii_to_int): Move to
6774 * regcache.c: Include rsp-low.h.
6775 * ax.c: Include rsp-low.h.
6776 * Makefile.in (SFILES): Add common/rsp-low.c.
6777 (OBS): Add rsp-low.o.
6778 (rsp-low.o): New target.
6780 2014-02-12 Tom Tromey <tromey@redhat.com>
6782 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6783 Include print-utils.h.
6784 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6785 (plongest, thirty_two, phex_nz): Remove.
6786 * Makefile.in (SFILES): Add common/print-utils.c.
6787 (OBS): Add print-utils.o.
6788 (print-utils-ipa.o): New target.
6789 (print-utils.o): New target.
6790 (IPA_OBJS): Add print-utils-ipa.o.
6792 2014-02-06 Tom Tromey <tromey@redhat.com>
6794 * Makefile.in (SFILES): Fix indentation.
6796 2014-02-05 Doug Evans <dje@google.com>
6798 * linux-low.c (linux_wait_for_event): Improve comment.
6799 (linux_wait_1): Keep current_inferior in sync with event_child.
6801 2014-01-22 Doug Evans <dje@google.com>
6803 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6805 2014-01-22 Doug Evans <dje@google.com>
6807 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6808 * configure: Regenerate.
6809 * config.in: Regenerate.
6810 * Makefile.in (SFILES): Add debug.c.
6812 * debug.c: New file.
6813 * debug.h: New file.
6814 * linux-aarch64-low.c (*): Update all debugging printfs to use
6815 debug_printf instead of fprintf.
6816 * linux-arm-low.c (*): Ditto.
6817 * linux-cris-low.c (*): Ditto.
6818 * linux-crisv32-low.c (*): Ditto.
6819 * linux-m32r-low.c (*): Ditto.
6820 * linux-sparc-low.c (*): Ditto.
6821 * linux-x86.c (*): Ditto.
6822 * linux-low.c (*): Ditto.
6823 (linux_wait_1): Add calls to debug_enter, debug_exit.
6824 (linux_wait): Remove redundant debugging printf.
6825 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6826 (linux_resume, unstop_all_lwps): Ditto.
6827 * mem-break.c (*): Update all debugging printfs to use
6828 debug_printf instead of fprintf.
6829 * remote-utils.c (*): Ditto.
6830 * thread-db.c (*): Ditto.
6831 * server.c #include <ctype.h>, "gdb_vecs.h".
6832 (debug_threads): Moved to debug.c.
6833 (*): Update all debugging printfs to use debug_printf instead of
6835 (start_inferior): Replace call to fflush with call to debug_flush.
6836 (monitor_show_help): Mention set debug-format.
6837 (parse_debug_format_options): New function.
6838 (handle_monitor_command): Handle "monitor set debug-format".
6839 (gdbserver_usage): Mention --debug-format.
6840 (main): Parse --debug-format.
6841 * server.h (debug_threads): Declaration moved to debug.h.
6843 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6844 trace_debug_1 that uses debug_printf.
6845 (tracepoint_look_up_symbols): Update all debugging printfs to use
6846 debug_printf instead of fprintf.
6848 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6850 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6853 2014-01-17 Pedro Alves <palves@redhat.com>
6856 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6857 defined after including gdb_proc_service.h.
6859 2014-01-16 Doug Evans <dje@google.com>
6861 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6862 (match_dll): Use it.
6864 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6866 * target.h (target_ops) <read_btrace>: Change parameters and
6867 return type to allow error reporting.
6868 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6869 trace reading errors on.
6870 * linux-low.c (linux_low_read_btrace): Pass trace reading
6872 (linux_low_disable_btrace): New.
6874 2014-01-15 Doug Evans <dje@google.com>
6876 * inferiors.c (thread_id_to_gdb_id): Delete.
6877 * inferiors.h (thread_id_to_gdb_id): Delete.
6879 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6881 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6882 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6885 2014-01-08 Pedro Alves <palves@redhat.com>
6887 * server.c (handle_status): Don't discard previous queued stop
6888 replies or thread's pending status here.
6889 (main) <disconnection>: Do it here instead.
6891 2014-01-08 Pedro Alves <palves@redhat.com>
6893 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6894 * server.c (visit_actioned_threads, handle_pending_status): New
6896 (handle_v_cont): Factor out parts to ...
6897 (resume): ... this new function. If in all-stop, and a thread
6898 being resumed has a pending status, report it without actually
6900 (myresume): Adjust to use the new 'resume' function.
6901 (clear_pending_status_callback, set_pending_status_callback)
6902 (find_status_pending_thread_callback): New functions.
6903 (handle_status): Handle the case of multiple threads having
6904 interesting statuses to report. Report threads' real last signal
6905 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6906 with an interesting thread to report the status for, instead of
6907 always reporting the status of the first thread.
6909 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6911 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6912 * gdbreplay.c (gdbreplay_version): Likewise.
6914 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6916 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6917 iov.iov_len with the real length in use.
6919 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6921 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6922 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6923 for all targets that use win32-low.c.
6924 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6925 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6927 2013-12-13 Pedro Alves <palves@redhat.com>
6929 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6930 if equal to TARGET_WAITKIND_LOADED.
6931 * win32-low.c (cached_status): New static global.
6932 (win32_wait): Add declaration.
6933 (do_initial_child_stuff): Flush all initial pending debug events
6934 up to the initial breakpoint.
6935 (win32_wait): If CACHED_STATUS was set, return that instead
6936 of doing a real wait. Remove the code resuming the execution
6937 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6938 during the initial phase. Also remove the code changing
6939 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6940 TARGET_WAITKIND_STOPPED.
6942 2013-12-11 Yao Qi <yao@codesourcery.com>
6944 * notif.c (handle_notif_ack): Return 0 if no notification
6947 2013-11-20 Doug Evans <dje@google.com>
6949 * linux-low.c (linux_set_resume_request): Fix comment.
6951 2013-11-20 Doug Evans <dje@google.com>
6953 * linux-low.c (resume_status_pending_p): Tweak comment.
6955 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6957 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6958 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6959 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6960 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6961 (srv_amd64_regobj): Add amd64-mpx.o.
6962 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6963 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6964 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6965 * i387-fp.c (num_pl_bnd_register) Added constant.
6966 (num_pl_bnd_cfg_registers) Added constant.
6967 (struct i387_xsave) Added reserved area and MPX fields.
6968 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6969 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6971 (tdesc_i386_mpx_linux): Add MPX amd64 target.
6972 (init_registers_amd64_mpx_linux): Declare new function.
6973 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6974 (x86_64_regmap): Add MPX registers.
6975 (x86_linux_read_description): Add MPX case.
6976 (initialize_low_arch): Initialize MPX targets.
6978 2013-11-18 Tom Tromey <tromey@redhat.com>
6980 * configure: Rebuild.
6981 * configure.ac: Don't check for stdlib.h.
6982 * gdbreplay.c: Unconditionally include stdlib.h.
6984 2013-11-18 Tom Tromey <tromey@redhat.com>
6986 * config.in: Rebuild.
6987 * configure: Rebuild.
6988 * configure.ac: Don't use AC_HEADER_DIRENT.
6990 2013-11-18 Tom Tromey <tromey@redhat.com>
6992 * server.h: Don't check HAVE_STRING_H.
6993 * gdbreplay.c: Don't check HAVE_STRING_H.
6994 * configure: Rebuild.
6996 2013-11-18 Tom Tromey <tromey@redhat.com>
6998 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7001 2013-11-08 Tom Tromey <tromey@redhat.com>
7003 * configure, config.in: Rebuild.
7004 * configure.ac: Remove unused configury.
7006 2013-11-08 Tom Tromey <tromey@redhat.com>
7008 * acinclude.m4: Include common.m4, codeset.m4.
7009 * configure, config.in: Rebuild.
7010 * configure.ac: Use GDB_AC_COMMON.
7012 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7014 * linux-s390-low.c (HWCAP_S390_TE): New define.
7015 (s390_arch_setup): Consider the TE field in the HWCAP for
7016 determining 'have_regset_tdb'.
7018 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7021 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7024 2013-10-02 Pedro Alves <palves@redhat.com>
7026 * server.c (process_serial_event): Don't output "GDBserver
7027 exiting" if GDB is connected through stdio.
7028 * target.c (mywait): Likewise, be silent if GDB is connected
7031 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7033 * lynx-low.c (lynx_add_threads_after_attach): New function.
7034 (lynx_attach): Remove call to add_thread. Add call to
7035 lynx_add_threads_after_attach instead.
7037 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7039 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7040 * config.in, configure: Regenerated.
7042 2013-09-18 Yao Qi <yao@codesourcery.com>
7045 * server.c (start_inferior): Clear 'resume_info'.
7047 2013-09-16 Jiong Wang <jiwang@tilera.com>
7049 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7052 2013-09-16 Jiong Wang <jiwang@tilera.com>
7054 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7055 linux-tile-low.o to srv_tgtobj.
7057 2013-09-16 Will Newton <will.newton@linaro.org>
7059 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7062 2013-09-06 Pedro Alves <palves@redhat.com>
7064 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7065 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7066 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7067 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7068 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7069 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7071 2013-09-06 Pedro Alves <palves@redhat.com>
7073 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7074 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7076 2013-09-06 Pedro Alves <palves@redhat.com>
7078 * linux-amd64-ipa.c: Include tracepoint.h.
7079 * linux-i386-ipa.c: Include tracepoint.h.
7081 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7083 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7084 (ps_get_thread_area): New function.
7086 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7088 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7089 (initialize_low_arch): Call init_registers_crisv32 rather than
7090 init_register_crisv32.
7092 2013-09-05 Pedro Alves <palves@redhat.com>
7094 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7096 * hostio.h: ... this new file.
7097 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7098 win32-low.c: Include hostio.h.
7100 2013-09-05 Pedro Alves <palves@redhat.com>
7102 * server.h (gdb_client_data, handler_func, callback_handler_func)
7103 (delete_file_handler, add_file_handler, append_callback_event)
7104 (delete_callback_event, start_event_loop, initialize_event_loop):
7105 Move to event-loop.h and include it.
7106 * event-loop.h: New file.
7108 2013-09-05 Pedro Alves <palves@redhat.com>
7110 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7111 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7112 (loaded_dll, unloaded_dll): Move to ...
7113 * dll.h: ... this new file.
7114 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7116 2013-09-05 Pedro Alves <palves@redhat.com>
7118 * server.h (current_process, get_thread_process, all_processes)
7119 (add_inferior_to_list, for_each_inferior, current_inferior)
7120 (remove_inferior, add_process, remove_process, find_process_pid)
7121 (have_started_inferiors_p, have_attached_inferiors_p)
7122 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7123 (clear_inferiors, find_inferior, find_inferior_id)
7124 (inferior_target_data, set_inferior_target_data)
7125 (inferior_regcache_data, set_inferior_regcache_data): Move to
7126 inferiors.h, and include it.
7127 * inferiors.h: New file.
7129 2013-09-05 Pedro Alves <palves@redhat.com>
7131 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7135 2013-09-05 Pedro Alves <palves@redhat.com>
7137 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7139 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7140 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7141 (handle_tracepoint_general_set, handle_tracepoint_query)
7142 (tracepoint_finished_step, tracepoint_was_hit)
7143 (release_while_stepping_state_list, current_traceframe)
7144 (in_readonly_region, traceframe_read_mem)
7145 (fetch_traceframe_registers, traceframe_read_sdata)
7146 (traceframe_read_info, struct fast_tpoint_collect_status)
7147 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7148 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7149 (supply_fast_tracepoint_registers)
7150 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7151 (ipa_tdesc, claim_trampoline_space)
7152 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7153 (agent_mem_read, agent_get_trace_state_variable_value)
7154 (agent_set_trace_state_variable_value, agent_tsv_read)
7155 (agent_mem_read_string, get_raw_reg_func_addr)
7156 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7157 * tracepoint.h: ... this new file.
7159 2013-09-05 Pedro Alves <palves@redhat.com>
7161 * server.h (perror_with_name, error, fatal, warning, paddress)
7162 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7164 * utils.h: New file.
7166 2013-09-05 Pedro Alves <palves@redhat.com>
7168 * server.h (remote_debug, noack_mode, transport_is_reliable)
7169 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7170 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7171 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7172 (write_enn, initialize_async_io, enable_async_io)
7173 (disable_async_io, check_remote_input_interrupt_request)
7174 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7175 (dead_thread_notify, prepare_resume_reply)
7176 (decode_address_to_semicolon, decode_address, decode_m_packet)
7177 (decode_M_packet, decode_X_packet, decode_xfer_write)
7178 (decode_search_memory_packet, unhexify, hexify)
7179 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7180 (look_up_one_symbol, relocate_instruction)
7181 (monitor_output): Move to remote-utils.h, and include it.
7182 * remote-utils.h: New file.
7184 2013-09-05 Pedro Alves <palves@redhat.com>
7186 * server.h (_): Delete.
7188 2013-09-02 Pedro Alves <palves@redhat.com>
7190 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7191 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7193 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7195 2013-09-02 Pierre Muller <muller@sourceware.org>
7197 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7198 or WriteProcessMemory complete successfully and handle
7199 ERROR_PARTIAL_COPY error.
7201 2013-09-02 Pedro Alves <palves@redhat.com>
7203 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7204 error instead of EIO.
7206 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7209 * linux-low.c: Include filestuff.h.
7210 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7211 * lynx-low.c: Include filestuff.h.
7212 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7213 * server.c: Include filestuff.h.
7214 (main): Call notice_open_fds.
7215 * spu-low.c: Include filestuff.h.
7216 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7218 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7220 * Makefile.in: Explain why ../target and ../nat are not
7221 listed as include file search paths.
7222 (linux-waitpid.o): New object file rule.
7223 * configure.srv (srv_native_linux_obj): New variable.
7224 Replace all occurrences of linux native object files with
7225 $srv_native_linux_obj.
7226 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7227 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7228 (linux_enable_event_reporting): Remove declaration.
7229 (my_waitpid): Moved to common/linux-waitpid.c.
7230 (linux_wait_for_event): Pass ptid when calling
7231 linux_enable_event_reporting.
7232 (linux_supports_tracefork_flag): Remove.
7233 (linux_enable_event_reporting): Likewise.
7234 (linux_tracefork_grandchild): Remove.
7235 (STACK_SIZE): Moved to common/linux-ptrace.c.
7236 (linux_tracefork_child): Remove.
7237 (linux_test_for_tracefork): Remove.
7238 (linux_look_up_symbols): Call linux_supports_traceclone.
7239 (initialize_low): Remove call to linux_test_for_tracefork.
7240 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7241 common/linux-ptrace.h.
7242 (PTRACE_TYPE_ARG4): Likewise.
7243 Include linux-ptrace.h.
7245 2013-08-21 Pedro Alves <palves@redhat.com>
7247 * config.in: Renegerate.
7249 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7251 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7252 (SFILES): Remove $(srcdir)/common/target-common.c and
7253 add $(srcdir)/target/waitstatus.c.
7254 (OBS): Remove target-common.o and add waitstatus.o.
7255 (server_h): Remove $(srcdir)/../common/target-common.h and
7256 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7257 and $(srcdir)/../target/waitstatus.h.
7258 (target-common.o): Remove.
7259 (waitstatus.o): New target object file.
7260 * target.h: Do not include target-common.h and
7261 include target/resume.h, target/wait.h and
7262 target/waitstatus.h.
7264 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7266 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7267 to PTRACE_TYPE_ARG3.
7268 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7269 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7271 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7272 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7274 2013-07-27 Jie Zhang <jie@codesourcery.com>
7275 Daniel Jacobowitz <dan@codesourcery.com>
7276 Yao Qi <yao@codesourcery.com>
7278 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7279 (mips-linux-watch.o): New rule.
7280 (mips_linux_watch_h): New variable.
7281 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7283 * linux-mips-low.c: Include mips-linux-watch.h.
7284 (struct arch_process_info, struct arch_lwp_info): New.
7285 (update_watch_registers_callback): New function.
7286 (mips_linux_new_process, mips_linux_new_thread) New functions.
7287 (mips_linux_prepare_to_resume, mips_insert_point): New
7289 (mips_remove_point, mips_stopped_by_watchpoint): New
7291 (rsp_bp_type_to_target_hw_bp_type): New function.
7292 (mips_stopped_data_address): New function.
7293 (the_low_target): Add watchpoint support functions.
7295 2013-07-27 Yao Qi <yao@codesourcery.com>
7297 * i386-low.c: Include break-common.h.
7298 (enum target_hw_bp_type): Remove.
7300 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7302 * Makefile.in (SFILES): /common/target-common.c.
7303 (OBS): Add target-common.o.
7304 (server_h): Add $(srcdir)/../common/target-common.h.
7305 (target-common.o): New target.
7306 * server.c (queue_stop_reply_callback): Free
7307 status string after use.
7308 * target.c (target_waitstatus_to_string): Remove.
7309 * target.h: Include target-common.h.
7310 (resume_kind): Likewise.
7311 (target_waitkind): Likewise.
7312 (target_waitstatus): Likewise.
7313 (TARGET_WNOHANG): Likewise.
7315 2013-07-04 Yao Qi <yao@codesourcery.com>
7317 * Makefile.in (host_alias): Use @host_noncanonical@.
7318 (target_alias): Use @target_noncanonical@.
7319 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7320 ACX_NONCANONICAL_HOST.
7321 * configure: Regenerated.
7324 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7326 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7327 * configure: Rebuild.
7328 * Makefile.in (version_host, version_target): Get from configure.
7329 (version.c): Use $(version_host) and $(version_target).
7331 2013-07-03 Pedro Alves <palves@redhat.com>
7333 * Makefile.in (config.status): Depend on development.sh.
7334 * acinclude.m4: Include libmcheck.m4.
7335 * configure: Regenerate.
7337 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7339 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7340 attribute inside the parentheses.
7341 (winapi_DebugSetProcessKillOnExit): Ditto.
7342 (winapi_DebugBreakProcess): Ditto.
7343 (winapi_GenerateConsoleCtrlEvent): Ditto.
7345 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7347 * notif.h (notif_event): Add a dummy member to avoid compiler
7350 2013-07-01 Pedro Alves <palves@redhat.com>
7352 * hostio.c (HOSTIO_PATH_MAX): Define.
7353 (require_filename, handle_open, handle_unlink, handle_readlink):
7356 2013-07-01 Pedro Alves <palves@redhat.com>
7358 * server.h: Include "pathmax.h".
7359 * linux-low.c: Don't include sys/param.h.
7360 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7362 * win32-low.c: Don't include sys/param.h.
7363 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7365 2013-07-01 Pedro Alves <palves@redhat.com>
7367 * event-loop.c: Don't check HAVE_UNISTD_H before including
7369 * gdbreplay.c: Likewise.
7370 * remote-utils.c: Likewise.
7371 * server.c: Likewise.
7372 * configure.ac: Don't check for unistd.h.
7373 * configure: Regenerate.
7375 2013-06-28 Tom Tromey <tromey@redhat.com>
7377 * Makefile.in (version.c): Use version.in, not
7380 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7382 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7383 * configure: Rebuild.
7384 * Makefile.in (version_host, version_target): Get from configure.
7385 (version.c): Use $(version_host) and $(version_target).
7387 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7389 Fix trace-status to output user name without trailing colon.
7390 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7392 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7394 Fix trace-status to output proper start-time and stop-time.
7395 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7396 output start time and stop time in hex as gdb expects.
7398 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7400 * tracepoint.c (build_traceframe_info_xml): Output trace state
7401 variables present in the trace buffer.
7403 2013-06-24 Tom Tromey <tromey@redhat.com>
7405 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7407 (version.o): Remove.
7408 * gdbreplay.c: Include version.h.
7409 (version, host_name): Don't declare.
7410 * server.h: Include version.h.
7411 (version, host_name): Don't declare.
7413 2013-06-12 Pedro Alves <palves@redhat.com>
7415 * linux-x86-low.c (linux_is_elf64): Delete global.
7416 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7417 with local linux_pid_exe_is_elf_64_file use.
7419 2013-06-11 Pedro Alves <palves@redhat.com>
7421 * linux-low.c (regset_disabled, disable_regset): New functions.
7422 (regsets_fetch_inferior_registers)
7423 (regsets_store_inferior_registers): Use them.
7424 (initialize_regsets_info); Don't allocate the disabled_regsets
7426 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7429 2013-06-11 Pedro Alves <palves@redhat.com>
7431 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7434 2013-06-11 Pedro Alves <palves@redhat.com>
7436 * linux-x86-low.c (initialize_low_arch): Call
7437 init_registers_x32_avx_linux.
7439 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7441 Fix compatibility with Android Bionic.
7442 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7445 2013-06-07 Pedro Alves <palves@redhat.com>
7448 * Makefile.in (OBS): Add tdesc.o.
7449 (IPA_OBJS): Add tdesc-ipa.o.
7450 (tdesc-ipa.o): New rule.
7451 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7453 * linux-low.c (new_inferior): Delete.
7454 (disabled_regsets, num_regsets): Delete.
7455 (linux_add_process): Adjust to set the new per-process
7457 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7458 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7459 was a stop. When calling arch_setup, switch the current inferior
7460 to the thread that got an event.
7461 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7462 (regsets_fetch_inferior_registers)
7463 (regsets_store_inferior_registers): New regsets_info parameter.
7465 (linux_register_in_regsets): New regs_info parameter. Adjust to
7467 (register_addr, fetch_register, store_register): New usrregs_info
7468 parameter. Adjust to use it.
7469 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7470 parameter regs_info. Adjust to use it.
7471 (linux_fetch_registers): Get the current inferior's regs_info, and
7473 (linux_store_registers): Ditto.
7474 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7475 (initialize_low): Don't initialize the target_regsets here. Call
7476 initialize_low_arch.
7477 * linux-low.h (target_regsets): Delete declaration.
7478 (struct regsets_info): New.
7479 (struct usrregs_info): New.
7480 (struct regs_info): New.
7481 (struct process_info_private) <new_inferior>: New field.
7482 (struct linux_target_ops): Delete the num_regs, regmap, and
7483 regset_bitmap fields. New field regs_info.
7484 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7485 * i387-fp.c (num_xmm_registers): Delete.
7486 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7487 calls to new interface.
7488 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7489 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7490 Infer the number of xmm registers from the regcache's target
7492 * i387-fp.h (num_xmm_registers): Delete.
7493 * inferiors.c (add_thread): Don't install the thread's regcache
7495 * proc-service.c (gregset_info): Fetch the current inferior's
7496 regs_info. Adjust to use it.
7497 * regcache.c: Include tdesc.h.
7498 (register_bytes, reg_defs, num_registers)
7499 (gdbserver_expedite_regs): Delete.
7500 (get_thread_regcache): If the thread doesn't have a regcache yet,
7501 create one, instead of aborting gdbserver.
7502 (regcache_invalidate_one): Rename to ...
7503 (regcache_invalidate_thread): ... this.
7504 (regcache_invalidate_one): New.
7505 (regcache_invalidate): Only invalidate registers of the current
7507 (init_register_cache): Add target_desc parameter, and use it.
7508 (new_register_cache): Ditto. Assert the target description has a
7509 non zero registers_size.
7510 (regcache_cpy): Add assertions. Adjust.
7511 (realloc_register_cache, set_register_cache): Delete.
7512 (registers_to_string, registers_from_string): Adjust.
7513 (find_register_by_name, find_regno, find_register_by_number)
7514 (register_cache_size): Add target_desc parameter, and use it.
7515 (free_register_cache_thread, free_register_cache_thread_one)
7516 (regcache_release, register_cache_size): New.
7517 (register_size): Add target_desc parameter, and use it.
7518 (register_data, supply_register, supply_register_zeroed)
7519 (supply_regblock, supply_register_by_name, collect_register)
7520 (collect_register_as_string, collect_register_by_name): Adjust.
7521 * regcache.h (struct target_desc): Forward declare.
7522 (struct regcache) <tdesc>: New field.
7523 (init_register_cache, new_register_cache): Add target_desc
7525 (regcache_invalidate_thread): Declare.
7526 (regcache_invalidate_one): Delete declaration.
7527 (regcache_release): Declare.
7528 (find_register_by_number, register_cache_size, register_size)
7529 (find_regno): Add target_desc parameter.
7530 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7532 * remote-utils.c: Include tdesc.h.
7533 (outreg, prepare_resume_reply): Adjust.
7534 * server.c: Include tdesc.h.
7535 (gdbserver_xmltarget): Delete declaration.
7536 (get_features_xml, process_serial_event): Adjust.
7537 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7539 (struct process_info) <tdesc>: New field.
7540 (ipa_tdesc): Declare.
7541 * tdesc.c: New file.
7542 * tdesc.h: New file.
7543 * tracepoint.c: Include tdesc.h.
7544 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7545 (get_context_regcache): Adjust to pass ipa_tdesc down.
7546 (do_action_at_tracepoint): Adjust to get the register cache size
7547 from the context regcache's description.
7548 (traceframe_walk_blocks): Adjust to get the register cache size
7549 from the current trace frame's description.
7550 (traceframe_get_pc): Adjust to get current trace frame's
7551 description and pass it down.
7552 (gdb_collect): Adjust to get the register cache size from the
7554 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7555 (gdbserver_xmltarget): Delete.
7556 (initialize_low_tracepoint): Set the ipa's target description.
7557 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7558 (initialize_low_tracepoint): Set the ipa's target description.
7559 * linux-x86-low.c: Include tdesc.h.
7560 [__x86_64__] (is_64bit_tdesc): New.
7561 (ps_get_thread_area, x86_get_thread_area): Use it.
7562 (i386_cannot_store_register): Rename to ...
7563 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7564 (i386_cannot_fetch_register): Rename to ...
7565 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7566 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7568 (target_regsets): Rename to ...
7569 (x86_regsets): ... this.
7570 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7572 (x86_siginfo_fixup): Use is_64bit_tdesc.
7573 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7574 (tdesc_x32_avx_linux, tdesc_x32_linux)
7575 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7577 (x86_linux_update_xmltarget): Delete.
7578 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7579 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7580 (AMD64_LINUX_USER64_CS): New.
7581 (x86_linux_read_description): New, based on
7582 x86_linux_update_xmltarget.
7583 (same_process_callback): New.
7584 (x86_arch_setup_process_callback): New.
7585 (x86_linux_update_xmltarget): New.
7586 (x86_regsets_info): New.
7587 (amd64_linux_regs_info): New.
7588 (i386_linux_usrregs_info): New.
7589 (i386_linux_regs_info): New.
7590 (x86_linux_regs_info): New.
7591 (x86_arch_setup): Reimplement.
7592 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7593 (x86_emit_ops): Ditto.
7594 (the_low_target): Adjust. Install x86_linux_regs_info,
7595 x86_cannot_fetch_register, and x86_cannot_store_register.
7596 (initialize_low_arch): New.
7597 * linux-ia64-low.c (tdesc_ia64): Declare.
7598 (ia64_fetch_register): Adjust.
7599 (ia64_usrregs_info, regs_info): New globals.
7600 (ia64_regs_info): New function.
7601 (the_low_target): Adjust.
7602 (initialize_low_arch): New function.
7603 * linux-sparc-low.c (tdesc_sparc64): Declare.
7604 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7606 (sparc_arch_setup): New function.
7607 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7608 (the_low_target): Adjust.
7609 (initialize_low_arch): New function.
7610 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7611 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7612 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7613 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7614 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7615 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7616 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7617 (tdesc_powerpc_isa205_vsx64l): Declare.
7618 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7619 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7620 (ppc_set_pc, ppc_get_hwcap): Adjust.
7621 (ppc_usrregs_info): Forward declare.
7622 (!__powerpc64__) ppc_regmap_adjusted: New global.
7623 (ppc_arch_setup): Adjust to the current process'es target
7625 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7626 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7627 (ppc_store_evrregset): Adjust.
7628 (target_regsets): Rename to ...
7629 (ppc_regsets): ... this, and make static.
7630 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7631 (ppc_regs_info): New function.
7632 (the_low_target): Adjust.
7633 (initialize_low_arch): New function.
7634 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7635 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7636 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7637 (tdesc_s390x_linux64v2): Declare.
7638 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7639 (s390_fill_gregset, s390_store_last_break): Adjust.
7640 (target_regsets): Rename to ...
7641 (s390_regsets): ... this, and make static.
7642 (s390_get_pc, s390_set_pc): Adjust.
7643 (s390_get_hwcap): New target_desc parameter, and use it.
7644 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7645 (s390_arch_setup): Adjust to set the current process'es target
7646 description. Don't adjust the regmap.
7647 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7648 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7649 (regs_info_3264): New globals.
7650 (s390_regs_info): New function.
7651 (the_low_target): Adjust.
7652 (initialize_low_arch): New function.
7653 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7654 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7655 [__mips64] (init_registers_mips_linux)
7656 (init_registers_mips_dsp_linux): Delete defines.
7657 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7658 (have_dsp): New global.
7659 (mips_read_description): New, based on mips_arch_setup.
7660 (mips_arch_setup): Reimplement.
7661 (get_usrregs_info): New function.
7662 (mips_cannot_fetch_register, mips_cannot_store_register)
7663 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7664 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7665 (target_regsets): Rename to ...
7666 (mips_regsets): ... this, and make static.
7667 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7668 (dsp_regs_info, regs_info): New globals.
7669 (mips_regs_info): New function.
7670 (the_low_target): Adjust.
7671 (initialize_low_arch): New function.
7672 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7673 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7675 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7676 (arm_read_description): New, with bits factored from
7678 (arm_arch_setup): Reimplement.
7679 (target_regsets): Rename to ...
7680 (arm_regsets): ... this, and make static.
7681 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7682 (arm_regs_info): New function.
7683 (the_low_target): Adjust.
7684 (initialize_low_arch): New function.
7685 * linux-m68k-low.c (tdesc_m68k): Declare.
7686 (target_regsets): Rename to ...
7687 (m68k_regsets): ... this, and make static.
7688 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7689 (m68k_regs_info): New function.
7690 (m68k_arch_setup): New function.
7691 (the_low_target): Adjust.
7692 (initialize_low_arch): New function.
7693 * linux-sh-low.c (tdesc_sharch): Declare.
7694 (target_regsets): Rename to ...
7695 (sh_regsets): ... this, and make static.
7696 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7697 (sh_regs_info, sh_arch_setup): New functions.
7698 (the_low_target): Adjust.
7699 (initialize_low_arch): New function.
7700 * linux-bfin-low.c (tdesc_bfin): Declare.
7701 (bfin_arch_setup): New function.
7702 (bfin_usrregs_info, regs_info): New globals.
7703 (bfin_regs_info): New function.
7704 (the_low_target): Adjust.
7705 (initialize_low_arch): New function.
7706 * linux-cris-low.c (tdesc_cris): Declare.
7707 (cris_arch_setup): New function.
7708 (cris_usrregs_info, regs_info): New globals.
7709 (cris_regs_info): New function.
7710 (the_low_target): Adjust.
7711 (initialize_low_arch): New function.
7712 * linux-cris-low.c (tdesc_crisv32): Declare.
7713 (cris_arch_setup): New function.
7714 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7715 (cris_regs_info): New function.
7716 (the_low_target): Adjust.
7717 (initialize_low_arch): New function.
7718 * linux-m32r-low.c (tdesc_m32r): Declare.
7719 (m32r_arch_setup): New function.
7720 (m32r_usrregs_info, regs_info): New globals.
7721 (m32r_regs_info): Adjust.
7722 (initialize_low_arch): New function.
7723 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7724 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7725 (tic6x_usrregs_info): Forward declare.
7726 (tic6x_read_description): New function, based on ...
7727 (tic6x_arch_setup): ... this. Reimplement.
7728 (target_regsets): Rename to ...
7729 (tic6x_regsets): ... this, and make static.
7730 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7731 (tic6x_regs_info): New function.
7732 (the_low_target): Adjust.
7733 (initialize_low_arch): New function.
7734 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7735 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7736 (target_regsets): Rename to ...
7737 (xtensa_regsets): ... this, and make static.
7738 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7740 (xtensa_arch_setup, xtensa_regs_info): New functions.
7741 (the_low_target): Adjust.
7742 (initialize_low_arch): New function.
7743 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7744 (nios2_arch_setup): Set the current process'es tdesc.
7745 (target_regsets): Rename to ...
7746 (nios2_regsets): ... this.
7747 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7748 (nios2_regs_info): New function.
7749 (the_low_target): Adjust.
7750 (initialize_low_arch): New function.
7751 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7752 (aarch64_arch_setup): Set the current process'es tdesc.
7753 (target_regsets): Rename to ...
7754 (aarch64_regsets): ... this.
7755 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7756 (aarch64_regs_info): New function.
7757 (the_low_target): Adjust.
7758 (initialize_low_arch): New function.
7759 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7761 (target_regsets): Rename to ...
7762 (tile_regsets): ... this.
7763 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7764 (tile_regs_info): New function.
7765 (tile_arch_setup): Set the current process'es tdesc.
7766 (the_low_target): Adjust.
7767 (initialize_low_arch): New function.
7768 * spu-low.c (tdesc_spu): Declare.
7769 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7770 * win32-arm-low.c (tdesc_arm): Declare.
7771 (arm_arch_setup): New function.
7772 (the_low_target): Install arm_arch_setup instead of
7774 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7775 (init_windows_x86): Rename to ...
7776 (i386_arch_setup): ... this. Set `win32_tdesc'.
7777 (the_low_target): Adjust.
7778 * win32-low.c (win32_tdesc): New global.
7779 (child_add_thread): Don't create the thread cache here.
7780 (do_initial_child_stuff): Set the new process'es tdesc.
7781 * win32-low.h (struct target_desc): Forward declare.
7782 (win32_tdesc): Declare.
7783 * lynx-i386-low.c (tdesc_i386): Declare global.
7784 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7785 * lynx-low.c (lynx_tdesc): New global.
7786 (lynx_add_process): Set the new process'es tdesc.
7787 * lynx-low.h (struct target_desc): Forward declare.
7788 (lynx_tdesc): Declare global.
7789 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7790 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7791 * nto-low.c (nto_tdesc): New global.
7792 (do_attach): Set the new process'es tdesc.
7793 * nto-low.h (struct target_desc): Forward declare.
7794 (nto_tdesc): Declare.
7795 * nto-x86-low.c (tdesc_i386): Declare.
7796 (nto_x86_arch_setup): Set `nto_tdesc'.
7798 2013-06-04 Gary Benson <gbenson@redhat.com>
7800 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7801 to qSupported response when appropriate.
7802 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7803 with nonzero-length annex.
7804 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7805 arguments supplied in annex.
7807 2013-05-31 Doug Evans <dje@google.com>
7810 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7811 64 bits in 64-cross-32 environment.
7813 2013-05-28 Pedro Alves <palves@redhat.com>
7815 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7816 (aarch64-without-fpu.c): Delete rule.
7817 * configure.srv (aarch64*-*-linux*): Remove references to
7818 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7819 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7822 2013-05-24 Pedro Alves <palves@redhat.com>
7824 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7825 instead of strchr/decode_address. Error if the range isn't split
7826 with a ','. Don't assume there's be a ':' in the action.
7828 2013-05-23 Yao Qi <yao@codesourcery.com>
7829 Pedro Alves <palves@redhat.com>
7831 * linux-low.c (lwp_in_step_range): New function.
7832 (linux_wait_1): If the thread was range stepping and stopped
7833 outside the stepping range, report the stop to GDB. Otherwise,
7834 continue stepping. Add range stepping debug output.
7835 (linux_set_resume_request): Copy the step range from the resume
7837 (linux_supports_range_stepping): New.
7838 (linux_target_ops) <supports_range_stepping>: Set to
7839 linux_supports_range_stepping.
7840 * linux-low.h (struct linux_target_ops)
7841 <supports_range_stepping>: New field.
7842 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7843 * linux-x86-low.c (x86_supports_range_stepping): New.
7844 (the_low_target) <supports_range_stepping>: Set to
7845 x86_supports_range_stepping.
7846 * server.c (handle_v_cont): Handle 'r' action.
7847 (handle_v_requests): Append ";r" if the target supports range
7849 * target.h (struct thread_resume) <step_range_start,
7850 step_range_end>: New fields.
7851 (struct target_ops) <supports_range_stepping>:
7853 (target_supports_range_stepping): New macro.
7855 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7857 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7858 confusion in comment.
7860 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7862 * lynx-low.c (struct process_info_private): New type.
7863 (lynx_add_process): New function.
7864 (lynx_create_inferior, lynx_attach): Replace calls to
7865 add_process by calls to lynx_add_process.
7866 (lynx_resume): If PTID is null, then try using
7867 current_process()->private->last_wait_event_ptid.
7869 (lynx_clear_inferiors): Delete. The contents of that function
7870 has been inlined in lynx_mourn;
7871 (lynx_wait_1): Save the ptid in the process's private data.
7872 (lynx_mourn): Free the process' private data. Replace call
7873 to lynx_clear_inferiors by call to clear_inferiors.
7875 2013-05-17 Yao Qi <yao@codesourcery.com>
7877 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7880 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7882 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7883 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7884 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7885 PT_TEXT_END_ADDR guards. Update comments.
7886 (linux_target_op) <read_offsets>: Conditionally define to
7887 linux_read_offsets if the target is UCLIBC and if it defines
7888 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7890 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7891 Andrew Jenner <andrew@codesourcery.com>
7893 * Makefile.in (SFILES): Add linux-nios2-low.c.
7894 (clean): Add action to delete nios2-linux.c.
7895 (nios2-linux.c): New rule.
7896 * configure.srv: Add nios2*-*-linux*.
7897 * linux-nios2-low.c: New.
7899 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7901 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7903 2013-04-25 Hui Zhu <hui@codesourcery.com>
7906 * ax.c (ax_printf): Add fflush.
7908 2013-04-22 Tom Tromey <tromey@redhat.com>
7910 * Makefile.in (SFILES): Add filestuff.c.
7911 (OBS): Add filestuff.o.
7912 (filestuff.o): New target.
7913 * config.in, configure: Rebuild.
7914 * configure.ac: Check for fdwalk, pipe2.
7916 2013-04-17 Pedro Alves <palves@redhat.com>
7918 * configure.ac (USE_THREAD_DB): Delete variable.
7919 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7920 Don't AC_SUBST USE_THREAD_DB.
7921 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7922 * config.in, configure: Regenerate.
7924 2013-04-16 Pedro Alves <palves@redhat.com>
7926 * linux-low.h (struct lwp_info) <thread_known>: Move under
7927 the USE_THREAD_DB #ifdef.
7929 2013-04-16 Pedro Alves <palves@redhat.com>
7931 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7932 (linux-low.o): Delete rule.
7933 * linux-low.h: Always include "gdb_thread_db.h" instead of
7934 conditionally including thread_db.h.
7935 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7938 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7940 * Makefile.in (install-only): Fix make install regression.
7942 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7944 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7945 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7947 * gdbserver.1: Remove.
7949 2013-03-22 Pedro Alves <palves@redhat.com>
7951 * linux-low.c (handle_extended_wait): Don't call
7952 linux_enable_event_reporting.
7954 2013-03-15 Tony Theodore <tonyt@logyst.com>
7957 * Makefile.in (SHELL): Use @SHELL@.
7959 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
7961 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7964 2013-03-13 Joel Brobecker <brobecker@adacore.com>
7966 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7967 Remove extraneous NULL element.
7969 2013-03-13 Yao Qi <yao@codesourcery.com>
7971 * tracepoint.c (traceframe_read_tsv): Look for the last matched
7972 'V' block in trace frame.
7974 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
7976 * target.h (struct target_ops): Add btrace ops.
7977 (target_supports_btrace): New macro.
7978 (target_enable_btrace): New macro.
7979 (target_disable_btrace): New macro.
7980 (target_read_btrace): New macro.
7981 * gdbthread.h (struct thread_info): Add btrace field.
7982 * server.c: Include btrace-common.h.
7983 (handle_btrace_general_set): New function.
7984 (handle_btrace_enable): New function.
7985 (handle_btrace_disable): New function.
7986 (handle_general_set): Call handle_btrace_general_set.
7987 (handle_qxfer_btrace): New function.
7988 (struct qxfer qxfer_packets[]): Add btrace entry.
7989 * inferiors.c (remove_thread): Disable btrace.
7990 * linux-low: Include linux-btrace.h.
7991 (linux_low_enable_btrace): New function.
7992 (linux_low_read_btrace): New function.
7993 (linux_target_ops): Add btrace ops.
7994 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7995 Add srv_linux_btrace=yes.
7996 (x86_64-*-linux*): Add linux-btrace.o.
7997 Add srv_linux_btrace=yes.
7998 * configure.ac: Define HAVE_LINUX_BTRACE.
7999 * config.in: Regenerated.
8000 * configure: Regenerated.
8002 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8004 * server.c (handle_qxfer): Preserve error message if -3 is
8006 (qxfer): Document the -3 return value.
8008 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8010 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8011 (linux_btrace_h): New variable.
8012 (linux-btrace.o): New rule.
8014 2013-03-08 Stan Shebs <stan@codesourcery.com>
8015 Hafiz Abid Qadeer <abidh@codesourcery.com>
8017 * tracepoint.c (trace_buffer_size): New global.
8018 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8019 (init_trace_buffer): Change to one-argument function. Allocate
8020 trace buffer memory.
8021 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8022 handle QTBuffer:size packet.
8023 (cmd_bigqtbuffer_size): New function.
8024 (initialize_tracepoint): Call init_trace_buffer with
8025 DEFAULT_TRACE_BUFFER_SIZE.
8026 * server.c (handle_query): Add QTBuffer:size in the
8029 2013-03-07 Yao Qi <yao@codesourcery.com>
8031 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8032 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8034 (cmd_qtsp): Adjust condition. Do post increment.
8035 Set cur_action and cur_step_action back to 0.
8037 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8040 * linux-low.c (linux_write_memory): Return early success if LEN is
8043 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8045 * configure.srv: Add x86_64-*-cygwin* as target.
8047 2013-02-28 Tom Tromey <tromey@redhat.com>
8049 * configure.ac: Invoke AC_SYS_LARGEFILE.
8050 * configure, config.in: Rebuild.
8052 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8054 * win32-low.c: Throughout, fix format strings and casts of
8055 printf-like functions to avoid type related warnings on all
8057 (get_child_debug_event): Print dwDebugEventCode as hex since
8058 that's how it's usually documented.
8060 2013-02-28 Yao Qi <yao@codesourcery.com>
8062 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8065 2013-02-27 Jiong Wang <jiwang@tilera.com>
8067 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8068 (reg-tilegx32.c): New rule.
8069 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8070 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8071 different register info initializer according to elf class.
8072 (init_registers_tilgx32): New function. The tilegx32 register info
8074 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8075 (tile_store_gregset): Likewise.
8077 2013-02-27 Yao Qi <yao@codesourcery.com>
8079 * server.c (process_point_options): Print debug message when
8080 debug_threads is true.
8082 2013-02-26 Yao Qi <yao@codesourcery.com>
8084 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8086 2013-02-19 Pedro Alves <palves@redhat.com>
8087 Kai Tietz <ktietz@redhat.com>
8091 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8092 instead of strtoul to extract address from packet.
8093 (process_serial_event) <'z'>: Likewise.
8095 2013-02-18 Yao Qi <yao@codesourcery.com>
8097 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8099 2013-02-14 Pedro Alves <palves@redhat.com>
8103 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8104 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8106 2013-02-14 Pedro Alves <palves@redhat.com>
8108 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8110 2013-02-14 Pedro Alves <palves@redhat.com>
8112 * tracepoint.c (save_string): Delete.
8113 (add_tracepoint_action): Use savestring instead of save_string.
8115 2013-02-12 Pedro Alves <palves@redhat.com>
8117 * linux-xtensa-low.c: Ditto.
8118 * xtensa-xtregs.c: Ditto.
8120 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8122 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8125 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8127 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8128 aarch64_num_wp_regs and aarch64_num_bp_regs to
8129 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8131 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8133 * linux-aarch64-low.c (ps_get_thread_area): Replace
8134 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8136 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8137 Marcus Shawcroft <marcus.shawcroft@arm.com>
8138 Nigel Stephens <nigel.stephens@arm.com>
8139 Yufeng Zhang <yufeng.zhang@arm.com>
8141 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8142 (aarch64.c, aarch64-without-fpu.c): New targets.
8143 * configure.srv (aarch64*-*-linux*): New.
8144 * linux-aarch64-low.c: New file.
8146 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8148 * linux-low.c (handle_extended_wait, linux_create_inferior)
8149 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8150 (dequeue_one_deferred_signal, linux_resume_one_thread)
8151 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8152 (linux_tracefork_grandchild, linux_test_for_tracefork)
8153 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8154 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8155 where the argument is 0.
8157 2013-01-25 Yao Qi <yao@codesourcery.com>
8159 * event-loop.c: Include "queue.h".
8160 (gdb_event_p): New typedef.
8161 (struct gdb_event) <next_event>: Remove.
8162 (event_queue): Change to QUEUE(gdb_event_p).
8163 (async_queue_event): Remove.
8164 (gdb_event_xfree): New.
8165 (initialize_event_loop): New.
8166 (process_event): Use API from QUEUE.
8167 (wait_for_event): Likewise.
8168 * server.c (main): Call initialize_event_loop.
8169 * server.h (initialize_event_loop): Declare.
8171 2013-01-18 Yao Qi <yao@codesourcery.com>
8173 * ax.h (struct eval_agent_expr_context): New.
8174 (gdb_eval_agent_expr): Update declaration.
8175 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8176 TFRAME. Add new argument CTX.
8177 * server.h (struct eval_agent_expr_context): Declare.
8178 (agent_mem_read, agent_tsv_read): Update declaration.
8179 (agent_mem_read_string): Likewise.
8180 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8181 (add_traceframe_block): Add new argument TPOINT.
8182 Increase TPOINT->traceframe_usage.
8183 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8184 eval_tracepoint_agent_expr.
8185 (condition_true_at_tracepoint): Likewise.
8186 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8187 (agent_mem_read_string, agent_tsv_read): Likewise.
8189 2013-01-16 Yao Qi <yao@codesourcery.com>
8191 * linux-low.c (linux_resume_one_lwp): Don't check
8192 'lwp->bp_reinsert != 0'.
8194 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8195 Pedro Alves <palves@redhat.com>
8197 * lynx-low.c (ptrace_request_to_str): Define a temporary
8198 macro and use it to simplify this function's implementation.
8200 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8202 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8205 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8207 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8209 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8211 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8213 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8215 * lynx-low.c (lynx_resume): Use the resume_info parameter
8216 to determine the ptid for the lynx_ptrace call, unless
8217 it is equal to minus_one_ptid, in which case we use the
8218 ptid of the current_inferior.
8219 (lynx_wait_1): After having received a thread create/exit
8220 event, resume the inferior's execution using the signaling
8221 thread's ptid, rather than the old ptid.
8223 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8225 * lynx-low.c (lynx_resume): Delete variable ret.
8227 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8229 * gdbreplay.c (gdbreplay_version): Update copyright year.
8230 * server.c (gdbserver_version): Likewise.
8232 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8234 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8237 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8239 * lynx-low.c (ptrace_request_to_str): Add handling for
8242 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8244 * lynx-low.c (lynx_attach): Delete variable new_process.
8246 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8248 * lynx-low.c (lynx_create_inferior): Delete variable
8251 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8253 * lynx-low.c (ptrace_request_to_str): Do not handle
8254 PTRACE_GETTHREADLIST if this macro does not exist.
8256 2012-12-15 Yao Qi <yao@codesourcery.com>
8258 * Makefile.in (OBS): Add notif.o.
8259 * notif.c, notif.h: New.
8260 * server.c: Include "notif.h".
8261 (struct vstop_notif) <next>: Remove.
8263 (queue_stop_reply): Update.
8264 (push_event, send_next_stop_reply): Remove.
8265 (discard_queued_stop_replies): Update.
8266 (notif_stop): New variable.
8267 (handle_v_stopped): Remove.
8268 (handle_v_requests): Don't call handle_v_stopped. Call
8269 handle_ack_notif instead.
8270 (queue_stop_reply_callback): Call notif_event_enque instead
8271 of queue_stop_reply.
8272 (handle_status): Don't call send_next_stop_reply, call
8273 notif_write_event instead.
8274 (kill_inferior_callback): Likewise.
8275 (detach_or_kill_inferior_callback): Likewise.
8276 (main): Call initialize_notif.
8277 (process_serial_event): Call QUEUE_is_empty.
8278 (handle_target_event): Call notif_push instead of push event.
8279 * server.h (push_event): Remove declaration.
8281 2012-12-10 Tom Tromey <tromey@redhat.com>
8283 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8284 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8287 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8288 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8289 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8290 (amd64-linux-ipa.o, ax.o): Rewrite.
8291 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8292 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8293 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8294 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8295 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8296 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8297 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8298 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8299 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8300 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8301 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8302 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8303 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8304 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8305 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8306 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8307 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8308 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8309 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8310 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8311 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8312 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8313 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8314 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8315 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8316 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8317 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8318 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8319 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8320 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8321 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8322 (reg-tilegx.o): Remove.
8323 (all_object_files): New macro.
8324 Include .deps files.
8325 * aclocal.m4, configure: Rebuild.
8326 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8327 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8328 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8330 2012-12-05 Tom Tromey <tromey@redhat.com>
8333 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8335 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8337 * configure.ac: Check for linux/perf_event.h.
8338 * config.in: Regenerated.
8339 * configure: Regenerated.
8341 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8343 * hostio.c (handle_readlink): Decrease buffer size
8344 parameter passed to readlink by one byte.
8346 2012-11-26 Yao Qi <yao@codesourcery.com>
8348 * configure.ac (build_warnings): Append '-Wempty-body'.
8349 * configure: Regenerated.
8350 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8353 2012-11-15 Pierre Muller <muller@sourceware.org>
8355 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8356 * config.in: Regenerate.
8357 * configure: Regenerate.
8358 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8359 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8360 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8361 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8363 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8364 instead of <sys/wait.h> header.
8365 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8367 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8369 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8370 (various make rules): Remove -DGDBSERVER
8372 2012-11-09 Yao Qi <yao@codesourcery.com>
8374 * spu-low.c (current_ptid): Move it to ..
8375 * gdbthread.h: ... here. New.
8376 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8377 * server.c (myresume, process_serial_event): Likewise.
8378 * thread-db.c (thread_db_find_new_threads): Likewise.
8379 * tracepoint.c (run_inferior_command): Likewise.
8381 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8383 * server.c (handle_search_memory_1): Include access length in
8386 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8388 * linux-crisv32-low.c: Fix compile errors.
8390 2012-09-04 Yao Qi <yao@codesourcery.com>
8392 * tracepoint.c (cmd_qtsv): Adjust debug message.
8393 Don't check CUR_TPOINT.
8395 2012-08-28 Yao Qi <yao@codesourcery.com>
8397 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8398 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8399 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8400 Remove declarations of xmalloc, xreallloc, xstrdup and
8402 * Makefile.in (libiberty_h): New.
8403 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8404 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8406 2012-08-23 Yao Qi <yao@codesourcery.com>
8408 * server.h: Remove declaration of 'xsnprintf'.
8410 2012-08-22 Keith Seitz <keiths@redhat.com>
8412 * server.h: Include build-gnulib-gbserver/config.h.
8413 * gdbreplay.c: Likewise.
8415 2012-08-08 Doug Evans <dje@google.com>
8417 * Makefile.in (SFILES): Add gdb_vecs.c.
8418 (OBS): Add gdb_vecs.o.
8419 (gdb_vecs_h, host_defs_h): New variables.
8420 (thread-db.o): Add $(gdb_vecs_h) dependency.
8421 (gdb_vecs.o): New rule.
8422 * thread-db.c: #include "gdb_vecs.h".
8423 (thread_db_load_search): Use a vector to iterate over path elements.
8424 Handle text appearing after "$pdir".
8426 * configure.ac: Add check for strstr.
8427 * config.in: Regenerate.
8428 * configure: Regenerate.
8430 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8432 * hostio.c (handle_pread): If pread fails, fall back to attempting
8434 (handle_pwrite): Likewise for pwrite.
8436 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8438 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8439 between unsupported TYPE and unimplementable ADDR/LEN combination.
8440 (arm_insert_point): Act on new return value.
8442 2012-07-31 Pedro Alves <palves@redhat.com>
8444 * server.c (process_point_options): Only skip tokens if we find
8445 one that is unrecognized. Don't treat 'X' specially while
8446 skipping unrecognized tokens.
8448 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8450 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8451 to 4-byte-align HW breakpoint addresses for Thumb.
8453 2012-07-27 Yao Qi <yao@codesourcery.com>
8457 * server.h: Declare gdb_agent_about_to_close.
8458 * target.c (kill_inferior): Include "agent.h".
8459 New. Send command 'kill'.
8460 * target.h (kill_inferior): Removed macro.
8461 * tracepoint.c (gdb_agent_about_to_close): New.
8462 (gdb_agent_helper_thread): Handle command 'close'.
8463 Wait endlessly until the inferior stops.
8464 Install gdb_agent_remove_socket to atexit hook.
8465 (agent_socket_name): New static variable.
8466 (gdb_agent_socket_init): Replace local variable 'name' with
8467 'agent_socket_name'.
8468 (gdb_agent_remove_socket): New.
8470 2012-07-27 Yao Qi <yao@codesourcery.com>
8472 * server.c (process_point_options): Stop at 'X' when parsing.
8474 2012-07-19 Michael Eager <eager@eagercon.com>
8476 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8478 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8479 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8480 hardware breakpoint.
8482 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8484 * gdbserver/linux-low.c (initialize_low): Call
8485 linux_ptrace_init_warnings.
8487 2012-07-02 Doug Evans <dje@google.com>
8489 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8492 2012-07-02 Stan Shebs <stan@codesourcery.com>
8494 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8495 (ax.o): Add it to build rule.
8497 (OBS): Add format.o.
8498 (IPA_OBS): Add format.o.
8499 * server.c (handle_query): Claim support for breakpoint commands.
8500 (process_point_options): Add command case.
8501 (process_serial_event): Leave running if there are printfs in
8503 * mem-break.h (any_persistent_commands): Declare.
8504 (add_breakpoint_commands): Declare.
8505 (gdb_no_commands_at_breakpoint): Declare.
8506 (run_breakpoint_commands): Declare.
8507 * mem-break.c (struct point_command_list): New struct.
8508 (struct breakpoint): New field command_list.
8509 (any_persistent_commands): New function.
8510 (add_commands_to_breakpoint): New function.
8511 (add_breakpoint_commands): New function.
8512 (gdb_no_commands_at_breakpoint): New function.
8513 (run_breakpoint_commands): New function.
8514 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8516 * ax.c: Include format.h.
8517 (ax_printf): New function.
8518 (gdb_eval_agent_expr): Add printf opcode.
8520 2012-06-13 Yao Qi <yao@codesourcery.com>
8522 * server.c (start_inferior): Remove duplicated writes to fields
8523 'last_resume_kind' and 'last_status' of 'current_inferior'.
8525 2012-06-12 Yao Qi <yao@codesourcery.com>
8526 Pedro Alves <palves@redhat.com>
8528 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8530 * server.c (handle_v_cont): Extend comment.
8532 2012-06-11 Yao Qi <yao@codesourcery.com>
8534 * linux-low.c (linux_attach): Add 'static'.
8536 2012-06-06 Yao Qi <yao@codesourcery.com>
8538 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8540 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8542 Fix gcc -flto compilation warning.
8543 * server.c (main): Make variable multi_mode and attach volatile.
8545 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8547 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8548 if the platform doesn't know about it.
8550 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8552 * Makefile.in (SFILES): Add linux-tile-low.c.
8553 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8554 * configure.srv: Handle tilegx-*-linux*.
8555 * linux-tile-low.c: New file.
8557 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8559 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8561 2012-05-24 Pedro Alves <palves@redhat.com>
8565 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8567 2012-05-24 Pedro Alves <palves@redhat.com>
8571 Replace target_signal with gdb_signal throughout.
8573 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8575 * linux-low.c (linux_store_registers): Avoid the copying sequence
8576 when no data has been retrieved by ptrace.
8578 2012-05-22 Will Deacon <will.deacon@arm.com>
8580 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8581 Include asm/ptrace.h.
8582 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8585 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8587 * linux-low.c (linux_store_registers): Don't re-retrieve data
8588 with ptrace that has already been obtained from /proc. Always
8589 copy any data retrieved with ptrace to the buffer supplied.
8591 2012-05-11 Yao Qi <yao@codesourcery.com>
8592 Pedro Alves <palves@redhat.com>
8594 * linux-low.c (enum stopping_threads_kind): New.
8595 (stopping_threads): Change type to `enum stopping_threads_kind'.
8596 (handle_extended_wait): If stopping and suspending threads, leave
8597 the new_lwp suspended too.
8598 (linux_wait_for_event): Adjust.
8599 (stop_all_lwps): Set `stopping_threads' to
8600 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8601 whether we're suspending threads or just stopping them. Assert no
8604 2012-04-29 Yao Qi <yao@codesourcery.com>
8606 * server.h: Move some code to ...
8607 * gdbthread.h: ... here. New.
8608 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8609 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8610 (nto-low.o, win32-low.o): Likewise.
8611 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8612 * regcache.c, remote-utils.c, server.c: Likewise.
8613 * target.c, tracepoint.c, win32-low.c: Likewise.
8615 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8617 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8618 (PTRACE_ARG4_TYPE): Likewise.
8619 (PTRACE_XFER_TYPE): Likewise.
8620 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8621 ptrace to PTRACE_ARG3_TYPE.
8622 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8623 (PTRACE_ARG4_TYPE): Likewise.
8624 (PTRACE_XFER_TYPE): Likewise.
8625 (linux_detach_one_lwp): Cast fourth argument of
8626 ptrace to long then PTRACE_ARG4_TYPE.
8627 (regsets_fetch_inferior_registers): Cast third argument of
8628 ptrace to long then PTRACE_ARG3_TYPE.
8629 (regsets_store_inferior_registers): Likewise.
8631 2012-04-20 Pedro Alves <palves@redhat.com>
8633 * configure: Regenerate.
8635 2012-04-19 Pedro Alves <palves@redhat.com>
8637 * Makefile.in (GNULIB_BUILDDIR): New.
8638 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8639 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8640 (all, install-only, uninstall, clean-info, all-lib, clean): No
8641 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8642 (maintainer-clean realclean distclean): Use subdir_do.
8644 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8645 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8646 * acinclude.m4: Include acx_configure_dir.m4.
8647 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8648 calls. Call AC_PROG_RANLIB. Configure gnulib using
8651 (GNULIB_STDINT_H): Adjust.
8652 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8653 * gdbreplay.c: Include build-gnulib/config.h.
8654 * server.h: Likewise.
8655 * aclocal.m4: Regenerate.
8656 * config.in: Regenerate.
8657 * configure: Regenerate.
8659 2012-04-19 Pedro Alves <palves@redhat.com>
8661 * Makefile.in (LIBGNU, INCGNU): Adjust.
8662 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8663 (all, install-only, uninstall, clean-info, all-lib, clean)
8664 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8665 * configure.ac: Adjust AC_OUTPUT output.
8666 * aclocal.m4: Regenerate.
8667 * configure: Regenerate.
8669 2012-04-19 Pedro Alves <palves@redhat.com>
8671 * Makefile.in (generated_files): New.
8672 (server_h): Remove the explicit dependency on config.h, and depend
8673 on $generated_files.
8675 2012-04-19 Pedro Alves <palves@redhat.com>
8677 * Makefile.in (INCGNU): Add -Ignulib.
8679 2012-04-19 Pedro Alves <palves@redhat.com>
8681 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8682 (INCGNU): ... this, and spell out -I here.
8683 (GNULIB_LIB): Rename to ...
8685 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8687 2012-04-19 Pedro Alves <palves@redhat.com>
8689 * config.in: Regenerate.
8691 2012-04-19 Pedro Alves <palves@redhat.com>
8693 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8694 * server.h (memmem): Remove declaration.
8695 * config.in: Regenerate.
8696 * configure: Regenerate.
8698 2012-04-19 Yao Qi <yao@codesourcery.com>
8700 * Makefile.in (SFILES): Add common/vec.c.
8704 2012-04-19 Yao Qi <yao@codesourcery.com>
8706 * remote-utils.c (prepare_resume_reply): Replace with macro
8707 target_core_of_thread.
8708 * server.c (handle_qxfer_threads_proper): Likewise.
8709 * target.h (traget_core_of_thread): New macro.
8711 2012-04-18 Pedro Alves <palves@redhat.com>
8713 * aclocal.m4: Regenerate.
8714 * configure: Regenerate.
8716 2012-04-16 Yao Qi <yao@codesourcery.com>
8718 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8719 duplicated on address.
8721 2012-04-16 Yao Qi <yao@codesourcery.com>
8723 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8724 (struct tracepoint_action_ops) <send>: New field.
8725 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8726 (agent_expr_send, x_tracepoint_action_send): New.
8727 (l_tracepoint_action_send): New.
8728 (cmd_qtdp): Download and install tracepoint
8729 according to `use_agent'.
8730 (run_inferior_command): Add one more parameter `len'.
8732 (tracepoint_send_agent): New.
8733 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8735 2012-04-16 Yao Qi <yao@codesourcery.com>
8737 * tracepoint.c (download_tracepoints): Moved to ...
8738 (cmd_qtstart): ... here.
8740 2012-04-14 Yao Qi <yao@codesourcery.com>
8742 * tracepoint.c: Include inttypes.h.
8743 (struct collect_memory_action): Use sized types.
8744 (struct tracepoint): Likewise.
8745 (cmd_qtdp, stop_tracing): Update print specifiers.
8746 (cmd_qtp, response_tracepoint): Likewise.
8747 (collect_data_at_tracepoint): Likewise.
8748 (collect_data_at_step): Likewise.
8750 2012-04-14 Yao Qi <yao@codesourcery.com>
8752 Import gnulib module inttypes.
8753 * aclocal.m4, config.in, configure: Regenerated.
8755 2012-04-14 Yao Qi <yao@codesourcery.com>
8757 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8758 Makefile and config.status at last.
8760 2012-04-13 Yao Qi <yao@codesourcery.com>
8762 * tracepoint.c: Include stdint.h unconditionally.
8764 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8766 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8767 on BFD_HAVE_SYS_PROCFS_TYPE.
8768 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8769 * configure: Regenerate.
8770 * config.in: Likewise.
8772 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8774 * Makefile.in (clean): Also remove x32.c x32-linux.c
8775 x32-avx.c x32-avx-linux.c.
8776 (x32.o): New target.
8778 (x32-linux.o): Likewise.
8779 (x32-linux.c): Likewise.
8780 (x32-avx.o): Likewise.
8781 (x32-avx.c): Likewise.
8782 (x32-avx-linux.o): Likewise.
8783 (x32-avx-linux.c): Likewise.
8785 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8786 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8787 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8788 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8789 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8790 i386/x32-avx-linux.xml.
8792 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8793 (init_registers_x32_avx_linux): Likwise.
8794 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8795 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8797 2012-04-13 Pedro Alves <palves@redhat.com>
8799 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8800 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8801 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8802 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8805 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8807 * linux-x86-low.c (compat_x32_clock_t): New.
8808 (compat_x32_siginfo_t): Likewise.
8809 (compat_x32_siginfo_from_siginfo): Likewise.
8810 (siginfo_from_compat_x32_siginfo): Likewise.
8811 (linux_is_elf64): Likewise.
8812 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8813 and siginfo_from_compat_x32_siginfo for x32.
8814 (x86_arch_setup): Set linux_is_elf64.
8816 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8819 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8821 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8822 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8823 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8824 compatible with process.
8826 2012-04-12 Yao Qi <yao@codesourcery.com>
8828 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8829 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8830 (install-only, install-info, clean): Handle sub dir gnulib.
8831 (all-lib, am--refresh): New targets.
8832 (memmem.o): Remove target.
8833 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8834 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8835 (AC_REPLACE_FUNCS): Remove memmem.
8836 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8837 (AC_OUTPUT): Generate Makefile in gnulib/.
8838 * aclocal.m4, config.in, configure: Regenerated.
8840 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8842 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8844 2012-04-05 Pedro Alves <palves@redhat.com>
8846 -Werror=strict-aliasing
8848 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8851 2012-04-04 Pedro Alves <palves@redhat.com>
8853 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8854 (sparc_store_gregset_from_stack, sparc_store_gregset)
8855 (sparc_breakpoint_at): Fix formatting.
8857 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8859 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8861 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8862 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8863 * config.in: Regenerate.
8864 * configure: Likewise.
8866 2012-03-29 Pedro Alves <palves@redhat.com>
8868 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8869 Correct ptrace arguments.
8871 2012-03-28 Pedro Alves <palves@redhat.com>
8873 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8874 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8875 (IA64_FR1_REGNUM): New defines.
8876 (ia64_fetch_register): New.
8877 (the_low_target): Install it.
8878 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8880 * linux-low.c (linux_fetch_registers): Try the
8881 the_low_target.fetch_register hook first.
8883 * linux-arm-low.c (the_low_target): Adjust.
8884 * linux-bfin-low.c (the_low_target): Adjust.
8885 * linux-cris-low.c (the_low_target): Adjust.
8886 * linux-crisv32-low.c (the_low_target): Adjust.
8887 * linux-m32r-low.c (the_low_target): Adjust.
8888 * linux-m68k-low.c (the_low_target): Adjust.
8889 * linux-mips-low.c (the_low_target): Adjust.
8890 * linux-ppc-low.c (the_low_target): Adjust.
8891 * linux-s390-low.c (the_low_target): Adjust.
8892 * linux-sh-low.c (the_low_target): Adjust.
8893 * linux-sparc-low.c (the_low_target): Adjust.
8894 * linux-tic6x-low.c (the_low_target): Adjust.
8895 * linux-x86-low.c (the_low_target): Adjust.
8896 * linux-xtensa-low.c (the_low_target): Adjust.
8898 2012-03-26 Pedro Alves <palves@redhat.com>
8900 * server.c (handle_qxfer_libraries): Don't bail early if
8901 the_target->qxfer_libraries_svr4 is not NULL.
8903 2012-03-26 Pedro Alves <palves@redhat.com>
8905 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8907 2012-03-23 Pedro Alves <palves@redhat.com>
8909 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8910 "library-list-svr4" element's start tag when the the DSO list is
8913 2012-03-23 Pedro Alves <palves@redhat.com>
8915 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8916 a variable whose type size is the same as the inferior's pointer
8919 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8921 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8923 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8924 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8925 * linux-low.h: Include <signal.h>.
8926 (struct siginfo): Remove forward declaration.
8927 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8930 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8932 * .gitignore: Ignore more files.
8934 2012-03-19 Pedro Alves <palves@redhat.com>
8935 Jan Kratochvil <jan.kratochvil@redhat.com>
8937 * server.c (cont_thread, general_thread): Add describing comments.
8938 (start_inferior): Clear `cont_thread'.
8939 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8942 2012-03-15 Yao Qi <yao@codesourcery.com>
8944 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8946 (cmd_qtdp): ... here.
8948 2012-03-15 Yao Qi <yao@codesourcery.com>
8950 * tracepoint.c (struct tracepoint_action_ops): New.
8951 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8952 (m_tracepoint_action_download): New.
8953 (r_tracepoint_action_download): New.
8954 (x_tracepoint_action_download): New.
8955 (l_tracepoint_action_download): New.
8956 (add_tracepoint_action): Install `action->ops' according type.
8957 (download_tracepoint_1): Move code `download' function pointer
8958 of various tracepoint_action_ops.
8960 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8962 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
8963 linux_ptrace_attach_warnings.
8965 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
8967 * Makefile.in (linux-ptrace.o): New.
8968 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8969 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8970 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8971 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8972 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8974 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8976 2012-03-08 Yao Qi <yao@codesourcery.com>
8977 Pedro Alves <palves@redhat.com>
8979 Fix PR server/13392.
8980 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8982 * tracepoint.c (remove_tracepoint): New.
8983 (cmd_qtdp): Call remove_tracepoint when failed to install.
8985 2012-03-07 Pedro Alves <palves@redhat.com>
8987 * linux-low.c (get_detach_signal): New.
8988 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8989 Pass on pending signals to PTRACE_DETACH. Check the result of the
8991 * server.c (program_signals, program_signals_p): New.
8992 (handle_general_set): Handle QProgramSignals.
8993 * server.h (program_signals, program_signals_p): Declare.
8995 2012-03-05 Pedro Alves <palves@redhat.com>
8996 Jan Kratochvil <jan.kratochvil@redhat.com>
8998 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9001 2012-03-03 Yao Qi <yao@codesourcery.com>
9003 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9004 agent_look_up_symbols.
9006 2012-03-03 Yao Qi <yao@codesourcery.com>
9008 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9009 (linux-x86-low.o): Likewise.
9010 * server.h: Remove in_process_agent_loaded.
9011 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9015 2012-03-03 Yao Qi <yao@codesourcery.com>
9017 * tracepoint.c (gdb_agent_capability): New global.
9018 (in_process_agent_loaded_ust): Renamed to
9019 `in_process_agent_supports_ust'.
9021 (in_process_agent_supports_ust): Call agent_capability_check.
9022 (clear_installed_tracepoints): Assert that agent supports
9025 2012-03-03 Yao Qi <yao@codesourcery.com>
9027 * linux-low.c (linux_supports_agent): New.
9028 (linux_target_ops): Initialize field `supports_agent' with
9029 linux_supports_agent.
9030 * target.h (struct target_ops) <supports_agent>: New.
9031 (target_supports_agent): New macro.
9032 * server.c (handle_general_set): Handle packet 'QAgent'.
9033 (handle_query): Send `QAgent+'.
9034 * Makefile.in (server.o): Depends on agent.h.
9036 2012-03-03 Yao Qi <yao@codesourcery.com>
9038 * Makefile.in (OBS): Add agent.o.
9039 Add new rule for agent.o.
9040 Track dependence of tracepoint.c on agent.h.
9041 * tracepoint.c (run_inferior_command_1):
9042 (run_inferior_command): Call agent_run_command.
9043 (gdb_ust_connect_sync_socket): Deleted. Move it to
9045 (resume_thread, stop_thread): Likewise.
9046 (gdb_ust_socket_init): Renamed to ...
9047 (gdb_agent_socket_init): ... New.
9048 (gdb_ust_thread): Renamed to ...
9049 (gdb_agent_helper_thread): ... New.
9050 (gdb_ust_init): Move some code to ...
9051 (gdb_agent_init): ... here. New.
9052 [HAVE_UST]: Call gdb_ust_init.
9053 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9054 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9055 * config.in, configure: Regenerated.
9057 2012-03-02 Pedro Alves <palves@redhat.com>
9059 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9060 * linux-low.c (struct simple_pid_list): New.
9061 (stopped_pids): New a struct simple_pid_list pointer.
9062 (add_to_pid_list, pull_pid_from_list): New.
9063 (handle_extended_wait): Don't assume the first signal new children
9064 report is SIGSTOP. Adjust call to pull_pid_from_list.
9065 (linux_wait_for_lwp): Adjust.
9067 2012-03-02 Yao Qi <yao@codesourcery.com>
9069 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9072 2012-03-02 Yao Qi <yao@codesourcery.com>
9074 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9075 `stop_pc' and `tpoint'. Update caller.
9077 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9079 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9080 * linux-low.c (use_linux_regsets): New macro.
9081 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9082 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9083 (linux_register_in_regsets): New function.
9084 (usr_fetch_inferior_registers): Skip registers covered by
9086 (usr_store_inferior_registers): Likewise.
9087 (usr_fetch_inferior_registers): New macro.
9088 (usr_store_inferior_registers): Likewise.
9089 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9090 (linux_store_registers): Likewise.
9091 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9093 (init_registers_mips64_dsp_linux): Likewise.
9094 (init_registers_mips_linux): New macro.
9095 (init_registers_mips_dsp_linux): Likewise.
9096 (mips_dsp_num_regs): Likewise.
9097 (DSP_BASE, DSP_CONTROL): New fallback macros.
9098 (mips_base_regs): New macro.
9099 (mips_regmap): Use it. Fix the size.
9100 (mips_dsp_regmap): New variable.
9101 (mips_dsp_regset_bitmap): Likewise.
9102 (mips_arch_setup): New function.
9103 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9105 (mips_cannot_store_register): Likewise.
9106 (the_low_target): Update .arch_setup, .num_regs and .regmap
9107 initializers. Add .regset_bitmap initializer.
9108 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9110 * linux-bfin-low.c (the_low_target): Likewise.
9111 * linux-cris-low.c (the_low_target): Likewise.
9112 * linux-crisv32-low.c (the_low_target): Likewise.
9113 * linux-ia64-low.c (the_low_target): Likewise.
9114 * linux-m32r-low.c (the_low_target): Likewise.
9115 * linux-m68k-low.c (the_low_target): Likewise.
9116 * linux-ppc-low.c (the_low_target): Likewise.
9117 * linux-s390-low.c (the_low_target): Likewise.
9118 * linux-sh-low.c (the_low_target): Likewise.
9119 * linux-sparc-low.c (the_low_target): Likewise.
9120 * linux-tic6x-low.c (the_low_target): Likewise.
9121 * linux-x86-low.c (the_low_target): Likewise.
9122 * linux-xtensa-low.c (the_low_target): Likewise.
9123 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9124 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9125 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9127 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9128 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9130 2012-02-29 Yao Qi <yao@codesourcery.com>
9131 Pedro Alves <palves@redhat.com>
9133 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9134 `step_over_finished' is true.
9136 2012-02-27 Pedro Alves <palves@redhat.com>
9138 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9139 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9141 2012-02-27 Pedro Alves <palves@redhat.com>
9144 * linux-low.c (pid_is_stopped): New.
9145 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9147 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9149 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9152 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9154 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9156 2012-02-24 Luis Machado <lgustavo@codesourcery>
9158 * server.c (handle_query): Advertise support for target-side
9159 breakpoint condition evaluation.
9160 (process_point_options): New function.
9161 (process_serial_event): When inserting a breakpoint, check for
9162 a target-side condition that should be evaluated.
9164 * mem-break.c: Include regcache.h and ax.h.
9165 (point_cond_list_t): New data structure.
9166 (breakpoint) <cond_list>: New field.
9167 (find_gdb_breakpoint_at): Make non-static.
9168 (delete_gdb_breakpoint_at): Clear any target-side
9170 (clear_gdb_breakpoint_conditions): New function.
9171 (add_condition_to_breakpoint): Likewise.
9172 (add_breakpoint_condition): Likewise.
9173 (gdb_condition_true_at_breakpoint): Likewise.
9174 (gdb_breakpoint_here): Return result directly instead
9175 of going through a local variable.
9177 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9178 (clear_gdb_breakpoint_conditions): Likewise.
9179 (add_breakpoint_condition): Likewise.
9180 (gdb_condition_true_at_breakpoint): Likewise.
9182 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9183 (need_step_over_p): Take target-side breakpoint condition into
9186 2012-02-24 Luis Machado <lgustavo@codesourcery>
9188 * server.h: Include tracepoint.h.
9189 (agent_mem_read, agent_get_trace_state_variable_value,
9190 agent_set_trace_state_variable_value,
9191 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9192 get_set_tsv_func_addr): New prototypes.
9194 * ax.h: New include file.
9195 * ax.c: New source file.
9197 * tracepoint.c: Include ax.h.
9198 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9199 agent_expr, eval_result_type): Move to ax.h.
9200 (parse_agent_expr): Rename to ...
9201 (gdb_parse_agent_expr): ... this, make it non-static and move
9203 (unparse_agent_expr) Rename to ...
9204 (gdb_unparse_agent_expr): ... this, make it non-static and move
9206 (eval_agent_expr): Rename to ...
9207 (eval_tracepoint_agent_expr): ... this.
9208 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9209 forward declarations.
9210 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9211 (agent_get_trace_state_variable_value): New function.
9212 (agent_set_trace_state_variable_value): New function.
9213 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9214 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9215 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9216 (condition_true_at_tracepoint): Likewise.
9217 (parse_agent_expr): Rename to ...
9218 (gdb_parse_agent_expr): ... this and move to ax.c.
9219 (unparse_agent_expr): Rename to ...
9220 (gdb_unparse_agent_expr): ... this and move to ax.c.
9221 (gdb_agent_op_name): Move to ax.c.
9222 (eval_agent_expr): Rename to ...
9223 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9225 (eval_tracepoint_agent_expr): New function.
9226 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9228 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9230 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9231 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9232 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9233 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9234 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9235 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9236 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9237 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9238 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9239 (compile_bytecodes): Remove forward declaration.
9240 (is_goto_target): Move to ax.c.
9241 (compile_bytecodes): Move to ax.c and call
9242 agent_get_trace_state_variable_value (...) and
9243 agent_set_trace_state_variable_value (...).
9245 * Makefile.in: Update ax.c and IPA dependencies.
9247 2012-02-24 Pedro Alves <palves@redhat.com>
9249 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9250 (cmd_bigqtbuffer_circular): ... this. Only handle
9251 'QTBuffer:circular:'.
9252 (handle_tracepoint_general_set): Adjust.
9254 2012-02-16 Yao Qi <yao@codesourcery.com>
9256 * inferiors.c: Move code to ...
9257 * dll.c: .... here. New.
9258 * server.h: Declare clear_dlls.
9259 * Makefile.in (SFILES): Add dll.c.
9263 2012-02-11 Yao Qi <yao@codesourcery.com>
9265 * server.c: (handle_monitor_command): Add a new parameter
9267 (handle_query): Update caller.
9269 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9271 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9272 * configure, config.in: Regenerate.
9273 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9276 2012-02-02 Pedro Alves <palves@redhat.com>
9278 Try SIGKILL first, then PTRACE_KILL.
9279 * linux-low.c (linux_kill_one_lwp): New.
9280 (linux_kill_one_lwp): Rename to ...
9281 (kill_one_lwp_callback): ... this. Use the new
9284 2012-02-02 Pedro Alves <palves@redhat.com>
9286 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9289 2012-01-27 Pedro Alves <palves@redhat.com>
9291 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9292 (elf_64_file_p): Make static.
9293 (linux_pid_exe_is_elf_64_file): New.
9294 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9295 Delete declarations.
9296 (linux_pid_exe_is_elf_64_file): Declare.
9297 * linux-x86-low.c (x86_arch_setup): Use
9298 linux_pid_exe_is_elf_64_file.
9300 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9302 * linux-low.c (linux_wait_for_event_1): Rename to ...
9303 (linux_wait_for_event): ... here and merge it with former
9304 linux_wait_for_event - new variable wait_ptid, use it.
9305 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9307 2012-01-23 Pedro Alves <palves@redhat.com>
9309 * server.c (main): Avoid yet another case of infinite loop while
9310 detaching/killing after a longjmp.
9312 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9315 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9317 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9319 * hostio.c (handle_readlink): New function.
9320 (handle_vFile): Call it to handle "vFile:readlink" packets.
9322 2012-01-20 Pedro Alves <palves@redhat.com>
9323 Ulrich Weigand <ulrich.weigand@linaro.org>
9325 * server.c (handle_v_requests): Only support vAttach and vRun to
9326 start multiple processes when in extended protocol mode.
9328 2012-01-17 Pedro Alves <palves@redhat.com>
9330 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9331 memalign plus mprotect to allocate the scratch buffer.
9333 2012-01-13 Pedro Alves <palves@redhat.com>
9335 * server.c (attach_inferior): Clear `cont_thread'.
9337 2012-01-13 Pedro Alves <palves@redhat.com>
9339 * server.c (main): Avoid infinite loop while detaching/killing
9342 2012-01-09 Doug Evans <dje@google.com>
9344 * server.c (start_inferior): Set last_ptid in --wrapper case.
9346 2012-01-06 Yao Qi <yao@codesourcery.com>
9348 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9350 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9352 2012-01-04 Yao Qi <yao@codesourcery.com>
9354 * tracepoint.c (cmd_qtdp): Print debug message
9355 for static tracepoint.
9357 2012-01-04 Yao Qi <yao@codesourcery.com>
9359 * tracepoint.c (trace_vdebug): Differentiate debug message
9360 between gdbserver and IPA.
9362 2012-01-03 Yao Qi <yao@codesourcery.com>
9364 * tracepoint.c (tracepoint_was_hit): Don't collect for
9367 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9369 * terminal.h: Reformat copyright header.
9371 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9373 * server.c (gdbserver_version): Update copyright year.
9374 * gdbreplay.c (gdbreplay_version): Likewise.
9376 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9378 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9381 2011-12-18 Hui Zhu <teawater@gmail.com>
9382 * linux-low.c (linux_create_inferior): Save return value to ret.
9384 2011-12-18 Hui Zhu <teawater@gmail.com>
9386 * linux-low.c (linux_create_inferior): Save return value to ret.
9388 2011-12-16 Doug Evans <dje@google.com>
9390 * linux-low.c (linux_create_inferior): If stdio connection,
9391 redirect stdin from /dev/null, stdout to stderr.
9392 * remote-utils.c (remote_is_stdio): New static global.
9393 (remote_connection_is_stdio): New function.
9394 (remote_prepare): Handle stdio connection.
9395 (remote_open): Ditto.
9396 (remote_close): Don't close stdin for stdio connections.
9397 (read_prim,write_prim): New functions. Replace all calls to
9398 read/write to these.
9399 * server.c (main): Watch for "-" argument. Move call to
9400 remote_prepare before start_inferior.
9401 * server.h (STDIO_CONNECTION_NAME): New macro.
9402 (remote_connection_is_stdio): Declare.
9404 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9405 in debugging output.
9407 2011-12-15 Yao Qi <yao@codesourcery.com>
9409 * tracepoint.c: Include sys/syscall.h.
9410 (gdb_ust_thread): Remove preprocessor conditional.
9412 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9414 * linux-low.c (linux_detach_one_lwp): Call
9415 the_low_target.prepare_to_resume before detaching.
9417 2011-12-14 Yao Qi <yao@codesourcery.com>
9419 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9422 2011-12-14 Yao Qi <yao@codesourcery.com>
9424 * i386-low.c (i386_low_stopped_data_address): Initialize local
9427 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9431 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9432 DR_CONTROL unless necessary. Extend comments.
9433 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9434 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9436 2011-12-13 Yao Qi <yao@codesourcery.com>
9438 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9440 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9442 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9444 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9445 Print new debug message for such case.
9447 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9449 Fix overlapping memcpy.
9450 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9451 the read_inferior_memory transfer.
9452 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9453 write_inferior_memory transfer.
9454 (set_fast_tracepoint_jump): New variable buf. Use it for the
9455 read_inferior_memory and write_inferior_memory transfers.
9456 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9457 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9458 Use it for the write_inferior_memory transfer.
9459 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9462 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9464 * linux-low.c (fetch_register, store_register): Make code
9465 consistent, fix formatting.
9467 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9469 * linux-low.c (usr_store_inferior_registers): Factor out code
9470 to handle individual registers into...
9471 (store_register): ... this new function.
9473 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9475 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9476 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9477 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9478 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9479 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9480 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9481 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9482 (srv_xmlfiles): Add new XML files.
9484 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9486 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9487 (init_registers_s390_linux32v1): Add prototype.
9488 (init_registers_s390_linux32v2): Likewise.
9489 (init_registers_s390_linux64v1): Likewise.
9490 (init_registers_s390_linux64v2): Likewise.
9491 (init_registers_s390x_linux64v1): Likewise.
9492 (init_registers_s390x_linux64v2): Likewise.
9493 (s390_num_regs): Increment to 52.
9494 (s390_regmap): Add orig_r2 register.
9495 (s390_num_regs_3264): Increment to 68.
9496 (s390_regmap_3264): Add orig_r2 register.
9497 (s390_collect_ptrace_register): Handle orig_r2 register.
9498 (s390_supply_ptrace_register): Likewise.
9499 (s390_fill_last_break): New function.
9500 (s390_store_last_break): Likewise.
9501 (s390_fill_system_call): New function.
9502 (s390_store_system_call): Likewise.
9503 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9505 (s390_check_regset): New function.
9506 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9507 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9508 Update target_regsets for available register sets.
9510 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9511 Jan Kratochvil <jan.kratochvil@redhat.com>
9513 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9514 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9516 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9517 * linux-low.h (struct process_info_private): New member r_debug.
9518 * server.c (handle_qxfer_libraries): Call
9519 the_target->qxfer_libraries_svr4.
9520 (handle_qxfer_libraries_svr4): New function.
9521 (qxfer_packets): New entry "libraries-svr4".
9522 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9523 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9524 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9525 PACKET_qXfer_libraries_svr4.
9527 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9529 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9530 PSW address/mask between 8-byte and 16-byte formats.
9531 (s390_supply_ptrace_register): Likewise.
9532 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9533 basic addressing mode bit.
9535 2011-11-24 Stan Shebs <stan@codesourcery.com>
9537 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9539 2011-11-17 Stan Shebs <stan@codesourcery.com>
9541 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9542 (tracing_start_time): New global.
9543 (tracing_stop_time): New global.
9544 (tracing_user_name): New global.
9545 (tracing_notes): New global.
9546 (tracing_stop_note): New global.
9547 (cmd_qtstart): Set traceframe_usage, start_time.
9548 (stop_tracing): Set stop_time.
9549 (cmd_qtstatus): Report additional status.
9550 (cmd_qtp): New function.
9551 (handle_tracepoint_query): Call it.
9552 (cmd_qtnotes): New function.
9553 (handle_tracepoint_general_set): Call it.
9554 (get_timestamp): Rename from tsv_get_timestamp.
9556 2011-11-14 Stan Shebs <stan@codesourcery.com>
9557 Kwok Cheung Yeung <kcy@codesourcery.com>
9559 * linux-x86-low.c (small_jump_insn): New.
9560 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9561 trampoline and error message, build a trampoline and issue a small
9562 jump instruction to it.
9563 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9564 trampoline and error message.
9565 (x86_get_min_fast_tracepoint_insn_len): New.
9566 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9567 * linux-low.h (struct linux_target_ops): Add arguments to
9568 install_fast_tracepoint_jump_pad operation, add new operation.
9569 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9571 (linux_get_min_fast_tracepoint_insn_len): New function.
9572 (linux_target_op): Add new operation.
9573 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9574 (gdb_trampoline_buffer_end): Ditto.
9575 (gdb_trampoline_buffer_error): Ditto.
9576 (struct ipa_sym_addresses): Add fields for new IPA variables.
9577 (symbol_list): Add entries for new IPA variables.
9578 (struct tracepoint): Add fields to hold the address range of the
9579 trampoline used by the tracepoint.
9580 (trampoline_buffer_head): New static variable.
9581 (trampoline_buffer_tail): Ditto.
9582 (claim_trampoline_space): New function.
9583 (have_fast_tracepoint_trampoline_buffer): New function.
9584 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9586 (install_fast_tracepoint): Ditto, also add error buffer argument.
9587 (cmd_qtminftpilen): New function.
9588 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9589 (fast_tracepoint_from_trampoline_address): New function.
9590 (fast_tracepoint_collecting): Handle trampoline as part of jump
9592 (set_trampoline_buffer_space): New function.
9593 (initialize_tracepoint): Initialize new IPA variables.
9594 * target.h (struct target_ops): Add arguments to
9595 install_fast_tracepoint_jump_pad operation, add new
9596 get_min_fast_tracepoint_insn_len operation.
9597 (target_get_min_fast_tracepoint_insn_len): New.
9598 (install_fast_tracepoint_jump_pad): Add arguments.
9599 * server.h (IPA_BUFSIZ): Define.
9600 * linux-i386-ipa.c: Include extra header files.
9601 (initialize_fast_tracepoint_trampoline_buffer): New function.
9602 (initialize_low_tracepoint): Call it.
9603 * server.h (set_trampoline_buffer_space): Declare.
9604 (claim_trampoline_space): Ditto.
9605 (have_fast_tracepoint_trampoline_buffer): Ditto.
9607 2011-11-14 Yao Qi <yao@codesourcery.com>
9609 * server.c (handle_query): Handle InstallInTrace for qSupported.
9610 * tracepoint.c (add_tracepoint): Sort list.
9611 (install_tracepoint, download_tracepoint): New.
9612 (cmd_qtdp): Call them to install and download tracepoints.
9613 (sort_tracepoints): Removed.
9614 (cmd_qtstart): Update.
9616 2011-11-14 Yao Qi <yao@codesourcery.com>
9618 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9619 * mem-break.h: Declare.
9620 * tracepoint.c (cmd_qtstart): Move some code to ...
9621 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9623 (download_tracepoints): Move some code to ...
9624 (download_tracepoint_1): ... here. New.
9626 2011-11-08 Yao Qi <yao@codesourcery.com>
9628 * remote-utils.c (relocate_instruction): A comment fix.
9630 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9632 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9633 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9634 dr_status_mirror and dr_control_mirror from debug_reg_state.
9635 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9636 (i386_initial_stuff): Remove use of deleted globals.
9637 (i386_get_thread_context, i386_set_thread_context,
9638 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9639 from debug_reg_state.
9641 2011-11-05 Yao Qi <yao@codesourcery.com>
9643 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9644 address as TPOINT's.
9646 2011-11-02 Stan Shebs <stan@codesourcery.com>
9648 * tracepoint.c (agent_mem_read_string): New function.
9649 (eval_agent_expr): Call it for tracenz.
9650 * server.c (handle_query): Report support for tracenz.
9652 2011-11-02 Yao Qi <yao@codesourcery.com>
9654 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9656 2011-11-02 Yao Qi <yao@codesourcery.com>
9658 * target.h: Fix a typo in comment.
9660 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9662 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9663 clobber the breakpoints' shadows with fast tracepoint jumps.
9664 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9665 * target.c (write_inferior_memory): Also pass MYADDR down to
9668 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9670 * configure.ac: Check support for personality routine.
9671 * configure: Regenerate.
9672 * config.in: Likewise.
9673 * linux-low.c: Include <sys/personality.h>.
9674 Define ADDR_NO_RANDOMIZE if necessary.
9675 (linux_create_inferior): Disable address space randomization when
9676 forking inferior, if requested.
9677 (linux_supports_disable_randomization): New function.
9678 (linux_target_ops): Install it.
9679 * server.h (disable_randomization): Declare.
9680 * server.c (disable_randomization): New global variable.
9681 (handle_general_set): Handle QDisableRandomization.
9682 (handle_query): Likewise for qSupported.
9683 (main): Support --disable-randomization and --no-disable-randomization
9684 command line arguments.
9685 * target.h (struct target_ops): Add supports_disable_randomization.
9686 (target_supports_disable_randomization): New macro.
9688 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9690 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9692 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9693 [!PT_GETDSBT] (target_loadmap): New definition.
9694 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9695 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9696 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9697 and PT_GETDSBT to LINUX_LOADMAP.
9698 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9699 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9701 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9703 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9704 (arm_linux_hwbp_cap): New static variable.
9705 (arm_linux_get_hwbp_cap): Replace by ...
9706 (arm_linux_init_hwbp_cap): ... this new function.
9707 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9708 (arm_linux_get_hw_watchpoint_count): Likewise.
9709 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9710 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9711 (arm_prepare_to_resume): Use perror_with_name instead of error.
9713 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9715 * linux-arm-low.c: Include <signal.h>.
9716 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9717 (struct arm_linux_hwbp_cap): New data type.
9718 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9719 (struct arm_linux_hw_breakpoint): New data type.
9720 (MAX_BPTS, MAX_WPTS): Define.
9721 (struct arch_process_info, struct arch_lwp_info): New data types.
9722 (arm_linux_get_hwbp_cap): New function.
9723 (arm_linux_get_hw_breakpoint_count): Likewise.
9724 (arm_linux_get_hw_watchpoint_count): Likewise.
9725 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9726 (arm_hwbp_control_initialize): Likewise.
9727 (arm_hwbp_control_is_enabled): Likewise.
9728 (arm_hwbp_control_is_initialized): Likewise.
9729 (arm_hwbp_control_disable): Likewise.
9730 (arm_linux_hw_breakpoint_equal): Likewise.
9731 (arm_linux_hw_point_initialize): Likewise.
9732 (struct update_registers_data): New data structure.
9733 (update_registers_callback: New function.
9734 (arm_insert_point): Likewise.
9735 (arm_remove_point): Likewise.
9736 (arm_stopped_by_watchpoint): Likewise.
9737 (arm_stopped_data_address): Likewise.
9738 (arm_new_process): Likewise.
9739 (arm_new_thread): Likewise.
9740 (arm_prepare_to_resume): Likewise.
9741 (the_low_target): Register arm_insert_point, arm_remove_point,
9742 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9743 arm_new_thread, and arm_prepare_to_resume.
9745 2011-09-15 Stan Shebs <stan@codesourcery.com>
9747 * server.h (struct emit_ops): Add compare-goto fields.
9748 * tracepoint.c (gdb_agent_op_sizes): New table.
9749 (emit_eq_goto): New function.
9750 (emit_ne_goto): New function.
9751 (emit_lt_goto): New function.
9752 (emit_le_goto): New function.
9753 (emit_gt_goto): New function.
9754 (emit_ge_goto): New function.
9755 (is_goto_target): New function.
9756 (compile_bytecodes): Recognize special cases of compare-goto
9757 combinations and call specialized emitters for them.
9758 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9759 (amd64_emit_ne_goto): New function.
9760 (amd64_emit_lt_goto): New function.
9761 (amd64_emit_le_goto): New function.
9762 (amd64_emit_gt_goto): New function.
9763 (amd64_emit_ge_goto): New function.
9764 (amd64_emit_ops): Add the new functions.
9765 (i386_emit_eq_goto): New function.
9766 (i386_emit_ne_goto): New function.
9767 (i386_emit_lt_goto): New function.
9768 (i386_emit_le_goto): New function.
9769 (i386_emit_gt_goto): New function.
9770 (i386_emit_ge_goto): New function.
9771 (i386_emit_ops): Add the new functions.
9773 2011-09-08 Stan Shebs <stan@codesourcery.com>
9775 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9776 (i386_emit_epilogue): Restore %ebx.
9778 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9780 * server.c (step_thread): Remove definition.
9781 (process_serial_event): Don't handle Hs.
9782 * server.h (step_thread): Remove declaration.
9783 * target.c (set_desired_inferior): Remove use of step_thread.
9785 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9787 * linux-low.c: Include linux-procfs.h.
9788 (linux_attach_lwp_1): Update comments.
9789 (linux_attach): Scan for existing threads when attaching to a
9790 process that is the tgid.
9791 * Makefile.in: Update dependencies.
9793 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9795 * configure.srv: Add linux-procfs.o dependencies.
9797 2011-08-14 Yao Qi <yao@codesourcery.com>
9799 * target.h (struct target_ops): Fix indent.
9800 * win32-low.c (win32_target_ops): Fix comment.
9802 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9803 Yao Qi <yao@codesourcery.com>
9805 * Makefile.in (clean): Remove tic6x-*.c files.
9806 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9807 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9808 (tic6x-c64xp-linux.c): Likewise.
9809 * configure.srv: Add support for tic6x-*-uclinux.
9810 * linux-tic6x-low.c: New.
9811 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9813 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9814 Yao Qi <yao@codesourcery.com>
9816 * target.h (struct target_ops): Add read_loadmap.
9817 * linux-low.c (struct target_loadseg): New type.
9818 (struct target_loadmap): New type.
9819 (linux_read_loadmap): New function.
9820 (linux_target_ops): Add linux_read_loadmap.
9821 * server.c (handle_query): Support qXfer:fdpic:read packet.
9822 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9825 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9827 * win32-low.c: Include <stdint.h>.
9829 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9831 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9832 to the inferior here.
9833 (i386_remove_aligned_watchpoint): Ditto.
9834 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9835 fit part of the watchpoint in the debug registers.
9836 (i386_update_inferior_debug_regs): New.
9837 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9838 registers, and only update the inferior on success.
9839 (i386_low_remove_watchpoint): Ditto.
9841 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9843 * linux-low.c (compare_ints, unique, list_threads, show_process,
9844 linux_core_of_thread): Delete.
9845 (linux_target_ops): Change linux_core_of_thread to
9846 linux_common_core_of_thread.
9847 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9848 * utils.c (malloc_failure): Change type of argument.
9849 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9850 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9851 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9852 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9853 (IPA_OBJS): Add common-utils-ipa.o.
9854 (ptid_h, linux_osdata_h): New macros.
9855 (server_h): Add common/common-utils.h, common/xml-utils.h,
9856 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9858 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9859 ptid.o, buffer.o): New rules.
9860 (linux-low.o): Add common/linux-osdata.h as a dependency.
9861 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9862 * configure.ac: Add AC_HEADER_DIRENT check.
9863 * config.in: Regenerate.
9864 * configure: Regenerate.
9865 * remote-utils.c (xml_escape_text): Delete.
9866 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9867 buffer_xml_printf): Move to common/buffer.c.
9868 * server.c (main): Remove call to initialize_inferiors.
9869 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9870 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9871 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9872 internal_error, gdb_assert, gdb_assert_fail): Delete.
9873 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9874 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9876 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9877 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9878 initialize_inferiors): Delete.
9880 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9882 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9885 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9887 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9889 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9891 2011-05-26 Yao Qi <yao@codesourcery.com>
9893 * Makefile.in (thread-db.o): Track dependence to
9894 common/gdb_thread_db.h.
9895 * thread-db.c: include gdb_thread_db.h from right place.
9897 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9899 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9900 __FILE__ and __LINE__ to internal_error.
9902 2011-05-13 Doug Evans <dje@google.com>
9904 * thread-db.c (try_thread_db_load_from_sdir): New function.
9905 (try_thread_db_load_from_dir): New function.
9906 (thread_db_load_search): Handle $sdir, ignore $pdir.
9907 Remove trying of system directories if search of
9908 libthread-db-search-path fails, that is now done via $sdir.
9910 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9912 * server.c (handle_query): Add EnableDisableTracepoints to the list
9913 of supported features.
9914 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9916 (cmd_qtenable_disable): New.
9917 (cmd_qtstart): Install tracepoints even if disabled.
9918 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9919 receiving a QTEnable or QTDisable packet.
9920 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9921 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9923 (gdb_probe): Skip data collection if static tracepoint is disabled.
9925 2011-05-10 Doug Evans <dje@google.com>
9927 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9929 2011-05-04 Doug Evans <dje@google.com>
9931 * linux-low.c (linux_join): Skip process lookup.
9932 * spu-low.c (spu_join): Ditto.
9933 * server.c (join_inferiors_callback): Delete.
9934 (process_serial_event): For 'D' packet (detach) call join_inferior
9937 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9939 * README: Don't mention xscale*-*-linux*.
9940 * configure.srv (xscale*-*-linux*): Don't handle target.
9942 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9944 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9946 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9947 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9948 (i386_emit_void_call_2): Likewise.
9950 2011-04-26 Yao Qi <yao@codesourcery.com>
9952 * linux-low.c: Move common macros to linux-ptrace.h.
9953 Include linux-ptrace.h.
9954 * Makefile.in (linux_ptrace_h): New.
9955 (linux-low.o): Depends on linux-ptrace.h.
9957 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9959 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9960 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
9961 (remote_prepare): New function with most of the TCP code from ...
9962 (remote_open): ... here. Detect PORT here unconditionally. Move also
9963 setting transport_is_reliable.
9964 * server.c (run_once): New variable.
9965 (gdbserver_usage): Document it.
9966 (main): Set run_once for `--once'. Call remote_prepare. Exit after
9967 the first run if RUN_ONCE.
9968 * server.h (run_once, remote_prepare): New declarations.
9970 2011-04-19 Tom Tromey <tromey@redhat.com>
9972 * win32-low.c (handle_load_dll): Remove duplicate "the".
9974 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
9976 Remove support for old Cygwin 1.5 versions.
9977 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9978 function to avoid warning.
9979 (win32_add_one_solib): Use cygwin_conv_path function to avoid
9982 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
9984 * gdbserver/server.h (Macro _): Define it if not available.
9986 2011-03-14 Michael Snyder <msnyder@vmware.com>
9988 * hostio.c (handle_close): Remove unnecessary null test.
9990 2011-03-10 Joel Brobecker <brobecker@adacore.com>
9992 * Makefile.in (maintainer-clean realclean distclean): Remove
9993 "make ... subdir_do" command.
9995 2011-03-10 Michael Snyder <msnyder@vmware.com>
9997 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9999 * server.c (handle_v_run): Free alloced buffer on early return.
10001 2011-03-09 Yao Qi <yao@codesourcery.com>
10004 2011-03-04 Yao Qi <yao@codesourcery.com>
10006 * Makefile.in: Remove GNU make feature --directory.
10008 2011-03-05 Yao Qi <yao@codesourcery.com>
10010 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10011 (subdir_do): New make target. Copied from gdb/Makefile.
10012 (maintainer-clean, realclean, distclean, clean): Call corresponding
10013 make targets in common/Makefile.
10015 2011-02-11 Yao Qi <yao@codesourcery.com>
10017 * configure.ac: Call AC_PROG_RANLIB.
10018 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10019 * configure: Regenerate.
10021 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10023 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10025 2011-03-06 Yao Qi <yao@codesourcery.com>
10027 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10029 2011-03-05 Yao Qi <yao@codesourcery.com>
10031 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10032 (subdir_do): New make target. Copied from gdb/Makefile.
10033 (maintainer-clean, realclean, distclean, clean): Call corresponding
10034 make targets in common/Makefile.
10036 2011-03-04 Yao Qi <yao@codesourcery.com>
10038 * Makefile.in: Remove GNU make feature --directory.
10040 2011-03-04 Michael Snyder <msnyder@vmware.com>
10042 * server.c (queue_stop_reply): Call xmalloc not malloc.
10044 2011-03-02 Michael Snyder <msnyder@vmware.com>
10046 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10048 2011-02-28 Michael Snyder <msnyder@vmware.com>
10050 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10051 (cmd_qtframe): Ditto.
10052 (cmd_qtbuffer): Ditto.
10053 (cmd_bigqtbuffer): Ditto.
10055 * utils.c (decimal2str): Initialize 'width' to nine, then
10056 don't mess with it.
10058 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10060 * hostio.c (require_data): Free *data, not data.
10062 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10064 * hostio.c (require_data): Use free, not xfree.
10066 2011-02-27 Michael Snyder <msnyder@vmware.com>
10068 * server.c (handle_query): Discard unused value.
10070 * hostio.c (require_data): Free malloc memory before returning
10073 2011-02-26 Michael Snyder <msnyder@vmware.com>
10075 * linux-low.c (list_threads): Call closedir for dirent.
10077 2011-02-27 Michael Snyder <msnyder@vmware.com>
10079 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10080 a case statement falls through.
10082 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10084 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10087 2011-02-26 Michael Snyder <msnyder@vmware.com>
10089 * utils.c (decimal2str): Eliminate dead code and dead param.
10090 (pulongest): Drop dead param from call to decimal2str.
10093 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10095 Revert the following patch (not approved yet):
10096 2011-02-21 Hui Zhu <teawater@gmail.com>
10097 * tracepoint.c (tp_printf): New function.
10098 (eval_agent_expr): Handle gdb_agent_op_printf.
10100 2011-02-21 Hui Zhu <teawater@gmail.com>
10102 * tracepoint.c (tp_printf): New function.
10103 (eval_agent_expr): Handle gdb_agent_op_printf.
10105 2011-02-18 Tom Tromey <tromey@redhat.com>
10107 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10108 (tracepoint.o): Likewise.
10109 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10110 (gdb_agent_op_names): Likewise.
10112 2011-02-18 Tom Tromey <tromey@redhat.com>
10114 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10115 gdb_agent_op_rot>: New constants.
10116 (gdb_agent_op_names): Add pick and roll.
10117 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10120 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10122 * aclocal.m4: Regenerated with aclocal-1.11.1.
10124 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10126 * server.c (handle_qxfer_traceframe_info): New.
10127 (qxfer_packets): Register "traceframe-info".
10128 (handle_query): Report support for qXfer:traceframe-info:read+.
10129 * tracepoint.c (match_blocktype): New.
10130 (traceframe_find_block_type): Rename to ...
10131 (traceframe_walk_blocks): ... this. Add callback filter argument,
10133 (traceframe_find_block_type): New, reimplemented on top of
10134 traceframe_walk_blocks.
10135 (build_traceframe_info_xml): New.
10136 (traceframe_read_info): New.
10137 * server.h (traceframe_read_info): Declare.
10139 2011-02-11 Yao Qi <yao@codesourcery.com>
10141 * configure.ac: Call AC_PROG_RANLIB.
10142 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10143 * configure: Regenerate.
10145 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10147 * server.c (gdb_read_memory): Change return semantics to allow
10149 (handle_search_memory_1): Adjust.
10150 (process_serial_event) <'m' packet>: Handle partial transfers.
10151 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10153 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10155 * regcache.c (init_register_cache): Initialize
10156 regcache->register_status.
10157 (free_register_cache): Release regcache->register_status.
10158 (regcache_cpy): Copy register_status.
10159 (registers_to_string): Print 'x's for unavailable registers.
10160 (supply_register): Mark the register's status valid or
10161 unavailable, depending on whether a buffer was passed in or not.
10162 (supply_register_zeroed): New.
10163 (supply_regblock): Mark the registers' status valid or
10164 unavailable, depending on whether a buffer was passed in or not.
10165 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10166 (struct regcache): New `register_status' field.
10167 (supply_register_zeroed): Declare.
10168 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10169 supply_register_zeroed, rather than passing a NULL buffer to
10171 * tracepoint.c (fetch_traceframe_registers): Update comment.
10173 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10175 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10178 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10180 * server.h (decode_xfer_write): Change prototype.
10181 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10182 and don't extract the annex here.
10183 * server.c (decode_xfer_read): Remove `annex' parameter,
10184 and don't extract the annex here.
10185 (decode_xfer): New.
10186 (struct qxfer): New.
10187 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10188 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10189 (handle_qxfer_statictrace): New functions, abstracted out from
10190 handle_query, and made to use the struct qxfer interface.
10191 (handle_threads_qxfer_proper): Rename to ...
10192 (handle_qxfer_threads_proper): ... this.
10193 (handle_threads_qxfer): Rename to ...
10194 (handle_qxfer_threads): ... this. Adjust.
10195 (qxfer_packets): New array.
10196 (handle_qxfer): New function.
10197 (handle_query): Use handle_qxfer.
10199 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10201 * gdbreplay.c: Shorten lines of >= 80 columns.
10202 * linux-low.c: Ditto.
10203 * linux-ppc-low.c: Ditto.
10204 * linux-s390-low.c: Ditto.
10205 * linux-sparc-low.c: Ditto.
10206 * linux-x86-low.c: Ditto.
10207 * linux-xtensa-low.c: Ditto.
10208 * mem-break.c: Ditto.
10209 * nto-low.c: Ditto.
10210 * regcache.h: Ditto.
10211 * remote-utils.c: Ditto.
10214 * thread-db.c: Ditto.
10215 * tracepoint.c: Ditto.
10217 * win32-low.h: Ditto.
10219 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10221 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10224 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10226 * server.c (gdbserver_version): Update copyright year in version
10228 * gdbreplay.c (gdbreplay_version): Ditto.
10230 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10232 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10233 * linux-bfin-low.c: New file.
10234 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10235 PT_DATA_ADDR for BFIN targets.
10236 * Makefile.in (SFILES): Add linux-bfin-low.c.
10237 (clean): Remove reg-bfin.c.
10238 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10239 * README: Mention supported Blackfin targets.
10241 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10243 * .gitignore: New file.
10245 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10247 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10249 2010-10-22 Jie Zhang <jie@codesourcery.com>
10251 * Makefile.in: Add FLAGS_TO_PASS variable.
10252 (install): Remove dependency of install-only and recursively
10253 invoke make for install-only.
10255 2010-10-04 Doug Evans <dje@google.com>
10257 * Makefile.in (uninstall): Use $(DESTDIR).
10259 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10263 * linux-x86-low.c (compat_siginfo_from_siginfo)
10264 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10265 si_code is < 0. Check for si_code == SI_TIMER before checking for
10268 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10270 * lynx-i386-low.c: New file.
10271 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10273 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10275 * lynx-low.c (ptrace_request_to_str): Remove handling for
10276 request values that have been removed in LynxOS 5.x.
10278 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10280 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10283 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10285 * configure.ac: Add --enable-inprocess-agent option.
10286 * configure: Rebuilt.
10288 2010-09-06 Yao Qi <yao@codesourcery.com>
10290 * linux-low.c (linux_kill): Remove unused variable.
10291 (linux_stabilize_threads): Likewise.
10292 * server.c (start_inferior): Likewise.
10293 (queue_stop_reply_callback): Likewise.
10294 * tracepoint.c (do_action_at_tracepoint): Likewise.
10296 2010-09-06 Yao Qi <yao@codesourcery.com>
10298 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10301 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10303 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10305 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10307 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10310 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10312 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10313 gdbserver/lynx-ppc-low.c: New files.
10314 * Makefile.in (lynx_low_h): New variable.
10315 (lynx-low.o, lynx-ppc-low.o): New rules.
10316 * configure.ac: On LynxOS, link with -lnetinet.
10317 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10318 * configure: regenerate.
10320 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10322 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10323 * configure.ac: Add check for vasprintf and vsnprintf.
10324 * configure, config.in: Regenerate.
10325 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10327 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10329 * gdbreplay.c: Move include of alloca.h up, next to include of
10331 * server.h: Add include of malloc.h.
10332 * mem-break.c: Remove include of malloc.h.
10333 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10335 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10337 * Makefile.in (memmem.o): Build with -Wno-error.
10339 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10341 * utils.c (xsnprintf): Make non-static.
10342 * server.h: Add xsnprintf declaration.
10343 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10344 replace calls to snprintf by calls to xsnprintf throughout.
10346 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10348 * configure.ac: Add configure check for alloca.
10349 * configure, config.in: Regenerate.
10350 * server.h: Include alloca.h if it exists.
10351 * gdbreplay.c: Include alloca.h if it exists.
10353 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10355 * linux-low.c (__SIGRTMIN): Define if not already defined.
10356 (linux_create_inferior): Check for __ANDROID__ rather than
10358 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10359 are already deferred.
10360 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10361 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10362 stopped and already has a pending signal to report.
10363 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10364 a pending signal to report or is moving out of a jump pad.
10365 (linux_init_signals): Check for __ANDROID__ rather than
10368 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10370 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10371 debug_threads check. Avoid a linear search when not doing debug
10374 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10376 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10377 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10378 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10379 (process_event): Change local fd's type to gdb_fildes_t.
10380 (create_file_handler): Adjust prototype.
10381 (delete_file_handler): Adjust prototype.
10382 (handle_file_event): Adjust prototype. Use pfildes.
10383 (create_file_event): Adjsut prototype.
10384 * remote-utils.c (remote_desc, listen_desc): Change type to
10386 * server.h: New gdb_fildes_t typedef.
10387 [USE_WIN32API]: Include winsock2.h.
10388 (delete_file_handler, add_file_handler): Adjust prototypes.
10389 (pfildes): Declare.
10390 * utils.c (pfildes): New.
10392 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10394 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10395 * configure: Regenerate.
10397 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10399 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10400 (linux_done_accessing_memory): ... this.
10401 (linux_target_ops): Adjust.
10402 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10403 * nto-low.c (nto_target_ops): Adjust comment.
10404 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10405 * spu-low.c (spu_target_ops): Adjust comment.
10406 * target.h (target_ops): Rename unprepare_to_access_memory field
10407 to done_accessing_memory.
10408 (unprepare_to_access_memory): Rename to ...
10409 (done_accessing_memory): ... this.
10411 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10413 * linux-low.c (linux_prepare_to_access_memory): New.
10414 (linux_unprepare_to_access_memory): New.
10415 (linux_target_ops): Install them.
10416 * server.c (read_memory): Rename to ...
10417 (gdb_read_memory): ... this. Use
10418 prepare_to_access_memory/prepare_to_access_memory.
10419 (write_memory): Rename to ...
10420 (gdb_write_memory): ... this. Use
10421 prepare_to_access_memory/prepare_to_access_memory.
10422 (handle_search_memory_1): Adjust.
10423 (process_serial_event): Adjust.
10424 * target.h (struct target_ops): New fields
10425 prepare_to_access_memory and unprepare_to_access_memory.
10426 (prepare_to_access_memory, unprepare_to_access_memory): New.
10427 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10428 prepare_to_access_memory/prepare_to_access_memory.
10429 * nto-low.c (nto_target_ops): Adjust.
10430 * spu-low.c (spu_target_ops): Adjust.
10431 * win32-low.c (win32_target_ops): Adjust.
10433 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10435 * Makefile.in (WARN_CFLAGS): Get it from configure.
10436 (WERROR_CFLAGS): New.
10437 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10438 * configure.ac: Introduce --enable-werror, which adds -Werror to
10439 the compiler command line. Enabled by default. Disable with
10440 --disable-werror. Add -Wdeclaration-after-statement
10441 Wpointer-arith and -Wformat-nonliteral to warning flags.
10442 * configure: Regenerate.
10444 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10446 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10448 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10450 * gdbreplay.c (remote_error): New.
10452 (expect): Use gdbchar. Check for error reading from GDB.
10453 Clarify sync error output.
10454 (play): Check for errors writing to GDB.
10455 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10456 * remote-utils.c (getpkt): Check for errors writing to the remote
10459 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10461 * linux-low.c (linux_wait_1): Move non-debugging code out of
10462 `debug_threads' control.
10464 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10466 * linux-low.c (linux_wait_1): Don't set last_status here.
10467 * server.c (push_event, queue_stop_reply_callback): Assert we're
10468 not pushing a TARGET_WAITKIND_IGNORE event.
10469 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10470 (myresume, handle_target_event): Set the thread's last_resume_kind
10471 and last_status from the target returned status.
10473 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10477 * linux-x86-low.c (update_debug_registers_callback): New.
10478 (i386_dr_low_set_addr): Use it.
10479 (i386_dr_low_get_addr): New.
10480 (i386_dr_low_set_control): Use update_debug_registers_callback.
10481 (i386_dr_low_get_control): New.
10482 (i386_dr_low_get_status): Adjust.
10483 * linux-low.c (linux_stop_lwp): New.
10484 * linux-low.h (linux_stop_lwp): Declare.
10486 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10487 argument instead of a i386_debug_reg_state.
10488 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10489 a i386_debug_reg_state.
10490 (i386_insert_aligned_watchpoint): Adjust.
10491 (i386_remove_aligned_watchpoint): Adjust.
10492 (i386_low_stopped_data_address): Read the debug registers from the
10493 inferior instead of from the mirrors.
10494 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10495 (i386_dr_low_get_addr): Declare.
10496 (i386_dr_low_get_control): Declare.
10497 (i386_dr_low_get_status): Change prototype.
10499 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10500 (i386_dr_low_get_addr): New.
10501 (i386_dr_low_get_control): New.
10502 (i386_dr_low_get_status): Adjust prototype. Return
10504 (i386_initial_stuff): Clear dr_status_mirror and
10506 (i386_get_thread_context): Adjust.
10507 (i386_set_thread_context): Adjust.
10508 (i386_thread_added): Adjust.
10510 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10512 * linux-low.h (linux_thread_area): Delete declaration.
10514 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10516 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10517 after its termination.
10519 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10521 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10522 (gdb_wants_all_stopped): Delete.
10523 (linux_wait_1): Don't call them.
10524 * server.c (handle_v_cont): Tag all threads as want-stopped.
10525 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10526 stopped as "client-wants-stopped".
10528 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10530 * Makefile.in (signals_h): New.
10531 (server_h): Depend on it.
10532 (server.o): Don't depend on $(signals_def).
10533 (signals.o): Depend on $(signals_def).
10535 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10537 * Makefile.in (signals_def): New.
10538 (server_h): Append include/gdb/signals.h and signals_def.
10539 (server.o): Append signals_def.
10541 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10543 * server.c (handle_target_event): Use target_signal_to_host for
10544 resume_info.sig initialization.
10545 * target.h (struct thread_resume) <sig>: New comment.
10547 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10549 * server.c (handle_query): strcpy() the returned string from paddress()
10550 instead of sprintf().
10551 * utils.c (paddress): Return phex_nz().
10553 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10555 * server.c (handle_v_cont): Call mourn_inferior if process
10557 (myresume): Likewise.
10559 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10561 Static tracepoints, and integration with UST.
10563 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10564 * mem-break.c (uninsert_all_breakpoints)
10565 (reinsert_all_breakpoints): New.
10566 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10567 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10568 (gdb_agent_ust_loaded, helper_thread_id)
10569 (gdb_agent_helper_thread_id): New macros.
10570 (struct ipa_sym_addresses): Add addr_ust_loaded,
10571 addr_helper_thread_id, addr_cmd_buf.
10572 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10573 (in_process_agent_loaded_ust): New.
10574 (write_e_ust_not_loaded): New.
10575 (maybe_write_ipa_ust_not_loaded): New.
10576 (struct collect_static_trace_data_action): New.
10577 (enum tracepoint_type) <static_tracepoint>: New.
10578 (struct tracepoint) <handle>: Mention static tracepoints.
10579 (struct static_tracepoint_ctx): New.
10580 (CMD_BUF_SIZE): New.
10581 (add_tracepoint_action): Handle static tracepoint actions.
10582 (unprobe_marker_at): New.
10583 (clear_installed_tracepoints): Handle static tracepoints.
10584 (cmd_qtdp): Handle static tracepoints.
10585 (probe_marker_at): New.
10586 (cmd_qtstart): Handle static tracepoints.
10587 (response_tracepoint): Handle static tracepoints.
10588 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10589 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10590 (get_context_regcache): Handle static tracepoints.
10591 (do_action_at_tracepoint): Handle static tracepoint actions.
10592 (traceframe_find_block_type): Handle static trace data blocks.
10593 (traceframe_read_sdata): New.
10594 (download_tracepoints): Download static tracepoint actions.
10595 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10596 (GDB_PROBE_NAME): New.
10598 (GET_UST_SYM): New.
10601 (ust_marker_to_static_tracepoint): New.
10603 (collect_ust_data_at_tracepoint): New.
10604 (gdb_ust_probe): New.
10605 (UNIX_PATH_MAX, SOCK_DIR): New.
10606 (gdb_ust_connect_sync_socket): New.
10607 (resume_thread, stop_thread): New.
10608 (run_inferior_command): New.
10609 (init_named_socket): New.
10610 (gdb_ust_socket_init): New.
10611 (cstr_to_hexstr): New.
10613 (first_marker, next_marker): New.
10614 (response_ust_marker): New.
10615 (cmd_qtfstm, cmd_qtsstm): New.
10616 (unprobe_marker_at, probe_marker_at): New.
10617 (cmd_qtstmat, gdb_ust_thread): New.
10618 (gdb_ust_init): New.
10619 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10620 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10621 (ST_REGENTRY): New.
10622 (x86_64_st_collect_regmap): New.
10623 (X86_64_NUM_ST_COLLECT_GREGS): New.
10624 (AMD64_RIP_REGNUM): New.
10625 (supply_static_tracepoint_registers): New.
10626 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10627 (ST_REGENTRY): New.
10628 (i386_st_collect_regmap): New.
10629 (i386_NUM_ST_COLLECT_GREGS): New.
10630 (supply_static_tracepoint_registers): New.
10631 * server.c (handle_query): Handle qXfer:statictrace:read.
10632 <qSupported>: Report support for StaticTracepoints, and
10633 qXfer:statictrace:read features.
10634 * server.h (traceframe_read_sdata)
10635 (supply_static_tracepoint_registers): Declare.
10636 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10637 (unpack_varlen_hex): Include in IPA build.
10638 * Makefile.in (ustlibs, ustinc): New.
10639 (IPA_OBJS): Add remote-utils-ipa.o.
10640 ($(IPA_LIB)): Link -ldl and -lpthread.
10642 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10643 * config.in, configure: Regenerate.
10645 2010-06-20 Ian Lance Taylor <iant@google.com>
10646 Pedro Alves <pedro@codesourcery.com>
10648 * linux-x86-low.c (always_true): Delete.
10649 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10650 trying to fool the compiler with always_true.
10652 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10654 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10655 conditions in gdbserver.
10657 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10659 * spu-low.c (spu_read_memory): Wrap around local store limit.
10660 (spu_write_memory): Likewise.
10662 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10664 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10665 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10667 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10669 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10670 uses with LONGEST uses.
10672 2010-06-14 Stan Shebs <stan@codesourcery.com>
10673 Pedro Alves <pedro@codesourcery.com>
10677 * linux-x86-low.c: Include limits.h.
10679 (always_true): New.
10682 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10683 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10684 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10685 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10686 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10687 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10688 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10689 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10690 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10691 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10692 (amd64_emit_void_call_2): New.
10693 (amd64_emit_ops): New.
10694 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10695 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10696 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10697 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10698 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10699 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10700 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10701 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10702 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10703 (i386_emit_stack_adjust, i386_emit_int_call_1)
10704 (i386_emit_void_call_2): New.
10705 (i386_emit_ops): New.
10706 (x86_emit_ops): New.
10707 (the_low_target): Install x86_emit_ops.
10708 * server.h (struct emit_ops): New.
10709 (get_raw_reg_func_addr): Declare.
10710 (current_insn_ptr, emit_error): Declare.
10711 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10712 (set_trace_state_variable_value): New defines.
10713 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10714 addr_get_trace_state_variable_value and
10715 addr_set_trace_state_variable_value.
10716 (symbol_list): New fields for get_raw_reg,
10717 get_trace_state_variable_value and set_trace_state_variable_value.
10718 (condfn): New typedef.
10719 (struct tracepoint): New field `compiled_cond'.
10720 (do_action_at_tracepoint): Clear compiled_cond.
10721 (get_trace_state_variable_value, set_trace_state_variable_value):
10723 (condition_true_at_tracepoint): If there's a compiled condition,
10725 (current_insn_ptr, emit_error): New globals.
10726 (struct bytecode_address): New.
10727 (get_raw_reg_func_addr): New.
10728 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10729 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10730 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10731 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10732 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10733 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10734 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10735 (compile_tracepoint_condition, compile_bytecodes): New.
10736 * target.h (emit_ops): Forward declare.
10737 (struct target_ops): New field emit_ops.
10738 (target_emit_ops): New.
10739 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10740 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10741 * linux-low.c (linux_emit_ops): New.
10742 (linux_target_ops): Install it.
10743 * linux-low.h (struct linux_target_ops): New field emit_ops.
10745 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10747 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10748 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10750 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10751 Stan Shebs <stan@codesourcery.com>
10753 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10754 (all): Depend on $(extra_libraries).
10755 (install-only): Install the IPA.
10756 (IPA_OBJS, IPA_LIB): New.
10757 (clean): Remove the IPA lib.
10758 (IPAGENT_CFLAGS): New.
10759 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10760 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10761 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10762 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10763 * configure.ac: Check for atomic builtins support in the compiler.
10764 (IPA_DEPFILES, extra_libraries): Define.
10765 * configure.srv (ipa_obj): Add description.
10766 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10767 (i[34567]86-*-linux*): Set ipa_obj.
10768 (x86_64-*-linux*): Set ipa_obj.
10769 * linux-low.c (stabilizing_threads): New.
10770 (supports_fast_tracepoints): New.
10771 (linux_detach): Stabilize threads before detaching.
10772 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10773 the lwp is either not stabilizing, or is moving out of a jump pad.
10774 (linux_fast_tracepoint_collecting): New.
10775 (maybe_move_out_of_jump_pad): New.
10776 (enqueue_one_deferred_signal): New.
10777 (dequeue_one_deferred_signal): New.
10778 (linux_wait_for_event_1): If moving out of a jump pad, defer
10779 pending signals to later.
10780 (linux_stabilize_threads): New.
10781 (linux_wait_1): Check if threads need moving out of jump pads, and
10783 (stuck_in_jump_pad_callback): New.
10784 (move_out_of_jump_pad_callback): New.
10785 (lwp_running): New.
10786 (linux_resume_one_lwp): Handle moving out of jump pads.
10787 (linux_set_resume_request): Dequeue deferred signals.
10788 (need_step_over_p): Also step over fast tracepoint jumps.
10789 (start_step_over): Also uninsert fast tracepoint jumps.
10790 (finish_step_over): Also reinsert fast tracepoint jumps.
10791 (linux_install_fast_tracepoint_jump): New.
10792 (linux_target_ops): Install linux_stabilize_threads and
10793 linux_install_fast_tracepoint_jump_pad.
10794 * linux-low.h (linux_target_ops) <get_thread_area,
10795 install_fast_tracepoint_jump_pad>: New fields.
10796 (struct lwp_info) <collecting_fast_tracepoint,
10797 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10798 (linux_get_thread_area): Declare.
10799 * linux-x86-low.c (jump_insn): New.
10800 (x86_get_thread_area): New.
10801 (append_insns): New.
10802 (push_opcode): New.
10803 (amd64_install_fast_tracepoint_jump_pad): New.
10804 (i386_install_fast_tracepoint_jump_pad): New.
10805 (x86_install_fast_tracepoint_jump_pad): New.
10806 (the_low_target): Install x86_get_thread_area and
10807 x86_install_fast_tracepoint_jump_pad.
10808 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10809 (struct fast_tracepoint_jump): New.
10810 (fast_tracepoint_jump_insn): New.
10811 (fast_tracepoint_jump_shadow): New.
10812 (find_fast_tracepoint_jump_at): New.
10813 (fast_tracepoint_jump_here): New.
10814 (delete_fast_tracepoint_jump): New.
10815 (set_fast_tracepoint_jump): New.
10816 (uninsert_fast_tracepoint_jumps_at): New.
10817 (reinsert_fast_tracepoint_jumps_at): New.
10818 (set_breakpoint_at): Use write_inferior_memory.
10819 (uninsert_raw_breakpoint): Use write_inferior_memory.
10820 (check_mem_read): Mask out fast tracepoint jumps.
10821 (check_mem_write): Mask out fast tracepoint jumps.
10822 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10823 (set_fast_tracepoint_jump): Declare.
10824 (delete_fast_tracepoint_jump)
10825 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10826 (reinsert_fast_tracepoint_jumps_at): Declare.
10827 * regcache.c: Don't compile many functions when building the
10828 in-process agent library.
10829 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10830 the register buffer in the heap.
10831 (free_register_cache): If the register buffer isn't owned by the
10832 regcache, don't free it.
10833 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10834 pre-existing register caches.
10835 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10837 (convert_ascii_to_int): : Constify `from' parameter type.
10838 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10839 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10840 the needed buffer in-place.
10841 (relocate_instruction): New.
10842 * server.c (handle_query) <qSymbols>: If the target supports
10843 tracepoints, give it a chance of looking up symbols. Report
10844 support for fast tracepoints.
10845 (handle_status): Stabilize threads.
10846 (process_serial_event): Adjust.
10847 * server.h (struct fast_tracepoint_jump): Forward declare.
10848 (struct process_info) <fast_tracepoint_jumps>: New field.
10849 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10850 (decode_X_packet, decode_M_packet): Adjust.
10851 (relocate_instruction): Declare.
10852 (in_process_agent_loaded): Declare.
10853 (tracepoint_look_up_symbols): Declare.
10854 (struct fast_tpoint_collect_status): Declare.
10855 (fast_tracepoint_collecting): Declare.
10856 (force_unlock_trace_buffer): Declare.
10857 (handle_tracepoint_bkpts): Declare.
10858 (initialize_low_tracepoint)
10859 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10860 * target.h (struct target_ops) <stabilize_threads,
10861 install_fast_tracepoint_jump_pad>: New fields.
10862 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10863 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10864 [HAVE_STDINT_H]: Include stdint.h.
10865 (trace_debug_1): Rename to ...
10866 (trace_vdebug): ... this.
10867 (trace_debug): Rename to ...
10868 (trace_debug_1): ... this. Add `level' parameter.
10869 (trace_debug): New.
10870 (ATTR_USED, ATTR_NOINLINE): New.
10871 (IP_AGENT_EXPORT): New.
10872 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10873 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10874 (about_to_request_buffer_space, trace_buffer_is_full)
10875 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10876 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10877 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10878 (traceframe_write_count, traceframes_created)
10879 (trace_state_variables)
10880 New renaming defines.
10881 (struct ipa_sym_addresses): New.
10882 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10883 (symbol_list): New.
10884 (ipa_sym_addrs): New.
10885 (all_tracepoint_symbols_looked_up): New.
10886 (in_process_agent_loaded): New.
10887 (write_e_ipa_not_loaded): New.
10888 (maybe_write_ipa_not_loaded): New.
10889 (tracepoint_look_up_symbols): New.
10890 (debug_threads) [IN_PROCESS_AGENT]: New.
10891 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10892 (UNKNOWN_SIDE_EFFECTS): New.
10893 (stop_tracing): New.
10894 (flush_trace_buffer): New.
10895 (stop_tracing_bkpt): New.
10896 (flush_trace_buffer_bkpt): New.
10897 (read_inferior_integer): New.
10898 (read_inferior_uinteger): New.
10899 (read_inferior_data_pointer): New.
10900 (write_inferior_data_pointer): New.
10901 (write_inferior_integer): New.
10902 (write_inferior_uinteger): New.
10903 (struct collect_static_trace_data_action): Delete.
10904 (enum tracepoint_type): New.
10905 (struct tracepoint) <type>: New field `type'.
10906 <actions_str, step_actions, step_actions_str>: Only include in
10908 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10909 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10910 (tracepoints): Use IP_AGENT_EXPORT.
10911 (last_tracepoint): Don't include in the IPA.
10912 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10913 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10914 (alloced_trace_state_variables): New.
10915 (trace_state_variables): Use IP_AGENT_EXPORT.
10916 (traceframe_t): Delete unused variable.
10917 (circular_trace_buffer): Don't include in the IPA.
10918 (trace_buffer_start): Delete.
10919 (struct trace_buffer_control): New.
10920 (trace_buffer_free): Delete.
10921 (struct ipa_trace_buffer_control): New.
10922 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10923 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10925 (trace_buffer_ctrl): New.
10926 (TRACE_BUFFER_CTRL_CURR): New.
10927 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10928 Reimplement as macros.
10929 (trace_buffer_wrap): Delete.
10930 (traceframe_write_count, traceframe_read_count)
10931 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10932 (struct tracepoint_hit_ctx) <type>: New field.
10933 (struct fast_tracepoint_ctx): New.
10934 (memory_barrier): New.
10936 (record_tracepoint_error): Update atomically in the IPA.
10937 (clear_inferior_trace_buffer): New.
10938 (about_to_request_buffer_space): New.
10939 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10940 updating the same buffer.
10941 (add_tracepoint): Default the tracepoint's type to trap
10942 tracepoint, and orig_size to -1.
10943 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10944 internal variables.
10945 (create_trace_state_variable): New parameter `gdb'. Handle it.
10946 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10947 (cmd_qtdp): Handle fast tracepoints.
10948 (cmd_qtdv): Adjust.
10949 (max_jump_pad_size): New.
10950 (gdb_jump_pad_head): New.
10951 (get_jump_space_head): New.
10952 (claim_jump_space): New.
10953 (sort_tracepoints): New.
10954 (MAX_JUMP_SIZE): New.
10955 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10957 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10958 support. Upload fast traceframes, and delete internal IPA
10960 (stop_tracing_handler): New.
10961 (flush_trace_buffer_handler): New.
10962 (cmd_qtstop): Upload fast tracepoints.
10963 (response_tracepoint): Handle fast tracepoints.
10964 (tracepoint_finished_step): Upload fast traceframes. Set the
10965 tracepoint hit context's tracepoint type.
10966 (handle_tracepoint_bkpts): New.
10967 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10968 type. Add comment about fast tracepoints.
10969 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10970 non-existing action_str field.
10971 (get_context_regcache): Handle fast tracepoints.
10972 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10974 (fast_tracepoint_from_jump_pad_address): New.
10975 (fast_tracepoint_from_ipa_tpoint_address): New.
10976 (collecting_t): New.
10977 (force_unlock_trace_buffer): New.
10978 (fast_tracepoint_collecting): New.
10980 (gdb_collect): New.
10981 (write_inferior_data_ptr): New.
10982 (target_tp_heap): New.
10983 (target_malloc): New.
10984 (download_agent_expr): New.
10986 (download_tracepoints): New.
10987 (download_trace_state_variables): New.
10988 (upload_fast_traceframes): New.
10989 (IPA_FIRST_TRACEFRAME): New.
10990 (IPA_NEXT_TRACEFRAME_1): New.
10991 (IPA_NEXT_TRACEFRAME): New.
10992 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10993 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10994 (gdb_jump_pad_buffer_end): New.
10995 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10996 (initialize_tracepoint): Adjust.
10997 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10998 buffer. Initialize the low module.
10999 * utils.c (PREFIX, TOOLNAME): New.
11000 (malloc_failure): Use PREFIX.
11001 (error): In the IPA, an error causes an exit.
11002 (fatal, warning): Use PREFIX.
11003 (internal_error): Use TOOLNAME.
11004 (NUMCELLS): Increase to 10.
11005 * configure, config.in: Regenerate.
11007 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11009 * server.c (handle_query) <qSupported>: Do two passes over the
11010 qSupported string to avoid nesting strtok.
11012 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11014 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11016 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11017 -Wl,--dynamic-list.
11018 * configure: Regenerate.
11019 * proc-service.list: New.
11021 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11023 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11026 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11028 * gdbreplay.c (remote_open): Check error return from socket() call by
11029 its equality to -1 not by it being negative.
11030 * remote-utils.c (remote_open): Likewise.
11032 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11034 * config.h: Regenerate.
11036 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11038 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11039 doesn't provide PTRACE_GET_THREAD_AREA.
11041 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11043 * linux-m68k-low.c: Include <asm/ptrace.h>
11044 (ps_get_thread_area): Implement.
11046 2010-05-03 Doug Evans <dje@google.com>
11048 * event-loop.c (struct callback_event): New struct.
11049 (callback_list): New global.
11050 (append_callback_event, delete_callback_event): New functions.
11051 (process_callback): New function.
11052 (start_event_loop): Call it.
11053 * remote-utils.c (NOT_SCHEDULED): Define.
11054 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11055 moved out of readchar.
11056 (readchar): Rewrite. Call reschedule before returning.
11057 (reset_readchar): New function.
11058 (remote_close): Call it.
11059 (process_remaining, reschedule): New functions.
11060 * server.h (callback_handler_func): New typedef.
11061 (append_callback_event, delete_callback_event): Declare.
11063 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11065 * proc-service.c (ps_pglobal_lookup): Use
11066 thread_db_look_up_one_symbol.
11067 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11068 parameter. Use it instead of all_symbols_looked_up.
11069 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11071 (all_symbols_looked_up): Don't declare.
11072 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11073 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11075 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11076 Set all_symbols_looked_up here.
11077 (thread_db_look_up_one_symbol): New.
11078 (thread_db_get_tls_address): Adjust.
11079 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11080 thread_db object on the heap, and tentatively set it in the
11082 (thread_db_init): Don't set all_symbols_looked_up here.
11083 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11085 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11087 * linux-low.c (linux_kill, linux_detach): Adjust.
11088 (status_pending_p_callback): Remove redundant statement. Check
11089 for !TARGET_WAITIKIND_IGNORE, instead of
11090 TARGET_WAITKIND_STOPPED.
11091 (handle_tracepoints): Make sure LWP is locked. Adjust.
11092 (linux_wait_for_event_1): Adjust.
11093 (linux_cancel_breakpoints): New.
11094 (unsuspend_one_lwp): New.
11095 (unsuspend_all_lwps): New.
11096 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11097 (send_sigstop_callback): Change return type to int, add new
11098 `except' parameter and handle it.
11099 (suspend_and_send_sigstop_callback): New.
11100 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11101 pass them down. If SUSPEND, also increment the lwp's suspend
11103 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11104 (need_step_over_p): Don't consider suspended LWPs.
11105 (start_step_over): Adjust.
11106 (proceed_one_lwp): Change return type to int, add new `except'
11107 parameter and handle it.
11108 (unsuspend_and_proceed_one_lwp): New.
11109 (proceed_all_lwps): Use find_inferior instead of
11111 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11112 also decrement the suspend count of LWPs. Pass `except' down,
11113 instead of hacking its suspend count.
11114 (linux_pause_all): Add `freeze' parameter. Adjust.
11115 (linux_unpause_all): New.
11116 (linux_target_ops): Install linux_unpause_all.
11117 * server.c (handle_status): Adjust.
11118 * target.h (struct target_ops): New fields `unpause_all' and
11119 `cancel_breakpoints'. Add new parameter to `pause_all'.
11120 (pause_all): Add new `freeze' parameter.
11121 (unpause_all): New.
11122 (cancel_breakpoints): New.
11123 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11124 cancel breakpoints.
11125 (cmd_qtstart): Pause threads.
11126 (stop_tracing): Pause threads, and cancel breakpoints.
11127 * win32-low.c (win32_target_ops): Adjust.
11129 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11131 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11132 the inferior right away from here...
11133 (linux_wait_1): ... to here, and adjust to check the thread's
11134 last_resume_kind instead of the lwp's step or stop_expected flags.
11136 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11138 * README: Use consistent `GDB' and `GDBserver' spellings.
11140 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11142 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11143 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11144 (linux_detach_one_lwp): Assume the lwp is stopped.
11145 (any_thread_of): Delete.
11146 (linux_detach): Stop all lwps here. Don't blindly delete all
11148 (delete_lwp_callback): New.
11149 (linux_mourn): Delete all lwps of the process that is gone.
11150 (linux_wait_1): Don't delete the last lwp of the process here.
11151 * mem-break.h (mark_breakpoints_out): Declare.
11152 * mem-break.c (mark_breakpoints_out): New.
11153 (free_all_breakpoints): Use it.
11154 * server.c (handle_target_event): If the process is gone, mark
11156 * thread-db.c (struct thread_db) <create_bp>: New field.
11157 (thread_db_enable_reporting): Fix prototype. Store a thread event
11158 breakpoint reference in the thread_db struct.
11159 (thread_db_load_search): Clear the thread_db object.
11160 (try_thread_db_load_1): Ditto.
11161 (switch_to_process): New.
11162 (disable_thread_event_reporting): Use it.
11163 (remove_thread_event_breakpoints): New.
11164 (thread_db_detach, thread_db_mourn): Use it.
11166 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11168 * linux-low.c (linux_enable_event_reporting): New.
11169 (linux_wait_for_event_1, handle_extended_wait): Use it.
11171 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11173 * linux-low.c (linux_kill_one_lwp, linux_kill)
11174 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11175 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11176 SIGSTOP even if the LWP is stopped.
11177 (send_sigstop_callback): New.
11178 (stop_all_lwps): Use send_sigstop_callback instead.
11179 (linux_resume_one_thread): Adjust.
11180 (proceed_one_lwp): Still proceed an LWP that the client has
11181 requested to stop, if we haven't reported it as stopped yet. Make
11182 sure that LWPs the client want stopped, have a pending SIGSTOP.
11184 2010-04-26 Doug Evans <dje@google.com>
11186 * server.c (handle_general_set): Make static.
11188 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11189 Print received char after testing for error/eof instead of before.
11190 (input_interrupt): Tweak comment.
11192 2010-04-23 Doug Evans <dje@google.com>
11194 * server.c (start_inferior): Print inferior argv if --debug.
11196 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11198 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11199 * nto-x86-low.c: Include server.h
11201 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11203 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11204 be consistent with other sources of this directory.
11205 (init_registers_amd64): Correct name of source file of this function
11208 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11210 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11211 64-bit executables.
11213 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11215 * win32-i386-low.c: Add 64-bit support.
11216 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11217 (init_registers_amd64): Declare.
11218 (mappings): Add 64-bit version of array.
11219 (init_windows_x86): New function.
11220 (the_low_target): Change init_arch field to init_windows_x86.
11222 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11224 * win32-low.c: Adapt to support also 64-bit architecture.
11225 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11226 (get_image_name): Use SIZE_T type for local variable `done'.
11227 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11228 (toolhelp_get_dll_name): Idem.
11229 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11230 Use uintptr_t typecast to avoid warning.
11231 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11232 (handle_exception): Use phex_nz to avoid warning.
11233 (win32_wait): Remove unused local variable `process'.
11235 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11237 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11240 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11242 * configure.ac: Use `ws2_32' library for srv_mingw.
11243 * configure: Regenerate.
11244 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11245 * remote-utils.c: Likewise.
11247 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11249 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11250 if __x86_64__ is defined.
11252 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11254 * configure: Regenerate.
11256 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11258 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11259 * target.h (target_ops): New get_tib_address field.
11260 * win32-low.h (win32_thread_info): Add thread_local_base field.
11261 * win32-low.c (child_add_thread): Add tlb argument.
11262 Set thread_local_base field to TLB.
11263 (get_child_debug_event): Adapt to child_add_thread change.
11264 (win32_get_tib_address): New function.
11265 (win32_target_ops): Set get_tib_address field to
11266 win32_get_tib_address.
11267 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11269 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11271 * linux-low.c (linux_mourn): Also remove the process.
11272 * server.c (handle_target_event): Don't remove the process here.
11273 * nto-low.c (nto_mourn): New.
11274 (nto_target_ops): Install it.
11275 * spu-low.c (spu_mourn): New.
11276 (spu_target_ops): Install it.
11277 * win32-low.c (win32_mourn): New.
11278 (win32_target_ops): Install it.
11280 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11282 * server.h (buffer_xml_printf): Remove redundant `;'.
11284 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11286 * regcache.c (set_register_cache): Invalidate regcaches before
11287 changing the register cache layout.
11288 (regcache_invalidate_one): Allow a NULL regcache.
11289 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11290 regcaches before changing the register cache layout or the target
11293 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11295 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11296 variable warning on Linux/x86-64.
11298 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11300 GDBserver disconnected tracing support.
11302 * linux-low.c (linux_remove_process): Delete.
11303 (add_lwp): Don't set last_resume_kind here.
11304 (linux_kill): Use `mourn'.
11305 (linux_detach): Use `thread_db_detach', and `mourn'.
11306 (linux_mourn): New.
11307 (linux_attach_lwp_1): Adjust comment.
11308 (linux_attach): last_resume_kind moved the thread_info; adjust.
11309 (status_pending_p_callback): Adjust.
11310 (linux_wait_for_event_1): Adjust.
11311 (count_events_callback, select_singlestep_lwp_callback)
11312 (select_event_lwp_callback, cancel_breakpoints_callback)
11313 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11314 (proceed_one_lwp): Adjust.
11315 (linux_async): Add debug output.
11316 (linux_thread_stopped): New.
11317 (linux_pause_all): New.
11318 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11320 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11321 (thread_db_free): Delete declaration.
11322 (thread_db_detach, thread_db_mourn): Declare.
11323 * thread-db.c (thread_db_init): Use thread_db_mourn.
11324 (thread_db_free): Delete, split in two.
11325 (disable_thread_event_reporting): New.
11326 (thread_db_detach): New.
11327 (thread_db_mourn): New.
11329 * server.h (struct thread_info) <last_resume_kind>: New field.
11330 <attached>: Add comment.
11331 <gdb_detached>: New field.
11332 (handler_func): Change return type to int.
11333 (handle_serial_event, handle_target_event): Ditto.
11334 (gdb_connected): Declare.
11336 (disconnected_tracing): Declare.
11337 (stop_tracing): Declare.
11339 * server.c (handle_query) <qSupported>: Report support for
11340 disconnected tracing.
11341 (queue_stop_reply_callback): Account for running threads.
11342 (gdb_wants_thread_stopped): New.
11343 (gdb_wants_all_threads_stopped): New.
11344 (gdb_reattached_process): New.
11345 (handle_status): Clear the `gdb_detached' flag of all processes.
11346 In all-stop, stop all threads.
11347 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11348 (process_serial_event): If the remote connection breaks, or if an
11349 exit was forced with "monitor exit", force an event loop exit.
11350 Handle disconnected tracing on detach.
11351 (handle_serial_event): Adjust.
11352 (handle_target_event): If GDB isn't connected, forward events back
11353 to the inferior, unless the last process exited, in which case,
11354 exit gdbserver. Adjust interface.
11356 * remote-utils.c (remote_open): Don't block in accept. Instead
11357 register an event loop source on the listen socket file
11358 descriptor. Refactor bits into ...
11359 (listen_desc): ... this new global.
11360 (gdb_connected): ... this new function.
11361 (enable_async_notification): ... this new function.
11362 (handle_accept_event): ... this new function.
11363 (remote_close): Clear remote_desc.
11365 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11367 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11369 (mourn_inferior): Define.
11370 (target_process_qsupported): Avoid the dangling else problem.
11371 (thread_stopped): Define.
11372 (pause_all): Define.
11373 (target_waitstatus_to_string): Declare.
11374 * target.c (target_waitstatus_to_string): New.
11376 * tracepoint.c (tracing): Make extern.
11377 (disconnected_tracing): New.
11378 (stop_tracing): Make extern. Handle tracing stops due to GDB
11380 (cmd_qtdisconnected): New.
11381 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11382 (handle_tracepoint_general_set): Handle QTDisconnected.
11384 * event-loop.c (event_handler_func): Change return type to int.
11385 (process_event): Bail out if the event handler wants the event
11387 (handle_file_event): Ditto.
11388 (start_event_loop): Bail out if the event handler wants the event
11391 * nto-low.c (nto_target_ops): Adjust.
11392 * spu-low.c (spu_wait): Don't remove the process here.
11393 (spu_target_ops): Adjust.
11394 * win32-low.c (win32_wait): Don't remove the process here.
11395 (win32_target_ops): Adjust.
11397 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11399 * regcache.c (realloc_register_cache): Invalidate inferior's
11400 regcache before recreating it.
11402 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11404 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11406 2010-04-09 Stan Shebs <stan@codesourcery.com>
11407 Pedro Alves <pedro@codesourcery.com>
11409 * server.h (LONGEST): New.
11410 (struct thread_info) <while_stepping>: New field.
11411 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11413 (initialize_tracepoint, handle_tracepoint_general_set)
11414 (handle_tracepoint_query, tracepoint_finished_step)
11415 (tracepoint_was_hit, release_while_stepping_state_list):
11416 (current_traceframe): Declare.
11417 * server.c (handle_general_set): Handle tracepoint packets.
11418 (read_memory): New.
11419 (write_memory): New.
11420 (handle_search_memory_1): Use read_memory.
11421 (handle_query): Report support for conditional tracepoints, trace
11422 state variables, and tracepoint sources. Handle tracepoint
11424 (main): Initialize the tracepoints module.
11425 (process_serial_event): Handle traceframe reads/writes.
11427 * linux-low.c (handle_tracepoints): New.
11428 (linux_wait_1): Call it.
11429 (linux_resume_one_lwp): Handle while-stepping.
11430 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11431 (linux_target_ops): Install them.
11432 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11434 * linux-x86-low.c (x86_supports_tracepoints): New.
11435 (the_low_target). Install it.
11437 * mem-break.h (delete_breakpoint): Declare.
11438 * mem-break.c (delete_breakpoint): Make external.
11440 * target.h (struct target_ops): Add `supports_tracepoints',
11441 `read_pc', and `write_pc' fields.
11442 (target_supports_tracepoints): Define.
11443 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11446 * regcache.h (struct regcache) <registers_owned>: New field.
11447 (init_register_cache, regcache_cpy): Declare.
11448 (regcache_read_pc, regcache_write_pc): Declare.
11449 (register_cache_size): Declare.
11450 (supply_regblock): Declare.
11451 * regcache.c (init_register_cache): New.
11452 (new_register_cache): Use it.
11453 (regcache_cpy): New.
11454 (register_cache_size): New.
11455 (supply_regblock): New.
11456 (regcache_read_pc, regcache_write_pc): New.
11458 * tracepoint.c: New.
11460 * Makefile.in (OBS): Add tracepoint.o.
11461 (tracepoint.o): New rule.
11463 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11465 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11467 (i386-mmx.c): Likewise.
11468 (i386-mmx-linux.o): Likewise.
11469 (i386-mmx-linux.c): Likewise.
11471 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11472 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11473 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11474 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11476 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11477 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11478 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11480 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11482 * Makefile.in (clean): Updated.
11484 (i386-avx.c): Likewise.
11485 (i386-avx-linux.o): Likewise.
11486 (i386-avx-linux.c): Likewise.
11487 (amd64-avx.o): Likewise.
11488 (amd64-avx.c): Likewise.
11489 (amd64-avx-linux.o): Likewise.
11490 (amd64-avx-linux.c): Likewise.
11492 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11493 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11494 (srv_amd64_regobj): Add amd64-avx.o.
11495 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11496 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11497 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11498 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11499 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11500 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11501 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11503 * i387-fp.c: Include "i386-xstate.h".
11505 (i387_cache_to_xsave): Likewise.
11506 (i387_xsave_to_cache): Likewise.
11507 (x86_xcr0): Likewise.
11509 * i387-fp.h (i387_cache_to_xsave): Likewise.
11510 (i387_xsave_to_cache): Likewise.
11511 (x86_xcr0): Likewise.
11513 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11514 * linux-crisv32-low.c (target_regsets): Likewise.
11515 * linux-m68k-low.c (target_regsets): Likewise.
11516 * linux-mips-low.c (target_regsets): Likewise.
11517 * linux-ppc-low.c (target_regsets): Likewise.
11518 * linux-s390-low.c (target_regsets): Likewise.
11519 * linux-sh-low.c (target_regsets): Likewise.
11520 * linux-sparc-low.c (target_regsets): Likewise.
11521 * linux-xtensa-low.c (target_regsets): Likewise.
11523 * linux-low.c: Include <sys/uio.h>.
11524 (regsets_fetch_inferior_registers): Support nt_type.
11525 (regsets_store_inferior_registers): Likewise.
11526 (linux_process_qsupported): New.
11527 (linux_target_ops): Add linux_process_qsupported.
11529 * linux-low.h (regset_info): Add nt_type.
11530 (linux_target_ops): Add process_qsupported.
11532 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11534 (init_registers_i386_avx_linux): New.
11535 (init_registers_amd64_avx_linux): Likewise.
11536 (xmltarget_i386_linux_no_xml): Likewise.
11537 (xmltarget_amd64_linux_no_xml): Likewise.
11538 (PTRACE_GETREGSET): Likewise.
11539 (PTRACE_SETREGSET): Likewise.
11540 (x86_fill_xstateregset): Likewise.
11541 (x86_store_xstateregset): Likewise.
11542 (use_xml): Likewise.
11543 (x86_linux_update_xmltarget): Likewise.
11544 (x86_linux_process_qsupported): Likewise.
11545 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11546 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11547 init_registers_i386_linux here. Call
11548 x86_linux_update_xmltarget.
11549 (the_low_target): Add x86_linux_process_qsupported.
11551 * server.c (handle_query): Call target_process_qsupported.
11553 * target.h (target_ops): Add process_qsupported.
11554 (target_process_qsupported): New.
11556 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11558 * inferiors.c (add_thread): Set last_status kind to
11559 TARGET_WAITKIND_IGNORE.
11560 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11561 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11562 (linux_wait_1): Move `thread' local definition to block that uses
11563 it. Don't NULL initialize `event_child'.
11564 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11565 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11566 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11568 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11570 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11571 an extended waitstatus, or by a watchpoint.
11572 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11573 thread was stepping or has been stopped by a watchpoint.
11575 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11577 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11578 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11579 of another, then delete the previous, and validate all
11581 (validate_inserted_breakpoint): New.
11582 (delete_disabled_breakpoints): New.
11583 (validate_breakpoints): New.
11584 (check_mem_read): Validate breakpoints before trusting their
11585 shadow. Delete disabled breakpoints.
11586 (check_mem_write): Validate breakpoints before trusting they
11587 should be inserted. Delete disabled breakpoints.
11588 * mem-break.h (validate_breakpoints):
11589 * server.c (handle_query): Validate breakpoints when we see a
11592 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11594 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11595 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11596 if we could tell there's a GDB breakpoint at stop_pc.
11597 (need_step_over_p): Don't do a step over if we find a GDB
11598 breakpoint at the resume PC.
11600 * mem-break.c (struct raw_breakpoint): New.
11601 (enum bkpt_type): New type `gdb_breakpoint'.
11602 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11603 fields. New field `raw'.
11604 (find_raw_breakpoint_at): New.
11605 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11606 breakpoint instead.
11607 (set_breakpoint_at): Adjust.
11608 (delete_raw_breakpoint): New.
11609 (release_breakpoint): New.
11610 (delete_breakpoint): Rename to...
11611 (delete_breakpoint_1): ... this. Add proc parameter. Use
11612 release_breakpoint. Return ENOENT.
11613 (delete_breakpoint): Reimplement.
11614 (find_breakpoint_at): Delete.
11615 (find_gdb_breakpoint_at): New.
11616 (delete_breakpoint_at): Delete.
11617 (set_gdb_breakpoint_at): New.
11618 (delete_gdb_breakpoint_at): New.
11619 (gdb_breakpoint_here): New.
11620 (set_reinsert_breakpoint): Use release_breakpoint.
11621 (uninsert_breakpoint): Rename to ...
11622 (uninsert_raw_breakpoint): ... this.
11623 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11624 (reinsert_raw_breakpoint): Change parameter type to
11626 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11628 (check_breakpoints): Adjust. Use release_breakpoint.
11629 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11630 (breakpoint_inserted_here): Ditto.
11631 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11632 Don't trust the breakpoint's shadow if it is not inserted.
11633 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11634 (delete_all_breakpoints): Adjust.
11635 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11636 use delete_breakpoint_1.
11638 * mem-break.h (breakpoints_supported): Delete declaration.
11639 (set_gdb_breakpoint_at): Declare.
11640 (gdb_breakpoint_here): Declare.
11641 (delete_breakpoint_at): Delete.
11642 (delete_gdb_breakpoint_at): Declare.
11644 * server.h (struct raw_breakpoint): Forward declare.
11645 (struct process_info): New field `raw_breakpoints'.
11647 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11650 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11652 * linux-low.c (status_pending_p_callback): Fix comment.
11653 (linux_wait_for_event_1): Move most of the internal breakpoint
11654 handling from here...
11655 (linux_wait_1): ... to here.
11656 (count_events_callback): New.
11657 (select_singlestep_lwp_callback): New.
11658 (select_event_lwp_callback): New.
11659 (cancel_breakpoints_callback): New.
11660 (select_event_lwp): New.
11661 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11662 priority to all LWPs that have had events that should be reported
11663 to the client. Cancel breakpoints when about to reporting the
11664 event to the client, not while stopping lwps. No longer cancel
11665 finished single-steps here.
11666 (cancel_finished_single_step): Delete.
11667 (cancel_finished_single_steps): Delete.
11669 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11671 * mem-break.c (enum bkpt_type): New.
11672 (struct breakpoint): New field `type'.
11673 (set_breakpoint_at): Change return type to struct breakpoint
11674 pointer. Set type to `other_breakpoint' by default.
11675 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11676 in the breakpoint list.
11677 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11678 (reinsert_breakpoint): Rename to ...
11679 (reinsert_raw_breakpoint): ... this.
11680 (reinsert_breakpoints_at): Adjust.
11681 * mem-break.h (struct breakpoint): Declare.
11682 (set_breakpoint_at): Change return type to struct breakpoint
11685 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11687 * server.c (handle_query): Assign, not compare.
11689 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11691 Teach linux gdbserver to step-over-breakpoints.
11693 * linux-low.c (can_hardware_single_step): New.
11694 (supports_breakpoints): New.
11695 (handle_extended_wait): If stopping threads, read the stop pc of
11696 the new cloned LWP.
11698 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11699 low target doesn't support retrieving the PC.
11700 (add_lwp): Set last_resume_kind to resume_continue.
11701 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11702 (linux_attach): Don't clear stop_expected. Set the lwp's
11703 last_resume_kind to resume_stop.
11704 (linux_detach_one_lwp): Don't check for removed breakpoints.
11705 (check_removed_breakpoint): Delete.
11706 (status_pending_p): Rename to ...
11707 (status_pending_p_callback): ... this. Don't check for removed
11708 breakpoints. Don't consider threads that are stopped from GDB's
11710 (linux_wait_for_lwp): Always read the stop_pc here.
11711 (cancel_breakpoint): New.
11712 (step_over_bkpt): New global.
11713 (linux_wait_for_event_1): Implement stepping over breakpoints.
11714 (gdb_wants_lwp_stopped): New.
11715 (gdb_wants_all_stopped): New.
11716 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11717 single-step traps here. Store the thread's last reported target
11719 (send_sigstop): Don't clear stop_expected. Always set it,
11721 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11722 (cancel_finished_single_step): New.
11723 (cancel_finished_single_steps): New.
11724 (wait_for_sigstop): Don't cancel finished single-step traps here.
11725 (linux_resume_one_lwp): Don't check for removed breakpoints.
11726 Don't set `step' on non-hardware step archs.
11727 (linux_set_resume_request): Ignore resume_stop requests if already
11728 stopping or stopped. Set the lwp's last_resume_kind.
11729 (resume_status_pending_p): Don't check for removed breakpoints.
11730 (need_step_over_p): New.
11731 (start_step_over): New.
11732 (finish_step_over): New.
11733 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11734 requests. Clear the thread's last reported target waitstatus.
11735 Don't use the `suspended' flag. Don't consider pending breakpoints.
11736 (linux_resume): Start a step-over if necessary.
11737 (proceed_one_lwp): New.
11738 (proceed_all_lwps): New.
11739 (unstop_all_lwps): New.
11740 * linux-low.h (struct lwp_info): Rewrite comment for the
11741 `suspended' flag. Add the `stop_pc' field. Delete the
11742 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11743 Add `'last_resume_kind' and `need_step_over' fields.
11744 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11745 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11746 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11747 (set_raw_breakpoint_at): New.
11748 (set_breakpoint_at): Rewrite to use it.
11749 (reinsert_breakpoint_handler): Delete.
11750 (set_reinsert_breakpoint): New.
11751 (reinsert_breakpoint_by_bp): Delete.
11752 (delete_reinsert_breakpoints): New.
11753 (uninsert_breakpoint): Rewrite.
11754 (uninsert_breakpoints_at): New.
11755 (reinsert_breakpoint): Rewrite.
11756 (reinsert_breakpoints_at): New.
11757 (check_breakpoints): Rewrite.
11758 (breakpoint_here): New.
11759 (breakpoint_inserted_here): New.
11760 (check_mem_read): Adjust.
11761 * mem-break.h (breakpoints_supported, breakpoint_here)
11762 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11763 (reinsert_breakpoint_by_bp): Delete declaration.
11764 (delete_reinsert_breakpoints): Declare.
11765 (reinsert_breakpoint): Delete declaration.
11766 (reinsert_breakpoints_at): Declare.
11767 (uninsert_breakpoint): Delete declaration.
11768 (uninsert_breakpoints_at): Declare.
11769 (check_breakpoints): Adjust prototype.
11770 * server.h: Adjust include order.
11771 (struct thread_info): Declare here. Add a `last_status' field.
11773 2010-03-23 Michael Snyder <msnyder@vmware.com>
11775 * server.c (crc32): New function.
11776 (handle_query): Add handling for 'qCRC:' request.
11778 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11780 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11781 lwp had been stopped by a watchpoint.
11783 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11785 * server.h (internal_error): Declare.
11786 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11787 * utils.c (internal_error): New function.
11789 2010-03-15 Andreas Schwab <schwab@redhat.com>
11791 * configure.srv: Fix typo setting srv_regobj.
11793 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11795 * linux-low.c (fetch_register): Avoid passing a non string literal
11797 (usr_store_inferior_registers): Ditto.
11799 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11801 * linux-low.c (linux_write_memory): Bail out early if peeking
11804 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11806 * linux-low.h (struct lwp_info): New fields
11807 `stopped_by_watchpoint' and `stopped_data_address'.
11808 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11809 here, and cache them in the lwp object.
11810 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11812 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11814 (linux_stopped_by_watchpoint): Rewrite.
11815 (linux_stopped_data_address): Rewrite.
11817 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11819 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11820 switching the current inferior, not before.
11822 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11824 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11825 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11826 i386-linux.c and amd64-linux.c.
11827 (reg-i386.o): Removed.
11828 (reg-i386.c): Likewise.
11829 (reg-i386-linux.o): Likewise.
11830 (reg-i386-linux.c): Likewise.
11831 (reg-x86-64.o): Likewise.
11832 (reg-x86-64.c): Likewise.
11833 (reg-x86-64-linux.o): Likewise.
11834 (reg-x86-64-linux.c): Likewise.
11836 (i386.c): Likewise.
11837 (i386-linux.o): Likewise.
11838 (i386-linux.c): Likewise.
11839 (amd64.o): Likewise.
11840 (amd64.c): Likewise.
11841 (amd64-linux.o): Likewise.
11842 (amd64-linux.c): Likewise.
11844 * configure.srv (srv_i386_regobj): New.
11845 (srv_i386_linux_regobj): Likewise.
11846 (srv_amd64_regobj): Likewise.
11847 (srv_amd64_linux_regobj): Likewise.
11848 (srv_i386_32bit_xmlfiles): Likewise.
11849 (srv_i386_64bit_xmlfiles): Likewise.
11850 (srv_i386_xmlfiles): Likewise.
11851 (srv_amd64_xmlfiles): Likewise.
11852 (srv_i386_linux_xmlfiles): Likewise.
11853 (srv_amd64_linux_xmlfiles): Likewise.
11854 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11855 srv_xmlfiles to $srv_i386_xmlfiles.
11856 (i[34567]86-*-mingw32ce*): Likewise.
11857 (i[34567]86-*-mingw*): Likewise.
11858 (i[34567]86-*-nto*): Likewise.
11859 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11860 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11861 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11862 (x86_64-*-linux*): Likewise.
11864 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11865 (init_registers_amd64_linux): New.
11866 (x86_arch_setup): Replace init_registers_x86_64_linux with
11867 init_registers_amd64_linux.
11869 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11871 * configure.ac: Check for libdl. If it is not available link against
11872 static libthread_db.
11873 * configure: Regenerate.
11875 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11879 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11880 handing a read watchpoint.
11881 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11883 2010-02-12 Doug Evans <dje@google.com>
11885 * linux-low.c (linux_supports_tracefork_flag): Document.
11886 (linux_look_up_symbols): Add comment.
11888 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11890 * regcache.c (supply_register): Clear regcache if buf is NULL.
11892 2010-02-02 Nicolas Roche <roche@sourceware.org>
11893 Joel Brobecker <brobecker@adacore.com>
11895 * inferiors.c (find_inferior): Add function documentation.
11896 (unloaded_dll): Handle the case where the unloaded dll has not
11897 been previously registered in the dll list.
11899 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11901 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11902 (thumb2_breakpoint): New.
11903 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11905 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11907 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11908 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11911 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11913 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11915 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11917 * linux-s390-low.c (s390_collect_ptrace_register)
11918 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11920 2010-01-21 Doug Evans <dje@google.com>
11922 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11923 (PTRACE_ARG4_TYPE): New macro.
11924 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11925 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11926 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11927 (usr_store_inferior_registers): Ditto.
11928 (linux_read_memory, linux_write_memory): Ditto.
11929 (linux_test_for_tracefork): Ditto.
11931 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11932 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11934 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11936 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11939 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11941 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11942 prototype to take a regcache. Adjust.
11944 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11946 * regcache.h (struct thread_info): Forward declare.
11947 (struct regcache): New.
11948 (new_register_cache): Adjust prototype.
11949 (get_thread_regcache): Declare.
11950 (free_register_cache): Adjust prototype.
11951 (registers_to_string, registers_from_string): Ditto.
11952 (supply_register, supply_register_by_name, collect_register)
11953 (collect_register_as_string, collect_register_by_name): Ditto.
11954 * regcache.c (struct inferior_regcache_data): Delete.
11955 (get_regcache): Rename to ...
11956 (get_thread_regcache): ... this. Adjust. Switch inferior before
11957 fetching registers.
11958 (regcache_invalidate_one): Adjust.
11959 (regcache_invalidate): Fix prototype.
11960 (new_register_cache): Return the new register cache.
11961 (free_register_cache): Change prototype.
11962 (realloc_register_cache): Adjust.
11963 (registers_to_string): Change prototype to take a regcache. Adjust.
11964 (registers_from_string): Ditto.
11965 (register_data): Ditto.
11966 (supply_register): Ditto.
11967 (supply_register_by_name): Ditto.
11968 (collect_register): Ditto.
11969 (collect_register_as_string): Ditto.
11970 (collect_register_by_name): Ditto.
11971 * server.c (process_serial_event): Adjust.
11972 * linux-low.h (regset_fill_func, regset_store_func): Change
11974 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11976 * linux-low.c (get_stop_pc): Adjust.
11977 (check_removed_breakpoint): Adjust.
11978 (linux_wait_for_event): Adjust.
11979 (linux_resume_one_lwp): Adjust.
11980 (fetch_register): Add regcache parameter. Adjust.
11981 (usr_store_inferior_registers): Ditto.
11982 (regsets_fetch_inferior_registers): Ditto.
11983 (regsets_store_inferior_registers): Ditto.
11984 (linux_fetch_registers, linux_store_registers): Ditto.
11985 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11987 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11989 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11990 prototype to take a regcache.
11991 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11992 * remote-utils.c (convert_ascii_to_int, outreg)
11993 (prepare_resume_reply): Change prototype to take a regcache.
11995 * target.h (struct target_ops) <fetch_registers, store_registers>:
11996 Change prototype to take a regcache.
11997 (fetch_inferior_registers, store_inferior_registers): Change
11998 prototype to take a regcache. Adjust.
11999 * proc-service.c (ps_lgetregs): Adjust.
12000 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12001 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12002 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12003 take a regcache. Adjust.
12004 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12005 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12006 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12007 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12008 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12009 (cris_cannot_fetch_register):
12010 (cris_breakpoint_at): Change prototype to take a regcache.
12012 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12013 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12014 to take a regcache. Adjust.
12015 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12017 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12018 take a regcache. Adjust.
12019 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12020 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12021 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12022 * linux-mips-low.c (mips_get_pc):
12023 (mips_set_pc): Change prototype to take a regcache. Adjust.
12024 (mips_reinsert_addr): Adjust.
12025 (mips_collect_register): Change prototype to take a regcache.
12027 (mips_supply_register):
12028 (mips_collect_register_32bit, mips_supply_register_32bit)
12029 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12030 (mips_store_fpregset): Ditto.
12031 * linux-ppc-low.c (ppc_supply_ptrace_register)
12032 (ppc_supply_ptrace_register): Ditto.
12033 (parse_spufs_run): Adjust.
12034 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12035 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12036 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12037 take a regcache. Adjust.
12038 * linux-s390-low.c (s390_collect_ptrace_register)
12039 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12040 (s390_set_pc): Change prototype to take a regcache. Adjust.
12041 (s390_arch_setup): Adjust.
12042 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12043 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12044 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12045 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12046 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12048 (sparc_breakpoint_at): Adjust.
12049 * linux-xtensa-low.c (xtensa_fill_gregset):
12050 (xtensa_store_gregset):
12051 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12052 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12053 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12054 prototype to take a regcache. Adjust.
12055 * win32-arm-low.c (arm_fetch_inferior_register)
12056 (arm_store_inferior_register): Change prototype to take a
12058 * win32-i386-low.c (i386_fetch_inferior_register)
12059 (i386_store_inferior_register): Change prototype to take a
12061 * win32-low.c (child_fetch_inferior_registers)
12062 (child_store_inferior_registers): Change prototype to take a
12064 (win32_wait): Adjust.
12065 (win32_fetch_inferior_registers): Change prototype to take a
12067 (win32_store_inferior_registers): Adjust.
12068 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12069 store_inferior_register>: Change prototype to take a regcache.
12071 2010-01-20 Doug Evans <dje@google.com>
12073 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12075 (linux_wait_for_event1, linux_init_signals): Ditto.
12076 (W_STOPCODE): Provide definition if missing.
12078 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12080 * linux-low.c (linux_core_of_thread): New.
12081 (compare_ints, show_process, list_threads): New.
12082 (linux_qxfer_osdata): Report threads and cores.
12083 (linux_target_op): Register linux_core_of_thread.
12084 * remote-utils.c (prepare_resume_reply): Report the core.
12085 (buffer_xml_printf): Support %d specifier.
12086 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12088 (handle_query): Handle qXfer:threads. Announce availability
12090 * target.h (struct target_ops): New field core_of_thread.
12092 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12094 * Makefile.in (clean): Remove new generated files.
12095 (reg-s390.o, reg-s390.c): Remove rules.
12096 (reg-s390x.o, reg-s390x.c): Likewise.
12097 (s390-linux32.o, s390-linux32.c): Add rules.
12098 (s390-linux64.o, s390-linux64.c): Likewise.
12099 (s390x-linux64.o, s390x-linux64.c): Likewise.
12100 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12101 * linux-s390-low.c: Include <elf.h>.
12102 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12103 (init_registers_s390): Remove prototype.
12104 (init_registers_s390x): Likewise.
12105 (init_registers_s390_linux32): Add prototype.
12106 (init_registers_s390_linux64): Likewise.
12107 (init_registers_s390x_linux64): Likewise.
12108 (s390_num_regs_3264): New define.
12109 (s390_regmap_3264): New global variable.
12110 (s390_cannot_fetch_register): Remove obsolete check.
12111 (s390_cannot_store_register): Likewise.
12112 (s390_collect_ptrace_register): Handle upper/lower register halves.
12113 (s390_supply_ptrace_register): Likewise.
12114 (s390_fill_gregset): Update to register number changes.
12115 (s390_get_hwcap): New routine.
12116 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12117 Install appropriate regmap and register set.
12119 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12121 * server.c (gdbserver_version): Update copyright year to 2010.
12122 * gdbreplay.c (gdbreplay_version): Likewise.
12124 2009-12-28 Doug Evans <dje@google.com>
12126 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12127 elf/external.h. Include <elf.h> instead but only if necessary.
12129 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12131 * linux-low.c (linux_remove_process): Remove `detaching'
12132 parameter. Don't release/detach from thread_db here.
12133 (linux_kill): Release/detach from thread_db here, ...
12134 (linux_detach): ... and here, before actually detaching.
12135 (linux_wait_1): ... and here, when a process exits.
12136 * thread-db.c (any_thread_of): New.
12137 (thread_db_free): Switch the current inferior to a thread of the
12140 2009-12-21 Doug Evans <dje@google.com>
12142 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12144 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12145 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12146 warning ifndef __NR_tkill. Move setting of errno there too.
12147 Delete unnecessary resetting of errno after syscall.
12148 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12150 * configure.ac: Check for dladdr.
12151 * config.in: Regenerate.
12152 * configure: Regenerate.
12153 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12154 (try_thread_db_load): Update.
12156 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12158 2009-12-18 Doug Evans <dje@google.com>
12160 * event-loop.c: Include unistd.h if it exists.
12162 * linux-low.c (my_waitpid): Move definition away from being in
12163 between linux_tracefork_child/linux_test_for_tracefork.
12165 * gdb_proc_service.h (psaddr_t): Fix type.
12166 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12167 signature to match glibc.
12169 2009-12-16 Doug Evans <dje@google.com>
12171 * linux-low.c (linux_read_memory): Fix argument to read.
12173 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12175 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12176 events, don't leave current_inferior pointing at null.
12178 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12180 * win32-low.c (LOG): Delete.
12181 (OUTMSG): Output to stderr.
12182 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12183 on compile time LOG macro.
12184 (win32_wait): Fix debug output.
12186 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12188 * win32-low.c (win32_add_one_solib): If the dll name is
12189 "ntdll.dll", prepend the system directory to the dll path.
12191 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12193 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12195 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12196 Vladimir Prus <vladimir@codesourcery.com>
12198 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12199 * configure.ac: Check for __mcoldfire__ and set
12200 gdb_cv_m68k_is_coldfire.
12201 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12202 reg-cf.o and reg-m68k.o.
12203 * configure: Regenerated.
12205 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12207 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12208 Pass it to thread_db_free.
12209 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12210 proper `detaching' argument to linux_remove_process.
12211 * linux-low.h (thread_db_free): Add `detaching' parameter.
12212 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12214 (thread_db_free): Add `detaching' parameter. Only
12215 call td_ta_clear_event if detaching from process.
12217 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12219 * thread-db.c (thread_db_free): Fix typo.
12221 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12224 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12226 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12228 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12229 with an i686 compiler.
12230 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12232 * configure: Rebuilt.
12234 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12238 * server.c (handle_search_memory_1): Correct read_addr initialization
12239 in loop for searching subsequent chunks.
12241 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12243 * configure.ac: New --with-libthread-db option.
12244 * thread-db.c: Allow direct dependence on libthread_db.
12245 (thread_db_free): Adjust.
12246 * config.in: Regenerate.
12247 * configure: Likewise.
12249 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12252 * thread-db.c (attach_thread): New function.
12253 (maybe_attach_thread): Return success/failure.
12254 (find_new_threads_callback): Adjust.
12255 (thread_db_find_new_threads): Loop until no new threads.
12257 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12259 * proc-service.c (ps_lgetregs): Formatting.
12261 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12263 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12264 * configure.ac: Adjust.
12265 * linux-low.h (struct process_info_private): Move members to struct
12267 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12268 * linux-low.c (linux_remove_process): Adjust.
12269 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12270 * server.c (handle_query): Move code ...
12271 (handle_monitor_command): ... here. New function.
12272 * target.h (struct target_ops): New member.
12273 * thread-db.c (struct thread_db): New.
12274 (libthread_db_search_path): New variable.
12275 (thread_db_create_event, thread_db_enable_reporting)
12276 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12277 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12278 (try_thread_db_load_1, dladdr_to_soname): New functions.
12279 (try_thread_db_load, thread_db_load_search): New functions.
12280 (thread_db_init): Search for libthread_db.
12281 (thread_db_free): New function.
12282 (thread_db_handle_monitor_command): Likewise.
12283 * config.in: Regenerate.
12284 * configure: Regenerate.
12286 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12288 * spu-low.c (spu_kill): Wait for inferior to terminate.
12289 Call clear_inferiors.
12290 (spu_detach): Call clear_inferiors.
12292 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12294 * aclocal.m4: Regenerate.
12295 * config.in: Likewise.
12296 * configure: Likewise.
12298 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12300 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12301 (parse_spufs_run): New function.
12302 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12303 (ppc_breakpoint_at): Handle SPU breakpoints.
12305 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12307 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12308 (SPUFS_MAGIC): Define.
12309 (spu_enumerate_spu_ids): New function.
12310 (linux_qxfer_spu): New function.
12311 (linux_target_ops): Install linux_qxfer_spu.
12313 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12315 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12316 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12317 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12318 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12319 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12320 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12321 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12322 (init_registers_powerpc_cell32l): Add prototype.
12323 (init_registers_powerpc_cell64l): Likewise.
12324 (ppc_arch_setup): Detect Cell/B.E. architecture.
12326 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12328 * Makefile.in (datarootdir): New variable.
12330 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12332 * linux-low.c (linux_write_memory): Update debugging output.
12333 * Makefile.in (clean): Add new descriptions.
12334 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12335 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12336 * configure.srv: Add new files for arm*-*-linux*.
12337 * linux-arm-low.c: Add new declarations.
12338 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12339 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12340 (HWCAP_VFPv3D16): New.
12341 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12342 instead of __IWMMXT__.
12343 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12344 (arm_arch_setup): New.
12345 (target_regsets): Remove #ifdef. Add VFP regset.
12346 (the_low_target): Use arm_arch_setup.
12348 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12350 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12351 the main thread again.
12353 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12355 Adding Neutrino gdbserver.
12356 * configure: Regenerated.
12357 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12358 * configure.srv (i[34567]86-*-nto*): New target.
12359 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12360 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12361 (nto_comctrl) [__QNX__]: New function.
12362 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12364 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12366 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12369 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12370 Pedro Alves <pedro@codesourcery.com>
12372 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12373 don't support CONTEXT_EXTENDED_REGISTERS.
12374 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12375 (the_low_target): Install them.
12376 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12377 failing with ERROR_PIPE_NOT_CONNECTED.
12379 2009-06-30 Doug Evans <dje@google.com>
12380 Pierre Muller <muller@ics.u-strasbg.fr>
12382 Add h/w watchpoint support to x86-linux, win32-i386.
12383 * Makefile.in (SFILES): Add i386-low.c
12384 (i386_low_h): Define.
12385 (i386-low.o): Add dependencies.
12386 (linux-x86-low.o): Add i386-low.h dependency.
12387 (win32-i386-low.o): Ditto.
12388 * i386-low.c: New file.
12389 * i386-low.h: New file.
12390 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12391 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12392 * linux-low.c (linux_add_process): Initialize arch_private.
12393 (linux_remove_process): Free arch_private.
12394 (add_lwp): Initialize arch_private.
12395 (delete_lwp): Free arch_private.
12396 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12398 * linux-low.h (process_info_private): New member arch_private.
12399 (lwp_info): New member arch_private.
12400 (linux_target_ops): New members new_process, new_thread,
12402 (ptid_of): New macro.
12403 * linux-x86-low.c: Include stddef.h, i386-low.h.
12404 (arch_process_info): New struct.
12405 (arch_lwp_info): New struct.
12406 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12407 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12408 (i386_dr_low_get_status): New function.
12409 (x86_insert_point, x86_remove_point): New functions.
12410 (x86_stopped_by_watchpoint): New function.
12411 (x86_stopped_data_address): New function.
12412 (x86_linux_new_process, x86_linux_new_thread): New functions.
12413 (x86_linux_prepare_to_resume): New function.
12414 (the_low_target): Add entries for insert_point, remove_point,
12415 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12417 * server.c (debug_hw_points): New global.
12418 (monitor_show_help): Document set debug-hw-points.
12419 (handle_query): Process "set debug-hw-points".
12420 * server.h (debug_hw_points): Declare.
12421 (paddress): Declare.
12422 * utils.c (NUMCELLS, CELLSIZE): New macros.
12423 (get_sell, xsnprintf, paddress): New functions.
12424 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12425 remove_point, stopped_by_watchpoint, stopped_data_address.
12426 * win32-i386-low.c: Include i386-low.h.
12427 (debug_reg_state): Replaces dr.
12428 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12429 (i386_dr_low_get_status): New function.
12430 (i386_insert_point, i386_remove_point): New functions.
12431 (i386_stopped_by_watchpoint): New function.
12432 (i386_stopped_data_address): New function.
12433 (i386_initial_stuff): Update.
12434 (get_thread_context,set_thread_context,i386_thread_added): Update.
12435 (the_low_target): Add entries for insert_point,
12436 remove_point, stopped_by_watchpoint, stopped_data_address.
12437 * win32-low.c (win32_insert_watchpoint): New function.
12438 (win32_remove_watchpoint): New function.
12439 (win32_stopped_by_watchpoint): New function.
12440 (win32_stopped_data_address): New function.
12441 (win32_target_ops): Add entries for insert_watchpoint,
12442 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12443 * win32-low.h (win32_target_ops): New members insert_point,
12444 remove_point, stopped_by_watchpoint, stopped_data_address.
12446 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12448 * server.c (process_serial_event): Re-return unsupported, not
12449 error, if the type isn't recognized. Re-allow supporting only
12450 insert or remove packets. Also call require_running for
12451 breakpoints. Add missing break statement to default case. Tidy.
12452 * target.h (struct target_ops): Rename insert_watchpoint to
12453 insert_point, and remove_watchpoint to remove_point.
12455 * linux-low.h (struct linux_target_ops): Likewise.
12456 * linux-low.c (linux_insert_watchpoint): Rename to ...
12457 (linux_insert_point): ... this. Adjust.
12458 (linux_remove_watchpoint): Rename to ...
12459 (linux_remove_point): ... this. Adjust.
12460 (linux_target_ops): Adjust.
12461 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12462 (cris_insert_point): ... this.
12463 (cris_remove_watchpoint): Rename to ...
12464 (cris_remove_point): ... this.
12465 (the_low_target): Adjust.
12467 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12469 * server.c (handle_v_kill): Pass signal_pid to
12470 kill_inferior if multi_process is zero.
12472 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12474 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12475 * target.h (target_ops): Comment for *_watchpoint to make it clear
12476 the functions can get types '0' and '1'.
12478 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12480 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12481 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12482 * regcache.c (get_regcache): Likewise.
12483 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12484 * win32-low.c (child_fetch_inferior_registers): Remove check for
12487 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12488 Pedro Alves <pedro@codesourcery.com>
12490 * target.h (struct target_ops) <supports_multi_process>: New
12492 (target_supports_multi_process): New.
12493 * server.c (handle_query): Even if GDB reports support, only
12494 enable multi-process if the target also supports it. Report
12495 multi-process support only if the target backend supports it.
12496 * linux-low.c (linux_supports_multi_process): New function.
12497 (linux_target_ops): Install it as target_supports_multi_process
12500 2009-05-24 Doug Evans <dje@google.com>
12502 Global renaming of find_thread_pid to find_thread_ptid.
12503 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12504 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12505 All callers updated.
12507 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12508 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12511 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12512 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12513 (linux_resume_one_lwp): Ditto.
12515 2009-05-23 Doug Evans <dje@google.com>
12517 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12518 from struct inferior_list_entry * to struct lwp_info *.
12519 All callers updated.
12521 2009-05-13 Doug Evans <dje@google.com>
12523 * linux-x86-low.c: Don't include assert.h.
12524 (x86_siginfo_fixup): Use fatal, not assert.
12525 (x86_arch_setup): Fix comment.
12527 2009-05-12 Doug Evans <dje@google.com>
12529 Biarch support for i386/amd64 gdbserver.
12530 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12531 Add linux-x86-low.c.
12532 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12533 (linux-x86-low.o): Add.
12534 * linux-x86-64-low.c: Delete.
12535 * linux-i386-low.c: Delete.
12536 * linux-x86-low.c: New file.
12537 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12539 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12541 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12542 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12543 (linux_child_pid_to_exec_file): New function.
12544 (elf_64_header_p, elf_64_file_p): New functions.
12545 (siginfo_fixup): New function.
12546 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12547 give target a chance to convert layout.
12548 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12549 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12551 2009-05-07 Doug Evans <dje@google.com>
12553 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12554 (regsets_store_inferior_registers): Ditto.
12556 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12560 * linux-low.c (must_set_ptrace_flags): Delete.
12561 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12563 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12564 `lwp->must_set_ptrace_flags' instead.
12565 (linux_wait_for_event_1): Set ptrace options here.
12566 (linux_wait_1): ... not here.
12568 2009-04-30 Doug Evans <dje@google.com>
12570 * inferiors.c (started_inferior_callback): New function.
12571 (attached_inferior_callback): New function.
12572 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12573 * server.c (print_started_pid, print_attached_pid): New functions.
12574 (detach_or_kill_for_exit): New function.
12575 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12576 * server.h (have_started_inferiors_p): Declare.
12577 (have_attached_inferiors_p): Declare.
12579 * inferiors.c (remove_process): Fix memory leak, free process.
12580 * linux-low.c (linux_remove_process): New function.
12581 (linux_kill): Call it instead of remove_process.
12582 (linux_detach, linux_wait_1): Ditto.
12584 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12586 * configure.srv: Add x86 Windows CE target.
12588 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12590 * inferiors.c (get_thread_process): Make global.
12591 * server.h (get_thread_process): Add prototype.
12592 * thread-db.c (find_one_thread): Use get_thread_process
12593 instead of current_process.
12594 (thread_db_get_tls_address): Do not crash if called when
12595 thread layer is not yet initialized.
12597 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12599 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12600 * spu-low.c (current_tid): Rename to ...
12601 (current_ptid): ... this.
12602 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12603 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12604 ptid_get_lwp (current_ptid) instead of current_tid.
12605 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12606 instead of current_tid. Use find_process_pid to verify pid
12607 argument is valid. Pass proper argument to remove_process.
12608 (spu_thread_alive): Compare current_ptid instead of current_tid.
12609 (spu_resume): Likewise.
12611 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12613 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12616 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12618 Implement the multiprocess extensions, and add linux multiprocess
12621 * server.h (ULONGEST): Declare.
12622 (struct ptid, ptid_t): New.
12623 (minus_one_ptid, null_ptid): Declare.
12624 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12625 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12626 (struct inferior_list_entry): Change `id' type from unsigned from
12628 (struct sym_cache, struct breakpoint, struct
12629 process_info_private): Forward declare.
12630 (struct process_info): Declare.
12631 (current_process): Declare.
12632 (all_processes): Declare.
12633 (initialize_inferiors): Declare.
12634 (add_thread): Adjust to use ptid_t.
12635 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12636 (add_process, remove_process, find_thread_pid): Declare.
12637 (find_inferior_id): Adjust to use ptid_t.
12638 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12639 (multi_process): Declare.
12640 (push_event): Adjust to use ptid_t.
12641 (read_ptid, write_ptid): Declare.
12642 (prepare_resume_reply): Adjust to use ptid_t.
12643 (clear_symbol_cache): Declare.
12644 * inferiors.c (all_processes): New.
12645 (null_ptid, minus_one_ptid): New.
12646 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12647 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12648 (add_thread): Change unsigned long to ptid. Remove gdb_id
12650 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12651 (gdb_id_to_thread): Rename to ...
12652 (find_thread_pid): ... this. Change unsigned long to ptid.
12653 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12654 (loaded_dll, pull_pid_from_list): Adjust.
12655 (add_process, remove_process, find_process_pid)
12656 (get_thread_process, current_process, initialize_inferiors): New.
12657 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12658 (struct target_waitstatus) <related_pid>: Ditto.
12659 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12660 return type to int.
12661 (struct target_ops) <join>: Add `pid' argument.
12662 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12663 (struct target_ops) <wait>: Add `ptid' field. Change return type
12665 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12666 (mywait): Add `ptid' argument. Change return type to ptid_t.
12667 (target_pid_to_str): Declare.
12668 * target.c (set_desired_inferior): Adjust to use ptids.
12669 (mywait): Add new `ptid' argument. Adjust.
12670 (target_pid_to_str): New.
12671 * mem-break.h (free_all_breakpoints): Declare.
12672 * mem-break.c (breakpoints): Delelete.
12673 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12674 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12675 to use per-process breakpoint list.
12676 (free_all_breakpoints): New.
12677 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12678 (symbol_cache, all_symbols_looked_up): Delete.
12680 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12682 (prepare_resume_reply): Change ptid argument's type from unsigned
12683 long to ptid_t. Adjust. Implement W;process and X;process.
12684 (free_sym_cache, clear_symbol_cache): New.
12685 (look_up_one_symbol): Adjust to per-process symbol cache. *
12686 * server.c (cont_thread, general_thread, step_thread): Change type
12688 (attached): Delete.
12689 (multi_process): New.
12690 (last_ptid): Change type to ptid_t.
12691 (struct vstop_notif) <ptid>: Change type to ptid_t.
12692 (queue_stop_reply, push_event): Change `ptid' argument's type to
12694 (discard_queued_stop_replies): Add `pid' argument.
12695 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12696 changes. Don't reference the `attached' global.
12697 (attach_inferior): Adjust to mywait interface changes.
12698 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12699 features. Handle and report "multiprocess+". Handle
12701 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12703 (handle_v_kill): New.
12704 (handle_v_stopped): Adjust to use target_pid_to_str.
12705 (handle_v_requests): Allow multiple attaches and runs when
12706 multiprocess extensions are in effect. Handle "vKill".
12707 (myresume): Adjust to use ptids.
12708 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12709 (handle_status): Adjust to discard_queued_stop_replies interface
12711 (first_thread_of, kill_inferior_callback)
12712 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12713 (main): Call initialize_inferiors. Adjust to use ptids, killing
12714 and detaching from all inferiors. Handle multiprocess packet
12716 * linux-low.h: Include gdb_proc_service.h.
12717 (struct process_info_private): New.
12718 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12719 <lwpid_of>: Use ptid_get_lwp.
12720 (get_lwp_thread): Adjust.
12721 (struct lwp_info): Add `dead' member.
12722 (find_lwp_pid): Declare.
12723 * linux-low.c (thread_db_active): Delete.
12724 (new_inferior): Adjust comment.
12725 (inferior_pid): Delete.
12726 (linux_add_process): New.
12727 (handle_extended_wait): Adjust.
12728 (add_lwp): Change unsigned long to ptid.
12729 (linux_create_inferior): Add process to processes table. Adjust
12730 to use ptids. Don't set new_inferior here.
12731 (linux_attach_lwp): Rename to ...
12732 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12733 it. Adjust to use ptids.
12734 (linux_attach_lwp): New.
12735 (linux_attach): Add process to processes table. Don't set
12737 (struct counter): New.
12738 (second_thread_of_pid_p, last_thread_of_process_p): New.
12739 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12740 multiple processes.
12741 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12742 processes. Remove process from process table.
12743 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12744 to multiple processes.
12745 (any_thread_of): New.
12746 (linux_detach): Add `pid' argument, and handle it. Remove process
12747 from processes table.
12748 (linux_join): Add `pid' argument. Handle it.
12749 (linux_thread_alive): Change unsighed long argument to ptid_t.
12750 Consider dead lwps as not being alive.
12751 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12752 threads we're not interested in.
12753 (same_lwp, find_lwp_pid): New.
12754 (linux_wait_for_lwp): Change `pid' argument's type from int to
12756 (linux_wait_for_event): Rename to ...
12757 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12758 from int to ptid_t. Adjust.
12759 (linux_wait_for_event): New.
12760 (linux_wait_1): Add `ptid' argument. Change return type to
12761 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12762 that exit from the process table.
12763 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12765 (mark_lwp_dead): New.
12766 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12767 stopping all threads, mark its main lwp as dead.
12768 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12770 (fetch_register, usr_store_inferior_registers)
12771 (regsets_fetch_inferior_registers)
12772 (regsets_store_inferior_registers, linux_read_memory)
12773 (linux_write_memory): Inline `inferior_pid'.
12774 (linux_look_up_symbols): Adjust to use per-process
12775 `thread_db_active'.
12776 (linux_request_interrupt): Adjust to use ptids.
12777 (linux_read_auxv): Inline `inferior_pid'.
12778 (initialize_low): Don't reference thread_db_active.
12779 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12780 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12781 (ps_getpid): Return the pid of the current inferior.
12782 * thread-db.c (proc_handle, thread_agent): Delete.
12783 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12785 (find_one_thread): Change argument type to ptid_t. Adjust to
12787 (maybe_attach_thread): Adjust to per-process data and ptids.
12788 (thread_db_find_new_threads): Ditto.
12789 (thread_db_init): Ditto.
12790 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12791 processes table. Adjust to use ptids.
12792 (spu_kill, spu_detach): Adjust interface. Remove process from
12794 (spu_join, spu_thread_alive): Adjust interface.
12795 (spu_wait): Adjust interface. Remove process from processes
12796 table. Adjust to use ptids.
12797 * win32-low.c (current_inferior_tid): Delete.
12798 (current_inferior_ptid): New.
12799 (debug_event_ptid): New.
12800 (thread_rec): Take a ptid. Adjust.
12801 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12802 (child_delete_thread): Ditto.
12803 (do_initial_child_stuff): Add `attached' argument. Add process to
12805 (child_fetch_inferior_registers, child_store_inferior_registers):
12807 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12808 (win32_attach): Pass 1 to do_initial_child_stuff.
12809 (win32_kill): Adjust interface. Remove process from processes
12811 (win32_detach): Ditto.
12812 (win32_join): Adjust interface.
12813 (win32_thread_alive): Take a ptid.
12814 (win32_resume): Adjust to use ptids.
12815 (get_child_debug_event): Ditto.
12816 (win32_wait): Adjust interface. Remove exiting process from
12819 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12821 Non-stop mode support.
12823 * server.h (non_stop): Declare.
12824 (gdb_client_data, handler_func): Declare.
12825 (delete_file_handler, add_file_handler, start_event_loop):
12827 (handle_serial_event, handle_target_event, push_event)
12828 (putpkt_notif): Declare.
12829 * target.h (enum resume_kind): New.
12830 (struct thread_resume): Replace `step' field by `kind' field.
12831 (TARGET_WNOHANG): Define.
12832 (struct target_ops) <wait>: Add `options' argument.
12833 <supports_non_stop, async, start_non_stop>: New fields.
12834 (target_supports_non_stop, target_async): New.
12835 (start_non_stop): Declare.
12836 (mywait): Add `options' argument.
12837 * target.c (mywait): Add `options' argument. Print child exit
12838 notifications here.
12839 (start_non_stop): New.
12840 * server.c (non_stop, own_buf, mem_buf): New globals.
12841 (struct vstop_notif): New.
12842 (notif_queue): New global.
12843 (queue_stop_reply, push_event, discard_queued_stop_replies)
12844 (send_next_stop_reply): New.
12845 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12847 (attach_inferior): In non-stop mode, don't wait for the target
12849 (handle_general_set): Handle QNonStop.
12850 (handle_query): When handling qC, return the current general
12851 thread, instead of the first thread of the list.
12852 (handle_query): If the backend supports non-stop mode, include
12853 QNonStop+ in the qSupported query response.
12854 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12856 (handle_v_attach, handle_v_run): Handle non-stop mode.
12857 (handle_v_stopped): New.
12858 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12859 (myresume): Adjust to use resume_kind. Handle non-stop.
12860 (queue_stop_reply_callback): New.
12861 (handle_status): Handle non-stop mode.
12862 (main): Clear non_stop flag on reconnection. Use the event-loop.
12863 Refactor serial protocol handling from here ...
12864 (process_serial_event): ... to this new function. When GDB
12865 selects any thread, select one here. In non-stop mode, wait until
12866 GDB acks all pending events before exiting.
12867 (handle_serial_event, handle_target_event): New.
12868 * remote-utils.c (remote_open): Install remote_desc in the event
12870 (remote_close): Remove remote_desc from the event loop.
12871 (putpkt_binary): Rename to...
12872 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12873 (putpkt_binary): New as wrapper around putpkt_binary_1.
12874 (putpkt_notif): New.
12875 (prepare_resume_reply): In non-stop mode, don't change the
12877 * event-loop.c: New.
12878 * Makefile.in (OBJ): Add event-loop.o.
12879 (event-loop.o): New rule.
12881 * linux-low.h (pid_of): Moved here.
12883 (get_lwp_thread): Use lwpid_of.
12884 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12885 * linux-low.c (pid_of): Delete.
12886 (inferior_pid): Use lwpid_of.
12887 (linux_event_pipe): New.
12888 (target_is_async_p): New.
12890 (handle_extended_wait): Use lwpid_of.
12891 (add_lwp): Don't set lwpid field.
12892 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12893 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12894 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12895 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12896 first. Adjust to linux_wait_for_event interface changes. Use
12898 (linux_detach): Don't delete the main lwp here.
12899 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12900 (status_pending_p): Don't consider explicitly suspended lwps.
12901 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12902 pointer. Add OPTIONS argument. Change return type to int. Use
12903 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12904 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12905 pointer. Add status pointer argument. Return a pid instead of a
12906 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12907 changes. In non-stop mode, don't switch to a random thread.
12908 (linux_wait): Rename to...
12909 (linux_wait_1): ... this. Add target_options argument, and handle
12910 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12911 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12912 clean exit and signal exit code. Don't stop all threads in
12913 non-stop mode. In all-stop mode, only stop all threads when
12914 reporting a stop to GDB. Handle explicit thread stop requests.
12915 (async_file_flush, async_file_mark): New.
12917 (send_sigstop): Use lwpid_of.
12918 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12919 interface changes. In non-stop mode, don't switch to a random
12921 (linux_resume_one_lwp): Use lwpid_of.
12922 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12923 (linux_resume_one_thread): ... this. Handle resume_stop. In
12924 non-stop mode, don't look for pending flag in all threads.
12925 (resume_status_pending_p): Don't consider explicitly suspended
12927 (my_waitpid): Reimplement. Emulate __WALL.
12928 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12930 (sigchld_handler, linux_supports_non_stop, linux_async)
12931 (linux_start_non_stop): New.
12932 (linux_target_ops): Register linux_supports_non_stop, linux_async
12933 and linux_start_non_stop.
12934 (initialize_low): Install SIGCHLD handler.
12935 * thread-db.c (thread_db_create_event, find_one_thread)
12936 (thread_db_get_tls_address): Use lwpid_of.
12937 * win32-low.c (win32_detach): Adjust to use resume_kind.
12938 (win32_wait): Add `options' argument.
12939 * spu-low.c (spu_resume): Adjust to use resume_kind.
12940 (spu_wait): Add `options' argument.
12942 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12944 Decouple target code from remote protocol.
12946 * target.h (enum target_waitkind): New.
12947 (struct target_waitstatus): New.
12948 (struct target_ops) <wait>: Return an unsigned long. Take a
12949 target_waitstatus pointer instead of a char pointer.
12950 (mywait): Likewise.
12951 * target.c (mywait): Change prototype to return an unsigned long.
12952 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12953 * server.h (thread_from_wait, old_thread_from_wait): Delete
12955 (prepare_resume_reply): Change prototype to take a
12957 * server.c (thread_from_wait, old_thread_from_wait): Delete.
12958 (last_status, last_ptid): New.
12959 (start_inferior): Remove "statusptr" argument. Adjust. Return a
12960 pid instead of a signal.
12961 (attach_inferior): Remove "status" and "signal" parameters.
12963 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12965 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12966 (handle_v_requests, myresume): Remove "status" and "signal"
12967 parameters. Adjust.
12968 (handle_status): New.
12969 (main): Delete local `status'. Adjust.
12970 * remote-utils.c: Include target.h.
12971 (prepare_resume_reply): Change prototype to take a
12972 target_waitstatus. Adjust.
12974 * linux-low.c (linux_wait): Adjust to new target_ops->wait
12976 * spu-low.c (spu_wait): Adjust.
12977 * win32-low.c (enum target_waitkind, struct target_waitstatus):
12979 (win32_wait): Adjust.
12981 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12983 * target.h (struct thread_resume): Delete leave_stopped member.
12984 (struct target_ops): Add a `n' argument to the `resume' callback.
12985 * server.c (start_inferior): Adjust.
12986 (handle_v_cont, myresume): Adjust.
12987 * linux-low.c (check_removed_breakpoint): Adjust to resume
12988 interface change, and to removed leave_stopped field.
12989 (resume_ptr): Delete.
12990 (struct thread_resume_array): New.
12991 (linux_set_resume_request): Add new `arg' parameter. Adjust to
12992 resume interface change.
12993 (linux_continue_one_thread, linux_queue_one_thread)
12994 (resume_status_pending_p): Check if the resume field is NULL
12995 instead of checking the leave_stopped member.
12996 (linux_resume): Adjust to the target resume interface change.
12997 * spu-low.c (spu_resume): Adjust to the target resume interface
12999 * win32-low.c (win32_detach, win32_resume): Ditto.
13001 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13003 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13005 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13007 (linux_continue_one_thread): Only preserve the stepping flag if
13008 there's a pending breakpoint.
13010 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13012 * server.c (main): After the inferior having exited, call
13013 remote_close before exiting gdbserver.
13015 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13017 Fix size of FPSCR in Power 7 processors.
13018 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13019 (PPC_FEATURE_HAS_DFP): New #define.
13020 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13023 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13025 * server.c (handle_query) Whitespace and formatting.
13027 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13029 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13030 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13031 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13032 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13033 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13034 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13035 Makefile.in, configure.ac: Fix whitespace throughout.
13036 * configure: Regenerate.
13038 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13040 * inferiors.c (find_inferior): Make it safe for the callback
13041 function to delete the currently iterated inferior.
13043 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13045 * Makefile.in (linuw_low_h): Move higher.
13046 (thread-db.o): Depend on $(linux_low_h).
13048 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13050 Rename "process" to "lwp" throughout.
13052 * linux-low.c (all_processes): Rename to...
13053 (all_lwps): ... this.
13054 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13055 (add_process): Rename to ...
13056 (add_lwp): ... this. Adjust.
13057 (linux_create_inferior): Adjust.
13058 (linux_attach_lwp): Adjust.
13059 (linux_attach): Adjust.
13060 (linux_kill_one_process): Rename to ...
13061 (linux_kill_one_lwp): ... this. Adjust.
13062 (linux_kill): Adjust.
13063 (linux_detach_one_process): Rename to ...
13064 (linux_detach_one_lwp): ... this. Adjust.
13065 (linux_detach): Adjust.
13066 (check_removed_breakpoint): Adjust.
13067 (status_pending_p): Adjust.
13068 (linux_wait_for_process): Rename to ...
13069 (linux_wait_for_lwp): ... this. Adjust.
13070 (linux_wait_for_event): Adjust.
13071 (send_sigstop): Adjust.
13072 (wait_for_sigstop): Adjust.
13073 (stop_all_processes): Rename to ...
13074 (stop_all_lwps): ... this.
13075 (linux_resume_one_process): Rename to ...
13076 (linux_resume_one_lwp): ... this. Adjust.
13077 (linux_set_resume_request, linux_continue_one_thread)
13078 (linux_queue_one_thread, resume_status_pending_p)
13079 (usr_store_inferior_registers, regsets_store_inferior_registers)
13080 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13082 * linux-low.h (get_process): Rename to ...
13083 (get_lwp): ... this. Adjust.
13084 (get_thread_process): Rename to ...
13085 (get_thread_lwp): ... this. Adjust.
13086 (get_process_thread): Rename to ...
13087 (get_lwp_thread): ... this. Adjust.
13088 (struct process_info): Rename to ...
13089 (struct lwp_info): ... this.
13090 (all_processes): Rename to ...
13091 (all_lwps): ... this.
13092 * proc-service.c (ps_lgetregs): Adjust.
13093 * thread-db.c (thread_db_create_event, find_one_thread)
13094 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13096 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13098 * server.c (handle_query): Handle "qAttached".
13100 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13102 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13103 GPLv3, update license URL.
13105 2009-03-01 Doug Evans <dje@google.com>
13107 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13108 (server_h): Add gdb_signals.h.
13109 (signals.o): Update.
13110 * server.h (target_signal_from_host,target_signal_to_host_p)
13111 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13113 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13115 * remote-utils.c (getpkt): Also generate remote-debug
13116 information if noack_mode is set.
13118 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13120 * server.c (handle_query): Report qXfer:siginfo:read and
13121 qXfer:siginfo:write as supported and handle them.
13122 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13123 * linux-low.c (linux_xfer_siginfo): New.
13124 (linux_target_ops): Set it.
13126 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13128 * server.c (gdbserver_usage): Mention --remote-debug.
13129 (main): Accept '--remote-debug' switch.
13131 2009-01-18 Doug Evans <dje@google.com>
13133 * regcache.c (new_register_cache): No need to check result of xcalloc.
13134 * server.c (handle_search_memory): Back out calls to xmalloc,
13135 result is checked and error is returned to user upon failure.
13136 (handle_query): Ditto. Add more checks for result of malloc.
13137 (handle_v_cont): Check result of malloc, report error back to
13139 (handle_v_run): Ditto. Call freeargv.
13140 * server.h (freeargv): Declare.
13141 * utils.c (freeargv): New fn.
13143 2009-01-15 Doug Evans <dje@google.com>
13145 * gdbreplay.c (perror_with_name): Make arg const char *.
13146 * server.h (target_signal_to_name): Make return type const char *.
13147 * thread-db.c (thread_db_err_str): Make return type const char *.
13148 * utils.c (perror_with_name): Make arg const char *.
13150 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13152 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13153 when handling a EXIT_PROCESS_DEBUG_EVENT.
13155 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13157 * gdbreplay.c (gdbreplay_version): Update copyright year.
13158 * server.c (gdbserver_version): Likewise.
13160 2009-01-05 Doug Evans <dje@google.com>
13162 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13163 (handle_extended_wait): Improve comment.
13165 2008-12-13 Doug Evans <dje@google.com>
13167 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13168 * server.h (ATTR_MALLOC): New macro.
13169 (xmalloc,xcalloc,xstrdup): Declare.
13170 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13171 * inferiors.c: Ditto.
13172 * linux-low.c: Ditto.
13173 * mem-break.c: Ditto.
13174 * regcache.c: Ditto.
13175 * remote-utils.c: Ditto.
13178 * win32-low.c: Ditto.
13180 2008-12-12 Doug Evans <dje@google.com>
13182 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13183 in debugging printf.
13185 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13187 2008-12-09 Doug Evans <dje@google.com>
13189 * linux-low.h (struct process_info): Delete member tid, unused.
13190 * thread-db.c (find_one_thread): Update.
13191 (maybe_attach_thread): Update.
13193 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13195 * target.h (struct target_ops): Add qxfer_osdata member.
13196 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13198 (linux_qxfer_osdata): New functions.
13199 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13201 * server.c (handle_query): Handle "qXfer:osdata:read:".
13202 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13203 (buffer_xml_printf): New functions.
13204 * server.h (struct buffer): New.
13205 (buffer_grow_str, buffer_grow_str0): New macros.
13206 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13207 (buffer_xml_printf): Declare.
13209 2008-11-24 Doug Evans <dje@google.com>
13211 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13213 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13215 * server.c (handle_v_run): Always use the supplied argument list.
13217 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13219 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13220 (xtensa_regmap_table): Add entry for scompare1.
13222 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13224 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13225 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13226 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13227 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13228 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13229 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13230 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13231 XML target descriptions.
13232 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13233 when inferior is running on an ISA 2.05 or later processor. Add
13234 special case to return offset for full 64-bit slot of FPSCR when
13237 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13239 * Makefile.in (SFILES, clean): Added sparc64 files.
13240 (reg-sparc64.o, reg-sparc64.c): New.
13241 * configure.srv (sparc*-*-linux*): New configuration.
13242 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13243 syscall arguments for SPARC.
13244 (regsets_store_inferior_registers): Likewise.
13245 * linux-sparc-low.c: New file.
13247 2008-10-21 Doug Evans <dje@google.com>
13249 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13250 (READLINE_DIR,READLINE_DEP): Delete.
13251 (INTERNAL_CFLAGS): Update.
13252 (LINTFLAGS): Update.
13254 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13256 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13257 whole argv from the last run, not just argv[0].
13259 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13261 * regcache.c (new_register_cache): Return NULL if the register
13262 cache size isn't known yet.
13263 (free_register_cache): Avoid dereferencing a NULL regcache.
13265 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13267 * configure.srv: Merge MIPS and MIPS64.
13269 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13271 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13273 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13275 * Makefile.in: Add required vsx dependencies.
13277 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13278 Declare init_registers_powerpc_vsx32l.
13279 Declare init_registers_powerpc_vsx64l.
13280 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13281 (ppc_arch_setup): Check for VSX in hwcap.
13282 (ppc_fill_vsxregset): New function.
13283 (ppc_store_vsxregset): New function.
13284 Add new VSX entry in regset_info target_regsets.
13286 * configure.srv: Add new VSX dependencies.
13288 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13290 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13291 (remote_open): Set or clear transport_is_reliable.
13292 (putpkt_binary): Don't expect acks in noack mode.
13293 (getpkt): Don't send ack/nac in noack mode.
13294 * server.c (handle_general_set): Handle QStartNoAckMode.
13295 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13297 (main): Reset noack_mode on every connection.
13298 * server.h (noack_mode): Declare.
13300 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13302 * Makefile.in (GDBREPLAY_OBS): New variable.
13303 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13305 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13306 Daniel Jacobowitz <dan@codesourcery.com>
13308 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13309 (usr_store_inferior_registers): Likewise.
13310 (regsets_store_inferior_registers): Likewise.
13312 2008-07-31 Rolf Jansen <rj@surtec.com>
13313 Pedro Alves <pedro@codesourcery.com>
13315 * configure.ac: Check for memmem declaration.
13316 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13317 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13318 (disable_packet_qfThreadInfo): Unconditionally compile.
13319 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13320 * configure, config.in: Regenerate.
13322 2008-07-28 Doug Kwan <dougkwan@google.com>
13324 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13325 (linux_write_memory): Remove declaration of errno.
13327 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13329 * linux-low.c (handle_extended_wait): Do not use "status"
13330 variable uninitialized.
13332 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13334 * server.c (handle_v_attach): Inhibit reporting dll changes.
13336 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13338 * remote-utils.c (prepare_resume_reply): If requested, don't
13339 output "thread:TID" in the T stop reply.
13341 * server.c (disable_packet_vCont, disable_packet_Tthread)
13342 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13343 (handle_query): If requested, disable support for qC, qfThreadInfo
13345 (handle_v_requests): If requested, disable support for vCont.
13346 (gdbserver_show_disableable): New.
13347 (main): Handle --disable-packet and --disable-packet=LIST.
13349 * server.h (disable_packet_vCont, disable_packet_Tthread)
13350 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13352 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13354 * server.c (gdbserver_usage): Mention --version.
13356 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13358 * Makefile.in (gdbreplay.o): New rule.
13360 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13362 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13363 message, not gdbserver.
13365 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13366 Nathan Sidwell <nathan@codesourcery.com>
13367 Joseph Myers <joseph@codesourcery.com>
13369 * acinclude.m4: Include ../../config/acx.m4.
13370 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13371 * configure, config.in: Regenerate.
13372 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13373 * server.c (gdbserver_version): Print PKGVERSION.
13374 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13375 (main): Adjust gdbserver_usage calls.
13376 * gdbreplay.c (version, host_name): Add declarations.
13377 (gdbreplay_version, gdbreplay_usage): New.
13378 (main): Accept --version and --help options.
13380 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13382 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13383 (arm_breakpoint_at): Handle Thumb.
13384 (the_low_target): Add comment.
13386 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13388 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13390 2008-05-09 Doug Evans <dje@google.com>
13392 * server.h (decode_search_memory_packet): Declare.
13393 * remote-utils.c (decode_search_memory_packet): New fn.
13394 * server.c (handle_search_memory_1): New fn.
13395 (handle_search_memory): New fn.
13396 (handle_query): Process qSearch:memory packets.
13398 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13400 * regcache.c (registers_length): Remove.
13401 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13402 full register packet.
13403 * regcache.h (registers_length): Remove prototype.
13404 * server.h (PBUFSIZ): Define to 16384.
13406 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13408 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13409 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13410 powerpc-64l.o, and powerpc-altivec64l.o.
13411 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13412 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13413 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13414 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13415 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13418 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13419 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13420 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13421 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13422 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13423 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13424 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13425 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13426 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13427 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13430 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13431 (init_registers_powerpc_32l): ... this new prototype.
13432 (init_registers_powerpc_32): Remove, replace by ...
13433 (init_registers_powerpc_altivec32l): ... this new prototype.
13434 (init_registers_powerpc_e500): Remove, replace by ...
13435 (init_registers_powerpc_e500l): ... this new prototype.
13436 (init_registers_ppc64): Remove, replace by ...
13437 (init_registers_powerpc_64l): ... this new prototype.
13438 (init_registers_powerpc_64): Remove, replace by ...
13439 (init_registers_powerpc_altivec64l): ... this new prototype.
13440 (ppc_num_regs): Set to 73.
13441 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13442 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13443 (ppc_cannot_store_register): Handle orig_r3 and trap.
13444 (ppc_arch_setup): Update init_registers_... calls.
13445 (ppc_fill_gregset): Handle orig_r3 and trap.
13447 * inferiors.c (clear_inferiors): Reset current_inferior.
13449 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13451 * acinclude.m4: Add override.m4.
13452 * configure: Regenerate.
13454 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13456 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13457 initial call to init_register_ppc64.
13459 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13461 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13462 single powerpc*-*-linux* case.
13463 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13465 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13467 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13468 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13470 * linux-ppc-low.c: Include <elf.h>.
13471 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13472 (ppc_hwcap): New global variable.
13473 (ppc_regmap): Remove __SPE__ #ifdef sections.
13474 (ppc_regmap_e500): New global variable.
13475 (ppc_cannot_store_register): Update __SPE__ special case.
13476 (ppc_get_hwcap): New function.
13477 (ppc_arch_setup): Use it to determine whether inferior supports
13478 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13479 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13480 Do not access registers if target does not support AltiVec.
13481 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13482 Do not access registers if target does not support SPE.
13483 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13485 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13487 * linux-low.c (disabled_regsets, num_regsets): New.
13488 (use_regsets_p): Delete.
13489 (linux_wait_for_process): Clear disabled_regsets.
13490 (regsets_fetch_inferior_registers): Check and set it.
13491 (regsets_store_inferior_registers): Likewise.
13492 (linux_fetch_registers, linux_store_registers): Do not use
13494 (initialize_low): Allocate disabled_regsets.
13496 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13498 * Makefile.in (LIBOBJS): New.
13499 (OBS): Use LIBOBJS.
13500 (memmem.o): New rule.
13501 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13502 * configure: Regenerated.
13504 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13506 * server.c (handle_query): Never return "unsupported" for
13507 qXfer:features:read queries.
13509 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13511 * server.c (get_features_xml): Fix inverted condition.
13512 (handle_query): Always support qXfer:feature:read.
13514 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13516 * server.c (wrapper_argv): New.
13517 (start_inferior): Handle wrapper_argv. If set, expect an extra
13519 (gdbserver_usage): Document --wrapper.
13520 (main): Parse --wrapper.
13522 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13524 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13525 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13526 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13527 (ppc_set_pc): Likewise.
13528 (ppc_arch_setup): New function.
13529 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13530 of collect_register.
13531 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13533 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13535 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13536 instead of linux-ppc64-low.o.
13537 * linux-ppc64-low.c: Remove file.
13538 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13539 (linux-ppc64-low.o): Remove rule.
13541 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13542 (init_registers_powerpc_64): Likewise.
13543 (ppc_regmap): Conditionally define depending on __powerpc64__.
13544 (ppc_cannot_store_register): Do not special-case "fpscr" when
13545 compiled on __powerpc64__.
13546 (ppc_collect_ptrace_register): New function.
13547 (ppc_supply_ptrace_register): New function.
13548 (ppc_breakpoint): Change type to "unsigned int".
13549 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13550 (the_low_target): Conditionally provide initializers for the
13551 arch_setup member depending on __powerpc64__. Install
13552 collect_ptrace_register and supply_ptrace_register members.
13554 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13556 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13557 * server.c (gdbserver_xmltarget): Define.
13558 (get_features_xml): Use it to replace "target.xml" and arch_string.
13560 * configure.srv: Remove srv_xmltarget. Add XML files that were
13561 mentioned there to srv_xmlfiles instead. Remove conditional tests
13562 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13563 srv_xmlfiles and srv_regobj to include all possible choices.
13564 * configure.ac (srv_xmltarget): Remove.
13565 (srv_xmlfiles): Do not add "target.xml".
13566 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13567 checks for supplementary target information.
13568 * configure: Regenerate.
13569 * Makefile.in (XML_TARGET): Remove.
13570 (target.xml): Remove rule.
13571 (clean): Do not clean up target.xml.
13572 (.PRECIOUS): Do not mention target.xml.
13574 * target.h (struct target_ops): Remove arch_string member.
13575 * linux-low.c (linux_arch_string): Remove.
13576 (linux_target_ops): Remove arch_string initializer.
13577 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13578 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13579 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13580 * spu-low.c (spu_arch_string): Remove.
13581 (spu_target_ops): Remove arch_string initializer.
13582 * win32-low.c (win32_arch_string): Remove.
13583 (win32_target_ops): Remove arch_string initializer.
13584 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13585 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13586 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13588 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13590 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13591 by collect_ptrace_register and supply_ptrace_register hooks.
13592 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13593 instead of checking for the_low_target.left_pad_xfer.
13594 (usr_store_inferior_registers): Use collect_ptrace_register callback
13595 instead of checking for the_low_target.left_pad_xfer.
13597 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13598 (s390_supply_ptrace_register): Likewise.
13599 (s390_fill_gregset): Call s390_collect_ptrace_register.
13600 (the_low_target): Update.
13602 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13603 (ppc_supply_ptrace_register): Likewise.
13604 (the_low_target): Update.
13606 * linux-i386-low.c (the_low_target): Update.
13607 * linux-x86-64-low.c (the_low_target): Update.
13609 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13611 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13612 reg-s390.o and reg-s390x.o.
13614 * linux-low.c (new_inferior): New global variable.
13615 (linux_create_inferior, linux_attach): Set it.
13616 (linux_wait_for_process): Call the_low_target.arch_setup after the
13617 target has stopped for the first time.
13618 (initialize_low): Do not call the_low_target.arch_setup.
13620 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13621 (s390_set_pc): Likewise.
13622 (s390_arch_setup): New function.
13623 (the_low_target): Use s390_arch_setup as arch_setup routine.
13625 * regcache.c (realloc_register_cache): New function.
13626 (set_register_cache): Call it for each existing regcache.
13628 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13630 * server.h (init_registers): Remove prototype.
13632 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13633 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13634 instead of init_registers ().
13635 * linux-arm-low.c (init_registers_arm): Add prototype.
13636 (init_registers_arm_with_iwmmxt): Likewise.
13637 (the_low_target): Add initializer for arch_setup field.
13638 * linux-cris-low.c (init_registers_cris): Add prototype.
13639 (the_low_target): Add initializer for arch_setup field.
13640 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13641 (the_low_target): Add initializer for arch_setup field.
13642 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13643 (the_low_target): Add initializer for arch_setup field.
13644 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13645 (the_low_target): Add initializer for arch_setup field.
13646 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13647 (the_low_target): Add initializer for arch_setup field.
13648 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13649 (the_low_target): Add initializer for arch_setup field.
13650 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13651 (init_registers_mips64_linux): Likewise.
13652 (the_low_target): Add initializer for arch_setup field.
13653 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13654 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13655 (the_low_target): Add initializer for arch_setup field.
13656 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13657 (init_registers_powerpc_64): Likewise.
13658 (the_low_target): Add initializer for arch_setup field.
13659 * linux-s390-low.c (init_registers_s390): Add prototype.
13660 (init_registers_s390x): Likewise.
13661 (the_low_target): Add initializer for arch_setup field.
13662 * linux-sh-low.c (init_registers_sh): Add prototype.
13663 (the_low_target): Add initializer for arch_setup field.
13664 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13665 (the_low_target): Add initializer for arch_setup field.
13666 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13667 (the_low_target): Add initializer for arch_setup field.
13669 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13670 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13671 instead of init_registers ().
13672 * win32-arm-low.c (init_registers_arm): Add prototype.
13673 (the_low_target): Add initializer for arch_setup field.
13674 * win32-i386-low.c (init_registers_i386): Add prototype.
13675 (the_low_target): Add initializer for arch_setup field.
13677 * spu-low.c (init_registers_spu): Add prototype.
13678 (initialize_low): Call initialie_registers_spu () instead of
13679 initialize_registers ().
13681 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13683 * server.c (handle_v_requests): When handling the vRun and vAttach
13684 packets, if already debugging a process, don't kill it. Return an
13687 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13689 * server.c (handle_query): Correct length check.
13691 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13693 * win32-low.c (do_initial_child_stuff): Add process handle
13694 parameter. Set current_process_handle and current_process_id from the
13695 parameters. Clear globals.
13696 (win32_create_inferior): Don't set current_process_handle and
13697 current_process_id here. Instead pass them on the call to
13698 do_initial_child_stuff.
13699 (win32_attach): Likewise.
13700 (win32_clear_inferiors): New.
13701 (win32_kill): Don't close the current process handle or the
13702 current thread handle here. Instead call win32_clear_inferiors.
13703 (win32_detach): Don't open a new handle to the process. Call
13704 win32_clear_inferiors.
13705 (win32_join): Don't rely on current_process_handle; open a new
13706 handle using the process id.
13707 (win32_wait): Call win32_clear_inferiors when the inferior process
13710 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13712 * server.c (monitor_show_help): Add "exit".
13714 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13716 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13717 (clean): Add reg-xtensa.c.
13718 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13719 * configure.srv (xtensa*-*-linux*) New target.
13720 * linux-xtensa-low.c: New.
13721 * xtensa-xtregs.c: New.
13723 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13725 * hostio.c: Don't include errno.h.
13726 (errno_to_fileio_errno): Move to hostio-errno.
13727 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13728 error number outputting to the target->hostio_last_error callback.
13729 (hostio_packet_error): Use FILEIO_EINVAL directly.
13730 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13731 calls to hostio_error.
13732 * hostio-errno.c: New.
13733 * server.h (hostio_last_error_from_errno): Declare.
13734 * target.h (target_ops): Add hostio_last_error member.
13735 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13736 as hostio_last_error handler.
13737 * spu-low.c (spu_target_ops): Likewise.
13738 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13739 (wince_hostio_last_error): New functions.
13740 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13741 as hostio_last_error handler.
13742 (win32_target_ops) [!_WIN32_WCE]: Register
13743 hostio_last_error_from_errno as hostio_last_error handler.
13744 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13745 (hostio-errno.o): New rule.
13746 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13747 * configure.srv (srv_hostio_err_objs): New variable. Default to
13749 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13750 * configure: Regenerate.
13752 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13754 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13755 (linux_kill, linux_detach): Clean up the process list.
13756 * remote-utils.c (remote_open): Improve port number parsing.
13757 (putpkt_binary, input_interrupt): Only send interrupts if the target
13759 * server.c (extended_protocol): Make static.
13760 (attached): Define earlier.
13761 (exit_requested, response_needed, program_argv): New variables.
13762 (target_running): New.
13763 (start_inferior): Clear attached here.
13764 (attach_inferior): Set attached here.
13765 (require_running): Define.
13766 (handle_query): Use require_running and target_running. Implement
13768 (handle_v_attach, handle_v_run): New.
13769 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13770 (gdbserver_usage): Update.
13771 (main): Redo argument parsing. Handle --debug and --multi. Handle
13772 --attach along with other options or after the port. Save
13773 program_argv. Support no initial program. Resynchronize
13774 communication with GDB after an error. Handle "monitor exit".
13775 Use require_running and target_running. Always allow the extended
13776 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13777 restart in extended mode.
13778 * README: Refer to the GDB manual. Update --attach usage.
13780 2007-12-20 Andreas Schwab <schwab@suse.de>
13782 * linux-low.c (STACK_SIZE): Define.
13783 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13784 (linux_test_for_tracefork): Likewise.
13786 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13788 * linux-low.c (linux_wait_for_event): Update messages. Do not
13789 reinsert auto-delete breakpoints.
13790 * mem-break.c (struct breakpoint): Change return type of handler to
13792 (set_breakpoint_at): Update handler type.
13793 (reinsert_breakpoint_handler): Return 1 instead of calling
13795 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13797 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13798 * mem-break.h (set_breakpoint_at): Update handler type.
13799 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13800 * win32-low.c (auto_delete_breakpoint): New.
13801 (get_child_debug_event): Use it.
13803 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13805 * configure.ac: Check for pread and pwrite.
13806 * hostio.c (handle_pread): Fall back to lseek and read.
13807 (handle_pwrite): Fall back to lseek and write.
13808 * config.in, configure: Regenerated.
13810 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13812 * server.c (myresume): Add own_buf argument.
13813 (main): Update calls.
13815 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13817 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13818 * remote-utils.c (remote_open): Do not call disable_async_io.
13819 (block_async_io): Delete.
13820 (unblock_async_io): Make static.
13821 (initialize_async_io): New.
13822 * server.c (handle_v_cont): Handle async I/O here.
13823 (myresume): Likewise. Move other common resume tasks here...
13824 (main): ... from here. Call initialize_async_io. Disable async
13825 I/O before the main loop.
13826 * server.h (initialize_async_io): Declare.
13827 (block_async_io, unblock_async_io): Delete prototypes.
13828 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13830 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13832 * remote-utils.c (readchar): Allow binary data in received messages.
13834 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13836 * win32-low.c (attaching): New global.
13837 (win32_create_inferior): Clear the `attaching' global.
13838 (win32_attach): Set the `attaching' global.
13839 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13840 attaching. Only set a breakpoint at the entry point if not
13843 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13845 * server.c (main): Don't report dll events on the initial
13846 connection on attaches.
13848 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13850 * server.c (main): Relax numerical bases supported for the pid of
13851 the --attach command line argument.
13853 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13855 * win32-low.c (win32_attach): Call OpenProcess before
13856 DebugActiveProcess, not after. Add last error output to error
13859 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13861 * win32-low.c (win32_get_thread_context)
13862 (win32_set_thread_context): New functions.
13863 (thread_rec): Use win32_get_thread_context.
13864 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13865 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13868 2007-12-03 Leo Zayas
13869 Pedro Alves <pedro_alves@portugalmail.pt>
13871 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13873 (child_add_thread): Minor cleanup.
13874 (child_continue): Resume artificially suspended threads before
13875 calling ContinueDebugEvent.
13876 (suspend_one_thread): New.
13877 (fake_breakpoint_event): New.
13878 (get_child_debug_event): Change return type to int. Check here if
13879 gdb sent an interrupt request. If a soft interrupt was requested,
13880 fake a breakpoint event. Return 0 if there is no event to handle,
13882 (win32_wait): Don't check here if gdb sent an interrupt request.
13883 Ensure there is a valid event to handle.
13884 (win32_request_interrupt): Add soft interruption method as last
13887 2007-12-03 Leo Zayas
13888 Pedro Alves <pedro_alves@portugalmail.pt>
13890 * win32-low.h (win32_thread_info): Add descriptions to the
13891 structure members. Replace `suspend_count' counter by a
13893 * win32-low.c (thread_rec): Update condition of when to get the
13894 context from the inferior. Rely on ContextFlags being set if it
13895 has already been retrieved. Only suspend the inferior thread if
13896 we haven't already. Warn if that fails.
13897 (continue_one_thread): s/suspend_count/suspended/. Only call
13898 ResumeThread once. Warn if that fails.
13900 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13902 * win32-low.c (win32_wait): Don't read from the inferior when it
13903 has already exited.
13905 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13907 * Makefile.in (win32_low_h): New variable.
13908 (win32-low.o): Add dependency on $(win32_low_h).
13909 (win32-arm-low.o, win32-i386-low.o): New rules.
13911 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13913 * hostio.c: Correct copyright year.
13915 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13917 * Makefile.in (OBS): Add hostio.o.
13918 (hostio.o): New rule.
13919 * server.h (handle_vFile): Declare.
13920 * hostio.c: New file.
13921 * server.c (handle_v_requests): Take packet_len and new_packet_len
13922 for binary packets. Call handle_vFile.
13923 (main): Update call to handle_v_requests.
13925 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13927 * linux-low.c: Include <sched.h>.
13929 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13931 * linux-low.c (linux_tracefork_grandchild): New.
13932 (linux_tracefork_child): Use clone.
13933 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13935 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13937 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13939 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13941 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13943 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13945 * inferiors.c (change_inferior_id): Delete.
13946 (add_pid_to_list, pull_pid_from_list): New.
13947 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13948 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13949 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13950 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13951 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13952 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13953 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13954 (using_threads): Always set to 1.
13955 (handle_extended_wait): New.
13956 (add_process): Do not set TID.
13957 (linux_create_inferior): Set must_set_ptrace_flags.
13958 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
13959 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
13960 (linux_thread_alive): Rename TID argument to LWPID.
13961 (linux_wait_for_process): Handle unknown processes. Do not use TID.
13962 (linux_wait_for_event): Do not use TID or check using_threads. Update
13963 call to dead_thread_notify. Call handle_extended_wait.
13964 (linux_create_inferior): Use PTRACE_SETOPTIONS.
13965 (send_sigstop): Delete sigstop_sent.
13966 (wait_for_sigstop): Avoid TID.
13967 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13968 (linux_test_for_tracefork): New.
13969 (linux_lookup_signals): Use thread_db_active and
13970 linux_supports_tracefork_flag.
13971 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13972 * linux-low.h (get_process_thread): Avoid TID.
13973 (struct process_ifo): Move thread_known and tid to the end. Remove
13975 (linux_attach_lwp, thread_db_init): Update prototypes.
13976 * server.h (change_inferior_id): Delete prototype.
13977 (add_pid_to_list, pull_pid_from_list): New prototypes.
13978 * thread-db.c (thread_db_use_events): New.
13979 (find_first_thread): Rename to...
13980 (find_one_thread): ...this. Update callers and messages. Do not
13981 call fatal. Check thread_db_use_events. Do not call
13982 change_inferior_id or new_thread_notify.
13983 (maybe_attach_thread): Update. Do not call new_thread_notify.
13984 (thread_db_init): Set thread_db_use_events. Check use_events.
13985 * utils.c (fatal, warning): Correct message prefix.
13987 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
13989 * Makefile.in (clean): Remove new files.
13990 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13991 (powerpc-64.o, powerpc-64.c): New rules.
13992 * configure.srv: Use alternate register sets for powerpc64-*-linux*
13993 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13995 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13997 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13998 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13999 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14000 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14001 (target_regsets): Add AltiVec and SPE register sets.
14002 * configure.ac: Check for AltiVec and SPE.
14003 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14004 (ppc_fill_vrregset, ppc_store_vrregset): New.
14005 (target_regsets): Add AltiVec register set.
14006 * configure: Regenerated.
14008 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14010 * linux-low.c (O_LARGEFILE): Define.
14011 (linux_read_memory): Use /proc/PID/mem.
14012 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14013 * configure, config.in: Regenerated.
14015 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14017 * linux-low.c (linux_wait_for_event): Do not pass signals while
14020 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14022 * win32-low.c (create_process): New.
14023 (win32_create_inferior): Use create_process instead of
14024 CreateProcess. If create_process failed retry appending an ".exe"
14025 suffix. Store the GetLastError result immediatelly after
14026 create_process calls and use it on the call to error.
14028 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14030 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14032 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14034 * configure.ac: Switch license to GPLv3.
14036 2007-08-01 Michael Snyder <msnyder@access-company.com>
14038 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14040 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14042 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14044 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14045 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14046 CloseToolhelp32Snapshot.
14047 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14048 CloseToolhelp32Snapshot.
14050 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14052 * server.c (main): Check for inferior exit before main loop.
14054 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14056 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14057 instead of on tmp_desc.
14059 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14060 Daniel Jacobowitz <dan@codesourcery.com>
14062 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14063 (add_thread): Minor cleanups.
14064 (clear_inferiors): Move lower in the file. Clear the DLL
14066 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14067 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14068 (xml_escape_text): New.
14069 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14071 (handle_v_cont): Report errors.
14072 (gdbserver_version): Update.
14073 (main): Correct size of own_buf. Do not report initial DLL events.
14074 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14075 (unloaded_dll, xml_escape_text): New.
14076 * win32-low.c (enum target_waitkind): Update comments.
14077 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14078 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14079 (win32_EnumProcessModules, win32_GetModuleInformation)
14080 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14081 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14082 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14083 (win32_Module32First, win32_Module32Next, load_toolhelp)
14084 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14085 (get_child_debug_event): Handle DLL events.
14086 (win32_wait): Likewise.
14088 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14090 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14091 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14093 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14095 * win32-low.c (handle_output_debug_string): Ignore event if not
14098 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14100 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14102 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14104 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14106 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14108 * inferiors.c (change_inferior_id): Add comment.
14109 * linux-low.c (check_removed_breakpoint): Add an early
14110 prototype. Improve debug output.
14111 (linux_attach): Doc update.
14112 (linux_detach_one_process, linux_detach): Clean up before releasing
14114 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14115 * linux-low.h (struct process_info): Doc improvement.
14116 * mem-break.c (delete_all_breakpoints): New.
14117 * mem-break.h (delete_all_breakpoints): New prototype.
14118 * thread-db.c (find_first_thread): New.
14119 (thread_db_create_event): Call it instead of
14120 thread_db_find_new_threads. Clean up unused variables.
14121 (maybe_attach_thread): Remove first thread handling.
14122 (thread_db_find_new_threads): Use find_first_thread.
14123 (thread_db_get_tls_address): Likewise.
14125 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14127 * thread-db.c (thread_db_find_new_threads): Add prototype.
14128 (thread_db_create_event): Check for the main thread before adding
14130 (maybe_attach_thread): Only enable event reporting if TID == 0.
14131 (thread_db_get_tls_address): Check for new threads.
14133 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14135 * linux-low.c (linux_create_inferior): Try execv before execvp.
14136 * spu-low.c (spu_create_inferior): Likewise.
14138 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14140 * linux-low.c (linux_create_inferior): Change execv to execvp.
14141 * spu-low.c (spu_create_inferior): Likewies.
14143 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14145 * Makefile.in (clean): Clean new files instead of deleted ones.
14146 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14147 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14149 * configure.srv: Specify XML files and new regformats for MIPS and
14151 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14152 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14153 an entry for the restart register.
14154 (mips_cannot_fetch_register, mips_cannot_store_register)
14155 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14156 register names to match the XML descriptions.
14157 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14158 restart register instead of $0.
14160 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14161 Markus Deuling <deuling@de.ibm.com>
14163 * remote-utils.c (decode_xfer_write): New function.
14164 * server.h (decode_xfer_write): Add prototype.
14165 * server.c (handle_query): Add PACKET_LEN argument. Support
14166 qXfer:spu:read and qXfer:spu:write packets.
14167 (main): Pass packet_len to handle_query.
14168 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14169 * target.h (target_ops): Add qxfer_spu.
14171 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14173 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14174 accessing non-seekable spufs files.
14176 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14178 * server.c (handle_query): Add reply for qC packet.
14180 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14181 Leo Zayas <lerele@champenstudios@com>
14183 * server.h (check_remote_input_interrupt_request): New function.
14184 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14185 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14186 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14187 (check_remote_input_interrupt_request): New function.
14188 * server.h (check_remote_input_interrupt_request): Declare.
14189 * win32-low.c (winapi_DebugBreakProcess,
14190 winapi_GenerateConsoleCtrlEvent): New typedefs.
14191 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14193 (win32_wait): Check for remote interrupt request
14194 with check_remote_input_interrupt_request.
14195 (win32_request_interrupt): New function.
14196 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14198 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14200 * win32-low.c (debug_registers_changed,
14201 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14202 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14203 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14204 (thread_rec): Get context using the low target.
14205 (child_add_thread): Call thread_added on the low target,
14206 which does the same thing.
14208 (do_initial_child_stuff): Remove debug registers references.
14209 Set context using the low target. Resume threads after
14210 setting the contexts.
14211 (child_continue): Remove dead variable. Remove debug
14212 registers references.
14213 (child_fetch_inferior_registers): Go through the low target.
14214 (do_child_store_inferior_registers): Remove.
14215 (child_store_inferior_registers): Go through the low target.
14216 (win32_resume): Remove debug registers references.
14217 Set context using the low target.
14218 (handle_exception): Change return type to void. Don't record
14219 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14220 first chance exception.
14221 (get_child_debug_event): Change return type to void. Remove
14222 goto loop. Always return after waiting for debug event.
14223 (win32_wait): Convert to switch statement. Handle spurious
14226 * win32-i386-low.c (debug_registers_changed,
14227 debug_registers_used): New.
14228 (initial_stuff): Rename to ...
14229 (i386_initial_stuff): ... this. Clear debug registers
14231 (store_debug_registers): Delete.
14232 (i386_get_thread_context): New.
14233 (load_debug_registers): Delete.
14234 (i386_set_thread_context): New.
14235 (i386_thread_added): New.
14236 (single_step): Rename to ...
14237 (i386_single_step): ... this.
14238 (do_fetch_inferior_registers): Rename to ...
14239 (i386_fetch_inferior_register): ... this.
14240 (i386_store_inferior_register): New.
14241 (the_low_target): Adapt to new interface.
14243 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14244 (arm_get_thread_context): New.
14245 (arm_set_thread_context): New.
14247 (do_fetch_inferior_registers): Rename to ...
14248 (arm_fetch_inferior_register): ... this.
14249 (arm_store_inferior_register): New.
14250 (arm_wince_breakpoint): Reimplement as unsigned long.
14251 (arm_wince_breakpoint_len): Define.
14252 (the_low_target): Adapt to new interface.
14254 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14255 load_debug_registers. Add get_thread_context, set_thread_context,
14256 thread_added and store_inferior_register. Rename
14257 fetch_inferior_registers to fetch_inferior_register.
14258 (regptr): Remove declaration.
14260 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14262 * linux-low.c (linux_detach): Change return type to int. Return 0.
14263 * spu-low.c (spu_detach): Likewise.
14265 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14267 * target.h (target_ops): Change return type of detach to int.
14269 (join_inferior): New.
14270 * server.c (main): Don't skip detach support on mingw32.
14271 If the inferior doesn't support detaching return error.
14272 Call join_inferior instead of using waitpid.
14273 * linux-low.c (linux_join): New.
14274 (linux_target_op): Add linux_join.
14275 * spu-low.c (spu_join): New.
14276 (spu_target_ops): Add spu_join.
14277 * win32-low.c (win32_detach): Adapt to new interface.
14278 Reopen current_process_handle before detaching. Issue a child
14279 resume before detaching.
14281 (win32_target_op): Add win32_join.
14283 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14285 * win32-low.c (win32-attach): Fix return value.
14286 * target.h (target_ops): Describe ATTACH return values.
14288 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14290 * win32-low.c (GETPROCADDRESS): Define.
14291 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14292 (winapi_DebugSetProcessKillOnExit): Likewise.
14293 (win32_create_inferior): Force usage of ansi CreateProcessA.
14294 (win32_attach): Use GETPROCADDRESS.
14295 (win32_detach): Likewise.
14297 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14299 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14301 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14303 * win32-low.c: Commit leftover changes from 2007-03-29.
14305 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14307 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14308 fields short instead of int. Add explicit padding.
14309 (i387_cache_to_fsave): Remove unnecessary casts.
14310 (i387_fsave_to_cache): Doc fix.
14311 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14313 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14315 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14316 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14318 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14320 * configure.srv (arm*-*-mingw32ce*): Move near the other
14323 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14325 * configure.ac: Add errno checking.
14326 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14327 sys/file.h and malloc.h.
14328 (AC_CHECK_DECLS): Add perror.
14329 (srv_mingwce): Handle.
14330 * configure.srv (i[34567]86-*-cygwin*): Add
14331 win32-i386-low.o to srv_tgtobj.
14332 (i[34567]86-*-mingw*): Likewise.
14333 (arm*-*-mingw32ce*): Add case.
14334 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14335 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14336 [__MINGW32CE__] (strerror): New function.
14337 [__MINGW32CE__] (errno): Define to GetLastError.
14338 [__MINGW32CE__] (COUNTOF): New macro.
14339 (remote_open): Remove extra close call.
14340 * mem-break.c (delete_breakpoint_at): New function.
14341 * mem-break.h (delete_breakpoint_at): Declare.
14342 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14343 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14344 [USE_WIN32API] (read, write): Add char* casts.
14345 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14346 * server.h: Include wincecompat.h on Windows CE.
14347 [HAVE_ERRNO_H]: Check.
14348 (perror): Declare if not declared.
14349 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14350 (perror_with_name): Remove errno declaration.
14351 * wincecompat.h: New.
14352 * wincecompat.c: New.
14353 * win32-low.h: New.
14354 * win32-arm-low.c: New.
14355 * win32-i386-low.c: New.
14356 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14357 (OUTMSG2): Make it safe.
14359 (COUNTOF): New macro.
14360 (NUM_REGS): Get it from the low target.
14361 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14362 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14363 (thread_rec): Let low target handle debug registers.
14364 (child_add_thread): Likewise.
14365 (child_init_thread_list): Likewise.
14366 (continue_one_thread): Likewise.
14368 (do_child_fetch_inferior_registers): Move to ...
14369 * win32-i386-low.c: ... here, and rename to ...
14370 (do_fetch_inferior_registers): ... this.
14371 * win32-low.c (child_fetch_inferior_registers):
14372 Go through the low target.
14373 (do_child_store_inferior_registers): Use regptr.
14374 (strwinerror): New function.
14375 (win32_create_inferior): Handle Windows CE.
14376 Use strwinerror instead of strerror on Windows error
14377 codes. Add program to the error output.
14378 Don't close the main thread handle on Windows CE.
14379 (win32_attach): Use coredll.dll on Windows CE.
14380 (win32_kill): Close current process and current
14382 (win32_detach): Use coredll.dll on Windows CE.
14383 (win32_resume): Let low target handle debug registers, and
14385 (handle_exception): Add/Remove initial breakpoint. Avoid
14386 non-existant WSTOPSIG on Windows CE.
14387 (win32_read_inferior_memory): Cast to remove warning.
14388 (win32_arch_string): Go through the low target.
14389 (initialize_low): Call set_breakpoint_data with the low
14390 target's breakpoint.
14391 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14392 FOP_REGNUM, mappings): Move to ...
14393 * win32-i386-low.c: ... here.
14394 * win32-low.c (win32_thread_info): Move to ...
14395 * win32-low.h: ... here.
14396 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14397 win32-arm-low.c and wincecompat.c.
14398 (all:): Add $EXEEXT.
14399 (install-only:): Likewise.
14400 (gdbserver:): Likewise.
14401 (gdbreplay:): Likewise.
14402 * config.in: Regenerate.
14403 * configure: Regenerate.
14405 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14407 * win32-low.c: Rename typedef thread_info to
14408 win32_thread_info throughout.
14410 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14412 * win32-i386-low.c: Rename to ...
14413 * win32-low.c: ... this.
14414 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14415 * Makefile.in: Likewise.
14417 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14419 * remote-utils.c (monitor_output): Constify msg parameter.
14420 * server.h (monitor_output): Likewise.
14421 * win32-i386-low.c (handle_output_debug_string): New.
14422 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14423 handle_output_debug_string.
14424 (get_child_debug_event): Likewise.
14426 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14428 * server.c (main): Correct strtoul check.
14430 2007-03-27 Jon Ringle <jon@ringle.org>
14432 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14434 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14436 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14438 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14440 * terminal.h: Check HAVE_SGTTY_H.
14442 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14444 * remote-utils.c (remote_open): Print out the assigned port number.
14446 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14448 * remote-utils.c (monitor_output): New function.
14449 * server.c (debug_threads): Define here.
14450 (monitor_show_help): New function.
14451 (handle_query): Handle qRcmd.
14452 (main): Do not handle 'd' packet.
14453 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14454 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14457 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14459 * Makefile.in (EXEEXT): New.
14460 (clean): Use $(EXEEXT).
14462 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14464 * target.h (target_ops): Rename send_signal to request_interrupt,
14465 and remove enum target_signal parameter.
14466 * linux-low.c (linux_request_interrupt): Rename from
14467 linux_send_signal, and always send SIGINT.
14468 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14469 and always send SIGINT.
14470 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14472 (input_interrupt): Likewise.
14474 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14476 * server.c (get_features_xml): Check if target implemented
14478 * win32-i386-low.c (win32_arch_string): New.
14479 (win32_target_ops): Add win32_arch_string as arch_string member.
14481 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14483 * spu-low.c (spu_arch_string): New.
14484 (spu_target_ops): Add spu_arch_string.
14486 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14488 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14489 * configure.ac: Do not check for terminal.h.
14490 * configure, config.in: Regenerated.
14492 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14494 * Makefile.in (OBS): Add $(XML_BUILTIN).
14495 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14497 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14498 (arm-with-iwmmxt.c): New.
14499 * config.in, configure: Regenerate.
14500 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14501 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14502 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14503 (arm*-*-linux*): Add iWMMXt and regset support.
14504 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14505 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14506 (arm_store_wmmxregset, target_regsets): New.
14507 * server.c (get_features_xml): Take annex argument. Check builtin
14509 (handle_query): Handle multiple annexes.
14511 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14513 * remote-utils.c [USE_WIN32API] (read, write): Define.
14514 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14517 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14519 * linux-i386-low.c (the_low_target): Set arch_string.
14520 * linux-x86-64-low.c (the_low_target): Likewise.
14521 * linux-low.c (linux_arch_string): New.
14522 (linux_target_ops): Add it.
14523 * linux-low.h (struct linux_target_ops): Add arch_string.
14524 * server.c (write_qxfer_response): Use const void * for DATA.
14525 (get_features_xml): New.
14526 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14527 * target.h (struct target_ops): Add arch_string method.
14529 2007-01-03 Denis Pilat <denis.pilat@st.com>
14530 Daniel Jacobowitz <dan@codesourcery.com>
14532 * linux-low.c (linux_kill): Handle being called with no threads.
14533 * win32-i386-low.c (win32_kill): Likewise.
14534 (get_child_debug_event): Clear current_process_handle.
14536 2006-12-30 Denis PILAT <denis.pilat@st.com>
14537 Daniel Jacobowitz <dan@codesourcery.com>
14539 * remote-utils.c (remote_open): Check the type of specified
14540 serial port devices before opening them.
14541 * server.c (main): Kill the inferior if an error occurs during
14542 the first remote_open.
14544 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14546 * README: Update supported targets.
14548 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14550 * Makefile.in (clean): Remove reg-mips64.c.
14551 (reg-mips64.c, reg-mips64.o): New rules.
14552 * configure.srv: Handle mips64. Include regset support for mips.
14553 * linux-mips-low.c (union mips_register): New.
14554 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14555 (mips_breakpoint, mips_breakpoint_at): Use int.
14556 (mips_collect_register, mips_supply_register)
14557 (mips_collect_register_32bit, mips_supply_register_32bit)
14558 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14559 (mips_store_fpregset, target_regsets): New.
14560 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14562 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14564 * configure.srv: Add target "spu*-*-*".
14565 * Makefile.in (clean): Remove reg-spu.c.
14566 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14567 * spu-low.c: New file.
14569 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14571 * configure.ac: Correct td_thr_tls_get_addr test.
14572 * configure: Regenerated.
14574 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14576 * linux-low.c (linux_wait_for_event): Reformat. Use the
14577 pass_signals array.
14578 * remote-utils.c (decode_address_to_semicolon): New.
14579 * server.c (pass_signals, handle_general_set): New.
14580 (handle_query): Mention QPassSignals for qSupported.
14581 (main): Call handle_general_set.
14582 * server.h (pass_signals, decode_address_to_semicolon): New.
14584 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14586 * server.c (handle_query): Correct error handling for read_auxv.
14588 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14590 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14591 and srv_linux_thread_db to yes.
14592 * linux-s390-low.c (s390_fill_gregset): New function.
14593 (target_regsets): Define data structure.
14595 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14597 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14598 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14599 * config.in, configure: Regenerated.
14600 * inferiors.c (gdb_id_to_thread): New function.
14601 (gdb_id_to_thread_id): Use it.
14602 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14603 * linux-low.h (struct process_info): Add th member.
14604 (thread_db_get_tls_address): New prototype.
14605 * remote-utils.c (decode_address): Make non-static.
14606 * server.c (handle_query): Handle qGetTLSAddr.
14607 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14608 * target.h (struct target_ops): Add get_tls_address.
14609 * thread-db.c (maybe_attach_thread): Save the thread handle.
14610 (thread_db_get_tls_address): New.
14612 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14614 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14615 (linux_resume_one_process): Take a siginfo_t *. Update all
14616 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14617 (struct pending_signals): Add a siginfo_t.
14618 (linux_wait_for_process): Always set last_status.
14619 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14620 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14621 * linux-low.h (struct process_info): Add last_status.
14623 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14625 * remote-utils.c (try_rle): New function.
14626 (putpkt_binary): Use it.
14628 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14630 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14631 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14632 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14633 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14634 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14637 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14639 * server.c (terminal_fd): New variable.
14640 (old_foreground_pgrp): Likewise.
14641 (restore_old_foreground_pgrp): New function.
14642 (start_inferior): Record the terminal file descriptor in terminal_fd
14643 and its original foreground group in old_foreground_pgrp. Register
14644 restore_old_foreground_pgrp with atexit().
14646 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14648 * server.c (handle_query): Correct qPart to qXfer.
14650 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14652 * configure.ac: Check for more headers which are missing on
14653 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14654 * configure.srv: Add Cygwin and mingw32.
14655 * remote-utils.c: Don't include headers unconditionally which
14656 are missing on mingw32. Include <winsock.h> for mingw32.
14657 (remote_open): Adjust for mingw32 support. Flush
14658 standard error after writing to it.
14659 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14660 (unblock_async_io, enable_async_io, disable_async_io)
14661 (readchar, getpkt): Update for Winsock support.
14662 (prepare_resume_reply): Expect a protocol signal number.
14663 * server.c: Disable <sys/wait.h> on mingw32.
14664 (start_inferior): Adjust for mingw32 support. Flush
14665 standard error after writing to it.
14666 (attach_inferior): Likewise. Use protocol signal
14668 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14670 * win32-i386-low.c: New file.
14671 * Makefile.in (XM_CLIBS): Set.
14672 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14673 (win32-i386-low.o): New dependency rule.
14674 * linux-low.c (linux_wait): Use target signal numbers.
14675 * target.h (struct target_ops): Doc fix.
14676 * server.h (target_signal_to_name): New prototype.
14677 * gdbreplay.c: Don't include headers unconditionally which
14678 are missing on mingw32. Include <winsock.h> for mingw32.
14679 (remote_close, remote_open): Adjust for Winsock support.
14680 * configure, config.in: Regenerated.
14682 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14684 * server.c (decode_xfer_read, write_qxfer_response): New.
14685 (handle_query): Take a packet length argument. Handle
14686 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14687 the qSupported response.
14688 (main): Update call to handle_query.
14690 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14692 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14693 (putpkt_binary): Renamed from putpkt and adjusted for binary
14695 (putpkt): New wrapper for putpkt_binary.
14696 (readchar): Don't mask off the high bit.
14697 (decode_X_packet): New function.
14698 * server.c (main): Call putpkt_binary if a handler sets the packet
14699 length. Save the length of the incoming packet. Handle 'X'.
14700 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14702 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14704 * server.c (handle_query): Handle qSupported.
14706 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14708 * remote-utils.c (all_symbols_looked_up): New variable.
14709 (look_up_one_symbol): Check it.
14710 * server.h (look_up_one_symbol): New declaration.
14711 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14713 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14715 * Makefile.in (linux-arm-low.o): Update dependencies.
14716 * linux-arm-low.c: Include "gdb_proc_service.h".
14717 (PTRACE_GET_THREAD_AREA): Define.
14718 (ps_get_thread_area): New function.
14720 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14722 * configure.srv (m68k*-*-uclinux*): New target.
14723 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14724 (linux_resume_one_process): Remove extraneous cast.
14725 (linux_read_offsets): New.
14726 (linux_target_op): Add linux_read_offsets on mmuless systems.
14727 * server.c (handle_query): Add qOffsets logic.
14728 * target.h (struct target_ops): Add read_offsets.
14730 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14732 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14733 (PTRACE_GET_THREAD_AREA): Define.
14734 (ps_get_thread_area): New function.
14735 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14736 (linux-x86-64-low.o): Update.
14738 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14740 * configure.ac: Remove checks for prfpregset_t.
14741 * gdb_proc_service.h: New file.
14742 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14743 new "gdb_proc_service.h".
14744 * proc-service.c: Likewise.
14745 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14746 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14747 * Makefile.in (gdb_proc_service_h): Updated.
14748 * configure, config.in: Regenerated.
14750 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14752 * remote-utils.c (prepare_resume_reply): Move declaration
14753 of gdb_id_from_wait to the top of the block.
14755 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14757 * linux-low.c (regsets_store_inferior_registers): Read the regset
14758 from the target before filling it.
14760 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14762 * server.c (attach_inferior): Return SIGTRAP for a successful
14765 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14767 * Makefile.in (OBS): Add version.o.
14768 (STAGESTUFF): Delete.
14769 (version.o): Add dependencies.
14770 (version.c): Replace rule.
14771 (clean): Remove version.c.
14772 * server.c (gdbserver_version): New.
14773 (gdbserver_usage): Use printf.
14774 (main): Handle --version and --help.
14775 * server.h (version, host_name): Add declarations.
14777 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14789 * linux-x86-64-low.c:
14791 * linux-s390-low.c:
14792 * linux-ppc64-low.c:
14794 * linux-mips-low.c:
14795 * linux-m68k-low.c:
14796 * linux-m32r-low.c:
14799 * linux-ia64-low.c:
14800 * linux-i386-low.c:
14801 * linux-crisv32-low.c:
14813 * gdbserver.1: Add (C) after Copyright. Update the FSF
14816 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14818 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14819 (arm_breakpoint_at): Recognize both breakpoints.
14820 (the_low_target): Use the correct breakpoint instruction.
14822 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14824 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14825 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14826 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14827 (the_low_target): Update.
14829 2005-10-25 Andreas Schwab <schwab@suse.de>
14831 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14833 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14834 (ia64_num_regs): Reduce to 462.
14836 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14838 * acinclude.m4: Correct quoting.
14839 * aclocal.m4: Regenerated.
14841 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14842 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14843 (thread_db_init): Call thread_db_err_str.
14844 * configure.ac: Check for TD_VERSION.
14845 * config.in, configure: Regenerated.
14847 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14849 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14851 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14853 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14854 is not available. Define HAVE_PTRACE_GETREGS if it is.
14855 * config.in, configure: Regenerated.
14856 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14857 * linux-i386-low.c, linux-m68k-low.c: Update to use
14858 HAVE_PTRACE_GETREGS.
14859 * linux-low.c (regsets_fetch_inferior_registers)
14860 (regsets_store_inferior_registers): Only return 0 if we processed
14862 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14863 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14865 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14867 * inferiors.c (struct thread_info): Add gdb_id.
14868 (add_thread): Add gdb_id argument.
14869 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14870 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14871 calls to add_thread.
14872 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14873 * server.c (handle_query): Use thread_to_gdb_id.
14874 (handle_v_cont, main): Use gdb_id_to_thread_id.
14875 * server.h (add_thread): Update prototype.
14876 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14879 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14881 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14882 left-padded registers.
14883 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14884 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14886 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14888 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14889 * configure: Regenerate.
14890 * config.in: Regenerate.
14891 * server.h (NEED_DECLARATION_STRERROR):
14892 Replace with !HAVE_DECL_STRERROR.
14894 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14896 * linux-low.c (linux_wait, linux_send_signal): Don't test
14897 an unsigned long variable for > 0 if it could be MAX_ULONG.
14898 * server.c (myresume): Likewise.
14899 * target.c (set_desired_inferior): Likewise.
14901 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14903 * configure.ac: Simplify and improve check for socklen_t.
14904 * configure, config.in: Regenerate.
14906 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14908 * acconfig.h: Remove.
14909 * configure.ac: Add a test for socklen_t. Use three-argument
14910 AC_DEFINE throughout.
14911 * config.in: Regenerated using autoheader 2.59.
14912 * configure: Regenerated.
14914 * gdbreplay.c (socklen_t): Provide a default.
14915 (remote_open): Use socklen_t.
14916 * remote-utils.c (socklen_t): Provide a default.
14917 (remote_open): Use socklen_t.
14918 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14921 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14923 * linux-low.c (linux_read_memory, linux_write_memory)
14924 (linux_read_auxv): Likewise.
14925 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14926 (check_mem_write): Likewise.
14927 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14929 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14930 (registers_from_string, register_data): Likewise.
14931 * server.c (handle_query, main): Likewise.
14932 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14933 (decode_M_packet): Likewise.
14934 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14935 * target.h (struct target_ops): Update read_memory, write_memory,
14937 (read_inferior_memory, write_inferior_memory): Update.
14938 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14939 to unsigned char *.
14940 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14941 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14942 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14943 linux-s390-low.c, linux-sh-low.c: Update for changes in
14944 read_inferior_memory and the_low_target->breakpoint.
14946 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14948 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14949 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14950 * configure.srv: Add powerpc64-*-linux*.
14951 * linux-ppc64-low.c: New file.
14953 2005-05-23 Orjan Friberg <orjanf@axis.com>
14955 * linux-cris-low.c: New file with support for CRIS.
14956 * linux-crisv32-low.c: Ditto for CRISv32.
14957 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14958 (clean): Add reg-cris.c and reg-crisv32.c.
14959 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14960 reg-crisv32.o, and reg-crisv32.c to make rules.
14961 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14962 recognized targets.
14964 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
14966 * linux-low.c (fetch_register): Ensure buffer size is a multiple
14967 of sizeof (PTRACE_XFER_TYPE).
14968 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
14970 2005-05-12 Orjan Friberg <orjanf@axis.com>
14972 * target.h (struct target_ops): Add insert_watchpoint,
14973 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14974 pointers for hardware watchpoint support.
14975 * linux-low.h (struct linux_target_ops): Ditto.
14976 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14977 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
14978 to linux_target_ops.
14979 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14981 * server.c (main): Recognize 'Z' and 'z' packets.
14983 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
14985 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14986 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14987 (the_low_target): Add new members.
14989 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14991 * proc-service.c (ps_lgetregs): Search all_processes instead of
14994 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
14996 * server.c (start_inferior): Change return type to int.
14997 (attach_inferior): Change sigptr to int *.
14998 (handle_v_cont, handle_v_requests): Change signal to int *.
14999 (main): Change signal to int.
15001 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15003 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15004 * configure.srv: Add m32r*-*-linux*.
15005 * linux-m32r-low.c: New file.
15007 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15009 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15011 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15013 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15014 Take unsigned long arguments for PIDs.
15015 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15016 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15017 (wait_for_sigstop, linux_resume_one_process)
15018 (regsets_fetch_inferior_registers, linux_send_signal)
15019 (linux_read_auxv): Likewise. Update the types of variables holding
15020 PIDs. Update format string specifiers.
15021 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15022 * remote-utils.c (prepare_resume_reply): Likewise.
15023 * server.c (cont_thread, general_thread, step_thread)
15024 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15026 (handle_query): Update format specifiers.
15027 (handle_v_cont, main): Use strtoul for thread IDs.
15028 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15029 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15030 (general_thread, step_thread, thread_from_wait)
15031 (old_thread_from_wait): Update.
15032 * target.h (struct thread_resume): Use unsigned long for THREAD.
15033 (struct target_ops): Use unsigned long for arguments to attach and
15036 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15038 * acinclude.m4: Include bfd/bfd.m4 directly.
15039 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15040 <agriffis@toolchain.org>.
15041 * aclocal.m4, configure: Regenerated.
15043 2005-01-07 Andrew Cagney <cagney@gnu.org>
15045 * configure.ac: Rename configure.in, require autoconf 2.59.
15046 * configure: Re-generate.
15048 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15050 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15051 LIBS when finished.
15052 * aclocal.m4: Regenerated.
15053 * configure: Regenerated.
15055 2004-11-21 Andreas Schwab <schwab@suse.de>
15057 * linux-m68k-low.c (m68k_num_gregs): Define.
15058 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15059 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15060 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15061 (m68k_breakpoint_at): New. Add to the_low_target.
15063 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15064 srv_linux_thread_db to yes.
15066 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15068 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15069 (ARCH_SET_FS): Likewise.
15070 (ARCH_GET_FS): Likewise.
15071 (ARCH_GET_GS): Likewise.
15073 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15075 * linux-i386-low.c (ps_get_thread_area): New.
15076 * linux-x86-64-low.c (ps_get_thread_area): New.
15077 * linux-low.c: Include <sys/syscall.h>.
15078 (linux_kill_one_process): Don't kill the first thread here.
15079 (linux_kill): Kill the first thread here.
15080 (kill_lwp): New function.
15081 (send_sigstop, linux_send_signal): Use it.
15082 * proc-service.c: Clean up #ifdefs.
15083 (fpregset_info): Delete.
15084 (ps_lgetregs): Update and enable implementation.
15085 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15087 * remote-utils.c (struct sym_cache, symbol_cache): New.
15088 (input_interrupt): Print a clearer message.
15089 (async_io_enabled): New variable.
15090 (enable_async_io, disable_async_io): Use it. Update comments.
15091 (look_up_one_symbol): Use the symbol cache.
15092 * thread-db.c (thread_db_look_up_symbols): New function.
15093 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15095 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15097 * configure.in: Test for -rdynamic.
15098 * configure: Regenerated.
15099 * Makefile (INTERNAL_LDFLAGS): New.
15100 (gdbserver, gdbreplay): Use it.
15102 2004-09-02 Andrew Cagney <cagney@gnu.org>
15104 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15106 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15108 * linux-low.c (linux_wait): Clear all_processes list also.
15110 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15112 * linux-low.c: Include <errno.h>. Remove extern declaration of
15115 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15117 * gdbreplay.c, server.h, utils.c: Update copyright years.
15119 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15121 * server.c (main): Print child status or termination signal from
15122 variable 'signal', not 'sig'.
15124 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15126 * linux-low.c (linux_read_memory): Change return type to
15127 int. Check for and return error from ptrace().
15128 * target.c (read_inferior_memory): Change return type to int. Pass
15129 back return status from the_target->read_memory().
15130 * target.h (struct target_ops): Adapt *read_memory() prototype.
15132 (read_inferior_memory): Adapt prototype.
15133 * server.c (main): Return an error packet if
15134 read_inferior_memory() returns an error.
15136 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15138 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15139 Unify with other clean targets.
15141 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15143 * server.c (handle_v_cont): Call set_desired_inferior.
15145 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15147 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15149 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15151 * linux-low.c (linux_wait): Unblock async I/O.
15152 (linux_resume): Block and enable async I/O.
15153 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15154 * server.h (block_async_io, unblock_async_io): Add prototypes.
15156 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15158 * remote-utils.c (remote_open): Print a status notice after
15159 opening a TCP port.
15160 * server.c (attach_inferior): Print a status notice after
15163 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15165 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15167 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15169 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15171 * server.c, target.h: Update copyright years.
15173 2004-02-25 Roland McGrath <roland@redhat.com>
15175 * target.h (struct target_ops): New member `read_auxv'.
15176 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15177 * linux-low.c (linux_read_auxv): New function.
15178 (linux_target_ops): Initialize `read_auxv' member to that.
15180 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15182 Committed by Jim Blandy <jimb@redhat.com>.
15184 * linux-s390-low.c (s390_num_regs): Update.
15185 (s390_regmap): Remove control registers. Use __s390x__ predefine
15186 instead of GPR_SIZE to distiguish s390 and s390x targets.
15188 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15190 * linux-low.c: Update copyright year.
15191 (check_removed_breakpoint): Clear pending_is_breakpoint.
15192 (linux_set_resume_request, linux_queue_one_thread)
15193 (resume_status_pending_p): New functions.
15194 (linux_continue_one_thread): Use process->resume.
15195 (linux_resume): Only resume threads if there are no pending events.
15196 * linux-low.h (struct process_info): Add resume request
15199 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15201 * regcache.c (new_register_cache): Clear the allocated register
15202 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15204 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15206 * linux-low.c (linux_resume): Take a struct thread_resume *
15208 (linux_wait): Update call.
15209 (resume_ptr): New static variable.
15210 (linux_continue_one_thread): Renamed from
15211 linux_continue_one_process. Use resume_ptr.
15212 (linux_resume): Use linux_continue_one_thread.
15213 * server.c (handle_v_cont, handle_v_requests): New functions.
15214 (myresume): New function.
15215 (main): Handle 'v' case.
15216 * target.h (struct thread_resume): New type.
15217 (struct target_ops): Change argument of "resume" to struct
15219 (myresume): Delete macro.
15221 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15223 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15224 (uninstall): Support DESTDIR.
15226 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15228 * configure.srv: Add xscale*linux copy of arm*linux entry.
15230 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15232 * linux-arm-low.c (arm_reinsert_addr): New function.
15233 (the_low_target): Add arm_reinsert_addr.
15235 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15237 * mem-break.c: Remove whitespace at end of file.
15239 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15241 * configure.in: Check whether we need to prototype strerror.
15242 * server.h: Optionally prototype strerror.
15243 * gdbreplay.c (perror_with_name): Use strerror.
15244 * linux-low.c (linux_attach_lwp): Use strerror.
15245 * utils.c (perror_with_name): Use strerror.
15246 * config.in, configure: Regenerated.
15248 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15250 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15251 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15253 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15255 * Makefile.in (SFILES): Update.
15256 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15257 low-sun3.c: Remove files.
15259 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15261 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15262 (linux_detach_one_process, linux_detach): New functions.
15263 (linux_target_ops): Add linux_detach.
15264 * server.c (main): Handle 'D' packet.
15265 * target.h (struct target_ops): Add "detach" member.
15266 (detach_inferior): Define.
15268 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15270 From Kelley Cook <kelleycook@wideopenwest.com>:
15271 * configure.srv: Accept i[34567]86 variants.
15273 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15275 * linux-low.c (linux_wait_for_event): Correct comment typos.
15276 (linux_resume_one_process): Call check_removed_breakpoint.
15277 (linux_send_signal): New function.
15278 (linux_target_ops): Add linux_send_signal.
15279 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15281 * target.h (struct target_ops): Add send_signal.
15283 2003-05-29 Jim Blandy <jimb@redhat.com>
15285 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15286 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15287 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15288 away part of the register's value.
15290 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15292 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15293 (linux_wait_for_event, linux_init_signals): Likewise.
15295 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15297 * configure.in: Check for stdlib.h.
15298 * configure: Regenerated.
15299 * config.in: Regenerated.
15301 2003-01-04 Andreas Schwab <schwab@suse.de>
15303 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15305 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15307 * Makefile.in: Remove obsolete code.
15309 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15311 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15312 defined(PT_FPR0_HI).
15314 2002-11-17 Stuart Hughes <seh@zee2.com>
15316 * linux-arm-low.c (arm_num_regs): Increase.
15317 (arm_regmap): Include status register.
15319 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15321 * linux-low.c (register_addr): Remove incorrect -1 check.
15323 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15325 * linux-low.c (linux_create_inferior): Call setpgid. Return
15327 (unstopped_p, linux_signal_pid): Remove.
15328 (linux_target_ops): Remove linux_signal_pid.
15329 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15330 global instead of target method.
15331 * target.h (struct target_ops): Remove signal_pid. Update comment
15332 for create_inferior.
15333 * server.c (signal_pid): New variable.
15334 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15335 gdbserver. Set the child to be the foreground process group.
15336 (attach_inferior): Set signal_pid.
15338 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15340 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15342 2002-08-20 Jim Blandy <jimb@redhat.com>
15344 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15347 2002-08-01 Andrew Cagney <cagney@redhat.com>
15349 * Makefile.in: Make chill references obsolete.
15351 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15353 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15354 * configure: Regenerate.
15355 * config.in: Regenerate.
15357 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15359 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15360 (perror_with_name, remote_close, remote_open, expect, play): Static.
15362 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15364 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15365 byte offsets instead of an array of indexes.
15366 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15368 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15370 * regcache.c: Add comment.
15372 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15374 * thread-db.c: New file.
15375 * proc-service.c: New file.
15376 * acinclude.m4: New file.
15377 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15378 proc-service.o, and thread-db.o.
15379 (linux-low.o): Add USE_THREAD_DB.
15380 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15381 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15382 * aclocal.m4: Regenerated.
15383 * config.in: Regenerated.
15384 * configure: Regenerated.
15385 * configure.in: Check for proc_service.h, sys/procfs.h,
15386 thread_db.h, and linux/elf.h headrs.
15387 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15388 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15389 Check for -lthread_db and thread support.
15390 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15391 PowerPC, and SuperH.
15392 * i387-fp.c: Constify arguments.
15393 * i387-fp.h: Likewise.
15394 * inferiors.c: (struct thread_info): Renamed from
15395 `struct inferior_info'. Remove PID member. Use generic inferior
15396 list header. All uses updated.
15397 (inferiors, signal_pid): Removed.
15398 (all_threads): New variable.
15399 (get_thread): Define.
15400 (add_inferior_to_list): New function.
15401 (for_each_inferior): New function.
15402 (change_inferior_id): New function.
15403 (add_inferior): Removed.
15404 (remove_inferior): New function.
15405 (add_thread): New function.
15406 (free_one_thread): New function.
15407 (remove_thread): New function.
15408 (clear_inferiors): Use for_each_inferior and free_one_thread.
15409 (find_inferior): New function.
15410 (find_inferior_id): New function.
15411 (inferior_target_data): Update argument type.
15412 (set_inferior_target_data): Likewise.
15413 (inferior_regcache_data): Likewise.
15414 (set_inferior_regcache_data): Likewise.
15415 * linux-low.c (linux_bp_reinsert): Remove.
15416 (all_processes, stopping_threads, using_thrads)
15417 (struct pending_signals, debug_threads, pid_of): New.
15418 (inferior_pid): Replace with macro.
15419 (struct inferior_linux_data): Remove.
15420 (get_stop_pc, add_process): New functions.
15421 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15422 Use add_process and add_thread.
15423 (linux_attach_lwp): New function, based on old linux_attach. Use
15424 add_process and add_thread. Set stop_expected for new threads.
15425 (linux_attach): New function.
15426 (linux_kill_one_process): New function.
15427 (linux_kill): Kill all LWPs.
15428 (linux_thread_alive): Use find_inferior_id.
15429 (check_removed_breakpoints, status_pending_p): New functions.
15430 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15431 Update. Use WNOHANG. Wait for cloned processes also. Update process
15432 struct for the found process.
15433 (linux_wait_for_event): New function.
15434 (linux_wait): Use it. Support LWPs.
15435 (send_sigstop, wait_for_sigstop, stop_all_processes)
15436 (linux_resume_one_process, linux_continue_one_process): New functions.
15437 (linux_resume): Support LWPs.
15438 (REGISTER_RAW_SIZE): Remove.
15439 (fetch_register): Use register_size instead. Call supply_register.
15440 (usr_store_inferior_registers): Likewise. Call collect_register.
15441 Fix recursive case.
15442 (regsets_fetch_inferior_registers): Improve error message.
15443 (regsets_store_inferior_registers): Add debugging.
15444 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15445 (unstopped_p, linux_signal_pid): New functions.
15446 (linux_target_ops): Add linux_signal_pid.
15447 (linux_init_signals): New function.
15448 (initialize_low): Call it. Initialize using_threads.
15449 * regcache.c (inferior_regcache_data): Add valid
15451 (get_regcache): Fetch registers lazily. Add fetch argument
15452 and update all callers.
15453 (regcache_invalidate_one, regcache_invalidate): New
15455 (new_register_cache): Renamed from create_register_cache.
15456 Return the new regcache.
15457 (free_register_cache): Change argument to a void *.
15458 (registers_to_string, registers_from_string): Call get_regcache
15459 with fetch flag set.
15460 (register_data): Make static. Pass fetch flag to get_regcache.
15461 (supply_register): Call get_regcache with fetch flag clear.
15462 (collect_register): Call get_regcache with fetch flag set.
15463 (collect_register_as_string): New function.
15464 * regcache.h: Update.
15465 * remote-utils.c (putpkt): Flush after debug output and use
15467 Handle input interrupts while waiting for an ACK.
15468 (input_interrupt): Use signal_pid method.
15469 (getpkt): Flush after debug output and use stderr.
15470 (outreg): Use collect_register_as_string.
15471 (new_thread_notify, dead_thread_notify): New functions.
15472 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15473 and general_thread.
15474 (look_up_one_symbol): Flush after debug output.
15475 * server.c (step_thread, server_waiting): New variables.
15476 (start_inferior): Don't use signal_pid. Update call to mywait.
15477 (attach_inferior): Update call to mywait.
15478 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15479 (main): Don't fetch/store registers explicitly. Use
15480 set_desired_inferior. Support proposed ``Hs'' packet. Update
15482 * server.h: Update.
15483 (struct inferior_list, struct_inferior_list_entry): New.
15484 * target.c (set_desired_inferior): New.
15485 (write_inferior_memory): Constify.
15486 (mywait): New function.
15487 * target.h: Update.
15488 (struct target_ops): New signal_pid method.
15489 (mywait): Removed macro, added prototype.
15491 * linux-low.h (regset_func): Removed.
15492 (regset_fill_func, regset_store_func): New.
15493 (enum regset_type): New.
15494 (struct regset_info): Add type field. Use new operation types.
15495 (struct linux_target_ops): stop_pc renamed to get_pc.
15496 Add decr_pc_after_break and breakpoint_at.
15497 (get_process, get_thread_proess, get_process_thread)
15498 (strut process_info, all_processes, linux_attach_lwp)
15499 (thread_db_init): New.
15501 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15502 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15503 (the_low_target): Add new members.
15504 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15505 (i386_store_fpxregset): Constify.
15506 (target_regsets): Add new kind identifier.
15507 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15508 (i386_set_pc): Add debugging.
15509 (i386_breakpoint_at): New function.
15510 (the_low_target): Add new members.
15511 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15512 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15513 (mips_breakpoint_at): New.
15514 (the_low_target): Add new members.
15515 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15516 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15517 (the_low_target): Add new members.
15518 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15519 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15520 (the_low_target): Add new members.
15521 * linux-x86-64-low.c (target_regsets): Add new kind
15524 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15526 From Martin Pool <mbp@samba.org>:
15527 * server.c (gdbserver_usage): New function.
15530 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15532 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15533 stop_at -> stop_pc.
15535 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15537 * Makefile.in: Remove obsolete code.
15539 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15541 * linux-low.c (regsets_fetch_inferior_registers),
15542 (regsets_store_inferior_registers): Removed cast to int from
15544 * regcache.h: Added declaration of struct inferior_info.
15546 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15548 * inferiors.c (struct inferior_info): Add regcache_data.
15549 (add_inferior): Call create_register_cache.
15550 (clear_inferiors): Call free_register_cache.
15551 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15552 * regcache.c (struct inferior_regcache_data): New.
15553 (registers): Remove.
15554 (get_regcache): New function.
15555 (create_register_cache, free_register_cache): New functions.
15556 (set_register_cache): Don't initialize the register cache here.
15557 (registers_to_string, registers_from_string, register_data): Call
15559 * regcache.h: Add prototypes.
15560 * server.h: Likewise.
15562 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15564 * mem-break.c: New file.
15565 * mem-break.h: New file.
15566 * Makefile.in: Add mem-break.o rule; update server.h
15568 * inferiors.c (struct inferior_info): Add target_data
15570 (clear_inferiors): Free target_data member if set.
15571 (inferior_target_data, set_inferior_target_data): New functions.
15572 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15573 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15574 * linux-low.c (linux_bp_reinsert): New variable.
15575 (struct inferior_linux_data): New.
15576 (linux_create_inferior): Use set_inferior_target_data.
15577 (linux_attach): Likewise. Call add_inferior.
15578 (linux_wait_for_one_inferior): New function.
15579 (linux_wait): Call it.
15580 (linux_write_memory): Add const.
15581 (initialize_low): Call set_breakpoint_data.
15582 * linux-low.h (struct linux_target_ops): Add breakpoint
15584 * server.c (attach_inferior): Remove extra add_inferior
15586 * server.h: Include mem-break.h. Update inferior.c
15588 * target.c (read_inferior_memory)
15589 (write_inferior_memory): New functions.
15590 * target.h (read_inferior_memory)
15591 (write_inferior_memory): Change macros to prototypes.
15592 (struct target_ops): Update comments. Add const to write_memory
15595 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15597 * linux-low.c (usr_store_inferior_registers): Support
15598 registers which are allowed to fail to store.
15599 * linux-low.h (linux_target_ops): Likewise.
15600 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15601 (ppc_cannot_store_register): FPSCR may not be storable.
15603 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15605 * server.h: Include <string.h> if HAVE_STRING_H.
15606 * ChangeLog: Correct paths in last ChangeLog entry.
15608 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15610 * linux-low.h: Remove obsolete prototypes.
15611 (struct linux_target_ops): New.
15612 (extern the_low_target): New.
15613 * linux-low.c (num_regs, regmap): Remove declarations.
15614 (register_addr): Use the_low_target explicitly.
15615 (fetch_register): Likewise.
15616 (usr_fetch_inferior_registers): Likewise.
15617 (usr_store_inferior_registers): Likewise.
15618 * linux-arm-low.c (num_regs): Remove.
15619 (arm_num_regs): Define.
15620 (arm_regmap): Renamed from regmap, made static.
15621 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15623 (arm_cannot_store_register): Renamed from cannot_store_register,
15625 (the_low_target): New.
15626 * linux-i386-low.c (num_regs): Remove.
15627 (i386_num_regs): Define.
15628 (i386_regmap): Renamed from regmap, made static.
15629 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15631 (i386_cannot_store_register): Renamed from cannot_store_register,
15633 (the_low_target): New.
15634 * linux-ia64-low.c (num_regs): Remove.
15635 (ia64_num_regs): Define.
15636 (ia64_regmap): Renamed from regmap, made static.
15637 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15639 (ia64_cannot_store_register): Renamed from cannot_store_register,
15641 (the_low_target): New.
15642 * linux-m68k-low.c (num_regs): Remove.
15643 (m68k_num_regs): Define.
15644 (m68k_regmap): Renamed from regmap, made static.
15645 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15647 (m68k_cannot_store_register): Renamed from cannot_store_register,
15649 (the_low_target): New.
15650 * linux-mips-low.c (num_regs): Remove.
15651 (mips_num_regs): Define.
15652 (mips_regmap): Renamed from regmap, made static.
15653 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15655 (mips_cannot_store_register): Renamed from cannot_store_register,
15657 (the_low_target): New.
15658 * linux-ppc-low.c (num_regs): Remove.
15659 (ppc_num_regs): Define.
15660 (ppc_regmap): Renamed from regmap, made static.
15661 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15663 (ppc_cannot_store_register): Renamed from cannot_store_register,
15665 (the_low_target): New.
15666 * linux-s390-low.c (num_regs): Remove.
15667 (s390_num_regs): Define.
15668 (s390_regmap): Renamed from regmap, made static.
15669 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15671 (s390_cannot_store_register): Renamed from cannot_store_register,
15673 (the_low_target): New.
15674 * linux-sh-low.c (num_regs): Remove.
15675 (sh_num_regs): Define.
15676 (sh_regmap): Renamed from regmap, made static.
15677 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15679 (sh_cannot_store_register): Renamed from cannot_store_register,
15681 (the_low_target): New.
15682 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15683 (the_low_target): New.
15685 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15687 * Makefile.in: Add stamp-h target.
15688 * configure.in: Create stamp-h.
15689 * configure: Regenerated.
15691 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15693 * inferiors.c: New file.
15694 * target.c: New file.
15695 * target.h: New file.
15696 * Makefile.in: Add target.o and inferiors.o. Update
15698 * linux-low.c (inferior_pid): New static variable,
15699 moved from server.c.
15700 (linux_create_inferior): Renamed from create_inferior.
15701 Call add_inferior. Return 0 on success instead of a PID.
15702 (linux_attach): Renamed from myattach.
15703 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15704 (linux_thread_alive): Renamed from mythread_alive.
15705 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15707 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15708 (regsets_store_inferior_registers): Correct error message.
15709 Add missing ``return 0''.
15710 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15711 (linux_store_registers): Renamed from store_inferior_registers.
15712 (linux_read_memory): Renamed from read_inferior_memory.
15713 (linux_write_memory): Renamed from write_inferior_memory.
15714 (linux_target_ops): New structure.
15715 (initialize_low): Call set_target_ops ().
15716 * remote-utils.c (unhexify): New function.
15717 (hexify): New function.
15718 (input_interrupt): Send signals to ``signal_pid''.
15719 * server.c (inferior_pid): Remove.
15720 (start_inferior): Update create_inferior call.
15721 (attach_inferior): Call add_inferior.
15722 (handle_query): New function.
15723 (main): Call handle_query for `q' packets.
15724 * server.h: Include "target.h". Remove obsolete prototypes.
15725 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15727 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15729 * Makefile.in: Add WARN_CFLAGS. Update configury
15731 * configure.in: Check for <string.h>
15732 * configure: Regenerate.
15733 * config.in: Regenerate.
15734 * gdbreplay.c: Include needed system headers.
15735 (remote_open): Remove strchr prototype.
15736 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15737 * regcache.c (supply_register): Change buf argument to const void *.
15738 (supply_register_by_name): Likewise.
15739 (collect_register): Change buf argument to void *.
15740 (collect_register_by_name): Likewise.
15741 * regcache.h: Add missing prototypes.
15742 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15743 * server.c (handle_query): New function.
15744 (attached): New static variable, moved out of main.
15745 (main): Quiet longjmp clobber warnings.
15746 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15747 * utils.c (error): Remove NORETURN.