Use flexible target descriptors for aarch64
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2
3 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
4 * linux-aarch64-low.c (initialize_low_arch): Remove init.
5 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6
7 2017-11-24 Alan Hayward <alan.hayward@arm.com>
8
9 * configure.srv: Add new files.
10 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
11 aarch64_linux_read_description.
12 * linux-aarch64-low.c (aarch64_linux_read_description):
13 Merge with aarch64_arch_setup.
14 (aarch64_arch_setup): Call aarch64_linux_read_description.
15 * linux-aarch64-tdesc.c: New file.
16 * linux-aarch64-tdesc.h: New file.
17
18 2017-11-24 Yao Qi <yao.qi@linaro.org>
19
20 * configure.srv: Set $srv_regobj for tic6x-linux.
21 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
22 (tic6x_read_description): Move some code to tic6x_arch_setup.
23 (tic6x_tdesc_test): New function.
24 (initialize_low_arch): Call selftests::register_test.
25
26 2017-11-22 Yao Qi <yao.qi@linaro.org>
27
28 * remote-utils.c (prepare_resume_reply): Use memcpy.
29
30 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
31
32 * linux-low.c (kill_one_lwp_callback): Return void, take
33 argument directly, don't filter on pid.
34 (linux_kill): Use for_each_thread.
35
36 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
37
38 * linux-low.c (need_step_over_p): Return bool, remove dummy
39 argument.
40 (linux_resume, proceed_all_lwps): Use find_thread.
41
42 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
43
44 * linux-low.c (resume_status_pending_p): Return bool, remove
45 flag_p argument.
46 (linux_resume): Use find_thread.
47
48 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
49
50 * linux-low.c (struct thread_resume_array): Remove.
51 (linux_set_resume_request): Return void, take arguments
52 directly.
53 (linux_resume): Use for_each_thread.
54
55 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
56
57 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
58 return bool, remove data argument.
59 (linux_stabilize_threads): Use find_thread.
60
61 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
62
63 * linux-low.c (unsuspend_one_lwp): Remove.
64 (unsuspend_all_lwps): Use for_each_thread, inline code from
65 unsuspend_one_lwp.
66
67 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
68
69 * gdbthread.h (find_thread): Add overload with ptid_t filter.
70 * linux-low.c (struct iterate_over_lwps_args): Remove.
71 (iterate_over_lwps_filter): Remove.
72 (iterate_over_lwps): Use find_thread.
73
74 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
75
76 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
77 (linux_handle_new_gdb_connection): Use for_each_thread, inline
78 code from reset_lwp_ptrace_options_callback.
79
80 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
81
82 * linux-arm-low.c (struct update_registers_data): Remove.
83 (update_registers_callback): Return void, take arguments
84 directly, don't check thread's pid.
85 (arm_insert_point, arm_remove_point): Use for_each_thread.
86
87 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
88
89 * win32-low.c (continue_one_thread): Return void, take argument
90 directly.
91 (child_continue): Use for_each_thread.
92
93 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
94
95 * win32-i386-low.c (update_debug_registers_callback): Rename
96 to ...
97 (update_debug_registers): ... this, return void, remove pid_p arg.
98 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
99
100 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
101
102 * inferiors.h (struct process_info): Add constructor, initialize
103 fields..
104 <syscalls_to_catch>: Change type to std::vector<int>.
105 * inferiors.c (add_process): Allocate process_info with new.
106 (remove_process): Free process_info with delete.
107 * linux-low.c (handle_extended_wait): Adjust.
108 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
109 * server.c (handle_general_set): Adjust.
110
111 2017-11-16 Pedro Alves <palves@redhat.com>
112
113 * remote-utils.c (remote_close): Block SIGIO signals instead of
114 uninstalling the SIGIO handler.
115
116 2017-11-16 Alan Hayward <alan.hayward@arm.com>
117
118 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
119
120 2017-11-16 Yao Qi <yao.qi@linaro.org>
121
122 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
123 (tic6x_store_gregset): Likewise.
124 (tic6x_usrregs_info): Move it up.
125
126 2017-11-15 Alan Hayward <alan.hayward@arm.com>
127
128 * Makefile.in: Update arch rules.
129 * configure.srv: Explicitly mark arch/ files.
130
131 2017-11-13 Andreas Schwab <schwab@suse.de>
132
133 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
134 function.
135 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
136
137 2017-11-06 Pedro Alves <palves@redhat.com>
138
139 * config.in, configure: Regenerate.
140
141 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
142
143 * target.c (struct thread_search): Remove.
144 (thread_search_callback): Remove.
145 (prepare_to_access_memory): Use for_each_thread instead of
146 find_inferior. Inline code from thread_search_callback.
147
148 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
149
150 * server.c (struct visit_actioned_threads_data): Remove.
151 (visit_actioned_threads): Change prototype to take arguments
152 directly.
153 (resume): Use find_thread instead of find_inferior.
154
155 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
156
157 * server.c (queue_stop_reply_callback): Change prototype, return
158 void.
159 (find_status_pending_thread_callback): Remove.
160 (handle_status): Replace find_inferior with find_thread and
161 for_each_thread.
162
163 2017-10-25 Alan Hayward <alan.hayward@arm.com>
164
165 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
166 with REGNO.
167 (aarch64_store_gregset): Likewise.
168 (aarch64_fill_fpregset): Likewise.
169 (aarch64_store_fpregset): Likewise.
170
171 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
172
173 * gdbthread.h (find_thread, for_each_thread): New functions.
174 * inferiors.c (thread_of_pid): Remove.
175 (find_any_thread_of_pid): Use find_thread.
176 * linux-low.c (num_lwps): Use for_each_thread.
177
178 2017-10-17 Yao Qi <yao.qi@linaro.org>
179
180 * Makefile.in: Remove one rule.
181 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
182
183 2017-10-17 Yao Qi <yao.qi@linaro.org>
184
185 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
186 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
187
188 2017-10-17 Yao Qi <yao.qi@linaro.org>
189
190 * configure.srv: Rename arm.o with arch/arm.o.
191
192 2017-10-17 Yao Qi <yao.qi@linaro.org>
193
194 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
195 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
196 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
197 (arch-i386.o, arch-amd64.o): Remove rules.
198 (arch/%.o): New rule.
199 Update POSTCOMPILE and COMPILE.pre.
200 * configure.ac: Invoke AC_CONFIG_COMMANDS.
201 * configure: Re-generated.
202 * configure.srv: Replace arch-i386.o with arch/i386.o.
203 Replace arch-amd64.o with arch/amd64.o.
204
205 2017-10-16 Yao Qi <yao.qi@linaro.org>
206
207 * configure: Regenerated.
208
209 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
210
211 * inferiors.h: (struct inferior_list): Remove.
212 (struct inferior_list_entry); Remove.
213 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
214 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
215 get_first_inferior): Remove.
216 (for_each_inferior, for_each_inferior_with_data, find_inferior,
217 find_inferior_id, find_inferior_in_random): Change signature.
218 * inferiors.c (all_threads): Change type to
219 std::list<thread_info *>.
220 (get_thread): Remove macro.
221 (find_inferior, find_inferior_id): Change signature, implement
222 using find_thread.
223 (find_inferior_in_random): Change signature, implement using
224 find_thread_in_random.
225 (for_each_inferior, for_each_inferior_with_data): Change
226 signature, implement using for_each_thread.
227 (add_inferior_to_list, remove_inferior): Remove.
228 (add_thread, get_first_thread, thread_of_pid,
229 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
230 (get_first_inferior, one_inferior_p, clear_inferior_list):
231 Remove.
232 (clear_inferiors, get_thread_process): Update.
233 * gdbthread.h: Include <list>.
234 (struct thread_info) <entry>: Remove field.
235 <id>: New field.
236 (all_threads): Change type to std::list<thread_info *>.
237 (get_first_inferior): Add doc.
238 (find_thread, for_each_thread, find_thread_in_random): New
239 functions.
240 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
241 * linux-arm-low.c (update_registers_callback): Update.
242 * linux-low.c (second_thread_of_pid_p): Update.
243 (kill_one_lwp_callback, linux_detach_lwp_callback,
244 delete_lwp_callback, status_pending_p_callback, same_lwp,
245 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
246 iterate_over_lwps, not_stopped_callback,
247 resume_stopped_resumed_lwps, count_events_callback,
248 select_singlestep_lwp_callback, select_event_lwp_callback,
249 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
250 suspend_and_send_sigstop_callback, wait_for_sigstop,
251 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
252 lwp_running, linux_set_resume_request, resume_status_pending_p,
253 need_step_over_p, start_step_over, linux_resume_one_thread,
254 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
255 reset_lwp_ptrace_options_callback): Update.
256 * linux-mips-low.c (update_watch_registers_callback): Update.
257 * regcache.c (regcache_invalidate_one, regcache_invalidate):
258 Update.
259 (free_register_cache_thread_one): Remove.
260 (regcache_release): Update.
261 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
262 handle_qxfer_threads_worker): Update.
263 (handle_query): Update, use list iterator.
264 (visit_actioned_threads, handle_pending_status,
265 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
266 clear_pending_status_callback, set_pending_status_callback,
267 find_status_pending_thread_callback, handle_status,
268 process_serial_event): Update.
269 * target.c (thread_search_callback): Update.
270 * thread-db.c (thread_db_get_tls_address): Update.
271 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
272 Update.
273 * win32-i386-low.c (update_debug_registers_callback): Update.
274 * win32-low.c (delete_thread_info, child_delete_thread,
275 continue_one_thread, suspend_one_thread,
276 get_child_debug_event): Adjust.
277
278 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
279
280 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
281 * inferiors.h: Include <list>.
282 (struct process_info) <entry>: Remove field.
283 <pid>: New field.
284 (pid_of): Change macro to function.
285 (ptid_of, lwpid_of): Remove macro.
286 (all_processes): Change type to std::list<process_info *>.
287 (ALL_PROCESSES): Remove macro.
288 (for_each_process, find_process): New function.
289 * inferiors.c (all_processes): Change type to
290 std::list<process_info *>.
291 (find_thread_process): Adjust.
292 (add_process): Likewise.
293 (remove_process): Likewise.
294 (find_process_pid): Likewise.
295 (get_first_process): Likewise.
296 (started_inferior_callback): Remove.
297 (have_started_inferiors_p): Adjust.
298 (attached_inferior_callback): Remove.
299 (have_attached_inferiors_p): Adjust.
300 * linux-low.c (check_zombie_leaders): Likewise.
301 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
302 (x86_linux_update_xmltarget): Adjust.
303 * server.c (handle_query): Likewise.
304 (gdb_reattached_process): Remove.
305 (handle_status): Adjust.
306 (kill_inferior_callback): Likewise.
307 (detach_or_kill_inferior): Remove.
308 (print_started_pid): Likewise.
309 (print_attached_pid): Likewise.
310 (detach_or_kill_for_exit): Update.
311 (process_serial_event): Likewise.
312 * linux-arm-low.c (arm_new_fork): Likewise.
313
314 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
315
316 * dll.h: Include <list>.
317 (struct dll_info): Add constructor.
318 <entry>: Remove field.
319 (all_dlls): Change type to std::list<dll_info>.
320 * dll.c: Include <algorithm>.
321 (get_dll): Remove macro.
322 (all_dlls): Change type to std::list<dll_info *>.
323 (free_one_dll): Remove.
324 (match_dll): Likewise.
325 (loaded_dll): Adjust.
326 (unloaded_dll): Adjust to all_dlls type change, use
327 std::find_if. Inline code from match_dll.
328 (clear_dlls): Adjust to all_dlls type change.
329 * server.c (emit_dll_description): Remove.
330 (handle_qxfer_libraries): Adjust to all_dlls type change,
331 integrate emit_dll_description's functionality.
332
333 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
334
335 * linux-low.h (struct linux_target_ops) <delete_process>: New
336 field.
337 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
338 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
339 (struct linux_target_ops): Add delete_process callback.
340 * linux-arm-low.c (arm_delete_process): New.
341 (struct linux_target_ops): Add delete_process callback.
342 * linux-bfin-low.c (struct linux_target_ops): Likewise.
343 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
344 * linux-m32r-low.c (struct linux_target_ops): Likewise.
345 * linux-mips-low.c (mips_linux_delete_process): New.
346 (struct linux_target_ops): Add delete_process callback.
347 * linux-ppc-low.c (struct linux_target_ops): Likewise.
348 * linux-s390-low.c (struct linux_target_ops): Likewise.
349 * linux-sh-low.c (struct linux_target_ops): Likewise.
350 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
351 * linux-tile-low.c (struct linux_target_ops): Likewise.
352 * linux-x86-low.c (x86_linux_delete_process): New.
353 (struct linux_target_ops): Add delete_process callback.
354 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
355
356 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
357
358 * linux-aarch64-low.c (the_low_target): Add thread delete
359 callback.
360 * linux-arm-low.c (arm_delete_thread): New function.
361 (the_low_target): Add thread delete callback.
362 * linux-bfin-low.c (the_low_target): Likewise.
363 * linux-crisv32-low.c (the_low_target): Likewise.
364 * linux-low.c (delete_lwp): Invoke delete_thread callback if
365 set.
366 * linux-low.h (struct linux_target_ops) <delete_thread>: New
367 field.
368 * linux-m32r-low.c (the_low_target): Add thread delete callback.
369 * linux-mips-low.c (mips_linux_delete_thread): New function.
370 (the_low_target): Add thread delete callback.
371 * linux-ppc-low.c (the_low_target): Likewise.
372 * linux-s390-low.c (the_low_target): Likewise.
373 * linux-sh-low.c (the_low_target): Likewise.
374 * linux-tic6x-low.c (the_low_target): Likewise.
375 * linux-tile-low.c (the_low_target): Likewise.
376 * linux-x86-low.c (the_low_target): Likewise.
377 * linux-xtensa-low.c (the_low_target): Likewise.
378
379 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
380
381 * win32-low.c: Include "common-inferior.h".
382
383 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
384
385 * inferiors.c (set_inferior_cwd): New function.
386 * server.c (handle_general_set): Handle QSetWorkingDir packet.
387 (handle_query): Inform that QSetWorkingDir is supported.
388 * win32-low.c (create_process): Pass the inferior's cwd to
389 CreateProcess.
390
391 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
392
393 * inferiors.c (current_inferior_cwd): New global variable.
394 (get_inferior_cwd): New function.
395 * inferiors.h (struct process_info) <cwd>: New field.
396
397 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
398
399 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
400 (OBS): Add gdb_tilde_expand.o.
401
402 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
403
404 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
405 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
406
407 2017-09-29 Pedro Alves <palves@redhat.com>
408
409 * ax.c (gdb_parse_agent_expr): Constify.
410 * ax.h (gdb_parse_agent_expr): Constify.
411 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
412 Constify.
413 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
414 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
415 * remote-utils.h (read_ptid): Constify.
416 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
417 (process_point_options, process_serial_event): Constify.
418 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
419 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
420 (cmd_qtbuffer): Constify.
421
422 2017-09-29 Pedro Alves <palves@redhat.com>
423
424 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
425 fails.
426
427 2017-09-29 Pedro Alves <palves@redhat.com>
428
429 * linux-low.c (handle_extended_wait): Pass parent thread instead
430 of process to thread_db_notice_clone.
431 * linux-low.h (thread_db_notice_clone): Replace parent process
432 parameter with parent thread parameter.
433 * thread-db.c (find_one_thread): Add comment.
434 (thread_db_notice_clone): Replace parent process parameter with
435 parent thread parameter. Temporarily switch to the parent thread.
436
437 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
438
439 * gdbthread.h: Include "common-gdbthread.h".
440 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
441 "if" when validating the ptid.
442 * remote-utils.c: Include "gdbthread.h".
443 (prepare_resume_reply): Use "switch_to_thread".
444 * target.c (done_accessing_memory): Likewise.
445
446 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
447
448 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
449 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
450 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
451 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
452 s390x-gs-linux64-ipa.o to ipa_obj.
453 * linux-s390-low.c (HWCAP_S390_GS): New define.
454 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
455 New functions.
456 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
457 (s390_arch_setup): Check for guarded-storage support and choose
458 appropriate tdesc.
459 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
460 init_registers_s390x_gs_linux64.
461 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
462 enum value.
463 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
464 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
465
466 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
467
468 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
469
470 2017-09-21 Kevin Buettner <kevinb@redhat.com>
471
472 * linux-low.h (struct lwp_info): Add new field, thread_handle.
473 (thread_db_thread_handle): Declare.
474 * linux-low.c (linux_target_ops): Initialize thread_handle.
475 * server.c (handle_qxfer_threads_worker): Add support for
476 "handle" attribute.
477 * target.h (struct target_ops): Add new function pointer,
478 thread_handle.
479 (target_thread_handle): Define.
480 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
481 field in lwp.
482 (thread_db_thread_handle): New function.
483
484 2017-09-21 Kevin Buettner <kevinb@redhat.com>
485
486 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
487 * linux-low.h (thread_db_notice_clone): Declare.
488 * thread-db.c (thread_db_notice_clone): New function.
489
490 2017-09-21 Pedro Alves <palves@redhat.com>
491
492 * server.c (gdb_read_memory, handle_status, process_serial_event)
493 (handle_serial_event, handle_target_event): Adjust to
494 set_desired_thread prototype change.
495 * target.c (set_desired_thread): Remove 'use_general' parameter
496 and adjust.
497 * target.h (set_desired_thread): Remove 'use_general' parameter.
498
499 2017-09-20 Tom Tromey <tom@tromey.com>
500
501 * target.c (target_terminal::terminal_state): Define.
502 (target_terminal::init): Rename from target_terminal_init.
503 (target_terminal::inferior): Rename from
504 target_terminal_inferior.
505 (target_terminal::ours): Rename from target_terminal_ours.
506 (target_terminal::ours_for_output, target_terminal::info): New.
507
508 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
509
510 * server.c (accumulate_file_name_length): Remove.
511 (emit_dll_description): Adjust to std::string change.
512 (handle_qxfer_libraries): Use std::string to hold document.
513
514 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
515
516 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
517 return type of xml_escape_text.
518 * server.c (emit_dll_description): Likewise.
519
520 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
521
522 * server.c (captured_main): Accept argument for --selftest.
523 Update run_tests call.
524 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
525 when registering selftests.
526
527 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
528
529 * regcache.c (get_thread_regcache): Update code to use "std::vector"
530 instead of "VEC" for "target_desc.reg_defs".
531 (regcache_cpy): Likewise.
532 (registers_to_string): Likewise.
533 (registers_from_string): Likewise.
534 (find_regno): Likewise.
535 (supply_regblock): Likewise.
536 (regcache_raw_read_unsigned): Likewise.
537 * tdesc.c (init_target_desc): Likewise.
538 (tdesc_create_reg): Likewise.
539 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
540 (struct target_desc) <reg_defs>: Convert to "std::vector".
541 (target_desc): Do not initialize "reg_defs".
542 (~target_desc): Update code to use "std::vector" instead of "VEC"
543 for "target_desc.reg_defs".
544 (operator==): Likewise.
545
546 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
547
548 * inferiors.h (thread_to_gdb_id): Remove.
549 * inferiors.c (thread_to_gdb_id): Remove.
550 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
551 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
552 lynx_store_registers, lynx_read_memory, lynx_write_memory):
553 Likewise.
554 * nto-low.c (nto_fetch_registers, nto_store_registers,
555 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
556
557 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
558
559 * inferiors.h (gdb_id_to_thread_id): Remove.
560 * inferiors.c (gdb_id_to_thread_id): Remove.
561 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
562 removal. Move pid declaration closer to where it's used.
563
564 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
565
566 * server.c (handle_detach): New function.
567 (process_serial_event): Move code out, call handle_detach.
568
569 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
570
571 * server.c (require_running): Rename to ...
572 (require_running_or_return): ... this ...
573 (require_running_or_break): ... and this.
574 (handle_query, process_serial_event): Adjust.
575
576 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
577
578 * linux-low.c (linux_set_resume_request): Remove unused
579 variables.
580
581 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
582
583 * server.c (first_thread_of): Remove.
584 (process_serial_event): Replace usage of first_thread_of with
585 find_any_thread_of_pid.
586 * tracepoint.c (same_process_p): Remove.
587 (gdb_agent_about_to_close): Replace usage of same_process_p with
588 find_any_thread_of_pid.
589 * linux-x86-low.c (same_process_callback): Remove.
590 (x86_arch_setup_process_callback): Replace usage of
591 same_process_callback with find_any_thread_of_pid.
592 * thread-db.c (any_thread_of): Remove.
593 (switch_to_process): Replace usage of any_thread_of with
594 find_any_thread_of_pid.
595 * inferiors.c (thread_pid_matches_callback): Remove.
596 (find_thread_process): Adjust to use find_any_thread_of_pid.
597
598 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
599
600 * regcache.c (get_thread_regcache): Guard calls to "memset"
601 with "!VEC_empty".
602
603 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
604
605 * linux-low.c (handle_extended_wait): Use
606 "allocate_target_description" instead of "XNEW".
607 * linux-x86-low.c (initialize_low_arch): Likewise.
608
609 2017-09-05 Yao Qi <yao.qi@linaro.org>
610
611 * configure.srv (srv_i386_regobj): Remove.
612 (srv_amd64_regobj): Remove.
613 (srv_regobj): Set it to "" for x86 non-linux targets.
614 * linux-x86-tdesc.c (i386_linux_read_description):
615 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
616 (init_registers_i386): Remove the declaration.
617 (tdesc_i386): Remove the declaration.
618 (lynx_i386_arch_setup): Call i386_create_target_description.
619 * nto-x86-low.c: Likewise.
620 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
621 [!__x86_64__]: include arch/i386.h.
622 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
623
624 2017-09-05 Yao Qi <yao.qi@linaro.org>
625
626 * configure.srv (srv_amd64_linux_xmlfiles): Remove
627 i386/amd64-XXX-linux from it.
628
629 2017-09-05 Yao Qi <yao.qi@linaro.org>
630
631 * configure.srv: Empty srv_amd64_linux_regobj if $development is
632 false.
633 (ipa_amd64_linux_regobj): Remove.
634 (ipa_x32_linux_regobj): Remove.
635
636 2017-09-05 Yao Qi <yao.qi@linaro.org>
637
638 * Makefile.in (arch-amd64.o): New rule.
639 * configure.srv: Append arch-amd64.o.
640 * linux-amd64-ipa.c: Include common/x86-xstate.h.
641 (get_ipa_tdesc): Call amd64_linux_read_description.
642 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
643 and init_registers_amd64_XXX.
644 * linux-x86-low.c (x86_linux_read_description): Call
645 amd64_linux_read_description.
646 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
647 (initialize_low_arch): Don't call init_registers_x32_XXX and
648 init_registers_amd64_XXX.
649 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
650 and tdesc_amd64_XXX.
651 [__x86_64__] (amd64_tdesc_test): New function.
652 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
653 and init_registers_amd64_XXX.
654 * linux-x86-tdesc.c: Include arch/amd64.h.
655 (xcr0_to_tdesc_idx): New function.
656 (i386_linux_read_description): New function.
657 (amd64_get_ipa_tdesc_idx): New function.
658 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
659 (amd64_get_ipa_tdesc): Declare.
660
661 2017-09-05 Yao Qi <yao.qi@linaro.org>
662
663 * configure.srv (srv_i386_linux_xmlfiles): Remove
664 i386/i386-XXX-linux.xml from it.
665
666 2017-09-05 Yao Qi <yao.qi@linaro.org>
667
668 * configure.srv: Set srv_i386_linux_regobj empty if $development
669 is false.
670 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
671 initialize_low_tdesc.
672 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
673 with #if initialize_low_tdesc.
674 * linux-x86-tdesc-selftest.c: New file.
675 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
676
677 2017-09-05 Yao Qi <yao.qi@linaro.org>
678
679 * Makefile.in (arch-i386.o): New rule.
680 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
681 (x86_64-*-linux*): Likewise.
682 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
683 include arch/i386.h.
684 (i386_linux_read_description): Remove code and call
685 i386_create_target_description.
686 * tdesc.c (allocate_target_description): New function.
687 * tdesc.h (set_tdesc_architecture): Remove declaration.
688 (set_tdesc_osabi): Likewise.
689
690 2017-09-05 Yao Qi <yao.qi@linaro.org>
691
692 * linux-x86-tdesc.c: Don't include <inttypes.h>.
693 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
694 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
695 .xmltarget.
696 * server.c (get_features_xml): Call tdesc_get_features_xml.
697 * tdesc.c (set_tdesc_architecture): New function.
698 (set_tdesc_osabi): New function.
699 (tdesc_get_features_xml): New function.
700 (tdesc_create_feature): Add an argument.
701 * tdesc.h (struct target_desc) <features>: New field.
702 <arch, osabi>: New field.
703 (~target_desc): xfree features, arch, and osabi.
704 (target_desc::oerator==): Don't compare .xmltarget.
705 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
706 (set_tdesc_osabi): Likewise.
707 (tdesc_get_features_xml): Likewise.
708
709 2017-09-05 Yao Qi <yao.qi@linaro.org>
710
711 * linux-x86-tdesc.c: Include selftest.h.
712 (i386_tdesc_test): New function.
713 (initialize_low_tdesc): Call selftests::register_test.
714 * tdesc.h: Include regdef.h.
715 (target_desc): Override operator == and !=.
716
717 2017-09-05 Yao Qi <yao.qi@linaro.org>
718
719 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
720 (ipa_obj): Likewise.
721 * linux-i386-ipa.c: Include common/x86-xstate.h
722 (get_ipa_tdesc): Call i386_linux_read_description.
723 (initialize_low_tracepoint): Don't call init_registers_XXX
724 functions, call initialize_low_tdesc instead.
725 * linux-x86-low.c (x86_linux_read_description): Call
726 i386_linux_read_description.
727 (initialize_low_arch): Don't call init_registers_i386_XXX
728 functions, call initialize_low_tdesc.
729 * linux-x86-tdesc.c: New file.
730 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
731 (i386_get_ipa_tdesc_idx): Declare.
732 (i386_get_ipa_tdesc): Declare.
733 (initialize_low_tdesc): Declare.
734
735 2017-09-05 Yao Qi <yao.qi@linaro.org>
736
737 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
738 instead of 0.
739
740 2017-09-05 Yao Qi <yao.qi@linaro.org>
741
742 * Makefile.in (IPA_OBJS): Add vec-ipa.o
743 * regcache.c (get_thread_regcache): Use VEC_length.
744 (init_register_cache): Likewise.
745 (regcache_cpy): Likewise.
746 (registers_to_string): Iterate reg_defs via VEC_iterate.
747 (find_regno): Likewise.
748 (find_register_by_number): Use VEC_index.
749 (register_size): Call find_register_by_number.
750 (register_data): Call find_register_by_number.
751 (supply_regblock): Use VEC_length.
752 (regcache_raw_read_unsigned): Likewise.
753 * tdesc.c (init_target_desc): Iterate reg_defs via
754 VEC_iterate.
755 (default_description): Update initializer.
756 (copy_target_description): Don't update field num_registers.
757 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
758 <num_registers>: Remove.
759
760 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
761
762 * Makefile.in (.SECONDARY): Define target.
763
764 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
765
766 * linux-low.c (linux_wait_1): Adjust.
767 * server.c (queue_stop_reply_callback): Adjust.
768
769 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
770
771 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
772 QEnvironmentUnset and QEnvironmentReset packets.
773 (handle_query): Inform remote that QEnvironmentHexEncoded,
774 QEnvironmentUnset and QEnvironmentReset are supported.
775
776 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
777
778 * inferiors.h (inferior_target_data): Rename to ...
779 (thread_target_data): ... this.
780 (inferior_regcache_data): Rename to ...
781 (thread_regcache_data): ... this.
782 (set_inferior_regcache_data): Rename to ...
783 (set_thread_regcache_data): ... this.
784 * inferiors.c (inferior_target_data): Rename to ...
785 (thread_target_data): ... this.
786 (inferior_regcache_data): Rename to ...
787 (thread_regcache_data): ... this.
788 (set_inferior_regcache_data): Rename to ...
789 (set_thread_regcache_data): ... this.
790 (free_one_thread): Update.
791 * linux-low.h (get_thread_lwp): Update.
792 * regcache.c (get_thread_regcache): Update.
793 (regcache_invalidate_thread): Update.
794 (free_register_cache_thread): Update.
795 * win32-i386-low.c (update_debug_registers_callback): Update.
796 (win32_get_current_dr): Update.
797 * win32-low.c (thread_rec): Update.
798 (delete_thread_info): Update.
799 (continue_one_thread): Update.
800 (suspend_one_thread): Update.
801
802 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
803
804 * inferiors.c (set_inferior_target_data): Remove.
805 * inferiors.h (set_inferior_target_data): Remove.
806
807 2017-08-18 Yao Qi <yao.qi@linaro.org>
808
809 * Makefile.in (OBS): Add selftest.o.
810 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
811 * configure, config.in: Re-generated.
812 * server.c: Include common/sefltest.h.
813 (captured_main): Handle option --selftest.
814
815 2017-08-09 Yao Qi <yao.qi@linaro.org>
816
817 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
818 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
819 i386-avx-mpx.o and i386-mmx.o.
820 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
821 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
822 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
823 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
824 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
825 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
826 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
827 i386/amd64-avx-mpx.xml.
828
829 2017-08-09 Yao Qi <yao.qi@linaro.org>
830
831 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
832 and x32-avx-avx512.o.
833 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
834 i386/x32-avx-avx512.xml.
835
836 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
837
838 * tracepoint.h (enum class fast_tpoint_collect_result): New
839 enumeration.
840 (fast_tracepoint_collecting): Change return type to
841 fast_tpoint_collect_result.
842 * tracepoint.c (fast_tracepoint_collecting): Likewise.
843 * linux-low.h: Include tracepoint.h.
844 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
845 fast_tpoint_collect_result.
846 * linux-low.c (handle_tracepoints): Adjust.
847 (linux_fast_tracepoint_collecting): Change return type to
848 fast_tpoint_collect_result.
849 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
850 linux_wait_1, stuck_in_jump_pad_callback,
851 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
852 proceed_one_lwp): Adjust to type change.
853
854 2017-07-10 Yao Qi <yao.qi@linaro.org>
855
856 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
857
858 2017-06-29 Yao Qi <yao.qi@linaro.org>
859
860 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
861 Remove.
862 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
863
864 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
865
866 * Makefile.in (IPA_OBJS): Sort and format one item per line.
867
868 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
869
870 * linux-low.c (linux_create_inferior): Adjust code to access the
871 environment information via 'gdb_environ' class.
872 * lynx-low.c (lynx_create_inferior): Likewise.
873 * server.c (our_environ): Make it an instance of 'gdb_environ'.
874 (get_environ): Return a pointer to 'our_environ'.
875 (captured_main): Initialize 'our_environ'.
876 * server.h (get_environ): Adjust prototype.
877 * spu-low.c (spu_create_inferior): Adjust code to access the
878 environment information via 'gdb_environ' class.
879
880 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
881
882 * linux-low.c (linux_read_memory, linux_write_memory): Remove
883 usage of "register" keyword.
884
885 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
886
887 * configure: Re-generate.
888
889 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
890
891 * configure: Re-generate.
892
893 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
894
895 * Makefile.in (COMPILE.pre): Add "-x c++".
896
897 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
898
899 * fork-child.c: Conditionally include <signal.h>.
900
901 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
902
903 * server.c (handle_general_set): Handle new packet
904 "QStartupWithShell".
905 (handle_query): Add "QStartupWithShell" to the list of supported
906 packets.
907 (gdbserver_usage): Add help text explaining the
908 new "--startup-with-shell" and "--no-startup-with-shell" CLI
909 options.
910 (captured_main): Recognize and act upon the presence of the new
911 CLI options.
912
913 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
914 Pedro Alves <palves@redhat.com>
915
916 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
917 * configure: Regenerate.
918 * configure.srv (srv_linux_obj): Add "fork-child.o" and
919 "fork-inferior.o".
920 (i[34567]86-*-lynxos*): Likewise.
921 (spu*-*-*): Likewise.
922 * fork-child.c: New file.
923 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
924 and "environ.h".
925 (linux_ptrace_fun): New function.
926 (linux_create_inferior): Adjust function prototype to reflect
927 change on "target.h". Adjust function code to use
928 "fork_inferior".
929 (linux_request_interrupt): Delete "signal_pid".
930 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
931 (lynx_ptrace_fun): New function.
932 (lynx_create_inferior): Adjust function prototype to reflect
933 change on "target.h". Adjust function code to use
934 "fork_inferior".
935 * nto-low.c (nto_create_inferior): Adjust function prototype and
936 code to reflect change on "target.h". Update comments.
937 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
938 "common-terminal.h" and "environ.h".
939 (terminal_fd): Moved to fork-child.c.
940 (old_foreground_pgrp): Likewise.
941 (restore_old_foreground_pgrp): Likewise.
942 (last_status): Make it global.
943 (last_ptid): Likewise.
944 (our_environ): New variable.
945 (startup_with_shell): Likewise.
946 (program_name): Likewise.
947 (program_argv): Rename to...
948 (program_args): ...this.
949 (wrapper_argv): New variable.
950 (start_inferior): Delete function.
951 (get_exec_wrapper): New function.
952 (get_exec_file): Likewise.
953 (get_environ): Likewise.
954 (prefork_hook): Likewise.
955 (post_fork_inferior): Likewise.
956 (postfork_hook): Likewise.
957 (postfork_child_hook): Likewise.
958 (handle_v_run): Update code to deal with arguments coming from the
959 remote host. Update calls from "start_inferior" to
960 "create_inferior".
961 (captured_main): Likewise. Initialize environment variable. Call
962 "have_job_control".
963 * server.h (post_fork_inferior): New prototype.
964 (get_environ): Likewise.
965 (last_status): Declare.
966 (last_ptid): Likewise.
967 (signal_pid): Likewise.
968 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
969 (spu_ptrace_fun): New function.
970 (spu_create_inferior): Adjust function prototype to reflect change
971 on "target.h". Adjust function code to use "fork_inferior".
972 * target.c (target_terminal_init): New function.
973 (target_terminal_inferior): Likewise.
974 (target_terminal_ours): Likewise.
975 * target.h: Include <vector>.
976 (struct target_ops) <create_inferior>: Update prototype.
977 (create_inferior): Update macro.
978 * utils.c (gdb_flush_out_err): New function.
979 * win32-low.c (win32_create_inferior): Adjust function prototype
980 and code to reflect change on "target.h".
981
982 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
983
984 * inferiors.c (switch_to_thread): New function.
985
986 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
987
988 * Makefile.in (SFILE): Add "common/job-control.c".
989 (OBS): Add "job-control.o".
990
991 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
992
993 * Makefile: Remove "@host_makefile_frag@".
994
995 2017-05-05 Pedro Alves <palves@redhat.com>
996
997 * configure: Regenerate.
998
999 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1000
1001 * configure: Regenerate.
1002
1003 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1004
1005 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1006 software_single_step change of return type to
1007 std::vector<CORE_ADDR>.
1008 * linux-low.c (install_software_single_step_breakpoints):
1009 Likewise.
1010 * linux-low.h (install_software_single_step_breakpoints):
1011 Likewise.
1012
1013 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1014
1015 * remote-utils.c: Include "gdb_termios.h" instead of
1016 "terminal.h".
1017 * terminal.h: Delete file.
1018
1019 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1020
1021 * server.c: Include <vector>.
1022 <program_argv, wrapper_argv>: Convert to std::vector.
1023 (start_inferior): Rewrite function to use C++.
1024 (handle_v_run): Likewise. Update code that calculates the argv
1025 based on the vRun packet; use C++.
1026 (captured_main): Likewise.
1027
1028 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1029
1030 * server.c (handle_v_cont): Initialize thread_resume::thread
1031 with null_ptid.
1032
1033 2017-04-05 Pedro Alves <palves@redhat.com>
1034
1035 * configure: Regenerate.
1036
1037 2017-04-05 Pedro Alves <palves@redhat.com>
1038
1039 * gdbreplay.c (sync_error): Constify.
1040 * linux-x86-low.c (push_opcode): Constify.
1041
1042 2017-04-05 Pedro Alves <palves@redhat.com>
1043
1044 * win32-low.c (get_child_debug_event)
1045 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1046 Report TARGET_WAITKIND_SPURIOUS instead.
1047
1048 2017-04-05 Pedro Alves <palves@redhat.com>
1049
1050 * remote-utils.c (remote_prepare, remote_open): Constify.
1051 * remote-utils.h (remote_prepare, remote_open): Constify.
1052 * server.c (captured_main): Constify 'port' handling.
1053
1054 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1055
1056 * Makefile.in (clean): Clear .deps.
1057
1058 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1059
1060 * .gitignore: Remove generated files, replace with wildcard.
1061 * (clean): Replace removal of generated files with wildcard.
1062 (version.c): Replace with...
1063 (version-generated.c): ...this.
1064 (xml-builtin.c): Replace with...
1065 (xml-builtin-generated.c): ...this.
1066 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1067 (%.c: *regformats*): Replace with...
1068 (%-generated.c: *regformats*): ...this.
1069
1070 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1071
1072 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1073 (xtensa_fill_gregset): Call collect_register_by_name for
1074 threadptr register.
1075 (xtensa_store_gregset): Call supply_register_by_name for
1076 threadptr register.
1077
1078 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1079
1080 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1081 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1082 (xtensa_store_gregset): Call supply_register for all registers in
1083 a0_regnum..a0_regnum + C0_NREGS range.
1084
1085 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1086
1087 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1088 (ax-ipa.o: ax.c): Remove.
1089 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1090 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1091 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1092 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1093 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1094
1095 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1096
1097 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1098 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1099 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1100 (errors-ipa.o: ../common/errors.c): Remove.
1101 (format-ipa.o: ../common/format.c): Remove.
1102 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1103
1104 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1105
1106 * Makefile.in (%-ipa.o: %.c): New rule.
1107 (tracepoint-ipa.o: tracepoint.c): Remove.
1108 (utils-ipa.o: utils.c): Remove.
1109 (remote-utils-ipa.o: remote-utils.c): Remove.
1110 (regcache-ipa.o: regcache.c): Remove.
1111 (i386-linux-ipa.o: i386-linux.c): Remove.
1112 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1113 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1114 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1115 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1116 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1117 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1118 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1119 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1120 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1121 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1122 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1123 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1124 (aarch64-ipa.o: aarch64.c): Remove.
1125 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1126 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1127 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1128 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1129 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1130 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1131 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1132 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1133 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1134 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1135 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1136 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1137 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1138 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1139 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1140 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1141 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1142 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1143 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1144 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1145 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1146 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1147 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1148 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1149 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1150 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1151 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1152 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1153 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1154 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1155 (tdesc-ipa.o: tdesc.c): Remove.
1156 (x32-linux-ipa.o: x32-linux.c): Remove.
1157 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1158 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1159
1160 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1161
1162 * Makefile.in (%.o: ../arch/%.c): New rule.
1163 (arm.o: ../arch/arm.c): Remove.
1164 (arm-linux.o: ../arch/arm-linux.c): Remove.
1165 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1166 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1167
1168 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1169
1170 * Makefile.in (%.o: ../nat/%.c): New rule.
1171 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1172 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1173 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1174 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1175 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1176 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1177 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1178 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1179 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1180 (linux-personality.o: ../nat/linux-personality.c): Remove.
1181 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1182 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1183 (x86-linux.o: ../nat/x86-linux.c): Remove.
1184 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1185 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1186
1187 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1188
1189 * Makefile.in (%.o: ../common/%.c): New rule.
1190 (signals.o: ../common/signals.c): Remove.
1191 (print-utils.o: ../common/print-utils.c): Remove.
1192 (rsp-low.o: ../common/rsp-low.c): Remove.
1193 (common-utils.o: ../common/common-utils.c): Remove.
1194 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1195 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1196 (vec.o: ../common/vec.c): Remove.
1197 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1198 (xml-utils.o: ../common/xml-utils.c): Remove.
1199 (ptid.o: ../common/ptid.c): Remove.
1200 (buffer.o: ../common/buffer.c): Remove.
1201 (format.o: ../common/format.c): Remove.
1202 (filestuff.o: ../common/filestuff.c): Remove.
1203 (agent.o: ../common/agent.c): Remove.
1204 (errors.o: ../common/errors.c): Remove.
1205 (environ.o: ../common/environ.c): Remove.
1206 (common-debug.o: ../common/common-debug.c): Remove.
1207 (cleanups.o: ../common/cleanups.c): Remove.
1208 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1209 (fileio.o: ../common/fileio.c): Remove.
1210 (common-regcache.o: ../common/common-regcache.c): Remove.
1211 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1212 (new-op.o: ../common/new-op.c): Remove.
1213 (btrace-common.o: ../common/btrace-common.c): Remove.
1214
1215 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1216
1217 * Makefile.in (%.o: ../target/%.c): New rule.
1218 (waitstatus.o: ../target/waitstatus.c): Remove.
1219
1220 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1221
1222 * Makefile.in
1223 (%.c: ../regformats/%.dat,
1224 (%.c: ../regformats/arm/%.dat,
1225 (%.c: ../regformats/i386/%.dat,
1226 (%.c: ../regformats/rs6000/%.dat): New rules.
1227 (aarch64.c): Remove.
1228 (reg-arm.c): Remove.
1229 (arm-with-iwmmxt.c): Remove.
1230 (arm-with-vfpv2.c): Remove.
1231 (arm-with-vfpv3.c): Remove.
1232 (arm-with-neon.c): Remove.
1233 (reg-bfin.c): Remove.
1234 (reg-cris.c): Remove.
1235 (reg-crisv32.c): Remove.
1236 (i386.c): Remove.
1237 (i386-linux.c): Remove.
1238 (i386-avx.c): Remove.
1239 (i386-avx-linux.c): Remove.
1240 (i386-avx-avx512.c): Remove.
1241 (i386-avx-avx512-linux.c): Remove.
1242 (i386-mpx.c): Remove.
1243 (i386-mpx-linux.c): Remove.
1244 (i386-avx-mpx-avx512-pku.c): Remove.
1245 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1246 (i386-avx-mpx.c): Remove.
1247 (i386-avx-mpx-linux.c): Remove.
1248 (i386-mmx.c): Remove.
1249 (i386-mmx-linux.c): Remove.
1250 (reg-ia64.c): Remove.
1251 (reg-m32r.c): Remove.
1252 (reg-m68k.c): Remove.
1253 (reg-cf.c): Remove.
1254 (mips-linux.c): Remove.
1255 (mips-dsp-linux.c): Remove.
1256 (mips64-linux.c): Remove.
1257 (mips64-dsp-linux.c): Remove.
1258 (nios2-linux.c): Remove.
1259 (powerpc-32.c): Remove.
1260 (powerpc-32l.c): Remove.
1261 (powerpc-altivec32l.c): Remove.
1262 (powerpc-cell32l.c): Remove.
1263 (powerpc-vsx32l.c): Remove.
1264 (powerpc-isa205-32l.c): Remove.
1265 (powerpc-isa205-altivec32l.c): Remove.
1266 (powerpc-isa205-vsx32l.c): Remove.
1267 (powerpc-e500l.c): Remove.
1268 (powerpc-64l.c): Remove.
1269 (powerpc-altivec64l.c): Remove.
1270 (powerpc-cell64l.c): Remove.
1271 (powerpc-vsx64l.c): Remove.
1272 (powerpc-isa205-64l.c): Remove.
1273 (powerpc-isa205-altivec64l.c): Remove.
1274 (powerpc-isa205-vsx64l.c): Remove.
1275 (s390-linux32.c): Remove.
1276 (s390-linux32v1.c): Remove.
1277 (s390-linux32v2.c): Remove.
1278 (s390-linux64.c): Remove.
1279 (s390-linux64v1.c): Remove.
1280 (s390-linux64v2.c): Remove.
1281 (s390-te-linux64.c): Remove.
1282 (s390-vx-linux64.c): Remove.
1283 (s390-tevx-linux64.c): Remove.
1284 (s390x-linux64.c): Remove.
1285 (s390x-linux64v1.c): Remove.
1286 (s390x-linux64v2.c): Remove.
1287 (s390x-te-linux64.c): Remove.
1288 (s390x-vx-linux64.c): Remove.
1289 (s390x-tevx-linux64.c): Remove.
1290 (tic6x-c64xp-linux.c): Remove.
1291 (tic6x-c64x-linux.c): Remove.
1292 (tic6x-c62x-linux.c): Remove.
1293 (reg-sh.c): Remove.
1294 (reg-sparc64.c): Remove.
1295 (reg-spu.c): Remove.
1296 (amd64.c): Remove.
1297 (amd64-linux.c): Remove.
1298 (amd64-avx.c): Remove.
1299 (amd64-avx-linux.c): Remove.
1300 (amd64-avx-avx512.c): Remove.
1301 (amd64-avx-avx512-linux.c): Remove.
1302 (amd64-mpx.c): Remove.
1303 (amd64-mpx-linux.c): Remove.
1304 (amd64-avx-mpx-avx512-pku.c): Remove.
1305 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1306 (amd64-avx-mpx.c): Remove.
1307 (amd64-avx-mpx-linux.c): Remove.
1308 (x32.c): Remove.
1309 (x32-linux.c): Remove.
1310 (x32-avx.c): Remove.
1311 (x32-avx-linux.c): Remove.
1312 (x32-avx-avx512.c): Remove.
1313 (x32-avx-avx512-linux.c): Remove.
1314 (reg-xtensa.c): Remove.
1315 (reg-tilegx.c): Remove.
1316 (reg-tilegx32.c): Remove.
1317
1318 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1319
1320 * Makefile.in (SFILES): Add "common/environ.c".
1321 (OBJS): Add "common/environ.h".
1322
1323 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1324
1325 * configure.ac: Check if the fs_base and gs_base members of
1326 `struct user_regs_struct' exist.
1327 * config.in: Regenerated.
1328 * configure: Likewise.
1329
1330 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1331
1332 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1333 target_read_memory.
1334 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1335 (get_next_pcs_syscall_next_pc): Likewise.
1336
1337 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1338
1339 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1340 * nto-x86-low.c: Likewise.
1341
1342 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1343
1344 * Makefile.in: Include disable-implicit-rules.mk.
1345
1346 2016-11-23 Pedro Alves <palves@redhat.com>
1347
1348 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1349 (debug_vprintf): Use std::chrono::steady_clock instead of
1350 gettimeofday. Use '.' instead of ':'.
1351 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1352 (get_timestamp): Use std::chrono::steady_clock instead of
1353 gettimeofday.
1354
1355 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1356
1357 * Makefile.in: Fix whitespace formatting.
1358
1359 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1360
1361 * Makefile.in (SFILES, OBS): Flatten list and order
1362 alphabetically.
1363
1364 2016-11-23 Pedro Alves <palves@redhat.com>
1365
1366 * event-loop.c (handle_file_event): Use warning.
1367 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1368 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1369 Use warning.
1370
1371 2016-11-23 Pedro Alves <palves@redhat.com>
1372
1373 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1374 output.
1375 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1376 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1377 debug_printf and debug_flush for debug output.
1378 * server.c (handle_general_set): Likewise.
1379 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1380 output.
1381
1382 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1383
1384 * Makefile.in (.c.o): Replace rule with ...
1385 (%.o: %.c): ... this one.
1386
1387 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1388
1389 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1390 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1391 make.
1392 * configure.ac: Remove checks for the make program.
1393 * configure: Re-generate.
1394
1395 2016-10-28 Pedro Alves <palves@redhat.com>
1396
1397 * Makefile.in (CXX_DIALECT): Get from configure.
1398 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1399 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1400 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1401 * config.in: Regenerate.
1402 * configure: Regenerate.
1403
1404 2016-10-27 Yao Qi <yao.qi@linaro.org>
1405
1406 * linux-low.c (linux_supports_range_stepping): Return true if
1407 can_software_single_step return true.
1408
1409 2016-10-27 Yao Qi <yao.qi@linaro.org>
1410
1411 * inferiors.c (find_inferior_in_random): New function.
1412 * inferiors.h (find_inferior_in_random): Declare.
1413 * linux-low.c (linux_wait_for_event_filtered): Call
1414 find_inferior_in_random instead of find_inferior.
1415
1416 2016-10-27 Yao Qi <yao.qi@linaro.org>
1417
1418 * linux-low.c (linux_wait_1): If single-step breakpoints are
1419 inserted, remove them.
1420
1421 2016-10-26 Pedro Alves <palves@redhat.com>
1422
1423 * linux-low.c (handle_extended_wait): Link parent/child fork
1424 threads.
1425 (linux_wait_1): Unlink them.
1426 (linux_set_resume_request): Ignore resume requests for
1427 already-resumed and unhandled fork child threads.
1428 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1429 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1430 New functions.
1431 (handle_v_requests) <vCont>: Don't call require_running.
1432 * server.h (in_queued_stop_replies): New declaration.
1433
1434 2016-10-24 Yao Qi <yao.qi@linaro.org>
1435
1436 PR server/20733
1437 * linux-aarch64-low.c (append_insns): Cast the return value to
1438 'uint32_t *'.
1439
1440 2016-10-10 Yao Qi <yao.qi@linaro.org>
1441
1442 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1443
1444 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1445
1446 * target.c (target_supports_multi_process): New function, moved
1447 from...
1448 * target.h (target_supports_multi_process): ... here. Remove
1449 macro.
1450
1451 2016-10-05 Tom Tromey <tom@tromey.com>
1452
1453 PR remote/20655:
1454 * tracepoint.c (handle_tracepoint_bkpts): Check
1455 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1456
1457 2016-10-05 Yao Qi <yao.qi@linaro.org>
1458
1459 * configure.srv: Update the path of arm-*.xml files.
1460
1461 2016-10-05 Terry Guo <terry.guo@arm.com>
1462 Yao Qi <yao.qi@linaro.org>
1463
1464 * Makefile.in: Adjust the path of rules.
1465 * configure.srv: Update the path of xml files.
1466 * regformats/arm-with-iwmmxt.dat: Regenerated.
1467 * regformats/arm-with-neon.dat: Likewise.
1468 * regformats/arm-with-vfpv2.dat: Likewise.
1469 * regformats/arm-with-vfpv3.dat Likewise.
1470
1471 2016-09-30 Yao Qi <yao.qi@linaro.org>
1472
1473 PR gdbserver/20627
1474 * target.c (target_stop_and_wait): Don't call
1475 target_continue_no_signal, use resume_stop instead.
1476
1477 2016-09-26 Yao Qi <yao.qi@linaro.org>
1478
1479 * linux-low.c (linux_wait_1): Call debug_exit.
1480
1481 2016-09-23 Pedro Alves <palves@redhat.com>
1482
1483 * Makefile.in (SFILES): Add common/new-op.c.
1484 (OBS): Add common/new-op.o.
1485 (new-op.o): New rule.
1486
1487 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1488
1489 * .gitinore: Ignore more files.
1490
1491 2016-09-21 Yao Qi <yao.qi@linaro.org>
1492
1493 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1494 23.
1495
1496 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1497
1498 * server.c (start_inferior): Call target_mourn_inferior instead of
1499 mourn_inferior; pass ptid_t argument to it.
1500 (resume): Likewise.
1501 (handle_target_event): Likewise.
1502 * target.c (target_mourn_inferior): New function.
1503 * target.h (mourn_inferior): Delete macro.
1504
1505 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1506
1507 * linux-low.c (lwp_is_stepping): New function.
1508
1509 2016-09-06 Carl Love <cel@us.ibm.com>
1510
1511 * server.c (start_inferior): Fixed comment, requested comment change
1512 didn't get updated correctly. Removed reference to ptrace () call as
1513 it is only true on Linux systems.
1514
1515 2016-09-06 Carl Love <cel@us.ibm.com>
1516
1517 * server.c (start_inferior): Do not call
1518 function target_post_create_inferior () if the
1519 inferior process has already exited.
1520
1521 2016-09-05 Pedro Alves <palves@redhat.com>
1522
1523 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1524 (COMPILE.pre, CC_LD): Use CXX directly.
1525 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1526 * acinclude.m4: Don't include build-with-cxx.m4.
1527 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1528 * configure: Regenerate.
1529
1530 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1531
1532 PR gdb/19495
1533 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1534 call writing data to own_buf.
1535
1536 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1537
1538 * target.c (mywait): Call target_wait instead of
1539 the_target->wait.
1540 (target_wait): New function.
1541
1542 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1543
1544 * server.c (start_inferior): New variable 'ptid'. Replace calls
1545 to the_target->resume by target_continue{,_no_signal}, depending
1546 on the case.
1547 * target.c (target_stop_and_wait): Call target_continue_no_signal
1548 instead of the_target->resume.
1549 (target_continue): New function.
1550
1551 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1552
1553 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1554
1555 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1556
1557 PR server/20491
1558 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1559 ps_prochandle.
1560 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1561 * linux-arm-low.c (ps_get_thread_area): Likewise.
1562 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1563 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1564 * linux-mips-low.c (ps_get_thread_area): Likewise.
1565 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1566 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1567 * linux-x86-low.c (ps_get_thread_area): Likewise.
1568 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1569
1570 2016-08-19 Pedro Alves <palves@redhat.com>
1571
1572 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1573
1574 2016-08-19 Pedro Alves <palves@redhat.com>
1575
1576 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1577 comment. Use memcpy instead of casting through unsigned long.
1578
1579 2016-08-19 Pedro Alves <palves@redhat.com>
1580
1581 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1582 allocating around 0x80000000.
1583
1584 2016-08-19 Pedro Alves <palves@redhat.com>
1585
1586 PR gdb/20415
1587 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1588 (x32-avx512-linux-ipa.o): New rules.
1589 * configure.ac (x86_64-*-linux*): New x32 check.
1590 * configure.srv (ipa_x32_linux_regobj): New.
1591 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1592 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1593 descriptions.
1594 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1595 descriptions.
1596 * configure: Regenerate.
1597
1598 2016-08-09 Pedro Alves <palves@redhat.com>
1599
1600 PR gdb/18653
1601 * Makefile.in (OBS): Add signals-state-save-restore.o.
1602 (signals-state-save-restore.o): New rule.
1603 * config.in: Regenerate.
1604 * configure: Regenerate.
1605 * linux-low.c: Include "signals-state-save-restore.h".
1606 (linux_create_inferior): Call
1607 restore_original_signals_state.
1608 * server.c: Include "dispositions-save-restore.h".
1609 (captured_main): Call save_original_signals_state.
1610
1611 2016-08-05 Pedro Alves <palves@redhat.com>
1612
1613 * configure: Regenerate.
1614
1615 2016-08-04 Yao Qi <yao.qi@linaro.org>
1616
1617 * linux-low.c (regsets_fetch_inferior_registers): Check
1618 errno is ESRCH or not.
1619
1620 2016-08-02 Yao Qi <yao.qi@linaro.org>
1621
1622 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1623 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1624 (thread_db_load_search): Update.
1625 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1626 td_ta_set_event and td_ta_event_getmsg.
1627
1628 2016-07-26 Pedro Alves <palves@redhat.com>
1629
1630 PR server/20414
1631 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1632 of unsigned long for 64-bit registers and use uint32_t instead of
1633 unsigned int for 32-bit registers.
1634
1635 2016-07-26 Pedro Alves <palves@redhat.com>
1636
1637 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1638 to 'ptrace'.
1639
1640 2016-07-21 Tom Tromey <tom@tromey.com>
1641
1642 * configure: Rebuild.
1643
1644 2016-07-21 Yao Qi <yao.qi@linaro.org>
1645
1646 * mem-break.c (find_gdb_breakpoint): Cast bp to
1647 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1648
1649 2016-07-21 Yao Qi <yao.qi@linaro.org>
1650
1651 * server.c (handle_v_requests): Support s and S actions
1652 if target_supports_software_single_step return true.
1653
1654 2016-07-21 Yao Qi <yao.qi@linaro.org>
1655
1656 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1657 is resume_step, call maybe_hw_step.
1658 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1659 and unstop them.
1660 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1661 breakpoints or not.
1662 (proceed_one_lwp): If resume request is resume_step, install
1663 reinsert breakpoints and call maybe_hw_step.
1664
1665 2016-07-21 Yao Qi <yao.qi@linaro.org>
1666
1667 * linux-low.c (proceed_one_lwp): Declare.
1668 (linux_resume_one_thread): Remove local variable 'step'.
1669 Lift code enqueue signal. Call proceed_one_lwp instead of
1670 linux_resume_one_lwp.
1671
1672 2016-07-21 Yao Qi <yao.qi@linaro.org>
1673
1674 * linux-low.c (linux_resume_one_thread): Call
1675 enqueue_pending_signal.
1676
1677 2016-07-21 Yao Qi <yao.qi@linaro.org>
1678
1679 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1680 * inferiors.c (do_restore_current_thread_cleanup): New function.
1681 (make_cleanup_restore_current_thread): Likewise.
1682 * linux-low.c (install_software_single_step_breakpoints): Call
1683 make_cleanup_restore_current_thread. Switch current_thread to
1684 thread.
1685
1686 2016-07-21 Yao Qi <yao.qi@linaro.org>
1687
1688 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1689 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1690 (clone_one_breakpoint): Likewise.
1691 (delete_reinsert_breakpoints): Change parameter to thread.
1692 Callers updated.
1693 (has_reinsert_breakpoints): Likewise.
1694 (uninsert_reinsert_breakpoints): Likewise.
1695 (reinsert_reinsert_breakpoints): Likewise.
1696 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1697 (delete_reinsert_breakpoints): Likewise.
1698 (reinsert_reinsert_breakpoints): Likewise.
1699 (uninsert_reinsert_breakpoints): Likewise.
1700 (has_reinsert_breakpoints): Likewise.
1701
1702 2016-07-21 Yao Qi <yao.qi@linaro.org>
1703
1704 * inferiors.c (get_thread_process): Make parameter const.
1705 * inferiors.h (get_thread_process): Update declaration.
1706 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1707 Add new parameters child_thread and parent_thread. Callers
1708 updated.
1709 * mem-break.h (clone_all_breakpoints): Update declaration.
1710
1711 2016-07-21 Yao Qi <yao.qi@linaro.org>
1712
1713 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1714 <command_list, handler>: Remove.
1715 (struct gdb_breakpoint): New.
1716 (struct other_breakpoint): New.
1717 (struct reinsert_breakpoint): New.
1718 (is_gdb_breakpoint): New function.
1719 (any_persistent_commands): Update command_list if
1720 is_gdb_breakpoint returns true.
1721 (set_breakpoint): Create breakpoints according to their types.
1722 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1723 (set_gdb_breakpoint_1): Likewise.
1724 (set_gdb_breakpoint): Likewise.
1725 (clear_breakpoint_conditions): Change parameter type to
1726 'struct gdb_breakpoint *'.
1727 (clear_breakpoint_commands): Likewise.
1728 (clear_breakpoint_conditions_and_commands): Likewise.
1729 (add_condition_to_breakpoint): Likewise.
1730 (add_breakpoint_condition): Likewise.
1731 (add_commands_to_breakpoint): Likewise.
1732 (check_breakpoints): Check other_breakpoint.
1733 (clone_one_breakpoint): Clone breakpopint according to its type.
1734 * mem-break.h (struct gdb_breakpoint): Declare.
1735 (set_gdb_breakpoint): Update declaration.
1736 (clear_breakpoint_conditions_and_commands): Likewise.
1737 (add_breakpoint_condition): Likewise.
1738 (add_breakpoint_commands): Likewise.
1739 * server.c (process_point_options): Change parameter type to
1740 'struct gdb_breakpoint *'.
1741
1742 2016-07-21 Yao Qi <yao.qi@linaro.org>
1743
1744 * mem-break.c (set_breakpoint_at): Rename it to ...
1745 (set_breakpoint_type_at): ... it.
1746 (set_breakpoint_at): Call set_breakpoint_type_at.
1747 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1748 * mem-break.h (set_breakpoint_at): Update comments.
1749
1750 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1751
1752 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1753 to buf parameter.
1754 (nios2_store_gregset): Likewise.
1755
1756 2016-07-01 Pedro Alves <palves@redhat.com>
1757 Antoine Tremblay <antoine.tremblay@ericsson.com>
1758
1759 * linux-low.c: Change interface to take the target lwp_info
1760 pointer directly and return void. Handle detaching from a zombie
1761 thread.
1762 (linux_detach_lwp_callback): New function.
1763 (linux_detach): Detach from the leader thread after detaching from
1764 the clone threads.
1765
1766 2016-06-28 Yao Qi <yao.qi@linaro.org>
1767
1768 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1769 for variable new_offset.
1770 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1771 (aarch64_ftrace_insn_reloc_cb): Likewise.
1772 (aarch64_ftrace_insn_reloc_tb): Likewise.
1773 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1774 PRIx64 instead of PRIx32.
1775
1776 2016-06-28 Yao Qi <yao.qi@linaro.org>
1777
1778 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1779 (the_low_target): Install arm_get_syscall_trapinfo.
1780
1781 2016-06-28 Yao Qi <yao.qi@linaro.org>
1782
1783 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1784 function.
1785 (the_low_target): Install aarch64_get_syscall_trapinfo.
1786
1787 2016-06-28 Yao Qi <yao.qi@linaro.org>
1788
1789 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1790 Callers updated.
1791 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1792 Remove parameter sysno.
1793 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1794 sysret.
1795
1796 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1797
1798 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1799 (s390_emit_ne_goto): Likewise.
1800 (s390_emit_lt_goto): Likewise.
1801 (s390_emit_le_goto): Likewise.
1802 (s390_emit_gt_goto): Likewise.
1803 (s390_emit_ge_goto): Likewise.
1804 (s390x_emit_eq_goto): Likewise.
1805 (s390x_emit_ne_goto): Likewise.
1806 (s390x_emit_lt_goto): Likewise.
1807 (s390x_emit_le_goto): Likewise.
1808 (s390x_emit_gt_goto): Likewise.
1809 (s390x_emit_ge_goto): Likewise.
1810 (s390_emit_ops_impl): Mark variable static.
1811 (s390x_emit_ops): Likewise.
1812
1813 2016-06-17 Yao Qi <yao.qi@linaro.org>
1814
1815 * linux-low.c (handle_extended_wait): Call
1816 uninsert_reinsert_breakpoints for the parent process. Remove
1817 reinsert breakpoints from the child process. Reinsert them to
1818 the parent process when vfork is done.
1819 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1820 (reinsert_reinsert_breakpoints): New function.
1821 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1822 (reinsert_reinsert_breakpoints): Declare.
1823
1824 2016-06-17 Yao Qi <yao.qi@linaro.org>
1825
1826 * linux-low.c (handle_extended_wait): If the parent is doing
1827 step-over, remove the reinsert breakpoints from the forked child.
1828
1829 2016-06-17 Yao Qi <yao.qi@linaro.org>
1830
1831 * linux-low.c (unsuspend_all_lwps): Declare.
1832 (linux_low_filter_event): If thread exited, call finish_step_over.
1833 If step-over is finished, unsuspend other threads.
1834
1835 2016-06-17 Yao Qi <yao.qi@linaro.org>
1836
1837 * linux-low.c (linux_resume_one_lwp_throw): Assert
1838 has_reinsert_breakpoints returns false.
1839 * mem-break.c (delete_disabled_breakpoints): Assert
1840 bp type isn't reinsert_breakpoint.
1841
1842 2016-06-17 Yao Qi <yao.qi@linaro.org>
1843
1844 * linux-low.c (maybe_hw_step): New function.
1845 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1846 (finish_step_over): Switch current_thread to lwp temporarily,
1847 and assert has_reinsert_breakpoints returns true.
1848 (proceed_one_lwp): Call maybe_hw_step.
1849 * mem-break.c (has_reinsert_breakpoints): New function.
1850 * mem-break.h (has_reinsert_breakpoints): Declare.
1851
1852 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1853
1854 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1855
1856 2016-05-17 Yao Qi <yao.qi@linaro.org>
1857
1858 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1859 instead of find_inferior.
1860
1861 2016-05-05 Yao Qi <yao.qi@linaro.org>
1862
1863 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1864 Initialize res to zero.
1865
1866 2016-05-05 Yao Qi <yao.qi@linaro.org>
1867
1868 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1869 to uint32_t.
1870
1871 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1872
1873 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1874 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1875 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1876
1877 2016-04-28 Par Olsson <par.olsson@windriver.com>
1878 Simon Marchi <simon.marchi@ericsson.com>
1879
1880 * tracepoint.c (write_inferior_int8): New function.
1881 (cmd_qtenable_disable): Write enable flag using
1882 write_inferior_int8.
1883
1884 2016-04-25 Yao Qi <yao.qi@linaro.org>
1885
1886 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1887 (need_step_over_p): Return zero if the LWP has pending signals
1888 can be delivered on software single step target.
1889
1890 2016-04-25 Yao Qi <yao.qi@linaro.org>
1891
1892 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1893 return instead of error.
1894
1895 2016-04-22 Yao Qi <yao.qi@linaro.org>
1896
1897 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1898 to 23.
1899
1900 2016-04-22 Yao Qi <yao.qi@linaro.org>
1901
1902 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1903 signal when stepping over breakpoint with software single
1904 step.
1905
1906 2016-04-21 Pedro Alves <palves@redhat.com>
1907
1908 * linux-s390-low.c (s390_collect_ptrace_register)
1909 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1910 add casts.
1911 (s390_check_regset): Use void * instead of gdb_byte *.
1912
1913 2016-04-20 Pedro Alves <palves@redhat.com>
1914
1915 * configure: Renegerate.
1916
1917 2016-04-20 Yao Qi <yao.qi@linaro.org>
1918
1919 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1920 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1921 number 16.
1922 (arm_store_gregset): Likewise.
1923
1924 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1925
1926 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1927 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1928 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1929 (amd64-avx-mpx-linux.c): New rules.
1930 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1931 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1932 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1933 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1934 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1935 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1936 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1937 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1938 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1939 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1940 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1941 * linux-x86-low.c (x86_linux_read_description): Add case for
1942 X86_XSTATE_AVX_MPX_MASK.
1943 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1944 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1945 init_registers_i386_avx_mpx_linux.
1946 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1947 (initialize_low_tracepoint): Call
1948 init_registers_i386_avx_mpx_linux.
1949 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1950 (initialize_low_tracepoint): Call
1951 init_registers_amd64_avx_mpx_linux.
1952 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1953 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1954 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1955 declarations.
1956
1957 2016-04-18 Pedro Alves <palves@redhat.com>
1958
1959 * configure: Regenerate.
1960
1961 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1962
1963 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1964 (aarch64_emit_sub): Likewise.
1965
1966 2016-04-12 Pedro Alves <palves@redhat.com>
1967
1968 * utils.c (prepare_to_throw_exception): Delete.
1969
1970 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1971
1972 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1973
1974 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1975
1976 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1977
1978 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1979
1980 * linux-aarch64-ipa.c: Add <elf.h> include.
1981 * linux-ppc-ipa.c: Add <elf.h> include.
1982 * linux-s390-ipa.c: Add <elf.h> include.
1983
1984 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1985
1986 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1987 (get_raw_reg_ptr): Likewise.
1988 (get_trace_state_variable_value_ptr): Likewise.
1989 (set_trace_state_variable_value_ptr): Likewise.
1990 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1991 char *.
1992
1993 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1994 Marcin Kościelnicki <koriakin@0x04.net>
1995
1996 PR/17221
1997 * linux-ppc-low.c (emit_insns): New function.
1998 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1999 (ppc_emit_prologue): New function.
2000 (ppc_emit_epilogue): New function.
2001 (ppc_emit_add): New function.
2002 (ppc_emit_sub): New function.
2003 (ppc_emit_mul): New function.
2004 (ppc_emit_lsh): New function.
2005 (ppc_emit_rsh_signed): New function.
2006 (ppc_emit_rsh_unsigned): New function.
2007 (ppc_emit_ext): New function.
2008 (ppc_emit_zero_ext): New function.
2009 (ppc_emit_log_not): New function.
2010 (ppc_emit_bit_and): New function.
2011 (ppc_emit_bit_or): New function.
2012 (ppc_emit_bit_xor): New function.
2013 (ppc_emit_bit_not): New function.
2014 (ppc_emit_equal): New function.
2015 (ppc_emit_less_signed): New function.
2016 (ppc_emit_less_unsigned): New function.
2017 (ppc_emit_ref): New function.
2018 (ppc_emit_const): New function.
2019 (ppc_emit_reg): New function.
2020 (ppc_emit_pop): New function.
2021 (ppc_emit_stack_flush): New function.
2022 (ppc_emit_swap): New function.
2023 (ppc_emit_stack_adjust): New function.
2024 (ppc_emit_call): New function.
2025 (ppc_emit_int_call_1): New function.
2026 (ppc_emit_void_call_2): New function.
2027 (ppc_emit_if_goto): New function.
2028 (ppc_emit_goto): New function.
2029 (ppc_emit_eq_goto): New function.
2030 (ppc_emit_ne_goto): New function.
2031 (ppc_emit_lt_goto): New function.
2032 (ppc_emit_le_goto): New function.
2033 (ppc_emit_gt_goto): New function.
2034 (ppc_emit_ge_goto): New function.
2035 (ppc_write_goto_address): New function.
2036 (ppc_emit_ops_impl): New static variable.
2037 (ppc64v1_emit_prologue): New function.
2038 (ppc64v2_emit_prologue): New function.
2039 (ppc64_emit_epilogue): New function.
2040 (ppc64_emit_add): New function.
2041 (ppc64_emit_sub): New function.
2042 (ppc64_emit_mul): New function.
2043 (ppc64_emit_lsh): New function.
2044 (ppc64_emit_rsh_signed): New function.
2045 (ppc64_emit_rsh_unsigned): New function.
2046 (ppc64_emit_ext): New function.
2047 (ppc64_emit_zero_ext): New function.
2048 (ppc64_emit_log_not): New function.
2049 (ppc64_emit_bit_and): New function.
2050 (ppc64_emit_bit_or): New function.
2051 (ppc64_emit_bit_xor): New function.
2052 (ppc64_emit_bit_not): New function.
2053 (ppc64_emit_equal): New function.
2054 (ppc64_emit_less_signed): New function.
2055 (ppc64_emit_less_unsigned): New function.
2056 (ppc64_emit_ref): New function.
2057 (ppc64_emit_const): New function.
2058 (ppc64v1_emit_reg): New function.
2059 (ppc64v2_emit_reg): New function.
2060 (ppc64_emit_pop): New function.
2061 (ppc64_emit_stack_flush): New function.
2062 (ppc64_emit_swap): New function.
2063 (ppc64v1_emit_call): New function.
2064 (ppc64v2_emit_call): New function.
2065 (ppc64v1_emit_int_call_1): New function.
2066 (ppc64v2_emit_int_call_1): New function.
2067 (ppc64v1_emit_void_call_2): New function.
2068 (ppc64v2_emit_void_call_2): New function.
2069 (ppc64_emit_if_goto): New function.
2070 (ppc64_emit_eq_goto): New function.
2071 (ppc64_emit_ne_goto): New function.
2072 (ppc64_emit_lt_goto): New function.
2073 (ppc64_emit_le_goto): New function.
2074 (ppc64_emit_gt_goto): New function.
2075 (ppc64_emit_ge_goto): New function.
2076 (ppc64v1_emit_ops_impl): New static variable.
2077 (ppc64v2_emit_ops_impl): New static variable.
2078 (ppc_emit_ops): New function.
2079 (linux_low_target): Wire in ppc_emit_ops.
2080
2081 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2082 Marcin Kościelnicki <koriakin@0x04.net>
2083
2084 PR/17221
2085 * Makefile.in: Add powerpc-*-ipa.o
2086 * configure.srv: Add ipa_obj for powerpc*-linux.
2087 * linux-ppc-ipa.c: New file.
2088 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2089 includes.
2090 (PPC_FIELD): New macro.
2091 (PPC_SEXT): New macro.
2092 (PPC_OP6): New macro.
2093 (PPC_BO): New macro.
2094 (PPC_LI): New macro.
2095 (PPC_BD): New macro.
2096 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2097 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2098 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2099 (ppc_get_thread_area): New function.
2100 (is_elfv2_inferior): New function.
2101 (gen_ds_form): New function.
2102 (GEN_STD): New macro.
2103 (GEN_STDU): New macro.
2104 (GEN_LD): New macro.
2105 (GEN_LDU): New macro.
2106 (gen_d_form): New function.
2107 (GEN_ADDI): New macro.
2108 (GEN_ADDIS): New macro.
2109 (GEN_LI): New macro.
2110 (GEN_LIS): New macro.
2111 (GEN_ORI): New macro.
2112 (GEN_ORIS): New macro.
2113 (GEN_LWZ): New macro.
2114 (GEN_STW): New macro.
2115 (GEN_STWU): New macro.
2116 (gen_xfx_form): New function.
2117 (GEN_MFSPR): New macro.
2118 (GEN_MTSPR): New macro.
2119 (GEN_MFCR): New macro.
2120 (GEN_MTCR): New macro.
2121 (GEN_SYNC): New macro.
2122 (GEN_LWSYNC): New macro.
2123 (gen_x_form): New function.
2124 (GEN_OR): New macro.
2125 (GEN_MR): New macro.
2126 (GEN_LWARX): New macro.
2127 (GEN_STWCX): New macro.
2128 (GEN_CMPW): New macro.
2129 (gen_md_form): New function.
2130 (GEN_RLDICL): New macro.
2131 (GEN_RLDICR): New macro.
2132 (gen_i_form): New function.
2133 (GEN_B): New macro.
2134 (GEN_BL): New macro.
2135 (gen_b_form): New function.
2136 (GEN_BNE): New macro.
2137 (GEN_LOAD): New macro.
2138 (GEN_STORE): New macro.
2139 (gen_limm): New function.
2140 (gen_atomic_xchg): New function.
2141 (gen_call): New function.
2142 (ppc_relocate_instruction): New function.
2143 (ppc_install_fast_tracepoint_jump_pad): New function.
2144 (ppc_get_min_fast_tracepoint_insn_len): New function.
2145 (ppc_get_ipa_tdesc_idx): New function.
2146 (the_low_target): Wire in the new functions.
2147 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2148 tdescs.
2149 * linux-ppc-tdesc.h: New file.
2150
2151 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2152
2153 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2154 (alloc_jump_pad_buffer): New function.
2155 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2156 (alloc_jump_pad_buffer): New function.
2157 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2158 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2159 (alloc_jump_pad_buffer): New function.
2160 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2161 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2162 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2163 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2164
2165 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2166
2167 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2168 * linux-amd64-ipa.c: Likewise.
2169 * linux-i386-ipa.c: Likewise.
2170 * linux-s390-ipa.c: Likewise.
2171 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2172 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2173 set_trace_state_variable_value_ptr.
2174 (struct ipa_sym_addresses): Likewise.
2175 (symbol_list): Likewise.
2176 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2177 accessing gdb_collect directly.
2178 (gdb_collect_ptr_type): New typedef.
2179 (get_raw_reg_ptr_type): New typedef.
2180 (get_trace_state_variable_value_ptr_type): New typedef.
2181 (set_trace_state_variable_value_ptr_type): New typedef.
2182 (gdb_collect_ptr): New global.
2183 (get_raw_reg_ptr): New global.
2184 (get_trace_state_variable_value_ptr): New global.
2185 (set_trace_state_variable_value_ptr): New global.
2186 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2187 accessing get_raw_reg directly.
2188 (get_get_tsv_func_addr): Likewise for
2189 get_trace_state_variable_value_ptr.
2190 (get_set_tsv_func_addr): Likewise for
2191 set_trace_state_variable_value_ptr.
2192 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2193
2194 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2195
2196 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2197
2198 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2199
2200 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2201 packets.
2202 (relocate_instruction): Remove own_buf.
2203 * server.c (own_buf): Make global.
2204 (handle_v_requests): Make global.
2205 * server.h (own_buf): New declaration.
2206 (handle_v_requests): New prototype.
2207
2208 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2209
2210 PR 18377
2211 * linux-s390-low.c (add_insns): New function.
2212 (s390_emit_prologue): New function.
2213 (s390_emit_epilogue): New function.
2214 (s390_emit_add): New function.
2215 (s390_emit_sub): New function.
2216 (s390_emit_mul): New function.
2217 (s390_emit_lsh): New function.
2218 (s390_emit_rsh_signed): New function.
2219 (s390_emit_rsh_unsigned): New function.
2220 (s390_emit_ext): New function.
2221 (s390_emit_log_not): New function.
2222 (s390_emit_bit_and): New function.
2223 (s390_emit_bit_or): New function.
2224 (s390_emit_bit_xor): New function.
2225 (s390_emit_bit_not): New function.
2226 (s390_emit_equal): New function.
2227 (s390_emit_less_signed): New function.
2228 (s390_emit_less_unsigned): New function.
2229 (s390_emit_ref): New function.
2230 (s390_emit_if_goto): New function.
2231 (s390_emit_goto): New function.
2232 (s390_write_goto_address): New function.
2233 (s390_emit_litpool): New function.
2234 (s390_emit_const): New function.
2235 (s390_emit_call): New function.
2236 (s390_emit_reg): New function.
2237 (s390_emit_pop): New function.
2238 (s390_emit_stack_flush): New function.
2239 (s390_emit_zero_ext): New function.
2240 (s390_emit_swap): New function.
2241 (s390_emit_stack_adjust): New function.
2242 (s390_emit_set_r2): New function.
2243 (s390_emit_int_call_1): New function.
2244 (s390_emit_void_call_2): New function.
2245 (s390_emit_eq_goto): New function.
2246 (s390_emit_ne_goto): New function.
2247 (s390_emit_lt_goto): New function.
2248 (s390_emit_le_goto): New function.
2249 (s390_emit_gt_goto): New function.
2250 (s390_emit_ge_goto): New function.
2251 (s390x_emit_prologue): New function.
2252 (s390x_emit_epilogue): New function.
2253 (s390x_emit_add): New function.
2254 (s390x_emit_sub): New function.
2255 (s390x_emit_mul): New function.
2256 (s390x_emit_lsh): New function.
2257 (s390x_emit_rsh_signed): New function.
2258 (s390x_emit_rsh_unsigned): New function.
2259 (s390x_emit_ext): New function.
2260 (s390x_emit_log_not): New function.
2261 (s390x_emit_bit_and): New function.
2262 (s390x_emit_bit_or): New function.
2263 (s390x_emit_bit_xor): New function.
2264 (s390x_emit_bit_not): New function.
2265 (s390x_emit_equal): New function.
2266 (s390x_emit_less_signed): New function.
2267 (s390x_emit_less_unsigned): New function.
2268 (s390x_emit_ref): New function.
2269 (s390x_emit_if_goto): New function.
2270 (s390x_emit_const): New function.
2271 (s390x_emit_call): New function.
2272 (s390x_emit_reg): New function.
2273 (s390x_emit_pop): New function.
2274 (s390x_emit_stack_flush): New function.
2275 (s390x_emit_zero_ext): New function.
2276 (s390x_emit_swap): New function.
2277 (s390x_emit_stack_adjust): New function.
2278 (s390x_emit_int_call_1): New function.
2279 (s390x_emit_void_call_2): New function.
2280 (s390x_emit_eq_goto): New function.
2281 (s390x_emit_ne_goto): New function.
2282 (s390x_emit_lt_goto): New function.
2283 (s390x_emit_le_goto): New function.
2284 (s390x_emit_gt_goto): New function.
2285 (s390x_emit_ge_goto): New function.
2286 (s390_emit_ops): New function.
2287 (struct linux_target_ops): Fill in emit_ops hook.
2288
2289 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2290
2291 PR 18377
2292 * Makefile.in: Add s390 IPA files.
2293 * configure.srv: Build IPA for s390.
2294 * linux-s390-ipa.c: New file.
2295 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2296 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2297 (tdesc_s390_linux32): Likewise.
2298 (init_registers_s390_linux32v1): Likewise.
2299 (tdesc_s390_linux32v1): Likewise.
2300 (init_registers_s390_linux32v2): Likewise.
2301 (tdesc_s390_linux32v2): Likewise.
2302 (init_registers_s390_linux64): Likewise.
2303 (tdesc_s390_linux64): Likewise.
2304 (init_registers_s390_linux64v1): Likewise.
2305 (tdesc_s390_linux64v1): Likewise.
2306 (init_registers_s390_linux64v2): Likewise.
2307 (tdesc_s390_linux64v2): Likewise.
2308 (init_registers_s390_te_linux64): Likewise.
2309 (tdesc_s390_te_linux64): Likewise.
2310 (init_registers_s390_vx_linux64): Likewise.
2311 (tdesc_s390_vx_linux64): Likewise.
2312 (init_registers_s390_tevx_linux64): Likewise.
2313 (tdesc_s390_tevx_linux64): Likewise.
2314 (init_registers_s390x_linux64): Likewise.
2315 (tdesc_s390x_linux64): Likewise.
2316 (init_registers_s390x_linux64v1): Likewise.
2317 (tdesc_s390x_linux64v1): Likewise.
2318 (init_registers_s390x_linux64v2): Likewise.
2319 (tdesc_s390x_linux64v2): Likewise.
2320 (init_registers_s390x_te_linux64): Likewise.
2321 (tdesc_s390x_te_linux64): Likewise.
2322 (init_registers_s390x_vx_linux64): Likewise.
2323 (tdesc_s390x_vx_linux64): Likewise.
2324 (init_registers_s390x_tevx_linux64): Likewise.
2325 (tdesc_s390x_tevx_linux64): Likewise.
2326 (have_hwcap_s390_vx): New static variable.
2327 (s390_arch_setup): Fill have_hwcap_s390_vx.
2328 (s390_get_thread_area): New function.
2329 (s390_ft_entry_gpr_esa): New const.
2330 (s390_ft_entry_gpr_zarch): New const.
2331 (s390_ft_entry_misc): New const.
2332 (s390_ft_entry_fr): New const.
2333 (s390_ft_entry_vr): New const.
2334 (s390_ft_main_31): New const.
2335 (s390_ft_main_64): New const.
2336 (s390_ft_exit_fr): New const.
2337 (s390_ft_exit_vr): New const.
2338 (s390_ft_exit_misc): New const.
2339 (s390_ft_exit_gpr_esa): New const.
2340 (s390_ft_exit_gpr_zarch): New const.
2341 (append_insns): New function.
2342 (s390_relocate_instruction): New function.
2343 (s390_install_fast_tracepoint_jump_pad): New function.
2344 (s390_get_min_fast_tracepoint_insn_len): New function.
2345 (s390_get_ipa_tdesc_idx): New function.
2346 (struct linux_target_ops): Wire in the above functions.
2347 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2348 * linux-s390-tdesc.h: New file.
2349
2350 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2351
2352 * linux-s390-low.c (s390_supports_tracepoints): New function.
2353 (struct linux_target_ops): Fill supports_tracepoints hook.
2354
2355 2016-03-18 Yao Qi <yao.qi@linaro.org>
2356
2357 * linux-low.c (lwp_signal_can_be_delivered): New function.
2358 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2359
2360 2016-03-18 Yao Qi <yao.qi@linaro.org>
2361
2362 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2363 0 if signal is enqueued. Remove 'signal' from one debugging
2364 message. Move one debugging message to some lines below.
2365 Remove code setting 'signal' to 0.
2366
2367 2016-03-18 Yao Qi <yao.qi@linaro.org>
2368
2369 * linux-low.c (linux_low_filter_event): Remove redundant
2370 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2371
2372 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2373
2374 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2375 (struct linux_target_ops): Wire in the above.
2376
2377 2016-03-03 Yao Qi <yao.qi@linaro.org>
2378
2379 * linux-low.c: Update comments to start_step_over.
2380
2381 2016-03-03 Yao Qi <yao.qi@linaro.org>
2382
2383 PR server/19736
2384 * linux-low.c (handle_extended_wait): Set child suspended
2385 if event_lwp->bp_reinsert isn't zero.
2386
2387 2016-03-02 Yao Qi <yao.qi@linaro.org>
2388
2389 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2390 enqueue_pending_signal.
2391
2392 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2393
2394 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2395 is actually loaded.
2396
2397 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2398
2399 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2400 (s390_regmap_3264) [!__s390x__]: New global.
2401 (s390_collect_ptrace_register): Skip map entries containing -1.
2402 (s390_supply_ptrace_register): Ditto.
2403 (s390_fill_gprs_high): New function.
2404 (s390_store_gprs_high): New function.
2405 (s390_regsets): Add NT_S390_HIGH_GPRS.
2406 (s390_get_hwcap): Enable on 31-bit.
2407 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2408 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2409 Detect NT_S390_HIGH_GPRS.
2410 (s390_usrregs_info_3264): Enable on 31-bit.
2411 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2412 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2413
2414 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2415
2416 PR gdb/13808
2417 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2418 * configure.srv: Ditto.
2419 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2420 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2421 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2422 (init_registers_amd64_linux): Remove prototype.
2423 (tdesc_amd64_linux): Remove declaration.
2424 (get_ipa_tdesc): New function.
2425 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2426 initialize remaining tdescs.
2427 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2428 (init_registers_i386_linux): Remove prototype.
2429 (tdesc_i386_linux): Remove declaration.
2430 (get_ipa_tdesc): New function.
2431 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2432 initialize remaining tdescs.
2433 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2434 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2435 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2436 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2437 (x86_get_ipa_tdesc_idx): New function.
2438 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2439 * linux-x86-tdesc.h: New file.
2440 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2441 (target_get_ipa_tdesc_idx): New macro.
2442 * tracepoint.c (ipa_tdesc_idx): New macro.
2443 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2444 (symbol_list): Add ipa_tdesc_idx.
2445 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2446 (ipa_tdesc): Remove.
2447 (ipa_tdesc_idx): New variable.
2448 (get_context_regcache): Use get_ipa_tdesc.
2449 (gdb_collect): Ditto.
2450 (gdb_probe): Ditto.
2451 * tracepoint.h (get_ipa_tdesc): New prototype.
2452 (ipa_tdesc): Remove.
2453
2454 2016-02-24 Pedro Alves <palves@redhat.com>
2455
2456 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2457 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2458 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2459 Factor out common code between the USE_SIGTRAP_SIGINFO and
2460 !USE_SIGTRAP_SIGINFO blocks.
2461 (linux_low_filter_event): Call save_stop_reason instead of
2462 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2463 Update comments.
2464 (linux_wait_1): Update comments.
2465
2466 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2467
2468 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2469 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2470 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2471 ppc_insert_point, ppc_remove_point.
2472
2473 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2474
2475 * linux-s390-low.c (s390_supports_z_point_type): New function.
2476 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2477
2478 2016-02-16 Yao Qi <yao.qi@linaro.org>
2479
2480 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2481 PC. Get pc from regcache_read_pc.
2482
2483 2016-02-12 Yao Qi <yao.qi@linaro.org>
2484
2485 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2486 or linux_get_pc_32bit.
2487 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2488
2489 2016-02-12 Yao Qi <yao.qi@linaro.org>
2490
2491 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2492 arm_linux_get_next_pcs_fixup.
2493
2494 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2495
2496 * tracepoint.c (x_tracepoint_action_download): Change
2497 write_inferior_data_ptr to write_inferior_data_pointer.
2498 (cmd_qtstart): Likewise.
2499 (write_inferior_data_ptr): Remove.
2500 (download_agent_expr): Change write_inferior_data_ptr to
2501 write_inferior_data_pointer.
2502 (download_tracepoint_1): Likewise.
2503 (download_tracepoint): Likewise.
2504 (download_trace_state_variables): Likewise.
2505
2506 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2507 Marcin Kościelnicki <koriakin@0x04.net>
2508
2509 * tracepoint.c (struct tracepoint_action_ops): Remove.
2510 (struct tracepoint_action): Remove ops.
2511 (m_tracepoint_action_download, r_tracepoint_action_download)
2512 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2513 size and offset accordingly.
2514 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2515 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2516 (tracepoint_action_send, tracepoint_action_download): New functions.
2517 Helpers for trace action handlers.
2518 (add_tracepoint_action): Remove setup actions ops.
2519 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2520
2521 2016-02-10 Yao Qi <yao.qi@linaro.org>
2522
2523 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2524
2525 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2526
2527 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2528 to AC_OUTPUT.
2529 * configure: Regenerate.
2530
2531 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2532
2533 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2534 void * to gdb_byte *.
2535 * linux-low.c (siginfo_fixup): Likewise.
2536 (linux_xfer_siginfo): Likewise.
2537 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2538 Likewise.
2539 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2540
2541 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2542
2543 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2544 to srv_tgtobj.
2545 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2546 to srv_tgtobj.
2547 * linux-x86-low.c [__x86_64__]: Include
2548 "nat/amd64-linux-siginfo.h".
2549 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2550 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2551 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2552 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2553 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2554 (cpt_si_fd, si_timerid, si_overrun): Move from
2555 nat/amd64-linux-siginfo.c.
2556 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2557
2558 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2559
2560 * server.c (skip_to_semicolon): Remove.
2561 (process_point_options): Use strchrnul instead of
2562 skip_to_semicolon.
2563
2564 2016-01-26 Yao Qi <yao.qi@linaro.org>
2565
2566 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2567 * linux-low.c (install_software_single_step_breakpoints): Don't
2568 call regcache_read_pc.
2569 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2570 argument pc.
2571
2572 2016-01-26 Yao Qi <yao.qi@linaro.org>
2573
2574 * linux-low.c (install_software_single_step_breakpoints): Call
2575 regcache_read_pc instead of get_pc.
2576
2577 2016-01-26 Yao Qi <yao.qi@linaro.org>
2578
2579 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2580 (unblock_async_io): Rename to ...
2581 (block_unblock_async_io): ... it. New function.
2582 (enable_async_io): Don't install SIGIO handler. Unblock it
2583 instead.
2584 (disable_async_io): Don't ignore SIGIO. Block it instead.
2585 (initialize_async_io): Install SIGIO handler. Don't call
2586 unblock_async_io.
2587
2588 2016-01-26 Yao Qi <yao.qi@linaro.org>
2589
2590 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2591 first character is '\003', call *the_target->request_interrupt.
2592
2593 2016-01-25 Yao Qi <yao.qi@linaro.org>
2594
2595 * remote-utils.c (new_thread_notify): Remove.
2596 (dead_thread_notify): Likewise.
2597 * remote-utils.h (new_thread_notify): Remove declaration.
2598 (dead_thread_notify): Likewise.
2599
2600 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2601
2602 * gdb.trace/pending.exp: Fix expected message on continue.
2603
2604 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2605
2606 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2607 it works properly on big-endian machines where sizeof (CORE_ADDR)
2608 != sizeof (void *).
2609
2610 2016-01-21 Pedro Alves <palves@redhat.com>
2611
2612 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2613 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2614 * configure: Regenerate.
2615
2616 2016-01-21 Yao Qi <yao.qi@linaro.org>
2617
2618 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2619 is_thumb and set it according to CPSR saved on the stack.
2620 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2621 arm_sigreturn_next_pc.
2622
2623 2016-01-18 Yao Qi <yao.qi@linaro.org>
2624
2625 * linux-low.c (linux_set_pc_64bit): New function.
2626 (linux_get_pc_64bit): New function.
2627 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2628 Declare.
2629 * linux-sparc-low.c (debug_threads): Remove declaration.
2630 (sparc_get_pc): Remove.
2631 (the_low_target): Use linux_get_pc_64bit instead of
2632 sparc_get_pc.
2633 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2634 (the_low_target): Use linux_get_pc_64bit and
2635 linux_set_pc_64bit.
2636
2637 2016-01-18 Yao Qi <yao.qi@linaro.org>
2638
2639 * linux-arm-low.c (debug_threads): Remove declaration.
2640 (arm_get_pc, arm_set_pc): Remove.
2641 (the_low_target): Use linux_get_pc_32bit and
2642 linux_set_pc_32bit.
2643 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2644 (the_low_target): Use linux_get_pc_32bit and
2645 linux_set_pc_32bit.
2646 * linux-cris-low.c (debug_threads): Remove declaration.
2647 (cris_get_pc, cris_set_pc,): Remove.
2648 (the_low_target): Use linux_get_pc_32bit and
2649 linux_set_pc_32bit.
2650 * linux-crisv32-low.c (debug_threads): Remove declaration.
2651 (cris_get_pc, cris_set_pc): Remove.
2652 (the_low_target): Use linux_get_pc_32bit and
2653 linux_set_pc_32bit.
2654 * linux-low.c: Include inttypes.h.
2655 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2656 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2657 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2658 (the_low_target): Use linux_get_pc_32bit and
2659 linux_set_pc_32bit.
2660 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2661 (the_low_target): Use linux_get_pc_32bit and
2662 linux_set_pc_32bit.
2663 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2664 (the_low_target): Use linux_get_pc_32bit and
2665 linux_set_pc_32bit.
2666 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2667 (the_low_target): Use linux_get_pc_32bit and
2668 linux_set_pc_32bit.
2669 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2670 (the_low_target): Use linux_get_pc_32bit and
2671 linux_set_pc_32bit.
2672
2673 2016-01-18 Gary Benson <gbenson@redhat.com>
2674
2675 * configure.ac (AC_FUNC_FORK): New check.
2676 * config.in: Regenerate.
2677 * configure: Likewise.
2678
2679 2016-01-14 Yao Qi <yao.qi@linaro.org>
2680
2681 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2682 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2683 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2684 arm_get_next_pcs_ctor.
2685
2686 2016-01-12 Josh Stone <jistone@redhat.com>
2687 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2688
2689 * inferiors.h: Include "gdb_vecs.h".
2690 (struct process_info): Add syscalls_to_catch.
2691 * inferiors.c (remove_process): Free syscalls_to_catch.
2692 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2693 syscall_return stops.
2694 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2695 * server.c (handle_general_set): Handle QCatchSyscalls.
2696 (handle_query): Report support for QCatchSyscalls.
2697 * target.h (struct target_ops): Add supports_catch_syscall.
2698 (target_supports_catch_syscall): New macro.
2699 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2700 (struct lwp_info): Add syscall_state.
2701 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2702 Maintain syscall_state and syscalls_to_catch across exec.
2703 (get_syscall_trapinfo): New function, proxy to the_low_target.
2704 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2705 (linux_low_filter_event): Toggle syscall_state entry/return for
2706 syscall traps, and set it ignored for all others.
2707 (gdb_catching_syscalls_p): New function.
2708 (gdb_catch_this_syscall_p): New function.
2709 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2710 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2711 (linux_supports_catch_syscall): New function.
2712 (linux_target_ops): Install it.
2713 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2714 (the_low_target): Install it.
2715
2716 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2717
2718 * acinclude.m4: Include new ../warning.m4 file.
2719 * configure: Regenerated.
2720 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2721
2722 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2723
2724 * ax.c (is_goto_target): Mark static.
2725 * linux-low.c (register_addr): Likewise.
2726 (linux_fetch_registers, linux_store_registers): Likewise.
2727 * mem-break.c (any_persistent_commands): Fix old prototype.
2728 (add_commands_to_breakpoint): Mark static.
2729 * regcache.c (find_register_by_name): Delete unused func.
2730 * remote-utils.c (hex_or_minus_one): Mark static.
2731 * server.c (monitor_show_help): Mark static.
2732 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2733 handle_v_requests): Likewise.
2734
2735 2016-01-12 Pedro Alves <palves@redhat.com>
2736
2737 Remove use of the registered trademark symbol throughout.
2738
2739 2016-01-08 Yao Qi <yao.qi@linaro.org>
2740
2741 * remote-utils.c (getpkt): If c is '\003', call target hook
2742 request_interrupt.
2743
2744 2016-01-06 Yao Qi <yao.qi@linaro.org>
2745
2746 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2747 linux-aarch32-low.c.
2748 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2749 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2750 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2751 (thumb2_breakpoint): Declare.
2752 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2753 linux-aarch32-low.h.
2754 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2755 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2756 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2757
2758 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2759
2760 * gdbreplay.c (gdbreplay_version): Change copyright year in
2761 version message.
2762 * server.c (gdbserver_version): Likewise.
2763
2764 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2765
2766 * server.c (crc32_table): Delete.
2767 (crc32): Use libiberty's xcrc32 function.
2768
2769 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2770
2771 * lynx-low.c (lynx_delete_thread_callback): New function.
2772 (lynx_mourn): Properly delete our process and all of its
2773 threads. Remove call to clear_inferiors.
2774
2775 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2776
2777 * target.c (thread_search_callback): Add check that
2778 the thread_stopped target callback is not NULL before
2779 calling it.
2780
2781 2015-12-21 Yao Qi <yao.qi@linaro.org>
2782
2783 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2784 arm breakpoint.
2785
2786 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2787
2788 * server.c (handle_query): Call target_supports_software_single_step.
2789
2790 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2791
2792 * linux-low.c (single_step): New function.
2793 (linux_resume_one_lwp_throw): Call single_step.
2794 (start_step_over): Likewise.
2795
2796 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2797
2798 * Makefile.in (SFILES): Append arch/arm-linux.c,
2799 arch/arm-get-next-pcs.c.
2800 (arm-linux.o): New rule.
2801 (arm-get-next-pcs.o): New rule.
2802 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2803 arm-linux.o.
2804 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2805 to linux-aarch32-low.c.
2806 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2807 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2808 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2809 (thumb2_breakpoint_len): Likewise.
2810 (arm_is_thumb_mode): Make non-static.
2811 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2812 from linux-aarch32-low.c.
2813 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2814 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2815 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2816 (thumb2_breakpoint_len): Likewise.
2817 (arm_is_thumb_mode): New declaration.
2818 * linux-arm-low.c: Include arch/arm-linux.h
2819 aarch/arm-get-next-pcs.h, sys/syscall.h.
2820 (get_next_pcs_ops): New struct.
2821 (get_next_pcs_addr_bits_remove): New function.
2822 (get_next_pcs_is_thumb): New function.
2823 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2824 (arm_sigreturn_next_pc): Likewise.
2825 (get_next_pcs_syscall_next_pc): Likewise.
2826 (arm_gdbserver_get_next_pcs): Likewise.
2827 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2828 Initialize.
2829 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2830 * server.h: Include gdb_vecs.h.
2831
2832 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2833
2834 * Makefile.in (SFILES): Append common/common-regcache.c.
2835 (OBS): Append common-regcache.o.
2836 (common-regcache.o): New rule.
2837 * regcache.c (init_register_cache): Initialize cache to
2838 REG_UNAVAILABLE.
2839 (regcache_raw_read_unsigned): New function.
2840 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2841 register_status enum.
2842
2843 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2844
2845 * linux-aarch64-low.c (the_low_targets): Rename
2846 breakpoint_reinsert_addr to get_next_pcs.
2847 * linux-arm-low.c (the_low_targets): Likewise.
2848 * linux-bfin-low.c (the_low_targets): Likewise.
2849 * linux-cris-low.c (the_low_targets): Likewise.
2850 * linux-crisv32-low.c (the_low_targets): Likewise.
2851 * linux-low.c (can_software_single_step): Likewise.
2852 (install_software_single_step_breakpoints): New function.
2853 (start_step_over): Use install_software_single_step_breakpoints.
2854 * linux-low.h: New CORE_ADDR vector.
2855 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2856 get_next_pcs.
2857 * linux-mips-low.c (the_low_targets): Likewise.
2858 * linux-nios2-low.c (the_low_targets): Likewise.
2859 * linux-sparc-low.c (the_low_targets): Likewise.
2860
2861 2015-12-17 Pedro Alves <palves@redhat.com>
2862
2863 * linux-low.c (linux_kill_one_lwp): Remove references to
2864 LinuxThreads.
2865 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2866 to 'kill'.
2867 (linux_init_signals): Delete.
2868 (initialize_low): Adjust.
2869 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2870
2871 2015-12-16 Pedro Alves <palves@redhat.com>
2872
2873 * configure.ac (compiler warning flags): When testing a
2874 -Wno-foo option, check whether -Wfoo works instead.
2875 * configure: Regenerate.
2876
2877 2015-12-11 Don Breazeal <donb@codesourcery.com>
2878
2879 * server.c (process_serial_event): Don't exit from gdbserver
2880 in remote mode if there are still active inferiors.
2881
2882 2015-12-11 Yao Qi <yao.qi@linaro.org>
2883
2884 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2885 arm_breakpoint_at if the process is 32-bit.
2886
2887 2015-12-11 Yao Qi <yao.qi@linaro.org>
2888
2889 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2890 arm breakpoint.
2891
2892 2015-12-07 Yao Qi <yao.qi@linaro.org>
2893
2894 * configure.srv: Append arm.o to srv_tgtobj for
2895 aarch64*-*-linux* target.
2896 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2897 from linux-arm-low.c.
2898 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2899 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2900 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2901 (thumb2_breakpoint_len): Likewise.
2902 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2903 (arm_breakpoint_kinds): Likewise.
2904 (arm_breakpoint_kind_from_pc): Likewise.
2905 (arm_sw_breakpoint_from_kind): Likewise.
2906 (arm_breakpoint_kind_from_current_state): Likewise.
2907 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2908 (arm_sw_breakpoint_from_kind): Declare.
2909 (arm_breakpoint_kind_from_current_state): Declare.
2910 (arm_breakpoint_at): Declare.
2911 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2912 arm_sw_breakpoint_from_kind if process is 32-bit.
2913 (aarch64_breakpoint_kind_from_pc): New function.
2914 (aarch64_breakpoint_kind_from_current_state): New function.
2915 (the_low_target): Initialize fields breakpoint_kind_from_pc
2916 and breakpoint_kind_from_current_state.
2917 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2918 linux-aarch32-low.c.
2919 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2920 (arm_breakpoint, arm_breakpoint_len): Likewise.
2921 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2922 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2923 (arm_is_thumb_mode): Likewise.
2924 (arm_breakpoint_at): Likewise.
2925 (arm_breakpoint_kind_from_pc): Likewise.
2926 (arm_sw_breakpoint_from_kind): Likewise.
2927 (arm_breakpoint_kind_from_current_state): Likewise.
2928
2929 Revert:
2930 2015-08-04 Yao Qi <yao.qi@linaro.org>
2931
2932 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2933 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2934 * server.c (extended_protocol): Remove "static".
2935 * server.h (extended_protocol): Declare it.
2936
2937 2015-12-04 Josh Stone <jistone@redhat.com>
2938
2939 * target.h (struct target_ops) <arch_setup>: Rename to ...
2940 (struct target_ops) <post_create_inferior>: ... this.
2941 (target_arch_setup): Rename to ...
2942 (target_post_create_inferior): ... this, calling post_create_inferior.
2943 * server.c (start_inferior): Update target_arch_setup calls to
2944 target_post_create_inferior.
2945 * linux-low.c (linux_low_ptrace_options): Forward declare.
2946 (linux_arch_setup): Update its comment for general use.
2947 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2948 (struct linux_target_ops): Use linux_post_create_inferior.
2949 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2950 to post_create_inferior.
2951 * nto-low.c (struct nto_target_ops): Likewise.
2952 * spu-low.c (struct spu_target_ops): Likewise.
2953 * win32-low.c (struct win32_target_ops): Likewise.
2954
2955 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2956
2957 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2958
2959 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2960
2961 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2962 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2963 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2964 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2965 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2966 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2967 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2968 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2969 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2970 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2971 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2972 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2973
2974 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2975
2976 * linux-low.c (linux_look_up_symbols): Don't call
2977 linux_supports_traceclone.
2978 * linux-low.h (thread_db_init): Remove use_events argument.
2979 * thread-db.c (thread_db_use_event): Remove global variable.
2980 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2981 (struct thread_db) <td_create_bp>: Remove field.
2982 (thread_db_create_event): Remove function.
2983 (thread_db_enable_reporting): Likewise.
2984 (find_one_thread): Don't check for thread_db_use_events.
2985 (attach_thread): Likewise.
2986 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2987 (try_thread_db_load_1): Don't check for thread_db_use_events.
2988 (thread_db_init): Remove use_events argument and thread events
2989 handling.
2990 (remove_thread_event_breakpoints): Remove function.
2991 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2992
2993 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2994
2995 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2996 New function.
2997 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2998 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2999 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3000 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3001 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3002 Initialize.
3003 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3004 New function.
3005 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3006 * linux-low.c (can_hardware_single_step): Use
3007 supports_hardware_single_step.
3008 (can_software_single_step): New function.
3009 (start_step_over): Call can_software_single_step.
3010 (linux_supports_hardware_single_step): New function.
3011 (struct target_ops) <supports_software_single_step>: Initialize.
3012 * linux-low.h (struct linux_target_ops)
3013 <supports_hardware_single_step>: Initialize.
3014 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3015 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3016 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3017 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3018 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3019 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3020 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3021 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3022 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3023 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3024 Initialize.
3025 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3026 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3027 Initialize.
3028 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3029 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3030 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3031 New function.
3032 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3033 * target.h (struct target_ops): <supports_software_single_step>:
3034 New field.
3035 (target_supports_software_single_step): New macro.
3036
3037 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3038
3039 * linux-low.c (linux_wait_1): Fix pc advance condition.
3040 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3041 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3042
3043 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3044
3045 * linux-arm-low.c (arm_is_thumb_mode): New function.
3046 (arm_breakpoint_at): Use arm_is_thumb_mode.
3047 (arm_breakpoint_kind_from_current_state): New function.
3048 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3049 Initialize.
3050 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3051 (linux_breakpoint_kind_from_current_state): New function.
3052 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3053 * linux-low.h (struct linux_target_ops)
3054 <breakpoint_kind_from_current_state>: New field.
3055 * target.h (struct target_ops): Likewise.
3056 (target_breakpoint_kind_from_current_state): New macro.
3057
3058 2015-11-30 Pedro Alves <palves@redhat.com>
3059
3060 * linux-low.c (linux_resume): Wake up the event loop before
3061 returning.
3062
3063 2015-11-30 Pedro Alves <palves@redhat.com>
3064
3065 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3066 check.
3067 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3068 to -1.
3069 * target.c (struct thread_search): New structure.
3070 (thread_search_callback): New function.
3071 (prev_general_thread): New global.
3072 (prepare_to_access_memory, done_accessing_memory): New functions.
3073 * target.h (prepare_to_access_memory, done_accessing_memory):
3074 Replace macros with function declarations.
3075
3076 2015-11-30 Pedro Alves <palves@redhat.com>
3077
3078 PR 14618
3079 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3080 report TARGET_WAITKIND_NO_RESUMED.
3081 * remote-utils.c (prepare_resume_reply): Handle
3082 TARGET_WAITKIND_NO_RESUMED.
3083 * server.c (report_no_resumed): New global.
3084 (handle_query) <qSupported>: Handle "no-resumed+". Report
3085 "no-resumed+" support.
3086 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3087 return error if the client doesn't support no-resumed events.
3088 (push_stop_notification): New function.
3089 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3090 events if the client supports them.
3091
3092 2015-11-30 Pedro Alves <palves@redhat.com>
3093
3094 * linux-low.c (thread_still_has_status_pending_p): Don't check
3095 vCont;t here.
3096 (lwp_resumed): New function.
3097 (status_pending_p_callback): Return early if the LWP is not
3098 supposed to be resumed.
3099
3100 2015-11-30 Pedro Alves <palves@redhat.com>
3101
3102 * linux-low.c (handle_extended_wait): Assert that the LWP's
3103 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3104 thread create events, leave the new child's status pending.
3105 (linux_low_filter_event): If GDB wants to hear about thread exit
3106 events, leave the LWP marked dead and don't delete it.
3107 (linux_wait_for_event_filtered): Don't check for thread exit.
3108 (filter_exit_event): New function.
3109 (linux_wait_1): Use it, when returning an exit event.
3110 (linux_resume_one_lwp_throw): Assert that the LWP's
3111 waitstatus is TARGET_WAITKIND_IGNORE.
3112 * remote-utils.c (prepare_resume_reply): Handle
3113 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3114 * server.c (report_thread_events): New global.
3115 (handle_general_set): Handle QThreadEvents.
3116 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3117 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3118 TARGET_WAITKIND_THREAD_EXITED.
3119 * server.h (report_thread_events): Declare.
3120
3121 2015-11-30 Pedro Alves <palves@redhat.com>
3122
3123 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3124 the thread's last_resume_kind was resume_stop.
3125
3126 2015-11-30 Pedro Alves <palves@redhat.com>
3127
3128 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3129 before returning.
3130
3131 2015-11-30 Pedro Alves <palves@redhat.com>
3132
3133 * server.c (handle_v_requests): Handle vCtrlC.
3134
3135 2015-11-30 Pedro Alves <palves@redhat.com>
3136
3137 * gdbthread.h (find_any_thread_of_pid): Declare.
3138 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3139 functions.
3140 * server.c (handle_query): If current_thread is NULL, look for
3141 another thread of the selected process.
3142
3143 2015-11-26 Daniel Colascione <dancol@dancol.org>
3144 Simon Marchi <simon.marchi@ericsson.com>
3145
3146 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3147 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3148 name in reply.
3149 * target.h (struct target_ops) <thread_name>: New field.
3150 (target_thread_name): New macro.
3151
3152 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3153
3154 * regcache.h (regcache_invalidate_pid): Add declaration.
3155 * regcache.c (regcache_invalidate_pid): New function, extracted
3156 from regcache_invalidate.
3157 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3158 Add trivial documentation comment.
3159 * lynx-low.c: Use regcache_invalidate_pid instead of
3160 regcache_invalidate.
3161
3162 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3163
3164 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3165 and Elf64_auxv_t if the target is Android.
3166
3167 2015-11-22 Doug Evans <xdje42@gmail.com>
3168
3169 * target.h: #include <sys/types.h>.
3170
3171 2015-11-19 Pedro Alves <palves@redhat.com>
3172
3173 * linux-low.c (linux_process_qsupported): Change prototype.
3174 Adjust.
3175 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3176 Change prototype.
3177 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3178 and adjust to loop over all features.
3179 * server.c (handle_query) <qSupported>: Adjust to call
3180 target_process_qsupported once, passing it a vector of unprocessed
3181 features.
3182 * target.h (struct target_ops) <process_qsupported>: Change
3183 prototype.
3184 (target_process_qsupported): Adjust.
3185
3186 2015-11-19 Pedro Alves <palves@redhat.com>
3187
3188 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3189 mode.
3190 * configure: Regenerate.
3191
3192 2015-11-19 Pedro Alves <palves@redhat.com>
3193
3194 * configure: Regenerate.
3195
3196 2015-11-19 Yao Qi <yao.qi@linaro.org>
3197
3198 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3199 type to uint32_t.
3200
3201 2015-11-19 Yao Qi <yao.qi@linaro.org>
3202
3203 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3204 (struct aarch64_operand): Move enum out.
3205
3206 2015-11-19 Yao Qi <yao.qi@linaro.org>
3207
3208 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3209 struct user_fpsimd_state *.
3210 (aarch64_store_fpregset): Likewise.
3211
3212 2015-11-19 Yao Qi <yao.qi@linaro.org>
3213
3214 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3215 struct user_pt_regs *.
3216 (aarch64_store_gregset): Likewise.
3217
3218 2015-11-18 Pedro Alves <palves@redhat.com>
3219
3220 * Makefile.in (all_object_files): Add $IPA_OBJS.
3221
3222 2015-11-17 Pedro Alves <palves@redhat.com>
3223
3224 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3225 GDB_SIGNAL_0 and gdb_signal_to_string.
3226
3227 2015-11-17 Pedro Alves <palves@redhat.com>
3228
3229 * win32-low.c (handle_output_debug_string): Remove parameter.
3230 (win32_kill): Remove our_status local and adjust call to
3231 handle_output_debug_string.
3232 (get_child_debug_event): Adjust call to
3233 handle_output_debug_string.
3234
3235 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3236
3237 * linux-mips-low.c (mips_fill_gregset): Add cast.
3238 (mips_store_gregset): Likewise.
3239 (mips_fill_fpregset): Likewise.
3240 (mips_store_fpregset): Likewise.
3241
3242 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3243
3244 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3245 priv.
3246
3247 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3248
3249 * linux-mips-low.c (mips_linux_new_thread): Change type of
3250 watch_type to enum target_hw_bp_type.
3251
3252 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3253
3254 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3255 Change return type to arm_hwbp_type.
3256
3257 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3258
3259 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3260 (arm_store_gregset): Likewise.
3261 * linux-arm-low.c (arm_get_hwcap): Likewise.
3262 (arm_read_description): Likewise.
3263
3264 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3265
3266 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3267
3268 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3269
3270 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3271 (ppc_fill_vsxregset): Likewise.
3272 (ppc_store_vsxregset): Likewise.
3273 (ppc_fill_vrregset): Likewise.
3274 (ppc_store_vrregset): Likewise.
3275 (ppc_fill_evrregset): Likewise.
3276 (ppc_store_evrregset): Likewise.
3277
3278 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3279
3280 * linux-ppc-low.c (ppc_usrregs_info): Remove
3281 forward-declaration.
3282 (ppc_arch_setup): Move lower in file.
3283
3284 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3285
3286 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3287 (ps_pdwrite): Likewise.
3288
3289 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3290
3291 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3292 to after assert checks.
3293
3294 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3295
3296 * proc-service.c (ps_pdread): Add/adjust casts.
3297 (ps_pdwrite): Add/adjust casts.
3298
3299 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3300
3301 * server.c (handle_search_memory_1): Cast return value of
3302 memmem.
3303
3304 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3305
3306 * server.c (write_qxfer_response): Change type of data to
3307 gdb_byte *.
3308
3309 2015-10-29 Pedro Alves <palves@redhat.com>
3310
3311 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3312
3313 2015-10-29 Pedro Alves <palves@redhat.com>
3314
3315 * tracepoint.c (clear_installed_tracepoints): Add casts.
3316
3317 2015-10-29 Pedro Alves <palves@redhat.com>
3318
3319 * server.c (handle_v_cont, process_serial_event): Add enum
3320 gdb_signal casts to signal parsing code.
3321
3322 2015-10-29 Pedro Alves <palves@redhat.com>
3323
3324 * linux-low.h (NULL_REGSET): Define.
3325 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3326 * linux-arm-low.c (arm_regsets): Likewise.
3327 * linux-crisv32-low.c (cris_regsets): Likewise.
3328 * linux-m68k-low.c (m68k_regsets): Likewise.
3329 * linux-mips-low.c (mips_regsets): Likewise.
3330 * linux-nios2-low.c (nios2_regsets): Likewise.
3331 * linux-ppc-low.c (ppc_regsets): Likewise.
3332 * linux-s390-low.c (s390_regsets): Likewise.
3333 * linux-sh-low.c (sh_regsets): Likewise.
3334 * linux-sparc-low.c (sparc_regsets): Likewise.
3335 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3336 * linux-tile-low.c (tile_regsets): Likewise.
3337 * linux-x86-low.c (x86_regsets): Likewise.
3338 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3339
3340 2015-10-29 Pedro Alves <palves@redhat.com>
3341
3342 * linux-low.h (NULL_REGSET): Define.
3343 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3344 * linux-arm-low.c (arm_regsets): Likewise.
3345 * linux-crisv32-low.c (cris_regsets): Likewise.
3346 * linux-m68k-low.c (m68k_regsets): Likewise.
3347 * linux-mips-low.c (mips_regsets): Likewise.
3348 * linux-nios2-low.c (nios2_regsets): Likewise.
3349 * linux-ppc-low.c (ppc_regsets): Likewise.
3350 * linux-s390-low.c (s390_regsets): Likewise.
3351 * linux-sh-low.c (sh_regsets): Likewise.
3352 * linux-sparc-low.c (sparc_regsets): Likewise.
3353 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3354 * linux-tile-low.c (tile_regsets): Likewise.
3355 * linux-x86-low.c (x86_regsets): Likewise.
3356 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3357
3358 2015-10-26 Doug Evans <dje@google.com>
3359
3360 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3361
3362 2015-10-26 Doug Evans <dje@google.com>
3363
3364 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3365
3366 2015-10-26 Doug Evans <dje@google.com>
3367
3368 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3369 for debug_printf.
3370 (attach_thread, find_new_threads_callback): Ditto.
3371
3372 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3373
3374 * mem-break.h (set_breakpoint_data): Remove.
3375
3376 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3377
3378 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3379 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3380 (initialize_low): Remove set_breakpoint_data call.
3381 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3382 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3383 (initialize_low): Remove set_breakpoint_data call.
3384 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3385 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3386 (initialize_low): Remove set_breakpoint_data call.
3387
3388 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3389
3390 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3391 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3392 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3393 * target.h (target_breakpoint_kind_from_pc): New macro.
3394
3395 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3396
3397 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3398 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3399 the default breakpoint kind.
3400
3401 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3402
3403 * linux-arm-low.c (arm_supports_z_point_type): Add software
3404 breakpoint support.
3405
3406 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3407
3408 * linux-arm-low.c: Refactor breakpoint definitions.
3409 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3410 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3411
3412 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3413
3414 * Makefile.in: Add arm.c/o.
3415 * configure.srv: Likewise.
3416 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3417 (arm_breakpoint_kind_from_pc): New function.
3418 (arm_sw_breakpoint_from_kind): Return proper kind.
3419 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3420
3421 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3422
3423 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3424 removal.
3425 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3426 (struct raw_breakpoint) <size>: Remove.
3427 (struct raw_breakpoint) <kind>: Add.
3428 (bp_size): New function.
3429 (bp_opcode): Likewise.
3430 (find_raw_breakpoint_at): Adjust for kind.
3431 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3432 (remove_memory_breakpoint): Adjust for kind call bp_size.
3433 (set_raw_breakpoint_at): Adjust for kind.
3434 (set_breakpoint): Likewise.
3435 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3436 (delete_raw_breakpoint): Adjust for kind.
3437 (delete_breakpoint): Likewise.
3438 (find_gdb_breakpoint): Likewise.
3439 (set_gdb_breakpoint_1): Likewise.
3440 (set_gdb_breakpoint): Likewise.
3441 (delete_gdb_breakpoint_1): Likewise.
3442 (delete_gdb_breakpoint): Likewise.
3443 (uninsert_raw_breakpoint): Likewise.
3444 (reinsert_raw_breakpoint): Likewise.
3445 (set_breakpoint_data): Remove.
3446 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3447 (check_mem_read): Adjust for kind call bp_size.
3448 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3449 (clone_one_breakpoint): Adjust for kind.
3450 * mem-break.h (set_gdb_breakpoint): Likewise.
3451 (delete_gdb_breakpoint): Likewise.
3452 * server.c (process_serial_event): Likewise.
3453
3454 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3455
3456 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3457 (struct linux_target_ops) <breakpoint>: Remove.
3458 (struct linux_target_ops) <breakpoint_len>: Remove.
3459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3461 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3462 (arm_sw_breakpoint_from_kind): New function.
3463 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3464 (struct linux_target_ops) <breakpoint>: Remove.
3465 (struct linux_target_ops) <breakpoint_len>: Remove.
3466 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3467 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3468 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3469 (struct linux_target_ops) <breakpoint>: Remove.
3470 (struct linux_target_ops) <breakpoint_len>: Remove.
3471 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3472 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3473 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3474 (struct linux_target_ops) <breakpoint>: Remove.
3475 (struct linux_target_ops) <breakpoint_len>: Remove.
3476 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3477 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3478 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3479 and sw_breakpoint_from_kind to increment the pc.
3480 (linux_breakpoint_kind_from_pc): New function.
3481 (linux_sw_breakpoint_from_kind): New function.
3482 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3483 (initialize_low): Call breakpoint_kind_from_pc and
3484 sw_breakpoint_from_kind to replace breakpoint_data/len.
3485 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3486 New field.
3487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3488 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3489 (struct linux_target_ops) <breakpoint>: Remove.
3490 (struct linux_target_ops) <breakpoint_len>: Remove.
3491 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3492 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3493 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3494 (struct linux_target_ops) <breakpoint>: Remove.
3495 (struct linux_target_ops) <breakpoint_len>: Remove.
3496 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3497 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3498 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3499 (struct linux_target_ops) <breakpoint>: Remove.
3500 (struct linux_target_ops) <breakpoint_len>: Remove.
3501 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3502 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3503 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3504 (struct linux_target_ops) <breakpoint>: Remove.
3505 (struct linux_target_ops) <breakpoint_len>: Remove.
3506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3508 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3509 (struct linux_target_ops) <breakpoint>: Remove.
3510 (struct linux_target_ops) <breakpoint_len>: Remove.
3511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3513 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3514 (struct linux_target_ops) <breakpoint>: Remove.
3515 (struct linux_target_ops) <breakpoint_len>: Remove.
3516 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3517 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3518 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3519 (struct linux_target_ops) <breakpoint>: Remove.
3520 (struct linux_target_ops) <breakpoint_len>: Remove.
3521 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3522 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3523 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3524 (struct linux_target_ops) <breakpoint>: Remove.
3525 (struct linux_target_ops) <breakpoint_len>: Remove.
3526 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3527 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3528 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3529 (struct linux_target_ops) <breakpoint>: Remove.
3530 (struct linux_target_ops) <breakpoint_len>: Remove.
3531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3533 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3534 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3535 (struct linux_target_ops) <breakpoint>: Remove.
3536 (struct linux_target_ops) <breakpoint_len>: Remove.
3537 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3538 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3539 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3540 (struct linux_target_ops) <breakpoint>: Remove.
3541 (struct linux_target_ops) <breakpoint_len>: Remove.
3542 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3543 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3544
3545 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3546
3547 * linux-cris-low.c (cris_get_pc): Remove void arg.
3548
3549 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3550
3551 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3552 variable name.
3553
3554 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3555
3556 * inferiors.c (thread_pid_matches_callback): New function.
3557 (find_thread_process): New function.
3558 (remove_thread): Reset current_thread.
3559 (remove_process): Assert threads have been removed first.
3560
3561 2015-10-15 Yao Qi <yao.qi@linaro.org>
3562
3563 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3564 if it is 3.
3565 (aarch64_remove_point): Likewise.
3566 * regcache.c (regcache_register_size): New function.
3567
3568 2015-10-12 Yao Qi <yao.qi@linaro.org>
3569
3570 * linux-aarch64-low.c: Update all callers as emit_load_store
3571 is renamed to aarch64_emit_load_store.
3572
3573 2015-10-12 Yao Qi <yao.qi@linaro.org>
3574
3575 * linux-aarch64-low.c: Update all callers of function renaming
3576 from emit_insn to aarch64_emit_insn.
3577
3578 2015-10-12 Yao Qi <yao.qi@linaro.org>
3579
3580 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3581 arch/aarch64-insn.h.
3582 (struct aarch64_memory_operand): Likewise.
3583 (ENCODE): Likewise.
3584 (emit_insn): Move to arch/aarch64-insn.c.
3585 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3586 (emit_load_store): Move to arch/aarch64-insn.c.
3587 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3588 (can_encode_int32): Remove.
3589
3590 2015-10-12 Yao Qi <yao.qi@linaro.org>
3591
3592 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3593 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3594 (aarch64_relocate_instruction): Likewise.
3595 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3596 (struct aarch64_insn_visitor): Likewise.
3597
3598 2015-10-12 Yao Qi <yao.qi@linaro.org>
3599
3600 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3601 (struct aarch64_insn_visitor): New.
3602 (struct aarch64_insn_relocation_data): New.
3603 (aarch64_ftrace_insn_reloc_b): New function.
3604 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3605 (aarch64_ftrace_insn_reloc_cb): Likewise.
3606 (aarch64_ftrace_insn_reloc_tb): Likewise.
3607 (aarch64_ftrace_insn_reloc_adr): Likewise.
3608 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3609 (aarch64_ftrace_insn_reloc_others): Likewise.
3610 (visitor): New.
3611 (aarch64_relocate_instruction): Use visitor.
3612
3613 2015-10-12 Yao Qi <yao.qi@linaro.org>
3614
3615 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3616 int. Add argument buf.
3617 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3618 aarch64_relocate_instruction.
3619
3620 2015-10-12 Yao Qi <yao.qi@linaro.org>
3621
3622 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3623 argument insn. Remove local variable insn. Don't call
3624 target_read_uint32.
3625 (aarch64_install_fast_tracepoint_jump_pad): Call
3626 target_read_uint32.
3627
3628 2015-09-30 Yao Qi <yao.qi@linaro.org>
3629
3630 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3631 (emit_load_store_pair): Likewise.
3632
3633 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3634
3635 * dll.c (match_dll): Add cast(s).
3636 (unloaded_dll): Likewise.
3637 * linux-low.c (second_thread_of_pid_p): Likewise.
3638 (delete_lwp_callback): Likewise.
3639 (count_events_callback): Likewise.
3640 (select_event_lwp_callback): Likewise.
3641 (linux_set_resume_request): Likewise.
3642 * server.c (accumulate_file_name_length): Likewise.
3643 (emit_dll_description): Likewise.
3644 (handle_qxfer_threads_worker): Likewise.
3645 (visit_actioned_threads): Likewise.
3646 * thread-db.c (any_thread_of): Likewise.
3647 * tracepoint.c (same_process_p): Likewise.
3648 (match_blocktype): Likewise.
3649 (build_traceframe_info_xml): Likewise.
3650
3651 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3652
3653 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3654 assignment.
3655 (gdb_unparse_agent_expr): Likewise.
3656 * hostio.c (require_data): Likewise.
3657 (handle_pread): Likewise.
3658 * linux-low.c (disable_regset): Likewise.
3659 (fetch_register): Likewise.
3660 (store_register): Likewise.
3661 (get_dynamic): Likewise.
3662 (linux_qxfer_libraries_svr4): Likewise.
3663 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3664 (set_fast_tracepoint_jump): Likewise.
3665 (uninsert_fast_tracepoint_jumps_at): Likewise.
3666 (reinsert_fast_tracepoint_jumps_at): Likewise.
3667 (validate_inserted_breakpoint): Likewise.
3668 (clone_agent_expr): Likewise.
3669 * regcache.c (init_register_cache): Likewise.
3670 * remote-utils.c (putpkt_binary_1): Likewise.
3671 (decode_M_packet): Likewise.
3672 (decode_X_packet): Likewise.
3673 (look_up_one_symbol): Likewise.
3674 (relocate_instruction): Likewise.
3675 (monitor_output): Likewise.
3676 * server.c (handle_search_memory): Likewise.
3677 (handle_qxfer_exec_file): Likewise.
3678 (handle_qxfer_libraries): Likewise.
3679 (handle_qxfer): Likewise.
3680 (handle_query): Likewise.
3681 (handle_v_cont): Likewise.
3682 (handle_v_run): Likewise.
3683 (captured_main): Likewise.
3684 * target.c (write_inferior_memory): Likewise.
3685 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3686 * tracepoint.c (init_trace_buffer): Likewise.
3687 (add_tracepoint_action): Likewise.
3688 (add_traceframe): Likewise.
3689 (add_traceframe_block): Likewise.
3690 (cmd_qtdpsrc): Likewise.
3691 (cmd_qtdv): Likewise.
3692 (cmd_qtstatus): Likewise.
3693 (response_source): Likewise.
3694 (response_tsv): Likewise.
3695 (cmd_qtnotes): Likewise.
3696 (gdb_collect): Likewise.
3697 (initialize_tracepoint): Likewise.
3698
3699 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3700
3701 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3702 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3703 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3704 <NOP>: New.
3705 (enum aarch64_condition_codes): New enum.
3706 (w0): New static global.
3707 (fp): Likewise.
3708 (lr): Likewise.
3709 (struct aarch64_memory_operand) <type>: New
3710 MEMORY_OPERAND_POSTINDEX type.
3711 (postindex_memory_operand): New helper function.
3712 (emit_ret): New function.
3713 (emit_load_store_pair): New function, factored out of emit_stp
3714 with support for MEMORY_OPERAND_POSTINDEX.
3715 (emit_stp): Rewrite using emit_load_store_pair.
3716 (emit_ldp): New function.
3717 (emit_load_store): Likewise.
3718 (emit_ldr): Mention post-index instruction in comment.
3719 (emit_ldrh): New function.
3720 (emit_ldrb): New function.
3721 (emit_ldrsw): Mention post-index instruction in comment.
3722 (emit_str): Likewise.
3723 (emit_subs): New function.
3724 (emit_cmp): Likewise.
3725 (emit_and): Likewise.
3726 (emit_orr): Likewise.
3727 (emit_orn): Likewise.
3728 (emit_eor): Likewise.
3729 (emit_mvn): Likewise.
3730 (emit_lslv): Likewise.
3731 (emit_lsrv): Likewise.
3732 (emit_asrv): Likewise.
3733 (emit_mul): Likewise.
3734 (emit_sbfm): Likewise.
3735 (emit_sbfx): Likewise.
3736 (emit_ubfm): Likewise.
3737 (emit_ubfx): Likewise.
3738 (emit_csinc): Likewise.
3739 (emit_cset): Likewise.
3740 (emit_nop): Likewise.
3741 (emit_ops_insns): New helper function.
3742 (emit_pop): Likewise.
3743 (emit_push): Likewise.
3744 (aarch64_emit_prologue): New function.
3745 (aarch64_emit_epilogue): Likewise.
3746 (aarch64_emit_add): Likewise.
3747 (aarch64_emit_sub): Likewise.
3748 (aarch64_emit_mul): Likewise.
3749 (aarch64_emit_lsh): Likewise.
3750 (aarch64_emit_rsh_signed): Likewise.
3751 (aarch64_emit_rsh_unsigned): Likewise.
3752 (aarch64_emit_ext): Likewise.
3753 (aarch64_emit_log_not): Likewise.
3754 (aarch64_emit_bit_and): Likewise.
3755 (aarch64_emit_bit_or): Likewise.
3756 (aarch64_emit_bit_xor): Likewise.
3757 (aarch64_emit_bit_not): Likewise.
3758 (aarch64_emit_equal): Likewise.
3759 (aarch64_emit_less_signed): Likewise.
3760 (aarch64_emit_less_unsigned): Likewise.
3761 (aarch64_emit_ref): Likewise.
3762 (aarch64_emit_if_goto): Likewise.
3763 (aarch64_emit_goto): Likewise.
3764 (aarch64_write_goto_address): Likewise.
3765 (aarch64_emit_const): Likewise.
3766 (aarch64_emit_call): Likewise.
3767 (aarch64_emit_reg): Likewise.
3768 (aarch64_emit_pop): Likewise.
3769 (aarch64_emit_stack_flush): Likewise.
3770 (aarch64_emit_zero_ext): Likewise.
3771 (aarch64_emit_swap): Likewise.
3772 (aarch64_emit_stack_adjust): Likewise.
3773 (aarch64_emit_int_call_1): Likewise.
3774 (aarch64_emit_void_call_2): Likewise.
3775 (aarch64_emit_eq_goto): Likewise.
3776 (aarch64_emit_ne_goto): Likewise.
3777 (aarch64_emit_lt_goto): Likewise.
3778 (aarch64_emit_le_goto): Likewise.
3779 (aarch64_emit_gt_goto): Likewise.
3780 (aarch64_emit_ge_got): Likewise.
3781 (aarch64_emit_ops_impl): New static global variable.
3782 (aarch64_emit_ops): New target function, return
3783 &aarch64_emit_ops_impl.
3784 (struct linux_target_ops): Install it.
3785
3786 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3787
3788 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3789 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3790 aarch64-ipa.o.
3791 * linux-aarch64-ipa.c: New file.
3792 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3793 and endian.h.
3794 (aarch64_get_thread_area): New target method.
3795 (extract_signed_bitfield): New helper function.
3796 (aarch64_decode_ldr_literal): New function.
3797 (enum aarch64_opcodes): New enum.
3798 (struct aarch64_register): New struct.
3799 (struct aarch64_operand): New struct.
3800 (x0): New static global.
3801 (x1): Likewise.
3802 (x2): Likewise.
3803 (x3): Likewise.
3804 (x4): Likewise.
3805 (w2): Likewise.
3806 (ip0): Likewise.
3807 (sp): Likewise.
3808 (xzr): Likewise.
3809 (aarch64_register): New helper function.
3810 (register_operand): Likewise.
3811 (immediate_operand): Likewise.
3812 (struct aarch64_memory_operand): New struct.
3813 (offset_memory_operand): New helper function.
3814 (preindex_memory_operand): Likewise.
3815 (enum aarch64_system_control_registers): New enum.
3816 (ENCODE): New macro.
3817 (emit_insn): New helper function.
3818 (emit_b): New function.
3819 (emit_bcond): Likewise.
3820 (emit_cb): Likewise.
3821 (emit_tb): Likewise.
3822 (emit_blr): Likewise.
3823 (emit_stp): Likewise.
3824 (emit_ldp_q_offset): Likewise.
3825 (emit_stp_q_offset): Likewise.
3826 (emit_load_store): Likewise.
3827 (emit_ldr): Likewise.
3828 (emit_ldrsw): Likewise.
3829 (emit_str): Likewise.
3830 (emit_ldaxr): Likewise.
3831 (emit_stxr): Likewise.
3832 (emit_stlr): Likewise.
3833 (emit_data_processing_reg): Likewise.
3834 (emit_data_processing): Likewise.
3835 (emit_add): Likewise.
3836 (emit_sub): Likewise.
3837 (emit_mov): Likewise.
3838 (emit_movk): Likewise.
3839 (emit_mov_addr): Likewise.
3840 (emit_mrs): Likewise.
3841 (emit_msr): Likewise.
3842 (emit_sevl): Likewise.
3843 (emit_wfe): Likewise.
3844 (append_insns): Likewise.
3845 (can_encode_int32_in): New helper function.
3846 (aarch64_relocate_instruction): New function.
3847 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3848 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3849 (struct linux_target_ops): Install aarch64_get_thread_area,
3850 aarch64_install_fast_tracepoint_jump_pad and
3851 aarch64_get_min_fast_tracepoint_insn_len.
3852
3853 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3854
3855 * Makefile.in (aarch64-insn.o): New rule.
3856 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3857
3858 2015-09-21 Yao Qi <yao.qi@linaro.org>
3859
3860 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3861
3862 2015-09-21 Yao Qi <yao.qi@linaro.org>
3863
3864 * tracepoint.c (max_jump_pad_size): Remove.
3865
3866 2015-09-18 Yao Qi <yao.qi@linaro.org>
3867
3868 * linux-aarch64-low.c: Don't include sys/uio.h.
3869 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3870
3871 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3872
3873 * tracepoint.c (eval_result_type): Change prototype.
3874 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3875
3876 2015-09-15 Pedro Alves <palves@redhat.com>
3877
3878 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3879 Check whether to report exec events instead of checking whether
3880 multiprocess is enabled.
3881
3882 2015-09-15 Pedro Alves <palves@redhat.com>
3883
3884 PR remote/18965
3885 * remote-utils.c (prepare_resume_reply): Merge
3886 TARGET_WAITKIND_VFORK_DONE switch case with the
3887 TARGET_WAITKIND_FORKED case.
3888
3889 2015-09-15 Yao Qi <yao.qi@linaro.org>
3890
3891 * server.c (handle_query): Check string comparison using
3892 "else if" instead of "if".
3893
3894 2015-09-15 Yao Qi <yao.qi@linaro.org>
3895
3896 * server.c (vCont_supported): New global variable.
3897 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3898 matches. Append ";vContSupported+" to own_buf.
3899 (handle_v_requests): Append ";s;S" to own_buf if target supports
3900 hardware single step or vCont_supported is false.
3901 (capture_main): Set vCont_supported to zero.
3902
3903 2015-09-15 Yao Qi <yao.qi@linaro.org>
3904
3905 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3906 it to ...
3907 (linux_supports_hardware_single_step): ... New function.
3908 (linux_target_ops): Update.
3909 * lynx-low.c (lynx_target_ops): Set field
3910 supports_hardware_single_step to target_can_do_hardware_single_step.
3911 * nto-low.c (nto_target_ops): Likewise.
3912 * spu-low.c (spu_target_ops): Likewise.
3913 * win32-low.c (win32_target_ops): Likewise.
3914 * target.c (target_can_do_hardware_single_step): New function.
3915 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3916 Remove. <supports_hardware_single_step>: New field.
3917 (target_supports_conditional_breakpoints): Remove.
3918 (target_supports_hardware_single_step): New macro.
3919 (target_can_do_hardware_single_step): Declare.
3920 * server.c (handle_query): Use target_supports_hardware_single_step
3921 instead of target_supports_conditional_breakpoints.
3922
3923 2015-09-15 Yao Qi <yao.qi@linaro.org>
3924
3925 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3926 function.
3927 (struct linux_target_ops the_low_target): Install
3928 aarch64_linux_siginfo_fixup.
3929
3930 2015-09-11 Don Breazeal <donb@codesourcery.com>
3931 Luis Machado <lgustavo@codesourcery.com>
3932
3933 * linux-low.c (linux_mourn): Static declaration.
3934 (linux_arch_setup): Move in front of
3935 handle_extended_wait.
3936 (linux_arch_setup_thread): New function.
3937 (handle_extended_wait): Handle exec events. Call
3938 linux_arch_setup_thread. Make event_lwp argument a
3939 pointer-to-a-pointer.
3940 (check_zombie_leaders): Do not check stopped threads.
3941 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3942 (linux_low_filter_event): Add lwp and thread for exec'ing
3943 non-leader thread if leader thread has been deleted.
3944 Refactor code into linux_arch_setup_thread and call it.
3945 Pass child lwp pointer by reference to handle_extended_wait.
3946 (linux_wait_for_event_filtered): Update comment.
3947 (linux_wait_1): Prevent clobbering exec event status.
3948 (linux_supports_exec_events): New function.
3949 (linux_target_ops) <supports_exec_events>: Initialize new member.
3950 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3951 new member.
3952 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3953 * server.c (report_exec_events): New global variable.
3954 (handle_query): Handle qSupported query for exec-events feature.
3955 (captured_main): Initialize report_exec_events.
3956 * server.h (report_exec_events): Declare new global variable.
3957 * target.h (struct target_ops) <supports_exec_events>: New
3958 member.
3959 (target_supports_exec_events): New macro.
3960 * win32-low.c (win32_target_ops) <supports_exec_events>:
3961 Initialize new member.
3962
3963 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3964
3965 * linux-low.c (linux_low_enable_btrace): Remove.
3966 (linux_target_ops): Replace linux_low_enable_btrace with
3967 linux_enable_btrace.
3968
3969 2015-09-03 Yao Qi <yao.qi@linaro.org>
3970
3971 * linux-aarch64-low.c (aarch64_insert_point): Call
3972 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3973 returns true.
3974
3975 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3976
3977 * linux-low.c (check_stopped_by_breakpoint): Use
3978 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3979
3980 2015-08-27 Pedro Alves <palves@redhat.com>
3981
3982 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3983
3984 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3985
3986 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3987 the XNEW-family equivalent.
3988 (compile_bytecodes): Likewise.
3989 * dll.c (loaded_dll): Likewise.
3990 * event-loop.c (append_callback_event): Likewise.
3991 (create_file_handler): Likewise.
3992 (create_file_event): Likewise.
3993 * hostio.c (handle_open): Likewise.
3994 * inferiors.c (add_thread): Likewise.
3995 (add_process): Likewise.
3996 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3997 * linux-arm-low.c (arm_new_process): Likewise.
3998 (arm_new_thread): Likewise.
3999 * linux-low.c (add_to_pid_list): Likewise.
4000 (linux_add_process): Likewise.
4001 (handle_extended_wait): Likewise.
4002 (add_lwp): Likewise.
4003 (enqueue_one_deferred_signal): Likewise.
4004 (enqueue_pending_signal): Likewise.
4005 (linux_resume_one_lwp_throw): Likewise.
4006 (linux_resume_one_thread): Likewise.
4007 (linux_read_memory): Likewise.
4008 (linux_write_memory): Likewise.
4009 * linux-mips-low.c (mips_linux_new_process): Likewise.
4010 (mips_linux_new_thread): Likewise.
4011 (mips_add_watchpoint): Likewise.
4012 * linux-x86-low.c (initialize_low_arch): Likewise.
4013 * lynx-low.c (lynx_add_process): Likewise.
4014 * mem-break.c (set_raw_breakpoint_at): Likewise.
4015 (set_breakpoint): Likewise.
4016 (add_condition_to_breakpoint): Likewise.
4017 (add_commands_to_breakpoint): Likewise.
4018 (clone_agent_expr): Likewise.
4019 (clone_one_breakpoint): Likewise.
4020 * regcache.c (new_register_cache): Likewise.
4021 * remote-utils.c (look_up_one_symbol): Likewise.
4022 * server.c (queue_stop_reply): Likewise.
4023 (start_inferior): Likewise.
4024 (queue_stop_reply_callback): Likewise.
4025 (handle_target_event): Likewise.
4026 * spu-low.c (fetch_ppc_memory): Likewise.
4027 (store_ppc_memory): Likewise.
4028 * target.c (set_target_ops): Likewise.
4029 * thread-db.c (thread_db_load_search): Likewise.
4030 (try_thread_db_load_1): Likewise.
4031 * tracepoint.c (add_tracepoint): Likewise.
4032 (add_tracepoint_action): Likewise.
4033 (create_trace_state_variable): Likewise.
4034 (cmd_qtdpsrc): Likewise.
4035 (cmd_qtro): Likewise.
4036 (add_while_stepping_state): Likewise.
4037 * win32-low.c (child_add_thread): Likewise.
4038 (get_image_name): Likewise.
4039
4040 2015-08-25 Yao Qi <yao.qi@linaro.org>
4041
4042 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4043
4044 2015-08-25 Yao Qi <yao.qi@linaro.org>
4045
4046 * Makefile.in (aarch64-linux.o): New rule.
4047 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4048 srv_tgtobj.
4049 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4050 (aarch64_init_debug_reg_state): Make it extern.
4051 (aarch64_linux_prepare_to_resume): Remove.
4052
4053 2015-08-25 Yao Qi <yao.qi@linaro.org>
4054
4055 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4056 lwp_arch_private_info and ptid_of_lwp.
4057
4058 2015-08-25 Yao Qi <yao.qi@linaro.org>
4059
4060 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4061 Find proc_info by find_process_pid. All callers updated.
4062
4063 2015-08-25 Yao Qi <yao.qi@linaro.org>
4064
4065 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4066 Remove.
4067 (debug_reg_change_callback): Remove.
4068 (aarch64_notify_debug_reg_change): Remove.
4069
4070 2015-08-25 Yao Qi <yao.qi@linaro.org>
4071
4072 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4073 Call current_lwp_ptid.
4074
4075 2015-08-25 Yao Qi <yao.qi@linaro.org>
4076
4077 * linux-aarch64-low.c (debug_reg_change_callback): Use
4078 debug_printf.
4079
4080 2015-08-25 Yao Qi <yao.qi@linaro.org>
4081
4082 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4083
4084 2015-08-25 Yao Qi <yao.qi@linaro.org>
4085
4086 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4087
4088 2015-08-25 Yao Qi <yao.qi@linaro.org>
4089
4090 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4091 the code.
4092
4093 2015-08-25 Yao Qi <yao.qi@linaro.org>
4094
4095 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4096 Remove.
4097 (debug_reg_change_callback): Remove argument entry and add argument
4098 lwp. Remove local variable thread. Don't print thread id in the
4099 debugging output. Don't check whether pid of thread equals to pid.
4100 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4101 iterate_over_lwps instead find_inferior.
4102
4103 2015-08-24 Pedro Alves <palves@redhat.com>
4104
4105 * inferiors.c (get_first_process): New function.
4106 * inferiors.h (get_first_process): New declaration.
4107 * remote-utils.c (read_ptid): Default to the first process in the
4108 list, instead of to the current thread's process.
4109
4110 2015-08-24 Pedro Alves <palves@redhat.com>
4111
4112 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4113 * event-loop.c: Likewise.
4114 * remote-utils.c: Likewise.
4115 * tracepoint.c: Likewise.
4116
4117 2015-08-24 Pedro Alves <palves@redhat.com>
4118
4119 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4120 ptid_get_lwp.
4121
4122 2015-08-21 Pedro Alves <palves@redhat.com>
4123
4124 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4125 instead of literal 1.
4126
4127 2015-08-21 Pedro Alves <palves@redhat.com>
4128
4129 * tdesc.c (default_description): Explicitly zero-initialize.
4130
4131 2015-08-21 Pedro Alves <palves@redhat.com>
4132
4133 PR gdb/18749
4134 * inferiors.c (remove_thread): Discard any pending stop reply for
4135 this thread.
4136 * server.c (remove_all_on_match_pid): Rename to ...
4137 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4138 instead of a pid.
4139 (discard_queued_stop_replies): Change parameter to a ptid. Now
4140 extern.
4141 (handle_v_kill, kill_inferior_callback, captured_main)
4142 (process_serial_event): Adjust.
4143 * server.h (discard_queued_stop_replies): Declare.
4144
4145 2015-08-21 Pedro Alves <palves@redhat.com>
4146
4147 * linux-low.c (wait_for_sigstop): Always switch to no thread
4148 selected if the previously current thread dies.
4149 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4150 process instead of the current thread's.
4151 * remote-utils.c (input_interrupt): Don't check if there's no
4152 current thread.
4153 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4154 current thread to the general thread fails, error out.
4155 (handle_qxfer_auxv, handle_qxfer_libraries)
4156 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4157 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4158 (handle_query): Check if there's a thread selected instead of
4159 checking whether there's any thread in the thread list.
4160 (handle_qxfer_threads, handle_qxfer_btrace)
4161 (handle_qxfer_btrace_conf): Don't error out early if there's no
4162 thread in the thread list.
4163 (handle_v_cont, myresume): Don't set the current thread to the
4164 continue thread.
4165 (process_serial_event) <Hg handling>: Also set thread_id if the
4166 previous general thread is still alive.
4167 (process_serial_event) <g/G handling>: If setting the current
4168 thread to the general thread fails, error out.
4169 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4170 thread's lwp instead of the current thread's.
4171 * target.c (set_desired_thread): If the desired thread was not
4172 found, leave the current thread pointing to NULL. Return an int
4173 (boolean) indicating success.
4174 * target.h (set_desired_thread): Change return type to int.
4175
4176 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4177
4178 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4179 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4180 #includes.
4181 (ps_get_thread_area): New function.
4182
4183 2015-08-19 Gary Benson <gbenson@redhat.com>
4184
4185 * hostio.c (handle_pread): Do not attempt to read more data
4186 than hostio_reply_with_data can fit in a packet.
4187
4188 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4189
4190 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4191
4192 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4193
4194 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4195
4196 2015-08-06 Pedro Alves <palves@redhat.com>
4197
4198 * tracepoint.c (expr_eval_result): Now an int.
4199
4200 2015-08-06 Pedro Alves <palves@redhat.com>
4201
4202 * gdbthread.h (struct regcache): Forward declare.
4203 (struct thread_info) <regcache_data>: Now a struct regcache
4204 pointer.
4205 * inferiors.c (inferior_regcache_data)
4206 (set_inferior_regcache_data): Now work with struct regcache
4207 pointers.
4208 * inferiors.h (struct regcache): Forward declare.
4209 (inferior_regcache_data, set_inferior_regcache_data): Now work
4210 with struct regcache pointers.
4211 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4212 (free_register_cache_thread): Remove struct regcache pointer
4213 casts.
4214
4215 2015-08-06 Pedro Alves <palves@redhat.com>
4216
4217 * server.c (captured_main): On error, print the exception message
4218 to stderr, and if run_once is set, throw a quit.
4219
4220 2015-08-06 Pedro Alves <palves@redhat.com>
4221
4222 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4223 the current thread.
4224
4225 2015-08-06 Pedro Alves <palves@redhat.com>
4226
4227 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4228 reading beyond the passed in buffer length.
4229
4230 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4231
4232 * tracepoint.c (symbol_list) <required>: Remove.
4233
4234 2015-08-06 Pedro Alves <palves@redhat.com>
4235
4236 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4237 count if stopping and suspending threads.
4238 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4239 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4240 (linux_detach): Complete an ongoing step-over.
4241 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4242 throughout.
4243 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4244 (linux_wait_1): If passing a signal to the inferior after
4245 finishing a step-over, unsuspend and re-resume all lwps. If we
4246 see a single-step event but the thread should be continuing, don't
4247 pass the trap to gdb.
4248 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4249 internal_error instead of gdb_assert.
4250 (enqueue_pending_signal): New function.
4251 (check_ptrace_stopped_lwp_gone): Add debug output.
4252 (start_step_over): Use internal_error instead of gdb_assert.
4253 (complete_ongoing_step_over): New function.
4254 (linux_resume_one_thread): Don't resume a suspended thread.
4255 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4256 it stepping.
4257
4258 2015-08-06 Pedro Alves <palves@redhat.com>
4259
4260 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4261 (linux_thread_alive): Use lwp_is_marked_dead.
4262 (extended_event_reported): Delete.
4263 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4264 instead of extended_event_reported.
4265 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4266 as well.
4267 (lwp_is_marked_dead): New function.
4268 (lwp_running): Use lwp_is_marked_dead.
4269 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4270 comment.
4271
4272 2015-08-06 Pedro Alves <palves@redhat.com>
4273
4274 * linux-low.c (linux_wait_1): Move fork event output out of the
4275 !report_to_gdb check. Pass event_child->waitstatus to
4276 target_waitstatus_to_string instead of ourstatus.
4277
4278 2015-08-04 Yao Qi <yao.qi@linaro.org>
4279
4280 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4281 if current_thread is 32 bit.
4282
4283 2015-08-04 Yao Qi <yao.qi@linaro.org>
4284
4285 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4286 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4287 * server.c (extended_protocol): Remove "static".
4288 * server.h (extended_protocol): Declare it.
4289
4290 2015-08-04 Yao Qi <yao.qi@linaro.org>
4291
4292 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4293 both aarch64 and aarch32.
4294 (aarch64_set_pc): Likewise.
4295
4296 2015-08-04 Yao Qi <yao.qi@linaro.org>
4297
4298 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4299 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4300 arm-with-neon.xml to srv_xmlfiles.
4301 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4302 (is_64bit_tdesc): New function.
4303 (aarch64_linux_read_description): New function.
4304 (aarch64_arch_setup): Call aarch64_linux_read_description.
4305 (regs_info): Rename to regs_info_aarch64.
4306 (aarch64_regs_info): Return right regs_info.
4307 (initialize_low_arch): Call initialize_low_arch_aarch32.
4308
4309 2015-08-04 Yao Qi <yao.qi@linaro.org>
4310
4311 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4312 * linux-aarch32-low.c: New file.
4313 * linux-aarch32-low.h: New file.
4314 * linux-arm-low.c (arm_fill_gregset): Move it to
4315 linux-aarch32-low.c.
4316 (arm_store_gregset): Likewise.
4317 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4318 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4319 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4320 (regs_info): Rename to regs_info_arm.
4321 (arm_regs_info): Return regs_info_aarch32 if
4322 have_ptrace_getregset is 1 and target description is
4323 arm_with_neon or arm_with_vfpv3.
4324 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4325 Call initialize_low_arch_aarch32 instead.
4326
4327 2015-08-04 Yao Qi <yao.qi@linaro.org>
4328
4329 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4330 * linux-low.c: ... here.
4331 * linux-low.h (have_ptrace_getregset): Declare it.
4332
4333 2015-08-04 Pedro Alves <palves@redhat.com>
4334
4335 * thread-db.c (struct thread_db): Use new typedefs.
4336 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4337 CHK calls.
4338 (disable_thread_event_reporting): Cast result of dlsym to
4339 destination function pointer type.
4340 (thread_db_mourn): Use td_ta_delete_ftype.
4341
4342 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4343
4344 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4345 arch variant.
4346 (CDX_BREAKPOINT): Define for R2.
4347 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4348 (the_low_target): Add comments.
4349
4350 2015-07-30 Yao Qi <yao.qi@linaro.org>
4351
4352 * linux-arm-low.c (arm_hwcap): Remove it.
4353 (arm_read_description): New local variable arm_hwcap. Don't
4354 set arm_hwcap to zero.
4355
4356 2015-07-30 Yao Qi <yao.qi@linaro.org>
4357
4358 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4359 Use regcache->tdesc instead.
4360 (arm_store_wmmxregset): Likewise.
4361 (arm_fill_vfpregset): Likewise.
4362 (arm_store_vfpregset): Likewise.
4363
4364 2015-07-30 Yao Qi <yao.qi@linaro.org>
4365
4366 * linux-arm-low.c: Include arch/arm.h.
4367 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4368 (arm_store_gregset): Likewise.
4369
4370 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4371
4372 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4373 ptrace's 4th parameter.
4374
4375 2015-07-27 Yao Qi <yao.qi@linaro.org>
4376
4377 * configure.srv (case aarch64*-*-linux*): Don't set
4378 srv_linux_usrregs.
4379
4380 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4381
4382 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4383 sys/ptrace.h.
4384 * linux-arm-low.c: Likewise.
4385 * linux-cris-low.c: Likewise.
4386 * linux-crisv32-low.c: Likewise.
4387 * linux-low.c: Likewise.
4388 * linux-m68k-low.c: Likewise.
4389 * linux-mips-low.c: Likewise.
4390 * linux-nios2-low.c: Likewise.
4391 * linux-s390-low.c: Likewise.
4392 * linux-sparc-low.c: Likewise.
4393 * linux-tic6x-low.c: Likewise.
4394 * linux-tile-low.c: Likewise.
4395 * linux-x86-low.c: Likewise.
4396
4397 2015-07-24 Pedro Alves <palves@redhat.com>
4398
4399 * config.in: Regenerate.
4400 * configure: Regenerate.
4401
4402 2015-07-24 Pedro Alves <palves@redhat.com>
4403
4404 * acinclude.m4: Include ../ptrace.m4.
4405 * configure.ac: Call GDB_AC_PTRACE.
4406 * config.in, configure: Regenerate.
4407
4408 2015-07-24 Yao Qi <yao.qi@linaro.org>
4409
4410 * linux-low.c (linux_create_inferior): Remove setting to
4411 proc->priv->new_inferior.
4412 (linux_attach): Likewise.
4413 (linux_low_filter_event): Likewise.
4414 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4415
4416 2015-07-24 Yao Qi <yao.qi@linaro.org>
4417
4418 * linux-low.c (linux_arch_setup): New function.
4419 (linux_low_filter_event): If proc->tdesc is NULL and
4420 proc->attached is true, call the_low_target.arch_setup.
4421 Otherwise, keep status pending, and return.
4422 (linux_resume_one_lwp_throw): Don't call get_pc if
4423 thread->while_stepping isn't NULL. Don't call
4424 get_thread_regcache if proc->tdesc is NULL.
4425 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4426 (linux_target_ops): Install arch_setup.
4427 * server.c (start_inferior): Call the_target->arch_setup.
4428 * target.h (struct target_ops) <arch_setup>: New field.
4429 (target_arch_setup): New marco.
4430 * lynx-low.c (lynx_target_ops): Update.
4431 * nto-low.c (nto_target_ops): Update.
4432 * spu-low.c (spu_target_ops): Update.
4433 * win32-low.c (win32_target_ops): Update.
4434
4435 2015-07-24 Yao Qi <yao.qi@linaro.org>
4436
4437 * linux-low.c (linux_add_process): Don't set
4438 proc->priv->new_inferior.
4439 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4440 (linux_attach): Likewise.
4441
4442 2015-07-24 Yao Qi <yao.qi@linaro.org>
4443
4444 * server.c (start_inferior): Code refactor.
4445
4446 2015-07-24 Yao Qi <yao.qi@linaro.org>
4447
4448 * server.c (process_serial_event): Set general_thread.
4449
4450 2015-07-21 Yao Qi <yao.qi@linaro.org>
4451
4452 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4453 aarch64_linux_get_debug_reg_capacity.
4454
4455 2015-07-17 Yao Qi <yao.qi@linaro.org>
4456
4457 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4458 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4459 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4460 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4461 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4462 (AARCH64_HWP_ALIGNMENT): Likewise.
4463 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4464 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4465 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4466 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4467 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4468 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4469 (struct aarch64_debug_reg_state): Likewise.
4470 (struct arch_lwp_info): Likewise.
4471 (aarch64_align_watchpoint): Likewise.
4472 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4473 (aarch64_watchpoint_length): Likewise.
4474 (aarch64_point_encode_ctrl_reg): Likewise
4475 (aarch64_point_is_aligned): Likewise.
4476 (aarch64_align_watchpoint): Likewise.
4477 (aarch64_linux_set_debug_regs):
4478 (aarch64_dr_state_insert_one_point): Likewise.
4479 (aarch64_dr_state_remove_one_point): Likewise.
4480 (aarch64_handle_breakpoint): Likewise.
4481 (aarch64_handle_aligned_watchpoint): Likewise.
4482 (aarch64_handle_unaligned_watchpoint): Likewise.
4483 (aarch64_handle_watchpoint): Likewise.
4484
4485 2015-07-17 Yao Qi <yao.qi@linaro.org>
4486
4487 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4488 and don't aarch64_get_debug_reg_state. All callers update.
4489 (aarch64_handle_aligned_watchpoint): Likewise.
4490 (aarch64_handle_unaligned_watchpoint): Likewise.
4491 (aarch64_handle_watchpoint): Likewise.
4492 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4493 (aarch64_remove_point): Likewise.
4494
4495 2015-07-17 Yao Qi <yao.qi@linaro.org>
4496
4497 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4498 debug_printf.
4499 (aarch64_handle_unaligned_watchpoint): Likewise.
4500
4501 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4502
4503 Revert the previous 3 commits:
4504 Move gdb_regex* to common/
4505 Move linux_find_memory_regions_full & co.
4506 gdbserver build-id attribute generator
4507
4508 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4509 Jan Kratochvil <jan.kratochvil@redhat.com>
4510
4511 gdbserver build-id attribute generator.
4512 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4513 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4514 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4515 (find_phdr): New.
4516 (get_dynamic): Use find_pdhr to traverse program headers.
4517 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4518 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4519 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4520 (get_hex_build_id): New.
4521 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4522 to reply XML document.
4523
4524 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4525 Jan Kratochvil <jan.kratochvil@redhat.com>
4526
4527 * target.c: Include target/target-utils.h and fcntl.h.
4528 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4529 (target_fileio_read_stralloc): New functions.
4530
4531 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4532
4533 * Makefile.in (OBS): Add gdb_regex.o.
4534 (gdb_regex.o): New.
4535 * config.in: Rebuilt.
4536 * configure: Rebuilt.
4537
4538 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4539 Jan Kratochvil <jan.kratochvil@redhat.com>
4540
4541 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4542 * Makefile.in (OBS): Add target-utils.o.
4543 (linux-maps.o, target-utils.o): New.
4544 * configure.srv (srv_linux_obj): Add linux-maps.o.
4545
4546 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4547
4548 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4549 function, return 1.
4550 (the_low_target): Install it.
4551
4552 2015-07-14 Pedro Alves <palves@redhat.com>
4553
4554 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4555 Instead, ignore ECHILD, and throw an error for other errnos.
4556
4557 2015-07-10 Pedro Alves <palves@redhat.com>
4558
4559 * event-loop.c (struct callback_event) <data>: Change type to
4560 gdb_client_data instance instead of gdb_client_data pointer.
4561 (append_callback_event): Adjust.
4562
4563 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4564
4565 * linux-aarch64-low.c: Add comments for each linux_target_ops
4566 method. Remove comments already covered in target_ops and
4567 linux_target_ops definitions.
4568 (the_low_target): Add comments for each unimplemented method.
4569
4570 2015-07-09 Yao Qi <yao.qi@linaro.org>
4571
4572 * linux-aarch64-low.c (aarch64_regmap): Remove.
4573 (aarch64_usrregs_info): Remove.
4574 (regs_info): Set field usrregs to NULL.
4575
4576 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4577
4578 * linux-low.c: Include "rsp-low.h"
4579 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4580 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4581 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4582 (handle_btrace_enable_pt): New.
4583 (handle_btrace_general_set): Support "pt".
4584 (handle_btrace_conf_general_set): Support "pt:size".
4585
4586 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4587
4588 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4589 Z_PACKET_SW_BP.
4590
4591 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4592
4593 * linux-aarch64-low.c: Remove comment about endianness.
4594 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4595 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4596 memcmp.
4597
4598 2015-06-24 Gary Benson <gbenson@redhat.com>
4599
4600 * linux-i386-ipa.c (stdint.h): Do not include.
4601 * lynx-i386-low.c (stdint.h): Likewise.
4602 * lynx-ppc-low.c (stdint.h): Likewise.
4603 * mem-break.c (stdint.h): Likewise.
4604 * thread-db.c (stdint.h): Likewise.
4605 * tracepoint.c (stdint.h): Likewise.
4606 * win32-low.c (stdint.h): Likewise.
4607
4608 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4609
4610 * server.c (write_qxfer_response): Update call to
4611 remote_escape_output.
4612
4613 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4614 Jan Kratochvil <jan.kratochvil@redhat.com>
4615
4616 Merge multiple hex conversions.
4617 * gdbreplay.c (tohex): Rename to 'fromhex'.
4618 (logchar): Use fromhex.
4619
4620 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4621
4622 * server.c (handle_qxfer_libraries): Set `version' attribute for
4623 <library-list>.
4624
4625 2015-06-10 Gary Benson <gbenson@redhat.com>
4626
4627 * target.h (struct target_ops) <multifs_open>: New field.
4628 <multifs_unlink>: Likewise.
4629 <multifs_readlink>: Likewise.
4630 * linux-low.c (nat/linux-namespaces.h): New include.
4631 (linux_target_ops): Initialize the_target->multifs_open,
4632 the_target->multifs_unlink and the_target->multifs_readlink.
4633 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4634 * hostio.c (hostio_fs_pid): New static variable.
4635 (hostio_handle_new_gdb_connection): New function.
4636 (handle_setfs): Likewise.
4637 (handle_open): Use the_target->multifs_open as appropriate.
4638 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4639 (handle_readlink): Use the_target->multifs_readlink as
4640 appropriate.
4641 (handle_vFile): Handle vFile:setfs packets.
4642 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4643 after target_handle_new_gdb_connection.
4644
4645 2015-06-10 Gary Benson <gbenson@redhat.com>
4646
4647 * configure.ac (AC_CHECK_FUNCS): Add setns.
4648 * config.in: Regenerate.
4649 * configure: Likewise.
4650 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4651 (linux-namespaces.o): New rule.
4652 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4653
4654 2015-06-09 Gary Benson <gbenson@redhat.com>
4655
4656 * hostio.c (handle_open): Process mode argument with
4657 fileio_to_host_mode.
4658
4659 2015-06-01 Yao Qi <yao.qi@linaro.org>
4660
4661 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4662 * linux-x86-low.c: Likewise.
4663
4664 2015-05-28 Don Breazeal <donb@codesourcery.com>
4665
4666 * linux-low.c (handle_extended_wait): Initialize
4667 thread_info.last_resume_kind for new fork children.
4668
4669 2015-05-15 Pedro Alves <palves@redhat.com>
4670
4671 * target.h (target_handle_new_gdb_connection): Rewrite using if
4672 wrapped in do/while.
4673
4674 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4675
4676 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4677 * configure, config.in: Regenerate.
4678 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4679 Declare typedef.
4680
4681 2015-05-12 Don Breazeal <donb@codesourcery.com>
4682
4683 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4684 PTRACE_EVENT_VFORK_DONE.
4685 (linux_low_ptrace_options, extended_event_reported): Add vfork
4686 events.
4687 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4688 and "vforkdone" for RSP 'T' Stop Reply Packet.
4689 * server.h (report_vfork_events): Declare
4690 global variable.
4691
4692 2015-05-12 Don Breazeal <donb@codesourcery.com>
4693
4694 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4695 (the_low_target) <new_fork>: Initialize new member.
4696 * linux-arm-low.c (arm_new_fork): New function.
4697 (the_low_target) <new_fork>: Initialize new member.
4698 * linux-low.c (handle_extended_wait): Call new target function
4699 new_fork.
4700 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4701 * linux-mips-low.c (mips_add_watchpoint): New function
4702 extracted from mips_insert_point.
4703 (the_low_target) <new_fork>: Initialize new member.
4704 (mips_linux_new_fork): New function.
4705 (mips_insert_point): Call mips_add_watchpoint.
4706 * linux-x86-low.c (x86_linux_new_fork): New function.
4707 (the_low_target) <new_fork>: Initialize new member.
4708
4709 2015-05-12 Don Breazeal <donb@codesourcery.com>
4710
4711 * linux-low.c (handle_extended_wait): Implement return value,
4712 rename argument 'event_child' to 'event_lwp', handle
4713 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4714 (linux_low_ptrace_options): New function.
4715 (linux_low_filter_event): Call linux_low_ptrace_options,
4716 use different argument fo linux_enable_event_reporting,
4717 use return value from handle_extended_wait.
4718 (extended_event_reported): New function.
4719 (linux_wait_1): Call extended_event_reported and set
4720 status to report fork events.
4721 (linux_write_memory): Add pid to debug message.
4722 (reset_lwp_ptrace_options_callback): New function.
4723 (linux_handle_new_gdb_connection): New function.
4724 (linux_target_ops): Initialize new structure member.
4725 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4726 * lynx-low.c: Initialize new structure member.
4727 * remote-utils.c (prepare_resume_reply): Implement stop reason
4728 "fork" for "T" stop message.
4729 * server.c (handle_query): Call handle_new_gdb_connection.
4730 * server.h (report_fork_events): Declare global flag.
4731 * target.h (struct target_ops) <handle_new_gdb_connection>:
4732 New member.
4733 (target_handle_new_gdb_connection): New macro.
4734 * win32-low.c: Initialize new structure member.
4735
4736 2015-05-12 Don Breazeal <donb@codesourcery.com>
4737
4738 * mem-break.c (APPEND_TO_LIST): Define macro.
4739 (clone_agent_expr): New function.
4740 (clone_one_breakpoint): New function.
4741 (clone_all_breakpoints): New function.
4742 * mem-break.h: Declare new functions.
4743
4744 2015-05-12 Don Breazeal <donb@codesourcery.com>
4745
4746 * linux-low.c (linux_supports_fork_events): New function.
4747 (linux_supports_vfork_events): New function.
4748 (linux_target_ops): Initialize new structure members.
4749 (initialize_low): Call linux_check_ptrace_features.
4750 * lynx-low.c (lynx_target_ops): Initialize new structure
4751 members.
4752 * server.c (report_fork_events, report_vfork_events):
4753 New global flags.
4754 (handle_query): Add new features to qSupported packet and
4755 response.
4756 (captured_main): Initialize new global variables.
4757 * target.h (struct target_ops) <supports_fork_events>:
4758 New member.
4759 <supports_vfork_events>: New member.
4760 (target_supports_fork_events): New macro.
4761 (target_supports_vfork_events): New macro.
4762 * win32-low.c (win32_target_ops): Initialize new structure
4763 members.
4764
4765 2015-05-12 Gary Benson <gbenson@redhat.com>
4766
4767 * server.c (handle_qxfer_exec_file): Use current process
4768 if annex is empty.
4769
4770 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4771
4772 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4773 Remove HAVE_PTRACE_GETREGS conditionals.
4774 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4775 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4776
4777 2015-05-08 Yao Qi <yao.qi@linaro.org>
4778
4779 * linux-low.c (linux_supports_conditional_breakpoints): New
4780 function.
4781 (linux_target_ops): Install new target method.
4782 * lynx-low.c (lynx_target_ops): Install NULL hook for
4783 supports_conditional_breakpoints.
4784 * nto-low.c (nto_target_ops): Likewise.
4785 * spu-low.c (spu_target_ops): Likewise.
4786 * win32-low.c (win32_target_ops): Likewise.
4787 * server.c (handle_query): Check
4788 target_supports_conditional_breakpoints.
4789 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4790 New field.
4791 (target_supports_conditional_breakpoints): New macro.
4792
4793 2015-05-06 Pedro Alves <palves@redhat.com>
4794
4795 PR server/18081
4796 * server.c (start_inferior): If the process exits, mourn it.
4797
4798 2015-04-21 Gary Benson <gbenson@redhat.com>
4799
4800 * hostio.c (fileio_open_flags_to_host): Factored out to
4801 fileio_to_host_openflags in common/fileio.c. Single use
4802 updated.
4803
4804 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4805
4806 * linux-xtensa-low.c (xtensa_fill_gregset)
4807 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4808 XCHAL_HAVE_LOOP.
4809
4810 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4811
4812 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4813 (regs_info): Replace usrregs pointer with NULL.
4814
4815 2015-04-17 Gary Benson <gbenson@redhat.com>
4816
4817 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4818 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4819 * server.c (handle_qxfer_exec_file): New function.
4820 (qxfer_packets): Add exec-file entry.
4821 (handle_query): Report qXfer:exec-file:read as supported packet.
4822
4823 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4824
4825 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4826
4827 2015-04-09 Gary Benson <gbenson@redhat.com>
4828
4829 * hostio-errno.c (errno_to_fileio_error): Remove function.
4830 Update caller to use remote_fileio_to_fio_error.
4831
4832 2015-04-09 Yao Qi <yao.qi@linaro.org>
4833
4834 * linux-low.c (linux_insert_point): Call
4835 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4836 (linux_remove_point): Call remove_memory_breakpoint if type is
4837 raw_bkpt_type_sw.
4838 * linux-x86-low.c (x86_insert_point): Don't call
4839 insert_memory_breakpoint.
4840 (x86_remove_point): Don't call remove_memory_breakpoint.
4841
4842 2015-04-01 Pedro Alves <palves@redhat.com>
4843 Cleber Rosa <crosa@redhat.com>
4844
4845 * server.c (gdbserver_usage): Reorganize and extend the usage
4846 message.
4847
4848 2015-03-24 Pedro Alves <palves@redhat.com>
4849
4850 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4851 output. Also dump TRAP_TRACE.
4852 (linux_low_filter_event): In debug output, distinguish a
4853 resume_stop SIGSTOP from a delayed SIGSTOP.
4854
4855 2015-03-24 Gary Benson <gbenson@redhat.com>
4856
4857 * linux-x86-low.c (x86_linux_new_thread): Moved to
4858 nat/x86-linux.c.
4859 (x86_linux_prepare_to_resume): Likewise.
4860
4861 2015-03-24 Gary Benson <gbenson@redhat.com>
4862
4863 * Makefile.in (x86-linux-dregs.o): New rule.
4864 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4865 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4866 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4867 (x86_linux_dr_get): Likewise.
4868 (x86_linux_dr_set): Likewise.
4869 (update_debug_registers_callback): Likewise.
4870 (x86_linux_dr_set_addr): Likewise.
4871 (x86_linux_dr_get_addr): Likewise.
4872 (x86_linux_dr_set_control): Likewise.
4873 (x86_linux_dr_get_control): Likewise.
4874 (x86_linux_dr_get_status): Likewise.
4875 (x86_linux_update_debug_registers): Likewise.
4876
4877 2015-03-24 Gary Benson <gbenson@redhat.com>
4878
4879 * linux-x86-low.c (x86_linux_update_debug_registers):
4880 New function, factored out from...
4881 (x86_linux_prepare_to_resume): ...this.
4882
4883 2015-03-24 Gary Benson <gbenson@redhat.com>
4884
4885 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4886 (x86_linux_dr_set): Likewise.
4887 (update_debug_registers_callback): Likewise.
4888 (x86_linux_dr_set_addr): Likewise.
4889 (x86_linux_dr_get_addr): Likewise.
4890 (x86_linux_dr_set_control): Likewise.
4891 (x86_linux_dr_get_control): Likewise.
4892 (x86_linux_dr_get_status): Likewise.
4893 (x86_linux_prepare_to_resume): Likewise.
4894
4895 2015-03-24 Gary Benson <gbenson@redhat.com>
4896
4897 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4898 Use perror_with_name. Pass string through gettext.
4899 (x86_linux_dr_set): Likewise.
4900
4901 2015-03-24 Gary Benson <gbenson@redhat.com>
4902
4903 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4904 (x86_linux_dr_set_addr): ...this.
4905 (x86_dr_low_get_addr): Rename to...
4906 (x86_linux_dr_get_addr): ...this.
4907 (x86_dr_low_set_control): Rename to...
4908 (x86_linux_dr_set_control): ...this.
4909 (x86_dr_low_get_control): Rename to...
4910 (x86_linux_dr_get_control): ...this.
4911 (x86_dr_low_get_status): Rename to...
4912 (x86_linux_dr_get_status): ...this.
4913 (x86_dr_low): Update with new function names.
4914
4915 2015-03-24 Gary Benson <gbenson@redhat.com>
4916
4917 * Makefile.in (x86-linux.o): New rule.
4918 * configure.srv: Add x86-linux.o to relevant targets.
4919 * linux-low.c (lwp_set_arch_private_info): New function.
4920 (lwp_arch_private_info): Likewise.
4921 * linux-x86-low.c: Include nat/x86-linux.h.
4922 (arch_lwp_info): Removed structure.
4923 (update_debug_registers_callback):
4924 Use lwp_set_debug_registers_changed.
4925 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4926 and lwp_set_debug_registers_changed.
4927 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4928
4929 2015-03-24 Gary Benson <gbenson@redhat.com>
4930
4931 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4932 * linux-arm-low.c (arm_new_thread): Likewise.
4933 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4934 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4935 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4936 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4937
4938 2015-03-24 Gary Benson <gbenson@redhat.com>
4939
4940 * linux-low.c (ptid_of_lwp): New function.
4941 (lwp_is_stopped): Likewise.
4942 (lwp_stop_reason): Likewise.
4943 * linux-x86-low.c (update_debug_registers_callback):
4944 Use lwp_is_stopped.
4945 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4946 lwp_stop_reason.
4947
4948 2015-03-24 Gary Benson <gbenson@redhat.com>
4949
4950 * linux-low.h (linux_stop_lwp): Remove declaration.
4951
4952 2015-03-24 Gary Benson <gbenson@redhat.com>
4953
4954 * linux-low.h: Include nat/linux-nat.h.
4955 * linux-low.c (iterate_over_lwps_args): New structure.
4956 (iterate_over_lwps_filter): New function.
4957 (iterate_over_lwps): Likewise.
4958 * linux-x86-low.c (update_debug_registers_callback):
4959 Update signature to what iterate_over_lwps expects.
4960 Remove PID check that iterate_over_lwps now performs.
4961 (x86_dr_low_set_addr): Use iterate_over_lwps.
4962 (x86_dr_low_set_control): Likewise.
4963
4964 2015-03-24 Gary Benson <gbenson@redhat.com>
4965
4966 * linux-x86-low.c (x86_debug_reg_state): New function.
4967 (x86_linux_prepare_to_resume): Use the above.
4968
4969 2015-03-24 Gary Benson <gbenson@redhat.com>
4970
4971 * linux-low.c (current_lwp_ptid): New function.
4972 * linux-x86-low.c: Include nat/linux-nat.h.
4973 (x86_dr_low_get_addr): Use current_lwp_ptid.
4974 (x86_dr_low_get_control): Likewise.
4975 (x86_dr_low_get_status): Likewise.
4976
4977 2015-03-20 Pedro Alves <palves@redhat.com>
4978
4979 * tracepoint.c (cmd_qtstatus): Make "str" const.
4980
4981 2015-03-20 Pedro Alves <palves@redhat.com>
4982
4983 * server.c (handle_general_set): Make "req_str" const.
4984
4985 2015-03-19 Pedro Alves <palves@redhat.com>
4986
4987 * linux-low.c (linux_resume_one_lwp): Rename to ...
4988 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4989 instead call perror_with_name.
4990 (check_ptrace_stopped_lwp_gone): New function.
4991 (linux_resume_one_lwp): Reimplement as wrapper around
4992 linux_resume_one_lwp_throw that swallows errors if the LWP is
4993 gone.
4994
4995 2015-03-19 Pedro Alves <palves@redhat.com>
4996
4997 * linux-low.c (count_events_callback, select_event_lwp_callback):
4998 No longer check whether the thread has resume_stop as last resume
4999 kind.
5000
5001 2015-03-19 Pedro Alves <palves@redhat.com>
5002
5003 * linux-low.c (count_events_callback, select_event_lwp_callback):
5004 Use the lwp's status_pending_p field, not the thread's.
5005
5006 2015-03-19 Pedro Alves <palves@redhat.com>
5007
5008 * linux-low.c (select_event_lwp_callback): Update comments to
5009 no longer mention SIGTRAP.
5010
5011 2015-03-18 Gary Benson <gbenson@redhat.com>
5012
5013 * server.c (handle_query): Do not report vFile:fstat as supported.
5014
5015 2015-03-11 Gary Benson <gbenson@redhat.com>
5016
5017 * hostio.c (sys/types.h): New include.
5018 (sys/stat.h): Likewise.
5019 (common-remote-fileio.h): Likewise.
5020 (handle_fstat): New function.
5021 (handle_vFile): Handle vFile:fstat packets.
5022
5023 2015-03-11 Gary Benson <gbenson@redhat.com>
5024
5025 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5026 struct stat.st_blocks and struct stat.st_blksize.
5027 * configure: Regenerate.
5028 * config.in: Likewise.
5029 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5030 (OBS): Add common-remote-fileio.o.
5031 (common-remote-fileio.o): New rule.
5032
5033 2015-03-09 Pedro Alves <palves@redhat.com>
5034
5035 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5036 'struct sockaddr' pointer in 'accept' call.
5037
5038 2015-03-09 Pedro Alves <palves@redhat.com>
5039
5040 Revert:
5041 2015-03-07 Pedro Alves <palves@redhat.com>
5042 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5043 or <winsock2.h> here. Instead include "gdb_socket.h".
5044 (remote_open): Use union gdb_sockaddr_u.
5045 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5046 or <winsock2.h> here. Instead include "gdb_socket.h".
5047 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5048 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5049 or <sys/un.h>.
5050 (init_named_socket, gdb_agent_helper_thread): Use union
5051 gdb_sockaddr_u.
5052
5053 2015-03-07 Pedro Alves <palves@redhat.com>
5054
5055 * configure.ac (build_warnings): Move
5056 -Wdeclaration-after-statement to the C-specific set.
5057 * configure: Regenerate.
5058
5059 2015-03-07 Pedro Alves <palves@redhat.com>
5060
5061 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5062 or <winsock2.h> here. Instead include "gdb_socket.h".
5063 (remote_open): Use union gdb_sockaddr_u.
5064 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5065 or <winsock2.h> here. Instead include "gdb_socket.h".
5066 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5067 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5068 or <sys/un.h>.
5069 (init_named_socket, gdb_agent_helper_thread): Use union
5070 gdb_sockaddr_u.
5071
5072 2015-03-07 Pedro Alves <palves@redhat.com>
5073
5074 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5075 instead.
5076
5077 2015-03-06 Yao Qi <yao.qi@linaro.org>
5078
5079 * linux-aarch64-low.c (aarch64_insert_point): Use
5080 show_debug_regs as a boolean.
5081 (aarch64_remove_point): Likewise.
5082
5083 2015-03-05 Pedro Alves <palves@redhat.com>
5084
5085 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5086 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5087 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5088 * nto-low.c (nto_target_ops): Likewise.
5089 * spu-low.c (spu_target_ops): Likewise.
5090 * win32-low.c (win32_target_ops): Likewise.
5091
5092 2015-03-04 Pedro Alves <palves@redhat.com>
5093
5094 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5095 Decide whether a breakpoint triggered based on the SIGTRAP's
5096 siginfo.si_code.
5097 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5098 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5099 (linux_low_filter_event): Check for breakpoints before checking
5100 watchpoints.
5101 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5102 siginfo.si_code.
5103 (linux_stopped_by_sw_breakpoint)
5104 (linux_supports_stopped_by_sw_breakpoint)
5105 (linux_stopped_by_hw_breakpoint)
5106 (linux_supports_stopped_by_hw_breakpoint): New functions.
5107 (linux_target_ops): Install new target methods.
5108
5109 2015-03-04 Pedro Alves <palves@redhat.com>
5110
5111 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5112 * server.c (swbreak_feature, hwbreak_feature): New globals.
5113 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5114 (captured_main): Clear swbreak_feature and hwbreak_feature.
5115 * server.h (swbreak_feature, hwbreak_feature): Declare.
5116 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5117 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5118 supports_stopped_by_hw_breakpoint>: New fields.
5119 (target_supports_stopped_by_sw_breakpoint)
5120 (target_stopped_by_sw_breakpoint)
5121 (target_supports_stopped_by_hw_breakpoint)
5122 (target_stopped_by_hw_breakpoint): Declare.
5123
5124 2015-03-04 Pedro Alves <palves@redhat.com>
5125
5126 enum lwp_stop_reason -> enum target_stop_reason
5127 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5128 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5129 (linux_wait_1, stuck_in_jump_pad_callback)
5130 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5131 (linux_stopped_by_watchpoint):
5132 * linux-low.h (enum lwp_stop_reason): Delete.
5133 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5134 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5135
5136 2015-03-04 Yao Qi <yao.qi@linaro.org>
5137
5138 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5139
5140 2015-03-03 Gary Benson <gbenson@redhat.com>
5141
5142 * hostio.c (handle_vFile): Fix prefix lengths.
5143
5144 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5145
5146 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5147 ptr_bits.
5148
5149 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5150
5151 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5152 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5153 (clean): Add "rm -f" for above C files.
5154 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5155 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5156 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5157 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5158 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5159 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5160 (init_registers_s390x_vx_linux64)
5161 (init_registers_s390x_tevx_linux64)
5162 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5163 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5164 declarations.
5165 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5166 (s390_store_vxrs_high): New functions.
5167 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5168 NT_S390_VXRS_HIGH.
5169 (s390_arch_setup): Add logic for selecting one of the new target
5170 descriptions. Activate the new vector regsets if applicable.
5171 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5172 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5173 and init_registers_s390x_tevx_linux64.
5174
5175 2015-03-01 Pedro Alves <palves@redhat.com>
5176
5177 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5178 parameter.
5179
5180 2015-02-27 Pedro Alves <palves@redhat.com>
5181
5182 * linux-x86-low.c (u_debugreg_offset): New function.
5183 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5184
5185 2015-02-27 Pedro Alves <palves@redhat.com>
5186
5187 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5188 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5189 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5190 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5191 (ps_lsetfpregs, ps_getpid)
5192 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5193 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5194 (ps_lsetxregs, ps_plog): Declare.
5195
5196 2015-02-27 Pedro Alves <palves@redhat.com>
5197
5198 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5199 IP_AGENT_EXPORT_FUNC.
5200 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5201 IP_AGENT_EXPORT_FUNC.
5202 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5203 (IP_AGENT_EXPORT): Delete.
5204 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5205 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5206 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5207 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5208 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5209 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5210 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5211 (traceframe_read_count, traceframe_write_count)
5212 (traceframes_created, trace_state_variables, get_raw_reg)
5213 (get_trace_state_variable_value, set_trace_state_variable_value)
5214 (ust_loaded, helper_thread_id, cmd_buf): Use
5215 IPA_SYM_EXPORTED_NAME.
5216 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5217 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5218 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5219 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5220 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5221 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5222 EXTERN_C_PUSH/EXTERN_C_POP.
5223 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5224 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5225 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5226 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5227 (traceframe_write_count, traceframe_read_count)
5228 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5229 (about_to_request_buffer_space, get_trace_state_variable_value)
5230 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5231 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5232 EXTERN_C_PUSH/EXTERN_C_POP.
5233 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5234 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5235 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5236 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5237 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5238 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5239 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5240 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5241 Define.
5242 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5243 (IP_AGENT_EXPORT_VAR_DECL): Define.
5244 (tracing): Declare.
5245 (gdb_agent_get_raw_reg): Declare.
5246
5247 2015-02-27 Tom Tromey <tromey@redhat.com>
5248 Pedro Alves <palves@redhat.com>
5249
5250 Rename symbols whose names are reserved C++ keywords throughout.
5251
5252 2015-02-27 Pedro Alves <palves@redhat.com>
5253
5254 * Makefile.in (COMPILER): New, get it from autoconf.
5255 (CXX): Get from autoconf instead.
5256 (COMPILE.pre): Use COMPILER.
5257 (CC-LD): Rename to ...
5258 (CC_LD): ... this. Use COMPILER.
5259 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5260 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5261 * acinclude.m4: Include build-with-cxx.m4.
5262 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5263 Disable -Werror by default if building in C++ mode.
5264 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5265 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5266 the C++ compiler. Save/restore CXXFLAGS too.
5267 * configure: Regenerate.
5268
5269 2015-02-27 Pedro Alves <palves@redhat.com>
5270
5271 * acinclude.m4: Include libiberty.m4.
5272 * configure.ac: Call libiberty_INIT.
5273 * config.in, configure: Regenerate.
5274
5275 2015-02-26 Pedro Alves <palves@redhat.com>
5276
5277 * linux-low.c (linux_wait_1): When incrementing the PC past a
5278 program breakpoint always use the_low_target.breakpoint_len as
5279 increment, rather than the maximum between that and
5280 the_low_target.decr_pc_after_break.
5281
5282 2015-02-23 Pedro Alves <palves@redhat.com>
5283
5284 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5285 thread was doing a step-over; always adjust the PC if
5286 we stepped over a permanent breakpoint.
5287 (linux_wait_1): If we stepped over breakpoint that was on top of a
5288 permanent breakpoint, manually advance the PC past it.
5289
5290 2015-02-23 Pedro Alves <palves@redhat.com>
5291
5292 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5293 modes.
5294 (x86_fill_gregset, x86_store_gregset): Use it when handling
5295 $orig_eax.
5296
5297 2015-02-20 Pedro Alves <palves@redhat.com>
5298
5299 * thread-db.c: Include "nat/linux-procfs.h".
5300 (thread_db_init): Skip listing new threads if the kernel supports
5301 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5302
5303 2015-02-20 Pedro Alves <palves@redhat.com>
5304
5305 * linux-low.c (status_pending_p_callback): Use ptid_match.
5306
5307 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5308
5309 PR breakpoints/16812
5310 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5311 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5312 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5313
5314 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5315
5316 PR breakpoints/15956
5317 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5318
5319 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5320
5321 * linux-low.c (linux_low_btrace_conf): Print size.
5322 * server.c (handle_btrace_conf_general_set): New.
5323 (hanle_general_set): Call handle_btrace_conf_general_set.
5324 (handle_query): Report Qbtrace-conf:bts:size as supported.
5325
5326 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5327
5328 * linux-low.c (linux_low_enable_btrace): Update parameters.
5329 (linux_low_btrace_conf): New.
5330 (linux_target_ops)<to_btrace_conf>: Initialize.
5331 * server.c (current_btrace_conf): New.
5332 (handle_btrace_enable): Rename to ...
5333 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5334 to target_enable_btrace. Update comment. Update users.
5335 (handle_qxfer_btrace_conf): New.
5336 (qxfer_packets): Add btrace-conf entry.
5337 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5338 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5339 (target_ops)<read_btrace_conf>: New.
5340 (target_enable_btrace): Update parameters.
5341 (target_read_btrace_conf): New.
5342
5343 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5344
5345 * server.c (handle_btrace_general_set): Remove call to
5346 target_supports_btrace.
5347 (supported_btrace_packets): New.
5348 (handle_query): Call supported_btrace_packets.
5349 * target.h: include btrace-common.h.
5350 (btrace_target_info): Removed.
5351 (supports_btrace, target_supports_btrace): Update parameters.
5352
5353 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5354
5355 * Makefile.in (SFILES): Add common/btrace-common.c.
5356 (OBS): Add common/btrace-common.o.
5357 (btrace-common.o): Add build rules.
5358 * linux-low: Include btrace-common.h.
5359 (linux_low_read_btrace): Use struct btrace_data. Call
5360 btrace_data_init and btrace_data_fini.
5361
5362 2015-02-06 Pedro Alves <palves@redhat.com>
5363
5364 * thread-db.c (find_new_threads_callback): Add debug output.
5365
5366 2015-02-04 Pedro Alves <palves@redhat.com>
5367
5368 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5369 (resume_stopped_resumed_lwps): New function.
5370 (linux_wait_for_event_filtered): Use it.
5371
5372 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5373
5374 * Makefile.in (SFILES): Add linux-personality.c.
5375 (linux-personality.o): New rule.
5376 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5377 list of objects to be built.
5378 * linux-low.c: Include nat/linux-personality.h.
5379 (linux_create_inferior): Remove code to disable address space
5380 randomization (moved to ../nat/linux-personality.c). Create
5381 cleanup to disable address space randomization.
5382
5383 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5384
5385 * Makefile.in (posix-strerror.o): New rule.
5386 (mingw-strerror.o): Likewise.
5387 * configure: Regenerated.
5388 * configure.ac: Source file ../common/common.host. Initialize new
5389 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5390
5391 2015-01-14 Yao Qi <yao@codesourcery.com>
5392
5393 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5394 (ppc-linux.o): New rule.
5395 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5396 * configure.ac: AC_CHECK_FUNCS(getauxval).
5397 * config.in: Re-generated.
5398 * configure: Re-generated.
5399 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5400 ppc64_64bit_inferior_p
5401
5402 2015-01-14 Yao Qi <yao@codesourcery.com>
5403
5404 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5405 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5406 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5407 (PT_ORIG_R3, PT_TRAP): Likewise.
5408 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5409 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5410 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5411
5412 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5413
5414 * i387-fp.c (i387_cache_to_xsave): In look over
5415 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5416 zmmh_low_space field by use of zmmh_high_space.
5417
5418 2015-01-09 Pedro Alves <palves@redhat.com>
5419
5420 * linux-low.c (step_over_bkpt): Move higher up in the file.
5421 (handle_extended_wait): Don't store the stop_pc here.
5422 (get_stop_pc): Adjust comments and rename to ...
5423 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5424 stopped for a software breakpoint or hardware breakpoint.
5425 (thread_still_has_status_pending_p): New function.
5426 (status_pending_p_callback): Use
5427 thread_still_has_status_pending_p. If the event is no longer
5428 interesting, resume the LWP.
5429 (handle_tracepoints): Add assert.
5430 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5431 (wstatus_maybe_breakpoint): New function.
5432 (cancel_breakpoint): Delete function.
5433 (check_stopped_by_watchpoint): New function, factored out from
5434 linux_low_filter_event.
5435 (lp_status_maybe_breakpoint): Delete function.
5436 (linux_low_filter_event): Remove filter_ptid argument.
5437 Leave thread group exits pending here. Store the LWP's stop PC.
5438 Always leave events pending.
5439 (linux_wait_for_event_filtered): Pull all events out of the
5440 kernel, and leave them all pending.
5441 (count_events_callback, select_event_lwp_callback): Consider all
5442 events.
5443 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5444 (select_event_lwp): Only give preference to the stepping LWP in
5445 all-stop mode. Adjust comments.
5446 (ignore_event): New function.
5447 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5448 references to cancel_breakpoints. Adjust to renames. Also give
5449 equal priority to all LWPs that have had events in non-stop mode.
5450 If reporting a software breakpoint event, unadjust the LWP's PC.
5451 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5452 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5453 Adjust.
5454 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5455 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5456 (linux_stopped_by_watchpoint): Adjust.
5457 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5458 * linux-low.h (enum lwp_stop_reason): New.
5459 (struct lwp_info) <stop_pc>: Adjust comment.
5460 <stopped_by_watchpoint>: Delete field.
5461 <stop_reason>: New field.
5462 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5463 * mem-break.c (software_breakpoint_inserted_here)
5464 (hardware_breakpoint_inserted_here): New function.
5465 * mem-break.h (software_breakpoint_inserted_here)
5466 (hardware_breakpoint_inserted_here): Declare.
5467 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5468 (cancel_breakpoints): Delete.
5469 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5470 (upload_fast_traceframes): Remove references to
5471 cancel_breakpoints.
5472
5473 2015-01-09 Pedro Alves <palves@redhat.com>
5474
5475 * thread-db.c (find_new_threads_callback): Ignore thread if the
5476 kernel thread ID is -1.
5477
5478 2015-01-09 Pedro Alves <palves@redhat.com>
5479
5480 * linux-low.c (linux_attach_fail_reason_string): Move to
5481 nat/linux-ptrace.c, and rename.
5482 (linux_attach_lwp): Update comment.
5483 (attach_proc_task_lwp_callback): New function.
5484 (linux_attach): Adjust to rename and use
5485 linux_proc_attach_tgid_threads.
5486 (linux_attach_fail_reason_string): Delete declaration.
5487
5488 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5489
5490 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5491 * server.c (gdbserver_version): Likewise.
5492
5493 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5494
5495 * remote-utils.c: Include ctype.h.
5496 (input_interrupt): Explicitly handle the case when the char
5497 received is the NUL byte. Improve the printing of non-ASCII
5498 characters.
5499
5500 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5501
5502 * linux-low.c (linux_low_filter_event): Update call to
5503 linux_enable_event_reporting following the addition of
5504 a new parameter to that function.
5505
5506 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5507
5508 PR server/17457
5509 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5510 (AARCH64_FPCR_REGNO): Likewise.
5511 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5512 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5513 (aarch64_store_fpregset): Likewise.
5514
5515 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5516
5517 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5518 Remove FIXME comment about assumption about N.
5519
5520 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5521
5522 * configure.ac: If large-file support is disabled in GDBserver,
5523 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5524 * configure: Regenerate.
5525
5526 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5527
5528 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5529 warning upon ENODATA from ptrace.
5530 * linux-s390-low.c (s390_store_tdb): New.
5531 (s390_regsets): Add regset for NT_S390_TDB.
5532
5533 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5534
5535 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5536 without a fill_function.
5537 * linux-s390-low.c (s390_fill_last_break): Remove.
5538 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5539 (s390_arch_setup): Use regset's size instead of fill_function for
5540 loop end condition.
5541
5542 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5543
5544 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5545 the regset's store function when ptrace returned an error.
5546 * regcache.c (get_thread_regcache): Invalidate register cache
5547 before fetching inferior's registers.
5548
5549 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5550
5551 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5552 while-loop as for-loop.
5553 (regsets_store_inferior_registers): Likewise.
5554
5555 2014-11-28 Yao Qi <yao@codesourcery.com>
5556
5557 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5558 * config.in, configure: Re-generate.
5559 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5560 is defined.
5561
5562 2014-11-21 Yao Qi <yao@codesourcery.com>
5563
5564 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5565 (AC_CHECK_HEADERS): Remove malloc.h.
5566 * configure: Re-generated.
5567 * config.in: Re-generated.
5568 * server.h: Don't include alloca.h and malloc.h.
5569 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5570 Don't include malloc.h.
5571
5572 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5573
5574 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5575 corresponding ERRNO check in same block.
5576
5577 2014-11-12 Pedro Alves <palves@redhat.com>
5578
5579 * server.c (cont_thread): Update comment.
5580 (start_inferior, attach_inferior): No longer clear cont_thread.
5581 (handle_v_cont): No longer set cont_thread.
5582 (captured_main): Clear cont_thread each time a GDB connects.
5583
5584 2014-11-12 Pedro Alves <palves@redhat.com>
5585
5586 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5587 thread, and don't resume all threads if the Hc thread has exited.
5588
5589 2014-11-12 Pedro Alves <palves@redhat.com>
5590
5591 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5592 the process group instead of to a specific LWP.
5593
5594 2014-10-15 Pedro Alves <palves@redhat.com>
5595
5596 PR server/17487
5597 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5598 parameter.
5599 (arm_set_thread_context): Delete.
5600 (the_low_target): Adjust.
5601 * win32-i386-low.c (debug_registers_changed)
5602 (debug_registers_used): Delete.
5603 (update_debug_registers_callback): New function.
5604 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5605 needing to update their debug registers.
5606 (win32_get_current_dr): New function.
5607 (x86_dr_low_get_addr, x86_dr_low_get_control)
5608 (x86_dr_low_get_status): Fetch the debug register from the thread
5609 record's context.
5610 (i386_initial_stuff): Adjust.
5611 (i386_get_thread_context): Remove current_event parameter. Don't
5612 clear debug_registers_changed nor copy DR values to
5613 debug_reg_state.
5614 (i386_set_thread_context): Delete.
5615 (i386_prepare_to_resume): New function.
5616 (i386_thread_added): Mark the thread as needing to update irs
5617 debug registers.
5618 (the_low_target): Remove i386_set_thread_context and install
5619 i386_prepare_to_resume.
5620 * win32-low.c (win32_get_thread_context): Adjust.
5621 (win32_set_thread_context): Use SetThreadContext
5622 directly.
5623 (win32_prepare_to_resume): New function.
5624 (win32_require_context): New function, factored out from ...
5625 (thread_rec): ... this.
5626 (continue_one_thread): Call win32_prepare_to_resume on each thread
5627 we're about to continue.
5628 (win32_resume): Call win32_prepare_to_resume on the event thread.
5629 * win32-low.h (struct win32_thread_info)
5630 <debug_registers_changed>: New field.
5631 (struct win32_target_ops): Change prototype of set_thread_context,
5632 delete set_thread_context and add prepare_to_resume.
5633 (win32_require_context): New declaration.
5634
5635 2014-10-08 Gary Benson <gbenson@redhat.com>
5636
5637 * server.h: Do not include common-exceptions.h.
5638
5639 2014-10-08 Gary Benson <gbenson@redhat.com>
5640
5641 * server.h: Do not include cleanups.h.
5642
5643 2014-09-30 James Hogan <james.hogan@imgtec.com>
5644
5645 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5646 mips64-dsp-linux.c.
5647
5648 2014-09-23 Yao Qi <yao@codesourcery.com>
5649
5650 * linux-low.c (lp_status_maybe_breakpoint): New function.
5651 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5652 (count_events_callback): Likewise.
5653 (select_event_lwp_callback): Likewise.
5654 (cancel_breakpoints_callback): Likewise.
5655
5656 2014-09-19 Don Breazeal <donb@codesourcery.com>
5657
5658 * linux-low.c (handle_extended_wait): Call
5659 linux_ptrace_get_extended_event.
5660 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5661 linux_is_extended_waitstatus.
5662
5663 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5664
5665 * Makefile.in (CPPFLAGS): Define.
5666 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5667 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5668
5669 2014-09-16 Gary Benson <gbenson@redhat.com>
5670
5671 * inferiors.h (current_inferior): Renamed as...
5672 (current_thread): New variable. All uses updated.
5673 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5674 (maybe_move_out_of_jump_pad): Likewise.
5675 (cancel_breakpoint): Likewise.
5676 (linux_low_filter_event): Likewise.
5677 (wait_for_sigstop): Likewise.
5678 (linux_resume_one_lwp): Likewise.
5679 (need_step_over_p): Likewise.
5680 (start_step_over): Likewise.
5681 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5682 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5683 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5684 and save_inferior as saved_thread.
5685 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5686 saved_thread.
5687 (regcache_invalidate_thread): Likewise.
5688 * remote-utils.c (prepare_resume_reply): Likewise.
5689 * thread-db.c (thread_db_get_tls_address): Likewise.
5690 (disable_thread_event_reporting): Likewise.
5691 (remove_thread_event_breakpoints): Likewise.
5692 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5693 as saved_thread.
5694 * target.h (set_desired_inferior): Renamed as...
5695 (set_desired_thread): New declaration. All uses updated.
5696 * server.c (myresume): Updated comment to reference thread instead
5697 of inferior.
5698 (handle_serial_event): Likewise.
5699 (handle_target_event): Likewise.
5700
5701 2014-09-12 Tom Tromey <tromey@redhat.com>
5702 Gary Benson <gbenson@redhat.com>
5703
5704 * regcache.h: Include common-regcache.h.
5705 (regcache_read_pc): Don't declare.
5706 * regcache.c (get_thread_regcache_for_ptid): New function.
5707
5708 2014-09-11 Tom Tromey <tromey@redhat.com>
5709 Gary Benson <gbenson@redhat.com>
5710
5711 * symbol.c: New file.
5712 * Makefile.in (SFILES): Add symbol.c.
5713 (OBS): Add symbol.o.
5714
5715 2014-09-11 Gary Benson <gbenson@redhat.com>
5716
5717 * target.c (target_stop_ptid, target_continue_ptid): New
5718 functions.
5719
5720 2014-09-11 Tom Tromey <tromey@redhat.com>
5721 Gary Benson <gbenson@redhat.com>
5722
5723 * target.h: Include target/target.h.
5724 * target.c (target_read_memory, target_read_uint32)
5725 (target_write_memory): New functions.
5726
5727 2014-09-11 Gary Benson <gbenson@redhat.com>
5728
5729 * server.h (debug_hw_points): Don't declare.
5730 * server.c (debug_hw_points): Don't define. Replace all uses
5731 with show_debug_regs.
5732 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5733 all uses with show_debug_regs.
5734
5735 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5736
5737 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5738 endianness into account.
5739 (ppc_supply_ptrace_register): Likewise.
5740
5741 2014-09-03 James Hogan <james.hogan@imgtec.com>
5742
5743 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5744 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5745
5746 2014-09-03 Gary Benson <gbenson@redhat.com>
5747
5748 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5749 ALL_DEBUG_ADDRESS_REGISTERS.
5750
5751 2014-09-02 Gary Benson <gbenson@redhat.com>
5752
5753 * i386-low.h: Renamed as...
5754 * x86-low.h: New file. All type, function and variable name
5755 prefixes changed from "i386_" to "x86_". All references updated.
5756 * i386-low.c: Renamed as...
5757 * x86-low.c: New file. All type, function and variable name
5758 prefixes changed from "i386_" to "x86_". All references updated.
5759
5760 2014-09-02 Gary Benson <gbenson@redhat.com>
5761
5762 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5763 (x86_linux_new_thread): Likewise.
5764
5765 2014-08-29 Gary Benson <gbenson@redhat.com>
5766
5767 * server.h (setjmp.h): Do not include.
5768 (toplevel): Do not declare.
5769 (common-exceptions.h): Include.
5770 (cleanups.h): Likewise.
5771 * server.c (toplevel): Do not define.
5772 (exit_code): New static global.
5773 (detach_or_kill_for_exit_cleanup): New function.
5774 (main): New function. Original main renamed to...
5775 (captured_main): New function.
5776 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5777
5778 2014-08-29 Gary Benson <gbenson@redhat.com>
5779
5780 * Makefile.in (SFILES): Add common/common-exceptions.c.
5781 (OBS): Add common-exceptions.o.
5782 (common-exceptions.o): New rule.
5783 * utils.c (prepare_to_throw_exception): New function.
5784
5785 2014-08-29 Gary Benson <gbenson@redhat.com>
5786
5787 * config.in: Regenerate.
5788 * configure: Likewise.
5789
5790 2014-08-29 Gary Benson <gbenson@redhat.com>
5791
5792 * Makefile.in (SFILES): Add common/cleanups.c.
5793 (OBS): cleanups.o.
5794 (cleanups.o): New rule.
5795
5796 2014-08-29 Gary Benson <gbenson@redhat.com>
5797
5798 * utils.c (internal_vwarning): New function.
5799
5800 2014-08-28 Gary Benson <gbenson@redhat.com>
5801
5802 * utils.h (fatal): Remove declaration.
5803 * utils.c (fatal): Remove function.
5804
5805 2014-08-28 Gary Benson <gbenson@redhat.com>
5806
5807 * tracepoint.c (gdb_agent_init): Replace fatal with
5808 perror_with_name.
5809 (initialize_tracepoint): Likewise.
5810
5811 2014-08-28 Gary Benson <gbenson@redhat.com>
5812
5813 * remote-utils.c (remote_prepare): Replace fatal with error.
5814
5815 2014-08-28 Gary Benson <gbenson@redhat.com>
5816
5817 * linux-low.c (linux_async): Replace fatal with warning.
5818 Tidy up and return.
5819 (linux_start_non_stop): Return -1 if linux_async failed.
5820
5821 2014-08-28 Gary Benson <gbenson@redhat.com>
5822
5823 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5824 gdb_assert.
5825 (i386_dr_low_get_addr): Remove vague comment.
5826 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5827 gdb_assert.
5828
5829 2014-08-28 Gary Benson <gbenson@redhat.com>
5830
5831 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5832 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5833 internal_error.
5834 (linux_resume_one_lwp): Likewise.
5835 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5836 gdb_assert.
5837 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5838 with internal_error.
5839 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5840 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5841 (find_register_by_name): Replace fatal with internal_error.
5842 (find_regno): Likewise.
5843 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5844 * thread-db.c (thread_db_create_event): Likewise.
5845 (thread_db_load_search): Likewise.
5846 (try_thread_db_load_1): Likewise.
5847 * tracepoint.c (get_jump_space_head): Replace fatal with
5848 internal_error.
5849 (claim_trampoline_space): Likewise.
5850 (have_fast_tracepoint_trampoline_buffer): Likewise.
5851 (cmd_qtstart): Likewise.
5852 (stop_tracing): Likewise.
5853 (fast_tracepoint_collecting): Likewise.
5854 (target_malloc): Likewise.
5855 (download_tracepoint): Likewise.
5856 (download_trace_state_variables): Replace check with gdb_assert.
5857 (upload_fast_traceframes): Replace fatal with internal_error.
5858
5859 2014-08-19 Tom Tromey <tromey@redhat.com>
5860 Gary Benson <gbenson@redhat.com>
5861
5862 * Makefile.in (SFILES): Add common/common-debug.c.
5863 (OBS): Add common-debug.o.
5864 (common-debug.o): New rule.
5865 * debug.h (debug_printf): Don't declare.
5866 * debug.c (debug_printf): Renamed and rewritten as...
5867 (debug_vprintf): New function.
5868
5869 2014-08-19 Gary Benson <gbenson@redhat.com>
5870
5871 * utils.h: Do not include print-utils.h.
5872
5873 2014-08-19 Tom Tromey <tromey@redhat.com>
5874 Gary Benson <gbenson@redhat.com>
5875
5876 * server.h: Add static assertion.
5877 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5878
5879 2014-08-19 Tom Tromey <tromey@redhat.com>
5880 Gary Benson <gbenson@redhat.com>
5881
5882 * Makefile.in (SFILES): Add common/errors.c.
5883 (OBS): Add errors.o.
5884 (IPA_OBS): Add errors-ipa.o.
5885 (errors.o): New rule.
5886 (errors-ipa.o): Likewise.
5887 * utils.h (perror_with_name, error, warning): Don't declare.
5888 * utils.c (warning): Renamed and rewritten as...
5889 (vwarning): New function.
5890 (error): Renamed and rewritten as...
5891 (verror): New function.
5892 (internal_error): Renamed and rewritten as...
5893 (internal_verror): New function.
5894
5895 2014-08-07 Gary Benson <gbenson@redhat.com>
5896
5897 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5898 * configure: Regenerate.
5899 * config.in: Likewise.
5900 * server.h: Do not include errno.h.
5901 * event-loop.c: Likewise.
5902 * hostio-errno.c: Likewise.
5903 * linux-low.c: Likewise.
5904 * remote-utils.c: Likewise.
5905 * spu-low.c: Likewise.
5906 * utils.c: Likewise.
5907 * gdbreplay.c: Unconditionally include errno.h.
5908
5909 2014-08-07 Gary Benson <gbenson@redhat.com>
5910
5911 * server.h: Do not include string.h.
5912 * event-loop.c: Likewise.
5913 * linux-low.c: Likewise.
5914 * regcache.c: Likewise.
5915 * remote-utils.c: Likewise.
5916 * spu-low.c: Likewise.
5917 * utils.c: Likewise.
5918
5919 2014-08-07 Gary Benson <gbenson@redhat.com>
5920
5921 * server.h: Do not include gdb_assert.h.
5922
5923 2014-08-07 Gary Benson <gbenson@redhat.com>
5924
5925 * server.h: Do not include common-utils.h.
5926
5927 2014-08-07 Gary Benson <gbenson@redhat.com>
5928
5929 * server.h: Do not include ptid.h.
5930 * notif.h: Likewise.
5931
5932 2014-08-07 Gary Benson <gbenson@redhat.com>
5933
5934 * server.h: Do not include gdb_locale.h.
5935
5936 2014-08-07 Gary Benson <gbenson@redhat.com>
5937
5938 * server.h: Do not include gdb/signals.h.
5939 * win32-low.c: Likewise.
5940
5941 2014-08-07 Gary Benson <gbenson@redhat.com>
5942
5943 * server.h: Do not include pathmax.h.
5944
5945 2014-08-07 Gary Benson <gbenson@redhat.com>
5946
5947 * server.h: Do not include libiberty.h.
5948 * linux-bfin-low.c: Likewise.
5949
5950 2014-08-07 Gary Benson <gbenson@redhat.com>
5951
5952 * server.h: Do not include ansidecl.h.
5953
5954 2014-08-07 Gary Benson <gbenson@redhat.com>
5955
5956 * linux-x86-low.c: Do not include stddef.h.
5957 * lynx-ppc-low.c: Likewise.
5958 * tracepoint.c: Likewise.
5959
5960 2014-08-07 Gary Benson <gbenson@redhat.com>
5961
5962 * server.h: Do not include stdarg.h.
5963 * nto-low.c: Likewise.
5964
5965 2014-08-07 Gary Benson <gbenson@redhat.com>
5966
5967 * server.h: Do not include stdlib.h.
5968 * inferiors.c: Likewise.
5969 * linux-low.c: Likewise.
5970 * regcache.c: Likewise.
5971 * spu-low.c: Likewise.
5972 * tracepoint.c: Likewise.
5973 * utils.c: Likewise.
5974
5975 2014-08-07 Gary Benson <gbenson@redhat.com>
5976
5977 * server.h: Do not include stdio.h.
5978 * linux-low.c: Likewise.
5979 * remote-utils.c: Likewise.
5980 * spu-low.c: Likewise.
5981 * utils.c: Likewise.
5982 * wincecompat.c: Likewise.
5983
5984 2014-08-06 Gary Benson <gbenson@redhat.com>
5985
5986 * regcache.c (init_register_cache): Move conditionals inside if.
5987
5988 2014-08-06 Gary Benson <gbenson@redhat.com>
5989
5990 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5991
5992 2014-07-31 Gary Benson <gbenson@redhat.com>
5993
5994 * ax.h: Do not include server.h.
5995 * gdbthread.h: Likewise.
5996 * lynx-low.h: Likewise.
5997 * notif.h: Likewise.
5998
5999 2014-07-30 Gary Benson <gbenson@redhat.com>
6000
6001 * server.h: Include common-defs.h.
6002 Do not include config.h or build-gnulib-gdbserver/config.h.
6003
6004 2014-07-30 Gary Benson <gbenson@redhat.com>
6005
6006 * hostio-errno.c: Move server.h to top of includes list.
6007 * inferiors.c: Likewise.
6008 * linux-x86-low.c: Likewise.
6009 * notif.c: Include server.h.
6010
6011 2014-07-24 Tom Tromey <tromey@redhat.com>
6012 Gary Benson <gbenson@redhat.com>
6013
6014 * server.h (CORE_ADDR): Now unsigned.
6015
6016 2014-07-16 Pedro Alves <palves@redhat.com>
6017
6018 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6019
6020 2014-07-15 Pedro Alves <palves@redhat.com>
6021
6022 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6023 copy.
6024
6025 2014-07-11 Pedro Alves <palves@redhat.com>
6026
6027 * linux-low.c (kill_wait_lwp): New function, based on
6028 kill_one_lwp_callback, but use my_waitpid directly.
6029 (kill_one_lwp_callback, linux_kill): Use it.
6030
6031 2014-06-23 Pedro Alves <palves@redhat.com>
6032
6033 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6034 before setting DR0..DR3.
6035
6036 2014-06-20 Gary Benson <gbenson@redhat.com>
6037
6038 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6039 * configure: Regenerated.
6040 * config.in: Likewise.
6041
6042 2014-06-20 Gary Benson <gbenson@redhat.com>
6043
6044 * Makefile.in (SFILES): Update locations for files moved
6045 from common to nat.
6046 (object file files): Reordered.
6047
6048 2014-06-20 Gary Benson <gbenson@redhat.com>
6049
6050 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6051 (i386_dr_low_set_addr): Likewise.
6052 (i386_dr_low_get_addr): Likewise.
6053 (i386_dr_low_can_set_control): Likewise.
6054 (i386_dr_low_set_control): Likewise.
6055 (i386_dr_low_get_control): Likewise.
6056 (i386_dr_low_get_status): Likewise.
6057 (i386_get_debug_register_length): Likewise.
6058 * linux-x86-low.c (i386_dr_low_set_addr):
6059 Changed signature. Made static.
6060 (i386_dr_low_get_addr): Likewise.
6061 (i386_dr_low_set_control): Likewise.
6062 (i386_dr_low_get_control): Likewise.
6063 (i386_dr_low_get_status): Likewise.
6064 (i386_dr_low): New global variable.
6065 * win32-i386-low.c (i386_dr_low_set_addr):
6066 Changed signature. Made static.
6067 (i386_dr_low_get_addr): Likewise.
6068 (i386_dr_low_set_control): Likewise.
6069 (i386_dr_low_get_control): Likewise.
6070 (i386_dr_low_get_status): Likewise.
6071 (i386_dr_low): New global variable.
6072
6073 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6074
6075 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6076 * Makefile.in (AR, AR_FLAGS): Define.
6077 * configure: Regenerate.
6078
6079 2014-06-19 Gary Benson <gbenson@redhat.com>
6080
6081 * Makefile.in (i386-dregs.o): New rule.
6082 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6083 * i386-low.c (target.h): Remove include.
6084 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6085 (DR_CONTROL_SHIFT): Likewise.
6086 (DR_CONTROL_SIZE): Likewise.
6087 (DR_RW_EXECUTE): Likewise.
6088 (DR_RW_WRITE): Likewise.
6089 (DR_RW_READ): Likewise.
6090 (DR_RW_IORW): Likewise.
6091 (DR_LEN_1): Likewise.
6092 (DR_LEN_2): Likewise.
6093 (DR_LEN_4): Likewise.
6094 (DR_LEN_8): Likewise.
6095 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6096 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6097 (DR_ENABLE_SIZE): Likewise.
6098 (DR_LOCAL_SLOWDOWN): Likewise.
6099 (DR_GLOBAL_SLOWDOWN): Likewise.
6100 (DR_CONTROL_RESERVED): Likewise.
6101 (I386_DR_CONTROL_MASK): Likewise.
6102 (I386_DR_VACANT): Likewise.
6103 (I386_DR_LOCAL_ENABLE): Likewise.
6104 (I386_DR_GLOBAL_ENABLE): Likewise.
6105 (I386_DR_DISABLE): Likewise.
6106 (I386_DR_SET_RW_LEN): Likewise.
6107 (I386_DR_GET_RW_LEN): Likewise.
6108 (I386_DR_WATCH_HIT): Likewise.
6109 (i386_wp_op_t): Likewise.
6110 (i386_show_dr): Likewise.
6111 (i386_length_and_rw_bits): Likewise.
6112 (i386_insert_aligned_watchpoint): Likewise.
6113 (i386_remove_aligned_watchpoint): Likewise.
6114 (i386_handle_nonaligned_watchpoint): Likewise.
6115 i386_update_inferior_debug_regs(): Likewise.
6116 (i386_dr_insert_watchpoint): Likewise.
6117 (i386_dr_remove_watchpoint): Likewise.
6118 (i386_dr_region_ok_for_watchpoint): Likewise.
6119 (i386_dr_stopped_data_address): Likewise.
6120 (i386_dr_stopped_by_watchpoint): Likewise.
6121
6122 2014-06-19 Gary Benson <gbenson@redhat.com>
6123
6124 * i386-low.c (i386_dr_show): Renamed to
6125 i386_show_dr and made static. All uses updated.
6126 (i386_dr_length_and_rw_bits): Renamed to
6127 i386_length_and_rw_bits and made static.
6128 All uses updated.
6129 (i386_dr_insert_aligned_watchpoint): Renamed to
6130 i386_insert_aligned_watchpoint and made static.
6131 All uses updated.
6132 (i386_dr_remove_aligned_watchpoint): Renamed to
6133 i386_remove_aligned_watchpoint and made static.
6134 All uses updated.
6135 (i386_dr_update_inferior_debug_regs): Renamed to
6136 i386_update_inferior_debug_regs and made static.
6137 All uses updated.
6138
6139 2014-06-18 Gary Benson <gbenson@redhat.com>
6140
6141 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6142 (i386_dr_low_can_set_control): Likewise.
6143 (i386_get_debug_register_length): Likewise.
6144 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6145 (i386_dr_low_can_set_control): Likewise.
6146 (i386_get_debug_register_length): Likewise.
6147
6148 2014-06-17 Gary Benson <gbenson@redhat.com>
6149
6150 * i386-low.h (i386-dregs.h): New include.
6151 (DR_FIRSTADDR): Now in i386-dregs.h.
6152 (DR_LASTADDR): Likewise.
6153 (DR_NADDR): Likewise.
6154 (DR_STATUS): Likewise.
6155 (DR_CONTROL): Likewise.
6156 (i386_debug_reg_state): Likewise.
6157 (i386_dr_insert_watchpoint): Likewise.
6158 (i386_dr_remove_watchpoint): Likewise.
6159 (i386_dr_region_ok_for_watchpoint): Likewise.
6160 (i386_dr_stopped_data_address): Likewise.
6161 (i386_dr_stopped_by_watchpoint): Likewise.
6162 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6163
6164 2014-06-18 Gary Benson <gbenson@redhat.com>
6165
6166 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6167 i386_dr_insert_watchpoint.
6168 (i386_low_remove_watchpoint): Renamed to
6169 i386_dr_remove_watchpoint.
6170 (i386_low_region_ok_for_watchpoint): Renamed to
6171 i386_dr_region_ok_for_watchpoint.
6172 (i386_low_stopped_data_address): Renamed to
6173 i386_dr_stopped_data_address.
6174 (i386_low_stopped_by_watchpoint): Renamed to
6175 i386_dr_stopped_by_watchpoint.
6176 * i386-low.c (i386_show_dr): Renamed to
6177 i386_dr_show and made nonstatic. All uses updated.
6178 (i386_length_and_rw_bits): Renamed to
6179 i386_dr_length_and_rw_bits and made nonstatic.
6180 All uses updated.
6181 (i386_insert_aligned_watchpoint): Renamed to
6182 i386_dr_insert_aligned_watchpoint and made nonstatic.
6183 All uses updated.
6184 (i386_remove_aligned_watchpoint): Renamed to
6185 i386_dr_remove_aligned_watchpoint and made nonstatic.
6186 All uses updated.
6187 (i386_update_inferior_debug_regs): Renamed to
6188 i386_dr_update_inferior_debug_regs and made nonstatic.
6189 All uses updated.
6190 (i386_low_insert_watchpoint): Renamed to
6191 i386_dr_insert_watchpoint. All uses updated.
6192 (i386_low_remove_watchpoint): Renamed to
6193 i386_dr_remove_watchpoint. All uses updated.
6194 (i386_low_region_ok_for_watchpoint): Renamed to
6195 i386_dr_region_ok_for_watchpoint. All uses updated.
6196 (i386_low_stopped_data_address): Renamed to
6197 i386_dr_stopped_data_address. All uses updated.
6198 (i386_low_stopped_by_watchpoint): Renamed to
6199 i386_dr_stopped_by_watchpoint. All uses updated.
6200
6201 2014-06-18 Gary Benson <gbenson@redhat.com>
6202
6203 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6204 (i386_dr_low_can_set_control): Likewise.
6205 (i386_insert_aligned_watchpoint): New check.
6206
6207 2014-06-18 Gary Benson <gbenson@redhat.com>
6208
6209 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6210 Renamed to state.
6211
6212 2014-06-18 Gary Benson <gbenson@redhat.com>
6213
6214 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6215 instead of fatal and error.
6216 (i386_handle_nonaligned_watchpoint): Likewise.
6217
6218 2014-06-18 Gary Benson <gbenson@redhat.com>
6219
6220 * i386-low.c (i386_get_debug_register_length): New macro.
6221 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6222 (i386_show_dr): Use debug_printf instead of fprintf. Use
6223 phex to format values.
6224
6225 2014-06-18 Gary Benson <gbenson@redhat.com>
6226
6227 * i386-low.h: Comment changes.
6228 * i386-low.c: Likewise.
6229
6230 2014-06-18 Gary Benson <gbenson@redhat.com>
6231
6232 * i386-low.c: Whitespace changes.
6233
6234 2014-06-12 Tom Tromey <tromey@redhat.com>
6235
6236 * utils.c (freeargv): Remove.
6237
6238 2014-06-12 Tom Tromey <tromey@redhat.com>
6239
6240 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6241 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6242 (parse_debug_format_options): Likewise.
6243 (gdbserver_usage): Likewise.
6244 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6245 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6246 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6247 against libiberty.
6248 ($(LIBGNU)): Depend on libiberty.
6249 (all-lib): Recurse into all subdirs.
6250 (install-only): Invoke "install" target in subdirs.
6251 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6252 targets.
6253 * configure: Rebuild.
6254 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6255 for vasprintf, vsnprintf, or gettimeofday.
6256 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6257 srv_tgtobj.
6258
6259 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6260
6261 * development.sh: Delete.
6262 * Makefile.in (config.status): Adjust dependency on development.sh.
6263 * configure.ac: Adjust development.sh source call.
6264 * configure: Regenerate.
6265
6266 2014-06-02 Pedro Alves <palves@redhat.com>
6267
6268 * ax.c (gdb_free_agent_expr): New function.
6269 * ax.h (gdb_free_agent_expr): New declaration.
6270 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6271 list.
6272 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6273 static.
6274 (clear_breakpoint_conditions_and_commands): New function.
6275 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6276 (clear_breakpoint_conditions_and_commands): New declaration.
6277
6278 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6279
6280 * linux-aarch64-low.c (asm/ptrace.h): Include.
6281
6282 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6283
6284 Fix TLS access for -static -pthread.
6285 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6286 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6287 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6288
6289 2014-05-20 Pedro Alves <palves@redhat.com>
6290
6291 * linux-aarch64-low.c (aarch64_insert_point)
6292 (aarch64_remove_point): No longer check whether the type is
6293 supported here. Adjust to new interface.
6294 (the_low_target): Install aarch64_supports_z_point_type as
6295 supports_z_point_type method.
6296 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6297 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6298 instead of a Z packet char. Adjust.
6299 (arm_supports_z_point_type): New function.
6300 (arm_insert_point, arm_remove_point): Adjust to new interface.
6301 (the_low_target): Install arm_supports_z_point_type.
6302 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6303 (cris_insert_point, cris_remove_point): Adjust to new interface.
6304 Don't check whether the type is supported here.
6305 (the_low_target): Install cris_supports_z_point_type.
6306 * linux-low.c (linux_supports_z_point_type): New function.
6307 (linux_insert_point, linux_remove_point): Adjust to new interface.
6308 * linux-low.h (struct linux_target_ops) <insert_point,
6309 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6310 raw_breakpoint pointer parameter.
6311 <supports_z_point_type>: New method.
6312 * linux-mips-low.c (mips_supports_z_point_type): New function.
6313 (mips_insert_point, mips_remove_point): Adjust to new interface.
6314 Use mips_supports_z_point_type.
6315 (the_low_target): Install mips_supports_z_point_type.
6316 * linux-ppc-low.c (the_low_target): Install NULL as
6317 supports_z_point_type method.
6318 * linux-s390-low.c (the_low_target): Install NULL as
6319 supports_z_point_type method.
6320 * linux-sparc-low.c (the_low_target): Install NULL as
6321 supports_z_point_type method.
6322 * linux-x86-low.c (x86_supports_z_point_type): New function.
6323 (x86_insert_point): Adjust to new insert_point interface. Use
6324 insert_memory_breakpoint. Adjust to new
6325 i386_low_insert_watchpoint interface.
6326 (x86_remove_point): Adjust to remove_point interface. Use
6327 remove_memory_breakpoint. Adjust to new
6328 i386_low_remove_watchpoint interface.
6329 (the_low_target): Install x86_supports_z_point_type.
6330 * lynx-low.c (lynx_target_ops): Install NULL as
6331 supports_z_point_type callback.
6332 * nto-low.c (nto_supports_z_point_type): New.
6333 (nto_insert_point, nto_remove_point): Adjust to new interface.
6334 (nto_target_ops): Install nto_supports_z_point_type.
6335 * mem-break.c: Adjust intro comment.
6336 (struct raw_breakpoint) <raw_type, size>: New fields.
6337 <inserted>: Update comment.
6338 <shlib_disabled>: Delete field.
6339 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6340 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6341 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6342 (raw_bkpt_type_to_target_hw_bp_type): New function.
6343 (find_enabled_raw_code_breakpoint_at): New function.
6344 (find_raw_breakpoint_at): New type and size parameters. Use them.
6345 (insert_memory_breakpoint): New function, based off
6346 set_raw_breakpoint_at.
6347 (remove_memory_breakpoint): New function.
6348 (set_raw_breakpoint_at): Reimplement.
6349 (set_breakpoint): New, based on set_breakpoint_at.
6350 (set_breakpoint_at): Reimplement.
6351 (delete_raw_breakpoint): Go through the_target->remove_point
6352 instead of assuming memory breakpoints.
6353 (find_gdb_breakpoint_at): Delete.
6354 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6355 (find_gdb_breakpoint): New function.
6356 (set_gdb_breakpoint_at): Delete.
6357 (z_type_supported): New function.
6358 (set_gdb_breakpoint_1): New function, loosely based off
6359 set_gdb_breakpoint_at.
6360 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6361 (delete_gdb_breakpoint_at): Delete.
6362 (delete_gdb_breakpoint_1): New function, loosely based off
6363 delete_gdb_breakpoint_at.
6364 (delete_gdb_breakpoint): New function.
6365 (clear_gdb_breakpoint_conditions): Rename to ...
6366 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6367 breakpoint.
6368 (add_condition_to_breakpoint): Make static.
6369 (add_breakpoint_condition): Take a struct breakpoint pointer
6370 instead of an address. Adjust.
6371 (gdb_condition_true_at_breakpoint): Rename to ...
6372 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6373 z_type parameter.
6374 (gdb_condition_true_at_breakpoint): Reimplement.
6375 (add_breakpoint_commands): Take a struct breakpoint pointer
6376 instead of an address. Adjust.
6377 (gdb_no_commands_at_breakpoint): Rename to ...
6378 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6379 parameter. Return true if no breakpoint was found. Change debug
6380 output.
6381 (gdb_no_commands_at_breakpoint): Reimplement.
6382 (run_breakpoint_commands): Rename to ...
6383 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6384 and change return type to boolean.
6385 (run_breakpoint_commands): New function.
6386 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6387 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6388 breakpoint. Go through the_target->remove_point instead of
6389 assuming memory breakpoint.
6390 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6391 software and hardware breakpoints.
6392 (reinsert_raw_breakpoint): Go through the_target->insert_point
6393 instead of assuming memory breakpoint.
6394 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6395 software and hardware breakpoints.
6396 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6397 Check both software and hardware breakpoints.
6398 (validate_inserted_breakpoint): Assert the breakpoint is a
6399 software breakpoint. Set the inserted flag to -1 instead of
6400 setting shlib_disabled.
6401 (delete_disabled_breakpoints): Adjust.
6402 (validate_breakpoints): Only validate software breakpoints.
6403 Adjust to inserted flag change.
6404 (check_mem_read, check_mem_write): Skip breakpoint types other
6405 than software breakpoints. Adjust to inserted flag change.
6406 * mem-break.h (enum raw_bkpt_type): New enum.
6407 (raw_breakpoint, struct process_info): Forward declare.
6408 (Z_packet_to_target_hw_bp_type): Delete declaration.
6409 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6410 (set_gdb_breakpoint, delete_gdb_breakpoint)
6411 (clear_breakpoint_conditions): New declarations.
6412 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6413 (breakpoint_inserted_here): Update comment.
6414 (add_breakpoint_condition, add_breakpoint_commands): Replace
6415 address parameter with a breakpoint pointer parameter.
6416 (gdb_breakpoint_here): Update comment.
6417 (delete_gdb_breakpoint_at): Delete.
6418 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6419 * server.c (process_point_options): Take a struct breakpoint
6420 pointer instead of an address. Adjust.
6421 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6422 delete_gdb_breakpoint.
6423 * spu-low.c (spu_target_ops): Install NULL as
6424 supports_z_point_type method.
6425 * target.h: Include mem-break.h.
6426 (struct target_ops) <prepare_to_access_memory>: Update comment.
6427 <supports_z_point_type>: New field.
6428 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6429 instead of a char. Also take a raw breakpoint pointer.
6430 * win32-arm-low.c (the_low_target): Install NULL as
6431 supports_z_point_type.
6432 * win32-i386-low.c (i386_supports_z_point_type): New function.
6433 (i386_insert_point, i386_remove_point): Adjust to new interface.
6434 (the_low_target): Install i386_supports_z_point_type.
6435 * win32-low.c (win32_supports_z_point_type): New function.
6436 (win32_insert_point, win32_remove_point): Adjust to new interface.
6437 (win32_target_ops): Install win32_supports_z_point_type.
6438 * win32-low.h (struct win32_target_ops):
6439 <supports_z_point_type>: New method.
6440 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6441 instead of a char. Also take a raw breakpoint pointer.
6442
6443 2014-05-20 Pedro Alves <palves@redhat.com>
6444
6445 * mem-break.h: Include break-common.h.
6446 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6447 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6448 (Z_packet_to_target_hw_bp_type): New declaration.
6449 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6450 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6451 (Z_PACKET_ACCESS_WP): Delete macros.
6452 (Z_packet_to_hw_type): Delete function.
6453 * i386-low.h: Don't include break-common.h here.
6454 (Z_packet_to_hw_type): Delete declaration.
6455 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6456 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6457 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6458 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6459 * linux-aarch64-low.c: Don't include break-common.h here.
6460 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6461 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6462 (Z_packet_to_target_hw_bp_type): Delete function.
6463 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6464 function.
6465 (mips_insert_point, mips_remove_point): Use
6466 Z_packet_to_target_hw_bp_type.
6467
6468 2014-05-20 Pedro Alves <palves@redhat.com>
6469
6470 * linux-aarch64-low.c: Include break-common.h.
6471 (enum target_point_type): Delete.
6472 (Z_packet_to_point_type): Rename to ...
6473 (Z_packet_to_target_hw_bp_type): ... this, and return a
6474 target_hw_bp_type instead.
6475 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6476 instead of an enum target_point_type.
6477 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6478 breakpoint type.
6479 (aarch64_dr_state_insert_one_point)
6480 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6481 (aarch64_handle_aligned_watchpoint)
6482 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6483 Take an enum target_hw_bp_type instead of an enum
6484 target_point_type.
6485 (aarch64_supports_z_point_type): New function.
6486 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6487 use Z_packet_to_target_hw_bp_type.
6488
6489 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6490
6491 * configure.ac: Only use -Werror by default when DEVELOPMENT
6492 is true.
6493 * configure: Regenerate.
6494
6495 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6496
6497 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6498 * linux-x86-low.c (X86_64_USER_REGS): New.
6499 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6500
6501 2014-04-28 Yao Qi <yao@codesourcery.com>
6502
6503 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6504 name.
6505
6506 2014-04-25 Pedro Alves <palves@redhat.com>
6507
6508 PR server/16255
6509 * linux-low.c (linux_attach_fail_reason_string): New function.
6510 (linux_attach_lwp): Delete.
6511 (linux_attach_lwp_1): Rename to ...
6512 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6513 argument. Remove "initial" parameter. Return int instead of
6514 void. Don't error or warn here.
6515 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6516 failure to attach to the tgid. Call warning when failing to
6517 attach to an lwp.
6518 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6519 argument. Remove "initial" parameter. Return int instead of
6520 void. Don't error or warn here.
6521 (linux_attach_fail_reason_string): New declaration.
6522 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6523 interface change. Use linux_attach_fail_reason_string.
6524
6525 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6526 Walfred Tedeschi <walfred.tedeschi@intel.com>
6527
6528 * Makefile.in: Added rules to handle new files
6529 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6530 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6531 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6532 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6533 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6534 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6535 x32-avx512-linux.o.
6536 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6537 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6538 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6539 i386/x32-avx512.xml.
6540 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6541 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6542 i386/x32-avx512-linux.xml.
6543 * i387-fp.c (num_avx512_k_registers): New constant for number
6544 of K registers.
6545 (num_avx512_zmmh_low_registers): New constant for number of
6546 lower ZMM registers (0-15).
6547 (num_avx512_zmmh_high_registers): New constant for number of
6548 higher ZMM registers (16-31).
6549 (num_avx512_ymmh_registers): New contant for number of higher
6550 YMM registers (ymm16-31 added by avx521 on x86_64).
6551 (num_avx512_xmm_registers): New constant for number of higher
6552 XMM registers (xmm16-31 added by AVX512 on x86_64).
6553 (struct i387_xsave): Add space for AVX512 registers.
6554 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6555 Add code to handle AVX512 registers.
6556 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6557 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6558 prototypei from generated file.
6559 (tdesc_amd64_avx512_linux): Likewise.
6560 (init_registers_x32_avx512_linux): Likewise.
6561 (tdesc_x32_avx512_linux): Likewise.
6562 (init_registers_i386_avx512_linux): Likewise.
6563 (tdesc_i386_avx512_linux): Likewise.
6564 (x86_64_regmap): Add AVX512 registers.
6565 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6566 mask.
6567 (initialize_low_arch): Add code to initialize AVX512 registers.
6568
6569 2014-04-23 Pedro Alves <palves@redhat.com>
6570
6571 * mem-break.c (find_gdb_breakpoint_at): Make static.
6572 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6573
6574 2014-04-23 Pedro Alves <palves@redhat.com>
6575
6576 * i386-low.c: Don't include break-common.h here.
6577 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6578 prototype to take target_hw_bp_type as argument instead of a Z
6579 packet char.
6580 * i386-low.h: Include break-common.h here.
6581 (Z_packet_to_hw_type): Declare.
6582 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6583 prototypes.
6584 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6585 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6586 (x86_remove_point): Convert the packet number to a
6587 target_hw_bp_type before calling i386_low_remove_watchpoint.
6588 * win32-i386-low.c (i386_insert_point): Convert the packet number
6589 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6590 (i386_remove_point): Convert the packet number to a
6591 target_hw_bp_type before calling i386_low_remove_watchpoint.
6592
6593 2014-04-23 Pedro Alves <palves@redhat.com>
6594
6595 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6596
6597 2014-04-10 Pedro Alves <palves@redhat.com>
6598
6599 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6600 Check if the condition or command is NULL before checking if the
6601 breakpoint is known. On success, return true.
6602 * mem-break.h (add_breakpoint_condition): Document return.
6603 (add_breakpoint_commands): Add describing comment.
6604 * server.c (skip_to_semicolon): New function.
6605 (process_point_options): Use it.
6606
6607 2014-04-09 Pedro Alves <palves@redhat.com>
6608
6609 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6610 to lwpid_of.
6611
6612 2014-02-27 Pedro Alves <palves@redhat.com>
6613
6614 PR 12702
6615 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6616 macros.
6617 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6618 output.
6619 (last_thread_of_process_p): Take a PID argument instead of a
6620 thread pointer.
6621 (linux_wait_for_lwp): Delete.
6622 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6623 functions.
6624 (linux_low_filter_event): New function, party factored out from
6625 linux_wait_for_event.
6626 (linux_wait_for_event): Rename to ...
6627 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6628 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6629 sigsuspend. Check for zombie leaders.
6630 (linux_wait_for_event): Reimplement as wrapper around
6631 linux_wait_for_event_filtered.
6632 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6633 a normal or signal exit is seen, it's the whole process exiting.
6634 (wait_for_sigstop): No longer a for_each_inferior callback.
6635 Rewrite on top of linux_wait_for_event_filtered.
6636 (stop_all_lwps): Call wait_for_sigstop directly.
6637 * server.c (resume, handle_target_event): Handle
6638 TARGET_WAITKIND_NO_RESUMED.
6639
6640 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6641
6642 * win32-low.c (psapi_get_dll_name,
6643 * win32_CreateToolhelp32Snapshot): Delete.
6644 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6645 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6646 Delete.
6647 (handle_load_dll): Add function description.
6648 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6649
6650 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6651
6652 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6653 Add comment.
6654 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6655 base address when calling win32_add_one_solib.
6656 (handle_load_dll): Delete local variable load_addr.
6657 Remove 0x1000 offset applied to DLL base address when calling
6658 win32_add_one_solib.
6659 (handle_unload_dll): Add comment.
6660
6661 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6662
6663 * win32-low.c (win32_add_all_dlls): Renames
6664 win32_ensure_ntdll_loaded. Rewrite function documentation.
6665 Adjust implementation to always load all DLLs.
6666 Add 0x1000 offset to DLL base address when calling
6667 win32_add_one_solib.
6668 (child_initialization_done): New static global.
6669 (do_initial_child_stuff): Set child_initialization_done to
6670 zero during child initialization, and 1 after. Replace call
6671 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6672 Add comment.
6673 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6674 (handle_unload_dll): Add function documentation.
6675 (get_child_debug_event): Ignore load and unload DLL events
6676 during child initialization.
6677
6678 2014-02-20 Doug Evans <dje@google.com>
6679
6680 Remove global all_lwps.
6681 * inferiors.h (ptid_of): Move here from linux-low.h.
6682 (pid_of, lwpid_of): Ditto.
6683 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6684 parameter is a struct thread_info * now.
6685 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6686 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6687 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6688 directly.
6689 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6690 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6691 * linux-arm-low.c (update_registers_callback): Update, "entry"
6692 parameter is a struct thread_info * now.
6693 Fetch lwpid from current_inferior directly.
6694 (arm_insert_point): Pass &all_threads to find_inferior instead of
6695 &all_lwps.
6696 (arm_remove_point): Ditto.
6697 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6698 (arm_prepare_to_resume): Fetch pid from thread.
6699 (arm_read_description): Fetch lwpid from current_inferior directly.
6700 * linux-low.c (all_lwps): Delete.
6701 (delete_lwp): Delete call to remove_inferior.
6702 (handle_extended_wait): Fetch lwpid from thread.
6703 (add_lwp): Don't set lwp->entry.id. Remove call to
6704 add_inferior_to_list.
6705 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6706 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6707 (kill_one_lwp_callback): Ditto.
6708 (linux_kill): Don't dereference NULL pointer.
6709 Fetch ptid,lwpid from thread.
6710 (get_detach_signal): Fetch ptid from thread.
6711 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6712 Simplify call to regcache_invalidate_thread.
6713 (delete_lwp_callback): Update, "entry" parameter is a
6714 struct thread_info * now. Fetch pid from thread.
6715 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6716 (status_pending_p_callback): Update, "entry" parameter is a
6717 struct thread_info * now. Fetch ptid from thread.
6718 (find_lwp_pid): Update, "entry" parameter is a
6719 struct thread_info * now.
6720 (linux_wait_for_lwp): Fetch pid from thread.
6721 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6722 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6723 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6724 (dequeue_one_deferred_signal): Ditto.
6725 (cancel_breakpoint): Fetch ptid from current_inferior.
6726 (linux_wait_for_event): Pass &all_threads to find_inferior,
6727 not &all_lwps. Fetch ptid, lwpid from thread.
6728 (count_events_callback): Update, "entry" parameter is a
6729 struct thread_info * now.
6730 (select_singlestep_lwp_callback): Ditto.
6731 (select_event_lwp_callback): Ditto.
6732 (cancel_breakpoints_callback): Ditto.
6733 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6734 not &all_lwps.
6735 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6736 (unsuspend_one_lwp): Update, "entry" parameter is a
6737 struct thread_info * now.
6738 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6739 not &all_lwps.
6740 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6741 Fetch lwpid from thread, not lwp.
6742 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6743 Pass &all_threads to find_inferior, not &all_lwps.
6744 (send_sigstop): Fetch lwpid from thread, not lwp.
6745 (send_sigstop_callback): Update, "entry" parameter is a
6746 struct thread_info * now.
6747 (suspend_and_send_sigstop_callback): Ditto.
6748 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6749 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6750 struct thread_info * now.
6751 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6752 from thread, lwp.
6753 (lwp_running): Update, "entry" parameter is a
6754 struct thread_info * now.
6755 (stop_all_lwps): Fetch ptid from thread.
6756 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6757 (linux_resume_one_lwp): Fetch lwpid from thread.
6758 (linux_set_resume_request): Update, "entry" parameter is a
6759 struct thread_info * now. Fetch pid, lwpid from thread.
6760 (resume_status_pending_p): Update, "entry" parameter is a
6761 struct thread_info * now.
6762 (need_step_over_p): Ditto. Fetch lwpid from thread.
6763 (start_step_over): Fetch lwpid from thread.
6764 (linux_resume_one_thread): Update, "entry" parameter is a
6765 struct thread_info * now. Fetch lwpid from thread.
6766 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6767 (proceed_one_lwp): Update, "entry" parameter is a
6768 struct thread_info * now. Fetch lwpid from thread.
6769 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6770 struct thread_info * now.
6771 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6772 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6773 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6774 directly.
6775 (regsets_store_inferior_registers): Ditto.
6776 (fetch_register, store_register): Ditto.
6777 (linux_read_memory, linux_write_memory): Ditto.
6778 (linux_request_interrupt): Ditto.
6779 (linux_read_auxv): Ditto.
6780 (linux_xfer_siginfo): Ditto.
6781 (linux_qxfer_spu): Ditto.
6782 (linux_qxfer_libraries_svr4): Ditto.
6783 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6784 moved to inferiors.h.
6785 (get_lwp): Delete.
6786 (get_thread_lwp): Update.
6787 (struct lwp_info): Delete member "entry". Simplify comment for
6788 member "thread".
6789 (all_lwps): Delete.
6790 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6791 current_inferior directly.
6792 (update_watch_registers_callback): Update, "entry" parameter is a
6793 struct thread_info * now. Fetch pid from thread.
6794 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6795 (mips_insert_point): Fetch lwpid from current_inferior.
6796 Pass &all_threads to find_inferior, not &all_lwps.
6797 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6798 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6799 directly.
6800 (mips_stopped_data_address): Ditto.
6801 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6802 directly.
6803 * linux-tile-low.c (tile_arch_setup): Ditto.
6804 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6805 (update_debug_registers_callback): Update, "entry" parameter is a
6806 struct thread_info * now. Fetch pid from thread.
6807 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6808 Pass &all_threads to find_inferior, not &all_lwps.
6809 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6810 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6811 Pass &all_threads to find_inferior, not &all_lwps.
6812 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6813 (i386_dr_low_get_status): Ditto.
6814 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6815 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6816 (x86_linux_read_description): Ditto.
6817 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6818
6819 2014-02-20 Doug Evans <dje@google.com>
6820
6821 * inferiors.c (get_first_inferior): Fix buglet.
6822
6823 2014-02-19 Doug Evans <dje@google.com>
6824
6825 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6826 * inferiors.c (add_thread): Change result type to struct thread_info *.
6827 All callers updated.
6828 (add_lwp): Call add_thread here instead of in callers.
6829 All callers updated.
6830 * linux-low.h (get_lwp_thread): Rewrite.
6831 (struct lwp_info): New member "thread".
6832
6833 2014-02-19 Doug Evans <dje@google.com>
6834
6835 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6836 All callers updated.
6837
6838 2014-02-19 Doug Evans <dje@google.com>
6839
6840 * inferiors.c (add_thread): Fix whitespace.
6841
6842 2014-02-19 Doug Evans <dje@google.com>
6843
6844 * dll.c (clear_dlls): Replace accessing list implemention details
6845 with API function.
6846 * gdbthread.h (get_first_thread): Declare.
6847 * inferiors.c (for_each_inferior_with_data): New function.
6848 (get_first_thread): New function.
6849 (find_thread_ptid): Simplify.
6850 (get_first_inferior): New function.
6851 (clear_list): Delete.
6852 (one_inferior_p): New function.
6853 (clear_inferior_list): New function.
6854 (clear_inferiors): Update.
6855 * inferiors.h (for_each_inferior_with_data): Declare.
6856 (clear_inferior_list): Declare.
6857 (one_inferior_p): Declare.
6858 (get_first_inferior): Declare.
6859 * linux-low.c (linux_wait_for_event): Replace accessing list
6860 implemention details with API function.
6861 * server.c (target_running): Ditto.
6862 (accumulate_file_name_length): New function.
6863 (emit_dll_description): New function.
6864 (handle_qxfer_libraries): Replace accessing list implemention
6865 details with API function.
6866 (handle_qxfer_threads_worker): New function.
6867 (handle_qxfer_threads_proper): Replace accessing list implemention
6868 details with API function.
6869 (handle_query): Ditto.
6870 (visit_actioned_threads_callback_ftype): New typedef.
6871 (visit_actioned_threads_data): New struct.
6872 (visit_actioned_threads): Rewrite to be find_inferior callback.
6873 (resume): Call find_inferior.
6874 (handle_status): Replace accessing list implemention
6875 details with API function.
6876 (process_serial_event): Replace accessing list implemention details
6877 with API function.
6878 * target.c (set_desired_inferior): Replace accessing list implemention
6879 details with API function.
6880 * tracepoint.c (same_process_p): New function.
6881 (gdb_agent_about_to_close): Replace accessing list implemention
6882 details with API function.
6883 * win32-low.c (child_delete_thread): Replace accessing list
6884 implemention details with API function.
6885 (match_dll_by_basename): New function.
6886 (dll_is_loaded_by_basename): New function.
6887 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6888 details call to dll_is_loaded_by_basename.
6889
6890 2014-02-19 Doug Evans <dje@google.com>
6891
6892 * dll.h (struct dll_info): Add comment.
6893 * gdbthread.h (struct thread_info): Add comment.
6894 (current_ptid): Simplify.
6895 * inferiors.c (add_process): Update.
6896 (remove_process): Update.
6897 * inferiors.h (struct process_info): Rename member "head" to "entry".
6898 * linux-low.c (delete_lwp): Update.
6899 (add_lwp): Update.
6900 (last_thread_of_process_p): Update.
6901 (kill_one_lwp_callback, linux_kill): Update.
6902 (status_pending_p_callback): Update.
6903 (wait_for_sigstop): Update. Simplify read of ptid.
6904 (start_step_over): Update.
6905 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6906 (get_lwp_thread): Update.
6907 (struct lwp_info): Rename member "head" to "entry".
6908 * regcache.h (inferior_list_entry): Delete.
6909 * server.c (kill_inferior_callback): Update.
6910 (detach_or_kill_inferior_callback): Update.
6911 (print_started_pid): Update.
6912 (print_attached_pid): Update.
6913 (process_serial_event): Simplify read of ptid.
6914 * thread-db.c (thread_db_create_event): Update.
6915 (thread_db_get_tls_address): Update.
6916 * win32-low.c (current_inferior_ptid): Simplify.
6917
6918 2014-02-19 Tom Tromey <tromey@redhat.com>
6919
6920 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6921 argument.
6922 (target_supports_btrace): Update.
6923
6924 2014-02-14 Yao Qi <yao@codesourcery.com>
6925
6926 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6927 (rsp-low-ipa.o): New target.
6928
6929 2014-02-12 Tom Tromey <tromey@redhat.com>
6930
6931 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6932 convert_ascii_to_int.
6933 * regcache.c (registers_to_string): Likewise.
6934 * remote-utils.c (decode_M_packet): Likewise.
6935 * server.c (process_serial_event): Likewise.
6936
6937 2014-02-12 Tom Tromey <tromey@redhat.com>
6938
6939 * server.c (handle_query, handle_v_run): Use hex2bin, not
6940 unhexify.
6941 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6942
6943 2014-02-12 Tom Tromey <tromey@redhat.com>
6944
6945 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6946 convert_int_to_ascii.
6947 * regcache.c (registers_to_string, collect_register_as_string):
6948 Likewise.
6949 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6950 Likewise.
6951 * server.c (process_serial_event): Likewise.
6952 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6953 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6954
6955 2014-02-12 Tom Tromey <tromey@redhat.com>
6956
6957 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6958 bin2hex, not hexify.
6959 * tracepoint.c (cmd_qtstatus): Likewise.
6960
6961 2014-02-12 Tom Tromey <tromey@redhat.com>
6962
6963 * remote-utils.c (monitor_output): Pass explicit length to
6964 hexify.
6965
6966 2014-02-12 Tom Tromey <tromey@redhat.com>
6967
6968 * tracepoint.c: Include rsp-low.h.
6969 * server.c: Include rsp-low.h.
6970 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6971 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6972 declare.
6973 * remote-utils.c: Include rsp-low.h.
6974 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6975 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6976 (convert_int_to_ascii, convert_ascii_to_int): Move to
6977 common/rsp-low.c.
6978 * regcache.c: Include rsp-low.h.
6979 * ax.c: Include rsp-low.h.
6980 * Makefile.in (SFILES): Add common/rsp-low.c.
6981 (OBS): Add rsp-low.o.
6982 (rsp-low.o): New target.
6983
6984 2014-02-12 Tom Tromey <tromey@redhat.com>
6985
6986 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6987 Include print-utils.h.
6988 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6989 (plongest, thirty_two, phex_nz): Remove.
6990 * Makefile.in (SFILES): Add common/print-utils.c.
6991 (OBS): Add print-utils.o.
6992 (print-utils-ipa.o): New target.
6993 (print-utils.o): New target.
6994 (IPA_OBJS): Add print-utils-ipa.o.
6995
6996 2014-02-06 Tom Tromey <tromey@redhat.com>
6997
6998 * Makefile.in (SFILES): Fix indentation.
6999
7000 2014-02-05 Doug Evans <dje@google.com>
7001
7002 * linux-low.c (linux_wait_for_event): Improve comment.
7003 (linux_wait_1): Keep current_inferior in sync with event_child.
7004
7005 2014-01-22 Doug Evans <dje@google.com>
7006
7007 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7008
7009 2014-01-22 Doug Evans <dje@google.com>
7010
7011 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7012 * configure: Regenerate.
7013 * config.in: Regenerate.
7014 * Makefile.in (SFILES): Add debug.c.
7015 (OBS): Add debug.o.
7016 * debug.c: New file.
7017 * debug.h: New file.
7018 * linux-aarch64-low.c (*): Update all debugging printfs to use
7019 debug_printf instead of fprintf.
7020 * linux-arm-low.c (*): Ditto.
7021 * linux-cris-low.c (*): Ditto.
7022 * linux-crisv32-low.c (*): Ditto.
7023 * linux-m32r-low.c (*): Ditto.
7024 * linux-sparc-low.c (*): Ditto.
7025 * linux-x86.c (*): Ditto.
7026 * linux-low.c (*): Ditto.
7027 (linux_wait_1): Add calls to debug_enter, debug_exit.
7028 (linux_wait): Remove redundant debugging printf.
7029 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7030 (linux_resume, unstop_all_lwps): Ditto.
7031 * mem-break.c (*): Update all debugging printfs to use
7032 debug_printf instead of fprintf.
7033 * remote-utils.c (*): Ditto.
7034 * thread-db.c (*): Ditto.
7035 * server.c #include <ctype.h>, "gdb_vecs.h".
7036 (debug_threads): Moved to debug.c.
7037 (*): Update all debugging printfs to use debug_printf instead of
7038 fprintf.
7039 (start_inferior): Replace call to fflush with call to debug_flush.
7040 (monitor_show_help): Mention set debug-format.
7041 (parse_debug_format_options): New function.
7042 (handle_monitor_command): Handle "monitor set debug-format".
7043 (gdbserver_usage): Mention --debug-format.
7044 (main): Parse --debug-format.
7045 * server.h (debug_threads): Declaration moved to debug.h.
7046 #include "debug.h".
7047 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7048 trace_debug_1 that uses debug_printf.
7049 (tracepoint_look_up_symbols): Update all debugging printfs to use
7050 debug_printf instead of fprintf.
7051
7052 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7053
7054 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7055 sys/ptrace.h.
7056
7057 2014-01-17 Pedro Alves <palves@redhat.com>
7058
7059 PR build/16445
7060 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7061 defined after including gdb_proc_service.h.
7062
7063 2014-01-16 Doug Evans <dje@google.com>
7064
7065 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7066 (match_dll): Use it.
7067
7068 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7069
7070 * target.h (target_ops) <read_btrace>: Change parameters and
7071 return type to allow error reporting.
7072 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7073 trace reading errors on.
7074 * linux-low.c (linux_low_read_btrace): Pass trace reading
7075 errors on.
7076 (linux_low_disable_btrace): New.
7077
7078 2014-01-15 Doug Evans <dje@google.com>
7079
7080 * inferiors.c (thread_id_to_gdb_id): Delete.
7081 * inferiors.h (thread_id_to_gdb_id): Delete.
7082
7083 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7084
7085 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7086 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7087 versions.
7088
7089 2014-01-08 Pedro Alves <palves@redhat.com>
7090
7091 * server.c (handle_status): Don't discard previous queued stop
7092 replies or thread's pending status here.
7093 (main) <disconnection>: Do it here instead.
7094
7095 2014-01-08 Pedro Alves <palves@redhat.com>
7096
7097 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7098 * server.c (visit_actioned_threads, handle_pending_status): New
7099 function.
7100 (handle_v_cont): Factor out parts to ...
7101 (resume): ... this new function. If in all-stop, and a thread
7102 being resumed has a pending status, report it without actually
7103 resuming.
7104 (myresume): Adjust to use the new 'resume' function.
7105 (clear_pending_status_callback, set_pending_status_callback)
7106 (find_status_pending_thread_callback): New functions.
7107 (handle_status): Handle the case of multiple threads having
7108 interesting statuses to report. Report threads' real last signal
7109 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7110 with an interesting thread to report the status for, instead of
7111 always reporting the status of the first thread.
7112
7113 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7114
7115 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7116 * gdbreplay.c (gdbreplay_version): Likewise.
7117
7118 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7119
7120 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7121 iov.iov_len with the real length in use.
7122
7123 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7124
7125 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7126 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7127 for all targets that use win32-low.c.
7128 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7129 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7130
7131 2013-12-13 Pedro Alves <palves@redhat.com>
7132
7133 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7134 if equal to TARGET_WAITKIND_LOADED.
7135 * win32-low.c (cached_status): New static global.
7136 (win32_wait): Add declaration.
7137 (do_initial_child_stuff): Flush all initial pending debug events
7138 up to the initial breakpoint.
7139 (win32_wait): If CACHED_STATUS was set, return that instead
7140 of doing a real wait. Remove the code resuming the execution
7141 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7142 during the initial phase. Also remove the code changing
7143 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7144 TARGET_WAITKIND_STOPPED.
7145
7146 2013-12-11 Yao Qi <yao@codesourcery.com>
7147
7148 * notif.c (handle_notif_ack): Return 0 if no notification
7149 matches.
7150
7151 2013-11-20 Doug Evans <dje@google.com>
7152
7153 * linux-low.c (linux_set_resume_request): Fix comment.
7154
7155 2013-11-20 Doug Evans <dje@google.com>
7156
7157 * linux-low.c (resume_status_pending_p): Tweak comment.
7158
7159 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7160
7161 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7162 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7163 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7164 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7165 (srv_amd64_regobj): Add amd64-mpx.o.
7166 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7167 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7168 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7169 * i387-fp.c (num_pl_bnd_register) Added constant.
7170 (num_pl_bnd_cfg_registers) Added constant.
7171 (struct i387_xsave) Added reserved area and MPX fields.
7172 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7173 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7174 function.
7175 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7176 (init_registers_amd64_mpx_linux): Declare new function.
7177 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7178 (x86_64_regmap): Add MPX registers.
7179 (x86_linux_read_description): Add MPX case.
7180 (initialize_low_arch): Initialize MPX targets.
7181
7182 2013-11-18 Tom Tromey <tromey@redhat.com>
7183
7184 * configure: Rebuild.
7185 * configure.ac: Don't check for stdlib.h.
7186 * gdbreplay.c: Unconditionally include stdlib.h.
7187
7188 2013-11-18 Tom Tromey <tromey@redhat.com>
7189
7190 * config.in: Rebuild.
7191 * configure: Rebuild.
7192 * configure.ac: Don't use AC_HEADER_DIRENT.
7193
7194 2013-11-18 Tom Tromey <tromey@redhat.com>
7195
7196 * server.h: Don't check HAVE_STRING_H.
7197 * gdbreplay.c: Don't check HAVE_STRING_H.
7198 * configure: Rebuild.
7199
7200 2013-11-18 Tom Tromey <tromey@redhat.com>
7201
7202 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7203 LIBGNU.
7204
7205 2013-11-08 Tom Tromey <tromey@redhat.com>
7206
7207 * configure, config.in: Rebuild.
7208 * configure.ac: Remove unused configury.
7209
7210 2013-11-08 Tom Tromey <tromey@redhat.com>
7211
7212 * acinclude.m4: Include common.m4, codeset.m4.
7213 * configure, config.in: Rebuild.
7214 * configure.ac: Use GDB_AC_COMMON.
7215
7216 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7217
7218 * linux-s390-low.c (HWCAP_S390_TE): New define.
7219 (s390_arch_setup): Consider the TE field in the HWCAP for
7220 determining 'have_regset_tdb'.
7221
7222 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7223
7224 PR gdb/16014
7225 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7226 call to sizeof.
7227
7228 2013-10-02 Pedro Alves <palves@redhat.com>
7229
7230 * server.c (process_serial_event): Don't output "GDBserver
7231 exiting" if GDB is connected through stdio.
7232 * target.c (mywait): Likewise, be silent if GDB is connected
7233 through stdio.
7234
7235 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7236
7237 * lynx-low.c (lynx_add_threads_after_attach): New function.
7238 (lynx_attach): Remove call to add_thread. Add call to
7239 lynx_add_threads_after_attach instead.
7240
7241 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7242
7243 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7244 * config.in, configure: Regenerated.
7245
7246 2013-09-18 Yao Qi <yao@codesourcery.com>
7247
7248 PR server/15959
7249 * server.c (start_inferior): Clear 'resume_info'.
7250
7251 2013-09-16 Jiong Wang <jiwang@tilera.com>
7252
7253 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7254 for each register.
7255
7256 2013-09-16 Jiong Wang <jiwang@tilera.com>
7257
7258 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7259 linux-tile-low.o to srv_tgtobj.
7260
7261 2013-09-16 Will Newton <will.newton@linaro.org>
7262
7263 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7264 out regs.
7265
7266 2013-09-06 Pedro Alves <palves@redhat.com>
7267
7268 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7269 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7270 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7271 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7272 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7273 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7274
7275 2013-09-06 Pedro Alves <palves@redhat.com>
7276
7277 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7278 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7279
7280 2013-09-06 Pedro Alves <palves@redhat.com>
7281
7282 * linux-amd64-ipa.c: Include tracepoint.h.
7283 * linux-i386-ipa.c: Include tracepoint.h.
7284
7285 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7286
7287 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7288 (ps_get_thread_area): New function.
7289
7290 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7291
7292 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7293 (initialize_low_arch): Call init_registers_crisv32 rather than
7294 init_register_crisv32.
7295
7296 2013-09-05 Pedro Alves <palves@redhat.com>
7297
7298 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7299 to ...
7300 * hostio.h: ... this new file.
7301 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7302 win32-low.c: Include hostio.h.
7303
7304 2013-09-05 Pedro Alves <palves@redhat.com>
7305
7306 * server.h (gdb_client_data, handler_func, callback_handler_func)
7307 (delete_file_handler, add_file_handler, append_callback_event)
7308 (delete_callback_event, start_event_loop, initialize_event_loop):
7309 Move to event-loop.h and include it.
7310 * event-loop.h: New file.
7311
7312 2013-09-05 Pedro Alves <palves@redhat.com>
7313
7314 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7315 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7316 (loaded_dll, unloaded_dll): Move to ...
7317 * dll.h: ... this new file.
7318 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7319
7320 2013-09-05 Pedro Alves <palves@redhat.com>
7321
7322 * server.h (current_process, get_thread_process, all_processes)
7323 (add_inferior_to_list, for_each_inferior, current_inferior)
7324 (remove_inferior, add_process, remove_process, find_process_pid)
7325 (have_started_inferiors_p, have_attached_inferiors_p)
7326 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7327 (clear_inferiors, find_inferior, find_inferior_id)
7328 (inferior_target_data, set_inferior_target_data)
7329 (inferior_regcache_data, set_inferior_regcache_data): Move to
7330 inferiors.h, and include it.
7331 * inferiors.h: New file.
7332
7333 2013-09-05 Pedro Alves <palves@redhat.com>
7334
7335 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7336 Move ...
7337 * ax.h: ... here.
7338
7339 2013-09-05 Pedro Alves <palves@redhat.com>
7340
7341 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7342 tracepoint.h.
7343 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7344 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7345 (handle_tracepoint_general_set, handle_tracepoint_query)
7346 (tracepoint_finished_step, tracepoint_was_hit)
7347 (release_while_stepping_state_list, current_traceframe)
7348 (in_readonly_region, traceframe_read_mem)
7349 (fetch_traceframe_registers, traceframe_read_sdata)
7350 (traceframe_read_info, struct fast_tpoint_collect_status)
7351 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7352 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7353 (supply_fast_tracepoint_registers)
7354 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7355 (ipa_tdesc, claim_trampoline_space)
7356 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7357 (agent_mem_read, agent_get_trace_state_variable_value)
7358 (agent_set_trace_state_variable_value, agent_tsv_read)
7359 (agent_mem_read_string, get_raw_reg_func_addr)
7360 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7361 * tracepoint.h: ... this new file.
7362
7363 2013-09-05 Pedro Alves <palves@redhat.com>
7364
7365 * server.h (perror_with_name, error, fatal, warning, paddress)
7366 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7367 include it.
7368 * utils.h: New file.
7369
7370 2013-09-05 Pedro Alves <palves@redhat.com>
7371
7372 * server.h (remote_debug, noack_mode, transport_is_reliable)
7373 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7374 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7375 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7376 (write_enn, initialize_async_io, enable_async_io)
7377 (disable_async_io, check_remote_input_interrupt_request)
7378 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7379 (dead_thread_notify, prepare_resume_reply)
7380 (decode_address_to_semicolon, decode_address, decode_m_packet)
7381 (decode_M_packet, decode_X_packet, decode_xfer_write)
7382 (decode_search_memory_packet, unhexify, hexify)
7383 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7384 (look_up_one_symbol, relocate_instruction)
7385 (monitor_output): Move to remote-utils.h, and include it.
7386 * remote-utils.h: New file.
7387
7388 2013-09-05 Pedro Alves <palves@redhat.com>
7389
7390 * server.h (_): Delete.
7391
7392 2013-09-02 Pedro Alves <palves@redhat.com>
7393
7394 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7395 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7396 allocated.
7397 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7398
7399 2013-09-02 Pierre Muller <muller@sourceware.org>
7400
7401 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7402 or WriteProcessMemory complete successfully and handle
7403 ERROR_PARTIAL_COPY error.
7404
7405 2013-09-02 Pedro Alves <palves@redhat.com>
7406
7407 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7408 error instead of EIO.
7409
7410 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7411
7412 PR server/15604
7413 * linux-low.c: Include filestuff.h.
7414 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7415 * lynx-low.c: Include filestuff.h.
7416 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7417 * server.c: Include filestuff.h.
7418 (main): Call notice_open_fds.
7419 * spu-low.c: Include filestuff.h.
7420 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7421
7422 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7423
7424 * Makefile.in: Explain why ../target and ../nat are not
7425 listed as include file search paths.
7426 (linux-waitpid.o): New object file rule.
7427 * configure.srv (srv_native_linux_obj): New variable.
7428 Replace all occurrences of linux native object files with
7429 $srv_native_linux_obj.
7430 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7431 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7432 (linux_enable_event_reporting): Remove declaration.
7433 (my_waitpid): Moved to common/linux-waitpid.c.
7434 (linux_wait_for_event): Pass ptid when calling
7435 linux_enable_event_reporting.
7436 (linux_supports_tracefork_flag): Remove.
7437 (linux_enable_event_reporting): Likewise.
7438 (linux_tracefork_grandchild): Remove.
7439 (STACK_SIZE): Moved to common/linux-ptrace.c.
7440 (linux_tracefork_child): Remove.
7441 (linux_test_for_tracefork): Remove.
7442 (linux_look_up_symbols): Call linux_supports_traceclone.
7443 (initialize_low): Remove call to linux_test_for_tracefork.
7444 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7445 common/linux-ptrace.h.
7446 (PTRACE_TYPE_ARG4): Likewise.
7447 Include linux-ptrace.h.
7448
7449 2013-08-21 Pedro Alves <palves@redhat.com>
7450
7451 * config.in: Renegerate.
7452
7453 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7454
7455 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7456 (SFILES): Remove $(srcdir)/common/target-common.c and
7457 add $(srcdir)/target/waitstatus.c.
7458 (OBS): Remove target-common.o and add waitstatus.o.
7459 (server_h): Remove $(srcdir)/../common/target-common.h and
7460 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7461 and $(srcdir)/../target/waitstatus.h.
7462 (target-common.o): Remove.
7463 (waitstatus.o): New target object file.
7464 * target.h: Do not include target-common.h and
7465 include target/resume.h, target/wait.h and
7466 target/waitstatus.h.
7467
7468 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7469
7470 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7471 to PTRACE_TYPE_ARG3.
7472 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7473 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7474 PTRACE_TYPE_ARG4.
7475 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7476 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7477
7478 2013-07-27 Jie Zhang <jie@codesourcery.com>
7479 Daniel Jacobowitz <dan@codesourcery.com>
7480 Yao Qi <yao@codesourcery.com>
7481
7482 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7483 (mips-linux-watch.o): New rule.
7484 (mips_linux_watch_h): New variable.
7485 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7486 srv_tgtobj.
7487 * linux-mips-low.c: Include mips-linux-watch.h.
7488 (struct arch_process_info, struct arch_lwp_info): New.
7489 (update_watch_registers_callback): New function.
7490 (mips_linux_new_process, mips_linux_new_thread) New functions.
7491 (mips_linux_prepare_to_resume, mips_insert_point): New
7492 functions.
7493 (mips_remove_point, mips_stopped_by_watchpoint): New
7494 functions.
7495 (rsp_bp_type_to_target_hw_bp_type): New function.
7496 (mips_stopped_data_address): New function.
7497 (the_low_target): Add watchpoint support functions.
7498
7499 2013-07-27 Yao Qi <yao@codesourcery.com>
7500
7501 * i386-low.c: Include break-common.h.
7502 (enum target_hw_bp_type): Remove.
7503
7504 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7505
7506 * Makefile.in (SFILES): /common/target-common.c.
7507 (OBS): Add target-common.o.
7508 (server_h): Add $(srcdir)/../common/target-common.h.
7509 (target-common.o): New target.
7510 * server.c (queue_stop_reply_callback): Free
7511 status string after use.
7512 * target.c (target_waitstatus_to_string): Remove.
7513 * target.h: Include target-common.h.
7514 (resume_kind): Likewise.
7515 (target_waitkind): Likewise.
7516 (target_waitstatus): Likewise.
7517 (TARGET_WNOHANG): Likewise.
7518
7519 2013-07-04 Yao Qi <yao@codesourcery.com>
7520
7521 * Makefile.in (host_alias): Use @host_noncanonical@.
7522 (target_alias): Use @target_noncanonical@.
7523 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7524 ACX_NONCANONICAL_HOST.
7525 * configure: Regenerated.
7526
7527 Revert:
7528 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7529
7530 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7531 * configure: Rebuild.
7532 * Makefile.in (version_host, version_target): Get from configure.
7533 (version.c): Use $(version_host) and $(version_target).
7534
7535 2013-07-03 Pedro Alves <palves@redhat.com>
7536
7537 * Makefile.in (config.status): Depend on development.sh.
7538 * acinclude.m4: Include libmcheck.m4.
7539 * configure: Regenerate.
7540
7541 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7542
7543 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7544 attribute inside the parentheses.
7545 (winapi_DebugSetProcessKillOnExit): Ditto.
7546 (winapi_DebugBreakProcess): Ditto.
7547 (winapi_GenerateConsoleCtrlEvent): Ditto.
7548
7549 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7550
7551 * notif.h (notif_event): Add a dummy member to avoid compiler
7552 errors.
7553
7554 2013-07-01 Pedro Alves <palves@redhat.com>
7555
7556 * hostio.c (HOSTIO_PATH_MAX): Define.
7557 (require_filename, handle_open, handle_unlink, handle_readlink):
7558 Use it.
7559
7560 2013-07-01 Pedro Alves <palves@redhat.com>
7561
7562 * server.h: Include "pathmax.h".
7563 * linux-low.c: Don't include sys/param.h.
7564 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7565 MAXPATHLEN.
7566 * win32-low.c: Don't include sys/param.h.
7567 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7568
7569 2013-07-01 Pedro Alves <palves@redhat.com>
7570
7571 * event-loop.c: Don't check HAVE_UNISTD_H before including
7572 <unistd.h>.
7573 * gdbreplay.c: Likewise.
7574 * remote-utils.c: Likewise.
7575 * server.c: Likewise.
7576 * configure.ac: Don't check for unistd.h.
7577 * configure: Regenerate.
7578
7579 2013-06-28 Tom Tromey <tromey@redhat.com>
7580
7581 * Makefile.in (version.c): Use version.in, not
7582 common/version.in.
7583
7584 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7585
7586 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7587 * configure: Rebuild.
7588 * Makefile.in (version_host, version_target): Get from configure.
7589 (version.c): Use $(version_host) and $(version_target).
7590
7591 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7592
7593 Fix trace-status to output user name without trailing colon.
7594 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7595
7596 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7597
7598 Fix trace-status to output proper start-time and stop-time.
7599 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7600 output start time and stop time in hex as gdb expects.
7601
7602 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7603
7604 * tracepoint.c (build_traceframe_info_xml): Output trace state
7605 variables present in the trace buffer.
7606
7607 2013-06-24 Tom Tromey <tromey@redhat.com>
7608
7609 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7610 create-version.sh.
7611 (version.o): Remove.
7612 * gdbreplay.c: Include version.h.
7613 (version, host_name): Don't declare.
7614 * server.h: Include version.h.
7615 (version, host_name): Don't declare.
7616
7617 2013-06-12 Pedro Alves <palves@redhat.com>
7618
7619 * linux-x86-low.c (linux_is_elf64): Delete global.
7620 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7621 with local linux_pid_exe_is_elf_64_file use.
7622
7623 2013-06-11 Pedro Alves <palves@redhat.com>
7624
7625 * linux-low.c (regset_disabled, disable_regset): New functions.
7626 (regsets_fetch_inferior_registers)
7627 (regsets_store_inferior_registers): Use them.
7628 (initialize_regsets_info); Don't allocate the disabled_regsets
7629 array here.
7630 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7631 comment.
7632
7633 2013-06-11 Pedro Alves <palves@redhat.com>
7634
7635 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7636 xmalloc.
7637
7638 2013-06-11 Pedro Alves <palves@redhat.com>
7639
7640 * linux-x86-low.c (initialize_low_arch): Call
7641 init_registers_x32_avx_linux.
7642
7643 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7644
7645 Fix compatibility with Android Bionic.
7646 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7647 it is not empty.
7648
7649 2013-06-07 Pedro Alves <palves@redhat.com>
7650
7651 PR server/14823
7652 * Makefile.in (OBS): Add tdesc.o.
7653 (IPA_OBJS): Add tdesc-ipa.o.
7654 (tdesc-ipa.o): New rule.
7655 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7656 interface.
7657 * linux-low.c (new_inferior): Delete.
7658 (disabled_regsets, num_regsets): Delete.
7659 (linux_add_process): Adjust to set the new per-process
7660 new_inferior flag.
7661 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7662 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7663 was a stop. When calling arch_setup, switch the current inferior
7664 to the thread that got an event.
7665 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7666 (regsets_fetch_inferior_registers)
7667 (regsets_store_inferior_registers): New regsets_info parameter.
7668 Adjust to use it.
7669 (linux_register_in_regsets): New regs_info parameter. Adjust to
7670 use it.
7671 (register_addr, fetch_register, store_register): New usrregs_info
7672 parameter. Adjust to use it.
7673 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7674 parameter regs_info. Adjust to use it.
7675 (linux_fetch_registers): Get the current inferior's regs_info, and
7676 adjust to use it.
7677 (linux_store_registers): Ditto.
7678 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7679 (initialize_low): Don't initialize the target_regsets here. Call
7680 initialize_low_arch.
7681 * linux-low.h (target_regsets): Delete declaration.
7682 (struct regsets_info): New.
7683 (struct usrregs_info): New.
7684 (struct regs_info): New.
7685 (struct process_info_private) <new_inferior>: New field.
7686 (struct linux_target_ops): Delete the num_regs, regmap, and
7687 regset_bitmap fields. New field regs_info.
7688 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7689 * i387-fp.c (num_xmm_registers): Delete.
7690 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7691 calls to new interface.
7692 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7693 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7694 Infer the number of xmm registers from the regcache's target
7695 description.
7696 * i387-fp.h (num_xmm_registers): Delete.
7697 * inferiors.c (add_thread): Don't install the thread's regcache
7698 here.
7699 * proc-service.c (gregset_info): Fetch the current inferior's
7700 regs_info. Adjust to use it.
7701 * regcache.c: Include tdesc.h.
7702 (register_bytes, reg_defs, num_registers)
7703 (gdbserver_expedite_regs): Delete.
7704 (get_thread_regcache): If the thread doesn't have a regcache yet,
7705 create one, instead of aborting gdbserver.
7706 (regcache_invalidate_one): Rename to ...
7707 (regcache_invalidate_thread): ... this.
7708 (regcache_invalidate_one): New.
7709 (regcache_invalidate): Only invalidate registers of the current
7710 process.
7711 (init_register_cache): Add target_desc parameter, and use it.
7712 (new_register_cache): Ditto. Assert the target description has a
7713 non zero registers_size.
7714 (regcache_cpy): Add assertions. Adjust.
7715 (realloc_register_cache, set_register_cache): Delete.
7716 (registers_to_string, registers_from_string): Adjust.
7717 (find_register_by_name, find_regno, find_register_by_number)
7718 (register_cache_size): Add target_desc parameter, and use it.
7719 (free_register_cache_thread, free_register_cache_thread_one)
7720 (regcache_release, register_cache_size): New.
7721 (register_size): Add target_desc parameter, and use it.
7722 (register_data, supply_register, supply_register_zeroed)
7723 (supply_regblock, supply_register_by_name, collect_register)
7724 (collect_register_as_string, collect_register_by_name): Adjust.
7725 * regcache.h (struct target_desc): Forward declare.
7726 (struct regcache) <tdesc>: New field.
7727 (init_register_cache, new_register_cache): Add target_desc
7728 parameter.
7729 (regcache_invalidate_thread): Declare.
7730 (regcache_invalidate_one): Delete declaration.
7731 (regcache_release): Declare.
7732 (find_register_by_number, register_cache_size, register_size)
7733 (find_regno): Add target_desc parameter.
7734 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7735 declarations.
7736 * remote-utils.c: Include tdesc.h.
7737 (outreg, prepare_resume_reply): Adjust.
7738 * server.c: Include tdesc.h.
7739 (gdbserver_xmltarget): Delete declaration.
7740 (get_features_xml, process_serial_event): Adjust.
7741 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7742 declare.
7743 (struct process_info) <tdesc>: New field.
7744 (ipa_tdesc): Declare.
7745 * tdesc.c: New file.
7746 * tdesc.h: New file.
7747 * tracepoint.c: Include tdesc.h.
7748 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7749 (get_context_regcache): Adjust to pass ipa_tdesc down.
7750 (do_action_at_tracepoint): Adjust to get the register cache size
7751 from the context regcache's description.
7752 (traceframe_walk_blocks): Adjust to get the register cache size
7753 from the current trace frame's description.
7754 (traceframe_get_pc): Adjust to get current trace frame's
7755 description and pass it down.
7756 (gdb_collect): Adjust to get the register cache size from the
7757 IPA's description.
7758 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7759 (gdbserver_xmltarget): Delete.
7760 (initialize_low_tracepoint): Set the ipa's target description.
7761 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7762 (initialize_low_tracepoint): Set the ipa's target description.
7763 * linux-x86-low.c: Include tdesc.h.
7764 [__x86_64__] (is_64bit_tdesc): New.
7765 (ps_get_thread_area, x86_get_thread_area): Use it.
7766 (i386_cannot_store_register): Rename to ...
7767 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7768 (i386_cannot_fetch_register): Rename to ...
7769 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7770 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7771 to new interface.
7772 (target_regsets): Rename to ...
7773 (x86_regsets): ... this.
7774 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7775 interface.
7776 (x86_siginfo_fixup): Use is_64bit_tdesc.
7777 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7778 (tdesc_x32_avx_linux, tdesc_x32_linux)
7779 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7780 Declare.
7781 (x86_linux_update_xmltarget): Delete.
7782 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7783 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7784 (AMD64_LINUX_USER64_CS): New.
7785 (x86_linux_read_description): New, based on
7786 x86_linux_update_xmltarget.
7787 (same_process_callback): New.
7788 (x86_arch_setup_process_callback): New.
7789 (x86_linux_update_xmltarget): New.
7790 (x86_regsets_info): New.
7791 (amd64_linux_regs_info): New.
7792 (i386_linux_usrregs_info): New.
7793 (i386_linux_regs_info): New.
7794 (x86_linux_regs_info): New.
7795 (x86_arch_setup): Reimplement.
7796 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7797 (x86_emit_ops): Ditto.
7798 (the_low_target): Adjust. Install x86_linux_regs_info,
7799 x86_cannot_fetch_register, and x86_cannot_store_register.
7800 (initialize_low_arch): New.
7801 * linux-ia64-low.c (tdesc_ia64): Declare.
7802 (ia64_fetch_register): Adjust.
7803 (ia64_usrregs_info, regs_info): New globals.
7804 (ia64_regs_info): New function.
7805 (the_low_target): Adjust.
7806 (initialize_low_arch): New function.
7807 * linux-sparc-low.c (tdesc_sparc64): Declare.
7808 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7809 Adjust.
7810 (sparc_arch_setup): New function.
7811 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7812 (the_low_target): Adjust.
7813 (initialize_low_arch): New function.
7814 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7815 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7816 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7817 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7818 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7819 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7820 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7821 (tdesc_powerpc_isa205_vsx64l): Declare.
7822 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7823 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7824 (ppc_set_pc, ppc_get_hwcap): Adjust.
7825 (ppc_usrregs_info): Forward declare.
7826 (!__powerpc64__) ppc_regmap_adjusted: New global.
7827 (ppc_arch_setup): Adjust to the current process'es target
7828 description.
7829 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7830 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7831 (ppc_store_evrregset): Adjust.
7832 (target_regsets): Rename to ...
7833 (ppc_regsets): ... this, and make static.
7834 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7835 (ppc_regs_info): New function.
7836 (the_low_target): Adjust.
7837 (initialize_low_arch): New function.
7838 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7839 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7840 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7841 (tdesc_s390x_linux64v2): Declare.
7842 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7843 (s390_fill_gregset, s390_store_last_break): Adjust.
7844 (target_regsets): Rename to ...
7845 (s390_regsets): ... this, and make static.
7846 (s390_get_pc, s390_set_pc): Adjust.
7847 (s390_get_hwcap): New target_desc parameter, and use it.
7848 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7849 (s390_arch_setup): Adjust to set the current process'es target
7850 description. Don't adjust the regmap.
7851 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7852 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7853 (regs_info_3264): New globals.
7854 (s390_regs_info): New function.
7855 (the_low_target): Adjust.
7856 (initialize_low_arch): New function.
7857 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7858 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7859 [__mips64] (init_registers_mips_linux)
7860 (init_registers_mips_dsp_linux): Delete defines.
7861 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7862 (have_dsp): New global.
7863 (mips_read_description): New, based on mips_arch_setup.
7864 (mips_arch_setup): Reimplement.
7865 (get_usrregs_info): New function.
7866 (mips_cannot_fetch_register, mips_cannot_store_register)
7867 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7868 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7869 (target_regsets): Rename to ...
7870 (mips_regsets): ... this, and make static.
7871 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7872 (dsp_regs_info, regs_info): New globals.
7873 (mips_regs_info): New function.
7874 (the_low_target): Adjust.
7875 (initialize_low_arch): New function.
7876 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7877 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7878 Declare.
7879 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7880 (arm_read_description): New, with bits factored from
7881 arm_arch_setup.
7882 (arm_arch_setup): Reimplement.
7883 (target_regsets): Rename to ...
7884 (arm_regsets): ... this, and make static.
7885 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7886 (arm_regs_info): New function.
7887 (the_low_target): Adjust.
7888 (initialize_low_arch): New function.
7889 * linux-m68k-low.c (tdesc_m68k): Declare.
7890 (target_regsets): Rename to ...
7891 (m68k_regsets): ... this, and make static.
7892 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7893 (m68k_regs_info): New function.
7894 (m68k_arch_setup): New function.
7895 (the_low_target): Adjust.
7896 (initialize_low_arch): New function.
7897 * linux-sh-low.c (tdesc_sharch): Declare.
7898 (target_regsets): Rename to ...
7899 (sh_regsets): ... this, and make static.
7900 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7901 (sh_regs_info, sh_arch_setup): New functions.
7902 (the_low_target): Adjust.
7903 (initialize_low_arch): New function.
7904 * linux-bfin-low.c (tdesc_bfin): Declare.
7905 (bfin_arch_setup): New function.
7906 (bfin_usrregs_info, regs_info): New globals.
7907 (bfin_regs_info): New function.
7908 (the_low_target): Adjust.
7909 (initialize_low_arch): New function.
7910 * linux-cris-low.c (tdesc_cris): Declare.
7911 (cris_arch_setup): New function.
7912 (cris_usrregs_info, regs_info): New globals.
7913 (cris_regs_info): New function.
7914 (the_low_target): Adjust.
7915 (initialize_low_arch): New function.
7916 * linux-cris-low.c (tdesc_crisv32): Declare.
7917 (cris_arch_setup): New function.
7918 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7919 (cris_regs_info): New function.
7920 (the_low_target): Adjust.
7921 (initialize_low_arch): New function.
7922 * linux-m32r-low.c (tdesc_m32r): Declare.
7923 (m32r_arch_setup): New function.
7924 (m32r_usrregs_info, regs_info): New globals.
7925 (m32r_regs_info): Adjust.
7926 (initialize_low_arch): New function.
7927 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7928 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7929 (tic6x_usrregs_info): Forward declare.
7930 (tic6x_read_description): New function, based on ...
7931 (tic6x_arch_setup): ... this. Reimplement.
7932 (target_regsets): Rename to ...
7933 (tic6x_regsets): ... this, and make static.
7934 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7935 (tic6x_regs_info): New function.
7936 (the_low_target): Adjust.
7937 (initialize_low_arch): New function.
7938 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7939 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7940 (target_regsets): Rename to ...
7941 (xtensa_regsets): ... this, and make static.
7942 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7943 globals.
7944 (xtensa_arch_setup, xtensa_regs_info): New functions.
7945 (the_low_target): Adjust.
7946 (initialize_low_arch): New function.
7947 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7948 (nios2_arch_setup): Set the current process'es tdesc.
7949 (target_regsets): Rename to ...
7950 (nios2_regsets): ... this.
7951 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7952 (nios2_regs_info): New function.
7953 (the_low_target): Adjust.
7954 (initialize_low_arch): New function.
7955 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7956 (aarch64_arch_setup): Set the current process'es tdesc.
7957 (target_regsets): Rename to ...
7958 (aarch64_regsets): ... this.
7959 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7960 (aarch64_regs_info): New function.
7961 (the_low_target): Adjust.
7962 (initialize_low_arch): New function.
7963 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7964 globals.
7965 (target_regsets): Rename to ...
7966 (tile_regsets): ... this.
7967 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7968 (tile_regs_info): New function.
7969 (tile_arch_setup): Set the current process'es tdesc.
7970 (the_low_target): Adjust.
7971 (initialize_low_arch): New function.
7972 * spu-low.c (tdesc_spu): Declare.
7973 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7974 * win32-arm-low.c (tdesc_arm): Declare.
7975 (arm_arch_setup): New function.
7976 (the_low_target): Install arm_arch_setup instead of
7977 init_registers_arm.
7978 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7979 (init_windows_x86): Rename to ...
7980 (i386_arch_setup): ... this. Set `win32_tdesc'.
7981 (the_low_target): Adjust.
7982 * win32-low.c (win32_tdesc): New global.
7983 (child_add_thread): Don't create the thread cache here.
7984 (do_initial_child_stuff): Set the new process'es tdesc.
7985 * win32-low.h (struct target_desc): Forward declare.
7986 (win32_tdesc): Declare.
7987 * lynx-i386-low.c (tdesc_i386): Declare global.
7988 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7989 * lynx-low.c (lynx_tdesc): New global.
7990 (lynx_add_process): Set the new process'es tdesc.
7991 * lynx-low.h (struct target_desc): Forward declare.
7992 (lynx_tdesc): Declare global.
7993 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7994 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7995 * nto-low.c (nto_tdesc): New global.
7996 (do_attach): Set the new process'es tdesc.
7997 * nto-low.h (struct target_desc): Forward declare.
7998 (nto_tdesc): Declare.
7999 * nto-x86-low.c (tdesc_i386): Declare.
8000 (nto_x86_arch_setup): Set `nto_tdesc'.
8001
8002 2013-06-04 Gary Benson <gbenson@redhat.com>
8003
8004 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8005 to qSupported response when appropriate.
8006 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8007 with nonzero-length annex.
8008 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8009 arguments supplied in annex.
8010
8011 2013-05-31 Doug Evans <dje@google.com>
8012
8013 PR server/15594
8014 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8015 64 bits in 64-cross-32 environment.
8016
8017 2013-05-28 Pedro Alves <palves@redhat.com>
8018
8019 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8020 (aarch64-without-fpu.c): Delete rule.
8021 * configure.srv (aarch64*-*-linux*): Remove references to
8022 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8023 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8024 declaration.
8025
8026 2013-05-24 Pedro Alves <palves@redhat.com>
8027
8028 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8029 instead of strchr/decode_address. Error if the range isn't split
8030 with a ','. Don't assume there's be a ':' in the action.
8031
8032 2013-05-23 Yao Qi <yao@codesourcery.com>
8033 Pedro Alves <palves@redhat.com>
8034
8035 * linux-low.c (lwp_in_step_range): New function.
8036 (linux_wait_1): If the thread was range stepping and stopped
8037 outside the stepping range, report the stop to GDB. Otherwise,
8038 continue stepping. Add range stepping debug output.
8039 (linux_set_resume_request): Copy the step range from the resume
8040 request to the lwp.
8041 (linux_supports_range_stepping): New.
8042 (linux_target_ops) <supports_range_stepping>: Set to
8043 linux_supports_range_stepping.
8044 * linux-low.h (struct linux_target_ops)
8045 <supports_range_stepping>: New field.
8046 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8047 * linux-x86-low.c (x86_supports_range_stepping): New.
8048 (the_low_target) <supports_range_stepping>: Set to
8049 x86_supports_range_stepping.
8050 * server.c (handle_v_cont): Handle 'r' action.
8051 (handle_v_requests): Append ";r" if the target supports range
8052 stepping.
8053 * target.h (struct thread_resume) <step_range_start,
8054 step_range_end>: New fields.
8055 (struct target_ops) <supports_range_stepping>:
8056 New field.
8057 (target_supports_range_stepping): New macro.
8058
8059 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8060
8061 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8062 confusion in comment.
8063
8064 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8065
8066 * lynx-low.c (struct process_info_private): New type.
8067 (lynx_add_process): New function.
8068 (lynx_create_inferior, lynx_attach): Replace calls to
8069 add_process by calls to lynx_add_process.
8070 (lynx_resume): If PTID is null, then try using
8071 current_process()->private->last_wait_event_ptid.
8072 Add comments.
8073 (lynx_clear_inferiors): Delete. The contents of that function
8074 has been inlined in lynx_mourn;
8075 (lynx_wait_1): Save the ptid in the process's private data.
8076 (lynx_mourn): Free the process' private data. Replace call
8077 to lynx_clear_inferiors by call to clear_inferiors.
8078
8079 2013-05-17 Yao Qi <yao@codesourcery.com>
8080
8081 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8082 the right place.
8083
8084 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8085
8086 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8087 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8088 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8089 PT_TEXT_END_ADDR guards. Update comments.
8090 (linux_target_op) <read_offsets>: Conditionally define to
8091 linux_read_offsets if the target is UCLIBC and if it defines
8092 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8093
8094 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8095 Andrew Jenner <andrew@codesourcery.com>
8096
8097 * Makefile.in (SFILES): Add linux-nios2-low.c.
8098 (clean): Add action to delete nios2-linux.c.
8099 (nios2-linux.c): New rule.
8100 * configure.srv: Add nios2*-*-linux*.
8101 * linux-nios2-low.c: New.
8102
8103 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8104
8105 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8106
8107 2013-04-25 Hui Zhu <hui@codesourcery.com>
8108
8109 PR gdb/15186
8110 * ax.c (ax_printf): Add fflush.
8111
8112 2013-04-22 Tom Tromey <tromey@redhat.com>
8113
8114 * Makefile.in (SFILES): Add filestuff.c.
8115 (OBS): Add filestuff.o.
8116 (filestuff.o): New target.
8117 * config.in, configure: Rebuild.
8118 * configure.ac: Check for fdwalk, pipe2.
8119
8120 2013-04-17 Pedro Alves <palves@redhat.com>
8121
8122 * configure.ac (USE_THREAD_DB): Delete variable.
8123 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8124 Don't AC_SUBST USE_THREAD_DB.
8125 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8126 * config.in, configure: Regenerate.
8127
8128 2013-04-16 Pedro Alves <palves@redhat.com>
8129
8130 * linux-low.h (struct lwp_info) <thread_known>: Move under
8131 the USE_THREAD_DB #ifdef.
8132
8133 2013-04-16 Pedro Alves <palves@redhat.com>
8134
8135 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8136 (linux-low.o): Delete rule.
8137 * linux-low.h: Always include "gdb_thread_db.h" instead of
8138 conditionally including thread_db.h.
8139 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8140 HAVE_THREAD_DB_H.
8141
8142 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8143
8144 * Makefile.in (install-only): Fix make install regression.
8145
8146 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8147
8148 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8149 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8150 installation.
8151 * gdbserver.1: Remove.
8152
8153 2013-03-22 Pedro Alves <palves@redhat.com>
8154
8155 * linux-low.c (handle_extended_wait): Don't call
8156 linux_enable_event_reporting.
8157
8158 2013-03-15 Tony Theodore <tonyt@logyst.com>
8159
8160 PR build/9098:
8161 * Makefile.in (SHELL): Use @SHELL@.
8162
8163 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8164
8165 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8166 compiler warning.
8167
8168 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8169
8170 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8171 Remove extraneous NULL element.
8172
8173 2013-03-13 Yao Qi <yao@codesourcery.com>
8174
8175 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8176 'V' block in trace frame.
8177
8178 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8179
8180 * target.h (struct target_ops): Add btrace ops.
8181 (target_supports_btrace): New macro.
8182 (target_enable_btrace): New macro.
8183 (target_disable_btrace): New macro.
8184 (target_read_btrace): New macro.
8185 * gdbthread.h (struct thread_info): Add btrace field.
8186 * server.c: Include btrace-common.h.
8187 (handle_btrace_general_set): New function.
8188 (handle_btrace_enable): New function.
8189 (handle_btrace_disable): New function.
8190 (handle_general_set): Call handle_btrace_general_set.
8191 (handle_qxfer_btrace): New function.
8192 (struct qxfer qxfer_packets[]): Add btrace entry.
8193 * inferiors.c (remove_thread): Disable btrace.
8194 * linux-low: Include linux-btrace.h.
8195 (linux_low_enable_btrace): New function.
8196 (linux_low_read_btrace): New function.
8197 (linux_target_ops): Add btrace ops.
8198 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8199 Add srv_linux_btrace=yes.
8200 (x86_64-*-linux*): Add linux-btrace.o.
8201 Add srv_linux_btrace=yes.
8202 * configure.ac: Define HAVE_LINUX_BTRACE.
8203 * config.in: Regenerated.
8204 * configure: Regenerated.
8205
8206 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8207
8208 * server.c (handle_qxfer): Preserve error message if -3 is
8209 returned.
8210 (qxfer): Document the -3 return value.
8211
8212 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8213
8214 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8215 (linux_btrace_h): New variable.
8216 (linux-btrace.o): New rule.
8217
8218 2013-03-08 Stan Shebs <stan@codesourcery.com>
8219 Hafiz Abid Qadeer <abidh@codesourcery.com>
8220
8221 * tracepoint.c (trace_buffer_size): New global.
8222 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8223 (init_trace_buffer): Change to one-argument function. Allocate
8224 trace buffer memory.
8225 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8226 handle QTBuffer:size packet.
8227 (cmd_bigqtbuffer_size): New function.
8228 (initialize_tracepoint): Call init_trace_buffer with
8229 DEFAULT_TRACE_BUFFER_SIZE.
8230 * server.c (handle_query): Add QTBuffer:size in the
8231 supported packets.
8232
8233 2013-03-07 Yao Qi <yao@codesourcery.com>
8234
8235 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8236 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8237 of -1.
8238 (cmd_qtsp): Adjust condition. Do post increment.
8239 Set cur_action and cur_step_action back to 0.
8240
8241 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8242
8243 PR server/15236
8244 * linux-low.c (linux_write_memory): Return early success if LEN is
8245 zero.
8246
8247 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8248
8249 * configure.srv: Add x86_64-*-cygwin* as target.
8250
8251 2013-02-28 Tom Tromey <tromey@redhat.com>
8252
8253 * configure.ac: Invoke AC_SYS_LARGEFILE.
8254 * configure, config.in: Rebuild.
8255
8256 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8257
8258 * win32-low.c: Throughout, fix format strings and casts of
8259 printf-like functions to avoid type related warnings on all
8260 platforms.
8261 (get_child_debug_event): Print dwDebugEventCode as hex since
8262 that's how it's usually documented.
8263
8264 2013-02-28 Yao Qi <yao@codesourcery.com>
8265
8266 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8267 pulongest.
8268
8269 2013-02-27 Jiong Wang <jiwang@tilera.com>
8270
8271 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8272 (reg-tilegx32.c): New rule.
8273 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8274 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8275 different register info initializer according to elf class.
8276 (init_registers_tilgx32): New function. The tilegx32 register info
8277 initializer.
8278 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8279 (tile_store_gregset): Likewise.
8280
8281 2013-02-27 Yao Qi <yao@codesourcery.com>
8282
8283 * server.c (process_point_options): Print debug message when
8284 debug_threads is true.
8285
8286 2013-02-26 Yao Qi <yao@codesourcery.com>
8287
8288 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8289
8290 2013-02-19 Pedro Alves <palves@redhat.com>
8291 Kai Tietz <ktietz@redhat.com>
8292
8293 PR gdb/15161
8294
8295 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8296 instead of strtoul to extract address from packet.
8297 (process_serial_event) <'z'>: Likewise.
8298
8299 2013-02-18 Yao Qi <yao@codesourcery.com>
8300
8301 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8302
8303 2013-02-14 Pedro Alves <palves@redhat.com>
8304
8305 Plug memory leak.
8306
8307 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8308 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8309
8310 2013-02-14 Pedro Alves <palves@redhat.com>
8311
8312 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8313
8314 2013-02-14 Pedro Alves <palves@redhat.com>
8315
8316 * tracepoint.c (save_string): Delete.
8317 (add_tracepoint_action): Use savestring instead of save_string.
8318
8319 2013-02-12 Pedro Alves <palves@redhat.com>
8320
8321 * linux-xtensa-low.c: Ditto.
8322 * xtensa-xtregs.c: Ditto.
8323
8324 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8325
8326 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8327 thread_db.
8328
8329 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8330
8331 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8332 aarch64_num_wp_regs and aarch64_num_bp_regs to
8333 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8334
8335 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8336
8337 * linux-aarch64-low.c (ps_get_thread_area): Replace
8338 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8339
8340 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8341 Marcus Shawcroft <marcus.shawcroft@arm.com>
8342 Nigel Stephens <nigel.stephens@arm.com>
8343 Yufeng Zhang <yufeng.zhang@arm.com>
8344
8345 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8346 (aarch64.c, aarch64-without-fpu.c): New targets.
8347 * configure.srv (aarch64*-*-linux*): New.
8348 * linux-aarch64-low.c: New file.
8349
8350 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8351
8352 * linux-low.c (handle_extended_wait, linux_create_inferior)
8353 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8354 (dequeue_one_deferred_signal, linux_resume_one_thread)
8355 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8356 (linux_tracefork_grandchild, linux_test_for_tracefork)
8357 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8358 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8359 where the argument is 0.
8360
8361 2013-01-25 Yao Qi <yao@codesourcery.com>
8362
8363 * event-loop.c: Include "queue.h".
8364 (gdb_event_p): New typedef.
8365 (struct gdb_event) <next_event>: Remove.
8366 (event_queue): Change to QUEUE(gdb_event_p).
8367 (async_queue_event): Remove.
8368 (gdb_event_xfree): New.
8369 (initialize_event_loop): New.
8370 (process_event): Use API from QUEUE.
8371 (wait_for_event): Likewise.
8372 * server.c (main): Call initialize_event_loop.
8373 * server.h (initialize_event_loop): Declare.
8374
8375 2013-01-18 Yao Qi <yao@codesourcery.com>
8376
8377 * ax.h (struct eval_agent_expr_context): New.
8378 (gdb_eval_agent_expr): Update declaration.
8379 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8380 TFRAME. Add new argument CTX.
8381 * server.h (struct eval_agent_expr_context): Declare.
8382 (agent_mem_read, agent_tsv_read): Update declaration.
8383 (agent_mem_read_string): Likewise.
8384 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8385 (add_traceframe_block): Add new argument TPOINT.
8386 Increase TPOINT->traceframe_usage.
8387 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8388 eval_tracepoint_agent_expr.
8389 (condition_true_at_tracepoint): Likewise.
8390 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8391 (agent_mem_read_string, agent_tsv_read): Likewise.
8392
8393 2013-01-16 Yao Qi <yao@codesourcery.com>
8394
8395 * linux-low.c (linux_resume_one_lwp): Don't check
8396 'lwp->bp_reinsert != 0'.
8397
8398 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8399 Pedro Alves <palves@redhat.com>
8400
8401 * lynx-low.c (ptrace_request_to_str): Define a temporary
8402 macro and use it to simplify this function's implementation.
8403
8404 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8405
8406 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8407 sets errno.
8408
8409 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8410
8411 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8412
8413 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8414
8415 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8416
8417 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8418
8419 * lynx-low.c (lynx_resume): Use the resume_info parameter
8420 to determine the ptid for the lynx_ptrace call, unless
8421 it is equal to minus_one_ptid, in which case we use the
8422 ptid of the current_inferior.
8423 (lynx_wait_1): After having received a thread create/exit
8424 event, resume the inferior's execution using the signaling
8425 thread's ptid, rather than the old ptid.
8426
8427 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8428
8429 * lynx-low.c (lynx_resume): Delete variable ret.
8430
8431 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8432
8433 * gdbreplay.c (gdbreplay_version): Update copyright year.
8434 * server.c (gdbserver_version): Likewise.
8435
8436 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8437
8438 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8439 new thread.
8440
8441 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8442
8443 * lynx-low.c (ptrace_request_to_str): Add handling for
8444 PTRACE_GETTRACESIG.
8445
8446 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8447
8448 * lynx-low.c (lynx_attach): Delete variable new_process.
8449
8450 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8451
8452 * lynx-low.c (lynx_create_inferior): Delete variable
8453 new_process.
8454
8455 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8456
8457 * lynx-low.c (ptrace_request_to_str): Do not handle
8458 PTRACE_GETTHREADLIST if this macro does not exist.
8459
8460 2012-12-15 Yao Qi <yao@codesourcery.com>
8461
8462 * Makefile.in (OBS): Add notif.o.
8463 * notif.c, notif.h: New.
8464 * server.c: Include "notif.h".
8465 (struct vstop_notif) <next>: Remove.
8466 <base>: New field.
8467 (queue_stop_reply): Update.
8468 (push_event, send_next_stop_reply): Remove.
8469 (discard_queued_stop_replies): Update.
8470 (notif_stop): New variable.
8471 (handle_v_stopped): Remove.
8472 (handle_v_requests): Don't call handle_v_stopped. Call
8473 handle_ack_notif instead.
8474 (queue_stop_reply_callback): Call notif_event_enque instead
8475 of queue_stop_reply.
8476 (handle_status): Don't call send_next_stop_reply, call
8477 notif_write_event instead.
8478 (kill_inferior_callback): Likewise.
8479 (detach_or_kill_inferior_callback): Likewise.
8480 (main): Call initialize_notif.
8481 (process_serial_event): Call QUEUE_is_empty.
8482 (handle_target_event): Call notif_push instead of push event.
8483 * server.h (push_event): Remove declaration.
8484
8485 2012-12-10 Tom Tromey <tromey@redhat.com>
8486
8487 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8488 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8489 macros.
8490 (.c.o): Rewrite.
8491 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8492 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8493 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8494 (amd64-linux-ipa.o, ax.o): Rewrite.
8495 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8496 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8497 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8498 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8499 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8500 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8501 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8502 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8503 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8504 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8505 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8506 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8507 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8508 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8509 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8510 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8511 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8512 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8513 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8514 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8515 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8516 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8517 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8518 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8519 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8520 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8521 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8522 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8523 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8524 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8525 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8526 (reg-tilegx.o): Remove.
8527 (all_object_files): New macro.
8528 Include .deps files.
8529 * aclocal.m4, configure: Rebuild.
8530 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8531 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8532 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8533
8534 2012-12-05 Tom Tromey <tromey@redhat.com>
8535
8536 PR gdb/14917:
8537 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8538
8539 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8540
8541 * configure.ac: Check for linux/perf_event.h.
8542 * config.in: Regenerated.
8543 * configure: Regenerated.
8544
8545 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8546
8547 * hostio.c (handle_readlink): Decrease buffer size
8548 parameter passed to readlink by one byte.
8549
8550 2012-11-26 Yao Qi <yao@codesourcery.com>
8551
8552 * configure.ac (build_warnings): Append '-Wempty-body'.
8553 * configure: Regenerated.
8554 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8555 body.
8556
8557 2012-11-15 Pierre Muller <muller@sourceware.org>
8558
8559 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8560 * config.in: Regenerate.
8561 * configure: Regenerate.
8562 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8563 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8564 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8565 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8566 header.
8567 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8568 instead of <sys/wait.h> header.
8569 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8570
8571 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8572
8573 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8574 (various make rules): Remove -DGDBSERVER
8575
8576 2012-11-09 Yao Qi <yao@codesourcery.com>
8577
8578 * spu-low.c (current_ptid): Move it to ..
8579 * gdbthread.h: ... here. New.
8580 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8581 * server.c (myresume, process_serial_event): Likewise.
8582 * thread-db.c (thread_db_find_new_threads): Likewise.
8583 * tracepoint.c (run_inferior_command): Likewise.
8584
8585 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8586
8587 * server.c (handle_search_memory_1): Include access length in
8588 warning message.
8589
8590 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8591
8592 * linux-crisv32-low.c: Fix compile errors.
8593
8594 2012-09-04 Yao Qi <yao@codesourcery.com>
8595
8596 * tracepoint.c (cmd_qtsv): Adjust debug message.
8597 Don't check CUR_TPOINT.
8598
8599 2012-08-28 Yao Qi <yao@codesourcery.com>
8600
8601 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8602 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8603 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8604 Remove declarations of xmalloc, xreallloc, xstrdup and
8605 freeargv.
8606 * Makefile.in (libiberty_h): New.
8607 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8608 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8609
8610 2012-08-23 Yao Qi <yao@codesourcery.com>
8611
8612 * server.h: Remove declaration of 'xsnprintf'.
8613
8614 2012-08-22 Keith Seitz <keiths@redhat.com>
8615
8616 * server.h: Include build-gnulib-gbserver/config.h.
8617 * gdbreplay.c: Likewise.
8618
8619 2012-08-08 Doug Evans <dje@google.com>
8620
8621 * Makefile.in (SFILES): Add gdb_vecs.c.
8622 (OBS): Add gdb_vecs.o.
8623 (gdb_vecs_h, host_defs_h): New variables.
8624 (thread-db.o): Add $(gdb_vecs_h) dependency.
8625 (gdb_vecs.o): New rule.
8626 * thread-db.c: #include "gdb_vecs.h".
8627 (thread_db_load_search): Use a vector to iterate over path elements.
8628 Handle text appearing after "$pdir".
8629
8630 * configure.ac: Add check for strstr.
8631 * config.in: Regenerate.
8632 * configure: Regenerate.
8633
8634 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8635
8636 * hostio.c (handle_pread): If pread fails, fall back to attempting
8637 lseek/read.
8638 (handle_pwrite): Likewise for pwrite.
8639
8640 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8641
8642 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8643 between unsupported TYPE and unimplementable ADDR/LEN combination.
8644 (arm_insert_point): Act on new return value.
8645
8646 2012-07-31 Pedro Alves <palves@redhat.com>
8647
8648 * server.c (process_point_options): Only skip tokens if we find
8649 one that is unrecognized. Don't treat 'X' specially while
8650 skipping unrecognized tokens.
8651
8652 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8653
8654 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8655 to 4-byte-align HW breakpoint addresses for Thumb.
8656
8657 2012-07-27 Yao Qi <yao@codesourcery.com>
8658
8659 PR remote/14161.
8660
8661 * server.h: Declare gdb_agent_about_to_close.
8662 * target.c (kill_inferior): Include "agent.h".
8663 New. Send command 'kill'.
8664 * target.h (kill_inferior): Removed macro.
8665 * tracepoint.c (gdb_agent_about_to_close): New.
8666 (gdb_agent_helper_thread): Handle command 'close'.
8667 Wait endlessly until the inferior stops.
8668 Install gdb_agent_remove_socket to atexit hook.
8669 (agent_socket_name): New static variable.
8670 (gdb_agent_socket_init): Replace local variable 'name' with
8671 'agent_socket_name'.
8672 (gdb_agent_remove_socket): New.
8673
8674 2012-07-27 Yao Qi <yao@codesourcery.com>
8675
8676 * server.c (process_point_options): Stop at 'X' when parsing.
8677
8678 2012-07-19 Michael Eager <eager@eagercon.com>
8679
8680 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8681 to hw_execute.
8682 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8683 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8684 hardware breakpoint.
8685
8686 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8687
8688 * gdbserver/linux-low.c (initialize_low): Call
8689 linux_ptrace_init_warnings.
8690
8691 2012-07-02 Doug Evans <dje@google.com>
8692
8693 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8694 pointer to int.
8695
8696 2012-07-02 Stan Shebs <stan@codesourcery.com>
8697
8698 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8699 (ax.o): Add it to build rule.
8700 (ax-ipa.o): Ditto.
8701 (OBS): Add format.o.
8702 (IPA_OBS): Add format.o.
8703 * server.c (handle_query): Claim support for breakpoint commands.
8704 (process_point_options): Add command case.
8705 (process_serial_event): Leave running if there are printfs in
8706 effect.
8707 * mem-break.h (any_persistent_commands): Declare.
8708 (add_breakpoint_commands): Declare.
8709 (gdb_no_commands_at_breakpoint): Declare.
8710 (run_breakpoint_commands): Declare.
8711 * mem-break.c (struct point_command_list): New struct.
8712 (struct breakpoint): New field command_list.
8713 (any_persistent_commands): New function.
8714 (add_commands_to_breakpoint): New function.
8715 (add_breakpoint_commands): New function.
8716 (gdb_no_commands_at_breakpoint): New function.
8717 (run_breakpoint_commands): New function.
8718 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8719 locally.
8720 * ax.c: Include format.h.
8721 (ax_printf): New function.
8722 (gdb_eval_agent_expr): Add printf opcode.
8723
8724 2012-06-13 Yao Qi <yao@codesourcery.com>
8725
8726 * server.c (start_inferior): Remove duplicated writes to fields
8727 'last_resume_kind' and 'last_status' of 'current_inferior'.
8728
8729 2012-06-12 Yao Qi <yao@codesourcery.com>
8730 Pedro Alves <palves@redhat.com>
8731
8732 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8733 comment.
8734 * server.c (handle_v_cont): Extend comment.
8735
8736 2012-06-11 Yao Qi <yao@codesourcery.com>
8737
8738 * linux-low.c (linux_attach): Add 'static'.
8739
8740 2012-06-06 Yao Qi <yao@codesourcery.com>
8741
8742 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8743
8744 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8745
8746 Fix gcc -flto compilation warning.
8747 * server.c (main): Make variable multi_mode and attach volatile.
8748
8749 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8750
8751 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8752 if the platform doesn't know about it.
8753
8754 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8755
8756 * Makefile.in (SFILES): Add linux-tile-low.c.
8757 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8758 * configure.srv: Handle tilegx-*-linux*.
8759 * linux-tile-low.c: New file.
8760
8761 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8762
8763 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8764
8765 2012-05-24 Pedro Alves <palves@redhat.com>
8766
8767 PR gdb/7205
8768
8769 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8770
8771 2012-05-24 Pedro Alves <palves@redhat.com>
8772
8773 PR gdb/7205
8774
8775 Replace target_signal with gdb_signal throughout.
8776
8777 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8778
8779 * linux-low.c (linux_store_registers): Avoid the copying sequence
8780 when no data has been retrieved by ptrace.
8781
8782 2012-05-22 Will Deacon <will.deacon@arm.com>
8783
8784 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8785 Include asm/ptrace.h.
8786 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8787 already defined.
8788
8789 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8790
8791 * linux-low.c (linux_store_registers): Don't re-retrieve data
8792 with ptrace that has already been obtained from /proc. Always
8793 copy any data retrieved with ptrace to the buffer supplied.
8794
8795 2012-05-11 Yao Qi <yao@codesourcery.com>
8796 Pedro Alves <palves@redhat.com>
8797
8798 * linux-low.c (enum stopping_threads_kind): New.
8799 (stopping_threads): Change type to `enum stopping_threads_kind'.
8800 (handle_extended_wait): If stopping and suspending threads, leave
8801 the new_lwp suspended too.
8802 (linux_wait_for_event): Adjust.
8803 (stop_all_lwps): Set `stopping_threads' to
8804 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8805 whether we're suspending threads or just stopping them. Assert no
8806 recursion happens.
8807
8808 2012-04-29 Yao Qi <yao@codesourcery.com>
8809
8810 * server.h: Move some code to ...
8811 * gdbthread.h: ... here. New.
8812 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8813 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8814 (nto-low.o, win32-low.o): Likewise.
8815 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8816 * regcache.c, remote-utils.c, server.c: Likewise.
8817 * target.c, tracepoint.c, win32-low.c: Likewise.
8818
8819 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8820
8821 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8822 (PTRACE_ARG4_TYPE): Likewise.
8823 (PTRACE_XFER_TYPE): Likewise.
8824 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8825 ptrace to PTRACE_ARG3_TYPE.
8826 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8827 (PTRACE_ARG4_TYPE): Likewise.
8828 (PTRACE_XFER_TYPE): Likewise.
8829 (linux_detach_one_lwp): Cast fourth argument of
8830 ptrace to long then PTRACE_ARG4_TYPE.
8831 (regsets_fetch_inferior_registers): Cast third argument of
8832 ptrace to long then PTRACE_ARG3_TYPE.
8833 (regsets_store_inferior_registers): Likewise.
8834
8835 2012-04-20 Pedro Alves <palves@redhat.com>
8836
8837 * configure: Regenerate.
8838
8839 2012-04-19 Pedro Alves <palves@redhat.com>
8840
8841 * Makefile.in (GNULIB_BUILDDIR): New.
8842 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8843 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8844 (all, install-only, uninstall, clean-info, all-lib, clean): No
8845 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8846 (maintainer-clean realclean distclean): Use subdir_do.
8847 (subdir_do): New.
8848 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8849 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8850 * acinclude.m4: Include acx_configure_dir.m4.
8851 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8852 calls. Call AC_PROG_RANLIB. Configure gnulib using
8853 ACX_CONFIGURE_DIR.
8854 (GNULIB): New.
8855 (GNULIB_STDINT_H): Adjust.
8856 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8857 * gdbreplay.c: Include build-gnulib/config.h.
8858 * server.h: Likewise.
8859 * aclocal.m4: Regenerate.
8860 * config.in: Regenerate.
8861 * configure: Regenerate.
8862
8863 2012-04-19 Pedro Alves <palves@redhat.com>
8864
8865 * Makefile.in (LIBGNU, INCGNU): Adjust.
8866 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8867 (all, install-only, uninstall, clean-info, all-lib, clean)
8868 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8869 * configure.ac: Adjust AC_OUTPUT output.
8870 * aclocal.m4: Regenerate.
8871 * configure: Regenerate.
8872
8873 2012-04-19 Pedro Alves <palves@redhat.com>
8874
8875 * Makefile.in (generated_files): New.
8876 (server_h): Remove the explicit dependency on config.h, and depend
8877 on $generated_files.
8878
8879 2012-04-19 Pedro Alves <palves@redhat.com>
8880
8881 * Makefile.in (INCGNU): Add -Ignulib.
8882
8883 2012-04-19 Pedro Alves <palves@redhat.com>
8884
8885 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8886 (INCGNU): ... this, and spell out -I here.
8887 (GNULIB_LIB): Rename to ...
8888 (LIBGNU): ... this.
8889 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8890
8891 2012-04-19 Pedro Alves <palves@redhat.com>
8892
8893 * config.in: Regenerate.
8894
8895 2012-04-19 Pedro Alves <palves@redhat.com>
8896
8897 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8898 * server.h (memmem): Remove declaration.
8899 * config.in: Regenerate.
8900 * configure: Regenerate.
8901
8902 2012-04-19 Yao Qi <yao@codesourcery.com>
8903
8904 * Makefile.in (SFILES): Add common/vec.c.
8905 (OBS): Add vec.o.
8906 (vec.o): New rule.
8907
8908 2012-04-19 Yao Qi <yao@codesourcery.com>
8909
8910 * remote-utils.c (prepare_resume_reply): Replace with macro
8911 target_core_of_thread.
8912 * server.c (handle_qxfer_threads_proper): Likewise.
8913 * target.h (traget_core_of_thread): New macro.
8914
8915 2012-04-18 Pedro Alves <palves@redhat.com>
8916
8917 * aclocal.m4: Regenerate.
8918 * configure: Regenerate.
8919
8920 2012-04-16 Yao Qi <yao@codesourcery.com>
8921
8922 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8923 duplicated on address.
8924
8925 2012-04-16 Yao Qi <yao@codesourcery.com>
8926
8927 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8928 (struct tracepoint_action_ops) <send>: New field.
8929 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8930 (agent_expr_send, x_tracepoint_action_send): New.
8931 (l_tracepoint_action_send): New.
8932 (cmd_qtdp): Download and install tracepoint
8933 according to `use_agent'.
8934 (run_inferior_command): Add one more parameter `len'.
8935 Update callers.
8936 (tracepoint_send_agent): New.
8937 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8938
8939 2012-04-16 Yao Qi <yao@codesourcery.com>
8940
8941 * tracepoint.c (download_tracepoints): Moved to ...
8942 (cmd_qtstart): ... here.
8943
8944 2012-04-14 Yao Qi <yao@codesourcery.com>
8945
8946 * tracepoint.c: Include inttypes.h.
8947 (struct collect_memory_action): Use sized types.
8948 (struct tracepoint): Likewise.
8949 (cmd_qtdp, stop_tracing): Update print specifiers.
8950 (cmd_qtp, response_tracepoint): Likewise.
8951 (collect_data_at_tracepoint): Likewise.
8952 (collect_data_at_step): Likewise.
8953
8954 2012-04-14 Yao Qi <yao@codesourcery.com>
8955
8956 Import gnulib module inttypes.
8957 * aclocal.m4, config.in, configure: Regenerated.
8958
8959 2012-04-14 Yao Qi <yao@codesourcery.com>
8960
8961 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8962 Makefile and config.status at last.
8963
8964 2012-04-13 Yao Qi <yao@codesourcery.com>
8965
8966 * tracepoint.c: Include stdint.h unconditionally.
8967
8968 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8969
8970 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8971 on BFD_HAVE_SYS_PROCFS_TYPE.
8972 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8973 * configure: Regenerate.
8974 * config.in: Likewise.
8975
8976 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8977
8978 * Makefile.in (clean): Also remove x32.c x32-linux.c
8979 x32-avx.c x32-avx-linux.c.
8980 (x32.o): New target.
8981 (x32.c): Likewise.
8982 (x32-linux.o): Likewise.
8983 (x32-linux.c): Likewise.
8984 (x32-avx.o): Likewise.
8985 (x32-avx.c): Likewise.
8986 (x32-avx-linux.o): Likewise.
8987 (x32-avx-linux.c): Likewise.
8988
8989 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8990 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8991 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8992 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8993 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8994 i386/x32-avx-linux.xml.
8995
8996 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8997 (init_registers_x32_avx_linux): Likwise.
8998 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8999 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9000
9001 2012-04-13 Pedro Alves <palves@redhat.com>
9002
9003 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9004 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9005 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9006 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9007 the sub-make.
9008
9009 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9010
9011 * linux-x86-low.c (compat_x32_clock_t): New.
9012 (compat_x32_siginfo_t): Likewise.
9013 (compat_x32_siginfo_from_siginfo): Likewise.
9014 (siginfo_from_compat_x32_siginfo): Likewise.
9015 (linux_is_elf64): Likewise.
9016 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9017 and siginfo_from_compat_x32_siginfo for x32.
9018 (x86_arch_setup): Set linux_is_elf64.
9019
9020 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9021
9022 PR gdb/13969
9023 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9024 e_machine field.
9025 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9026 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9027 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9028 compatible with process.
9029
9030 2012-04-12 Yao Qi <yao@codesourcery.com>
9031
9032 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9033 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9034 (install-only, install-info, clean): Handle sub dir gnulib.
9035 (all-lib, am--refresh): New targets.
9036 (memmem.o): Remove target.
9037 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9038 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9039 (AC_REPLACE_FUNCS): Remove memmem.
9040 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9041 (AC_OUTPUT): Generate Makefile in gnulib/.
9042 * aclocal.m4, config.in, configure: Regenerated.
9043
9044 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9045
9046 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9047
9048 2012-04-05 Pedro Alves <palves@redhat.com>
9049
9050 -Werror=strict-aliasing
9051
9052 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9053 pointer.
9054
9055 2012-04-04 Pedro Alves <palves@redhat.com>
9056
9057 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9058 (sparc_store_gregset_from_stack, sparc_store_gregset)
9059 (sparc_breakpoint_at): Fix formatting.
9060
9061 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9062
9063 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9064 are available.
9065 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9066 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9067 * config.in: Regenerate.
9068 * configure: Likewise.
9069
9070 2012-03-29 Pedro Alves <palves@redhat.com>
9071
9072 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9073 Correct ptrace arguments.
9074
9075 2012-03-28 Pedro Alves <palves@redhat.com>
9076
9077 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9078 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9079 (IA64_FR1_REGNUM): New defines.
9080 (ia64_fetch_register): New.
9081 (the_low_target): Install it.
9082 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9083 field.
9084 * linux-low.c (linux_fetch_registers): Try the
9085 the_low_target.fetch_register hook first.
9086
9087 * linux-arm-low.c (the_low_target): Adjust.
9088 * linux-bfin-low.c (the_low_target): Adjust.
9089 * linux-cris-low.c (the_low_target): Adjust.
9090 * linux-crisv32-low.c (the_low_target): Adjust.
9091 * linux-m32r-low.c (the_low_target): Adjust.
9092 * linux-m68k-low.c (the_low_target): Adjust.
9093 * linux-mips-low.c (the_low_target): Adjust.
9094 * linux-ppc-low.c (the_low_target): Adjust.
9095 * linux-s390-low.c (the_low_target): Adjust.
9096 * linux-sh-low.c (the_low_target): Adjust.
9097 * linux-sparc-low.c (the_low_target): Adjust.
9098 * linux-tic6x-low.c (the_low_target): Adjust.
9099 * linux-x86-low.c (the_low_target): Adjust.
9100 * linux-xtensa-low.c (the_low_target): Adjust.
9101
9102 2012-03-26 Pedro Alves <palves@redhat.com>
9103
9104 * server.c (handle_qxfer_libraries): Don't bail early if
9105 the_target->qxfer_libraries_svr4 is not NULL.
9106
9107 2012-03-26 Pedro Alves <palves@redhat.com>
9108
9109 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9110
9111 2012-03-23 Pedro Alves <palves@redhat.com>
9112
9113 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9114 "library-list-svr4" element's start tag when the the DSO list is
9115 empty.
9116
9117 2012-03-23 Pedro Alves <palves@redhat.com>
9118
9119 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9120 a variable whose type size is the same as the inferior's pointer
9121 size.
9122
9123 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9124
9125 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9126 struct siginfo.
9127 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9128 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9129 * linux-low.h: Include <signal.h>.
9130 (struct siginfo): Remove forward declaration.
9131 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9132 struct siginfo.
9133
9134 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9135
9136 * .gitignore: Ignore more files.
9137
9138 2012-03-19 Pedro Alves <palves@redhat.com>
9139 Jan Kratochvil <jan.kratochvil@redhat.com>
9140
9141 * server.c (cont_thread, general_thread): Add describing comments.
9142 (start_inferior): Clear `cont_thread'.
9143 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9144 of a process.
9145
9146 2012-03-15 Yao Qi <yao@codesourcery.com>
9147
9148 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9149 handling to ...
9150 (cmd_qtdp): ... here.
9151
9152 2012-03-15 Yao Qi <yao@codesourcery.com>
9153
9154 * tracepoint.c (struct tracepoint_action_ops): New.
9155 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9156 (m_tracepoint_action_download): New.
9157 (r_tracepoint_action_download): New.
9158 (x_tracepoint_action_download): New.
9159 (l_tracepoint_action_download): New.
9160 (add_tracepoint_action): Install `action->ops' according type.
9161 (download_tracepoint_1): Move code `download' function pointer
9162 of various tracepoint_action_ops.
9163
9164 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9165
9166 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9167 linux_ptrace_attach_warnings.
9168
9169 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9170
9171 * Makefile.in (linux-ptrace.o): New.
9172 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9173 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9174 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9175 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9176 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9177 of these targets.
9178 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9179
9180 2012-03-08 Yao Qi <yao@codesourcery.com>
9181 Pedro Alves <palves@redhat.com>
9182
9183 Fix PR server/13392.
9184 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9185 offset of JMP insn.
9186 * tracepoint.c (remove_tracepoint): New.
9187 (cmd_qtdp): Call remove_tracepoint when failed to install.
9188
9189 2012-03-07 Pedro Alves <palves@redhat.com>
9190
9191 * linux-low.c (get_detach_signal): New.
9192 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9193 Pass on pending signals to PTRACE_DETACH. Check the result of the
9194 ptrace call.
9195 * server.c (program_signals, program_signals_p): New.
9196 (handle_general_set): Handle QProgramSignals.
9197 * server.h (program_signals, program_signals_p): Declare.
9198
9199 2012-03-05 Pedro Alves <palves@redhat.com>
9200 Jan Kratochvil <jan.kratochvil@redhat.com>
9201
9202 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9203 New comment why.
9204
9205 2012-03-03 Yao Qi <yao@codesourcery.com>
9206
9207 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9208 agent_look_up_symbols.
9209
9210 2012-03-03 Yao Qi <yao@codesourcery.com>
9211
9212 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9213 (linux-x86-low.o): Likewise.
9214 * server.h: Remove in_process_agent_loaded.
9215 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9216 common/agent.c.
9217 Update callers.
9218
9219 2012-03-03 Yao Qi <yao@codesourcery.com>
9220
9221 * tracepoint.c (gdb_agent_capability): New global.
9222 (in_process_agent_loaded_ust): Renamed to
9223 `in_process_agent_supports_ust'.
9224 Update callers.
9225 (in_process_agent_supports_ust): Call agent_capability_check.
9226 (clear_installed_tracepoints): Assert that agent supports
9227 agent.
9228
9229 2012-03-03 Yao Qi <yao@codesourcery.com>
9230
9231 * linux-low.c (linux_supports_agent): New.
9232 (linux_target_ops): Initialize field `supports_agent' with
9233 linux_supports_agent.
9234 * target.h (struct target_ops) <supports_agent>: New.
9235 (target_supports_agent): New macro.
9236 * server.c (handle_general_set): Handle packet 'QAgent'.
9237 (handle_query): Send `QAgent+'.
9238 * Makefile.in (server.o): Depends on agent.h.
9239
9240 2012-03-03 Yao Qi <yao@codesourcery.com>
9241
9242 * Makefile.in (OBS): Add agent.o.
9243 Add new rule for agent.o.
9244 Track dependence of tracepoint.c on agent.h.
9245 * tracepoint.c (run_inferior_command_1):
9246 (run_inferior_command): Call agent_run_command.
9247 (gdb_ust_connect_sync_socket): Deleted. Move it to
9248 common/agent.c.
9249 (resume_thread, stop_thread): Likewise.
9250 (gdb_ust_socket_init): Renamed to ...
9251 (gdb_agent_socket_init): ... New.
9252 (gdb_ust_thread): Renamed to ...
9253 (gdb_agent_helper_thread): ... New.
9254 (gdb_ust_init): Move some code to ...
9255 (gdb_agent_init): ... here. New.
9256 [HAVE_UST]: Call gdb_ust_init.
9257 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9258 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9259 * config.in, configure: Regenerated.
9260
9261 2012-03-02 Pedro Alves <palves@redhat.com>
9262
9263 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9264 * linux-low.c (struct simple_pid_list): New.
9265 (stopped_pids): New a struct simple_pid_list pointer.
9266 (add_to_pid_list, pull_pid_from_list): New.
9267 (handle_extended_wait): Don't assume the first signal new children
9268 report is SIGSTOP. Adjust call to pull_pid_from_list.
9269 (linux_wait_for_lwp): Adjust.
9270
9271 2012-03-02 Yao Qi <yao@codesourcery.com>
9272
9273 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9274 debug log.
9275
9276 2012-03-02 Yao Qi <yao@codesourcery.com>
9277
9278 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9279 `stop_pc' and `tpoint'. Update caller.
9280
9281 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9282
9283 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9284 * linux-low.c (use_linux_regsets): New macro.
9285 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9286 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9287 (linux_register_in_regsets): New function.
9288 (usr_fetch_inferior_registers): Skip registers covered by
9289 regsets.
9290 (usr_store_inferior_registers): Likewise.
9291 (usr_fetch_inferior_registers): New macro.
9292 (usr_store_inferior_registers): Likewise.
9293 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9294 (linux_store_registers): Likewise.
9295 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9296 prototype.
9297 (init_registers_mips64_dsp_linux): Likewise.
9298 (init_registers_mips_linux): New macro.
9299 (init_registers_mips_dsp_linux): Likewise.
9300 (mips_dsp_num_regs): Likewise.
9301 (DSP_BASE, DSP_CONTROL): New fallback macros.
9302 (mips_base_regs): New macro.
9303 (mips_regmap): Use it. Fix the size.
9304 (mips_dsp_regmap): New variable.
9305 (mips_dsp_regset_bitmap): Likewise.
9306 (mips_arch_setup): New function.
9307 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9308 than mips_regmap.
9309 (mips_cannot_store_register): Likewise.
9310 (the_low_target): Update .arch_setup, .num_regs and .regmap
9311 initializers. Add .regset_bitmap initializer.
9312 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9313 initializer.
9314 * linux-bfin-low.c (the_low_target): Likewise.
9315 * linux-cris-low.c (the_low_target): Likewise.
9316 * linux-crisv32-low.c (the_low_target): Likewise.
9317 * linux-ia64-low.c (the_low_target): Likewise.
9318 * linux-m32r-low.c (the_low_target): Likewise.
9319 * linux-m68k-low.c (the_low_target): Likewise.
9320 * linux-ppc-low.c (the_low_target): Likewise.
9321 * linux-s390-low.c (the_low_target): Likewise.
9322 * linux-sh-low.c (the_low_target): Likewise.
9323 * linux-sparc-low.c (the_low_target): Likewise.
9324 * linux-tic6x-low.c (the_low_target): Likewise.
9325 * linux-x86-low.c (the_low_target): Likewise.
9326 * linux-xtensa-low.c (the_low_target): Likewise.
9327 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9328 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9329 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9330 srv_xmlfiles.
9331 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9332 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9333
9334 2012-02-29 Yao Qi <yao@codesourcery.com>
9335 Pedro Alves <palves@redhat.com>
9336
9337 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9338 `step_over_finished' is true.
9339
9340 2012-02-27 Pedro Alves <palves@redhat.com>
9341
9342 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9343 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9344
9345 2012-02-27 Pedro Alves <palves@redhat.com>
9346
9347 PR server/9684
9348 * linux-low.c (pid_is_stopped): New.
9349 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9350
9351 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9352
9353 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9354 of conditions.
9355
9356 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9357
9358 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9359
9360 2012-02-24 Luis Machado <lgustavo@codesourcery>
9361
9362 * server.c (handle_query): Advertise support for target-side
9363 breakpoint condition evaluation.
9364 (process_point_options): New function.
9365 (process_serial_event): When inserting a breakpoint, check for
9366 a target-side condition that should be evaluated.
9367
9368 * mem-break.c: Include regcache.h and ax.h.
9369 (point_cond_list_t): New data structure.
9370 (breakpoint) <cond_list>: New field.
9371 (find_gdb_breakpoint_at): Make non-static.
9372 (delete_gdb_breakpoint_at): Clear any target-side
9373 conditions.
9374 (clear_gdb_breakpoint_conditions): New function.
9375 (add_condition_to_breakpoint): Likewise.
9376 (add_breakpoint_condition): Likewise.
9377 (gdb_condition_true_at_breakpoint): Likewise.
9378 (gdb_breakpoint_here): Return result directly instead
9379 of going through a local variable.
9380
9381 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9382 (clear_gdb_breakpoint_conditions): Likewise.
9383 (add_breakpoint_condition): Likewise.
9384 (gdb_condition_true_at_breakpoint): Likewise.
9385
9386 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9387 (need_step_over_p): Take target-side breakpoint condition into
9388 consideration.
9389
9390 2012-02-24 Luis Machado <lgustavo@codesourcery>
9391
9392 * server.h: Include tracepoint.h.
9393 (agent_mem_read, agent_get_trace_state_variable_value,
9394 agent_set_trace_state_variable_value,
9395 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9396 get_set_tsv_func_addr): New prototypes.
9397
9398 * ax.h: New include file.
9399 * ax.c: New source file.
9400
9401 * tracepoint.c: Include ax.h.
9402 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9403 agent_expr, eval_result_type): Move to ax.h.
9404 (parse_agent_expr): Rename to ...
9405 (gdb_parse_agent_expr): ... this, make it non-static and move
9406 to ax.h.
9407 (unparse_agent_expr) Rename to ...
9408 (gdb_unparse_agent_expr): ... this, make it non-static and move
9409 to ax.h.
9410 (eval_agent_expr): Rename to ...
9411 (eval_tracepoint_agent_expr): ... this.
9412 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9413 forward declarations.
9414 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9415 (agent_get_trace_state_variable_value): New function.
9416 (agent_set_trace_state_variable_value): New function.
9417 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9418 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9419 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9420 (condition_true_at_tracepoint): Likewise.
9421 (parse_agent_expr): Rename to ...
9422 (gdb_parse_agent_expr): ... this and move to ax.c.
9423 (unparse_agent_expr): Rename to ...
9424 (gdb_unparse_agent_expr): ... this and move to ax.c.
9425 (gdb_agent_op_name): Move to ax.c.
9426 (eval_agent_expr): Rename to ...
9427 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9428 and move to ax.c.
9429 (eval_tracepoint_agent_expr): New function.
9430 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9431 non-static.
9432 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9433 ax.c.
9434 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9435 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9436 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9437 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9438 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9439 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9440 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9441 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9442 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9443 (compile_bytecodes): Remove forward declaration.
9444 (is_goto_target): Move to ax.c.
9445 (compile_bytecodes): Move to ax.c and call
9446 agent_get_trace_state_variable_value (...) and
9447 agent_set_trace_state_variable_value (...).
9448
9449 * Makefile.in: Update ax.c and IPA dependencies.
9450
9451 2012-02-24 Pedro Alves <palves@redhat.com>
9452
9453 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9454 (cmd_bigqtbuffer_circular): ... this. Only handle
9455 'QTBuffer:circular:'.
9456 (handle_tracepoint_general_set): Adjust.
9457
9458 2012-02-16 Yao Qi <yao@codesourcery.com>
9459
9460 * inferiors.c: Move code to ...
9461 * dll.c: .... here. New.
9462 * server.h: Declare clear_dlls.
9463 * Makefile.in (SFILES): Add dll.c.
9464 (OBS): Add dll.o
9465 (dll.o): New rule.
9466
9467 2012-02-11 Yao Qi <yao@codesourcery.com>
9468
9469 * server.c: (handle_monitor_command): Add a new parameter
9470 `own_buf'.
9471 (handle_query): Update caller.
9472
9473 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9474
9475 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9476 * configure, config.in: Regenerate.
9477 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9478 is not defined.
9479
9480 2012-02-02 Pedro Alves <palves@redhat.com>
9481
9482 Try SIGKILL first, then PTRACE_KILL.
9483 * linux-low.c (linux_kill_one_lwp): New.
9484 (linux_kill_one_lwp): Rename to ...
9485 (kill_one_lwp_callback): ... this. Use the new
9486 linux_kill_one_lwp.
9487
9488 2012-02-02 Pedro Alves <palves@redhat.com>
9489
9490 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9491 inferior.
9492
9493 2012-01-27 Pedro Alves <palves@redhat.com>
9494
9495 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9496 (elf_64_file_p): Make static.
9497 (linux_pid_exe_is_elf_64_file): New.
9498 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9499 Delete declarations.
9500 (linux_pid_exe_is_elf_64_file): Declare.
9501 * linux-x86-low.c (x86_arch_setup): Use
9502 linux_pid_exe_is_elf_64_file.
9503
9504 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9505
9506 * linux-low.c (linux_wait_for_event_1): Rename to ...
9507 (linux_wait_for_event): ... here and merge it with former
9508 linux_wait_for_event - new variable wait_ptid, use it.
9509 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9510
9511 2012-01-23 Pedro Alves <palves@redhat.com>
9512
9513 * server.c (main): Avoid yet another case of infinite loop while
9514 detaching/killing after a longjmp.
9515
9516 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9517
9518 Code cleanup.
9519 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9520
9521 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9522
9523 * hostio.c (handle_readlink): New function.
9524 (handle_vFile): Call it to handle "vFile:readlink" packets.
9525
9526 2012-01-20 Pedro Alves <palves@redhat.com>
9527 Ulrich Weigand <ulrich.weigand@linaro.org>
9528
9529 * server.c (handle_v_requests): Only support vAttach and vRun to
9530 start multiple processes when in extended protocol mode.
9531
9532 2012-01-17 Pedro Alves <palves@redhat.com>
9533
9534 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9535 memalign plus mprotect to allocate the scratch buffer.
9536
9537 2012-01-13 Pedro Alves <palves@redhat.com>
9538
9539 * server.c (attach_inferior): Clear `cont_thread'.
9540
9541 2012-01-13 Pedro Alves <palves@redhat.com>
9542
9543 * server.c (main): Avoid infinite loop while detaching/killing
9544 after a longjmp.
9545
9546 2012-01-09 Doug Evans <dje@google.com>
9547
9548 * server.c (start_inferior): Set last_ptid in --wrapper case.
9549
9550 2012-01-06 Yao Qi <yao@codesourcery.com>
9551
9552 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9553 defined.
9554 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9555
9556 2012-01-04 Yao Qi <yao@codesourcery.com>
9557
9558 * tracepoint.c (cmd_qtdp): Print debug message
9559 for static tracepoint.
9560
9561 2012-01-04 Yao Qi <yao@codesourcery.com>
9562
9563 * tracepoint.c (trace_vdebug): Differentiate debug message
9564 between gdbserver and IPA.
9565
9566 2012-01-03 Yao Qi <yao@codesourcery.com>
9567
9568 * tracepoint.c (tracepoint_was_hit): Don't collect for
9569 static tracepoint.
9570
9571 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9572
9573 * terminal.h: Reformat copyright header.
9574
9575 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9576
9577 * server.c (gdbserver_version): Update copyright year.
9578 * gdbreplay.c (gdbreplay_version): Likewise.
9579
9580 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9581
9582 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9583
9584 Revert:
9585 2011-12-18 Hui Zhu <teawater@gmail.com>
9586 * linux-low.c (linux_create_inferior): Save return value to ret.
9587
9588 2011-12-18 Hui Zhu <teawater@gmail.com>
9589
9590 * linux-low.c (linux_create_inferior): Save return value to ret.
9591
9592 2011-12-16 Doug Evans <dje@google.com>
9593
9594 * linux-low.c (linux_create_inferior): If stdio connection,
9595 redirect stdin from /dev/null, stdout to stderr.
9596 * remote-utils.c (remote_is_stdio): New static global.
9597 (remote_connection_is_stdio): New function.
9598 (remote_prepare): Handle stdio connection.
9599 (remote_open): Ditto.
9600 (remote_close): Don't close stdin for stdio connections.
9601 (read_prim,write_prim): New functions. Replace all calls to
9602 read/write to these.
9603 * server.c (main): Watch for "-" argument. Move call to
9604 remote_prepare before start_inferior.
9605 * server.h (STDIO_CONNECTION_NAME): New macro.
9606 (remote_connection_is_stdio): Declare.
9607
9608 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9609 in debugging output.
9610
9611 2011-12-15 Yao Qi <yao@codesourcery.com>
9612
9613 * tracepoint.c: Include sys/syscall.h.
9614 (gdb_ust_thread): Remove preprocessor conditional.
9615
9616 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9617
9618 * linux-low.c (linux_detach_one_lwp): Call
9619 the_low_target.prepare_to_resume before detaching.
9620
9621 2011-12-14 Yao Qi <yao@codesourcery.com>
9622
9623 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9624 of write.
9625
9626 2011-12-14 Yao Qi <yao@codesourcery.com>
9627
9628 * i386-low.c (i386_low_stopped_data_address): Initialize local
9629 variable `control'.
9630
9631 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9632
9633 PR remote/13492
9634
9635 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9636 DR_CONTROL unless necessary. Extend comments.
9637 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9638 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9639
9640 2011-12-13 Yao Qi <yao@codesourcery.com>
9641
9642 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9643 macros.
9644 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9645
9646 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9647
9648 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9649 Print new debug message for such case.
9650
9651 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9652
9653 Fix overlapping memcpy.
9654 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9655 the read_inferior_memory transfer.
9656 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9657 write_inferior_memory transfer.
9658 (set_fast_tracepoint_jump): New variable buf. Use it for the
9659 read_inferior_memory and write_inferior_memory transfers.
9660 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9661 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9662 Use it for the write_inferior_memory transfer.
9663 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9664 buffers.
9665
9666 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9667
9668 * linux-low.c (fetch_register, store_register): Make code
9669 consistent, fix formatting.
9670
9671 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9672
9673 * linux-low.c (usr_store_inferior_registers): Factor out code
9674 to handle individual registers into...
9675 (store_register): ... this new function.
9676
9677 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9678
9679 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9680 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9681 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9682 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9683 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9684 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9685 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9686 (srv_xmlfiles): Add new XML files.
9687
9688 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9689 and <sys/uio.h>.
9690 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9691 (init_registers_s390_linux32v1): Add prototype.
9692 (init_registers_s390_linux32v2): Likewise.
9693 (init_registers_s390_linux64v1): Likewise.
9694 (init_registers_s390_linux64v2): Likewise.
9695 (init_registers_s390x_linux64v1): Likewise.
9696 (init_registers_s390x_linux64v2): Likewise.
9697 (s390_num_regs): Increment to 52.
9698 (s390_regmap): Add orig_r2 register.
9699 (s390_num_regs_3264): Increment to 68.
9700 (s390_regmap_3264): Add orig_r2 register.
9701 (s390_collect_ptrace_register): Handle orig_r2 register.
9702 (s390_supply_ptrace_register): Likewise.
9703 (s390_fill_last_break): New function.
9704 (s390_store_last_break): Likewise.
9705 (s390_fill_system_call): New function.
9706 (s390_store_system_call): Likewise.
9707 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9708 register sets.
9709 (s390_check_regset): New function.
9710 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9711 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9712 Update target_regsets for available register sets.
9713
9714 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9715 Jan Kratochvil <jan.kratochvil@redhat.com>
9716
9717 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9718 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9719 New.
9720 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9721 * linux-low.h (struct process_info_private): New member r_debug.
9722 * server.c (handle_qxfer_libraries): Call
9723 the_target->qxfer_libraries_svr4.
9724 (handle_qxfer_libraries_svr4): New function.
9725 (qxfer_packets): New entry "libraries-svr4".
9726 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9727 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9728 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9729 PACKET_qXfer_libraries_svr4.
9730
9731 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9732
9733 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9734 PSW address/mask between 8-byte and 16-byte formats.
9735 (s390_supply_ptrace_register): Likewise.
9736 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9737 basic addressing mode bit.
9738
9739 2011-11-24 Stan Shebs <stan@codesourcery.com>
9740
9741 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9742
9743 2011-11-17 Stan Shebs <stan@codesourcery.com>
9744
9745 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9746 (tracing_start_time): New global.
9747 (tracing_stop_time): New global.
9748 (tracing_user_name): New global.
9749 (tracing_notes): New global.
9750 (tracing_stop_note): New global.
9751 (cmd_qtstart): Set traceframe_usage, start_time.
9752 (stop_tracing): Set stop_time.
9753 (cmd_qtstatus): Report additional status.
9754 (cmd_qtp): New function.
9755 (handle_tracepoint_query): Call it.
9756 (cmd_qtnotes): New function.
9757 (handle_tracepoint_general_set): Call it.
9758 (get_timestamp): Rename from tsv_get_timestamp.
9759
9760 2011-11-14 Stan Shebs <stan@codesourcery.com>
9761 Kwok Cheung Yeung <kcy@codesourcery.com>
9762
9763 * linux-x86-low.c (small_jump_insn): New.
9764 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9765 trampoline and error message, build a trampoline and issue a small
9766 jump instruction to it.
9767 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9768 trampoline and error message.
9769 (x86_get_min_fast_tracepoint_insn_len): New.
9770 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9771 * linux-low.h (struct linux_target_ops): Add arguments to
9772 install_fast_tracepoint_jump_pad operation, add new operation.
9773 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9774 arguments.
9775 (linux_get_min_fast_tracepoint_insn_len): New function.
9776 (linux_target_op): Add new operation.
9777 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9778 (gdb_trampoline_buffer_end): Ditto.
9779 (gdb_trampoline_buffer_error): Ditto.
9780 (struct ipa_sym_addresses): Add fields for new IPA variables.
9781 (symbol_list): Add entries for new IPA variables.
9782 (struct tracepoint): Add fields to hold the address range of the
9783 trampoline used by the tracepoint.
9784 (trampoline_buffer_head): New static variable.
9785 (trampoline_buffer_tail): Ditto.
9786 (claim_trampoline_space): New function.
9787 (have_fast_tracepoint_trampoline_buffer): New function.
9788 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9789 structure.
9790 (install_fast_tracepoint): Ditto, also add error buffer argument.
9791 (cmd_qtminftpilen): New function.
9792 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9793 (fast_tracepoint_from_trampoline_address): New function.
9794 (fast_tracepoint_collecting): Handle trampoline as part of jump
9795 pad space.
9796 (set_trampoline_buffer_space): New function.
9797 (initialize_tracepoint): Initialize new IPA variables.
9798 * target.h (struct target_ops): Add arguments to
9799 install_fast_tracepoint_jump_pad operation, add new
9800 get_min_fast_tracepoint_insn_len operation.
9801 (target_get_min_fast_tracepoint_insn_len): New.
9802 (install_fast_tracepoint_jump_pad): Add arguments.
9803 * server.h (IPA_BUFSIZ): Define.
9804 * linux-i386-ipa.c: Include extra header files.
9805 (initialize_fast_tracepoint_trampoline_buffer): New function.
9806 (initialize_low_tracepoint): Call it.
9807 * server.h (set_trampoline_buffer_space): Declare.
9808 (claim_trampoline_space): Ditto.
9809 (have_fast_tracepoint_trampoline_buffer): Ditto.
9810
9811 2011-11-14 Yao Qi <yao@codesourcery.com>
9812
9813 * server.c (handle_query): Handle InstallInTrace for qSupported.
9814 * tracepoint.c (add_tracepoint): Sort list.
9815 (install_tracepoint, download_tracepoint): New.
9816 (cmd_qtdp): Call them to install and download tracepoints.
9817 (sort_tracepoints): Removed.
9818 (cmd_qtstart): Update.
9819
9820 2011-11-14 Yao Qi <yao@codesourcery.com>
9821
9822 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9823 * mem-break.h: Declare.
9824 * tracepoint.c (cmd_qtstart): Move some code to ...
9825 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9826 New.
9827 (download_tracepoints): Move some code to ...
9828 (download_tracepoint_1): ... here. New.
9829
9830 2011-11-08 Yao Qi <yao@codesourcery.com>
9831
9832 * remote-utils.c (relocate_instruction): A comment fix.
9833
9834 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9835
9836 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9837 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9838 dr_status_mirror and dr_control_mirror from debug_reg_state.
9839 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9840 (i386_initial_stuff): Remove use of deleted globals.
9841 (i386_get_thread_context, i386_set_thread_context,
9842 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9843 from debug_reg_state.
9844
9845 2011-11-05 Yao Qi <yao@codesourcery.com>
9846
9847 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9848 address as TPOINT's.
9849
9850 2011-11-02 Stan Shebs <stan@codesourcery.com>
9851
9852 * tracepoint.c (agent_mem_read_string): New function.
9853 (eval_agent_expr): Call it for tracenz.
9854 * server.c (handle_query): Report support for tracenz.
9855
9856 2011-11-02 Yao Qi <yao@codesourcery.com>
9857
9858 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9859
9860 2011-11-02 Yao Qi <yao@codesourcery.com>
9861
9862 * target.h: Fix a typo in comment.
9863
9864 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9865
9866 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9867 clobber the breakpoints' shadows with fast tracepoint jumps.
9868 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9869 * target.c (write_inferior_memory): Also pass MYADDR down to
9870 check_mem_write.
9871
9872 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9873
9874 * configure.ac: Check support for personality routine.
9875 * configure: Regenerate.
9876 * config.in: Likewise.
9877 * linux-low.c: Include <sys/personality.h>.
9878 Define ADDR_NO_RANDOMIZE if necessary.
9879 (linux_create_inferior): Disable address space randomization when
9880 forking inferior, if requested.
9881 (linux_supports_disable_randomization): New function.
9882 (linux_target_ops): Install it.
9883 * server.h (disable_randomization): Declare.
9884 * server.c (disable_randomization): New global variable.
9885 (handle_general_set): Handle QDisableRandomization.
9886 (handle_query): Likewise for qSupported.
9887 (main): Support --disable-randomization and --no-disable-randomization
9888 command line arguments.
9889 * target.h (struct target_ops): Add supports_disable_randomization.
9890 (target_supports_disable_randomization): New macro.
9891
9892 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9893
9894 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9895 ifdef check.
9896 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9897 [!PT_GETDSBT] (target_loadmap): New definition.
9898 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9899 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9900 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9901 and PT_GETDSBT to LINUX_LOADMAP.
9902 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9903 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9904
9905 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9906
9907 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9908 (arm_linux_hwbp_cap): New static variable.
9909 (arm_linux_get_hwbp_cap): Replace by ...
9910 (arm_linux_init_hwbp_cap): ... this new function.
9911 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9912 (arm_linux_get_hw_watchpoint_count): Likewise.
9913 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9914 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9915 (arm_prepare_to_resume): Use perror_with_name instead of error.
9916
9917 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9918
9919 * linux-arm-low.c: Include <signal.h>.
9920 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9921 (struct arm_linux_hwbp_cap): New data type.
9922 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9923 (struct arm_linux_hw_breakpoint): New data type.
9924 (MAX_BPTS, MAX_WPTS): Define.
9925 (struct arch_process_info, struct arch_lwp_info): New data types.
9926 (arm_linux_get_hwbp_cap): New function.
9927 (arm_linux_get_hw_breakpoint_count): Likewise.
9928 (arm_linux_get_hw_watchpoint_count): Likewise.
9929 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9930 (arm_hwbp_control_initialize): Likewise.
9931 (arm_hwbp_control_is_enabled): Likewise.
9932 (arm_hwbp_control_is_initialized): Likewise.
9933 (arm_hwbp_control_disable): Likewise.
9934 (arm_linux_hw_breakpoint_equal): Likewise.
9935 (arm_linux_hw_point_initialize): Likewise.
9936 (struct update_registers_data): New data structure.
9937 (update_registers_callback: New function.
9938 (arm_insert_point): Likewise.
9939 (arm_remove_point): Likewise.
9940 (arm_stopped_by_watchpoint): Likewise.
9941 (arm_stopped_data_address): Likewise.
9942 (arm_new_process): Likewise.
9943 (arm_new_thread): Likewise.
9944 (arm_prepare_to_resume): Likewise.
9945 (the_low_target): Register arm_insert_point, arm_remove_point,
9946 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9947 arm_new_thread, and arm_prepare_to_resume.
9948
9949 2011-09-15 Stan Shebs <stan@codesourcery.com>
9950
9951 * server.h (struct emit_ops): Add compare-goto fields.
9952 * tracepoint.c (gdb_agent_op_sizes): New table.
9953 (emit_eq_goto): New function.
9954 (emit_ne_goto): New function.
9955 (emit_lt_goto): New function.
9956 (emit_le_goto): New function.
9957 (emit_gt_goto): New function.
9958 (emit_ge_goto): New function.
9959 (is_goto_target): New function.
9960 (compile_bytecodes): Recognize special cases of compare-goto
9961 combinations and call specialized emitters for them.
9962 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9963 (amd64_emit_ne_goto): New function.
9964 (amd64_emit_lt_goto): New function.
9965 (amd64_emit_le_goto): New function.
9966 (amd64_emit_gt_goto): New function.
9967 (amd64_emit_ge_goto): New function.
9968 (amd64_emit_ops): Add the new functions.
9969 (i386_emit_eq_goto): New function.
9970 (i386_emit_ne_goto): New function.
9971 (i386_emit_lt_goto): New function.
9972 (i386_emit_le_goto): New function.
9973 (i386_emit_gt_goto): New function.
9974 (i386_emit_ge_goto): New function.
9975 (i386_emit_ops): Add the new functions.
9976
9977 2011-09-08 Stan Shebs <stan@codesourcery.com>
9978
9979 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9980 (i386_emit_epilogue): Restore %ebx.
9981
9982 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9983
9984 * server.c (step_thread): Remove definition.
9985 (process_serial_event): Don't handle Hs.
9986 * server.h (step_thread): Remove declaration.
9987 * target.c (set_desired_inferior): Remove use of step_thread.
9988
9989 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9990
9991 * linux-low.c: Include linux-procfs.h.
9992 (linux_attach_lwp_1): Update comments.
9993 (linux_attach): Scan for existing threads when attaching to a
9994 process that is the tgid.
9995 * Makefile.in: Update dependencies.
9996
9997 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9998
9999 * configure.srv: Add linux-procfs.o dependencies.
10000
10001 2011-08-14 Yao Qi <yao@codesourcery.com>
10002
10003 * target.h (struct target_ops): Fix indent.
10004 * win32-low.c (win32_target_ops): Fix comment.
10005
10006 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10007 Yao Qi <yao@codesourcery.com>
10008
10009 * Makefile.in (clean): Remove tic6x-*.c files.
10010 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10011 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10012 (tic6x-c64xp-linux.c): Likewise.
10013 * configure.srv: Add support for tic6x-*-uclinux.
10014 * linux-tic6x-low.c: New.
10015 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10016
10017 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10018 Yao Qi <yao@codesourcery.com>
10019
10020 * target.h (struct target_ops): Add read_loadmap.
10021 * linux-low.c (struct target_loadseg): New type.
10022 (struct target_loadmap): New type.
10023 (linux_read_loadmap): New function.
10024 (linux_target_ops): Add linux_read_loadmap.
10025 * server.c (handle_query): Support qXfer:fdpic:read packet.
10026 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10027 to NULL.
10028
10029 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10030
10031 * win32-low.c: Include <stdint.h>.
10032
10033 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10034
10035 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10036 to the inferior here.
10037 (i386_remove_aligned_watchpoint): Ditto.
10038 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10039 fit part of the watchpoint in the debug registers.
10040 (i386_update_inferior_debug_regs): New.
10041 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10042 registers, and only update the inferior on success.
10043 (i386_low_remove_watchpoint): Ditto.
10044
10045 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10046
10047 * linux-low.c (compare_ints, unique, list_threads, show_process,
10048 linux_core_of_thread): Delete.
10049 (linux_target_ops): Change linux_core_of_thread to
10050 linux_common_core_of_thread.
10051 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10052 * utils.c (malloc_failure): Change type of argument.
10053 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10054 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10055 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10056 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10057 (IPA_OBJS): Add common-utils-ipa.o.
10058 (ptid_h, linux_osdata_h): New macros.
10059 (server_h): Add common/common-utils.h, common/xml-utils.h,
10060 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10061 common/ptid.h.
10062 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10063 ptid.o, buffer.o): New rules.
10064 (linux-low.o): Add common/linux-osdata.h as a dependency.
10065 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10066 * configure.ac: Add AC_HEADER_DIRENT check.
10067 * config.in: Regenerate.
10068 * configure: Regenerate.
10069 * remote-utils.c (xml_escape_text): Delete.
10070 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10071 buffer_xml_printf): Move to common/buffer.c.
10072 * server.c (main): Remove call to initialize_inferiors.
10073 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10074 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10075 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10076 internal_error, gdb_assert, gdb_assert_fail): Delete.
10077 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10078 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10079 common/buffer.h.
10080 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10081 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10082 initialize_inferiors): Delete.
10083
10084 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10085
10086 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10087 symbol error.
10088
10089 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10090
10091 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10092 assertion.
10093 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10094
10095 2011-05-26 Yao Qi <yao@codesourcery.com>
10096
10097 * Makefile.in (thread-db.o): Track dependence to
10098 common/gdb_thread_db.h.
10099 * thread-db.c: include gdb_thread_db.h from right place.
10100
10101 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10102
10103 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10104 __FILE__ and __LINE__ to internal_error.
10105
10106 2011-05-13 Doug Evans <dje@google.com>
10107
10108 * thread-db.c (try_thread_db_load_from_sdir): New function.
10109 (try_thread_db_load_from_dir): New function.
10110 (thread_db_load_search): Handle $sdir, ignore $pdir.
10111 Remove trying of system directories if search of
10112 libthread-db-search-path fails, that is now done via $sdir.
10113
10114 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10115
10116 * server.c (handle_query): Add EnableDisableTracepoints to the list
10117 of supported features.
10118 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10119 tracepoints.
10120 (cmd_qtenable_disable): New.
10121 (cmd_qtstart): Install tracepoints even if disabled.
10122 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10123 receiving a QTEnable or QTDisable packet.
10124 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10125 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10126 tracepoints.
10127 (gdb_probe): Skip data collection if static tracepoint is disabled.
10128
10129 2011-05-10 Doug Evans <dje@google.com>
10130
10131 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10132
10133 2011-05-04 Doug Evans <dje@google.com>
10134
10135 * linux-low.c (linux_join): Skip process lookup.
10136 * spu-low.c (spu_join): Ditto.
10137 * server.c (join_inferiors_callback): Delete.
10138 (process_serial_event): For 'D' packet (detach) call join_inferior
10139 directly.
10140
10141 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10142
10143 * README: Don't mention xscale*-*-linux*.
10144 * configure.srv (xscale*-*-linux*): Don't handle target.
10145
10146 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10147
10148 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10149 casting pointers.
10150 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10151 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10152 (i386_emit_void_call_2): Likewise.
10153
10154 2011-04-26 Yao Qi <yao@codesourcery.com>
10155
10156 * linux-low.c: Move common macros to linux-ptrace.h.
10157 Include linux-ptrace.h.
10158 * Makefile.in (linux_ptrace_h): New.
10159 (linux-low.o): Depends on linux-ptrace.h.
10160
10161 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10162
10163 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10164 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10165 (remote_prepare): New function with most of the TCP code from ...
10166 (remote_open): ... here. Detect PORT here unconditionally. Move also
10167 setting transport_is_reliable.
10168 * server.c (run_once): New variable.
10169 (gdbserver_usage): Document it.
10170 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10171 the first run if RUN_ONCE.
10172 * server.h (run_once, remote_prepare): New declarations.
10173
10174 2011-04-19 Tom Tromey <tromey@redhat.com>
10175
10176 * win32-low.c (handle_load_dll): Remove duplicate "the".
10177
10178 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10179
10180 Remove support for old Cygwin 1.5 versions.
10181 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10182 function to avoid warning.
10183 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10184 warning.
10185
10186 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10187
10188 * gdbserver/server.h (Macro _): Define it if not available.
10189
10190 2011-03-14 Michael Snyder <msnyder@vmware.com>
10191
10192 * hostio.c (handle_close): Remove unnecessary null test.
10193
10194 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10195
10196 * Makefile.in (maintainer-clean realclean distclean): Remove
10197 "make ... subdir_do" command.
10198
10199 2011-03-10 Michael Snyder <msnyder@vmware.com>
10200
10201 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10202
10203 * server.c (handle_v_run): Free alloced buffer on early return.
10204
10205 2011-03-09 Yao Qi <yao@codesourcery.com>
10206
10207 Revert:
10208 2011-03-04 Yao Qi <yao@codesourcery.com>
10209
10210 * Makefile.in: Remove GNU make feature --directory.
10211
10212 2011-03-05 Yao Qi <yao@codesourcery.com>
10213
10214 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10215 (subdir_do): New make target. Copied from gdb/Makefile.
10216 (maintainer-clean, realclean, distclean, clean): Call corresponding
10217 make targets in common/Makefile.
10218
10219 2011-02-11 Yao Qi <yao@codesourcery.com>
10220
10221 * configure.ac: Call AC_PROG_RANLIB.
10222 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10223 * configure: Regenerate.
10224
10225 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10226
10227 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10228
10229 2011-03-06 Yao Qi <yao@codesourcery.com>
10230
10231 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10232
10233 2011-03-05 Yao Qi <yao@codesourcery.com>
10234
10235 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10236 (subdir_do): New make target. Copied from gdb/Makefile.
10237 (maintainer-clean, realclean, distclean, clean): Call corresponding
10238 make targets in common/Makefile.
10239
10240 2011-03-04 Yao Qi <yao@codesourcery.com>
10241
10242 * Makefile.in: Remove GNU make feature --directory.
10243
10244 2011-03-04 Michael Snyder <msnyder@vmware.com>
10245
10246 * server.c (queue_stop_reply): Call xmalloc not malloc.
10247
10248 2011-03-02 Michael Snyder <msnyder@vmware.com>
10249
10250 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10251
10252 2011-02-28 Michael Snyder <msnyder@vmware.com>
10253
10254 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10255 (cmd_qtframe): Ditto.
10256 (cmd_qtbuffer): Ditto.
10257 (cmd_bigqtbuffer): Ditto.
10258
10259 * utils.c (decimal2str): Initialize 'width' to nine, then
10260 don't mess with it.
10261
10262 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10263
10264 * hostio.c (require_data): Free *data, not data.
10265
10266 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10267
10268 * hostio.c (require_data): Use free, not xfree.
10269
10270 2011-02-27 Michael Snyder <msnyder@vmware.com>
10271
10272 * server.c (handle_query): Discard unused value.
10273
10274 * hostio.c (require_data): Free malloc memory before returning
10275 error.
10276
10277 2011-02-26 Michael Snyder <msnyder@vmware.com>
10278
10279 * linux-low.c (list_threads): Call closedir for dirent.
10280
10281 2011-02-27 Michael Snyder <msnyder@vmware.com>
10282
10283 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10284 a case statement falls through.
10285
10286 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10287
10288 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10289 in comparison.
10290
10291 2011-02-26 Michael Snyder <msnyder@vmware.com>
10292
10293 * utils.c (decimal2str): Eliminate dead code and dead param.
10294 (pulongest): Drop dead param from call to decimal2str.
10295 (plongest): Ditto.
10296
10297 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10298
10299 Revert the following patch (not approved yet):
10300 2011-02-21 Hui Zhu <teawater@gmail.com>
10301 * tracepoint.c (tp_printf): New function.
10302 (eval_agent_expr): Handle gdb_agent_op_printf.
10303
10304 2011-02-21 Hui Zhu <teawater@gmail.com>
10305
10306 * tracepoint.c (tp_printf): New function.
10307 (eval_agent_expr): Handle gdb_agent_op_printf.
10308
10309 2011-02-18 Tom Tromey <tromey@redhat.com>
10310
10311 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10312 (tracepoint.o): Likewise.
10313 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10314 (gdb_agent_op_names): Likewise.
10315
10316 2011-02-18 Tom Tromey <tromey@redhat.com>
10317
10318 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10319 gdb_agent_op_rot>: New constants.
10320 (gdb_agent_op_names): Add pick and roll.
10321 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10322 cases.
10323
10324 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10325
10326 * aclocal.m4: Regenerated with aclocal-1.11.1.
10327
10328 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10329
10330 * server.c (handle_qxfer_traceframe_info): New.
10331 (qxfer_packets): Register "traceframe-info".
10332 (handle_query): Report support for qXfer:traceframe-info:read+.
10333 * tracepoint.c (match_blocktype): New.
10334 (traceframe_find_block_type): Rename to ...
10335 (traceframe_walk_blocks): ... this. Add callback filter argument,
10336 and use it.
10337 (traceframe_find_block_type): New, reimplemented on top of
10338 traceframe_walk_blocks.
10339 (build_traceframe_info_xml): New.
10340 (traceframe_read_info): New.
10341 * server.h (traceframe_read_info): Declare.
10342
10343 2011-02-11 Yao Qi <yao@codesourcery.com>
10344
10345 * configure.ac: Call AC_PROG_RANLIB.
10346 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10347 * configure: Regenerate.
10348
10349 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10350
10351 * server.c (gdb_read_memory): Change return semantics to allow
10352 partial transfers.
10353 (handle_search_memory_1): Adjust.
10354 (process_serial_event) <'m' packet>: Handle partial transfers.
10355 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10356
10357 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10358
10359 * regcache.c (init_register_cache): Initialize
10360 regcache->register_status.
10361 (free_register_cache): Release regcache->register_status.
10362 (regcache_cpy): Copy register_status.
10363 (registers_to_string): Print 'x's for unavailable registers.
10364 (supply_register): Mark the register's status valid or
10365 unavailable, depending on whether a buffer was passed in or not.
10366 (supply_register_zeroed): New.
10367 (supply_regblock): Mark the registers' status valid or
10368 unavailable, depending on whether a buffer was passed in or not.
10369 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10370 (struct regcache): New `register_status' field.
10371 (supply_register_zeroed): Declare.
10372 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10373 supply_register_zeroed, rather than passing a NULL buffer to
10374 supply_register.
10375 * tracepoint.c (fetch_traceframe_registers): Update comment.
10376
10377 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10378
10379 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10380 buffer explicit.
10381
10382 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10383
10384 * server.h (decode_xfer_write): Change prototype.
10385 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10386 and don't extract the annex here.
10387 * server.c (decode_xfer_read): Remove `annex' parameter,
10388 and don't extract the annex here.
10389 (decode_xfer): New.
10390 (struct qxfer): New.
10391 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10392 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10393 (handle_qxfer_statictrace): New functions, abstracted out from
10394 handle_query, and made to use the struct qxfer interface.
10395 (handle_threads_qxfer_proper): Rename to ...
10396 (handle_qxfer_threads_proper): ... this.
10397 (handle_threads_qxfer): Rename to ...
10398 (handle_qxfer_threads): ... this. Adjust.
10399 (qxfer_packets): New array.
10400 (handle_qxfer): New function.
10401 (handle_query): Use handle_qxfer.
10402
10403 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10404
10405 * gdbreplay.c: Shorten lines of >= 80 columns.
10406 * linux-low.c: Ditto.
10407 * linux-ppc-low.c: Ditto.
10408 * linux-s390-low.c: Ditto.
10409 * linux-sparc-low.c: Ditto.
10410 * linux-x86-low.c: Ditto.
10411 * linux-xtensa-low.c: Ditto.
10412 * mem-break.c: Ditto.
10413 * nto-low.c: Ditto.
10414 * regcache.h: Ditto.
10415 * remote-utils.c: Ditto.
10416 * server.c: Ditto.
10417 * server.h: Ditto.
10418 * thread-db.c: Ditto.
10419 * tracepoint.c: Ditto.
10420 * utils.c: Ditto.
10421 * win32-low.h: Ditto.
10422
10423 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10424
10425 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10426 update.
10427
10428 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10429
10430 * server.c (gdbserver_version): Update copyright year in version
10431 output.
10432 * gdbreplay.c (gdbreplay_version): Ditto.
10433
10434 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10435
10436 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10437 * linux-bfin-low.c: New file.
10438 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10439 PT_DATA_ADDR for BFIN targets.
10440 * Makefile.in (SFILES): Add linux-bfin-low.c.
10441 (clean): Remove reg-bfin.c.
10442 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10443 * README: Mention supported Blackfin targets.
10444
10445 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10446
10447 * .gitignore: New file.
10448
10449 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10450
10451 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10452
10453 2010-10-22 Jie Zhang <jie@codesourcery.com>
10454
10455 * Makefile.in: Add FLAGS_TO_PASS variable.
10456 (install): Remove dependency of install-only and recursively
10457 invoke make for install-only.
10458
10459 2010-10-04 Doug Evans <dje@google.com>
10460
10461 * Makefile.in (uninstall): Use $(DESTDIR).
10462
10463 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10464
10465 PR gdb/11842
10466
10467 * linux-x86-low.c (compat_siginfo_from_siginfo)
10468 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10469 si_code is < 0. Check for si_code == SI_TIMER before checking for
10470 si_code < 0.
10471
10472 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10473
10474 * lynx-i386-low.c: New file.
10475 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10476
10477 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10478
10479 * lynx-low.c (ptrace_request_to_str): Remove handling for
10480 request values that have been removed in LynxOS 5.x.
10481
10482 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10483
10484 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10485 <ptrace.h>
10486
10487 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10488
10489 * configure.ac: Add --enable-inprocess-agent option.
10490 * configure: Rebuilt.
10491
10492 2010-09-06 Yao Qi <yao@codesourcery.com>
10493
10494 * linux-low.c (linux_kill): Remove unused variable.
10495 (linux_stabilize_threads): Likewise.
10496 * server.c (start_inferior): Likewise.
10497 (queue_stop_reply_callback): Likewise.
10498 * tracepoint.c (do_action_at_tracepoint): Likewise.
10499
10500 2010-09-06 Yao Qi <yao@codesourcery.com>
10501
10502 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10503 on return.
10504
10505 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10506
10507 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10508
10509 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10510
10511 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10512 "$(IPA_DEPFILES)".
10513
10514 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10515
10516 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10517 gdbserver/lynx-ppc-low.c: New files.
10518 * Makefile.in (lynx_low_h): New variable.
10519 (lynx-low.o, lynx-ppc-low.o): New rules.
10520 * configure.ac: On LynxOS, link with -lnetinet.
10521 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10522 * configure: regenerate.
10523
10524 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10525
10526 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10527 * configure.ac: Add check for vasprintf and vsnprintf.
10528 * configure, config.in: Regenerate.
10529 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10530
10531 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10532
10533 * gdbreplay.c: Move include of alloca.h up, next to include of
10534 malloc.h.
10535 * server.h: Add include of malloc.h.
10536 * mem-break.c: Remove include of malloc.h.
10537 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10538
10539 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10540
10541 * Makefile.in (memmem.o): Build with -Wno-error.
10542
10543 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10544
10545 * utils.c (xsnprintf): Make non-static.
10546 * server.h: Add xsnprintf declaration.
10547 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10548 replace calls to snprintf by calls to xsnprintf throughout.
10549
10550 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10551
10552 * configure.ac: Add configure check for alloca.
10553 * configure, config.in: Regenerate.
10554 * server.h: Include alloca.h if it exists.
10555 * gdbreplay.c: Include alloca.h if it exists.
10556
10557 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10558
10559 * linux-low.c (__SIGRTMIN): Define if not already defined.
10560 (linux_create_inferior): Check for __ANDROID__ rather than
10561 __SIGRTMIN.
10562 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10563 are already deferred.
10564 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10565 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10566 stopped and already has a pending signal to report.
10567 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10568 a pending signal to report or is moving out of a jump pad.
10569 (linux_init_signals): Check for __ANDROID__ rather than
10570 __SIGRTMIN.
10571
10572 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10573
10574 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10575 debug_threads check. Avoid a linear search when not doing debug
10576 output.
10577
10578 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10579
10580 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10581 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10582 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10583 (process_event): Change local fd's type to gdb_fildes_t.
10584 (create_file_handler): Adjust prototype.
10585 (delete_file_handler): Adjust prototype.
10586 (handle_file_event): Adjust prototype. Use pfildes.
10587 (create_file_event): Adjsut prototype.
10588 * remote-utils.c (remote_desc, listen_desc): Change type to
10589 gdb_fildes_t.
10590 * server.h: New gdb_fildes_t typedef.
10591 [USE_WIN32API]: Include winsock2.h.
10592 (delete_file_handler, add_file_handler): Adjust prototypes.
10593 (pfildes): Declare.
10594 * utils.c (pfildes): New.
10595
10596 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10597
10598 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10599 * configure: Regenerate.
10600
10601 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10602
10603 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10604 (linux_done_accessing_memory): ... this.
10605 (linux_target_ops): Adjust.
10606 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10607 * nto-low.c (nto_target_ops): Adjust comment.
10608 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10609 * spu-low.c (spu_target_ops): Adjust comment.
10610 * target.h (target_ops): Rename unprepare_to_access_memory field
10611 to done_accessing_memory.
10612 (unprepare_to_access_memory): Rename to ...
10613 (done_accessing_memory): ... this.
10614
10615 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10616
10617 * linux-low.c (linux_prepare_to_access_memory): New.
10618 (linux_unprepare_to_access_memory): New.
10619 (linux_target_ops): Install them.
10620 * server.c (read_memory): Rename to ...
10621 (gdb_read_memory): ... this. Use
10622 prepare_to_access_memory/prepare_to_access_memory.
10623 (write_memory): Rename to ...
10624 (gdb_write_memory): ... this. Use
10625 prepare_to_access_memory/prepare_to_access_memory.
10626 (handle_search_memory_1): Adjust.
10627 (process_serial_event): Adjust.
10628 * target.h (struct target_ops): New fields
10629 prepare_to_access_memory and unprepare_to_access_memory.
10630 (prepare_to_access_memory, unprepare_to_access_memory): New.
10631 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10632 prepare_to_access_memory/prepare_to_access_memory.
10633 * nto-low.c (nto_target_ops): Adjust.
10634 * spu-low.c (spu_target_ops): Adjust.
10635 * win32-low.c (win32_target_ops): Adjust.
10636
10637 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10638
10639 * Makefile.in (WARN_CFLAGS): Get it from configure.
10640 (WERROR_CFLAGS): New.
10641 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10642 * configure.ac: Introduce --enable-werror, which adds -Werror to
10643 the compiler command line. Enabled by default. Disable with
10644 --disable-werror. Add -Wdeclaration-after-statement
10645 Wpointer-arith and -Wformat-nonliteral to warning flags.
10646 * configure: Regenerate.
10647
10648 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10649
10650 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10651
10652 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10653
10654 * gdbreplay.c (remote_error): New.
10655 (gdbchar): New.
10656 (expect): Use gdbchar. Check for error reading from GDB.
10657 Clarify sync error output.
10658 (play): Check for errors writing to GDB.
10659 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10660 * remote-utils.c (getpkt): Check for errors writing to the remote
10661 descriptor.
10662
10663 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10664
10665 * linux-low.c (linux_wait_1): Move non-debugging code out of
10666 `debug_threads' control.
10667
10668 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10669
10670 * linux-low.c (linux_wait_1): Don't set last_status here.
10671 * server.c (push_event, queue_stop_reply_callback): Assert we're
10672 not pushing a TARGET_WAITKIND_IGNORE event.
10673 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10674 (myresume, handle_target_event): Set the thread's last_resume_kind
10675 and last_status from the target returned status.
10676
10677 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10678
10679 PR threads/10729
10680
10681 * linux-x86-low.c (update_debug_registers_callback): New.
10682 (i386_dr_low_set_addr): Use it.
10683 (i386_dr_low_get_addr): New.
10684 (i386_dr_low_set_control): Use update_debug_registers_callback.
10685 (i386_dr_low_get_control): New.
10686 (i386_dr_low_get_status): Adjust.
10687 * linux-low.c (linux_stop_lwp): New.
10688 * linux-low.h (linux_stop_lwp): Declare.
10689
10690 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10691 argument instead of a i386_debug_reg_state.
10692 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10693 a i386_debug_reg_state.
10694 (i386_insert_aligned_watchpoint): Adjust.
10695 (i386_remove_aligned_watchpoint): Adjust.
10696 (i386_low_stopped_data_address): Read the debug registers from the
10697 inferior instead of from the mirrors.
10698 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10699 (i386_dr_low_get_addr): Declare.
10700 (i386_dr_low_get_control): Declare.
10701 (i386_dr_low_get_status): Change prototype.
10702
10703 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10704 (i386_dr_low_get_addr): New.
10705 (i386_dr_low_get_control): New.
10706 (i386_dr_low_get_status): Adjust prototype. Return
10707 dr_status_mirror.
10708 (i386_initial_stuff): Clear dr_status_mirror and
10709 dr_control_mirror.
10710 (i386_get_thread_context): Adjust.
10711 (i386_set_thread_context): Adjust.
10712 (i386_thread_added): Adjust.
10713
10714 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10715
10716 * linux-low.h (linux_thread_area): Delete declaration.
10717
10718 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10719
10720 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10721 after its termination.
10722
10723 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10724
10725 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10726 (gdb_wants_all_stopped): Delete.
10727 (linux_wait_1): Don't call them.
10728 * server.c (handle_v_cont): Tag all threads as want-stopped.
10729 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10730 stopped as "client-wants-stopped".
10731
10732 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10733
10734 * Makefile.in (signals_h): New.
10735 (server_h): Depend on it.
10736 (server.o): Don't depend on $(signals_def).
10737 (signals.o): Depend on $(signals_def).
10738
10739 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10740
10741 * Makefile.in (signals_def): New.
10742 (server_h): Append include/gdb/signals.h and signals_def.
10743 (server.o): Append signals_def.
10744
10745 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10746
10747 * server.c (handle_target_event): Use target_signal_to_host for
10748 resume_info.sig initialization.
10749 * target.h (struct thread_resume) <sig>: New comment.
10750
10751 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10752
10753 * server.c (handle_query): strcpy() the returned string from paddress()
10754 instead of sprintf().
10755 * utils.c (paddress): Return phex_nz().
10756
10757 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10758
10759 * server.c (handle_v_cont): Call mourn_inferior if process
10760 just exited.
10761 (myresume): Likewise.
10762
10763 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10764
10765 Static tracepoints, and integration with UST.
10766
10767 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10768 * mem-break.c (uninsert_all_breakpoints)
10769 (reinsert_all_breakpoints): New.
10770 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10771 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10772 (gdb_agent_ust_loaded, helper_thread_id)
10773 (gdb_agent_helper_thread_id): New macros.
10774 (struct ipa_sym_addresses): Add addr_ust_loaded,
10775 addr_helper_thread_id, addr_cmd_buf.
10776 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10777 (in_process_agent_loaded_ust): New.
10778 (write_e_ust_not_loaded): New.
10779 (maybe_write_ipa_ust_not_loaded): New.
10780 (struct collect_static_trace_data_action): New.
10781 (enum tracepoint_type) <static_tracepoint>: New.
10782 (struct tracepoint) <handle>: Mention static tracepoints.
10783 (struct static_tracepoint_ctx): New.
10784 (CMD_BUF_SIZE): New.
10785 (add_tracepoint_action): Handle static tracepoint actions.
10786 (unprobe_marker_at): New.
10787 (clear_installed_tracepoints): Handle static tracepoints.
10788 (cmd_qtdp): Handle static tracepoints.
10789 (probe_marker_at): New.
10790 (cmd_qtstart): Handle static tracepoints.
10791 (response_tracepoint): Handle static tracepoints.
10792 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10793 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10794 (get_context_regcache): Handle static tracepoints.
10795 (do_action_at_tracepoint): Handle static tracepoint actions.
10796 (traceframe_find_block_type): Handle static trace data blocks.
10797 (traceframe_read_sdata): New.
10798 (download_tracepoints): Download static tracepoint actions.
10799 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10800 (GDB_PROBE_NAME): New.
10801 (ust_ops): New.
10802 (GET_UST_SYM): New.
10803 (USTF): New.
10804 (dlsym_ust): New.
10805 (ust_marker_to_static_tracepoint): New.
10806 (gdb_probe): New.
10807 (collect_ust_data_at_tracepoint): New.
10808 (gdb_ust_probe): New.
10809 (UNIX_PATH_MAX, SOCK_DIR): New.
10810 (gdb_ust_connect_sync_socket): New.
10811 (resume_thread, stop_thread): New.
10812 (run_inferior_command): New.
10813 (init_named_socket): New.
10814 (gdb_ust_socket_init): New.
10815 (cstr_to_hexstr): New.
10816 (next_st): New.
10817 (first_marker, next_marker): New.
10818 (response_ust_marker): New.
10819 (cmd_qtfstm, cmd_qtsstm): New.
10820 (unprobe_marker_at, probe_marker_at): New.
10821 (cmd_qtstmat, gdb_ust_thread): New.
10822 (gdb_ust_init): New.
10823 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10824 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10825 (ST_REGENTRY): New.
10826 (x86_64_st_collect_regmap): New.
10827 (X86_64_NUM_ST_COLLECT_GREGS): New.
10828 (AMD64_RIP_REGNUM): New.
10829 (supply_static_tracepoint_registers): New.
10830 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10831 (ST_REGENTRY): New.
10832 (i386_st_collect_regmap): New.
10833 (i386_NUM_ST_COLLECT_GREGS): New.
10834 (supply_static_tracepoint_registers): New.
10835 * server.c (handle_query): Handle qXfer:statictrace:read.
10836 <qSupported>: Report support for StaticTracepoints, and
10837 qXfer:statictrace:read features.
10838 * server.h (traceframe_read_sdata)
10839 (supply_static_tracepoint_registers): Declare.
10840 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10841 (unpack_varlen_hex): Include in IPA build.
10842 * Makefile.in (ustlibs, ustinc): New.
10843 (IPA_OBJS): Add remote-utils-ipa.o.
10844 ($(IPA_LIB)): Link -ldl and -lpthread.
10845 (UST_CFLAGS): New.
10846 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10847 * config.in, configure: Regenerate.
10848
10849 2010-06-20 Ian Lance Taylor <iant@google.com>
10850 Pedro Alves <pedro@codesourcery.com>
10851
10852 * linux-x86-low.c (always_true): Delete.
10853 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10854 trying to fool the compiler with always_true.
10855
10856 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10857
10858 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10859 conditions in gdbserver.
10860
10861 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10862
10863 * spu-low.c (spu_read_memory): Wrap around local store limit.
10864 (spu_write_memory): Likewise.
10865
10866 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10867
10868 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10869 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10870 LONGEST uses.
10871 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10872 uses.
10873 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10874 uses with LONGEST uses.
10875
10876 2010-06-14 Stan Shebs <stan@codesourcery.com>
10877 Pedro Alves <pedro@codesourcery.com>
10878
10879 Bytecode compiler.
10880
10881 * linux-x86-low.c: Include limits.h.
10882 (add_insns): New.
10883 (always_true): New.
10884 (EMIT_ASM): New.
10885 (EMIT_ASM32): New.
10886 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10887 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10888 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10889 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10890 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10891 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10892 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10893 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10894 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10895 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10896 (amd64_emit_void_call_2): New.
10897 (amd64_emit_ops): New.
10898 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10899 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10900 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10901 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10902 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10903 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10904 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10905 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10906 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10907 (i386_emit_stack_adjust, i386_emit_int_call_1)
10908 (i386_emit_void_call_2): New.
10909 (i386_emit_ops): New.
10910 (x86_emit_ops): New.
10911 (the_low_target): Install x86_emit_ops.
10912 * server.h (struct emit_ops): New.
10913 (get_raw_reg_func_addr): Declare.
10914 (current_insn_ptr, emit_error): Declare.
10915 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10916 (set_trace_state_variable_value): New defines.
10917 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10918 addr_get_trace_state_variable_value and
10919 addr_set_trace_state_variable_value.
10920 (symbol_list): New fields for get_raw_reg,
10921 get_trace_state_variable_value and set_trace_state_variable_value.
10922 (condfn): New typedef.
10923 (struct tracepoint): New field `compiled_cond'.
10924 (do_action_at_tracepoint): Clear compiled_cond.
10925 (get_trace_state_variable_value, set_trace_state_variable_value):
10926 Export in the IPA.
10927 (condition_true_at_tracepoint): If there's a compiled condition,
10928 run that.
10929 (current_insn_ptr, emit_error): New globals.
10930 (struct bytecode_address): New.
10931 (get_raw_reg_func_addr): New.
10932 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10933 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10934 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10935 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10936 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10937 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10938 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10939 (compile_tracepoint_condition, compile_bytecodes): New.
10940 * target.h (emit_ops): Forward declare.
10941 (struct target_ops): New field emit_ops.
10942 (target_emit_ops): New.
10943 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10944 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10945 * linux-low.c (linux_emit_ops): New.
10946 (linux_target_ops): Install it.
10947 * linux-low.h (struct linux_target_ops): New field emit_ops.
10948
10949 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10950
10951 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10952 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10953
10954 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10955 Stan Shebs <stan@codesourcery.com>
10956
10957 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10958 (all): Depend on $(extra_libraries).
10959 (install-only): Install the IPA.
10960 (IPA_OBJS, IPA_LIB): New.
10961 (clean): Remove the IPA lib.
10962 (IPAGENT_CFLAGS): New.
10963 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10964 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10965 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10966 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10967 * configure.ac: Check for atomic builtins support in the compiler.
10968 (IPA_DEPFILES, extra_libraries): Define.
10969 * configure.srv (ipa_obj): Add description.
10970 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10971 (i[34567]86-*-linux*): Set ipa_obj.
10972 (x86_64-*-linux*): Set ipa_obj.
10973 * linux-low.c (stabilizing_threads): New.
10974 (supports_fast_tracepoints): New.
10975 (linux_detach): Stabilize threads before detaching.
10976 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10977 the lwp is either not stabilizing, or is moving out of a jump pad.
10978 (linux_fast_tracepoint_collecting): New.
10979 (maybe_move_out_of_jump_pad): New.
10980 (enqueue_one_deferred_signal): New.
10981 (dequeue_one_deferred_signal): New.
10982 (linux_wait_for_event_1): If moving out of a jump pad, defer
10983 pending signals to later.
10984 (linux_stabilize_threads): New.
10985 (linux_wait_1): Check if threads need moving out of jump pads, and
10986 do it if so.
10987 (stuck_in_jump_pad_callback): New.
10988 (move_out_of_jump_pad_callback): New.
10989 (lwp_running): New.
10990 (linux_resume_one_lwp): Handle moving out of jump pads.
10991 (linux_set_resume_request): Dequeue deferred signals.
10992 (need_step_over_p): Also step over fast tracepoint jumps.
10993 (start_step_over): Also uninsert fast tracepoint jumps.
10994 (finish_step_over): Also reinsert fast tracepoint jumps.
10995 (linux_install_fast_tracepoint_jump): New.
10996 (linux_target_ops): Install linux_stabilize_threads and
10997 linux_install_fast_tracepoint_jump_pad.
10998 * linux-low.h (linux_target_ops) <get_thread_area,
10999 install_fast_tracepoint_jump_pad>: New fields.
11000 (struct lwp_info) <collecting_fast_tracepoint,
11001 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11002 (linux_get_thread_area): Declare.
11003 * linux-x86-low.c (jump_insn): New.
11004 (x86_get_thread_area): New.
11005 (append_insns): New.
11006 (push_opcode): New.
11007 (amd64_install_fast_tracepoint_jump_pad): New.
11008 (i386_install_fast_tracepoint_jump_pad): New.
11009 (x86_install_fast_tracepoint_jump_pad): New.
11010 (the_low_target): Install x86_get_thread_area and
11011 x86_install_fast_tracepoint_jump_pad.
11012 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11013 (struct fast_tracepoint_jump): New.
11014 (fast_tracepoint_jump_insn): New.
11015 (fast_tracepoint_jump_shadow): New.
11016 (find_fast_tracepoint_jump_at): New.
11017 (fast_tracepoint_jump_here): New.
11018 (delete_fast_tracepoint_jump): New.
11019 (set_fast_tracepoint_jump): New.
11020 (uninsert_fast_tracepoint_jumps_at): New.
11021 (reinsert_fast_tracepoint_jumps_at): New.
11022 (set_breakpoint_at): Use write_inferior_memory.
11023 (uninsert_raw_breakpoint): Use write_inferior_memory.
11024 (check_mem_read): Mask out fast tracepoint jumps.
11025 (check_mem_write): Mask out fast tracepoint jumps.
11026 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11027 (set_fast_tracepoint_jump): Declare.
11028 (delete_fast_tracepoint_jump)
11029 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11030 (reinsert_fast_tracepoint_jumps_at): Declare.
11031 * regcache.c: Don't compile many functions when building the
11032 in-process agent library.
11033 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11034 the register buffer in the heap.
11035 (free_register_cache): If the register buffer isn't owned by the
11036 regcache, don't free it.
11037 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11038 pre-existing register caches.
11039 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11040 type.
11041 (convert_ascii_to_int): : Constify `from' parameter type.
11042 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11043 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11044 the needed buffer in-place.
11045 (relocate_instruction): New.
11046 * server.c (handle_query) <qSymbols>: If the target supports
11047 tracepoints, give it a chance of looking up symbols. Report
11048 support for fast tracepoints.
11049 (handle_status): Stabilize threads.
11050 (process_serial_event): Adjust.
11051 * server.h (struct fast_tracepoint_jump): Forward declare.
11052 (struct process_info) <fast_tracepoint_jumps>: New field.
11053 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11054 (decode_X_packet, decode_M_packet): Adjust.
11055 (relocate_instruction): Declare.
11056 (in_process_agent_loaded): Declare.
11057 (tracepoint_look_up_symbols): Declare.
11058 (struct fast_tpoint_collect_status): Declare.
11059 (fast_tracepoint_collecting): Declare.
11060 (force_unlock_trace_buffer): Declare.
11061 (handle_tracepoint_bkpts): Declare.
11062 (initialize_low_tracepoint)
11063 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11064 * target.h (struct target_ops) <stabilize_threads,
11065 install_fast_tracepoint_jump_pad>: New fields.
11066 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11067 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11068 [HAVE_STDINT_H]: Include stdint.h.
11069 (trace_debug_1): Rename to ...
11070 (trace_vdebug): ... this.
11071 (trace_debug): Rename to ...
11072 (trace_debug_1): ... this. Add `level' parameter.
11073 (trace_debug): New.
11074 (ATTR_USED, ATTR_NOINLINE): New.
11075 (IP_AGENT_EXPORT): New.
11076 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11077 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11078 (about_to_request_buffer_space, trace_buffer_is_full)
11079 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11080 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11081 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11082 (traceframe_write_count, traceframes_created)
11083 (trace_state_variables)
11084 New renaming defines.
11085 (struct ipa_sym_addresses): New.
11086 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11087 (symbol_list): New.
11088 (ipa_sym_addrs): New.
11089 (all_tracepoint_symbols_looked_up): New.
11090 (in_process_agent_loaded): New.
11091 (write_e_ipa_not_loaded): New.
11092 (maybe_write_ipa_not_loaded): New.
11093 (tracepoint_look_up_symbols): New.
11094 (debug_threads) [IN_PROCESS_AGENT]: New.
11095 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11096 (UNKNOWN_SIDE_EFFECTS): New.
11097 (stop_tracing): New.
11098 (flush_trace_buffer): New.
11099 (stop_tracing_bkpt): New.
11100 (flush_trace_buffer_bkpt): New.
11101 (read_inferior_integer): New.
11102 (read_inferior_uinteger): New.
11103 (read_inferior_data_pointer): New.
11104 (write_inferior_data_pointer): New.
11105 (write_inferior_integer): New.
11106 (write_inferior_uinteger): New.
11107 (struct collect_static_trace_data_action): Delete.
11108 (enum tracepoint_type): New.
11109 (struct tracepoint) <type>: New field `type'.
11110 <actions_str, step_actions, step_actions_str>: Only include in
11111 GDBserver.
11112 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11113 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11114 (tracepoints): Use IP_AGENT_EXPORT.
11115 (last_tracepoint): Don't include in the IPA.
11116 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11117 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11118 (alloced_trace_state_variables): New.
11119 (trace_state_variables): Use IP_AGENT_EXPORT.
11120 (traceframe_t): Delete unused variable.
11121 (circular_trace_buffer): Don't include in the IPA.
11122 (trace_buffer_start): Delete.
11123 (struct trace_buffer_control): New.
11124 (trace_buffer_free): Delete.
11125 (struct ipa_trace_buffer_control): New.
11126 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11127 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11128 New.
11129 (trace_buffer_ctrl): New.
11130 (TRACE_BUFFER_CTRL_CURR): New.
11131 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11132 Reimplement as macros.
11133 (trace_buffer_wrap): Delete.
11134 (traceframe_write_count, traceframe_read_count)
11135 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11136 (struct tracepoint_hit_ctx) <type>: New field.
11137 (struct fast_tracepoint_ctx): New.
11138 (memory_barrier): New.
11139 (cmpxchg): New.
11140 (record_tracepoint_error): Update atomically in the IPA.
11141 (clear_inferior_trace_buffer): New.
11142 (about_to_request_buffer_space): New.
11143 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11144 updating the same buffer.
11145 (add_tracepoint): Default the tracepoint's type to trap
11146 tracepoint, and orig_size to -1.
11147 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11148 internal variables.
11149 (create_trace_state_variable): New parameter `gdb'. Handle it.
11150 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11151 (cmd_qtdp): Handle fast tracepoints.
11152 (cmd_qtdv): Adjust.
11153 (max_jump_pad_size): New.
11154 (gdb_jump_pad_head): New.
11155 (get_jump_space_head): New.
11156 (claim_jump_space): New.
11157 (sort_tracepoints): New.
11158 (MAX_JUMP_SIZE): New.
11159 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11160 IPA.
11161 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11162 support. Upload fast traceframes, and delete internal IPA
11163 breakpoints.
11164 (stop_tracing_handler): New.
11165 (flush_trace_buffer_handler): New.
11166 (cmd_qtstop): Upload fast tracepoints.
11167 (response_tracepoint): Handle fast tracepoints.
11168 (tracepoint_finished_step): Upload fast traceframes. Set the
11169 tracepoint hit context's tracepoint type.
11170 (handle_tracepoint_bkpts): New.
11171 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11172 type. Add comment about fast tracepoints.
11173 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11174 non-existing action_str field.
11175 (get_context_regcache): Handle fast tracepoints.
11176 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11177 to the regcache.
11178 (fast_tracepoint_from_jump_pad_address): New.
11179 (fast_tracepoint_from_ipa_tpoint_address): New.
11180 (collecting_t): New.
11181 (force_unlock_trace_buffer): New.
11182 (fast_tracepoint_collecting): New.
11183 (collecting): New.
11184 (gdb_collect): New.
11185 (write_inferior_data_ptr): New.
11186 (target_tp_heap): New.
11187 (target_malloc): New.
11188 (download_agent_expr): New.
11189 (UALIGN): New.
11190 (download_tracepoints): New.
11191 (download_trace_state_variables): New.
11192 (upload_fast_traceframes): New.
11193 (IPA_FIRST_TRACEFRAME): New.
11194 (IPA_NEXT_TRACEFRAME_1): New.
11195 (IPA_NEXT_TRACEFRAME): New.
11196 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11197 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11198 (gdb_jump_pad_buffer_end): New.
11199 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11200 (initialize_tracepoint): Adjust.
11201 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11202 buffer. Initialize the low module.
11203 * utils.c (PREFIX, TOOLNAME): New.
11204 (malloc_failure): Use PREFIX.
11205 (error): In the IPA, an error causes an exit.
11206 (fatal, warning): Use PREFIX.
11207 (internal_error): Use TOOLNAME.
11208 (NUMCELLS): Increase to 10.
11209 * configure, config.in: Regenerate.
11210
11211 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11212
11213 * server.c (handle_query) <qSupported>: Do two passes over the
11214 qSupported string to avoid nesting strtok.
11215
11216 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11217
11218 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11219 (CDEPS): New.
11220 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11221 -Wl,--dynamic-list.
11222 * configure: Regenerate.
11223 * proc-service.list: New.
11224
11225 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11226
11227 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11228 New comment.
11229
11230 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11231
11232 * gdbreplay.c (remote_open): Check error return from socket() call by
11233 its equality to -1 not by it being negative.
11234 * remote-utils.c (remote_open): Likewise.
11235
11236 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11237
11238 * config.h: Regenerate.
11239
11240 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11241
11242 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11243 doesn't provide PTRACE_GET_THREAD_AREA.
11244
11245 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11246
11247 * linux-m68k-low.c: Include <asm/ptrace.h>
11248 (ps_get_thread_area): Implement.
11249
11250 2010-05-03 Doug Evans <dje@google.com>
11251
11252 * event-loop.c (struct callback_event): New struct.
11253 (callback_list): New global.
11254 (append_callback_event, delete_callback_event): New functions.
11255 (process_callback): New function.
11256 (start_event_loop): Call it.
11257 * remote-utils.c (NOT_SCHEDULED): Define.
11258 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11259 moved out of readchar.
11260 (readchar): Rewrite. Call reschedule before returning.
11261 (reset_readchar): New function.
11262 (remote_close): Call it.
11263 (process_remaining, reschedule): New functions.
11264 * server.h (callback_handler_func): New typedef.
11265 (append_callback_event, delete_callback_event): Declare.
11266
11267 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11268
11269 * proc-service.c (ps_pglobal_lookup): Use
11270 thread_db_look_up_one_symbol.
11271 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11272 parameter. Use it instead of all_symbols_looked_up.
11273 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11274 field.
11275 (all_symbols_looked_up): Don't declare.
11276 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11277 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11278 field.
11279 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11280 Set all_symbols_looked_up here.
11281 (thread_db_look_up_one_symbol): New.
11282 (thread_db_get_tls_address): Adjust.
11283 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11284 thread_db object on the heap, and tentatively set it in the
11285 process structure.
11286 (thread_db_init): Don't set all_symbols_looked_up here.
11287 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11288
11289 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11290
11291 * linux-low.c (linux_kill, linux_detach): Adjust.
11292 (status_pending_p_callback): Remove redundant statement. Check
11293 for !TARGET_WAITIKIND_IGNORE, instead of
11294 TARGET_WAITKIND_STOPPED.
11295 (handle_tracepoints): Make sure LWP is locked. Adjust.
11296 (linux_wait_for_event_1): Adjust.
11297 (linux_cancel_breakpoints): New.
11298 (unsuspend_one_lwp): New.
11299 (unsuspend_all_lwps): New.
11300 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11301 (send_sigstop_callback): Change return type to int, add new
11302 `except' parameter and handle it.
11303 (suspend_and_send_sigstop_callback): New.
11304 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11305 pass them down. If SUSPEND, also increment the lwp's suspend
11306 count.
11307 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11308 (need_step_over_p): Don't consider suspended LWPs.
11309 (start_step_over): Adjust.
11310 (proceed_one_lwp): Change return type to int, add new `except'
11311 parameter and handle it.
11312 (unsuspend_and_proceed_one_lwp): New.
11313 (proceed_all_lwps): Use find_inferior instead of
11314 for_each_inferior.
11315 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11316 also decrement the suspend count of LWPs. Pass `except' down,
11317 instead of hacking its suspend count.
11318 (linux_pause_all): Add `freeze' parameter. Adjust.
11319 (linux_unpause_all): New.
11320 (linux_target_ops): Install linux_unpause_all.
11321 * server.c (handle_status): Adjust.
11322 * target.h (struct target_ops): New fields `unpause_all' and
11323 `cancel_breakpoints'. Add new parameter to `pause_all'.
11324 (pause_all): Add new `freeze' parameter.
11325 (unpause_all): New.
11326 (cancel_breakpoints): New.
11327 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11328 cancel breakpoints.
11329 (cmd_qtstart): Pause threads.
11330 (stop_tracing): Pause threads, and cancel breakpoints.
11331 * win32-low.c (win32_target_ops): Adjust.
11332
11333 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11334
11335 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11336 the inferior right away from here...
11337 (linux_wait_1): ... to here, and adjust to check the thread's
11338 last_resume_kind instead of the lwp's step or stop_expected flags.
11339
11340 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11341
11342 * README: Use consistent `GDB' and `GDBserver' spellings.
11343
11344 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11345
11346 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11347 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11348 (linux_detach_one_lwp): Assume the lwp is stopped.
11349 (any_thread_of): Delete.
11350 (linux_detach): Stop all lwps here. Don't blindly delete all
11351 breakpoints.
11352 (delete_lwp_callback): New.
11353 (linux_mourn): Delete all lwps of the process that is gone.
11354 (linux_wait_1): Don't delete the last lwp of the process here.
11355 * mem-break.h (mark_breakpoints_out): Declare.
11356 * mem-break.c (mark_breakpoints_out): New.
11357 (free_all_breakpoints): Use it.
11358 * server.c (handle_target_event): If the process is gone, mark
11359 breakpoints out.
11360 * thread-db.c (struct thread_db) <create_bp>: New field.
11361 (thread_db_enable_reporting): Fix prototype. Store a thread event
11362 breakpoint reference in the thread_db struct.
11363 (thread_db_load_search): Clear the thread_db object.
11364 (try_thread_db_load_1): Ditto.
11365 (switch_to_process): New.
11366 (disable_thread_event_reporting): Use it.
11367 (remove_thread_event_breakpoints): New.
11368 (thread_db_detach, thread_db_mourn): Use it.
11369
11370 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11371
11372 * linux-low.c (linux_enable_event_reporting): New.
11373 (linux_wait_for_event_1, handle_extended_wait): Use it.
11374
11375 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11376
11377 * linux-low.c (linux_kill_one_lwp, linux_kill)
11378 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11379 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11380 SIGSTOP even if the LWP is stopped.
11381 (send_sigstop_callback): New.
11382 (stop_all_lwps): Use send_sigstop_callback instead.
11383 (linux_resume_one_thread): Adjust.
11384 (proceed_one_lwp): Still proceed an LWP that the client has
11385 requested to stop, if we haven't reported it as stopped yet. Make
11386 sure that LWPs the client want stopped, have a pending SIGSTOP.
11387
11388 2010-04-26 Doug Evans <dje@google.com>
11389
11390 * server.c (handle_general_set): Make static.
11391
11392 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11393 Print received char after testing for error/eof instead of before.
11394 (input_interrupt): Tweak comment.
11395
11396 2010-04-23 Doug Evans <dje@google.com>
11397
11398 * server.c (start_inferior): Print inferior argv if --debug.
11399
11400 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11401
11402 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11403 * nto-x86-low.c: Include server.h
11404
11405 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11406
11407 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11408 be consistent with other sources of this directory.
11409 (init_registers_amd64): Correct name of source file of this function
11410 in the comment.
11411
11412 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11413
11414 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11415 64-bit executables.
11416
11417 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11418
11419 * win32-i386-low.c: Add 64-bit support.
11420 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11421 (init_registers_amd64): Declare.
11422 (mappings): Add 64-bit version of array.
11423 (init_windows_x86): New function.
11424 (the_low_target): Change init_arch field to init_windows_x86.
11425
11426 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11427
11428 * win32-low.c: Adapt to support also 64-bit architecture.
11429 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11430 (get_image_name): Use SIZE_T type for local variable `done'.
11431 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11432 (toolhelp_get_dll_name): Idem.
11433 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11434 Use uintptr_t typecast to avoid warning.
11435 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11436 (handle_exception): Use phex_nz to avoid warning.
11437 (win32_wait): Remove unused local variable `process'.
11438
11439 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11440
11441 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11442 `amd64-avx.o'.
11443
11444 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11445
11446 * configure.ac: Use `ws2_32' library for srv_mingw.
11447 * configure: Regenerate.
11448 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11449 * remote-utils.c: Likewise.
11450
11451 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11452
11453 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11454 if __x86_64__ is defined.
11455
11456 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11457
11458 * configure: Regenerate.
11459
11460 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11461
11462 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11463 * target.h (target_ops): New get_tib_address field.
11464 * win32-low.h (win32_thread_info): Add thread_local_base field.
11465 * win32-low.c (child_add_thread): Add tlb argument.
11466 Set thread_local_base field to TLB.
11467 (get_child_debug_event): Adapt to child_add_thread change.
11468 (win32_get_tib_address): New function.
11469 (win32_target_ops): Set get_tib_address field to
11470 win32_get_tib_address.
11471 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11472
11473 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11474
11475 * linux-low.c (linux_mourn): Also remove the process.
11476 * server.c (handle_target_event): Don't remove the process here.
11477 * nto-low.c (nto_mourn): New.
11478 (nto_target_ops): Install it.
11479 * spu-low.c (spu_mourn): New.
11480 (spu_target_ops): Install it.
11481 * win32-low.c (win32_mourn): New.
11482 (win32_target_ops): Install it.
11483
11484 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11485
11486 * server.h (buffer_xml_printf): Remove redundant `;'.
11487
11488 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11489
11490 * regcache.c (set_register_cache): Invalidate regcaches before
11491 changing the register cache layout.
11492 (regcache_invalidate_one): Allow a NULL regcache.
11493 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11494 regcaches before changing the register cache layout or the target
11495 regsets.
11496
11497 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11498
11499 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11500 variable warning on Linux/x86-64.
11501
11502 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11503
11504 GDBserver disconnected tracing support.
11505
11506 * linux-low.c (linux_remove_process): Delete.
11507 (add_lwp): Don't set last_resume_kind here.
11508 (linux_kill): Use `mourn'.
11509 (linux_detach): Use `thread_db_detach', and `mourn'.
11510 (linux_mourn): New.
11511 (linux_attach_lwp_1): Adjust comment.
11512 (linux_attach): last_resume_kind moved the thread_info; adjust.
11513 (status_pending_p_callback): Adjust.
11514 (linux_wait_for_event_1): Adjust.
11515 (count_events_callback, select_singlestep_lwp_callback)
11516 (select_event_lwp_callback, cancel_breakpoints_callback)
11517 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11518 (proceed_one_lwp): Adjust.
11519 (linux_async): Add debug output.
11520 (linux_thread_stopped): New.
11521 (linux_pause_all): New.
11522 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11523 linux_pause_all.
11524 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11525 (thread_db_free): Delete declaration.
11526 (thread_db_detach, thread_db_mourn): Declare.
11527 * thread-db.c (thread_db_init): Use thread_db_mourn.
11528 (thread_db_free): Delete, split in two.
11529 (disable_thread_event_reporting): New.
11530 (thread_db_detach): New.
11531 (thread_db_mourn): New.
11532
11533 * server.h (struct thread_info) <last_resume_kind>: New field.
11534 <attached>: Add comment.
11535 <gdb_detached>: New field.
11536 (handler_func): Change return type to int.
11537 (handle_serial_event, handle_target_event): Ditto.
11538 (gdb_connected): Declare.
11539 (tracing): Delete.
11540 (disconnected_tracing): Declare.
11541 (stop_tracing): Declare.
11542
11543 * server.c (handle_query) <qSupported>: Report support for
11544 disconnected tracing.
11545 (queue_stop_reply_callback): Account for running threads.
11546 (gdb_wants_thread_stopped): New.
11547 (gdb_wants_all_threads_stopped): New.
11548 (gdb_reattached_process): New.
11549 (handle_status): Clear the `gdb_detached' flag of all processes.
11550 In all-stop, stop all threads.
11551 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11552 (process_serial_event): If the remote connection breaks, or if an
11553 exit was forced with "monitor exit", force an event loop exit.
11554 Handle disconnected tracing on detach.
11555 (handle_serial_event): Adjust.
11556 (handle_target_event): If GDB isn't connected, forward events back
11557 to the inferior, unless the last process exited, in which case,
11558 exit gdbserver. Adjust interface.
11559
11560 * remote-utils.c (remote_open): Don't block in accept. Instead
11561 register an event loop source on the listen socket file
11562 descriptor. Refactor bits into ...
11563 (listen_desc): ... this new global.
11564 (gdb_connected): ... this new function.
11565 (enable_async_notification): ... this new function.
11566 (handle_accept_event): ... this new function.
11567 (remote_close): Clear remote_desc.
11568
11569 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11570
11571 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11572 New fields.
11573 (mourn_inferior): Define.
11574 (target_process_qsupported): Avoid the dangling else problem.
11575 (thread_stopped): Define.
11576 (pause_all): Define.
11577 (target_waitstatus_to_string): Declare.
11578 * target.c (target_waitstatus_to_string): New.
11579
11580 * tracepoint.c (tracing): Make extern.
11581 (disconnected_tracing): New.
11582 (stop_tracing): Make extern. Handle tracing stops due to GDB
11583 disconnecting.
11584 (cmd_qtdisconnected): New.
11585 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11586 (handle_tracepoint_general_set): Handle QTDisconnected.
11587
11588 * event-loop.c (event_handler_func): Change return type to int.
11589 (process_event): Bail out if the event handler wants the event
11590 loop to stop.
11591 (handle_file_event): Ditto.
11592 (start_event_loop): Bail out if the event handler wants the event
11593 loop to stop.
11594
11595 * nto-low.c (nto_target_ops): Adjust.
11596 * spu-low.c (spu_wait): Don't remove the process here.
11597 (spu_target_ops): Adjust.
11598 * win32-low.c (win32_wait): Don't remove the process here.
11599 (win32_target_ops): Adjust.
11600
11601 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11602
11603 * regcache.c (realloc_register_cache): Invalidate inferior's
11604 regcache before recreating it.
11605
11606 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11607
11608 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11609
11610 2010-04-09 Stan Shebs <stan@codesourcery.com>
11611 Pedro Alves <pedro@codesourcery.com>
11612
11613 * server.h (LONGEST): New.
11614 (struct thread_info) <while_stepping>: New field.
11615 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11616 Declare.
11617 (initialize_tracepoint, handle_tracepoint_general_set)
11618 (handle_tracepoint_query, tracepoint_finished_step)
11619 (tracepoint_was_hit, release_while_stepping_state_list):
11620 (current_traceframe): Declare.
11621 * server.c (handle_general_set): Handle tracepoint packets.
11622 (read_memory): New.
11623 (write_memory): New.
11624 (handle_search_memory_1): Use read_memory.
11625 (handle_query): Report support for conditional tracepoints, trace
11626 state variables, and tracepoint sources. Handle tracepoint
11627 queries.
11628 (main): Initialize the tracepoints module.
11629 (process_serial_event): Handle traceframe reads/writes.
11630
11631 * linux-low.c (handle_tracepoints): New.
11632 (linux_wait_1): Call it.
11633 (linux_resume_one_lwp): Handle while-stepping.
11634 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11635 (linux_target_ops): Install them.
11636 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11637 New field.
11638 * linux-x86-low.c (x86_supports_tracepoints): New.
11639 (the_low_target). Install it.
11640
11641 * mem-break.h (delete_breakpoint): Declare.
11642 * mem-break.c (delete_breakpoint): Make external.
11643
11644 * target.h (struct target_ops): Add `supports_tracepoints',
11645 `read_pc', and `write_pc' fields.
11646 (target_supports_tracepoints): Define.
11647 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11648 (phex_nz): New.
11649
11650 * regcache.h (struct regcache) <registers_owned>: New field.
11651 (init_register_cache, regcache_cpy): Declare.
11652 (regcache_read_pc, regcache_write_pc): Declare.
11653 (register_cache_size): Declare.
11654 (supply_regblock): Declare.
11655 * regcache.c (init_register_cache): New.
11656 (new_register_cache): Use it.
11657 (regcache_cpy): New.
11658 (register_cache_size): New.
11659 (supply_regblock): New.
11660 (regcache_read_pc, regcache_write_pc): New.
11661
11662 * tracepoint.c: New.
11663
11664 * Makefile.in (OBS): Add tracepoint.o.
11665 (tracepoint.o): New rule.
11666
11667 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11668
11669 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11670 (i386-mmx.o): New.
11671 (i386-mmx.c): Likewise.
11672 (i386-mmx-linux.o): Likewise.
11673 (i386-mmx-linux.c): Likewise.
11674
11675 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11676 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11677 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11678 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11679
11680 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11681 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11682 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11683
11684 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11685
11686 * Makefile.in (clean): Updated.
11687 (i386-avx.o): New.
11688 (i386-avx.c): Likewise.
11689 (i386-avx-linux.o): Likewise.
11690 (i386-avx-linux.c): Likewise.
11691 (amd64-avx.o): Likewise.
11692 (amd64-avx.c): Likewise.
11693 (amd64-avx-linux.o): Likewise.
11694 (amd64-avx-linux.c): Likewise.
11695
11696 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11697 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11698 (srv_amd64_regobj): Add amd64-avx.o.
11699 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11700 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11701 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11702 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11703 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11704 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11705 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11706
11707 * i387-fp.c: Include "i386-xstate.h".
11708 (i387_xsave): New.
11709 (i387_cache_to_xsave): Likewise.
11710 (i387_xsave_to_cache): Likewise.
11711 (x86_xcr0): Likewise.
11712
11713 * i387-fp.h (i387_cache_to_xsave): Likewise.
11714 (i387_xsave_to_cache): Likewise.
11715 (x86_xcr0): Likewise.
11716
11717 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11718 * linux-crisv32-low.c (target_regsets): Likewise.
11719 * linux-m68k-low.c (target_regsets): Likewise.
11720 * linux-mips-low.c (target_regsets): Likewise.
11721 * linux-ppc-low.c (target_regsets): Likewise.
11722 * linux-s390-low.c (target_regsets): Likewise.
11723 * linux-sh-low.c (target_regsets): Likewise.
11724 * linux-sparc-low.c (target_regsets): Likewise.
11725 * linux-xtensa-low.c (target_regsets): Likewise.
11726
11727 * linux-low.c: Include <sys/uio.h>.
11728 (regsets_fetch_inferior_registers): Support nt_type.
11729 (regsets_store_inferior_registers): Likewise.
11730 (linux_process_qsupported): New.
11731 (linux_target_ops): Add linux_process_qsupported.
11732
11733 * linux-low.h (regset_info): Add nt_type.
11734 (linux_target_ops): Add process_qsupported.
11735
11736 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11737 and <sys/uio.h>.
11738 (init_registers_i386_avx_linux): New.
11739 (init_registers_amd64_avx_linux): Likewise.
11740 (xmltarget_i386_linux_no_xml): Likewise.
11741 (xmltarget_amd64_linux_no_xml): Likewise.
11742 (PTRACE_GETREGSET): Likewise.
11743 (PTRACE_SETREGSET): Likewise.
11744 (x86_fill_xstateregset): Likewise.
11745 (x86_store_xstateregset): Likewise.
11746 (use_xml): Likewise.
11747 (x86_linux_update_xmltarget): Likewise.
11748 (x86_linux_process_qsupported): Likewise.
11749 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11750 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11751 init_registers_i386_linux here. Call
11752 x86_linux_update_xmltarget.
11753 (the_low_target): Add x86_linux_process_qsupported.
11754
11755 * server.c (handle_query): Call target_process_qsupported.
11756
11757 * target.h (target_ops): Add process_qsupported.
11758 (target_process_qsupported): New.
11759
11760 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11761
11762 * inferiors.c (add_thread): Set last_status kind to
11763 TARGET_WAITKIND_IGNORE.
11764 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11765 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11766 (linux_wait_1): Move `thread' local definition to block that uses
11767 it. Don't NULL initialize `event_child'.
11768 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11769 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11770 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11771
11772 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11773
11774 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11775 an extended waitstatus, or by a watchpoint.
11776 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11777 thread was stepping or has been stopped by a watchpoint.
11778
11779 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11780
11781 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11782 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11783 of another, then delete the previous, and validate all
11784 breakpoints.
11785 (validate_inserted_breakpoint): New.
11786 (delete_disabled_breakpoints): New.
11787 (validate_breakpoints): New.
11788 (check_mem_read): Validate breakpoints before trusting their
11789 shadow. Delete disabled breakpoints.
11790 (check_mem_write): Validate breakpoints before trusting they
11791 should be inserted. Delete disabled breakpoints.
11792 * mem-break.h (validate_breakpoints):
11793 * server.c (handle_query): Validate breakpoints when we see a
11794 qSymbol query.
11795
11796 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11797
11798 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11799 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11800 if we could tell there's a GDB breakpoint at stop_pc.
11801 (need_step_over_p): Don't do a step over if we find a GDB
11802 breakpoint at the resume PC.
11803
11804 * mem-break.c (struct raw_breakpoint): New.
11805 (enum bkpt_type): New type `gdb_breakpoint'.
11806 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11807 fields. New field `raw'.
11808 (find_raw_breakpoint_at): New.
11809 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11810 breakpoint instead.
11811 (set_breakpoint_at): Adjust.
11812 (delete_raw_breakpoint): New.
11813 (release_breakpoint): New.
11814 (delete_breakpoint): Rename to...
11815 (delete_breakpoint_1): ... this. Add proc parameter. Use
11816 release_breakpoint. Return ENOENT.
11817 (delete_breakpoint): Reimplement.
11818 (find_breakpoint_at): Delete.
11819 (find_gdb_breakpoint_at): New.
11820 (delete_breakpoint_at): Delete.
11821 (set_gdb_breakpoint_at): New.
11822 (delete_gdb_breakpoint_at): New.
11823 (gdb_breakpoint_here): New.
11824 (set_reinsert_breakpoint): Use release_breakpoint.
11825 (uninsert_breakpoint): Rename to ...
11826 (uninsert_raw_breakpoint): ... this.
11827 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11828 (reinsert_raw_breakpoint): Change parameter type to
11829 raw_breakpoint.
11830 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11831 instead.
11832 (check_breakpoints): Adjust. Use release_breakpoint.
11833 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11834 (breakpoint_inserted_here): Ditto.
11835 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11836 Don't trust the breakpoint's shadow if it is not inserted.
11837 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11838 (delete_all_breakpoints): Adjust.
11839 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11840 use delete_breakpoint_1.
11841
11842 * mem-break.h (breakpoints_supported): Delete declaration.
11843 (set_gdb_breakpoint_at): Declare.
11844 (gdb_breakpoint_here): Declare.
11845 (delete_breakpoint_at): Delete.
11846 (delete_gdb_breakpoint_at): Declare.
11847
11848 * server.h (struct raw_breakpoint): Forward declare.
11849 (struct process_info): New field `raw_breakpoints'.
11850
11851 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11852 breakpoints.
11853
11854 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11855
11856 * linux-low.c (status_pending_p_callback): Fix comment.
11857 (linux_wait_for_event_1): Move most of the internal breakpoint
11858 handling from here...
11859 (linux_wait_1): ... to here.
11860 (count_events_callback): New.
11861 (select_singlestep_lwp_callback): New.
11862 (select_event_lwp_callback): New.
11863 (cancel_breakpoints_callback): New.
11864 (select_event_lwp): New.
11865 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11866 priority to all LWPs that have had events that should be reported
11867 to the client. Cancel breakpoints when about to reporting the
11868 event to the client, not while stopping lwps. No longer cancel
11869 finished single-steps here.
11870 (cancel_finished_single_step): Delete.
11871 (cancel_finished_single_steps): Delete.
11872
11873 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11874
11875 * mem-break.c (enum bkpt_type): New.
11876 (struct breakpoint): New field `type'.
11877 (set_breakpoint_at): Change return type to struct breakpoint
11878 pointer. Set type to `other_breakpoint' by default.
11879 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11880 in the breakpoint list.
11881 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11882 (reinsert_breakpoint): Rename to ...
11883 (reinsert_raw_breakpoint): ... this.
11884 (reinsert_breakpoints_at): Adjust.
11885 * mem-break.h (struct breakpoint): Declare.
11886 (set_breakpoint_at): Change return type to struct breakpoint
11887 pointer.
11888
11889 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11890
11891 * server.c (handle_query): Assign, not compare.
11892
11893 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11894
11895 Teach linux gdbserver to step-over-breakpoints.
11896
11897 * linux-low.c (can_hardware_single_step): New.
11898 (supports_breakpoints): New.
11899 (handle_extended_wait): If stopping threads, read the stop pc of
11900 the new cloned LWP.
11901 (get_pc): New.
11902 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11903 low target doesn't support retrieving the PC.
11904 (add_lwp): Set last_resume_kind to resume_continue.
11905 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11906 (linux_attach): Don't clear stop_expected. Set the lwp's
11907 last_resume_kind to resume_stop.
11908 (linux_detach_one_lwp): Don't check for removed breakpoints.
11909 (check_removed_breakpoint): Delete.
11910 (status_pending_p): Rename to ...
11911 (status_pending_p_callback): ... this. Don't check for removed
11912 breakpoints. Don't consider threads that are stopped from GDB's
11913 perspective.
11914 (linux_wait_for_lwp): Always read the stop_pc here.
11915 (cancel_breakpoint): New.
11916 (step_over_bkpt): New global.
11917 (linux_wait_for_event_1): Implement stepping over breakpoints.
11918 (gdb_wants_lwp_stopped): New.
11919 (gdb_wants_all_stopped): New.
11920 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11921 single-step traps here. Store the thread's last reported target
11922 wait status.
11923 (send_sigstop): Don't clear stop_expected. Always set it,
11924 instead.
11925 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11926 (cancel_finished_single_step): New.
11927 (cancel_finished_single_steps): New.
11928 (wait_for_sigstop): Don't cancel finished single-step traps here.
11929 (linux_resume_one_lwp): Don't check for removed breakpoints.
11930 Don't set `step' on non-hardware step archs.
11931 (linux_set_resume_request): Ignore resume_stop requests if already
11932 stopping or stopped. Set the lwp's last_resume_kind.
11933 (resume_status_pending_p): Don't check for removed breakpoints.
11934 (need_step_over_p): New.
11935 (start_step_over): New.
11936 (finish_step_over): New.
11937 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11938 requests. Clear the thread's last reported target waitstatus.
11939 Don't use the `suspended' flag. Don't consider pending breakpoints.
11940 (linux_resume): Start a step-over if necessary.
11941 (proceed_one_lwp): New.
11942 (proceed_all_lwps): New.
11943 (unstop_all_lwps): New.
11944 * linux-low.h (struct lwp_info): Rewrite comment for the
11945 `suspended' flag. Add the `stop_pc' field. Delete the
11946 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11947 Add `'last_resume_kind' and `need_step_over' fields.
11948 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11949 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11950 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11951 (set_raw_breakpoint_at): New.
11952 (set_breakpoint_at): Rewrite to use it.
11953 (reinsert_breakpoint_handler): Delete.
11954 (set_reinsert_breakpoint): New.
11955 (reinsert_breakpoint_by_bp): Delete.
11956 (delete_reinsert_breakpoints): New.
11957 (uninsert_breakpoint): Rewrite.
11958 (uninsert_breakpoints_at): New.
11959 (reinsert_breakpoint): Rewrite.
11960 (reinsert_breakpoints_at): New.
11961 (check_breakpoints): Rewrite.
11962 (breakpoint_here): New.
11963 (breakpoint_inserted_here): New.
11964 (check_mem_read): Adjust.
11965 * mem-break.h (breakpoints_supported, breakpoint_here)
11966 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11967 (reinsert_breakpoint_by_bp): Delete declaration.
11968 (delete_reinsert_breakpoints): Declare.
11969 (reinsert_breakpoint): Delete declaration.
11970 (reinsert_breakpoints_at): Declare.
11971 (uninsert_breakpoint): Delete declaration.
11972 (uninsert_breakpoints_at): Declare.
11973 (check_breakpoints): Adjust prototype.
11974 * server.h: Adjust include order.
11975 (struct thread_info): Declare here. Add a `last_status' field.
11976
11977 2010-03-23 Michael Snyder <msnyder@vmware.com>
11978
11979 * server.c (crc32): New function.
11980 (handle_query): Add handling for 'qCRC:' request.
11981
11982 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11983
11984 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11985 lwp had been stopped by a watchpoint.
11986
11987 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11988
11989 * server.h (internal_error): Declare.
11990 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11991 * utils.c (internal_error): New function.
11992
11993 2010-03-15 Andreas Schwab <schwab@redhat.com>
11994
11995 * configure.srv: Fix typo setting srv_regobj.
11996
11997 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11998
11999 * linux-low.c (fetch_register): Avoid passing a non string literal
12000 format to `error'.
12001 (usr_store_inferior_registers): Ditto.
12002
12003 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12004
12005 * linux-low.c (linux_write_memory): Bail out early if peeking
12006 memory failed.
12007
12008 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12009
12010 * linux-low.h (struct lwp_info): New fields
12011 `stopped_by_watchpoint' and `stopped_data_address'.
12012 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12013 here, and cache them in the lwp object.
12014 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12015 directly.
12016 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12017 field.
12018 (linux_stopped_by_watchpoint): Rewrite.
12019 (linux_stopped_data_address): Rewrite.
12020
12021 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12022
12023 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12024 switching the current inferior, not before.
12025
12026 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12027
12028 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12029 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12030 i386-linux.c and amd64-linux.c.
12031 (reg-i386.o): Removed.
12032 (reg-i386.c): Likewise.
12033 (reg-i386-linux.o): Likewise.
12034 (reg-i386-linux.c): Likewise.
12035 (reg-x86-64.o): Likewise.
12036 (reg-x86-64.c): Likewise.
12037 (reg-x86-64-linux.o): Likewise.
12038 (reg-x86-64-linux.c): Likewise.
12039 (i386.o): New.
12040 (i386.c): Likewise.
12041 (i386-linux.o): Likewise.
12042 (i386-linux.c): Likewise.
12043 (amd64.o): Likewise.
12044 (amd64.c): Likewise.
12045 (amd64-linux.o): Likewise.
12046 (amd64-linux.c): Likewise.
12047
12048 * configure.srv (srv_i386_regobj): New.
12049 (srv_i386_linux_regobj): Likewise.
12050 (srv_amd64_regobj): Likewise.
12051 (srv_amd64_linux_regobj): Likewise.
12052 (srv_i386_32bit_xmlfiles): Likewise.
12053 (srv_i386_64bit_xmlfiles): Likewise.
12054 (srv_i386_xmlfiles): Likewise.
12055 (srv_amd64_xmlfiles): Likewise.
12056 (srv_i386_linux_xmlfiles): Likewise.
12057 (srv_amd64_linux_xmlfiles): Likewise.
12058 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12059 srv_xmlfiles to $srv_i386_xmlfiles.
12060 (i[34567]86-*-mingw32ce*): Likewise.
12061 (i[34567]86-*-mingw*): Likewise.
12062 (i[34567]86-*-nto*): Likewise.
12063 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12064 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12065 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12066 (x86_64-*-linux*): Likewise.
12067
12068 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12069 (init_registers_amd64_linux): New.
12070 (x86_arch_setup): Replace init_registers_x86_64_linux with
12071 init_registers_amd64_linux.
12072
12073 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12074
12075 * configure.ac: Check for libdl. If it is not available link against
12076 static libthread_db.
12077 * configure: Regenerate.
12078
12079 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12080
12081 PR9605
12082
12083 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12084 handing a read watchpoint.
12085 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12086
12087 2010-02-12 Doug Evans <dje@google.com>
12088
12089 * linux-low.c (linux_supports_tracefork_flag): Document.
12090 (linux_look_up_symbols): Add comment.
12091
12092 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12093
12094 * regcache.c (supply_register): Clear regcache if buf is NULL.
12095
12096 2010-02-02 Nicolas Roche <roche@sourceware.org>
12097 Joel Brobecker <brobecker@adacore.com>
12098
12099 * inferiors.c (find_inferior): Add function documentation.
12100 (unloaded_dll): Handle the case where the unloaded dll has not
12101 been previously registered in the dll list.
12102
12103 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12104
12105 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12106 (thumb2_breakpoint): New.
12107 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12108
12109 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12110
12111 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12112 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12113 breakpoints.
12114
12115 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12116
12117 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12118
12119 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12120
12121 * linux-s390-low.c (s390_collect_ptrace_register)
12122 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12123
12124 2010-01-21 Doug Evans <dje@google.com>
12125
12126 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12127 (PTRACE_ARG4_TYPE): New macro.
12128 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12129 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12130 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12131 (usr_store_inferior_registers): Ditto.
12132 (linux_read_memory, linux_write_memory): Ditto.
12133 (linux_test_for_tracefork): Ditto.
12134
12135 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12136 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12137
12138 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12139
12140 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12141 target.
12142
12143 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12144
12145 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12146 prototype to take a regcache. Adjust.
12147
12148 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12149
12150 * regcache.h (struct thread_info): Forward declare.
12151 (struct regcache): New.
12152 (new_register_cache): Adjust prototype.
12153 (get_thread_regcache): Declare.
12154 (free_register_cache): Adjust prototype.
12155 (registers_to_string, registers_from_string): Ditto.
12156 (supply_register, supply_register_by_name, collect_register)
12157 (collect_register_as_string, collect_register_by_name): Ditto.
12158 * regcache.c (struct inferior_regcache_data): Delete.
12159 (get_regcache): Rename to ...
12160 (get_thread_regcache): ... this. Adjust. Switch inferior before
12161 fetching registers.
12162 (regcache_invalidate_one): Adjust.
12163 (regcache_invalidate): Fix prototype.
12164 (new_register_cache): Return the new register cache.
12165 (free_register_cache): Change prototype.
12166 (realloc_register_cache): Adjust.
12167 (registers_to_string): Change prototype to take a regcache. Adjust.
12168 (registers_from_string): Ditto.
12169 (register_data): Ditto.
12170 (supply_register): Ditto.
12171 (supply_register_by_name): Ditto.
12172 (collect_register): Ditto.
12173 (collect_register_as_string): Ditto.
12174 (collect_register_by_name): Ditto.
12175 * server.c (process_serial_event): Adjust.
12176 * linux-low.h (regset_fill_func, regset_store_func): Change
12177 prototype.
12178 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12179 Change prototype.
12180 * linux-low.c (get_stop_pc): Adjust.
12181 (check_removed_breakpoint): Adjust.
12182 (linux_wait_for_event): Adjust.
12183 (linux_resume_one_lwp): Adjust.
12184 (fetch_register): Add regcache parameter. Adjust.
12185 (usr_store_inferior_registers): Ditto.
12186 (regsets_fetch_inferior_registers): Ditto.
12187 (regsets_store_inferior_registers): Ditto.
12188 (linux_fetch_registers, linux_store_registers): Ditto.
12189 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12190 regcache. Adjust.
12191 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12192 Ditto.
12193 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12194 prototype to take a regcache.
12195 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12196 * remote-utils.c (convert_ascii_to_int, outreg)
12197 (prepare_resume_reply): Change prototype to take a regcache.
12198 Adjust.
12199 * target.h (struct target_ops) <fetch_registers, store_registers>:
12200 Change prototype to take a regcache.
12201 (fetch_inferior_registers, store_inferior_registers): Change
12202 prototype to take a regcache. Adjust.
12203 * proc-service.c (ps_lgetregs): Adjust.
12204 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12205 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12206 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12207 take a regcache. Adjust.
12208 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12209 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12210 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12211 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12212 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12213 (cris_cannot_fetch_register):
12214 (cris_breakpoint_at): Change prototype to take a regcache.
12215 Adjust.
12216 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12217 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12218 to take a regcache. Adjust.
12219 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12220 Adjust.
12221 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12222 take a regcache. Adjust.
12223 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12224 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12225 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12226 * linux-mips-low.c (mips_get_pc):
12227 (mips_set_pc): Change prototype to take a regcache. Adjust.
12228 (mips_reinsert_addr): Adjust.
12229 (mips_collect_register): Change prototype to take a regcache.
12230 Adjust.
12231 (mips_supply_register):
12232 (mips_collect_register_32bit, mips_supply_register_32bit)
12233 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12234 (mips_store_fpregset): Ditto.
12235 * linux-ppc-low.c (ppc_supply_ptrace_register)
12236 (ppc_supply_ptrace_register): Ditto.
12237 (parse_spufs_run): Adjust.
12238 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12239 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12240 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12241 take a regcache. Adjust.
12242 * linux-s390-low.c (s390_collect_ptrace_register)
12243 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12244 (s390_set_pc): Change prototype to take a regcache. Adjust.
12245 (s390_arch_setup): Adjust.
12246 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12247 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12248 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12249 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12250 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12251 regcache. Adjust.
12252 (sparc_breakpoint_at): Adjust.
12253 * linux-xtensa-low.c (xtensa_fill_gregset):
12254 (xtensa_store_gregset):
12255 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12256 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12257 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12258 prototype to take a regcache. Adjust.
12259 * win32-arm-low.c (arm_fetch_inferior_register)
12260 (arm_store_inferior_register): Change prototype to take a
12261 regcache. Adjust.
12262 * win32-i386-low.c (i386_fetch_inferior_register)
12263 (i386_store_inferior_register): Change prototype to take a
12264 regcache. Adjust.
12265 * win32-low.c (child_fetch_inferior_registers)
12266 (child_store_inferior_registers): Change prototype to take a
12267 regcache. Adjust.
12268 (win32_wait): Adjust.
12269 (win32_fetch_inferior_registers): Change prototype to take a
12270 regcache. Adjust.
12271 (win32_store_inferior_registers): Adjust.
12272 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12273 store_inferior_register>: Change prototype to take a regcache.
12274
12275 2010-01-20 Doug Evans <dje@google.com>
12276
12277 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12278 #ifdef.
12279 (linux_wait_for_event1, linux_init_signals): Ditto.
12280 (W_STOPCODE): Provide definition if missing.
12281
12282 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12283
12284 * linux-low.c (linux_core_of_thread): New.
12285 (compare_ints, show_process, list_threads): New.
12286 (linux_qxfer_osdata): Report threads and cores.
12287 (linux_target_op): Register linux_core_of_thread.
12288 * remote-utils.c (prepare_resume_reply): Report the core.
12289 (buffer_xml_printf): Support %d specifier.
12290 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12291 New.
12292 (handle_query): Handle qXfer:threads. Announce availability
12293 thereof.
12294 * target.h (struct target_ops): New field core_of_thread.
12295
12296 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12297
12298 * Makefile.in (clean): Remove new generated files.
12299 (reg-s390.o, reg-s390.c): Remove rules.
12300 (reg-s390x.o, reg-s390x.c): Likewise.
12301 (s390-linux32.o, s390-linux32.c): Add rules.
12302 (s390-linux64.o, s390-linux64.c): Likewise.
12303 (s390x-linux64.o, s390x-linux64.c): Likewise.
12304 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12305 * linux-s390-low.c: Include <elf.h>.
12306 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12307 (init_registers_s390): Remove prototype.
12308 (init_registers_s390x): Likewise.
12309 (init_registers_s390_linux32): Add prototype.
12310 (init_registers_s390_linux64): Likewise.
12311 (init_registers_s390x_linux64): Likewise.
12312 (s390_num_regs_3264): New define.
12313 (s390_regmap_3264): New global variable.
12314 (s390_cannot_fetch_register): Remove obsolete check.
12315 (s390_cannot_store_register): Likewise.
12316 (s390_collect_ptrace_register): Handle upper/lower register halves.
12317 (s390_supply_ptrace_register): Likewise.
12318 (s390_fill_gregset): Update to register number changes.
12319 (s390_get_hwcap): New routine.
12320 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12321 Install appropriate regmap and register set.
12322
12323 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12324
12325 * server.c (gdbserver_version): Update copyright year to 2010.
12326 * gdbreplay.c (gdbreplay_version): Likewise.
12327
12328 2009-12-28 Doug Evans <dje@google.com>
12329
12330 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12331 elf/external.h. Include <elf.h> instead but only if necessary.
12332
12333 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12334
12335 * linux-low.c (linux_remove_process): Remove `detaching'
12336 parameter. Don't release/detach from thread_db here.
12337 (linux_kill): Release/detach from thread_db here, ...
12338 (linux_detach): ... and here, before actually detaching.
12339 (linux_wait_1): ... and here, when a process exits.
12340 * thread-db.c (any_thread_of): New.
12341 (thread_db_free): Switch the current inferior to a thread of the
12342 passed in process.
12343
12344 2009-12-21 Doug Evans <dje@google.com>
12345
12346 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12347
12348 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12349 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12350 warning ifndef __NR_tkill. Move setting of errno there too.
12351 Delete unnecessary resetting of errno after syscall.
12352 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12353
12354 * configure.ac: Check for dladdr.
12355 * config.in: Regenerate.
12356 * configure: Regenerate.
12357 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12358 (try_thread_db_load): Update.
12359
12360 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12361
12362 2009-12-18 Doug Evans <dje@google.com>
12363
12364 * event-loop.c: Include unistd.h if it exists.
12365
12366 * linux-low.c (my_waitpid): Move definition away from being in
12367 between linux_tracefork_child/linux_test_for_tracefork.
12368
12369 * gdb_proc_service.h (psaddr_t): Fix type.
12370 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12371 signature to match glibc.
12372
12373 2009-12-16 Doug Evans <dje@google.com>
12374
12375 * linux-low.c (linux_read_memory): Fix argument to read.
12376
12377 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12378
12379 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12380 events, don't leave current_inferior pointing at null.
12381
12382 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12383
12384 * win32-low.c (LOG): Delete.
12385 (OUTMSG): Output to stderr.
12386 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12387 on compile time LOG macro.
12388 (win32_wait): Fix debug output.
12389
12390 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12391
12392 * win32-low.c (win32_add_one_solib): If the dll name is
12393 "ntdll.dll", prepend the system directory to the dll path.
12394
12395 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12396
12397 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12398
12399 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12400 Vladimir Prus <vladimir@codesourcery.com>
12401
12402 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12403 * configure.ac: Check for __mcoldfire__ and set
12404 gdb_cv_m68k_is_coldfire.
12405 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12406 reg-cf.o and reg-m68k.o.
12407 * configure: Regenerated.
12408
12409 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12410
12411 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12412 Pass it to thread_db_free.
12413 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12414 proper `detaching' argument to linux_remove_process.
12415 * linux-low.h (thread_db_free): Add `detaching' parameter.
12416 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12417 to thread_db_free.
12418 (thread_db_free): Add `detaching' parameter. Only
12419 call td_ta_clear_event if detaching from process.
12420
12421 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12422
12423 * thread-db.c (thread_db_free): Fix typo.
12424
12425 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12426
12427 PR gdb/10838
12428 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12429
12430 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12431
12432 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12433 with an i686 compiler.
12434 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12435 needed.
12436 * configure: Rebuilt.
12437
12438 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12439
12440 PR gdb/10783
12441
12442 * server.c (handle_search_memory_1): Correct read_addr initialization
12443 in loop for searching subsequent chunks.
12444
12445 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12446
12447 * configure.ac: New --with-libthread-db option.
12448 * thread-db.c: Allow direct dependence on libthread_db.
12449 (thread_db_free): Adjust.
12450 * config.in: Regenerate.
12451 * configure: Likewise.
12452
12453 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12454
12455 PR gdb/10757
12456 * thread-db.c (attach_thread): New function.
12457 (maybe_attach_thread): Return success/failure.
12458 (find_new_threads_callback): Adjust.
12459 (thread_db_find_new_threads): Loop until no new threads.
12460
12461 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12462
12463 * proc-service.c (ps_lgetregs): Formatting.
12464
12465 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12466
12467 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12468 * configure.ac: Adjust.
12469 * linux-low.h (struct process_info_private): Move members to struct
12470 thread_db.
12471 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12472 * linux-low.c (linux_remove_process): Adjust.
12473 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12474 * server.c (handle_query): Move code ...
12475 (handle_monitor_command): ... here. New function.
12476 * target.h (struct target_ops): New member.
12477 * thread-db.c (struct thread_db): New.
12478 (libthread_db_search_path): New variable.
12479 (thread_db_create_event, thread_db_enable_reporting)
12480 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12481 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12482 (try_thread_db_load_1, dladdr_to_soname): New functions.
12483 (try_thread_db_load, thread_db_load_search): New functions.
12484 (thread_db_init): Search for libthread_db.
12485 (thread_db_free): New function.
12486 (thread_db_handle_monitor_command): Likewise.
12487 * config.in: Regenerate.
12488 * configure: Regenerate.
12489
12490 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12491
12492 * spu-low.c (spu_kill): Wait for inferior to terminate.
12493 Call clear_inferiors.
12494 (spu_detach): Call clear_inferiors.
12495
12496 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12497
12498 * aclocal.m4: Regenerate.
12499 * config.in: Likewise.
12500 * configure: Likewise.
12501
12502 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12503
12504 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12505 (parse_spufs_run): New function.
12506 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12507 (ppc_breakpoint_at): Handle SPU breakpoints.
12508
12509 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12510
12511 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12512 (SPUFS_MAGIC): Define.
12513 (spu_enumerate_spu_ids): New function.
12514 (linux_qxfer_spu): New function.
12515 (linux_target_ops): Install linux_qxfer_spu.
12516
12517 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12518
12519 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12520 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12521 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12522 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12523 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12524 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12525 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12526 (init_registers_powerpc_cell32l): Add prototype.
12527 (init_registers_powerpc_cell64l): Likewise.
12528 (ppc_arch_setup): Detect Cell/B.E. architecture.
12529
12530 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12531
12532 * Makefile.in (datarootdir): New variable.
12533
12534 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12535
12536 * linux-low.c (linux_write_memory): Update debugging output.
12537 * Makefile.in (clean): Add new descriptions.
12538 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12539 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12540 * configure.srv: Add new files for arm*-*-linux*.
12541 * linux-arm-low.c: Add new declarations.
12542 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12543 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12544 (HWCAP_VFPv3D16): New.
12545 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12546 instead of __IWMMXT__.
12547 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12548 (arm_arch_setup): New.
12549 (target_regsets): Remove #ifdef. Add VFP regset.
12550 (the_low_target): Use arm_arch_setup.
12551
12552 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12553
12554 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12555 the main thread again.
12556
12557 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12558
12559 Adding Neutrino gdbserver.
12560 * configure: Regenerated.
12561 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12562 * configure.srv (i[34567]86-*-nto*): New target.
12563 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12564 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12565 (nto_comctrl) [__QNX__]: New function.
12566 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12567
12568 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12569
12570 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12571 srv_tgtobj.
12572
12573 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12574 Pedro Alves <pedro@codesourcery.com>
12575
12576 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12577 don't support CONTEXT_EXTENDED_REGISTERS.
12578 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12579 (the_low_target): Install them.
12580 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12581 failing with ERROR_PIPE_NOT_CONNECTED.
12582
12583 2009-06-30 Doug Evans <dje@google.com>
12584 Pierre Muller <muller@ics.u-strasbg.fr>
12585
12586 Add h/w watchpoint support to x86-linux, win32-i386.
12587 * Makefile.in (SFILES): Add i386-low.c
12588 (i386_low_h): Define.
12589 (i386-low.o): Add dependencies.
12590 (linux-x86-low.o): Add i386-low.h dependency.
12591 (win32-i386-low.o): Ditto.
12592 * i386-low.c: New file.
12593 * i386-low.h: New file.
12594 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12595 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12596 * linux-low.c (linux_add_process): Initialize arch_private.
12597 (linux_remove_process): Free arch_private.
12598 (add_lwp): Initialize arch_private.
12599 (delete_lwp): Free arch_private.
12600 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12601 provided.
12602 * linux-low.h (process_info_private): New member arch_private.
12603 (lwp_info): New member arch_private.
12604 (linux_target_ops): New members new_process, new_thread,
12605 prepare_to_resume.
12606 (ptid_of): New macro.
12607 * linux-x86-low.c: Include stddef.h, i386-low.h.
12608 (arch_process_info): New struct.
12609 (arch_lwp_info): New struct.
12610 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12611 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12612 (i386_dr_low_get_status): New function.
12613 (x86_insert_point, x86_remove_point): New functions.
12614 (x86_stopped_by_watchpoint): New function.
12615 (x86_stopped_data_address): New function.
12616 (x86_linux_new_process, x86_linux_new_thread): New functions.
12617 (x86_linux_prepare_to_resume): New function.
12618 (the_low_target): Add entries for insert_point, remove_point,
12619 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12620 prepare_to_resume.
12621 * server.c (debug_hw_points): New global.
12622 (monitor_show_help): Document set debug-hw-points.
12623 (handle_query): Process "set debug-hw-points".
12624 * server.h (debug_hw_points): Declare.
12625 (paddress): Declare.
12626 * utils.c (NUMCELLS, CELLSIZE): New macros.
12627 (get_sell, xsnprintf, paddress): New functions.
12628 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12629 remove_point, stopped_by_watchpoint, stopped_data_address.
12630 * win32-i386-low.c: Include i386-low.h.
12631 (debug_reg_state): Replaces dr.
12632 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12633 (i386_dr_low_get_status): New function.
12634 (i386_insert_point, i386_remove_point): New functions.
12635 (i386_stopped_by_watchpoint): New function.
12636 (i386_stopped_data_address): New function.
12637 (i386_initial_stuff): Update.
12638 (get_thread_context,set_thread_context,i386_thread_added): Update.
12639 (the_low_target): Add entries for insert_point,
12640 remove_point, stopped_by_watchpoint, stopped_data_address.
12641 * win32-low.c (win32_insert_watchpoint): New function.
12642 (win32_remove_watchpoint): New function.
12643 (win32_stopped_by_watchpoint): New function.
12644 (win32_stopped_data_address): New function.
12645 (win32_target_ops): Add entries for insert_watchpoint,
12646 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12647 * win32-low.h (win32_target_ops): New members insert_point,
12648 remove_point, stopped_by_watchpoint, stopped_data_address.
12649
12650 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12651
12652 * server.c (process_serial_event): Re-return unsupported, not
12653 error, if the type isn't recognized. Re-allow supporting only
12654 insert or remove packets. Also call require_running for
12655 breakpoints. Add missing break statement to default case. Tidy.
12656 * target.h (struct target_ops): Rename insert_watchpoint to
12657 insert_point, and remove_watchpoint to remove_point.
12658
12659 * linux-low.h (struct linux_target_ops): Likewise.
12660 * linux-low.c (linux_insert_watchpoint): Rename to ...
12661 (linux_insert_point): ... this. Adjust.
12662 (linux_remove_watchpoint): Rename to ...
12663 (linux_remove_point): ... this. Adjust.
12664 (linux_target_ops): Adjust.
12665 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12666 (cris_insert_point): ... this.
12667 (cris_remove_watchpoint): Rename to ...
12668 (cris_remove_point): ... this.
12669 (the_low_target): Adjust.
12670
12671 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12672
12673 * server.c (handle_v_kill): Pass signal_pid to
12674 kill_inferior if multi_process is zero.
12675
12676 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12677
12678 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12679 * target.h (target_ops): Comment for *_watchpoint to make it clear
12680 the functions can get types '0' and '1'.
12681
12682 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12683
12684 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12685 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12686 * regcache.c (get_regcache): Likewise.
12687 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12688 * win32-low.c (child_fetch_inferior_registers): Remove check for
12689 regno 0.
12690
12691 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12692 Pedro Alves <pedro@codesourcery.com>
12693
12694 * target.h (struct target_ops) <supports_multi_process>: New
12695 callback.
12696 (target_supports_multi_process): New.
12697 * server.c (handle_query): Even if GDB reports support, only
12698 enable multi-process if the target also supports it. Report
12699 multi-process support only if the target backend supports it.
12700 * linux-low.c (linux_supports_multi_process): New function.
12701 (linux_target_ops): Install it as target_supports_multi_process
12702 callback.
12703
12704 2009-05-24 Doug Evans <dje@google.com>
12705
12706 Global renaming of find_thread_pid to find_thread_ptid.
12707 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12708 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12709 All callers updated.
12710
12711 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12712 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12713 directly.
12714
12715 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12716 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12717 (linux_resume_one_lwp): Ditto.
12718
12719 2009-05-23 Doug Evans <dje@google.com>
12720
12721 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12722 from struct inferior_list_entry * to struct lwp_info *.
12723 All callers updated.
12724
12725 2009-05-13 Doug Evans <dje@google.com>
12726
12727 * linux-x86-low.c: Don't include assert.h.
12728 (x86_siginfo_fixup): Use fatal, not assert.
12729 (x86_arch_setup): Fix comment.
12730
12731 2009-05-12 Doug Evans <dje@google.com>
12732
12733 Biarch support for i386/amd64 gdbserver.
12734 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12735 Add linux-x86-low.c.
12736 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12737 (linux-x86-low.o): Add.
12738 * linux-x86-64-low.c: Delete.
12739 * linux-i386-low.c: Delete.
12740 * linux-x86-low.c: New file.
12741 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12742 linux-x86-low.o.
12743 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12744 linux-x86-low.o.
12745 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12746 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12747 (linux_child_pid_to_exec_file): New function.
12748 (elf_64_header_p, elf_64_file_p): New functions.
12749 (siginfo_fixup): New function.
12750 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12751 give target a chance to convert layout.
12752 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12753 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12754
12755 2009-05-07 Doug Evans <dje@google.com>
12756
12757 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12758 (regsets_store_inferior_registers): Ditto.
12759
12760 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12761
12762 PR server/10048
12763
12764 * linux-low.c (must_set_ptrace_flags): Delete.
12765 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12766 of the global.
12767 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12768 `lwp->must_set_ptrace_flags' instead.
12769 (linux_wait_for_event_1): Set ptrace options here.
12770 (linux_wait_1): ... not here.
12771
12772 2009-04-30 Doug Evans <dje@google.com>
12773
12774 * inferiors.c (started_inferior_callback): New function.
12775 (attached_inferior_callback): New function.
12776 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12777 * server.c (print_started_pid, print_attached_pid): New functions.
12778 (detach_or_kill_for_exit): New function.
12779 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12780 * server.h (have_started_inferiors_p): Declare.
12781 (have_attached_inferiors_p): Declare.
12782
12783 * inferiors.c (remove_process): Fix memory leak, free process.
12784 * linux-low.c (linux_remove_process): New function.
12785 (linux_kill): Call it instead of remove_process.
12786 (linux_detach, linux_wait_1): Ditto.
12787
12788 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12789
12790 * configure.srv: Add x86 Windows CE target.
12791
12792 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12793
12794 * inferiors.c (get_thread_process): Make global.
12795 * server.h (get_thread_process): Add prototype.
12796 * thread-db.c (find_one_thread): Use get_thread_process
12797 instead of current_process.
12798 (thread_db_get_tls_address): Do not crash if called when
12799 thread layer is not yet initialized.
12800
12801 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12802
12803 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12804 * spu-low.c (current_tid): Rename to ...
12805 (current_ptid): ... this.
12806 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12807 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12808 ptid_get_lwp (current_ptid) instead of current_tid.
12809 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12810 instead of current_tid. Use find_process_pid to verify pid
12811 argument is valid. Pass proper argument to remove_process.
12812 (spu_thread_alive): Compare current_ptid instead of current_tid.
12813 (spu_resume): Likewise.
12814
12815 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12816
12817 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12818 variable.
12819
12820 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12821
12822 Implement the multiprocess extensions, and add linux multiprocess
12823 support.
12824
12825 * server.h (ULONGEST): Declare.
12826 (struct ptid, ptid_t): New.
12827 (minus_one_ptid, null_ptid): Declare.
12828 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12829 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12830 (struct inferior_list_entry): Change `id' type from unsigned from
12831 to ptid_t.
12832 (struct sym_cache, struct breakpoint, struct
12833 process_info_private): Forward declare.
12834 (struct process_info): Declare.
12835 (current_process): Declare.
12836 (all_processes): Declare.
12837 (initialize_inferiors): Declare.
12838 (add_thread): Adjust to use ptid_t.
12839 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12840 (add_process, remove_process, find_thread_pid): Declare.
12841 (find_inferior_id): Adjust to use ptid_t.
12842 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12843 (multi_process): Declare.
12844 (push_event): Adjust to use ptid_t.
12845 (read_ptid, write_ptid): Declare.
12846 (prepare_resume_reply): Adjust to use ptid_t.
12847 (clear_symbol_cache): Declare.
12848 * inferiors.c (all_processes): New.
12849 (null_ptid, minus_one_ptid): New.
12850 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12851 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12852 (add_thread): Change unsigned long to ptid. Remove gdb_id
12853 parameter. Adjust.
12854 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12855 (gdb_id_to_thread): Rename to ...
12856 (find_thread_pid): ... this. Change unsigned long to ptid.
12857 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12858 (loaded_dll, pull_pid_from_list): Adjust.
12859 (add_process, remove_process, find_process_pid)
12860 (get_thread_process, current_process, initialize_inferiors): New.
12861 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12862 (struct target_waitstatus) <related_pid>: Ditto.
12863 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12864 return type to int.
12865 (struct target_ops) <join>: Add `pid' argument.
12866 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12867 (struct target_ops) <wait>: Add `ptid' field. Change return type
12868 to ptid.
12869 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12870 (mywait): Add `ptid' argument. Change return type to ptid_t.
12871 (target_pid_to_str): Declare.
12872 * target.c (set_desired_inferior): Adjust to use ptids.
12873 (mywait): Add new `ptid' argument. Adjust.
12874 (target_pid_to_str): New.
12875 * mem-break.h (free_all_breakpoints): Declare.
12876 * mem-break.c (breakpoints): Delelete.
12877 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12878 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12879 to use per-process breakpoint list.
12880 (free_all_breakpoints): New.
12881 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12882 (symbol_cache, all_symbols_looked_up): Delete.
12883 (hexchars): New.
12884 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12885 read_ptid): New.
12886 (prepare_resume_reply): Change ptid argument's type from unsigned
12887 long to ptid_t. Adjust. Implement W;process and X;process.
12888 (free_sym_cache, clear_symbol_cache): New.
12889 (look_up_one_symbol): Adjust to per-process symbol cache. *
12890 * server.c (cont_thread, general_thread, step_thread): Change type
12891 to ptid_t.
12892 (attached): Delete.
12893 (multi_process): New.
12894 (last_ptid): Change type to ptid_t.
12895 (struct vstop_notif) <ptid>: Change type to ptid_t.
12896 (queue_stop_reply, push_event): Change `ptid' argument's type to
12897 ptid_t.
12898 (discard_queued_stop_replies): Add `pid' argument.
12899 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12900 changes. Don't reference the `attached' global.
12901 (attach_inferior): Adjust to mywait interface changes.
12902 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12903 features. Handle and report "multiprocess+". Handle
12904 "qAttached:PID".
12905 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12906 changes.
12907 (handle_v_kill): New.
12908 (handle_v_stopped): Adjust to use target_pid_to_str.
12909 (handle_v_requests): Allow multiple attaches and runs when
12910 multiprocess extensions are in effect. Handle "vKill".
12911 (myresume): Adjust to use ptids.
12912 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12913 (handle_status): Adjust to discard_queued_stop_replies interface
12914 change.
12915 (first_thread_of, kill_inferior_callback)
12916 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12917 (main): Call initialize_inferiors. Adjust to use ptids, killing
12918 and detaching from all inferiors. Handle multiprocess packet
12919 variants.
12920 * linux-low.h: Include gdb_proc_service.h.
12921 (struct process_info_private): New.
12922 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12923 <lwpid_of>: Use ptid_get_lwp.
12924 (get_lwp_thread): Adjust.
12925 (struct lwp_info): Add `dead' member.
12926 (find_lwp_pid): Declare.
12927 * linux-low.c (thread_db_active): Delete.
12928 (new_inferior): Adjust comment.
12929 (inferior_pid): Delete.
12930 (linux_add_process): New.
12931 (handle_extended_wait): Adjust.
12932 (add_lwp): Change unsigned long to ptid.
12933 (linux_create_inferior): Add process to processes table. Adjust
12934 to use ptids. Don't set new_inferior here.
12935 (linux_attach_lwp): Rename to ...
12936 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12937 it. Adjust to use ptids.
12938 (linux_attach_lwp): New.
12939 (linux_attach): Add process to processes table. Don't set
12940 new_inferior here.
12941 (struct counter): New.
12942 (second_thread_of_pid_p, last_thread_of_process_p): New.
12943 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12944 multiple processes.
12945 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12946 processes. Remove process from process table.
12947 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12948 to multiple processes.
12949 (any_thread_of): New.
12950 (linux_detach): Add `pid' argument, and handle it. Remove process
12951 from processes table.
12952 (linux_join): Add `pid' argument. Handle it.
12953 (linux_thread_alive): Change unsighed long argument to ptid_t.
12954 Consider dead lwps as not being alive.
12955 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12956 threads we're not interested in.
12957 (same_lwp, find_lwp_pid): New.
12958 (linux_wait_for_lwp): Change `pid' argument's type from int to
12959 ptid_t. Adjust.
12960 (linux_wait_for_event): Rename to ...
12961 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12962 from int to ptid_t. Adjust.
12963 (linux_wait_for_event): New.
12964 (linux_wait_1): Add `ptid' argument. Change return type to
12965 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12966 that exit from the process table.
12967 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12968 Adjust.
12969 (mark_lwp_dead): New.
12970 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12971 stopping all threads, mark its main lwp as dead.
12972 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12973 ptids.
12974 (fetch_register, usr_store_inferior_registers)
12975 (regsets_fetch_inferior_registers)
12976 (regsets_store_inferior_registers, linux_read_memory)
12977 (linux_write_memory): Inline `inferior_pid'.
12978 (linux_look_up_symbols): Adjust to use per-process
12979 `thread_db_active'.
12980 (linux_request_interrupt): Adjust to use ptids.
12981 (linux_read_auxv): Inline `inferior_pid'.
12982 (initialize_low): Don't reference thread_db_active.
12983 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12984 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12985 (ps_getpid): Return the pid of the current inferior.
12986 * thread-db.c (proc_handle, thread_agent): Delete.
12987 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12988 per-process data.
12989 (find_one_thread): Change argument type to ptid_t. Adjust to
12990 per-process data.
12991 (maybe_attach_thread): Adjust to per-process data and ptids.
12992 (thread_db_find_new_threads): Ditto.
12993 (thread_db_init): Ditto.
12994 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12995 processes table. Adjust to use ptids.
12996 (spu_kill, spu_detach): Adjust interface. Remove process from
12997 processes table.
12998 (spu_join, spu_thread_alive): Adjust interface.
12999 (spu_wait): Adjust interface. Remove process from processes
13000 table. Adjust to use ptids.
13001 * win32-low.c (current_inferior_tid): Delete.
13002 (current_inferior_ptid): New.
13003 (debug_event_ptid): New.
13004 (thread_rec): Take a ptid. Adjust.
13005 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13006 (child_delete_thread): Ditto.
13007 (do_initial_child_stuff): Add `attached' argument. Add process to
13008 processes table.
13009 (child_fetch_inferior_registers, child_store_inferior_registers):
13010 Adjust.
13011 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13012 (win32_attach): Pass 1 to do_initial_child_stuff.
13013 (win32_kill): Adjust interface. Remove process from processes
13014 table.
13015 (win32_detach): Ditto.
13016 (win32_join): Adjust interface.
13017 (win32_thread_alive): Take a ptid.
13018 (win32_resume): Adjust to use ptids.
13019 (get_child_debug_event): Ditto.
13020 (win32_wait): Adjust interface. Remove exiting process from
13021 processes table.
13022
13023 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13024
13025 Non-stop mode support.
13026
13027 * server.h (non_stop): Declare.
13028 (gdb_client_data, handler_func): Declare.
13029 (delete_file_handler, add_file_handler, start_event_loop):
13030 Declare.
13031 (handle_serial_event, handle_target_event, push_event)
13032 (putpkt_notif): Declare.
13033 * target.h (enum resume_kind): New.
13034 (struct thread_resume): Replace `step' field by `kind' field.
13035 (TARGET_WNOHANG): Define.
13036 (struct target_ops) <wait>: Add `options' argument.
13037 <supports_non_stop, async, start_non_stop>: New fields.
13038 (target_supports_non_stop, target_async): New.
13039 (start_non_stop): Declare.
13040 (mywait): Add `options' argument.
13041 * target.c (mywait): Add `options' argument. Print child exit
13042 notifications here.
13043 (start_non_stop): New.
13044 * server.c (non_stop, own_buf, mem_buf): New globals.
13045 (struct vstop_notif): New.
13046 (notif_queue): New global.
13047 (queue_stop_reply, push_event, discard_queued_stop_replies)
13048 (send_next_stop_reply): New.
13049 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13050 interface changes.
13051 (attach_inferior): In non-stop mode, don't wait for the target
13052 here.
13053 (handle_general_set): Handle QNonStop.
13054 (handle_query): When handling qC, return the current general
13055 thread, instead of the first thread of the list.
13056 (handle_query): If the backend supports non-stop mode, include
13057 QNonStop+ in the qSupported query response.
13058 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13059 and non-stop mode.
13060 (handle_v_attach, handle_v_run): Handle non-stop mode.
13061 (handle_v_stopped): New.
13062 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13063 (myresume): Adjust to use resume_kind. Handle non-stop.
13064 (queue_stop_reply_callback): New.
13065 (handle_status): Handle non-stop mode.
13066 (main): Clear non_stop flag on reconnection. Use the event-loop.
13067 Refactor serial protocol handling from here ...
13068 (process_serial_event): ... to this new function. When GDB
13069 selects any thread, select one here. In non-stop mode, wait until
13070 GDB acks all pending events before exiting.
13071 (handle_serial_event, handle_target_event): New.
13072 * remote-utils.c (remote_open): Install remote_desc in the event
13073 loop.
13074 (remote_close): Remove remote_desc from the event loop.
13075 (putpkt_binary): Rename to...
13076 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13077 (putpkt_binary): New as wrapper around putpkt_binary_1.
13078 (putpkt_notif): New.
13079 (prepare_resume_reply): In non-stop mode, don't change the
13080 general_thread.
13081 * event-loop.c: New.
13082 * Makefile.in (OBJ): Add event-loop.o.
13083 (event-loop.o): New rule.
13084
13085 * linux-low.h (pid_of): Moved here.
13086 (lwpid_of): New.
13087 (get_lwp_thread): Use lwpid_of.
13088 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13089 * linux-low.c (pid_of): Delete.
13090 (inferior_pid): Use lwpid_of.
13091 (linux_event_pipe): New.
13092 (target_is_async_p): New.
13093 (delete_lwp): New.
13094 (handle_extended_wait): Use lwpid_of.
13095 (add_lwp): Don't set lwpid field.
13096 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13097 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13098 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13099 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13100 first. Adjust to linux_wait_for_event interface changes. Use
13101 lwpid_of.
13102 (linux_detach): Don't delete the main lwp here.
13103 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13104 (status_pending_p): Don't consider explicitly suspended lwps.
13105 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13106 pointer. Add OPTIONS argument. Change return type to int. Use
13107 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13108 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13109 pointer. Add status pointer argument. Return a pid instead of a
13110 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13111 changes. In non-stop mode, don't switch to a random thread.
13112 (linux_wait): Rename to...
13113 (linux_wait_1): ... this. Add target_options argument, and handle
13114 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13115 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13116 clean exit and signal exit code. Don't stop all threads in
13117 non-stop mode. In all-stop mode, only stop all threads when
13118 reporting a stop to GDB. Handle explicit thread stop requests.
13119 (async_file_flush, async_file_mark): New.
13120 (linux_wait): New.
13121 (send_sigstop): Use lwpid_of.
13122 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13123 interface changes. In non-stop mode, don't switch to a random
13124 thread.
13125 (linux_resume_one_lwp): Use lwpid_of.
13126 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13127 (linux_resume_one_thread): ... this. Handle resume_stop. In
13128 non-stop mode, don't look for pending flag in all threads.
13129 (resume_status_pending_p): Don't consider explicitly suspended
13130 threads.
13131 (my_waitpid): Reimplement. Emulate __WALL.
13132 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13133 Use lwpid_of.
13134 (sigchld_handler, linux_supports_non_stop, linux_async)
13135 (linux_start_non_stop): New.
13136 (linux_target_ops): Register linux_supports_non_stop, linux_async
13137 and linux_start_non_stop.
13138 (initialize_low): Install SIGCHLD handler.
13139 * thread-db.c (thread_db_create_event, find_one_thread)
13140 (thread_db_get_tls_address): Use lwpid_of.
13141 * win32-low.c (win32_detach): Adjust to use resume_kind.
13142 (win32_wait): Add `options' argument.
13143 * spu-low.c (spu_resume): Adjust to use resume_kind.
13144 (spu_wait): Add `options' argument.
13145
13146 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13147
13148 Decouple target code from remote protocol.
13149
13150 * target.h (enum target_waitkind): New.
13151 (struct target_waitstatus): New.
13152 (struct target_ops) <wait>: Return an unsigned long. Take a
13153 target_waitstatus pointer instead of a char pointer.
13154 (mywait): Likewise.
13155 * target.c (mywait): Change prototype to return an unsigned long.
13156 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13157 * server.h (thread_from_wait, old_thread_from_wait): Delete
13158 declarations.
13159 (prepare_resume_reply): Change prototype to take a
13160 target_waitstatus.
13161 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13162 (last_status, last_ptid): New.
13163 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13164 pid instead of a signal.
13165 (attach_inferior): Remove "status" and "signal" parameters.
13166 Adjust.
13167 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13168 not as an address.
13169 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13170 (handle_v_requests, myresume): Remove "status" and "signal"
13171 parameters. Adjust.
13172 (handle_status): New.
13173 (main): Delete local `status'. Adjust.
13174 * remote-utils.c: Include target.h.
13175 (prepare_resume_reply): Change prototype to take a
13176 target_waitstatus. Adjust.
13177
13178 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13179 interface.
13180 * spu-low.c (spu_wait): Adjust.
13181 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13182 Delete.
13183 (win32_wait): Adjust.
13184
13185 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13186
13187 * target.h (struct thread_resume): Delete leave_stopped member.
13188 (struct target_ops): Add a `n' argument to the `resume' callback.
13189 * server.c (start_inferior): Adjust.
13190 (handle_v_cont, myresume): Adjust.
13191 * linux-low.c (check_removed_breakpoint): Adjust to resume
13192 interface change, and to removed leave_stopped field.
13193 (resume_ptr): Delete.
13194 (struct thread_resume_array): New.
13195 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13196 resume interface change.
13197 (linux_continue_one_thread, linux_queue_one_thread)
13198 (resume_status_pending_p): Check if the resume field is NULL
13199 instead of checking the leave_stopped member.
13200 (linux_resume): Adjust to the target resume interface change.
13201 * spu-low.c (spu_resume): Adjust to the target resume interface
13202 change.
13203 * win32-low.c (win32_detach, win32_resume): Ditto.
13204
13205 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13206
13207 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13208 flag.
13209 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13210 pending.
13211 (linux_continue_one_thread): Only preserve the stepping flag if
13212 there's a pending breakpoint.
13213
13214 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13215
13216 * server.c (main): After the inferior having exited, call
13217 remote_close before exiting gdbserver.
13218
13219 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13220
13221 Fix size of FPSCR in Power 7 processors.
13222 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13223 (PPC_FEATURE_HAS_DFP): New #define.
13224 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13225 size of the FPSCR.
13226
13227 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13228
13229 * server.c (handle_query) Whitespace and formatting.
13230
13231 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13232
13233 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13234 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13235 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13236 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13237 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13238 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13239 Makefile.in, configure.ac: Fix whitespace throughout.
13240 * configure: Regenerate.
13241
13242 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13243
13244 * inferiors.c (find_inferior): Make it safe for the callback
13245 function to delete the currently iterated inferior.
13246
13247 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13248
13249 * Makefile.in (linuw_low_h): Move higher.
13250 (thread-db.o): Depend on $(linux_low_h).
13251
13252 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13253
13254 Rename "process" to "lwp" throughout.
13255
13256 * linux-low.c (all_processes): Rename to...
13257 (all_lwps): ... this.
13258 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13259 (add_process): Rename to ...
13260 (add_lwp): ... this. Adjust.
13261 (linux_create_inferior): Adjust.
13262 (linux_attach_lwp): Adjust.
13263 (linux_attach): Adjust.
13264 (linux_kill_one_process): Rename to ...
13265 (linux_kill_one_lwp): ... this. Adjust.
13266 (linux_kill): Adjust.
13267 (linux_detach_one_process): Rename to ...
13268 (linux_detach_one_lwp): ... this. Adjust.
13269 (linux_detach): Adjust.
13270 (check_removed_breakpoint): Adjust.
13271 (status_pending_p): Adjust.
13272 (linux_wait_for_process): Rename to ...
13273 (linux_wait_for_lwp): ... this. Adjust.
13274 (linux_wait_for_event): Adjust.
13275 (send_sigstop): Adjust.
13276 (wait_for_sigstop): Adjust.
13277 (stop_all_processes): Rename to ...
13278 (stop_all_lwps): ... this.
13279 (linux_resume_one_process): Rename to ...
13280 (linux_resume_one_lwp): ... this. Adjust.
13281 (linux_set_resume_request, linux_continue_one_thread)
13282 (linux_queue_one_thread, resume_status_pending_p)
13283 (usr_store_inferior_registers, regsets_store_inferior_registers)
13284 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13285 Adjust.
13286 * linux-low.h (get_process): Rename to ...
13287 (get_lwp): ... this. Adjust.
13288 (get_thread_process): Rename to ...
13289 (get_thread_lwp): ... this. Adjust.
13290 (get_process_thread): Rename to ...
13291 (get_lwp_thread): ... this. Adjust.
13292 (struct process_info): Rename to ...
13293 (struct lwp_info): ... this.
13294 (all_processes): Rename to ...
13295 (all_lwps): ... this.
13296 * proc-service.c (ps_lgetregs): Adjust.
13297 * thread-db.c (thread_db_create_event, find_one_thread)
13298 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13299
13300 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13301
13302 * server.c (handle_query): Handle "qAttached".
13303
13304 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13305
13306 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13307 GPLv3, update license URL.
13308
13309 2009-03-01 Doug Evans <dje@google.com>
13310
13311 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13312 (server_h): Add gdb_signals.h.
13313 (signals.o): Update.
13314 * server.h (target_signal_from_host,target_signal_to_host_p)
13315 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13316
13317 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13318
13319 * remote-utils.c (getpkt): Also generate remote-debug
13320 information if noack_mode is set.
13321
13322 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13323
13324 * server.c (handle_query): Report qXfer:siginfo:read and
13325 qXfer:siginfo:write as supported and handle them.
13326 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13327 * linux-low.c (linux_xfer_siginfo): New.
13328 (linux_target_ops): Set it.
13329
13330 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13331
13332 * server.c (gdbserver_usage): Mention --remote-debug.
13333 (main): Accept '--remote-debug' switch.
13334
13335 2009-01-18 Doug Evans <dje@google.com>
13336
13337 * regcache.c (new_register_cache): No need to check result of xcalloc.
13338 * server.c (handle_search_memory): Back out calls to xmalloc,
13339 result is checked and error is returned to user upon failure.
13340 (handle_query): Ditto. Add more checks for result of malloc.
13341 (handle_v_cont): Check result of malloc, report error back to
13342 user upon failure.
13343 (handle_v_run): Ditto. Call freeargv.
13344 * server.h (freeargv): Declare.
13345 * utils.c (freeargv): New fn.
13346
13347 2009-01-15 Doug Evans <dje@google.com>
13348
13349 * gdbreplay.c (perror_with_name): Make arg const char *.
13350 * server.h (target_signal_to_name): Make return type const char *.
13351 * thread-db.c (thread_db_err_str): Make return type const char *.
13352 * utils.c (perror_with_name): Make arg const char *.
13353
13354 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13355
13356 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13357 when handling a EXIT_PROCESS_DEBUG_EVENT.
13358
13359 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13360
13361 * gdbreplay.c (gdbreplay_version): Update copyright year.
13362 * server.c (gdbserver_version): Likewise.
13363
13364 2009-01-05 Doug Evans <dje@google.com>
13365
13366 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13367 (handle_extended_wait): Improve comment.
13368
13369 2008-12-13 Doug Evans <dje@google.com>
13370
13371 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13372 * server.h (ATTR_MALLOC): New macro.
13373 (xmalloc,xcalloc,xstrdup): Declare.
13374 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13375 * inferiors.c: Ditto.
13376 * linux-low.c: Ditto.
13377 * mem-break.c: Ditto.
13378 * regcache.c: Ditto.
13379 * remote-utils.c: Ditto.
13380 * server.c: Ditto.
13381 * target.c: Ditto.
13382 * win32-low.c: Ditto.
13383
13384 2008-12-12 Doug Evans <dje@google.com>
13385
13386 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13387 in debugging printf.
13388
13389 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13390
13391 2008-12-09 Doug Evans <dje@google.com>
13392
13393 * linux-low.h (struct process_info): Delete member tid, unused.
13394 * thread-db.c (find_one_thread): Update.
13395 (maybe_attach_thread): Update.
13396
13397 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13398
13399 * target.h (struct target_ops): Add qxfer_osdata member.
13400 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13401 and dirent.h.
13402 (linux_qxfer_osdata): New functions.
13403 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13404 callback.
13405 * server.c (handle_query): Handle "qXfer:osdata:read:".
13406 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13407 (buffer_xml_printf): New functions.
13408 * server.h (struct buffer): New.
13409 (buffer_grow_str, buffer_grow_str0): New macros.
13410 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13411 (buffer_xml_printf): Declare.
13412
13413 2008-11-24 Doug Evans <dje@google.com>
13414
13415 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13416
13417 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13418
13419 * server.c (handle_v_run): Always use the supplied argument list.
13420
13421 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13422
13423 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13424 (xtensa_regmap_table): Add entry for scompare1.
13425
13426 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13427
13428 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13429 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13430 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13431 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13432 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13433 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13434 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13435 XML target descriptions.
13436 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13437 when inferior is running on an ISA 2.05 or later processor. Add
13438 special case to return offset for full 64-bit slot of FPSCR when
13439 in 32-bits.
13440
13441 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13442
13443 * Makefile.in (SFILES, clean): Added sparc64 files.
13444 (reg-sparc64.o, reg-sparc64.c): New.
13445 * configure.srv (sparc*-*-linux*): New configuration.
13446 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13447 syscall arguments for SPARC.
13448 (regsets_store_inferior_registers): Likewise.
13449 * linux-sparc-low.c: New file.
13450
13451 2008-10-21 Doug Evans <dje@google.com>
13452
13453 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13454 (READLINE_DIR,READLINE_DEP): Delete.
13455 (INTERNAL_CFLAGS): Update.
13456 (LINTFLAGS): Update.
13457
13458 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13459
13460 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13461 whole argv from the last run, not just argv[0].
13462
13463 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13464
13465 * regcache.c (new_register_cache): Return NULL if the register
13466 cache size isn't known yet.
13467 (free_register_cache): Avoid dereferencing a NULL regcache.
13468
13469 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13470
13471 * configure.srv: Merge MIPS and MIPS64.
13472
13473 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13474
13475 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13476
13477 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13478
13479 * Makefile.in: Add required vsx dependencies.
13480
13481 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13482 Declare init_registers_powerpc_vsx32l.
13483 Declare init_registers_powerpc_vsx64l.
13484 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13485 (ppc_arch_setup): Check for VSX in hwcap.
13486 (ppc_fill_vsxregset): New function.
13487 (ppc_store_vsxregset): New function.
13488 Add new VSX entry in regset_info target_regsets.
13489
13490 * configure.srv: Add new VSX dependencies.
13491
13492 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13493
13494 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13495 (remote_open): Set or clear transport_is_reliable.
13496 (putpkt_binary): Don't expect acks in noack mode.
13497 (getpkt): Don't send ack/nac in noack mode.
13498 * server.c (handle_general_set): Handle QStartNoAckMode.
13499 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13500 qSupported.
13501 (main): Reset noack_mode on every connection.
13502 * server.h (noack_mode): Declare.
13503
13504 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13505
13506 * Makefile.in (GDBREPLAY_OBS): New variable.
13507 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13508
13509 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13510 Daniel Jacobowitz <dan@codesourcery.com>
13511
13512 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13513 (usr_store_inferior_registers): Likewise.
13514 (regsets_store_inferior_registers): Likewise.
13515
13516 2008-07-31 Rolf Jansen <rj@surtec.com>
13517 Pedro Alves <pedro@codesourcery.com>
13518
13519 * configure.ac: Check for memmem declaration.
13520 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13521 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13522 (disable_packet_qfThreadInfo): Unconditionally compile.
13523 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13524 * configure, config.in: Regenerate.
13525
13526 2008-07-28 Doug Kwan <dougkwan@google.com>
13527
13528 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13529 (linux_write_memory): Remove declaration of errno.
13530
13531 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13532
13533 * linux-low.c (handle_extended_wait): Do not use "status"
13534 variable uninitialized.
13535
13536 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13537
13538 * server.c (handle_v_attach): Inhibit reporting dll changes.
13539
13540 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13541
13542 * remote-utils.c (prepare_resume_reply): If requested, don't
13543 output "thread:TID" in the T stop reply.
13544
13545 * server.c (disable_packet_vCont, disable_packet_Tthread)
13546 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13547 (handle_query): If requested, disable support for qC, qfThreadInfo
13548 and qsThreadInfo.
13549 (handle_v_requests): If requested, disable support for vCont.
13550 (gdbserver_show_disableable): New.
13551 (main): Handle --disable-packet and --disable-packet=LIST.
13552
13553 * server.h (disable_packet_vCont, disable_packet_Tthread)
13554 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13555
13556 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13557
13558 * server.c (gdbserver_usage): Mention --version.
13559
13560 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13561
13562 * Makefile.in (gdbreplay.o): New rule.
13563
13564 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13565
13566 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13567 message, not gdbserver.
13568
13569 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13570 Nathan Sidwell <nathan@codesourcery.com>
13571 Joseph Myers <joseph@codesourcery.com>
13572
13573 * acinclude.m4: Include ../../config/acx.m4.
13574 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13575 * configure, config.in: Regenerate.
13576 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13577 * server.c (gdbserver_version): Print PKGVERSION.
13578 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13579 (main): Adjust gdbserver_usage calls.
13580 * gdbreplay.c (version, host_name): Add declarations.
13581 (gdbreplay_version, gdbreplay_usage): New.
13582 (main): Accept --version and --help options.
13583
13584 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13587 (arm_breakpoint_at): Handle Thumb.
13588 (the_low_target): Add comment.
13589
13590 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13591
13592 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13593
13594 2008-05-09 Doug Evans <dje@google.com>
13595
13596 * server.h (decode_search_memory_packet): Declare.
13597 * remote-utils.c (decode_search_memory_packet): New fn.
13598 * server.c (handle_search_memory_1): New fn.
13599 (handle_search_memory): New fn.
13600 (handle_query): Process qSearch:memory packets.
13601
13602 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13603
13604 * regcache.c (registers_length): Remove.
13605 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13606 full register packet.
13607 * regcache.h (registers_length): Remove prototype.
13608 * server.h (PBUFSIZ): Define to 16384.
13609
13610 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13611
13612 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13613 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13614 powerpc-64l.o, and powerpc-altivec64l.o.
13615 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13616 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13617 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13618 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13619 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13620 to srv_xmlfiles.
13621
13622 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13623 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13624 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13625 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13626 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13627 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13628 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13629 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13630 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13631 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13632 (clean): Update.
13633
13634 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13635 (init_registers_powerpc_32l): ... this new prototype.
13636 (init_registers_powerpc_32): Remove, replace by ...
13637 (init_registers_powerpc_altivec32l): ... this new prototype.
13638 (init_registers_powerpc_e500): Remove, replace by ...
13639 (init_registers_powerpc_e500l): ... this new prototype.
13640 (init_registers_ppc64): Remove, replace by ...
13641 (init_registers_powerpc_64l): ... this new prototype.
13642 (init_registers_powerpc_64): Remove, replace by ...
13643 (init_registers_powerpc_altivec64l): ... this new prototype.
13644 (ppc_num_regs): Set to 73.
13645 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13646 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13647 (ppc_cannot_store_register): Handle orig_r3 and trap.
13648 (ppc_arch_setup): Update init_registers_... calls.
13649 (ppc_fill_gregset): Handle orig_r3 and trap.
13650
13651 * inferiors.c (clear_inferiors): Reset current_inferior.
13652
13653 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13654
13655 * acinclude.m4: Add override.m4.
13656 * configure: Regenerate.
13657
13658 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13659
13660 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13661 initial call to init_register_ppc64.
13662
13663 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13664
13665 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13666 single powerpc*-*-linux* case.
13667 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13668
13669 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13670
13671 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13672 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13673 from reg_xmlfiles.
13674 * linux-ppc-low.c: Include <elf.h>.
13675 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13676 (ppc_hwcap): New global variable.
13677 (ppc_regmap): Remove __SPE__ #ifdef sections.
13678 (ppc_regmap_e500): New global variable.
13679 (ppc_cannot_store_register): Update __SPE__ special case.
13680 (ppc_get_hwcap): New function.
13681 (ppc_arch_setup): Use it to determine whether inferior supports
13682 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13683 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13684 Do not access registers if target does not support AltiVec.
13685 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13686 Do not access registers if target does not support SPE.
13687 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13688
13689 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13690
13691 * linux-low.c (disabled_regsets, num_regsets): New.
13692 (use_regsets_p): Delete.
13693 (linux_wait_for_process): Clear disabled_regsets.
13694 (regsets_fetch_inferior_registers): Check and set it.
13695 (regsets_store_inferior_registers): Likewise.
13696 (linux_fetch_registers, linux_store_registers): Do not use
13697 use_regsets_p.
13698 (initialize_low): Allocate disabled_regsets.
13699
13700 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13701
13702 * Makefile.in (LIBOBJS): New.
13703 (OBS): Use LIBOBJS.
13704 (memmem.o): New rule.
13705 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13706 * configure: Regenerated.
13707
13708 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13709
13710 * server.c (handle_query): Never return "unsupported" for
13711 qXfer:features:read queries.
13712
13713 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13714
13715 * server.c (get_features_xml): Fix inverted condition.
13716 (handle_query): Always support qXfer:feature:read.
13717
13718 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13719
13720 * server.c (wrapper_argv): New.
13721 (start_inferior): Handle wrapper_argv. If set, expect an extra
13722 trap.
13723 (gdbserver_usage): Document --wrapper.
13724 (main): Parse --wrapper.
13725
13726 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13727
13728 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13729 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13730 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13731 (ppc_set_pc): Likewise.
13732 (ppc_arch_setup): New function.
13733 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13734 of collect_register.
13735 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13736
13737 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13738
13739 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13740 instead of linux-ppc64-low.o.
13741 * linux-ppc64-low.c: Remove file.
13742 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13743 (linux-ppc64-low.o): Remove rule.
13744
13745 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13746 (init_registers_powerpc_64): Likewise.
13747 (ppc_regmap): Conditionally define depending on __powerpc64__.
13748 (ppc_cannot_store_register): Do not special-case "fpscr" when
13749 compiled on __powerpc64__.
13750 (ppc_collect_ptrace_register): New function.
13751 (ppc_supply_ptrace_register): New function.
13752 (ppc_breakpoint): Change type to "unsigned int".
13753 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13754 (the_low_target): Conditionally provide initializers for the
13755 arch_setup member depending on __powerpc64__. Install
13756 collect_ptrace_register and supply_ptrace_register members.
13757
13758 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13759
13760 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13761 * server.c (gdbserver_xmltarget): Define.
13762 (get_features_xml): Use it to replace "target.xml" and arch_string.
13763
13764 * configure.srv: Remove srv_xmltarget. Add XML files that were
13765 mentioned there to srv_xmlfiles instead. Remove conditional tests
13766 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13767 srv_xmlfiles and srv_regobj to include all possible choices.
13768 * configure.ac (srv_xmltarget): Remove.
13769 (srv_xmlfiles): Do not add "target.xml".
13770 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13771 checks for supplementary target information.
13772 * configure: Regenerate.
13773 * Makefile.in (XML_TARGET): Remove.
13774 (target.xml): Remove rule.
13775 (clean): Do not clean up target.xml.
13776 (.PRECIOUS): Do not mention target.xml.
13777
13778 * target.h (struct target_ops): Remove arch_string member.
13779 * linux-low.c (linux_arch_string): Remove.
13780 (linux_target_ops): Remove arch_string initializer.
13781 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13782 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13783 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13784 * spu-low.c (spu_arch_string): Remove.
13785 (spu_target_ops): Remove arch_string initializer.
13786 * win32-low.c (win32_arch_string): Remove.
13787 (win32_target_ops): Remove arch_string initializer.
13788 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13789 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13790 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13791
13792 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13793
13794 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13795 by collect_ptrace_register and supply_ptrace_register hooks.
13796 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13797 instead of checking for the_low_target.left_pad_xfer.
13798 (usr_store_inferior_registers): Use collect_ptrace_register callback
13799 instead of checking for the_low_target.left_pad_xfer.
13800
13801 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13802 (s390_supply_ptrace_register): Likewise.
13803 (s390_fill_gregset): Call s390_collect_ptrace_register.
13804 (the_low_target): Update.
13805
13806 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13807 (ppc_supply_ptrace_register): Likewise.
13808 (the_low_target): Update.
13809
13810 * linux-i386-low.c (the_low_target): Update.
13811 * linux-x86-64-low.c (the_low_target): Update.
13812
13813 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13814
13815 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13816 reg-s390.o and reg-s390x.o.
13817
13818 * linux-low.c (new_inferior): New global variable.
13819 (linux_create_inferior, linux_attach): Set it.
13820 (linux_wait_for_process): Call the_low_target.arch_setup after the
13821 target has stopped for the first time.
13822 (initialize_low): Do not call the_low_target.arch_setup.
13823
13824 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13825 (s390_set_pc): Likewise.
13826 (s390_arch_setup): New function.
13827 (the_low_target): Use s390_arch_setup as arch_setup routine.
13828
13829 * regcache.c (realloc_register_cache): New function.
13830 (set_register_cache): Call it for each existing regcache.
13831
13832 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13833
13834 * server.h (init_registers): Remove prototype.
13835
13836 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13837 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13838 instead of init_registers ().
13839 * linux-arm-low.c (init_registers_arm): Add prototype.
13840 (init_registers_arm_with_iwmmxt): Likewise.
13841 (the_low_target): Add initializer for arch_setup field.
13842 * linux-cris-low.c (init_registers_cris): Add prototype.
13843 (the_low_target): Add initializer for arch_setup field.
13844 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13845 (the_low_target): Add initializer for arch_setup field.
13846 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13847 (the_low_target): Add initializer for arch_setup field.
13848 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13849 (the_low_target): Add initializer for arch_setup field.
13850 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13851 (the_low_target): Add initializer for arch_setup field.
13852 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13853 (the_low_target): Add initializer for arch_setup field.
13854 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13855 (init_registers_mips64_linux): Likewise.
13856 (the_low_target): Add initializer for arch_setup field.
13857 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13858 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13859 (the_low_target): Add initializer for arch_setup field.
13860 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13861 (init_registers_powerpc_64): Likewise.
13862 (the_low_target): Add initializer for arch_setup field.
13863 * linux-s390-low.c (init_registers_s390): Add prototype.
13864 (init_registers_s390x): Likewise.
13865 (the_low_target): Add initializer for arch_setup field.
13866 * linux-sh-low.c (init_registers_sh): Add prototype.
13867 (the_low_target): Add initializer for arch_setup field.
13868 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13869 (the_low_target): Add initializer for arch_setup field.
13870 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13871 (the_low_target): Add initializer for arch_setup field.
13872
13873 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13874 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13875 instead of init_registers ().
13876 * win32-arm-low.c (init_registers_arm): Add prototype.
13877 (the_low_target): Add initializer for arch_setup field.
13878 * win32-i386-low.c (init_registers_i386): Add prototype.
13879 (the_low_target): Add initializer for arch_setup field.
13880
13881 * spu-low.c (init_registers_spu): Add prototype.
13882 (initialize_low): Call initialie_registers_spu () instead of
13883 initialize_registers ().
13884
13885 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13886
13887 * server.c (handle_v_requests): When handling the vRun and vAttach
13888 packets, if already debugging a process, don't kill it. Return an
13889 error instead.
13890
13891 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13892
13893 * server.c (handle_query): Correct length check.
13894
13895 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13896
13897 * win32-low.c (do_initial_child_stuff): Add process handle
13898 parameter. Set current_process_handle and current_process_id from the
13899 parameters. Clear globals.
13900 (win32_create_inferior): Don't set current_process_handle and
13901 current_process_id here. Instead pass them on the call to
13902 do_initial_child_stuff.
13903 (win32_attach): Likewise.
13904 (win32_clear_inferiors): New.
13905 (win32_kill): Don't close the current process handle or the
13906 current thread handle here. Instead call win32_clear_inferiors.
13907 (win32_detach): Don't open a new handle to the process. Call
13908 win32_clear_inferiors.
13909 (win32_join): Don't rely on current_process_handle; open a new
13910 handle using the process id.
13911 (win32_wait): Call win32_clear_inferiors when the inferior process
13912 has exited.
13913
13914 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13915
13916 * server.c (monitor_show_help): Add "exit".
13917
13918 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13919
13920 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13921 (clean): Add reg-xtensa.c.
13922 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13923 * configure.srv (xtensa*-*-linux*) New target.
13924 * linux-xtensa-low.c: New.
13925 * xtensa-xtregs.c: New.
13926
13927 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13928
13929 * hostio.c: Don't include errno.h.
13930 (errno_to_fileio_errno): Move to hostio-errno.
13931 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13932 error number outputting to the target->hostio_last_error callback.
13933 (hostio_packet_error): Use FILEIO_EINVAL directly.
13934 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13935 calls to hostio_error.
13936 * hostio-errno.c: New.
13937 * server.h (hostio_last_error_from_errno): Declare.
13938 * target.h (target_ops): Add hostio_last_error member.
13939 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13940 as hostio_last_error handler.
13941 * spu-low.c (spu_target_ops): Likewise.
13942 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13943 (wince_hostio_last_error): New functions.
13944 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13945 as hostio_last_error handler.
13946 (win32_target_ops) [!_WIN32_WCE]: Register
13947 hostio_last_error_from_errno as hostio_last_error handler.
13948 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13949 (hostio-errno.o): New rule.
13950 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13951 * configure.srv (srv_hostio_err_objs): New variable. Default to
13952 hostio-errno.o.
13953 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13954 * configure: Regenerate.
13955
13956 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13957
13958 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13959 (linux_kill, linux_detach): Clean up the process list.
13960 * remote-utils.c (remote_open): Improve port number parsing.
13961 (putpkt_binary, input_interrupt): Only send interrupts if the target
13962 is running.
13963 * server.c (extended_protocol): Make static.
13964 (attached): Define earlier.
13965 (exit_requested, response_needed, program_argv): New variables.
13966 (target_running): New.
13967 (start_inferior): Clear attached here.
13968 (attach_inferior): Set attached here.
13969 (require_running): Define.
13970 (handle_query): Use require_running and target_running. Implement
13971 "monitor exit".
13972 (handle_v_attach, handle_v_run): New.
13973 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13974 (gdbserver_usage): Update.
13975 (main): Redo argument parsing. Handle --debug and --multi. Handle
13976 --attach along with other options or after the port. Save
13977 program_argv. Support no initial program. Resynchronize
13978 communication with GDB after an error. Handle "monitor exit".
13979 Use require_running and target_running. Always allow the extended
13980 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13981 restart in extended mode.
13982 * README: Refer to the GDB manual. Update --attach usage.
13983
13984 2007-12-20 Andreas Schwab <schwab@suse.de>
13985
13986 * linux-low.c (STACK_SIZE): Define.
13987 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13988 (linux_test_for_tracefork): Likewise.
13989
13990 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13991
13992 * linux-low.c (linux_wait_for_event): Update messages. Do not
13993 reinsert auto-delete breakpoints.
13994 * mem-break.c (struct breakpoint): Change return type of handler to
13995 int.
13996 (set_breakpoint_at): Update handler type.
13997 (reinsert_breakpoint_handler): Return 1 instead of calling
13998 delete_breakpoint.
13999 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14000 setting a new one.
14001 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14002 * mem-break.h (set_breakpoint_at): Update handler type.
14003 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14004 * win32-low.c (auto_delete_breakpoint): New.
14005 (get_child_debug_event): Use it.
14006
14007 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14008
14009 * configure.ac: Check for pread and pwrite.
14010 * hostio.c (handle_pread): Fall back to lseek and read.
14011 (handle_pwrite): Fall back to lseek and write.
14012 * config.in, configure: Regenerated.
14013
14014 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14015
14016 * server.c (myresume): Add own_buf argument.
14017 (main): Update calls.
14018
14019 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14020
14021 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14022 * remote-utils.c (remote_open): Do not call disable_async_io.
14023 (block_async_io): Delete.
14024 (unblock_async_io): Make static.
14025 (initialize_async_io): New.
14026 * server.c (handle_v_cont): Handle async I/O here.
14027 (myresume): Likewise. Move other common resume tasks here...
14028 (main): ... from here. Call initialize_async_io. Disable async
14029 I/O before the main loop.
14030 * server.h (initialize_async_io): Declare.
14031 (block_async_io, unblock_async_io): Delete prototypes.
14032 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14033
14034 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14035
14036 * remote-utils.c (readchar): Allow binary data in received messages.
14037
14038 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14039
14040 * win32-low.c (attaching): New global.
14041 (win32_create_inferior): Clear the `attaching' global.
14042 (win32_attach): Set the `attaching' global.
14043 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14044 attaching. Only set a breakpoint at the entry point if not
14045 attaching.
14046
14047 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14048
14049 * server.c (main): Don't report dll events on the initial
14050 connection on attaches.
14051
14052 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14053
14054 * server.c (main): Relax numerical bases supported for the pid of
14055 the --attach command line argument.
14056
14057 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14058
14059 * win32-low.c (win32_attach): Call OpenProcess before
14060 DebugActiveProcess, not after. Add last error output to error
14061 call.
14062
14063 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14064
14065 * win32-low.c (win32_get_thread_context)
14066 (win32_set_thread_context): New functions.
14067 (thread_rec): Use win32_get_thread_context.
14068 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14069 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14070 field.
14071
14072 2007-12-03 Leo Zayas
14073 Pedro Alves <pedro_alves@portugalmail.pt>
14074
14075 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14076 global variables.
14077 (child_add_thread): Minor cleanup.
14078 (child_continue): Resume artificially suspended threads before
14079 calling ContinueDebugEvent.
14080 (suspend_one_thread): New.
14081 (fake_breakpoint_event): New.
14082 (get_child_debug_event): Change return type to int. Check here if
14083 gdb sent an interrupt request. If a soft interrupt was requested,
14084 fake a breakpoint event. Return 0 if there is no event to handle,
14085 and 1 otherwise.
14086 (win32_wait): Don't check here if gdb sent an interrupt request.
14087 Ensure there is a valid event to handle.
14088 (win32_request_interrupt): Add soft interruption method as last
14089 resort.
14090
14091 2007-12-03 Leo Zayas
14092 Pedro Alves <pedro_alves@portugalmail.pt>
14093
14094 * win32-low.h (win32_thread_info): Add descriptions to the
14095 structure members. Replace `suspend_count' counter by a
14096 `suspended' flag.
14097 * win32-low.c (thread_rec): Update condition of when to get the
14098 context from the inferior. Rely on ContextFlags being set if it
14099 has already been retrieved. Only suspend the inferior thread if
14100 we haven't already. Warn if that fails.
14101 (continue_one_thread): s/suspend_count/suspended/. Only call
14102 ResumeThread once. Warn if that fails.
14103
14104 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14105
14106 * win32-low.c (win32_wait): Don't read from the inferior when it
14107 has already exited.
14108
14109 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14110
14111 * Makefile.in (win32_low_h): New variable.
14112 (win32-low.o): Add dependency on $(win32_low_h).
14113 (win32-arm-low.o, win32-i386-low.o): New rules.
14114
14115 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14116
14117 * hostio.c: Correct copyright year.
14118
14119 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14120
14121 * Makefile.in (OBS): Add hostio.o.
14122 (hostio.o): New rule.
14123 * server.h (handle_vFile): Declare.
14124 * hostio.c: New file.
14125 * server.c (handle_v_requests): Take packet_len and new_packet_len
14126 for binary packets. Call handle_vFile.
14127 (main): Update call to handle_v_requests.
14128
14129 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14130
14131 * linux-low.c: Include <sched.h>.
14132
14133 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14134
14135 * linux-low.c (linux_tracefork_grandchild): New.
14136 (linux_tracefork_child): Use clone.
14137 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14138
14139 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14140
14141 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14142
14143 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14144
14145 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14146
14147 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14148
14149 * inferiors.c (change_inferior_id): Delete.
14150 (add_pid_to_list, pull_pid_from_list): New.
14151 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14152 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14153 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14154 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14155 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14156 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14157 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14158 (using_threads): Always set to 1.
14159 (handle_extended_wait): New.
14160 (add_process): Do not set TID.
14161 (linux_create_inferior): Set must_set_ptrace_flags.
14162 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14163 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14164 (linux_thread_alive): Rename TID argument to LWPID.
14165 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14166 (linux_wait_for_event): Do not use TID or check using_threads. Update
14167 call to dead_thread_notify. Call handle_extended_wait.
14168 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14169 (send_sigstop): Delete sigstop_sent.
14170 (wait_for_sigstop): Avoid TID.
14171 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14172 (linux_test_for_tracefork): New.
14173 (linux_lookup_signals): Use thread_db_active and
14174 linux_supports_tracefork_flag.
14175 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14176 * linux-low.h (get_process_thread): Avoid TID.
14177 (struct process_ifo): Move thread_known and tid to the end. Remove
14178 sigstop_sent.
14179 (linux_attach_lwp, thread_db_init): Update prototypes.
14180 * server.h (change_inferior_id): Delete prototype.
14181 (add_pid_to_list, pull_pid_from_list): New prototypes.
14182 * thread-db.c (thread_db_use_events): New.
14183 (find_first_thread): Rename to...
14184 (find_one_thread): ...this. Update callers and messages. Do not
14185 call fatal. Check thread_db_use_events. Do not call
14186 change_inferior_id or new_thread_notify.
14187 (maybe_attach_thread): Update. Do not call new_thread_notify.
14188 (thread_db_init): Set thread_db_use_events. Check use_events.
14189 * utils.c (fatal, warning): Correct message prefix.
14190
14191 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14192
14193 * Makefile.in (clean): Remove new files.
14194 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14195 (powerpc-64.o, powerpc-64.c): New rules.
14196 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14197 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14198 with SPE.
14199 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14200 SPE targets.
14201 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14202 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14203 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14204 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14205 (target_regsets): Add AltiVec and SPE register sets.
14206 * configure.ac: Check for AltiVec and SPE.
14207 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14208 (ppc_fill_vrregset, ppc_store_vrregset): New.
14209 (target_regsets): Add AltiVec register set.
14210 * configure: Regenerated.
14211
14212 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14213
14214 * linux-low.c (O_LARGEFILE): Define.
14215 (linux_read_memory): Use /proc/PID/mem.
14216 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14217 * configure, config.in: Regenerated.
14218
14219 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14220
14221 * linux-low.c (linux_wait_for_event): Do not pass signals while
14222 single-stepping.
14223
14224 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14225
14226 * win32-low.c (create_process): New.
14227 (win32_create_inferior): Use create_process instead of
14228 CreateProcess. If create_process failed retry appending an ".exe"
14229 suffix. Store the GetLastError result immediatelly after
14230 create_process calls and use it on the call to error.
14231
14232 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14233
14234 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14235
14236 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14237
14238 * configure.ac: Switch license to GPLv3.
14239
14240 2007-08-01 Michael Snyder <msnyder@access-company.com>
14241
14242 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14243
14244 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14245
14246 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14247 typedef.
14248 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14249 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14250 CloseToolhelp32Snapshot.
14251 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14252 CloseToolhelp32Snapshot.
14253
14254 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14255
14256 * server.c (main): Check for inferior exit before main loop.
14257
14258 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14259
14260 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14261 instead of on tmp_desc.
14262
14263 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14264 Daniel Jacobowitz <dan@codesourcery.com>
14265
14266 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14267 (add_thread): Minor cleanups.
14268 (clear_inferiors): Move lower in the file. Clear the DLL
14269 list.
14270 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14271 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14272 (xml_escape_text): New.
14273 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14274 for qSupported.
14275 (handle_v_cont): Report errors.
14276 (gdbserver_version): Update.
14277 (main): Correct size of own_buf. Do not report initial DLL events.
14278 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14279 (unloaded_dll, xml_escape_text): New.
14280 * win32-low.c (enum target_waitkind): Update comments.
14281 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14282 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14283 (win32_EnumProcessModules, win32_GetModuleInformation)
14284 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14285 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14286 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14287 (win32_Module32First, win32_Module32Next, load_toolhelp)
14288 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14289 (get_child_debug_event): Handle DLL events.
14290 (win32_wait): Likewise.
14291
14292 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14293
14294 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14295 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14296
14297 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14298
14299 * win32-low.c (handle_output_debug_string): Ignore event if not
14300 waiting.
14301
14302 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14303
14304 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14305
14306 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14307
14308 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14309
14310 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14311
14312 * inferiors.c (change_inferior_id): Add comment.
14313 * linux-low.c (check_removed_breakpoint): Add an early
14314 prototype. Improve debug output.
14315 (linux_attach): Doc update.
14316 (linux_detach_one_process, linux_detach): Clean up before releasing
14317 each process.
14318 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14319 * linux-low.h (struct process_info): Doc improvement.
14320 * mem-break.c (delete_all_breakpoints): New.
14321 * mem-break.h (delete_all_breakpoints): New prototype.
14322 * thread-db.c (find_first_thread): New.
14323 (thread_db_create_event): Call it instead of
14324 thread_db_find_new_threads. Clean up unused variables.
14325 (maybe_attach_thread): Remove first thread handling.
14326 (thread_db_find_new_threads): Use find_first_thread.
14327 (thread_db_get_tls_address): Likewise.
14328
14329 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14330
14331 * thread-db.c (thread_db_find_new_threads): Add prototype.
14332 (thread_db_create_event): Check for the main thread before adding
14333 a new thread.
14334 (maybe_attach_thread): Only enable event reporting if TID == 0.
14335 (thread_db_get_tls_address): Check for new threads.
14336
14337 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14338
14339 * linux-low.c (linux_create_inferior): Try execv before execvp.
14340 * spu-low.c (spu_create_inferior): Likewise.
14341
14342 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14343
14344 * linux-low.c (linux_create_inferior): Change execv to execvp.
14345 * spu-low.c (spu_create_inferior): Likewies.
14346
14347 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14348
14349 * Makefile.in (clean): Clean new files instead of deleted ones.
14350 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14351 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14352 rules.
14353 * configure.srv: Specify XML files and new regformats for MIPS and
14354 MIPS64 GNU/Linux.
14355 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14356 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14357 an entry for the restart register.
14358 (mips_cannot_fetch_register, mips_cannot_store_register)
14359 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14360 register names to match the XML descriptions.
14361 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14362 restart register instead of $0.
14363
14364 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14365 Markus Deuling <deuling@de.ibm.com>
14366
14367 * remote-utils.c (decode_xfer_write): New function.
14368 * server.h (decode_xfer_write): Add prototype.
14369 * server.c (handle_query): Add PACKET_LEN argument. Support
14370 qXfer:spu:read and qXfer:spu:write packets.
14371 (main): Pass packet_len to handle_query.
14372 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14373 * target.h (target_ops): Add qxfer_spu.
14374
14375 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14376
14377 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14378 accessing non-seekable spufs files.
14379
14380 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14381
14382 * server.c (handle_query): Add reply for qC packet.
14383
14384 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14385 Leo Zayas <lerele@champenstudios@com>
14386
14387 * server.h (check_remote_input_interrupt_request): New function.
14388 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14389 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14390 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14391 (check_remote_input_interrupt_request): New function.
14392 * server.h (check_remote_input_interrupt_request): Declare.
14393 * win32-low.c (winapi_DebugBreakProcess,
14394 winapi_GenerateConsoleCtrlEvent): New typedefs.
14395 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14396 to 250 ms.
14397 (win32_wait): Check for remote interrupt request
14398 with check_remote_input_interrupt_request.
14399 (win32_request_interrupt): New function.
14400 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14401
14402 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14403
14404 * win32-low.c (debug_registers_changed,
14405 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14406 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14407 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14408 (thread_rec): Get context using the low target.
14409 (child_add_thread): Call thread_added on the low target,
14410 which does the same thing.
14411 (regptr): Delete.
14412 (do_initial_child_stuff): Remove debug registers references.
14413 Set context using the low target. Resume threads after
14414 setting the contexts.
14415 (child_continue): Remove dead variable. Remove debug
14416 registers references.
14417 (child_fetch_inferior_registers): Go through the low target.
14418 (do_child_store_inferior_registers): Remove.
14419 (child_store_inferior_registers): Go through the low target.
14420 (win32_resume): Remove debug registers references.
14421 Set context using the low target.
14422 (handle_exception): Change return type to void. Don't record
14423 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14424 first chance exception.
14425 (get_child_debug_event): Change return type to void. Remove
14426 goto loop. Always return after waiting for debug event.
14427 (win32_wait): Convert to switch statement. Handle spurious
14428 events.
14429
14430 * win32-i386-low.c (debug_registers_changed,
14431 debug_registers_used): New.
14432 (initial_stuff): Rename to ...
14433 (i386_initial_stuff): ... this. Clear debug registers
14434 state variables.
14435 (store_debug_registers): Delete.
14436 (i386_get_thread_context): New.
14437 (load_debug_registers): Delete.
14438 (i386_set_thread_context): New.
14439 (i386_thread_added): New.
14440 (single_step): Rename to ...
14441 (i386_single_step): ... this.
14442 (do_fetch_inferior_registers): Rename to ...
14443 (i386_fetch_inferior_register): ... this.
14444 (i386_store_inferior_register): New.
14445 (the_low_target): Adapt to new interface.
14446
14447 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14448 (arm_get_thread_context): New.
14449 (arm_set_thread_context): New.
14450 (regptr): New.
14451 (do_fetch_inferior_registers): Rename to ...
14452 (arm_fetch_inferior_register): ... this.
14453 (arm_store_inferior_register): New.
14454 (arm_wince_breakpoint): Reimplement as unsigned long.
14455 (arm_wince_breakpoint_len): Define.
14456 (the_low_target): Adapt to new interface.
14457
14458 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14459 load_debug_registers. Add get_thread_context, set_thread_context,
14460 thread_added and store_inferior_register. Rename
14461 fetch_inferior_registers to fetch_inferior_register.
14462 (regptr): Remove declaration.
14463
14464 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14465
14466 * linux-low.c (linux_detach): Change return type to int. Return 0.
14467 * spu-low.c (spu_detach): Likewise.
14468
14469 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14470
14471 * target.h (target_ops): Change return type of detach to int.
14472 Add join.
14473 (join_inferior): New.
14474 * server.c (main): Don't skip detach support on mingw32.
14475 If the inferior doesn't support detaching return error.
14476 Call join_inferior instead of using waitpid.
14477 * linux-low.c (linux_join): New.
14478 (linux_target_op): Add linux_join.
14479 * spu-low.c (spu_join): New.
14480 (spu_target_ops): Add spu_join.
14481 * win32-low.c (win32_detach): Adapt to new interface.
14482 Reopen current_process_handle before detaching. Issue a child
14483 resume before detaching.
14484 (win32_join): New.
14485 (win32_target_op): Add win32_join.
14486
14487 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14488
14489 * win32-low.c (win32-attach): Fix return value.
14490 * target.h (target_ops): Describe ATTACH return values.
14491
14492 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14493
14494 * win32-low.c (GETPROCADDRESS): Define.
14495 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14496 (winapi_DebugSetProcessKillOnExit): Likewise.
14497 (win32_create_inferior): Force usage of ansi CreateProcessA.
14498 (win32_attach): Use GETPROCADDRESS.
14499 (win32_detach): Likewise.
14500
14501 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14502
14503 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14504
14505 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14506
14507 * win32-low.c: Commit leftover changes from 2007-03-29.
14508
14509 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14510
14511 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14512 fields short instead of int. Add explicit padding.
14513 (i387_cache_to_fsave): Remove unnecessary casts.
14514 (i387_fsave_to_cache): Doc fix.
14515 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14516
14517 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14518
14519 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14520 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14521
14522 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14523
14524 * configure.srv (arm*-*-mingw32ce*): Move near the other
14525 arm targets.
14526
14527 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14528
14529 * configure.ac: Add errno checking.
14530 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14531 sys/file.h and malloc.h.
14532 (AC_CHECK_DECLS): Add perror.
14533 (srv_mingwce): Handle.
14534 * configure.srv (i[34567]86-*-cygwin*): Add
14535 win32-i386-low.o to srv_tgtobj.
14536 (i[34567]86-*-mingw*): Likewise.
14537 (arm*-*-mingw32ce*): Add case.
14538 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14539 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14540 [__MINGW32CE__] (strerror): New function.
14541 [__MINGW32CE__] (errno): Define to GetLastError.
14542 [__MINGW32CE__] (COUNTOF): New macro.
14543 (remote_open): Remove extra close call.
14544 * mem-break.c (delete_breakpoint_at): New function.
14545 * mem-break.h (delete_breakpoint_at): Declare.
14546 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14547 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14548 [USE_WIN32API] (read, write): Add char* casts.
14549 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14550 * server.h: Include wincecompat.h on Windows CE.
14551 [HAVE_ERRNO_H]: Check.
14552 (perror): Declare if not declared.
14553 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14554 (perror_with_name): Remove errno declaration.
14555 * wincecompat.h: New.
14556 * wincecompat.c: New.
14557 * win32-low.h: New.
14558 * win32-arm-low.c: New.
14559 * win32-i386-low.c: New.
14560 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14561 (OUTMSG2): Make it safe.
14562 (_T): New macro.
14563 (COUNTOF): New macro.
14564 (NUM_REGS): Get it from the low target.
14565 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14566 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14567 (thread_rec): Let low target handle debug registers.
14568 (child_add_thread): Likewise.
14569 (child_init_thread_list): Likewise.
14570 (continue_one_thread): Likewise.
14571 (regptr): New.
14572 (do_child_fetch_inferior_registers): Move to ...
14573 * win32-i386-low.c: ... here, and rename to ...
14574 (do_fetch_inferior_registers): ... this.
14575 * win32-low.c (child_fetch_inferior_registers):
14576 Go through the low target.
14577 (do_child_store_inferior_registers): Use regptr.
14578 (strwinerror): New function.
14579 (win32_create_inferior): Handle Windows CE.
14580 Use strwinerror instead of strerror on Windows error
14581 codes. Add program to the error output.
14582 Don't close the main thread handle on Windows CE.
14583 (win32_attach): Use coredll.dll on Windows CE.
14584 (win32_kill): Close current process and current
14585 thread handles.
14586 (win32_detach): Use coredll.dll on Windows CE.
14587 (win32_resume): Let low target handle debug registers, and
14588 step request.
14589 (handle_exception): Add/Remove initial breakpoint. Avoid
14590 non-existant WSTOPSIG on Windows CE.
14591 (win32_read_inferior_memory): Cast to remove warning.
14592 (win32_arch_string): Go through the low target.
14593 (initialize_low): Call set_breakpoint_data with the low
14594 target's breakpoint.
14595 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14596 FOP_REGNUM, mappings): Move to ...
14597 * win32-i386-low.c: ... here.
14598 * win32-low.c (win32_thread_info): Move to ...
14599 * win32-low.h: ... here.
14600 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14601 win32-arm-low.c and wincecompat.c.
14602 (all:): Add $EXEEXT.
14603 (install-only:): Likewise.
14604 (gdbserver:): Likewise.
14605 (gdbreplay:): Likewise.
14606 * config.in: Regenerate.
14607 * configure: Regenerate.
14608
14609 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14610
14611 * win32-low.c: Rename typedef thread_info to
14612 win32_thread_info throughout.
14613
14614 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14615
14616 * win32-i386-low.c: Rename to ...
14617 * win32-low.c: ... this.
14618 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14619 * Makefile.in: Likewise.
14620
14621 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14622
14623 * remote-utils.c (monitor_output): Constify msg parameter.
14624 * server.h (monitor_output): Likewise.
14625 * win32-i386-low.c (handle_output_debug_string): New.
14626 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14627 handle_output_debug_string.
14628 (get_child_debug_event): Likewise.
14629
14630 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14631
14632 * server.c (main): Correct strtoul check.
14633
14634 2007-03-27 Jon Ringle <jon@ringle.org>
14635
14636 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14637
14638 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14639
14640 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14641
14642 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14643
14644 * terminal.h: Check HAVE_SGTTY_H.
14645
14646 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14647
14648 * remote-utils.c (remote_open): Print out the assigned port number.
14649
14650 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14651
14652 * remote-utils.c (monitor_output): New function.
14653 * server.c (debug_threads): Define here.
14654 (monitor_show_help): New function.
14655 (handle_query): Handle qRcmd.
14656 (main): Do not handle 'd' packet.
14657 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14658 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14659 of debug_threads.
14660
14661 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14662
14663 * Makefile.in (EXEEXT): New.
14664 (clean): Use $(EXEEXT).
14665
14666 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14667
14668 * target.h (target_ops): Rename send_signal to request_interrupt,
14669 and remove enum target_signal parameter.
14670 * linux-low.c (linux_request_interrupt): Rename from
14671 linux_send_signal, and always send SIGINT.
14672 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14673 and always send SIGINT.
14674 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14675 of send_signal.
14676 (input_interrupt): Likewise.
14677
14678 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14679
14680 * server.c (get_features_xml): Check if target implemented
14681 arch_string.
14682 * win32-i386-low.c (win32_arch_string): New.
14683 (win32_target_ops): Add win32_arch_string as arch_string member.
14684
14685 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14686
14687 * spu-low.c (spu_arch_string): New.
14688 (spu_target_ops): Add spu_arch_string.
14689
14690 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14691
14692 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14693 * configure.ac: Do not check for terminal.h.
14694 * configure, config.in: Regenerated.
14695
14696 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14697
14698 * Makefile.in (OBS): Add $(XML_BUILTIN).
14699 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14700 (clean): Update.
14701 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14702 (arm-with-iwmmxt.c): New.
14703 * config.in, configure: Regenerate.
14704 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14705 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14706 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14707 (arm*-*-linux*): Add iWMMXt and regset support.
14708 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14709 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14710 (arm_store_wmmxregset, target_regsets): New.
14711 * server.c (get_features_xml): Take annex argument. Check builtin
14712 XML documents.
14713 (handle_query): Handle multiple annexes.
14714
14715 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14716
14717 * remote-utils.c [USE_WIN32API] (read, write): Define.
14718 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14719 write.
14720
14721 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14722
14723 * linux-i386-low.c (the_low_target): Set arch_string.
14724 * linux-x86-64-low.c (the_low_target): Likewise.
14725 * linux-low.c (linux_arch_string): New.
14726 (linux_target_ops): Add it.
14727 * linux-low.h (struct linux_target_ops): Add arch_string.
14728 * server.c (write_qxfer_response): Use const void * for DATA.
14729 (get_features_xml): New.
14730 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14731 * target.h (struct target_ops): Add arch_string method.
14732
14733 2007-01-03 Denis Pilat <denis.pilat@st.com>
14734 Daniel Jacobowitz <dan@codesourcery.com>
14735
14736 * linux-low.c (linux_kill): Handle being called with no threads.
14737 * win32-i386-low.c (win32_kill): Likewise.
14738 (get_child_debug_event): Clear current_process_handle.
14739
14740 2006-12-30 Denis PILAT <denis.pilat@st.com>
14741 Daniel Jacobowitz <dan@codesourcery.com>
14742
14743 * remote-utils.c (remote_open): Check the type of specified
14744 serial port devices before opening them.
14745 * server.c (main): Kill the inferior if an error occurs during
14746 the first remote_open.
14747
14748 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14749
14750 * README: Update supported targets.
14751
14752 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14753
14754 * Makefile.in (clean): Remove reg-mips64.c.
14755 (reg-mips64.c, reg-mips64.o): New rules.
14756 * configure.srv: Handle mips64. Include regset support for mips.
14757 * linux-mips-low.c (union mips_register): New.
14758 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14759 (mips_breakpoint, mips_breakpoint_at): Use int.
14760 (mips_collect_register, mips_supply_register)
14761 (mips_collect_register_32bit, mips_supply_register_32bit)
14762 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14763 (mips_store_fpregset, target_regsets): New.
14764 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14765
14766 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14767
14768 * configure.srv: Add target "spu*-*-*".
14769 * Makefile.in (clean): Remove reg-spu.c.
14770 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14771 * spu-low.c: New file.
14772
14773 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14774
14775 * configure.ac: Correct td_thr_tls_get_addr test.
14776 * configure: Regenerated.
14777
14778 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14779
14780 * linux-low.c (linux_wait_for_event): Reformat. Use the
14781 pass_signals array.
14782 * remote-utils.c (decode_address_to_semicolon): New.
14783 * server.c (pass_signals, handle_general_set): New.
14784 (handle_query): Mention QPassSignals for qSupported.
14785 (main): Call handle_general_set.
14786 * server.h (pass_signals, decode_address_to_semicolon): New.
14787
14788 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14789
14790 * server.c (handle_query): Correct error handling for read_auxv.
14791
14792 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14793
14794 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14795 and srv_linux_thread_db to yes.
14796 * linux-s390-low.c (s390_fill_gregset): New function.
14797 (target_regsets): Define data structure.
14798
14799 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14800
14801 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14802 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14803 * config.in, configure: Regenerated.
14804 * inferiors.c (gdb_id_to_thread): New function.
14805 (gdb_id_to_thread_id): Use it.
14806 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14807 * linux-low.h (struct process_info): Add th member.
14808 (thread_db_get_tls_address): New prototype.
14809 * remote-utils.c (decode_address): Make non-static.
14810 * server.c (handle_query): Handle qGetTLSAddr.
14811 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14812 * target.h (struct target_ops): Add get_tls_address.
14813 * thread-db.c (maybe_attach_thread): Save the thread handle.
14814 (thread_db_get_tls_address): New.
14815
14816 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14817
14818 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14819 (linux_resume_one_process): Take a siginfo_t *. Update all
14820 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14821 (struct pending_signals): Add a siginfo_t.
14822 (linux_wait_for_process): Always set last_status.
14823 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14824 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14825 * linux-low.h (struct process_info): Add last_status.
14826
14827 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14828
14829 * remote-utils.c (try_rle): New function.
14830 (putpkt_binary): Use it.
14831
14832 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14833
14834 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14835 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14836 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14837 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14838 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14839 point registers.
14840
14841 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14842
14843 * server.c (terminal_fd): New variable.
14844 (old_foreground_pgrp): Likewise.
14845 (restore_old_foreground_pgrp): New function.
14846 (start_inferior): Record the terminal file descriptor in terminal_fd
14847 and its original foreground group in old_foreground_pgrp. Register
14848 restore_old_foreground_pgrp with atexit().
14849
14850 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14851
14852 * server.c (handle_query): Correct qPart to qXfer.
14853
14854 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14855
14856 * configure.ac: Check for more headers which are missing on
14857 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14858 * configure.srv: Add Cygwin and mingw32.
14859 * remote-utils.c: Don't include headers unconditionally which
14860 are missing on mingw32. Include <winsock.h> for mingw32.
14861 (remote_open): Adjust for mingw32 support. Flush
14862 standard error after writing to it.
14863 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14864 (unblock_async_io, enable_async_io, disable_async_io)
14865 (readchar, getpkt): Update for Winsock support.
14866 (prepare_resume_reply): Expect a protocol signal number.
14867 * server.c: Disable <sys/wait.h> on mingw32.
14868 (start_inferior): Adjust for mingw32 support. Flush
14869 standard error after writing to it.
14870 (attach_inferior): Likewise. Use protocol signal
14871 numbers.
14872 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14873 and names.
14874 * win32-i386-low.c: New file.
14875 * Makefile.in (XM_CLIBS): Set.
14876 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14877 (win32-i386-low.o): New dependency rule.
14878 * linux-low.c (linux_wait): Use target signal numbers.
14879 * target.h (struct target_ops): Doc fix.
14880 * server.h (target_signal_to_name): New prototype.
14881 * gdbreplay.c: Don't include headers unconditionally which
14882 are missing on mingw32. Include <winsock.h> for mingw32.
14883 (remote_close, remote_open): Adjust for Winsock support.
14884 * configure, config.in: Regenerated.
14885
14886 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14887
14888 * server.c (decode_xfer_read, write_qxfer_response): New.
14889 (handle_query): Take a packet length argument. Handle
14890 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14891 the qSupported response.
14892 (main): Update call to handle_query.
14893
14894 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14895
14896 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14897 (putpkt_binary): Renamed from putpkt and adjusted for binary
14898 data.
14899 (putpkt): New wrapper for putpkt_binary.
14900 (readchar): Don't mask off the high bit.
14901 (decode_X_packet): New function.
14902 * server.c (main): Call putpkt_binary if a handler sets the packet
14903 length. Save the length of the incoming packet. Handle 'X'.
14904 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14905
14906 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14907
14908 * server.c (handle_query): Handle qSupported.
14909
14910 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14911
14912 * remote-utils.c (all_symbols_looked_up): New variable.
14913 (look_up_one_symbol): Check it.
14914 * server.h (look_up_one_symbol): New declaration.
14915 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14916
14917 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14918
14919 * Makefile.in (linux-arm-low.o): Update dependencies.
14920 * linux-arm-low.c: Include "gdb_proc_service.h".
14921 (PTRACE_GET_THREAD_AREA): Define.
14922 (ps_get_thread_area): New function.
14923
14924 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14925
14926 * configure.srv (m68k*-*-uclinux*): New target.
14927 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14928 (linux_resume_one_process): Remove extraneous cast.
14929 (linux_read_offsets): New.
14930 (linux_target_op): Add linux_read_offsets on mmuless systems.
14931 * server.c (handle_query): Add qOffsets logic.
14932 * target.h (struct target_ops): Add read_offsets.
14933
14934 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14935
14936 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14937 (PTRACE_GET_THREAD_AREA): Define.
14938 (ps_get_thread_area): New function.
14939 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14940 (linux-x86-64-low.o): Update.
14941
14942 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14943
14944 * configure.ac: Remove checks for prfpregset_t.
14945 * gdb_proc_service.h: New file.
14946 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14947 new "gdb_proc_service.h".
14948 * proc-service.c: Likewise.
14949 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14950 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14951 * Makefile.in (gdb_proc_service_h): Updated.
14952 * configure, config.in: Regenerated.
14953
14954 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14955
14956 * remote-utils.c (prepare_resume_reply): Move declaration
14957 of gdb_id_from_wait to the top of the block.
14958
14959 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14960
14961 * linux-low.c (regsets_store_inferior_registers): Read the regset
14962 from the target before filling it.
14963
14964 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14965
14966 * server.c (attach_inferior): Return SIGTRAP for a successful
14967 attach.
14968
14969 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14970
14971 * Makefile.in (OBS): Add version.o.
14972 (STAGESTUFF): Delete.
14973 (version.o): Add dependencies.
14974 (version.c): Replace rule.
14975 (clean): Remove version.c.
14976 * server.c (gdbserver_version): New.
14977 (gdbserver_usage): Use printf.
14978 (main): Handle --version and --help.
14979 * server.h (version, host_name): Add declarations.
14980
14981 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14982
14983 * linux-arm-low.c:
14984 * linux-arm-low.c:
14985 * inferiors.c:
14986 * i387-fp.h:
14987 * i387-fp.c:
14988 * gdbreplay.c:
14989 * regcache.c:
14990 * proc-service.c:
14991 * mem-break.h:
14992 * mem-break.c:
14993 * linux-x86-64-low.c:
14994 * linux-sh-low.c:
14995 * linux-s390-low.c:
14996 * linux-ppc64-low.c:
14997 * linux-ppc-low.c:
14998 * linux-mips-low.c:
14999 * linux-m68k-low.c:
15000 * linux-m32r-low.c:
15001 * linux-low.h:
15002 * linux-low.c:
15003 * linux-ia64-low.c:
15004 * linux-i386-low.c:
15005 * linux-crisv32-low.c:
15006 * thread-db.c:
15007 * terminal.h:
15008 * target.h:
15009 * target.c:
15010 * server.h:
15011 * server.c:
15012 * remote-utils.c:
15013 * regcache.h:
15014 * utils.c:
15015 * Makefile.in:
15016 * configure.ac:
15017 * gdbserver.1: Add (C) after Copyright. Update the FSF
15018 address.
15019
15020 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15021
15022 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15023 (arm_breakpoint_at): Recognize both breakpoints.
15024 (the_low_target): Use the correct breakpoint instruction.
15025
15026 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15027
15028 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15029 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15030 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15031 (the_low_target): Update.
15032
15033 2005-10-25 Andreas Schwab <schwab@suse.de>
15034
15035 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15036
15037 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15038 (ia64_num_regs): Reduce to 462.
15039
15040 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15041
15042 * acinclude.m4: Correct quoting.
15043 * aclocal.m4: Regenerated.
15044
15045 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15046 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15047 (thread_db_init): Call thread_db_err_str.
15048 * configure.ac: Check for TD_VERSION.
15049 * config.in, configure: Regenerated.
15050
15051 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15052
15053 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15054
15055 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15056
15057 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15058 is not available. Define HAVE_PTRACE_GETREGS if it is.
15059 * config.in, configure: Regenerated.
15060 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15061 * linux-i386-low.c, linux-m68k-low.c: Update to use
15062 HAVE_PTRACE_GETREGS.
15063 * linux-low.c (regsets_fetch_inferior_registers)
15064 (regsets_store_inferior_registers): Only return 0 if we processed
15065 GENERAL_REGS.
15066 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15067 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15068
15069 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15070
15071 * inferiors.c (struct thread_info): Add gdb_id.
15072 (add_thread): Add gdb_id argument.
15073 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15074 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15075 calls to add_thread.
15076 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15077 * server.c (handle_query): Use thread_to_gdb_id.
15078 (handle_v_cont, main): Use gdb_id_to_thread_id.
15079 * server.h (add_thread): Update prototype.
15080 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15081 prototypes.
15082
15083 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15084
15085 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15086 left-padded registers.
15087 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15088 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15089
15090 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15091
15092 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15093 * configure: Regenerate.
15094 * config.in: Regenerate.
15095 * server.h (NEED_DECLARATION_STRERROR):
15096 Replace with !HAVE_DECL_STRERROR.
15097
15098 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15099
15100 * linux-low.c (linux_wait, linux_send_signal): Don't test
15101 an unsigned long variable for > 0 if it could be MAX_ULONG.
15102 * server.c (myresume): Likewise.
15103 * target.c (set_desired_inferior): Likewise.
15104
15105 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15106
15107 * configure.ac: Simplify and improve check for socklen_t.
15108 * configure, config.in: Regenerate.
15109
15110 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15111
15112 * acconfig.h: Remove.
15113 * configure.ac: Add a test for socklen_t. Use three-argument
15114 AC_DEFINE throughout.
15115 * config.in: Regenerated using autoheader 2.59.
15116 * configure: Regenerated.
15117
15118 * gdbreplay.c (socklen_t): Provide a default.
15119 (remote_open): Use socklen_t.
15120 * remote-utils.c (socklen_t): Provide a default.
15121 (remote_open): Use socklen_t.
15122 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15123 unsigned char.
15124
15125 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15126 char for buffers.
15127 * linux-low.c (linux_read_memory, linux_write_memory)
15128 (linux_read_auxv): Likewise.
15129 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15130 (check_mem_write): Likewise.
15131 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15132 Likewise.
15133 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15134 (registers_from_string, register_data): Likewise.
15135 * server.c (handle_query, main): Likewise.
15136 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15137 (decode_M_packet): Likewise.
15138 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15139 * target.h (struct target_ops): Update read_memory, write_memory,
15140 and read_auxv.
15141 (read_inferior_memory, write_inferior_memory): Update.
15142 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15143 to unsigned char *.
15144 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15145 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15146 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15147 linux-s390-low.c, linux-sh-low.c: Update for changes in
15148 read_inferior_memory and the_low_target->breakpoint.
15149
15150 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15151
15152 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15153 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15154 * configure.srv: Add powerpc64-*-linux*.
15155 * linux-ppc64-low.c: New file.
15156
15157 2005-05-23 Orjan Friberg <orjanf@axis.com>
15158
15159 * linux-cris-low.c: New file with support for CRIS.
15160 * linux-crisv32-low.c: Ditto for CRISv32.
15161 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15162 (clean): Add reg-cris.c and reg-crisv32.c.
15163 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15164 reg-crisv32.o, and reg-crisv32.c to make rules.
15165 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15166 recognized targets.
15167
15168 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15169
15170 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15171 of sizeof (PTRACE_XFER_TYPE).
15172 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15173
15174 2005-05-12 Orjan Friberg <orjanf@axis.com>
15175
15176 * target.h (struct target_ops): Add insert_watchpoint,
15177 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15178 pointers for hardware watchpoint support.
15179 * linux-low.h (struct linux_target_ops): Ditto.
15180 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15181 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15182 to linux_target_ops.
15183 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15184 reply packet.
15185 * server.c (main): Recognize 'Z' and 'z' packets.
15186
15187 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15188
15189 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15190 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15191 (the_low_target): Add new members.
15192
15193 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15194
15195 * proc-service.c (ps_lgetregs): Search all_processes instead of
15196 all_threads.
15197
15198 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15199
15200 * server.c (start_inferior): Change return type to int.
15201 (attach_inferior): Change sigptr to int *.
15202 (handle_v_cont, handle_v_requests): Change signal to int *.
15203 (main): Change signal to int.
15204
15205 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15206
15207 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15208 * configure.srv: Add m32r*-*-linux*.
15209 * linux-m32r-low.c: New file.
15210
15211 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15212
15213 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15214
15215 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15216
15217 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15218 Take unsigned long arguments for PIDs.
15219 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15220 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15221 (wait_for_sigstop, linux_resume_one_process)
15222 (regsets_fetch_inferior_registers, linux_send_signal)
15223 (linux_read_auxv): Likewise. Update the types of variables holding
15224 PIDs. Update format string specifiers.
15225 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15226 * remote-utils.c (prepare_resume_reply): Likewise.
15227 * server.c (cont_thread, general_thread, step_thread)
15228 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15229 unsigned long.
15230 (handle_query): Update format specifiers.
15231 (handle_v_cont, main): Use strtoul for thread IDs.
15232 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15233 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15234 (general_thread, step_thread, thread_from_wait)
15235 (old_thread_from_wait): Update.
15236 * target.h (struct thread_resume): Use unsigned long for THREAD.
15237 (struct target_ops): Use unsigned long for arguments to attach and
15238 thread_alive.
15239
15240 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15241
15242 * acinclude.m4: Include bfd/bfd.m4 directly.
15243 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15244 <agriffis@toolchain.org>.
15245 * aclocal.m4, configure: Regenerated.
15246
15247 2005-01-07 Andrew Cagney <cagney@gnu.org>
15248
15249 * configure.ac: Rename configure.in, require autoconf 2.59.
15250 * configure: Re-generate.
15251
15252 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15253
15254 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15255 LIBS when finished.
15256 * aclocal.m4: Regenerated.
15257 * configure: Regenerated.
15258
15259 2004-11-21 Andreas Schwab <schwab@suse.de>
15260
15261 * linux-m68k-low.c (m68k_num_gregs): Define.
15262 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15263 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15264 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15265 (m68k_breakpoint_at): New. Add to the_low_target.
15266
15267 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15268 srv_linux_thread_db to yes.
15269
15270 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15271
15272 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15273 (ARCH_SET_FS): Likewise.
15274 (ARCH_GET_FS): Likewise.
15275 (ARCH_GET_GS): Likewise.
15276
15277 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15278
15279 * linux-i386-low.c (ps_get_thread_area): New.
15280 * linux-x86-64-low.c (ps_get_thread_area): New.
15281 * linux-low.c: Include <sys/syscall.h>.
15282 (linux_kill_one_process): Don't kill the first thread here.
15283 (linux_kill): Kill the first thread here.
15284 (kill_lwp): New function.
15285 (send_sigstop, linux_send_signal): Use it.
15286 * proc-service.c: Clean up #ifdefs.
15287 (fpregset_info): Delete.
15288 (ps_lgetregs): Update and enable implementation.
15289 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15290 implementations.
15291 * remote-utils.c (struct sym_cache, symbol_cache): New.
15292 (input_interrupt): Print a clearer message.
15293 (async_io_enabled): New variable.
15294 (enable_async_io, disable_async_io): Use it. Update comments.
15295 (look_up_one_symbol): Use the symbol cache.
15296 * thread-db.c (thread_db_look_up_symbols): New function.
15297 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15298
15299 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15300
15301 * configure.in: Test for -rdynamic.
15302 * configure: Regenerated.
15303 * Makefile (INTERNAL_LDFLAGS): New.
15304 (gdbserver, gdbreplay): Use it.
15305
15306 2004-09-02 Andrew Cagney <cagney@gnu.org>
15307
15308 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15309
15310 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15311
15312 * linux-low.c (linux_wait): Clear all_processes list also.
15313
15314 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15315
15316 * linux-low.c: Include <errno.h>. Remove extern declaration of
15317 errno.
15318
15319 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15320
15321 * gdbreplay.c, server.h, utils.c: Update copyright years.
15322
15323 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15324
15325 * server.c (main): Print child status or termination signal from
15326 variable 'signal', not 'sig'.
15327
15328 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15329
15330 * linux-low.c (linux_read_memory): Change return type to
15331 int. Check for and return error from ptrace().
15332 * target.c (read_inferior_memory): Change return type to int. Pass
15333 back return status from the_target->read_memory().
15334 * target.h (struct target_ops): Adapt *read_memory() prototype.
15335 Update comment.
15336 (read_inferior_memory): Adapt prototype.
15337 * server.c (main): Return an error packet if
15338 read_inferior_memory() returns an error.
15339
15340 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15341
15342 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15343 Unify with other clean targets.
15344
15345 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15346
15347 * server.c (handle_v_cont): Call set_desired_inferior.
15348
15349 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15350
15351 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15352
15353 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15354
15355 * linux-low.c (linux_wait): Unblock async I/O.
15356 (linux_resume): Block and enable async I/O.
15357 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15358 * server.h (block_async_io, unblock_async_io): Add prototypes.
15359
15360 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15361
15362 * remote-utils.c (remote_open): Print a status notice after
15363 opening a TCP port.
15364 * server.c (attach_inferior): Print a status notice after
15365 attaching.
15366
15367 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15368
15369 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15370
15371 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15372
15373 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15374 error packet.
15375 * server.c, target.h: Update copyright years.
15376
15377 2004-02-25 Roland McGrath <roland@redhat.com>
15378
15379 * target.h (struct target_ops): New member `read_auxv'.
15380 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15381 * linux-low.c (linux_read_auxv): New function.
15382 (linux_target_ops): Initialize `read_auxv' member to that.
15383
15384 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15385
15386 Committed by Jim Blandy <jimb@redhat.com>.
15387
15388 * linux-s390-low.c (s390_num_regs): Update.
15389 (s390_regmap): Remove control registers. Use __s390x__ predefine
15390 instead of GPR_SIZE to distiguish s390 and s390x targets.
15391
15392 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15393
15394 * linux-low.c: Update copyright year.
15395 (check_removed_breakpoint): Clear pending_is_breakpoint.
15396 (linux_set_resume_request, linux_queue_one_thread)
15397 (resume_status_pending_p): New functions.
15398 (linux_continue_one_thread): Use process->resume.
15399 (linux_resume): Only resume threads if there are no pending events.
15400 * linux-low.h (struct process_info): Add resume request
15401 pointer.
15402
15403 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15404
15405 * regcache.c (new_register_cache): Clear the allocated register
15406 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15407
15408 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15409
15410 * linux-low.c (linux_resume): Take a struct thread_resume *
15411 argument.
15412 (linux_wait): Update call.
15413 (resume_ptr): New static variable.
15414 (linux_continue_one_thread): Renamed from
15415 linux_continue_one_process. Use resume_ptr.
15416 (linux_resume): Use linux_continue_one_thread.
15417 * server.c (handle_v_cont, handle_v_requests): New functions.
15418 (myresume): New function.
15419 (main): Handle 'v' case.
15420 * target.h (struct thread_resume): New type.
15421 (struct target_ops): Change argument of "resume" to struct
15422 thread_resume *.
15423 (myresume): Delete macro.
15424
15425 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15426
15427 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15428 (uninstall): Support DESTDIR.
15429
15430 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15431
15432 * configure.srv: Add xscale*linux copy of arm*linux entry.
15433
15434 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15435
15436 * linux-arm-low.c (arm_reinsert_addr): New function.
15437 (the_low_target): Add arm_reinsert_addr.
15438
15439 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15440
15441 * mem-break.c: Remove whitespace at end of file.
15442
15443 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15444
15445 * configure.in: Check whether we need to prototype strerror.
15446 * server.h: Optionally prototype strerror.
15447 * gdbreplay.c (perror_with_name): Use strerror.
15448 * linux-low.c (linux_attach_lwp): Use strerror.
15449 * utils.c (perror_with_name): Use strerror.
15450 * config.in, configure: Regenerated.
15451
15452 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15453
15454 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15455 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15456
15457 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15458
15459 * Makefile.in (SFILES): Update.
15460 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15461 low-sun3.c: Remove files.
15462
15463 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15464
15465 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15466 (linux_detach_one_process, linux_detach): New functions.
15467 (linux_target_ops): Add linux_detach.
15468 * server.c (main): Handle 'D' packet.
15469 * target.h (struct target_ops): Add "detach" member.
15470 (detach_inferior): Define.
15471
15472 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15473
15474 From Kelley Cook <kelleycook@wideopenwest.com>:
15475 * configure.srv: Accept i[34567]86 variants.
15476
15477 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15478
15479 * linux-low.c (linux_wait_for_event): Correct comment typos.
15480 (linux_resume_one_process): Call check_removed_breakpoint.
15481 (linux_send_signal): New function.
15482 (linux_target_ops): Add linux_send_signal.
15483 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15484 of kill.
15485 * target.h (struct target_ops): Add send_signal.
15486
15487 2003-05-29 Jim Blandy <jimb@redhat.com>
15488
15489 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15490 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15491 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15492 away part of the register's value.
15493
15494 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15495
15496 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15497 (linux_wait_for_event, linux_init_signals): Likewise.
15498
15499 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15500
15501 * configure.in: Check for stdlib.h.
15502 * configure: Regenerated.
15503 * config.in: Regenerated.
15504
15505 2003-01-04 Andreas Schwab <schwab@suse.de>
15506
15507 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15508
15509 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15510
15511 * Makefile.in: Remove obsolete code.
15512
15513 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15514
15515 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15516 defined(PT_FPR0_HI).
15517
15518 2002-11-17 Stuart Hughes <seh@zee2.com>
15519
15520 * linux-arm-low.c (arm_num_regs): Increase.
15521 (arm_regmap): Include status register.
15522
15523 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15524
15525 * linux-low.c (register_addr): Remove incorrect -1 check.
15526
15527 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15528
15529 * linux-low.c (linux_create_inferior): Call setpgid. Return
15530 the new PID.
15531 (unstopped_p, linux_signal_pid): Remove.
15532 (linux_target_ops): Remove linux_signal_pid.
15533 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15534 global instead of target method.
15535 * target.h (struct target_ops): Remove signal_pid. Update comment
15536 for create_inferior.
15537 * server.c (signal_pid): New variable.
15538 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15539 gdbserver. Set the child to be the foreground process group.
15540 (attach_inferior): Set signal_pid.
15541
15542 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15543
15544 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15545
15546 2002-08-20 Jim Blandy <jimb@redhat.com>
15547
15548 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15549 default for this.
15550
15551 2002-08-01 Andrew Cagney <cagney@redhat.com>
15552
15553 * Makefile.in: Make chill references obsolete.
15554
15555 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15556
15557 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15558 * configure: Regenerate.
15559 * config.in: Regenerate.
15560
15561 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15562
15563 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15564 (perror_with_name, remote_close, remote_open, expect, play): Static.
15565
15566 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15567
15568 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15569 byte offsets instead of an array of indexes.
15570 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15571
15572 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15573
15574 * regcache.c: Add comment.
15575
15576 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15577
15578 * thread-db.c: New file.
15579 * proc-service.c: New file.
15580 * acinclude.m4: New file.
15581 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15582 proc-service.o, and thread-db.o.
15583 (linux-low.o): Add USE_THREAD_DB.
15584 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15585 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15586 * aclocal.m4: Regenerated.
15587 * config.in: Regenerated.
15588 * configure: Regenerated.
15589 * configure.in: Check for proc_service.h, sys/procfs.h,
15590 thread_db.h, and linux/elf.h headrs.
15591 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15592 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15593 Check for -lthread_db and thread support.
15594 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15595 PowerPC, and SuperH.
15596 * i387-fp.c: Constify arguments.
15597 * i387-fp.h: Likewise.
15598 * inferiors.c: (struct thread_info): Renamed from
15599 `struct inferior_info'. Remove PID member. Use generic inferior
15600 list header. All uses updated.
15601 (inferiors, signal_pid): Removed.
15602 (all_threads): New variable.
15603 (get_thread): Define.
15604 (add_inferior_to_list): New function.
15605 (for_each_inferior): New function.
15606 (change_inferior_id): New function.
15607 (add_inferior): Removed.
15608 (remove_inferior): New function.
15609 (add_thread): New function.
15610 (free_one_thread): New function.
15611 (remove_thread): New function.
15612 (clear_inferiors): Use for_each_inferior and free_one_thread.
15613 (find_inferior): New function.
15614 (find_inferior_id): New function.
15615 (inferior_target_data): Update argument type.
15616 (set_inferior_target_data): Likewise.
15617 (inferior_regcache_data): Likewise.
15618 (set_inferior_regcache_data): Likewise.
15619 * linux-low.c (linux_bp_reinsert): Remove.
15620 (all_processes, stopping_threads, using_thrads)
15621 (struct pending_signals, debug_threads, pid_of): New.
15622 (inferior_pid): Replace with macro.
15623 (struct inferior_linux_data): Remove.
15624 (get_stop_pc, add_process): New functions.
15625 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15626 Use add_process and add_thread.
15627 (linux_attach_lwp): New function, based on old linux_attach. Use
15628 add_process and add_thread. Set stop_expected for new threads.
15629 (linux_attach): New function.
15630 (linux_kill_one_process): New function.
15631 (linux_kill): Kill all LWPs.
15632 (linux_thread_alive): Use find_inferior_id.
15633 (check_removed_breakpoints, status_pending_p): New functions.
15634 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15635 Update. Use WNOHANG. Wait for cloned processes also. Update process
15636 struct for the found process.
15637 (linux_wait_for_event): New function.
15638 (linux_wait): Use it. Support LWPs.
15639 (send_sigstop, wait_for_sigstop, stop_all_processes)
15640 (linux_resume_one_process, linux_continue_one_process): New functions.
15641 (linux_resume): Support LWPs.
15642 (REGISTER_RAW_SIZE): Remove.
15643 (fetch_register): Use register_size instead. Call supply_register.
15644 (usr_store_inferior_registers): Likewise. Call collect_register.
15645 Fix recursive case.
15646 (regsets_fetch_inferior_registers): Improve error message.
15647 (regsets_store_inferior_registers): Add debugging.
15648 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15649 (unstopped_p, linux_signal_pid): New functions.
15650 (linux_target_ops): Add linux_signal_pid.
15651 (linux_init_signals): New function.
15652 (initialize_low): Call it. Initialize using_threads.
15653 * regcache.c (inferior_regcache_data): Add valid
15654 flag.
15655 (get_regcache): Fetch registers lazily. Add fetch argument
15656 and update all callers.
15657 (regcache_invalidate_one, regcache_invalidate): New
15658 functions.
15659 (new_register_cache): Renamed from create_register_cache.
15660 Return the new regcache.
15661 (free_register_cache): Change argument to a void *.
15662 (registers_to_string, registers_from_string): Call get_regcache
15663 with fetch flag set.
15664 (register_data): Make static. Pass fetch flag to get_regcache.
15665 (supply_register): Call get_regcache with fetch flag clear.
15666 (collect_register): Call get_regcache with fetch flag set.
15667 (collect_register_as_string): New function.
15668 * regcache.h: Update.
15669 * remote-utils.c (putpkt): Flush after debug output and use
15670 stderr.
15671 Handle input interrupts while waiting for an ACK.
15672 (input_interrupt): Use signal_pid method.
15673 (getpkt): Flush after debug output and use stderr.
15674 (outreg): Use collect_register_as_string.
15675 (new_thread_notify, dead_thread_notify): New functions.
15676 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15677 and general_thread.
15678 (look_up_one_symbol): Flush after debug output.
15679 * server.c (step_thread, server_waiting): New variables.
15680 (start_inferior): Don't use signal_pid. Update call to mywait.
15681 (attach_inferior): Update call to mywait.
15682 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15683 (main): Don't fetch/store registers explicitly. Use
15684 set_desired_inferior. Support proposed ``Hs'' packet. Update
15685 calls to mywait.
15686 * server.h: Update.
15687 (struct inferior_list, struct_inferior_list_entry): New.
15688 * target.c (set_desired_inferior): New.
15689 (write_inferior_memory): Constify.
15690 (mywait): New function.
15691 * target.h: Update.
15692 (struct target_ops): New signal_pid method.
15693 (mywait): Removed macro, added prototype.
15694
15695 * linux-low.h (regset_func): Removed.
15696 (regset_fill_func, regset_store_func): New.
15697 (enum regset_type): New.
15698 (struct regset_info): Add type field. Use new operation types.
15699 (struct linux_target_ops): stop_pc renamed to get_pc.
15700 Add decr_pc_after_break and breakpoint_at.
15701 (get_process, get_thread_proess, get_process_thread)
15702 (strut process_info, all_processes, linux_attach_lwp)
15703 (thread_db_init): New.
15704
15705 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15706 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15707 (the_low_target): Add new members.
15708 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15709 (i386_store_fpxregset): Constify.
15710 (target_regsets): Add new kind identifier.
15711 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15712 (i386_set_pc): Add debugging.
15713 (i386_breakpoint_at): New function.
15714 (the_low_target): Add new members.
15715 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15716 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15717 (mips_breakpoint_at): New.
15718 (the_low_target): Add new members.
15719 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15720 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15721 (the_low_target): Add new members.
15722 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15723 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15724 (the_low_target): Add new members.
15725 * linux-x86-64-low.c (target_regsets): Add new kind
15726 identifier.
15727
15728 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15729
15730 From Martin Pool <mbp@samba.org>:
15731 * server.c (gdbserver_usage): New function.
15732 (main): Call it.
15733
15734 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15735
15736 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15737 stop_at -> stop_pc.
15738
15739 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15740
15741 * Makefile.in: Remove obsolete code.
15742
15743 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15744
15745 * linux-low.c (regsets_fetch_inferior_registers),
15746 (regsets_store_inferior_registers): Removed cast to int from
15747 ptrace() calls.
15748 * regcache.h: Added declaration of struct inferior_info.
15749
15750 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15751
15752 * inferiors.c (struct inferior_info): Add regcache_data.
15753 (add_inferior): Call create_register_cache.
15754 (clear_inferiors): Call free_register_cache.
15755 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15756 * regcache.c (struct inferior_regcache_data): New.
15757 (registers): Remove.
15758 (get_regcache): New function.
15759 (create_register_cache, free_register_cache): New functions.
15760 (set_register_cache): Don't initialize the register cache here.
15761 (registers_to_string, registers_from_string, register_data): Call
15762 get_regcache.
15763 * regcache.h: Add prototypes.
15764 * server.h: Likewise.
15765
15766 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15767
15768 * mem-break.c: New file.
15769 * mem-break.h: New file.
15770 * Makefile.in: Add mem-break.o rule; update server.h
15771 dependencies.
15772 * inferiors.c (struct inferior_info): Add target_data
15773 member.
15774 (clear_inferiors): Free target_data member if set.
15775 (inferior_target_data, set_inferior_target_data): New functions.
15776 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15777 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15778 * linux-low.c (linux_bp_reinsert): New variable.
15779 (struct inferior_linux_data): New.
15780 (linux_create_inferior): Use set_inferior_target_data.
15781 (linux_attach): Likewise. Call add_inferior.
15782 (linux_wait_for_one_inferior): New function.
15783 (linux_wait): Call it.
15784 (linux_write_memory): Add const.
15785 (initialize_low): Call set_breakpoint_data.
15786 * linux-low.h (struct linux_target_ops): Add breakpoint
15787 handling members.
15788 * server.c (attach_inferior): Remove extra add_inferior
15789 call.
15790 * server.h: Include mem-break.h. Update inferior.c
15791 prototypes.
15792 * target.c (read_inferior_memory)
15793 (write_inferior_memory): New functions.
15794 * target.h (read_inferior_memory)
15795 (write_inferior_memory): Change macros to prototypes.
15796 (struct target_ops): Update comments. Add const to write_memory
15797 definition.
15798
15799 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15800
15801 * linux-low.c (usr_store_inferior_registers): Support
15802 registers which are allowed to fail to store.
15803 * linux-low.h (linux_target_ops): Likewise.
15804 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15805 (ppc_cannot_store_register): FPSCR may not be storable.
15806
15807 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15808
15809 * server.h: Include <string.h> if HAVE_STRING_H.
15810 * ChangeLog: Correct paths in last ChangeLog entry.
15811
15812 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15813
15814 * linux-low.h: Remove obsolete prototypes.
15815 (struct linux_target_ops): New.
15816 (extern the_low_target): New.
15817 * linux-low.c (num_regs, regmap): Remove declarations.
15818 (register_addr): Use the_low_target explicitly.
15819 (fetch_register): Likewise.
15820 (usr_fetch_inferior_registers): Likewise.
15821 (usr_store_inferior_registers): Likewise.
15822 * linux-arm-low.c (num_regs): Remove.
15823 (arm_num_regs): Define.
15824 (arm_regmap): Renamed from regmap, made static.
15825 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15826 made static.
15827 (arm_cannot_store_register): Renamed from cannot_store_register,
15828 made static.
15829 (the_low_target): New.
15830 * linux-i386-low.c (num_regs): Remove.
15831 (i386_num_regs): Define.
15832 (i386_regmap): Renamed from regmap, made static.
15833 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15834 made static.
15835 (i386_cannot_store_register): Renamed from cannot_store_register,
15836 made static.
15837 (the_low_target): New.
15838 * linux-ia64-low.c (num_regs): Remove.
15839 (ia64_num_regs): Define.
15840 (ia64_regmap): Renamed from regmap, made static.
15841 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15842 made static.
15843 (ia64_cannot_store_register): Renamed from cannot_store_register,
15844 made static.
15845 (the_low_target): New.
15846 * linux-m68k-low.c (num_regs): Remove.
15847 (m68k_num_regs): Define.
15848 (m68k_regmap): Renamed from regmap, made static.
15849 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15850 made static.
15851 (m68k_cannot_store_register): Renamed from cannot_store_register,
15852 made static.
15853 (the_low_target): New.
15854 * linux-mips-low.c (num_regs): Remove.
15855 (mips_num_regs): Define.
15856 (mips_regmap): Renamed from regmap, made static.
15857 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15858 made static.
15859 (mips_cannot_store_register): Renamed from cannot_store_register,
15860 made static.
15861 (the_low_target): New.
15862 * linux-ppc-low.c (num_regs): Remove.
15863 (ppc_num_regs): Define.
15864 (ppc_regmap): Renamed from regmap, made static.
15865 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15866 made static.
15867 (ppc_cannot_store_register): Renamed from cannot_store_register,
15868 made static.
15869 (the_low_target): New.
15870 * linux-s390-low.c (num_regs): Remove.
15871 (s390_num_regs): Define.
15872 (s390_regmap): Renamed from regmap, made static.
15873 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15874 made static.
15875 (s390_cannot_store_register): Renamed from cannot_store_register,
15876 made static.
15877 (the_low_target): New.
15878 * linux-sh-low.c (num_regs): Remove.
15879 (sh_num_regs): Define.
15880 (sh_regmap): Renamed from regmap, made static.
15881 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15882 made static.
15883 (sh_cannot_store_register): Renamed from cannot_store_register,
15884 made static.
15885 (the_low_target): New.
15886 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15887 (the_low_target): New.
15888
15889 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15890
15891 * Makefile.in: Add stamp-h target.
15892 * configure.in: Create stamp-h.
15893 * configure: Regenerated.
15894
15895 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15896
15897 * inferiors.c: New file.
15898 * target.c: New file.
15899 * target.h: New file.
15900 * Makefile.in: Add target.o and inferiors.o. Update
15901 dependencies.
15902 * linux-low.c (inferior_pid): New static variable,
15903 moved from server.c.
15904 (linux_create_inferior): Renamed from create_inferior.
15905 Call add_inferior. Return 0 on success instead of a PID.
15906 (linux_attach): Renamed from myattach.
15907 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15908 (linux_thread_alive): Renamed from mythread_alive.
15909 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15910 child dies.
15911 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15912 (regsets_store_inferior_registers): Correct error message.
15913 Add missing ``return 0''.
15914 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15915 (linux_store_registers): Renamed from store_inferior_registers.
15916 (linux_read_memory): Renamed from read_inferior_memory.
15917 (linux_write_memory): Renamed from write_inferior_memory.
15918 (linux_target_ops): New structure.
15919 (initialize_low): Call set_target_ops ().
15920 * remote-utils.c (unhexify): New function.
15921 (hexify): New function.
15922 (input_interrupt): Send signals to ``signal_pid''.
15923 * server.c (inferior_pid): Remove.
15924 (start_inferior): Update create_inferior call.
15925 (attach_inferior): Call add_inferior.
15926 (handle_query): New function.
15927 (main): Call handle_query for `q' packets.
15928 * server.h: Include "target.h". Remove obsolete prototypes.
15929 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15930
15931 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15932
15933 * Makefile.in: Add WARN_CFLAGS. Update configury
15934 dependencies.
15935 * configure.in: Check for <string.h>
15936 * configure: Regenerate.
15937 * config.in: Regenerate.
15938 * gdbreplay.c: Include needed system headers.
15939 (remote_open): Remove strchr prototype.
15940 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15941 * regcache.c (supply_register): Change buf argument to const void *.
15942 (supply_register_by_name): Likewise.
15943 (collect_register): Change buf argument to void *.
15944 (collect_register_by_name): Likewise.
15945 * regcache.h: Add missing prototypes.
15946 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15947 * server.c (handle_query): New function.
15948 (attached): New static variable, moved out of main.
15949 (main): Quiet longjmp clobber warnings.
15950 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15951 * utils.c (error): Remove NORETURN.
15952 (fatal): Likewise.
This page took 0.347699 seconds and 5 git commands to generate.