1 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
5 (aarch64_store_gregset): Likewise.
6 (aarch64_fill_fpregset): Likewise.
7 (aarch64_store_fpregset): Likewise.
9 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
11 * gdbthread.h (find_thread, for_each_thread): New functions.
12 * inferiors.c (thread_of_pid): Remove.
13 (find_any_thread_of_pid): Use find_thread.
14 * linux-low.c (num_lwps): Use for_each_thread.
16 2017-10-17 Yao Qi <yao.qi@linaro.org>
18 * Makefile.in: Remove one rule.
19 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
21 2017-10-17 Yao Qi <yao.qi@linaro.org>
23 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
24 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
26 2017-10-17 Yao Qi <yao.qi@linaro.org>
28 * configure.srv: Rename arm.o with arch/arm.o.
30 2017-10-17 Yao Qi <yao.qi@linaro.org>
32 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
33 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
34 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
35 (arch-i386.o, arch-amd64.o): Remove rules.
37 Update POSTCOMPILE and COMPILE.pre.
38 * configure.ac: Invoke AC_CONFIG_COMMANDS.
39 * configure: Re-generated.
40 * configure.srv: Replace arch-i386.o with arch/i386.o.
41 Replace arch-amd64.o with arch/amd64.o.
43 2017-10-16 Yao Qi <yao.qi@linaro.org>
45 * configure: Regenerated.
47 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
49 * inferiors.h: (struct inferior_list): Remove.
50 (struct inferior_list_entry); Remove.
51 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
52 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
53 get_first_inferior): Remove.
54 (for_each_inferior, for_each_inferior_with_data, find_inferior,
55 find_inferior_id, find_inferior_in_random): Change signature.
56 * inferiors.c (all_threads): Change type to
57 std::list<thread_info *>.
58 (get_thread): Remove macro.
59 (find_inferior, find_inferior_id): Change signature, implement
61 (find_inferior_in_random): Change signature, implement using
62 find_thread_in_random.
63 (for_each_inferior, for_each_inferior_with_data): Change
64 signature, implement using for_each_thread.
65 (add_inferior_to_list, remove_inferior): Remove.
66 (add_thread, get_first_thread, thread_of_pid,
67 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
68 (get_first_inferior, one_inferior_p, clear_inferior_list):
70 (clear_inferiors, get_thread_process): Update.
71 * gdbthread.h: Include <list>.
72 (struct thread_info) <entry>: Remove field.
74 (all_threads): Change type to std::list<thread_info *>.
75 (get_first_inferior): Add doc.
76 (find_thread, for_each_thread, find_thread_in_random): New
78 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
79 * linux-arm-low.c (update_registers_callback): Update.
80 * linux-low.c (second_thread_of_pid_p): Update.
81 (kill_one_lwp_callback, linux_detach_lwp_callback,
82 delete_lwp_callback, status_pending_p_callback, same_lwp,
83 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
84 iterate_over_lwps, not_stopped_callback,
85 resume_stopped_resumed_lwps, count_events_callback,
86 select_singlestep_lwp_callback, select_event_lwp_callback,
87 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
88 suspend_and_send_sigstop_callback, wait_for_sigstop,
89 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
90 lwp_running, linux_set_resume_request, resume_status_pending_p,
91 need_step_over_p, start_step_over, linux_resume_one_thread,
92 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
93 reset_lwp_ptrace_options_callback): Update.
94 * linux-mips-low.c (update_watch_registers_callback): Update.
95 * regcache.c (regcache_invalidate_one, regcache_invalidate):
97 (free_register_cache_thread_one): Remove.
98 (regcache_release): Update.
99 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
100 handle_qxfer_threads_worker): Update.
101 (handle_query): Update, use list iterator.
102 (visit_actioned_threads, handle_pending_status,
103 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
104 clear_pending_status_callback, set_pending_status_callback,
105 find_status_pending_thread_callback, handle_status,
106 process_serial_event): Update.
107 * target.c (thread_search_callback): Update.
108 * thread-db.c (thread_db_get_tls_address): Update.
109 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
111 * win32-i386-low.c (update_debug_registers_callback): Update.
112 * win32-low.c (delete_thread_info, child_delete_thread,
113 continue_one_thread, suspend_one_thread,
114 get_child_debug_event): Adjust.
116 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
118 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
119 * inferiors.h: Include <list>.
120 (struct process_info) <entry>: Remove field.
122 (pid_of): Change macro to function.
123 (ptid_of, lwpid_of): Remove macro.
124 (all_processes): Change type to std::list<process_info *>.
125 (ALL_PROCESSES): Remove macro.
126 (for_each_process, find_process): New function.
127 * inferiors.c (all_processes): Change type to
128 std::list<process_info *>.
129 (find_thread_process): Adjust.
130 (add_process): Likewise.
131 (remove_process): Likewise.
132 (find_process_pid): Likewise.
133 (get_first_process): Likewise.
134 (started_inferior_callback): Remove.
135 (have_started_inferiors_p): Adjust.
136 (attached_inferior_callback): Remove.
137 (have_attached_inferiors_p): Adjust.
138 * linux-low.c (check_zombie_leaders): Likewise.
139 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
140 (x86_linux_update_xmltarget): Adjust.
141 * server.c (handle_query): Likewise.
142 (gdb_reattached_process): Remove.
143 (handle_status): Adjust.
144 (kill_inferior_callback): Likewise.
145 (detach_or_kill_inferior): Remove.
146 (print_started_pid): Likewise.
147 (print_attached_pid): Likewise.
148 (detach_or_kill_for_exit): Update.
149 (process_serial_event): Likewise.
150 * linux-arm-low.c (arm_new_fork): Likewise.
152 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
154 * dll.h: Include <list>.
155 (struct dll_info): Add constructor.
156 <entry>: Remove field.
157 (all_dlls): Change type to std::list<dll_info>.
158 * dll.c: Include <algorithm>.
159 (get_dll): Remove macro.
160 (all_dlls): Change type to std::list<dll_info *>.
161 (free_one_dll): Remove.
162 (match_dll): Likewise.
163 (loaded_dll): Adjust.
164 (unloaded_dll): Adjust to all_dlls type change, use
165 std::find_if. Inline code from match_dll.
166 (clear_dlls): Adjust to all_dlls type change.
167 * server.c (emit_dll_description): Remove.
168 (handle_qxfer_libraries): Adjust to all_dlls type change,
169 integrate emit_dll_description's functionality.
171 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
173 * linux-low.h (struct linux_target_ops) <delete_process>: New
175 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
176 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
177 (struct linux_target_ops): Add delete_process callback.
178 * linux-arm-low.c (arm_delete_process): New.
179 (struct linux_target_ops): Add delete_process callback.
180 * linux-bfin-low.c (struct linux_target_ops): Likewise.
181 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
182 * linux-m32r-low.c (struct linux_target_ops): Likewise.
183 * linux-mips-low.c (mips_linux_delete_process): New.
184 (struct linux_target_ops): Add delete_process callback.
185 * linux-ppc-low.c (struct linux_target_ops): Likewise.
186 * linux-s390-low.c (struct linux_target_ops): Likewise.
187 * linux-sh-low.c (struct linux_target_ops): Likewise.
188 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
189 * linux-tile-low.c (struct linux_target_ops): Likewise.
190 * linux-x86-low.c (x86_linux_delete_process): New.
191 (struct linux_target_ops): Add delete_process callback.
192 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
194 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
196 * linux-aarch64-low.c (the_low_target): Add thread delete
198 * linux-arm-low.c (arm_delete_thread): New function.
199 (the_low_target): Add thread delete callback.
200 * linux-bfin-low.c (the_low_target): Likewise.
201 * linux-crisv32-low.c (the_low_target): Likewise.
202 * linux-low.c (delete_lwp): Invoke delete_thread callback if
204 * linux-low.h (struct linux_target_ops) <delete_thread>: New
206 * linux-m32r-low.c (the_low_target): Add thread delete callback.
207 * linux-mips-low.c (mips_linux_delete_thread): New function.
208 (the_low_target): Add thread delete callback.
209 * linux-ppc-low.c (the_low_target): Likewise.
210 * linux-s390-low.c (the_low_target): Likewise.
211 * linux-sh-low.c (the_low_target): Likewise.
212 * linux-tic6x-low.c (the_low_target): Likewise.
213 * linux-tile-low.c (the_low_target): Likewise.
214 * linux-x86-low.c (the_low_target): Likewise.
215 * linux-xtensa-low.c (the_low_target): Likewise.
217 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
219 * win32-low.c: Include "common-inferior.h".
221 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
223 * inferiors.c (set_inferior_cwd): New function.
224 * server.c (handle_general_set): Handle QSetWorkingDir packet.
225 (handle_query): Inform that QSetWorkingDir is supported.
226 * win32-low.c (create_process): Pass the inferior's cwd to
229 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
231 * inferiors.c (current_inferior_cwd): New global variable.
232 (get_inferior_cwd): New function.
233 * inferiors.h (struct process_info) <cwd>: New field.
235 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
237 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
238 (OBS): Add gdb_tilde_expand.o.
240 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
242 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
243 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
245 2017-09-29 Pedro Alves <palves@redhat.com>
247 * ax.c (gdb_parse_agent_expr): Constify.
248 * ax.h (gdb_parse_agent_expr): Constify.
249 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
251 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
252 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
253 * remote-utils.h (read_ptid): Constify.
254 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
255 (process_point_options, process_serial_event): Constify.
256 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
257 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
258 (cmd_qtbuffer): Constify.
260 2017-09-29 Pedro Alves <palves@redhat.com>
262 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
265 2017-09-29 Pedro Alves <palves@redhat.com>
267 * linux-low.c (handle_extended_wait): Pass parent thread instead
268 of process to thread_db_notice_clone.
269 * linux-low.h (thread_db_notice_clone): Replace parent process
270 parameter with parent thread parameter.
271 * thread-db.c (find_one_thread): Add comment.
272 (thread_db_notice_clone): Replace parent process parameter with
273 parent thread parameter. Temporarily switch to the parent thread.
275 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
277 * gdbthread.h: Include "common-gdbthread.h".
278 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
279 "if" when validating the ptid.
280 * remote-utils.c: Include "gdbthread.h".
281 (prepare_resume_reply): Use "switch_to_thread".
282 * target.c (done_accessing_memory): Likewise.
284 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
286 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
287 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
288 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
289 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
290 s390x-gs-linux64-ipa.o to ipa_obj.
291 * linux-s390-low.c (HWCAP_S390_GS): New define.
292 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
294 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
295 (s390_arch_setup): Check for guarded-storage support and choose
297 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
298 init_registers_s390x_gs_linux64.
299 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
301 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
302 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
304 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
306 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
308 2017-09-21 Kevin Buettner <kevinb@redhat.com>
310 * linux-low.h (struct lwp_info): Add new field, thread_handle.
311 (thread_db_thread_handle): Declare.
312 * linux-low.c (linux_target_ops): Initialize thread_handle.
313 * server.c (handle_qxfer_threads_worker): Add support for
315 * target.h (struct target_ops): Add new function pointer,
317 (target_thread_handle): Define.
318 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
320 (thread_db_thread_handle): New function.
322 2017-09-21 Kevin Buettner <kevinb@redhat.com>
324 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
325 * linux-low.h (thread_db_notice_clone): Declare.
326 * thread-db.c (thread_db_notice_clone): New function.
328 2017-09-21 Pedro Alves <palves@redhat.com>
330 * server.c (gdb_read_memory, handle_status, process_serial_event)
331 (handle_serial_event, handle_target_event): Adjust to
332 set_desired_thread prototype change.
333 * target.c (set_desired_thread): Remove 'use_general' parameter
335 * target.h (set_desired_thread): Remove 'use_general' parameter.
337 2017-09-20 Tom Tromey <tom@tromey.com>
339 * target.c (target_terminal::terminal_state): Define.
340 (target_terminal::init): Rename from target_terminal_init.
341 (target_terminal::inferior): Rename from
342 target_terminal_inferior.
343 (target_terminal::ours): Rename from target_terminal_ours.
344 (target_terminal::ours_for_output, target_terminal::info): New.
346 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
348 * server.c (accumulate_file_name_length): Remove.
349 (emit_dll_description): Adjust to std::string change.
350 (handle_qxfer_libraries): Use std::string to hold document.
352 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
354 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
355 return type of xml_escape_text.
356 * server.c (emit_dll_description): Likewise.
358 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
360 * server.c (captured_main): Accept argument for --selftest.
361 Update run_tests call.
362 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
363 when registering selftests.
365 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
367 * regcache.c (get_thread_regcache): Update code to use "std::vector"
368 instead of "VEC" for "target_desc.reg_defs".
369 (regcache_cpy): Likewise.
370 (registers_to_string): Likewise.
371 (registers_from_string): Likewise.
372 (find_regno): Likewise.
373 (supply_regblock): Likewise.
374 (regcache_raw_read_unsigned): Likewise.
375 * tdesc.c (init_target_desc): Likewise.
376 (tdesc_create_reg): Likewise.
377 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
378 (struct target_desc) <reg_defs>: Convert to "std::vector".
379 (target_desc): Do not initialize "reg_defs".
380 (~target_desc): Update code to use "std::vector" instead of "VEC"
381 for "target_desc.reg_defs".
382 (operator==): Likewise.
384 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
386 * inferiors.h (thread_to_gdb_id): Remove.
387 * inferiors.c (thread_to_gdb_id): Remove.
388 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
389 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
390 lynx_store_registers, lynx_read_memory, lynx_write_memory):
392 * nto-low.c (nto_fetch_registers, nto_store_registers,
393 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
395 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
397 * inferiors.h (gdb_id_to_thread_id): Remove.
398 * inferiors.c (gdb_id_to_thread_id): Remove.
399 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
400 removal. Move pid declaration closer to where it's used.
402 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
404 * server.c (handle_detach): New function.
405 (process_serial_event): Move code out, call handle_detach.
407 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
409 * server.c (require_running): Rename to ...
410 (require_running_or_return): ... this ...
411 (require_running_or_break): ... and this.
412 (handle_query, process_serial_event): Adjust.
414 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
416 * linux-low.c (linux_set_resume_request): Remove unused
419 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
421 * server.c (first_thread_of): Remove.
422 (process_serial_event): Replace usage of first_thread_of with
423 find_any_thread_of_pid.
424 * tracepoint.c (same_process_p): Remove.
425 (gdb_agent_about_to_close): Replace usage of same_process_p with
426 find_any_thread_of_pid.
427 * linux-x86-low.c (same_process_callback): Remove.
428 (x86_arch_setup_process_callback): Replace usage of
429 same_process_callback with find_any_thread_of_pid.
430 * thread-db.c (any_thread_of): Remove.
431 (switch_to_process): Replace usage of any_thread_of with
432 find_any_thread_of_pid.
433 * inferiors.c (thread_pid_matches_callback): Remove.
434 (find_thread_process): Adjust to use find_any_thread_of_pid.
436 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
438 * regcache.c (get_thread_regcache): Guard calls to "memset"
441 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
443 * linux-low.c (handle_extended_wait): Use
444 "allocate_target_description" instead of "XNEW".
445 * linux-x86-low.c (initialize_low_arch): Likewise.
447 2017-09-05 Yao Qi <yao.qi@linaro.org>
449 * configure.srv (srv_i386_regobj): Remove.
450 (srv_amd64_regobj): Remove.
451 (srv_regobj): Set it to "" for x86 non-linux targets.
452 * linux-x86-tdesc.c (i386_linux_read_description):
453 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
454 (init_registers_i386): Remove the declaration.
455 (tdesc_i386): Remove the declaration.
456 (lynx_i386_arch_setup): Call i386_create_target_description.
457 * nto-x86-low.c: Likewise.
458 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
459 [!__x86_64__]: include arch/i386.h.
460 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
462 2017-09-05 Yao Qi <yao.qi@linaro.org>
464 * configure.srv (srv_amd64_linux_xmlfiles): Remove
465 i386/amd64-XXX-linux from it.
467 2017-09-05 Yao Qi <yao.qi@linaro.org>
469 * configure.srv: Empty srv_amd64_linux_regobj if $development is
471 (ipa_amd64_linux_regobj): Remove.
472 (ipa_x32_linux_regobj): Remove.
474 2017-09-05 Yao Qi <yao.qi@linaro.org>
476 * Makefile.in (arch-amd64.o): New rule.
477 * configure.srv: Append arch-amd64.o.
478 * linux-amd64-ipa.c: Include common/x86-xstate.h.
479 (get_ipa_tdesc): Call amd64_linux_read_description.
480 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
481 and init_registers_amd64_XXX.
482 * linux-x86-low.c (x86_linux_read_description): Call
483 amd64_linux_read_description.
484 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
485 (initialize_low_arch): Don't call init_registers_x32_XXX and
486 init_registers_amd64_XXX.
487 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
489 [__x86_64__] (amd64_tdesc_test): New function.
490 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
491 and init_registers_amd64_XXX.
492 * linux-x86-tdesc.c: Include arch/amd64.h.
493 (xcr0_to_tdesc_idx): New function.
494 (i386_linux_read_description): New function.
495 (amd64_get_ipa_tdesc_idx): New function.
496 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
497 (amd64_get_ipa_tdesc): Declare.
499 2017-09-05 Yao Qi <yao.qi@linaro.org>
501 * configure.srv (srv_i386_linux_xmlfiles): Remove
502 i386/i386-XXX-linux.xml from it.
504 2017-09-05 Yao Qi <yao.qi@linaro.org>
506 * configure.srv: Set srv_i386_linux_regobj empty if $development
508 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
509 initialize_low_tdesc.
510 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
511 with #if initialize_low_tdesc.
512 * linux-x86-tdesc-selftest.c: New file.
513 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
515 2017-09-05 Yao Qi <yao.qi@linaro.org>
517 * Makefile.in (arch-i386.o): New rule.
518 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
519 (x86_64-*-linux*): Likewise.
520 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
522 (i386_linux_read_description): Remove code and call
523 i386_create_target_description.
524 * tdesc.c (allocate_target_description): New function.
525 * tdesc.h (set_tdesc_architecture): Remove declaration.
526 (set_tdesc_osabi): Likewise.
528 2017-09-05 Yao Qi <yao.qi@linaro.org>
530 * linux-x86-tdesc.c: Don't include <inttypes.h>.
531 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
532 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
534 * server.c (get_features_xml): Call tdesc_get_features_xml.
535 * tdesc.c (set_tdesc_architecture): New function.
536 (set_tdesc_osabi): New function.
537 (tdesc_get_features_xml): New function.
538 (tdesc_create_feature): Add an argument.
539 * tdesc.h (struct target_desc) <features>: New field.
540 <arch, osabi>: New field.
541 (~target_desc): xfree features, arch, and osabi.
542 (target_desc::oerator==): Don't compare .xmltarget.
543 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
544 (set_tdesc_osabi): Likewise.
545 (tdesc_get_features_xml): Likewise.
547 2017-09-05 Yao Qi <yao.qi@linaro.org>
549 * linux-x86-tdesc.c: Include selftest.h.
550 (i386_tdesc_test): New function.
551 (initialize_low_tdesc): Call selftests::register_test.
552 * tdesc.h: Include regdef.h.
553 (target_desc): Override operator == and !=.
555 2017-09-05 Yao Qi <yao.qi@linaro.org>
557 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
559 * linux-i386-ipa.c: Include common/x86-xstate.h
560 (get_ipa_tdesc): Call i386_linux_read_description.
561 (initialize_low_tracepoint): Don't call init_registers_XXX
562 functions, call initialize_low_tdesc instead.
563 * linux-x86-low.c (x86_linux_read_description): Call
564 i386_linux_read_description.
565 (initialize_low_arch): Don't call init_registers_i386_XXX
566 functions, call initialize_low_tdesc.
567 * linux-x86-tdesc.c: New file.
568 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
569 (i386_get_ipa_tdesc_idx): Declare.
570 (i386_get_ipa_tdesc): Declare.
571 (initialize_low_tdesc): Declare.
573 2017-09-05 Yao Qi <yao.qi@linaro.org>
575 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
578 2017-09-05 Yao Qi <yao.qi@linaro.org>
580 * Makefile.in (IPA_OBJS): Add vec-ipa.o
581 * regcache.c (get_thread_regcache): Use VEC_length.
582 (init_register_cache): Likewise.
583 (regcache_cpy): Likewise.
584 (registers_to_string): Iterate reg_defs via VEC_iterate.
585 (find_regno): Likewise.
586 (find_register_by_number): Use VEC_index.
587 (register_size): Call find_register_by_number.
588 (register_data): Call find_register_by_number.
589 (supply_regblock): Use VEC_length.
590 (regcache_raw_read_unsigned): Likewise.
591 * tdesc.c (init_target_desc): Iterate reg_defs via
593 (default_description): Update initializer.
594 (copy_target_description): Don't update field num_registers.
595 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
596 <num_registers>: Remove.
598 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
600 * Makefile.in (.SECONDARY): Define target.
602 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
604 * linux-low.c (linux_wait_1): Adjust.
605 * server.c (queue_stop_reply_callback): Adjust.
607 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
609 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
610 QEnvironmentUnset and QEnvironmentReset packets.
611 (handle_query): Inform remote that QEnvironmentHexEncoded,
612 QEnvironmentUnset and QEnvironmentReset are supported.
614 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
616 * inferiors.h (inferior_target_data): Rename to ...
617 (thread_target_data): ... this.
618 (inferior_regcache_data): Rename to ...
619 (thread_regcache_data): ... this.
620 (set_inferior_regcache_data): Rename to ...
621 (set_thread_regcache_data): ... this.
622 * inferiors.c (inferior_target_data): Rename to ...
623 (thread_target_data): ... this.
624 (inferior_regcache_data): Rename to ...
625 (thread_regcache_data): ... this.
626 (set_inferior_regcache_data): Rename to ...
627 (set_thread_regcache_data): ... this.
628 (free_one_thread): Update.
629 * linux-low.h (get_thread_lwp): Update.
630 * regcache.c (get_thread_regcache): Update.
631 (regcache_invalidate_thread): Update.
632 (free_register_cache_thread): Update.
633 * win32-i386-low.c (update_debug_registers_callback): Update.
634 (win32_get_current_dr): Update.
635 * win32-low.c (thread_rec): Update.
636 (delete_thread_info): Update.
637 (continue_one_thread): Update.
638 (suspend_one_thread): Update.
640 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
642 * inferiors.c (set_inferior_target_data): Remove.
643 * inferiors.h (set_inferior_target_data): Remove.
645 2017-08-18 Yao Qi <yao.qi@linaro.org>
647 * Makefile.in (OBS): Add selftest.o.
648 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
649 * configure, config.in: Re-generated.
650 * server.c: Include common/sefltest.h.
651 (captured_main): Handle option --selftest.
653 2017-08-09 Yao Qi <yao.qi@linaro.org>
655 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
656 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
657 i386-avx-mpx.o and i386-mmx.o.
658 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
659 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
660 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
661 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
662 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
663 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
664 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
665 i386/amd64-avx-mpx.xml.
667 2017-08-09 Yao Qi <yao.qi@linaro.org>
669 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
670 and x32-avx-avx512.o.
671 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
672 i386/x32-avx-avx512.xml.
674 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
676 * tracepoint.h (enum class fast_tpoint_collect_result): New
678 (fast_tracepoint_collecting): Change return type to
679 fast_tpoint_collect_result.
680 * tracepoint.c (fast_tracepoint_collecting): Likewise.
681 * linux-low.h: Include tracepoint.h.
682 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
683 fast_tpoint_collect_result.
684 * linux-low.c (handle_tracepoints): Adjust.
685 (linux_fast_tracepoint_collecting): Change return type to
686 fast_tpoint_collect_result.
687 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
688 linux_wait_1, stuck_in_jump_pad_callback,
689 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
690 proceed_one_lwp): Adjust to type change.
692 2017-07-10 Yao Qi <yao.qi@linaro.org>
694 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
696 2017-06-29 Yao Qi <yao.qi@linaro.org>
698 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
700 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
702 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
704 * Makefile.in (IPA_OBJS): Sort and format one item per line.
706 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
708 * linux-low.c (linux_create_inferior): Adjust code to access the
709 environment information via 'gdb_environ' class.
710 * lynx-low.c (lynx_create_inferior): Likewise.
711 * server.c (our_environ): Make it an instance of 'gdb_environ'.
712 (get_environ): Return a pointer to 'our_environ'.
713 (captured_main): Initialize 'our_environ'.
714 * server.h (get_environ): Adjust prototype.
715 * spu-low.c (spu_create_inferior): Adjust code to access the
716 environment information via 'gdb_environ' class.
718 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
720 * linux-low.c (linux_read_memory, linux_write_memory): Remove
721 usage of "register" keyword.
723 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
725 * configure: Re-generate.
727 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
729 * configure: Re-generate.
731 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
733 * Makefile.in (COMPILE.pre): Add "-x c++".
735 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
737 * fork-child.c: Conditionally include <signal.h>.
739 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
741 * server.c (handle_general_set): Handle new packet
743 (handle_query): Add "QStartupWithShell" to the list of supported
745 (gdbserver_usage): Add help text explaining the
746 new "--startup-with-shell" and "--no-startup-with-shell" CLI
748 (captured_main): Recognize and act upon the presence of the new
751 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
752 Pedro Alves <palves@redhat.com>
754 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
755 * configure: Regenerate.
756 * configure.srv (srv_linux_obj): Add "fork-child.o" and
758 (i[34567]86-*-lynxos*): Likewise.
759 (spu*-*-*): Likewise.
760 * fork-child.c: New file.
761 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
763 (linux_ptrace_fun): New function.
764 (linux_create_inferior): Adjust function prototype to reflect
765 change on "target.h". Adjust function code to use
767 (linux_request_interrupt): Delete "signal_pid".
768 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
769 (lynx_ptrace_fun): New function.
770 (lynx_create_inferior): Adjust function prototype to reflect
771 change on "target.h". Adjust function code to use
773 * nto-low.c (nto_create_inferior): Adjust function prototype and
774 code to reflect change on "target.h". Update comments.
775 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
776 "common-terminal.h" and "environ.h".
777 (terminal_fd): Moved to fork-child.c.
778 (old_foreground_pgrp): Likewise.
779 (restore_old_foreground_pgrp): Likewise.
780 (last_status): Make it global.
781 (last_ptid): Likewise.
782 (our_environ): New variable.
783 (startup_with_shell): Likewise.
784 (program_name): Likewise.
785 (program_argv): Rename to...
786 (program_args): ...this.
787 (wrapper_argv): New variable.
788 (start_inferior): Delete function.
789 (get_exec_wrapper): New function.
790 (get_exec_file): Likewise.
791 (get_environ): Likewise.
792 (prefork_hook): Likewise.
793 (post_fork_inferior): Likewise.
794 (postfork_hook): Likewise.
795 (postfork_child_hook): Likewise.
796 (handle_v_run): Update code to deal with arguments coming from the
797 remote host. Update calls from "start_inferior" to
799 (captured_main): Likewise. Initialize environment variable. Call
801 * server.h (post_fork_inferior): New prototype.
802 (get_environ): Likewise.
803 (last_status): Declare.
804 (last_ptid): Likewise.
805 (signal_pid): Likewise.
806 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
807 (spu_ptrace_fun): New function.
808 (spu_create_inferior): Adjust function prototype to reflect change
809 on "target.h". Adjust function code to use "fork_inferior".
810 * target.c (target_terminal_init): New function.
811 (target_terminal_inferior): Likewise.
812 (target_terminal_ours): Likewise.
813 * target.h: Include <vector>.
814 (struct target_ops) <create_inferior>: Update prototype.
815 (create_inferior): Update macro.
816 * utils.c (gdb_flush_out_err): New function.
817 * win32-low.c (win32_create_inferior): Adjust function prototype
818 and code to reflect change on "target.h".
820 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
822 * inferiors.c (switch_to_thread): New function.
824 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
826 * Makefile.in (SFILE): Add "common/job-control.c".
827 (OBS): Add "job-control.o".
829 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
831 * Makefile: Remove "@host_makefile_frag@".
833 2017-05-05 Pedro Alves <palves@redhat.com>
835 * configure: Regenerate.
837 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
839 * configure: Regenerate.
841 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
843 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
844 software_single_step change of return type to
845 std::vector<CORE_ADDR>.
846 * linux-low.c (install_software_single_step_breakpoints):
848 * linux-low.h (install_software_single_step_breakpoints):
851 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
853 * remote-utils.c: Include "gdb_termios.h" instead of
855 * terminal.h: Delete file.
857 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
859 * server.c: Include <vector>.
860 <program_argv, wrapper_argv>: Convert to std::vector.
861 (start_inferior): Rewrite function to use C++.
862 (handle_v_run): Likewise. Update code that calculates the argv
863 based on the vRun packet; use C++.
864 (captured_main): Likewise.
866 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
868 * server.c (handle_v_cont): Initialize thread_resume::thread
871 2017-04-05 Pedro Alves <palves@redhat.com>
873 * configure: Regenerate.
875 2017-04-05 Pedro Alves <palves@redhat.com>
877 * gdbreplay.c (sync_error): Constify.
878 * linux-x86-low.c (push_opcode): Constify.
880 2017-04-05 Pedro Alves <palves@redhat.com>
882 * win32-low.c (get_child_debug_event)
883 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
884 Report TARGET_WAITKIND_SPURIOUS instead.
886 2017-04-05 Pedro Alves <palves@redhat.com>
888 * remote-utils.c (remote_prepare, remote_open): Constify.
889 * remote-utils.h (remote_prepare, remote_open): Constify.
890 * server.c (captured_main): Constify 'port' handling.
892 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
894 * Makefile.in (clean): Clear .deps.
896 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
898 * .gitignore: Remove generated files, replace with wildcard.
899 * (clean): Replace removal of generated files with wildcard.
900 (version.c): Replace with...
901 (version-generated.c): ...this.
902 (xml-builtin.c): Replace with...
903 (xml-builtin-generated.c): ...this.
904 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
905 (%.c: *regformats*): Replace with...
906 (%-generated.c: *regformats*): ...this.
908 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
910 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
911 (xtensa_fill_gregset): Call collect_register_by_name for
913 (xtensa_store_gregset): Call supply_register_by_name for
916 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
918 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
919 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
920 (xtensa_store_gregset): Call supply_register for all registers in
921 a0_regnum..a0_regnum + C0_NREGS range.
923 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
925 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
926 (ax-ipa.o: ax.c): Remove.
927 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
928 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
929 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
930 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
931 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
933 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
935 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
936 (print-utils-ipa.o: ../common/print-utils.c): Remove.
937 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
938 (errors-ipa.o: ../common/errors.c): Remove.
939 (format-ipa.o: ../common/format.c): Remove.
940 (common-utils-ipa.o: ../common/common-utils.c): Remove.
942 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
944 * Makefile.in (%-ipa.o: %.c): New rule.
945 (tracepoint-ipa.o: tracepoint.c): Remove.
946 (utils-ipa.o: utils.c): Remove.
947 (remote-utils-ipa.o: remote-utils.c): Remove.
948 (regcache-ipa.o: regcache.c): Remove.
949 (i386-linux-ipa.o: i386-linux.c): Remove.
950 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
951 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
952 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
953 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
954 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
955 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
956 (amd64-linux-ipa.o: amd64-linux.c): Remove.
957 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
958 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
959 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
960 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
961 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
962 (aarch64-ipa.o: aarch64.c): Remove.
963 (s390-linux32-ipa.o: s390-linux32.c): Remove.
964 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
965 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
966 (s390-linux64-ipa.o: s390-linux64.c): Remove.
967 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
968 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
969 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
970 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
971 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
972 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
973 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
974 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
975 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
976 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
977 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
978 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
979 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
980 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
981 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
982 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
983 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
984 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
985 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
986 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
987 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
988 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
989 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
990 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
991 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
992 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
993 (tdesc-ipa.o: tdesc.c): Remove.
994 (x32-linux-ipa.o: x32-linux.c): Remove.
995 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
996 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
998 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1000 * Makefile.in (%.o: ../arch/%.c): New rule.
1001 (arm.o: ../arch/arm.c): Remove.
1002 (arm-linux.o: ../arch/arm-linux.c): Remove.
1003 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1004 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1006 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1008 * Makefile.in (%.o: ../nat/%.c): New rule.
1009 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1010 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1011 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1012 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1013 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1014 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1015 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1016 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1017 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1018 (linux-personality.o: ../nat/linux-personality.c): Remove.
1019 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1020 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1021 (x86-linux.o: ../nat/x86-linux.c): Remove.
1022 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1023 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1025 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1027 * Makefile.in (%.o: ../common/%.c): New rule.
1028 (signals.o: ../common/signals.c): Remove.
1029 (print-utils.o: ../common/print-utils.c): Remove.
1030 (rsp-low.o: ../common/rsp-low.c): Remove.
1031 (common-utils.o: ../common/common-utils.c): Remove.
1032 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1033 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1034 (vec.o: ../common/vec.c): Remove.
1035 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1036 (xml-utils.o: ../common/xml-utils.c): Remove.
1037 (ptid.o: ../common/ptid.c): Remove.
1038 (buffer.o: ../common/buffer.c): Remove.
1039 (format.o: ../common/format.c): Remove.
1040 (filestuff.o: ../common/filestuff.c): Remove.
1041 (agent.o: ../common/agent.c): Remove.
1042 (errors.o: ../common/errors.c): Remove.
1043 (environ.o: ../common/environ.c): Remove.
1044 (common-debug.o: ../common/common-debug.c): Remove.
1045 (cleanups.o: ../common/cleanups.c): Remove.
1046 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1047 (fileio.o: ../common/fileio.c): Remove.
1048 (common-regcache.o: ../common/common-regcache.c): Remove.
1049 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1050 (new-op.o: ../common/new-op.c): Remove.
1051 (btrace-common.o: ../common/btrace-common.c): Remove.
1053 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1055 * Makefile.in (%.o: ../target/%.c): New rule.
1056 (waitstatus.o: ../target/waitstatus.c): Remove.
1058 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1061 (%.c: ../regformats/%.dat,
1062 (%.c: ../regformats/arm/%.dat,
1063 (%.c: ../regformats/i386/%.dat,
1064 (%.c: ../regformats/rs6000/%.dat): New rules.
1065 (aarch64.c): Remove.
1066 (reg-arm.c): Remove.
1067 (arm-with-iwmmxt.c): Remove.
1068 (arm-with-vfpv2.c): Remove.
1069 (arm-with-vfpv3.c): Remove.
1070 (arm-with-neon.c): Remove.
1071 (reg-bfin.c): Remove.
1072 (reg-cris.c): Remove.
1073 (reg-crisv32.c): Remove.
1075 (i386-linux.c): Remove.
1076 (i386-avx.c): Remove.
1077 (i386-avx-linux.c): Remove.
1078 (i386-avx-avx512.c): Remove.
1079 (i386-avx-avx512-linux.c): Remove.
1080 (i386-mpx.c): Remove.
1081 (i386-mpx-linux.c): Remove.
1082 (i386-avx-mpx-avx512-pku.c): Remove.
1083 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1084 (i386-avx-mpx.c): Remove.
1085 (i386-avx-mpx-linux.c): Remove.
1086 (i386-mmx.c): Remove.
1087 (i386-mmx-linux.c): Remove.
1088 (reg-ia64.c): Remove.
1089 (reg-m32r.c): Remove.
1090 (reg-m68k.c): Remove.
1092 (mips-linux.c): Remove.
1093 (mips-dsp-linux.c): Remove.
1094 (mips64-linux.c): Remove.
1095 (mips64-dsp-linux.c): Remove.
1096 (nios2-linux.c): Remove.
1097 (powerpc-32.c): Remove.
1098 (powerpc-32l.c): Remove.
1099 (powerpc-altivec32l.c): Remove.
1100 (powerpc-cell32l.c): Remove.
1101 (powerpc-vsx32l.c): Remove.
1102 (powerpc-isa205-32l.c): Remove.
1103 (powerpc-isa205-altivec32l.c): Remove.
1104 (powerpc-isa205-vsx32l.c): Remove.
1105 (powerpc-e500l.c): Remove.
1106 (powerpc-64l.c): Remove.
1107 (powerpc-altivec64l.c): Remove.
1108 (powerpc-cell64l.c): Remove.
1109 (powerpc-vsx64l.c): Remove.
1110 (powerpc-isa205-64l.c): Remove.
1111 (powerpc-isa205-altivec64l.c): Remove.
1112 (powerpc-isa205-vsx64l.c): Remove.
1113 (s390-linux32.c): Remove.
1114 (s390-linux32v1.c): Remove.
1115 (s390-linux32v2.c): Remove.
1116 (s390-linux64.c): Remove.
1117 (s390-linux64v1.c): Remove.
1118 (s390-linux64v2.c): Remove.
1119 (s390-te-linux64.c): Remove.
1120 (s390-vx-linux64.c): Remove.
1121 (s390-tevx-linux64.c): Remove.
1122 (s390x-linux64.c): Remove.
1123 (s390x-linux64v1.c): Remove.
1124 (s390x-linux64v2.c): Remove.
1125 (s390x-te-linux64.c): Remove.
1126 (s390x-vx-linux64.c): Remove.
1127 (s390x-tevx-linux64.c): Remove.
1128 (tic6x-c64xp-linux.c): Remove.
1129 (tic6x-c64x-linux.c): Remove.
1130 (tic6x-c62x-linux.c): Remove.
1132 (reg-sparc64.c): Remove.
1133 (reg-spu.c): Remove.
1135 (amd64-linux.c): Remove.
1136 (amd64-avx.c): Remove.
1137 (amd64-avx-linux.c): Remove.
1138 (amd64-avx-avx512.c): Remove.
1139 (amd64-avx-avx512-linux.c): Remove.
1140 (amd64-mpx.c): Remove.
1141 (amd64-mpx-linux.c): Remove.
1142 (amd64-avx-mpx-avx512-pku.c): Remove.
1143 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1144 (amd64-avx-mpx.c): Remove.
1145 (amd64-avx-mpx-linux.c): Remove.
1147 (x32-linux.c): Remove.
1148 (x32-avx.c): Remove.
1149 (x32-avx-linux.c): Remove.
1150 (x32-avx-avx512.c): Remove.
1151 (x32-avx-avx512-linux.c): Remove.
1152 (reg-xtensa.c): Remove.
1153 (reg-tilegx.c): Remove.
1154 (reg-tilegx32.c): Remove.
1156 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1158 * Makefile.in (SFILES): Add "common/environ.c".
1159 (OBJS): Add "common/environ.h".
1161 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1163 * configure.ac: Check if the fs_base and gs_base members of
1164 `struct user_regs_struct' exist.
1165 * config.in: Regenerated.
1166 * configure: Likewise.
1168 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1170 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1172 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1173 (get_next_pcs_syscall_next_pc): Likewise.
1175 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1177 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1178 * nto-x86-low.c: Likewise.
1180 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1182 * Makefile.in: Include disable-implicit-rules.mk.
1184 2016-11-23 Pedro Alves <palves@redhat.com>
1186 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1187 (debug_vprintf): Use std::chrono::steady_clock instead of
1188 gettimeofday. Use '.' instead of ':'.
1189 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1190 (get_timestamp): Use std::chrono::steady_clock instead of
1193 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1195 * Makefile.in: Fix whitespace formatting.
1197 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1199 * Makefile.in (SFILES, OBS): Flatten list and order
1202 2016-11-23 Pedro Alves <palves@redhat.com>
1204 * event-loop.c (handle_file_event): Use warning.
1205 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1206 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1209 2016-11-23 Pedro Alves <palves@redhat.com>
1211 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1213 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1214 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1215 debug_printf and debug_flush for debug output.
1216 * server.c (handle_general_set): Likewise.
1217 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1220 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1222 * Makefile.in (.c.o): Replace rule with ...
1223 (%.o: %.c): ... this one.
1225 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1227 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1228 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1230 * configure.ac: Remove checks for the make program.
1231 * configure: Re-generate.
1233 2016-10-28 Pedro Alves <palves@redhat.com>
1235 * Makefile.in (CXX_DIALECT): Get from configure.
1236 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1237 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1238 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1239 * config.in: Regenerate.
1240 * configure: Regenerate.
1242 2016-10-27 Yao Qi <yao.qi@linaro.org>
1244 * linux-low.c (linux_supports_range_stepping): Return true if
1245 can_software_single_step return true.
1247 2016-10-27 Yao Qi <yao.qi@linaro.org>
1249 * inferiors.c (find_inferior_in_random): New function.
1250 * inferiors.h (find_inferior_in_random): Declare.
1251 * linux-low.c (linux_wait_for_event_filtered): Call
1252 find_inferior_in_random instead of find_inferior.
1254 2016-10-27 Yao Qi <yao.qi@linaro.org>
1256 * linux-low.c (linux_wait_1): If single-step breakpoints are
1257 inserted, remove them.
1259 2016-10-26 Pedro Alves <palves@redhat.com>
1261 * linux-low.c (handle_extended_wait): Link parent/child fork
1263 (linux_wait_1): Unlink them.
1264 (linux_set_resume_request): Ignore resume requests for
1265 already-resumed and unhandled fork child threads.
1266 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1267 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1269 (handle_v_requests) <vCont>: Don't call require_running.
1270 * server.h (in_queued_stop_replies): New declaration.
1272 2016-10-24 Yao Qi <yao.qi@linaro.org>
1275 * linux-aarch64-low.c (append_insns): Cast the return value to
1278 2016-10-10 Yao Qi <yao.qi@linaro.org>
1280 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1282 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1284 * target.c (target_supports_multi_process): New function, moved
1286 * target.h (target_supports_multi_process): ... here. Remove
1289 2016-10-05 Tom Tromey <tom@tromey.com>
1292 * tracepoint.c (handle_tracepoint_bkpts): Check
1293 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1295 2016-10-05 Yao Qi <yao.qi@linaro.org>
1297 * configure.srv: Update the path of arm-*.xml files.
1299 2016-10-05 Terry Guo <terry.guo@arm.com>
1300 Yao Qi <yao.qi@linaro.org>
1302 * Makefile.in: Adjust the path of rules.
1303 * configure.srv: Update the path of xml files.
1304 * regformats/arm-with-iwmmxt.dat: Regenerated.
1305 * regformats/arm-with-neon.dat: Likewise.
1306 * regformats/arm-with-vfpv2.dat: Likewise.
1307 * regformats/arm-with-vfpv3.dat Likewise.
1309 2016-09-30 Yao Qi <yao.qi@linaro.org>
1312 * target.c (target_stop_and_wait): Don't call
1313 target_continue_no_signal, use resume_stop instead.
1315 2016-09-26 Yao Qi <yao.qi@linaro.org>
1317 * linux-low.c (linux_wait_1): Call debug_exit.
1319 2016-09-23 Pedro Alves <palves@redhat.com>
1321 * Makefile.in (SFILES): Add common/new-op.c.
1322 (OBS): Add common/new-op.o.
1323 (new-op.o): New rule.
1325 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1327 * .gitinore: Ignore more files.
1329 2016-09-21 Yao Qi <yao.qi@linaro.org>
1331 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1334 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1336 * server.c (start_inferior): Call target_mourn_inferior instead of
1337 mourn_inferior; pass ptid_t argument to it.
1339 (handle_target_event): Likewise.
1340 * target.c (target_mourn_inferior): New function.
1341 * target.h (mourn_inferior): Delete macro.
1343 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1345 * linux-low.c (lwp_is_stepping): New function.
1347 2016-09-06 Carl Love <cel@us.ibm.com>
1349 * server.c (start_inferior): Fixed comment, requested comment change
1350 didn't get updated correctly. Removed reference to ptrace () call as
1351 it is only true on Linux systems.
1353 2016-09-06 Carl Love <cel@us.ibm.com>
1355 * server.c (start_inferior): Do not call
1356 function target_post_create_inferior () if the
1357 inferior process has already exited.
1359 2016-09-05 Pedro Alves <palves@redhat.com>
1361 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1362 (COMPILE.pre, CC_LD): Use CXX directly.
1363 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1364 * acinclude.m4: Don't include build-with-cxx.m4.
1365 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1366 * configure: Regenerate.
1368 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1371 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1372 call writing data to own_buf.
1374 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1376 * target.c (mywait): Call target_wait instead of
1378 (target_wait): New function.
1380 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1382 * server.c (start_inferior): New variable 'ptid'. Replace calls
1383 to the_target->resume by target_continue{,_no_signal}, depending
1385 * target.c (target_stop_and_wait): Call target_continue_no_signal
1386 instead of the_target->resume.
1387 (target_continue): New function.
1389 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1391 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1393 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1396 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1398 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1399 * linux-arm-low.c (ps_get_thread_area): Likewise.
1400 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1401 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1402 * linux-mips-low.c (ps_get_thread_area): Likewise.
1403 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1404 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1405 * linux-x86-low.c (ps_get_thread_area): Likewise.
1406 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1408 2016-08-19 Pedro Alves <palves@redhat.com>
1410 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1412 2016-08-19 Pedro Alves <palves@redhat.com>
1414 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1415 comment. Use memcpy instead of casting through unsigned long.
1417 2016-08-19 Pedro Alves <palves@redhat.com>
1419 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1420 allocating around 0x80000000.
1422 2016-08-19 Pedro Alves <palves@redhat.com>
1425 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1426 (x32-avx512-linux-ipa.o): New rules.
1427 * configure.ac (x86_64-*-linux*): New x32 check.
1428 * configure.srv (ipa_x32_linux_regobj): New.
1429 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1430 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1432 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1434 * configure: Regenerate.
1436 2016-08-09 Pedro Alves <palves@redhat.com>
1439 * Makefile.in (OBS): Add signals-state-save-restore.o.
1440 (signals-state-save-restore.o): New rule.
1441 * config.in: Regenerate.
1442 * configure: Regenerate.
1443 * linux-low.c: Include "signals-state-save-restore.h".
1444 (linux_create_inferior): Call
1445 restore_original_signals_state.
1446 * server.c: Include "dispositions-save-restore.h".
1447 (captured_main): Call save_original_signals_state.
1449 2016-08-05 Pedro Alves <palves@redhat.com>
1451 * configure: Regenerate.
1453 2016-08-04 Yao Qi <yao.qi@linaro.org>
1455 * linux-low.c (regsets_fetch_inferior_registers): Check
1456 errno is ESRCH or not.
1458 2016-08-02 Yao Qi <yao.qi@linaro.org>
1460 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1461 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1462 (thread_db_load_search): Update.
1463 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1464 td_ta_set_event and td_ta_event_getmsg.
1466 2016-07-26 Pedro Alves <palves@redhat.com>
1469 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1470 of unsigned long for 64-bit registers and use uint32_t instead of
1471 unsigned int for 32-bit registers.
1473 2016-07-26 Pedro Alves <palves@redhat.com>
1475 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1478 2016-07-21 Tom Tromey <tom@tromey.com>
1480 * configure: Rebuild.
1482 2016-07-21 Yao Qi <yao.qi@linaro.org>
1484 * mem-break.c (find_gdb_breakpoint): Cast bp to
1485 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1487 2016-07-21 Yao Qi <yao.qi@linaro.org>
1489 * server.c (handle_v_requests): Support s and S actions
1490 if target_supports_software_single_step return true.
1492 2016-07-21 Yao Qi <yao.qi@linaro.org>
1494 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1495 is resume_step, call maybe_hw_step.
1496 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1498 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1500 (proceed_one_lwp): If resume request is resume_step, install
1501 reinsert breakpoints and call maybe_hw_step.
1503 2016-07-21 Yao Qi <yao.qi@linaro.org>
1505 * linux-low.c (proceed_one_lwp): Declare.
1506 (linux_resume_one_thread): Remove local variable 'step'.
1507 Lift code enqueue signal. Call proceed_one_lwp instead of
1508 linux_resume_one_lwp.
1510 2016-07-21 Yao Qi <yao.qi@linaro.org>
1512 * linux-low.c (linux_resume_one_thread): Call
1513 enqueue_pending_signal.
1515 2016-07-21 Yao Qi <yao.qi@linaro.org>
1517 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1518 * inferiors.c (do_restore_current_thread_cleanup): New function.
1519 (make_cleanup_restore_current_thread): Likewise.
1520 * linux-low.c (install_software_single_step_breakpoints): Call
1521 make_cleanup_restore_current_thread. Switch current_thread to
1524 2016-07-21 Yao Qi <yao.qi@linaro.org>
1526 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1527 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1528 (clone_one_breakpoint): Likewise.
1529 (delete_reinsert_breakpoints): Change parameter to thread.
1531 (has_reinsert_breakpoints): Likewise.
1532 (uninsert_reinsert_breakpoints): Likewise.
1533 (reinsert_reinsert_breakpoints): Likewise.
1534 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1535 (delete_reinsert_breakpoints): Likewise.
1536 (reinsert_reinsert_breakpoints): Likewise.
1537 (uninsert_reinsert_breakpoints): Likewise.
1538 (has_reinsert_breakpoints): Likewise.
1540 2016-07-21 Yao Qi <yao.qi@linaro.org>
1542 * inferiors.c (get_thread_process): Make parameter const.
1543 * inferiors.h (get_thread_process): Update declaration.
1544 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1545 Add new parameters child_thread and parent_thread. Callers
1547 * mem-break.h (clone_all_breakpoints): Update declaration.
1549 2016-07-21 Yao Qi <yao.qi@linaro.org>
1551 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1552 <command_list, handler>: Remove.
1553 (struct gdb_breakpoint): New.
1554 (struct other_breakpoint): New.
1555 (struct reinsert_breakpoint): New.
1556 (is_gdb_breakpoint): New function.
1557 (any_persistent_commands): Update command_list if
1558 is_gdb_breakpoint returns true.
1559 (set_breakpoint): Create breakpoints according to their types.
1560 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1561 (set_gdb_breakpoint_1): Likewise.
1562 (set_gdb_breakpoint): Likewise.
1563 (clear_breakpoint_conditions): Change parameter type to
1564 'struct gdb_breakpoint *'.
1565 (clear_breakpoint_commands): Likewise.
1566 (clear_breakpoint_conditions_and_commands): Likewise.
1567 (add_condition_to_breakpoint): Likewise.
1568 (add_breakpoint_condition): Likewise.
1569 (add_commands_to_breakpoint): Likewise.
1570 (check_breakpoints): Check other_breakpoint.
1571 (clone_one_breakpoint): Clone breakpopint according to its type.
1572 * mem-break.h (struct gdb_breakpoint): Declare.
1573 (set_gdb_breakpoint): Update declaration.
1574 (clear_breakpoint_conditions_and_commands): Likewise.
1575 (add_breakpoint_condition): Likewise.
1576 (add_breakpoint_commands): Likewise.
1577 * server.c (process_point_options): Change parameter type to
1578 'struct gdb_breakpoint *'.
1580 2016-07-21 Yao Qi <yao.qi@linaro.org>
1582 * mem-break.c (set_breakpoint_at): Rename it to ...
1583 (set_breakpoint_type_at): ... it.
1584 (set_breakpoint_at): Call set_breakpoint_type_at.
1585 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1586 * mem-break.h (set_breakpoint_at): Update comments.
1588 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1590 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1592 (nios2_store_gregset): Likewise.
1594 2016-07-01 Pedro Alves <palves@redhat.com>
1595 Antoine Tremblay <antoine.tremblay@ericsson.com>
1597 * linux-low.c: Change interface to take the target lwp_info
1598 pointer directly and return void. Handle detaching from a zombie
1600 (linux_detach_lwp_callback): New function.
1601 (linux_detach): Detach from the leader thread after detaching from
1604 2016-06-28 Yao Qi <yao.qi@linaro.org>
1606 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1607 for variable new_offset.
1608 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1609 (aarch64_ftrace_insn_reloc_cb): Likewise.
1610 (aarch64_ftrace_insn_reloc_tb): Likewise.
1611 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1612 PRIx64 instead of PRIx32.
1614 2016-06-28 Yao Qi <yao.qi@linaro.org>
1616 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1617 (the_low_target): Install arm_get_syscall_trapinfo.
1619 2016-06-28 Yao Qi <yao.qi@linaro.org>
1621 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1623 (the_low_target): Install aarch64_get_syscall_trapinfo.
1625 2016-06-28 Yao Qi <yao.qi@linaro.org>
1627 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1629 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1630 Remove parameter sysno.
1631 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1634 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1636 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1637 (s390_emit_ne_goto): Likewise.
1638 (s390_emit_lt_goto): Likewise.
1639 (s390_emit_le_goto): Likewise.
1640 (s390_emit_gt_goto): Likewise.
1641 (s390_emit_ge_goto): Likewise.
1642 (s390x_emit_eq_goto): Likewise.
1643 (s390x_emit_ne_goto): Likewise.
1644 (s390x_emit_lt_goto): Likewise.
1645 (s390x_emit_le_goto): Likewise.
1646 (s390x_emit_gt_goto): Likewise.
1647 (s390x_emit_ge_goto): Likewise.
1648 (s390_emit_ops_impl): Mark variable static.
1649 (s390x_emit_ops): Likewise.
1651 2016-06-17 Yao Qi <yao.qi@linaro.org>
1653 * linux-low.c (handle_extended_wait): Call
1654 uninsert_reinsert_breakpoints for the parent process. Remove
1655 reinsert breakpoints from the child process. Reinsert them to
1656 the parent process when vfork is done.
1657 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1658 (reinsert_reinsert_breakpoints): New function.
1659 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1660 (reinsert_reinsert_breakpoints): Declare.
1662 2016-06-17 Yao Qi <yao.qi@linaro.org>
1664 * linux-low.c (handle_extended_wait): If the parent is doing
1665 step-over, remove the reinsert breakpoints from the forked child.
1667 2016-06-17 Yao Qi <yao.qi@linaro.org>
1669 * linux-low.c (unsuspend_all_lwps): Declare.
1670 (linux_low_filter_event): If thread exited, call finish_step_over.
1671 If step-over is finished, unsuspend other threads.
1673 2016-06-17 Yao Qi <yao.qi@linaro.org>
1675 * linux-low.c (linux_resume_one_lwp_throw): Assert
1676 has_reinsert_breakpoints returns false.
1677 * mem-break.c (delete_disabled_breakpoints): Assert
1678 bp type isn't reinsert_breakpoint.
1680 2016-06-17 Yao Qi <yao.qi@linaro.org>
1682 * linux-low.c (maybe_hw_step): New function.
1683 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1684 (finish_step_over): Switch current_thread to lwp temporarily,
1685 and assert has_reinsert_breakpoints returns true.
1686 (proceed_one_lwp): Call maybe_hw_step.
1687 * mem-break.c (has_reinsert_breakpoints): New function.
1688 * mem-break.h (has_reinsert_breakpoints): Declare.
1690 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1692 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1694 2016-05-17 Yao Qi <yao.qi@linaro.org>
1696 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1697 instead of find_inferior.
1699 2016-05-05 Yao Qi <yao.qi@linaro.org>
1701 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1702 Initialize res to zero.
1704 2016-05-05 Yao Qi <yao.qi@linaro.org>
1706 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1709 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1711 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1712 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1713 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1715 2016-04-28 Par Olsson <par.olsson@windriver.com>
1716 Simon Marchi <simon.marchi@ericsson.com>
1718 * tracepoint.c (write_inferior_int8): New function.
1719 (cmd_qtenable_disable): Write enable flag using
1720 write_inferior_int8.
1722 2016-04-25 Yao Qi <yao.qi@linaro.org>
1724 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1725 (need_step_over_p): Return zero if the LWP has pending signals
1726 can be delivered on software single step target.
1728 2016-04-25 Yao Qi <yao.qi@linaro.org>
1730 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1731 return instead of error.
1733 2016-04-22 Yao Qi <yao.qi@linaro.org>
1735 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1738 2016-04-22 Yao Qi <yao.qi@linaro.org>
1740 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1741 signal when stepping over breakpoint with software single
1744 2016-04-21 Pedro Alves <palves@redhat.com>
1746 * linux-s390-low.c (s390_collect_ptrace_register)
1747 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1749 (s390_check_regset): Use void * instead of gdb_byte *.
1751 2016-04-20 Pedro Alves <palves@redhat.com>
1753 * configure: Renegerate.
1755 2016-04-20 Yao Qi <yao.qi@linaro.org>
1757 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1758 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1760 (arm_store_gregset): Likewise.
1762 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1764 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1765 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1766 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1767 (amd64-avx-mpx-linux.c): New rules.
1768 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1769 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1770 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1771 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1772 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1773 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1774 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1775 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1776 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1777 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1778 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1779 * linux-x86-low.c (x86_linux_read_description): Add case for
1780 X86_XSTATE_AVX_MPX_MASK.
1781 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1782 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1783 init_registers_i386_avx_mpx_linux.
1784 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1785 (initialize_low_tracepoint): Call
1786 init_registers_i386_avx_mpx_linux.
1787 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1788 (initialize_low_tracepoint): Call
1789 init_registers_amd64_avx_mpx_linux.
1790 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1791 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1792 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1795 2016-04-18 Pedro Alves <palves@redhat.com>
1797 * configure: Regenerate.
1799 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1801 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1802 (aarch64_emit_sub): Likewise.
1804 2016-04-12 Pedro Alves <palves@redhat.com>
1806 * utils.c (prepare_to_throw_exception): Delete.
1808 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1810 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1812 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1814 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1816 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1818 * linux-aarch64-ipa.c: Add <elf.h> include.
1819 * linux-ppc-ipa.c: Add <elf.h> include.
1820 * linux-s390-ipa.c: Add <elf.h> include.
1822 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1824 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1825 (get_raw_reg_ptr): Likewise.
1826 (get_trace_state_variable_value_ptr): Likewise.
1827 (set_trace_state_variable_value_ptr): Likewise.
1828 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1831 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1832 Marcin Kościelnicki <koriakin@0x04.net>
1835 * linux-ppc-low.c (emit_insns): New function.
1836 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1837 (ppc_emit_prologue): New function.
1838 (ppc_emit_epilogue): New function.
1839 (ppc_emit_add): New function.
1840 (ppc_emit_sub): New function.
1841 (ppc_emit_mul): New function.
1842 (ppc_emit_lsh): New function.
1843 (ppc_emit_rsh_signed): New function.
1844 (ppc_emit_rsh_unsigned): New function.
1845 (ppc_emit_ext): New function.
1846 (ppc_emit_zero_ext): New function.
1847 (ppc_emit_log_not): New function.
1848 (ppc_emit_bit_and): New function.
1849 (ppc_emit_bit_or): New function.
1850 (ppc_emit_bit_xor): New function.
1851 (ppc_emit_bit_not): New function.
1852 (ppc_emit_equal): New function.
1853 (ppc_emit_less_signed): New function.
1854 (ppc_emit_less_unsigned): New function.
1855 (ppc_emit_ref): New function.
1856 (ppc_emit_const): New function.
1857 (ppc_emit_reg): New function.
1858 (ppc_emit_pop): New function.
1859 (ppc_emit_stack_flush): New function.
1860 (ppc_emit_swap): New function.
1861 (ppc_emit_stack_adjust): New function.
1862 (ppc_emit_call): New function.
1863 (ppc_emit_int_call_1): New function.
1864 (ppc_emit_void_call_2): New function.
1865 (ppc_emit_if_goto): New function.
1866 (ppc_emit_goto): New function.
1867 (ppc_emit_eq_goto): New function.
1868 (ppc_emit_ne_goto): New function.
1869 (ppc_emit_lt_goto): New function.
1870 (ppc_emit_le_goto): New function.
1871 (ppc_emit_gt_goto): New function.
1872 (ppc_emit_ge_goto): New function.
1873 (ppc_write_goto_address): New function.
1874 (ppc_emit_ops_impl): New static variable.
1875 (ppc64v1_emit_prologue): New function.
1876 (ppc64v2_emit_prologue): New function.
1877 (ppc64_emit_epilogue): New function.
1878 (ppc64_emit_add): New function.
1879 (ppc64_emit_sub): New function.
1880 (ppc64_emit_mul): New function.
1881 (ppc64_emit_lsh): New function.
1882 (ppc64_emit_rsh_signed): New function.
1883 (ppc64_emit_rsh_unsigned): New function.
1884 (ppc64_emit_ext): New function.
1885 (ppc64_emit_zero_ext): New function.
1886 (ppc64_emit_log_not): New function.
1887 (ppc64_emit_bit_and): New function.
1888 (ppc64_emit_bit_or): New function.
1889 (ppc64_emit_bit_xor): New function.
1890 (ppc64_emit_bit_not): New function.
1891 (ppc64_emit_equal): New function.
1892 (ppc64_emit_less_signed): New function.
1893 (ppc64_emit_less_unsigned): New function.
1894 (ppc64_emit_ref): New function.
1895 (ppc64_emit_const): New function.
1896 (ppc64v1_emit_reg): New function.
1897 (ppc64v2_emit_reg): New function.
1898 (ppc64_emit_pop): New function.
1899 (ppc64_emit_stack_flush): New function.
1900 (ppc64_emit_swap): New function.
1901 (ppc64v1_emit_call): New function.
1902 (ppc64v2_emit_call): New function.
1903 (ppc64v1_emit_int_call_1): New function.
1904 (ppc64v2_emit_int_call_1): New function.
1905 (ppc64v1_emit_void_call_2): New function.
1906 (ppc64v2_emit_void_call_2): New function.
1907 (ppc64_emit_if_goto): New function.
1908 (ppc64_emit_eq_goto): New function.
1909 (ppc64_emit_ne_goto): New function.
1910 (ppc64_emit_lt_goto): New function.
1911 (ppc64_emit_le_goto): New function.
1912 (ppc64_emit_gt_goto): New function.
1913 (ppc64_emit_ge_goto): New function.
1914 (ppc64v1_emit_ops_impl): New static variable.
1915 (ppc64v2_emit_ops_impl): New static variable.
1916 (ppc_emit_ops): New function.
1917 (linux_low_target): Wire in ppc_emit_ops.
1919 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1920 Marcin Kościelnicki <koriakin@0x04.net>
1923 * Makefile.in: Add powerpc-*-ipa.o
1924 * configure.srv: Add ipa_obj for powerpc*-linux.
1925 * linux-ppc-ipa.c: New file.
1926 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1928 (PPC_FIELD): New macro.
1929 (PPC_SEXT): New macro.
1930 (PPC_OP6): New macro.
1931 (PPC_BO): New macro.
1932 (PPC_LI): New macro.
1933 (PPC_BD): New macro.
1934 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1935 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1936 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1937 (ppc_get_thread_area): New function.
1938 (is_elfv2_inferior): New function.
1939 (gen_ds_form): New function.
1940 (GEN_STD): New macro.
1941 (GEN_STDU): New macro.
1942 (GEN_LD): New macro.
1943 (GEN_LDU): New macro.
1944 (gen_d_form): New function.
1945 (GEN_ADDI): New macro.
1946 (GEN_ADDIS): New macro.
1947 (GEN_LI): New macro.
1948 (GEN_LIS): New macro.
1949 (GEN_ORI): New macro.
1950 (GEN_ORIS): New macro.
1951 (GEN_LWZ): New macro.
1952 (GEN_STW): New macro.
1953 (GEN_STWU): New macro.
1954 (gen_xfx_form): New function.
1955 (GEN_MFSPR): New macro.
1956 (GEN_MTSPR): New macro.
1957 (GEN_MFCR): New macro.
1958 (GEN_MTCR): New macro.
1959 (GEN_SYNC): New macro.
1960 (GEN_LWSYNC): New macro.
1961 (gen_x_form): New function.
1962 (GEN_OR): New macro.
1963 (GEN_MR): New macro.
1964 (GEN_LWARX): New macro.
1965 (GEN_STWCX): New macro.
1966 (GEN_CMPW): New macro.
1967 (gen_md_form): New function.
1968 (GEN_RLDICL): New macro.
1969 (GEN_RLDICR): New macro.
1970 (gen_i_form): New function.
1972 (GEN_BL): New macro.
1973 (gen_b_form): New function.
1974 (GEN_BNE): New macro.
1975 (GEN_LOAD): New macro.
1976 (GEN_STORE): New macro.
1977 (gen_limm): New function.
1978 (gen_atomic_xchg): New function.
1979 (gen_call): New function.
1980 (ppc_relocate_instruction): New function.
1981 (ppc_install_fast_tracepoint_jump_pad): New function.
1982 (ppc_get_min_fast_tracepoint_insn_len): New function.
1983 (ppc_get_ipa_tdesc_idx): New function.
1984 (the_low_target): Wire in the new functions.
1985 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1987 * linux-ppc-tdesc.h: New file.
1989 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1991 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1992 (alloc_jump_pad_buffer): New function.
1993 * linux-amd64-ipa.c: Add <sys/mman.h> include.
1994 (alloc_jump_pad_buffer): New function.
1995 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1996 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1997 (alloc_jump_pad_buffer): New function.
1998 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1999 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2000 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2001 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2003 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2005 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2006 * linux-amd64-ipa.c: Likewise.
2007 * linux-i386-ipa.c: Likewise.
2008 * linux-s390-ipa.c: Likewise.
2009 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2010 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2011 set_trace_state_variable_value_ptr.
2012 (struct ipa_sym_addresses): Likewise.
2013 (symbol_list): Likewise.
2014 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2015 accessing gdb_collect directly.
2016 (gdb_collect_ptr_type): New typedef.
2017 (get_raw_reg_ptr_type): New typedef.
2018 (get_trace_state_variable_value_ptr_type): New typedef.
2019 (set_trace_state_variable_value_ptr_type): New typedef.
2020 (gdb_collect_ptr): New global.
2021 (get_raw_reg_ptr): New global.
2022 (get_trace_state_variable_value_ptr): New global.
2023 (set_trace_state_variable_value_ptr): New global.
2024 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2025 accessing get_raw_reg directly.
2026 (get_get_tsv_func_addr): Likewise for
2027 get_trace_state_variable_value_ptr.
2028 (get_set_tsv_func_addr): Likewise for
2029 set_trace_state_variable_value_ptr.
2030 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2032 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2034 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2036 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2038 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2040 (relocate_instruction): Remove own_buf.
2041 * server.c (own_buf): Make global.
2042 (handle_v_requests): Make global.
2043 * server.h (own_buf): New declaration.
2044 (handle_v_requests): New prototype.
2046 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2049 * linux-s390-low.c (add_insns): New function.
2050 (s390_emit_prologue): New function.
2051 (s390_emit_epilogue): New function.
2052 (s390_emit_add): New function.
2053 (s390_emit_sub): New function.
2054 (s390_emit_mul): New function.
2055 (s390_emit_lsh): New function.
2056 (s390_emit_rsh_signed): New function.
2057 (s390_emit_rsh_unsigned): New function.
2058 (s390_emit_ext): New function.
2059 (s390_emit_log_not): New function.
2060 (s390_emit_bit_and): New function.
2061 (s390_emit_bit_or): New function.
2062 (s390_emit_bit_xor): New function.
2063 (s390_emit_bit_not): New function.
2064 (s390_emit_equal): New function.
2065 (s390_emit_less_signed): New function.
2066 (s390_emit_less_unsigned): New function.
2067 (s390_emit_ref): New function.
2068 (s390_emit_if_goto): New function.
2069 (s390_emit_goto): New function.
2070 (s390_write_goto_address): New function.
2071 (s390_emit_litpool): New function.
2072 (s390_emit_const): New function.
2073 (s390_emit_call): New function.
2074 (s390_emit_reg): New function.
2075 (s390_emit_pop): New function.
2076 (s390_emit_stack_flush): New function.
2077 (s390_emit_zero_ext): New function.
2078 (s390_emit_swap): New function.
2079 (s390_emit_stack_adjust): New function.
2080 (s390_emit_set_r2): New function.
2081 (s390_emit_int_call_1): New function.
2082 (s390_emit_void_call_2): New function.
2083 (s390_emit_eq_goto): New function.
2084 (s390_emit_ne_goto): New function.
2085 (s390_emit_lt_goto): New function.
2086 (s390_emit_le_goto): New function.
2087 (s390_emit_gt_goto): New function.
2088 (s390_emit_ge_goto): New function.
2089 (s390x_emit_prologue): New function.
2090 (s390x_emit_epilogue): New function.
2091 (s390x_emit_add): New function.
2092 (s390x_emit_sub): New function.
2093 (s390x_emit_mul): New function.
2094 (s390x_emit_lsh): New function.
2095 (s390x_emit_rsh_signed): New function.
2096 (s390x_emit_rsh_unsigned): New function.
2097 (s390x_emit_ext): New function.
2098 (s390x_emit_log_not): New function.
2099 (s390x_emit_bit_and): New function.
2100 (s390x_emit_bit_or): New function.
2101 (s390x_emit_bit_xor): New function.
2102 (s390x_emit_bit_not): New function.
2103 (s390x_emit_equal): New function.
2104 (s390x_emit_less_signed): New function.
2105 (s390x_emit_less_unsigned): New function.
2106 (s390x_emit_ref): New function.
2107 (s390x_emit_if_goto): New function.
2108 (s390x_emit_const): New function.
2109 (s390x_emit_call): New function.
2110 (s390x_emit_reg): New function.
2111 (s390x_emit_pop): New function.
2112 (s390x_emit_stack_flush): New function.
2113 (s390x_emit_zero_ext): New function.
2114 (s390x_emit_swap): New function.
2115 (s390x_emit_stack_adjust): New function.
2116 (s390x_emit_int_call_1): New function.
2117 (s390x_emit_void_call_2): New function.
2118 (s390x_emit_eq_goto): New function.
2119 (s390x_emit_ne_goto): New function.
2120 (s390x_emit_lt_goto): New function.
2121 (s390x_emit_le_goto): New function.
2122 (s390x_emit_gt_goto): New function.
2123 (s390x_emit_ge_goto): New function.
2124 (s390_emit_ops): New function.
2125 (struct linux_target_ops): Fill in emit_ops hook.
2127 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2130 * Makefile.in: Add s390 IPA files.
2131 * configure.srv: Build IPA for s390.
2132 * linux-s390-ipa.c: New file.
2133 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2134 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2135 (tdesc_s390_linux32): Likewise.
2136 (init_registers_s390_linux32v1): Likewise.
2137 (tdesc_s390_linux32v1): Likewise.
2138 (init_registers_s390_linux32v2): Likewise.
2139 (tdesc_s390_linux32v2): Likewise.
2140 (init_registers_s390_linux64): Likewise.
2141 (tdesc_s390_linux64): Likewise.
2142 (init_registers_s390_linux64v1): Likewise.
2143 (tdesc_s390_linux64v1): Likewise.
2144 (init_registers_s390_linux64v2): Likewise.
2145 (tdesc_s390_linux64v2): Likewise.
2146 (init_registers_s390_te_linux64): Likewise.
2147 (tdesc_s390_te_linux64): Likewise.
2148 (init_registers_s390_vx_linux64): Likewise.
2149 (tdesc_s390_vx_linux64): Likewise.
2150 (init_registers_s390_tevx_linux64): Likewise.
2151 (tdesc_s390_tevx_linux64): Likewise.
2152 (init_registers_s390x_linux64): Likewise.
2153 (tdesc_s390x_linux64): Likewise.
2154 (init_registers_s390x_linux64v1): Likewise.
2155 (tdesc_s390x_linux64v1): Likewise.
2156 (init_registers_s390x_linux64v2): Likewise.
2157 (tdesc_s390x_linux64v2): Likewise.
2158 (init_registers_s390x_te_linux64): Likewise.
2159 (tdesc_s390x_te_linux64): Likewise.
2160 (init_registers_s390x_vx_linux64): Likewise.
2161 (tdesc_s390x_vx_linux64): Likewise.
2162 (init_registers_s390x_tevx_linux64): Likewise.
2163 (tdesc_s390x_tevx_linux64): Likewise.
2164 (have_hwcap_s390_vx): New static variable.
2165 (s390_arch_setup): Fill have_hwcap_s390_vx.
2166 (s390_get_thread_area): New function.
2167 (s390_ft_entry_gpr_esa): New const.
2168 (s390_ft_entry_gpr_zarch): New const.
2169 (s390_ft_entry_misc): New const.
2170 (s390_ft_entry_fr): New const.
2171 (s390_ft_entry_vr): New const.
2172 (s390_ft_main_31): New const.
2173 (s390_ft_main_64): New const.
2174 (s390_ft_exit_fr): New const.
2175 (s390_ft_exit_vr): New const.
2176 (s390_ft_exit_misc): New const.
2177 (s390_ft_exit_gpr_esa): New const.
2178 (s390_ft_exit_gpr_zarch): New const.
2179 (append_insns): New function.
2180 (s390_relocate_instruction): New function.
2181 (s390_install_fast_tracepoint_jump_pad): New function.
2182 (s390_get_min_fast_tracepoint_insn_len): New function.
2183 (s390_get_ipa_tdesc_idx): New function.
2184 (struct linux_target_ops): Wire in the above functions.
2185 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2186 * linux-s390-tdesc.h: New file.
2188 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2190 * linux-s390-low.c (s390_supports_tracepoints): New function.
2191 (struct linux_target_ops): Fill supports_tracepoints hook.
2193 2016-03-18 Yao Qi <yao.qi@linaro.org>
2195 * linux-low.c (lwp_signal_can_be_delivered): New function.
2196 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2198 2016-03-18 Yao Qi <yao.qi@linaro.org>
2200 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2201 0 if signal is enqueued. Remove 'signal' from one debugging
2202 message. Move one debugging message to some lines below.
2203 Remove code setting 'signal' to 0.
2205 2016-03-18 Yao Qi <yao.qi@linaro.org>
2207 * linux-low.c (linux_low_filter_event): Remove redundant
2208 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2210 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2212 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2213 (struct linux_target_ops): Wire in the above.
2215 2016-03-03 Yao Qi <yao.qi@linaro.org>
2217 * linux-low.c: Update comments to start_step_over.
2219 2016-03-03 Yao Qi <yao.qi@linaro.org>
2222 * linux-low.c (handle_extended_wait): Set child suspended
2223 if event_lwp->bp_reinsert isn't zero.
2225 2016-03-02 Yao Qi <yao.qi@linaro.org>
2227 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2228 enqueue_pending_signal.
2230 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2232 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2235 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2237 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2238 (s390_regmap_3264) [!__s390x__]: New global.
2239 (s390_collect_ptrace_register): Skip map entries containing -1.
2240 (s390_supply_ptrace_register): Ditto.
2241 (s390_fill_gprs_high): New function.
2242 (s390_store_gprs_high): New function.
2243 (s390_regsets): Add NT_S390_HIGH_GPRS.
2244 (s390_get_hwcap): Enable on 31-bit.
2245 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2246 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2247 Detect NT_S390_HIGH_GPRS.
2248 (s390_usrregs_info_3264): Enable on 31-bit.
2249 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2250 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2252 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2255 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2256 * configure.srv: Ditto.
2257 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2258 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2259 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2260 (init_registers_amd64_linux): Remove prototype.
2261 (tdesc_amd64_linux): Remove declaration.
2262 (get_ipa_tdesc): New function.
2263 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2264 initialize remaining tdescs.
2265 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2266 (init_registers_i386_linux): Remove prototype.
2267 (tdesc_i386_linux): Remove declaration.
2268 (get_ipa_tdesc): New function.
2269 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2270 initialize remaining tdescs.
2271 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2272 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2273 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2274 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2275 (x86_get_ipa_tdesc_idx): New function.
2276 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2277 * linux-x86-tdesc.h: New file.
2278 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2279 (target_get_ipa_tdesc_idx): New macro.
2280 * tracepoint.c (ipa_tdesc_idx): New macro.
2281 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2282 (symbol_list): Add ipa_tdesc_idx.
2283 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2284 (ipa_tdesc): Remove.
2285 (ipa_tdesc_idx): New variable.
2286 (get_context_regcache): Use get_ipa_tdesc.
2287 (gdb_collect): Ditto.
2289 * tracepoint.h (get_ipa_tdesc): New prototype.
2290 (ipa_tdesc): Remove.
2292 2016-02-24 Pedro Alves <palves@redhat.com>
2294 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2295 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2296 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2297 Factor out common code between the USE_SIGTRAP_SIGINFO and
2298 !USE_SIGTRAP_SIGINFO blocks.
2299 (linux_low_filter_event): Call save_stop_reason instead of
2300 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2302 (linux_wait_1): Update comments.
2304 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2306 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2307 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2308 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2309 ppc_insert_point, ppc_remove_point.
2311 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2313 * linux-s390-low.c (s390_supports_z_point_type): New function.
2314 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2316 2016-02-16 Yao Qi <yao.qi@linaro.org>
2318 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2319 PC. Get pc from regcache_read_pc.
2321 2016-02-12 Yao Qi <yao.qi@linaro.org>
2323 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2324 or linux_get_pc_32bit.
2325 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2327 2016-02-12 Yao Qi <yao.qi@linaro.org>
2329 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2330 arm_linux_get_next_pcs_fixup.
2332 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2334 * tracepoint.c (x_tracepoint_action_download): Change
2335 write_inferior_data_ptr to write_inferior_data_pointer.
2336 (cmd_qtstart): Likewise.
2337 (write_inferior_data_ptr): Remove.
2338 (download_agent_expr): Change write_inferior_data_ptr to
2339 write_inferior_data_pointer.
2340 (download_tracepoint_1): Likewise.
2341 (download_tracepoint): Likewise.
2342 (download_trace_state_variables): Likewise.
2344 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2345 Marcin Kościelnicki <koriakin@0x04.net>
2347 * tracepoint.c (struct tracepoint_action_ops): Remove.
2348 (struct tracepoint_action): Remove ops.
2349 (m_tracepoint_action_download, r_tracepoint_action_download)
2350 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2351 size and offset accordingly.
2352 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2353 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2354 (tracepoint_action_send, tracepoint_action_download): New functions.
2355 Helpers for trace action handlers.
2356 (add_tracepoint_action): Remove setup actions ops.
2357 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2359 2016-02-10 Yao Qi <yao.qi@linaro.org>
2361 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2363 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2365 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2367 * configure: Regenerate.
2369 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2371 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2372 void * to gdb_byte *.
2373 * linux-low.c (siginfo_fixup): Likewise.
2374 (linux_xfer_siginfo): Likewise.
2375 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2377 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2379 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2381 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2383 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2385 * linux-x86-low.c [__x86_64__]: Include
2386 "nat/amd64-linux-siginfo.h".
2387 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2388 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2389 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2390 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2391 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2392 (cpt_si_fd, si_timerid, si_overrun): Move from
2393 nat/amd64-linux-siginfo.c.
2394 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2396 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2398 * server.c (skip_to_semicolon): Remove.
2399 (process_point_options): Use strchrnul instead of
2402 2016-01-26 Yao Qi <yao.qi@linaro.org>
2404 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2405 * linux-low.c (install_software_single_step_breakpoints): Don't
2406 call regcache_read_pc.
2407 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2410 2016-01-26 Yao Qi <yao.qi@linaro.org>
2412 * linux-low.c (install_software_single_step_breakpoints): Call
2413 regcache_read_pc instead of get_pc.
2415 2016-01-26 Yao Qi <yao.qi@linaro.org>
2417 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2418 (unblock_async_io): Rename to ...
2419 (block_unblock_async_io): ... it. New function.
2420 (enable_async_io): Don't install SIGIO handler. Unblock it
2422 (disable_async_io): Don't ignore SIGIO. Block it instead.
2423 (initialize_async_io): Install SIGIO handler. Don't call
2426 2016-01-26 Yao Qi <yao.qi@linaro.org>
2428 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2429 first character is '\003', call *the_target->request_interrupt.
2431 2016-01-25 Yao Qi <yao.qi@linaro.org>
2433 * remote-utils.c (new_thread_notify): Remove.
2434 (dead_thread_notify): Likewise.
2435 * remote-utils.h (new_thread_notify): Remove declaration.
2436 (dead_thread_notify): Likewise.
2438 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2440 * gdb.trace/pending.exp: Fix expected message on continue.
2442 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2444 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2445 it works properly on big-endian machines where sizeof (CORE_ADDR)
2448 2016-01-21 Pedro Alves <palves@redhat.com>
2450 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2451 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2452 * configure: Regenerate.
2454 2016-01-21 Yao Qi <yao.qi@linaro.org>
2456 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2457 is_thumb and set it according to CPSR saved on the stack.
2458 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2459 arm_sigreturn_next_pc.
2461 2016-01-18 Yao Qi <yao.qi@linaro.org>
2463 * linux-low.c (linux_set_pc_64bit): New function.
2464 (linux_get_pc_64bit): New function.
2465 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2467 * linux-sparc-low.c (debug_threads): Remove declaration.
2468 (sparc_get_pc): Remove.
2469 (the_low_target): Use linux_get_pc_64bit instead of
2471 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2472 (the_low_target): Use linux_get_pc_64bit and
2475 2016-01-18 Yao Qi <yao.qi@linaro.org>
2477 * linux-arm-low.c (debug_threads): Remove declaration.
2478 (arm_get_pc, arm_set_pc): Remove.
2479 (the_low_target): Use linux_get_pc_32bit and
2481 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2482 (the_low_target): Use linux_get_pc_32bit and
2484 * linux-cris-low.c (debug_threads): Remove declaration.
2485 (cris_get_pc, cris_set_pc,): Remove.
2486 (the_low_target): Use linux_get_pc_32bit and
2488 * linux-crisv32-low.c (debug_threads): Remove declaration.
2489 (cris_get_pc, cris_set_pc): Remove.
2490 (the_low_target): Use linux_get_pc_32bit and
2492 * linux-low.c: Include inttypes.h.
2493 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2494 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2495 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2496 (the_low_target): Use linux_get_pc_32bit and
2498 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2499 (the_low_target): Use linux_get_pc_32bit and
2501 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2502 (the_low_target): Use linux_get_pc_32bit and
2504 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2505 (the_low_target): Use linux_get_pc_32bit and
2507 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2508 (the_low_target): Use linux_get_pc_32bit and
2511 2016-01-18 Gary Benson <gbenson@redhat.com>
2513 * configure.ac (AC_FUNC_FORK): New check.
2514 * config.in: Regenerate.
2515 * configure: Likewise.
2517 2016-01-14 Yao Qi <yao.qi@linaro.org>
2519 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2520 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2521 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2522 arm_get_next_pcs_ctor.
2524 2016-01-12 Josh Stone <jistone@redhat.com>
2525 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2527 * inferiors.h: Include "gdb_vecs.h".
2528 (struct process_info): Add syscalls_to_catch.
2529 * inferiors.c (remove_process): Free syscalls_to_catch.
2530 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2531 syscall_return stops.
2532 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2533 * server.c (handle_general_set): Handle QCatchSyscalls.
2534 (handle_query): Report support for QCatchSyscalls.
2535 * target.h (struct target_ops): Add supports_catch_syscall.
2536 (target_supports_catch_syscall): New macro.
2537 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2538 (struct lwp_info): Add syscall_state.
2539 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2540 Maintain syscall_state and syscalls_to_catch across exec.
2541 (get_syscall_trapinfo): New function, proxy to the_low_target.
2542 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2543 (linux_low_filter_event): Toggle syscall_state entry/return for
2544 syscall traps, and set it ignored for all others.
2545 (gdb_catching_syscalls_p): New function.
2546 (gdb_catch_this_syscall_p): New function.
2547 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2548 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2549 (linux_supports_catch_syscall): New function.
2550 (linux_target_ops): Install it.
2551 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2552 (the_low_target): Install it.
2554 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2556 * acinclude.m4: Include new ../warning.m4 file.
2557 * configure: Regenerated.
2558 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2560 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2562 * ax.c (is_goto_target): Mark static.
2563 * linux-low.c (register_addr): Likewise.
2564 (linux_fetch_registers, linux_store_registers): Likewise.
2565 * mem-break.c (any_persistent_commands): Fix old prototype.
2566 (add_commands_to_breakpoint): Mark static.
2567 * regcache.c (find_register_by_name): Delete unused func.
2568 * remote-utils.c (hex_or_minus_one): Mark static.
2569 * server.c (monitor_show_help): Mark static.
2570 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2571 handle_v_requests): Likewise.
2573 2016-01-12 Pedro Alves <palves@redhat.com>
2575 Remove use of the registered trademark symbol throughout.
2577 2016-01-08 Yao Qi <yao.qi@linaro.org>
2579 * remote-utils.c (getpkt): If c is '\003', call target hook
2582 2016-01-06 Yao Qi <yao.qi@linaro.org>
2584 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2585 linux-aarch32-low.c.
2586 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2587 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2588 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2589 (thumb2_breakpoint): Declare.
2590 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2591 linux-aarch32-low.h.
2592 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2593 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2594 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2596 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2598 * gdbreplay.c (gdbreplay_version): Change copyright year in
2600 * server.c (gdbserver_version): Likewise.
2602 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2604 * server.c (crc32_table): Delete.
2605 (crc32): Use libiberty's xcrc32 function.
2607 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2609 * lynx-low.c (lynx_delete_thread_callback): New function.
2610 (lynx_mourn): Properly delete our process and all of its
2611 threads. Remove call to clear_inferiors.
2613 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2615 * target.c (thread_search_callback): Add check that
2616 the thread_stopped target callback is not NULL before
2619 2015-12-21 Yao Qi <yao.qi@linaro.org>
2621 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2624 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2626 * server.c (handle_query): Call target_supports_software_single_step.
2628 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2630 * linux-low.c (single_step): New function.
2631 (linux_resume_one_lwp_throw): Call single_step.
2632 (start_step_over): Likewise.
2634 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2636 * Makefile.in (SFILES): Append arch/arm-linux.c,
2637 arch/arm-get-next-pcs.c.
2638 (arm-linux.o): New rule.
2639 (arm-get-next-pcs.o): New rule.
2640 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2642 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2643 to linux-aarch32-low.c.
2644 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2645 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2646 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2647 (thumb2_breakpoint_len): Likewise.
2648 (arm_is_thumb_mode): Make non-static.
2649 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2650 from linux-aarch32-low.c.
2651 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2652 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2653 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2654 (thumb2_breakpoint_len): Likewise.
2655 (arm_is_thumb_mode): New declaration.
2656 * linux-arm-low.c: Include arch/arm-linux.h
2657 aarch/arm-get-next-pcs.h, sys/syscall.h.
2658 (get_next_pcs_ops): New struct.
2659 (get_next_pcs_addr_bits_remove): New function.
2660 (get_next_pcs_is_thumb): New function.
2661 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2662 (arm_sigreturn_next_pc): Likewise.
2663 (get_next_pcs_syscall_next_pc): Likewise.
2664 (arm_gdbserver_get_next_pcs): Likewise.
2665 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2667 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2668 * server.h: Include gdb_vecs.h.
2670 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2672 * Makefile.in (SFILES): Append common/common-regcache.c.
2673 (OBS): Append common-regcache.o.
2674 (common-regcache.o): New rule.
2675 * regcache.c (init_register_cache): Initialize cache to
2677 (regcache_raw_read_unsigned): New function.
2678 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2679 register_status enum.
2681 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2683 * linux-aarch64-low.c (the_low_targets): Rename
2684 breakpoint_reinsert_addr to get_next_pcs.
2685 * linux-arm-low.c (the_low_targets): Likewise.
2686 * linux-bfin-low.c (the_low_targets): Likewise.
2687 * linux-cris-low.c (the_low_targets): Likewise.
2688 * linux-crisv32-low.c (the_low_targets): Likewise.
2689 * linux-low.c (can_software_single_step): Likewise.
2690 (install_software_single_step_breakpoints): New function.
2691 (start_step_over): Use install_software_single_step_breakpoints.
2692 * linux-low.h: New CORE_ADDR vector.
2693 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2695 * linux-mips-low.c (the_low_targets): Likewise.
2696 * linux-nios2-low.c (the_low_targets): Likewise.
2697 * linux-sparc-low.c (the_low_targets): Likewise.
2699 2015-12-17 Pedro Alves <palves@redhat.com>
2701 * linux-low.c (linux_kill_one_lwp): Remove references to
2703 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2705 (linux_init_signals): Delete.
2706 (initialize_low): Adjust.
2707 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2709 2015-12-16 Pedro Alves <palves@redhat.com>
2711 * configure.ac (compiler warning flags): When testing a
2712 -Wno-foo option, check whether -Wfoo works instead.
2713 * configure: Regenerate.
2715 2015-12-11 Don Breazeal <donb@codesourcery.com>
2717 * server.c (process_serial_event): Don't exit from gdbserver
2718 in remote mode if there are still active inferiors.
2720 2015-12-11 Yao Qi <yao.qi@linaro.org>
2722 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2723 arm_breakpoint_at if the process is 32-bit.
2725 2015-12-11 Yao Qi <yao.qi@linaro.org>
2727 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2730 2015-12-07 Yao Qi <yao.qi@linaro.org>
2732 * configure.srv: Append arm.o to srv_tgtobj for
2733 aarch64*-*-linux* target.
2734 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2735 from linux-arm-low.c.
2736 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2737 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2738 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2739 (thumb2_breakpoint_len): Likewise.
2740 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2741 (arm_breakpoint_kinds): Likewise.
2742 (arm_breakpoint_kind_from_pc): Likewise.
2743 (arm_sw_breakpoint_from_kind): Likewise.
2744 (arm_breakpoint_kind_from_current_state): Likewise.
2745 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2746 (arm_sw_breakpoint_from_kind): Declare.
2747 (arm_breakpoint_kind_from_current_state): Declare.
2748 (arm_breakpoint_at): Declare.
2749 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2750 arm_sw_breakpoint_from_kind if process is 32-bit.
2751 (aarch64_breakpoint_kind_from_pc): New function.
2752 (aarch64_breakpoint_kind_from_current_state): New function.
2753 (the_low_target): Initialize fields breakpoint_kind_from_pc
2754 and breakpoint_kind_from_current_state.
2755 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2756 linux-aarch32-low.c.
2757 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2758 (arm_breakpoint, arm_breakpoint_len): Likewise.
2759 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2760 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2761 (arm_is_thumb_mode): Likewise.
2762 (arm_breakpoint_at): Likewise.
2763 (arm_breakpoint_kind_from_pc): Likewise.
2764 (arm_sw_breakpoint_from_kind): Likewise.
2765 (arm_breakpoint_kind_from_current_state): Likewise.
2768 2015-08-04 Yao Qi <yao.qi@linaro.org>
2770 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2771 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2772 * server.c (extended_protocol): Remove "static".
2773 * server.h (extended_protocol): Declare it.
2775 2015-12-04 Josh Stone <jistone@redhat.com>
2777 * target.h (struct target_ops) <arch_setup>: Rename to ...
2778 (struct target_ops) <post_create_inferior>: ... this.
2779 (target_arch_setup): Rename to ...
2780 (target_post_create_inferior): ... this, calling post_create_inferior.
2781 * server.c (start_inferior): Update target_arch_setup calls to
2782 target_post_create_inferior.
2783 * linux-low.c (linux_low_ptrace_options): Forward declare.
2784 (linux_arch_setup): Update its comment for general use.
2785 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2786 (struct linux_target_ops): Use linux_post_create_inferior.
2787 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2788 to post_create_inferior.
2789 * nto-low.c (struct nto_target_ops): Likewise.
2790 * spu-low.c (struct spu_target_ops): Likewise.
2791 * win32-low.c (struct win32_target_ops): Likewise.
2793 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2795 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2797 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2799 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2800 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2801 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2802 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2803 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2804 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2805 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2806 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2807 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2808 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2809 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2810 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2812 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2814 * linux-low.c (linux_look_up_symbols): Don't call
2815 linux_supports_traceclone.
2816 * linux-low.h (thread_db_init): Remove use_events argument.
2817 * thread-db.c (thread_db_use_event): Remove global variable.
2818 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2819 (struct thread_db) <td_create_bp>: Remove field.
2820 (thread_db_create_event): Remove function.
2821 (thread_db_enable_reporting): Likewise.
2822 (find_one_thread): Don't check for thread_db_use_events.
2823 (attach_thread): Likewise.
2824 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2825 (try_thread_db_load_1): Don't check for thread_db_use_events.
2826 (thread_db_init): Remove use_events argument and thread events
2828 (remove_thread_event_breakpoints): Remove function.
2829 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2831 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2833 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2835 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2836 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2837 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2838 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2839 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2841 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2843 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2844 * linux-low.c (can_hardware_single_step): Use
2845 supports_hardware_single_step.
2846 (can_software_single_step): New function.
2847 (start_step_over): Call can_software_single_step.
2848 (linux_supports_hardware_single_step): New function.
2849 (struct target_ops) <supports_software_single_step>: Initialize.
2850 * linux-low.h (struct linux_target_ops)
2851 <supports_hardware_single_step>: Initialize.
2852 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2853 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2854 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2855 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2856 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2857 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2858 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2859 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2860 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2861 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2863 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2864 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2866 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2867 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2868 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2870 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2871 * target.h (struct target_ops): <supports_software_single_step>:
2873 (target_supports_software_single_step): New macro.
2875 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2877 * linux-low.c (linux_wait_1): Fix pc advance condition.
2878 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2879 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2881 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2883 * linux-arm-low.c (arm_is_thumb_mode): New function.
2884 (arm_breakpoint_at): Use arm_is_thumb_mode.
2885 (arm_breakpoint_kind_from_current_state): New function.
2886 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2888 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2889 (linux_breakpoint_kind_from_current_state): New function.
2890 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2891 * linux-low.h (struct linux_target_ops)
2892 <breakpoint_kind_from_current_state>: New field.
2893 * target.h (struct target_ops): Likewise.
2894 (target_breakpoint_kind_from_current_state): New macro.
2896 2015-11-30 Pedro Alves <palves@redhat.com>
2898 * linux-low.c (linux_resume): Wake up the event loop before
2901 2015-11-30 Pedro Alves <palves@redhat.com>
2903 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2905 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2907 * target.c (struct thread_search): New structure.
2908 (thread_search_callback): New function.
2909 (prev_general_thread): New global.
2910 (prepare_to_access_memory, done_accessing_memory): New functions.
2911 * target.h (prepare_to_access_memory, done_accessing_memory):
2912 Replace macros with function declarations.
2914 2015-11-30 Pedro Alves <palves@redhat.com>
2917 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2918 report TARGET_WAITKIND_NO_RESUMED.
2919 * remote-utils.c (prepare_resume_reply): Handle
2920 TARGET_WAITKIND_NO_RESUMED.
2921 * server.c (report_no_resumed): New global.
2922 (handle_query) <qSupported>: Handle "no-resumed+". Report
2923 "no-resumed+" support.
2924 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2925 return error if the client doesn't support no-resumed events.
2926 (push_stop_notification): New function.
2927 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2928 events if the client supports them.
2930 2015-11-30 Pedro Alves <palves@redhat.com>
2932 * linux-low.c (thread_still_has_status_pending_p): Don't check
2934 (lwp_resumed): New function.
2935 (status_pending_p_callback): Return early if the LWP is not
2936 supposed to be resumed.
2938 2015-11-30 Pedro Alves <palves@redhat.com>
2940 * linux-low.c (handle_extended_wait): Assert that the LWP's
2941 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2942 thread create events, leave the new child's status pending.
2943 (linux_low_filter_event): If GDB wants to hear about thread exit
2944 events, leave the LWP marked dead and don't delete it.
2945 (linux_wait_for_event_filtered): Don't check for thread exit.
2946 (filter_exit_event): New function.
2947 (linux_wait_1): Use it, when returning an exit event.
2948 (linux_resume_one_lwp_throw): Assert that the LWP's
2949 waitstatus is TARGET_WAITKIND_IGNORE.
2950 * remote-utils.c (prepare_resume_reply): Handle
2951 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2952 * server.c (report_thread_events): New global.
2953 (handle_general_set): Handle QThreadEvents.
2954 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2955 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2956 TARGET_WAITKIND_THREAD_EXITED.
2957 * server.h (report_thread_events): Declare.
2959 2015-11-30 Pedro Alves <palves@redhat.com>
2961 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2962 the thread's last_resume_kind was resume_stop.
2964 2015-11-30 Pedro Alves <palves@redhat.com>
2966 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2969 2015-11-30 Pedro Alves <palves@redhat.com>
2971 * server.c (handle_v_requests): Handle vCtrlC.
2973 2015-11-30 Pedro Alves <palves@redhat.com>
2975 * gdbthread.h (find_any_thread_of_pid): Declare.
2976 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2978 * server.c (handle_query): If current_thread is NULL, look for
2979 another thread of the selected process.
2981 2015-11-26 Daniel Colascione <dancol@dancol.org>
2982 Simon Marchi <simon.marchi@ericsson.com>
2984 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2985 * server.c (handle_qxfer_threads_worker): Refactor to include thread
2987 * target.h (struct target_ops) <thread_name>: New field.
2988 (target_thread_name): New macro.
2990 2015-11-23 Joel Brobecker <brobecker@adacore.com>
2992 * regcache.h (regcache_invalidate_pid): Add declaration.
2993 * regcache.c (regcache_invalidate_pid): New function, extracted
2994 from regcache_invalidate.
2995 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2996 Add trivial documentation comment.
2997 * lynx-low.c: Use regcache_invalidate_pid instead of
2998 regcache_invalidate.
3000 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3002 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3003 and Elf64_auxv_t if the target is Android.
3005 2015-11-22 Doug Evans <xdje42@gmail.com>
3007 * target.h: #include <sys/types.h>.
3009 2015-11-19 Pedro Alves <palves@redhat.com>
3011 * linux-low.c (linux_process_qsupported): Change prototype.
3013 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3015 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3016 and adjust to loop over all features.
3017 * server.c (handle_query) <qSupported>: Adjust to call
3018 target_process_qsupported once, passing it a vector of unprocessed
3020 * target.h (struct target_ops) <process_qsupported>: Change
3022 (target_process_qsupported): Adjust.
3024 2015-11-19 Pedro Alves <palves@redhat.com>
3026 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3028 * configure: Regenerate.
3030 2015-11-19 Pedro Alves <palves@redhat.com>
3032 * configure: Regenerate.
3034 2015-11-19 Yao Qi <yao.qi@linaro.org>
3036 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3039 2015-11-19 Yao Qi <yao.qi@linaro.org>
3041 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3042 (struct aarch64_operand): Move enum out.
3044 2015-11-19 Yao Qi <yao.qi@linaro.org>
3046 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3047 struct user_fpsimd_state *.
3048 (aarch64_store_fpregset): Likewise.
3050 2015-11-19 Yao Qi <yao.qi@linaro.org>
3052 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3053 struct user_pt_regs *.
3054 (aarch64_store_gregset): Likewise.
3056 2015-11-18 Pedro Alves <palves@redhat.com>
3058 * Makefile.in (all_object_files): Add $IPA_OBJS.
3060 2015-11-17 Pedro Alves <palves@redhat.com>
3062 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3063 GDB_SIGNAL_0 and gdb_signal_to_string.
3065 2015-11-17 Pedro Alves <palves@redhat.com>
3067 * win32-low.c (handle_output_debug_string): Remove parameter.
3068 (win32_kill): Remove our_status local and adjust call to
3069 handle_output_debug_string.
3070 (get_child_debug_event): Adjust call to
3071 handle_output_debug_string.
3073 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3075 * linux-mips-low.c (mips_fill_gregset): Add cast.
3076 (mips_store_gregset): Likewise.
3077 (mips_fill_fpregset): Likewise.
3078 (mips_store_fpregset): Likewise.
3080 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3082 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3085 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3087 * linux-mips-low.c (mips_linux_new_thread): Change type of
3088 watch_type to enum target_hw_bp_type.
3090 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3092 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3093 Change return type to arm_hwbp_type.
3095 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3097 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3098 (arm_store_gregset): Likewise.
3099 * linux-arm-low.c (arm_get_hwcap): Likewise.
3100 (arm_read_description): Likewise.
3102 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3104 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3106 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3108 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3109 (ppc_fill_vsxregset): Likewise.
3110 (ppc_store_vsxregset): Likewise.
3111 (ppc_fill_vrregset): Likewise.
3112 (ppc_store_vrregset): Likewise.
3113 (ppc_fill_evrregset): Likewise.
3114 (ppc_store_evrregset): Likewise.
3116 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3118 * linux-ppc-low.c (ppc_usrregs_info): Remove
3119 forward-declaration.
3120 (ppc_arch_setup): Move lower in file.
3122 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3124 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3125 (ps_pdwrite): Likewise.
3127 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3129 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3130 to after assert checks.
3132 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3134 * proc-service.c (ps_pdread): Add/adjust casts.
3135 (ps_pdwrite): Add/adjust casts.
3137 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3139 * server.c (handle_search_memory_1): Cast return value of
3142 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3144 * server.c (write_qxfer_response): Change type of data to
3147 2015-10-29 Pedro Alves <palves@redhat.com>
3149 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3151 2015-10-29 Pedro Alves <palves@redhat.com>
3153 * tracepoint.c (clear_installed_tracepoints): Add casts.
3155 2015-10-29 Pedro Alves <palves@redhat.com>
3157 * server.c (handle_v_cont, process_serial_event): Add enum
3158 gdb_signal casts to signal parsing code.
3160 2015-10-29 Pedro Alves <palves@redhat.com>
3162 * linux-low.h (NULL_REGSET): Define.
3163 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3164 * linux-arm-low.c (arm_regsets): Likewise.
3165 * linux-crisv32-low.c (cris_regsets): Likewise.
3166 * linux-m68k-low.c (m68k_regsets): Likewise.
3167 * linux-mips-low.c (mips_regsets): Likewise.
3168 * linux-nios2-low.c (nios2_regsets): Likewise.
3169 * linux-ppc-low.c (ppc_regsets): Likewise.
3170 * linux-s390-low.c (s390_regsets): Likewise.
3171 * linux-sh-low.c (sh_regsets): Likewise.
3172 * linux-sparc-low.c (sparc_regsets): Likewise.
3173 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3174 * linux-tile-low.c (tile_regsets): Likewise.
3175 * linux-x86-low.c (x86_regsets): Likewise.
3176 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3178 2015-10-29 Pedro Alves <palves@redhat.com>
3180 * linux-low.h (NULL_REGSET): Define.
3181 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3182 * linux-arm-low.c (arm_regsets): Likewise.
3183 * linux-crisv32-low.c (cris_regsets): Likewise.
3184 * linux-m68k-low.c (m68k_regsets): Likewise.
3185 * linux-mips-low.c (mips_regsets): Likewise.
3186 * linux-nios2-low.c (nios2_regsets): Likewise.
3187 * linux-ppc-low.c (ppc_regsets): Likewise.
3188 * linux-s390-low.c (s390_regsets): Likewise.
3189 * linux-sh-low.c (sh_regsets): Likewise.
3190 * linux-sparc-low.c (sparc_regsets): Likewise.
3191 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3192 * linux-tile-low.c (tile_regsets): Likewise.
3193 * linux-x86-low.c (x86_regsets): Likewise.
3194 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3196 2015-10-26 Doug Evans <dje@google.com>
3198 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3200 2015-10-26 Doug Evans <dje@google.com>
3202 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3204 2015-10-26 Doug Evans <dje@google.com>
3206 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3208 (attach_thread, find_new_threads_callback): Ditto.
3210 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3212 * mem-break.h (set_breakpoint_data): Remove.
3214 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3216 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3217 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3218 (initialize_low): Remove set_breakpoint_data call.
3219 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3220 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3221 (initialize_low): Remove set_breakpoint_data call.
3222 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3223 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3224 (initialize_low): Remove set_breakpoint_data call.
3226 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3228 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3229 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3230 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3231 * target.h (target_breakpoint_kind_from_pc): New macro.
3233 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3235 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3236 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3237 the default breakpoint kind.
3239 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3241 * linux-arm-low.c (arm_supports_z_point_type): Add software
3244 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3246 * linux-arm-low.c: Refactor breakpoint definitions.
3247 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3248 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3250 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3252 * Makefile.in: Add arm.c/o.
3253 * configure.srv: Likewise.
3254 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3255 (arm_breakpoint_kind_from_pc): New function.
3256 (arm_sw_breakpoint_from_kind): Return proper kind.
3257 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3259 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3261 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3263 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3264 (struct raw_breakpoint) <size>: Remove.
3265 (struct raw_breakpoint) <kind>: Add.
3266 (bp_size): New function.
3267 (bp_opcode): Likewise.
3268 (find_raw_breakpoint_at): Adjust for kind.
3269 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3270 (remove_memory_breakpoint): Adjust for kind call bp_size.
3271 (set_raw_breakpoint_at): Adjust for kind.
3272 (set_breakpoint): Likewise.
3273 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3274 (delete_raw_breakpoint): Adjust for kind.
3275 (delete_breakpoint): Likewise.
3276 (find_gdb_breakpoint): Likewise.
3277 (set_gdb_breakpoint_1): Likewise.
3278 (set_gdb_breakpoint): Likewise.
3279 (delete_gdb_breakpoint_1): Likewise.
3280 (delete_gdb_breakpoint): Likewise.
3281 (uninsert_raw_breakpoint): Likewise.
3282 (reinsert_raw_breakpoint): Likewise.
3283 (set_breakpoint_data): Remove.
3284 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3285 (check_mem_read): Adjust for kind call bp_size.
3286 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3287 (clone_one_breakpoint): Adjust for kind.
3288 * mem-break.h (set_gdb_breakpoint): Likewise.
3289 (delete_gdb_breakpoint): Likewise.
3290 * server.c (process_serial_event): Likewise.
3292 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3294 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3300 (arm_sw_breakpoint_from_kind): New function.
3301 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3302 (struct linux_target_ops) <breakpoint>: Remove.
3303 (struct linux_target_ops) <breakpoint_len>: Remove.
3304 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3305 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3306 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3307 (struct linux_target_ops) <breakpoint>: Remove.
3308 (struct linux_target_ops) <breakpoint_len>: Remove.
3309 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3310 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3311 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3312 (struct linux_target_ops) <breakpoint>: Remove.
3313 (struct linux_target_ops) <breakpoint_len>: Remove.
3314 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3315 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3316 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3317 and sw_breakpoint_from_kind to increment the pc.
3318 (linux_breakpoint_kind_from_pc): New function.
3319 (linux_sw_breakpoint_from_kind): New function.
3320 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3321 (initialize_low): Call breakpoint_kind_from_pc and
3322 sw_breakpoint_from_kind to replace breakpoint_data/len.
3323 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3325 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3326 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3327 (struct linux_target_ops) <breakpoint>: Remove.
3328 (struct linux_target_ops) <breakpoint_len>: Remove.
3329 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3330 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3331 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3332 (struct linux_target_ops) <breakpoint>: Remove.
3333 (struct linux_target_ops) <breakpoint_len>: Remove.
3334 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3335 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3336 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3337 (struct linux_target_ops) <breakpoint>: Remove.
3338 (struct linux_target_ops) <breakpoint_len>: Remove.
3339 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3340 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3341 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3342 (struct linux_target_ops) <breakpoint>: Remove.
3343 (struct linux_target_ops) <breakpoint_len>: Remove.
3344 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3345 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3346 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3347 (struct linux_target_ops) <breakpoint>: Remove.
3348 (struct linux_target_ops) <breakpoint_len>: Remove.
3349 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3350 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3351 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3352 (struct linux_target_ops) <breakpoint>: Remove.
3353 (struct linux_target_ops) <breakpoint_len>: Remove.
3354 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3355 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3356 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3357 (struct linux_target_ops) <breakpoint>: Remove.
3358 (struct linux_target_ops) <breakpoint_len>: Remove.
3359 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3360 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3361 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3362 (struct linux_target_ops) <breakpoint>: Remove.
3363 (struct linux_target_ops) <breakpoint_len>: Remove.
3364 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3365 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3366 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3367 (struct linux_target_ops) <breakpoint>: Remove.
3368 (struct linux_target_ops) <breakpoint_len>: Remove.
3369 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3370 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3371 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3372 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3373 (struct linux_target_ops) <breakpoint>: Remove.
3374 (struct linux_target_ops) <breakpoint_len>: Remove.
3375 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3376 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3377 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3378 (struct linux_target_ops) <breakpoint>: Remove.
3379 (struct linux_target_ops) <breakpoint_len>: Remove.
3380 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3381 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3383 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3385 * linux-cris-low.c (cris_get_pc): Remove void arg.
3387 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3389 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3392 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3394 * inferiors.c (thread_pid_matches_callback): New function.
3395 (find_thread_process): New function.
3396 (remove_thread): Reset current_thread.
3397 (remove_process): Assert threads have been removed first.
3399 2015-10-15 Yao Qi <yao.qi@linaro.org>
3401 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3403 (aarch64_remove_point): Likewise.
3404 * regcache.c (regcache_register_size): New function.
3406 2015-10-12 Yao Qi <yao.qi@linaro.org>
3408 * linux-aarch64-low.c: Update all callers as emit_load_store
3409 is renamed to aarch64_emit_load_store.
3411 2015-10-12 Yao Qi <yao.qi@linaro.org>
3413 * linux-aarch64-low.c: Update all callers of function renaming
3414 from emit_insn to aarch64_emit_insn.
3416 2015-10-12 Yao Qi <yao.qi@linaro.org>
3418 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3419 arch/aarch64-insn.h.
3420 (struct aarch64_memory_operand): Likewise.
3422 (emit_insn): Move to arch/aarch64-insn.c.
3423 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3424 (emit_load_store): Move to arch/aarch64-insn.c.
3425 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3426 (can_encode_int32): Remove.
3428 2015-10-12 Yao Qi <yao.qi@linaro.org>
3430 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3431 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3432 (aarch64_relocate_instruction): Likewise.
3433 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3434 (struct aarch64_insn_visitor): Likewise.
3436 2015-10-12 Yao Qi <yao.qi@linaro.org>
3438 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3439 (struct aarch64_insn_visitor): New.
3440 (struct aarch64_insn_relocation_data): New.
3441 (aarch64_ftrace_insn_reloc_b): New function.
3442 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3443 (aarch64_ftrace_insn_reloc_cb): Likewise.
3444 (aarch64_ftrace_insn_reloc_tb): Likewise.
3445 (aarch64_ftrace_insn_reloc_adr): Likewise.
3446 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3447 (aarch64_ftrace_insn_reloc_others): Likewise.
3449 (aarch64_relocate_instruction): Use visitor.
3451 2015-10-12 Yao Qi <yao.qi@linaro.org>
3453 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3454 int. Add argument buf.
3455 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3456 aarch64_relocate_instruction.
3458 2015-10-12 Yao Qi <yao.qi@linaro.org>
3460 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3461 argument insn. Remove local variable insn. Don't call
3463 (aarch64_install_fast_tracepoint_jump_pad): Call
3466 2015-09-30 Yao Qi <yao.qi@linaro.org>
3468 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3469 (emit_load_store_pair): Likewise.
3471 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3473 * dll.c (match_dll): Add cast(s).
3474 (unloaded_dll): Likewise.
3475 * linux-low.c (second_thread_of_pid_p): Likewise.
3476 (delete_lwp_callback): Likewise.
3477 (count_events_callback): Likewise.
3478 (select_event_lwp_callback): Likewise.
3479 (linux_set_resume_request): Likewise.
3480 * server.c (accumulate_file_name_length): Likewise.
3481 (emit_dll_description): Likewise.
3482 (handle_qxfer_threads_worker): Likewise.
3483 (visit_actioned_threads): Likewise.
3484 * thread-db.c (any_thread_of): Likewise.
3485 * tracepoint.c (same_process_p): Likewise.
3486 (match_blocktype): Likewise.
3487 (build_traceframe_info_xml): Likewise.
3489 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3491 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3493 (gdb_unparse_agent_expr): Likewise.
3494 * hostio.c (require_data): Likewise.
3495 (handle_pread): Likewise.
3496 * linux-low.c (disable_regset): Likewise.
3497 (fetch_register): Likewise.
3498 (store_register): Likewise.
3499 (get_dynamic): Likewise.
3500 (linux_qxfer_libraries_svr4): Likewise.
3501 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3502 (set_fast_tracepoint_jump): Likewise.
3503 (uninsert_fast_tracepoint_jumps_at): Likewise.
3504 (reinsert_fast_tracepoint_jumps_at): Likewise.
3505 (validate_inserted_breakpoint): Likewise.
3506 (clone_agent_expr): Likewise.
3507 * regcache.c (init_register_cache): Likewise.
3508 * remote-utils.c (putpkt_binary_1): Likewise.
3509 (decode_M_packet): Likewise.
3510 (decode_X_packet): Likewise.
3511 (look_up_one_symbol): Likewise.
3512 (relocate_instruction): Likewise.
3513 (monitor_output): Likewise.
3514 * server.c (handle_search_memory): Likewise.
3515 (handle_qxfer_exec_file): Likewise.
3516 (handle_qxfer_libraries): Likewise.
3517 (handle_qxfer): Likewise.
3518 (handle_query): Likewise.
3519 (handle_v_cont): Likewise.
3520 (handle_v_run): Likewise.
3521 (captured_main): Likewise.
3522 * target.c (write_inferior_memory): Likewise.
3523 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3524 * tracepoint.c (init_trace_buffer): Likewise.
3525 (add_tracepoint_action): Likewise.
3526 (add_traceframe): Likewise.
3527 (add_traceframe_block): Likewise.
3528 (cmd_qtdpsrc): Likewise.
3529 (cmd_qtdv): Likewise.
3530 (cmd_qtstatus): Likewise.
3531 (response_source): Likewise.
3532 (response_tsv): Likewise.
3533 (cmd_qtnotes): Likewise.
3534 (gdb_collect): Likewise.
3535 (initialize_tracepoint): Likewise.
3537 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3539 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3540 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3541 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3543 (enum aarch64_condition_codes): New enum.
3544 (w0): New static global.
3547 (struct aarch64_memory_operand) <type>: New
3548 MEMORY_OPERAND_POSTINDEX type.
3549 (postindex_memory_operand): New helper function.
3550 (emit_ret): New function.
3551 (emit_load_store_pair): New function, factored out of emit_stp
3552 with support for MEMORY_OPERAND_POSTINDEX.
3553 (emit_stp): Rewrite using emit_load_store_pair.
3554 (emit_ldp): New function.
3555 (emit_load_store): Likewise.
3556 (emit_ldr): Mention post-index instruction in comment.
3557 (emit_ldrh): New function.
3558 (emit_ldrb): New function.
3559 (emit_ldrsw): Mention post-index instruction in comment.
3560 (emit_str): Likewise.
3561 (emit_subs): New function.
3562 (emit_cmp): Likewise.
3563 (emit_and): Likewise.
3564 (emit_orr): Likewise.
3565 (emit_orn): Likewise.
3566 (emit_eor): Likewise.
3567 (emit_mvn): Likewise.
3568 (emit_lslv): Likewise.
3569 (emit_lsrv): Likewise.
3570 (emit_asrv): Likewise.
3571 (emit_mul): Likewise.
3572 (emit_sbfm): Likewise.
3573 (emit_sbfx): Likewise.
3574 (emit_ubfm): Likewise.
3575 (emit_ubfx): Likewise.
3576 (emit_csinc): Likewise.
3577 (emit_cset): Likewise.
3578 (emit_nop): Likewise.
3579 (emit_ops_insns): New helper function.
3580 (emit_pop): Likewise.
3581 (emit_push): Likewise.
3582 (aarch64_emit_prologue): New function.
3583 (aarch64_emit_epilogue): Likewise.
3584 (aarch64_emit_add): Likewise.
3585 (aarch64_emit_sub): Likewise.
3586 (aarch64_emit_mul): Likewise.
3587 (aarch64_emit_lsh): Likewise.
3588 (aarch64_emit_rsh_signed): Likewise.
3589 (aarch64_emit_rsh_unsigned): Likewise.
3590 (aarch64_emit_ext): Likewise.
3591 (aarch64_emit_log_not): Likewise.
3592 (aarch64_emit_bit_and): Likewise.
3593 (aarch64_emit_bit_or): Likewise.
3594 (aarch64_emit_bit_xor): Likewise.
3595 (aarch64_emit_bit_not): Likewise.
3596 (aarch64_emit_equal): Likewise.
3597 (aarch64_emit_less_signed): Likewise.
3598 (aarch64_emit_less_unsigned): Likewise.
3599 (aarch64_emit_ref): Likewise.
3600 (aarch64_emit_if_goto): Likewise.
3601 (aarch64_emit_goto): Likewise.
3602 (aarch64_write_goto_address): Likewise.
3603 (aarch64_emit_const): Likewise.
3604 (aarch64_emit_call): Likewise.
3605 (aarch64_emit_reg): Likewise.
3606 (aarch64_emit_pop): Likewise.
3607 (aarch64_emit_stack_flush): Likewise.
3608 (aarch64_emit_zero_ext): Likewise.
3609 (aarch64_emit_swap): Likewise.
3610 (aarch64_emit_stack_adjust): Likewise.
3611 (aarch64_emit_int_call_1): Likewise.
3612 (aarch64_emit_void_call_2): Likewise.
3613 (aarch64_emit_eq_goto): Likewise.
3614 (aarch64_emit_ne_goto): Likewise.
3615 (aarch64_emit_lt_goto): Likewise.
3616 (aarch64_emit_le_goto): Likewise.
3617 (aarch64_emit_gt_goto): Likewise.
3618 (aarch64_emit_ge_got): Likewise.
3619 (aarch64_emit_ops_impl): New static global variable.
3620 (aarch64_emit_ops): New target function, return
3621 &aarch64_emit_ops_impl.
3622 (struct linux_target_ops): Install it.
3624 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3626 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3627 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3629 * linux-aarch64-ipa.c: New file.
3630 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3632 (aarch64_get_thread_area): New target method.
3633 (extract_signed_bitfield): New helper function.
3634 (aarch64_decode_ldr_literal): New function.
3635 (enum aarch64_opcodes): New enum.
3636 (struct aarch64_register): New struct.
3637 (struct aarch64_operand): New struct.
3638 (x0): New static global.
3647 (aarch64_register): New helper function.
3648 (register_operand): Likewise.
3649 (immediate_operand): Likewise.
3650 (struct aarch64_memory_operand): New struct.
3651 (offset_memory_operand): New helper function.
3652 (preindex_memory_operand): Likewise.
3653 (enum aarch64_system_control_registers): New enum.
3654 (ENCODE): New macro.
3655 (emit_insn): New helper function.
3656 (emit_b): New function.
3657 (emit_bcond): Likewise.
3658 (emit_cb): Likewise.
3659 (emit_tb): Likewise.
3660 (emit_blr): Likewise.
3661 (emit_stp): Likewise.
3662 (emit_ldp_q_offset): Likewise.
3663 (emit_stp_q_offset): Likewise.
3664 (emit_load_store): Likewise.
3665 (emit_ldr): Likewise.
3666 (emit_ldrsw): Likewise.
3667 (emit_str): Likewise.
3668 (emit_ldaxr): Likewise.
3669 (emit_stxr): Likewise.
3670 (emit_stlr): Likewise.
3671 (emit_data_processing_reg): Likewise.
3672 (emit_data_processing): Likewise.
3673 (emit_add): Likewise.
3674 (emit_sub): Likewise.
3675 (emit_mov): Likewise.
3676 (emit_movk): Likewise.
3677 (emit_mov_addr): Likewise.
3678 (emit_mrs): Likewise.
3679 (emit_msr): Likewise.
3680 (emit_sevl): Likewise.
3681 (emit_wfe): Likewise.
3682 (append_insns): Likewise.
3683 (can_encode_int32_in): New helper function.
3684 (aarch64_relocate_instruction): New function.
3685 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3686 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3687 (struct linux_target_ops): Install aarch64_get_thread_area,
3688 aarch64_install_fast_tracepoint_jump_pad and
3689 aarch64_get_min_fast_tracepoint_insn_len.
3691 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3693 * Makefile.in (aarch64-insn.o): New rule.
3694 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3696 2015-09-21 Yao Qi <yao.qi@linaro.org>
3698 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3700 2015-09-21 Yao Qi <yao.qi@linaro.org>
3702 * tracepoint.c (max_jump_pad_size): Remove.
3704 2015-09-18 Yao Qi <yao.qi@linaro.org>
3706 * linux-aarch64-low.c: Don't include sys/uio.h.
3707 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3709 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3711 * tracepoint.c (eval_result_type): Change prototype.
3712 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3714 2015-09-15 Pedro Alves <palves@redhat.com>
3716 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3717 Check whether to report exec events instead of checking whether
3718 multiprocess is enabled.
3720 2015-09-15 Pedro Alves <palves@redhat.com>
3723 * remote-utils.c (prepare_resume_reply): Merge
3724 TARGET_WAITKIND_VFORK_DONE switch case with the
3725 TARGET_WAITKIND_FORKED case.
3727 2015-09-15 Yao Qi <yao.qi@linaro.org>
3729 * server.c (handle_query): Check string comparison using
3730 "else if" instead of "if".
3732 2015-09-15 Yao Qi <yao.qi@linaro.org>
3734 * server.c (vCont_supported): New global variable.
3735 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3736 matches. Append ";vContSupported+" to own_buf.
3737 (handle_v_requests): Append ";s;S" to own_buf if target supports
3738 hardware single step or vCont_supported is false.
3739 (capture_main): Set vCont_supported to zero.
3741 2015-09-15 Yao Qi <yao.qi@linaro.org>
3743 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3745 (linux_supports_hardware_single_step): ... New function.
3746 (linux_target_ops): Update.
3747 * lynx-low.c (lynx_target_ops): Set field
3748 supports_hardware_single_step to target_can_do_hardware_single_step.
3749 * nto-low.c (nto_target_ops): Likewise.
3750 * spu-low.c (spu_target_ops): Likewise.
3751 * win32-low.c (win32_target_ops): Likewise.
3752 * target.c (target_can_do_hardware_single_step): New function.
3753 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3754 Remove. <supports_hardware_single_step>: New field.
3755 (target_supports_conditional_breakpoints): Remove.
3756 (target_supports_hardware_single_step): New macro.
3757 (target_can_do_hardware_single_step): Declare.
3758 * server.c (handle_query): Use target_supports_hardware_single_step
3759 instead of target_supports_conditional_breakpoints.
3761 2015-09-15 Yao Qi <yao.qi@linaro.org>
3763 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3765 (struct linux_target_ops the_low_target): Install
3766 aarch64_linux_siginfo_fixup.
3768 2015-09-11 Don Breazeal <donb@codesourcery.com>
3769 Luis Machado <lgustavo@codesourcery.com>
3771 * linux-low.c (linux_mourn): Static declaration.
3772 (linux_arch_setup): Move in front of
3773 handle_extended_wait.
3774 (linux_arch_setup_thread): New function.
3775 (handle_extended_wait): Handle exec events. Call
3776 linux_arch_setup_thread. Make event_lwp argument a
3777 pointer-to-a-pointer.
3778 (check_zombie_leaders): Do not check stopped threads.
3779 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3780 (linux_low_filter_event): Add lwp and thread for exec'ing
3781 non-leader thread if leader thread has been deleted.
3782 Refactor code into linux_arch_setup_thread and call it.
3783 Pass child lwp pointer by reference to handle_extended_wait.
3784 (linux_wait_for_event_filtered): Update comment.
3785 (linux_wait_1): Prevent clobbering exec event status.
3786 (linux_supports_exec_events): New function.
3787 (linux_target_ops) <supports_exec_events>: Initialize new member.
3788 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3790 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3791 * server.c (report_exec_events): New global variable.
3792 (handle_query): Handle qSupported query for exec-events feature.
3793 (captured_main): Initialize report_exec_events.
3794 * server.h (report_exec_events): Declare new global variable.
3795 * target.h (struct target_ops) <supports_exec_events>: New
3797 (target_supports_exec_events): New macro.
3798 * win32-low.c (win32_target_ops) <supports_exec_events>:
3799 Initialize new member.
3801 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3803 * linux-low.c (linux_low_enable_btrace): Remove.
3804 (linux_target_ops): Replace linux_low_enable_btrace with
3805 linux_enable_btrace.
3807 2015-09-03 Yao Qi <yao.qi@linaro.org>
3809 * linux-aarch64-low.c (aarch64_insert_point): Call
3810 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3813 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3815 * linux-low.c (check_stopped_by_breakpoint): Use
3816 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3818 2015-08-27 Pedro Alves <palves@redhat.com>
3820 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3822 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3824 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3825 the XNEW-family equivalent.
3826 (compile_bytecodes): Likewise.
3827 * dll.c (loaded_dll): Likewise.
3828 * event-loop.c (append_callback_event): Likewise.
3829 (create_file_handler): Likewise.
3830 (create_file_event): Likewise.
3831 * hostio.c (handle_open): Likewise.
3832 * inferiors.c (add_thread): Likewise.
3833 (add_process): Likewise.
3834 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3835 * linux-arm-low.c (arm_new_process): Likewise.
3836 (arm_new_thread): Likewise.
3837 * linux-low.c (add_to_pid_list): Likewise.
3838 (linux_add_process): Likewise.
3839 (handle_extended_wait): Likewise.
3840 (add_lwp): Likewise.
3841 (enqueue_one_deferred_signal): Likewise.
3842 (enqueue_pending_signal): Likewise.
3843 (linux_resume_one_lwp_throw): Likewise.
3844 (linux_resume_one_thread): Likewise.
3845 (linux_read_memory): Likewise.
3846 (linux_write_memory): Likewise.
3847 * linux-mips-low.c (mips_linux_new_process): Likewise.
3848 (mips_linux_new_thread): Likewise.
3849 (mips_add_watchpoint): Likewise.
3850 * linux-x86-low.c (initialize_low_arch): Likewise.
3851 * lynx-low.c (lynx_add_process): Likewise.
3852 * mem-break.c (set_raw_breakpoint_at): Likewise.
3853 (set_breakpoint): Likewise.
3854 (add_condition_to_breakpoint): Likewise.
3855 (add_commands_to_breakpoint): Likewise.
3856 (clone_agent_expr): Likewise.
3857 (clone_one_breakpoint): Likewise.
3858 * regcache.c (new_register_cache): Likewise.
3859 * remote-utils.c (look_up_one_symbol): Likewise.
3860 * server.c (queue_stop_reply): Likewise.
3861 (start_inferior): Likewise.
3862 (queue_stop_reply_callback): Likewise.
3863 (handle_target_event): Likewise.
3864 * spu-low.c (fetch_ppc_memory): Likewise.
3865 (store_ppc_memory): Likewise.
3866 * target.c (set_target_ops): Likewise.
3867 * thread-db.c (thread_db_load_search): Likewise.
3868 (try_thread_db_load_1): Likewise.
3869 * tracepoint.c (add_tracepoint): Likewise.
3870 (add_tracepoint_action): Likewise.
3871 (create_trace_state_variable): Likewise.
3872 (cmd_qtdpsrc): Likewise.
3873 (cmd_qtro): Likewise.
3874 (add_while_stepping_state): Likewise.
3875 * win32-low.c (child_add_thread): Likewise.
3876 (get_image_name): Likewise.
3878 2015-08-25 Yao Qi <yao.qi@linaro.org>
3880 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3882 2015-08-25 Yao Qi <yao.qi@linaro.org>
3884 * Makefile.in (aarch64-linux.o): New rule.
3885 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3887 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3888 (aarch64_init_debug_reg_state): Make it extern.
3889 (aarch64_linux_prepare_to_resume): Remove.
3891 2015-08-25 Yao Qi <yao.qi@linaro.org>
3893 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3894 lwp_arch_private_info and ptid_of_lwp.
3896 2015-08-25 Yao Qi <yao.qi@linaro.org>
3898 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3899 Find proc_info by find_process_pid. All callers updated.
3901 2015-08-25 Yao Qi <yao.qi@linaro.org>
3903 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3905 (debug_reg_change_callback): Remove.
3906 (aarch64_notify_debug_reg_change): Remove.
3908 2015-08-25 Yao Qi <yao.qi@linaro.org>
3910 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3911 Call current_lwp_ptid.
3913 2015-08-25 Yao Qi <yao.qi@linaro.org>
3915 * linux-aarch64-low.c (debug_reg_change_callback): Use
3918 2015-08-25 Yao Qi <yao.qi@linaro.org>
3920 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3922 2015-08-25 Yao Qi <yao.qi@linaro.org>
3924 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3926 2015-08-25 Yao Qi <yao.qi@linaro.org>
3928 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3931 2015-08-25 Yao Qi <yao.qi@linaro.org>
3933 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3935 (debug_reg_change_callback): Remove argument entry and add argument
3936 lwp. Remove local variable thread. Don't print thread id in the
3937 debugging output. Don't check whether pid of thread equals to pid.
3938 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3939 iterate_over_lwps instead find_inferior.
3941 2015-08-24 Pedro Alves <palves@redhat.com>
3943 * inferiors.c (get_first_process): New function.
3944 * inferiors.h (get_first_process): New declaration.
3945 * remote-utils.c (read_ptid): Default to the first process in the
3946 list, instead of to the current thread's process.
3948 2015-08-24 Pedro Alves <palves@redhat.com>
3950 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3951 * event-loop.c: Likewise.
3952 * remote-utils.c: Likewise.
3953 * tracepoint.c: Likewise.
3955 2015-08-24 Pedro Alves <palves@redhat.com>
3957 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3960 2015-08-21 Pedro Alves <palves@redhat.com>
3962 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3963 instead of literal 1.
3965 2015-08-21 Pedro Alves <palves@redhat.com>
3967 * tdesc.c (default_description): Explicitly zero-initialize.
3969 2015-08-21 Pedro Alves <palves@redhat.com>
3972 * inferiors.c (remove_thread): Discard any pending stop reply for
3974 * server.c (remove_all_on_match_pid): Rename to ...
3975 (remove_all_on_match_ptid): ... this. Work with a filter ptid
3977 (discard_queued_stop_replies): Change parameter to a ptid. Now
3979 (handle_v_kill, kill_inferior_callback, captured_main)
3980 (process_serial_event): Adjust.
3981 * server.h (discard_queued_stop_replies): Declare.
3983 2015-08-21 Pedro Alves <palves@redhat.com>
3985 * linux-low.c (wait_for_sigstop): Always switch to no thread
3986 selected if the previously current thread dies.
3987 * lynx-low.c (lynx_request_interrupt): Use the first thread's
3988 process instead of the current thread's.
3989 * remote-utils.c (input_interrupt): Don't check if there's no
3991 * server.c (gdb_read_memory, gdb_write_memory): If setting the
3992 current thread to the general thread fails, error out.
3993 (handle_qxfer_auxv, handle_qxfer_libraries)
3994 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3995 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3996 (handle_query): Check if there's a thread selected instead of
3997 checking whether there's any thread in the thread list.
3998 (handle_qxfer_threads, handle_qxfer_btrace)
3999 (handle_qxfer_btrace_conf): Don't error out early if there's no
4000 thread in the thread list.
4001 (handle_v_cont, myresume): Don't set the current thread to the
4003 (process_serial_event) <Hg handling>: Also set thread_id if the
4004 previous general thread is still alive.
4005 (process_serial_event) <g/G handling>: If setting the current
4006 thread to the general thread fails, error out.
4007 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4008 thread's lwp instead of the current thread's.
4009 * target.c (set_desired_thread): If the desired thread was not
4010 found, leave the current thread pointing to NULL. Return an int
4011 (boolean) indicating success.
4012 * target.h (set_desired_thread): Change return type to int.
4014 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4016 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4017 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4019 (ps_get_thread_area): New function.
4021 2015-08-19 Gary Benson <gbenson@redhat.com>
4023 * hostio.c (handle_pread): Do not attempt to read more data
4024 than hostio_reply_with_data can fit in a packet.
4026 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4028 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4030 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4032 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4034 2015-08-06 Pedro Alves <palves@redhat.com>
4036 * tracepoint.c (expr_eval_result): Now an int.
4038 2015-08-06 Pedro Alves <palves@redhat.com>
4040 * gdbthread.h (struct regcache): Forward declare.
4041 (struct thread_info) <regcache_data>: Now a struct regcache
4043 * inferiors.c (inferior_regcache_data)
4044 (set_inferior_regcache_data): Now work with struct regcache
4046 * inferiors.h (struct regcache): Forward declare.
4047 (inferior_regcache_data, set_inferior_regcache_data): Now work
4048 with struct regcache pointers.
4049 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4050 (free_register_cache_thread): Remove struct regcache pointer
4053 2015-08-06 Pedro Alves <palves@redhat.com>
4055 * server.c (captured_main): On error, print the exception message
4056 to stderr, and if run_once is set, throw a quit.
4058 2015-08-06 Pedro Alves <palves@redhat.com>
4060 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4063 2015-08-06 Pedro Alves <palves@redhat.com>
4065 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4066 reading beyond the passed in buffer length.
4068 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4070 * tracepoint.c (symbol_list) <required>: Remove.
4072 2015-08-06 Pedro Alves <palves@redhat.com>
4074 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4075 count if stopping and suspending threads.
4076 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4077 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4078 (linux_detach): Complete an ongoing step-over.
4079 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4081 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4082 (linux_wait_1): If passing a signal to the inferior after
4083 finishing a step-over, unsuspend and re-resume all lwps. If we
4084 see a single-step event but the thread should be continuing, don't
4085 pass the trap to gdb.
4086 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4087 internal_error instead of gdb_assert.
4088 (enqueue_pending_signal): New function.
4089 (check_ptrace_stopped_lwp_gone): Add debug output.
4090 (start_step_over): Use internal_error instead of gdb_assert.
4091 (complete_ongoing_step_over): New function.
4092 (linux_resume_one_thread): Don't resume a suspended thread.
4093 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4096 2015-08-06 Pedro Alves <palves@redhat.com>
4098 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4099 (linux_thread_alive): Use lwp_is_marked_dead.
4100 (extended_event_reported): Delete.
4101 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4102 instead of extended_event_reported.
4103 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4105 (lwp_is_marked_dead): New function.
4106 (lwp_running): Use lwp_is_marked_dead.
4107 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4110 2015-08-06 Pedro Alves <palves@redhat.com>
4112 * linux-low.c (linux_wait_1): Move fork event output out of the
4113 !report_to_gdb check. Pass event_child->waitstatus to
4114 target_waitstatus_to_string instead of ourstatus.
4116 2015-08-04 Yao Qi <yao.qi@linaro.org>
4118 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4119 if current_thread is 32 bit.
4121 2015-08-04 Yao Qi <yao.qi@linaro.org>
4123 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4124 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4125 * server.c (extended_protocol): Remove "static".
4126 * server.h (extended_protocol): Declare it.
4128 2015-08-04 Yao Qi <yao.qi@linaro.org>
4130 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4131 both aarch64 and aarch32.
4132 (aarch64_set_pc): Likewise.
4134 2015-08-04 Yao Qi <yao.qi@linaro.org>
4136 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4137 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4138 arm-with-neon.xml to srv_xmlfiles.
4139 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4140 (is_64bit_tdesc): New function.
4141 (aarch64_linux_read_description): New function.
4142 (aarch64_arch_setup): Call aarch64_linux_read_description.
4143 (regs_info): Rename to regs_info_aarch64.
4144 (aarch64_regs_info): Return right regs_info.
4145 (initialize_low_arch): Call initialize_low_arch_aarch32.
4147 2015-08-04 Yao Qi <yao.qi@linaro.org>
4149 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4150 * linux-aarch32-low.c: New file.
4151 * linux-aarch32-low.h: New file.
4152 * linux-arm-low.c (arm_fill_gregset): Move it to
4153 linux-aarch32-low.c.
4154 (arm_store_gregset): Likewise.
4155 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4156 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4157 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4158 (regs_info): Rename to regs_info_arm.
4159 (arm_regs_info): Return regs_info_aarch32 if
4160 have_ptrace_getregset is 1 and target description is
4161 arm_with_neon or arm_with_vfpv3.
4162 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4163 Call initialize_low_arch_aarch32 instead.
4165 2015-08-04 Yao Qi <yao.qi@linaro.org>
4167 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4168 * linux-low.c: ... here.
4169 * linux-low.h (have_ptrace_getregset): Declare it.
4171 2015-08-04 Pedro Alves <palves@redhat.com>
4173 * thread-db.c (struct thread_db): Use new typedefs.
4174 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4176 (disable_thread_event_reporting): Cast result of dlsym to
4177 destination function pointer type.
4178 (thread_db_mourn): Use td_ta_delete_ftype.
4180 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4182 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4184 (CDX_BREAKPOINT): Define for R2.
4185 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4186 (the_low_target): Add comments.
4188 2015-07-30 Yao Qi <yao.qi@linaro.org>
4190 * linux-arm-low.c (arm_hwcap): Remove it.
4191 (arm_read_description): New local variable arm_hwcap. Don't
4192 set arm_hwcap to zero.
4194 2015-07-30 Yao Qi <yao.qi@linaro.org>
4196 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4197 Use regcache->tdesc instead.
4198 (arm_store_wmmxregset): Likewise.
4199 (arm_fill_vfpregset): Likewise.
4200 (arm_store_vfpregset): Likewise.
4202 2015-07-30 Yao Qi <yao.qi@linaro.org>
4204 * linux-arm-low.c: Include arch/arm.h.
4205 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4206 (arm_store_gregset): Likewise.
4208 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4210 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4211 ptrace's 4th parameter.
4213 2015-07-27 Yao Qi <yao.qi@linaro.org>
4215 * configure.srv (case aarch64*-*-linux*): Don't set
4218 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4220 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4222 * linux-arm-low.c: Likewise.
4223 * linux-cris-low.c: Likewise.
4224 * linux-crisv32-low.c: Likewise.
4225 * linux-low.c: Likewise.
4226 * linux-m68k-low.c: Likewise.
4227 * linux-mips-low.c: Likewise.
4228 * linux-nios2-low.c: Likewise.
4229 * linux-s390-low.c: Likewise.
4230 * linux-sparc-low.c: Likewise.
4231 * linux-tic6x-low.c: Likewise.
4232 * linux-tile-low.c: Likewise.
4233 * linux-x86-low.c: Likewise.
4235 2015-07-24 Pedro Alves <palves@redhat.com>
4237 * config.in: Regenerate.
4238 * configure: Regenerate.
4240 2015-07-24 Pedro Alves <palves@redhat.com>
4242 * acinclude.m4: Include ../ptrace.m4.
4243 * configure.ac: Call GDB_AC_PTRACE.
4244 * config.in, configure: Regenerate.
4246 2015-07-24 Yao Qi <yao.qi@linaro.org>
4248 * linux-low.c (linux_create_inferior): Remove setting to
4249 proc->priv->new_inferior.
4250 (linux_attach): Likewise.
4251 (linux_low_filter_event): Likewise.
4252 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4254 2015-07-24 Yao Qi <yao.qi@linaro.org>
4256 * linux-low.c (linux_arch_setup): New function.
4257 (linux_low_filter_event): If proc->tdesc is NULL and
4258 proc->attached is true, call the_low_target.arch_setup.
4259 Otherwise, keep status pending, and return.
4260 (linux_resume_one_lwp_throw): Don't call get_pc if
4261 thread->while_stepping isn't NULL. Don't call
4262 get_thread_regcache if proc->tdesc is NULL.
4263 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4264 (linux_target_ops): Install arch_setup.
4265 * server.c (start_inferior): Call the_target->arch_setup.
4266 * target.h (struct target_ops) <arch_setup>: New field.
4267 (target_arch_setup): New marco.
4268 * lynx-low.c (lynx_target_ops): Update.
4269 * nto-low.c (nto_target_ops): Update.
4270 * spu-low.c (spu_target_ops): Update.
4271 * win32-low.c (win32_target_ops): Update.
4273 2015-07-24 Yao Qi <yao.qi@linaro.org>
4275 * linux-low.c (linux_add_process): Don't set
4276 proc->priv->new_inferior.
4277 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4278 (linux_attach): Likewise.
4280 2015-07-24 Yao Qi <yao.qi@linaro.org>
4282 * server.c (start_inferior): Code refactor.
4284 2015-07-24 Yao Qi <yao.qi@linaro.org>
4286 * server.c (process_serial_event): Set general_thread.
4288 2015-07-21 Yao Qi <yao.qi@linaro.org>
4290 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4291 aarch64_linux_get_debug_reg_capacity.
4293 2015-07-17 Yao Qi <yao.qi@linaro.org>
4295 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4296 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4297 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4298 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4299 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4300 (AARCH64_HWP_ALIGNMENT): Likewise.
4301 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4302 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4303 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4304 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4305 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4306 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4307 (struct aarch64_debug_reg_state): Likewise.
4308 (struct arch_lwp_info): Likewise.
4309 (aarch64_align_watchpoint): Likewise.
4310 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4311 (aarch64_watchpoint_length): Likewise.
4312 (aarch64_point_encode_ctrl_reg): Likewise
4313 (aarch64_point_is_aligned): Likewise.
4314 (aarch64_align_watchpoint): Likewise.
4315 (aarch64_linux_set_debug_regs):
4316 (aarch64_dr_state_insert_one_point): Likewise.
4317 (aarch64_dr_state_remove_one_point): Likewise.
4318 (aarch64_handle_breakpoint): Likewise.
4319 (aarch64_handle_aligned_watchpoint): Likewise.
4320 (aarch64_handle_unaligned_watchpoint): Likewise.
4321 (aarch64_handle_watchpoint): Likewise.
4323 2015-07-17 Yao Qi <yao.qi@linaro.org>
4325 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4326 and don't aarch64_get_debug_reg_state. All callers update.
4327 (aarch64_handle_aligned_watchpoint): Likewise.
4328 (aarch64_handle_unaligned_watchpoint): Likewise.
4329 (aarch64_handle_watchpoint): Likewise.
4330 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4331 (aarch64_remove_point): Likewise.
4333 2015-07-17 Yao Qi <yao.qi@linaro.org>
4335 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4337 (aarch64_handle_unaligned_watchpoint): Likewise.
4339 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4341 Revert the previous 3 commits:
4342 Move gdb_regex* to common/
4343 Move linux_find_memory_regions_full & co.
4344 gdbserver build-id attribute generator
4346 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4347 Jan Kratochvil <jan.kratochvil@redhat.com>
4349 gdbserver build-id attribute generator.
4350 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4351 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4352 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4354 (get_dynamic): Use find_pdhr to traverse program headers.
4355 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4356 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4357 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4358 (get_hex_build_id): New.
4359 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4360 to reply XML document.
4362 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4363 Jan Kratochvil <jan.kratochvil@redhat.com>
4365 * target.c: Include target/target-utils.h and fcntl.h.
4366 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4367 (target_fileio_read_stralloc): New functions.
4369 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4371 * Makefile.in (OBS): Add gdb_regex.o.
4373 * config.in: Rebuilt.
4374 * configure: Rebuilt.
4376 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4377 Jan Kratochvil <jan.kratochvil@redhat.com>
4379 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4380 * Makefile.in (OBS): Add target-utils.o.
4381 (linux-maps.o, target-utils.o): New.
4382 * configure.srv (srv_linux_obj): Add linux-maps.o.
4384 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4386 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4388 (the_low_target): Install it.
4390 2015-07-14 Pedro Alves <palves@redhat.com>
4392 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4393 Instead, ignore ECHILD, and throw an error for other errnos.
4395 2015-07-10 Pedro Alves <palves@redhat.com>
4397 * event-loop.c (struct callback_event) <data>: Change type to
4398 gdb_client_data instance instead of gdb_client_data pointer.
4399 (append_callback_event): Adjust.
4401 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4403 * linux-aarch64-low.c: Add comments for each linux_target_ops
4404 method. Remove comments already covered in target_ops and
4405 linux_target_ops definitions.
4406 (the_low_target): Add comments for each unimplemented method.
4408 2015-07-09 Yao Qi <yao.qi@linaro.org>
4410 * linux-aarch64-low.c (aarch64_regmap): Remove.
4411 (aarch64_usrregs_info): Remove.
4412 (regs_info): Set field usrregs to NULL.
4414 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4416 * linux-low.c: Include "rsp-low.h"
4417 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4418 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4419 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4420 (handle_btrace_enable_pt): New.
4421 (handle_btrace_general_set): Support "pt".
4422 (handle_btrace_conf_general_set): Support "pt:size".
4424 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4426 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4429 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4431 * linux-aarch64-low.c: Remove comment about endianness.
4432 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4433 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4436 2015-06-24 Gary Benson <gbenson@redhat.com>
4438 * linux-i386-ipa.c (stdint.h): Do not include.
4439 * lynx-i386-low.c (stdint.h): Likewise.
4440 * lynx-ppc-low.c (stdint.h): Likewise.
4441 * mem-break.c (stdint.h): Likewise.
4442 * thread-db.c (stdint.h): Likewise.
4443 * tracepoint.c (stdint.h): Likewise.
4444 * win32-low.c (stdint.h): Likewise.
4446 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4448 * server.c (write_qxfer_response): Update call to
4449 remote_escape_output.
4451 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4452 Jan Kratochvil <jan.kratochvil@redhat.com>
4454 Merge multiple hex conversions.
4455 * gdbreplay.c (tohex): Rename to 'fromhex'.
4456 (logchar): Use fromhex.
4458 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4460 * server.c (handle_qxfer_libraries): Set `version' attribute for
4463 2015-06-10 Gary Benson <gbenson@redhat.com>
4465 * target.h (struct target_ops) <multifs_open>: New field.
4466 <multifs_unlink>: Likewise.
4467 <multifs_readlink>: Likewise.
4468 * linux-low.c (nat/linux-namespaces.h): New include.
4469 (linux_target_ops): Initialize the_target->multifs_open,
4470 the_target->multifs_unlink and the_target->multifs_readlink.
4471 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4472 * hostio.c (hostio_fs_pid): New static variable.
4473 (hostio_handle_new_gdb_connection): New function.
4474 (handle_setfs): Likewise.
4475 (handle_open): Use the_target->multifs_open as appropriate.
4476 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4477 (handle_readlink): Use the_target->multifs_readlink as
4479 (handle_vFile): Handle vFile:setfs packets.
4480 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4481 after target_handle_new_gdb_connection.
4483 2015-06-10 Gary Benson <gbenson@redhat.com>
4485 * configure.ac (AC_CHECK_FUNCS): Add setns.
4486 * config.in: Regenerate.
4487 * configure: Likewise.
4488 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4489 (linux-namespaces.o): New rule.
4490 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4492 2015-06-09 Gary Benson <gbenson@redhat.com>
4494 * hostio.c (handle_open): Process mode argument with
4495 fileio_to_host_mode.
4497 2015-06-01 Yao Qi <yao.qi@linaro.org>
4499 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4500 * linux-x86-low.c: Likewise.
4502 2015-05-28 Don Breazeal <donb@codesourcery.com>
4504 * linux-low.c (handle_extended_wait): Initialize
4505 thread_info.last_resume_kind for new fork children.
4507 2015-05-15 Pedro Alves <palves@redhat.com>
4509 * target.h (target_handle_new_gdb_connection): Rewrite using if
4510 wrapped in do/while.
4512 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4514 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4515 * configure, config.in: Regenerate.
4516 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4519 2015-05-12 Don Breazeal <donb@codesourcery.com>
4521 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4522 PTRACE_EVENT_VFORK_DONE.
4523 (linux_low_ptrace_options, extended_event_reported): Add vfork
4525 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4526 and "vforkdone" for RSP 'T' Stop Reply Packet.
4527 * server.h (report_vfork_events): Declare
4530 2015-05-12 Don Breazeal <donb@codesourcery.com>
4532 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4533 (the_low_target) <new_fork>: Initialize new member.
4534 * linux-arm-low.c (arm_new_fork): New function.
4535 (the_low_target) <new_fork>: Initialize new member.
4536 * linux-low.c (handle_extended_wait): Call new target function
4538 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4539 * linux-mips-low.c (mips_add_watchpoint): New function
4540 extracted from mips_insert_point.
4541 (the_low_target) <new_fork>: Initialize new member.
4542 (mips_linux_new_fork): New function.
4543 (mips_insert_point): Call mips_add_watchpoint.
4544 * linux-x86-low.c (x86_linux_new_fork): New function.
4545 (the_low_target) <new_fork>: Initialize new member.
4547 2015-05-12 Don Breazeal <donb@codesourcery.com>
4549 * linux-low.c (handle_extended_wait): Implement return value,
4550 rename argument 'event_child' to 'event_lwp', handle
4551 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4552 (linux_low_ptrace_options): New function.
4553 (linux_low_filter_event): Call linux_low_ptrace_options,
4554 use different argument fo linux_enable_event_reporting,
4555 use return value from handle_extended_wait.
4556 (extended_event_reported): New function.
4557 (linux_wait_1): Call extended_event_reported and set
4558 status to report fork events.
4559 (linux_write_memory): Add pid to debug message.
4560 (reset_lwp_ptrace_options_callback): New function.
4561 (linux_handle_new_gdb_connection): New function.
4562 (linux_target_ops): Initialize new structure member.
4563 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4564 * lynx-low.c: Initialize new structure member.
4565 * remote-utils.c (prepare_resume_reply): Implement stop reason
4566 "fork" for "T" stop message.
4567 * server.c (handle_query): Call handle_new_gdb_connection.
4568 * server.h (report_fork_events): Declare global flag.
4569 * target.h (struct target_ops) <handle_new_gdb_connection>:
4571 (target_handle_new_gdb_connection): New macro.
4572 * win32-low.c: Initialize new structure member.
4574 2015-05-12 Don Breazeal <donb@codesourcery.com>
4576 * mem-break.c (APPEND_TO_LIST): Define macro.
4577 (clone_agent_expr): New function.
4578 (clone_one_breakpoint): New function.
4579 (clone_all_breakpoints): New function.
4580 * mem-break.h: Declare new functions.
4582 2015-05-12 Don Breazeal <donb@codesourcery.com>
4584 * linux-low.c (linux_supports_fork_events): New function.
4585 (linux_supports_vfork_events): New function.
4586 (linux_target_ops): Initialize new structure members.
4587 (initialize_low): Call linux_check_ptrace_features.
4588 * lynx-low.c (lynx_target_ops): Initialize new structure
4590 * server.c (report_fork_events, report_vfork_events):
4592 (handle_query): Add new features to qSupported packet and
4594 (captured_main): Initialize new global variables.
4595 * target.h (struct target_ops) <supports_fork_events>:
4597 <supports_vfork_events>: New member.
4598 (target_supports_fork_events): New macro.
4599 (target_supports_vfork_events): New macro.
4600 * win32-low.c (win32_target_ops): Initialize new structure
4603 2015-05-12 Gary Benson <gbenson@redhat.com>
4605 * server.c (handle_qxfer_exec_file): Use current process
4608 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4610 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4611 Remove HAVE_PTRACE_GETREGS conditionals.
4612 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4613 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4615 2015-05-08 Yao Qi <yao.qi@linaro.org>
4617 * linux-low.c (linux_supports_conditional_breakpoints): New
4619 (linux_target_ops): Install new target method.
4620 * lynx-low.c (lynx_target_ops): Install NULL hook for
4621 supports_conditional_breakpoints.
4622 * nto-low.c (nto_target_ops): Likewise.
4623 * spu-low.c (spu_target_ops): Likewise.
4624 * win32-low.c (win32_target_ops): Likewise.
4625 * server.c (handle_query): Check
4626 target_supports_conditional_breakpoints.
4627 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4629 (target_supports_conditional_breakpoints): New macro.
4631 2015-05-06 Pedro Alves <palves@redhat.com>
4634 * server.c (start_inferior): If the process exits, mourn it.
4636 2015-04-21 Gary Benson <gbenson@redhat.com>
4638 * hostio.c (fileio_open_flags_to_host): Factored out to
4639 fileio_to_host_openflags in common/fileio.c. Single use
4642 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4644 * linux-xtensa-low.c (xtensa_fill_gregset)
4645 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4648 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4650 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4651 (regs_info): Replace usrregs pointer with NULL.
4653 2015-04-17 Gary Benson <gbenson@redhat.com>
4655 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4656 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4657 * server.c (handle_qxfer_exec_file): New function.
4658 (qxfer_packets): Add exec-file entry.
4659 (handle_query): Report qXfer:exec-file:read as supported packet.
4661 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4663 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4665 2015-04-09 Gary Benson <gbenson@redhat.com>
4667 * hostio-errno.c (errno_to_fileio_error): Remove function.
4668 Update caller to use remote_fileio_to_fio_error.
4670 2015-04-09 Yao Qi <yao.qi@linaro.org>
4672 * linux-low.c (linux_insert_point): Call
4673 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4674 (linux_remove_point): Call remove_memory_breakpoint if type is
4676 * linux-x86-low.c (x86_insert_point): Don't call
4677 insert_memory_breakpoint.
4678 (x86_remove_point): Don't call remove_memory_breakpoint.
4680 2015-04-01 Pedro Alves <palves@redhat.com>
4681 Cleber Rosa <crosa@redhat.com>
4683 * server.c (gdbserver_usage): Reorganize and extend the usage
4686 2015-03-24 Pedro Alves <palves@redhat.com>
4688 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4689 output. Also dump TRAP_TRACE.
4690 (linux_low_filter_event): In debug output, distinguish a
4691 resume_stop SIGSTOP from a delayed SIGSTOP.
4693 2015-03-24 Gary Benson <gbenson@redhat.com>
4695 * linux-x86-low.c (x86_linux_new_thread): Moved to
4697 (x86_linux_prepare_to_resume): Likewise.
4699 2015-03-24 Gary Benson <gbenson@redhat.com>
4701 * Makefile.in (x86-linux-dregs.o): New rule.
4702 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4703 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4704 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4705 (x86_linux_dr_get): Likewise.
4706 (x86_linux_dr_set): Likewise.
4707 (update_debug_registers_callback): Likewise.
4708 (x86_linux_dr_set_addr): Likewise.
4709 (x86_linux_dr_get_addr): Likewise.
4710 (x86_linux_dr_set_control): Likewise.
4711 (x86_linux_dr_get_control): Likewise.
4712 (x86_linux_dr_get_status): Likewise.
4713 (x86_linux_update_debug_registers): Likewise.
4715 2015-03-24 Gary Benson <gbenson@redhat.com>
4717 * linux-x86-low.c (x86_linux_update_debug_registers):
4718 New function, factored out from...
4719 (x86_linux_prepare_to_resume): ...this.
4721 2015-03-24 Gary Benson <gbenson@redhat.com>
4723 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4724 (x86_linux_dr_set): Likewise.
4725 (update_debug_registers_callback): Likewise.
4726 (x86_linux_dr_set_addr): Likewise.
4727 (x86_linux_dr_get_addr): Likewise.
4728 (x86_linux_dr_set_control): Likewise.
4729 (x86_linux_dr_get_control): Likewise.
4730 (x86_linux_dr_get_status): Likewise.
4731 (x86_linux_prepare_to_resume): Likewise.
4733 2015-03-24 Gary Benson <gbenson@redhat.com>
4735 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4736 Use perror_with_name. Pass string through gettext.
4737 (x86_linux_dr_set): Likewise.
4739 2015-03-24 Gary Benson <gbenson@redhat.com>
4741 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4742 (x86_linux_dr_set_addr): ...this.
4743 (x86_dr_low_get_addr): Rename to...
4744 (x86_linux_dr_get_addr): ...this.
4745 (x86_dr_low_set_control): Rename to...
4746 (x86_linux_dr_set_control): ...this.
4747 (x86_dr_low_get_control): Rename to...
4748 (x86_linux_dr_get_control): ...this.
4749 (x86_dr_low_get_status): Rename to...
4750 (x86_linux_dr_get_status): ...this.
4751 (x86_dr_low): Update with new function names.
4753 2015-03-24 Gary Benson <gbenson@redhat.com>
4755 * Makefile.in (x86-linux.o): New rule.
4756 * configure.srv: Add x86-linux.o to relevant targets.
4757 * linux-low.c (lwp_set_arch_private_info): New function.
4758 (lwp_arch_private_info): Likewise.
4759 * linux-x86-low.c: Include nat/x86-linux.h.
4760 (arch_lwp_info): Removed structure.
4761 (update_debug_registers_callback):
4762 Use lwp_set_debug_registers_changed.
4763 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4764 and lwp_set_debug_registers_changed.
4765 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4767 2015-03-24 Gary Benson <gbenson@redhat.com>
4769 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4770 * linux-arm-low.c (arm_new_thread): Likewise.
4771 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4772 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4773 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4774 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4776 2015-03-24 Gary Benson <gbenson@redhat.com>
4778 * linux-low.c (ptid_of_lwp): New function.
4779 (lwp_is_stopped): Likewise.
4780 (lwp_stop_reason): Likewise.
4781 * linux-x86-low.c (update_debug_registers_callback):
4783 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4786 2015-03-24 Gary Benson <gbenson@redhat.com>
4788 * linux-low.h (linux_stop_lwp): Remove declaration.
4790 2015-03-24 Gary Benson <gbenson@redhat.com>
4792 * linux-low.h: Include nat/linux-nat.h.
4793 * linux-low.c (iterate_over_lwps_args): New structure.
4794 (iterate_over_lwps_filter): New function.
4795 (iterate_over_lwps): Likewise.
4796 * linux-x86-low.c (update_debug_registers_callback):
4797 Update signature to what iterate_over_lwps expects.
4798 Remove PID check that iterate_over_lwps now performs.
4799 (x86_dr_low_set_addr): Use iterate_over_lwps.
4800 (x86_dr_low_set_control): Likewise.
4802 2015-03-24 Gary Benson <gbenson@redhat.com>
4804 * linux-x86-low.c (x86_debug_reg_state): New function.
4805 (x86_linux_prepare_to_resume): Use the above.
4807 2015-03-24 Gary Benson <gbenson@redhat.com>
4809 * linux-low.c (current_lwp_ptid): New function.
4810 * linux-x86-low.c: Include nat/linux-nat.h.
4811 (x86_dr_low_get_addr): Use current_lwp_ptid.
4812 (x86_dr_low_get_control): Likewise.
4813 (x86_dr_low_get_status): Likewise.
4815 2015-03-20 Pedro Alves <palves@redhat.com>
4817 * tracepoint.c (cmd_qtstatus): Make "str" const.
4819 2015-03-20 Pedro Alves <palves@redhat.com>
4821 * server.c (handle_general_set): Make "req_str" const.
4823 2015-03-19 Pedro Alves <palves@redhat.com>
4825 * linux-low.c (linux_resume_one_lwp): Rename to ...
4826 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4827 instead call perror_with_name.
4828 (check_ptrace_stopped_lwp_gone): New function.
4829 (linux_resume_one_lwp): Reimplement as wrapper around
4830 linux_resume_one_lwp_throw that swallows errors if the LWP is
4833 2015-03-19 Pedro Alves <palves@redhat.com>
4835 * linux-low.c (count_events_callback, select_event_lwp_callback):
4836 No longer check whether the thread has resume_stop as last resume
4839 2015-03-19 Pedro Alves <palves@redhat.com>
4841 * linux-low.c (count_events_callback, select_event_lwp_callback):
4842 Use the lwp's status_pending_p field, not the thread's.
4844 2015-03-19 Pedro Alves <palves@redhat.com>
4846 * linux-low.c (select_event_lwp_callback): Update comments to
4847 no longer mention SIGTRAP.
4849 2015-03-18 Gary Benson <gbenson@redhat.com>
4851 * server.c (handle_query): Do not report vFile:fstat as supported.
4853 2015-03-11 Gary Benson <gbenson@redhat.com>
4855 * hostio.c (sys/types.h): New include.
4856 (sys/stat.h): Likewise.
4857 (common-remote-fileio.h): Likewise.
4858 (handle_fstat): New function.
4859 (handle_vFile): Handle vFile:fstat packets.
4861 2015-03-11 Gary Benson <gbenson@redhat.com>
4863 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4864 struct stat.st_blocks and struct stat.st_blksize.
4865 * configure: Regenerate.
4866 * config.in: Likewise.
4867 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4868 (OBS): Add common-remote-fileio.o.
4869 (common-remote-fileio.o): New rule.
4871 2015-03-09 Pedro Alves <palves@redhat.com>
4873 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4874 'struct sockaddr' pointer in 'accept' call.
4876 2015-03-09 Pedro Alves <palves@redhat.com>
4879 2015-03-07 Pedro Alves <palves@redhat.com>
4880 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4881 or <winsock2.h> here. Instead include "gdb_socket.h".
4882 (remote_open): Use union gdb_sockaddr_u.
4883 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4884 or <winsock2.h> here. Instead include "gdb_socket.h".
4885 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4886 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4888 (init_named_socket, gdb_agent_helper_thread): Use union
4891 2015-03-07 Pedro Alves <palves@redhat.com>
4893 * configure.ac (build_warnings): Move
4894 -Wdeclaration-after-statement to the C-specific set.
4895 * configure: Regenerate.
4897 2015-03-07 Pedro Alves <palves@redhat.com>
4899 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4900 or <winsock2.h> here. Instead include "gdb_socket.h".
4901 (remote_open): Use union gdb_sockaddr_u.
4902 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4903 or <winsock2.h> here. Instead include "gdb_socket.h".
4904 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4905 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4907 (init_named_socket, gdb_agent_helper_thread): Use union
4910 2015-03-07 Pedro Alves <palves@redhat.com>
4912 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4915 2015-03-06 Yao Qi <yao.qi@linaro.org>
4917 * linux-aarch64-low.c (aarch64_insert_point): Use
4918 show_debug_regs as a boolean.
4919 (aarch64_remove_point): Likewise.
4921 2015-03-05 Pedro Alves <palves@redhat.com>
4923 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4924 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4925 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4926 * nto-low.c (nto_target_ops): Likewise.
4927 * spu-low.c (spu_target_ops): Likewise.
4928 * win32-low.c (win32_target_ops): Likewise.
4930 2015-03-04 Pedro Alves <palves@redhat.com>
4932 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4933 Decide whether a breakpoint triggered based on the SIGTRAP's
4935 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4936 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4937 (linux_low_filter_event): Check for breakpoints before checking
4939 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4941 (linux_stopped_by_sw_breakpoint)
4942 (linux_supports_stopped_by_sw_breakpoint)
4943 (linux_stopped_by_hw_breakpoint)
4944 (linux_supports_stopped_by_hw_breakpoint): New functions.
4945 (linux_target_ops): Install new target methods.
4947 2015-03-04 Pedro Alves <palves@redhat.com>
4949 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4950 * server.c (swbreak_feature, hwbreak_feature): New globals.
4951 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4952 (captured_main): Clear swbreak_feature and hwbreak_feature.
4953 * server.h (swbreak_feature, hwbreak_feature): Declare.
4954 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4955 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4956 supports_stopped_by_hw_breakpoint>: New fields.
4957 (target_supports_stopped_by_sw_breakpoint)
4958 (target_stopped_by_sw_breakpoint)
4959 (target_supports_stopped_by_hw_breakpoint)
4960 (target_stopped_by_hw_breakpoint): Declare.
4962 2015-03-04 Pedro Alves <palves@redhat.com>
4964 enum lwp_stop_reason -> enum target_stop_reason
4965 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4966 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4967 (linux_wait_1, stuck_in_jump_pad_callback)
4968 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4969 (linux_stopped_by_watchpoint):
4970 * linux-low.h (enum lwp_stop_reason): Delete.
4971 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4972 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4974 2015-03-04 Yao Qi <yao.qi@linaro.org>
4976 * Makefile.in (SFILES): Add linux-aarch64-low.c.
4978 2015-03-03 Gary Benson <gbenson@redhat.com>
4980 * hostio.c (handle_vFile): Fix prefix lengths.
4982 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
4984 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4987 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
4989 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4990 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4991 (clean): Add "rm -f" for above C files.
4992 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4993 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4994 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4995 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4996 * linux-s390-low.c (HWCAP_S390_VX): New macro.
4997 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4998 (init_registers_s390x_vx_linux64)
4999 (init_registers_s390x_tevx_linux64)
5000 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5001 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5003 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5004 (s390_store_vxrs_high): New functions.
5005 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5007 (s390_arch_setup): Add logic for selecting one of the new target
5008 descriptions. Activate the new vector regsets if applicable.
5009 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5010 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5011 and init_registers_s390x_tevx_linux64.
5013 2015-03-01 Pedro Alves <palves@redhat.com>
5015 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5018 2015-02-27 Pedro Alves <palves@redhat.com>
5020 * linux-x86-low.c (u_debugreg_offset): New function.
5021 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5023 2015-02-27 Pedro Alves <palves@redhat.com>
5025 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5026 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5027 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5028 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5029 (ps_lsetfpregs, ps_getpid)
5030 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5031 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5032 (ps_lsetxregs, ps_plog): Declare.
5034 2015-02-27 Pedro Alves <palves@redhat.com>
5036 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5037 IP_AGENT_EXPORT_FUNC.
5038 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5039 IP_AGENT_EXPORT_FUNC.
5040 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5041 (IP_AGENT_EXPORT): Delete.
5042 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5043 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5044 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5045 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5046 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5047 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5048 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5049 (traceframe_read_count, traceframe_write_count)
5050 (traceframes_created, trace_state_variables, get_raw_reg)
5051 (get_trace_state_variable_value, set_trace_state_variable_value)
5052 (ust_loaded, helper_thread_id, cmd_buf): Use
5053 IPA_SYM_EXPORTED_NAME.
5054 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5055 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5056 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5057 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5058 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5059 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5060 EXTERN_C_PUSH/EXTERN_C_POP.
5061 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5062 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5063 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5064 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5065 (traceframe_write_count, traceframe_read_count)
5066 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5067 (about_to_request_buffer_space, get_trace_state_variable_value)
5068 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5069 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5070 EXTERN_C_PUSH/EXTERN_C_POP.
5071 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5072 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5073 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5074 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5075 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5076 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5077 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5078 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5080 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5081 (IP_AGENT_EXPORT_VAR_DECL): Define.
5083 (gdb_agent_get_raw_reg): Declare.
5085 2015-02-27 Tom Tromey <tromey@redhat.com>
5086 Pedro Alves <palves@redhat.com>
5088 Rename symbols whose names are reserved C++ keywords throughout.
5090 2015-02-27 Pedro Alves <palves@redhat.com>
5092 * Makefile.in (COMPILER): New, get it from autoconf.
5093 (CXX): Get from autoconf instead.
5094 (COMPILE.pre): Use COMPILER.
5095 (CC-LD): Rename to ...
5096 (CC_LD): ... this. Use COMPILER.
5097 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5098 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5099 * acinclude.m4: Include build-with-cxx.m4.
5100 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5101 Disable -Werror by default if building in C++ mode.
5102 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5103 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5104 the C++ compiler. Save/restore CXXFLAGS too.
5105 * configure: Regenerate.
5107 2015-02-27 Pedro Alves <palves@redhat.com>
5109 * acinclude.m4: Include libiberty.m4.
5110 * configure.ac: Call libiberty_INIT.
5111 * config.in, configure: Regenerate.
5113 2015-02-26 Pedro Alves <palves@redhat.com>
5115 * linux-low.c (linux_wait_1): When incrementing the PC past a
5116 program breakpoint always use the_low_target.breakpoint_len as
5117 increment, rather than the maximum between that and
5118 the_low_target.decr_pc_after_break.
5120 2015-02-23 Pedro Alves <palves@redhat.com>
5122 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5123 thread was doing a step-over; always adjust the PC if
5124 we stepped over a permanent breakpoint.
5125 (linux_wait_1): If we stepped over breakpoint that was on top of a
5126 permanent breakpoint, manually advance the PC past it.
5128 2015-02-23 Pedro Alves <palves@redhat.com>
5130 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5132 (x86_fill_gregset, x86_store_gregset): Use it when handling
5135 2015-02-20 Pedro Alves <palves@redhat.com>
5137 * thread-db.c: Include "nat/linux-procfs.h".
5138 (thread_db_init): Skip listing new threads if the kernel supports
5139 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5141 2015-02-20 Pedro Alves <palves@redhat.com>
5143 * linux-low.c (status_pending_p_callback): Use ptid_match.
5145 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5147 PR breakpoints/16812
5148 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5149 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5150 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5152 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5154 PR breakpoints/15956
5155 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5157 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5159 * linux-low.c (linux_low_btrace_conf): Print size.
5160 * server.c (handle_btrace_conf_general_set): New.
5161 (hanle_general_set): Call handle_btrace_conf_general_set.
5162 (handle_query): Report Qbtrace-conf:bts:size as supported.
5164 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5166 * linux-low.c (linux_low_enable_btrace): Update parameters.
5167 (linux_low_btrace_conf): New.
5168 (linux_target_ops)<to_btrace_conf>: Initialize.
5169 * server.c (current_btrace_conf): New.
5170 (handle_btrace_enable): Rename to ...
5171 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
5172 to target_enable_btrace. Update comment. Update users.
5173 (handle_qxfer_btrace_conf): New.
5174 (qxfer_packets): Add btrace-conf entry.
5175 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5176 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5177 (target_ops)<read_btrace_conf>: New.
5178 (target_enable_btrace): Update parameters.
5179 (target_read_btrace_conf): New.
5181 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5183 * server.c (handle_btrace_general_set): Remove call to
5184 target_supports_btrace.
5185 (supported_btrace_packets): New.
5186 (handle_query): Call supported_btrace_packets.
5187 * target.h: include btrace-common.h.
5188 (btrace_target_info): Removed.
5189 (supports_btrace, target_supports_btrace): Update parameters.
5191 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5193 * Makefile.in (SFILES): Add common/btrace-common.c.
5194 (OBS): Add common/btrace-common.o.
5195 (btrace-common.o): Add build rules.
5196 * linux-low: Include btrace-common.h.
5197 (linux_low_read_btrace): Use struct btrace_data. Call
5198 btrace_data_init and btrace_data_fini.
5200 2015-02-06 Pedro Alves <palves@redhat.com>
5202 * thread-db.c (find_new_threads_callback): Add debug output.
5204 2015-02-04 Pedro Alves <palves@redhat.com>
5206 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5207 (resume_stopped_resumed_lwps): New function.
5208 (linux_wait_for_event_filtered): Use it.
5210 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5212 * Makefile.in (SFILES): Add linux-personality.c.
5213 (linux-personality.o): New rule.
5214 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5215 list of objects to be built.
5216 * linux-low.c: Include nat/linux-personality.h.
5217 (linux_create_inferior): Remove code to disable address space
5218 randomization (moved to ../nat/linux-personality.c). Create
5219 cleanup to disable address space randomization.
5221 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5223 * Makefile.in (posix-strerror.o): New rule.
5224 (mingw-strerror.o): Likewise.
5225 * configure: Regenerated.
5226 * configure.ac: Source file ../common/common.host. Initialize new
5227 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5229 2015-01-14 Yao Qi <yao@codesourcery.com>
5231 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5232 (ppc-linux.o): New rule.
5233 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5234 * configure.ac: AC_CHECK_FUNCS(getauxval).
5235 * config.in: Re-generated.
5236 * configure: Re-generated.
5237 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5238 ppc64_64bit_inferior_p
5240 2015-01-14 Yao Qi <yao@codesourcery.com>
5242 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5243 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5244 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5245 (PT_ORIG_R3, PT_TRAP): Likewise.
5246 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5247 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5248 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5250 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5252 * i387-fp.c (i387_cache_to_xsave): In look over
5253 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5254 zmmh_low_space field by use of zmmh_high_space.
5256 2015-01-09 Pedro Alves <palves@redhat.com>
5258 * linux-low.c (step_over_bkpt): Move higher up in the file.
5259 (handle_extended_wait): Don't store the stop_pc here.
5260 (get_stop_pc): Adjust comments and rename to ...
5261 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5262 stopped for a software breakpoint or hardware breakpoint.
5263 (thread_still_has_status_pending_p): New function.
5264 (status_pending_p_callback): Use
5265 thread_still_has_status_pending_p. If the event is no longer
5266 interesting, resume the LWP.
5267 (handle_tracepoints): Add assert.
5268 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5269 (wstatus_maybe_breakpoint): New function.
5270 (cancel_breakpoint): Delete function.
5271 (check_stopped_by_watchpoint): New function, factored out from
5272 linux_low_filter_event.
5273 (lp_status_maybe_breakpoint): Delete function.
5274 (linux_low_filter_event): Remove filter_ptid argument.
5275 Leave thread group exits pending here. Store the LWP's stop PC.
5276 Always leave events pending.
5277 (linux_wait_for_event_filtered): Pull all events out of the
5278 kernel, and leave them all pending.
5279 (count_events_callback, select_event_lwp_callback): Consider all
5281 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5282 (select_event_lwp): Only give preference to the stepping LWP in
5283 all-stop mode. Adjust comments.
5284 (ignore_event): New function.
5285 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5286 references to cancel_breakpoints. Adjust to renames. Also give
5287 equal priority to all LWPs that have had events in non-stop mode.
5288 If reporting a software breakpoint event, unadjust the LWP's PC.
5289 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5290 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5292 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5293 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5294 (linux_stopped_by_watchpoint): Adjust.
5295 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5296 * linux-low.h (enum lwp_stop_reason): New.
5297 (struct lwp_info) <stop_pc>: Adjust comment.
5298 <stopped_by_watchpoint>: Delete field.
5299 <stop_reason>: New field.
5300 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5301 * mem-break.c (software_breakpoint_inserted_here)
5302 (hardware_breakpoint_inserted_here): New function.
5303 * mem-break.h (software_breakpoint_inserted_here)
5304 (hardware_breakpoint_inserted_here): Declare.
5305 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5306 (cancel_breakpoints): Delete.
5307 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5308 (upload_fast_traceframes): Remove references to
5311 2015-01-09 Pedro Alves <palves@redhat.com>
5313 * thread-db.c (find_new_threads_callback): Ignore thread if the
5314 kernel thread ID is -1.
5316 2015-01-09 Pedro Alves <palves@redhat.com>
5318 * linux-low.c (linux_attach_fail_reason_string): Move to
5319 nat/linux-ptrace.c, and rename.
5320 (linux_attach_lwp): Update comment.
5321 (attach_proc_task_lwp_callback): New function.
5322 (linux_attach): Adjust to rename and use
5323 linux_proc_attach_tgid_threads.
5324 (linux_attach_fail_reason_string): Delete declaration.
5326 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5328 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5329 * server.c (gdbserver_version): Likewise.
5331 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5333 * remote-utils.c: Include ctype.h.
5334 (input_interrupt): Explicitly handle the case when the char
5335 received is the NUL byte. Improve the printing of non-ASCII
5338 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5340 * linux-low.c (linux_low_filter_event): Update call to
5341 linux_enable_event_reporting following the addition of
5342 a new parameter to that function.
5344 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5347 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5348 (AARCH64_FPCR_REGNO): Likewise.
5349 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5350 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5351 (aarch64_store_fpregset): Likewise.
5353 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5355 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5356 Remove FIXME comment about assumption about N.
5358 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5360 * configure.ac: If large-file support is disabled in GDBserver,
5361 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5362 * configure: Regenerate.
5364 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5366 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5367 warning upon ENODATA from ptrace.
5368 * linux-s390-low.c (s390_store_tdb): New.
5369 (s390_regsets): Add regset for NT_S390_TDB.
5371 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5373 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5374 without a fill_function.
5375 * linux-s390-low.c (s390_fill_last_break): Remove.
5376 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5377 (s390_arch_setup): Use regset's size instead of fill_function for
5380 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5382 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5383 the regset's store function when ptrace returned an error.
5384 * regcache.c (get_thread_regcache): Invalidate register cache
5385 before fetching inferior's registers.
5387 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5389 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5390 while-loop as for-loop.
5391 (regsets_store_inferior_registers): Likewise.
5393 2014-11-28 Yao Qi <yao@codesourcery.com>
5395 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5396 * config.in, configure: Re-generate.
5397 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5400 2014-11-21 Yao Qi <yao@codesourcery.com>
5402 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5403 (AC_CHECK_HEADERS): Remove malloc.h.
5404 * configure: Re-generated.
5405 * config.in: Re-generated.
5406 * server.h: Don't include alloca.h and malloc.h.
5407 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5408 Don't include malloc.h.
5410 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5412 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5413 corresponding ERRNO check in same block.
5415 2014-11-12 Pedro Alves <palves@redhat.com>
5417 * server.c (cont_thread): Update comment.
5418 (start_inferior, attach_inferior): No longer clear cont_thread.
5419 (handle_v_cont): No longer set cont_thread.
5420 (captured_main): Clear cont_thread each time a GDB connects.
5422 2014-11-12 Pedro Alves <palves@redhat.com>
5424 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5425 thread, and don't resume all threads if the Hc thread has exited.
5427 2014-11-12 Pedro Alves <palves@redhat.com>
5429 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5430 the process group instead of to a specific LWP.
5432 2014-10-15 Pedro Alves <palves@redhat.com>
5435 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5437 (arm_set_thread_context): Delete.
5438 (the_low_target): Adjust.
5439 * win32-i386-low.c (debug_registers_changed)
5440 (debug_registers_used): Delete.
5441 (update_debug_registers_callback): New function.
5442 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5443 needing to update their debug registers.
5444 (win32_get_current_dr): New function.
5445 (x86_dr_low_get_addr, x86_dr_low_get_control)
5446 (x86_dr_low_get_status): Fetch the debug register from the thread
5448 (i386_initial_stuff): Adjust.
5449 (i386_get_thread_context): Remove current_event parameter. Don't
5450 clear debug_registers_changed nor copy DR values to
5452 (i386_set_thread_context): Delete.
5453 (i386_prepare_to_resume): New function.
5454 (i386_thread_added): Mark the thread as needing to update irs
5456 (the_low_target): Remove i386_set_thread_context and install
5457 i386_prepare_to_resume.
5458 * win32-low.c (win32_get_thread_context): Adjust.
5459 (win32_set_thread_context): Use SetThreadContext
5461 (win32_prepare_to_resume): New function.
5462 (win32_require_context): New function, factored out from ...
5463 (thread_rec): ... this.
5464 (continue_one_thread): Call win32_prepare_to_resume on each thread
5465 we're about to continue.
5466 (win32_resume): Call win32_prepare_to_resume on the event thread.
5467 * win32-low.h (struct win32_thread_info)
5468 <debug_registers_changed>: New field.
5469 (struct win32_target_ops): Change prototype of set_thread_context,
5470 delete set_thread_context and add prepare_to_resume.
5471 (win32_require_context): New declaration.
5473 2014-10-08 Gary Benson <gbenson@redhat.com>
5475 * server.h: Do not include common-exceptions.h.
5477 2014-10-08 Gary Benson <gbenson@redhat.com>
5479 * server.h: Do not include cleanups.h.
5481 2014-09-30 James Hogan <james.hogan@imgtec.com>
5483 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5486 2014-09-23 Yao Qi <yao@codesourcery.com>
5488 * linux-low.c (lp_status_maybe_breakpoint): New function.
5489 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5490 (count_events_callback): Likewise.
5491 (select_event_lwp_callback): Likewise.
5492 (cancel_breakpoints_callback): Likewise.
5494 2014-09-19 Don Breazeal <donb@codesourcery.com>
5496 * linux-low.c (handle_extended_wait): Call
5497 linux_ptrace_get_extended_event.
5498 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5499 linux_is_extended_waitstatus.
5501 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5503 * Makefile.in (CPPFLAGS): Define.
5504 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5505 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5507 2014-09-16 Gary Benson <gbenson@redhat.com>
5509 * inferiors.h (current_inferior): Renamed as...
5510 (current_thread): New variable. All uses updated.
5511 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5512 (maybe_move_out_of_jump_pad): Likewise.
5513 (cancel_breakpoint): Likewise.
5514 (linux_low_filter_event): Likewise.
5515 (wait_for_sigstop): Likewise.
5516 (linux_resume_one_lwp): Likewise.
5517 (need_step_over_p): Likewise.
5518 (start_step_over): Likewise.
5519 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5520 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5521 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5522 and save_inferior as saved_thread.
5523 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5525 (regcache_invalidate_thread): Likewise.
5526 * remote-utils.c (prepare_resume_reply): Likewise.
5527 * thread-db.c (thread_db_get_tls_address): Likewise.
5528 (disable_thread_event_reporting): Likewise.
5529 (remove_thread_event_breakpoints): Likewise.
5530 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5532 * target.h (set_desired_inferior): Renamed as...
5533 (set_desired_thread): New declaration. All uses updated.
5534 * server.c (myresume): Updated comment to reference thread instead
5536 (handle_serial_event): Likewise.
5537 (handle_target_event): Likewise.
5539 2014-09-12 Tom Tromey <tromey@redhat.com>
5540 Gary Benson <gbenson@redhat.com>
5542 * regcache.h: Include common-regcache.h.
5543 (regcache_read_pc): Don't declare.
5544 * regcache.c (get_thread_regcache_for_ptid): New function.
5546 2014-09-11 Tom Tromey <tromey@redhat.com>
5547 Gary Benson <gbenson@redhat.com>
5549 * symbol.c: New file.
5550 * Makefile.in (SFILES): Add symbol.c.
5551 (OBS): Add symbol.o.
5553 2014-09-11 Gary Benson <gbenson@redhat.com>
5555 * target.c (target_stop_ptid, target_continue_ptid): New
5558 2014-09-11 Tom Tromey <tromey@redhat.com>
5559 Gary Benson <gbenson@redhat.com>
5561 * target.h: Include target/target.h.
5562 * target.c (target_read_memory, target_read_uint32)
5563 (target_write_memory): New functions.
5565 2014-09-11 Gary Benson <gbenson@redhat.com>
5567 * server.h (debug_hw_points): Don't declare.
5568 * server.c (debug_hw_points): Don't define. Replace all uses
5569 with show_debug_regs.
5570 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5571 all uses with show_debug_regs.
5573 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5575 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5576 endianness into account.
5577 (ppc_supply_ptrace_register): Likewise.
5579 2014-09-03 James Hogan <james.hogan@imgtec.com>
5581 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5582 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5584 2014-09-03 Gary Benson <gbenson@redhat.com>
5586 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5587 ALL_DEBUG_ADDRESS_REGISTERS.
5589 2014-09-02 Gary Benson <gbenson@redhat.com>
5591 * i386-low.h: Renamed as...
5592 * x86-low.h: New file. All type, function and variable name
5593 prefixes changed from "i386_" to "x86_". All references updated.
5594 * i386-low.c: Renamed as...
5595 * x86-low.c: New file. All type, function and variable name
5596 prefixes changed from "i386_" to "x86_". All references updated.
5598 2014-09-02 Gary Benson <gbenson@redhat.com>
5600 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5601 (x86_linux_new_thread): Likewise.
5603 2014-08-29 Gary Benson <gbenson@redhat.com>
5605 * server.h (setjmp.h): Do not include.
5606 (toplevel): Do not declare.
5607 (common-exceptions.h): Include.
5608 (cleanups.h): Likewise.
5609 * server.c (toplevel): Do not define.
5610 (exit_code): New static global.
5611 (detach_or_kill_for_exit_cleanup): New function.
5612 (main): New function. Original main renamed to...
5613 (captured_main): New function.
5614 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5616 2014-08-29 Gary Benson <gbenson@redhat.com>
5618 * Makefile.in (SFILES): Add common/common-exceptions.c.
5619 (OBS): Add common-exceptions.o.
5620 (common-exceptions.o): New rule.
5621 * utils.c (prepare_to_throw_exception): New function.
5623 2014-08-29 Gary Benson <gbenson@redhat.com>
5625 * config.in: Regenerate.
5626 * configure: Likewise.
5628 2014-08-29 Gary Benson <gbenson@redhat.com>
5630 * Makefile.in (SFILES): Add common/cleanups.c.
5632 (cleanups.o): New rule.
5634 2014-08-29 Gary Benson <gbenson@redhat.com>
5636 * utils.c (internal_vwarning): New function.
5638 2014-08-28 Gary Benson <gbenson@redhat.com>
5640 * utils.h (fatal): Remove declaration.
5641 * utils.c (fatal): Remove function.
5643 2014-08-28 Gary Benson <gbenson@redhat.com>
5645 * tracepoint.c (gdb_agent_init): Replace fatal with
5647 (initialize_tracepoint): Likewise.
5649 2014-08-28 Gary Benson <gbenson@redhat.com>
5651 * remote-utils.c (remote_prepare): Replace fatal with error.
5653 2014-08-28 Gary Benson <gbenson@redhat.com>
5655 * linux-low.c (linux_async): Replace fatal with warning.
5657 (linux_start_non_stop): Return -1 if linux_async failed.
5659 2014-08-28 Gary Benson <gbenson@redhat.com>
5661 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5663 (i386_dr_low_get_addr): Remove vague comment.
5664 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5667 2014-08-28 Gary Benson <gbenson@redhat.com>
5669 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5670 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5672 (linux_resume_one_lwp): Likewise.
5673 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5675 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5676 with internal_error.
5677 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5678 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5679 (find_register_by_name): Replace fatal with internal_error.
5680 (find_regno): Likewise.
5681 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5682 * thread-db.c (thread_db_create_event): Likewise.
5683 (thread_db_load_search): Likewise.
5684 (try_thread_db_load_1): Likewise.
5685 * tracepoint.c (get_jump_space_head): Replace fatal with
5687 (claim_trampoline_space): Likewise.
5688 (have_fast_tracepoint_trampoline_buffer): Likewise.
5689 (cmd_qtstart): Likewise.
5690 (stop_tracing): Likewise.
5691 (fast_tracepoint_collecting): Likewise.
5692 (target_malloc): Likewise.
5693 (download_tracepoint): Likewise.
5694 (download_trace_state_variables): Replace check with gdb_assert.
5695 (upload_fast_traceframes): Replace fatal with internal_error.
5697 2014-08-19 Tom Tromey <tromey@redhat.com>
5698 Gary Benson <gbenson@redhat.com>
5700 * Makefile.in (SFILES): Add common/common-debug.c.
5701 (OBS): Add common-debug.o.
5702 (common-debug.o): New rule.
5703 * debug.h (debug_printf): Don't declare.
5704 * debug.c (debug_printf): Renamed and rewritten as...
5705 (debug_vprintf): New function.
5707 2014-08-19 Gary Benson <gbenson@redhat.com>
5709 * utils.h: Do not include print-utils.h.
5711 2014-08-19 Tom Tromey <tromey@redhat.com>
5712 Gary Benson <gbenson@redhat.com>
5714 * server.h: Add static assertion.
5715 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5717 2014-08-19 Tom Tromey <tromey@redhat.com>
5718 Gary Benson <gbenson@redhat.com>
5720 * Makefile.in (SFILES): Add common/errors.c.
5721 (OBS): Add errors.o.
5722 (IPA_OBS): Add errors-ipa.o.
5723 (errors.o): New rule.
5724 (errors-ipa.o): Likewise.
5725 * utils.h (perror_with_name, error, warning): Don't declare.
5726 * utils.c (warning): Renamed and rewritten as...
5727 (vwarning): New function.
5728 (error): Renamed and rewritten as...
5729 (verror): New function.
5730 (internal_error): Renamed and rewritten as...
5731 (internal_verror): New function.
5733 2014-08-07 Gary Benson <gbenson@redhat.com>
5735 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5736 * configure: Regenerate.
5737 * config.in: Likewise.
5738 * server.h: Do not include errno.h.
5739 * event-loop.c: Likewise.
5740 * hostio-errno.c: Likewise.
5741 * linux-low.c: Likewise.
5742 * remote-utils.c: Likewise.
5743 * spu-low.c: Likewise.
5744 * utils.c: Likewise.
5745 * gdbreplay.c: Unconditionally include errno.h.
5747 2014-08-07 Gary Benson <gbenson@redhat.com>
5749 * server.h: Do not include string.h.
5750 * event-loop.c: Likewise.
5751 * linux-low.c: Likewise.
5752 * regcache.c: Likewise.
5753 * remote-utils.c: Likewise.
5754 * spu-low.c: Likewise.
5755 * utils.c: Likewise.
5757 2014-08-07 Gary Benson <gbenson@redhat.com>
5759 * server.h: Do not include gdb_assert.h.
5761 2014-08-07 Gary Benson <gbenson@redhat.com>
5763 * server.h: Do not include common-utils.h.
5765 2014-08-07 Gary Benson <gbenson@redhat.com>
5767 * server.h: Do not include ptid.h.
5768 * notif.h: Likewise.
5770 2014-08-07 Gary Benson <gbenson@redhat.com>
5772 * server.h: Do not include gdb_locale.h.
5774 2014-08-07 Gary Benson <gbenson@redhat.com>
5776 * server.h: Do not include gdb/signals.h.
5777 * win32-low.c: Likewise.
5779 2014-08-07 Gary Benson <gbenson@redhat.com>
5781 * server.h: Do not include pathmax.h.
5783 2014-08-07 Gary Benson <gbenson@redhat.com>
5785 * server.h: Do not include libiberty.h.
5786 * linux-bfin-low.c: Likewise.
5788 2014-08-07 Gary Benson <gbenson@redhat.com>
5790 * server.h: Do not include ansidecl.h.
5792 2014-08-07 Gary Benson <gbenson@redhat.com>
5794 * linux-x86-low.c: Do not include stddef.h.
5795 * lynx-ppc-low.c: Likewise.
5796 * tracepoint.c: Likewise.
5798 2014-08-07 Gary Benson <gbenson@redhat.com>
5800 * server.h: Do not include stdarg.h.
5801 * nto-low.c: Likewise.
5803 2014-08-07 Gary Benson <gbenson@redhat.com>
5805 * server.h: Do not include stdlib.h.
5806 * inferiors.c: Likewise.
5807 * linux-low.c: Likewise.
5808 * regcache.c: Likewise.
5809 * spu-low.c: Likewise.
5810 * tracepoint.c: Likewise.
5811 * utils.c: Likewise.
5813 2014-08-07 Gary Benson <gbenson@redhat.com>
5815 * server.h: Do not include stdio.h.
5816 * linux-low.c: Likewise.
5817 * remote-utils.c: Likewise.
5818 * spu-low.c: Likewise.
5819 * utils.c: Likewise.
5820 * wincecompat.c: Likewise.
5822 2014-08-06 Gary Benson <gbenson@redhat.com>
5824 * regcache.c (init_register_cache): Move conditionals inside if.
5826 2014-08-06 Gary Benson <gbenson@redhat.com>
5828 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5830 2014-07-31 Gary Benson <gbenson@redhat.com>
5832 * ax.h: Do not include server.h.
5833 * gdbthread.h: Likewise.
5834 * lynx-low.h: Likewise.
5835 * notif.h: Likewise.
5837 2014-07-30 Gary Benson <gbenson@redhat.com>
5839 * server.h: Include common-defs.h.
5840 Do not include config.h or build-gnulib-gdbserver/config.h.
5842 2014-07-30 Gary Benson <gbenson@redhat.com>
5844 * hostio-errno.c: Move server.h to top of includes list.
5845 * inferiors.c: Likewise.
5846 * linux-x86-low.c: Likewise.
5847 * notif.c: Include server.h.
5849 2014-07-24 Tom Tromey <tromey@redhat.com>
5850 Gary Benson <gbenson@redhat.com>
5852 * server.h (CORE_ADDR): Now unsigned.
5854 2014-07-16 Pedro Alves <palves@redhat.com>
5856 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5858 2014-07-15 Pedro Alves <palves@redhat.com>
5860 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5863 2014-07-11 Pedro Alves <palves@redhat.com>
5865 * linux-low.c (kill_wait_lwp): New function, based on
5866 kill_one_lwp_callback, but use my_waitpid directly.
5867 (kill_one_lwp_callback, linux_kill): Use it.
5869 2014-06-23 Pedro Alves <palves@redhat.com>
5871 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5872 before setting DR0..DR3.
5874 2014-06-20 Gary Benson <gbenson@redhat.com>
5876 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5877 * configure: Regenerated.
5878 * config.in: Likewise.
5880 2014-06-20 Gary Benson <gbenson@redhat.com>
5882 * Makefile.in (SFILES): Update locations for files moved
5884 (object file files): Reordered.
5886 2014-06-20 Gary Benson <gbenson@redhat.com>
5888 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5889 (i386_dr_low_set_addr): Likewise.
5890 (i386_dr_low_get_addr): Likewise.
5891 (i386_dr_low_can_set_control): Likewise.
5892 (i386_dr_low_set_control): Likewise.
5893 (i386_dr_low_get_control): Likewise.
5894 (i386_dr_low_get_status): Likewise.
5895 (i386_get_debug_register_length): Likewise.
5896 * linux-x86-low.c (i386_dr_low_set_addr):
5897 Changed signature. Made static.
5898 (i386_dr_low_get_addr): Likewise.
5899 (i386_dr_low_set_control): Likewise.
5900 (i386_dr_low_get_control): Likewise.
5901 (i386_dr_low_get_status): Likewise.
5902 (i386_dr_low): New global variable.
5903 * win32-i386-low.c (i386_dr_low_set_addr):
5904 Changed signature. Made static.
5905 (i386_dr_low_get_addr): Likewise.
5906 (i386_dr_low_set_control): Likewise.
5907 (i386_dr_low_get_control): Likewise.
5908 (i386_dr_low_get_status): Likewise.
5909 (i386_dr_low): New global variable.
5911 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5913 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5914 * Makefile.in (AR, AR_FLAGS): Define.
5915 * configure: Regenerate.
5917 2014-06-19 Gary Benson <gbenson@redhat.com>
5919 * Makefile.in (i386-dregs.o): New rule.
5920 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5921 * i386-low.c (target.h): Remove include.
5922 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5923 (DR_CONTROL_SHIFT): Likewise.
5924 (DR_CONTROL_SIZE): Likewise.
5925 (DR_RW_EXECUTE): Likewise.
5926 (DR_RW_WRITE): Likewise.
5927 (DR_RW_READ): Likewise.
5928 (DR_RW_IORW): Likewise.
5929 (DR_LEN_1): Likewise.
5930 (DR_LEN_2): Likewise.
5931 (DR_LEN_4): Likewise.
5932 (DR_LEN_8): Likewise.
5933 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5934 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5935 (DR_ENABLE_SIZE): Likewise.
5936 (DR_LOCAL_SLOWDOWN): Likewise.
5937 (DR_GLOBAL_SLOWDOWN): Likewise.
5938 (DR_CONTROL_RESERVED): Likewise.
5939 (I386_DR_CONTROL_MASK): Likewise.
5940 (I386_DR_VACANT): Likewise.
5941 (I386_DR_LOCAL_ENABLE): Likewise.
5942 (I386_DR_GLOBAL_ENABLE): Likewise.
5943 (I386_DR_DISABLE): Likewise.
5944 (I386_DR_SET_RW_LEN): Likewise.
5945 (I386_DR_GET_RW_LEN): Likewise.
5946 (I386_DR_WATCH_HIT): Likewise.
5947 (i386_wp_op_t): Likewise.
5948 (i386_show_dr): Likewise.
5949 (i386_length_and_rw_bits): Likewise.
5950 (i386_insert_aligned_watchpoint): Likewise.
5951 (i386_remove_aligned_watchpoint): Likewise.
5952 (i386_handle_nonaligned_watchpoint): Likewise.
5953 i386_update_inferior_debug_regs(): Likewise.
5954 (i386_dr_insert_watchpoint): Likewise.
5955 (i386_dr_remove_watchpoint): Likewise.
5956 (i386_dr_region_ok_for_watchpoint): Likewise.
5957 (i386_dr_stopped_data_address): Likewise.
5958 (i386_dr_stopped_by_watchpoint): Likewise.
5960 2014-06-19 Gary Benson <gbenson@redhat.com>
5962 * i386-low.c (i386_dr_show): Renamed to
5963 i386_show_dr and made static. All uses updated.
5964 (i386_dr_length_and_rw_bits): Renamed to
5965 i386_length_and_rw_bits and made static.
5967 (i386_dr_insert_aligned_watchpoint): Renamed to
5968 i386_insert_aligned_watchpoint and made static.
5970 (i386_dr_remove_aligned_watchpoint): Renamed to
5971 i386_remove_aligned_watchpoint and made static.
5973 (i386_dr_update_inferior_debug_regs): Renamed to
5974 i386_update_inferior_debug_regs and made static.
5977 2014-06-18 Gary Benson <gbenson@redhat.com>
5979 * i386-low.h (i386_dr_low_can_set_addr): New macro.
5980 (i386_dr_low_can_set_control): Likewise.
5981 (i386_get_debug_register_length): Likewise.
5982 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5983 (i386_dr_low_can_set_control): Likewise.
5984 (i386_get_debug_register_length): Likewise.
5986 2014-06-17 Gary Benson <gbenson@redhat.com>
5988 * i386-low.h (i386-dregs.h): New include.
5989 (DR_FIRSTADDR): Now in i386-dregs.h.
5990 (DR_LASTADDR): Likewise.
5991 (DR_NADDR): Likewise.
5992 (DR_STATUS): Likewise.
5993 (DR_CONTROL): Likewise.
5994 (i386_debug_reg_state): Likewise.
5995 (i386_dr_insert_watchpoint): Likewise.
5996 (i386_dr_remove_watchpoint): Likewise.
5997 (i386_dr_region_ok_for_watchpoint): Likewise.
5998 (i386_dr_stopped_data_address): Likewise.
5999 (i386_dr_stopped_by_watchpoint): Likewise.
6000 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6002 2014-06-18 Gary Benson <gbenson@redhat.com>
6004 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6005 i386_dr_insert_watchpoint.
6006 (i386_low_remove_watchpoint): Renamed to
6007 i386_dr_remove_watchpoint.
6008 (i386_low_region_ok_for_watchpoint): Renamed to
6009 i386_dr_region_ok_for_watchpoint.
6010 (i386_low_stopped_data_address): Renamed to
6011 i386_dr_stopped_data_address.
6012 (i386_low_stopped_by_watchpoint): Renamed to
6013 i386_dr_stopped_by_watchpoint.
6014 * i386-low.c (i386_show_dr): Renamed to
6015 i386_dr_show and made nonstatic. All uses updated.
6016 (i386_length_and_rw_bits): Renamed to
6017 i386_dr_length_and_rw_bits and made nonstatic.
6019 (i386_insert_aligned_watchpoint): Renamed to
6020 i386_dr_insert_aligned_watchpoint and made nonstatic.
6022 (i386_remove_aligned_watchpoint): Renamed to
6023 i386_dr_remove_aligned_watchpoint and made nonstatic.
6025 (i386_update_inferior_debug_regs): Renamed to
6026 i386_dr_update_inferior_debug_regs and made nonstatic.
6028 (i386_low_insert_watchpoint): Renamed to
6029 i386_dr_insert_watchpoint. All uses updated.
6030 (i386_low_remove_watchpoint): Renamed to
6031 i386_dr_remove_watchpoint. All uses updated.
6032 (i386_low_region_ok_for_watchpoint): Renamed to
6033 i386_dr_region_ok_for_watchpoint. All uses updated.
6034 (i386_low_stopped_data_address): Renamed to
6035 i386_dr_stopped_data_address. All uses updated.
6036 (i386_low_stopped_by_watchpoint): Renamed to
6037 i386_dr_stopped_by_watchpoint. All uses updated.
6039 2014-06-18 Gary Benson <gbenson@redhat.com>
6041 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6042 (i386_dr_low_can_set_control): Likewise.
6043 (i386_insert_aligned_watchpoint): New check.
6045 2014-06-18 Gary Benson <gbenson@redhat.com>
6047 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6050 2014-06-18 Gary Benson <gbenson@redhat.com>
6052 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6053 instead of fatal and error.
6054 (i386_handle_nonaligned_watchpoint): Likewise.
6056 2014-06-18 Gary Benson <gbenson@redhat.com>
6058 * i386-low.c (i386_get_debug_register_length): New macro.
6059 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6060 (i386_show_dr): Use debug_printf instead of fprintf. Use
6061 phex to format values.
6063 2014-06-18 Gary Benson <gbenson@redhat.com>
6065 * i386-low.h: Comment changes.
6066 * i386-low.c: Likewise.
6068 2014-06-18 Gary Benson <gbenson@redhat.com>
6070 * i386-low.c: Whitespace changes.
6072 2014-06-12 Tom Tromey <tromey@redhat.com>
6074 * utils.c (freeargv): Remove.
6076 2014-06-12 Tom Tromey <tromey@redhat.com>
6078 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6079 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6080 (parse_debug_format_options): Likewise.
6081 (gdbserver_usage): Likewise.
6082 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6083 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6084 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6086 ($(LIBGNU)): Depend on libiberty.
6087 (all-lib): Recurse into all subdirs.
6088 (install-only): Invoke "install" target in subdirs.
6089 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6091 * configure: Rebuild.
6092 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6093 for vasprintf, vsnprintf, or gettimeofday.
6094 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6097 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6099 * development.sh: Delete.
6100 * Makefile.in (config.status): Adjust dependency on development.sh.
6101 * configure.ac: Adjust development.sh source call.
6102 * configure: Regenerate.
6104 2014-06-02 Pedro Alves <palves@redhat.com>
6106 * ax.c (gdb_free_agent_expr): New function.
6107 * ax.h (gdb_free_agent_expr): New declaration.
6108 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6110 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6112 (clear_breakpoint_conditions_and_commands): New function.
6113 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6114 (clear_breakpoint_conditions_and_commands): New declaration.
6116 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6118 * linux-aarch64-low.c (asm/ptrace.h): Include.
6120 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6122 Fix TLS access for -static -pthread.
6123 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6124 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6125 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6127 2014-05-20 Pedro Alves <palves@redhat.com>
6129 * linux-aarch64-low.c (aarch64_insert_point)
6130 (aarch64_remove_point): No longer check whether the type is
6131 supported here. Adjust to new interface.
6132 (the_low_target): Install aarch64_supports_z_point_type as
6133 supports_z_point_type method.
6134 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6135 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6136 instead of a Z packet char. Adjust.
6137 (arm_supports_z_point_type): New function.
6138 (arm_insert_point, arm_remove_point): Adjust to new interface.
6139 (the_low_target): Install arm_supports_z_point_type.
6140 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6141 (cris_insert_point, cris_remove_point): Adjust to new interface.
6142 Don't check whether the type is supported here.
6143 (the_low_target): Install cris_supports_z_point_type.
6144 * linux-low.c (linux_supports_z_point_type): New function.
6145 (linux_insert_point, linux_remove_point): Adjust to new interface.
6146 * linux-low.h (struct linux_target_ops) <insert_point,
6147 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6148 raw_breakpoint pointer parameter.
6149 <supports_z_point_type>: New method.
6150 * linux-mips-low.c (mips_supports_z_point_type): New function.
6151 (mips_insert_point, mips_remove_point): Adjust to new interface.
6152 Use mips_supports_z_point_type.
6153 (the_low_target): Install mips_supports_z_point_type.
6154 * linux-ppc-low.c (the_low_target): Install NULL as
6155 supports_z_point_type method.
6156 * linux-s390-low.c (the_low_target): Install NULL as
6157 supports_z_point_type method.
6158 * linux-sparc-low.c (the_low_target): Install NULL as
6159 supports_z_point_type method.
6160 * linux-x86-low.c (x86_supports_z_point_type): New function.
6161 (x86_insert_point): Adjust to new insert_point interface. Use
6162 insert_memory_breakpoint. Adjust to new
6163 i386_low_insert_watchpoint interface.
6164 (x86_remove_point): Adjust to remove_point interface. Use
6165 remove_memory_breakpoint. Adjust to new
6166 i386_low_remove_watchpoint interface.
6167 (the_low_target): Install x86_supports_z_point_type.
6168 * lynx-low.c (lynx_target_ops): Install NULL as
6169 supports_z_point_type callback.
6170 * nto-low.c (nto_supports_z_point_type): New.
6171 (nto_insert_point, nto_remove_point): Adjust to new interface.
6172 (nto_target_ops): Install nto_supports_z_point_type.
6173 * mem-break.c: Adjust intro comment.
6174 (struct raw_breakpoint) <raw_type, size>: New fields.
6175 <inserted>: Update comment.
6176 <shlib_disabled>: Delete field.
6177 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6178 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6179 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6180 (raw_bkpt_type_to_target_hw_bp_type): New function.
6181 (find_enabled_raw_code_breakpoint_at): New function.
6182 (find_raw_breakpoint_at): New type and size parameters. Use them.
6183 (insert_memory_breakpoint): New function, based off
6184 set_raw_breakpoint_at.
6185 (remove_memory_breakpoint): New function.
6186 (set_raw_breakpoint_at): Reimplement.
6187 (set_breakpoint): New, based on set_breakpoint_at.
6188 (set_breakpoint_at): Reimplement.
6189 (delete_raw_breakpoint): Go through the_target->remove_point
6190 instead of assuming memory breakpoints.
6191 (find_gdb_breakpoint_at): Delete.
6192 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6193 (find_gdb_breakpoint): New function.
6194 (set_gdb_breakpoint_at): Delete.
6195 (z_type_supported): New function.
6196 (set_gdb_breakpoint_1): New function, loosely based off
6197 set_gdb_breakpoint_at.
6198 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6199 (delete_gdb_breakpoint_at): Delete.
6200 (delete_gdb_breakpoint_1): New function, loosely based off
6201 delete_gdb_breakpoint_at.
6202 (delete_gdb_breakpoint): New function.
6203 (clear_gdb_breakpoint_conditions): Rename to ...
6204 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6206 (add_condition_to_breakpoint): Make static.
6207 (add_breakpoint_condition): Take a struct breakpoint pointer
6208 instead of an address. Adjust.
6209 (gdb_condition_true_at_breakpoint): Rename to ...
6210 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6212 (gdb_condition_true_at_breakpoint): Reimplement.
6213 (add_breakpoint_commands): Take a struct breakpoint pointer
6214 instead of an address. Adjust.
6215 (gdb_no_commands_at_breakpoint): Rename to ...
6216 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6217 parameter. Return true if no breakpoint was found. Change debug
6219 (gdb_no_commands_at_breakpoint): Reimplement.
6220 (run_breakpoint_commands): Rename to ...
6221 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6222 and change return type to boolean.
6223 (run_breakpoint_commands): New function.
6224 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6225 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6226 breakpoint. Go through the_target->remove_point instead of
6227 assuming memory breakpoint.
6228 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6229 software and hardware breakpoints.
6230 (reinsert_raw_breakpoint): Go through the_target->insert_point
6231 instead of assuming memory breakpoint.
6232 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6233 software and hardware breakpoints.
6234 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6235 Check both software and hardware breakpoints.
6236 (validate_inserted_breakpoint): Assert the breakpoint is a
6237 software breakpoint. Set the inserted flag to -1 instead of
6238 setting shlib_disabled.
6239 (delete_disabled_breakpoints): Adjust.
6240 (validate_breakpoints): Only validate software breakpoints.
6241 Adjust to inserted flag change.
6242 (check_mem_read, check_mem_write): Skip breakpoint types other
6243 than software breakpoints. Adjust to inserted flag change.
6244 * mem-break.h (enum raw_bkpt_type): New enum.
6245 (raw_breakpoint, struct process_info): Forward declare.
6246 (Z_packet_to_target_hw_bp_type): Delete declaration.
6247 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6248 (set_gdb_breakpoint, delete_gdb_breakpoint)
6249 (clear_breakpoint_conditions): New declarations.
6250 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6251 (breakpoint_inserted_here): Update comment.
6252 (add_breakpoint_condition, add_breakpoint_commands): Replace
6253 address parameter with a breakpoint pointer parameter.
6254 (gdb_breakpoint_here): Update comment.
6255 (delete_gdb_breakpoint_at): Delete.
6256 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6257 * server.c (process_point_options): Take a struct breakpoint
6258 pointer instead of an address. Adjust.
6259 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6260 delete_gdb_breakpoint.
6261 * spu-low.c (spu_target_ops): Install NULL as
6262 supports_z_point_type method.
6263 * target.h: Include mem-break.h.
6264 (struct target_ops) <prepare_to_access_memory>: Update comment.
6265 <supports_z_point_type>: New field.
6266 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6267 instead of a char. Also take a raw breakpoint pointer.
6268 * win32-arm-low.c (the_low_target): Install NULL as
6269 supports_z_point_type.
6270 * win32-i386-low.c (i386_supports_z_point_type): New function.
6271 (i386_insert_point, i386_remove_point): Adjust to new interface.
6272 (the_low_target): Install i386_supports_z_point_type.
6273 * win32-low.c (win32_supports_z_point_type): New function.
6274 (win32_insert_point, win32_remove_point): Adjust to new interface.
6275 (win32_target_ops): Install win32_supports_z_point_type.
6276 * win32-low.h (struct win32_target_ops):
6277 <supports_z_point_type>: New method.
6278 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6279 instead of a char. Also take a raw breakpoint pointer.
6281 2014-05-20 Pedro Alves <palves@redhat.com>
6283 * mem-break.h: Include break-common.h.
6284 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6285 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6286 (Z_packet_to_target_hw_bp_type): New declaration.
6287 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6288 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6289 (Z_PACKET_ACCESS_WP): Delete macros.
6290 (Z_packet_to_hw_type): Delete function.
6291 * i386-low.h: Don't include break-common.h here.
6292 (Z_packet_to_hw_type): Delete declaration.
6293 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6294 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6295 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6296 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6297 * linux-aarch64-low.c: Don't include break-common.h here.
6298 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6299 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6300 (Z_packet_to_target_hw_bp_type): Delete function.
6301 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6303 (mips_insert_point, mips_remove_point): Use
6304 Z_packet_to_target_hw_bp_type.
6306 2014-05-20 Pedro Alves <palves@redhat.com>
6308 * linux-aarch64-low.c: Include break-common.h.
6309 (enum target_point_type): Delete.
6310 (Z_packet_to_point_type): Rename to ...
6311 (Z_packet_to_target_hw_bp_type): ... this, and return a
6312 target_hw_bp_type instead.
6313 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6314 instead of an enum target_point_type.
6315 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6317 (aarch64_dr_state_insert_one_point)
6318 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6319 (aarch64_handle_aligned_watchpoint)
6320 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6321 Take an enum target_hw_bp_type instead of an enum
6323 (aarch64_supports_z_point_type): New function.
6324 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6325 use Z_packet_to_target_hw_bp_type.
6327 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6329 * configure.ac: Only use -Werror by default when DEVELOPMENT
6331 * configure: Regenerate.
6333 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6335 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6336 * linux-x86-low.c (X86_64_USER_REGS): New.
6337 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6339 2014-04-28 Yao Qi <yao@codesourcery.com>
6341 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6344 2014-04-25 Pedro Alves <palves@redhat.com>
6347 * linux-low.c (linux_attach_fail_reason_string): New function.
6348 (linux_attach_lwp): Delete.
6349 (linux_attach_lwp_1): Rename to ...
6350 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6351 argument. Remove "initial" parameter. Return int instead of
6352 void. Don't error or warn here.
6353 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6354 failure to attach to the tgid. Call warning when failing to
6356 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6357 argument. Remove "initial" parameter. Return int instead of
6358 void. Don't error or warn here.
6359 (linux_attach_fail_reason_string): New declaration.
6360 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6361 interface change. Use linux_attach_fail_reason_string.
6363 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6364 Walfred Tedeschi <walfred.tedeschi@intel.com>
6366 * Makefile.in: Added rules to handle new files
6367 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6368 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6369 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6370 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6371 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6372 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6374 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6375 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6376 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6377 i386/x32-avx512.xml.
6378 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6379 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6380 i386/x32-avx512-linux.xml.
6381 * i387-fp.c (num_avx512_k_registers): New constant for number
6383 (num_avx512_zmmh_low_registers): New constant for number of
6384 lower ZMM registers (0-15).
6385 (num_avx512_zmmh_high_registers): New constant for number of
6386 higher ZMM registers (16-31).
6387 (num_avx512_ymmh_registers): New contant for number of higher
6388 YMM registers (ymm16-31 added by avx521 on x86_64).
6389 (num_avx512_xmm_registers): New constant for number of higher
6390 XMM registers (xmm16-31 added by AVX512 on x86_64).
6391 (struct i387_xsave): Add space for AVX512 registers.
6392 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6393 Add code to handle AVX512 registers.
6394 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6395 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6396 prototypei from generated file.
6397 (tdesc_amd64_avx512_linux): Likewise.
6398 (init_registers_x32_avx512_linux): Likewise.
6399 (tdesc_x32_avx512_linux): Likewise.
6400 (init_registers_i386_avx512_linux): Likewise.
6401 (tdesc_i386_avx512_linux): Likewise.
6402 (x86_64_regmap): Add AVX512 registers.
6403 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6405 (initialize_low_arch): Add code to initialize AVX512 registers.
6407 2014-04-23 Pedro Alves <palves@redhat.com>
6409 * mem-break.c (find_gdb_breakpoint_at): Make static.
6410 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6412 2014-04-23 Pedro Alves <palves@redhat.com>
6414 * i386-low.c: Don't include break-common.h here.
6415 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6416 prototype to take target_hw_bp_type as argument instead of a Z
6418 * i386-low.h: Include break-common.h here.
6419 (Z_packet_to_hw_type): Declare.
6420 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6422 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6423 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6424 (x86_remove_point): Convert the packet number to a
6425 target_hw_bp_type before calling i386_low_remove_watchpoint.
6426 * win32-i386-low.c (i386_insert_point): Convert the packet number
6427 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6428 (i386_remove_point): Convert the packet number to a
6429 target_hw_bp_type before calling i386_low_remove_watchpoint.
6431 2014-04-23 Pedro Alves <palves@redhat.com>
6433 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6435 2014-04-10 Pedro Alves <palves@redhat.com>
6437 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6438 Check if the condition or command is NULL before checking if the
6439 breakpoint is known. On success, return true.
6440 * mem-break.h (add_breakpoint_condition): Document return.
6441 (add_breakpoint_commands): Add describing comment.
6442 * server.c (skip_to_semicolon): New function.
6443 (process_point_options): Use it.
6445 2014-04-09 Pedro Alves <palves@redhat.com>
6447 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6450 2014-02-27 Pedro Alves <palves@redhat.com>
6453 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6455 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6457 (last_thread_of_process_p): Take a PID argument instead of a
6459 (linux_wait_for_lwp): Delete.
6460 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6462 (linux_low_filter_event): New function, party factored out from
6463 linux_wait_for_event.
6464 (linux_wait_for_event): Rename to ...
6465 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6466 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6467 sigsuspend. Check for zombie leaders.
6468 (linux_wait_for_event): Reimplement as wrapper around
6469 linux_wait_for_event_filtered.
6470 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6471 a normal or signal exit is seen, it's the whole process exiting.
6472 (wait_for_sigstop): No longer a for_each_inferior callback.
6473 Rewrite on top of linux_wait_for_event_filtered.
6474 (stop_all_lwps): Call wait_for_sigstop directly.
6475 * server.c (resume, handle_target_event): Handle
6476 TARGET_WAITKIND_NO_RESUMED.
6478 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6480 * win32-low.c (psapi_get_dll_name,
6481 * win32_CreateToolhelp32Snapshot): Delete.
6482 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6483 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6485 (handle_load_dll): Add function description.
6486 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6488 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6490 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6492 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6493 base address when calling win32_add_one_solib.
6494 (handle_load_dll): Delete local variable load_addr.
6495 Remove 0x1000 offset applied to DLL base address when calling
6496 win32_add_one_solib.
6497 (handle_unload_dll): Add comment.
6499 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6501 * win32-low.c (win32_add_all_dlls): Renames
6502 win32_ensure_ntdll_loaded. Rewrite function documentation.
6503 Adjust implementation to always load all DLLs.
6504 Add 0x1000 offset to DLL base address when calling
6505 win32_add_one_solib.
6506 (child_initialization_done): New static global.
6507 (do_initial_child_stuff): Set child_initialization_done to
6508 zero during child initialization, and 1 after. Replace call
6509 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6511 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6512 (handle_unload_dll): Add function documentation.
6513 (get_child_debug_event): Ignore load and unload DLL events
6514 during child initialization.
6516 2014-02-20 Doug Evans <dje@google.com>
6518 Remove global all_lwps.
6519 * inferiors.h (ptid_of): Move here from linux-low.h.
6520 (pid_of, lwpid_of): Ditto.
6521 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6522 parameter is a struct thread_info * now.
6523 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6524 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6525 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6527 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6528 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6529 * linux-arm-low.c (update_registers_callback): Update, "entry"
6530 parameter is a struct thread_info * now.
6531 Fetch lwpid from current_inferior directly.
6532 (arm_insert_point): Pass &all_threads to find_inferior instead of
6534 (arm_remove_point): Ditto.
6535 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6536 (arm_prepare_to_resume): Fetch pid from thread.
6537 (arm_read_description): Fetch lwpid from current_inferior directly.
6538 * linux-low.c (all_lwps): Delete.
6539 (delete_lwp): Delete call to remove_inferior.
6540 (handle_extended_wait): Fetch lwpid from thread.
6541 (add_lwp): Don't set lwp->entry.id. Remove call to
6542 add_inferior_to_list.
6543 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6544 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6545 (kill_one_lwp_callback): Ditto.
6546 (linux_kill): Don't dereference NULL pointer.
6547 Fetch ptid,lwpid from thread.
6548 (get_detach_signal): Fetch ptid from thread.
6549 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6550 Simplify call to regcache_invalidate_thread.
6551 (delete_lwp_callback): Update, "entry" parameter is a
6552 struct thread_info * now. Fetch pid from thread.
6553 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6554 (status_pending_p_callback): Update, "entry" parameter is a
6555 struct thread_info * now. Fetch ptid from thread.
6556 (find_lwp_pid): Update, "entry" parameter is a
6557 struct thread_info * now.
6558 (linux_wait_for_lwp): Fetch pid from thread.
6559 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6560 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6561 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6562 (dequeue_one_deferred_signal): Ditto.
6563 (cancel_breakpoint): Fetch ptid from current_inferior.
6564 (linux_wait_for_event): Pass &all_threads to find_inferior,
6565 not &all_lwps. Fetch ptid, lwpid from thread.
6566 (count_events_callback): Update, "entry" parameter is a
6567 struct thread_info * now.
6568 (select_singlestep_lwp_callback): Ditto.
6569 (select_event_lwp_callback): Ditto.
6570 (cancel_breakpoints_callback): Ditto.
6571 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6573 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6574 (unsuspend_one_lwp): Update, "entry" parameter is a
6575 struct thread_info * now.
6576 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6578 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6579 Fetch lwpid from thread, not lwp.
6580 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6581 Pass &all_threads to find_inferior, not &all_lwps.
6582 (send_sigstop): Fetch lwpid from thread, not lwp.
6583 (send_sigstop_callback): Update, "entry" parameter is a
6584 struct thread_info * now.
6585 (suspend_and_send_sigstop_callback): Ditto.
6586 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6587 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6588 struct thread_info * now.
6589 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6591 (lwp_running): Update, "entry" parameter is a
6592 struct thread_info * now.
6593 (stop_all_lwps): Fetch ptid from thread.
6594 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6595 (linux_resume_one_lwp): Fetch lwpid from thread.
6596 (linux_set_resume_request): Update, "entry" parameter is a
6597 struct thread_info * now. Fetch pid, lwpid from thread.
6598 (resume_status_pending_p): Update, "entry" parameter is a
6599 struct thread_info * now.
6600 (need_step_over_p): Ditto. Fetch lwpid from thread.
6601 (start_step_over): Fetch lwpid from thread.
6602 (linux_resume_one_thread): Update, "entry" parameter is a
6603 struct thread_info * now. Fetch lwpid from thread.
6604 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6605 (proceed_one_lwp): Update, "entry" parameter is a
6606 struct thread_info * now. Fetch lwpid from thread.
6607 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6608 struct thread_info * now.
6609 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6610 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6611 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6613 (regsets_store_inferior_registers): Ditto.
6614 (fetch_register, store_register): Ditto.
6615 (linux_read_memory, linux_write_memory): Ditto.
6616 (linux_request_interrupt): Ditto.
6617 (linux_read_auxv): Ditto.
6618 (linux_xfer_siginfo): Ditto.
6619 (linux_qxfer_spu): Ditto.
6620 (linux_qxfer_libraries_svr4): Ditto.
6621 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6622 moved to inferiors.h.
6624 (get_thread_lwp): Update.
6625 (struct lwp_info): Delete member "entry". Simplify comment for
6628 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6629 current_inferior directly.
6630 (update_watch_registers_callback): Update, "entry" parameter is a
6631 struct thread_info * now. Fetch pid from thread.
6632 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6633 (mips_insert_point): Fetch lwpid from current_inferior.
6634 Pass &all_threads to find_inferior, not &all_lwps.
6635 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6636 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6638 (mips_stopped_data_address): Ditto.
6639 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6641 * linux-tile-low.c (tile_arch_setup): Ditto.
6642 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6643 (update_debug_registers_callback): Update, "entry" parameter is a
6644 struct thread_info * now. Fetch pid from thread.
6645 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6646 Pass &all_threads to find_inferior, not &all_lwps.
6647 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6648 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6649 Pass &all_threads to find_inferior, not &all_lwps.
6650 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6651 (i386_dr_low_get_status): Ditto.
6652 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6653 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6654 (x86_linux_read_description): Ditto.
6655 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6657 2014-02-20 Doug Evans <dje@google.com>
6659 * inferiors.c (get_first_inferior): Fix buglet.
6661 2014-02-19 Doug Evans <dje@google.com>
6663 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6664 * inferiors.c (add_thread): Change result type to struct thread_info *.
6665 All callers updated.
6666 (add_lwp): Call add_thread here instead of in callers.
6667 All callers updated.
6668 * linux-low.h (get_lwp_thread): Rewrite.
6669 (struct lwp_info): New member "thread".
6671 2014-02-19 Doug Evans <dje@google.com>
6673 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6674 All callers updated.
6676 2014-02-19 Doug Evans <dje@google.com>
6678 * inferiors.c (add_thread): Fix whitespace.
6680 2014-02-19 Doug Evans <dje@google.com>
6682 * dll.c (clear_dlls): Replace accessing list implemention details
6684 * gdbthread.h (get_first_thread): Declare.
6685 * inferiors.c (for_each_inferior_with_data): New function.
6686 (get_first_thread): New function.
6687 (find_thread_ptid): Simplify.
6688 (get_first_inferior): New function.
6689 (clear_list): Delete.
6690 (one_inferior_p): New function.
6691 (clear_inferior_list): New function.
6692 (clear_inferiors): Update.
6693 * inferiors.h (for_each_inferior_with_data): Declare.
6694 (clear_inferior_list): Declare.
6695 (one_inferior_p): Declare.
6696 (get_first_inferior): Declare.
6697 * linux-low.c (linux_wait_for_event): Replace accessing list
6698 implemention details with API function.
6699 * server.c (target_running): Ditto.
6700 (accumulate_file_name_length): New function.
6701 (emit_dll_description): New function.
6702 (handle_qxfer_libraries): Replace accessing list implemention
6703 details with API function.
6704 (handle_qxfer_threads_worker): New function.
6705 (handle_qxfer_threads_proper): Replace accessing list implemention
6706 details with API function.
6707 (handle_query): Ditto.
6708 (visit_actioned_threads_callback_ftype): New typedef.
6709 (visit_actioned_threads_data): New struct.
6710 (visit_actioned_threads): Rewrite to be find_inferior callback.
6711 (resume): Call find_inferior.
6712 (handle_status): Replace accessing list implemention
6713 details with API function.
6714 (process_serial_event): Replace accessing list implemention details
6716 * target.c (set_desired_inferior): Replace accessing list implemention
6717 details with API function.
6718 * tracepoint.c (same_process_p): New function.
6719 (gdb_agent_about_to_close): Replace accessing list implemention
6720 details with API function.
6721 * win32-low.c (child_delete_thread): Replace accessing list
6722 implemention details with API function.
6723 (match_dll_by_basename): New function.
6724 (dll_is_loaded_by_basename): New function.
6725 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6726 details call to dll_is_loaded_by_basename.
6728 2014-02-19 Doug Evans <dje@google.com>
6730 * dll.h (struct dll_info): Add comment.
6731 * gdbthread.h (struct thread_info): Add comment.
6732 (current_ptid): Simplify.
6733 * inferiors.c (add_process): Update.
6734 (remove_process): Update.
6735 * inferiors.h (struct process_info): Rename member "head" to "entry".
6736 * linux-low.c (delete_lwp): Update.
6738 (last_thread_of_process_p): Update.
6739 (kill_one_lwp_callback, linux_kill): Update.
6740 (status_pending_p_callback): Update.
6741 (wait_for_sigstop): Update. Simplify read of ptid.
6742 (start_step_over): Update.
6743 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6744 (get_lwp_thread): Update.
6745 (struct lwp_info): Rename member "head" to "entry".
6746 * regcache.h (inferior_list_entry): Delete.
6747 * server.c (kill_inferior_callback): Update.
6748 (detach_or_kill_inferior_callback): Update.
6749 (print_started_pid): Update.
6750 (print_attached_pid): Update.
6751 (process_serial_event): Simplify read of ptid.
6752 * thread-db.c (thread_db_create_event): Update.
6753 (thread_db_get_tls_address): Update.
6754 * win32-low.c (current_inferior_ptid): Simplify.
6756 2014-02-19 Tom Tromey <tromey@redhat.com>
6758 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6760 (target_supports_btrace): Update.
6762 2014-02-14 Yao Qi <yao@codesourcery.com>
6764 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6765 (rsp-low-ipa.o): New target.
6767 2014-02-12 Tom Tromey <tromey@redhat.com>
6769 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6770 convert_ascii_to_int.
6771 * regcache.c (registers_to_string): Likewise.
6772 * remote-utils.c (decode_M_packet): Likewise.
6773 * server.c (process_serial_event): Likewise.
6775 2014-02-12 Tom Tromey <tromey@redhat.com>
6777 * server.c (handle_query, handle_v_run): Use hex2bin, not
6779 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6781 2014-02-12 Tom Tromey <tromey@redhat.com>
6783 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6784 convert_int_to_ascii.
6785 * regcache.c (registers_to_string, collect_register_as_string):
6787 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6789 * server.c (process_serial_event): Likewise.
6790 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6791 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6793 2014-02-12 Tom Tromey <tromey@redhat.com>
6795 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6796 bin2hex, not hexify.
6797 * tracepoint.c (cmd_qtstatus): Likewise.
6799 2014-02-12 Tom Tromey <tromey@redhat.com>
6801 * remote-utils.c (monitor_output): Pass explicit length to
6804 2014-02-12 Tom Tromey <tromey@redhat.com>
6806 * tracepoint.c: Include rsp-low.h.
6807 * server.c: Include rsp-low.h.
6808 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6809 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6811 * remote-utils.c: Include rsp-low.h.
6812 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6813 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6814 (convert_int_to_ascii, convert_ascii_to_int): Move to
6816 * regcache.c: Include rsp-low.h.
6817 * ax.c: Include rsp-low.h.
6818 * Makefile.in (SFILES): Add common/rsp-low.c.
6819 (OBS): Add rsp-low.o.
6820 (rsp-low.o): New target.
6822 2014-02-12 Tom Tromey <tromey@redhat.com>
6824 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6825 Include print-utils.h.
6826 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6827 (plongest, thirty_two, phex_nz): Remove.
6828 * Makefile.in (SFILES): Add common/print-utils.c.
6829 (OBS): Add print-utils.o.
6830 (print-utils-ipa.o): New target.
6831 (print-utils.o): New target.
6832 (IPA_OBJS): Add print-utils-ipa.o.
6834 2014-02-06 Tom Tromey <tromey@redhat.com>
6836 * Makefile.in (SFILES): Fix indentation.
6838 2014-02-05 Doug Evans <dje@google.com>
6840 * linux-low.c (linux_wait_for_event): Improve comment.
6841 (linux_wait_1): Keep current_inferior in sync with event_child.
6843 2014-01-22 Doug Evans <dje@google.com>
6845 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6847 2014-01-22 Doug Evans <dje@google.com>
6849 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6850 * configure: Regenerate.
6851 * config.in: Regenerate.
6852 * Makefile.in (SFILES): Add debug.c.
6854 * debug.c: New file.
6855 * debug.h: New file.
6856 * linux-aarch64-low.c (*): Update all debugging printfs to use
6857 debug_printf instead of fprintf.
6858 * linux-arm-low.c (*): Ditto.
6859 * linux-cris-low.c (*): Ditto.
6860 * linux-crisv32-low.c (*): Ditto.
6861 * linux-m32r-low.c (*): Ditto.
6862 * linux-sparc-low.c (*): Ditto.
6863 * linux-x86.c (*): Ditto.
6864 * linux-low.c (*): Ditto.
6865 (linux_wait_1): Add calls to debug_enter, debug_exit.
6866 (linux_wait): Remove redundant debugging printf.
6867 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6868 (linux_resume, unstop_all_lwps): Ditto.
6869 * mem-break.c (*): Update all debugging printfs to use
6870 debug_printf instead of fprintf.
6871 * remote-utils.c (*): Ditto.
6872 * thread-db.c (*): Ditto.
6873 * server.c #include <ctype.h>, "gdb_vecs.h".
6874 (debug_threads): Moved to debug.c.
6875 (*): Update all debugging printfs to use debug_printf instead of
6877 (start_inferior): Replace call to fflush with call to debug_flush.
6878 (monitor_show_help): Mention set debug-format.
6879 (parse_debug_format_options): New function.
6880 (handle_monitor_command): Handle "monitor set debug-format".
6881 (gdbserver_usage): Mention --debug-format.
6882 (main): Parse --debug-format.
6883 * server.h (debug_threads): Declaration moved to debug.h.
6885 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6886 trace_debug_1 that uses debug_printf.
6887 (tracepoint_look_up_symbols): Update all debugging printfs to use
6888 debug_printf instead of fprintf.
6890 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6892 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6895 2014-01-17 Pedro Alves <palves@redhat.com>
6898 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6899 defined after including gdb_proc_service.h.
6901 2014-01-16 Doug Evans <dje@google.com>
6903 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6904 (match_dll): Use it.
6906 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6908 * target.h (target_ops) <read_btrace>: Change parameters and
6909 return type to allow error reporting.
6910 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6911 trace reading errors on.
6912 * linux-low.c (linux_low_read_btrace): Pass trace reading
6914 (linux_low_disable_btrace): New.
6916 2014-01-15 Doug Evans <dje@google.com>
6918 * inferiors.c (thread_id_to_gdb_id): Delete.
6919 * inferiors.h (thread_id_to_gdb_id): Delete.
6921 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6923 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6924 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6927 2014-01-08 Pedro Alves <palves@redhat.com>
6929 * server.c (handle_status): Don't discard previous queued stop
6930 replies or thread's pending status here.
6931 (main) <disconnection>: Do it here instead.
6933 2014-01-08 Pedro Alves <palves@redhat.com>
6935 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6936 * server.c (visit_actioned_threads, handle_pending_status): New
6938 (handle_v_cont): Factor out parts to ...
6939 (resume): ... this new function. If in all-stop, and a thread
6940 being resumed has a pending status, report it without actually
6942 (myresume): Adjust to use the new 'resume' function.
6943 (clear_pending_status_callback, set_pending_status_callback)
6944 (find_status_pending_thread_callback): New functions.
6945 (handle_status): Handle the case of multiple threads having
6946 interesting statuses to report. Report threads' real last signal
6947 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6948 with an interesting thread to report the status for, instead of
6949 always reporting the status of the first thread.
6951 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6953 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6954 * gdbreplay.c (gdbreplay_version): Likewise.
6956 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6958 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6959 iov.iov_len with the real length in use.
6961 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6963 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6964 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6965 for all targets that use win32-low.c.
6966 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6967 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6969 2013-12-13 Pedro Alves <palves@redhat.com>
6971 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6972 if equal to TARGET_WAITKIND_LOADED.
6973 * win32-low.c (cached_status): New static global.
6974 (win32_wait): Add declaration.
6975 (do_initial_child_stuff): Flush all initial pending debug events
6976 up to the initial breakpoint.
6977 (win32_wait): If CACHED_STATUS was set, return that instead
6978 of doing a real wait. Remove the code resuming the execution
6979 of the inferior after receiving a TARGET_WAITKIND_LOADED event
6980 during the initial phase. Also remove the code changing
6981 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6982 TARGET_WAITKIND_STOPPED.
6984 2013-12-11 Yao Qi <yao@codesourcery.com>
6986 * notif.c (handle_notif_ack): Return 0 if no notification
6989 2013-11-20 Doug Evans <dje@google.com>
6991 * linux-low.c (linux_set_resume_request): Fix comment.
6993 2013-11-20 Doug Evans <dje@google.com>
6995 * linux-low.c (resume_status_pending_p): Tweak comment.
6997 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6999 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7000 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7001 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7002 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7003 (srv_amd64_regobj): Add amd64-mpx.o.
7004 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7005 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7006 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7007 * i387-fp.c (num_pl_bnd_register) Added constant.
7008 (num_pl_bnd_cfg_registers) Added constant.
7009 (struct i387_xsave) Added reserved area and MPX fields.
7010 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7011 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7013 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7014 (init_registers_amd64_mpx_linux): Declare new function.
7015 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7016 (x86_64_regmap): Add MPX registers.
7017 (x86_linux_read_description): Add MPX case.
7018 (initialize_low_arch): Initialize MPX targets.
7020 2013-11-18 Tom Tromey <tromey@redhat.com>
7022 * configure: Rebuild.
7023 * configure.ac: Don't check for stdlib.h.
7024 * gdbreplay.c: Unconditionally include stdlib.h.
7026 2013-11-18 Tom Tromey <tromey@redhat.com>
7028 * config.in: Rebuild.
7029 * configure: Rebuild.
7030 * configure.ac: Don't use AC_HEADER_DIRENT.
7032 2013-11-18 Tom Tromey <tromey@redhat.com>
7034 * server.h: Don't check HAVE_STRING_H.
7035 * gdbreplay.c: Don't check HAVE_STRING_H.
7036 * configure: Rebuild.
7038 2013-11-18 Tom Tromey <tromey@redhat.com>
7040 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7043 2013-11-08 Tom Tromey <tromey@redhat.com>
7045 * configure, config.in: Rebuild.
7046 * configure.ac: Remove unused configury.
7048 2013-11-08 Tom Tromey <tromey@redhat.com>
7050 * acinclude.m4: Include common.m4, codeset.m4.
7051 * configure, config.in: Rebuild.
7052 * configure.ac: Use GDB_AC_COMMON.
7054 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7056 * linux-s390-low.c (HWCAP_S390_TE): New define.
7057 (s390_arch_setup): Consider the TE field in the HWCAP for
7058 determining 'have_regset_tdb'.
7060 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7063 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7066 2013-10-02 Pedro Alves <palves@redhat.com>
7068 * server.c (process_serial_event): Don't output "GDBserver
7069 exiting" if GDB is connected through stdio.
7070 * target.c (mywait): Likewise, be silent if GDB is connected
7073 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7075 * lynx-low.c (lynx_add_threads_after_attach): New function.
7076 (lynx_attach): Remove call to add_thread. Add call to
7077 lynx_add_threads_after_attach instead.
7079 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7081 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7082 * config.in, configure: Regenerated.
7084 2013-09-18 Yao Qi <yao@codesourcery.com>
7087 * server.c (start_inferior): Clear 'resume_info'.
7089 2013-09-16 Jiong Wang <jiwang@tilera.com>
7091 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7094 2013-09-16 Jiong Wang <jiwang@tilera.com>
7096 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7097 linux-tile-low.o to srv_tgtobj.
7099 2013-09-16 Will Newton <will.newton@linaro.org>
7101 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7104 2013-09-06 Pedro Alves <palves@redhat.com>
7106 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7107 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7108 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7109 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7110 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7111 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7113 2013-09-06 Pedro Alves <palves@redhat.com>
7115 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7116 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7118 2013-09-06 Pedro Alves <palves@redhat.com>
7120 * linux-amd64-ipa.c: Include tracepoint.h.
7121 * linux-i386-ipa.c: Include tracepoint.h.
7123 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7125 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7126 (ps_get_thread_area): New function.
7128 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7130 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7131 (initialize_low_arch): Call init_registers_crisv32 rather than
7132 init_register_crisv32.
7134 2013-09-05 Pedro Alves <palves@redhat.com>
7136 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7138 * hostio.h: ... this new file.
7139 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7140 win32-low.c: Include hostio.h.
7142 2013-09-05 Pedro Alves <palves@redhat.com>
7144 * server.h (gdb_client_data, handler_func, callback_handler_func)
7145 (delete_file_handler, add_file_handler, append_callback_event)
7146 (delete_callback_event, start_event_loop, initialize_event_loop):
7147 Move to event-loop.h and include it.
7148 * event-loop.h: New file.
7150 2013-09-05 Pedro Alves <palves@redhat.com>
7152 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7153 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7154 (loaded_dll, unloaded_dll): Move to ...
7155 * dll.h: ... this new file.
7156 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7158 2013-09-05 Pedro Alves <palves@redhat.com>
7160 * server.h (current_process, get_thread_process, all_processes)
7161 (add_inferior_to_list, for_each_inferior, current_inferior)
7162 (remove_inferior, add_process, remove_process, find_process_pid)
7163 (have_started_inferiors_p, have_attached_inferiors_p)
7164 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7165 (clear_inferiors, find_inferior, find_inferior_id)
7166 (inferior_target_data, set_inferior_target_data)
7167 (inferior_regcache_data, set_inferior_regcache_data): Move to
7168 inferiors.h, and include it.
7169 * inferiors.h: New file.
7171 2013-09-05 Pedro Alves <palves@redhat.com>
7173 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7177 2013-09-05 Pedro Alves <palves@redhat.com>
7179 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7181 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7182 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7183 (handle_tracepoint_general_set, handle_tracepoint_query)
7184 (tracepoint_finished_step, tracepoint_was_hit)
7185 (release_while_stepping_state_list, current_traceframe)
7186 (in_readonly_region, traceframe_read_mem)
7187 (fetch_traceframe_registers, traceframe_read_sdata)
7188 (traceframe_read_info, struct fast_tpoint_collect_status)
7189 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7190 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7191 (supply_fast_tracepoint_registers)
7192 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7193 (ipa_tdesc, claim_trampoline_space)
7194 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7195 (agent_mem_read, agent_get_trace_state_variable_value)
7196 (agent_set_trace_state_variable_value, agent_tsv_read)
7197 (agent_mem_read_string, get_raw_reg_func_addr)
7198 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7199 * tracepoint.h: ... this new file.
7201 2013-09-05 Pedro Alves <palves@redhat.com>
7203 * server.h (perror_with_name, error, fatal, warning, paddress)
7204 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7206 * utils.h: New file.
7208 2013-09-05 Pedro Alves <palves@redhat.com>
7210 * server.h (remote_debug, noack_mode, transport_is_reliable)
7211 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7212 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7213 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7214 (write_enn, initialize_async_io, enable_async_io)
7215 (disable_async_io, check_remote_input_interrupt_request)
7216 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7217 (dead_thread_notify, prepare_resume_reply)
7218 (decode_address_to_semicolon, decode_address, decode_m_packet)
7219 (decode_M_packet, decode_X_packet, decode_xfer_write)
7220 (decode_search_memory_packet, unhexify, hexify)
7221 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7222 (look_up_one_symbol, relocate_instruction)
7223 (monitor_output): Move to remote-utils.h, and include it.
7224 * remote-utils.h: New file.
7226 2013-09-05 Pedro Alves <palves@redhat.com>
7228 * server.h (_): Delete.
7230 2013-09-02 Pedro Alves <palves@redhat.com>
7232 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7233 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7235 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7237 2013-09-02 Pierre Muller <muller@sourceware.org>
7239 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7240 or WriteProcessMemory complete successfully and handle
7241 ERROR_PARTIAL_COPY error.
7243 2013-09-02 Pedro Alves <palves@redhat.com>
7245 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7246 error instead of EIO.
7248 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7251 * linux-low.c: Include filestuff.h.
7252 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7253 * lynx-low.c: Include filestuff.h.
7254 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7255 * server.c: Include filestuff.h.
7256 (main): Call notice_open_fds.
7257 * spu-low.c: Include filestuff.h.
7258 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7260 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7262 * Makefile.in: Explain why ../target and ../nat are not
7263 listed as include file search paths.
7264 (linux-waitpid.o): New object file rule.
7265 * configure.srv (srv_native_linux_obj): New variable.
7266 Replace all occurrences of linux native object files with
7267 $srv_native_linux_obj.
7268 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7269 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7270 (linux_enable_event_reporting): Remove declaration.
7271 (my_waitpid): Moved to common/linux-waitpid.c.
7272 (linux_wait_for_event): Pass ptid when calling
7273 linux_enable_event_reporting.
7274 (linux_supports_tracefork_flag): Remove.
7275 (linux_enable_event_reporting): Likewise.
7276 (linux_tracefork_grandchild): Remove.
7277 (STACK_SIZE): Moved to common/linux-ptrace.c.
7278 (linux_tracefork_child): Remove.
7279 (linux_test_for_tracefork): Remove.
7280 (linux_look_up_symbols): Call linux_supports_traceclone.
7281 (initialize_low): Remove call to linux_test_for_tracefork.
7282 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7283 common/linux-ptrace.h.
7284 (PTRACE_TYPE_ARG4): Likewise.
7285 Include linux-ptrace.h.
7287 2013-08-21 Pedro Alves <palves@redhat.com>
7289 * config.in: Renegerate.
7291 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7293 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7294 (SFILES): Remove $(srcdir)/common/target-common.c and
7295 add $(srcdir)/target/waitstatus.c.
7296 (OBS): Remove target-common.o and add waitstatus.o.
7297 (server_h): Remove $(srcdir)/../common/target-common.h and
7298 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7299 and $(srcdir)/../target/waitstatus.h.
7300 (target-common.o): Remove.
7301 (waitstatus.o): New target object file.
7302 * target.h: Do not include target-common.h and
7303 include target/resume.h, target/wait.h and
7304 target/waitstatus.h.
7306 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7308 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7309 to PTRACE_TYPE_ARG3.
7310 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7311 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7313 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7314 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7316 2013-07-27 Jie Zhang <jie@codesourcery.com>
7317 Daniel Jacobowitz <dan@codesourcery.com>
7318 Yao Qi <yao@codesourcery.com>
7320 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7321 (mips-linux-watch.o): New rule.
7322 (mips_linux_watch_h): New variable.
7323 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7325 * linux-mips-low.c: Include mips-linux-watch.h.
7326 (struct arch_process_info, struct arch_lwp_info): New.
7327 (update_watch_registers_callback): New function.
7328 (mips_linux_new_process, mips_linux_new_thread) New functions.
7329 (mips_linux_prepare_to_resume, mips_insert_point): New
7331 (mips_remove_point, mips_stopped_by_watchpoint): New
7333 (rsp_bp_type_to_target_hw_bp_type): New function.
7334 (mips_stopped_data_address): New function.
7335 (the_low_target): Add watchpoint support functions.
7337 2013-07-27 Yao Qi <yao@codesourcery.com>
7339 * i386-low.c: Include break-common.h.
7340 (enum target_hw_bp_type): Remove.
7342 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7344 * Makefile.in (SFILES): /common/target-common.c.
7345 (OBS): Add target-common.o.
7346 (server_h): Add $(srcdir)/../common/target-common.h.
7347 (target-common.o): New target.
7348 * server.c (queue_stop_reply_callback): Free
7349 status string after use.
7350 * target.c (target_waitstatus_to_string): Remove.
7351 * target.h: Include target-common.h.
7352 (resume_kind): Likewise.
7353 (target_waitkind): Likewise.
7354 (target_waitstatus): Likewise.
7355 (TARGET_WNOHANG): Likewise.
7357 2013-07-04 Yao Qi <yao@codesourcery.com>
7359 * Makefile.in (host_alias): Use @host_noncanonical@.
7360 (target_alias): Use @target_noncanonical@.
7361 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7362 ACX_NONCANONICAL_HOST.
7363 * configure: Regenerated.
7366 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7368 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7369 * configure: Rebuild.
7370 * Makefile.in (version_host, version_target): Get from configure.
7371 (version.c): Use $(version_host) and $(version_target).
7373 2013-07-03 Pedro Alves <palves@redhat.com>
7375 * Makefile.in (config.status): Depend on development.sh.
7376 * acinclude.m4: Include libmcheck.m4.
7377 * configure: Regenerate.
7379 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7381 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7382 attribute inside the parentheses.
7383 (winapi_DebugSetProcessKillOnExit): Ditto.
7384 (winapi_DebugBreakProcess): Ditto.
7385 (winapi_GenerateConsoleCtrlEvent): Ditto.
7387 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7389 * notif.h (notif_event): Add a dummy member to avoid compiler
7392 2013-07-01 Pedro Alves <palves@redhat.com>
7394 * hostio.c (HOSTIO_PATH_MAX): Define.
7395 (require_filename, handle_open, handle_unlink, handle_readlink):
7398 2013-07-01 Pedro Alves <palves@redhat.com>
7400 * server.h: Include "pathmax.h".
7401 * linux-low.c: Don't include sys/param.h.
7402 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7404 * win32-low.c: Don't include sys/param.h.
7405 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7407 2013-07-01 Pedro Alves <palves@redhat.com>
7409 * event-loop.c: Don't check HAVE_UNISTD_H before including
7411 * gdbreplay.c: Likewise.
7412 * remote-utils.c: Likewise.
7413 * server.c: Likewise.
7414 * configure.ac: Don't check for unistd.h.
7415 * configure: Regenerate.
7417 2013-06-28 Tom Tromey <tromey@redhat.com>
7419 * Makefile.in (version.c): Use version.in, not
7422 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7424 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7425 * configure: Rebuild.
7426 * Makefile.in (version_host, version_target): Get from configure.
7427 (version.c): Use $(version_host) and $(version_target).
7429 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7431 Fix trace-status to output user name without trailing colon.
7432 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7434 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7436 Fix trace-status to output proper start-time and stop-time.
7437 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7438 output start time and stop time in hex as gdb expects.
7440 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7442 * tracepoint.c (build_traceframe_info_xml): Output trace state
7443 variables present in the trace buffer.
7445 2013-06-24 Tom Tromey <tromey@redhat.com>
7447 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7449 (version.o): Remove.
7450 * gdbreplay.c: Include version.h.
7451 (version, host_name): Don't declare.
7452 * server.h: Include version.h.
7453 (version, host_name): Don't declare.
7455 2013-06-12 Pedro Alves <palves@redhat.com>
7457 * linux-x86-low.c (linux_is_elf64): Delete global.
7458 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7459 with local linux_pid_exe_is_elf_64_file use.
7461 2013-06-11 Pedro Alves <palves@redhat.com>
7463 * linux-low.c (regset_disabled, disable_regset): New functions.
7464 (regsets_fetch_inferior_registers)
7465 (regsets_store_inferior_registers): Use them.
7466 (initialize_regsets_info); Don't allocate the disabled_regsets
7468 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7471 2013-06-11 Pedro Alves <palves@redhat.com>
7473 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7476 2013-06-11 Pedro Alves <palves@redhat.com>
7478 * linux-x86-low.c (initialize_low_arch): Call
7479 init_registers_x32_avx_linux.
7481 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7483 Fix compatibility with Android Bionic.
7484 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7487 2013-06-07 Pedro Alves <palves@redhat.com>
7490 * Makefile.in (OBS): Add tdesc.o.
7491 (IPA_OBJS): Add tdesc-ipa.o.
7492 (tdesc-ipa.o): New rule.
7493 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7495 * linux-low.c (new_inferior): Delete.
7496 (disabled_regsets, num_regsets): Delete.
7497 (linux_add_process): Adjust to set the new per-process
7499 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7500 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7501 was a stop. When calling arch_setup, switch the current inferior
7502 to the thread that got an event.
7503 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7504 (regsets_fetch_inferior_registers)
7505 (regsets_store_inferior_registers): New regsets_info parameter.
7507 (linux_register_in_regsets): New regs_info parameter. Adjust to
7509 (register_addr, fetch_register, store_register): New usrregs_info
7510 parameter. Adjust to use it.
7511 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7512 parameter regs_info. Adjust to use it.
7513 (linux_fetch_registers): Get the current inferior's regs_info, and
7515 (linux_store_registers): Ditto.
7516 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7517 (initialize_low): Don't initialize the target_regsets here. Call
7518 initialize_low_arch.
7519 * linux-low.h (target_regsets): Delete declaration.
7520 (struct regsets_info): New.
7521 (struct usrregs_info): New.
7522 (struct regs_info): New.
7523 (struct process_info_private) <new_inferior>: New field.
7524 (struct linux_target_ops): Delete the num_regs, regmap, and
7525 regset_bitmap fields. New field regs_info.
7526 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7527 * i387-fp.c (num_xmm_registers): Delete.
7528 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7529 calls to new interface.
7530 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7531 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7532 Infer the number of xmm registers from the regcache's target
7534 * i387-fp.h (num_xmm_registers): Delete.
7535 * inferiors.c (add_thread): Don't install the thread's regcache
7537 * proc-service.c (gregset_info): Fetch the current inferior's
7538 regs_info. Adjust to use it.
7539 * regcache.c: Include tdesc.h.
7540 (register_bytes, reg_defs, num_registers)
7541 (gdbserver_expedite_regs): Delete.
7542 (get_thread_regcache): If the thread doesn't have a regcache yet,
7543 create one, instead of aborting gdbserver.
7544 (regcache_invalidate_one): Rename to ...
7545 (regcache_invalidate_thread): ... this.
7546 (regcache_invalidate_one): New.
7547 (regcache_invalidate): Only invalidate registers of the current
7549 (init_register_cache): Add target_desc parameter, and use it.
7550 (new_register_cache): Ditto. Assert the target description has a
7551 non zero registers_size.
7552 (regcache_cpy): Add assertions. Adjust.
7553 (realloc_register_cache, set_register_cache): Delete.
7554 (registers_to_string, registers_from_string): Adjust.
7555 (find_register_by_name, find_regno, find_register_by_number)
7556 (register_cache_size): Add target_desc parameter, and use it.
7557 (free_register_cache_thread, free_register_cache_thread_one)
7558 (regcache_release, register_cache_size): New.
7559 (register_size): Add target_desc parameter, and use it.
7560 (register_data, supply_register, supply_register_zeroed)
7561 (supply_regblock, supply_register_by_name, collect_register)
7562 (collect_register_as_string, collect_register_by_name): Adjust.
7563 * regcache.h (struct target_desc): Forward declare.
7564 (struct regcache) <tdesc>: New field.
7565 (init_register_cache, new_register_cache): Add target_desc
7567 (regcache_invalidate_thread): Declare.
7568 (regcache_invalidate_one): Delete declaration.
7569 (regcache_release): Declare.
7570 (find_register_by_number, register_cache_size, register_size)
7571 (find_regno): Add target_desc parameter.
7572 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7574 * remote-utils.c: Include tdesc.h.
7575 (outreg, prepare_resume_reply): Adjust.
7576 * server.c: Include tdesc.h.
7577 (gdbserver_xmltarget): Delete declaration.
7578 (get_features_xml, process_serial_event): Adjust.
7579 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7581 (struct process_info) <tdesc>: New field.
7582 (ipa_tdesc): Declare.
7583 * tdesc.c: New file.
7584 * tdesc.h: New file.
7585 * tracepoint.c: Include tdesc.h.
7586 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7587 (get_context_regcache): Adjust to pass ipa_tdesc down.
7588 (do_action_at_tracepoint): Adjust to get the register cache size
7589 from the context regcache's description.
7590 (traceframe_walk_blocks): Adjust to get the register cache size
7591 from the current trace frame's description.
7592 (traceframe_get_pc): Adjust to get current trace frame's
7593 description and pass it down.
7594 (gdb_collect): Adjust to get the register cache size from the
7596 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7597 (gdbserver_xmltarget): Delete.
7598 (initialize_low_tracepoint): Set the ipa's target description.
7599 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7600 (initialize_low_tracepoint): Set the ipa's target description.
7601 * linux-x86-low.c: Include tdesc.h.
7602 [__x86_64__] (is_64bit_tdesc): New.
7603 (ps_get_thread_area, x86_get_thread_area): Use it.
7604 (i386_cannot_store_register): Rename to ...
7605 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7606 (i386_cannot_fetch_register): Rename to ...
7607 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7608 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7610 (target_regsets): Rename to ...
7611 (x86_regsets): ... this.
7612 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7614 (x86_siginfo_fixup): Use is_64bit_tdesc.
7615 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7616 (tdesc_x32_avx_linux, tdesc_x32_linux)
7617 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7619 (x86_linux_update_xmltarget): Delete.
7620 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7621 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7622 (AMD64_LINUX_USER64_CS): New.
7623 (x86_linux_read_description): New, based on
7624 x86_linux_update_xmltarget.
7625 (same_process_callback): New.
7626 (x86_arch_setup_process_callback): New.
7627 (x86_linux_update_xmltarget): New.
7628 (x86_regsets_info): New.
7629 (amd64_linux_regs_info): New.
7630 (i386_linux_usrregs_info): New.
7631 (i386_linux_regs_info): New.
7632 (x86_linux_regs_info): New.
7633 (x86_arch_setup): Reimplement.
7634 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7635 (x86_emit_ops): Ditto.
7636 (the_low_target): Adjust. Install x86_linux_regs_info,
7637 x86_cannot_fetch_register, and x86_cannot_store_register.
7638 (initialize_low_arch): New.
7639 * linux-ia64-low.c (tdesc_ia64): Declare.
7640 (ia64_fetch_register): Adjust.
7641 (ia64_usrregs_info, regs_info): New globals.
7642 (ia64_regs_info): New function.
7643 (the_low_target): Adjust.
7644 (initialize_low_arch): New function.
7645 * linux-sparc-low.c (tdesc_sparc64): Declare.
7646 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7648 (sparc_arch_setup): New function.
7649 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7650 (the_low_target): Adjust.
7651 (initialize_low_arch): New function.
7652 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7653 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7654 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7655 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7656 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7657 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7658 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7659 (tdesc_powerpc_isa205_vsx64l): Declare.
7660 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7661 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7662 (ppc_set_pc, ppc_get_hwcap): Adjust.
7663 (ppc_usrregs_info): Forward declare.
7664 (!__powerpc64__) ppc_regmap_adjusted: New global.
7665 (ppc_arch_setup): Adjust to the current process'es target
7667 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7668 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7669 (ppc_store_evrregset): Adjust.
7670 (target_regsets): Rename to ...
7671 (ppc_regsets): ... this, and make static.
7672 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7673 (ppc_regs_info): New function.
7674 (the_low_target): Adjust.
7675 (initialize_low_arch): New function.
7676 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7677 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7678 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7679 (tdesc_s390x_linux64v2): Declare.
7680 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7681 (s390_fill_gregset, s390_store_last_break): Adjust.
7682 (target_regsets): Rename to ...
7683 (s390_regsets): ... this, and make static.
7684 (s390_get_pc, s390_set_pc): Adjust.
7685 (s390_get_hwcap): New target_desc parameter, and use it.
7686 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7687 (s390_arch_setup): Adjust to set the current process'es target
7688 description. Don't adjust the regmap.
7689 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7690 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7691 (regs_info_3264): New globals.
7692 (s390_regs_info): New function.
7693 (the_low_target): Adjust.
7694 (initialize_low_arch): New function.
7695 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7696 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7697 [__mips64] (init_registers_mips_linux)
7698 (init_registers_mips_dsp_linux): Delete defines.
7699 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7700 (have_dsp): New global.
7701 (mips_read_description): New, based on mips_arch_setup.
7702 (mips_arch_setup): Reimplement.
7703 (get_usrregs_info): New function.
7704 (mips_cannot_fetch_register, mips_cannot_store_register)
7705 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7706 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7707 (target_regsets): Rename to ...
7708 (mips_regsets): ... this, and make static.
7709 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7710 (dsp_regs_info, regs_info): New globals.
7711 (mips_regs_info): New function.
7712 (the_low_target): Adjust.
7713 (initialize_low_arch): New function.
7714 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7715 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7717 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7718 (arm_read_description): New, with bits factored from
7720 (arm_arch_setup): Reimplement.
7721 (target_regsets): Rename to ...
7722 (arm_regsets): ... this, and make static.
7723 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7724 (arm_regs_info): New function.
7725 (the_low_target): Adjust.
7726 (initialize_low_arch): New function.
7727 * linux-m68k-low.c (tdesc_m68k): Declare.
7728 (target_regsets): Rename to ...
7729 (m68k_regsets): ... this, and make static.
7730 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7731 (m68k_regs_info): New function.
7732 (m68k_arch_setup): New function.
7733 (the_low_target): Adjust.
7734 (initialize_low_arch): New function.
7735 * linux-sh-low.c (tdesc_sharch): Declare.
7736 (target_regsets): Rename to ...
7737 (sh_regsets): ... this, and make static.
7738 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7739 (sh_regs_info, sh_arch_setup): New functions.
7740 (the_low_target): Adjust.
7741 (initialize_low_arch): New function.
7742 * linux-bfin-low.c (tdesc_bfin): Declare.
7743 (bfin_arch_setup): New function.
7744 (bfin_usrregs_info, regs_info): New globals.
7745 (bfin_regs_info): New function.
7746 (the_low_target): Adjust.
7747 (initialize_low_arch): New function.
7748 * linux-cris-low.c (tdesc_cris): Declare.
7749 (cris_arch_setup): New function.
7750 (cris_usrregs_info, regs_info): New globals.
7751 (cris_regs_info): New function.
7752 (the_low_target): Adjust.
7753 (initialize_low_arch): New function.
7754 * linux-cris-low.c (tdesc_crisv32): Declare.
7755 (cris_arch_setup): New function.
7756 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7757 (cris_regs_info): New function.
7758 (the_low_target): Adjust.
7759 (initialize_low_arch): New function.
7760 * linux-m32r-low.c (tdesc_m32r): Declare.
7761 (m32r_arch_setup): New function.
7762 (m32r_usrregs_info, regs_info): New globals.
7763 (m32r_regs_info): Adjust.
7764 (initialize_low_arch): New function.
7765 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7766 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7767 (tic6x_usrregs_info): Forward declare.
7768 (tic6x_read_description): New function, based on ...
7769 (tic6x_arch_setup): ... this. Reimplement.
7770 (target_regsets): Rename to ...
7771 (tic6x_regsets): ... this, and make static.
7772 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7773 (tic6x_regs_info): New function.
7774 (the_low_target): Adjust.
7775 (initialize_low_arch): New function.
7776 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7777 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7778 (target_regsets): Rename to ...
7779 (xtensa_regsets): ... this, and make static.
7780 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7782 (xtensa_arch_setup, xtensa_regs_info): New functions.
7783 (the_low_target): Adjust.
7784 (initialize_low_arch): New function.
7785 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7786 (nios2_arch_setup): Set the current process'es tdesc.
7787 (target_regsets): Rename to ...
7788 (nios2_regsets): ... this.
7789 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7790 (nios2_regs_info): New function.
7791 (the_low_target): Adjust.
7792 (initialize_low_arch): New function.
7793 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7794 (aarch64_arch_setup): Set the current process'es tdesc.
7795 (target_regsets): Rename to ...
7796 (aarch64_regsets): ... this.
7797 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7798 (aarch64_regs_info): New function.
7799 (the_low_target): Adjust.
7800 (initialize_low_arch): New function.
7801 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7803 (target_regsets): Rename to ...
7804 (tile_regsets): ... this.
7805 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7806 (tile_regs_info): New function.
7807 (tile_arch_setup): Set the current process'es tdesc.
7808 (the_low_target): Adjust.
7809 (initialize_low_arch): New function.
7810 * spu-low.c (tdesc_spu): Declare.
7811 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7812 * win32-arm-low.c (tdesc_arm): Declare.
7813 (arm_arch_setup): New function.
7814 (the_low_target): Install arm_arch_setup instead of
7816 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7817 (init_windows_x86): Rename to ...
7818 (i386_arch_setup): ... this. Set `win32_tdesc'.
7819 (the_low_target): Adjust.
7820 * win32-low.c (win32_tdesc): New global.
7821 (child_add_thread): Don't create the thread cache here.
7822 (do_initial_child_stuff): Set the new process'es tdesc.
7823 * win32-low.h (struct target_desc): Forward declare.
7824 (win32_tdesc): Declare.
7825 * lynx-i386-low.c (tdesc_i386): Declare global.
7826 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7827 * lynx-low.c (lynx_tdesc): New global.
7828 (lynx_add_process): Set the new process'es tdesc.
7829 * lynx-low.h (struct target_desc): Forward declare.
7830 (lynx_tdesc): Declare global.
7831 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7832 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7833 * nto-low.c (nto_tdesc): New global.
7834 (do_attach): Set the new process'es tdesc.
7835 * nto-low.h (struct target_desc): Forward declare.
7836 (nto_tdesc): Declare.
7837 * nto-x86-low.c (tdesc_i386): Declare.
7838 (nto_x86_arch_setup): Set `nto_tdesc'.
7840 2013-06-04 Gary Benson <gbenson@redhat.com>
7842 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7843 to qSupported response when appropriate.
7844 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7845 with nonzero-length annex.
7846 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7847 arguments supplied in annex.
7849 2013-05-31 Doug Evans <dje@google.com>
7852 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7853 64 bits in 64-cross-32 environment.
7855 2013-05-28 Pedro Alves <palves@redhat.com>
7857 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7858 (aarch64-without-fpu.c): Delete rule.
7859 * configure.srv (aarch64*-*-linux*): Remove references to
7860 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7861 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7864 2013-05-24 Pedro Alves <palves@redhat.com>
7866 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7867 instead of strchr/decode_address. Error if the range isn't split
7868 with a ','. Don't assume there's be a ':' in the action.
7870 2013-05-23 Yao Qi <yao@codesourcery.com>
7871 Pedro Alves <palves@redhat.com>
7873 * linux-low.c (lwp_in_step_range): New function.
7874 (linux_wait_1): If the thread was range stepping and stopped
7875 outside the stepping range, report the stop to GDB. Otherwise,
7876 continue stepping. Add range stepping debug output.
7877 (linux_set_resume_request): Copy the step range from the resume
7879 (linux_supports_range_stepping): New.
7880 (linux_target_ops) <supports_range_stepping>: Set to
7881 linux_supports_range_stepping.
7882 * linux-low.h (struct linux_target_ops)
7883 <supports_range_stepping>: New field.
7884 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7885 * linux-x86-low.c (x86_supports_range_stepping): New.
7886 (the_low_target) <supports_range_stepping>: Set to
7887 x86_supports_range_stepping.
7888 * server.c (handle_v_cont): Handle 'r' action.
7889 (handle_v_requests): Append ";r" if the target supports range
7891 * target.h (struct thread_resume) <step_range_start,
7892 step_range_end>: New fields.
7893 (struct target_ops) <supports_range_stepping>:
7895 (target_supports_range_stepping): New macro.
7897 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7899 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7900 confusion in comment.
7902 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7904 * lynx-low.c (struct process_info_private): New type.
7905 (lynx_add_process): New function.
7906 (lynx_create_inferior, lynx_attach): Replace calls to
7907 add_process by calls to lynx_add_process.
7908 (lynx_resume): If PTID is null, then try using
7909 current_process()->private->last_wait_event_ptid.
7911 (lynx_clear_inferiors): Delete. The contents of that function
7912 has been inlined in lynx_mourn;
7913 (lynx_wait_1): Save the ptid in the process's private data.
7914 (lynx_mourn): Free the process' private data. Replace call
7915 to lynx_clear_inferiors by call to clear_inferiors.
7917 2013-05-17 Yao Qi <yao@codesourcery.com>
7919 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7922 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7924 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7925 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7926 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7927 PT_TEXT_END_ADDR guards. Update comments.
7928 (linux_target_op) <read_offsets>: Conditionally define to
7929 linux_read_offsets if the target is UCLIBC and if it defines
7930 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7932 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7933 Andrew Jenner <andrew@codesourcery.com>
7935 * Makefile.in (SFILES): Add linux-nios2-low.c.
7936 (clean): Add action to delete nios2-linux.c.
7937 (nios2-linux.c): New rule.
7938 * configure.srv: Add nios2*-*-linux*.
7939 * linux-nios2-low.c: New.
7941 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7943 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7945 2013-04-25 Hui Zhu <hui@codesourcery.com>
7948 * ax.c (ax_printf): Add fflush.
7950 2013-04-22 Tom Tromey <tromey@redhat.com>
7952 * Makefile.in (SFILES): Add filestuff.c.
7953 (OBS): Add filestuff.o.
7954 (filestuff.o): New target.
7955 * config.in, configure: Rebuild.
7956 * configure.ac: Check for fdwalk, pipe2.
7958 2013-04-17 Pedro Alves <palves@redhat.com>
7960 * configure.ac (USE_THREAD_DB): Delete variable.
7961 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7962 Don't AC_SUBST USE_THREAD_DB.
7963 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7964 * config.in, configure: Regenerate.
7966 2013-04-16 Pedro Alves <palves@redhat.com>
7968 * linux-low.h (struct lwp_info) <thread_known>: Move under
7969 the USE_THREAD_DB #ifdef.
7971 2013-04-16 Pedro Alves <palves@redhat.com>
7973 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7974 (linux-low.o): Delete rule.
7975 * linux-low.h: Always include "gdb_thread_db.h" instead of
7976 conditionally including thread_db.h.
7977 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7980 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7982 * Makefile.in (install-only): Fix make install regression.
7984 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
7986 Convert man pages to texinfo, new gdbinit.5 texinfo page.
7987 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7989 * gdbserver.1: Remove.
7991 2013-03-22 Pedro Alves <palves@redhat.com>
7993 * linux-low.c (handle_extended_wait): Don't call
7994 linux_enable_event_reporting.
7996 2013-03-15 Tony Theodore <tonyt@logyst.com>
7999 * Makefile.in (SHELL): Use @SHELL@.
8001 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8003 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8006 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8008 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8009 Remove extraneous NULL element.
8011 2013-03-13 Yao Qi <yao@codesourcery.com>
8013 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8014 'V' block in trace frame.
8016 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8018 * target.h (struct target_ops): Add btrace ops.
8019 (target_supports_btrace): New macro.
8020 (target_enable_btrace): New macro.
8021 (target_disable_btrace): New macro.
8022 (target_read_btrace): New macro.
8023 * gdbthread.h (struct thread_info): Add btrace field.
8024 * server.c: Include btrace-common.h.
8025 (handle_btrace_general_set): New function.
8026 (handle_btrace_enable): New function.
8027 (handle_btrace_disable): New function.
8028 (handle_general_set): Call handle_btrace_general_set.
8029 (handle_qxfer_btrace): New function.
8030 (struct qxfer qxfer_packets[]): Add btrace entry.
8031 * inferiors.c (remove_thread): Disable btrace.
8032 * linux-low: Include linux-btrace.h.
8033 (linux_low_enable_btrace): New function.
8034 (linux_low_read_btrace): New function.
8035 (linux_target_ops): Add btrace ops.
8036 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8037 Add srv_linux_btrace=yes.
8038 (x86_64-*-linux*): Add linux-btrace.o.
8039 Add srv_linux_btrace=yes.
8040 * configure.ac: Define HAVE_LINUX_BTRACE.
8041 * config.in: Regenerated.
8042 * configure: Regenerated.
8044 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8046 * server.c (handle_qxfer): Preserve error message if -3 is
8048 (qxfer): Document the -3 return value.
8050 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8052 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8053 (linux_btrace_h): New variable.
8054 (linux-btrace.o): New rule.
8056 2013-03-08 Stan Shebs <stan@codesourcery.com>
8057 Hafiz Abid Qadeer <abidh@codesourcery.com>
8059 * tracepoint.c (trace_buffer_size): New global.
8060 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8061 (init_trace_buffer): Change to one-argument function. Allocate
8062 trace buffer memory.
8063 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8064 handle QTBuffer:size packet.
8065 (cmd_bigqtbuffer_size): New function.
8066 (initialize_tracepoint): Call init_trace_buffer with
8067 DEFAULT_TRACE_BUFFER_SIZE.
8068 * server.c (handle_query): Add QTBuffer:size in the
8071 2013-03-07 Yao Qi <yao@codesourcery.com>
8073 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8074 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8076 (cmd_qtsp): Adjust condition. Do post increment.
8077 Set cur_action and cur_step_action back to 0.
8079 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8082 * linux-low.c (linux_write_memory): Return early success if LEN is
8085 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8087 * configure.srv: Add x86_64-*-cygwin* as target.
8089 2013-02-28 Tom Tromey <tromey@redhat.com>
8091 * configure.ac: Invoke AC_SYS_LARGEFILE.
8092 * configure, config.in: Rebuild.
8094 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8096 * win32-low.c: Throughout, fix format strings and casts of
8097 printf-like functions to avoid type related warnings on all
8099 (get_child_debug_event): Print dwDebugEventCode as hex since
8100 that's how it's usually documented.
8102 2013-02-28 Yao Qi <yao@codesourcery.com>
8104 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8107 2013-02-27 Jiong Wang <jiwang@tilera.com>
8109 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8110 (reg-tilegx32.c): New rule.
8111 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8112 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8113 different register info initializer according to elf class.
8114 (init_registers_tilgx32): New function. The tilegx32 register info
8116 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8117 (tile_store_gregset): Likewise.
8119 2013-02-27 Yao Qi <yao@codesourcery.com>
8121 * server.c (process_point_options): Print debug message when
8122 debug_threads is true.
8124 2013-02-26 Yao Qi <yao@codesourcery.com>
8126 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8128 2013-02-19 Pedro Alves <palves@redhat.com>
8129 Kai Tietz <ktietz@redhat.com>
8133 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8134 instead of strtoul to extract address from packet.
8135 (process_serial_event) <'z'>: Likewise.
8137 2013-02-18 Yao Qi <yao@codesourcery.com>
8139 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8141 2013-02-14 Pedro Alves <palves@redhat.com>
8145 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8146 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8148 2013-02-14 Pedro Alves <palves@redhat.com>
8150 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8152 2013-02-14 Pedro Alves <palves@redhat.com>
8154 * tracepoint.c (save_string): Delete.
8155 (add_tracepoint_action): Use savestring instead of save_string.
8157 2013-02-12 Pedro Alves <palves@redhat.com>
8159 * linux-xtensa-low.c: Ditto.
8160 * xtensa-xtregs.c: Ditto.
8162 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8164 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8167 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8169 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8170 aarch64_num_wp_regs and aarch64_num_bp_regs to
8171 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8173 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8175 * linux-aarch64-low.c (ps_get_thread_area): Replace
8176 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8178 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8179 Marcus Shawcroft <marcus.shawcroft@arm.com>
8180 Nigel Stephens <nigel.stephens@arm.com>
8181 Yufeng Zhang <yufeng.zhang@arm.com>
8183 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8184 (aarch64.c, aarch64-without-fpu.c): New targets.
8185 * configure.srv (aarch64*-*-linux*): New.
8186 * linux-aarch64-low.c: New file.
8188 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8190 * linux-low.c (handle_extended_wait, linux_create_inferior)
8191 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8192 (dequeue_one_deferred_signal, linux_resume_one_thread)
8193 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8194 (linux_tracefork_grandchild, linux_test_for_tracefork)
8195 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8196 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8197 where the argument is 0.
8199 2013-01-25 Yao Qi <yao@codesourcery.com>
8201 * event-loop.c: Include "queue.h".
8202 (gdb_event_p): New typedef.
8203 (struct gdb_event) <next_event>: Remove.
8204 (event_queue): Change to QUEUE(gdb_event_p).
8205 (async_queue_event): Remove.
8206 (gdb_event_xfree): New.
8207 (initialize_event_loop): New.
8208 (process_event): Use API from QUEUE.
8209 (wait_for_event): Likewise.
8210 * server.c (main): Call initialize_event_loop.
8211 * server.h (initialize_event_loop): Declare.
8213 2013-01-18 Yao Qi <yao@codesourcery.com>
8215 * ax.h (struct eval_agent_expr_context): New.
8216 (gdb_eval_agent_expr): Update declaration.
8217 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8218 TFRAME. Add new argument CTX.
8219 * server.h (struct eval_agent_expr_context): Declare.
8220 (agent_mem_read, agent_tsv_read): Update declaration.
8221 (agent_mem_read_string): Likewise.
8222 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8223 (add_traceframe_block): Add new argument TPOINT.
8224 Increase TPOINT->traceframe_usage.
8225 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8226 eval_tracepoint_agent_expr.
8227 (condition_true_at_tracepoint): Likewise.
8228 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8229 (agent_mem_read_string, agent_tsv_read): Likewise.
8231 2013-01-16 Yao Qi <yao@codesourcery.com>
8233 * linux-low.c (linux_resume_one_lwp): Don't check
8234 'lwp->bp_reinsert != 0'.
8236 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8237 Pedro Alves <palves@redhat.com>
8239 * lynx-low.c (ptrace_request_to_str): Define a temporary
8240 macro and use it to simplify this function's implementation.
8242 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8244 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8247 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8249 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8251 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8253 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8255 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8257 * lynx-low.c (lynx_resume): Use the resume_info parameter
8258 to determine the ptid for the lynx_ptrace call, unless
8259 it is equal to minus_one_ptid, in which case we use the
8260 ptid of the current_inferior.
8261 (lynx_wait_1): After having received a thread create/exit
8262 event, resume the inferior's execution using the signaling
8263 thread's ptid, rather than the old ptid.
8265 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8267 * lynx-low.c (lynx_resume): Delete variable ret.
8269 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8271 * gdbreplay.c (gdbreplay_version): Update copyright year.
8272 * server.c (gdbserver_version): Likewise.
8274 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8276 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8279 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8281 * lynx-low.c (ptrace_request_to_str): Add handling for
8284 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8286 * lynx-low.c (lynx_attach): Delete variable new_process.
8288 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8290 * lynx-low.c (lynx_create_inferior): Delete variable
8293 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8295 * lynx-low.c (ptrace_request_to_str): Do not handle
8296 PTRACE_GETTHREADLIST if this macro does not exist.
8298 2012-12-15 Yao Qi <yao@codesourcery.com>
8300 * Makefile.in (OBS): Add notif.o.
8301 * notif.c, notif.h: New.
8302 * server.c: Include "notif.h".
8303 (struct vstop_notif) <next>: Remove.
8305 (queue_stop_reply): Update.
8306 (push_event, send_next_stop_reply): Remove.
8307 (discard_queued_stop_replies): Update.
8308 (notif_stop): New variable.
8309 (handle_v_stopped): Remove.
8310 (handle_v_requests): Don't call handle_v_stopped. Call
8311 handle_ack_notif instead.
8312 (queue_stop_reply_callback): Call notif_event_enque instead
8313 of queue_stop_reply.
8314 (handle_status): Don't call send_next_stop_reply, call
8315 notif_write_event instead.
8316 (kill_inferior_callback): Likewise.
8317 (detach_or_kill_inferior_callback): Likewise.
8318 (main): Call initialize_notif.
8319 (process_serial_event): Call QUEUE_is_empty.
8320 (handle_target_event): Call notif_push instead of push event.
8321 * server.h (push_event): Remove declaration.
8323 2012-12-10 Tom Tromey <tromey@redhat.com>
8325 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8326 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8329 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8330 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8331 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8332 (amd64-linux-ipa.o, ax.o): Rewrite.
8333 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8334 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8335 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8336 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8337 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8338 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8339 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8340 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8341 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8342 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8343 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8344 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8345 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8346 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8347 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8348 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8349 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8350 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8351 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8352 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8353 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8354 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8355 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8356 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8357 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8358 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8359 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8360 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8361 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8362 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8363 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8364 (reg-tilegx.o): Remove.
8365 (all_object_files): New macro.
8366 Include .deps files.
8367 * aclocal.m4, configure: Rebuild.
8368 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8369 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8370 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8372 2012-12-05 Tom Tromey <tromey@redhat.com>
8375 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8377 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8379 * configure.ac: Check for linux/perf_event.h.
8380 * config.in: Regenerated.
8381 * configure: Regenerated.
8383 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8385 * hostio.c (handle_readlink): Decrease buffer size
8386 parameter passed to readlink by one byte.
8388 2012-11-26 Yao Qi <yao@codesourcery.com>
8390 * configure.ac (build_warnings): Append '-Wempty-body'.
8391 * configure: Regenerated.
8392 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8395 2012-11-15 Pierre Muller <muller@sourceware.org>
8397 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8398 * config.in: Regenerate.
8399 * configure: Regenerate.
8400 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8401 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8402 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8403 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8405 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8406 instead of <sys/wait.h> header.
8407 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8409 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8411 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8412 (various make rules): Remove -DGDBSERVER
8414 2012-11-09 Yao Qi <yao@codesourcery.com>
8416 * spu-low.c (current_ptid): Move it to ..
8417 * gdbthread.h: ... here. New.
8418 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8419 * server.c (myresume, process_serial_event): Likewise.
8420 * thread-db.c (thread_db_find_new_threads): Likewise.
8421 * tracepoint.c (run_inferior_command): Likewise.
8423 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8425 * server.c (handle_search_memory_1): Include access length in
8428 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8430 * linux-crisv32-low.c: Fix compile errors.
8432 2012-09-04 Yao Qi <yao@codesourcery.com>
8434 * tracepoint.c (cmd_qtsv): Adjust debug message.
8435 Don't check CUR_TPOINT.
8437 2012-08-28 Yao Qi <yao@codesourcery.com>
8439 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8440 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8441 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8442 Remove declarations of xmalloc, xreallloc, xstrdup and
8444 * Makefile.in (libiberty_h): New.
8445 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8446 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8448 2012-08-23 Yao Qi <yao@codesourcery.com>
8450 * server.h: Remove declaration of 'xsnprintf'.
8452 2012-08-22 Keith Seitz <keiths@redhat.com>
8454 * server.h: Include build-gnulib-gbserver/config.h.
8455 * gdbreplay.c: Likewise.
8457 2012-08-08 Doug Evans <dje@google.com>
8459 * Makefile.in (SFILES): Add gdb_vecs.c.
8460 (OBS): Add gdb_vecs.o.
8461 (gdb_vecs_h, host_defs_h): New variables.
8462 (thread-db.o): Add $(gdb_vecs_h) dependency.
8463 (gdb_vecs.o): New rule.
8464 * thread-db.c: #include "gdb_vecs.h".
8465 (thread_db_load_search): Use a vector to iterate over path elements.
8466 Handle text appearing after "$pdir".
8468 * configure.ac: Add check for strstr.
8469 * config.in: Regenerate.
8470 * configure: Regenerate.
8472 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8474 * hostio.c (handle_pread): If pread fails, fall back to attempting
8476 (handle_pwrite): Likewise for pwrite.
8478 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8480 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8481 between unsupported TYPE and unimplementable ADDR/LEN combination.
8482 (arm_insert_point): Act on new return value.
8484 2012-07-31 Pedro Alves <palves@redhat.com>
8486 * server.c (process_point_options): Only skip tokens if we find
8487 one that is unrecognized. Don't treat 'X' specially while
8488 skipping unrecognized tokens.
8490 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8492 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8493 to 4-byte-align HW breakpoint addresses for Thumb.
8495 2012-07-27 Yao Qi <yao@codesourcery.com>
8499 * server.h: Declare gdb_agent_about_to_close.
8500 * target.c (kill_inferior): Include "agent.h".
8501 New. Send command 'kill'.
8502 * target.h (kill_inferior): Removed macro.
8503 * tracepoint.c (gdb_agent_about_to_close): New.
8504 (gdb_agent_helper_thread): Handle command 'close'.
8505 Wait endlessly until the inferior stops.
8506 Install gdb_agent_remove_socket to atexit hook.
8507 (agent_socket_name): New static variable.
8508 (gdb_agent_socket_init): Replace local variable 'name' with
8509 'agent_socket_name'.
8510 (gdb_agent_remove_socket): New.
8512 2012-07-27 Yao Qi <yao@codesourcery.com>
8514 * server.c (process_point_options): Stop at 'X' when parsing.
8516 2012-07-19 Michael Eager <eager@eagercon.com>
8518 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8520 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8521 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8522 hardware breakpoint.
8524 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8526 * gdbserver/linux-low.c (initialize_low): Call
8527 linux_ptrace_init_warnings.
8529 2012-07-02 Doug Evans <dje@google.com>
8531 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8534 2012-07-02 Stan Shebs <stan@codesourcery.com>
8536 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8537 (ax.o): Add it to build rule.
8539 (OBS): Add format.o.
8540 (IPA_OBS): Add format.o.
8541 * server.c (handle_query): Claim support for breakpoint commands.
8542 (process_point_options): Add command case.
8543 (process_serial_event): Leave running if there are printfs in
8545 * mem-break.h (any_persistent_commands): Declare.
8546 (add_breakpoint_commands): Declare.
8547 (gdb_no_commands_at_breakpoint): Declare.
8548 (run_breakpoint_commands): Declare.
8549 * mem-break.c (struct point_command_list): New struct.
8550 (struct breakpoint): New field command_list.
8551 (any_persistent_commands): New function.
8552 (add_commands_to_breakpoint): New function.
8553 (add_breakpoint_commands): New function.
8554 (gdb_no_commands_at_breakpoint): New function.
8555 (run_breakpoint_commands): New function.
8556 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8558 * ax.c: Include format.h.
8559 (ax_printf): New function.
8560 (gdb_eval_agent_expr): Add printf opcode.
8562 2012-06-13 Yao Qi <yao@codesourcery.com>
8564 * server.c (start_inferior): Remove duplicated writes to fields
8565 'last_resume_kind' and 'last_status' of 'current_inferior'.
8567 2012-06-12 Yao Qi <yao@codesourcery.com>
8568 Pedro Alves <palves@redhat.com>
8570 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8572 * server.c (handle_v_cont): Extend comment.
8574 2012-06-11 Yao Qi <yao@codesourcery.com>
8576 * linux-low.c (linux_attach): Add 'static'.
8578 2012-06-06 Yao Qi <yao@codesourcery.com>
8580 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8582 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8584 Fix gcc -flto compilation warning.
8585 * server.c (main): Make variable multi_mode and attach volatile.
8587 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8589 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8590 if the platform doesn't know about it.
8592 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8594 * Makefile.in (SFILES): Add linux-tile-low.c.
8595 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8596 * configure.srv: Handle tilegx-*-linux*.
8597 * linux-tile-low.c: New file.
8599 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8601 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8603 2012-05-24 Pedro Alves <palves@redhat.com>
8607 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8609 2012-05-24 Pedro Alves <palves@redhat.com>
8613 Replace target_signal with gdb_signal throughout.
8615 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8617 * linux-low.c (linux_store_registers): Avoid the copying sequence
8618 when no data has been retrieved by ptrace.
8620 2012-05-22 Will Deacon <will.deacon@arm.com>
8622 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8623 Include asm/ptrace.h.
8624 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8627 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8629 * linux-low.c (linux_store_registers): Don't re-retrieve data
8630 with ptrace that has already been obtained from /proc. Always
8631 copy any data retrieved with ptrace to the buffer supplied.
8633 2012-05-11 Yao Qi <yao@codesourcery.com>
8634 Pedro Alves <palves@redhat.com>
8636 * linux-low.c (enum stopping_threads_kind): New.
8637 (stopping_threads): Change type to `enum stopping_threads_kind'.
8638 (handle_extended_wait): If stopping and suspending threads, leave
8639 the new_lwp suspended too.
8640 (linux_wait_for_event): Adjust.
8641 (stop_all_lwps): Set `stopping_threads' to
8642 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8643 whether we're suspending threads or just stopping them. Assert no
8646 2012-04-29 Yao Qi <yao@codesourcery.com>
8648 * server.h: Move some code to ...
8649 * gdbthread.h: ... here. New.
8650 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8651 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8652 (nto-low.o, win32-low.o): Likewise.
8653 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8654 * regcache.c, remote-utils.c, server.c: Likewise.
8655 * target.c, tracepoint.c, win32-low.c: Likewise.
8657 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8659 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8660 (PTRACE_ARG4_TYPE): Likewise.
8661 (PTRACE_XFER_TYPE): Likewise.
8662 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8663 ptrace to PTRACE_ARG3_TYPE.
8664 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8665 (PTRACE_ARG4_TYPE): Likewise.
8666 (PTRACE_XFER_TYPE): Likewise.
8667 (linux_detach_one_lwp): Cast fourth argument of
8668 ptrace to long then PTRACE_ARG4_TYPE.
8669 (regsets_fetch_inferior_registers): Cast third argument of
8670 ptrace to long then PTRACE_ARG3_TYPE.
8671 (regsets_store_inferior_registers): Likewise.
8673 2012-04-20 Pedro Alves <palves@redhat.com>
8675 * configure: Regenerate.
8677 2012-04-19 Pedro Alves <palves@redhat.com>
8679 * Makefile.in (GNULIB_BUILDDIR): New.
8680 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8681 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8682 (all, install-only, uninstall, clean-info, all-lib, clean): No
8683 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8684 (maintainer-clean realclean distclean): Use subdir_do.
8686 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8687 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8688 * acinclude.m4: Include acx_configure_dir.m4.
8689 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8690 calls. Call AC_PROG_RANLIB. Configure gnulib using
8693 (GNULIB_STDINT_H): Adjust.
8694 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8695 * gdbreplay.c: Include build-gnulib/config.h.
8696 * server.h: Likewise.
8697 * aclocal.m4: Regenerate.
8698 * config.in: Regenerate.
8699 * configure: Regenerate.
8701 2012-04-19 Pedro Alves <palves@redhat.com>
8703 * Makefile.in (LIBGNU, INCGNU): Adjust.
8704 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8705 (all, install-only, uninstall, clean-info, all-lib, clean)
8706 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8707 * configure.ac: Adjust AC_OUTPUT output.
8708 * aclocal.m4: Regenerate.
8709 * configure: Regenerate.
8711 2012-04-19 Pedro Alves <palves@redhat.com>
8713 * Makefile.in (generated_files): New.
8714 (server_h): Remove the explicit dependency on config.h, and depend
8715 on $generated_files.
8717 2012-04-19 Pedro Alves <palves@redhat.com>
8719 * Makefile.in (INCGNU): Add -Ignulib.
8721 2012-04-19 Pedro Alves <palves@redhat.com>
8723 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8724 (INCGNU): ... this, and spell out -I here.
8725 (GNULIB_LIB): Rename to ...
8727 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8729 2012-04-19 Pedro Alves <palves@redhat.com>
8731 * config.in: Regenerate.
8733 2012-04-19 Pedro Alves <palves@redhat.com>
8735 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8736 * server.h (memmem): Remove declaration.
8737 * config.in: Regenerate.
8738 * configure: Regenerate.
8740 2012-04-19 Yao Qi <yao@codesourcery.com>
8742 * Makefile.in (SFILES): Add common/vec.c.
8746 2012-04-19 Yao Qi <yao@codesourcery.com>
8748 * remote-utils.c (prepare_resume_reply): Replace with macro
8749 target_core_of_thread.
8750 * server.c (handle_qxfer_threads_proper): Likewise.
8751 * target.h (traget_core_of_thread): New macro.
8753 2012-04-18 Pedro Alves <palves@redhat.com>
8755 * aclocal.m4: Regenerate.
8756 * configure: Regenerate.
8758 2012-04-16 Yao Qi <yao@codesourcery.com>
8760 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8761 duplicated on address.
8763 2012-04-16 Yao Qi <yao@codesourcery.com>
8765 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8766 (struct tracepoint_action_ops) <send>: New field.
8767 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8768 (agent_expr_send, x_tracepoint_action_send): New.
8769 (l_tracepoint_action_send): New.
8770 (cmd_qtdp): Download and install tracepoint
8771 according to `use_agent'.
8772 (run_inferior_command): Add one more parameter `len'.
8774 (tracepoint_send_agent): New.
8775 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8777 2012-04-16 Yao Qi <yao@codesourcery.com>
8779 * tracepoint.c (download_tracepoints): Moved to ...
8780 (cmd_qtstart): ... here.
8782 2012-04-14 Yao Qi <yao@codesourcery.com>
8784 * tracepoint.c: Include inttypes.h.
8785 (struct collect_memory_action): Use sized types.
8786 (struct tracepoint): Likewise.
8787 (cmd_qtdp, stop_tracing): Update print specifiers.
8788 (cmd_qtp, response_tracepoint): Likewise.
8789 (collect_data_at_tracepoint): Likewise.
8790 (collect_data_at_step): Likewise.
8792 2012-04-14 Yao Qi <yao@codesourcery.com>
8794 Import gnulib module inttypes.
8795 * aclocal.m4, config.in, configure: Regenerated.
8797 2012-04-14 Yao Qi <yao@codesourcery.com>
8799 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8800 Makefile and config.status at last.
8802 2012-04-13 Yao Qi <yao@codesourcery.com>
8804 * tracepoint.c: Include stdint.h unconditionally.
8806 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8808 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8809 on BFD_HAVE_SYS_PROCFS_TYPE.
8810 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8811 * configure: Regenerate.
8812 * config.in: Likewise.
8814 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8816 * Makefile.in (clean): Also remove x32.c x32-linux.c
8817 x32-avx.c x32-avx-linux.c.
8818 (x32.o): New target.
8820 (x32-linux.o): Likewise.
8821 (x32-linux.c): Likewise.
8822 (x32-avx.o): Likewise.
8823 (x32-avx.c): Likewise.
8824 (x32-avx-linux.o): Likewise.
8825 (x32-avx-linux.c): Likewise.
8827 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8828 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8829 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8830 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8831 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8832 i386/x32-avx-linux.xml.
8834 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8835 (init_registers_x32_avx_linux): Likwise.
8836 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8837 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8839 2012-04-13 Pedro Alves <palves@redhat.com>
8841 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8842 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8843 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8844 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8847 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8849 * linux-x86-low.c (compat_x32_clock_t): New.
8850 (compat_x32_siginfo_t): Likewise.
8851 (compat_x32_siginfo_from_siginfo): Likewise.
8852 (siginfo_from_compat_x32_siginfo): Likewise.
8853 (linux_is_elf64): Likewise.
8854 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8855 and siginfo_from_compat_x32_siginfo for x32.
8856 (x86_arch_setup): Set linux_is_elf64.
8858 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8861 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8863 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8864 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8865 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8866 compatible with process.
8868 2012-04-12 Yao Qi <yao@codesourcery.com>
8870 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8871 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8872 (install-only, install-info, clean): Handle sub dir gnulib.
8873 (all-lib, am--refresh): New targets.
8874 (memmem.o): Remove target.
8875 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8876 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8877 (AC_REPLACE_FUNCS): Remove memmem.
8878 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8879 (AC_OUTPUT): Generate Makefile in gnulib/.
8880 * aclocal.m4, config.in, configure: Regenerated.
8882 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8884 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8886 2012-04-05 Pedro Alves <palves@redhat.com>
8888 -Werror=strict-aliasing
8890 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8893 2012-04-04 Pedro Alves <palves@redhat.com>
8895 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8896 (sparc_store_gregset_from_stack, sparc_store_gregset)
8897 (sparc_breakpoint_at): Fix formatting.
8899 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8901 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8903 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8904 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8905 * config.in: Regenerate.
8906 * configure: Likewise.
8908 2012-03-29 Pedro Alves <palves@redhat.com>
8910 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8911 Correct ptrace arguments.
8913 2012-03-28 Pedro Alves <palves@redhat.com>
8915 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8916 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8917 (IA64_FR1_REGNUM): New defines.
8918 (ia64_fetch_register): New.
8919 (the_low_target): Install it.
8920 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8922 * linux-low.c (linux_fetch_registers): Try the
8923 the_low_target.fetch_register hook first.
8925 * linux-arm-low.c (the_low_target): Adjust.
8926 * linux-bfin-low.c (the_low_target): Adjust.
8927 * linux-cris-low.c (the_low_target): Adjust.
8928 * linux-crisv32-low.c (the_low_target): Adjust.
8929 * linux-m32r-low.c (the_low_target): Adjust.
8930 * linux-m68k-low.c (the_low_target): Adjust.
8931 * linux-mips-low.c (the_low_target): Adjust.
8932 * linux-ppc-low.c (the_low_target): Adjust.
8933 * linux-s390-low.c (the_low_target): Adjust.
8934 * linux-sh-low.c (the_low_target): Adjust.
8935 * linux-sparc-low.c (the_low_target): Adjust.
8936 * linux-tic6x-low.c (the_low_target): Adjust.
8937 * linux-x86-low.c (the_low_target): Adjust.
8938 * linux-xtensa-low.c (the_low_target): Adjust.
8940 2012-03-26 Pedro Alves <palves@redhat.com>
8942 * server.c (handle_qxfer_libraries): Don't bail early if
8943 the_target->qxfer_libraries_svr4 is not NULL.
8945 2012-03-26 Pedro Alves <palves@redhat.com>
8947 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8949 2012-03-23 Pedro Alves <palves@redhat.com>
8951 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8952 "library-list-svr4" element's start tag when the the DSO list is
8955 2012-03-23 Pedro Alves <palves@redhat.com>
8957 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8958 a variable whose type size is the same as the inferior's pointer
8961 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8963 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8965 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8966 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8967 * linux-low.h: Include <signal.h>.
8968 (struct siginfo): Remove forward declaration.
8969 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8972 2012-03-21 Mike Frysinger <vapier@gentoo.org>
8974 * .gitignore: Ignore more files.
8976 2012-03-19 Pedro Alves <palves@redhat.com>
8977 Jan Kratochvil <jan.kratochvil@redhat.com>
8979 * server.c (cont_thread, general_thread): Add describing comments.
8980 (start_inferior): Clear `cont_thread'.
8981 (handle_v_cont): Don't set `cont_thread' if resuming all threads
8984 2012-03-15 Yao Qi <yao@codesourcery.com>
8986 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8988 (cmd_qtdp): ... here.
8990 2012-03-15 Yao Qi <yao@codesourcery.com>
8992 * tracepoint.c (struct tracepoint_action_ops): New.
8993 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8994 (m_tracepoint_action_download): New.
8995 (r_tracepoint_action_download): New.
8996 (x_tracepoint_action_download): New.
8997 (l_tracepoint_action_download): New.
8998 (add_tracepoint_action): Install `action->ops' according type.
8999 (download_tracepoint_1): Move code `download' function pointer
9000 of various tracepoint_action_ops.
9002 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9004 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9005 linux_ptrace_attach_warnings.
9007 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9009 * Makefile.in (linux-ptrace.o): New.
9010 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9011 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9012 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9013 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9014 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9016 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9018 2012-03-08 Yao Qi <yao@codesourcery.com>
9019 Pedro Alves <palves@redhat.com>
9021 Fix PR server/13392.
9022 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9024 * tracepoint.c (remove_tracepoint): New.
9025 (cmd_qtdp): Call remove_tracepoint when failed to install.
9027 2012-03-07 Pedro Alves <palves@redhat.com>
9029 * linux-low.c (get_detach_signal): New.
9030 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9031 Pass on pending signals to PTRACE_DETACH. Check the result of the
9033 * server.c (program_signals, program_signals_p): New.
9034 (handle_general_set): Handle QProgramSignals.
9035 * server.h (program_signals, program_signals_p): Declare.
9037 2012-03-05 Pedro Alves <palves@redhat.com>
9038 Jan Kratochvil <jan.kratochvil@redhat.com>
9040 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9043 2012-03-03 Yao Qi <yao@codesourcery.com>
9045 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9046 agent_look_up_symbols.
9048 2012-03-03 Yao Qi <yao@codesourcery.com>
9050 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9051 (linux-x86-low.o): Likewise.
9052 * server.h: Remove in_process_agent_loaded.
9053 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9057 2012-03-03 Yao Qi <yao@codesourcery.com>
9059 * tracepoint.c (gdb_agent_capability): New global.
9060 (in_process_agent_loaded_ust): Renamed to
9061 `in_process_agent_supports_ust'.
9063 (in_process_agent_supports_ust): Call agent_capability_check.
9064 (clear_installed_tracepoints): Assert that agent supports
9067 2012-03-03 Yao Qi <yao@codesourcery.com>
9069 * linux-low.c (linux_supports_agent): New.
9070 (linux_target_ops): Initialize field `supports_agent' with
9071 linux_supports_agent.
9072 * target.h (struct target_ops) <supports_agent>: New.
9073 (target_supports_agent): New macro.
9074 * server.c (handle_general_set): Handle packet 'QAgent'.
9075 (handle_query): Send `QAgent+'.
9076 * Makefile.in (server.o): Depends on agent.h.
9078 2012-03-03 Yao Qi <yao@codesourcery.com>
9080 * Makefile.in (OBS): Add agent.o.
9081 Add new rule for agent.o.
9082 Track dependence of tracepoint.c on agent.h.
9083 * tracepoint.c (run_inferior_command_1):
9084 (run_inferior_command): Call agent_run_command.
9085 (gdb_ust_connect_sync_socket): Deleted. Move it to
9087 (resume_thread, stop_thread): Likewise.
9088 (gdb_ust_socket_init): Renamed to ...
9089 (gdb_agent_socket_init): ... New.
9090 (gdb_ust_thread): Renamed to ...
9091 (gdb_agent_helper_thread): ... New.
9092 (gdb_ust_init): Move some code to ...
9093 (gdb_agent_init): ... here. New.
9094 [HAVE_UST]: Call gdb_ust_init.
9095 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9096 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9097 * config.in, configure: Regenerated.
9099 2012-03-02 Pedro Alves <palves@redhat.com>
9101 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9102 * linux-low.c (struct simple_pid_list): New.
9103 (stopped_pids): New a struct simple_pid_list pointer.
9104 (add_to_pid_list, pull_pid_from_list): New.
9105 (handle_extended_wait): Don't assume the first signal new children
9106 report is SIGSTOP. Adjust call to pull_pid_from_list.
9107 (linux_wait_for_lwp): Adjust.
9109 2012-03-02 Yao Qi <yao@codesourcery.com>
9111 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9114 2012-03-02 Yao Qi <yao@codesourcery.com>
9116 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9117 `stop_pc' and `tpoint'. Update caller.
9119 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9121 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9122 * linux-low.c (use_linux_regsets): New macro.
9123 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9124 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9125 (linux_register_in_regsets): New function.
9126 (usr_fetch_inferior_registers): Skip registers covered by
9128 (usr_store_inferior_registers): Likewise.
9129 (usr_fetch_inferior_registers): New macro.
9130 (usr_store_inferior_registers): Likewise.
9131 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9132 (linux_store_registers): Likewise.
9133 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9135 (init_registers_mips64_dsp_linux): Likewise.
9136 (init_registers_mips_linux): New macro.
9137 (init_registers_mips_dsp_linux): Likewise.
9138 (mips_dsp_num_regs): Likewise.
9139 (DSP_BASE, DSP_CONTROL): New fallback macros.
9140 (mips_base_regs): New macro.
9141 (mips_regmap): Use it. Fix the size.
9142 (mips_dsp_regmap): New variable.
9143 (mips_dsp_regset_bitmap): Likewise.
9144 (mips_arch_setup): New function.
9145 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9147 (mips_cannot_store_register): Likewise.
9148 (the_low_target): Update .arch_setup, .num_regs and .regmap
9149 initializers. Add .regset_bitmap initializer.
9150 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9152 * linux-bfin-low.c (the_low_target): Likewise.
9153 * linux-cris-low.c (the_low_target): Likewise.
9154 * linux-crisv32-low.c (the_low_target): Likewise.
9155 * linux-ia64-low.c (the_low_target): Likewise.
9156 * linux-m32r-low.c (the_low_target): Likewise.
9157 * linux-m68k-low.c (the_low_target): Likewise.
9158 * linux-ppc-low.c (the_low_target): Likewise.
9159 * linux-s390-low.c (the_low_target): Likewise.
9160 * linux-sh-low.c (the_low_target): Likewise.
9161 * linux-sparc-low.c (the_low_target): Likewise.
9162 * linux-tic6x-low.c (the_low_target): Likewise.
9163 * linux-x86-low.c (the_low_target): Likewise.
9164 * linux-xtensa-low.c (the_low_target): Likewise.
9165 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9166 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9167 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9169 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9170 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9172 2012-02-29 Yao Qi <yao@codesourcery.com>
9173 Pedro Alves <palves@redhat.com>
9175 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9176 `step_over_finished' is true.
9178 2012-02-27 Pedro Alves <palves@redhat.com>
9180 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9181 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9183 2012-02-27 Pedro Alves <palves@redhat.com>
9186 * linux-low.c (pid_is_stopped): New.
9187 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9189 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9191 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9194 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9196 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9198 2012-02-24 Luis Machado <lgustavo@codesourcery>
9200 * server.c (handle_query): Advertise support for target-side
9201 breakpoint condition evaluation.
9202 (process_point_options): New function.
9203 (process_serial_event): When inserting a breakpoint, check for
9204 a target-side condition that should be evaluated.
9206 * mem-break.c: Include regcache.h and ax.h.
9207 (point_cond_list_t): New data structure.
9208 (breakpoint) <cond_list>: New field.
9209 (find_gdb_breakpoint_at): Make non-static.
9210 (delete_gdb_breakpoint_at): Clear any target-side
9212 (clear_gdb_breakpoint_conditions): New function.
9213 (add_condition_to_breakpoint): Likewise.
9214 (add_breakpoint_condition): Likewise.
9215 (gdb_condition_true_at_breakpoint): Likewise.
9216 (gdb_breakpoint_here): Return result directly instead
9217 of going through a local variable.
9219 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9220 (clear_gdb_breakpoint_conditions): Likewise.
9221 (add_breakpoint_condition): Likewise.
9222 (gdb_condition_true_at_breakpoint): Likewise.
9224 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9225 (need_step_over_p): Take target-side breakpoint condition into
9228 2012-02-24 Luis Machado <lgustavo@codesourcery>
9230 * server.h: Include tracepoint.h.
9231 (agent_mem_read, agent_get_trace_state_variable_value,
9232 agent_set_trace_state_variable_value,
9233 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9234 get_set_tsv_func_addr): New prototypes.
9236 * ax.h: New include file.
9237 * ax.c: New source file.
9239 * tracepoint.c: Include ax.h.
9240 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9241 agent_expr, eval_result_type): Move to ax.h.
9242 (parse_agent_expr): Rename to ...
9243 (gdb_parse_agent_expr): ... this, make it non-static and move
9245 (unparse_agent_expr) Rename to ...
9246 (gdb_unparse_agent_expr): ... this, make it non-static and move
9248 (eval_agent_expr): Rename to ...
9249 (eval_tracepoint_agent_expr): ... this.
9250 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9251 forward declarations.
9252 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9253 (agent_get_trace_state_variable_value): New function.
9254 (agent_set_trace_state_variable_value): New function.
9255 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9256 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9257 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9258 (condition_true_at_tracepoint): Likewise.
9259 (parse_agent_expr): Rename to ...
9260 (gdb_parse_agent_expr): ... this and move to ax.c.
9261 (unparse_agent_expr): Rename to ...
9262 (gdb_unparse_agent_expr): ... this and move to ax.c.
9263 (gdb_agent_op_name): Move to ax.c.
9264 (eval_agent_expr): Rename to ...
9265 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9267 (eval_tracepoint_agent_expr): New function.
9268 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9270 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9272 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9273 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9274 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9275 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9276 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9277 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9278 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9279 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9280 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9281 (compile_bytecodes): Remove forward declaration.
9282 (is_goto_target): Move to ax.c.
9283 (compile_bytecodes): Move to ax.c and call
9284 agent_get_trace_state_variable_value (...) and
9285 agent_set_trace_state_variable_value (...).
9287 * Makefile.in: Update ax.c and IPA dependencies.
9289 2012-02-24 Pedro Alves <palves@redhat.com>
9291 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9292 (cmd_bigqtbuffer_circular): ... this. Only handle
9293 'QTBuffer:circular:'.
9294 (handle_tracepoint_general_set): Adjust.
9296 2012-02-16 Yao Qi <yao@codesourcery.com>
9298 * inferiors.c: Move code to ...
9299 * dll.c: .... here. New.
9300 * server.h: Declare clear_dlls.
9301 * Makefile.in (SFILES): Add dll.c.
9305 2012-02-11 Yao Qi <yao@codesourcery.com>
9307 * server.c: (handle_monitor_command): Add a new parameter
9309 (handle_query): Update caller.
9311 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9313 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9314 * configure, config.in: Regenerate.
9315 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9318 2012-02-02 Pedro Alves <palves@redhat.com>
9320 Try SIGKILL first, then PTRACE_KILL.
9321 * linux-low.c (linux_kill_one_lwp): New.
9322 (linux_kill_one_lwp): Rename to ...
9323 (kill_one_lwp_callback): ... this. Use the new
9326 2012-02-02 Pedro Alves <palves@redhat.com>
9328 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9331 2012-01-27 Pedro Alves <palves@redhat.com>
9333 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9334 (elf_64_file_p): Make static.
9335 (linux_pid_exe_is_elf_64_file): New.
9336 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9337 Delete declarations.
9338 (linux_pid_exe_is_elf_64_file): Declare.
9339 * linux-x86-low.c (x86_arch_setup): Use
9340 linux_pid_exe_is_elf_64_file.
9342 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9344 * linux-low.c (linux_wait_for_event_1): Rename to ...
9345 (linux_wait_for_event): ... here and merge it with former
9346 linux_wait_for_event - new variable wait_ptid, use it.
9347 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9349 2012-01-23 Pedro Alves <palves@redhat.com>
9351 * server.c (main): Avoid yet another case of infinite loop while
9352 detaching/killing after a longjmp.
9354 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9357 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9359 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9361 * hostio.c (handle_readlink): New function.
9362 (handle_vFile): Call it to handle "vFile:readlink" packets.
9364 2012-01-20 Pedro Alves <palves@redhat.com>
9365 Ulrich Weigand <ulrich.weigand@linaro.org>
9367 * server.c (handle_v_requests): Only support vAttach and vRun to
9368 start multiple processes when in extended protocol mode.
9370 2012-01-17 Pedro Alves <palves@redhat.com>
9372 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9373 memalign plus mprotect to allocate the scratch buffer.
9375 2012-01-13 Pedro Alves <palves@redhat.com>
9377 * server.c (attach_inferior): Clear `cont_thread'.
9379 2012-01-13 Pedro Alves <palves@redhat.com>
9381 * server.c (main): Avoid infinite loop while detaching/killing
9384 2012-01-09 Doug Evans <dje@google.com>
9386 * server.c (start_inferior): Set last_ptid in --wrapper case.
9388 2012-01-06 Yao Qi <yao@codesourcery.com>
9390 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9392 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9394 2012-01-04 Yao Qi <yao@codesourcery.com>
9396 * tracepoint.c (cmd_qtdp): Print debug message
9397 for static tracepoint.
9399 2012-01-04 Yao Qi <yao@codesourcery.com>
9401 * tracepoint.c (trace_vdebug): Differentiate debug message
9402 between gdbserver and IPA.
9404 2012-01-03 Yao Qi <yao@codesourcery.com>
9406 * tracepoint.c (tracepoint_was_hit): Don't collect for
9409 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9411 * terminal.h: Reformat copyright header.
9413 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9415 * server.c (gdbserver_version): Update copyright year.
9416 * gdbreplay.c (gdbreplay_version): Likewise.
9418 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9420 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9423 2011-12-18 Hui Zhu <teawater@gmail.com>
9424 * linux-low.c (linux_create_inferior): Save return value to ret.
9426 2011-12-18 Hui Zhu <teawater@gmail.com>
9428 * linux-low.c (linux_create_inferior): Save return value to ret.
9430 2011-12-16 Doug Evans <dje@google.com>
9432 * linux-low.c (linux_create_inferior): If stdio connection,
9433 redirect stdin from /dev/null, stdout to stderr.
9434 * remote-utils.c (remote_is_stdio): New static global.
9435 (remote_connection_is_stdio): New function.
9436 (remote_prepare): Handle stdio connection.
9437 (remote_open): Ditto.
9438 (remote_close): Don't close stdin for stdio connections.
9439 (read_prim,write_prim): New functions. Replace all calls to
9440 read/write to these.
9441 * server.c (main): Watch for "-" argument. Move call to
9442 remote_prepare before start_inferior.
9443 * server.h (STDIO_CONNECTION_NAME): New macro.
9444 (remote_connection_is_stdio): Declare.
9446 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9447 in debugging output.
9449 2011-12-15 Yao Qi <yao@codesourcery.com>
9451 * tracepoint.c: Include sys/syscall.h.
9452 (gdb_ust_thread): Remove preprocessor conditional.
9454 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9456 * linux-low.c (linux_detach_one_lwp): Call
9457 the_low_target.prepare_to_resume before detaching.
9459 2011-12-14 Yao Qi <yao@codesourcery.com>
9461 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9464 2011-12-14 Yao Qi <yao@codesourcery.com>
9466 * i386-low.c (i386_low_stopped_data_address): Initialize local
9469 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9473 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9474 DR_CONTROL unless necessary. Extend comments.
9475 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9476 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9478 2011-12-13 Yao Qi <yao@codesourcery.com>
9480 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9482 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9484 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9486 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9487 Print new debug message for such case.
9489 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9491 Fix overlapping memcpy.
9492 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9493 the read_inferior_memory transfer.
9494 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9495 write_inferior_memory transfer.
9496 (set_fast_tracepoint_jump): New variable buf. Use it for the
9497 read_inferior_memory and write_inferior_memory transfers.
9498 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9499 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9500 Use it for the write_inferior_memory transfer.
9501 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9504 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9506 * linux-low.c (fetch_register, store_register): Make code
9507 consistent, fix formatting.
9509 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9511 * linux-low.c (usr_store_inferior_registers): Factor out code
9512 to handle individual registers into...
9513 (store_register): ... this new function.
9515 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9517 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9518 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9519 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9520 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9521 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9522 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9523 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9524 (srv_xmlfiles): Add new XML files.
9526 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9528 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9529 (init_registers_s390_linux32v1): Add prototype.
9530 (init_registers_s390_linux32v2): Likewise.
9531 (init_registers_s390_linux64v1): Likewise.
9532 (init_registers_s390_linux64v2): Likewise.
9533 (init_registers_s390x_linux64v1): Likewise.
9534 (init_registers_s390x_linux64v2): Likewise.
9535 (s390_num_regs): Increment to 52.
9536 (s390_regmap): Add orig_r2 register.
9537 (s390_num_regs_3264): Increment to 68.
9538 (s390_regmap_3264): Add orig_r2 register.
9539 (s390_collect_ptrace_register): Handle orig_r2 register.
9540 (s390_supply_ptrace_register): Likewise.
9541 (s390_fill_last_break): New function.
9542 (s390_store_last_break): Likewise.
9543 (s390_fill_system_call): New function.
9544 (s390_store_system_call): Likewise.
9545 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9547 (s390_check_regset): New function.
9548 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9549 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9550 Update target_regsets for available register sets.
9552 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9553 Jan Kratochvil <jan.kratochvil@redhat.com>
9555 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9556 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9558 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9559 * linux-low.h (struct process_info_private): New member r_debug.
9560 * server.c (handle_qxfer_libraries): Call
9561 the_target->qxfer_libraries_svr4.
9562 (handle_qxfer_libraries_svr4): New function.
9563 (qxfer_packets): New entry "libraries-svr4".
9564 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9565 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9566 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9567 PACKET_qXfer_libraries_svr4.
9569 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9571 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9572 PSW address/mask between 8-byte and 16-byte formats.
9573 (s390_supply_ptrace_register): Likewise.
9574 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9575 basic addressing mode bit.
9577 2011-11-24 Stan Shebs <stan@codesourcery.com>
9579 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9581 2011-11-17 Stan Shebs <stan@codesourcery.com>
9583 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9584 (tracing_start_time): New global.
9585 (tracing_stop_time): New global.
9586 (tracing_user_name): New global.
9587 (tracing_notes): New global.
9588 (tracing_stop_note): New global.
9589 (cmd_qtstart): Set traceframe_usage, start_time.
9590 (stop_tracing): Set stop_time.
9591 (cmd_qtstatus): Report additional status.
9592 (cmd_qtp): New function.
9593 (handle_tracepoint_query): Call it.
9594 (cmd_qtnotes): New function.
9595 (handle_tracepoint_general_set): Call it.
9596 (get_timestamp): Rename from tsv_get_timestamp.
9598 2011-11-14 Stan Shebs <stan@codesourcery.com>
9599 Kwok Cheung Yeung <kcy@codesourcery.com>
9601 * linux-x86-low.c (small_jump_insn): New.
9602 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9603 trampoline and error message, build a trampoline and issue a small
9604 jump instruction to it.
9605 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9606 trampoline and error message.
9607 (x86_get_min_fast_tracepoint_insn_len): New.
9608 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9609 * linux-low.h (struct linux_target_ops): Add arguments to
9610 install_fast_tracepoint_jump_pad operation, add new operation.
9611 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9613 (linux_get_min_fast_tracepoint_insn_len): New function.
9614 (linux_target_op): Add new operation.
9615 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9616 (gdb_trampoline_buffer_end): Ditto.
9617 (gdb_trampoline_buffer_error): Ditto.
9618 (struct ipa_sym_addresses): Add fields for new IPA variables.
9619 (symbol_list): Add entries for new IPA variables.
9620 (struct tracepoint): Add fields to hold the address range of the
9621 trampoline used by the tracepoint.
9622 (trampoline_buffer_head): New static variable.
9623 (trampoline_buffer_tail): Ditto.
9624 (claim_trampoline_space): New function.
9625 (have_fast_tracepoint_trampoline_buffer): New function.
9626 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9628 (install_fast_tracepoint): Ditto, also add error buffer argument.
9629 (cmd_qtminftpilen): New function.
9630 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9631 (fast_tracepoint_from_trampoline_address): New function.
9632 (fast_tracepoint_collecting): Handle trampoline as part of jump
9634 (set_trampoline_buffer_space): New function.
9635 (initialize_tracepoint): Initialize new IPA variables.
9636 * target.h (struct target_ops): Add arguments to
9637 install_fast_tracepoint_jump_pad operation, add new
9638 get_min_fast_tracepoint_insn_len operation.
9639 (target_get_min_fast_tracepoint_insn_len): New.
9640 (install_fast_tracepoint_jump_pad): Add arguments.
9641 * server.h (IPA_BUFSIZ): Define.
9642 * linux-i386-ipa.c: Include extra header files.
9643 (initialize_fast_tracepoint_trampoline_buffer): New function.
9644 (initialize_low_tracepoint): Call it.
9645 * server.h (set_trampoline_buffer_space): Declare.
9646 (claim_trampoline_space): Ditto.
9647 (have_fast_tracepoint_trampoline_buffer): Ditto.
9649 2011-11-14 Yao Qi <yao@codesourcery.com>
9651 * server.c (handle_query): Handle InstallInTrace for qSupported.
9652 * tracepoint.c (add_tracepoint): Sort list.
9653 (install_tracepoint, download_tracepoint): New.
9654 (cmd_qtdp): Call them to install and download tracepoints.
9655 (sort_tracepoints): Removed.
9656 (cmd_qtstart): Update.
9658 2011-11-14 Yao Qi <yao@codesourcery.com>
9660 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9661 * mem-break.h: Declare.
9662 * tracepoint.c (cmd_qtstart): Move some code to ...
9663 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9665 (download_tracepoints): Move some code to ...
9666 (download_tracepoint_1): ... here. New.
9668 2011-11-08 Yao Qi <yao@codesourcery.com>
9670 * remote-utils.c (relocate_instruction): A comment fix.
9672 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9674 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9675 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9676 dr_status_mirror and dr_control_mirror from debug_reg_state.
9677 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9678 (i386_initial_stuff): Remove use of deleted globals.
9679 (i386_get_thread_context, i386_set_thread_context,
9680 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9681 from debug_reg_state.
9683 2011-11-05 Yao Qi <yao@codesourcery.com>
9685 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9686 address as TPOINT's.
9688 2011-11-02 Stan Shebs <stan@codesourcery.com>
9690 * tracepoint.c (agent_mem_read_string): New function.
9691 (eval_agent_expr): Call it for tracenz.
9692 * server.c (handle_query): Report support for tracenz.
9694 2011-11-02 Yao Qi <yao@codesourcery.com>
9696 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9698 2011-11-02 Yao Qi <yao@codesourcery.com>
9700 * target.h: Fix a typo in comment.
9702 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9704 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9705 clobber the breakpoints' shadows with fast tracepoint jumps.
9706 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9707 * target.c (write_inferior_memory): Also pass MYADDR down to
9710 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9712 * configure.ac: Check support for personality routine.
9713 * configure: Regenerate.
9714 * config.in: Likewise.
9715 * linux-low.c: Include <sys/personality.h>.
9716 Define ADDR_NO_RANDOMIZE if necessary.
9717 (linux_create_inferior): Disable address space randomization when
9718 forking inferior, if requested.
9719 (linux_supports_disable_randomization): New function.
9720 (linux_target_ops): Install it.
9721 * server.h (disable_randomization): Declare.
9722 * server.c (disable_randomization): New global variable.
9723 (handle_general_set): Handle QDisableRandomization.
9724 (handle_query): Likewise for qSupported.
9725 (main): Support --disable-randomization and --no-disable-randomization
9726 command line arguments.
9727 * target.h (struct target_ops): Add supports_disable_randomization.
9728 (target_supports_disable_randomization): New macro.
9730 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9732 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9734 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9735 [!PT_GETDSBT] (target_loadmap): New definition.
9736 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9737 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9738 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9739 and PT_GETDSBT to LINUX_LOADMAP.
9740 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9741 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9743 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9745 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9746 (arm_linux_hwbp_cap): New static variable.
9747 (arm_linux_get_hwbp_cap): Replace by ...
9748 (arm_linux_init_hwbp_cap): ... this new function.
9749 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9750 (arm_linux_get_hw_watchpoint_count): Likewise.
9751 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9752 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9753 (arm_prepare_to_resume): Use perror_with_name instead of error.
9755 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9757 * linux-arm-low.c: Include <signal.h>.
9758 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9759 (struct arm_linux_hwbp_cap): New data type.
9760 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9761 (struct arm_linux_hw_breakpoint): New data type.
9762 (MAX_BPTS, MAX_WPTS): Define.
9763 (struct arch_process_info, struct arch_lwp_info): New data types.
9764 (arm_linux_get_hwbp_cap): New function.
9765 (arm_linux_get_hw_breakpoint_count): Likewise.
9766 (arm_linux_get_hw_watchpoint_count): Likewise.
9767 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9768 (arm_hwbp_control_initialize): Likewise.
9769 (arm_hwbp_control_is_enabled): Likewise.
9770 (arm_hwbp_control_is_initialized): Likewise.
9771 (arm_hwbp_control_disable): Likewise.
9772 (arm_linux_hw_breakpoint_equal): Likewise.
9773 (arm_linux_hw_point_initialize): Likewise.
9774 (struct update_registers_data): New data structure.
9775 (update_registers_callback: New function.
9776 (arm_insert_point): Likewise.
9777 (arm_remove_point): Likewise.
9778 (arm_stopped_by_watchpoint): Likewise.
9779 (arm_stopped_data_address): Likewise.
9780 (arm_new_process): Likewise.
9781 (arm_new_thread): Likewise.
9782 (arm_prepare_to_resume): Likewise.
9783 (the_low_target): Register arm_insert_point, arm_remove_point,
9784 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9785 arm_new_thread, and arm_prepare_to_resume.
9787 2011-09-15 Stan Shebs <stan@codesourcery.com>
9789 * server.h (struct emit_ops): Add compare-goto fields.
9790 * tracepoint.c (gdb_agent_op_sizes): New table.
9791 (emit_eq_goto): New function.
9792 (emit_ne_goto): New function.
9793 (emit_lt_goto): New function.
9794 (emit_le_goto): New function.
9795 (emit_gt_goto): New function.
9796 (emit_ge_goto): New function.
9797 (is_goto_target): New function.
9798 (compile_bytecodes): Recognize special cases of compare-goto
9799 combinations and call specialized emitters for them.
9800 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9801 (amd64_emit_ne_goto): New function.
9802 (amd64_emit_lt_goto): New function.
9803 (amd64_emit_le_goto): New function.
9804 (amd64_emit_gt_goto): New function.
9805 (amd64_emit_ge_goto): New function.
9806 (amd64_emit_ops): Add the new functions.
9807 (i386_emit_eq_goto): New function.
9808 (i386_emit_ne_goto): New function.
9809 (i386_emit_lt_goto): New function.
9810 (i386_emit_le_goto): New function.
9811 (i386_emit_gt_goto): New function.
9812 (i386_emit_ge_goto): New function.
9813 (i386_emit_ops): Add the new functions.
9815 2011-09-08 Stan Shebs <stan@codesourcery.com>
9817 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9818 (i386_emit_epilogue): Restore %ebx.
9820 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9822 * server.c (step_thread): Remove definition.
9823 (process_serial_event): Don't handle Hs.
9824 * server.h (step_thread): Remove declaration.
9825 * target.c (set_desired_inferior): Remove use of step_thread.
9827 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9829 * linux-low.c: Include linux-procfs.h.
9830 (linux_attach_lwp_1): Update comments.
9831 (linux_attach): Scan for existing threads when attaching to a
9832 process that is the tgid.
9833 * Makefile.in: Update dependencies.
9835 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9837 * configure.srv: Add linux-procfs.o dependencies.
9839 2011-08-14 Yao Qi <yao@codesourcery.com>
9841 * target.h (struct target_ops): Fix indent.
9842 * win32-low.c (win32_target_ops): Fix comment.
9844 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9845 Yao Qi <yao@codesourcery.com>
9847 * Makefile.in (clean): Remove tic6x-*.c files.
9848 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9849 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9850 (tic6x-c64xp-linux.c): Likewise.
9851 * configure.srv: Add support for tic6x-*-uclinux.
9852 * linux-tic6x-low.c: New.
9853 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9855 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9856 Yao Qi <yao@codesourcery.com>
9858 * target.h (struct target_ops): Add read_loadmap.
9859 * linux-low.c (struct target_loadseg): New type.
9860 (struct target_loadmap): New type.
9861 (linux_read_loadmap): New function.
9862 (linux_target_ops): Add linux_read_loadmap.
9863 * server.c (handle_query): Support qXfer:fdpic:read packet.
9864 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9867 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9869 * win32-low.c: Include <stdint.h>.
9871 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9873 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9874 to the inferior here.
9875 (i386_remove_aligned_watchpoint): Ditto.
9876 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9877 fit part of the watchpoint in the debug registers.
9878 (i386_update_inferior_debug_regs): New.
9879 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9880 registers, and only update the inferior on success.
9881 (i386_low_remove_watchpoint): Ditto.
9883 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9885 * linux-low.c (compare_ints, unique, list_threads, show_process,
9886 linux_core_of_thread): Delete.
9887 (linux_target_ops): Change linux_core_of_thread to
9888 linux_common_core_of_thread.
9889 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9890 * utils.c (malloc_failure): Change type of argument.
9891 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9892 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9893 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9894 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9895 (IPA_OBJS): Add common-utils-ipa.o.
9896 (ptid_h, linux_osdata_h): New macros.
9897 (server_h): Add common/common-utils.h, common/xml-utils.h,
9898 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9900 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9901 ptid.o, buffer.o): New rules.
9902 (linux-low.o): Add common/linux-osdata.h as a dependency.
9903 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9904 * configure.ac: Add AC_HEADER_DIRENT check.
9905 * config.in: Regenerate.
9906 * configure: Regenerate.
9907 * remote-utils.c (xml_escape_text): Delete.
9908 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9909 buffer_xml_printf): Move to common/buffer.c.
9910 * server.c (main): Remove call to initialize_inferiors.
9911 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9912 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9913 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9914 internal_error, gdb_assert, gdb_assert_fail): Delete.
9915 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9916 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9918 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9919 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9920 initialize_inferiors): Delete.
9922 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9924 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9927 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9929 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9931 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9933 2011-05-26 Yao Qi <yao@codesourcery.com>
9935 * Makefile.in (thread-db.o): Track dependence to
9936 common/gdb_thread_db.h.
9937 * thread-db.c: include gdb_thread_db.h from right place.
9939 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9941 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9942 __FILE__ and __LINE__ to internal_error.
9944 2011-05-13 Doug Evans <dje@google.com>
9946 * thread-db.c (try_thread_db_load_from_sdir): New function.
9947 (try_thread_db_load_from_dir): New function.
9948 (thread_db_load_search): Handle $sdir, ignore $pdir.
9949 Remove trying of system directories if search of
9950 libthread-db-search-path fails, that is now done via $sdir.
9952 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9954 * server.c (handle_query): Add EnableDisableTracepoints to the list
9955 of supported features.
9956 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9958 (cmd_qtenable_disable): New.
9959 (cmd_qtstart): Install tracepoints even if disabled.
9960 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9961 receiving a QTEnable or QTDisable packet.
9962 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9963 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9965 (gdb_probe): Skip data collection if static tracepoint is disabled.
9967 2011-05-10 Doug Evans <dje@google.com>
9969 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9971 2011-05-04 Doug Evans <dje@google.com>
9973 * linux-low.c (linux_join): Skip process lookup.
9974 * spu-low.c (spu_join): Ditto.
9975 * server.c (join_inferiors_callback): Delete.
9976 (process_serial_event): For 'D' packet (detach) call join_inferior
9979 2011-05-04 Joseph Myers <joseph@codesourcery.com>
9981 * README: Don't mention xscale*-*-linux*.
9982 * configure.srv (xscale*-*-linux*): Don't handle target.
9984 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
9986 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9988 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9989 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9990 (i386_emit_void_call_2): Likewise.
9992 2011-04-26 Yao Qi <yao@codesourcery.com>
9994 * linux-low.c: Move common macros to linux-ptrace.h.
9995 Include linux-ptrace.h.
9996 * Makefile.in (linux_ptrace_h): New.
9997 (linux-low.o): Depends on linux-ptrace.h.
9999 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10001 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10002 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10003 (remote_prepare): New function with most of the TCP code from ...
10004 (remote_open): ... here. Detect PORT here unconditionally. Move also
10005 setting transport_is_reliable.
10006 * server.c (run_once): New variable.
10007 (gdbserver_usage): Document it.
10008 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10009 the first run if RUN_ONCE.
10010 * server.h (run_once, remote_prepare): New declarations.
10012 2011-04-19 Tom Tromey <tromey@redhat.com>
10014 * win32-low.c (handle_load_dll): Remove duplicate "the".
10016 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10018 Remove support for old Cygwin 1.5 versions.
10019 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10020 function to avoid warning.
10021 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10024 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10026 * gdbserver/server.h (Macro _): Define it if not available.
10028 2011-03-14 Michael Snyder <msnyder@vmware.com>
10030 * hostio.c (handle_close): Remove unnecessary null test.
10032 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10034 * Makefile.in (maintainer-clean realclean distclean): Remove
10035 "make ... subdir_do" command.
10037 2011-03-10 Michael Snyder <msnyder@vmware.com>
10039 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10041 * server.c (handle_v_run): Free alloced buffer on early return.
10043 2011-03-09 Yao Qi <yao@codesourcery.com>
10046 2011-03-04 Yao Qi <yao@codesourcery.com>
10048 * Makefile.in: Remove GNU make feature --directory.
10050 2011-03-05 Yao Qi <yao@codesourcery.com>
10052 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10053 (subdir_do): New make target. Copied from gdb/Makefile.
10054 (maintainer-clean, realclean, distclean, clean): Call corresponding
10055 make targets in common/Makefile.
10057 2011-02-11 Yao Qi <yao@codesourcery.com>
10059 * configure.ac: Call AC_PROG_RANLIB.
10060 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10061 * configure: Regenerate.
10063 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10065 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10067 2011-03-06 Yao Qi <yao@codesourcery.com>
10069 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10071 2011-03-05 Yao Qi <yao@codesourcery.com>
10073 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10074 (subdir_do): New make target. Copied from gdb/Makefile.
10075 (maintainer-clean, realclean, distclean, clean): Call corresponding
10076 make targets in common/Makefile.
10078 2011-03-04 Yao Qi <yao@codesourcery.com>
10080 * Makefile.in: Remove GNU make feature --directory.
10082 2011-03-04 Michael Snyder <msnyder@vmware.com>
10084 * server.c (queue_stop_reply): Call xmalloc not malloc.
10086 2011-03-02 Michael Snyder <msnyder@vmware.com>
10088 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10090 2011-02-28 Michael Snyder <msnyder@vmware.com>
10092 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10093 (cmd_qtframe): Ditto.
10094 (cmd_qtbuffer): Ditto.
10095 (cmd_bigqtbuffer): Ditto.
10097 * utils.c (decimal2str): Initialize 'width' to nine, then
10098 don't mess with it.
10100 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10102 * hostio.c (require_data): Free *data, not data.
10104 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10106 * hostio.c (require_data): Use free, not xfree.
10108 2011-02-27 Michael Snyder <msnyder@vmware.com>
10110 * server.c (handle_query): Discard unused value.
10112 * hostio.c (require_data): Free malloc memory before returning
10115 2011-02-26 Michael Snyder <msnyder@vmware.com>
10117 * linux-low.c (list_threads): Call closedir for dirent.
10119 2011-02-27 Michael Snyder <msnyder@vmware.com>
10121 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10122 a case statement falls through.
10124 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10126 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10129 2011-02-26 Michael Snyder <msnyder@vmware.com>
10131 * utils.c (decimal2str): Eliminate dead code and dead param.
10132 (pulongest): Drop dead param from call to decimal2str.
10135 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10137 Revert the following patch (not approved yet):
10138 2011-02-21 Hui Zhu <teawater@gmail.com>
10139 * tracepoint.c (tp_printf): New function.
10140 (eval_agent_expr): Handle gdb_agent_op_printf.
10142 2011-02-21 Hui Zhu <teawater@gmail.com>
10144 * tracepoint.c (tp_printf): New function.
10145 (eval_agent_expr): Handle gdb_agent_op_printf.
10147 2011-02-18 Tom Tromey <tromey@redhat.com>
10149 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10150 (tracepoint.o): Likewise.
10151 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10152 (gdb_agent_op_names): Likewise.
10154 2011-02-18 Tom Tromey <tromey@redhat.com>
10156 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10157 gdb_agent_op_rot>: New constants.
10158 (gdb_agent_op_names): Add pick and roll.
10159 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10162 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10164 * aclocal.m4: Regenerated with aclocal-1.11.1.
10166 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10168 * server.c (handle_qxfer_traceframe_info): New.
10169 (qxfer_packets): Register "traceframe-info".
10170 (handle_query): Report support for qXfer:traceframe-info:read+.
10171 * tracepoint.c (match_blocktype): New.
10172 (traceframe_find_block_type): Rename to ...
10173 (traceframe_walk_blocks): ... this. Add callback filter argument,
10175 (traceframe_find_block_type): New, reimplemented on top of
10176 traceframe_walk_blocks.
10177 (build_traceframe_info_xml): New.
10178 (traceframe_read_info): New.
10179 * server.h (traceframe_read_info): Declare.
10181 2011-02-11 Yao Qi <yao@codesourcery.com>
10183 * configure.ac: Call AC_PROG_RANLIB.
10184 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10185 * configure: Regenerate.
10187 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10189 * server.c (gdb_read_memory): Change return semantics to allow
10191 (handle_search_memory_1): Adjust.
10192 (process_serial_event) <'m' packet>: Handle partial transfers.
10193 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10195 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10197 * regcache.c (init_register_cache): Initialize
10198 regcache->register_status.
10199 (free_register_cache): Release regcache->register_status.
10200 (regcache_cpy): Copy register_status.
10201 (registers_to_string): Print 'x's for unavailable registers.
10202 (supply_register): Mark the register's status valid or
10203 unavailable, depending on whether a buffer was passed in or not.
10204 (supply_register_zeroed): New.
10205 (supply_regblock): Mark the registers' status valid or
10206 unavailable, depending on whether a buffer was passed in or not.
10207 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10208 (struct regcache): New `register_status' field.
10209 (supply_register_zeroed): Declare.
10210 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10211 supply_register_zeroed, rather than passing a NULL buffer to
10213 * tracepoint.c (fetch_traceframe_registers): Update comment.
10215 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10217 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10220 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10222 * server.h (decode_xfer_write): Change prototype.
10223 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10224 and don't extract the annex here.
10225 * server.c (decode_xfer_read): Remove `annex' parameter,
10226 and don't extract the annex here.
10227 (decode_xfer): New.
10228 (struct qxfer): New.
10229 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10230 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10231 (handle_qxfer_statictrace): New functions, abstracted out from
10232 handle_query, and made to use the struct qxfer interface.
10233 (handle_threads_qxfer_proper): Rename to ...
10234 (handle_qxfer_threads_proper): ... this.
10235 (handle_threads_qxfer): Rename to ...
10236 (handle_qxfer_threads): ... this. Adjust.
10237 (qxfer_packets): New array.
10238 (handle_qxfer): New function.
10239 (handle_query): Use handle_qxfer.
10241 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10243 * gdbreplay.c: Shorten lines of >= 80 columns.
10244 * linux-low.c: Ditto.
10245 * linux-ppc-low.c: Ditto.
10246 * linux-s390-low.c: Ditto.
10247 * linux-sparc-low.c: Ditto.
10248 * linux-x86-low.c: Ditto.
10249 * linux-xtensa-low.c: Ditto.
10250 * mem-break.c: Ditto.
10251 * nto-low.c: Ditto.
10252 * regcache.h: Ditto.
10253 * remote-utils.c: Ditto.
10256 * thread-db.c: Ditto.
10257 * tracepoint.c: Ditto.
10259 * win32-low.h: Ditto.
10261 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10263 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10266 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10268 * server.c (gdbserver_version): Update copyright year in version
10270 * gdbreplay.c (gdbreplay_version): Ditto.
10272 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10274 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10275 * linux-bfin-low.c: New file.
10276 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10277 PT_DATA_ADDR for BFIN targets.
10278 * Makefile.in (SFILES): Add linux-bfin-low.c.
10279 (clean): Remove reg-bfin.c.
10280 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10281 * README: Mention supported Blackfin targets.
10283 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10285 * .gitignore: New file.
10287 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10289 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10291 2010-10-22 Jie Zhang <jie@codesourcery.com>
10293 * Makefile.in: Add FLAGS_TO_PASS variable.
10294 (install): Remove dependency of install-only and recursively
10295 invoke make for install-only.
10297 2010-10-04 Doug Evans <dje@google.com>
10299 * Makefile.in (uninstall): Use $(DESTDIR).
10301 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10305 * linux-x86-low.c (compat_siginfo_from_siginfo)
10306 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10307 si_code is < 0. Check for si_code == SI_TIMER before checking for
10310 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10312 * lynx-i386-low.c: New file.
10313 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10315 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10317 * lynx-low.c (ptrace_request_to_str): Remove handling for
10318 request values that have been removed in LynxOS 5.x.
10320 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10322 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10325 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10327 * configure.ac: Add --enable-inprocess-agent option.
10328 * configure: Rebuilt.
10330 2010-09-06 Yao Qi <yao@codesourcery.com>
10332 * linux-low.c (linux_kill): Remove unused variable.
10333 (linux_stabilize_threads): Likewise.
10334 * server.c (start_inferior): Likewise.
10335 (queue_stop_reply_callback): Likewise.
10336 * tracepoint.c (do_action_at_tracepoint): Likewise.
10338 2010-09-06 Yao Qi <yao@codesourcery.com>
10340 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10343 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10345 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10347 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10349 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10352 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10354 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10355 gdbserver/lynx-ppc-low.c: New files.
10356 * Makefile.in (lynx_low_h): New variable.
10357 (lynx-low.o, lynx-ppc-low.o): New rules.
10358 * configure.ac: On LynxOS, link with -lnetinet.
10359 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10360 * configure: regenerate.
10362 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10364 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10365 * configure.ac: Add check for vasprintf and vsnprintf.
10366 * configure, config.in: Regenerate.
10367 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10369 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10371 * gdbreplay.c: Move include of alloca.h up, next to include of
10373 * server.h: Add include of malloc.h.
10374 * mem-break.c: Remove include of malloc.h.
10375 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10377 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10379 * Makefile.in (memmem.o): Build with -Wno-error.
10381 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10383 * utils.c (xsnprintf): Make non-static.
10384 * server.h: Add xsnprintf declaration.
10385 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10386 replace calls to snprintf by calls to xsnprintf throughout.
10388 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10390 * configure.ac: Add configure check for alloca.
10391 * configure, config.in: Regenerate.
10392 * server.h: Include alloca.h if it exists.
10393 * gdbreplay.c: Include alloca.h if it exists.
10395 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10397 * linux-low.c (__SIGRTMIN): Define if not already defined.
10398 (linux_create_inferior): Check for __ANDROID__ rather than
10400 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10401 are already deferred.
10402 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10403 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10404 stopped and already has a pending signal to report.
10405 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10406 a pending signal to report or is moving out of a jump pad.
10407 (linux_init_signals): Check for __ANDROID__ rather than
10410 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10412 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10413 debug_threads check. Avoid a linear search when not doing debug
10416 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10418 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10419 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10420 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10421 (process_event): Change local fd's type to gdb_fildes_t.
10422 (create_file_handler): Adjust prototype.
10423 (delete_file_handler): Adjust prototype.
10424 (handle_file_event): Adjust prototype. Use pfildes.
10425 (create_file_event): Adjsut prototype.
10426 * remote-utils.c (remote_desc, listen_desc): Change type to
10428 * server.h: New gdb_fildes_t typedef.
10429 [USE_WIN32API]: Include winsock2.h.
10430 (delete_file_handler, add_file_handler): Adjust prototypes.
10431 (pfildes): Declare.
10432 * utils.c (pfildes): New.
10434 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10436 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10437 * configure: Regenerate.
10439 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10441 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10442 (linux_done_accessing_memory): ... this.
10443 (linux_target_ops): Adjust.
10444 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10445 * nto-low.c (nto_target_ops): Adjust comment.
10446 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10447 * spu-low.c (spu_target_ops): Adjust comment.
10448 * target.h (target_ops): Rename unprepare_to_access_memory field
10449 to done_accessing_memory.
10450 (unprepare_to_access_memory): Rename to ...
10451 (done_accessing_memory): ... this.
10453 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10455 * linux-low.c (linux_prepare_to_access_memory): New.
10456 (linux_unprepare_to_access_memory): New.
10457 (linux_target_ops): Install them.
10458 * server.c (read_memory): Rename to ...
10459 (gdb_read_memory): ... this. Use
10460 prepare_to_access_memory/prepare_to_access_memory.
10461 (write_memory): Rename to ...
10462 (gdb_write_memory): ... this. Use
10463 prepare_to_access_memory/prepare_to_access_memory.
10464 (handle_search_memory_1): Adjust.
10465 (process_serial_event): Adjust.
10466 * target.h (struct target_ops): New fields
10467 prepare_to_access_memory and unprepare_to_access_memory.
10468 (prepare_to_access_memory, unprepare_to_access_memory): New.
10469 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10470 prepare_to_access_memory/prepare_to_access_memory.
10471 * nto-low.c (nto_target_ops): Adjust.
10472 * spu-low.c (spu_target_ops): Adjust.
10473 * win32-low.c (win32_target_ops): Adjust.
10475 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10477 * Makefile.in (WARN_CFLAGS): Get it from configure.
10478 (WERROR_CFLAGS): New.
10479 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10480 * configure.ac: Introduce --enable-werror, which adds -Werror to
10481 the compiler command line. Enabled by default. Disable with
10482 --disable-werror. Add -Wdeclaration-after-statement
10483 Wpointer-arith and -Wformat-nonliteral to warning flags.
10484 * configure: Regenerate.
10486 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10488 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10490 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10492 * gdbreplay.c (remote_error): New.
10494 (expect): Use gdbchar. Check for error reading from GDB.
10495 Clarify sync error output.
10496 (play): Check for errors writing to GDB.
10497 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10498 * remote-utils.c (getpkt): Check for errors writing to the remote
10501 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10503 * linux-low.c (linux_wait_1): Move non-debugging code out of
10504 `debug_threads' control.
10506 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10508 * linux-low.c (linux_wait_1): Don't set last_status here.
10509 * server.c (push_event, queue_stop_reply_callback): Assert we're
10510 not pushing a TARGET_WAITKIND_IGNORE event.
10511 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10512 (myresume, handle_target_event): Set the thread's last_resume_kind
10513 and last_status from the target returned status.
10515 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10519 * linux-x86-low.c (update_debug_registers_callback): New.
10520 (i386_dr_low_set_addr): Use it.
10521 (i386_dr_low_get_addr): New.
10522 (i386_dr_low_set_control): Use update_debug_registers_callback.
10523 (i386_dr_low_get_control): New.
10524 (i386_dr_low_get_status): Adjust.
10525 * linux-low.c (linux_stop_lwp): New.
10526 * linux-low.h (linux_stop_lwp): Declare.
10528 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10529 argument instead of a i386_debug_reg_state.
10530 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10531 a i386_debug_reg_state.
10532 (i386_insert_aligned_watchpoint): Adjust.
10533 (i386_remove_aligned_watchpoint): Adjust.
10534 (i386_low_stopped_data_address): Read the debug registers from the
10535 inferior instead of from the mirrors.
10536 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10537 (i386_dr_low_get_addr): Declare.
10538 (i386_dr_low_get_control): Declare.
10539 (i386_dr_low_get_status): Change prototype.
10541 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10542 (i386_dr_low_get_addr): New.
10543 (i386_dr_low_get_control): New.
10544 (i386_dr_low_get_status): Adjust prototype. Return
10546 (i386_initial_stuff): Clear dr_status_mirror and
10548 (i386_get_thread_context): Adjust.
10549 (i386_set_thread_context): Adjust.
10550 (i386_thread_added): Adjust.
10552 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10554 * linux-low.h (linux_thread_area): Delete declaration.
10556 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10558 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10559 after its termination.
10561 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10563 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10564 (gdb_wants_all_stopped): Delete.
10565 (linux_wait_1): Don't call them.
10566 * server.c (handle_v_cont): Tag all threads as want-stopped.
10567 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10568 stopped as "client-wants-stopped".
10570 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10572 * Makefile.in (signals_h): New.
10573 (server_h): Depend on it.
10574 (server.o): Don't depend on $(signals_def).
10575 (signals.o): Depend on $(signals_def).
10577 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10579 * Makefile.in (signals_def): New.
10580 (server_h): Append include/gdb/signals.h and signals_def.
10581 (server.o): Append signals_def.
10583 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10585 * server.c (handle_target_event): Use target_signal_to_host for
10586 resume_info.sig initialization.
10587 * target.h (struct thread_resume) <sig>: New comment.
10589 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10591 * server.c (handle_query): strcpy() the returned string from paddress()
10592 instead of sprintf().
10593 * utils.c (paddress): Return phex_nz().
10595 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10597 * server.c (handle_v_cont): Call mourn_inferior if process
10599 (myresume): Likewise.
10601 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10603 Static tracepoints, and integration with UST.
10605 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10606 * mem-break.c (uninsert_all_breakpoints)
10607 (reinsert_all_breakpoints): New.
10608 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10609 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10610 (gdb_agent_ust_loaded, helper_thread_id)
10611 (gdb_agent_helper_thread_id): New macros.
10612 (struct ipa_sym_addresses): Add addr_ust_loaded,
10613 addr_helper_thread_id, addr_cmd_buf.
10614 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10615 (in_process_agent_loaded_ust): New.
10616 (write_e_ust_not_loaded): New.
10617 (maybe_write_ipa_ust_not_loaded): New.
10618 (struct collect_static_trace_data_action): New.
10619 (enum tracepoint_type) <static_tracepoint>: New.
10620 (struct tracepoint) <handle>: Mention static tracepoints.
10621 (struct static_tracepoint_ctx): New.
10622 (CMD_BUF_SIZE): New.
10623 (add_tracepoint_action): Handle static tracepoint actions.
10624 (unprobe_marker_at): New.
10625 (clear_installed_tracepoints): Handle static tracepoints.
10626 (cmd_qtdp): Handle static tracepoints.
10627 (probe_marker_at): New.
10628 (cmd_qtstart): Handle static tracepoints.
10629 (response_tracepoint): Handle static tracepoints.
10630 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10631 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10632 (get_context_regcache): Handle static tracepoints.
10633 (do_action_at_tracepoint): Handle static tracepoint actions.
10634 (traceframe_find_block_type): Handle static trace data blocks.
10635 (traceframe_read_sdata): New.
10636 (download_tracepoints): Download static tracepoint actions.
10637 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10638 (GDB_PROBE_NAME): New.
10640 (GET_UST_SYM): New.
10643 (ust_marker_to_static_tracepoint): New.
10645 (collect_ust_data_at_tracepoint): New.
10646 (gdb_ust_probe): New.
10647 (UNIX_PATH_MAX, SOCK_DIR): New.
10648 (gdb_ust_connect_sync_socket): New.
10649 (resume_thread, stop_thread): New.
10650 (run_inferior_command): New.
10651 (init_named_socket): New.
10652 (gdb_ust_socket_init): New.
10653 (cstr_to_hexstr): New.
10655 (first_marker, next_marker): New.
10656 (response_ust_marker): New.
10657 (cmd_qtfstm, cmd_qtsstm): New.
10658 (unprobe_marker_at, probe_marker_at): New.
10659 (cmd_qtstmat, gdb_ust_thread): New.
10660 (gdb_ust_init): New.
10661 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10662 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10663 (ST_REGENTRY): New.
10664 (x86_64_st_collect_regmap): New.
10665 (X86_64_NUM_ST_COLLECT_GREGS): New.
10666 (AMD64_RIP_REGNUM): New.
10667 (supply_static_tracepoint_registers): New.
10668 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10669 (ST_REGENTRY): New.
10670 (i386_st_collect_regmap): New.
10671 (i386_NUM_ST_COLLECT_GREGS): New.
10672 (supply_static_tracepoint_registers): New.
10673 * server.c (handle_query): Handle qXfer:statictrace:read.
10674 <qSupported>: Report support for StaticTracepoints, and
10675 qXfer:statictrace:read features.
10676 * server.h (traceframe_read_sdata)
10677 (supply_static_tracepoint_registers): Declare.
10678 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10679 (unpack_varlen_hex): Include in IPA build.
10680 * Makefile.in (ustlibs, ustinc): New.
10681 (IPA_OBJS): Add remote-utils-ipa.o.
10682 ($(IPA_LIB)): Link -ldl and -lpthread.
10684 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10685 * config.in, configure: Regenerate.
10687 2010-06-20 Ian Lance Taylor <iant@google.com>
10688 Pedro Alves <pedro@codesourcery.com>
10690 * linux-x86-low.c (always_true): Delete.
10691 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10692 trying to fool the compiler with always_true.
10694 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10696 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10697 conditions in gdbserver.
10699 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10701 * spu-low.c (spu_read_memory): Wrap around local store limit.
10702 (spu_write_memory): Likewise.
10704 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10706 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10707 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10709 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10711 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10712 uses with LONGEST uses.
10714 2010-06-14 Stan Shebs <stan@codesourcery.com>
10715 Pedro Alves <pedro@codesourcery.com>
10719 * linux-x86-low.c: Include limits.h.
10721 (always_true): New.
10724 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10725 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10726 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10727 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10728 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10729 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10730 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10731 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10732 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10733 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10734 (amd64_emit_void_call_2): New.
10735 (amd64_emit_ops): New.
10736 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10737 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10738 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10739 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10740 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10741 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10742 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10743 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10744 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10745 (i386_emit_stack_adjust, i386_emit_int_call_1)
10746 (i386_emit_void_call_2): New.
10747 (i386_emit_ops): New.
10748 (x86_emit_ops): New.
10749 (the_low_target): Install x86_emit_ops.
10750 * server.h (struct emit_ops): New.
10751 (get_raw_reg_func_addr): Declare.
10752 (current_insn_ptr, emit_error): Declare.
10753 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10754 (set_trace_state_variable_value): New defines.
10755 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10756 addr_get_trace_state_variable_value and
10757 addr_set_trace_state_variable_value.
10758 (symbol_list): New fields for get_raw_reg,
10759 get_trace_state_variable_value and set_trace_state_variable_value.
10760 (condfn): New typedef.
10761 (struct tracepoint): New field `compiled_cond'.
10762 (do_action_at_tracepoint): Clear compiled_cond.
10763 (get_trace_state_variable_value, set_trace_state_variable_value):
10765 (condition_true_at_tracepoint): If there's a compiled condition,
10767 (current_insn_ptr, emit_error): New globals.
10768 (struct bytecode_address): New.
10769 (get_raw_reg_func_addr): New.
10770 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10771 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10772 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10773 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10774 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10775 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10776 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10777 (compile_tracepoint_condition, compile_bytecodes): New.
10778 * target.h (emit_ops): Forward declare.
10779 (struct target_ops): New field emit_ops.
10780 (target_emit_ops): New.
10781 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10782 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10783 * linux-low.c (linux_emit_ops): New.
10784 (linux_target_ops): Install it.
10785 * linux-low.h (struct linux_target_ops): New field emit_ops.
10787 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10789 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10790 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10792 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10793 Stan Shebs <stan@codesourcery.com>
10795 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10796 (all): Depend on $(extra_libraries).
10797 (install-only): Install the IPA.
10798 (IPA_OBJS, IPA_LIB): New.
10799 (clean): Remove the IPA lib.
10800 (IPAGENT_CFLAGS): New.
10801 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10802 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10803 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10804 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10805 * configure.ac: Check for atomic builtins support in the compiler.
10806 (IPA_DEPFILES, extra_libraries): Define.
10807 * configure.srv (ipa_obj): Add description.
10808 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10809 (i[34567]86-*-linux*): Set ipa_obj.
10810 (x86_64-*-linux*): Set ipa_obj.
10811 * linux-low.c (stabilizing_threads): New.
10812 (supports_fast_tracepoints): New.
10813 (linux_detach): Stabilize threads before detaching.
10814 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10815 the lwp is either not stabilizing, or is moving out of a jump pad.
10816 (linux_fast_tracepoint_collecting): New.
10817 (maybe_move_out_of_jump_pad): New.
10818 (enqueue_one_deferred_signal): New.
10819 (dequeue_one_deferred_signal): New.
10820 (linux_wait_for_event_1): If moving out of a jump pad, defer
10821 pending signals to later.
10822 (linux_stabilize_threads): New.
10823 (linux_wait_1): Check if threads need moving out of jump pads, and
10825 (stuck_in_jump_pad_callback): New.
10826 (move_out_of_jump_pad_callback): New.
10827 (lwp_running): New.
10828 (linux_resume_one_lwp): Handle moving out of jump pads.
10829 (linux_set_resume_request): Dequeue deferred signals.
10830 (need_step_over_p): Also step over fast tracepoint jumps.
10831 (start_step_over): Also uninsert fast tracepoint jumps.
10832 (finish_step_over): Also reinsert fast tracepoint jumps.
10833 (linux_install_fast_tracepoint_jump): New.
10834 (linux_target_ops): Install linux_stabilize_threads and
10835 linux_install_fast_tracepoint_jump_pad.
10836 * linux-low.h (linux_target_ops) <get_thread_area,
10837 install_fast_tracepoint_jump_pad>: New fields.
10838 (struct lwp_info) <collecting_fast_tracepoint,
10839 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10840 (linux_get_thread_area): Declare.
10841 * linux-x86-low.c (jump_insn): New.
10842 (x86_get_thread_area): New.
10843 (append_insns): New.
10844 (push_opcode): New.
10845 (amd64_install_fast_tracepoint_jump_pad): New.
10846 (i386_install_fast_tracepoint_jump_pad): New.
10847 (x86_install_fast_tracepoint_jump_pad): New.
10848 (the_low_target): Install x86_get_thread_area and
10849 x86_install_fast_tracepoint_jump_pad.
10850 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10851 (struct fast_tracepoint_jump): New.
10852 (fast_tracepoint_jump_insn): New.
10853 (fast_tracepoint_jump_shadow): New.
10854 (find_fast_tracepoint_jump_at): New.
10855 (fast_tracepoint_jump_here): New.
10856 (delete_fast_tracepoint_jump): New.
10857 (set_fast_tracepoint_jump): New.
10858 (uninsert_fast_tracepoint_jumps_at): New.
10859 (reinsert_fast_tracepoint_jumps_at): New.
10860 (set_breakpoint_at): Use write_inferior_memory.
10861 (uninsert_raw_breakpoint): Use write_inferior_memory.
10862 (check_mem_read): Mask out fast tracepoint jumps.
10863 (check_mem_write): Mask out fast tracepoint jumps.
10864 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10865 (set_fast_tracepoint_jump): Declare.
10866 (delete_fast_tracepoint_jump)
10867 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10868 (reinsert_fast_tracepoint_jumps_at): Declare.
10869 * regcache.c: Don't compile many functions when building the
10870 in-process agent library.
10871 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10872 the register buffer in the heap.
10873 (free_register_cache): If the register buffer isn't owned by the
10874 regcache, don't free it.
10875 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10876 pre-existing register caches.
10877 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10879 (convert_ascii_to_int): : Constify `from' parameter type.
10880 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10881 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10882 the needed buffer in-place.
10883 (relocate_instruction): New.
10884 * server.c (handle_query) <qSymbols>: If the target supports
10885 tracepoints, give it a chance of looking up symbols. Report
10886 support for fast tracepoints.
10887 (handle_status): Stabilize threads.
10888 (process_serial_event): Adjust.
10889 * server.h (struct fast_tracepoint_jump): Forward declare.
10890 (struct process_info) <fast_tracepoint_jumps>: New field.
10891 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10892 (decode_X_packet, decode_M_packet): Adjust.
10893 (relocate_instruction): Declare.
10894 (in_process_agent_loaded): Declare.
10895 (tracepoint_look_up_symbols): Declare.
10896 (struct fast_tpoint_collect_status): Declare.
10897 (fast_tracepoint_collecting): Declare.
10898 (force_unlock_trace_buffer): Declare.
10899 (handle_tracepoint_bkpts): Declare.
10900 (initialize_low_tracepoint)
10901 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10902 * target.h (struct target_ops) <stabilize_threads,
10903 install_fast_tracepoint_jump_pad>: New fields.
10904 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10905 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10906 [HAVE_STDINT_H]: Include stdint.h.
10907 (trace_debug_1): Rename to ...
10908 (trace_vdebug): ... this.
10909 (trace_debug): Rename to ...
10910 (trace_debug_1): ... this. Add `level' parameter.
10911 (trace_debug): New.
10912 (ATTR_USED, ATTR_NOINLINE): New.
10913 (IP_AGENT_EXPORT): New.
10914 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10915 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10916 (about_to_request_buffer_space, trace_buffer_is_full)
10917 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10918 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10919 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10920 (traceframe_write_count, traceframes_created)
10921 (trace_state_variables)
10922 New renaming defines.
10923 (struct ipa_sym_addresses): New.
10924 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10925 (symbol_list): New.
10926 (ipa_sym_addrs): New.
10927 (all_tracepoint_symbols_looked_up): New.
10928 (in_process_agent_loaded): New.
10929 (write_e_ipa_not_loaded): New.
10930 (maybe_write_ipa_not_loaded): New.
10931 (tracepoint_look_up_symbols): New.
10932 (debug_threads) [IN_PROCESS_AGENT]: New.
10933 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10934 (UNKNOWN_SIDE_EFFECTS): New.
10935 (stop_tracing): New.
10936 (flush_trace_buffer): New.
10937 (stop_tracing_bkpt): New.
10938 (flush_trace_buffer_bkpt): New.
10939 (read_inferior_integer): New.
10940 (read_inferior_uinteger): New.
10941 (read_inferior_data_pointer): New.
10942 (write_inferior_data_pointer): New.
10943 (write_inferior_integer): New.
10944 (write_inferior_uinteger): New.
10945 (struct collect_static_trace_data_action): Delete.
10946 (enum tracepoint_type): New.
10947 (struct tracepoint) <type>: New field `type'.
10948 <actions_str, step_actions, step_actions_str>: Only include in
10950 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10951 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10952 (tracepoints): Use IP_AGENT_EXPORT.
10953 (last_tracepoint): Don't include in the IPA.
10954 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10955 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10956 (alloced_trace_state_variables): New.
10957 (trace_state_variables): Use IP_AGENT_EXPORT.
10958 (traceframe_t): Delete unused variable.
10959 (circular_trace_buffer): Don't include in the IPA.
10960 (trace_buffer_start): Delete.
10961 (struct trace_buffer_control): New.
10962 (trace_buffer_free): Delete.
10963 (struct ipa_trace_buffer_control): New.
10964 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10965 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10967 (trace_buffer_ctrl): New.
10968 (TRACE_BUFFER_CTRL_CURR): New.
10969 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10970 Reimplement as macros.
10971 (trace_buffer_wrap): Delete.
10972 (traceframe_write_count, traceframe_read_count)
10973 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10974 (struct tracepoint_hit_ctx) <type>: New field.
10975 (struct fast_tracepoint_ctx): New.
10976 (memory_barrier): New.
10978 (record_tracepoint_error): Update atomically in the IPA.
10979 (clear_inferior_trace_buffer): New.
10980 (about_to_request_buffer_space): New.
10981 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10982 updating the same buffer.
10983 (add_tracepoint): Default the tracepoint's type to trap
10984 tracepoint, and orig_size to -1.
10985 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10986 internal variables.
10987 (create_trace_state_variable): New parameter `gdb'. Handle it.
10988 (clear_installed_tracepoints): Clear fast tracepoint jumps.
10989 (cmd_qtdp): Handle fast tracepoints.
10990 (cmd_qtdv): Adjust.
10991 (max_jump_pad_size): New.
10992 (gdb_jump_pad_head): New.
10993 (get_jump_space_head): New.
10994 (claim_jump_space): New.
10995 (sort_tracepoints): New.
10996 (MAX_JUMP_SIZE): New.
10997 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
10999 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11000 support. Upload fast traceframes, and delete internal IPA
11002 (stop_tracing_handler): New.
11003 (flush_trace_buffer_handler): New.
11004 (cmd_qtstop): Upload fast tracepoints.
11005 (response_tracepoint): Handle fast tracepoints.
11006 (tracepoint_finished_step): Upload fast traceframes. Set the
11007 tracepoint hit context's tracepoint type.
11008 (handle_tracepoint_bkpts): New.
11009 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11010 type. Add comment about fast tracepoints.
11011 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11012 non-existing action_str field.
11013 (get_context_regcache): Handle fast tracepoints.
11014 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11016 (fast_tracepoint_from_jump_pad_address): New.
11017 (fast_tracepoint_from_ipa_tpoint_address): New.
11018 (collecting_t): New.
11019 (force_unlock_trace_buffer): New.
11020 (fast_tracepoint_collecting): New.
11022 (gdb_collect): New.
11023 (write_inferior_data_ptr): New.
11024 (target_tp_heap): New.
11025 (target_malloc): New.
11026 (download_agent_expr): New.
11028 (download_tracepoints): New.
11029 (download_trace_state_variables): New.
11030 (upload_fast_traceframes): New.
11031 (IPA_FIRST_TRACEFRAME): New.
11032 (IPA_NEXT_TRACEFRAME_1): New.
11033 (IPA_NEXT_TRACEFRAME): New.
11034 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11035 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11036 (gdb_jump_pad_buffer_end): New.
11037 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11038 (initialize_tracepoint): Adjust.
11039 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11040 buffer. Initialize the low module.
11041 * utils.c (PREFIX, TOOLNAME): New.
11042 (malloc_failure): Use PREFIX.
11043 (error): In the IPA, an error causes an exit.
11044 (fatal, warning): Use PREFIX.
11045 (internal_error): Use TOOLNAME.
11046 (NUMCELLS): Increase to 10.
11047 * configure, config.in: Regenerate.
11049 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11051 * server.c (handle_query) <qSupported>: Do two passes over the
11052 qSupported string to avoid nesting strtok.
11054 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11056 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11058 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11059 -Wl,--dynamic-list.
11060 * configure: Regenerate.
11061 * proc-service.list: New.
11063 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11065 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11068 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11070 * gdbreplay.c (remote_open): Check error return from socket() call by
11071 its equality to -1 not by it being negative.
11072 * remote-utils.c (remote_open): Likewise.
11074 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11076 * config.h: Regenerate.
11078 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11080 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11081 doesn't provide PTRACE_GET_THREAD_AREA.
11083 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11085 * linux-m68k-low.c: Include <asm/ptrace.h>
11086 (ps_get_thread_area): Implement.
11088 2010-05-03 Doug Evans <dje@google.com>
11090 * event-loop.c (struct callback_event): New struct.
11091 (callback_list): New global.
11092 (append_callback_event, delete_callback_event): New functions.
11093 (process_callback): New function.
11094 (start_event_loop): Call it.
11095 * remote-utils.c (NOT_SCHEDULED): Define.
11096 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11097 moved out of readchar.
11098 (readchar): Rewrite. Call reschedule before returning.
11099 (reset_readchar): New function.
11100 (remote_close): Call it.
11101 (process_remaining, reschedule): New functions.
11102 * server.h (callback_handler_func): New typedef.
11103 (append_callback_event, delete_callback_event): Declare.
11105 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11107 * proc-service.c (ps_pglobal_lookup): Use
11108 thread_db_look_up_one_symbol.
11109 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11110 parameter. Use it instead of all_symbols_looked_up.
11111 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11113 (all_symbols_looked_up): Don't declare.
11114 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11115 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11117 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11118 Set all_symbols_looked_up here.
11119 (thread_db_look_up_one_symbol): New.
11120 (thread_db_get_tls_address): Adjust.
11121 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11122 thread_db object on the heap, and tentatively set it in the
11124 (thread_db_init): Don't set all_symbols_looked_up here.
11125 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11127 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11129 * linux-low.c (linux_kill, linux_detach): Adjust.
11130 (status_pending_p_callback): Remove redundant statement. Check
11131 for !TARGET_WAITIKIND_IGNORE, instead of
11132 TARGET_WAITKIND_STOPPED.
11133 (handle_tracepoints): Make sure LWP is locked. Adjust.
11134 (linux_wait_for_event_1): Adjust.
11135 (linux_cancel_breakpoints): New.
11136 (unsuspend_one_lwp): New.
11137 (unsuspend_all_lwps): New.
11138 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11139 (send_sigstop_callback): Change return type to int, add new
11140 `except' parameter and handle it.
11141 (suspend_and_send_sigstop_callback): New.
11142 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11143 pass them down. If SUSPEND, also increment the lwp's suspend
11145 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11146 (need_step_over_p): Don't consider suspended LWPs.
11147 (start_step_over): Adjust.
11148 (proceed_one_lwp): Change return type to int, add new `except'
11149 parameter and handle it.
11150 (unsuspend_and_proceed_one_lwp): New.
11151 (proceed_all_lwps): Use find_inferior instead of
11153 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11154 also decrement the suspend count of LWPs. Pass `except' down,
11155 instead of hacking its suspend count.
11156 (linux_pause_all): Add `freeze' parameter. Adjust.
11157 (linux_unpause_all): New.
11158 (linux_target_ops): Install linux_unpause_all.
11159 * server.c (handle_status): Adjust.
11160 * target.h (struct target_ops): New fields `unpause_all' and
11161 `cancel_breakpoints'. Add new parameter to `pause_all'.
11162 (pause_all): Add new `freeze' parameter.
11163 (unpause_all): New.
11164 (cancel_breakpoints): New.
11165 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11166 cancel breakpoints.
11167 (cmd_qtstart): Pause threads.
11168 (stop_tracing): Pause threads, and cancel breakpoints.
11169 * win32-low.c (win32_target_ops): Adjust.
11171 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11173 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11174 the inferior right away from here...
11175 (linux_wait_1): ... to here, and adjust to check the thread's
11176 last_resume_kind instead of the lwp's step or stop_expected flags.
11178 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11180 * README: Use consistent `GDB' and `GDBserver' spellings.
11182 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11184 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11185 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11186 (linux_detach_one_lwp): Assume the lwp is stopped.
11187 (any_thread_of): Delete.
11188 (linux_detach): Stop all lwps here. Don't blindly delete all
11190 (delete_lwp_callback): New.
11191 (linux_mourn): Delete all lwps of the process that is gone.
11192 (linux_wait_1): Don't delete the last lwp of the process here.
11193 * mem-break.h (mark_breakpoints_out): Declare.
11194 * mem-break.c (mark_breakpoints_out): New.
11195 (free_all_breakpoints): Use it.
11196 * server.c (handle_target_event): If the process is gone, mark
11198 * thread-db.c (struct thread_db) <create_bp>: New field.
11199 (thread_db_enable_reporting): Fix prototype. Store a thread event
11200 breakpoint reference in the thread_db struct.
11201 (thread_db_load_search): Clear the thread_db object.
11202 (try_thread_db_load_1): Ditto.
11203 (switch_to_process): New.
11204 (disable_thread_event_reporting): Use it.
11205 (remove_thread_event_breakpoints): New.
11206 (thread_db_detach, thread_db_mourn): Use it.
11208 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11210 * linux-low.c (linux_enable_event_reporting): New.
11211 (linux_wait_for_event_1, handle_extended_wait): Use it.
11213 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11215 * linux-low.c (linux_kill_one_lwp, linux_kill)
11216 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11217 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11218 SIGSTOP even if the LWP is stopped.
11219 (send_sigstop_callback): New.
11220 (stop_all_lwps): Use send_sigstop_callback instead.
11221 (linux_resume_one_thread): Adjust.
11222 (proceed_one_lwp): Still proceed an LWP that the client has
11223 requested to stop, if we haven't reported it as stopped yet. Make
11224 sure that LWPs the client want stopped, have a pending SIGSTOP.
11226 2010-04-26 Doug Evans <dje@google.com>
11228 * server.c (handle_general_set): Make static.
11230 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11231 Print received char after testing for error/eof instead of before.
11232 (input_interrupt): Tweak comment.
11234 2010-04-23 Doug Evans <dje@google.com>
11236 * server.c (start_inferior): Print inferior argv if --debug.
11238 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11240 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11241 * nto-x86-low.c: Include server.h
11243 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11245 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11246 be consistent with other sources of this directory.
11247 (init_registers_amd64): Correct name of source file of this function
11250 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11252 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11253 64-bit executables.
11255 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11257 * win32-i386-low.c: Add 64-bit support.
11258 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11259 (init_registers_amd64): Declare.
11260 (mappings): Add 64-bit version of array.
11261 (init_windows_x86): New function.
11262 (the_low_target): Change init_arch field to init_windows_x86.
11264 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11266 * win32-low.c: Adapt to support also 64-bit architecture.
11267 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11268 (get_image_name): Use SIZE_T type for local variable `done'.
11269 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11270 (toolhelp_get_dll_name): Idem.
11271 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11272 Use uintptr_t typecast to avoid warning.
11273 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11274 (handle_exception): Use phex_nz to avoid warning.
11275 (win32_wait): Remove unused local variable `process'.
11277 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11279 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11282 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11284 * configure.ac: Use `ws2_32' library for srv_mingw.
11285 * configure: Regenerate.
11286 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11287 * remote-utils.c: Likewise.
11289 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11291 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11292 if __x86_64__ is defined.
11294 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11296 * configure: Regenerate.
11298 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11300 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11301 * target.h (target_ops): New get_tib_address field.
11302 * win32-low.h (win32_thread_info): Add thread_local_base field.
11303 * win32-low.c (child_add_thread): Add tlb argument.
11304 Set thread_local_base field to TLB.
11305 (get_child_debug_event): Adapt to child_add_thread change.
11306 (win32_get_tib_address): New function.
11307 (win32_target_ops): Set get_tib_address field to
11308 win32_get_tib_address.
11309 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11311 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11313 * linux-low.c (linux_mourn): Also remove the process.
11314 * server.c (handle_target_event): Don't remove the process here.
11315 * nto-low.c (nto_mourn): New.
11316 (nto_target_ops): Install it.
11317 * spu-low.c (spu_mourn): New.
11318 (spu_target_ops): Install it.
11319 * win32-low.c (win32_mourn): New.
11320 (win32_target_ops): Install it.
11322 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11324 * server.h (buffer_xml_printf): Remove redundant `;'.
11326 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11328 * regcache.c (set_register_cache): Invalidate regcaches before
11329 changing the register cache layout.
11330 (regcache_invalidate_one): Allow a NULL regcache.
11331 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11332 regcaches before changing the register cache layout or the target
11335 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11337 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11338 variable warning on Linux/x86-64.
11340 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11342 GDBserver disconnected tracing support.
11344 * linux-low.c (linux_remove_process): Delete.
11345 (add_lwp): Don't set last_resume_kind here.
11346 (linux_kill): Use `mourn'.
11347 (linux_detach): Use `thread_db_detach', and `mourn'.
11348 (linux_mourn): New.
11349 (linux_attach_lwp_1): Adjust comment.
11350 (linux_attach): last_resume_kind moved the thread_info; adjust.
11351 (status_pending_p_callback): Adjust.
11352 (linux_wait_for_event_1): Adjust.
11353 (count_events_callback, select_singlestep_lwp_callback)
11354 (select_event_lwp_callback, cancel_breakpoints_callback)
11355 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11356 (proceed_one_lwp): Adjust.
11357 (linux_async): Add debug output.
11358 (linux_thread_stopped): New.
11359 (linux_pause_all): New.
11360 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11362 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11363 (thread_db_free): Delete declaration.
11364 (thread_db_detach, thread_db_mourn): Declare.
11365 * thread-db.c (thread_db_init): Use thread_db_mourn.
11366 (thread_db_free): Delete, split in two.
11367 (disable_thread_event_reporting): New.
11368 (thread_db_detach): New.
11369 (thread_db_mourn): New.
11371 * server.h (struct thread_info) <last_resume_kind>: New field.
11372 <attached>: Add comment.
11373 <gdb_detached>: New field.
11374 (handler_func): Change return type to int.
11375 (handle_serial_event, handle_target_event): Ditto.
11376 (gdb_connected): Declare.
11378 (disconnected_tracing): Declare.
11379 (stop_tracing): Declare.
11381 * server.c (handle_query) <qSupported>: Report support for
11382 disconnected tracing.
11383 (queue_stop_reply_callback): Account for running threads.
11384 (gdb_wants_thread_stopped): New.
11385 (gdb_wants_all_threads_stopped): New.
11386 (gdb_reattached_process): New.
11387 (handle_status): Clear the `gdb_detached' flag of all processes.
11388 In all-stop, stop all threads.
11389 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11390 (process_serial_event): If the remote connection breaks, or if an
11391 exit was forced with "monitor exit", force an event loop exit.
11392 Handle disconnected tracing on detach.
11393 (handle_serial_event): Adjust.
11394 (handle_target_event): If GDB isn't connected, forward events back
11395 to the inferior, unless the last process exited, in which case,
11396 exit gdbserver. Adjust interface.
11398 * remote-utils.c (remote_open): Don't block in accept. Instead
11399 register an event loop source on the listen socket file
11400 descriptor. Refactor bits into ...
11401 (listen_desc): ... this new global.
11402 (gdb_connected): ... this new function.
11403 (enable_async_notification): ... this new function.
11404 (handle_accept_event): ... this new function.
11405 (remote_close): Clear remote_desc.
11407 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11409 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11411 (mourn_inferior): Define.
11412 (target_process_qsupported): Avoid the dangling else problem.
11413 (thread_stopped): Define.
11414 (pause_all): Define.
11415 (target_waitstatus_to_string): Declare.
11416 * target.c (target_waitstatus_to_string): New.
11418 * tracepoint.c (tracing): Make extern.
11419 (disconnected_tracing): New.
11420 (stop_tracing): Make extern. Handle tracing stops due to GDB
11422 (cmd_qtdisconnected): New.
11423 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11424 (handle_tracepoint_general_set): Handle QTDisconnected.
11426 * event-loop.c (event_handler_func): Change return type to int.
11427 (process_event): Bail out if the event handler wants the event
11429 (handle_file_event): Ditto.
11430 (start_event_loop): Bail out if the event handler wants the event
11433 * nto-low.c (nto_target_ops): Adjust.
11434 * spu-low.c (spu_wait): Don't remove the process here.
11435 (spu_target_ops): Adjust.
11436 * win32-low.c (win32_wait): Don't remove the process here.
11437 (win32_target_ops): Adjust.
11439 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11441 * regcache.c (realloc_register_cache): Invalidate inferior's
11442 regcache before recreating it.
11444 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11446 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11448 2010-04-09 Stan Shebs <stan@codesourcery.com>
11449 Pedro Alves <pedro@codesourcery.com>
11451 * server.h (LONGEST): New.
11452 (struct thread_info) <while_stepping>: New field.
11453 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11455 (initialize_tracepoint, handle_tracepoint_general_set)
11456 (handle_tracepoint_query, tracepoint_finished_step)
11457 (tracepoint_was_hit, release_while_stepping_state_list):
11458 (current_traceframe): Declare.
11459 * server.c (handle_general_set): Handle tracepoint packets.
11460 (read_memory): New.
11461 (write_memory): New.
11462 (handle_search_memory_1): Use read_memory.
11463 (handle_query): Report support for conditional tracepoints, trace
11464 state variables, and tracepoint sources. Handle tracepoint
11466 (main): Initialize the tracepoints module.
11467 (process_serial_event): Handle traceframe reads/writes.
11469 * linux-low.c (handle_tracepoints): New.
11470 (linux_wait_1): Call it.
11471 (linux_resume_one_lwp): Handle while-stepping.
11472 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11473 (linux_target_ops): Install them.
11474 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11476 * linux-x86-low.c (x86_supports_tracepoints): New.
11477 (the_low_target). Install it.
11479 * mem-break.h (delete_breakpoint): Declare.
11480 * mem-break.c (delete_breakpoint): Make external.
11482 * target.h (struct target_ops): Add `supports_tracepoints',
11483 `read_pc', and `write_pc' fields.
11484 (target_supports_tracepoints): Define.
11485 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11488 * regcache.h (struct regcache) <registers_owned>: New field.
11489 (init_register_cache, regcache_cpy): Declare.
11490 (regcache_read_pc, regcache_write_pc): Declare.
11491 (register_cache_size): Declare.
11492 (supply_regblock): Declare.
11493 * regcache.c (init_register_cache): New.
11494 (new_register_cache): Use it.
11495 (regcache_cpy): New.
11496 (register_cache_size): New.
11497 (supply_regblock): New.
11498 (regcache_read_pc, regcache_write_pc): New.
11500 * tracepoint.c: New.
11502 * Makefile.in (OBS): Add tracepoint.o.
11503 (tracepoint.o): New rule.
11505 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11507 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11509 (i386-mmx.c): Likewise.
11510 (i386-mmx-linux.o): Likewise.
11511 (i386-mmx-linux.c): Likewise.
11513 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11514 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11515 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11516 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11518 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11519 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11520 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11522 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11524 * Makefile.in (clean): Updated.
11526 (i386-avx.c): Likewise.
11527 (i386-avx-linux.o): Likewise.
11528 (i386-avx-linux.c): Likewise.
11529 (amd64-avx.o): Likewise.
11530 (amd64-avx.c): Likewise.
11531 (amd64-avx-linux.o): Likewise.
11532 (amd64-avx-linux.c): Likewise.
11534 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11535 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11536 (srv_amd64_regobj): Add amd64-avx.o.
11537 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11538 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11539 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11540 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11541 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11542 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11543 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11545 * i387-fp.c: Include "i386-xstate.h".
11547 (i387_cache_to_xsave): Likewise.
11548 (i387_xsave_to_cache): Likewise.
11549 (x86_xcr0): Likewise.
11551 * i387-fp.h (i387_cache_to_xsave): Likewise.
11552 (i387_xsave_to_cache): Likewise.
11553 (x86_xcr0): Likewise.
11555 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11556 * linux-crisv32-low.c (target_regsets): Likewise.
11557 * linux-m68k-low.c (target_regsets): Likewise.
11558 * linux-mips-low.c (target_regsets): Likewise.
11559 * linux-ppc-low.c (target_regsets): Likewise.
11560 * linux-s390-low.c (target_regsets): Likewise.
11561 * linux-sh-low.c (target_regsets): Likewise.
11562 * linux-sparc-low.c (target_regsets): Likewise.
11563 * linux-xtensa-low.c (target_regsets): Likewise.
11565 * linux-low.c: Include <sys/uio.h>.
11566 (regsets_fetch_inferior_registers): Support nt_type.
11567 (regsets_store_inferior_registers): Likewise.
11568 (linux_process_qsupported): New.
11569 (linux_target_ops): Add linux_process_qsupported.
11571 * linux-low.h (regset_info): Add nt_type.
11572 (linux_target_ops): Add process_qsupported.
11574 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11576 (init_registers_i386_avx_linux): New.
11577 (init_registers_amd64_avx_linux): Likewise.
11578 (xmltarget_i386_linux_no_xml): Likewise.
11579 (xmltarget_amd64_linux_no_xml): Likewise.
11580 (PTRACE_GETREGSET): Likewise.
11581 (PTRACE_SETREGSET): Likewise.
11582 (x86_fill_xstateregset): Likewise.
11583 (x86_store_xstateregset): Likewise.
11584 (use_xml): Likewise.
11585 (x86_linux_update_xmltarget): Likewise.
11586 (x86_linux_process_qsupported): Likewise.
11587 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11588 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11589 init_registers_i386_linux here. Call
11590 x86_linux_update_xmltarget.
11591 (the_low_target): Add x86_linux_process_qsupported.
11593 * server.c (handle_query): Call target_process_qsupported.
11595 * target.h (target_ops): Add process_qsupported.
11596 (target_process_qsupported): New.
11598 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11600 * inferiors.c (add_thread): Set last_status kind to
11601 TARGET_WAITKIND_IGNORE.
11602 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11603 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11604 (linux_wait_1): Move `thread' local definition to block that uses
11605 it. Don't NULL initialize `event_child'.
11606 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11607 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11608 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11610 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11612 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11613 an extended waitstatus, or by a watchpoint.
11614 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11615 thread was stepping or has been stopped by a watchpoint.
11617 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11619 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11620 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11621 of another, then delete the previous, and validate all
11623 (validate_inserted_breakpoint): New.
11624 (delete_disabled_breakpoints): New.
11625 (validate_breakpoints): New.
11626 (check_mem_read): Validate breakpoints before trusting their
11627 shadow. Delete disabled breakpoints.
11628 (check_mem_write): Validate breakpoints before trusting they
11629 should be inserted. Delete disabled breakpoints.
11630 * mem-break.h (validate_breakpoints):
11631 * server.c (handle_query): Validate breakpoints when we see a
11634 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11636 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11637 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11638 if we could tell there's a GDB breakpoint at stop_pc.
11639 (need_step_over_p): Don't do a step over if we find a GDB
11640 breakpoint at the resume PC.
11642 * mem-break.c (struct raw_breakpoint): New.
11643 (enum bkpt_type): New type `gdb_breakpoint'.
11644 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11645 fields. New field `raw'.
11646 (find_raw_breakpoint_at): New.
11647 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11648 breakpoint instead.
11649 (set_breakpoint_at): Adjust.
11650 (delete_raw_breakpoint): New.
11651 (release_breakpoint): New.
11652 (delete_breakpoint): Rename to...
11653 (delete_breakpoint_1): ... this. Add proc parameter. Use
11654 release_breakpoint. Return ENOENT.
11655 (delete_breakpoint): Reimplement.
11656 (find_breakpoint_at): Delete.
11657 (find_gdb_breakpoint_at): New.
11658 (delete_breakpoint_at): Delete.
11659 (set_gdb_breakpoint_at): New.
11660 (delete_gdb_breakpoint_at): New.
11661 (gdb_breakpoint_here): New.
11662 (set_reinsert_breakpoint): Use release_breakpoint.
11663 (uninsert_breakpoint): Rename to ...
11664 (uninsert_raw_breakpoint): ... this.
11665 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11666 (reinsert_raw_breakpoint): Change parameter type to
11668 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11670 (check_breakpoints): Adjust. Use release_breakpoint.
11671 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11672 (breakpoint_inserted_here): Ditto.
11673 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11674 Don't trust the breakpoint's shadow if it is not inserted.
11675 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11676 (delete_all_breakpoints): Adjust.
11677 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11678 use delete_breakpoint_1.
11680 * mem-break.h (breakpoints_supported): Delete declaration.
11681 (set_gdb_breakpoint_at): Declare.
11682 (gdb_breakpoint_here): Declare.
11683 (delete_breakpoint_at): Delete.
11684 (delete_gdb_breakpoint_at): Declare.
11686 * server.h (struct raw_breakpoint): Forward declare.
11687 (struct process_info): New field `raw_breakpoints'.
11689 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11692 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11694 * linux-low.c (status_pending_p_callback): Fix comment.
11695 (linux_wait_for_event_1): Move most of the internal breakpoint
11696 handling from here...
11697 (linux_wait_1): ... to here.
11698 (count_events_callback): New.
11699 (select_singlestep_lwp_callback): New.
11700 (select_event_lwp_callback): New.
11701 (cancel_breakpoints_callback): New.
11702 (select_event_lwp): New.
11703 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11704 priority to all LWPs that have had events that should be reported
11705 to the client. Cancel breakpoints when about to reporting the
11706 event to the client, not while stopping lwps. No longer cancel
11707 finished single-steps here.
11708 (cancel_finished_single_step): Delete.
11709 (cancel_finished_single_steps): Delete.
11711 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11713 * mem-break.c (enum bkpt_type): New.
11714 (struct breakpoint): New field `type'.
11715 (set_breakpoint_at): Change return type to struct breakpoint
11716 pointer. Set type to `other_breakpoint' by default.
11717 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11718 in the breakpoint list.
11719 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11720 (reinsert_breakpoint): Rename to ...
11721 (reinsert_raw_breakpoint): ... this.
11722 (reinsert_breakpoints_at): Adjust.
11723 * mem-break.h (struct breakpoint): Declare.
11724 (set_breakpoint_at): Change return type to struct breakpoint
11727 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11729 * server.c (handle_query): Assign, not compare.
11731 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11733 Teach linux gdbserver to step-over-breakpoints.
11735 * linux-low.c (can_hardware_single_step): New.
11736 (supports_breakpoints): New.
11737 (handle_extended_wait): If stopping threads, read the stop pc of
11738 the new cloned LWP.
11740 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11741 low target doesn't support retrieving the PC.
11742 (add_lwp): Set last_resume_kind to resume_continue.
11743 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11744 (linux_attach): Don't clear stop_expected. Set the lwp's
11745 last_resume_kind to resume_stop.
11746 (linux_detach_one_lwp): Don't check for removed breakpoints.
11747 (check_removed_breakpoint): Delete.
11748 (status_pending_p): Rename to ...
11749 (status_pending_p_callback): ... this. Don't check for removed
11750 breakpoints. Don't consider threads that are stopped from GDB's
11752 (linux_wait_for_lwp): Always read the stop_pc here.
11753 (cancel_breakpoint): New.
11754 (step_over_bkpt): New global.
11755 (linux_wait_for_event_1): Implement stepping over breakpoints.
11756 (gdb_wants_lwp_stopped): New.
11757 (gdb_wants_all_stopped): New.
11758 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11759 single-step traps here. Store the thread's last reported target
11761 (send_sigstop): Don't clear stop_expected. Always set it,
11763 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11764 (cancel_finished_single_step): New.
11765 (cancel_finished_single_steps): New.
11766 (wait_for_sigstop): Don't cancel finished single-step traps here.
11767 (linux_resume_one_lwp): Don't check for removed breakpoints.
11768 Don't set `step' on non-hardware step archs.
11769 (linux_set_resume_request): Ignore resume_stop requests if already
11770 stopping or stopped. Set the lwp's last_resume_kind.
11771 (resume_status_pending_p): Don't check for removed breakpoints.
11772 (need_step_over_p): New.
11773 (start_step_over): New.
11774 (finish_step_over): New.
11775 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11776 requests. Clear the thread's last reported target waitstatus.
11777 Don't use the `suspended' flag. Don't consider pending breakpoints.
11778 (linux_resume): Start a step-over if necessary.
11779 (proceed_one_lwp): New.
11780 (proceed_all_lwps): New.
11781 (unstop_all_lwps): New.
11782 * linux-low.h (struct lwp_info): Rewrite comment for the
11783 `suspended' flag. Add the `stop_pc' field. Delete the
11784 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11785 Add `'last_resume_kind' and `need_step_over' fields.
11786 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11787 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11788 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11789 (set_raw_breakpoint_at): New.
11790 (set_breakpoint_at): Rewrite to use it.
11791 (reinsert_breakpoint_handler): Delete.
11792 (set_reinsert_breakpoint): New.
11793 (reinsert_breakpoint_by_bp): Delete.
11794 (delete_reinsert_breakpoints): New.
11795 (uninsert_breakpoint): Rewrite.
11796 (uninsert_breakpoints_at): New.
11797 (reinsert_breakpoint): Rewrite.
11798 (reinsert_breakpoints_at): New.
11799 (check_breakpoints): Rewrite.
11800 (breakpoint_here): New.
11801 (breakpoint_inserted_here): New.
11802 (check_mem_read): Adjust.
11803 * mem-break.h (breakpoints_supported, breakpoint_here)
11804 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11805 (reinsert_breakpoint_by_bp): Delete declaration.
11806 (delete_reinsert_breakpoints): Declare.
11807 (reinsert_breakpoint): Delete declaration.
11808 (reinsert_breakpoints_at): Declare.
11809 (uninsert_breakpoint): Delete declaration.
11810 (uninsert_breakpoints_at): Declare.
11811 (check_breakpoints): Adjust prototype.
11812 * server.h: Adjust include order.
11813 (struct thread_info): Declare here. Add a `last_status' field.
11815 2010-03-23 Michael Snyder <msnyder@vmware.com>
11817 * server.c (crc32): New function.
11818 (handle_query): Add handling for 'qCRC:' request.
11820 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11822 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11823 lwp had been stopped by a watchpoint.
11825 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11827 * server.h (internal_error): Declare.
11828 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11829 * utils.c (internal_error): New function.
11831 2010-03-15 Andreas Schwab <schwab@redhat.com>
11833 * configure.srv: Fix typo setting srv_regobj.
11835 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11837 * linux-low.c (fetch_register): Avoid passing a non string literal
11839 (usr_store_inferior_registers): Ditto.
11841 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11843 * linux-low.c (linux_write_memory): Bail out early if peeking
11846 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11848 * linux-low.h (struct lwp_info): New fields
11849 `stopped_by_watchpoint' and `stopped_data_address'.
11850 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11851 here, and cache them in the lwp object.
11852 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11854 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11856 (linux_stopped_by_watchpoint): Rewrite.
11857 (linux_stopped_data_address): Rewrite.
11859 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11861 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11862 switching the current inferior, not before.
11864 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11866 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11867 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11868 i386-linux.c and amd64-linux.c.
11869 (reg-i386.o): Removed.
11870 (reg-i386.c): Likewise.
11871 (reg-i386-linux.o): Likewise.
11872 (reg-i386-linux.c): Likewise.
11873 (reg-x86-64.o): Likewise.
11874 (reg-x86-64.c): Likewise.
11875 (reg-x86-64-linux.o): Likewise.
11876 (reg-x86-64-linux.c): Likewise.
11878 (i386.c): Likewise.
11879 (i386-linux.o): Likewise.
11880 (i386-linux.c): Likewise.
11881 (amd64.o): Likewise.
11882 (amd64.c): Likewise.
11883 (amd64-linux.o): Likewise.
11884 (amd64-linux.c): Likewise.
11886 * configure.srv (srv_i386_regobj): New.
11887 (srv_i386_linux_regobj): Likewise.
11888 (srv_amd64_regobj): Likewise.
11889 (srv_amd64_linux_regobj): Likewise.
11890 (srv_i386_32bit_xmlfiles): Likewise.
11891 (srv_i386_64bit_xmlfiles): Likewise.
11892 (srv_i386_xmlfiles): Likewise.
11893 (srv_amd64_xmlfiles): Likewise.
11894 (srv_i386_linux_xmlfiles): Likewise.
11895 (srv_amd64_linux_xmlfiles): Likewise.
11896 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11897 srv_xmlfiles to $srv_i386_xmlfiles.
11898 (i[34567]86-*-mingw32ce*): Likewise.
11899 (i[34567]86-*-mingw*): Likewise.
11900 (i[34567]86-*-nto*): Likewise.
11901 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11902 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11903 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11904 (x86_64-*-linux*): Likewise.
11906 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11907 (init_registers_amd64_linux): New.
11908 (x86_arch_setup): Replace init_registers_x86_64_linux with
11909 init_registers_amd64_linux.
11911 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11913 * configure.ac: Check for libdl. If it is not available link against
11914 static libthread_db.
11915 * configure: Regenerate.
11917 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11921 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11922 handing a read watchpoint.
11923 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11925 2010-02-12 Doug Evans <dje@google.com>
11927 * linux-low.c (linux_supports_tracefork_flag): Document.
11928 (linux_look_up_symbols): Add comment.
11930 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11932 * regcache.c (supply_register): Clear regcache if buf is NULL.
11934 2010-02-02 Nicolas Roche <roche@sourceware.org>
11935 Joel Brobecker <brobecker@adacore.com>
11937 * inferiors.c (find_inferior): Add function documentation.
11938 (unloaded_dll): Handle the case where the unloaded dll has not
11939 been previously registered in the dll list.
11941 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11943 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11944 (thumb2_breakpoint): New.
11945 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11947 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11949 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11950 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11953 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11955 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11957 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11959 * linux-s390-low.c (s390_collect_ptrace_register)
11960 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11962 2010-01-21 Doug Evans <dje@google.com>
11964 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11965 (PTRACE_ARG4_TYPE): New macro.
11966 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11967 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11968 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11969 (usr_store_inferior_registers): Ditto.
11970 (linux_read_memory, linux_write_memory): Ditto.
11971 (linux_test_for_tracefork): Ditto.
11973 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11974 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11976 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11978 * proc-service.c (ps_lgetregs): Don't refetch registers from the
11981 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11983 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11984 prototype to take a regcache. Adjust.
11986 2010-01-20 Pedro Alves <pedro@codesourcery.com>
11988 * regcache.h (struct thread_info): Forward declare.
11989 (struct regcache): New.
11990 (new_register_cache): Adjust prototype.
11991 (get_thread_regcache): Declare.
11992 (free_register_cache): Adjust prototype.
11993 (registers_to_string, registers_from_string): Ditto.
11994 (supply_register, supply_register_by_name, collect_register)
11995 (collect_register_as_string, collect_register_by_name): Ditto.
11996 * regcache.c (struct inferior_regcache_data): Delete.
11997 (get_regcache): Rename to ...
11998 (get_thread_regcache): ... this. Adjust. Switch inferior before
11999 fetching registers.
12000 (regcache_invalidate_one): Adjust.
12001 (regcache_invalidate): Fix prototype.
12002 (new_register_cache): Return the new register cache.
12003 (free_register_cache): Change prototype.
12004 (realloc_register_cache): Adjust.
12005 (registers_to_string): Change prototype to take a regcache. Adjust.
12006 (registers_from_string): Ditto.
12007 (register_data): Ditto.
12008 (supply_register): Ditto.
12009 (supply_register_by_name): Ditto.
12010 (collect_register): Ditto.
12011 (collect_register_as_string): Ditto.
12012 (collect_register_by_name): Ditto.
12013 * server.c (process_serial_event): Adjust.
12014 * linux-low.h (regset_fill_func, regset_store_func): Change
12016 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12018 * linux-low.c (get_stop_pc): Adjust.
12019 (check_removed_breakpoint): Adjust.
12020 (linux_wait_for_event): Adjust.
12021 (linux_resume_one_lwp): Adjust.
12022 (fetch_register): Add regcache parameter. Adjust.
12023 (usr_store_inferior_registers): Ditto.
12024 (regsets_fetch_inferior_registers): Ditto.
12025 (regsets_store_inferior_registers): Ditto.
12026 (linux_fetch_registers, linux_store_registers): Ditto.
12027 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12029 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12031 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12032 prototype to take a regcache.
12033 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12034 * remote-utils.c (convert_ascii_to_int, outreg)
12035 (prepare_resume_reply): Change prototype to take a regcache.
12037 * target.h (struct target_ops) <fetch_registers, store_registers>:
12038 Change prototype to take a regcache.
12039 (fetch_inferior_registers, store_inferior_registers): Change
12040 prototype to take a regcache. Adjust.
12041 * proc-service.c (ps_lgetregs): Adjust.
12042 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12043 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12044 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12045 take a regcache. Adjust.
12046 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12047 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12048 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12049 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12050 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12051 (cris_cannot_fetch_register):
12052 (cris_breakpoint_at): Change prototype to take a regcache.
12054 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12055 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12056 to take a regcache. Adjust.
12057 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12059 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12060 take a regcache. Adjust.
12061 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12062 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12063 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12064 * linux-mips-low.c (mips_get_pc):
12065 (mips_set_pc): Change prototype to take a regcache. Adjust.
12066 (mips_reinsert_addr): Adjust.
12067 (mips_collect_register): Change prototype to take a regcache.
12069 (mips_supply_register):
12070 (mips_collect_register_32bit, mips_supply_register_32bit)
12071 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12072 (mips_store_fpregset): Ditto.
12073 * linux-ppc-low.c (ppc_supply_ptrace_register)
12074 (ppc_supply_ptrace_register): Ditto.
12075 (parse_spufs_run): Adjust.
12076 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12077 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12078 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12079 take a regcache. Adjust.
12080 * linux-s390-low.c (s390_collect_ptrace_register)
12081 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12082 (s390_set_pc): Change prototype to take a regcache. Adjust.
12083 (s390_arch_setup): Adjust.
12084 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12085 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12086 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12087 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12088 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12090 (sparc_breakpoint_at): Adjust.
12091 * linux-xtensa-low.c (xtensa_fill_gregset):
12092 (xtensa_store_gregset):
12093 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12094 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12095 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12096 prototype to take a regcache. Adjust.
12097 * win32-arm-low.c (arm_fetch_inferior_register)
12098 (arm_store_inferior_register): Change prototype to take a
12100 * win32-i386-low.c (i386_fetch_inferior_register)
12101 (i386_store_inferior_register): Change prototype to take a
12103 * win32-low.c (child_fetch_inferior_registers)
12104 (child_store_inferior_registers): Change prototype to take a
12106 (win32_wait): Adjust.
12107 (win32_fetch_inferior_registers): Change prototype to take a
12109 (win32_store_inferior_registers): Adjust.
12110 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12111 store_inferior_register>: Change prototype to take a regcache.
12113 2010-01-20 Doug Evans <dje@google.com>
12115 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12117 (linux_wait_for_event1, linux_init_signals): Ditto.
12118 (W_STOPCODE): Provide definition if missing.
12120 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12122 * linux-low.c (linux_core_of_thread): New.
12123 (compare_ints, show_process, list_threads): New.
12124 (linux_qxfer_osdata): Report threads and cores.
12125 (linux_target_op): Register linux_core_of_thread.
12126 * remote-utils.c (prepare_resume_reply): Report the core.
12127 (buffer_xml_printf): Support %d specifier.
12128 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12130 (handle_query): Handle qXfer:threads. Announce availability
12132 * target.h (struct target_ops): New field core_of_thread.
12134 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12136 * Makefile.in (clean): Remove new generated files.
12137 (reg-s390.o, reg-s390.c): Remove rules.
12138 (reg-s390x.o, reg-s390x.c): Likewise.
12139 (s390-linux32.o, s390-linux32.c): Add rules.
12140 (s390-linux64.o, s390-linux64.c): Likewise.
12141 (s390x-linux64.o, s390x-linux64.c): Likewise.
12142 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12143 * linux-s390-low.c: Include <elf.h>.
12144 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12145 (init_registers_s390): Remove prototype.
12146 (init_registers_s390x): Likewise.
12147 (init_registers_s390_linux32): Add prototype.
12148 (init_registers_s390_linux64): Likewise.
12149 (init_registers_s390x_linux64): Likewise.
12150 (s390_num_regs_3264): New define.
12151 (s390_regmap_3264): New global variable.
12152 (s390_cannot_fetch_register): Remove obsolete check.
12153 (s390_cannot_store_register): Likewise.
12154 (s390_collect_ptrace_register): Handle upper/lower register halves.
12155 (s390_supply_ptrace_register): Likewise.
12156 (s390_fill_gregset): Update to register number changes.
12157 (s390_get_hwcap): New routine.
12158 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12159 Install appropriate regmap and register set.
12161 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12163 * server.c (gdbserver_version): Update copyright year to 2010.
12164 * gdbreplay.c (gdbreplay_version): Likewise.
12166 2009-12-28 Doug Evans <dje@google.com>
12168 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12169 elf/external.h. Include <elf.h> instead but only if necessary.
12171 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12173 * linux-low.c (linux_remove_process): Remove `detaching'
12174 parameter. Don't release/detach from thread_db here.
12175 (linux_kill): Release/detach from thread_db here, ...
12176 (linux_detach): ... and here, before actually detaching.
12177 (linux_wait_1): ... and here, when a process exits.
12178 * thread-db.c (any_thread_of): New.
12179 (thread_db_free): Switch the current inferior to a thread of the
12182 2009-12-21 Doug Evans <dje@google.com>
12184 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12186 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12187 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12188 warning ifndef __NR_tkill. Move setting of errno there too.
12189 Delete unnecessary resetting of errno after syscall.
12190 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12192 * configure.ac: Check for dladdr.
12193 * config.in: Regenerate.
12194 * configure: Regenerate.
12195 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12196 (try_thread_db_load): Update.
12198 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12200 2009-12-18 Doug Evans <dje@google.com>
12202 * event-loop.c: Include unistd.h if it exists.
12204 * linux-low.c (my_waitpid): Move definition away from being in
12205 between linux_tracefork_child/linux_test_for_tracefork.
12207 * gdb_proc_service.h (psaddr_t): Fix type.
12208 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12209 signature to match glibc.
12211 2009-12-16 Doug Evans <dje@google.com>
12213 * linux-low.c (linux_read_memory): Fix argument to read.
12215 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12217 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12218 events, don't leave current_inferior pointing at null.
12220 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12222 * win32-low.c (LOG): Delete.
12223 (OUTMSG): Output to stderr.
12224 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12225 on compile time LOG macro.
12226 (win32_wait): Fix debug output.
12228 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12230 * win32-low.c (win32_add_one_solib): If the dll name is
12231 "ntdll.dll", prepend the system directory to the dll path.
12233 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12235 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12237 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12238 Vladimir Prus <vladimir@codesourcery.com>
12240 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12241 * configure.ac: Check for __mcoldfire__ and set
12242 gdb_cv_m68k_is_coldfire.
12243 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12244 reg-cf.o and reg-m68k.o.
12245 * configure: Regenerated.
12247 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12249 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12250 Pass it to thread_db_free.
12251 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12252 proper `detaching' argument to linux_remove_process.
12253 * linux-low.h (thread_db_free): Add `detaching' parameter.
12254 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12256 (thread_db_free): Add `detaching' parameter. Only
12257 call td_ta_clear_event if detaching from process.
12259 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12261 * thread-db.c (thread_db_free): Fix typo.
12263 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12266 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12268 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12270 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12271 with an i686 compiler.
12272 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12274 * configure: Rebuilt.
12276 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12280 * server.c (handle_search_memory_1): Correct read_addr initialization
12281 in loop for searching subsequent chunks.
12283 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12285 * configure.ac: New --with-libthread-db option.
12286 * thread-db.c: Allow direct dependence on libthread_db.
12287 (thread_db_free): Adjust.
12288 * config.in: Regenerate.
12289 * configure: Likewise.
12291 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12294 * thread-db.c (attach_thread): New function.
12295 (maybe_attach_thread): Return success/failure.
12296 (find_new_threads_callback): Adjust.
12297 (thread_db_find_new_threads): Loop until no new threads.
12299 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12301 * proc-service.c (ps_lgetregs): Formatting.
12303 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12305 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12306 * configure.ac: Adjust.
12307 * linux-low.h (struct process_info_private): Move members to struct
12309 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12310 * linux-low.c (linux_remove_process): Adjust.
12311 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12312 * server.c (handle_query): Move code ...
12313 (handle_monitor_command): ... here. New function.
12314 * target.h (struct target_ops): New member.
12315 * thread-db.c (struct thread_db): New.
12316 (libthread_db_search_path): New variable.
12317 (thread_db_create_event, thread_db_enable_reporting)
12318 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12319 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12320 (try_thread_db_load_1, dladdr_to_soname): New functions.
12321 (try_thread_db_load, thread_db_load_search): New functions.
12322 (thread_db_init): Search for libthread_db.
12323 (thread_db_free): New function.
12324 (thread_db_handle_monitor_command): Likewise.
12325 * config.in: Regenerate.
12326 * configure: Regenerate.
12328 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12330 * spu-low.c (spu_kill): Wait for inferior to terminate.
12331 Call clear_inferiors.
12332 (spu_detach): Call clear_inferiors.
12334 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12336 * aclocal.m4: Regenerate.
12337 * config.in: Likewise.
12338 * configure: Likewise.
12340 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12342 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12343 (parse_spufs_run): New function.
12344 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12345 (ppc_breakpoint_at): Handle SPU breakpoints.
12347 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12349 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12350 (SPUFS_MAGIC): Define.
12351 (spu_enumerate_spu_ids): New function.
12352 (linux_qxfer_spu): New function.
12353 (linux_target_ops): Install linux_qxfer_spu.
12355 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12357 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12358 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12359 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12360 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12361 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12362 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12363 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12364 (init_registers_powerpc_cell32l): Add prototype.
12365 (init_registers_powerpc_cell64l): Likewise.
12366 (ppc_arch_setup): Detect Cell/B.E. architecture.
12368 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12370 * Makefile.in (datarootdir): New variable.
12372 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12374 * linux-low.c (linux_write_memory): Update debugging output.
12375 * Makefile.in (clean): Add new descriptions.
12376 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12377 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12378 * configure.srv: Add new files for arm*-*-linux*.
12379 * linux-arm-low.c: Add new declarations.
12380 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12381 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12382 (HWCAP_VFPv3D16): New.
12383 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12384 instead of __IWMMXT__.
12385 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12386 (arm_arch_setup): New.
12387 (target_regsets): Remove #ifdef. Add VFP regset.
12388 (the_low_target): Use arm_arch_setup.
12390 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12392 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12393 the main thread again.
12395 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12397 Adding Neutrino gdbserver.
12398 * configure: Regenerated.
12399 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12400 * configure.srv (i[34567]86-*-nto*): New target.
12401 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12402 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12403 (nto_comctrl) [__QNX__]: New function.
12404 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12406 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12408 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12411 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12412 Pedro Alves <pedro@codesourcery.com>
12414 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12415 don't support CONTEXT_EXTENDED_REGISTERS.
12416 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12417 (the_low_target): Install them.
12418 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12419 failing with ERROR_PIPE_NOT_CONNECTED.
12421 2009-06-30 Doug Evans <dje@google.com>
12422 Pierre Muller <muller@ics.u-strasbg.fr>
12424 Add h/w watchpoint support to x86-linux, win32-i386.
12425 * Makefile.in (SFILES): Add i386-low.c
12426 (i386_low_h): Define.
12427 (i386-low.o): Add dependencies.
12428 (linux-x86-low.o): Add i386-low.h dependency.
12429 (win32-i386-low.o): Ditto.
12430 * i386-low.c: New file.
12431 * i386-low.h: New file.
12432 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12433 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12434 * linux-low.c (linux_add_process): Initialize arch_private.
12435 (linux_remove_process): Free arch_private.
12436 (add_lwp): Initialize arch_private.
12437 (delete_lwp): Free arch_private.
12438 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12440 * linux-low.h (process_info_private): New member arch_private.
12441 (lwp_info): New member arch_private.
12442 (linux_target_ops): New members new_process, new_thread,
12444 (ptid_of): New macro.
12445 * linux-x86-low.c: Include stddef.h, i386-low.h.
12446 (arch_process_info): New struct.
12447 (arch_lwp_info): New struct.
12448 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12449 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12450 (i386_dr_low_get_status): New function.
12451 (x86_insert_point, x86_remove_point): New functions.
12452 (x86_stopped_by_watchpoint): New function.
12453 (x86_stopped_data_address): New function.
12454 (x86_linux_new_process, x86_linux_new_thread): New functions.
12455 (x86_linux_prepare_to_resume): New function.
12456 (the_low_target): Add entries for insert_point, remove_point,
12457 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12459 * server.c (debug_hw_points): New global.
12460 (monitor_show_help): Document set debug-hw-points.
12461 (handle_query): Process "set debug-hw-points".
12462 * server.h (debug_hw_points): Declare.
12463 (paddress): Declare.
12464 * utils.c (NUMCELLS, CELLSIZE): New macros.
12465 (get_sell, xsnprintf, paddress): New functions.
12466 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12467 remove_point, stopped_by_watchpoint, stopped_data_address.
12468 * win32-i386-low.c: Include i386-low.h.
12469 (debug_reg_state): Replaces dr.
12470 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12471 (i386_dr_low_get_status): New function.
12472 (i386_insert_point, i386_remove_point): New functions.
12473 (i386_stopped_by_watchpoint): New function.
12474 (i386_stopped_data_address): New function.
12475 (i386_initial_stuff): Update.
12476 (get_thread_context,set_thread_context,i386_thread_added): Update.
12477 (the_low_target): Add entries for insert_point,
12478 remove_point, stopped_by_watchpoint, stopped_data_address.
12479 * win32-low.c (win32_insert_watchpoint): New function.
12480 (win32_remove_watchpoint): New function.
12481 (win32_stopped_by_watchpoint): New function.
12482 (win32_stopped_data_address): New function.
12483 (win32_target_ops): Add entries for insert_watchpoint,
12484 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12485 * win32-low.h (win32_target_ops): New members insert_point,
12486 remove_point, stopped_by_watchpoint, stopped_data_address.
12488 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12490 * server.c (process_serial_event): Re-return unsupported, not
12491 error, if the type isn't recognized. Re-allow supporting only
12492 insert or remove packets. Also call require_running for
12493 breakpoints. Add missing break statement to default case. Tidy.
12494 * target.h (struct target_ops): Rename insert_watchpoint to
12495 insert_point, and remove_watchpoint to remove_point.
12497 * linux-low.h (struct linux_target_ops): Likewise.
12498 * linux-low.c (linux_insert_watchpoint): Rename to ...
12499 (linux_insert_point): ... this. Adjust.
12500 (linux_remove_watchpoint): Rename to ...
12501 (linux_remove_point): ... this. Adjust.
12502 (linux_target_ops): Adjust.
12503 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12504 (cris_insert_point): ... this.
12505 (cris_remove_watchpoint): Rename to ...
12506 (cris_remove_point): ... this.
12507 (the_low_target): Adjust.
12509 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12511 * server.c (handle_v_kill): Pass signal_pid to
12512 kill_inferior if multi_process is zero.
12514 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12516 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12517 * target.h (target_ops): Comment for *_watchpoint to make it clear
12518 the functions can get types '0' and '1'.
12520 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12522 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12523 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12524 * regcache.c (get_regcache): Likewise.
12525 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12526 * win32-low.c (child_fetch_inferior_registers): Remove check for
12529 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12530 Pedro Alves <pedro@codesourcery.com>
12532 * target.h (struct target_ops) <supports_multi_process>: New
12534 (target_supports_multi_process): New.
12535 * server.c (handle_query): Even if GDB reports support, only
12536 enable multi-process if the target also supports it. Report
12537 multi-process support only if the target backend supports it.
12538 * linux-low.c (linux_supports_multi_process): New function.
12539 (linux_target_ops): Install it as target_supports_multi_process
12542 2009-05-24 Doug Evans <dje@google.com>
12544 Global renaming of find_thread_pid to find_thread_ptid.
12545 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12546 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12547 All callers updated.
12549 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12550 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12553 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12554 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12555 (linux_resume_one_lwp): Ditto.
12557 2009-05-23 Doug Evans <dje@google.com>
12559 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12560 from struct inferior_list_entry * to struct lwp_info *.
12561 All callers updated.
12563 2009-05-13 Doug Evans <dje@google.com>
12565 * linux-x86-low.c: Don't include assert.h.
12566 (x86_siginfo_fixup): Use fatal, not assert.
12567 (x86_arch_setup): Fix comment.
12569 2009-05-12 Doug Evans <dje@google.com>
12571 Biarch support for i386/amd64 gdbserver.
12572 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12573 Add linux-x86-low.c.
12574 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12575 (linux-x86-low.o): Add.
12576 * linux-x86-64-low.c: Delete.
12577 * linux-i386-low.c: Delete.
12578 * linux-x86-low.c: New file.
12579 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12581 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12583 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12584 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12585 (linux_child_pid_to_exec_file): New function.
12586 (elf_64_header_p, elf_64_file_p): New functions.
12587 (siginfo_fixup): New function.
12588 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12589 give target a chance to convert layout.
12590 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12591 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12593 2009-05-07 Doug Evans <dje@google.com>
12595 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12596 (regsets_store_inferior_registers): Ditto.
12598 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12602 * linux-low.c (must_set_ptrace_flags): Delete.
12603 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12605 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12606 `lwp->must_set_ptrace_flags' instead.
12607 (linux_wait_for_event_1): Set ptrace options here.
12608 (linux_wait_1): ... not here.
12610 2009-04-30 Doug Evans <dje@google.com>
12612 * inferiors.c (started_inferior_callback): New function.
12613 (attached_inferior_callback): New function.
12614 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12615 * server.c (print_started_pid, print_attached_pid): New functions.
12616 (detach_or_kill_for_exit): New function.
12617 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12618 * server.h (have_started_inferiors_p): Declare.
12619 (have_attached_inferiors_p): Declare.
12621 * inferiors.c (remove_process): Fix memory leak, free process.
12622 * linux-low.c (linux_remove_process): New function.
12623 (linux_kill): Call it instead of remove_process.
12624 (linux_detach, linux_wait_1): Ditto.
12626 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12628 * configure.srv: Add x86 Windows CE target.
12630 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12632 * inferiors.c (get_thread_process): Make global.
12633 * server.h (get_thread_process): Add prototype.
12634 * thread-db.c (find_one_thread): Use get_thread_process
12635 instead of current_process.
12636 (thread_db_get_tls_address): Do not crash if called when
12637 thread layer is not yet initialized.
12639 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12641 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12642 * spu-low.c (current_tid): Rename to ...
12643 (current_ptid): ... this.
12644 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12645 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12646 ptid_get_lwp (current_ptid) instead of current_tid.
12647 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12648 instead of current_tid. Use find_process_pid to verify pid
12649 argument is valid. Pass proper argument to remove_process.
12650 (spu_thread_alive): Compare current_ptid instead of current_tid.
12651 (spu_resume): Likewise.
12653 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12655 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12658 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12660 Implement the multiprocess extensions, and add linux multiprocess
12663 * server.h (ULONGEST): Declare.
12664 (struct ptid, ptid_t): New.
12665 (minus_one_ptid, null_ptid): Declare.
12666 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12667 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12668 (struct inferior_list_entry): Change `id' type from unsigned from
12670 (struct sym_cache, struct breakpoint, struct
12671 process_info_private): Forward declare.
12672 (struct process_info): Declare.
12673 (current_process): Declare.
12674 (all_processes): Declare.
12675 (initialize_inferiors): Declare.
12676 (add_thread): Adjust to use ptid_t.
12677 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12678 (add_process, remove_process, find_thread_pid): Declare.
12679 (find_inferior_id): Adjust to use ptid_t.
12680 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12681 (multi_process): Declare.
12682 (push_event): Adjust to use ptid_t.
12683 (read_ptid, write_ptid): Declare.
12684 (prepare_resume_reply): Adjust to use ptid_t.
12685 (clear_symbol_cache): Declare.
12686 * inferiors.c (all_processes): New.
12687 (null_ptid, minus_one_ptid): New.
12688 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12689 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12690 (add_thread): Change unsigned long to ptid. Remove gdb_id
12692 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12693 (gdb_id_to_thread): Rename to ...
12694 (find_thread_pid): ... this. Change unsigned long to ptid.
12695 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12696 (loaded_dll, pull_pid_from_list): Adjust.
12697 (add_process, remove_process, find_process_pid)
12698 (get_thread_process, current_process, initialize_inferiors): New.
12699 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12700 (struct target_waitstatus) <related_pid>: Ditto.
12701 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12702 return type to int.
12703 (struct target_ops) <join>: Add `pid' argument.
12704 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12705 (struct target_ops) <wait>: Add `ptid' field. Change return type
12707 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12708 (mywait): Add `ptid' argument. Change return type to ptid_t.
12709 (target_pid_to_str): Declare.
12710 * target.c (set_desired_inferior): Adjust to use ptids.
12711 (mywait): Add new `ptid' argument. Adjust.
12712 (target_pid_to_str): New.
12713 * mem-break.h (free_all_breakpoints): Declare.
12714 * mem-break.c (breakpoints): Delelete.
12715 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12716 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12717 to use per-process breakpoint list.
12718 (free_all_breakpoints): New.
12719 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12720 (symbol_cache, all_symbols_looked_up): Delete.
12722 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12724 (prepare_resume_reply): Change ptid argument's type from unsigned
12725 long to ptid_t. Adjust. Implement W;process and X;process.
12726 (free_sym_cache, clear_symbol_cache): New.
12727 (look_up_one_symbol): Adjust to per-process symbol cache. *
12728 * server.c (cont_thread, general_thread, step_thread): Change type
12730 (attached): Delete.
12731 (multi_process): New.
12732 (last_ptid): Change type to ptid_t.
12733 (struct vstop_notif) <ptid>: Change type to ptid_t.
12734 (queue_stop_reply, push_event): Change `ptid' argument's type to
12736 (discard_queued_stop_replies): Add `pid' argument.
12737 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12738 changes. Don't reference the `attached' global.
12739 (attach_inferior): Adjust to mywait interface changes.
12740 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12741 features. Handle and report "multiprocess+". Handle
12743 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12745 (handle_v_kill): New.
12746 (handle_v_stopped): Adjust to use target_pid_to_str.
12747 (handle_v_requests): Allow multiple attaches and runs when
12748 multiprocess extensions are in effect. Handle "vKill".
12749 (myresume): Adjust to use ptids.
12750 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12751 (handle_status): Adjust to discard_queued_stop_replies interface
12753 (first_thread_of, kill_inferior_callback)
12754 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12755 (main): Call initialize_inferiors. Adjust to use ptids, killing
12756 and detaching from all inferiors. Handle multiprocess packet
12758 * linux-low.h: Include gdb_proc_service.h.
12759 (struct process_info_private): New.
12760 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12761 <lwpid_of>: Use ptid_get_lwp.
12762 (get_lwp_thread): Adjust.
12763 (struct lwp_info): Add `dead' member.
12764 (find_lwp_pid): Declare.
12765 * linux-low.c (thread_db_active): Delete.
12766 (new_inferior): Adjust comment.
12767 (inferior_pid): Delete.
12768 (linux_add_process): New.
12769 (handle_extended_wait): Adjust.
12770 (add_lwp): Change unsigned long to ptid.
12771 (linux_create_inferior): Add process to processes table. Adjust
12772 to use ptids. Don't set new_inferior here.
12773 (linux_attach_lwp): Rename to ...
12774 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12775 it. Adjust to use ptids.
12776 (linux_attach_lwp): New.
12777 (linux_attach): Add process to processes table. Don't set
12779 (struct counter): New.
12780 (second_thread_of_pid_p, last_thread_of_process_p): New.
12781 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12782 multiple processes.
12783 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12784 processes. Remove process from process table.
12785 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12786 to multiple processes.
12787 (any_thread_of): New.
12788 (linux_detach): Add `pid' argument, and handle it. Remove process
12789 from processes table.
12790 (linux_join): Add `pid' argument. Handle it.
12791 (linux_thread_alive): Change unsighed long argument to ptid_t.
12792 Consider dead lwps as not being alive.
12793 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12794 threads we're not interested in.
12795 (same_lwp, find_lwp_pid): New.
12796 (linux_wait_for_lwp): Change `pid' argument's type from int to
12798 (linux_wait_for_event): Rename to ...
12799 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12800 from int to ptid_t. Adjust.
12801 (linux_wait_for_event): New.
12802 (linux_wait_1): Add `ptid' argument. Change return type to
12803 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12804 that exit from the process table.
12805 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12807 (mark_lwp_dead): New.
12808 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12809 stopping all threads, mark its main lwp as dead.
12810 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12812 (fetch_register, usr_store_inferior_registers)
12813 (regsets_fetch_inferior_registers)
12814 (regsets_store_inferior_registers, linux_read_memory)
12815 (linux_write_memory): Inline `inferior_pid'.
12816 (linux_look_up_symbols): Adjust to use per-process
12817 `thread_db_active'.
12818 (linux_request_interrupt): Adjust to use ptids.
12819 (linux_read_auxv): Inline `inferior_pid'.
12820 (initialize_low): Don't reference thread_db_active.
12821 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12822 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12823 (ps_getpid): Return the pid of the current inferior.
12824 * thread-db.c (proc_handle, thread_agent): Delete.
12825 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12827 (find_one_thread): Change argument type to ptid_t. Adjust to
12829 (maybe_attach_thread): Adjust to per-process data and ptids.
12830 (thread_db_find_new_threads): Ditto.
12831 (thread_db_init): Ditto.
12832 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12833 processes table. Adjust to use ptids.
12834 (spu_kill, spu_detach): Adjust interface. Remove process from
12836 (spu_join, spu_thread_alive): Adjust interface.
12837 (spu_wait): Adjust interface. Remove process from processes
12838 table. Adjust to use ptids.
12839 * win32-low.c (current_inferior_tid): Delete.
12840 (current_inferior_ptid): New.
12841 (debug_event_ptid): New.
12842 (thread_rec): Take a ptid. Adjust.
12843 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12844 (child_delete_thread): Ditto.
12845 (do_initial_child_stuff): Add `attached' argument. Add process to
12847 (child_fetch_inferior_registers, child_store_inferior_registers):
12849 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12850 (win32_attach): Pass 1 to do_initial_child_stuff.
12851 (win32_kill): Adjust interface. Remove process from processes
12853 (win32_detach): Ditto.
12854 (win32_join): Adjust interface.
12855 (win32_thread_alive): Take a ptid.
12856 (win32_resume): Adjust to use ptids.
12857 (get_child_debug_event): Ditto.
12858 (win32_wait): Adjust interface. Remove exiting process from
12861 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12863 Non-stop mode support.
12865 * server.h (non_stop): Declare.
12866 (gdb_client_data, handler_func): Declare.
12867 (delete_file_handler, add_file_handler, start_event_loop):
12869 (handle_serial_event, handle_target_event, push_event)
12870 (putpkt_notif): Declare.
12871 * target.h (enum resume_kind): New.
12872 (struct thread_resume): Replace `step' field by `kind' field.
12873 (TARGET_WNOHANG): Define.
12874 (struct target_ops) <wait>: Add `options' argument.
12875 <supports_non_stop, async, start_non_stop>: New fields.
12876 (target_supports_non_stop, target_async): New.
12877 (start_non_stop): Declare.
12878 (mywait): Add `options' argument.
12879 * target.c (mywait): Add `options' argument. Print child exit
12880 notifications here.
12881 (start_non_stop): New.
12882 * server.c (non_stop, own_buf, mem_buf): New globals.
12883 (struct vstop_notif): New.
12884 (notif_queue): New global.
12885 (queue_stop_reply, push_event, discard_queued_stop_replies)
12886 (send_next_stop_reply): New.
12887 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12889 (attach_inferior): In non-stop mode, don't wait for the target
12891 (handle_general_set): Handle QNonStop.
12892 (handle_query): When handling qC, return the current general
12893 thread, instead of the first thread of the list.
12894 (handle_query): If the backend supports non-stop mode, include
12895 QNonStop+ in the qSupported query response.
12896 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12898 (handle_v_attach, handle_v_run): Handle non-stop mode.
12899 (handle_v_stopped): New.
12900 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12901 (myresume): Adjust to use resume_kind. Handle non-stop.
12902 (queue_stop_reply_callback): New.
12903 (handle_status): Handle non-stop mode.
12904 (main): Clear non_stop flag on reconnection. Use the event-loop.
12905 Refactor serial protocol handling from here ...
12906 (process_serial_event): ... to this new function. When GDB
12907 selects any thread, select one here. In non-stop mode, wait until
12908 GDB acks all pending events before exiting.
12909 (handle_serial_event, handle_target_event): New.
12910 * remote-utils.c (remote_open): Install remote_desc in the event
12912 (remote_close): Remove remote_desc from the event loop.
12913 (putpkt_binary): Rename to...
12914 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12915 (putpkt_binary): New as wrapper around putpkt_binary_1.
12916 (putpkt_notif): New.
12917 (prepare_resume_reply): In non-stop mode, don't change the
12919 * event-loop.c: New.
12920 * Makefile.in (OBJ): Add event-loop.o.
12921 (event-loop.o): New rule.
12923 * linux-low.h (pid_of): Moved here.
12925 (get_lwp_thread): Use lwpid_of.
12926 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12927 * linux-low.c (pid_of): Delete.
12928 (inferior_pid): Use lwpid_of.
12929 (linux_event_pipe): New.
12930 (target_is_async_p): New.
12932 (handle_extended_wait): Use lwpid_of.
12933 (add_lwp): Don't set lwpid field.
12934 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12935 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12936 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12937 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12938 first. Adjust to linux_wait_for_event interface changes. Use
12940 (linux_detach): Don't delete the main lwp here.
12941 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12942 (status_pending_p): Don't consider explicitly suspended lwps.
12943 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12944 pointer. Add OPTIONS argument. Change return type to int. Use
12945 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12946 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12947 pointer. Add status pointer argument. Return a pid instead of a
12948 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12949 changes. In non-stop mode, don't switch to a random thread.
12950 (linux_wait): Rename to...
12951 (linux_wait_1): ... this. Add target_options argument, and handle
12952 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12953 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12954 clean exit and signal exit code. Don't stop all threads in
12955 non-stop mode. In all-stop mode, only stop all threads when
12956 reporting a stop to GDB. Handle explicit thread stop requests.
12957 (async_file_flush, async_file_mark): New.
12959 (send_sigstop): Use lwpid_of.
12960 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12961 interface changes. In non-stop mode, don't switch to a random
12963 (linux_resume_one_lwp): Use lwpid_of.
12964 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12965 (linux_resume_one_thread): ... this. Handle resume_stop. In
12966 non-stop mode, don't look for pending flag in all threads.
12967 (resume_status_pending_p): Don't consider explicitly suspended
12969 (my_waitpid): Reimplement. Emulate __WALL.
12970 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12972 (sigchld_handler, linux_supports_non_stop, linux_async)
12973 (linux_start_non_stop): New.
12974 (linux_target_ops): Register linux_supports_non_stop, linux_async
12975 and linux_start_non_stop.
12976 (initialize_low): Install SIGCHLD handler.
12977 * thread-db.c (thread_db_create_event, find_one_thread)
12978 (thread_db_get_tls_address): Use lwpid_of.
12979 * win32-low.c (win32_detach): Adjust to use resume_kind.
12980 (win32_wait): Add `options' argument.
12981 * spu-low.c (spu_resume): Adjust to use resume_kind.
12982 (spu_wait): Add `options' argument.
12984 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12986 Decouple target code from remote protocol.
12988 * target.h (enum target_waitkind): New.
12989 (struct target_waitstatus): New.
12990 (struct target_ops) <wait>: Return an unsigned long. Take a
12991 target_waitstatus pointer instead of a char pointer.
12992 (mywait): Likewise.
12993 * target.c (mywait): Change prototype to return an unsigned long.
12994 Take a target_waitstatus pointer instead of a char pointer. Adjust.
12995 * server.h (thread_from_wait, old_thread_from_wait): Delete
12997 (prepare_resume_reply): Change prototype to take a
12999 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13000 (last_status, last_ptid): New.
13001 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13002 pid instead of a signal.
13003 (attach_inferior): Remove "status" and "signal" parameters.
13005 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13007 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13008 (handle_v_requests, myresume): Remove "status" and "signal"
13009 parameters. Adjust.
13010 (handle_status): New.
13011 (main): Delete local `status'. Adjust.
13012 * remote-utils.c: Include target.h.
13013 (prepare_resume_reply): Change prototype to take a
13014 target_waitstatus. Adjust.
13016 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13018 * spu-low.c (spu_wait): Adjust.
13019 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13021 (win32_wait): Adjust.
13023 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13025 * target.h (struct thread_resume): Delete leave_stopped member.
13026 (struct target_ops): Add a `n' argument to the `resume' callback.
13027 * server.c (start_inferior): Adjust.
13028 (handle_v_cont, myresume): Adjust.
13029 * linux-low.c (check_removed_breakpoint): Adjust to resume
13030 interface change, and to removed leave_stopped field.
13031 (resume_ptr): Delete.
13032 (struct thread_resume_array): New.
13033 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13034 resume interface change.
13035 (linux_continue_one_thread, linux_queue_one_thread)
13036 (resume_status_pending_p): Check if the resume field is NULL
13037 instead of checking the leave_stopped member.
13038 (linux_resume): Adjust to the target resume interface change.
13039 * spu-low.c (spu_resume): Adjust to the target resume interface
13041 * win32-low.c (win32_detach, win32_resume): Ditto.
13043 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13045 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13047 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13049 (linux_continue_one_thread): Only preserve the stepping flag if
13050 there's a pending breakpoint.
13052 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13054 * server.c (main): After the inferior having exited, call
13055 remote_close before exiting gdbserver.
13057 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13059 Fix size of FPSCR in Power 7 processors.
13060 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13061 (PPC_FEATURE_HAS_DFP): New #define.
13062 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13065 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13067 * server.c (handle_query) Whitespace and formatting.
13069 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13071 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13072 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13073 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13074 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13075 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13076 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13077 Makefile.in, configure.ac: Fix whitespace throughout.
13078 * configure: Regenerate.
13080 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13082 * inferiors.c (find_inferior): Make it safe for the callback
13083 function to delete the currently iterated inferior.
13085 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13087 * Makefile.in (linuw_low_h): Move higher.
13088 (thread-db.o): Depend on $(linux_low_h).
13090 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13092 Rename "process" to "lwp" throughout.
13094 * linux-low.c (all_processes): Rename to...
13095 (all_lwps): ... this.
13096 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13097 (add_process): Rename to ...
13098 (add_lwp): ... this. Adjust.
13099 (linux_create_inferior): Adjust.
13100 (linux_attach_lwp): Adjust.
13101 (linux_attach): Adjust.
13102 (linux_kill_one_process): Rename to ...
13103 (linux_kill_one_lwp): ... this. Adjust.
13104 (linux_kill): Adjust.
13105 (linux_detach_one_process): Rename to ...
13106 (linux_detach_one_lwp): ... this. Adjust.
13107 (linux_detach): Adjust.
13108 (check_removed_breakpoint): Adjust.
13109 (status_pending_p): Adjust.
13110 (linux_wait_for_process): Rename to ...
13111 (linux_wait_for_lwp): ... this. Adjust.
13112 (linux_wait_for_event): Adjust.
13113 (send_sigstop): Adjust.
13114 (wait_for_sigstop): Adjust.
13115 (stop_all_processes): Rename to ...
13116 (stop_all_lwps): ... this.
13117 (linux_resume_one_process): Rename to ...
13118 (linux_resume_one_lwp): ... this. Adjust.
13119 (linux_set_resume_request, linux_continue_one_thread)
13120 (linux_queue_one_thread, resume_status_pending_p)
13121 (usr_store_inferior_registers, regsets_store_inferior_registers)
13122 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13124 * linux-low.h (get_process): Rename to ...
13125 (get_lwp): ... this. Adjust.
13126 (get_thread_process): Rename to ...
13127 (get_thread_lwp): ... this. Adjust.
13128 (get_process_thread): Rename to ...
13129 (get_lwp_thread): ... this. Adjust.
13130 (struct process_info): Rename to ...
13131 (struct lwp_info): ... this.
13132 (all_processes): Rename to ...
13133 (all_lwps): ... this.
13134 * proc-service.c (ps_lgetregs): Adjust.
13135 * thread-db.c (thread_db_create_event, find_one_thread)
13136 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13138 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13140 * server.c (handle_query): Handle "qAttached".
13142 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13144 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13145 GPLv3, update license URL.
13147 2009-03-01 Doug Evans <dje@google.com>
13149 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13150 (server_h): Add gdb_signals.h.
13151 (signals.o): Update.
13152 * server.h (target_signal_from_host,target_signal_to_host_p)
13153 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13155 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13157 * remote-utils.c (getpkt): Also generate remote-debug
13158 information if noack_mode is set.
13160 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13162 * server.c (handle_query): Report qXfer:siginfo:read and
13163 qXfer:siginfo:write as supported and handle them.
13164 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13165 * linux-low.c (linux_xfer_siginfo): New.
13166 (linux_target_ops): Set it.
13168 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13170 * server.c (gdbserver_usage): Mention --remote-debug.
13171 (main): Accept '--remote-debug' switch.
13173 2009-01-18 Doug Evans <dje@google.com>
13175 * regcache.c (new_register_cache): No need to check result of xcalloc.
13176 * server.c (handle_search_memory): Back out calls to xmalloc,
13177 result is checked and error is returned to user upon failure.
13178 (handle_query): Ditto. Add more checks for result of malloc.
13179 (handle_v_cont): Check result of malloc, report error back to
13181 (handle_v_run): Ditto. Call freeargv.
13182 * server.h (freeargv): Declare.
13183 * utils.c (freeargv): New fn.
13185 2009-01-15 Doug Evans <dje@google.com>
13187 * gdbreplay.c (perror_with_name): Make arg const char *.
13188 * server.h (target_signal_to_name): Make return type const char *.
13189 * thread-db.c (thread_db_err_str): Make return type const char *.
13190 * utils.c (perror_with_name): Make arg const char *.
13192 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13194 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13195 when handling a EXIT_PROCESS_DEBUG_EVENT.
13197 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13199 * gdbreplay.c (gdbreplay_version): Update copyright year.
13200 * server.c (gdbserver_version): Likewise.
13202 2009-01-05 Doug Evans <dje@google.com>
13204 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13205 (handle_extended_wait): Improve comment.
13207 2008-12-13 Doug Evans <dje@google.com>
13209 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13210 * server.h (ATTR_MALLOC): New macro.
13211 (xmalloc,xcalloc,xstrdup): Declare.
13212 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13213 * inferiors.c: Ditto.
13214 * linux-low.c: Ditto.
13215 * mem-break.c: Ditto.
13216 * regcache.c: Ditto.
13217 * remote-utils.c: Ditto.
13220 * win32-low.c: Ditto.
13222 2008-12-12 Doug Evans <dje@google.com>
13224 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13225 in debugging printf.
13227 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13229 2008-12-09 Doug Evans <dje@google.com>
13231 * linux-low.h (struct process_info): Delete member tid, unused.
13232 * thread-db.c (find_one_thread): Update.
13233 (maybe_attach_thread): Update.
13235 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13237 * target.h (struct target_ops): Add qxfer_osdata member.
13238 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13240 (linux_qxfer_osdata): New functions.
13241 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13243 * server.c (handle_query): Handle "qXfer:osdata:read:".
13244 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13245 (buffer_xml_printf): New functions.
13246 * server.h (struct buffer): New.
13247 (buffer_grow_str, buffer_grow_str0): New macros.
13248 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13249 (buffer_xml_printf): Declare.
13251 2008-11-24 Doug Evans <dje@google.com>
13253 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13255 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13257 * server.c (handle_v_run): Always use the supplied argument list.
13259 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13261 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13262 (xtensa_regmap_table): Add entry for scompare1.
13264 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13266 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13267 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13268 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13269 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13270 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13271 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13272 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13273 XML target descriptions.
13274 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13275 when inferior is running on an ISA 2.05 or later processor. Add
13276 special case to return offset for full 64-bit slot of FPSCR when
13279 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13281 * Makefile.in (SFILES, clean): Added sparc64 files.
13282 (reg-sparc64.o, reg-sparc64.c): New.
13283 * configure.srv (sparc*-*-linux*): New configuration.
13284 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13285 syscall arguments for SPARC.
13286 (regsets_store_inferior_registers): Likewise.
13287 * linux-sparc-low.c: New file.
13289 2008-10-21 Doug Evans <dje@google.com>
13291 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13292 (READLINE_DIR,READLINE_DEP): Delete.
13293 (INTERNAL_CFLAGS): Update.
13294 (LINTFLAGS): Update.
13296 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13298 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13299 whole argv from the last run, not just argv[0].
13301 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13303 * regcache.c (new_register_cache): Return NULL if the register
13304 cache size isn't known yet.
13305 (free_register_cache): Avoid dereferencing a NULL regcache.
13307 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13309 * configure.srv: Merge MIPS and MIPS64.
13311 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13313 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13315 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13317 * Makefile.in: Add required vsx dependencies.
13319 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13320 Declare init_registers_powerpc_vsx32l.
13321 Declare init_registers_powerpc_vsx64l.
13322 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13323 (ppc_arch_setup): Check for VSX in hwcap.
13324 (ppc_fill_vsxregset): New function.
13325 (ppc_store_vsxregset): New function.
13326 Add new VSX entry in regset_info target_regsets.
13328 * configure.srv: Add new VSX dependencies.
13330 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13332 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13333 (remote_open): Set or clear transport_is_reliable.
13334 (putpkt_binary): Don't expect acks in noack mode.
13335 (getpkt): Don't send ack/nac in noack mode.
13336 * server.c (handle_general_set): Handle QStartNoAckMode.
13337 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13339 (main): Reset noack_mode on every connection.
13340 * server.h (noack_mode): Declare.
13342 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13344 * Makefile.in (GDBREPLAY_OBS): New variable.
13345 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13347 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13348 Daniel Jacobowitz <dan@codesourcery.com>
13350 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13351 (usr_store_inferior_registers): Likewise.
13352 (regsets_store_inferior_registers): Likewise.
13354 2008-07-31 Rolf Jansen <rj@surtec.com>
13355 Pedro Alves <pedro@codesourcery.com>
13357 * configure.ac: Check for memmem declaration.
13358 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13359 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13360 (disable_packet_qfThreadInfo): Unconditionally compile.
13361 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13362 * configure, config.in: Regenerate.
13364 2008-07-28 Doug Kwan <dougkwan@google.com>
13366 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13367 (linux_write_memory): Remove declaration of errno.
13369 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13371 * linux-low.c (handle_extended_wait): Do not use "status"
13372 variable uninitialized.
13374 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13376 * server.c (handle_v_attach): Inhibit reporting dll changes.
13378 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13380 * remote-utils.c (prepare_resume_reply): If requested, don't
13381 output "thread:TID" in the T stop reply.
13383 * server.c (disable_packet_vCont, disable_packet_Tthread)
13384 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13385 (handle_query): If requested, disable support for qC, qfThreadInfo
13387 (handle_v_requests): If requested, disable support for vCont.
13388 (gdbserver_show_disableable): New.
13389 (main): Handle --disable-packet and --disable-packet=LIST.
13391 * server.h (disable_packet_vCont, disable_packet_Tthread)
13392 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13394 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13396 * server.c (gdbserver_usage): Mention --version.
13398 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13400 * Makefile.in (gdbreplay.o): New rule.
13402 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13404 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13405 message, not gdbserver.
13407 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13408 Nathan Sidwell <nathan@codesourcery.com>
13409 Joseph Myers <joseph@codesourcery.com>
13411 * acinclude.m4: Include ../../config/acx.m4.
13412 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13413 * configure, config.in: Regenerate.
13414 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13415 * server.c (gdbserver_version): Print PKGVERSION.
13416 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13417 (main): Adjust gdbserver_usage calls.
13418 * gdbreplay.c (version, host_name): Add declarations.
13419 (gdbreplay_version, gdbreplay_usage): New.
13420 (main): Accept --version and --help options.
13422 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13424 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13425 (arm_breakpoint_at): Handle Thumb.
13426 (the_low_target): Add comment.
13428 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13430 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13432 2008-05-09 Doug Evans <dje@google.com>
13434 * server.h (decode_search_memory_packet): Declare.
13435 * remote-utils.c (decode_search_memory_packet): New fn.
13436 * server.c (handle_search_memory_1): New fn.
13437 (handle_search_memory): New fn.
13438 (handle_query): Process qSearch:memory packets.
13440 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13442 * regcache.c (registers_length): Remove.
13443 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13444 full register packet.
13445 * regcache.h (registers_length): Remove prototype.
13446 * server.h (PBUFSIZ): Define to 16384.
13448 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13450 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13451 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13452 powerpc-64l.o, and powerpc-altivec64l.o.
13453 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13454 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13455 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13456 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13457 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13460 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13461 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13462 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13463 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13464 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13465 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13466 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13467 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13468 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13469 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13472 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13473 (init_registers_powerpc_32l): ... this new prototype.
13474 (init_registers_powerpc_32): Remove, replace by ...
13475 (init_registers_powerpc_altivec32l): ... this new prototype.
13476 (init_registers_powerpc_e500): Remove, replace by ...
13477 (init_registers_powerpc_e500l): ... this new prototype.
13478 (init_registers_ppc64): Remove, replace by ...
13479 (init_registers_powerpc_64l): ... this new prototype.
13480 (init_registers_powerpc_64): Remove, replace by ...
13481 (init_registers_powerpc_altivec64l): ... this new prototype.
13482 (ppc_num_regs): Set to 73.
13483 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13484 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13485 (ppc_cannot_store_register): Handle orig_r3 and trap.
13486 (ppc_arch_setup): Update init_registers_... calls.
13487 (ppc_fill_gregset): Handle orig_r3 and trap.
13489 * inferiors.c (clear_inferiors): Reset current_inferior.
13491 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13493 * acinclude.m4: Add override.m4.
13494 * configure: Regenerate.
13496 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13498 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13499 initial call to init_register_ppc64.
13501 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13503 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13504 single powerpc*-*-linux* case.
13505 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13507 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13509 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13510 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13512 * linux-ppc-low.c: Include <elf.h>.
13513 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13514 (ppc_hwcap): New global variable.
13515 (ppc_regmap): Remove __SPE__ #ifdef sections.
13516 (ppc_regmap_e500): New global variable.
13517 (ppc_cannot_store_register): Update __SPE__ special case.
13518 (ppc_get_hwcap): New function.
13519 (ppc_arch_setup): Use it to determine whether inferior supports
13520 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13521 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13522 Do not access registers if target does not support AltiVec.
13523 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13524 Do not access registers if target does not support SPE.
13525 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13527 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13529 * linux-low.c (disabled_regsets, num_regsets): New.
13530 (use_regsets_p): Delete.
13531 (linux_wait_for_process): Clear disabled_regsets.
13532 (regsets_fetch_inferior_registers): Check and set it.
13533 (regsets_store_inferior_registers): Likewise.
13534 (linux_fetch_registers, linux_store_registers): Do not use
13536 (initialize_low): Allocate disabled_regsets.
13538 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13540 * Makefile.in (LIBOBJS): New.
13541 (OBS): Use LIBOBJS.
13542 (memmem.o): New rule.
13543 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13544 * configure: Regenerated.
13546 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13548 * server.c (handle_query): Never return "unsupported" for
13549 qXfer:features:read queries.
13551 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13553 * server.c (get_features_xml): Fix inverted condition.
13554 (handle_query): Always support qXfer:feature:read.
13556 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13558 * server.c (wrapper_argv): New.
13559 (start_inferior): Handle wrapper_argv. If set, expect an extra
13561 (gdbserver_usage): Document --wrapper.
13562 (main): Parse --wrapper.
13564 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13566 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13567 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13568 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13569 (ppc_set_pc): Likewise.
13570 (ppc_arch_setup): New function.
13571 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13572 of collect_register.
13573 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13575 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13577 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13578 instead of linux-ppc64-low.o.
13579 * linux-ppc64-low.c: Remove file.
13580 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13581 (linux-ppc64-low.o): Remove rule.
13583 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13584 (init_registers_powerpc_64): Likewise.
13585 (ppc_regmap): Conditionally define depending on __powerpc64__.
13586 (ppc_cannot_store_register): Do not special-case "fpscr" when
13587 compiled on __powerpc64__.
13588 (ppc_collect_ptrace_register): New function.
13589 (ppc_supply_ptrace_register): New function.
13590 (ppc_breakpoint): Change type to "unsigned int".
13591 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13592 (the_low_target): Conditionally provide initializers for the
13593 arch_setup member depending on __powerpc64__. Install
13594 collect_ptrace_register and supply_ptrace_register members.
13596 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13598 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13599 * server.c (gdbserver_xmltarget): Define.
13600 (get_features_xml): Use it to replace "target.xml" and arch_string.
13602 * configure.srv: Remove srv_xmltarget. Add XML files that were
13603 mentioned there to srv_xmlfiles instead. Remove conditional tests
13604 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13605 srv_xmlfiles and srv_regobj to include all possible choices.
13606 * configure.ac (srv_xmltarget): Remove.
13607 (srv_xmlfiles): Do not add "target.xml".
13608 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13609 checks for supplementary target information.
13610 * configure: Regenerate.
13611 * Makefile.in (XML_TARGET): Remove.
13612 (target.xml): Remove rule.
13613 (clean): Do not clean up target.xml.
13614 (.PRECIOUS): Do not mention target.xml.
13616 * target.h (struct target_ops): Remove arch_string member.
13617 * linux-low.c (linux_arch_string): Remove.
13618 (linux_target_ops): Remove arch_string initializer.
13619 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13620 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13621 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13622 * spu-low.c (spu_arch_string): Remove.
13623 (spu_target_ops): Remove arch_string initializer.
13624 * win32-low.c (win32_arch_string): Remove.
13625 (win32_target_ops): Remove arch_string initializer.
13626 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13627 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13628 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13630 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13632 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13633 by collect_ptrace_register and supply_ptrace_register hooks.
13634 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13635 instead of checking for the_low_target.left_pad_xfer.
13636 (usr_store_inferior_registers): Use collect_ptrace_register callback
13637 instead of checking for the_low_target.left_pad_xfer.
13639 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13640 (s390_supply_ptrace_register): Likewise.
13641 (s390_fill_gregset): Call s390_collect_ptrace_register.
13642 (the_low_target): Update.
13644 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13645 (ppc_supply_ptrace_register): Likewise.
13646 (the_low_target): Update.
13648 * linux-i386-low.c (the_low_target): Update.
13649 * linux-x86-64-low.c (the_low_target): Update.
13651 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13653 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13654 reg-s390.o and reg-s390x.o.
13656 * linux-low.c (new_inferior): New global variable.
13657 (linux_create_inferior, linux_attach): Set it.
13658 (linux_wait_for_process): Call the_low_target.arch_setup after the
13659 target has stopped for the first time.
13660 (initialize_low): Do not call the_low_target.arch_setup.
13662 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13663 (s390_set_pc): Likewise.
13664 (s390_arch_setup): New function.
13665 (the_low_target): Use s390_arch_setup as arch_setup routine.
13667 * regcache.c (realloc_register_cache): New function.
13668 (set_register_cache): Call it for each existing regcache.
13670 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13672 * server.h (init_registers): Remove prototype.
13674 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13675 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13676 instead of init_registers ().
13677 * linux-arm-low.c (init_registers_arm): Add prototype.
13678 (init_registers_arm_with_iwmmxt): Likewise.
13679 (the_low_target): Add initializer for arch_setup field.
13680 * linux-cris-low.c (init_registers_cris): Add prototype.
13681 (the_low_target): Add initializer for arch_setup field.
13682 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13683 (the_low_target): Add initializer for arch_setup field.
13684 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13685 (the_low_target): Add initializer for arch_setup field.
13686 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13687 (the_low_target): Add initializer for arch_setup field.
13688 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13689 (the_low_target): Add initializer for arch_setup field.
13690 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13691 (the_low_target): Add initializer for arch_setup field.
13692 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13693 (init_registers_mips64_linux): Likewise.
13694 (the_low_target): Add initializer for arch_setup field.
13695 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13696 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13697 (the_low_target): Add initializer for arch_setup field.
13698 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13699 (init_registers_powerpc_64): Likewise.
13700 (the_low_target): Add initializer for arch_setup field.
13701 * linux-s390-low.c (init_registers_s390): Add prototype.
13702 (init_registers_s390x): Likewise.
13703 (the_low_target): Add initializer for arch_setup field.
13704 * linux-sh-low.c (init_registers_sh): Add prototype.
13705 (the_low_target): Add initializer for arch_setup field.
13706 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13707 (the_low_target): Add initializer for arch_setup field.
13708 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13709 (the_low_target): Add initializer for arch_setup field.
13711 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13712 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13713 instead of init_registers ().
13714 * win32-arm-low.c (init_registers_arm): Add prototype.
13715 (the_low_target): Add initializer for arch_setup field.
13716 * win32-i386-low.c (init_registers_i386): Add prototype.
13717 (the_low_target): Add initializer for arch_setup field.
13719 * spu-low.c (init_registers_spu): Add prototype.
13720 (initialize_low): Call initialie_registers_spu () instead of
13721 initialize_registers ().
13723 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13725 * server.c (handle_v_requests): When handling the vRun and vAttach
13726 packets, if already debugging a process, don't kill it. Return an
13729 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13731 * server.c (handle_query): Correct length check.
13733 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13735 * win32-low.c (do_initial_child_stuff): Add process handle
13736 parameter. Set current_process_handle and current_process_id from the
13737 parameters. Clear globals.
13738 (win32_create_inferior): Don't set current_process_handle and
13739 current_process_id here. Instead pass them on the call to
13740 do_initial_child_stuff.
13741 (win32_attach): Likewise.
13742 (win32_clear_inferiors): New.
13743 (win32_kill): Don't close the current process handle or the
13744 current thread handle here. Instead call win32_clear_inferiors.
13745 (win32_detach): Don't open a new handle to the process. Call
13746 win32_clear_inferiors.
13747 (win32_join): Don't rely on current_process_handle; open a new
13748 handle using the process id.
13749 (win32_wait): Call win32_clear_inferiors when the inferior process
13752 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13754 * server.c (monitor_show_help): Add "exit".
13756 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13758 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13759 (clean): Add reg-xtensa.c.
13760 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13761 * configure.srv (xtensa*-*-linux*) New target.
13762 * linux-xtensa-low.c: New.
13763 * xtensa-xtregs.c: New.
13765 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13767 * hostio.c: Don't include errno.h.
13768 (errno_to_fileio_errno): Move to hostio-errno.
13769 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13770 error number outputting to the target->hostio_last_error callback.
13771 (hostio_packet_error): Use FILEIO_EINVAL directly.
13772 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13773 calls to hostio_error.
13774 * hostio-errno.c: New.
13775 * server.h (hostio_last_error_from_errno): Declare.
13776 * target.h (target_ops): Add hostio_last_error member.
13777 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13778 as hostio_last_error handler.
13779 * spu-low.c (spu_target_ops): Likewise.
13780 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13781 (wince_hostio_last_error): New functions.
13782 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13783 as hostio_last_error handler.
13784 (win32_target_ops) [!_WIN32_WCE]: Register
13785 hostio_last_error_from_errno as hostio_last_error handler.
13786 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13787 (hostio-errno.o): New rule.
13788 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13789 * configure.srv (srv_hostio_err_objs): New variable. Default to
13791 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13792 * configure: Regenerate.
13794 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13796 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13797 (linux_kill, linux_detach): Clean up the process list.
13798 * remote-utils.c (remote_open): Improve port number parsing.
13799 (putpkt_binary, input_interrupt): Only send interrupts if the target
13801 * server.c (extended_protocol): Make static.
13802 (attached): Define earlier.
13803 (exit_requested, response_needed, program_argv): New variables.
13804 (target_running): New.
13805 (start_inferior): Clear attached here.
13806 (attach_inferior): Set attached here.
13807 (require_running): Define.
13808 (handle_query): Use require_running and target_running. Implement
13810 (handle_v_attach, handle_v_run): New.
13811 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13812 (gdbserver_usage): Update.
13813 (main): Redo argument parsing. Handle --debug and --multi. Handle
13814 --attach along with other options or after the port. Save
13815 program_argv. Support no initial program. Resynchronize
13816 communication with GDB after an error. Handle "monitor exit".
13817 Use require_running and target_running. Always allow the extended
13818 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13819 restart in extended mode.
13820 * README: Refer to the GDB manual. Update --attach usage.
13822 2007-12-20 Andreas Schwab <schwab@suse.de>
13824 * linux-low.c (STACK_SIZE): Define.
13825 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13826 (linux_test_for_tracefork): Likewise.
13828 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13830 * linux-low.c (linux_wait_for_event): Update messages. Do not
13831 reinsert auto-delete breakpoints.
13832 * mem-break.c (struct breakpoint): Change return type of handler to
13834 (set_breakpoint_at): Update handler type.
13835 (reinsert_breakpoint_handler): Return 1 instead of calling
13837 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13839 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13840 * mem-break.h (set_breakpoint_at): Update handler type.
13841 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13842 * win32-low.c (auto_delete_breakpoint): New.
13843 (get_child_debug_event): Use it.
13845 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13847 * configure.ac: Check for pread and pwrite.
13848 * hostio.c (handle_pread): Fall back to lseek and read.
13849 (handle_pwrite): Fall back to lseek and write.
13850 * config.in, configure: Regenerated.
13852 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13854 * server.c (myresume): Add own_buf argument.
13855 (main): Update calls.
13857 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13859 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13860 * remote-utils.c (remote_open): Do not call disable_async_io.
13861 (block_async_io): Delete.
13862 (unblock_async_io): Make static.
13863 (initialize_async_io): New.
13864 * server.c (handle_v_cont): Handle async I/O here.
13865 (myresume): Likewise. Move other common resume tasks here...
13866 (main): ... from here. Call initialize_async_io. Disable async
13867 I/O before the main loop.
13868 * server.h (initialize_async_io): Declare.
13869 (block_async_io, unblock_async_io): Delete prototypes.
13870 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13872 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13874 * remote-utils.c (readchar): Allow binary data in received messages.
13876 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13878 * win32-low.c (attaching): New global.
13879 (win32_create_inferior): Clear the `attaching' global.
13880 (win32_attach): Set the `attaching' global.
13881 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13882 attaching. Only set a breakpoint at the entry point if not
13885 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13887 * server.c (main): Don't report dll events on the initial
13888 connection on attaches.
13890 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13892 * server.c (main): Relax numerical bases supported for the pid of
13893 the --attach command line argument.
13895 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13897 * win32-low.c (win32_attach): Call OpenProcess before
13898 DebugActiveProcess, not after. Add last error output to error
13901 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13903 * win32-low.c (win32_get_thread_context)
13904 (win32_set_thread_context): New functions.
13905 (thread_rec): Use win32_get_thread_context.
13906 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13907 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13910 2007-12-03 Leo Zayas
13911 Pedro Alves <pedro_alves@portugalmail.pt>
13913 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13915 (child_add_thread): Minor cleanup.
13916 (child_continue): Resume artificially suspended threads before
13917 calling ContinueDebugEvent.
13918 (suspend_one_thread): New.
13919 (fake_breakpoint_event): New.
13920 (get_child_debug_event): Change return type to int. Check here if
13921 gdb sent an interrupt request. If a soft interrupt was requested,
13922 fake a breakpoint event. Return 0 if there is no event to handle,
13924 (win32_wait): Don't check here if gdb sent an interrupt request.
13925 Ensure there is a valid event to handle.
13926 (win32_request_interrupt): Add soft interruption method as last
13929 2007-12-03 Leo Zayas
13930 Pedro Alves <pedro_alves@portugalmail.pt>
13932 * win32-low.h (win32_thread_info): Add descriptions to the
13933 structure members. Replace `suspend_count' counter by a
13935 * win32-low.c (thread_rec): Update condition of when to get the
13936 context from the inferior. Rely on ContextFlags being set if it
13937 has already been retrieved. Only suspend the inferior thread if
13938 we haven't already. Warn if that fails.
13939 (continue_one_thread): s/suspend_count/suspended/. Only call
13940 ResumeThread once. Warn if that fails.
13942 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13944 * win32-low.c (win32_wait): Don't read from the inferior when it
13945 has already exited.
13947 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13949 * Makefile.in (win32_low_h): New variable.
13950 (win32-low.o): Add dependency on $(win32_low_h).
13951 (win32-arm-low.o, win32-i386-low.o): New rules.
13953 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13955 * hostio.c: Correct copyright year.
13957 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13959 * Makefile.in (OBS): Add hostio.o.
13960 (hostio.o): New rule.
13961 * server.h (handle_vFile): Declare.
13962 * hostio.c: New file.
13963 * server.c (handle_v_requests): Take packet_len and new_packet_len
13964 for binary packets. Call handle_vFile.
13965 (main): Update call to handle_v_requests.
13967 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
13969 * linux-low.c: Include <sched.h>.
13971 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
13973 * linux-low.c (linux_tracefork_grandchild): New.
13974 (linux_tracefork_child): Use clone.
13975 (linux_test_for_tracefork): Use clone; allocate and free a stack.
13977 2007-10-31 Joel Brobecker <brobecker@adacore.com>
13979 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13981 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
13983 * linux-low.c (handle_extended_wait): Handle unexpected signals.
13985 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
13987 * inferiors.c (change_inferior_id): Delete.
13988 (add_pid_to_list, pull_pid_from_list): New.
13989 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13990 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13991 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13992 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13993 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13994 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13995 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13996 (using_threads): Always set to 1.
13997 (handle_extended_wait): New.
13998 (add_process): Do not set TID.
13999 (linux_create_inferior): Set must_set_ptrace_flags.
14000 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14001 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14002 (linux_thread_alive): Rename TID argument to LWPID.
14003 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14004 (linux_wait_for_event): Do not use TID or check using_threads. Update
14005 call to dead_thread_notify. Call handle_extended_wait.
14006 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14007 (send_sigstop): Delete sigstop_sent.
14008 (wait_for_sigstop): Avoid TID.
14009 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14010 (linux_test_for_tracefork): New.
14011 (linux_lookup_signals): Use thread_db_active and
14012 linux_supports_tracefork_flag.
14013 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14014 * linux-low.h (get_process_thread): Avoid TID.
14015 (struct process_ifo): Move thread_known and tid to the end. Remove
14017 (linux_attach_lwp, thread_db_init): Update prototypes.
14018 * server.h (change_inferior_id): Delete prototype.
14019 (add_pid_to_list, pull_pid_from_list): New prototypes.
14020 * thread-db.c (thread_db_use_events): New.
14021 (find_first_thread): Rename to...
14022 (find_one_thread): ...this. Update callers and messages. Do not
14023 call fatal. Check thread_db_use_events. Do not call
14024 change_inferior_id or new_thread_notify.
14025 (maybe_attach_thread): Update. Do not call new_thread_notify.
14026 (thread_db_init): Set thread_db_use_events. Check use_events.
14027 * utils.c (fatal, warning): Correct message prefix.
14029 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14031 * Makefile.in (clean): Remove new files.
14032 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14033 (powerpc-64.o, powerpc-64.c): New rules.
14034 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14035 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14037 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14039 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14040 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14041 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14042 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14043 (target_regsets): Add AltiVec and SPE register sets.
14044 * configure.ac: Check for AltiVec and SPE.
14045 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14046 (ppc_fill_vrregset, ppc_store_vrregset): New.
14047 (target_regsets): Add AltiVec register set.
14048 * configure: Regenerated.
14050 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14052 * linux-low.c (O_LARGEFILE): Define.
14053 (linux_read_memory): Use /proc/PID/mem.
14054 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14055 * configure, config.in: Regenerated.
14057 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14059 * linux-low.c (linux_wait_for_event): Do not pass signals while
14062 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14064 * win32-low.c (create_process): New.
14065 (win32_create_inferior): Use create_process instead of
14066 CreateProcess. If create_process failed retry appending an ".exe"
14067 suffix. Store the GetLastError result immediatelly after
14068 create_process calls and use it on the call to error.
14070 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14072 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14074 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14076 * configure.ac: Switch license to GPLv3.
14078 2007-08-01 Michael Snyder <msnyder@access-company.com>
14080 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14082 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14084 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14086 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14087 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14088 CloseToolhelp32Snapshot.
14089 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14090 CloseToolhelp32Snapshot.
14092 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14094 * server.c (main): Check for inferior exit before main loop.
14096 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14098 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14099 instead of on tmp_desc.
14101 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14102 Daniel Jacobowitz <dan@codesourcery.com>
14104 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14105 (add_thread): Minor cleanups.
14106 (clear_inferiors): Move lower in the file. Clear the DLL
14108 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14109 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14110 (xml_escape_text): New.
14111 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14113 (handle_v_cont): Report errors.
14114 (gdbserver_version): Update.
14115 (main): Correct size of own_buf. Do not report initial DLL events.
14116 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14117 (unloaded_dll, xml_escape_text): New.
14118 * win32-low.c (enum target_waitkind): Update comments.
14119 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14120 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14121 (win32_EnumProcessModules, win32_GetModuleInformation)
14122 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14123 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14124 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14125 (win32_Module32First, win32_Module32Next, load_toolhelp)
14126 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14127 (get_child_debug_event): Handle DLL events.
14128 (win32_wait): Likewise.
14130 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14132 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14133 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14135 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14137 * win32-low.c (handle_output_debug_string): Ignore event if not
14140 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14142 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14144 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14146 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14148 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14150 * inferiors.c (change_inferior_id): Add comment.
14151 * linux-low.c (check_removed_breakpoint): Add an early
14152 prototype. Improve debug output.
14153 (linux_attach): Doc update.
14154 (linux_detach_one_process, linux_detach): Clean up before releasing
14156 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14157 * linux-low.h (struct process_info): Doc improvement.
14158 * mem-break.c (delete_all_breakpoints): New.
14159 * mem-break.h (delete_all_breakpoints): New prototype.
14160 * thread-db.c (find_first_thread): New.
14161 (thread_db_create_event): Call it instead of
14162 thread_db_find_new_threads. Clean up unused variables.
14163 (maybe_attach_thread): Remove first thread handling.
14164 (thread_db_find_new_threads): Use find_first_thread.
14165 (thread_db_get_tls_address): Likewise.
14167 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14169 * thread-db.c (thread_db_find_new_threads): Add prototype.
14170 (thread_db_create_event): Check for the main thread before adding
14172 (maybe_attach_thread): Only enable event reporting if TID == 0.
14173 (thread_db_get_tls_address): Check for new threads.
14175 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14177 * linux-low.c (linux_create_inferior): Try execv before execvp.
14178 * spu-low.c (spu_create_inferior): Likewise.
14180 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14182 * linux-low.c (linux_create_inferior): Change execv to execvp.
14183 * spu-low.c (spu_create_inferior): Likewies.
14185 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14187 * Makefile.in (clean): Clean new files instead of deleted ones.
14188 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14189 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14191 * configure.srv: Specify XML files and new regformats for MIPS and
14193 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14194 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14195 an entry for the restart register.
14196 (mips_cannot_fetch_register, mips_cannot_store_register)
14197 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14198 register names to match the XML descriptions.
14199 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14200 restart register instead of $0.
14202 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14203 Markus Deuling <deuling@de.ibm.com>
14205 * remote-utils.c (decode_xfer_write): New function.
14206 * server.h (decode_xfer_write): Add prototype.
14207 * server.c (handle_query): Add PACKET_LEN argument. Support
14208 qXfer:spu:read and qXfer:spu:write packets.
14209 (main): Pass packet_len to handle_query.
14210 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14211 * target.h (target_ops): Add qxfer_spu.
14213 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14215 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14216 accessing non-seekable spufs files.
14218 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14220 * server.c (handle_query): Add reply for qC packet.
14222 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14223 Leo Zayas <lerele@champenstudios@com>
14225 * server.h (check_remote_input_interrupt_request): New function.
14226 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14227 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14228 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14229 (check_remote_input_interrupt_request): New function.
14230 * server.h (check_remote_input_interrupt_request): Declare.
14231 * win32-low.c (winapi_DebugBreakProcess,
14232 winapi_GenerateConsoleCtrlEvent): New typedefs.
14233 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14235 (win32_wait): Check for remote interrupt request
14236 with check_remote_input_interrupt_request.
14237 (win32_request_interrupt): New function.
14238 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14240 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14242 * win32-low.c (debug_registers_changed,
14243 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14244 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14245 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14246 (thread_rec): Get context using the low target.
14247 (child_add_thread): Call thread_added on the low target,
14248 which does the same thing.
14250 (do_initial_child_stuff): Remove debug registers references.
14251 Set context using the low target. Resume threads after
14252 setting the contexts.
14253 (child_continue): Remove dead variable. Remove debug
14254 registers references.
14255 (child_fetch_inferior_registers): Go through the low target.
14256 (do_child_store_inferior_registers): Remove.
14257 (child_store_inferior_registers): Go through the low target.
14258 (win32_resume): Remove debug registers references.
14259 Set context using the low target.
14260 (handle_exception): Change return type to void. Don't record
14261 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14262 first chance exception.
14263 (get_child_debug_event): Change return type to void. Remove
14264 goto loop. Always return after waiting for debug event.
14265 (win32_wait): Convert to switch statement. Handle spurious
14268 * win32-i386-low.c (debug_registers_changed,
14269 debug_registers_used): New.
14270 (initial_stuff): Rename to ...
14271 (i386_initial_stuff): ... this. Clear debug registers
14273 (store_debug_registers): Delete.
14274 (i386_get_thread_context): New.
14275 (load_debug_registers): Delete.
14276 (i386_set_thread_context): New.
14277 (i386_thread_added): New.
14278 (single_step): Rename to ...
14279 (i386_single_step): ... this.
14280 (do_fetch_inferior_registers): Rename to ...
14281 (i386_fetch_inferior_register): ... this.
14282 (i386_store_inferior_register): New.
14283 (the_low_target): Adapt to new interface.
14285 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14286 (arm_get_thread_context): New.
14287 (arm_set_thread_context): New.
14289 (do_fetch_inferior_registers): Rename to ...
14290 (arm_fetch_inferior_register): ... this.
14291 (arm_store_inferior_register): New.
14292 (arm_wince_breakpoint): Reimplement as unsigned long.
14293 (arm_wince_breakpoint_len): Define.
14294 (the_low_target): Adapt to new interface.
14296 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14297 load_debug_registers. Add get_thread_context, set_thread_context,
14298 thread_added and store_inferior_register. Rename
14299 fetch_inferior_registers to fetch_inferior_register.
14300 (regptr): Remove declaration.
14302 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14304 * linux-low.c (linux_detach): Change return type to int. Return 0.
14305 * spu-low.c (spu_detach): Likewise.
14307 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14309 * target.h (target_ops): Change return type of detach to int.
14311 (join_inferior): New.
14312 * server.c (main): Don't skip detach support on mingw32.
14313 If the inferior doesn't support detaching return error.
14314 Call join_inferior instead of using waitpid.
14315 * linux-low.c (linux_join): New.
14316 (linux_target_op): Add linux_join.
14317 * spu-low.c (spu_join): New.
14318 (spu_target_ops): Add spu_join.
14319 * win32-low.c (win32_detach): Adapt to new interface.
14320 Reopen current_process_handle before detaching. Issue a child
14321 resume before detaching.
14323 (win32_target_op): Add win32_join.
14325 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14327 * win32-low.c (win32-attach): Fix return value.
14328 * target.h (target_ops): Describe ATTACH return values.
14330 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14332 * win32-low.c (GETPROCADDRESS): Define.
14333 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14334 (winapi_DebugSetProcessKillOnExit): Likewise.
14335 (win32_create_inferior): Force usage of ansi CreateProcessA.
14336 (win32_attach): Use GETPROCADDRESS.
14337 (win32_detach): Likewise.
14339 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14341 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14343 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14345 * win32-low.c: Commit leftover changes from 2007-03-29.
14347 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14349 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14350 fields short instead of int. Add explicit padding.
14351 (i387_cache_to_fsave): Remove unnecessary casts.
14352 (i387_fsave_to_cache): Doc fix.
14353 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14355 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14357 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14358 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14360 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14362 * configure.srv (arm*-*-mingw32ce*): Move near the other
14365 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14367 * configure.ac: Add errno checking.
14368 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14369 sys/file.h and malloc.h.
14370 (AC_CHECK_DECLS): Add perror.
14371 (srv_mingwce): Handle.
14372 * configure.srv (i[34567]86-*-cygwin*): Add
14373 win32-i386-low.o to srv_tgtobj.
14374 (i[34567]86-*-mingw*): Likewise.
14375 (arm*-*-mingw32ce*): Add case.
14376 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14377 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14378 [__MINGW32CE__] (strerror): New function.
14379 [__MINGW32CE__] (errno): Define to GetLastError.
14380 [__MINGW32CE__] (COUNTOF): New macro.
14381 (remote_open): Remove extra close call.
14382 * mem-break.c (delete_breakpoint_at): New function.
14383 * mem-break.h (delete_breakpoint_at): Declare.
14384 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14385 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14386 [USE_WIN32API] (read, write): Add char* casts.
14387 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14388 * server.h: Include wincecompat.h on Windows CE.
14389 [HAVE_ERRNO_H]: Check.
14390 (perror): Declare if not declared.
14391 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14392 (perror_with_name): Remove errno declaration.
14393 * wincecompat.h: New.
14394 * wincecompat.c: New.
14395 * win32-low.h: New.
14396 * win32-arm-low.c: New.
14397 * win32-i386-low.c: New.
14398 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14399 (OUTMSG2): Make it safe.
14401 (COUNTOF): New macro.
14402 (NUM_REGS): Get it from the low target.
14403 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14404 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14405 (thread_rec): Let low target handle debug registers.
14406 (child_add_thread): Likewise.
14407 (child_init_thread_list): Likewise.
14408 (continue_one_thread): Likewise.
14410 (do_child_fetch_inferior_registers): Move to ...
14411 * win32-i386-low.c: ... here, and rename to ...
14412 (do_fetch_inferior_registers): ... this.
14413 * win32-low.c (child_fetch_inferior_registers):
14414 Go through the low target.
14415 (do_child_store_inferior_registers): Use regptr.
14416 (strwinerror): New function.
14417 (win32_create_inferior): Handle Windows CE.
14418 Use strwinerror instead of strerror on Windows error
14419 codes. Add program to the error output.
14420 Don't close the main thread handle on Windows CE.
14421 (win32_attach): Use coredll.dll on Windows CE.
14422 (win32_kill): Close current process and current
14424 (win32_detach): Use coredll.dll on Windows CE.
14425 (win32_resume): Let low target handle debug registers, and
14427 (handle_exception): Add/Remove initial breakpoint. Avoid
14428 non-existant WSTOPSIG on Windows CE.
14429 (win32_read_inferior_memory): Cast to remove warning.
14430 (win32_arch_string): Go through the low target.
14431 (initialize_low): Call set_breakpoint_data with the low
14432 target's breakpoint.
14433 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14434 FOP_REGNUM, mappings): Move to ...
14435 * win32-i386-low.c: ... here.
14436 * win32-low.c (win32_thread_info): Move to ...
14437 * win32-low.h: ... here.
14438 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14439 win32-arm-low.c and wincecompat.c.
14440 (all:): Add $EXEEXT.
14441 (install-only:): Likewise.
14442 (gdbserver:): Likewise.
14443 (gdbreplay:): Likewise.
14444 * config.in: Regenerate.
14445 * configure: Regenerate.
14447 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14449 * win32-low.c: Rename typedef thread_info to
14450 win32_thread_info throughout.
14452 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14454 * win32-i386-low.c: Rename to ...
14455 * win32-low.c: ... this.
14456 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14457 * Makefile.in: Likewise.
14459 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14461 * remote-utils.c (monitor_output): Constify msg parameter.
14462 * server.h (monitor_output): Likewise.
14463 * win32-i386-low.c (handle_output_debug_string): New.
14464 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14465 handle_output_debug_string.
14466 (get_child_debug_event): Likewise.
14468 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14470 * server.c (main): Correct strtoul check.
14472 2007-03-27 Jon Ringle <jon@ringle.org>
14474 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14476 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14478 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14480 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14482 * terminal.h: Check HAVE_SGTTY_H.
14484 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14486 * remote-utils.c (remote_open): Print out the assigned port number.
14488 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14490 * remote-utils.c (monitor_output): New function.
14491 * server.c (debug_threads): Define here.
14492 (monitor_show_help): New function.
14493 (handle_query): Handle qRcmd.
14494 (main): Do not handle 'd' packet.
14495 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14496 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14499 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14501 * Makefile.in (EXEEXT): New.
14502 (clean): Use $(EXEEXT).
14504 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14506 * target.h (target_ops): Rename send_signal to request_interrupt,
14507 and remove enum target_signal parameter.
14508 * linux-low.c (linux_request_interrupt): Rename from
14509 linux_send_signal, and always send SIGINT.
14510 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14511 and always send SIGINT.
14512 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14514 (input_interrupt): Likewise.
14516 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14518 * server.c (get_features_xml): Check if target implemented
14520 * win32-i386-low.c (win32_arch_string): New.
14521 (win32_target_ops): Add win32_arch_string as arch_string member.
14523 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14525 * spu-low.c (spu_arch_string): New.
14526 (spu_target_ops): Add spu_arch_string.
14528 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14530 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14531 * configure.ac: Do not check for terminal.h.
14532 * configure, config.in: Regenerated.
14534 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14536 * Makefile.in (OBS): Add $(XML_BUILTIN).
14537 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14539 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14540 (arm-with-iwmmxt.c): New.
14541 * config.in, configure: Regenerate.
14542 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14543 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14544 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14545 (arm*-*-linux*): Add iWMMXt and regset support.
14546 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14547 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14548 (arm_store_wmmxregset, target_regsets): New.
14549 * server.c (get_features_xml): Take annex argument. Check builtin
14551 (handle_query): Handle multiple annexes.
14553 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14555 * remote-utils.c [USE_WIN32API] (read, write): Define.
14556 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14559 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14561 * linux-i386-low.c (the_low_target): Set arch_string.
14562 * linux-x86-64-low.c (the_low_target): Likewise.
14563 * linux-low.c (linux_arch_string): New.
14564 (linux_target_ops): Add it.
14565 * linux-low.h (struct linux_target_ops): Add arch_string.
14566 * server.c (write_qxfer_response): Use const void * for DATA.
14567 (get_features_xml): New.
14568 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14569 * target.h (struct target_ops): Add arch_string method.
14571 2007-01-03 Denis Pilat <denis.pilat@st.com>
14572 Daniel Jacobowitz <dan@codesourcery.com>
14574 * linux-low.c (linux_kill): Handle being called with no threads.
14575 * win32-i386-low.c (win32_kill): Likewise.
14576 (get_child_debug_event): Clear current_process_handle.
14578 2006-12-30 Denis PILAT <denis.pilat@st.com>
14579 Daniel Jacobowitz <dan@codesourcery.com>
14581 * remote-utils.c (remote_open): Check the type of specified
14582 serial port devices before opening them.
14583 * server.c (main): Kill the inferior if an error occurs during
14584 the first remote_open.
14586 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14588 * README: Update supported targets.
14590 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14592 * Makefile.in (clean): Remove reg-mips64.c.
14593 (reg-mips64.c, reg-mips64.o): New rules.
14594 * configure.srv: Handle mips64. Include regset support for mips.
14595 * linux-mips-low.c (union mips_register): New.
14596 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14597 (mips_breakpoint, mips_breakpoint_at): Use int.
14598 (mips_collect_register, mips_supply_register)
14599 (mips_collect_register_32bit, mips_supply_register_32bit)
14600 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14601 (mips_store_fpregset, target_regsets): New.
14602 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14604 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14606 * configure.srv: Add target "spu*-*-*".
14607 * Makefile.in (clean): Remove reg-spu.c.
14608 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14609 * spu-low.c: New file.
14611 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14613 * configure.ac: Correct td_thr_tls_get_addr test.
14614 * configure: Regenerated.
14616 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14618 * linux-low.c (linux_wait_for_event): Reformat. Use the
14619 pass_signals array.
14620 * remote-utils.c (decode_address_to_semicolon): New.
14621 * server.c (pass_signals, handle_general_set): New.
14622 (handle_query): Mention QPassSignals for qSupported.
14623 (main): Call handle_general_set.
14624 * server.h (pass_signals, decode_address_to_semicolon): New.
14626 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14628 * server.c (handle_query): Correct error handling for read_auxv.
14630 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14632 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14633 and srv_linux_thread_db to yes.
14634 * linux-s390-low.c (s390_fill_gregset): New function.
14635 (target_regsets): Define data structure.
14637 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14639 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14640 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14641 * config.in, configure: Regenerated.
14642 * inferiors.c (gdb_id_to_thread): New function.
14643 (gdb_id_to_thread_id): Use it.
14644 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14645 * linux-low.h (struct process_info): Add th member.
14646 (thread_db_get_tls_address): New prototype.
14647 * remote-utils.c (decode_address): Make non-static.
14648 * server.c (handle_query): Handle qGetTLSAddr.
14649 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14650 * target.h (struct target_ops): Add get_tls_address.
14651 * thread-db.c (maybe_attach_thread): Save the thread handle.
14652 (thread_db_get_tls_address): New.
14654 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14656 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14657 (linux_resume_one_process): Take a siginfo_t *. Update all
14658 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14659 (struct pending_signals): Add a siginfo_t.
14660 (linux_wait_for_process): Always set last_status.
14661 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14662 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14663 * linux-low.h (struct process_info): Add last_status.
14665 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14667 * remote-utils.c (try_rle): New function.
14668 (putpkt_binary): Use it.
14670 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14672 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14673 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14674 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14675 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14676 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14679 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14681 * server.c (terminal_fd): New variable.
14682 (old_foreground_pgrp): Likewise.
14683 (restore_old_foreground_pgrp): New function.
14684 (start_inferior): Record the terminal file descriptor in terminal_fd
14685 and its original foreground group in old_foreground_pgrp. Register
14686 restore_old_foreground_pgrp with atexit().
14688 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14690 * server.c (handle_query): Correct qPart to qXfer.
14692 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14694 * configure.ac: Check for more headers which are missing on
14695 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14696 * configure.srv: Add Cygwin and mingw32.
14697 * remote-utils.c: Don't include headers unconditionally which
14698 are missing on mingw32. Include <winsock.h> for mingw32.
14699 (remote_open): Adjust for mingw32 support. Flush
14700 standard error after writing to it.
14701 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14702 (unblock_async_io, enable_async_io, disable_async_io)
14703 (readchar, getpkt): Update for Winsock support.
14704 (prepare_resume_reply): Expect a protocol signal number.
14705 * server.c: Disable <sys/wait.h> on mingw32.
14706 (start_inferior): Adjust for mingw32 support. Flush
14707 standard error after writing to it.
14708 (attach_inferior): Likewise. Use protocol signal
14710 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14712 * win32-i386-low.c: New file.
14713 * Makefile.in (XM_CLIBS): Set.
14714 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14715 (win32-i386-low.o): New dependency rule.
14716 * linux-low.c (linux_wait): Use target signal numbers.
14717 * target.h (struct target_ops): Doc fix.
14718 * server.h (target_signal_to_name): New prototype.
14719 * gdbreplay.c: Don't include headers unconditionally which
14720 are missing on mingw32. Include <winsock.h> for mingw32.
14721 (remote_close, remote_open): Adjust for Winsock support.
14722 * configure, config.in: Regenerated.
14724 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14726 * server.c (decode_xfer_read, write_qxfer_response): New.
14727 (handle_query): Take a packet length argument. Handle
14728 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14729 the qSupported response.
14730 (main): Update call to handle_query.
14732 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14734 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14735 (putpkt_binary): Renamed from putpkt and adjusted for binary
14737 (putpkt): New wrapper for putpkt_binary.
14738 (readchar): Don't mask off the high bit.
14739 (decode_X_packet): New function.
14740 * server.c (main): Call putpkt_binary if a handler sets the packet
14741 length. Save the length of the incoming packet. Handle 'X'.
14742 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14744 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14746 * server.c (handle_query): Handle qSupported.
14748 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14750 * remote-utils.c (all_symbols_looked_up): New variable.
14751 (look_up_one_symbol): Check it.
14752 * server.h (look_up_one_symbol): New declaration.
14753 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14755 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14757 * Makefile.in (linux-arm-low.o): Update dependencies.
14758 * linux-arm-low.c: Include "gdb_proc_service.h".
14759 (PTRACE_GET_THREAD_AREA): Define.
14760 (ps_get_thread_area): New function.
14762 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14764 * configure.srv (m68k*-*-uclinux*): New target.
14765 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14766 (linux_resume_one_process): Remove extraneous cast.
14767 (linux_read_offsets): New.
14768 (linux_target_op): Add linux_read_offsets on mmuless systems.
14769 * server.c (handle_query): Add qOffsets logic.
14770 * target.h (struct target_ops): Add read_offsets.
14772 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14774 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14775 (PTRACE_GET_THREAD_AREA): Define.
14776 (ps_get_thread_area): New function.
14777 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14778 (linux-x86-64-low.o): Update.
14780 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14782 * configure.ac: Remove checks for prfpregset_t.
14783 * gdb_proc_service.h: New file.
14784 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14785 new "gdb_proc_service.h".
14786 * proc-service.c: Likewise.
14787 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14788 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14789 * Makefile.in (gdb_proc_service_h): Updated.
14790 * configure, config.in: Regenerated.
14792 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14794 * remote-utils.c (prepare_resume_reply): Move declaration
14795 of gdb_id_from_wait to the top of the block.
14797 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14799 * linux-low.c (regsets_store_inferior_registers): Read the regset
14800 from the target before filling it.
14802 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14804 * server.c (attach_inferior): Return SIGTRAP for a successful
14807 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14809 * Makefile.in (OBS): Add version.o.
14810 (STAGESTUFF): Delete.
14811 (version.o): Add dependencies.
14812 (version.c): Replace rule.
14813 (clean): Remove version.c.
14814 * server.c (gdbserver_version): New.
14815 (gdbserver_usage): Use printf.
14816 (main): Handle --version and --help.
14817 * server.h (version, host_name): Add declarations.
14819 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14831 * linux-x86-64-low.c:
14833 * linux-s390-low.c:
14834 * linux-ppc64-low.c:
14836 * linux-mips-low.c:
14837 * linux-m68k-low.c:
14838 * linux-m32r-low.c:
14841 * linux-ia64-low.c:
14842 * linux-i386-low.c:
14843 * linux-crisv32-low.c:
14855 * gdbserver.1: Add (C) after Copyright. Update the FSF
14858 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14860 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14861 (arm_breakpoint_at): Recognize both breakpoints.
14862 (the_low_target): Use the correct breakpoint instruction.
14864 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14866 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14867 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14868 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14869 (the_low_target): Update.
14871 2005-10-25 Andreas Schwab <schwab@suse.de>
14873 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14875 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14876 (ia64_num_regs): Reduce to 462.
14878 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14880 * acinclude.m4: Correct quoting.
14881 * aclocal.m4: Regenerated.
14883 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14884 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14885 (thread_db_init): Call thread_db_err_str.
14886 * configure.ac: Check for TD_VERSION.
14887 * config.in, configure: Regenerated.
14889 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14891 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14893 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14895 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14896 is not available. Define HAVE_PTRACE_GETREGS if it is.
14897 * config.in, configure: Regenerated.
14898 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14899 * linux-i386-low.c, linux-m68k-low.c: Update to use
14900 HAVE_PTRACE_GETREGS.
14901 * linux-low.c (regsets_fetch_inferior_registers)
14902 (regsets_store_inferior_registers): Only return 0 if we processed
14904 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14905 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14907 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14909 * inferiors.c (struct thread_info): Add gdb_id.
14910 (add_thread): Add gdb_id argument.
14911 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14912 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14913 calls to add_thread.
14914 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14915 * server.c (handle_query): Use thread_to_gdb_id.
14916 (handle_v_cont, main): Use gdb_id_to_thread_id.
14917 * server.h (add_thread): Update prototype.
14918 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14921 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14923 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14924 left-padded registers.
14925 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14926 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14928 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14930 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14931 * configure: Regenerate.
14932 * config.in: Regenerate.
14933 * server.h (NEED_DECLARATION_STRERROR):
14934 Replace with !HAVE_DECL_STRERROR.
14936 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14938 * linux-low.c (linux_wait, linux_send_signal): Don't test
14939 an unsigned long variable for > 0 if it could be MAX_ULONG.
14940 * server.c (myresume): Likewise.
14941 * target.c (set_desired_inferior): Likewise.
14943 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14945 * configure.ac: Simplify and improve check for socklen_t.
14946 * configure, config.in: Regenerate.
14948 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14950 * acconfig.h: Remove.
14951 * configure.ac: Add a test for socklen_t. Use three-argument
14952 AC_DEFINE throughout.
14953 * config.in: Regenerated using autoheader 2.59.
14954 * configure: Regenerated.
14956 * gdbreplay.c (socklen_t): Provide a default.
14957 (remote_open): Use socklen_t.
14958 * remote-utils.c (socklen_t): Provide a default.
14959 (remote_open): Use socklen_t.
14960 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14963 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14965 * linux-low.c (linux_read_memory, linux_write_memory)
14966 (linux_read_auxv): Likewise.
14967 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14968 (check_mem_write): Likewise.
14969 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14971 * regcache.c (struct inferior_rgcache_data, registers_to_string)
14972 (registers_from_string, register_data): Likewise.
14973 * server.c (handle_query, main): Likewise.
14974 * server.h (convert_ascii_to_int, convert_int_to_ascii)
14975 (decode_M_packet): Likewise.
14976 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14977 * target.h (struct target_ops): Update read_memory, write_memory,
14979 (read_inferior_memory, write_inferior_memory): Update.
14980 * linux-low.h (struct linux_target_ops): Change type of breakpoint
14981 to unsigned char *.
14982 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14983 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14984 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14985 linux-s390-low.c, linux-sh-low.c: Update for changes in
14986 read_inferior_memory and the_low_target->breakpoint.
14988 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
14990 * Makefile.in (SFILES): Add linux-ppc64-low.c.
14991 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14992 * configure.srv: Add powerpc64-*-linux*.
14993 * linux-ppc64-low.c: New file.
14995 2005-05-23 Orjan Friberg <orjanf@axis.com>
14997 * linux-cris-low.c: New file with support for CRIS.
14998 * linux-crisv32-low.c: Ditto for CRISv32.
14999 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15000 (clean): Add reg-cris.c and reg-crisv32.c.
15001 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15002 reg-crisv32.o, and reg-crisv32.c to make rules.
15003 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15004 recognized targets.
15006 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15008 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15009 of sizeof (PTRACE_XFER_TYPE).
15010 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15012 2005-05-12 Orjan Friberg <orjanf@axis.com>
15014 * target.h (struct target_ops): Add insert_watchpoint,
15015 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15016 pointers for hardware watchpoint support.
15017 * linux-low.h (struct linux_target_ops): Ditto.
15018 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15019 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15020 to linux_target_ops.
15021 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15023 * server.c (main): Recognize 'Z' and 'z' packets.
15025 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15027 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15028 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15029 (the_low_target): Add new members.
15031 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15033 * proc-service.c (ps_lgetregs): Search all_processes instead of
15036 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15038 * server.c (start_inferior): Change return type to int.
15039 (attach_inferior): Change sigptr to int *.
15040 (handle_v_cont, handle_v_requests): Change signal to int *.
15041 (main): Change signal to int.
15043 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15045 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15046 * configure.srv: Add m32r*-*-linux*.
15047 * linux-m32r-low.c: New file.
15049 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15051 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15053 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15055 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15056 Take unsigned long arguments for PIDs.
15057 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15058 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15059 (wait_for_sigstop, linux_resume_one_process)
15060 (regsets_fetch_inferior_registers, linux_send_signal)
15061 (linux_read_auxv): Likewise. Update the types of variables holding
15062 PIDs. Update format string specifiers.
15063 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15064 * remote-utils.c (prepare_resume_reply): Likewise.
15065 * server.c (cont_thread, general_thread, step_thread)
15066 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15068 (handle_query): Update format specifiers.
15069 (handle_v_cont, main): Use strtoul for thread IDs.
15070 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15071 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15072 (general_thread, step_thread, thread_from_wait)
15073 (old_thread_from_wait): Update.
15074 * target.h (struct thread_resume): Use unsigned long for THREAD.
15075 (struct target_ops): Use unsigned long for arguments to attach and
15078 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15080 * acinclude.m4: Include bfd/bfd.m4 directly.
15081 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15082 <agriffis@toolchain.org>.
15083 * aclocal.m4, configure: Regenerated.
15085 2005-01-07 Andrew Cagney <cagney@gnu.org>
15087 * configure.ac: Rename configure.in, require autoconf 2.59.
15088 * configure: Re-generate.
15090 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15092 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15093 LIBS when finished.
15094 * aclocal.m4: Regenerated.
15095 * configure: Regenerated.
15097 2004-11-21 Andreas Schwab <schwab@suse.de>
15099 * linux-m68k-low.c (m68k_num_gregs): Define.
15100 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15101 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15102 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15103 (m68k_breakpoint_at): New. Add to the_low_target.
15105 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15106 srv_linux_thread_db to yes.
15108 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15110 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15111 (ARCH_SET_FS): Likewise.
15112 (ARCH_GET_FS): Likewise.
15113 (ARCH_GET_GS): Likewise.
15115 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15117 * linux-i386-low.c (ps_get_thread_area): New.
15118 * linux-x86-64-low.c (ps_get_thread_area): New.
15119 * linux-low.c: Include <sys/syscall.h>.
15120 (linux_kill_one_process): Don't kill the first thread here.
15121 (linux_kill): Kill the first thread here.
15122 (kill_lwp): New function.
15123 (send_sigstop, linux_send_signal): Use it.
15124 * proc-service.c: Clean up #ifdefs.
15125 (fpregset_info): Delete.
15126 (ps_lgetregs): Update and enable implementation.
15127 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15129 * remote-utils.c (struct sym_cache, symbol_cache): New.
15130 (input_interrupt): Print a clearer message.
15131 (async_io_enabled): New variable.
15132 (enable_async_io, disable_async_io): Use it. Update comments.
15133 (look_up_one_symbol): Use the symbol cache.
15134 * thread-db.c (thread_db_look_up_symbols): New function.
15135 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15137 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15139 * configure.in: Test for -rdynamic.
15140 * configure: Regenerated.
15141 * Makefile (INTERNAL_LDFLAGS): New.
15142 (gdbserver, gdbreplay): Use it.
15144 2004-09-02 Andrew Cagney <cagney@gnu.org>
15146 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15148 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15150 * linux-low.c (linux_wait): Clear all_processes list also.
15152 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15154 * linux-low.c: Include <errno.h>. Remove extern declaration of
15157 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15159 * gdbreplay.c, server.h, utils.c: Update copyright years.
15161 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15163 * server.c (main): Print child status or termination signal from
15164 variable 'signal', not 'sig'.
15166 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15168 * linux-low.c (linux_read_memory): Change return type to
15169 int. Check for and return error from ptrace().
15170 * target.c (read_inferior_memory): Change return type to int. Pass
15171 back return status from the_target->read_memory().
15172 * target.h (struct target_ops): Adapt *read_memory() prototype.
15174 (read_inferior_memory): Adapt prototype.
15175 * server.c (main): Return an error packet if
15176 read_inferior_memory() returns an error.
15178 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15180 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15181 Unify with other clean targets.
15183 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15185 * server.c (handle_v_cont): Call set_desired_inferior.
15187 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15189 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15191 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15193 * linux-low.c (linux_wait): Unblock async I/O.
15194 (linux_resume): Block and enable async I/O.
15195 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15196 * server.h (block_async_io, unblock_async_io): Add prototypes.
15198 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15200 * remote-utils.c (remote_open): Print a status notice after
15201 opening a TCP port.
15202 * server.c (attach_inferior): Print a status notice after
15205 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15207 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15209 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15211 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15213 * server.c, target.h: Update copyright years.
15215 2004-02-25 Roland McGrath <roland@redhat.com>
15217 * target.h (struct target_ops): New member `read_auxv'.
15218 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15219 * linux-low.c (linux_read_auxv): New function.
15220 (linux_target_ops): Initialize `read_auxv' member to that.
15222 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15224 Committed by Jim Blandy <jimb@redhat.com>.
15226 * linux-s390-low.c (s390_num_regs): Update.
15227 (s390_regmap): Remove control registers. Use __s390x__ predefine
15228 instead of GPR_SIZE to distiguish s390 and s390x targets.
15230 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15232 * linux-low.c: Update copyright year.
15233 (check_removed_breakpoint): Clear pending_is_breakpoint.
15234 (linux_set_resume_request, linux_queue_one_thread)
15235 (resume_status_pending_p): New functions.
15236 (linux_continue_one_thread): Use process->resume.
15237 (linux_resume): Only resume threads if there are no pending events.
15238 * linux-low.h (struct process_info): Add resume request
15241 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15243 * regcache.c (new_register_cache): Clear the allocated register
15244 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15246 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15248 * linux-low.c (linux_resume): Take a struct thread_resume *
15250 (linux_wait): Update call.
15251 (resume_ptr): New static variable.
15252 (linux_continue_one_thread): Renamed from
15253 linux_continue_one_process. Use resume_ptr.
15254 (linux_resume): Use linux_continue_one_thread.
15255 * server.c (handle_v_cont, handle_v_requests): New functions.
15256 (myresume): New function.
15257 (main): Handle 'v' case.
15258 * target.h (struct thread_resume): New type.
15259 (struct target_ops): Change argument of "resume" to struct
15261 (myresume): Delete macro.
15263 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15265 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15266 (uninstall): Support DESTDIR.
15268 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15270 * configure.srv: Add xscale*linux copy of arm*linux entry.
15272 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15274 * linux-arm-low.c (arm_reinsert_addr): New function.
15275 (the_low_target): Add arm_reinsert_addr.
15277 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15279 * mem-break.c: Remove whitespace at end of file.
15281 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15283 * configure.in: Check whether we need to prototype strerror.
15284 * server.h: Optionally prototype strerror.
15285 * gdbreplay.c (perror_with_name): Use strerror.
15286 * linux-low.c (linux_attach_lwp): Use strerror.
15287 * utils.c (perror_with_name): Use strerror.
15288 * config.in, configure: Regenerated.
15290 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15292 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15293 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15295 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15297 * Makefile.in (SFILES): Update.
15298 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15299 low-sun3.c: Remove files.
15301 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15303 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15304 (linux_detach_one_process, linux_detach): New functions.
15305 (linux_target_ops): Add linux_detach.
15306 * server.c (main): Handle 'D' packet.
15307 * target.h (struct target_ops): Add "detach" member.
15308 (detach_inferior): Define.
15310 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15312 From Kelley Cook <kelleycook@wideopenwest.com>:
15313 * configure.srv: Accept i[34567]86 variants.
15315 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15317 * linux-low.c (linux_wait_for_event): Correct comment typos.
15318 (linux_resume_one_process): Call check_removed_breakpoint.
15319 (linux_send_signal): New function.
15320 (linux_target_ops): Add linux_send_signal.
15321 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15323 * target.h (struct target_ops): Add send_signal.
15325 2003-05-29 Jim Blandy <jimb@redhat.com>
15327 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15328 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15329 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15330 away part of the register's value.
15332 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15334 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15335 (linux_wait_for_event, linux_init_signals): Likewise.
15337 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15339 * configure.in: Check for stdlib.h.
15340 * configure: Regenerated.
15341 * config.in: Regenerated.
15343 2003-01-04 Andreas Schwab <schwab@suse.de>
15345 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15347 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15349 * Makefile.in: Remove obsolete code.
15351 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15353 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15354 defined(PT_FPR0_HI).
15356 2002-11-17 Stuart Hughes <seh@zee2.com>
15358 * linux-arm-low.c (arm_num_regs): Increase.
15359 (arm_regmap): Include status register.
15361 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15363 * linux-low.c (register_addr): Remove incorrect -1 check.
15365 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15367 * linux-low.c (linux_create_inferior): Call setpgid. Return
15369 (unstopped_p, linux_signal_pid): Remove.
15370 (linux_target_ops): Remove linux_signal_pid.
15371 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15372 global instead of target method.
15373 * target.h (struct target_ops): Remove signal_pid. Update comment
15374 for create_inferior.
15375 * server.c (signal_pid): New variable.
15376 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15377 gdbserver. Set the child to be the foreground process group.
15378 (attach_inferior): Set signal_pid.
15380 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15382 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15384 2002-08-20 Jim Blandy <jimb@redhat.com>
15386 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15389 2002-08-01 Andrew Cagney <cagney@redhat.com>
15391 * Makefile.in: Make chill references obsolete.
15393 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15395 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15396 * configure: Regenerate.
15397 * config.in: Regenerate.
15399 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15401 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15402 (perror_with_name, remote_close, remote_open, expect, play): Static.
15404 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15406 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15407 byte offsets instead of an array of indexes.
15408 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15410 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15412 * regcache.c: Add comment.
15414 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15416 * thread-db.c: New file.
15417 * proc-service.c: New file.
15418 * acinclude.m4: New file.
15419 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15420 proc-service.o, and thread-db.o.
15421 (linux-low.o): Add USE_THREAD_DB.
15422 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15423 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15424 * aclocal.m4: Regenerated.
15425 * config.in: Regenerated.
15426 * configure: Regenerated.
15427 * configure.in: Check for proc_service.h, sys/procfs.h,
15428 thread_db.h, and linux/elf.h headrs.
15429 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15430 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15431 Check for -lthread_db and thread support.
15432 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15433 PowerPC, and SuperH.
15434 * i387-fp.c: Constify arguments.
15435 * i387-fp.h: Likewise.
15436 * inferiors.c: (struct thread_info): Renamed from
15437 `struct inferior_info'. Remove PID member. Use generic inferior
15438 list header. All uses updated.
15439 (inferiors, signal_pid): Removed.
15440 (all_threads): New variable.
15441 (get_thread): Define.
15442 (add_inferior_to_list): New function.
15443 (for_each_inferior): New function.
15444 (change_inferior_id): New function.
15445 (add_inferior): Removed.
15446 (remove_inferior): New function.
15447 (add_thread): New function.
15448 (free_one_thread): New function.
15449 (remove_thread): New function.
15450 (clear_inferiors): Use for_each_inferior and free_one_thread.
15451 (find_inferior): New function.
15452 (find_inferior_id): New function.
15453 (inferior_target_data): Update argument type.
15454 (set_inferior_target_data): Likewise.
15455 (inferior_regcache_data): Likewise.
15456 (set_inferior_regcache_data): Likewise.
15457 * linux-low.c (linux_bp_reinsert): Remove.
15458 (all_processes, stopping_threads, using_thrads)
15459 (struct pending_signals, debug_threads, pid_of): New.
15460 (inferior_pid): Replace with macro.
15461 (struct inferior_linux_data): Remove.
15462 (get_stop_pc, add_process): New functions.
15463 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15464 Use add_process and add_thread.
15465 (linux_attach_lwp): New function, based on old linux_attach. Use
15466 add_process and add_thread. Set stop_expected for new threads.
15467 (linux_attach): New function.
15468 (linux_kill_one_process): New function.
15469 (linux_kill): Kill all LWPs.
15470 (linux_thread_alive): Use find_inferior_id.
15471 (check_removed_breakpoints, status_pending_p): New functions.
15472 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15473 Update. Use WNOHANG. Wait for cloned processes also. Update process
15474 struct for the found process.
15475 (linux_wait_for_event): New function.
15476 (linux_wait): Use it. Support LWPs.
15477 (send_sigstop, wait_for_sigstop, stop_all_processes)
15478 (linux_resume_one_process, linux_continue_one_process): New functions.
15479 (linux_resume): Support LWPs.
15480 (REGISTER_RAW_SIZE): Remove.
15481 (fetch_register): Use register_size instead. Call supply_register.
15482 (usr_store_inferior_registers): Likewise. Call collect_register.
15483 Fix recursive case.
15484 (regsets_fetch_inferior_registers): Improve error message.
15485 (regsets_store_inferior_registers): Add debugging.
15486 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15487 (unstopped_p, linux_signal_pid): New functions.
15488 (linux_target_ops): Add linux_signal_pid.
15489 (linux_init_signals): New function.
15490 (initialize_low): Call it. Initialize using_threads.
15491 * regcache.c (inferior_regcache_data): Add valid
15493 (get_regcache): Fetch registers lazily. Add fetch argument
15494 and update all callers.
15495 (regcache_invalidate_one, regcache_invalidate): New
15497 (new_register_cache): Renamed from create_register_cache.
15498 Return the new regcache.
15499 (free_register_cache): Change argument to a void *.
15500 (registers_to_string, registers_from_string): Call get_regcache
15501 with fetch flag set.
15502 (register_data): Make static. Pass fetch flag to get_regcache.
15503 (supply_register): Call get_regcache with fetch flag clear.
15504 (collect_register): Call get_regcache with fetch flag set.
15505 (collect_register_as_string): New function.
15506 * regcache.h: Update.
15507 * remote-utils.c (putpkt): Flush after debug output and use
15509 Handle input interrupts while waiting for an ACK.
15510 (input_interrupt): Use signal_pid method.
15511 (getpkt): Flush after debug output and use stderr.
15512 (outreg): Use collect_register_as_string.
15513 (new_thread_notify, dead_thread_notify): New functions.
15514 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15515 and general_thread.
15516 (look_up_one_symbol): Flush after debug output.
15517 * server.c (step_thread, server_waiting): New variables.
15518 (start_inferior): Don't use signal_pid. Update call to mywait.
15519 (attach_inferior): Update call to mywait.
15520 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15521 (main): Don't fetch/store registers explicitly. Use
15522 set_desired_inferior. Support proposed ``Hs'' packet. Update
15524 * server.h: Update.
15525 (struct inferior_list, struct_inferior_list_entry): New.
15526 * target.c (set_desired_inferior): New.
15527 (write_inferior_memory): Constify.
15528 (mywait): New function.
15529 * target.h: Update.
15530 (struct target_ops): New signal_pid method.
15531 (mywait): Removed macro, added prototype.
15533 * linux-low.h (regset_func): Removed.
15534 (regset_fill_func, regset_store_func): New.
15535 (enum regset_type): New.
15536 (struct regset_info): Add type field. Use new operation types.
15537 (struct linux_target_ops): stop_pc renamed to get_pc.
15538 Add decr_pc_after_break and breakpoint_at.
15539 (get_process, get_thread_proess, get_process_thread)
15540 (strut process_info, all_processes, linux_attach_lwp)
15541 (thread_db_init): New.
15543 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15544 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15545 (the_low_target): Add new members.
15546 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15547 (i386_store_fpxregset): Constify.
15548 (target_regsets): Add new kind identifier.
15549 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15550 (i386_set_pc): Add debugging.
15551 (i386_breakpoint_at): New function.
15552 (the_low_target): Add new members.
15553 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15554 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15555 (mips_breakpoint_at): New.
15556 (the_low_target): Add new members.
15557 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15558 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15559 (the_low_target): Add new members.
15560 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15561 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15562 (the_low_target): Add new members.
15563 * linux-x86-64-low.c (target_regsets): Add new kind
15566 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15568 From Martin Pool <mbp@samba.org>:
15569 * server.c (gdbserver_usage): New function.
15572 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15574 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15575 stop_at -> stop_pc.
15577 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15579 * Makefile.in: Remove obsolete code.
15581 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15583 * linux-low.c (regsets_fetch_inferior_registers),
15584 (regsets_store_inferior_registers): Removed cast to int from
15586 * regcache.h: Added declaration of struct inferior_info.
15588 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15590 * inferiors.c (struct inferior_info): Add regcache_data.
15591 (add_inferior): Call create_register_cache.
15592 (clear_inferiors): Call free_register_cache.
15593 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15594 * regcache.c (struct inferior_regcache_data): New.
15595 (registers): Remove.
15596 (get_regcache): New function.
15597 (create_register_cache, free_register_cache): New functions.
15598 (set_register_cache): Don't initialize the register cache here.
15599 (registers_to_string, registers_from_string, register_data): Call
15601 * regcache.h: Add prototypes.
15602 * server.h: Likewise.
15604 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15606 * mem-break.c: New file.
15607 * mem-break.h: New file.
15608 * Makefile.in: Add mem-break.o rule; update server.h
15610 * inferiors.c (struct inferior_info): Add target_data
15612 (clear_inferiors): Free target_data member if set.
15613 (inferior_target_data, set_inferior_target_data): New functions.
15614 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15615 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15616 * linux-low.c (linux_bp_reinsert): New variable.
15617 (struct inferior_linux_data): New.
15618 (linux_create_inferior): Use set_inferior_target_data.
15619 (linux_attach): Likewise. Call add_inferior.
15620 (linux_wait_for_one_inferior): New function.
15621 (linux_wait): Call it.
15622 (linux_write_memory): Add const.
15623 (initialize_low): Call set_breakpoint_data.
15624 * linux-low.h (struct linux_target_ops): Add breakpoint
15626 * server.c (attach_inferior): Remove extra add_inferior
15628 * server.h: Include mem-break.h. Update inferior.c
15630 * target.c (read_inferior_memory)
15631 (write_inferior_memory): New functions.
15632 * target.h (read_inferior_memory)
15633 (write_inferior_memory): Change macros to prototypes.
15634 (struct target_ops): Update comments. Add const to write_memory
15637 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15639 * linux-low.c (usr_store_inferior_registers): Support
15640 registers which are allowed to fail to store.
15641 * linux-low.h (linux_target_ops): Likewise.
15642 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15643 (ppc_cannot_store_register): FPSCR may not be storable.
15645 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15647 * server.h: Include <string.h> if HAVE_STRING_H.
15648 * ChangeLog: Correct paths in last ChangeLog entry.
15650 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15652 * linux-low.h: Remove obsolete prototypes.
15653 (struct linux_target_ops): New.
15654 (extern the_low_target): New.
15655 * linux-low.c (num_regs, regmap): Remove declarations.
15656 (register_addr): Use the_low_target explicitly.
15657 (fetch_register): Likewise.
15658 (usr_fetch_inferior_registers): Likewise.
15659 (usr_store_inferior_registers): Likewise.
15660 * linux-arm-low.c (num_regs): Remove.
15661 (arm_num_regs): Define.
15662 (arm_regmap): Renamed from regmap, made static.
15663 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15665 (arm_cannot_store_register): Renamed from cannot_store_register,
15667 (the_low_target): New.
15668 * linux-i386-low.c (num_regs): Remove.
15669 (i386_num_regs): Define.
15670 (i386_regmap): Renamed from regmap, made static.
15671 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15673 (i386_cannot_store_register): Renamed from cannot_store_register,
15675 (the_low_target): New.
15676 * linux-ia64-low.c (num_regs): Remove.
15677 (ia64_num_regs): Define.
15678 (ia64_regmap): Renamed from regmap, made static.
15679 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15681 (ia64_cannot_store_register): Renamed from cannot_store_register,
15683 (the_low_target): New.
15684 * linux-m68k-low.c (num_regs): Remove.
15685 (m68k_num_regs): Define.
15686 (m68k_regmap): Renamed from regmap, made static.
15687 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15689 (m68k_cannot_store_register): Renamed from cannot_store_register,
15691 (the_low_target): New.
15692 * linux-mips-low.c (num_regs): Remove.
15693 (mips_num_regs): Define.
15694 (mips_regmap): Renamed from regmap, made static.
15695 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15697 (mips_cannot_store_register): Renamed from cannot_store_register,
15699 (the_low_target): New.
15700 * linux-ppc-low.c (num_regs): Remove.
15701 (ppc_num_regs): Define.
15702 (ppc_regmap): Renamed from regmap, made static.
15703 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15705 (ppc_cannot_store_register): Renamed from cannot_store_register,
15707 (the_low_target): New.
15708 * linux-s390-low.c (num_regs): Remove.
15709 (s390_num_regs): Define.
15710 (s390_regmap): Renamed from regmap, made static.
15711 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15713 (s390_cannot_store_register): Renamed from cannot_store_register,
15715 (the_low_target): New.
15716 * linux-sh-low.c (num_regs): Remove.
15717 (sh_num_regs): Define.
15718 (sh_regmap): Renamed from regmap, made static.
15719 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15721 (sh_cannot_store_register): Renamed from cannot_store_register,
15723 (the_low_target): New.
15724 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15725 (the_low_target): New.
15727 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15729 * Makefile.in: Add stamp-h target.
15730 * configure.in: Create stamp-h.
15731 * configure: Regenerated.
15733 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15735 * inferiors.c: New file.
15736 * target.c: New file.
15737 * target.h: New file.
15738 * Makefile.in: Add target.o and inferiors.o. Update
15740 * linux-low.c (inferior_pid): New static variable,
15741 moved from server.c.
15742 (linux_create_inferior): Renamed from create_inferior.
15743 Call add_inferior. Return 0 on success instead of a PID.
15744 (linux_attach): Renamed from myattach.
15745 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15746 (linux_thread_alive): Renamed from mythread_alive.
15747 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15749 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15750 (regsets_store_inferior_registers): Correct error message.
15751 Add missing ``return 0''.
15752 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15753 (linux_store_registers): Renamed from store_inferior_registers.
15754 (linux_read_memory): Renamed from read_inferior_memory.
15755 (linux_write_memory): Renamed from write_inferior_memory.
15756 (linux_target_ops): New structure.
15757 (initialize_low): Call set_target_ops ().
15758 * remote-utils.c (unhexify): New function.
15759 (hexify): New function.
15760 (input_interrupt): Send signals to ``signal_pid''.
15761 * server.c (inferior_pid): Remove.
15762 (start_inferior): Update create_inferior call.
15763 (attach_inferior): Call add_inferior.
15764 (handle_query): New function.
15765 (main): Call handle_query for `q' packets.
15766 * server.h: Include "target.h". Remove obsolete prototypes.
15767 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15769 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15771 * Makefile.in: Add WARN_CFLAGS. Update configury
15773 * configure.in: Check for <string.h>
15774 * configure: Regenerate.
15775 * config.in: Regenerate.
15776 * gdbreplay.c: Include needed system headers.
15777 (remote_open): Remove strchr prototype.
15778 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15779 * regcache.c (supply_register): Change buf argument to const void *.
15780 (supply_register_by_name): Likewise.
15781 (collect_register): Change buf argument to void *.
15782 (collect_register_by_name): Likewise.
15783 * regcache.h: Add missing prototypes.
15784 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15785 * server.c (handle_query): New function.
15786 (attached): New static variable, moved out of main.
15787 (main): Quiet longjmp clobber warnings.
15788 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15789 * utils.c (error): Remove NORETURN.