Fix build with GCC 8: strncpy -> memcpy
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-11-22 Yao Qi <yao.qi@linaro.org>
2
3 * remote-utils.c (prepare_resume_reply): Use memcpy.
4
5 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6
7 * linux-low.c (kill_one_lwp_callback): Return void, take
8 argument directly, don't filter on pid.
9 (linux_kill): Use for_each_thread.
10
11 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
12
13 * linux-low.c (need_step_over_p): Return bool, remove dummy
14 argument.
15 (linux_resume, proceed_all_lwps): Use find_thread.
16
17 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
18
19 * linux-low.c (resume_status_pending_p): Return bool, remove
20 flag_p argument.
21 (linux_resume): Use find_thread.
22
23 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
24
25 * linux-low.c (struct thread_resume_array): Remove.
26 (linux_set_resume_request): Return void, take arguments
27 directly.
28 (linux_resume): Use for_each_thread.
29
30 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
31
32 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
33 return bool, remove data argument.
34 (linux_stabilize_threads): Use find_thread.
35
36 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
37
38 * linux-low.c (unsuspend_one_lwp): Remove.
39 (unsuspend_all_lwps): Use for_each_thread, inline code from
40 unsuspend_one_lwp.
41
42 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
43
44 * gdbthread.h (find_thread): Add overload with ptid_t filter.
45 * linux-low.c (struct iterate_over_lwps_args): Remove.
46 (iterate_over_lwps_filter): Remove.
47 (iterate_over_lwps): Use find_thread.
48
49 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
50
51 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
52 (linux_handle_new_gdb_connection): Use for_each_thread, inline
53 code from reset_lwp_ptrace_options_callback.
54
55 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
56
57 * linux-arm-low.c (struct update_registers_data): Remove.
58 (update_registers_callback): Return void, take arguments
59 directly, don't check thread's pid.
60 (arm_insert_point, arm_remove_point): Use for_each_thread.
61
62 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
63
64 * win32-low.c (continue_one_thread): Return void, take argument
65 directly.
66 (child_continue): Use for_each_thread.
67
68 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
69
70 * win32-i386-low.c (update_debug_registers_callback): Rename
71 to ...
72 (update_debug_registers): ... this, return void, remove pid_p arg.
73 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
74
75 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
76
77 * inferiors.h (struct process_info): Add constructor, initialize
78 fields..
79 <syscalls_to_catch>: Change type to std::vector<int>.
80 * inferiors.c (add_process): Allocate process_info with new.
81 (remove_process): Free process_info with delete.
82 * linux-low.c (handle_extended_wait): Adjust.
83 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
84 * server.c (handle_general_set): Adjust.
85
86 2017-11-16 Pedro Alves <palves@redhat.com>
87
88 * remote-utils.c (remote_close): Block SIGIO signals instead of
89 uninstalling the SIGIO handler.
90
91 2017-11-16 Alan Hayward <alan.hayward@arm.com>
92
93 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
94
95 2017-11-16 Yao Qi <yao.qi@linaro.org>
96
97 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
98 (tic6x_store_gregset): Likewise.
99 (tic6x_usrregs_info): Move it up.
100
101 2017-11-15 Alan Hayward <alan.hayward@arm.com>
102
103 * Makefile.in: Update arch rules.
104 * configure.srv: Explicitly mark arch/ files.
105
106 2017-11-13 Andreas Schwab <schwab@suse.de>
107
108 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
109 function.
110 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
111
112 2017-11-06 Pedro Alves <palves@redhat.com>
113
114 * config.in, configure: Regenerate.
115
116 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
117
118 * target.c (struct thread_search): Remove.
119 (thread_search_callback): Remove.
120 (prepare_to_access_memory): Use for_each_thread instead of
121 find_inferior. Inline code from thread_search_callback.
122
123 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
124
125 * server.c (struct visit_actioned_threads_data): Remove.
126 (visit_actioned_threads): Change prototype to take arguments
127 directly.
128 (resume): Use find_thread instead of find_inferior.
129
130 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
131
132 * server.c (queue_stop_reply_callback): Change prototype, return
133 void.
134 (find_status_pending_thread_callback): Remove.
135 (handle_status): Replace find_inferior with find_thread and
136 for_each_thread.
137
138 2017-10-25 Alan Hayward <alan.hayward@arm.com>
139
140 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
141 with REGNO.
142 (aarch64_store_gregset): Likewise.
143 (aarch64_fill_fpregset): Likewise.
144 (aarch64_store_fpregset): Likewise.
145
146 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
147
148 * gdbthread.h (find_thread, for_each_thread): New functions.
149 * inferiors.c (thread_of_pid): Remove.
150 (find_any_thread_of_pid): Use find_thread.
151 * linux-low.c (num_lwps): Use for_each_thread.
152
153 2017-10-17 Yao Qi <yao.qi@linaro.org>
154
155 * Makefile.in: Remove one rule.
156 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
157
158 2017-10-17 Yao Qi <yao.qi@linaro.org>
159
160 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
161 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
162
163 2017-10-17 Yao Qi <yao.qi@linaro.org>
164
165 * configure.srv: Rename arm.o with arch/arm.o.
166
167 2017-10-17 Yao Qi <yao.qi@linaro.org>
168
169 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
170 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
171 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
172 (arch-i386.o, arch-amd64.o): Remove rules.
173 (arch/%.o): New rule.
174 Update POSTCOMPILE and COMPILE.pre.
175 * configure.ac: Invoke AC_CONFIG_COMMANDS.
176 * configure: Re-generated.
177 * configure.srv: Replace arch-i386.o with arch/i386.o.
178 Replace arch-amd64.o with arch/amd64.o.
179
180 2017-10-16 Yao Qi <yao.qi@linaro.org>
181
182 * configure: Regenerated.
183
184 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
185
186 * inferiors.h: (struct inferior_list): Remove.
187 (struct inferior_list_entry); Remove.
188 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
189 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
190 get_first_inferior): Remove.
191 (for_each_inferior, for_each_inferior_with_data, find_inferior,
192 find_inferior_id, find_inferior_in_random): Change signature.
193 * inferiors.c (all_threads): Change type to
194 std::list<thread_info *>.
195 (get_thread): Remove macro.
196 (find_inferior, find_inferior_id): Change signature, implement
197 using find_thread.
198 (find_inferior_in_random): Change signature, implement using
199 find_thread_in_random.
200 (for_each_inferior, for_each_inferior_with_data): Change
201 signature, implement using for_each_thread.
202 (add_inferior_to_list, remove_inferior): Remove.
203 (add_thread, get_first_thread, thread_of_pid,
204 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
205 (get_first_inferior, one_inferior_p, clear_inferior_list):
206 Remove.
207 (clear_inferiors, get_thread_process): Update.
208 * gdbthread.h: Include <list>.
209 (struct thread_info) <entry>: Remove field.
210 <id>: New field.
211 (all_threads): Change type to std::list<thread_info *>.
212 (get_first_inferior): Add doc.
213 (find_thread, for_each_thread, find_thread_in_random): New
214 functions.
215 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
216 * linux-arm-low.c (update_registers_callback): Update.
217 * linux-low.c (second_thread_of_pid_p): Update.
218 (kill_one_lwp_callback, linux_detach_lwp_callback,
219 delete_lwp_callback, status_pending_p_callback, same_lwp,
220 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
221 iterate_over_lwps, not_stopped_callback,
222 resume_stopped_resumed_lwps, count_events_callback,
223 select_singlestep_lwp_callback, select_event_lwp_callback,
224 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
225 suspend_and_send_sigstop_callback, wait_for_sigstop,
226 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
227 lwp_running, linux_set_resume_request, resume_status_pending_p,
228 need_step_over_p, start_step_over, linux_resume_one_thread,
229 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
230 reset_lwp_ptrace_options_callback): Update.
231 * linux-mips-low.c (update_watch_registers_callback): Update.
232 * regcache.c (regcache_invalidate_one, regcache_invalidate):
233 Update.
234 (free_register_cache_thread_one): Remove.
235 (regcache_release): Update.
236 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
237 handle_qxfer_threads_worker): Update.
238 (handle_query): Update, use list iterator.
239 (visit_actioned_threads, handle_pending_status,
240 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
241 clear_pending_status_callback, set_pending_status_callback,
242 find_status_pending_thread_callback, handle_status,
243 process_serial_event): Update.
244 * target.c (thread_search_callback): Update.
245 * thread-db.c (thread_db_get_tls_address): Update.
246 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
247 Update.
248 * win32-i386-low.c (update_debug_registers_callback): Update.
249 * win32-low.c (delete_thread_info, child_delete_thread,
250 continue_one_thread, suspend_one_thread,
251 get_child_debug_event): Adjust.
252
253 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
254
255 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
256 * inferiors.h: Include <list>.
257 (struct process_info) <entry>: Remove field.
258 <pid>: New field.
259 (pid_of): Change macro to function.
260 (ptid_of, lwpid_of): Remove macro.
261 (all_processes): Change type to std::list<process_info *>.
262 (ALL_PROCESSES): Remove macro.
263 (for_each_process, find_process): New function.
264 * inferiors.c (all_processes): Change type to
265 std::list<process_info *>.
266 (find_thread_process): Adjust.
267 (add_process): Likewise.
268 (remove_process): Likewise.
269 (find_process_pid): Likewise.
270 (get_first_process): Likewise.
271 (started_inferior_callback): Remove.
272 (have_started_inferiors_p): Adjust.
273 (attached_inferior_callback): Remove.
274 (have_attached_inferiors_p): Adjust.
275 * linux-low.c (check_zombie_leaders): Likewise.
276 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
277 (x86_linux_update_xmltarget): Adjust.
278 * server.c (handle_query): Likewise.
279 (gdb_reattached_process): Remove.
280 (handle_status): Adjust.
281 (kill_inferior_callback): Likewise.
282 (detach_or_kill_inferior): Remove.
283 (print_started_pid): Likewise.
284 (print_attached_pid): Likewise.
285 (detach_or_kill_for_exit): Update.
286 (process_serial_event): Likewise.
287 * linux-arm-low.c (arm_new_fork): Likewise.
288
289 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
290
291 * dll.h: Include <list>.
292 (struct dll_info): Add constructor.
293 <entry>: Remove field.
294 (all_dlls): Change type to std::list<dll_info>.
295 * dll.c: Include <algorithm>.
296 (get_dll): Remove macro.
297 (all_dlls): Change type to std::list<dll_info *>.
298 (free_one_dll): Remove.
299 (match_dll): Likewise.
300 (loaded_dll): Adjust.
301 (unloaded_dll): Adjust to all_dlls type change, use
302 std::find_if. Inline code from match_dll.
303 (clear_dlls): Adjust to all_dlls type change.
304 * server.c (emit_dll_description): Remove.
305 (handle_qxfer_libraries): Adjust to all_dlls type change,
306 integrate emit_dll_description's functionality.
307
308 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
309
310 * linux-low.h (struct linux_target_ops) <delete_process>: New
311 field.
312 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
313 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
314 (struct linux_target_ops): Add delete_process callback.
315 * linux-arm-low.c (arm_delete_process): New.
316 (struct linux_target_ops): Add delete_process callback.
317 * linux-bfin-low.c (struct linux_target_ops): Likewise.
318 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
319 * linux-m32r-low.c (struct linux_target_ops): Likewise.
320 * linux-mips-low.c (mips_linux_delete_process): New.
321 (struct linux_target_ops): Add delete_process callback.
322 * linux-ppc-low.c (struct linux_target_ops): Likewise.
323 * linux-s390-low.c (struct linux_target_ops): Likewise.
324 * linux-sh-low.c (struct linux_target_ops): Likewise.
325 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
326 * linux-tile-low.c (struct linux_target_ops): Likewise.
327 * linux-x86-low.c (x86_linux_delete_process): New.
328 (struct linux_target_ops): Add delete_process callback.
329 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
330
331 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
332
333 * linux-aarch64-low.c (the_low_target): Add thread delete
334 callback.
335 * linux-arm-low.c (arm_delete_thread): New function.
336 (the_low_target): Add thread delete callback.
337 * linux-bfin-low.c (the_low_target): Likewise.
338 * linux-crisv32-low.c (the_low_target): Likewise.
339 * linux-low.c (delete_lwp): Invoke delete_thread callback if
340 set.
341 * linux-low.h (struct linux_target_ops) <delete_thread>: New
342 field.
343 * linux-m32r-low.c (the_low_target): Add thread delete callback.
344 * linux-mips-low.c (mips_linux_delete_thread): New function.
345 (the_low_target): Add thread delete callback.
346 * linux-ppc-low.c (the_low_target): Likewise.
347 * linux-s390-low.c (the_low_target): Likewise.
348 * linux-sh-low.c (the_low_target): Likewise.
349 * linux-tic6x-low.c (the_low_target): Likewise.
350 * linux-tile-low.c (the_low_target): Likewise.
351 * linux-x86-low.c (the_low_target): Likewise.
352 * linux-xtensa-low.c (the_low_target): Likewise.
353
354 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
355
356 * win32-low.c: Include "common-inferior.h".
357
358 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
359
360 * inferiors.c (set_inferior_cwd): New function.
361 * server.c (handle_general_set): Handle QSetWorkingDir packet.
362 (handle_query): Inform that QSetWorkingDir is supported.
363 * win32-low.c (create_process): Pass the inferior's cwd to
364 CreateProcess.
365
366 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
367
368 * inferiors.c (current_inferior_cwd): New global variable.
369 (get_inferior_cwd): New function.
370 * inferiors.h (struct process_info) <cwd>: New field.
371
372 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
373
374 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
375 (OBS): Add gdb_tilde_expand.o.
376
377 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
378
379 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
380 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
381
382 2017-09-29 Pedro Alves <palves@redhat.com>
383
384 * ax.c (gdb_parse_agent_expr): Constify.
385 * ax.h (gdb_parse_agent_expr): Constify.
386 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
387 Constify.
388 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
389 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
390 * remote-utils.h (read_ptid): Constify.
391 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
392 (process_point_options, process_serial_event): Constify.
393 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
394 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
395 (cmd_qtbuffer): Constify.
396
397 2017-09-29 Pedro Alves <palves@redhat.com>
398
399 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
400 fails.
401
402 2017-09-29 Pedro Alves <palves@redhat.com>
403
404 * linux-low.c (handle_extended_wait): Pass parent thread instead
405 of process to thread_db_notice_clone.
406 * linux-low.h (thread_db_notice_clone): Replace parent process
407 parameter with parent thread parameter.
408 * thread-db.c (find_one_thread): Add comment.
409 (thread_db_notice_clone): Replace parent process parameter with
410 parent thread parameter. Temporarily switch to the parent thread.
411
412 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
413
414 * gdbthread.h: Include "common-gdbthread.h".
415 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
416 "if" when validating the ptid.
417 * remote-utils.c: Include "gdbthread.h".
418 (prepare_resume_reply): Use "switch_to_thread".
419 * target.c (done_accessing_memory): Likewise.
420
421 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
422
423 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
424 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
425 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
426 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
427 s390x-gs-linux64-ipa.o to ipa_obj.
428 * linux-s390-low.c (HWCAP_S390_GS): New define.
429 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
430 New functions.
431 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
432 (s390_arch_setup): Check for guarded-storage support and choose
433 appropriate tdesc.
434 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
435 init_registers_s390x_gs_linux64.
436 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
437 enum value.
438 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
439 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
440
441 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
442
443 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
444
445 2017-09-21 Kevin Buettner <kevinb@redhat.com>
446
447 * linux-low.h (struct lwp_info): Add new field, thread_handle.
448 (thread_db_thread_handle): Declare.
449 * linux-low.c (linux_target_ops): Initialize thread_handle.
450 * server.c (handle_qxfer_threads_worker): Add support for
451 "handle" attribute.
452 * target.h (struct target_ops): Add new function pointer,
453 thread_handle.
454 (target_thread_handle): Define.
455 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
456 field in lwp.
457 (thread_db_thread_handle): New function.
458
459 2017-09-21 Kevin Buettner <kevinb@redhat.com>
460
461 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
462 * linux-low.h (thread_db_notice_clone): Declare.
463 * thread-db.c (thread_db_notice_clone): New function.
464
465 2017-09-21 Pedro Alves <palves@redhat.com>
466
467 * server.c (gdb_read_memory, handle_status, process_serial_event)
468 (handle_serial_event, handle_target_event): Adjust to
469 set_desired_thread prototype change.
470 * target.c (set_desired_thread): Remove 'use_general' parameter
471 and adjust.
472 * target.h (set_desired_thread): Remove 'use_general' parameter.
473
474 2017-09-20 Tom Tromey <tom@tromey.com>
475
476 * target.c (target_terminal::terminal_state): Define.
477 (target_terminal::init): Rename from target_terminal_init.
478 (target_terminal::inferior): Rename from
479 target_terminal_inferior.
480 (target_terminal::ours): Rename from target_terminal_ours.
481 (target_terminal::ours_for_output, target_terminal::info): New.
482
483 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
484
485 * server.c (accumulate_file_name_length): Remove.
486 (emit_dll_description): Adjust to std::string change.
487 (handle_qxfer_libraries): Use std::string to hold document.
488
489 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
490
491 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
492 return type of xml_escape_text.
493 * server.c (emit_dll_description): Likewise.
494
495 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
496
497 * server.c (captured_main): Accept argument for --selftest.
498 Update run_tests call.
499 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
500 when registering selftests.
501
502 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
503
504 * regcache.c (get_thread_regcache): Update code to use "std::vector"
505 instead of "VEC" for "target_desc.reg_defs".
506 (regcache_cpy): Likewise.
507 (registers_to_string): Likewise.
508 (registers_from_string): Likewise.
509 (find_regno): Likewise.
510 (supply_regblock): Likewise.
511 (regcache_raw_read_unsigned): Likewise.
512 * tdesc.c (init_target_desc): Likewise.
513 (tdesc_create_reg): Likewise.
514 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
515 (struct target_desc) <reg_defs>: Convert to "std::vector".
516 (target_desc): Do not initialize "reg_defs".
517 (~target_desc): Update code to use "std::vector" instead of "VEC"
518 for "target_desc.reg_defs".
519 (operator==): Likewise.
520
521 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
522
523 * inferiors.h (thread_to_gdb_id): Remove.
524 * inferiors.c (thread_to_gdb_id): Remove.
525 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
526 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
527 lynx_store_registers, lynx_read_memory, lynx_write_memory):
528 Likewise.
529 * nto-low.c (nto_fetch_registers, nto_store_registers,
530 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
531
532 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
533
534 * inferiors.h (gdb_id_to_thread_id): Remove.
535 * inferiors.c (gdb_id_to_thread_id): Remove.
536 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
537 removal. Move pid declaration closer to where it's used.
538
539 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
540
541 * server.c (handle_detach): New function.
542 (process_serial_event): Move code out, call handle_detach.
543
544 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
545
546 * server.c (require_running): Rename to ...
547 (require_running_or_return): ... this ...
548 (require_running_or_break): ... and this.
549 (handle_query, process_serial_event): Adjust.
550
551 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
552
553 * linux-low.c (linux_set_resume_request): Remove unused
554 variables.
555
556 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
557
558 * server.c (first_thread_of): Remove.
559 (process_serial_event): Replace usage of first_thread_of with
560 find_any_thread_of_pid.
561 * tracepoint.c (same_process_p): Remove.
562 (gdb_agent_about_to_close): Replace usage of same_process_p with
563 find_any_thread_of_pid.
564 * linux-x86-low.c (same_process_callback): Remove.
565 (x86_arch_setup_process_callback): Replace usage of
566 same_process_callback with find_any_thread_of_pid.
567 * thread-db.c (any_thread_of): Remove.
568 (switch_to_process): Replace usage of any_thread_of with
569 find_any_thread_of_pid.
570 * inferiors.c (thread_pid_matches_callback): Remove.
571 (find_thread_process): Adjust to use find_any_thread_of_pid.
572
573 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
574
575 * regcache.c (get_thread_regcache): Guard calls to "memset"
576 with "!VEC_empty".
577
578 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
579
580 * linux-low.c (handle_extended_wait): Use
581 "allocate_target_description" instead of "XNEW".
582 * linux-x86-low.c (initialize_low_arch): Likewise.
583
584 2017-09-05 Yao Qi <yao.qi@linaro.org>
585
586 * configure.srv (srv_i386_regobj): Remove.
587 (srv_amd64_regobj): Remove.
588 (srv_regobj): Set it to "" for x86 non-linux targets.
589 * linux-x86-tdesc.c (i386_linux_read_description):
590 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
591 (init_registers_i386): Remove the declaration.
592 (tdesc_i386): Remove the declaration.
593 (lynx_i386_arch_setup): Call i386_create_target_description.
594 * nto-x86-low.c: Likewise.
595 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
596 [!__x86_64__]: include arch/i386.h.
597 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
598
599 2017-09-05 Yao Qi <yao.qi@linaro.org>
600
601 * configure.srv (srv_amd64_linux_xmlfiles): Remove
602 i386/amd64-XXX-linux from it.
603
604 2017-09-05 Yao Qi <yao.qi@linaro.org>
605
606 * configure.srv: Empty srv_amd64_linux_regobj if $development is
607 false.
608 (ipa_amd64_linux_regobj): Remove.
609 (ipa_x32_linux_regobj): Remove.
610
611 2017-09-05 Yao Qi <yao.qi@linaro.org>
612
613 * Makefile.in (arch-amd64.o): New rule.
614 * configure.srv: Append arch-amd64.o.
615 * linux-amd64-ipa.c: Include common/x86-xstate.h.
616 (get_ipa_tdesc): Call amd64_linux_read_description.
617 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
618 and init_registers_amd64_XXX.
619 * linux-x86-low.c (x86_linux_read_description): Call
620 amd64_linux_read_description.
621 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
622 (initialize_low_arch): Don't call init_registers_x32_XXX and
623 init_registers_amd64_XXX.
624 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
625 and tdesc_amd64_XXX.
626 [__x86_64__] (amd64_tdesc_test): New function.
627 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
628 and init_registers_amd64_XXX.
629 * linux-x86-tdesc.c: Include arch/amd64.h.
630 (xcr0_to_tdesc_idx): New function.
631 (i386_linux_read_description): New function.
632 (amd64_get_ipa_tdesc_idx): New function.
633 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
634 (amd64_get_ipa_tdesc): Declare.
635
636 2017-09-05 Yao Qi <yao.qi@linaro.org>
637
638 * configure.srv (srv_i386_linux_xmlfiles): Remove
639 i386/i386-XXX-linux.xml from it.
640
641 2017-09-05 Yao Qi <yao.qi@linaro.org>
642
643 * configure.srv: Set srv_i386_linux_regobj empty if $development
644 is false.
645 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
646 initialize_low_tdesc.
647 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
648 with #if initialize_low_tdesc.
649 * linux-x86-tdesc-selftest.c: New file.
650 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
651
652 2017-09-05 Yao Qi <yao.qi@linaro.org>
653
654 * Makefile.in (arch-i386.o): New rule.
655 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
656 (x86_64-*-linux*): Likewise.
657 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
658 include arch/i386.h.
659 (i386_linux_read_description): Remove code and call
660 i386_create_target_description.
661 * tdesc.c (allocate_target_description): New function.
662 * tdesc.h (set_tdesc_architecture): Remove declaration.
663 (set_tdesc_osabi): Likewise.
664
665 2017-09-05 Yao Qi <yao.qi@linaro.org>
666
667 * linux-x86-tdesc.c: Don't include <inttypes.h>.
668 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
669 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
670 .xmltarget.
671 * server.c (get_features_xml): Call tdesc_get_features_xml.
672 * tdesc.c (set_tdesc_architecture): New function.
673 (set_tdesc_osabi): New function.
674 (tdesc_get_features_xml): New function.
675 (tdesc_create_feature): Add an argument.
676 * tdesc.h (struct target_desc) <features>: New field.
677 <arch, osabi>: New field.
678 (~target_desc): xfree features, arch, and osabi.
679 (target_desc::oerator==): Don't compare .xmltarget.
680 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
681 (set_tdesc_osabi): Likewise.
682 (tdesc_get_features_xml): Likewise.
683
684 2017-09-05 Yao Qi <yao.qi@linaro.org>
685
686 * linux-x86-tdesc.c: Include selftest.h.
687 (i386_tdesc_test): New function.
688 (initialize_low_tdesc): Call selftests::register_test.
689 * tdesc.h: Include regdef.h.
690 (target_desc): Override operator == and !=.
691
692 2017-09-05 Yao Qi <yao.qi@linaro.org>
693
694 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
695 (ipa_obj): Likewise.
696 * linux-i386-ipa.c: Include common/x86-xstate.h
697 (get_ipa_tdesc): Call i386_linux_read_description.
698 (initialize_low_tracepoint): Don't call init_registers_XXX
699 functions, call initialize_low_tdesc instead.
700 * linux-x86-low.c (x86_linux_read_description): Call
701 i386_linux_read_description.
702 (initialize_low_arch): Don't call init_registers_i386_XXX
703 functions, call initialize_low_tdesc.
704 * linux-x86-tdesc.c: New file.
705 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
706 (i386_get_ipa_tdesc_idx): Declare.
707 (i386_get_ipa_tdesc): Declare.
708 (initialize_low_tdesc): Declare.
709
710 2017-09-05 Yao Qi <yao.qi@linaro.org>
711
712 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
713 instead of 0.
714
715 2017-09-05 Yao Qi <yao.qi@linaro.org>
716
717 * Makefile.in (IPA_OBJS): Add vec-ipa.o
718 * regcache.c (get_thread_regcache): Use VEC_length.
719 (init_register_cache): Likewise.
720 (regcache_cpy): Likewise.
721 (registers_to_string): Iterate reg_defs via VEC_iterate.
722 (find_regno): Likewise.
723 (find_register_by_number): Use VEC_index.
724 (register_size): Call find_register_by_number.
725 (register_data): Call find_register_by_number.
726 (supply_regblock): Use VEC_length.
727 (regcache_raw_read_unsigned): Likewise.
728 * tdesc.c (init_target_desc): Iterate reg_defs via
729 VEC_iterate.
730 (default_description): Update initializer.
731 (copy_target_description): Don't update field num_registers.
732 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
733 <num_registers>: Remove.
734
735 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
736
737 * Makefile.in (.SECONDARY): Define target.
738
739 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
740
741 * linux-low.c (linux_wait_1): Adjust.
742 * server.c (queue_stop_reply_callback): Adjust.
743
744 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
745
746 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
747 QEnvironmentUnset and QEnvironmentReset packets.
748 (handle_query): Inform remote that QEnvironmentHexEncoded,
749 QEnvironmentUnset and QEnvironmentReset are supported.
750
751 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
752
753 * inferiors.h (inferior_target_data): Rename to ...
754 (thread_target_data): ... this.
755 (inferior_regcache_data): Rename to ...
756 (thread_regcache_data): ... this.
757 (set_inferior_regcache_data): Rename to ...
758 (set_thread_regcache_data): ... this.
759 * inferiors.c (inferior_target_data): Rename to ...
760 (thread_target_data): ... this.
761 (inferior_regcache_data): Rename to ...
762 (thread_regcache_data): ... this.
763 (set_inferior_regcache_data): Rename to ...
764 (set_thread_regcache_data): ... this.
765 (free_one_thread): Update.
766 * linux-low.h (get_thread_lwp): Update.
767 * regcache.c (get_thread_regcache): Update.
768 (regcache_invalidate_thread): Update.
769 (free_register_cache_thread): Update.
770 * win32-i386-low.c (update_debug_registers_callback): Update.
771 (win32_get_current_dr): Update.
772 * win32-low.c (thread_rec): Update.
773 (delete_thread_info): Update.
774 (continue_one_thread): Update.
775 (suspend_one_thread): Update.
776
777 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
778
779 * inferiors.c (set_inferior_target_data): Remove.
780 * inferiors.h (set_inferior_target_data): Remove.
781
782 2017-08-18 Yao Qi <yao.qi@linaro.org>
783
784 * Makefile.in (OBS): Add selftest.o.
785 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
786 * configure, config.in: Re-generated.
787 * server.c: Include common/sefltest.h.
788 (captured_main): Handle option --selftest.
789
790 2017-08-09 Yao Qi <yao.qi@linaro.org>
791
792 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
793 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
794 i386-avx-mpx.o and i386-mmx.o.
795 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
796 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
797 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
798 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
799 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
800 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
801 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
802 i386/amd64-avx-mpx.xml.
803
804 2017-08-09 Yao Qi <yao.qi@linaro.org>
805
806 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
807 and x32-avx-avx512.o.
808 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
809 i386/x32-avx-avx512.xml.
810
811 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
812
813 * tracepoint.h (enum class fast_tpoint_collect_result): New
814 enumeration.
815 (fast_tracepoint_collecting): Change return type to
816 fast_tpoint_collect_result.
817 * tracepoint.c (fast_tracepoint_collecting): Likewise.
818 * linux-low.h: Include tracepoint.h.
819 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
820 fast_tpoint_collect_result.
821 * linux-low.c (handle_tracepoints): Adjust.
822 (linux_fast_tracepoint_collecting): Change return type to
823 fast_tpoint_collect_result.
824 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
825 linux_wait_1, stuck_in_jump_pad_callback,
826 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
827 proceed_one_lwp): Adjust to type change.
828
829 2017-07-10 Yao Qi <yao.qi@linaro.org>
830
831 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
832
833 2017-06-29 Yao Qi <yao.qi@linaro.org>
834
835 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
836 Remove.
837 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
838
839 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
840
841 * Makefile.in (IPA_OBJS): Sort and format one item per line.
842
843 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
844
845 * linux-low.c (linux_create_inferior): Adjust code to access the
846 environment information via 'gdb_environ' class.
847 * lynx-low.c (lynx_create_inferior): Likewise.
848 * server.c (our_environ): Make it an instance of 'gdb_environ'.
849 (get_environ): Return a pointer to 'our_environ'.
850 (captured_main): Initialize 'our_environ'.
851 * server.h (get_environ): Adjust prototype.
852 * spu-low.c (spu_create_inferior): Adjust code to access the
853 environment information via 'gdb_environ' class.
854
855 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
856
857 * linux-low.c (linux_read_memory, linux_write_memory): Remove
858 usage of "register" keyword.
859
860 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
861
862 * configure: Re-generate.
863
864 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
865
866 * configure: Re-generate.
867
868 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
869
870 * Makefile.in (COMPILE.pre): Add "-x c++".
871
872 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
873
874 * fork-child.c: Conditionally include <signal.h>.
875
876 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
877
878 * server.c (handle_general_set): Handle new packet
879 "QStartupWithShell".
880 (handle_query): Add "QStartupWithShell" to the list of supported
881 packets.
882 (gdbserver_usage): Add help text explaining the
883 new "--startup-with-shell" and "--no-startup-with-shell" CLI
884 options.
885 (captured_main): Recognize and act upon the presence of the new
886 CLI options.
887
888 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
889 Pedro Alves <palves@redhat.com>
890
891 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
892 * configure: Regenerate.
893 * configure.srv (srv_linux_obj): Add "fork-child.o" and
894 "fork-inferior.o".
895 (i[34567]86-*-lynxos*): Likewise.
896 (spu*-*-*): Likewise.
897 * fork-child.c: New file.
898 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
899 and "environ.h".
900 (linux_ptrace_fun): New function.
901 (linux_create_inferior): Adjust function prototype to reflect
902 change on "target.h". Adjust function code to use
903 "fork_inferior".
904 (linux_request_interrupt): Delete "signal_pid".
905 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
906 (lynx_ptrace_fun): New function.
907 (lynx_create_inferior): Adjust function prototype to reflect
908 change on "target.h". Adjust function code to use
909 "fork_inferior".
910 * nto-low.c (nto_create_inferior): Adjust function prototype and
911 code to reflect change on "target.h". Update comments.
912 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
913 "common-terminal.h" and "environ.h".
914 (terminal_fd): Moved to fork-child.c.
915 (old_foreground_pgrp): Likewise.
916 (restore_old_foreground_pgrp): Likewise.
917 (last_status): Make it global.
918 (last_ptid): Likewise.
919 (our_environ): New variable.
920 (startup_with_shell): Likewise.
921 (program_name): Likewise.
922 (program_argv): Rename to...
923 (program_args): ...this.
924 (wrapper_argv): New variable.
925 (start_inferior): Delete function.
926 (get_exec_wrapper): New function.
927 (get_exec_file): Likewise.
928 (get_environ): Likewise.
929 (prefork_hook): Likewise.
930 (post_fork_inferior): Likewise.
931 (postfork_hook): Likewise.
932 (postfork_child_hook): Likewise.
933 (handle_v_run): Update code to deal with arguments coming from the
934 remote host. Update calls from "start_inferior" to
935 "create_inferior".
936 (captured_main): Likewise. Initialize environment variable. Call
937 "have_job_control".
938 * server.h (post_fork_inferior): New prototype.
939 (get_environ): Likewise.
940 (last_status): Declare.
941 (last_ptid): Likewise.
942 (signal_pid): Likewise.
943 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
944 (spu_ptrace_fun): New function.
945 (spu_create_inferior): Adjust function prototype to reflect change
946 on "target.h". Adjust function code to use "fork_inferior".
947 * target.c (target_terminal_init): New function.
948 (target_terminal_inferior): Likewise.
949 (target_terminal_ours): Likewise.
950 * target.h: Include <vector>.
951 (struct target_ops) <create_inferior>: Update prototype.
952 (create_inferior): Update macro.
953 * utils.c (gdb_flush_out_err): New function.
954 * win32-low.c (win32_create_inferior): Adjust function prototype
955 and code to reflect change on "target.h".
956
957 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
958
959 * inferiors.c (switch_to_thread): New function.
960
961 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
962
963 * Makefile.in (SFILE): Add "common/job-control.c".
964 (OBS): Add "job-control.o".
965
966 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
967
968 * Makefile: Remove "@host_makefile_frag@".
969
970 2017-05-05 Pedro Alves <palves@redhat.com>
971
972 * configure: Regenerate.
973
974 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
975
976 * configure: Regenerate.
977
978 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
979
980 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
981 software_single_step change of return type to
982 std::vector<CORE_ADDR>.
983 * linux-low.c (install_software_single_step_breakpoints):
984 Likewise.
985 * linux-low.h (install_software_single_step_breakpoints):
986 Likewise.
987
988 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
989
990 * remote-utils.c: Include "gdb_termios.h" instead of
991 "terminal.h".
992 * terminal.h: Delete file.
993
994 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
995
996 * server.c: Include <vector>.
997 <program_argv, wrapper_argv>: Convert to std::vector.
998 (start_inferior): Rewrite function to use C++.
999 (handle_v_run): Likewise. Update code that calculates the argv
1000 based on the vRun packet; use C++.
1001 (captured_main): Likewise.
1002
1003 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1004
1005 * server.c (handle_v_cont): Initialize thread_resume::thread
1006 with null_ptid.
1007
1008 2017-04-05 Pedro Alves <palves@redhat.com>
1009
1010 * configure: Regenerate.
1011
1012 2017-04-05 Pedro Alves <palves@redhat.com>
1013
1014 * gdbreplay.c (sync_error): Constify.
1015 * linux-x86-low.c (push_opcode): Constify.
1016
1017 2017-04-05 Pedro Alves <palves@redhat.com>
1018
1019 * win32-low.c (get_child_debug_event)
1020 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1021 Report TARGET_WAITKIND_SPURIOUS instead.
1022
1023 2017-04-05 Pedro Alves <palves@redhat.com>
1024
1025 * remote-utils.c (remote_prepare, remote_open): Constify.
1026 * remote-utils.h (remote_prepare, remote_open): Constify.
1027 * server.c (captured_main): Constify 'port' handling.
1028
1029 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1030
1031 * Makefile.in (clean): Clear .deps.
1032
1033 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1034
1035 * .gitignore: Remove generated files, replace with wildcard.
1036 * (clean): Replace removal of generated files with wildcard.
1037 (version.c): Replace with...
1038 (version-generated.c): ...this.
1039 (xml-builtin.c): Replace with...
1040 (xml-builtin-generated.c): ...this.
1041 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1042 (%.c: *regformats*): Replace with...
1043 (%-generated.c: *regformats*): ...this.
1044
1045 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1046
1047 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1048 (xtensa_fill_gregset): Call collect_register_by_name for
1049 threadptr register.
1050 (xtensa_store_gregset): Call supply_register_by_name for
1051 threadptr register.
1052
1053 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1054
1055 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1056 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1057 (xtensa_store_gregset): Call supply_register for all registers in
1058 a0_regnum..a0_regnum + C0_NREGS range.
1059
1060 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1061
1062 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1063 (ax-ipa.o: ax.c): Remove.
1064 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1065 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1066 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1067 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1068 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1069
1070 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1071
1072 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1073 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1074 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1075 (errors-ipa.o: ../common/errors.c): Remove.
1076 (format-ipa.o: ../common/format.c): Remove.
1077 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1078
1079 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1080
1081 * Makefile.in (%-ipa.o: %.c): New rule.
1082 (tracepoint-ipa.o: tracepoint.c): Remove.
1083 (utils-ipa.o: utils.c): Remove.
1084 (remote-utils-ipa.o: remote-utils.c): Remove.
1085 (regcache-ipa.o: regcache.c): Remove.
1086 (i386-linux-ipa.o: i386-linux.c): Remove.
1087 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1088 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1089 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1090 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1091 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1092 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1093 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1094 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1095 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1096 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1097 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1098 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1099 (aarch64-ipa.o: aarch64.c): Remove.
1100 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1101 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1102 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1103 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1104 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1105 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1106 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1107 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1108 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1109 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1110 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1111 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1112 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1113 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1114 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1115 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1116 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1117 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1118 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1119 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1120 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1121 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1122 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1123 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1124 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1125 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1126 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1127 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1128 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1129 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1130 (tdesc-ipa.o: tdesc.c): Remove.
1131 (x32-linux-ipa.o: x32-linux.c): Remove.
1132 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1133 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1134
1135 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1136
1137 * Makefile.in (%.o: ../arch/%.c): New rule.
1138 (arm.o: ../arch/arm.c): Remove.
1139 (arm-linux.o: ../arch/arm-linux.c): Remove.
1140 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1141 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1142
1143 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1144
1145 * Makefile.in (%.o: ../nat/%.c): New rule.
1146 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1147 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1148 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1149 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1150 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1151 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1152 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1153 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1154 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1155 (linux-personality.o: ../nat/linux-personality.c): Remove.
1156 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1157 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1158 (x86-linux.o: ../nat/x86-linux.c): Remove.
1159 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1160 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1161
1162 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1163
1164 * Makefile.in (%.o: ../common/%.c): New rule.
1165 (signals.o: ../common/signals.c): Remove.
1166 (print-utils.o: ../common/print-utils.c): Remove.
1167 (rsp-low.o: ../common/rsp-low.c): Remove.
1168 (common-utils.o: ../common/common-utils.c): Remove.
1169 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1170 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1171 (vec.o: ../common/vec.c): Remove.
1172 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1173 (xml-utils.o: ../common/xml-utils.c): Remove.
1174 (ptid.o: ../common/ptid.c): Remove.
1175 (buffer.o: ../common/buffer.c): Remove.
1176 (format.o: ../common/format.c): Remove.
1177 (filestuff.o: ../common/filestuff.c): Remove.
1178 (agent.o: ../common/agent.c): Remove.
1179 (errors.o: ../common/errors.c): Remove.
1180 (environ.o: ../common/environ.c): Remove.
1181 (common-debug.o: ../common/common-debug.c): Remove.
1182 (cleanups.o: ../common/cleanups.c): Remove.
1183 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1184 (fileio.o: ../common/fileio.c): Remove.
1185 (common-regcache.o: ../common/common-regcache.c): Remove.
1186 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1187 (new-op.o: ../common/new-op.c): Remove.
1188 (btrace-common.o: ../common/btrace-common.c): Remove.
1189
1190 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1191
1192 * Makefile.in (%.o: ../target/%.c): New rule.
1193 (waitstatus.o: ../target/waitstatus.c): Remove.
1194
1195 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1196
1197 * Makefile.in
1198 (%.c: ../regformats/%.dat,
1199 (%.c: ../regformats/arm/%.dat,
1200 (%.c: ../regformats/i386/%.dat,
1201 (%.c: ../regformats/rs6000/%.dat): New rules.
1202 (aarch64.c): Remove.
1203 (reg-arm.c): Remove.
1204 (arm-with-iwmmxt.c): Remove.
1205 (arm-with-vfpv2.c): Remove.
1206 (arm-with-vfpv3.c): Remove.
1207 (arm-with-neon.c): Remove.
1208 (reg-bfin.c): Remove.
1209 (reg-cris.c): Remove.
1210 (reg-crisv32.c): Remove.
1211 (i386.c): Remove.
1212 (i386-linux.c): Remove.
1213 (i386-avx.c): Remove.
1214 (i386-avx-linux.c): Remove.
1215 (i386-avx-avx512.c): Remove.
1216 (i386-avx-avx512-linux.c): Remove.
1217 (i386-mpx.c): Remove.
1218 (i386-mpx-linux.c): Remove.
1219 (i386-avx-mpx-avx512-pku.c): Remove.
1220 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1221 (i386-avx-mpx.c): Remove.
1222 (i386-avx-mpx-linux.c): Remove.
1223 (i386-mmx.c): Remove.
1224 (i386-mmx-linux.c): Remove.
1225 (reg-ia64.c): Remove.
1226 (reg-m32r.c): Remove.
1227 (reg-m68k.c): Remove.
1228 (reg-cf.c): Remove.
1229 (mips-linux.c): Remove.
1230 (mips-dsp-linux.c): Remove.
1231 (mips64-linux.c): Remove.
1232 (mips64-dsp-linux.c): Remove.
1233 (nios2-linux.c): Remove.
1234 (powerpc-32.c): Remove.
1235 (powerpc-32l.c): Remove.
1236 (powerpc-altivec32l.c): Remove.
1237 (powerpc-cell32l.c): Remove.
1238 (powerpc-vsx32l.c): Remove.
1239 (powerpc-isa205-32l.c): Remove.
1240 (powerpc-isa205-altivec32l.c): Remove.
1241 (powerpc-isa205-vsx32l.c): Remove.
1242 (powerpc-e500l.c): Remove.
1243 (powerpc-64l.c): Remove.
1244 (powerpc-altivec64l.c): Remove.
1245 (powerpc-cell64l.c): Remove.
1246 (powerpc-vsx64l.c): Remove.
1247 (powerpc-isa205-64l.c): Remove.
1248 (powerpc-isa205-altivec64l.c): Remove.
1249 (powerpc-isa205-vsx64l.c): Remove.
1250 (s390-linux32.c): Remove.
1251 (s390-linux32v1.c): Remove.
1252 (s390-linux32v2.c): Remove.
1253 (s390-linux64.c): Remove.
1254 (s390-linux64v1.c): Remove.
1255 (s390-linux64v2.c): Remove.
1256 (s390-te-linux64.c): Remove.
1257 (s390-vx-linux64.c): Remove.
1258 (s390-tevx-linux64.c): Remove.
1259 (s390x-linux64.c): Remove.
1260 (s390x-linux64v1.c): Remove.
1261 (s390x-linux64v2.c): Remove.
1262 (s390x-te-linux64.c): Remove.
1263 (s390x-vx-linux64.c): Remove.
1264 (s390x-tevx-linux64.c): Remove.
1265 (tic6x-c64xp-linux.c): Remove.
1266 (tic6x-c64x-linux.c): Remove.
1267 (tic6x-c62x-linux.c): Remove.
1268 (reg-sh.c): Remove.
1269 (reg-sparc64.c): Remove.
1270 (reg-spu.c): Remove.
1271 (amd64.c): Remove.
1272 (amd64-linux.c): Remove.
1273 (amd64-avx.c): Remove.
1274 (amd64-avx-linux.c): Remove.
1275 (amd64-avx-avx512.c): Remove.
1276 (amd64-avx-avx512-linux.c): Remove.
1277 (amd64-mpx.c): Remove.
1278 (amd64-mpx-linux.c): Remove.
1279 (amd64-avx-mpx-avx512-pku.c): Remove.
1280 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1281 (amd64-avx-mpx.c): Remove.
1282 (amd64-avx-mpx-linux.c): Remove.
1283 (x32.c): Remove.
1284 (x32-linux.c): Remove.
1285 (x32-avx.c): Remove.
1286 (x32-avx-linux.c): Remove.
1287 (x32-avx-avx512.c): Remove.
1288 (x32-avx-avx512-linux.c): Remove.
1289 (reg-xtensa.c): Remove.
1290 (reg-tilegx.c): Remove.
1291 (reg-tilegx32.c): Remove.
1292
1293 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1294
1295 * Makefile.in (SFILES): Add "common/environ.c".
1296 (OBJS): Add "common/environ.h".
1297
1298 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1299
1300 * configure.ac: Check if the fs_base and gs_base members of
1301 `struct user_regs_struct' exist.
1302 * config.in: Regenerated.
1303 * configure: Likewise.
1304
1305 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1306
1307 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1308 target_read_memory.
1309 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1310 (get_next_pcs_syscall_next_pc): Likewise.
1311
1312 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1313
1314 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1315 * nto-x86-low.c: Likewise.
1316
1317 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1318
1319 * Makefile.in: Include disable-implicit-rules.mk.
1320
1321 2016-11-23 Pedro Alves <palves@redhat.com>
1322
1323 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1324 (debug_vprintf): Use std::chrono::steady_clock instead of
1325 gettimeofday. Use '.' instead of ':'.
1326 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1327 (get_timestamp): Use std::chrono::steady_clock instead of
1328 gettimeofday.
1329
1330 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1331
1332 * Makefile.in: Fix whitespace formatting.
1333
1334 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1335
1336 * Makefile.in (SFILES, OBS): Flatten list and order
1337 alphabetically.
1338
1339 2016-11-23 Pedro Alves <palves@redhat.com>
1340
1341 * event-loop.c (handle_file_event): Use warning.
1342 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1343 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1344 Use warning.
1345
1346 2016-11-23 Pedro Alves <palves@redhat.com>
1347
1348 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1349 output.
1350 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1351 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1352 debug_printf and debug_flush for debug output.
1353 * server.c (handle_general_set): Likewise.
1354 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1355 output.
1356
1357 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1358
1359 * Makefile.in (.c.o): Replace rule with ...
1360 (%.o: %.c): ... this one.
1361
1362 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1363
1364 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1365 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1366 make.
1367 * configure.ac: Remove checks for the make program.
1368 * configure: Re-generate.
1369
1370 2016-10-28 Pedro Alves <palves@redhat.com>
1371
1372 * Makefile.in (CXX_DIALECT): Get from configure.
1373 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1374 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1375 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1376 * config.in: Regenerate.
1377 * configure: Regenerate.
1378
1379 2016-10-27 Yao Qi <yao.qi@linaro.org>
1380
1381 * linux-low.c (linux_supports_range_stepping): Return true if
1382 can_software_single_step return true.
1383
1384 2016-10-27 Yao Qi <yao.qi@linaro.org>
1385
1386 * inferiors.c (find_inferior_in_random): New function.
1387 * inferiors.h (find_inferior_in_random): Declare.
1388 * linux-low.c (linux_wait_for_event_filtered): Call
1389 find_inferior_in_random instead of find_inferior.
1390
1391 2016-10-27 Yao Qi <yao.qi@linaro.org>
1392
1393 * linux-low.c (linux_wait_1): If single-step breakpoints are
1394 inserted, remove them.
1395
1396 2016-10-26 Pedro Alves <palves@redhat.com>
1397
1398 * linux-low.c (handle_extended_wait): Link parent/child fork
1399 threads.
1400 (linux_wait_1): Unlink them.
1401 (linux_set_resume_request): Ignore resume requests for
1402 already-resumed and unhandled fork child threads.
1403 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1404 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1405 New functions.
1406 (handle_v_requests) <vCont>: Don't call require_running.
1407 * server.h (in_queued_stop_replies): New declaration.
1408
1409 2016-10-24 Yao Qi <yao.qi@linaro.org>
1410
1411 PR server/20733
1412 * linux-aarch64-low.c (append_insns): Cast the return value to
1413 'uint32_t *'.
1414
1415 2016-10-10 Yao Qi <yao.qi@linaro.org>
1416
1417 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1418
1419 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1420
1421 * target.c (target_supports_multi_process): New function, moved
1422 from...
1423 * target.h (target_supports_multi_process): ... here. Remove
1424 macro.
1425
1426 2016-10-05 Tom Tromey <tom@tromey.com>
1427
1428 PR remote/20655:
1429 * tracepoint.c (handle_tracepoint_bkpts): Check
1430 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1431
1432 2016-10-05 Yao Qi <yao.qi@linaro.org>
1433
1434 * configure.srv: Update the path of arm-*.xml files.
1435
1436 2016-10-05 Terry Guo <terry.guo@arm.com>
1437 Yao Qi <yao.qi@linaro.org>
1438
1439 * Makefile.in: Adjust the path of rules.
1440 * configure.srv: Update the path of xml files.
1441 * regformats/arm-with-iwmmxt.dat: Regenerated.
1442 * regformats/arm-with-neon.dat: Likewise.
1443 * regformats/arm-with-vfpv2.dat: Likewise.
1444 * regformats/arm-with-vfpv3.dat Likewise.
1445
1446 2016-09-30 Yao Qi <yao.qi@linaro.org>
1447
1448 PR gdbserver/20627
1449 * target.c (target_stop_and_wait): Don't call
1450 target_continue_no_signal, use resume_stop instead.
1451
1452 2016-09-26 Yao Qi <yao.qi@linaro.org>
1453
1454 * linux-low.c (linux_wait_1): Call debug_exit.
1455
1456 2016-09-23 Pedro Alves <palves@redhat.com>
1457
1458 * Makefile.in (SFILES): Add common/new-op.c.
1459 (OBS): Add common/new-op.o.
1460 (new-op.o): New rule.
1461
1462 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1463
1464 * .gitinore: Ignore more files.
1465
1466 2016-09-21 Yao Qi <yao.qi@linaro.org>
1467
1468 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1469 23.
1470
1471 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1472
1473 * server.c (start_inferior): Call target_mourn_inferior instead of
1474 mourn_inferior; pass ptid_t argument to it.
1475 (resume): Likewise.
1476 (handle_target_event): Likewise.
1477 * target.c (target_mourn_inferior): New function.
1478 * target.h (mourn_inferior): Delete macro.
1479
1480 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1481
1482 * linux-low.c (lwp_is_stepping): New function.
1483
1484 2016-09-06 Carl Love <cel@us.ibm.com>
1485
1486 * server.c (start_inferior): Fixed comment, requested comment change
1487 didn't get updated correctly. Removed reference to ptrace () call as
1488 it is only true on Linux systems.
1489
1490 2016-09-06 Carl Love <cel@us.ibm.com>
1491
1492 * server.c (start_inferior): Do not call
1493 function target_post_create_inferior () if the
1494 inferior process has already exited.
1495
1496 2016-09-05 Pedro Alves <palves@redhat.com>
1497
1498 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1499 (COMPILE.pre, CC_LD): Use CXX directly.
1500 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1501 * acinclude.m4: Don't include build-with-cxx.m4.
1502 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1503 * configure: Regenerate.
1504
1505 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1506
1507 PR gdb/19495
1508 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1509 call writing data to own_buf.
1510
1511 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1512
1513 * target.c (mywait): Call target_wait instead of
1514 the_target->wait.
1515 (target_wait): New function.
1516
1517 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1518
1519 * server.c (start_inferior): New variable 'ptid'. Replace calls
1520 to the_target->resume by target_continue{,_no_signal}, depending
1521 on the case.
1522 * target.c (target_stop_and_wait): Call target_continue_no_signal
1523 instead of the_target->resume.
1524 (target_continue): New function.
1525
1526 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1527
1528 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1529
1530 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1531
1532 PR server/20491
1533 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1534 ps_prochandle.
1535 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1536 * linux-arm-low.c (ps_get_thread_area): Likewise.
1537 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1538 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1539 * linux-mips-low.c (ps_get_thread_area): Likewise.
1540 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1541 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1542 * linux-x86-low.c (ps_get_thread_area): Likewise.
1543 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1544
1545 2016-08-19 Pedro Alves <palves@redhat.com>
1546
1547 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1548
1549 2016-08-19 Pedro Alves <palves@redhat.com>
1550
1551 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1552 comment. Use memcpy instead of casting through unsigned long.
1553
1554 2016-08-19 Pedro Alves <palves@redhat.com>
1555
1556 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1557 allocating around 0x80000000.
1558
1559 2016-08-19 Pedro Alves <palves@redhat.com>
1560
1561 PR gdb/20415
1562 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1563 (x32-avx512-linux-ipa.o): New rules.
1564 * configure.ac (x86_64-*-linux*): New x32 check.
1565 * configure.srv (ipa_x32_linux_regobj): New.
1566 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1567 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1568 descriptions.
1569 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1570 descriptions.
1571 * configure: Regenerate.
1572
1573 2016-08-09 Pedro Alves <palves@redhat.com>
1574
1575 PR gdb/18653
1576 * Makefile.in (OBS): Add signals-state-save-restore.o.
1577 (signals-state-save-restore.o): New rule.
1578 * config.in: Regenerate.
1579 * configure: Regenerate.
1580 * linux-low.c: Include "signals-state-save-restore.h".
1581 (linux_create_inferior): Call
1582 restore_original_signals_state.
1583 * server.c: Include "dispositions-save-restore.h".
1584 (captured_main): Call save_original_signals_state.
1585
1586 2016-08-05 Pedro Alves <palves@redhat.com>
1587
1588 * configure: Regenerate.
1589
1590 2016-08-04 Yao Qi <yao.qi@linaro.org>
1591
1592 * linux-low.c (regsets_fetch_inferior_registers): Check
1593 errno is ESRCH or not.
1594
1595 2016-08-02 Yao Qi <yao.qi@linaro.org>
1596
1597 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1598 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1599 (thread_db_load_search): Update.
1600 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1601 td_ta_set_event and td_ta_event_getmsg.
1602
1603 2016-07-26 Pedro Alves <palves@redhat.com>
1604
1605 PR server/20414
1606 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1607 of unsigned long for 64-bit registers and use uint32_t instead of
1608 unsigned int for 32-bit registers.
1609
1610 2016-07-26 Pedro Alves <palves@redhat.com>
1611
1612 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1613 to 'ptrace'.
1614
1615 2016-07-21 Tom Tromey <tom@tromey.com>
1616
1617 * configure: Rebuild.
1618
1619 2016-07-21 Yao Qi <yao.qi@linaro.org>
1620
1621 * mem-break.c (find_gdb_breakpoint): Cast bp to
1622 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1623
1624 2016-07-21 Yao Qi <yao.qi@linaro.org>
1625
1626 * server.c (handle_v_requests): Support s and S actions
1627 if target_supports_software_single_step return true.
1628
1629 2016-07-21 Yao Qi <yao.qi@linaro.org>
1630
1631 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1632 is resume_step, call maybe_hw_step.
1633 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1634 and unstop them.
1635 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1636 breakpoints or not.
1637 (proceed_one_lwp): If resume request is resume_step, install
1638 reinsert breakpoints and call maybe_hw_step.
1639
1640 2016-07-21 Yao Qi <yao.qi@linaro.org>
1641
1642 * linux-low.c (proceed_one_lwp): Declare.
1643 (linux_resume_one_thread): Remove local variable 'step'.
1644 Lift code enqueue signal. Call proceed_one_lwp instead of
1645 linux_resume_one_lwp.
1646
1647 2016-07-21 Yao Qi <yao.qi@linaro.org>
1648
1649 * linux-low.c (linux_resume_one_thread): Call
1650 enqueue_pending_signal.
1651
1652 2016-07-21 Yao Qi <yao.qi@linaro.org>
1653
1654 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1655 * inferiors.c (do_restore_current_thread_cleanup): New function.
1656 (make_cleanup_restore_current_thread): Likewise.
1657 * linux-low.c (install_software_single_step_breakpoints): Call
1658 make_cleanup_restore_current_thread. Switch current_thread to
1659 thread.
1660
1661 2016-07-21 Yao Qi <yao.qi@linaro.org>
1662
1663 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1664 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1665 (clone_one_breakpoint): Likewise.
1666 (delete_reinsert_breakpoints): Change parameter to thread.
1667 Callers updated.
1668 (has_reinsert_breakpoints): Likewise.
1669 (uninsert_reinsert_breakpoints): Likewise.
1670 (reinsert_reinsert_breakpoints): Likewise.
1671 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1672 (delete_reinsert_breakpoints): Likewise.
1673 (reinsert_reinsert_breakpoints): Likewise.
1674 (uninsert_reinsert_breakpoints): Likewise.
1675 (has_reinsert_breakpoints): Likewise.
1676
1677 2016-07-21 Yao Qi <yao.qi@linaro.org>
1678
1679 * inferiors.c (get_thread_process): Make parameter const.
1680 * inferiors.h (get_thread_process): Update declaration.
1681 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1682 Add new parameters child_thread and parent_thread. Callers
1683 updated.
1684 * mem-break.h (clone_all_breakpoints): Update declaration.
1685
1686 2016-07-21 Yao Qi <yao.qi@linaro.org>
1687
1688 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1689 <command_list, handler>: Remove.
1690 (struct gdb_breakpoint): New.
1691 (struct other_breakpoint): New.
1692 (struct reinsert_breakpoint): New.
1693 (is_gdb_breakpoint): New function.
1694 (any_persistent_commands): Update command_list if
1695 is_gdb_breakpoint returns true.
1696 (set_breakpoint): Create breakpoints according to their types.
1697 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1698 (set_gdb_breakpoint_1): Likewise.
1699 (set_gdb_breakpoint): Likewise.
1700 (clear_breakpoint_conditions): Change parameter type to
1701 'struct gdb_breakpoint *'.
1702 (clear_breakpoint_commands): Likewise.
1703 (clear_breakpoint_conditions_and_commands): Likewise.
1704 (add_condition_to_breakpoint): Likewise.
1705 (add_breakpoint_condition): Likewise.
1706 (add_commands_to_breakpoint): Likewise.
1707 (check_breakpoints): Check other_breakpoint.
1708 (clone_one_breakpoint): Clone breakpopint according to its type.
1709 * mem-break.h (struct gdb_breakpoint): Declare.
1710 (set_gdb_breakpoint): Update declaration.
1711 (clear_breakpoint_conditions_and_commands): Likewise.
1712 (add_breakpoint_condition): Likewise.
1713 (add_breakpoint_commands): Likewise.
1714 * server.c (process_point_options): Change parameter type to
1715 'struct gdb_breakpoint *'.
1716
1717 2016-07-21 Yao Qi <yao.qi@linaro.org>
1718
1719 * mem-break.c (set_breakpoint_at): Rename it to ...
1720 (set_breakpoint_type_at): ... it.
1721 (set_breakpoint_at): Call set_breakpoint_type_at.
1722 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1723 * mem-break.h (set_breakpoint_at): Update comments.
1724
1725 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1726
1727 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1728 to buf parameter.
1729 (nios2_store_gregset): Likewise.
1730
1731 2016-07-01 Pedro Alves <palves@redhat.com>
1732 Antoine Tremblay <antoine.tremblay@ericsson.com>
1733
1734 * linux-low.c: Change interface to take the target lwp_info
1735 pointer directly and return void. Handle detaching from a zombie
1736 thread.
1737 (linux_detach_lwp_callback): New function.
1738 (linux_detach): Detach from the leader thread after detaching from
1739 the clone threads.
1740
1741 2016-06-28 Yao Qi <yao.qi@linaro.org>
1742
1743 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1744 for variable new_offset.
1745 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1746 (aarch64_ftrace_insn_reloc_cb): Likewise.
1747 (aarch64_ftrace_insn_reloc_tb): Likewise.
1748 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1749 PRIx64 instead of PRIx32.
1750
1751 2016-06-28 Yao Qi <yao.qi@linaro.org>
1752
1753 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1754 (the_low_target): Install arm_get_syscall_trapinfo.
1755
1756 2016-06-28 Yao Qi <yao.qi@linaro.org>
1757
1758 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1759 function.
1760 (the_low_target): Install aarch64_get_syscall_trapinfo.
1761
1762 2016-06-28 Yao Qi <yao.qi@linaro.org>
1763
1764 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1765 Callers updated.
1766 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1767 Remove parameter sysno.
1768 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1769 sysret.
1770
1771 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1772
1773 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1774 (s390_emit_ne_goto): Likewise.
1775 (s390_emit_lt_goto): Likewise.
1776 (s390_emit_le_goto): Likewise.
1777 (s390_emit_gt_goto): Likewise.
1778 (s390_emit_ge_goto): Likewise.
1779 (s390x_emit_eq_goto): Likewise.
1780 (s390x_emit_ne_goto): Likewise.
1781 (s390x_emit_lt_goto): Likewise.
1782 (s390x_emit_le_goto): Likewise.
1783 (s390x_emit_gt_goto): Likewise.
1784 (s390x_emit_ge_goto): Likewise.
1785 (s390_emit_ops_impl): Mark variable static.
1786 (s390x_emit_ops): Likewise.
1787
1788 2016-06-17 Yao Qi <yao.qi@linaro.org>
1789
1790 * linux-low.c (handle_extended_wait): Call
1791 uninsert_reinsert_breakpoints for the parent process. Remove
1792 reinsert breakpoints from the child process. Reinsert them to
1793 the parent process when vfork is done.
1794 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1795 (reinsert_reinsert_breakpoints): New function.
1796 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1797 (reinsert_reinsert_breakpoints): Declare.
1798
1799 2016-06-17 Yao Qi <yao.qi@linaro.org>
1800
1801 * linux-low.c (handle_extended_wait): If the parent is doing
1802 step-over, remove the reinsert breakpoints from the forked child.
1803
1804 2016-06-17 Yao Qi <yao.qi@linaro.org>
1805
1806 * linux-low.c (unsuspend_all_lwps): Declare.
1807 (linux_low_filter_event): If thread exited, call finish_step_over.
1808 If step-over is finished, unsuspend other threads.
1809
1810 2016-06-17 Yao Qi <yao.qi@linaro.org>
1811
1812 * linux-low.c (linux_resume_one_lwp_throw): Assert
1813 has_reinsert_breakpoints returns false.
1814 * mem-break.c (delete_disabled_breakpoints): Assert
1815 bp type isn't reinsert_breakpoint.
1816
1817 2016-06-17 Yao Qi <yao.qi@linaro.org>
1818
1819 * linux-low.c (maybe_hw_step): New function.
1820 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1821 (finish_step_over): Switch current_thread to lwp temporarily,
1822 and assert has_reinsert_breakpoints returns true.
1823 (proceed_one_lwp): Call maybe_hw_step.
1824 * mem-break.c (has_reinsert_breakpoints): New function.
1825 * mem-break.h (has_reinsert_breakpoints): Declare.
1826
1827 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1828
1829 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1830
1831 2016-05-17 Yao Qi <yao.qi@linaro.org>
1832
1833 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1834 instead of find_inferior.
1835
1836 2016-05-05 Yao Qi <yao.qi@linaro.org>
1837
1838 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1839 Initialize res to zero.
1840
1841 2016-05-05 Yao Qi <yao.qi@linaro.org>
1842
1843 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1844 to uint32_t.
1845
1846 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1847
1848 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1849 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1850 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1851
1852 2016-04-28 Par Olsson <par.olsson@windriver.com>
1853 Simon Marchi <simon.marchi@ericsson.com>
1854
1855 * tracepoint.c (write_inferior_int8): New function.
1856 (cmd_qtenable_disable): Write enable flag using
1857 write_inferior_int8.
1858
1859 2016-04-25 Yao Qi <yao.qi@linaro.org>
1860
1861 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1862 (need_step_over_p): Return zero if the LWP has pending signals
1863 can be delivered on software single step target.
1864
1865 2016-04-25 Yao Qi <yao.qi@linaro.org>
1866
1867 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1868 return instead of error.
1869
1870 2016-04-22 Yao Qi <yao.qi@linaro.org>
1871
1872 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1873 to 23.
1874
1875 2016-04-22 Yao Qi <yao.qi@linaro.org>
1876
1877 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1878 signal when stepping over breakpoint with software single
1879 step.
1880
1881 2016-04-21 Pedro Alves <palves@redhat.com>
1882
1883 * linux-s390-low.c (s390_collect_ptrace_register)
1884 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1885 add casts.
1886 (s390_check_regset): Use void * instead of gdb_byte *.
1887
1888 2016-04-20 Pedro Alves <palves@redhat.com>
1889
1890 * configure: Renegerate.
1891
1892 2016-04-20 Yao Qi <yao.qi@linaro.org>
1893
1894 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1895 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1896 number 16.
1897 (arm_store_gregset): Likewise.
1898
1899 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1900
1901 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1902 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1903 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1904 (amd64-avx-mpx-linux.c): New rules.
1905 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1906 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1907 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1908 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1909 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1910 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1911 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1912 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1913 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1914 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1915 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1916 * linux-x86-low.c (x86_linux_read_description): Add case for
1917 X86_XSTATE_AVX_MPX_MASK.
1918 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1919 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1920 init_registers_i386_avx_mpx_linux.
1921 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1922 (initialize_low_tracepoint): Call
1923 init_registers_i386_avx_mpx_linux.
1924 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1925 (initialize_low_tracepoint): Call
1926 init_registers_amd64_avx_mpx_linux.
1927 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1928 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1929 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1930 declarations.
1931
1932 2016-04-18 Pedro Alves <palves@redhat.com>
1933
1934 * configure: Regenerate.
1935
1936 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1937
1938 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1939 (aarch64_emit_sub): Likewise.
1940
1941 2016-04-12 Pedro Alves <palves@redhat.com>
1942
1943 * utils.c (prepare_to_throw_exception): Delete.
1944
1945 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1946
1947 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1948
1949 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1950
1951 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1952
1953 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1954
1955 * linux-aarch64-ipa.c: Add <elf.h> include.
1956 * linux-ppc-ipa.c: Add <elf.h> include.
1957 * linux-s390-ipa.c: Add <elf.h> include.
1958
1959 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1960
1961 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1962 (get_raw_reg_ptr): Likewise.
1963 (get_trace_state_variable_value_ptr): Likewise.
1964 (set_trace_state_variable_value_ptr): Likewise.
1965 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1966 char *.
1967
1968 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1969 Marcin Kościelnicki <koriakin@0x04.net>
1970
1971 PR/17221
1972 * linux-ppc-low.c (emit_insns): New function.
1973 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1974 (ppc_emit_prologue): New function.
1975 (ppc_emit_epilogue): New function.
1976 (ppc_emit_add): New function.
1977 (ppc_emit_sub): New function.
1978 (ppc_emit_mul): New function.
1979 (ppc_emit_lsh): New function.
1980 (ppc_emit_rsh_signed): New function.
1981 (ppc_emit_rsh_unsigned): New function.
1982 (ppc_emit_ext): New function.
1983 (ppc_emit_zero_ext): New function.
1984 (ppc_emit_log_not): New function.
1985 (ppc_emit_bit_and): New function.
1986 (ppc_emit_bit_or): New function.
1987 (ppc_emit_bit_xor): New function.
1988 (ppc_emit_bit_not): New function.
1989 (ppc_emit_equal): New function.
1990 (ppc_emit_less_signed): New function.
1991 (ppc_emit_less_unsigned): New function.
1992 (ppc_emit_ref): New function.
1993 (ppc_emit_const): New function.
1994 (ppc_emit_reg): New function.
1995 (ppc_emit_pop): New function.
1996 (ppc_emit_stack_flush): New function.
1997 (ppc_emit_swap): New function.
1998 (ppc_emit_stack_adjust): New function.
1999 (ppc_emit_call): New function.
2000 (ppc_emit_int_call_1): New function.
2001 (ppc_emit_void_call_2): New function.
2002 (ppc_emit_if_goto): New function.
2003 (ppc_emit_goto): New function.
2004 (ppc_emit_eq_goto): New function.
2005 (ppc_emit_ne_goto): New function.
2006 (ppc_emit_lt_goto): New function.
2007 (ppc_emit_le_goto): New function.
2008 (ppc_emit_gt_goto): New function.
2009 (ppc_emit_ge_goto): New function.
2010 (ppc_write_goto_address): New function.
2011 (ppc_emit_ops_impl): New static variable.
2012 (ppc64v1_emit_prologue): New function.
2013 (ppc64v2_emit_prologue): New function.
2014 (ppc64_emit_epilogue): New function.
2015 (ppc64_emit_add): New function.
2016 (ppc64_emit_sub): New function.
2017 (ppc64_emit_mul): New function.
2018 (ppc64_emit_lsh): New function.
2019 (ppc64_emit_rsh_signed): New function.
2020 (ppc64_emit_rsh_unsigned): New function.
2021 (ppc64_emit_ext): New function.
2022 (ppc64_emit_zero_ext): New function.
2023 (ppc64_emit_log_not): New function.
2024 (ppc64_emit_bit_and): New function.
2025 (ppc64_emit_bit_or): New function.
2026 (ppc64_emit_bit_xor): New function.
2027 (ppc64_emit_bit_not): New function.
2028 (ppc64_emit_equal): New function.
2029 (ppc64_emit_less_signed): New function.
2030 (ppc64_emit_less_unsigned): New function.
2031 (ppc64_emit_ref): New function.
2032 (ppc64_emit_const): New function.
2033 (ppc64v1_emit_reg): New function.
2034 (ppc64v2_emit_reg): New function.
2035 (ppc64_emit_pop): New function.
2036 (ppc64_emit_stack_flush): New function.
2037 (ppc64_emit_swap): New function.
2038 (ppc64v1_emit_call): New function.
2039 (ppc64v2_emit_call): New function.
2040 (ppc64v1_emit_int_call_1): New function.
2041 (ppc64v2_emit_int_call_1): New function.
2042 (ppc64v1_emit_void_call_2): New function.
2043 (ppc64v2_emit_void_call_2): New function.
2044 (ppc64_emit_if_goto): New function.
2045 (ppc64_emit_eq_goto): New function.
2046 (ppc64_emit_ne_goto): New function.
2047 (ppc64_emit_lt_goto): New function.
2048 (ppc64_emit_le_goto): New function.
2049 (ppc64_emit_gt_goto): New function.
2050 (ppc64_emit_ge_goto): New function.
2051 (ppc64v1_emit_ops_impl): New static variable.
2052 (ppc64v2_emit_ops_impl): New static variable.
2053 (ppc_emit_ops): New function.
2054 (linux_low_target): Wire in ppc_emit_ops.
2055
2056 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2057 Marcin Kościelnicki <koriakin@0x04.net>
2058
2059 PR/17221
2060 * Makefile.in: Add powerpc-*-ipa.o
2061 * configure.srv: Add ipa_obj for powerpc*-linux.
2062 * linux-ppc-ipa.c: New file.
2063 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2064 includes.
2065 (PPC_FIELD): New macro.
2066 (PPC_SEXT): New macro.
2067 (PPC_OP6): New macro.
2068 (PPC_BO): New macro.
2069 (PPC_LI): New macro.
2070 (PPC_BD): New macro.
2071 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2072 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2073 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2074 (ppc_get_thread_area): New function.
2075 (is_elfv2_inferior): New function.
2076 (gen_ds_form): New function.
2077 (GEN_STD): New macro.
2078 (GEN_STDU): New macro.
2079 (GEN_LD): New macro.
2080 (GEN_LDU): New macro.
2081 (gen_d_form): New function.
2082 (GEN_ADDI): New macro.
2083 (GEN_ADDIS): New macro.
2084 (GEN_LI): New macro.
2085 (GEN_LIS): New macro.
2086 (GEN_ORI): New macro.
2087 (GEN_ORIS): New macro.
2088 (GEN_LWZ): New macro.
2089 (GEN_STW): New macro.
2090 (GEN_STWU): New macro.
2091 (gen_xfx_form): New function.
2092 (GEN_MFSPR): New macro.
2093 (GEN_MTSPR): New macro.
2094 (GEN_MFCR): New macro.
2095 (GEN_MTCR): New macro.
2096 (GEN_SYNC): New macro.
2097 (GEN_LWSYNC): New macro.
2098 (gen_x_form): New function.
2099 (GEN_OR): New macro.
2100 (GEN_MR): New macro.
2101 (GEN_LWARX): New macro.
2102 (GEN_STWCX): New macro.
2103 (GEN_CMPW): New macro.
2104 (gen_md_form): New function.
2105 (GEN_RLDICL): New macro.
2106 (GEN_RLDICR): New macro.
2107 (gen_i_form): New function.
2108 (GEN_B): New macro.
2109 (GEN_BL): New macro.
2110 (gen_b_form): New function.
2111 (GEN_BNE): New macro.
2112 (GEN_LOAD): New macro.
2113 (GEN_STORE): New macro.
2114 (gen_limm): New function.
2115 (gen_atomic_xchg): New function.
2116 (gen_call): New function.
2117 (ppc_relocate_instruction): New function.
2118 (ppc_install_fast_tracepoint_jump_pad): New function.
2119 (ppc_get_min_fast_tracepoint_insn_len): New function.
2120 (ppc_get_ipa_tdesc_idx): New function.
2121 (the_low_target): Wire in the new functions.
2122 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2123 tdescs.
2124 * linux-ppc-tdesc.h: New file.
2125
2126 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2127
2128 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2129 (alloc_jump_pad_buffer): New function.
2130 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2131 (alloc_jump_pad_buffer): New function.
2132 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2133 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2134 (alloc_jump_pad_buffer): New function.
2135 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2136 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2137 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2138 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2139
2140 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2141
2142 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2143 * linux-amd64-ipa.c: Likewise.
2144 * linux-i386-ipa.c: Likewise.
2145 * linux-s390-ipa.c: Likewise.
2146 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2147 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2148 set_trace_state_variable_value_ptr.
2149 (struct ipa_sym_addresses): Likewise.
2150 (symbol_list): Likewise.
2151 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2152 accessing gdb_collect directly.
2153 (gdb_collect_ptr_type): New typedef.
2154 (get_raw_reg_ptr_type): New typedef.
2155 (get_trace_state_variable_value_ptr_type): New typedef.
2156 (set_trace_state_variable_value_ptr_type): New typedef.
2157 (gdb_collect_ptr): New global.
2158 (get_raw_reg_ptr): New global.
2159 (get_trace_state_variable_value_ptr): New global.
2160 (set_trace_state_variable_value_ptr): New global.
2161 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2162 accessing get_raw_reg directly.
2163 (get_get_tsv_func_addr): Likewise for
2164 get_trace_state_variable_value_ptr.
2165 (get_set_tsv_func_addr): Likewise for
2166 set_trace_state_variable_value_ptr.
2167 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2168
2169 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2170
2171 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2172
2173 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2174
2175 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2176 packets.
2177 (relocate_instruction): Remove own_buf.
2178 * server.c (own_buf): Make global.
2179 (handle_v_requests): Make global.
2180 * server.h (own_buf): New declaration.
2181 (handle_v_requests): New prototype.
2182
2183 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2184
2185 PR 18377
2186 * linux-s390-low.c (add_insns): New function.
2187 (s390_emit_prologue): New function.
2188 (s390_emit_epilogue): New function.
2189 (s390_emit_add): New function.
2190 (s390_emit_sub): New function.
2191 (s390_emit_mul): New function.
2192 (s390_emit_lsh): New function.
2193 (s390_emit_rsh_signed): New function.
2194 (s390_emit_rsh_unsigned): New function.
2195 (s390_emit_ext): New function.
2196 (s390_emit_log_not): New function.
2197 (s390_emit_bit_and): New function.
2198 (s390_emit_bit_or): New function.
2199 (s390_emit_bit_xor): New function.
2200 (s390_emit_bit_not): New function.
2201 (s390_emit_equal): New function.
2202 (s390_emit_less_signed): New function.
2203 (s390_emit_less_unsigned): New function.
2204 (s390_emit_ref): New function.
2205 (s390_emit_if_goto): New function.
2206 (s390_emit_goto): New function.
2207 (s390_write_goto_address): New function.
2208 (s390_emit_litpool): New function.
2209 (s390_emit_const): New function.
2210 (s390_emit_call): New function.
2211 (s390_emit_reg): New function.
2212 (s390_emit_pop): New function.
2213 (s390_emit_stack_flush): New function.
2214 (s390_emit_zero_ext): New function.
2215 (s390_emit_swap): New function.
2216 (s390_emit_stack_adjust): New function.
2217 (s390_emit_set_r2): New function.
2218 (s390_emit_int_call_1): New function.
2219 (s390_emit_void_call_2): New function.
2220 (s390_emit_eq_goto): New function.
2221 (s390_emit_ne_goto): New function.
2222 (s390_emit_lt_goto): New function.
2223 (s390_emit_le_goto): New function.
2224 (s390_emit_gt_goto): New function.
2225 (s390_emit_ge_goto): New function.
2226 (s390x_emit_prologue): New function.
2227 (s390x_emit_epilogue): New function.
2228 (s390x_emit_add): New function.
2229 (s390x_emit_sub): New function.
2230 (s390x_emit_mul): New function.
2231 (s390x_emit_lsh): New function.
2232 (s390x_emit_rsh_signed): New function.
2233 (s390x_emit_rsh_unsigned): New function.
2234 (s390x_emit_ext): New function.
2235 (s390x_emit_log_not): New function.
2236 (s390x_emit_bit_and): New function.
2237 (s390x_emit_bit_or): New function.
2238 (s390x_emit_bit_xor): New function.
2239 (s390x_emit_bit_not): New function.
2240 (s390x_emit_equal): New function.
2241 (s390x_emit_less_signed): New function.
2242 (s390x_emit_less_unsigned): New function.
2243 (s390x_emit_ref): New function.
2244 (s390x_emit_if_goto): New function.
2245 (s390x_emit_const): New function.
2246 (s390x_emit_call): New function.
2247 (s390x_emit_reg): New function.
2248 (s390x_emit_pop): New function.
2249 (s390x_emit_stack_flush): New function.
2250 (s390x_emit_zero_ext): New function.
2251 (s390x_emit_swap): New function.
2252 (s390x_emit_stack_adjust): New function.
2253 (s390x_emit_int_call_1): New function.
2254 (s390x_emit_void_call_2): New function.
2255 (s390x_emit_eq_goto): New function.
2256 (s390x_emit_ne_goto): New function.
2257 (s390x_emit_lt_goto): New function.
2258 (s390x_emit_le_goto): New function.
2259 (s390x_emit_gt_goto): New function.
2260 (s390x_emit_ge_goto): New function.
2261 (s390_emit_ops): New function.
2262 (struct linux_target_ops): Fill in emit_ops hook.
2263
2264 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2265
2266 PR 18377
2267 * Makefile.in: Add s390 IPA files.
2268 * configure.srv: Build IPA for s390.
2269 * linux-s390-ipa.c: New file.
2270 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2271 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2272 (tdesc_s390_linux32): Likewise.
2273 (init_registers_s390_linux32v1): Likewise.
2274 (tdesc_s390_linux32v1): Likewise.
2275 (init_registers_s390_linux32v2): Likewise.
2276 (tdesc_s390_linux32v2): Likewise.
2277 (init_registers_s390_linux64): Likewise.
2278 (tdesc_s390_linux64): Likewise.
2279 (init_registers_s390_linux64v1): Likewise.
2280 (tdesc_s390_linux64v1): Likewise.
2281 (init_registers_s390_linux64v2): Likewise.
2282 (tdesc_s390_linux64v2): Likewise.
2283 (init_registers_s390_te_linux64): Likewise.
2284 (tdesc_s390_te_linux64): Likewise.
2285 (init_registers_s390_vx_linux64): Likewise.
2286 (tdesc_s390_vx_linux64): Likewise.
2287 (init_registers_s390_tevx_linux64): Likewise.
2288 (tdesc_s390_tevx_linux64): Likewise.
2289 (init_registers_s390x_linux64): Likewise.
2290 (tdesc_s390x_linux64): Likewise.
2291 (init_registers_s390x_linux64v1): Likewise.
2292 (tdesc_s390x_linux64v1): Likewise.
2293 (init_registers_s390x_linux64v2): Likewise.
2294 (tdesc_s390x_linux64v2): Likewise.
2295 (init_registers_s390x_te_linux64): Likewise.
2296 (tdesc_s390x_te_linux64): Likewise.
2297 (init_registers_s390x_vx_linux64): Likewise.
2298 (tdesc_s390x_vx_linux64): Likewise.
2299 (init_registers_s390x_tevx_linux64): Likewise.
2300 (tdesc_s390x_tevx_linux64): Likewise.
2301 (have_hwcap_s390_vx): New static variable.
2302 (s390_arch_setup): Fill have_hwcap_s390_vx.
2303 (s390_get_thread_area): New function.
2304 (s390_ft_entry_gpr_esa): New const.
2305 (s390_ft_entry_gpr_zarch): New const.
2306 (s390_ft_entry_misc): New const.
2307 (s390_ft_entry_fr): New const.
2308 (s390_ft_entry_vr): New const.
2309 (s390_ft_main_31): New const.
2310 (s390_ft_main_64): New const.
2311 (s390_ft_exit_fr): New const.
2312 (s390_ft_exit_vr): New const.
2313 (s390_ft_exit_misc): New const.
2314 (s390_ft_exit_gpr_esa): New const.
2315 (s390_ft_exit_gpr_zarch): New const.
2316 (append_insns): New function.
2317 (s390_relocate_instruction): New function.
2318 (s390_install_fast_tracepoint_jump_pad): New function.
2319 (s390_get_min_fast_tracepoint_insn_len): New function.
2320 (s390_get_ipa_tdesc_idx): New function.
2321 (struct linux_target_ops): Wire in the above functions.
2322 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2323 * linux-s390-tdesc.h: New file.
2324
2325 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2326
2327 * linux-s390-low.c (s390_supports_tracepoints): New function.
2328 (struct linux_target_ops): Fill supports_tracepoints hook.
2329
2330 2016-03-18 Yao Qi <yao.qi@linaro.org>
2331
2332 * linux-low.c (lwp_signal_can_be_delivered): New function.
2333 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2334
2335 2016-03-18 Yao Qi <yao.qi@linaro.org>
2336
2337 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2338 0 if signal is enqueued. Remove 'signal' from one debugging
2339 message. Move one debugging message to some lines below.
2340 Remove code setting 'signal' to 0.
2341
2342 2016-03-18 Yao Qi <yao.qi@linaro.org>
2343
2344 * linux-low.c (linux_low_filter_event): Remove redundant
2345 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2346
2347 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2348
2349 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2350 (struct linux_target_ops): Wire in the above.
2351
2352 2016-03-03 Yao Qi <yao.qi@linaro.org>
2353
2354 * linux-low.c: Update comments to start_step_over.
2355
2356 2016-03-03 Yao Qi <yao.qi@linaro.org>
2357
2358 PR server/19736
2359 * linux-low.c (handle_extended_wait): Set child suspended
2360 if event_lwp->bp_reinsert isn't zero.
2361
2362 2016-03-02 Yao Qi <yao.qi@linaro.org>
2363
2364 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2365 enqueue_pending_signal.
2366
2367 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2368
2369 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2370 is actually loaded.
2371
2372 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2373
2374 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2375 (s390_regmap_3264) [!__s390x__]: New global.
2376 (s390_collect_ptrace_register): Skip map entries containing -1.
2377 (s390_supply_ptrace_register): Ditto.
2378 (s390_fill_gprs_high): New function.
2379 (s390_store_gprs_high): New function.
2380 (s390_regsets): Add NT_S390_HIGH_GPRS.
2381 (s390_get_hwcap): Enable on 31-bit.
2382 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2383 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2384 Detect NT_S390_HIGH_GPRS.
2385 (s390_usrregs_info_3264): Enable on 31-bit.
2386 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2387 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2388
2389 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2390
2391 PR gdb/13808
2392 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2393 * configure.srv: Ditto.
2394 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2395 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2396 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2397 (init_registers_amd64_linux): Remove prototype.
2398 (tdesc_amd64_linux): Remove declaration.
2399 (get_ipa_tdesc): New function.
2400 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2401 initialize remaining tdescs.
2402 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2403 (init_registers_i386_linux): Remove prototype.
2404 (tdesc_i386_linux): Remove declaration.
2405 (get_ipa_tdesc): New function.
2406 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2407 initialize remaining tdescs.
2408 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2409 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2410 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2411 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2412 (x86_get_ipa_tdesc_idx): New function.
2413 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2414 * linux-x86-tdesc.h: New file.
2415 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2416 (target_get_ipa_tdesc_idx): New macro.
2417 * tracepoint.c (ipa_tdesc_idx): New macro.
2418 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2419 (symbol_list): Add ipa_tdesc_idx.
2420 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2421 (ipa_tdesc): Remove.
2422 (ipa_tdesc_idx): New variable.
2423 (get_context_regcache): Use get_ipa_tdesc.
2424 (gdb_collect): Ditto.
2425 (gdb_probe): Ditto.
2426 * tracepoint.h (get_ipa_tdesc): New prototype.
2427 (ipa_tdesc): Remove.
2428
2429 2016-02-24 Pedro Alves <palves@redhat.com>
2430
2431 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2432 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2433 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2434 Factor out common code between the USE_SIGTRAP_SIGINFO and
2435 !USE_SIGTRAP_SIGINFO blocks.
2436 (linux_low_filter_event): Call save_stop_reason instead of
2437 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2438 Update comments.
2439 (linux_wait_1): Update comments.
2440
2441 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2442
2443 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2444 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2445 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2446 ppc_insert_point, ppc_remove_point.
2447
2448 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2449
2450 * linux-s390-low.c (s390_supports_z_point_type): New function.
2451 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2452
2453 2016-02-16 Yao Qi <yao.qi@linaro.org>
2454
2455 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2456 PC. Get pc from regcache_read_pc.
2457
2458 2016-02-12 Yao Qi <yao.qi@linaro.org>
2459
2460 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2461 or linux_get_pc_32bit.
2462 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2463
2464 2016-02-12 Yao Qi <yao.qi@linaro.org>
2465
2466 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2467 arm_linux_get_next_pcs_fixup.
2468
2469 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2470
2471 * tracepoint.c (x_tracepoint_action_download): Change
2472 write_inferior_data_ptr to write_inferior_data_pointer.
2473 (cmd_qtstart): Likewise.
2474 (write_inferior_data_ptr): Remove.
2475 (download_agent_expr): Change write_inferior_data_ptr to
2476 write_inferior_data_pointer.
2477 (download_tracepoint_1): Likewise.
2478 (download_tracepoint): Likewise.
2479 (download_trace_state_variables): Likewise.
2480
2481 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2482 Marcin Kościelnicki <koriakin@0x04.net>
2483
2484 * tracepoint.c (struct tracepoint_action_ops): Remove.
2485 (struct tracepoint_action): Remove ops.
2486 (m_tracepoint_action_download, r_tracepoint_action_download)
2487 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2488 size and offset accordingly.
2489 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2490 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2491 (tracepoint_action_send, tracepoint_action_download): New functions.
2492 Helpers for trace action handlers.
2493 (add_tracepoint_action): Remove setup actions ops.
2494 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2495
2496 2016-02-10 Yao Qi <yao.qi@linaro.org>
2497
2498 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2499
2500 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2501
2502 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2503 to AC_OUTPUT.
2504 * configure: Regenerate.
2505
2506 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2507
2508 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2509 void * to gdb_byte *.
2510 * linux-low.c (siginfo_fixup): Likewise.
2511 (linux_xfer_siginfo): Likewise.
2512 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2513 Likewise.
2514 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2515
2516 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2517
2518 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2519 to srv_tgtobj.
2520 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2521 to srv_tgtobj.
2522 * linux-x86-low.c [__x86_64__]: Include
2523 "nat/amd64-linux-siginfo.h".
2524 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2525 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2526 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2527 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2528 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2529 (cpt_si_fd, si_timerid, si_overrun): Move from
2530 nat/amd64-linux-siginfo.c.
2531 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2532
2533 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2534
2535 * server.c (skip_to_semicolon): Remove.
2536 (process_point_options): Use strchrnul instead of
2537 skip_to_semicolon.
2538
2539 2016-01-26 Yao Qi <yao.qi@linaro.org>
2540
2541 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2542 * linux-low.c (install_software_single_step_breakpoints): Don't
2543 call regcache_read_pc.
2544 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2545 argument pc.
2546
2547 2016-01-26 Yao Qi <yao.qi@linaro.org>
2548
2549 * linux-low.c (install_software_single_step_breakpoints): Call
2550 regcache_read_pc instead of get_pc.
2551
2552 2016-01-26 Yao Qi <yao.qi@linaro.org>
2553
2554 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2555 (unblock_async_io): Rename to ...
2556 (block_unblock_async_io): ... it. New function.
2557 (enable_async_io): Don't install SIGIO handler. Unblock it
2558 instead.
2559 (disable_async_io): Don't ignore SIGIO. Block it instead.
2560 (initialize_async_io): Install SIGIO handler. Don't call
2561 unblock_async_io.
2562
2563 2016-01-26 Yao Qi <yao.qi@linaro.org>
2564
2565 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2566 first character is '\003', call *the_target->request_interrupt.
2567
2568 2016-01-25 Yao Qi <yao.qi@linaro.org>
2569
2570 * remote-utils.c (new_thread_notify): Remove.
2571 (dead_thread_notify): Likewise.
2572 * remote-utils.h (new_thread_notify): Remove declaration.
2573 (dead_thread_notify): Likewise.
2574
2575 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2576
2577 * gdb.trace/pending.exp: Fix expected message on continue.
2578
2579 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2580
2581 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2582 it works properly on big-endian machines where sizeof (CORE_ADDR)
2583 != sizeof (void *).
2584
2585 2016-01-21 Pedro Alves <palves@redhat.com>
2586
2587 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2588 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2589 * configure: Regenerate.
2590
2591 2016-01-21 Yao Qi <yao.qi@linaro.org>
2592
2593 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2594 is_thumb and set it according to CPSR saved on the stack.
2595 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2596 arm_sigreturn_next_pc.
2597
2598 2016-01-18 Yao Qi <yao.qi@linaro.org>
2599
2600 * linux-low.c (linux_set_pc_64bit): New function.
2601 (linux_get_pc_64bit): New function.
2602 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2603 Declare.
2604 * linux-sparc-low.c (debug_threads): Remove declaration.
2605 (sparc_get_pc): Remove.
2606 (the_low_target): Use linux_get_pc_64bit instead of
2607 sparc_get_pc.
2608 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2609 (the_low_target): Use linux_get_pc_64bit and
2610 linux_set_pc_64bit.
2611
2612 2016-01-18 Yao Qi <yao.qi@linaro.org>
2613
2614 * linux-arm-low.c (debug_threads): Remove declaration.
2615 (arm_get_pc, arm_set_pc): Remove.
2616 (the_low_target): Use linux_get_pc_32bit and
2617 linux_set_pc_32bit.
2618 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2619 (the_low_target): Use linux_get_pc_32bit and
2620 linux_set_pc_32bit.
2621 * linux-cris-low.c (debug_threads): Remove declaration.
2622 (cris_get_pc, cris_set_pc,): Remove.
2623 (the_low_target): Use linux_get_pc_32bit and
2624 linux_set_pc_32bit.
2625 * linux-crisv32-low.c (debug_threads): Remove declaration.
2626 (cris_get_pc, cris_set_pc): Remove.
2627 (the_low_target): Use linux_get_pc_32bit and
2628 linux_set_pc_32bit.
2629 * linux-low.c: Include inttypes.h.
2630 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2631 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2632 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2633 (the_low_target): Use linux_get_pc_32bit and
2634 linux_set_pc_32bit.
2635 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2636 (the_low_target): Use linux_get_pc_32bit and
2637 linux_set_pc_32bit.
2638 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2639 (the_low_target): Use linux_get_pc_32bit and
2640 linux_set_pc_32bit.
2641 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2642 (the_low_target): Use linux_get_pc_32bit and
2643 linux_set_pc_32bit.
2644 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2645 (the_low_target): Use linux_get_pc_32bit and
2646 linux_set_pc_32bit.
2647
2648 2016-01-18 Gary Benson <gbenson@redhat.com>
2649
2650 * configure.ac (AC_FUNC_FORK): New check.
2651 * config.in: Regenerate.
2652 * configure: Likewise.
2653
2654 2016-01-14 Yao Qi <yao.qi@linaro.org>
2655
2656 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2657 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2658 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2659 arm_get_next_pcs_ctor.
2660
2661 2016-01-12 Josh Stone <jistone@redhat.com>
2662 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2663
2664 * inferiors.h: Include "gdb_vecs.h".
2665 (struct process_info): Add syscalls_to_catch.
2666 * inferiors.c (remove_process): Free syscalls_to_catch.
2667 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2668 syscall_return stops.
2669 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2670 * server.c (handle_general_set): Handle QCatchSyscalls.
2671 (handle_query): Report support for QCatchSyscalls.
2672 * target.h (struct target_ops): Add supports_catch_syscall.
2673 (target_supports_catch_syscall): New macro.
2674 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2675 (struct lwp_info): Add syscall_state.
2676 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2677 Maintain syscall_state and syscalls_to_catch across exec.
2678 (get_syscall_trapinfo): New function, proxy to the_low_target.
2679 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2680 (linux_low_filter_event): Toggle syscall_state entry/return for
2681 syscall traps, and set it ignored for all others.
2682 (gdb_catching_syscalls_p): New function.
2683 (gdb_catch_this_syscall_p): New function.
2684 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2685 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2686 (linux_supports_catch_syscall): New function.
2687 (linux_target_ops): Install it.
2688 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2689 (the_low_target): Install it.
2690
2691 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2692
2693 * acinclude.m4: Include new ../warning.m4 file.
2694 * configure: Regenerated.
2695 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2696
2697 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2698
2699 * ax.c (is_goto_target): Mark static.
2700 * linux-low.c (register_addr): Likewise.
2701 (linux_fetch_registers, linux_store_registers): Likewise.
2702 * mem-break.c (any_persistent_commands): Fix old prototype.
2703 (add_commands_to_breakpoint): Mark static.
2704 * regcache.c (find_register_by_name): Delete unused func.
2705 * remote-utils.c (hex_or_minus_one): Mark static.
2706 * server.c (monitor_show_help): Mark static.
2707 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2708 handle_v_requests): Likewise.
2709
2710 2016-01-12 Pedro Alves <palves@redhat.com>
2711
2712 Remove use of the registered trademark symbol throughout.
2713
2714 2016-01-08 Yao Qi <yao.qi@linaro.org>
2715
2716 * remote-utils.c (getpkt): If c is '\003', call target hook
2717 request_interrupt.
2718
2719 2016-01-06 Yao Qi <yao.qi@linaro.org>
2720
2721 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2722 linux-aarch32-low.c.
2723 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2724 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2725 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2726 (thumb2_breakpoint): Declare.
2727 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2728 linux-aarch32-low.h.
2729 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2730 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2731 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2732
2733 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2734
2735 * gdbreplay.c (gdbreplay_version): Change copyright year in
2736 version message.
2737 * server.c (gdbserver_version): Likewise.
2738
2739 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2740
2741 * server.c (crc32_table): Delete.
2742 (crc32): Use libiberty's xcrc32 function.
2743
2744 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2745
2746 * lynx-low.c (lynx_delete_thread_callback): New function.
2747 (lynx_mourn): Properly delete our process and all of its
2748 threads. Remove call to clear_inferiors.
2749
2750 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2751
2752 * target.c (thread_search_callback): Add check that
2753 the thread_stopped target callback is not NULL before
2754 calling it.
2755
2756 2015-12-21 Yao Qi <yao.qi@linaro.org>
2757
2758 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2759 arm breakpoint.
2760
2761 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2762
2763 * server.c (handle_query): Call target_supports_software_single_step.
2764
2765 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2766
2767 * linux-low.c (single_step): New function.
2768 (linux_resume_one_lwp_throw): Call single_step.
2769 (start_step_over): Likewise.
2770
2771 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2772
2773 * Makefile.in (SFILES): Append arch/arm-linux.c,
2774 arch/arm-get-next-pcs.c.
2775 (arm-linux.o): New rule.
2776 (arm-get-next-pcs.o): New rule.
2777 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2778 arm-linux.o.
2779 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2780 to linux-aarch32-low.c.
2781 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2782 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2783 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2784 (thumb2_breakpoint_len): Likewise.
2785 (arm_is_thumb_mode): Make non-static.
2786 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2787 from linux-aarch32-low.c.
2788 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2789 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2790 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2791 (thumb2_breakpoint_len): Likewise.
2792 (arm_is_thumb_mode): New declaration.
2793 * linux-arm-low.c: Include arch/arm-linux.h
2794 aarch/arm-get-next-pcs.h, sys/syscall.h.
2795 (get_next_pcs_ops): New struct.
2796 (get_next_pcs_addr_bits_remove): New function.
2797 (get_next_pcs_is_thumb): New function.
2798 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2799 (arm_sigreturn_next_pc): Likewise.
2800 (get_next_pcs_syscall_next_pc): Likewise.
2801 (arm_gdbserver_get_next_pcs): Likewise.
2802 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2803 Initialize.
2804 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2805 * server.h: Include gdb_vecs.h.
2806
2807 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2808
2809 * Makefile.in (SFILES): Append common/common-regcache.c.
2810 (OBS): Append common-regcache.o.
2811 (common-regcache.o): New rule.
2812 * regcache.c (init_register_cache): Initialize cache to
2813 REG_UNAVAILABLE.
2814 (regcache_raw_read_unsigned): New function.
2815 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2816 register_status enum.
2817
2818 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2819
2820 * linux-aarch64-low.c (the_low_targets): Rename
2821 breakpoint_reinsert_addr to get_next_pcs.
2822 * linux-arm-low.c (the_low_targets): Likewise.
2823 * linux-bfin-low.c (the_low_targets): Likewise.
2824 * linux-cris-low.c (the_low_targets): Likewise.
2825 * linux-crisv32-low.c (the_low_targets): Likewise.
2826 * linux-low.c (can_software_single_step): Likewise.
2827 (install_software_single_step_breakpoints): New function.
2828 (start_step_over): Use install_software_single_step_breakpoints.
2829 * linux-low.h: New CORE_ADDR vector.
2830 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2831 get_next_pcs.
2832 * linux-mips-low.c (the_low_targets): Likewise.
2833 * linux-nios2-low.c (the_low_targets): Likewise.
2834 * linux-sparc-low.c (the_low_targets): Likewise.
2835
2836 2015-12-17 Pedro Alves <palves@redhat.com>
2837
2838 * linux-low.c (linux_kill_one_lwp): Remove references to
2839 LinuxThreads.
2840 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2841 to 'kill'.
2842 (linux_init_signals): Delete.
2843 (initialize_low): Adjust.
2844 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2845
2846 2015-12-16 Pedro Alves <palves@redhat.com>
2847
2848 * configure.ac (compiler warning flags): When testing a
2849 -Wno-foo option, check whether -Wfoo works instead.
2850 * configure: Regenerate.
2851
2852 2015-12-11 Don Breazeal <donb@codesourcery.com>
2853
2854 * server.c (process_serial_event): Don't exit from gdbserver
2855 in remote mode if there are still active inferiors.
2856
2857 2015-12-11 Yao Qi <yao.qi@linaro.org>
2858
2859 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2860 arm_breakpoint_at if the process is 32-bit.
2861
2862 2015-12-11 Yao Qi <yao.qi@linaro.org>
2863
2864 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2865 arm breakpoint.
2866
2867 2015-12-07 Yao Qi <yao.qi@linaro.org>
2868
2869 * configure.srv: Append arm.o to srv_tgtobj for
2870 aarch64*-*-linux* target.
2871 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2872 from linux-arm-low.c.
2873 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2874 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2875 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2876 (thumb2_breakpoint_len): Likewise.
2877 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2878 (arm_breakpoint_kinds): Likewise.
2879 (arm_breakpoint_kind_from_pc): Likewise.
2880 (arm_sw_breakpoint_from_kind): Likewise.
2881 (arm_breakpoint_kind_from_current_state): Likewise.
2882 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2883 (arm_sw_breakpoint_from_kind): Declare.
2884 (arm_breakpoint_kind_from_current_state): Declare.
2885 (arm_breakpoint_at): Declare.
2886 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2887 arm_sw_breakpoint_from_kind if process is 32-bit.
2888 (aarch64_breakpoint_kind_from_pc): New function.
2889 (aarch64_breakpoint_kind_from_current_state): New function.
2890 (the_low_target): Initialize fields breakpoint_kind_from_pc
2891 and breakpoint_kind_from_current_state.
2892 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2893 linux-aarch32-low.c.
2894 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2895 (arm_breakpoint, arm_breakpoint_len): Likewise.
2896 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2897 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2898 (arm_is_thumb_mode): Likewise.
2899 (arm_breakpoint_at): Likewise.
2900 (arm_breakpoint_kind_from_pc): Likewise.
2901 (arm_sw_breakpoint_from_kind): Likewise.
2902 (arm_breakpoint_kind_from_current_state): Likewise.
2903
2904 Revert:
2905 2015-08-04 Yao Qi <yao.qi@linaro.org>
2906
2907 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2908 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2909 * server.c (extended_protocol): Remove "static".
2910 * server.h (extended_protocol): Declare it.
2911
2912 2015-12-04 Josh Stone <jistone@redhat.com>
2913
2914 * target.h (struct target_ops) <arch_setup>: Rename to ...
2915 (struct target_ops) <post_create_inferior>: ... this.
2916 (target_arch_setup): Rename to ...
2917 (target_post_create_inferior): ... this, calling post_create_inferior.
2918 * server.c (start_inferior): Update target_arch_setup calls to
2919 target_post_create_inferior.
2920 * linux-low.c (linux_low_ptrace_options): Forward declare.
2921 (linux_arch_setup): Update its comment for general use.
2922 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2923 (struct linux_target_ops): Use linux_post_create_inferior.
2924 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2925 to post_create_inferior.
2926 * nto-low.c (struct nto_target_ops): Likewise.
2927 * spu-low.c (struct spu_target_ops): Likewise.
2928 * win32-low.c (struct win32_target_ops): Likewise.
2929
2930 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2931
2932 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2933
2934 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2935
2936 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2937 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2938 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2939 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2940 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2941 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2942 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2943 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2944 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2945 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2946 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2947 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2948
2949 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2950
2951 * linux-low.c (linux_look_up_symbols): Don't call
2952 linux_supports_traceclone.
2953 * linux-low.h (thread_db_init): Remove use_events argument.
2954 * thread-db.c (thread_db_use_event): Remove global variable.
2955 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2956 (struct thread_db) <td_create_bp>: Remove field.
2957 (thread_db_create_event): Remove function.
2958 (thread_db_enable_reporting): Likewise.
2959 (find_one_thread): Don't check for thread_db_use_events.
2960 (attach_thread): Likewise.
2961 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2962 (try_thread_db_load_1): Don't check for thread_db_use_events.
2963 (thread_db_init): Remove use_events argument and thread events
2964 handling.
2965 (remove_thread_event_breakpoints): Remove function.
2966 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2967
2968 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2969
2970 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2971 New function.
2972 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2973 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2974 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2975 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2976 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2977 Initialize.
2978 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2979 New function.
2980 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2981 * linux-low.c (can_hardware_single_step): Use
2982 supports_hardware_single_step.
2983 (can_software_single_step): New function.
2984 (start_step_over): Call can_software_single_step.
2985 (linux_supports_hardware_single_step): New function.
2986 (struct target_ops) <supports_software_single_step>: Initialize.
2987 * linux-low.h (struct linux_target_ops)
2988 <supports_hardware_single_step>: Initialize.
2989 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2990 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2991 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2992 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2993 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2994 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2995 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2996 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2997 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2998 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2999 Initialize.
3000 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3001 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3002 Initialize.
3003 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3004 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3005 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3006 New function.
3007 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3008 * target.h (struct target_ops): <supports_software_single_step>:
3009 New field.
3010 (target_supports_software_single_step): New macro.
3011
3012 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3013
3014 * linux-low.c (linux_wait_1): Fix pc advance condition.
3015 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3016 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3017
3018 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3019
3020 * linux-arm-low.c (arm_is_thumb_mode): New function.
3021 (arm_breakpoint_at): Use arm_is_thumb_mode.
3022 (arm_breakpoint_kind_from_current_state): New function.
3023 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3024 Initialize.
3025 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3026 (linux_breakpoint_kind_from_current_state): New function.
3027 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3028 * linux-low.h (struct linux_target_ops)
3029 <breakpoint_kind_from_current_state>: New field.
3030 * target.h (struct target_ops): Likewise.
3031 (target_breakpoint_kind_from_current_state): New macro.
3032
3033 2015-11-30 Pedro Alves <palves@redhat.com>
3034
3035 * linux-low.c (linux_resume): Wake up the event loop before
3036 returning.
3037
3038 2015-11-30 Pedro Alves <palves@redhat.com>
3039
3040 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3041 check.
3042 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3043 to -1.
3044 * target.c (struct thread_search): New structure.
3045 (thread_search_callback): New function.
3046 (prev_general_thread): New global.
3047 (prepare_to_access_memory, done_accessing_memory): New functions.
3048 * target.h (prepare_to_access_memory, done_accessing_memory):
3049 Replace macros with function declarations.
3050
3051 2015-11-30 Pedro Alves <palves@redhat.com>
3052
3053 PR 14618
3054 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3055 report TARGET_WAITKIND_NO_RESUMED.
3056 * remote-utils.c (prepare_resume_reply): Handle
3057 TARGET_WAITKIND_NO_RESUMED.
3058 * server.c (report_no_resumed): New global.
3059 (handle_query) <qSupported>: Handle "no-resumed+". Report
3060 "no-resumed+" support.
3061 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3062 return error if the client doesn't support no-resumed events.
3063 (push_stop_notification): New function.
3064 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3065 events if the client supports them.
3066
3067 2015-11-30 Pedro Alves <palves@redhat.com>
3068
3069 * linux-low.c (thread_still_has_status_pending_p): Don't check
3070 vCont;t here.
3071 (lwp_resumed): New function.
3072 (status_pending_p_callback): Return early if the LWP is not
3073 supposed to be resumed.
3074
3075 2015-11-30 Pedro Alves <palves@redhat.com>
3076
3077 * linux-low.c (handle_extended_wait): Assert that the LWP's
3078 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3079 thread create events, leave the new child's status pending.
3080 (linux_low_filter_event): If GDB wants to hear about thread exit
3081 events, leave the LWP marked dead and don't delete it.
3082 (linux_wait_for_event_filtered): Don't check for thread exit.
3083 (filter_exit_event): New function.
3084 (linux_wait_1): Use it, when returning an exit event.
3085 (linux_resume_one_lwp_throw): Assert that the LWP's
3086 waitstatus is TARGET_WAITKIND_IGNORE.
3087 * remote-utils.c (prepare_resume_reply): Handle
3088 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3089 * server.c (report_thread_events): New global.
3090 (handle_general_set): Handle QThreadEvents.
3091 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3092 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3093 TARGET_WAITKIND_THREAD_EXITED.
3094 * server.h (report_thread_events): Declare.
3095
3096 2015-11-30 Pedro Alves <palves@redhat.com>
3097
3098 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3099 the thread's last_resume_kind was resume_stop.
3100
3101 2015-11-30 Pedro Alves <palves@redhat.com>
3102
3103 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3104 before returning.
3105
3106 2015-11-30 Pedro Alves <palves@redhat.com>
3107
3108 * server.c (handle_v_requests): Handle vCtrlC.
3109
3110 2015-11-30 Pedro Alves <palves@redhat.com>
3111
3112 * gdbthread.h (find_any_thread_of_pid): Declare.
3113 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3114 functions.
3115 * server.c (handle_query): If current_thread is NULL, look for
3116 another thread of the selected process.
3117
3118 2015-11-26 Daniel Colascione <dancol@dancol.org>
3119 Simon Marchi <simon.marchi@ericsson.com>
3120
3121 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3122 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3123 name in reply.
3124 * target.h (struct target_ops) <thread_name>: New field.
3125 (target_thread_name): New macro.
3126
3127 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3128
3129 * regcache.h (regcache_invalidate_pid): Add declaration.
3130 * regcache.c (regcache_invalidate_pid): New function, extracted
3131 from regcache_invalidate.
3132 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3133 Add trivial documentation comment.
3134 * lynx-low.c: Use regcache_invalidate_pid instead of
3135 regcache_invalidate.
3136
3137 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3138
3139 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3140 and Elf64_auxv_t if the target is Android.
3141
3142 2015-11-22 Doug Evans <xdje42@gmail.com>
3143
3144 * target.h: #include <sys/types.h>.
3145
3146 2015-11-19 Pedro Alves <palves@redhat.com>
3147
3148 * linux-low.c (linux_process_qsupported): Change prototype.
3149 Adjust.
3150 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3151 Change prototype.
3152 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3153 and adjust to loop over all features.
3154 * server.c (handle_query) <qSupported>: Adjust to call
3155 target_process_qsupported once, passing it a vector of unprocessed
3156 features.
3157 * target.h (struct target_ops) <process_qsupported>: Change
3158 prototype.
3159 (target_process_qsupported): Adjust.
3160
3161 2015-11-19 Pedro Alves <palves@redhat.com>
3162
3163 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3164 mode.
3165 * configure: Regenerate.
3166
3167 2015-11-19 Pedro Alves <palves@redhat.com>
3168
3169 * configure: Regenerate.
3170
3171 2015-11-19 Yao Qi <yao.qi@linaro.org>
3172
3173 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3174 type to uint32_t.
3175
3176 2015-11-19 Yao Qi <yao.qi@linaro.org>
3177
3178 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3179 (struct aarch64_operand): Move enum out.
3180
3181 2015-11-19 Yao Qi <yao.qi@linaro.org>
3182
3183 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3184 struct user_fpsimd_state *.
3185 (aarch64_store_fpregset): Likewise.
3186
3187 2015-11-19 Yao Qi <yao.qi@linaro.org>
3188
3189 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3190 struct user_pt_regs *.
3191 (aarch64_store_gregset): Likewise.
3192
3193 2015-11-18 Pedro Alves <palves@redhat.com>
3194
3195 * Makefile.in (all_object_files): Add $IPA_OBJS.
3196
3197 2015-11-17 Pedro Alves <palves@redhat.com>
3198
3199 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3200 GDB_SIGNAL_0 and gdb_signal_to_string.
3201
3202 2015-11-17 Pedro Alves <palves@redhat.com>
3203
3204 * win32-low.c (handle_output_debug_string): Remove parameter.
3205 (win32_kill): Remove our_status local and adjust call to
3206 handle_output_debug_string.
3207 (get_child_debug_event): Adjust call to
3208 handle_output_debug_string.
3209
3210 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3211
3212 * linux-mips-low.c (mips_fill_gregset): Add cast.
3213 (mips_store_gregset): Likewise.
3214 (mips_fill_fpregset): Likewise.
3215 (mips_store_fpregset): Likewise.
3216
3217 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3218
3219 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3220 priv.
3221
3222 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3223
3224 * linux-mips-low.c (mips_linux_new_thread): Change type of
3225 watch_type to enum target_hw_bp_type.
3226
3227 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3228
3229 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3230 Change return type to arm_hwbp_type.
3231
3232 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3233
3234 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3235 (arm_store_gregset): Likewise.
3236 * linux-arm-low.c (arm_get_hwcap): Likewise.
3237 (arm_read_description): Likewise.
3238
3239 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3240
3241 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3242
3243 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3244
3245 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3246 (ppc_fill_vsxregset): Likewise.
3247 (ppc_store_vsxregset): Likewise.
3248 (ppc_fill_vrregset): Likewise.
3249 (ppc_store_vrregset): Likewise.
3250 (ppc_fill_evrregset): Likewise.
3251 (ppc_store_evrregset): Likewise.
3252
3253 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3254
3255 * linux-ppc-low.c (ppc_usrregs_info): Remove
3256 forward-declaration.
3257 (ppc_arch_setup): Move lower in file.
3258
3259 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3260
3261 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3262 (ps_pdwrite): Likewise.
3263
3264 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3265
3266 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3267 to after assert checks.
3268
3269 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3270
3271 * proc-service.c (ps_pdread): Add/adjust casts.
3272 (ps_pdwrite): Add/adjust casts.
3273
3274 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3275
3276 * server.c (handle_search_memory_1): Cast return value of
3277 memmem.
3278
3279 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3280
3281 * server.c (write_qxfer_response): Change type of data to
3282 gdb_byte *.
3283
3284 2015-10-29 Pedro Alves <palves@redhat.com>
3285
3286 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3287
3288 2015-10-29 Pedro Alves <palves@redhat.com>
3289
3290 * tracepoint.c (clear_installed_tracepoints): Add casts.
3291
3292 2015-10-29 Pedro Alves <palves@redhat.com>
3293
3294 * server.c (handle_v_cont, process_serial_event): Add enum
3295 gdb_signal casts to signal parsing code.
3296
3297 2015-10-29 Pedro Alves <palves@redhat.com>
3298
3299 * linux-low.h (NULL_REGSET): Define.
3300 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3301 * linux-arm-low.c (arm_regsets): Likewise.
3302 * linux-crisv32-low.c (cris_regsets): Likewise.
3303 * linux-m68k-low.c (m68k_regsets): Likewise.
3304 * linux-mips-low.c (mips_regsets): Likewise.
3305 * linux-nios2-low.c (nios2_regsets): Likewise.
3306 * linux-ppc-low.c (ppc_regsets): Likewise.
3307 * linux-s390-low.c (s390_regsets): Likewise.
3308 * linux-sh-low.c (sh_regsets): Likewise.
3309 * linux-sparc-low.c (sparc_regsets): Likewise.
3310 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3311 * linux-tile-low.c (tile_regsets): Likewise.
3312 * linux-x86-low.c (x86_regsets): Likewise.
3313 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3314
3315 2015-10-29 Pedro Alves <palves@redhat.com>
3316
3317 * linux-low.h (NULL_REGSET): Define.
3318 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3319 * linux-arm-low.c (arm_regsets): Likewise.
3320 * linux-crisv32-low.c (cris_regsets): Likewise.
3321 * linux-m68k-low.c (m68k_regsets): Likewise.
3322 * linux-mips-low.c (mips_regsets): Likewise.
3323 * linux-nios2-low.c (nios2_regsets): Likewise.
3324 * linux-ppc-low.c (ppc_regsets): Likewise.
3325 * linux-s390-low.c (s390_regsets): Likewise.
3326 * linux-sh-low.c (sh_regsets): Likewise.
3327 * linux-sparc-low.c (sparc_regsets): Likewise.
3328 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3329 * linux-tile-low.c (tile_regsets): Likewise.
3330 * linux-x86-low.c (x86_regsets): Likewise.
3331 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3332
3333 2015-10-26 Doug Evans <dje@google.com>
3334
3335 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3336
3337 2015-10-26 Doug Evans <dje@google.com>
3338
3339 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3340
3341 2015-10-26 Doug Evans <dje@google.com>
3342
3343 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3344 for debug_printf.
3345 (attach_thread, find_new_threads_callback): Ditto.
3346
3347 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3348
3349 * mem-break.h (set_breakpoint_data): Remove.
3350
3351 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3352
3353 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3354 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3355 (initialize_low): Remove set_breakpoint_data call.
3356 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3357 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3358 (initialize_low): Remove set_breakpoint_data call.
3359 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3360 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3361 (initialize_low): Remove set_breakpoint_data call.
3362
3363 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3364
3365 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3366 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3367 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3368 * target.h (target_breakpoint_kind_from_pc): New macro.
3369
3370 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3371
3372 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3373 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3374 the default breakpoint kind.
3375
3376 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3377
3378 * linux-arm-low.c (arm_supports_z_point_type): Add software
3379 breakpoint support.
3380
3381 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3382
3383 * linux-arm-low.c: Refactor breakpoint definitions.
3384 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3385 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3386
3387 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3388
3389 * Makefile.in: Add arm.c/o.
3390 * configure.srv: Likewise.
3391 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3392 (arm_breakpoint_kind_from_pc): New function.
3393 (arm_sw_breakpoint_from_kind): Return proper kind.
3394 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3395
3396 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3397
3398 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3399 removal.
3400 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3401 (struct raw_breakpoint) <size>: Remove.
3402 (struct raw_breakpoint) <kind>: Add.
3403 (bp_size): New function.
3404 (bp_opcode): Likewise.
3405 (find_raw_breakpoint_at): Adjust for kind.
3406 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3407 (remove_memory_breakpoint): Adjust for kind call bp_size.
3408 (set_raw_breakpoint_at): Adjust for kind.
3409 (set_breakpoint): Likewise.
3410 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3411 (delete_raw_breakpoint): Adjust for kind.
3412 (delete_breakpoint): Likewise.
3413 (find_gdb_breakpoint): Likewise.
3414 (set_gdb_breakpoint_1): Likewise.
3415 (set_gdb_breakpoint): Likewise.
3416 (delete_gdb_breakpoint_1): Likewise.
3417 (delete_gdb_breakpoint): Likewise.
3418 (uninsert_raw_breakpoint): Likewise.
3419 (reinsert_raw_breakpoint): Likewise.
3420 (set_breakpoint_data): Remove.
3421 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3422 (check_mem_read): Adjust for kind call bp_size.
3423 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3424 (clone_one_breakpoint): Adjust for kind.
3425 * mem-break.h (set_gdb_breakpoint): Likewise.
3426 (delete_gdb_breakpoint): Likewise.
3427 * server.c (process_serial_event): Likewise.
3428
3429 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3430
3431 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3432 (struct linux_target_ops) <breakpoint>: Remove.
3433 (struct linux_target_ops) <breakpoint_len>: Remove.
3434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3436 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3437 (arm_sw_breakpoint_from_kind): New function.
3438 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3439 (struct linux_target_ops) <breakpoint>: Remove.
3440 (struct linux_target_ops) <breakpoint_len>: Remove.
3441 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3442 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3443 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3444 (struct linux_target_ops) <breakpoint>: Remove.
3445 (struct linux_target_ops) <breakpoint_len>: Remove.
3446 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3447 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3448 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3449 (struct linux_target_ops) <breakpoint>: Remove.
3450 (struct linux_target_ops) <breakpoint_len>: Remove.
3451 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3452 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3453 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3454 and sw_breakpoint_from_kind to increment the pc.
3455 (linux_breakpoint_kind_from_pc): New function.
3456 (linux_sw_breakpoint_from_kind): New function.
3457 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3458 (initialize_low): Call breakpoint_kind_from_pc and
3459 sw_breakpoint_from_kind to replace breakpoint_data/len.
3460 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3461 New field.
3462 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3463 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3479 (struct linux_target_ops) <breakpoint>: Remove.
3480 (struct linux_target_ops) <breakpoint_len>: Remove.
3481 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3482 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3483 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3484 (struct linux_target_ops) <breakpoint>: Remove.
3485 (struct linux_target_ops) <breakpoint_len>: Remove.
3486 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3488 * linux-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3509 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3510 (struct linux_target_ops) <breakpoint>: Remove.
3511 (struct linux_target_ops) <breakpoint_len>: Remove.
3512 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3513 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3514 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3515 (struct linux_target_ops) <breakpoint>: Remove.
3516 (struct linux_target_ops) <breakpoint_len>: Remove.
3517 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3518 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3519
3520 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3521
3522 * linux-cris-low.c (cris_get_pc): Remove void arg.
3523
3524 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3525
3526 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3527 variable name.
3528
3529 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3530
3531 * inferiors.c (thread_pid_matches_callback): New function.
3532 (find_thread_process): New function.
3533 (remove_thread): Reset current_thread.
3534 (remove_process): Assert threads have been removed first.
3535
3536 2015-10-15 Yao Qi <yao.qi@linaro.org>
3537
3538 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3539 if it is 3.
3540 (aarch64_remove_point): Likewise.
3541 * regcache.c (regcache_register_size): New function.
3542
3543 2015-10-12 Yao Qi <yao.qi@linaro.org>
3544
3545 * linux-aarch64-low.c: Update all callers as emit_load_store
3546 is renamed to aarch64_emit_load_store.
3547
3548 2015-10-12 Yao Qi <yao.qi@linaro.org>
3549
3550 * linux-aarch64-low.c: Update all callers of function renaming
3551 from emit_insn to aarch64_emit_insn.
3552
3553 2015-10-12 Yao Qi <yao.qi@linaro.org>
3554
3555 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3556 arch/aarch64-insn.h.
3557 (struct aarch64_memory_operand): Likewise.
3558 (ENCODE): Likewise.
3559 (emit_insn): Move to arch/aarch64-insn.c.
3560 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3561 (emit_load_store): Move to arch/aarch64-insn.c.
3562 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3563 (can_encode_int32): Remove.
3564
3565 2015-10-12 Yao Qi <yao.qi@linaro.org>
3566
3567 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3568 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3569 (aarch64_relocate_instruction): Likewise.
3570 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3571 (struct aarch64_insn_visitor): Likewise.
3572
3573 2015-10-12 Yao Qi <yao.qi@linaro.org>
3574
3575 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3576 (struct aarch64_insn_visitor): New.
3577 (struct aarch64_insn_relocation_data): New.
3578 (aarch64_ftrace_insn_reloc_b): New function.
3579 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3580 (aarch64_ftrace_insn_reloc_cb): Likewise.
3581 (aarch64_ftrace_insn_reloc_tb): Likewise.
3582 (aarch64_ftrace_insn_reloc_adr): Likewise.
3583 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3584 (aarch64_ftrace_insn_reloc_others): Likewise.
3585 (visitor): New.
3586 (aarch64_relocate_instruction): Use visitor.
3587
3588 2015-10-12 Yao Qi <yao.qi@linaro.org>
3589
3590 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3591 int. Add argument buf.
3592 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3593 aarch64_relocate_instruction.
3594
3595 2015-10-12 Yao Qi <yao.qi@linaro.org>
3596
3597 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3598 argument insn. Remove local variable insn. Don't call
3599 target_read_uint32.
3600 (aarch64_install_fast_tracepoint_jump_pad): Call
3601 target_read_uint32.
3602
3603 2015-09-30 Yao Qi <yao.qi@linaro.org>
3604
3605 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3606 (emit_load_store_pair): Likewise.
3607
3608 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3609
3610 * dll.c (match_dll): Add cast(s).
3611 (unloaded_dll): Likewise.
3612 * linux-low.c (second_thread_of_pid_p): Likewise.
3613 (delete_lwp_callback): Likewise.
3614 (count_events_callback): Likewise.
3615 (select_event_lwp_callback): Likewise.
3616 (linux_set_resume_request): Likewise.
3617 * server.c (accumulate_file_name_length): Likewise.
3618 (emit_dll_description): Likewise.
3619 (handle_qxfer_threads_worker): Likewise.
3620 (visit_actioned_threads): Likewise.
3621 * thread-db.c (any_thread_of): Likewise.
3622 * tracepoint.c (same_process_p): Likewise.
3623 (match_blocktype): Likewise.
3624 (build_traceframe_info_xml): Likewise.
3625
3626 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3627
3628 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3629 assignment.
3630 (gdb_unparse_agent_expr): Likewise.
3631 * hostio.c (require_data): Likewise.
3632 (handle_pread): Likewise.
3633 * linux-low.c (disable_regset): Likewise.
3634 (fetch_register): Likewise.
3635 (store_register): Likewise.
3636 (get_dynamic): Likewise.
3637 (linux_qxfer_libraries_svr4): Likewise.
3638 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3639 (set_fast_tracepoint_jump): Likewise.
3640 (uninsert_fast_tracepoint_jumps_at): Likewise.
3641 (reinsert_fast_tracepoint_jumps_at): Likewise.
3642 (validate_inserted_breakpoint): Likewise.
3643 (clone_agent_expr): Likewise.
3644 * regcache.c (init_register_cache): Likewise.
3645 * remote-utils.c (putpkt_binary_1): Likewise.
3646 (decode_M_packet): Likewise.
3647 (decode_X_packet): Likewise.
3648 (look_up_one_symbol): Likewise.
3649 (relocate_instruction): Likewise.
3650 (monitor_output): Likewise.
3651 * server.c (handle_search_memory): Likewise.
3652 (handle_qxfer_exec_file): Likewise.
3653 (handle_qxfer_libraries): Likewise.
3654 (handle_qxfer): Likewise.
3655 (handle_query): Likewise.
3656 (handle_v_cont): Likewise.
3657 (handle_v_run): Likewise.
3658 (captured_main): Likewise.
3659 * target.c (write_inferior_memory): Likewise.
3660 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3661 * tracepoint.c (init_trace_buffer): Likewise.
3662 (add_tracepoint_action): Likewise.
3663 (add_traceframe): Likewise.
3664 (add_traceframe_block): Likewise.
3665 (cmd_qtdpsrc): Likewise.
3666 (cmd_qtdv): Likewise.
3667 (cmd_qtstatus): Likewise.
3668 (response_source): Likewise.
3669 (response_tsv): Likewise.
3670 (cmd_qtnotes): Likewise.
3671 (gdb_collect): Likewise.
3672 (initialize_tracepoint): Likewise.
3673
3674 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3675
3676 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3677 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3678 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3679 <NOP>: New.
3680 (enum aarch64_condition_codes): New enum.
3681 (w0): New static global.
3682 (fp): Likewise.
3683 (lr): Likewise.
3684 (struct aarch64_memory_operand) <type>: New
3685 MEMORY_OPERAND_POSTINDEX type.
3686 (postindex_memory_operand): New helper function.
3687 (emit_ret): New function.
3688 (emit_load_store_pair): New function, factored out of emit_stp
3689 with support for MEMORY_OPERAND_POSTINDEX.
3690 (emit_stp): Rewrite using emit_load_store_pair.
3691 (emit_ldp): New function.
3692 (emit_load_store): Likewise.
3693 (emit_ldr): Mention post-index instruction in comment.
3694 (emit_ldrh): New function.
3695 (emit_ldrb): New function.
3696 (emit_ldrsw): Mention post-index instruction in comment.
3697 (emit_str): Likewise.
3698 (emit_subs): New function.
3699 (emit_cmp): Likewise.
3700 (emit_and): Likewise.
3701 (emit_orr): Likewise.
3702 (emit_orn): Likewise.
3703 (emit_eor): Likewise.
3704 (emit_mvn): Likewise.
3705 (emit_lslv): Likewise.
3706 (emit_lsrv): Likewise.
3707 (emit_asrv): Likewise.
3708 (emit_mul): Likewise.
3709 (emit_sbfm): Likewise.
3710 (emit_sbfx): Likewise.
3711 (emit_ubfm): Likewise.
3712 (emit_ubfx): Likewise.
3713 (emit_csinc): Likewise.
3714 (emit_cset): Likewise.
3715 (emit_nop): Likewise.
3716 (emit_ops_insns): New helper function.
3717 (emit_pop): Likewise.
3718 (emit_push): Likewise.
3719 (aarch64_emit_prologue): New function.
3720 (aarch64_emit_epilogue): Likewise.
3721 (aarch64_emit_add): Likewise.
3722 (aarch64_emit_sub): Likewise.
3723 (aarch64_emit_mul): Likewise.
3724 (aarch64_emit_lsh): Likewise.
3725 (aarch64_emit_rsh_signed): Likewise.
3726 (aarch64_emit_rsh_unsigned): Likewise.
3727 (aarch64_emit_ext): Likewise.
3728 (aarch64_emit_log_not): Likewise.
3729 (aarch64_emit_bit_and): Likewise.
3730 (aarch64_emit_bit_or): Likewise.
3731 (aarch64_emit_bit_xor): Likewise.
3732 (aarch64_emit_bit_not): Likewise.
3733 (aarch64_emit_equal): Likewise.
3734 (aarch64_emit_less_signed): Likewise.
3735 (aarch64_emit_less_unsigned): Likewise.
3736 (aarch64_emit_ref): Likewise.
3737 (aarch64_emit_if_goto): Likewise.
3738 (aarch64_emit_goto): Likewise.
3739 (aarch64_write_goto_address): Likewise.
3740 (aarch64_emit_const): Likewise.
3741 (aarch64_emit_call): Likewise.
3742 (aarch64_emit_reg): Likewise.
3743 (aarch64_emit_pop): Likewise.
3744 (aarch64_emit_stack_flush): Likewise.
3745 (aarch64_emit_zero_ext): Likewise.
3746 (aarch64_emit_swap): Likewise.
3747 (aarch64_emit_stack_adjust): Likewise.
3748 (aarch64_emit_int_call_1): Likewise.
3749 (aarch64_emit_void_call_2): Likewise.
3750 (aarch64_emit_eq_goto): Likewise.
3751 (aarch64_emit_ne_goto): Likewise.
3752 (aarch64_emit_lt_goto): Likewise.
3753 (aarch64_emit_le_goto): Likewise.
3754 (aarch64_emit_gt_goto): Likewise.
3755 (aarch64_emit_ge_got): Likewise.
3756 (aarch64_emit_ops_impl): New static global variable.
3757 (aarch64_emit_ops): New target function, return
3758 &aarch64_emit_ops_impl.
3759 (struct linux_target_ops): Install it.
3760
3761 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3762
3763 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3764 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3765 aarch64-ipa.o.
3766 * linux-aarch64-ipa.c: New file.
3767 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3768 and endian.h.
3769 (aarch64_get_thread_area): New target method.
3770 (extract_signed_bitfield): New helper function.
3771 (aarch64_decode_ldr_literal): New function.
3772 (enum aarch64_opcodes): New enum.
3773 (struct aarch64_register): New struct.
3774 (struct aarch64_operand): New struct.
3775 (x0): New static global.
3776 (x1): Likewise.
3777 (x2): Likewise.
3778 (x3): Likewise.
3779 (x4): Likewise.
3780 (w2): Likewise.
3781 (ip0): Likewise.
3782 (sp): Likewise.
3783 (xzr): Likewise.
3784 (aarch64_register): New helper function.
3785 (register_operand): Likewise.
3786 (immediate_operand): Likewise.
3787 (struct aarch64_memory_operand): New struct.
3788 (offset_memory_operand): New helper function.
3789 (preindex_memory_operand): Likewise.
3790 (enum aarch64_system_control_registers): New enum.
3791 (ENCODE): New macro.
3792 (emit_insn): New helper function.
3793 (emit_b): New function.
3794 (emit_bcond): Likewise.
3795 (emit_cb): Likewise.
3796 (emit_tb): Likewise.
3797 (emit_blr): Likewise.
3798 (emit_stp): Likewise.
3799 (emit_ldp_q_offset): Likewise.
3800 (emit_stp_q_offset): Likewise.
3801 (emit_load_store): Likewise.
3802 (emit_ldr): Likewise.
3803 (emit_ldrsw): Likewise.
3804 (emit_str): Likewise.
3805 (emit_ldaxr): Likewise.
3806 (emit_stxr): Likewise.
3807 (emit_stlr): Likewise.
3808 (emit_data_processing_reg): Likewise.
3809 (emit_data_processing): Likewise.
3810 (emit_add): Likewise.
3811 (emit_sub): Likewise.
3812 (emit_mov): Likewise.
3813 (emit_movk): Likewise.
3814 (emit_mov_addr): Likewise.
3815 (emit_mrs): Likewise.
3816 (emit_msr): Likewise.
3817 (emit_sevl): Likewise.
3818 (emit_wfe): Likewise.
3819 (append_insns): Likewise.
3820 (can_encode_int32_in): New helper function.
3821 (aarch64_relocate_instruction): New function.
3822 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3823 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3824 (struct linux_target_ops): Install aarch64_get_thread_area,
3825 aarch64_install_fast_tracepoint_jump_pad and
3826 aarch64_get_min_fast_tracepoint_insn_len.
3827
3828 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3829
3830 * Makefile.in (aarch64-insn.o): New rule.
3831 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3832
3833 2015-09-21 Yao Qi <yao.qi@linaro.org>
3834
3835 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3836
3837 2015-09-21 Yao Qi <yao.qi@linaro.org>
3838
3839 * tracepoint.c (max_jump_pad_size): Remove.
3840
3841 2015-09-18 Yao Qi <yao.qi@linaro.org>
3842
3843 * linux-aarch64-low.c: Don't include sys/uio.h.
3844 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3845
3846 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3847
3848 * tracepoint.c (eval_result_type): Change prototype.
3849 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3850
3851 2015-09-15 Pedro Alves <palves@redhat.com>
3852
3853 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3854 Check whether to report exec events instead of checking whether
3855 multiprocess is enabled.
3856
3857 2015-09-15 Pedro Alves <palves@redhat.com>
3858
3859 PR remote/18965
3860 * remote-utils.c (prepare_resume_reply): Merge
3861 TARGET_WAITKIND_VFORK_DONE switch case with the
3862 TARGET_WAITKIND_FORKED case.
3863
3864 2015-09-15 Yao Qi <yao.qi@linaro.org>
3865
3866 * server.c (handle_query): Check string comparison using
3867 "else if" instead of "if".
3868
3869 2015-09-15 Yao Qi <yao.qi@linaro.org>
3870
3871 * server.c (vCont_supported): New global variable.
3872 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3873 matches. Append ";vContSupported+" to own_buf.
3874 (handle_v_requests): Append ";s;S" to own_buf if target supports
3875 hardware single step or vCont_supported is false.
3876 (capture_main): Set vCont_supported to zero.
3877
3878 2015-09-15 Yao Qi <yao.qi@linaro.org>
3879
3880 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3881 it to ...
3882 (linux_supports_hardware_single_step): ... New function.
3883 (linux_target_ops): Update.
3884 * lynx-low.c (lynx_target_ops): Set field
3885 supports_hardware_single_step to target_can_do_hardware_single_step.
3886 * nto-low.c (nto_target_ops): Likewise.
3887 * spu-low.c (spu_target_ops): Likewise.
3888 * win32-low.c (win32_target_ops): Likewise.
3889 * target.c (target_can_do_hardware_single_step): New function.
3890 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3891 Remove. <supports_hardware_single_step>: New field.
3892 (target_supports_conditional_breakpoints): Remove.
3893 (target_supports_hardware_single_step): New macro.
3894 (target_can_do_hardware_single_step): Declare.
3895 * server.c (handle_query): Use target_supports_hardware_single_step
3896 instead of target_supports_conditional_breakpoints.
3897
3898 2015-09-15 Yao Qi <yao.qi@linaro.org>
3899
3900 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3901 function.
3902 (struct linux_target_ops the_low_target): Install
3903 aarch64_linux_siginfo_fixup.
3904
3905 2015-09-11 Don Breazeal <donb@codesourcery.com>
3906 Luis Machado <lgustavo@codesourcery.com>
3907
3908 * linux-low.c (linux_mourn): Static declaration.
3909 (linux_arch_setup): Move in front of
3910 handle_extended_wait.
3911 (linux_arch_setup_thread): New function.
3912 (handle_extended_wait): Handle exec events. Call
3913 linux_arch_setup_thread. Make event_lwp argument a
3914 pointer-to-a-pointer.
3915 (check_zombie_leaders): Do not check stopped threads.
3916 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3917 (linux_low_filter_event): Add lwp and thread for exec'ing
3918 non-leader thread if leader thread has been deleted.
3919 Refactor code into linux_arch_setup_thread and call it.
3920 Pass child lwp pointer by reference to handle_extended_wait.
3921 (linux_wait_for_event_filtered): Update comment.
3922 (linux_wait_1): Prevent clobbering exec event status.
3923 (linux_supports_exec_events): New function.
3924 (linux_target_ops) <supports_exec_events>: Initialize new member.
3925 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3926 new member.
3927 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3928 * server.c (report_exec_events): New global variable.
3929 (handle_query): Handle qSupported query for exec-events feature.
3930 (captured_main): Initialize report_exec_events.
3931 * server.h (report_exec_events): Declare new global variable.
3932 * target.h (struct target_ops) <supports_exec_events>: New
3933 member.
3934 (target_supports_exec_events): New macro.
3935 * win32-low.c (win32_target_ops) <supports_exec_events>:
3936 Initialize new member.
3937
3938 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3939
3940 * linux-low.c (linux_low_enable_btrace): Remove.
3941 (linux_target_ops): Replace linux_low_enable_btrace with
3942 linux_enable_btrace.
3943
3944 2015-09-03 Yao Qi <yao.qi@linaro.org>
3945
3946 * linux-aarch64-low.c (aarch64_insert_point): Call
3947 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3948 returns true.
3949
3950 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3951
3952 * linux-low.c (check_stopped_by_breakpoint): Use
3953 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3954
3955 2015-08-27 Pedro Alves <palves@redhat.com>
3956
3957 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3958
3959 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3960
3961 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3962 the XNEW-family equivalent.
3963 (compile_bytecodes): Likewise.
3964 * dll.c (loaded_dll): Likewise.
3965 * event-loop.c (append_callback_event): Likewise.
3966 (create_file_handler): Likewise.
3967 (create_file_event): Likewise.
3968 * hostio.c (handle_open): Likewise.
3969 * inferiors.c (add_thread): Likewise.
3970 (add_process): Likewise.
3971 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3972 * linux-arm-low.c (arm_new_process): Likewise.
3973 (arm_new_thread): Likewise.
3974 * linux-low.c (add_to_pid_list): Likewise.
3975 (linux_add_process): Likewise.
3976 (handle_extended_wait): Likewise.
3977 (add_lwp): Likewise.
3978 (enqueue_one_deferred_signal): Likewise.
3979 (enqueue_pending_signal): Likewise.
3980 (linux_resume_one_lwp_throw): Likewise.
3981 (linux_resume_one_thread): Likewise.
3982 (linux_read_memory): Likewise.
3983 (linux_write_memory): Likewise.
3984 * linux-mips-low.c (mips_linux_new_process): Likewise.
3985 (mips_linux_new_thread): Likewise.
3986 (mips_add_watchpoint): Likewise.
3987 * linux-x86-low.c (initialize_low_arch): Likewise.
3988 * lynx-low.c (lynx_add_process): Likewise.
3989 * mem-break.c (set_raw_breakpoint_at): Likewise.
3990 (set_breakpoint): Likewise.
3991 (add_condition_to_breakpoint): Likewise.
3992 (add_commands_to_breakpoint): Likewise.
3993 (clone_agent_expr): Likewise.
3994 (clone_one_breakpoint): Likewise.
3995 * regcache.c (new_register_cache): Likewise.
3996 * remote-utils.c (look_up_one_symbol): Likewise.
3997 * server.c (queue_stop_reply): Likewise.
3998 (start_inferior): Likewise.
3999 (queue_stop_reply_callback): Likewise.
4000 (handle_target_event): Likewise.
4001 * spu-low.c (fetch_ppc_memory): Likewise.
4002 (store_ppc_memory): Likewise.
4003 * target.c (set_target_ops): Likewise.
4004 * thread-db.c (thread_db_load_search): Likewise.
4005 (try_thread_db_load_1): Likewise.
4006 * tracepoint.c (add_tracepoint): Likewise.
4007 (add_tracepoint_action): Likewise.
4008 (create_trace_state_variable): Likewise.
4009 (cmd_qtdpsrc): Likewise.
4010 (cmd_qtro): Likewise.
4011 (add_while_stepping_state): Likewise.
4012 * win32-low.c (child_add_thread): Likewise.
4013 (get_image_name): Likewise.
4014
4015 2015-08-25 Yao Qi <yao.qi@linaro.org>
4016
4017 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4018
4019 2015-08-25 Yao Qi <yao.qi@linaro.org>
4020
4021 * Makefile.in (aarch64-linux.o): New rule.
4022 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4023 srv_tgtobj.
4024 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4025 (aarch64_init_debug_reg_state): Make it extern.
4026 (aarch64_linux_prepare_to_resume): Remove.
4027
4028 2015-08-25 Yao Qi <yao.qi@linaro.org>
4029
4030 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4031 lwp_arch_private_info and ptid_of_lwp.
4032
4033 2015-08-25 Yao Qi <yao.qi@linaro.org>
4034
4035 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4036 Find proc_info by find_process_pid. All callers updated.
4037
4038 2015-08-25 Yao Qi <yao.qi@linaro.org>
4039
4040 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4041 Remove.
4042 (debug_reg_change_callback): Remove.
4043 (aarch64_notify_debug_reg_change): Remove.
4044
4045 2015-08-25 Yao Qi <yao.qi@linaro.org>
4046
4047 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4048 Call current_lwp_ptid.
4049
4050 2015-08-25 Yao Qi <yao.qi@linaro.org>
4051
4052 * linux-aarch64-low.c (debug_reg_change_callback): Use
4053 debug_printf.
4054
4055 2015-08-25 Yao Qi <yao.qi@linaro.org>
4056
4057 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4058
4059 2015-08-25 Yao Qi <yao.qi@linaro.org>
4060
4061 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4062
4063 2015-08-25 Yao Qi <yao.qi@linaro.org>
4064
4065 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4066 the code.
4067
4068 2015-08-25 Yao Qi <yao.qi@linaro.org>
4069
4070 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4071 Remove.
4072 (debug_reg_change_callback): Remove argument entry and add argument
4073 lwp. Remove local variable thread. Don't print thread id in the
4074 debugging output. Don't check whether pid of thread equals to pid.
4075 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4076 iterate_over_lwps instead find_inferior.
4077
4078 2015-08-24 Pedro Alves <palves@redhat.com>
4079
4080 * inferiors.c (get_first_process): New function.
4081 * inferiors.h (get_first_process): New declaration.
4082 * remote-utils.c (read_ptid): Default to the first process in the
4083 list, instead of to the current thread's process.
4084
4085 2015-08-24 Pedro Alves <palves@redhat.com>
4086
4087 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4088 * event-loop.c: Likewise.
4089 * remote-utils.c: Likewise.
4090 * tracepoint.c: Likewise.
4091
4092 2015-08-24 Pedro Alves <palves@redhat.com>
4093
4094 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4095 ptid_get_lwp.
4096
4097 2015-08-21 Pedro Alves <palves@redhat.com>
4098
4099 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4100 instead of literal 1.
4101
4102 2015-08-21 Pedro Alves <palves@redhat.com>
4103
4104 * tdesc.c (default_description): Explicitly zero-initialize.
4105
4106 2015-08-21 Pedro Alves <palves@redhat.com>
4107
4108 PR gdb/18749
4109 * inferiors.c (remove_thread): Discard any pending stop reply for
4110 this thread.
4111 * server.c (remove_all_on_match_pid): Rename to ...
4112 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4113 instead of a pid.
4114 (discard_queued_stop_replies): Change parameter to a ptid. Now
4115 extern.
4116 (handle_v_kill, kill_inferior_callback, captured_main)
4117 (process_serial_event): Adjust.
4118 * server.h (discard_queued_stop_replies): Declare.
4119
4120 2015-08-21 Pedro Alves <palves@redhat.com>
4121
4122 * linux-low.c (wait_for_sigstop): Always switch to no thread
4123 selected if the previously current thread dies.
4124 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4125 process instead of the current thread's.
4126 * remote-utils.c (input_interrupt): Don't check if there's no
4127 current thread.
4128 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4129 current thread to the general thread fails, error out.
4130 (handle_qxfer_auxv, handle_qxfer_libraries)
4131 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4132 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4133 (handle_query): Check if there's a thread selected instead of
4134 checking whether there's any thread in the thread list.
4135 (handle_qxfer_threads, handle_qxfer_btrace)
4136 (handle_qxfer_btrace_conf): Don't error out early if there's no
4137 thread in the thread list.
4138 (handle_v_cont, myresume): Don't set the current thread to the
4139 continue thread.
4140 (process_serial_event) <Hg handling>: Also set thread_id if the
4141 previous general thread is still alive.
4142 (process_serial_event) <g/G handling>: If setting the current
4143 thread to the general thread fails, error out.
4144 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4145 thread's lwp instead of the current thread's.
4146 * target.c (set_desired_thread): If the desired thread was not
4147 found, leave the current thread pointing to NULL. Return an int
4148 (boolean) indicating success.
4149 * target.h (set_desired_thread): Change return type to int.
4150
4151 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4152
4153 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4154 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4155 #includes.
4156 (ps_get_thread_area): New function.
4157
4158 2015-08-19 Gary Benson <gbenson@redhat.com>
4159
4160 * hostio.c (handle_pread): Do not attempt to read more data
4161 than hostio_reply_with_data can fit in a packet.
4162
4163 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4164
4165 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4166
4167 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4168
4169 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4170
4171 2015-08-06 Pedro Alves <palves@redhat.com>
4172
4173 * tracepoint.c (expr_eval_result): Now an int.
4174
4175 2015-08-06 Pedro Alves <palves@redhat.com>
4176
4177 * gdbthread.h (struct regcache): Forward declare.
4178 (struct thread_info) <regcache_data>: Now a struct regcache
4179 pointer.
4180 * inferiors.c (inferior_regcache_data)
4181 (set_inferior_regcache_data): Now work with struct regcache
4182 pointers.
4183 * inferiors.h (struct regcache): Forward declare.
4184 (inferior_regcache_data, set_inferior_regcache_data): Now work
4185 with struct regcache pointers.
4186 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4187 (free_register_cache_thread): Remove struct regcache pointer
4188 casts.
4189
4190 2015-08-06 Pedro Alves <palves@redhat.com>
4191
4192 * server.c (captured_main): On error, print the exception message
4193 to stderr, and if run_once is set, throw a quit.
4194
4195 2015-08-06 Pedro Alves <palves@redhat.com>
4196
4197 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4198 the current thread.
4199
4200 2015-08-06 Pedro Alves <palves@redhat.com>
4201
4202 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4203 reading beyond the passed in buffer length.
4204
4205 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4206
4207 * tracepoint.c (symbol_list) <required>: Remove.
4208
4209 2015-08-06 Pedro Alves <palves@redhat.com>
4210
4211 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4212 count if stopping and suspending threads.
4213 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4214 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4215 (linux_detach): Complete an ongoing step-over.
4216 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4217 throughout.
4218 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4219 (linux_wait_1): If passing a signal to the inferior after
4220 finishing a step-over, unsuspend and re-resume all lwps. If we
4221 see a single-step event but the thread should be continuing, don't
4222 pass the trap to gdb.
4223 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4224 internal_error instead of gdb_assert.
4225 (enqueue_pending_signal): New function.
4226 (check_ptrace_stopped_lwp_gone): Add debug output.
4227 (start_step_over): Use internal_error instead of gdb_assert.
4228 (complete_ongoing_step_over): New function.
4229 (linux_resume_one_thread): Don't resume a suspended thread.
4230 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4231 it stepping.
4232
4233 2015-08-06 Pedro Alves <palves@redhat.com>
4234
4235 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4236 (linux_thread_alive): Use lwp_is_marked_dead.
4237 (extended_event_reported): Delete.
4238 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4239 instead of extended_event_reported.
4240 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4241 as well.
4242 (lwp_is_marked_dead): New function.
4243 (lwp_running): Use lwp_is_marked_dead.
4244 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4245 comment.
4246
4247 2015-08-06 Pedro Alves <palves@redhat.com>
4248
4249 * linux-low.c (linux_wait_1): Move fork event output out of the
4250 !report_to_gdb check. Pass event_child->waitstatus to
4251 target_waitstatus_to_string instead of ourstatus.
4252
4253 2015-08-04 Yao Qi <yao.qi@linaro.org>
4254
4255 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4256 if current_thread is 32 bit.
4257
4258 2015-08-04 Yao Qi <yao.qi@linaro.org>
4259
4260 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4261 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4262 * server.c (extended_protocol): Remove "static".
4263 * server.h (extended_protocol): Declare it.
4264
4265 2015-08-04 Yao Qi <yao.qi@linaro.org>
4266
4267 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4268 both aarch64 and aarch32.
4269 (aarch64_set_pc): Likewise.
4270
4271 2015-08-04 Yao Qi <yao.qi@linaro.org>
4272
4273 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4274 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4275 arm-with-neon.xml to srv_xmlfiles.
4276 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4277 (is_64bit_tdesc): New function.
4278 (aarch64_linux_read_description): New function.
4279 (aarch64_arch_setup): Call aarch64_linux_read_description.
4280 (regs_info): Rename to regs_info_aarch64.
4281 (aarch64_regs_info): Return right regs_info.
4282 (initialize_low_arch): Call initialize_low_arch_aarch32.
4283
4284 2015-08-04 Yao Qi <yao.qi@linaro.org>
4285
4286 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4287 * linux-aarch32-low.c: New file.
4288 * linux-aarch32-low.h: New file.
4289 * linux-arm-low.c (arm_fill_gregset): Move it to
4290 linux-aarch32-low.c.
4291 (arm_store_gregset): Likewise.
4292 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4293 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4294 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4295 (regs_info): Rename to regs_info_arm.
4296 (arm_regs_info): Return regs_info_aarch32 if
4297 have_ptrace_getregset is 1 and target description is
4298 arm_with_neon or arm_with_vfpv3.
4299 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4300 Call initialize_low_arch_aarch32 instead.
4301
4302 2015-08-04 Yao Qi <yao.qi@linaro.org>
4303
4304 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4305 * linux-low.c: ... here.
4306 * linux-low.h (have_ptrace_getregset): Declare it.
4307
4308 2015-08-04 Pedro Alves <palves@redhat.com>
4309
4310 * thread-db.c (struct thread_db): Use new typedefs.
4311 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4312 CHK calls.
4313 (disable_thread_event_reporting): Cast result of dlsym to
4314 destination function pointer type.
4315 (thread_db_mourn): Use td_ta_delete_ftype.
4316
4317 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4318
4319 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4320 arch variant.
4321 (CDX_BREAKPOINT): Define for R2.
4322 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4323 (the_low_target): Add comments.
4324
4325 2015-07-30 Yao Qi <yao.qi@linaro.org>
4326
4327 * linux-arm-low.c (arm_hwcap): Remove it.
4328 (arm_read_description): New local variable arm_hwcap. Don't
4329 set arm_hwcap to zero.
4330
4331 2015-07-30 Yao Qi <yao.qi@linaro.org>
4332
4333 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4334 Use regcache->tdesc instead.
4335 (arm_store_wmmxregset): Likewise.
4336 (arm_fill_vfpregset): Likewise.
4337 (arm_store_vfpregset): Likewise.
4338
4339 2015-07-30 Yao Qi <yao.qi@linaro.org>
4340
4341 * linux-arm-low.c: Include arch/arm.h.
4342 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4343 (arm_store_gregset): Likewise.
4344
4345 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4346
4347 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4348 ptrace's 4th parameter.
4349
4350 2015-07-27 Yao Qi <yao.qi@linaro.org>
4351
4352 * configure.srv (case aarch64*-*-linux*): Don't set
4353 srv_linux_usrregs.
4354
4355 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4356
4357 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4358 sys/ptrace.h.
4359 * linux-arm-low.c: Likewise.
4360 * linux-cris-low.c: Likewise.
4361 * linux-crisv32-low.c: Likewise.
4362 * linux-low.c: Likewise.
4363 * linux-m68k-low.c: Likewise.
4364 * linux-mips-low.c: Likewise.
4365 * linux-nios2-low.c: Likewise.
4366 * linux-s390-low.c: Likewise.
4367 * linux-sparc-low.c: Likewise.
4368 * linux-tic6x-low.c: Likewise.
4369 * linux-tile-low.c: Likewise.
4370 * linux-x86-low.c: Likewise.
4371
4372 2015-07-24 Pedro Alves <palves@redhat.com>
4373
4374 * config.in: Regenerate.
4375 * configure: Regenerate.
4376
4377 2015-07-24 Pedro Alves <palves@redhat.com>
4378
4379 * acinclude.m4: Include ../ptrace.m4.
4380 * configure.ac: Call GDB_AC_PTRACE.
4381 * config.in, configure: Regenerate.
4382
4383 2015-07-24 Yao Qi <yao.qi@linaro.org>
4384
4385 * linux-low.c (linux_create_inferior): Remove setting to
4386 proc->priv->new_inferior.
4387 (linux_attach): Likewise.
4388 (linux_low_filter_event): Likewise.
4389 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4390
4391 2015-07-24 Yao Qi <yao.qi@linaro.org>
4392
4393 * linux-low.c (linux_arch_setup): New function.
4394 (linux_low_filter_event): If proc->tdesc is NULL and
4395 proc->attached is true, call the_low_target.arch_setup.
4396 Otherwise, keep status pending, and return.
4397 (linux_resume_one_lwp_throw): Don't call get_pc if
4398 thread->while_stepping isn't NULL. Don't call
4399 get_thread_regcache if proc->tdesc is NULL.
4400 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4401 (linux_target_ops): Install arch_setup.
4402 * server.c (start_inferior): Call the_target->arch_setup.
4403 * target.h (struct target_ops) <arch_setup>: New field.
4404 (target_arch_setup): New marco.
4405 * lynx-low.c (lynx_target_ops): Update.
4406 * nto-low.c (nto_target_ops): Update.
4407 * spu-low.c (spu_target_ops): Update.
4408 * win32-low.c (win32_target_ops): Update.
4409
4410 2015-07-24 Yao Qi <yao.qi@linaro.org>
4411
4412 * linux-low.c (linux_add_process): Don't set
4413 proc->priv->new_inferior.
4414 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4415 (linux_attach): Likewise.
4416
4417 2015-07-24 Yao Qi <yao.qi@linaro.org>
4418
4419 * server.c (start_inferior): Code refactor.
4420
4421 2015-07-24 Yao Qi <yao.qi@linaro.org>
4422
4423 * server.c (process_serial_event): Set general_thread.
4424
4425 2015-07-21 Yao Qi <yao.qi@linaro.org>
4426
4427 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4428 aarch64_linux_get_debug_reg_capacity.
4429
4430 2015-07-17 Yao Qi <yao.qi@linaro.org>
4431
4432 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4433 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4434 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4435 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4436 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4437 (AARCH64_HWP_ALIGNMENT): Likewise.
4438 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4439 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4440 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4441 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4442 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4443 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4444 (struct aarch64_debug_reg_state): Likewise.
4445 (struct arch_lwp_info): Likewise.
4446 (aarch64_align_watchpoint): Likewise.
4447 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4448 (aarch64_watchpoint_length): Likewise.
4449 (aarch64_point_encode_ctrl_reg): Likewise
4450 (aarch64_point_is_aligned): Likewise.
4451 (aarch64_align_watchpoint): Likewise.
4452 (aarch64_linux_set_debug_regs):
4453 (aarch64_dr_state_insert_one_point): Likewise.
4454 (aarch64_dr_state_remove_one_point): Likewise.
4455 (aarch64_handle_breakpoint): Likewise.
4456 (aarch64_handle_aligned_watchpoint): Likewise.
4457 (aarch64_handle_unaligned_watchpoint): Likewise.
4458 (aarch64_handle_watchpoint): Likewise.
4459
4460 2015-07-17 Yao Qi <yao.qi@linaro.org>
4461
4462 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4463 and don't aarch64_get_debug_reg_state. All callers update.
4464 (aarch64_handle_aligned_watchpoint): Likewise.
4465 (aarch64_handle_unaligned_watchpoint): Likewise.
4466 (aarch64_handle_watchpoint): Likewise.
4467 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4468 (aarch64_remove_point): Likewise.
4469
4470 2015-07-17 Yao Qi <yao.qi@linaro.org>
4471
4472 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4473 debug_printf.
4474 (aarch64_handle_unaligned_watchpoint): Likewise.
4475
4476 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4477
4478 Revert the previous 3 commits:
4479 Move gdb_regex* to common/
4480 Move linux_find_memory_regions_full & co.
4481 gdbserver build-id attribute generator
4482
4483 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4484 Jan Kratochvil <jan.kratochvil@redhat.com>
4485
4486 gdbserver build-id attribute generator.
4487 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4488 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4489 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4490 (find_phdr): New.
4491 (get_dynamic): Use find_pdhr to traverse program headers.
4492 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4493 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4494 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4495 (get_hex_build_id): New.
4496 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4497 to reply XML document.
4498
4499 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4500 Jan Kratochvil <jan.kratochvil@redhat.com>
4501
4502 * target.c: Include target/target-utils.h and fcntl.h.
4503 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4504 (target_fileio_read_stralloc): New functions.
4505
4506 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4507
4508 * Makefile.in (OBS): Add gdb_regex.o.
4509 (gdb_regex.o): New.
4510 * config.in: Rebuilt.
4511 * configure: Rebuilt.
4512
4513 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4514 Jan Kratochvil <jan.kratochvil@redhat.com>
4515
4516 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4517 * Makefile.in (OBS): Add target-utils.o.
4518 (linux-maps.o, target-utils.o): New.
4519 * configure.srv (srv_linux_obj): Add linux-maps.o.
4520
4521 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4522
4523 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4524 function, return 1.
4525 (the_low_target): Install it.
4526
4527 2015-07-14 Pedro Alves <palves@redhat.com>
4528
4529 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4530 Instead, ignore ECHILD, and throw an error for other errnos.
4531
4532 2015-07-10 Pedro Alves <palves@redhat.com>
4533
4534 * event-loop.c (struct callback_event) <data>: Change type to
4535 gdb_client_data instance instead of gdb_client_data pointer.
4536 (append_callback_event): Adjust.
4537
4538 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4539
4540 * linux-aarch64-low.c: Add comments for each linux_target_ops
4541 method. Remove comments already covered in target_ops and
4542 linux_target_ops definitions.
4543 (the_low_target): Add comments for each unimplemented method.
4544
4545 2015-07-09 Yao Qi <yao.qi@linaro.org>
4546
4547 * linux-aarch64-low.c (aarch64_regmap): Remove.
4548 (aarch64_usrregs_info): Remove.
4549 (regs_info): Set field usrregs to NULL.
4550
4551 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4552
4553 * linux-low.c: Include "rsp-low.h"
4554 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4555 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4556 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4557 (handle_btrace_enable_pt): New.
4558 (handle_btrace_general_set): Support "pt".
4559 (handle_btrace_conf_general_set): Support "pt:size".
4560
4561 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4562
4563 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4564 Z_PACKET_SW_BP.
4565
4566 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4567
4568 * linux-aarch64-low.c: Remove comment about endianness.
4569 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4570 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4571 memcmp.
4572
4573 2015-06-24 Gary Benson <gbenson@redhat.com>
4574
4575 * linux-i386-ipa.c (stdint.h): Do not include.
4576 * lynx-i386-low.c (stdint.h): Likewise.
4577 * lynx-ppc-low.c (stdint.h): Likewise.
4578 * mem-break.c (stdint.h): Likewise.
4579 * thread-db.c (stdint.h): Likewise.
4580 * tracepoint.c (stdint.h): Likewise.
4581 * win32-low.c (stdint.h): Likewise.
4582
4583 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4584
4585 * server.c (write_qxfer_response): Update call to
4586 remote_escape_output.
4587
4588 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4589 Jan Kratochvil <jan.kratochvil@redhat.com>
4590
4591 Merge multiple hex conversions.
4592 * gdbreplay.c (tohex): Rename to 'fromhex'.
4593 (logchar): Use fromhex.
4594
4595 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4596
4597 * server.c (handle_qxfer_libraries): Set `version' attribute for
4598 <library-list>.
4599
4600 2015-06-10 Gary Benson <gbenson@redhat.com>
4601
4602 * target.h (struct target_ops) <multifs_open>: New field.
4603 <multifs_unlink>: Likewise.
4604 <multifs_readlink>: Likewise.
4605 * linux-low.c (nat/linux-namespaces.h): New include.
4606 (linux_target_ops): Initialize the_target->multifs_open,
4607 the_target->multifs_unlink and the_target->multifs_readlink.
4608 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4609 * hostio.c (hostio_fs_pid): New static variable.
4610 (hostio_handle_new_gdb_connection): New function.
4611 (handle_setfs): Likewise.
4612 (handle_open): Use the_target->multifs_open as appropriate.
4613 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4614 (handle_readlink): Use the_target->multifs_readlink as
4615 appropriate.
4616 (handle_vFile): Handle vFile:setfs packets.
4617 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4618 after target_handle_new_gdb_connection.
4619
4620 2015-06-10 Gary Benson <gbenson@redhat.com>
4621
4622 * configure.ac (AC_CHECK_FUNCS): Add setns.
4623 * config.in: Regenerate.
4624 * configure: Likewise.
4625 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4626 (linux-namespaces.o): New rule.
4627 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4628
4629 2015-06-09 Gary Benson <gbenson@redhat.com>
4630
4631 * hostio.c (handle_open): Process mode argument with
4632 fileio_to_host_mode.
4633
4634 2015-06-01 Yao Qi <yao.qi@linaro.org>
4635
4636 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4637 * linux-x86-low.c: Likewise.
4638
4639 2015-05-28 Don Breazeal <donb@codesourcery.com>
4640
4641 * linux-low.c (handle_extended_wait): Initialize
4642 thread_info.last_resume_kind for new fork children.
4643
4644 2015-05-15 Pedro Alves <palves@redhat.com>
4645
4646 * target.h (target_handle_new_gdb_connection): Rewrite using if
4647 wrapped in do/while.
4648
4649 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4650
4651 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4652 * configure, config.in: Regenerate.
4653 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4654 Declare typedef.
4655
4656 2015-05-12 Don Breazeal <donb@codesourcery.com>
4657
4658 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4659 PTRACE_EVENT_VFORK_DONE.
4660 (linux_low_ptrace_options, extended_event_reported): Add vfork
4661 events.
4662 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4663 and "vforkdone" for RSP 'T' Stop Reply Packet.
4664 * server.h (report_vfork_events): Declare
4665 global variable.
4666
4667 2015-05-12 Don Breazeal <donb@codesourcery.com>
4668
4669 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4670 (the_low_target) <new_fork>: Initialize new member.
4671 * linux-arm-low.c (arm_new_fork): New function.
4672 (the_low_target) <new_fork>: Initialize new member.
4673 * linux-low.c (handle_extended_wait): Call new target function
4674 new_fork.
4675 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4676 * linux-mips-low.c (mips_add_watchpoint): New function
4677 extracted from mips_insert_point.
4678 (the_low_target) <new_fork>: Initialize new member.
4679 (mips_linux_new_fork): New function.
4680 (mips_insert_point): Call mips_add_watchpoint.
4681 * linux-x86-low.c (x86_linux_new_fork): New function.
4682 (the_low_target) <new_fork>: Initialize new member.
4683
4684 2015-05-12 Don Breazeal <donb@codesourcery.com>
4685
4686 * linux-low.c (handle_extended_wait): Implement return value,
4687 rename argument 'event_child' to 'event_lwp', handle
4688 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4689 (linux_low_ptrace_options): New function.
4690 (linux_low_filter_event): Call linux_low_ptrace_options,
4691 use different argument fo linux_enable_event_reporting,
4692 use return value from handle_extended_wait.
4693 (extended_event_reported): New function.
4694 (linux_wait_1): Call extended_event_reported and set
4695 status to report fork events.
4696 (linux_write_memory): Add pid to debug message.
4697 (reset_lwp_ptrace_options_callback): New function.
4698 (linux_handle_new_gdb_connection): New function.
4699 (linux_target_ops): Initialize new structure member.
4700 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4701 * lynx-low.c: Initialize new structure member.
4702 * remote-utils.c (prepare_resume_reply): Implement stop reason
4703 "fork" for "T" stop message.
4704 * server.c (handle_query): Call handle_new_gdb_connection.
4705 * server.h (report_fork_events): Declare global flag.
4706 * target.h (struct target_ops) <handle_new_gdb_connection>:
4707 New member.
4708 (target_handle_new_gdb_connection): New macro.
4709 * win32-low.c: Initialize new structure member.
4710
4711 2015-05-12 Don Breazeal <donb@codesourcery.com>
4712
4713 * mem-break.c (APPEND_TO_LIST): Define macro.
4714 (clone_agent_expr): New function.
4715 (clone_one_breakpoint): New function.
4716 (clone_all_breakpoints): New function.
4717 * mem-break.h: Declare new functions.
4718
4719 2015-05-12 Don Breazeal <donb@codesourcery.com>
4720
4721 * linux-low.c (linux_supports_fork_events): New function.
4722 (linux_supports_vfork_events): New function.
4723 (linux_target_ops): Initialize new structure members.
4724 (initialize_low): Call linux_check_ptrace_features.
4725 * lynx-low.c (lynx_target_ops): Initialize new structure
4726 members.
4727 * server.c (report_fork_events, report_vfork_events):
4728 New global flags.
4729 (handle_query): Add new features to qSupported packet and
4730 response.
4731 (captured_main): Initialize new global variables.
4732 * target.h (struct target_ops) <supports_fork_events>:
4733 New member.
4734 <supports_vfork_events>: New member.
4735 (target_supports_fork_events): New macro.
4736 (target_supports_vfork_events): New macro.
4737 * win32-low.c (win32_target_ops): Initialize new structure
4738 members.
4739
4740 2015-05-12 Gary Benson <gbenson@redhat.com>
4741
4742 * server.c (handle_qxfer_exec_file): Use current process
4743 if annex is empty.
4744
4745 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4746
4747 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4748 Remove HAVE_PTRACE_GETREGS conditionals.
4749 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4750 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4751
4752 2015-05-08 Yao Qi <yao.qi@linaro.org>
4753
4754 * linux-low.c (linux_supports_conditional_breakpoints): New
4755 function.
4756 (linux_target_ops): Install new target method.
4757 * lynx-low.c (lynx_target_ops): Install NULL hook for
4758 supports_conditional_breakpoints.
4759 * nto-low.c (nto_target_ops): Likewise.
4760 * spu-low.c (spu_target_ops): Likewise.
4761 * win32-low.c (win32_target_ops): Likewise.
4762 * server.c (handle_query): Check
4763 target_supports_conditional_breakpoints.
4764 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4765 New field.
4766 (target_supports_conditional_breakpoints): New macro.
4767
4768 2015-05-06 Pedro Alves <palves@redhat.com>
4769
4770 PR server/18081
4771 * server.c (start_inferior): If the process exits, mourn it.
4772
4773 2015-04-21 Gary Benson <gbenson@redhat.com>
4774
4775 * hostio.c (fileio_open_flags_to_host): Factored out to
4776 fileio_to_host_openflags in common/fileio.c. Single use
4777 updated.
4778
4779 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4780
4781 * linux-xtensa-low.c (xtensa_fill_gregset)
4782 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4783 XCHAL_HAVE_LOOP.
4784
4785 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4786
4787 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4788 (regs_info): Replace usrregs pointer with NULL.
4789
4790 2015-04-17 Gary Benson <gbenson@redhat.com>
4791
4792 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4793 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4794 * server.c (handle_qxfer_exec_file): New function.
4795 (qxfer_packets): Add exec-file entry.
4796 (handle_query): Report qXfer:exec-file:read as supported packet.
4797
4798 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4799
4800 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4801
4802 2015-04-09 Gary Benson <gbenson@redhat.com>
4803
4804 * hostio-errno.c (errno_to_fileio_error): Remove function.
4805 Update caller to use remote_fileio_to_fio_error.
4806
4807 2015-04-09 Yao Qi <yao.qi@linaro.org>
4808
4809 * linux-low.c (linux_insert_point): Call
4810 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4811 (linux_remove_point): Call remove_memory_breakpoint if type is
4812 raw_bkpt_type_sw.
4813 * linux-x86-low.c (x86_insert_point): Don't call
4814 insert_memory_breakpoint.
4815 (x86_remove_point): Don't call remove_memory_breakpoint.
4816
4817 2015-04-01 Pedro Alves <palves@redhat.com>
4818 Cleber Rosa <crosa@redhat.com>
4819
4820 * server.c (gdbserver_usage): Reorganize and extend the usage
4821 message.
4822
4823 2015-03-24 Pedro Alves <palves@redhat.com>
4824
4825 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4826 output. Also dump TRAP_TRACE.
4827 (linux_low_filter_event): In debug output, distinguish a
4828 resume_stop SIGSTOP from a delayed SIGSTOP.
4829
4830 2015-03-24 Gary Benson <gbenson@redhat.com>
4831
4832 * linux-x86-low.c (x86_linux_new_thread): Moved to
4833 nat/x86-linux.c.
4834 (x86_linux_prepare_to_resume): Likewise.
4835
4836 2015-03-24 Gary Benson <gbenson@redhat.com>
4837
4838 * Makefile.in (x86-linux-dregs.o): New rule.
4839 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4840 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4841 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4842 (x86_linux_dr_get): Likewise.
4843 (x86_linux_dr_set): Likewise.
4844 (update_debug_registers_callback): Likewise.
4845 (x86_linux_dr_set_addr): Likewise.
4846 (x86_linux_dr_get_addr): Likewise.
4847 (x86_linux_dr_set_control): Likewise.
4848 (x86_linux_dr_get_control): Likewise.
4849 (x86_linux_dr_get_status): Likewise.
4850 (x86_linux_update_debug_registers): Likewise.
4851
4852 2015-03-24 Gary Benson <gbenson@redhat.com>
4853
4854 * linux-x86-low.c (x86_linux_update_debug_registers):
4855 New function, factored out from...
4856 (x86_linux_prepare_to_resume): ...this.
4857
4858 2015-03-24 Gary Benson <gbenson@redhat.com>
4859
4860 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4861 (x86_linux_dr_set): Likewise.
4862 (update_debug_registers_callback): Likewise.
4863 (x86_linux_dr_set_addr): Likewise.
4864 (x86_linux_dr_get_addr): Likewise.
4865 (x86_linux_dr_set_control): Likewise.
4866 (x86_linux_dr_get_control): Likewise.
4867 (x86_linux_dr_get_status): Likewise.
4868 (x86_linux_prepare_to_resume): Likewise.
4869
4870 2015-03-24 Gary Benson <gbenson@redhat.com>
4871
4872 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4873 Use perror_with_name. Pass string through gettext.
4874 (x86_linux_dr_set): Likewise.
4875
4876 2015-03-24 Gary Benson <gbenson@redhat.com>
4877
4878 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4879 (x86_linux_dr_set_addr): ...this.
4880 (x86_dr_low_get_addr): Rename to...
4881 (x86_linux_dr_get_addr): ...this.
4882 (x86_dr_low_set_control): Rename to...
4883 (x86_linux_dr_set_control): ...this.
4884 (x86_dr_low_get_control): Rename to...
4885 (x86_linux_dr_get_control): ...this.
4886 (x86_dr_low_get_status): Rename to...
4887 (x86_linux_dr_get_status): ...this.
4888 (x86_dr_low): Update with new function names.
4889
4890 2015-03-24 Gary Benson <gbenson@redhat.com>
4891
4892 * Makefile.in (x86-linux.o): New rule.
4893 * configure.srv: Add x86-linux.o to relevant targets.
4894 * linux-low.c (lwp_set_arch_private_info): New function.
4895 (lwp_arch_private_info): Likewise.
4896 * linux-x86-low.c: Include nat/x86-linux.h.
4897 (arch_lwp_info): Removed structure.
4898 (update_debug_registers_callback):
4899 Use lwp_set_debug_registers_changed.
4900 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4901 and lwp_set_debug_registers_changed.
4902 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4903
4904 2015-03-24 Gary Benson <gbenson@redhat.com>
4905
4906 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4907 * linux-arm-low.c (arm_new_thread): Likewise.
4908 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4909 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4910 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4911 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4912
4913 2015-03-24 Gary Benson <gbenson@redhat.com>
4914
4915 * linux-low.c (ptid_of_lwp): New function.
4916 (lwp_is_stopped): Likewise.
4917 (lwp_stop_reason): Likewise.
4918 * linux-x86-low.c (update_debug_registers_callback):
4919 Use lwp_is_stopped.
4920 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4921 lwp_stop_reason.
4922
4923 2015-03-24 Gary Benson <gbenson@redhat.com>
4924
4925 * linux-low.h (linux_stop_lwp): Remove declaration.
4926
4927 2015-03-24 Gary Benson <gbenson@redhat.com>
4928
4929 * linux-low.h: Include nat/linux-nat.h.
4930 * linux-low.c (iterate_over_lwps_args): New structure.
4931 (iterate_over_lwps_filter): New function.
4932 (iterate_over_lwps): Likewise.
4933 * linux-x86-low.c (update_debug_registers_callback):
4934 Update signature to what iterate_over_lwps expects.
4935 Remove PID check that iterate_over_lwps now performs.
4936 (x86_dr_low_set_addr): Use iterate_over_lwps.
4937 (x86_dr_low_set_control): Likewise.
4938
4939 2015-03-24 Gary Benson <gbenson@redhat.com>
4940
4941 * linux-x86-low.c (x86_debug_reg_state): New function.
4942 (x86_linux_prepare_to_resume): Use the above.
4943
4944 2015-03-24 Gary Benson <gbenson@redhat.com>
4945
4946 * linux-low.c (current_lwp_ptid): New function.
4947 * linux-x86-low.c: Include nat/linux-nat.h.
4948 (x86_dr_low_get_addr): Use current_lwp_ptid.
4949 (x86_dr_low_get_control): Likewise.
4950 (x86_dr_low_get_status): Likewise.
4951
4952 2015-03-20 Pedro Alves <palves@redhat.com>
4953
4954 * tracepoint.c (cmd_qtstatus): Make "str" const.
4955
4956 2015-03-20 Pedro Alves <palves@redhat.com>
4957
4958 * server.c (handle_general_set): Make "req_str" const.
4959
4960 2015-03-19 Pedro Alves <palves@redhat.com>
4961
4962 * linux-low.c (linux_resume_one_lwp): Rename to ...
4963 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4964 instead call perror_with_name.
4965 (check_ptrace_stopped_lwp_gone): New function.
4966 (linux_resume_one_lwp): Reimplement as wrapper around
4967 linux_resume_one_lwp_throw that swallows errors if the LWP is
4968 gone.
4969
4970 2015-03-19 Pedro Alves <palves@redhat.com>
4971
4972 * linux-low.c (count_events_callback, select_event_lwp_callback):
4973 No longer check whether the thread has resume_stop as last resume
4974 kind.
4975
4976 2015-03-19 Pedro Alves <palves@redhat.com>
4977
4978 * linux-low.c (count_events_callback, select_event_lwp_callback):
4979 Use the lwp's status_pending_p field, not the thread's.
4980
4981 2015-03-19 Pedro Alves <palves@redhat.com>
4982
4983 * linux-low.c (select_event_lwp_callback): Update comments to
4984 no longer mention SIGTRAP.
4985
4986 2015-03-18 Gary Benson <gbenson@redhat.com>
4987
4988 * server.c (handle_query): Do not report vFile:fstat as supported.
4989
4990 2015-03-11 Gary Benson <gbenson@redhat.com>
4991
4992 * hostio.c (sys/types.h): New include.
4993 (sys/stat.h): Likewise.
4994 (common-remote-fileio.h): Likewise.
4995 (handle_fstat): New function.
4996 (handle_vFile): Handle vFile:fstat packets.
4997
4998 2015-03-11 Gary Benson <gbenson@redhat.com>
4999
5000 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5001 struct stat.st_blocks and struct stat.st_blksize.
5002 * configure: Regenerate.
5003 * config.in: Likewise.
5004 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5005 (OBS): Add common-remote-fileio.o.
5006 (common-remote-fileio.o): New rule.
5007
5008 2015-03-09 Pedro Alves <palves@redhat.com>
5009
5010 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5011 'struct sockaddr' pointer in 'accept' call.
5012
5013 2015-03-09 Pedro Alves <palves@redhat.com>
5014
5015 Revert:
5016 2015-03-07 Pedro Alves <palves@redhat.com>
5017 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5018 or <winsock2.h> here. Instead include "gdb_socket.h".
5019 (remote_open): Use union gdb_sockaddr_u.
5020 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5021 or <winsock2.h> here. Instead include "gdb_socket.h".
5022 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5023 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5024 or <sys/un.h>.
5025 (init_named_socket, gdb_agent_helper_thread): Use union
5026 gdb_sockaddr_u.
5027
5028 2015-03-07 Pedro Alves <palves@redhat.com>
5029
5030 * configure.ac (build_warnings): Move
5031 -Wdeclaration-after-statement to the C-specific set.
5032 * configure: Regenerate.
5033
5034 2015-03-07 Pedro Alves <palves@redhat.com>
5035
5036 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5037 or <winsock2.h> here. Instead include "gdb_socket.h".
5038 (remote_open): Use union gdb_sockaddr_u.
5039 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5040 or <winsock2.h> here. Instead include "gdb_socket.h".
5041 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5042 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5043 or <sys/un.h>.
5044 (init_named_socket, gdb_agent_helper_thread): Use union
5045 gdb_sockaddr_u.
5046
5047 2015-03-07 Pedro Alves <palves@redhat.com>
5048
5049 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5050 instead.
5051
5052 2015-03-06 Yao Qi <yao.qi@linaro.org>
5053
5054 * linux-aarch64-low.c (aarch64_insert_point): Use
5055 show_debug_regs as a boolean.
5056 (aarch64_remove_point): Likewise.
5057
5058 2015-03-05 Pedro Alves <palves@redhat.com>
5059
5060 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5061 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5062 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5063 * nto-low.c (nto_target_ops): Likewise.
5064 * spu-low.c (spu_target_ops): Likewise.
5065 * win32-low.c (win32_target_ops): Likewise.
5066
5067 2015-03-04 Pedro Alves <palves@redhat.com>
5068
5069 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5070 Decide whether a breakpoint triggered based on the SIGTRAP's
5071 siginfo.si_code.
5072 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5073 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5074 (linux_low_filter_event): Check for breakpoints before checking
5075 watchpoints.
5076 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5077 siginfo.si_code.
5078 (linux_stopped_by_sw_breakpoint)
5079 (linux_supports_stopped_by_sw_breakpoint)
5080 (linux_stopped_by_hw_breakpoint)
5081 (linux_supports_stopped_by_hw_breakpoint): New functions.
5082 (linux_target_ops): Install new target methods.
5083
5084 2015-03-04 Pedro Alves <palves@redhat.com>
5085
5086 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5087 * server.c (swbreak_feature, hwbreak_feature): New globals.
5088 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5089 (captured_main): Clear swbreak_feature and hwbreak_feature.
5090 * server.h (swbreak_feature, hwbreak_feature): Declare.
5091 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5092 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5093 supports_stopped_by_hw_breakpoint>: New fields.
5094 (target_supports_stopped_by_sw_breakpoint)
5095 (target_stopped_by_sw_breakpoint)
5096 (target_supports_stopped_by_hw_breakpoint)
5097 (target_stopped_by_hw_breakpoint): Declare.
5098
5099 2015-03-04 Pedro Alves <palves@redhat.com>
5100
5101 enum lwp_stop_reason -> enum target_stop_reason
5102 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5103 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5104 (linux_wait_1, stuck_in_jump_pad_callback)
5105 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5106 (linux_stopped_by_watchpoint):
5107 * linux-low.h (enum lwp_stop_reason): Delete.
5108 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5109 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5110
5111 2015-03-04 Yao Qi <yao.qi@linaro.org>
5112
5113 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5114
5115 2015-03-03 Gary Benson <gbenson@redhat.com>
5116
5117 * hostio.c (handle_vFile): Fix prefix lengths.
5118
5119 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5120
5121 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5122 ptr_bits.
5123
5124 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5125
5126 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5127 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5128 (clean): Add "rm -f" for above C files.
5129 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5130 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5131 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5132 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5133 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5134 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5135 (init_registers_s390x_vx_linux64)
5136 (init_registers_s390x_tevx_linux64)
5137 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5138 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5139 declarations.
5140 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5141 (s390_store_vxrs_high): New functions.
5142 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5143 NT_S390_VXRS_HIGH.
5144 (s390_arch_setup): Add logic for selecting one of the new target
5145 descriptions. Activate the new vector regsets if applicable.
5146 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5147 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5148 and init_registers_s390x_tevx_linux64.
5149
5150 2015-03-01 Pedro Alves <palves@redhat.com>
5151
5152 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5153 parameter.
5154
5155 2015-02-27 Pedro Alves <palves@redhat.com>
5156
5157 * linux-x86-low.c (u_debugreg_offset): New function.
5158 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5159
5160 2015-02-27 Pedro Alves <palves@redhat.com>
5161
5162 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5163 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5164 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5165 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5166 (ps_lsetfpregs, ps_getpid)
5167 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5168 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5169 (ps_lsetxregs, ps_plog): Declare.
5170
5171 2015-02-27 Pedro Alves <palves@redhat.com>
5172
5173 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5174 IP_AGENT_EXPORT_FUNC.
5175 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5176 IP_AGENT_EXPORT_FUNC.
5177 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5178 (IP_AGENT_EXPORT): Delete.
5179 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5180 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5181 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5182 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5183 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5184 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5185 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5186 (traceframe_read_count, traceframe_write_count)
5187 (traceframes_created, trace_state_variables, get_raw_reg)
5188 (get_trace_state_variable_value, set_trace_state_variable_value)
5189 (ust_loaded, helper_thread_id, cmd_buf): Use
5190 IPA_SYM_EXPORTED_NAME.
5191 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5192 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5193 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5194 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5195 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5196 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5197 EXTERN_C_PUSH/EXTERN_C_POP.
5198 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5199 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5200 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5201 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5202 (traceframe_write_count, traceframe_read_count)
5203 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5204 (about_to_request_buffer_space, get_trace_state_variable_value)
5205 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5206 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5207 EXTERN_C_PUSH/EXTERN_C_POP.
5208 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5209 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5210 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5211 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5212 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5213 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5214 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5215 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5216 Define.
5217 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5218 (IP_AGENT_EXPORT_VAR_DECL): Define.
5219 (tracing): Declare.
5220 (gdb_agent_get_raw_reg): Declare.
5221
5222 2015-02-27 Tom Tromey <tromey@redhat.com>
5223 Pedro Alves <palves@redhat.com>
5224
5225 Rename symbols whose names are reserved C++ keywords throughout.
5226
5227 2015-02-27 Pedro Alves <palves@redhat.com>
5228
5229 * Makefile.in (COMPILER): New, get it from autoconf.
5230 (CXX): Get from autoconf instead.
5231 (COMPILE.pre): Use COMPILER.
5232 (CC-LD): Rename to ...
5233 (CC_LD): ... this. Use COMPILER.
5234 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5235 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5236 * acinclude.m4: Include build-with-cxx.m4.
5237 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5238 Disable -Werror by default if building in C++ mode.
5239 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5240 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5241 the C++ compiler. Save/restore CXXFLAGS too.
5242 * configure: Regenerate.
5243
5244 2015-02-27 Pedro Alves <palves@redhat.com>
5245
5246 * acinclude.m4: Include libiberty.m4.
5247 * configure.ac: Call libiberty_INIT.
5248 * config.in, configure: Regenerate.
5249
5250 2015-02-26 Pedro Alves <palves@redhat.com>
5251
5252 * linux-low.c (linux_wait_1): When incrementing the PC past a
5253 program breakpoint always use the_low_target.breakpoint_len as
5254 increment, rather than the maximum between that and
5255 the_low_target.decr_pc_after_break.
5256
5257 2015-02-23 Pedro Alves <palves@redhat.com>
5258
5259 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5260 thread was doing a step-over; always adjust the PC if
5261 we stepped over a permanent breakpoint.
5262 (linux_wait_1): If we stepped over breakpoint that was on top of a
5263 permanent breakpoint, manually advance the PC past it.
5264
5265 2015-02-23 Pedro Alves <palves@redhat.com>
5266
5267 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5268 modes.
5269 (x86_fill_gregset, x86_store_gregset): Use it when handling
5270 $orig_eax.
5271
5272 2015-02-20 Pedro Alves <palves@redhat.com>
5273
5274 * thread-db.c: Include "nat/linux-procfs.h".
5275 (thread_db_init): Skip listing new threads if the kernel supports
5276 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5277
5278 2015-02-20 Pedro Alves <palves@redhat.com>
5279
5280 * linux-low.c (status_pending_p_callback): Use ptid_match.
5281
5282 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5283
5284 PR breakpoints/16812
5285 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5286 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5287 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5288
5289 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5290
5291 PR breakpoints/15956
5292 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5293
5294 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5295
5296 * linux-low.c (linux_low_btrace_conf): Print size.
5297 * server.c (handle_btrace_conf_general_set): New.
5298 (hanle_general_set): Call handle_btrace_conf_general_set.
5299 (handle_query): Report Qbtrace-conf:bts:size as supported.
5300
5301 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5302
5303 * linux-low.c (linux_low_enable_btrace): Update parameters.
5304 (linux_low_btrace_conf): New.
5305 (linux_target_ops)<to_btrace_conf>: Initialize.
5306 * server.c (current_btrace_conf): New.
5307 (handle_btrace_enable): Rename to ...
5308 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5309 to target_enable_btrace. Update comment. Update users.
5310 (handle_qxfer_btrace_conf): New.
5311 (qxfer_packets): Add btrace-conf entry.
5312 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5313 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5314 (target_ops)<read_btrace_conf>: New.
5315 (target_enable_btrace): Update parameters.
5316 (target_read_btrace_conf): New.
5317
5318 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5319
5320 * server.c (handle_btrace_general_set): Remove call to
5321 target_supports_btrace.
5322 (supported_btrace_packets): New.
5323 (handle_query): Call supported_btrace_packets.
5324 * target.h: include btrace-common.h.
5325 (btrace_target_info): Removed.
5326 (supports_btrace, target_supports_btrace): Update parameters.
5327
5328 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5329
5330 * Makefile.in (SFILES): Add common/btrace-common.c.
5331 (OBS): Add common/btrace-common.o.
5332 (btrace-common.o): Add build rules.
5333 * linux-low: Include btrace-common.h.
5334 (linux_low_read_btrace): Use struct btrace_data. Call
5335 btrace_data_init and btrace_data_fini.
5336
5337 2015-02-06 Pedro Alves <palves@redhat.com>
5338
5339 * thread-db.c (find_new_threads_callback): Add debug output.
5340
5341 2015-02-04 Pedro Alves <palves@redhat.com>
5342
5343 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5344 (resume_stopped_resumed_lwps): New function.
5345 (linux_wait_for_event_filtered): Use it.
5346
5347 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5348
5349 * Makefile.in (SFILES): Add linux-personality.c.
5350 (linux-personality.o): New rule.
5351 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5352 list of objects to be built.
5353 * linux-low.c: Include nat/linux-personality.h.
5354 (linux_create_inferior): Remove code to disable address space
5355 randomization (moved to ../nat/linux-personality.c). Create
5356 cleanup to disable address space randomization.
5357
5358 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5359
5360 * Makefile.in (posix-strerror.o): New rule.
5361 (mingw-strerror.o): Likewise.
5362 * configure: Regenerated.
5363 * configure.ac: Source file ../common/common.host. Initialize new
5364 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5365
5366 2015-01-14 Yao Qi <yao@codesourcery.com>
5367
5368 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5369 (ppc-linux.o): New rule.
5370 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5371 * configure.ac: AC_CHECK_FUNCS(getauxval).
5372 * config.in: Re-generated.
5373 * configure: Re-generated.
5374 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5375 ppc64_64bit_inferior_p
5376
5377 2015-01-14 Yao Qi <yao@codesourcery.com>
5378
5379 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5380 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5381 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5382 (PT_ORIG_R3, PT_TRAP): Likewise.
5383 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5384 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5385 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5386
5387 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5388
5389 * i387-fp.c (i387_cache_to_xsave): In look over
5390 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5391 zmmh_low_space field by use of zmmh_high_space.
5392
5393 2015-01-09 Pedro Alves <palves@redhat.com>
5394
5395 * linux-low.c (step_over_bkpt): Move higher up in the file.
5396 (handle_extended_wait): Don't store the stop_pc here.
5397 (get_stop_pc): Adjust comments and rename to ...
5398 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5399 stopped for a software breakpoint or hardware breakpoint.
5400 (thread_still_has_status_pending_p): New function.
5401 (status_pending_p_callback): Use
5402 thread_still_has_status_pending_p. If the event is no longer
5403 interesting, resume the LWP.
5404 (handle_tracepoints): Add assert.
5405 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5406 (wstatus_maybe_breakpoint): New function.
5407 (cancel_breakpoint): Delete function.
5408 (check_stopped_by_watchpoint): New function, factored out from
5409 linux_low_filter_event.
5410 (lp_status_maybe_breakpoint): Delete function.
5411 (linux_low_filter_event): Remove filter_ptid argument.
5412 Leave thread group exits pending here. Store the LWP's stop PC.
5413 Always leave events pending.
5414 (linux_wait_for_event_filtered): Pull all events out of the
5415 kernel, and leave them all pending.
5416 (count_events_callback, select_event_lwp_callback): Consider all
5417 events.
5418 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5419 (select_event_lwp): Only give preference to the stepping LWP in
5420 all-stop mode. Adjust comments.
5421 (ignore_event): New function.
5422 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5423 references to cancel_breakpoints. Adjust to renames. Also give
5424 equal priority to all LWPs that have had events in non-stop mode.
5425 If reporting a software breakpoint event, unadjust the LWP's PC.
5426 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5427 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5428 Adjust.
5429 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5430 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5431 (linux_stopped_by_watchpoint): Adjust.
5432 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5433 * linux-low.h (enum lwp_stop_reason): New.
5434 (struct lwp_info) <stop_pc>: Adjust comment.
5435 <stopped_by_watchpoint>: Delete field.
5436 <stop_reason>: New field.
5437 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5438 * mem-break.c (software_breakpoint_inserted_here)
5439 (hardware_breakpoint_inserted_here): New function.
5440 * mem-break.h (software_breakpoint_inserted_here)
5441 (hardware_breakpoint_inserted_here): Declare.
5442 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5443 (cancel_breakpoints): Delete.
5444 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5445 (upload_fast_traceframes): Remove references to
5446 cancel_breakpoints.
5447
5448 2015-01-09 Pedro Alves <palves@redhat.com>
5449
5450 * thread-db.c (find_new_threads_callback): Ignore thread if the
5451 kernel thread ID is -1.
5452
5453 2015-01-09 Pedro Alves <palves@redhat.com>
5454
5455 * linux-low.c (linux_attach_fail_reason_string): Move to
5456 nat/linux-ptrace.c, and rename.
5457 (linux_attach_lwp): Update comment.
5458 (attach_proc_task_lwp_callback): New function.
5459 (linux_attach): Adjust to rename and use
5460 linux_proc_attach_tgid_threads.
5461 (linux_attach_fail_reason_string): Delete declaration.
5462
5463 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5464
5465 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5466 * server.c (gdbserver_version): Likewise.
5467
5468 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5469
5470 * remote-utils.c: Include ctype.h.
5471 (input_interrupt): Explicitly handle the case when the char
5472 received is the NUL byte. Improve the printing of non-ASCII
5473 characters.
5474
5475 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5476
5477 * linux-low.c (linux_low_filter_event): Update call to
5478 linux_enable_event_reporting following the addition of
5479 a new parameter to that function.
5480
5481 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5482
5483 PR server/17457
5484 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5485 (AARCH64_FPCR_REGNO): Likewise.
5486 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5487 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5488 (aarch64_store_fpregset): Likewise.
5489
5490 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5491
5492 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5493 Remove FIXME comment about assumption about N.
5494
5495 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5496
5497 * configure.ac: If large-file support is disabled in GDBserver,
5498 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5499 * configure: Regenerate.
5500
5501 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5502
5503 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5504 warning upon ENODATA from ptrace.
5505 * linux-s390-low.c (s390_store_tdb): New.
5506 (s390_regsets): Add regset for NT_S390_TDB.
5507
5508 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5509
5510 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5511 without a fill_function.
5512 * linux-s390-low.c (s390_fill_last_break): Remove.
5513 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5514 (s390_arch_setup): Use regset's size instead of fill_function for
5515 loop end condition.
5516
5517 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5518
5519 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5520 the regset's store function when ptrace returned an error.
5521 * regcache.c (get_thread_regcache): Invalidate register cache
5522 before fetching inferior's registers.
5523
5524 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5525
5526 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5527 while-loop as for-loop.
5528 (regsets_store_inferior_registers): Likewise.
5529
5530 2014-11-28 Yao Qi <yao@codesourcery.com>
5531
5532 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5533 * config.in, configure: Re-generate.
5534 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5535 is defined.
5536
5537 2014-11-21 Yao Qi <yao@codesourcery.com>
5538
5539 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5540 (AC_CHECK_HEADERS): Remove malloc.h.
5541 * configure: Re-generated.
5542 * config.in: Re-generated.
5543 * server.h: Don't include alloca.h and malloc.h.
5544 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5545 Don't include malloc.h.
5546
5547 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5548
5549 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5550 corresponding ERRNO check in same block.
5551
5552 2014-11-12 Pedro Alves <palves@redhat.com>
5553
5554 * server.c (cont_thread): Update comment.
5555 (start_inferior, attach_inferior): No longer clear cont_thread.
5556 (handle_v_cont): No longer set cont_thread.
5557 (captured_main): Clear cont_thread each time a GDB connects.
5558
5559 2014-11-12 Pedro Alves <palves@redhat.com>
5560
5561 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5562 thread, and don't resume all threads if the Hc thread has exited.
5563
5564 2014-11-12 Pedro Alves <palves@redhat.com>
5565
5566 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5567 the process group instead of to a specific LWP.
5568
5569 2014-10-15 Pedro Alves <palves@redhat.com>
5570
5571 PR server/17487
5572 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5573 parameter.
5574 (arm_set_thread_context): Delete.
5575 (the_low_target): Adjust.
5576 * win32-i386-low.c (debug_registers_changed)
5577 (debug_registers_used): Delete.
5578 (update_debug_registers_callback): New function.
5579 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5580 needing to update their debug registers.
5581 (win32_get_current_dr): New function.
5582 (x86_dr_low_get_addr, x86_dr_low_get_control)
5583 (x86_dr_low_get_status): Fetch the debug register from the thread
5584 record's context.
5585 (i386_initial_stuff): Adjust.
5586 (i386_get_thread_context): Remove current_event parameter. Don't
5587 clear debug_registers_changed nor copy DR values to
5588 debug_reg_state.
5589 (i386_set_thread_context): Delete.
5590 (i386_prepare_to_resume): New function.
5591 (i386_thread_added): Mark the thread as needing to update irs
5592 debug registers.
5593 (the_low_target): Remove i386_set_thread_context and install
5594 i386_prepare_to_resume.
5595 * win32-low.c (win32_get_thread_context): Adjust.
5596 (win32_set_thread_context): Use SetThreadContext
5597 directly.
5598 (win32_prepare_to_resume): New function.
5599 (win32_require_context): New function, factored out from ...
5600 (thread_rec): ... this.
5601 (continue_one_thread): Call win32_prepare_to_resume on each thread
5602 we're about to continue.
5603 (win32_resume): Call win32_prepare_to_resume on the event thread.
5604 * win32-low.h (struct win32_thread_info)
5605 <debug_registers_changed>: New field.
5606 (struct win32_target_ops): Change prototype of set_thread_context,
5607 delete set_thread_context and add prepare_to_resume.
5608 (win32_require_context): New declaration.
5609
5610 2014-10-08 Gary Benson <gbenson@redhat.com>
5611
5612 * server.h: Do not include common-exceptions.h.
5613
5614 2014-10-08 Gary Benson <gbenson@redhat.com>
5615
5616 * server.h: Do not include cleanups.h.
5617
5618 2014-09-30 James Hogan <james.hogan@imgtec.com>
5619
5620 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5621 mips64-dsp-linux.c.
5622
5623 2014-09-23 Yao Qi <yao@codesourcery.com>
5624
5625 * linux-low.c (lp_status_maybe_breakpoint): New function.
5626 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5627 (count_events_callback): Likewise.
5628 (select_event_lwp_callback): Likewise.
5629 (cancel_breakpoints_callback): Likewise.
5630
5631 2014-09-19 Don Breazeal <donb@codesourcery.com>
5632
5633 * linux-low.c (handle_extended_wait): Call
5634 linux_ptrace_get_extended_event.
5635 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5636 linux_is_extended_waitstatus.
5637
5638 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5639
5640 * Makefile.in (CPPFLAGS): Define.
5641 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5642 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5643
5644 2014-09-16 Gary Benson <gbenson@redhat.com>
5645
5646 * inferiors.h (current_inferior): Renamed as...
5647 (current_thread): New variable. All uses updated.
5648 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5649 (maybe_move_out_of_jump_pad): Likewise.
5650 (cancel_breakpoint): Likewise.
5651 (linux_low_filter_event): Likewise.
5652 (wait_for_sigstop): Likewise.
5653 (linux_resume_one_lwp): Likewise.
5654 (need_step_over_p): Likewise.
5655 (start_step_over): Likewise.
5656 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5657 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5658 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5659 and save_inferior as saved_thread.
5660 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5661 saved_thread.
5662 (regcache_invalidate_thread): Likewise.
5663 * remote-utils.c (prepare_resume_reply): Likewise.
5664 * thread-db.c (thread_db_get_tls_address): Likewise.
5665 (disable_thread_event_reporting): Likewise.
5666 (remove_thread_event_breakpoints): Likewise.
5667 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5668 as saved_thread.
5669 * target.h (set_desired_inferior): Renamed as...
5670 (set_desired_thread): New declaration. All uses updated.
5671 * server.c (myresume): Updated comment to reference thread instead
5672 of inferior.
5673 (handle_serial_event): Likewise.
5674 (handle_target_event): Likewise.
5675
5676 2014-09-12 Tom Tromey <tromey@redhat.com>
5677 Gary Benson <gbenson@redhat.com>
5678
5679 * regcache.h: Include common-regcache.h.
5680 (regcache_read_pc): Don't declare.
5681 * regcache.c (get_thread_regcache_for_ptid): New function.
5682
5683 2014-09-11 Tom Tromey <tromey@redhat.com>
5684 Gary Benson <gbenson@redhat.com>
5685
5686 * symbol.c: New file.
5687 * Makefile.in (SFILES): Add symbol.c.
5688 (OBS): Add symbol.o.
5689
5690 2014-09-11 Gary Benson <gbenson@redhat.com>
5691
5692 * target.c (target_stop_ptid, target_continue_ptid): New
5693 functions.
5694
5695 2014-09-11 Tom Tromey <tromey@redhat.com>
5696 Gary Benson <gbenson@redhat.com>
5697
5698 * target.h: Include target/target.h.
5699 * target.c (target_read_memory, target_read_uint32)
5700 (target_write_memory): New functions.
5701
5702 2014-09-11 Gary Benson <gbenson@redhat.com>
5703
5704 * server.h (debug_hw_points): Don't declare.
5705 * server.c (debug_hw_points): Don't define. Replace all uses
5706 with show_debug_regs.
5707 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5708 all uses with show_debug_regs.
5709
5710 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5711
5712 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5713 endianness into account.
5714 (ppc_supply_ptrace_register): Likewise.
5715
5716 2014-09-03 James Hogan <james.hogan@imgtec.com>
5717
5718 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5719 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5720
5721 2014-09-03 Gary Benson <gbenson@redhat.com>
5722
5723 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5724 ALL_DEBUG_ADDRESS_REGISTERS.
5725
5726 2014-09-02 Gary Benson <gbenson@redhat.com>
5727
5728 * i386-low.h: Renamed as...
5729 * x86-low.h: New file. All type, function and variable name
5730 prefixes changed from "i386_" to "x86_". All references updated.
5731 * i386-low.c: Renamed as...
5732 * x86-low.c: New file. All type, function and variable name
5733 prefixes changed from "i386_" to "x86_". All references updated.
5734
5735 2014-09-02 Gary Benson <gbenson@redhat.com>
5736
5737 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5738 (x86_linux_new_thread): Likewise.
5739
5740 2014-08-29 Gary Benson <gbenson@redhat.com>
5741
5742 * server.h (setjmp.h): Do not include.
5743 (toplevel): Do not declare.
5744 (common-exceptions.h): Include.
5745 (cleanups.h): Likewise.
5746 * server.c (toplevel): Do not define.
5747 (exit_code): New static global.
5748 (detach_or_kill_for_exit_cleanup): New function.
5749 (main): New function. Original main renamed to...
5750 (captured_main): New function.
5751 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5752
5753 2014-08-29 Gary Benson <gbenson@redhat.com>
5754
5755 * Makefile.in (SFILES): Add common/common-exceptions.c.
5756 (OBS): Add common-exceptions.o.
5757 (common-exceptions.o): New rule.
5758 * utils.c (prepare_to_throw_exception): New function.
5759
5760 2014-08-29 Gary Benson <gbenson@redhat.com>
5761
5762 * config.in: Regenerate.
5763 * configure: Likewise.
5764
5765 2014-08-29 Gary Benson <gbenson@redhat.com>
5766
5767 * Makefile.in (SFILES): Add common/cleanups.c.
5768 (OBS): cleanups.o.
5769 (cleanups.o): New rule.
5770
5771 2014-08-29 Gary Benson <gbenson@redhat.com>
5772
5773 * utils.c (internal_vwarning): New function.
5774
5775 2014-08-28 Gary Benson <gbenson@redhat.com>
5776
5777 * utils.h (fatal): Remove declaration.
5778 * utils.c (fatal): Remove function.
5779
5780 2014-08-28 Gary Benson <gbenson@redhat.com>
5781
5782 * tracepoint.c (gdb_agent_init): Replace fatal with
5783 perror_with_name.
5784 (initialize_tracepoint): Likewise.
5785
5786 2014-08-28 Gary Benson <gbenson@redhat.com>
5787
5788 * remote-utils.c (remote_prepare): Replace fatal with error.
5789
5790 2014-08-28 Gary Benson <gbenson@redhat.com>
5791
5792 * linux-low.c (linux_async): Replace fatal with warning.
5793 Tidy up and return.
5794 (linux_start_non_stop): Return -1 if linux_async failed.
5795
5796 2014-08-28 Gary Benson <gbenson@redhat.com>
5797
5798 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5799 gdb_assert.
5800 (i386_dr_low_get_addr): Remove vague comment.
5801 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5802 gdb_assert.
5803
5804 2014-08-28 Gary Benson <gbenson@redhat.com>
5805
5806 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5807 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5808 internal_error.
5809 (linux_resume_one_lwp): Likewise.
5810 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5811 gdb_assert.
5812 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5813 with internal_error.
5814 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5815 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5816 (find_register_by_name): Replace fatal with internal_error.
5817 (find_regno): Likewise.
5818 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5819 * thread-db.c (thread_db_create_event): Likewise.
5820 (thread_db_load_search): Likewise.
5821 (try_thread_db_load_1): Likewise.
5822 * tracepoint.c (get_jump_space_head): Replace fatal with
5823 internal_error.
5824 (claim_trampoline_space): Likewise.
5825 (have_fast_tracepoint_trampoline_buffer): Likewise.
5826 (cmd_qtstart): Likewise.
5827 (stop_tracing): Likewise.
5828 (fast_tracepoint_collecting): Likewise.
5829 (target_malloc): Likewise.
5830 (download_tracepoint): Likewise.
5831 (download_trace_state_variables): Replace check with gdb_assert.
5832 (upload_fast_traceframes): Replace fatal with internal_error.
5833
5834 2014-08-19 Tom Tromey <tromey@redhat.com>
5835 Gary Benson <gbenson@redhat.com>
5836
5837 * Makefile.in (SFILES): Add common/common-debug.c.
5838 (OBS): Add common-debug.o.
5839 (common-debug.o): New rule.
5840 * debug.h (debug_printf): Don't declare.
5841 * debug.c (debug_printf): Renamed and rewritten as...
5842 (debug_vprintf): New function.
5843
5844 2014-08-19 Gary Benson <gbenson@redhat.com>
5845
5846 * utils.h: Do not include print-utils.h.
5847
5848 2014-08-19 Tom Tromey <tromey@redhat.com>
5849 Gary Benson <gbenson@redhat.com>
5850
5851 * server.h: Add static assertion.
5852 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5853
5854 2014-08-19 Tom Tromey <tromey@redhat.com>
5855 Gary Benson <gbenson@redhat.com>
5856
5857 * Makefile.in (SFILES): Add common/errors.c.
5858 (OBS): Add errors.o.
5859 (IPA_OBS): Add errors-ipa.o.
5860 (errors.o): New rule.
5861 (errors-ipa.o): Likewise.
5862 * utils.h (perror_with_name, error, warning): Don't declare.
5863 * utils.c (warning): Renamed and rewritten as...
5864 (vwarning): New function.
5865 (error): Renamed and rewritten as...
5866 (verror): New function.
5867 (internal_error): Renamed and rewritten as...
5868 (internal_verror): New function.
5869
5870 2014-08-07 Gary Benson <gbenson@redhat.com>
5871
5872 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5873 * configure: Regenerate.
5874 * config.in: Likewise.
5875 * server.h: Do not include errno.h.
5876 * event-loop.c: Likewise.
5877 * hostio-errno.c: Likewise.
5878 * linux-low.c: Likewise.
5879 * remote-utils.c: Likewise.
5880 * spu-low.c: Likewise.
5881 * utils.c: Likewise.
5882 * gdbreplay.c: Unconditionally include errno.h.
5883
5884 2014-08-07 Gary Benson <gbenson@redhat.com>
5885
5886 * server.h: Do not include string.h.
5887 * event-loop.c: Likewise.
5888 * linux-low.c: Likewise.
5889 * regcache.c: Likewise.
5890 * remote-utils.c: Likewise.
5891 * spu-low.c: Likewise.
5892 * utils.c: Likewise.
5893
5894 2014-08-07 Gary Benson <gbenson@redhat.com>
5895
5896 * server.h: Do not include gdb_assert.h.
5897
5898 2014-08-07 Gary Benson <gbenson@redhat.com>
5899
5900 * server.h: Do not include common-utils.h.
5901
5902 2014-08-07 Gary Benson <gbenson@redhat.com>
5903
5904 * server.h: Do not include ptid.h.
5905 * notif.h: Likewise.
5906
5907 2014-08-07 Gary Benson <gbenson@redhat.com>
5908
5909 * server.h: Do not include gdb_locale.h.
5910
5911 2014-08-07 Gary Benson <gbenson@redhat.com>
5912
5913 * server.h: Do not include gdb/signals.h.
5914 * win32-low.c: Likewise.
5915
5916 2014-08-07 Gary Benson <gbenson@redhat.com>
5917
5918 * server.h: Do not include pathmax.h.
5919
5920 2014-08-07 Gary Benson <gbenson@redhat.com>
5921
5922 * server.h: Do not include libiberty.h.
5923 * linux-bfin-low.c: Likewise.
5924
5925 2014-08-07 Gary Benson <gbenson@redhat.com>
5926
5927 * server.h: Do not include ansidecl.h.
5928
5929 2014-08-07 Gary Benson <gbenson@redhat.com>
5930
5931 * linux-x86-low.c: Do not include stddef.h.
5932 * lynx-ppc-low.c: Likewise.
5933 * tracepoint.c: Likewise.
5934
5935 2014-08-07 Gary Benson <gbenson@redhat.com>
5936
5937 * server.h: Do not include stdarg.h.
5938 * nto-low.c: Likewise.
5939
5940 2014-08-07 Gary Benson <gbenson@redhat.com>
5941
5942 * server.h: Do not include stdlib.h.
5943 * inferiors.c: Likewise.
5944 * linux-low.c: Likewise.
5945 * regcache.c: Likewise.
5946 * spu-low.c: Likewise.
5947 * tracepoint.c: Likewise.
5948 * utils.c: Likewise.
5949
5950 2014-08-07 Gary Benson <gbenson@redhat.com>
5951
5952 * server.h: Do not include stdio.h.
5953 * linux-low.c: Likewise.
5954 * remote-utils.c: Likewise.
5955 * spu-low.c: Likewise.
5956 * utils.c: Likewise.
5957 * wincecompat.c: Likewise.
5958
5959 2014-08-06 Gary Benson <gbenson@redhat.com>
5960
5961 * regcache.c (init_register_cache): Move conditionals inside if.
5962
5963 2014-08-06 Gary Benson <gbenson@redhat.com>
5964
5965 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5966
5967 2014-07-31 Gary Benson <gbenson@redhat.com>
5968
5969 * ax.h: Do not include server.h.
5970 * gdbthread.h: Likewise.
5971 * lynx-low.h: Likewise.
5972 * notif.h: Likewise.
5973
5974 2014-07-30 Gary Benson <gbenson@redhat.com>
5975
5976 * server.h: Include common-defs.h.
5977 Do not include config.h or build-gnulib-gdbserver/config.h.
5978
5979 2014-07-30 Gary Benson <gbenson@redhat.com>
5980
5981 * hostio-errno.c: Move server.h to top of includes list.
5982 * inferiors.c: Likewise.
5983 * linux-x86-low.c: Likewise.
5984 * notif.c: Include server.h.
5985
5986 2014-07-24 Tom Tromey <tromey@redhat.com>
5987 Gary Benson <gbenson@redhat.com>
5988
5989 * server.h (CORE_ADDR): Now unsigned.
5990
5991 2014-07-16 Pedro Alves <palves@redhat.com>
5992
5993 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5994
5995 2014-07-15 Pedro Alves <palves@redhat.com>
5996
5997 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5998 copy.
5999
6000 2014-07-11 Pedro Alves <palves@redhat.com>
6001
6002 * linux-low.c (kill_wait_lwp): New function, based on
6003 kill_one_lwp_callback, but use my_waitpid directly.
6004 (kill_one_lwp_callback, linux_kill): Use it.
6005
6006 2014-06-23 Pedro Alves <palves@redhat.com>
6007
6008 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6009 before setting DR0..DR3.
6010
6011 2014-06-20 Gary Benson <gbenson@redhat.com>
6012
6013 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6014 * configure: Regenerated.
6015 * config.in: Likewise.
6016
6017 2014-06-20 Gary Benson <gbenson@redhat.com>
6018
6019 * Makefile.in (SFILES): Update locations for files moved
6020 from common to nat.
6021 (object file files): Reordered.
6022
6023 2014-06-20 Gary Benson <gbenson@redhat.com>
6024
6025 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6026 (i386_dr_low_set_addr): Likewise.
6027 (i386_dr_low_get_addr): Likewise.
6028 (i386_dr_low_can_set_control): Likewise.
6029 (i386_dr_low_set_control): Likewise.
6030 (i386_dr_low_get_control): Likewise.
6031 (i386_dr_low_get_status): Likewise.
6032 (i386_get_debug_register_length): Likewise.
6033 * linux-x86-low.c (i386_dr_low_set_addr):
6034 Changed signature. Made static.
6035 (i386_dr_low_get_addr): Likewise.
6036 (i386_dr_low_set_control): Likewise.
6037 (i386_dr_low_get_control): Likewise.
6038 (i386_dr_low_get_status): Likewise.
6039 (i386_dr_low): New global variable.
6040 * win32-i386-low.c (i386_dr_low_set_addr):
6041 Changed signature. Made static.
6042 (i386_dr_low_get_addr): Likewise.
6043 (i386_dr_low_set_control): Likewise.
6044 (i386_dr_low_get_control): Likewise.
6045 (i386_dr_low_get_status): Likewise.
6046 (i386_dr_low): New global variable.
6047
6048 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6049
6050 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6051 * Makefile.in (AR, AR_FLAGS): Define.
6052 * configure: Regenerate.
6053
6054 2014-06-19 Gary Benson <gbenson@redhat.com>
6055
6056 * Makefile.in (i386-dregs.o): New rule.
6057 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6058 * i386-low.c (target.h): Remove include.
6059 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6060 (DR_CONTROL_SHIFT): Likewise.
6061 (DR_CONTROL_SIZE): Likewise.
6062 (DR_RW_EXECUTE): Likewise.
6063 (DR_RW_WRITE): Likewise.
6064 (DR_RW_READ): Likewise.
6065 (DR_RW_IORW): Likewise.
6066 (DR_LEN_1): Likewise.
6067 (DR_LEN_2): Likewise.
6068 (DR_LEN_4): Likewise.
6069 (DR_LEN_8): Likewise.
6070 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6071 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6072 (DR_ENABLE_SIZE): Likewise.
6073 (DR_LOCAL_SLOWDOWN): Likewise.
6074 (DR_GLOBAL_SLOWDOWN): Likewise.
6075 (DR_CONTROL_RESERVED): Likewise.
6076 (I386_DR_CONTROL_MASK): Likewise.
6077 (I386_DR_VACANT): Likewise.
6078 (I386_DR_LOCAL_ENABLE): Likewise.
6079 (I386_DR_GLOBAL_ENABLE): Likewise.
6080 (I386_DR_DISABLE): Likewise.
6081 (I386_DR_SET_RW_LEN): Likewise.
6082 (I386_DR_GET_RW_LEN): Likewise.
6083 (I386_DR_WATCH_HIT): Likewise.
6084 (i386_wp_op_t): Likewise.
6085 (i386_show_dr): Likewise.
6086 (i386_length_and_rw_bits): Likewise.
6087 (i386_insert_aligned_watchpoint): Likewise.
6088 (i386_remove_aligned_watchpoint): Likewise.
6089 (i386_handle_nonaligned_watchpoint): Likewise.
6090 i386_update_inferior_debug_regs(): Likewise.
6091 (i386_dr_insert_watchpoint): Likewise.
6092 (i386_dr_remove_watchpoint): Likewise.
6093 (i386_dr_region_ok_for_watchpoint): Likewise.
6094 (i386_dr_stopped_data_address): Likewise.
6095 (i386_dr_stopped_by_watchpoint): Likewise.
6096
6097 2014-06-19 Gary Benson <gbenson@redhat.com>
6098
6099 * i386-low.c (i386_dr_show): Renamed to
6100 i386_show_dr and made static. All uses updated.
6101 (i386_dr_length_and_rw_bits): Renamed to
6102 i386_length_and_rw_bits and made static.
6103 All uses updated.
6104 (i386_dr_insert_aligned_watchpoint): Renamed to
6105 i386_insert_aligned_watchpoint and made static.
6106 All uses updated.
6107 (i386_dr_remove_aligned_watchpoint): Renamed to
6108 i386_remove_aligned_watchpoint and made static.
6109 All uses updated.
6110 (i386_dr_update_inferior_debug_regs): Renamed to
6111 i386_update_inferior_debug_regs and made static.
6112 All uses updated.
6113
6114 2014-06-18 Gary Benson <gbenson@redhat.com>
6115
6116 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6117 (i386_dr_low_can_set_control): Likewise.
6118 (i386_get_debug_register_length): Likewise.
6119 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6120 (i386_dr_low_can_set_control): Likewise.
6121 (i386_get_debug_register_length): Likewise.
6122
6123 2014-06-17 Gary Benson <gbenson@redhat.com>
6124
6125 * i386-low.h (i386-dregs.h): New include.
6126 (DR_FIRSTADDR): Now in i386-dregs.h.
6127 (DR_LASTADDR): Likewise.
6128 (DR_NADDR): Likewise.
6129 (DR_STATUS): Likewise.
6130 (DR_CONTROL): Likewise.
6131 (i386_debug_reg_state): Likewise.
6132 (i386_dr_insert_watchpoint): Likewise.
6133 (i386_dr_remove_watchpoint): Likewise.
6134 (i386_dr_region_ok_for_watchpoint): Likewise.
6135 (i386_dr_stopped_data_address): Likewise.
6136 (i386_dr_stopped_by_watchpoint): Likewise.
6137 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6138
6139 2014-06-18 Gary Benson <gbenson@redhat.com>
6140
6141 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6142 i386_dr_insert_watchpoint.
6143 (i386_low_remove_watchpoint): Renamed to
6144 i386_dr_remove_watchpoint.
6145 (i386_low_region_ok_for_watchpoint): Renamed to
6146 i386_dr_region_ok_for_watchpoint.
6147 (i386_low_stopped_data_address): Renamed to
6148 i386_dr_stopped_data_address.
6149 (i386_low_stopped_by_watchpoint): Renamed to
6150 i386_dr_stopped_by_watchpoint.
6151 * i386-low.c (i386_show_dr): Renamed to
6152 i386_dr_show and made nonstatic. All uses updated.
6153 (i386_length_and_rw_bits): Renamed to
6154 i386_dr_length_and_rw_bits and made nonstatic.
6155 All uses updated.
6156 (i386_insert_aligned_watchpoint): Renamed to
6157 i386_dr_insert_aligned_watchpoint and made nonstatic.
6158 All uses updated.
6159 (i386_remove_aligned_watchpoint): Renamed to
6160 i386_dr_remove_aligned_watchpoint and made nonstatic.
6161 All uses updated.
6162 (i386_update_inferior_debug_regs): Renamed to
6163 i386_dr_update_inferior_debug_regs and made nonstatic.
6164 All uses updated.
6165 (i386_low_insert_watchpoint): Renamed to
6166 i386_dr_insert_watchpoint. All uses updated.
6167 (i386_low_remove_watchpoint): Renamed to
6168 i386_dr_remove_watchpoint. All uses updated.
6169 (i386_low_region_ok_for_watchpoint): Renamed to
6170 i386_dr_region_ok_for_watchpoint. All uses updated.
6171 (i386_low_stopped_data_address): Renamed to
6172 i386_dr_stopped_data_address. All uses updated.
6173 (i386_low_stopped_by_watchpoint): Renamed to
6174 i386_dr_stopped_by_watchpoint. All uses updated.
6175
6176 2014-06-18 Gary Benson <gbenson@redhat.com>
6177
6178 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6179 (i386_dr_low_can_set_control): Likewise.
6180 (i386_insert_aligned_watchpoint): New check.
6181
6182 2014-06-18 Gary Benson <gbenson@redhat.com>
6183
6184 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6185 Renamed to state.
6186
6187 2014-06-18 Gary Benson <gbenson@redhat.com>
6188
6189 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6190 instead of fatal and error.
6191 (i386_handle_nonaligned_watchpoint): Likewise.
6192
6193 2014-06-18 Gary Benson <gbenson@redhat.com>
6194
6195 * i386-low.c (i386_get_debug_register_length): New macro.
6196 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6197 (i386_show_dr): Use debug_printf instead of fprintf. Use
6198 phex to format values.
6199
6200 2014-06-18 Gary Benson <gbenson@redhat.com>
6201
6202 * i386-low.h: Comment changes.
6203 * i386-low.c: Likewise.
6204
6205 2014-06-18 Gary Benson <gbenson@redhat.com>
6206
6207 * i386-low.c: Whitespace changes.
6208
6209 2014-06-12 Tom Tromey <tromey@redhat.com>
6210
6211 * utils.c (freeargv): Remove.
6212
6213 2014-06-12 Tom Tromey <tromey@redhat.com>
6214
6215 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6216 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6217 (parse_debug_format_options): Likewise.
6218 (gdbserver_usage): Likewise.
6219 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6220 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6221 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6222 against libiberty.
6223 ($(LIBGNU)): Depend on libiberty.
6224 (all-lib): Recurse into all subdirs.
6225 (install-only): Invoke "install" target in subdirs.
6226 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6227 targets.
6228 * configure: Rebuild.
6229 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6230 for vasprintf, vsnprintf, or gettimeofday.
6231 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6232 srv_tgtobj.
6233
6234 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6235
6236 * development.sh: Delete.
6237 * Makefile.in (config.status): Adjust dependency on development.sh.
6238 * configure.ac: Adjust development.sh source call.
6239 * configure: Regenerate.
6240
6241 2014-06-02 Pedro Alves <palves@redhat.com>
6242
6243 * ax.c (gdb_free_agent_expr): New function.
6244 * ax.h (gdb_free_agent_expr): New declaration.
6245 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6246 list.
6247 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6248 static.
6249 (clear_breakpoint_conditions_and_commands): New function.
6250 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6251 (clear_breakpoint_conditions_and_commands): New declaration.
6252
6253 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6254
6255 * linux-aarch64-low.c (asm/ptrace.h): Include.
6256
6257 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6258
6259 Fix TLS access for -static -pthread.
6260 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6261 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6262 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6263
6264 2014-05-20 Pedro Alves <palves@redhat.com>
6265
6266 * linux-aarch64-low.c (aarch64_insert_point)
6267 (aarch64_remove_point): No longer check whether the type is
6268 supported here. Adjust to new interface.
6269 (the_low_target): Install aarch64_supports_z_point_type as
6270 supports_z_point_type method.
6271 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6272 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6273 instead of a Z packet char. Adjust.
6274 (arm_supports_z_point_type): New function.
6275 (arm_insert_point, arm_remove_point): Adjust to new interface.
6276 (the_low_target): Install arm_supports_z_point_type.
6277 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6278 (cris_insert_point, cris_remove_point): Adjust to new interface.
6279 Don't check whether the type is supported here.
6280 (the_low_target): Install cris_supports_z_point_type.
6281 * linux-low.c (linux_supports_z_point_type): New function.
6282 (linux_insert_point, linux_remove_point): Adjust to new interface.
6283 * linux-low.h (struct linux_target_ops) <insert_point,
6284 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6285 raw_breakpoint pointer parameter.
6286 <supports_z_point_type>: New method.
6287 * linux-mips-low.c (mips_supports_z_point_type): New function.
6288 (mips_insert_point, mips_remove_point): Adjust to new interface.
6289 Use mips_supports_z_point_type.
6290 (the_low_target): Install mips_supports_z_point_type.
6291 * linux-ppc-low.c (the_low_target): Install NULL as
6292 supports_z_point_type method.
6293 * linux-s390-low.c (the_low_target): Install NULL as
6294 supports_z_point_type method.
6295 * linux-sparc-low.c (the_low_target): Install NULL as
6296 supports_z_point_type method.
6297 * linux-x86-low.c (x86_supports_z_point_type): New function.
6298 (x86_insert_point): Adjust to new insert_point interface. Use
6299 insert_memory_breakpoint. Adjust to new
6300 i386_low_insert_watchpoint interface.
6301 (x86_remove_point): Adjust to remove_point interface. Use
6302 remove_memory_breakpoint. Adjust to new
6303 i386_low_remove_watchpoint interface.
6304 (the_low_target): Install x86_supports_z_point_type.
6305 * lynx-low.c (lynx_target_ops): Install NULL as
6306 supports_z_point_type callback.
6307 * nto-low.c (nto_supports_z_point_type): New.
6308 (nto_insert_point, nto_remove_point): Adjust to new interface.
6309 (nto_target_ops): Install nto_supports_z_point_type.
6310 * mem-break.c: Adjust intro comment.
6311 (struct raw_breakpoint) <raw_type, size>: New fields.
6312 <inserted>: Update comment.
6313 <shlib_disabled>: Delete field.
6314 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6315 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6316 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6317 (raw_bkpt_type_to_target_hw_bp_type): New function.
6318 (find_enabled_raw_code_breakpoint_at): New function.
6319 (find_raw_breakpoint_at): New type and size parameters. Use them.
6320 (insert_memory_breakpoint): New function, based off
6321 set_raw_breakpoint_at.
6322 (remove_memory_breakpoint): New function.
6323 (set_raw_breakpoint_at): Reimplement.
6324 (set_breakpoint): New, based on set_breakpoint_at.
6325 (set_breakpoint_at): Reimplement.
6326 (delete_raw_breakpoint): Go through the_target->remove_point
6327 instead of assuming memory breakpoints.
6328 (find_gdb_breakpoint_at): Delete.
6329 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6330 (find_gdb_breakpoint): New function.
6331 (set_gdb_breakpoint_at): Delete.
6332 (z_type_supported): New function.
6333 (set_gdb_breakpoint_1): New function, loosely based off
6334 set_gdb_breakpoint_at.
6335 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6336 (delete_gdb_breakpoint_at): Delete.
6337 (delete_gdb_breakpoint_1): New function, loosely based off
6338 delete_gdb_breakpoint_at.
6339 (delete_gdb_breakpoint): New function.
6340 (clear_gdb_breakpoint_conditions): Rename to ...
6341 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6342 breakpoint.
6343 (add_condition_to_breakpoint): Make static.
6344 (add_breakpoint_condition): Take a struct breakpoint pointer
6345 instead of an address. Adjust.
6346 (gdb_condition_true_at_breakpoint): Rename to ...
6347 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6348 z_type parameter.
6349 (gdb_condition_true_at_breakpoint): Reimplement.
6350 (add_breakpoint_commands): Take a struct breakpoint pointer
6351 instead of an address. Adjust.
6352 (gdb_no_commands_at_breakpoint): Rename to ...
6353 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6354 parameter. Return true if no breakpoint was found. Change debug
6355 output.
6356 (gdb_no_commands_at_breakpoint): Reimplement.
6357 (run_breakpoint_commands): Rename to ...
6358 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6359 and change return type to boolean.
6360 (run_breakpoint_commands): New function.
6361 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6362 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6363 breakpoint. Go through the_target->remove_point instead of
6364 assuming memory breakpoint.
6365 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6366 software and hardware breakpoints.
6367 (reinsert_raw_breakpoint): Go through the_target->insert_point
6368 instead of assuming memory breakpoint.
6369 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6370 software and hardware breakpoints.
6371 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6372 Check both software and hardware breakpoints.
6373 (validate_inserted_breakpoint): Assert the breakpoint is a
6374 software breakpoint. Set the inserted flag to -1 instead of
6375 setting shlib_disabled.
6376 (delete_disabled_breakpoints): Adjust.
6377 (validate_breakpoints): Only validate software breakpoints.
6378 Adjust to inserted flag change.
6379 (check_mem_read, check_mem_write): Skip breakpoint types other
6380 than software breakpoints. Adjust to inserted flag change.
6381 * mem-break.h (enum raw_bkpt_type): New enum.
6382 (raw_breakpoint, struct process_info): Forward declare.
6383 (Z_packet_to_target_hw_bp_type): Delete declaration.
6384 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6385 (set_gdb_breakpoint, delete_gdb_breakpoint)
6386 (clear_breakpoint_conditions): New declarations.
6387 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6388 (breakpoint_inserted_here): Update comment.
6389 (add_breakpoint_condition, add_breakpoint_commands): Replace
6390 address parameter with a breakpoint pointer parameter.
6391 (gdb_breakpoint_here): Update comment.
6392 (delete_gdb_breakpoint_at): Delete.
6393 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6394 * server.c (process_point_options): Take a struct breakpoint
6395 pointer instead of an address. Adjust.
6396 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6397 delete_gdb_breakpoint.
6398 * spu-low.c (spu_target_ops): Install NULL as
6399 supports_z_point_type method.
6400 * target.h: Include mem-break.h.
6401 (struct target_ops) <prepare_to_access_memory>: Update comment.
6402 <supports_z_point_type>: New field.
6403 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6404 instead of a char. Also take a raw breakpoint pointer.
6405 * win32-arm-low.c (the_low_target): Install NULL as
6406 supports_z_point_type.
6407 * win32-i386-low.c (i386_supports_z_point_type): New function.
6408 (i386_insert_point, i386_remove_point): Adjust to new interface.
6409 (the_low_target): Install i386_supports_z_point_type.
6410 * win32-low.c (win32_supports_z_point_type): New function.
6411 (win32_insert_point, win32_remove_point): Adjust to new interface.
6412 (win32_target_ops): Install win32_supports_z_point_type.
6413 * win32-low.h (struct win32_target_ops):
6414 <supports_z_point_type>: New method.
6415 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6416 instead of a char. Also take a raw breakpoint pointer.
6417
6418 2014-05-20 Pedro Alves <palves@redhat.com>
6419
6420 * mem-break.h: Include break-common.h.
6421 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6422 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6423 (Z_packet_to_target_hw_bp_type): New declaration.
6424 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6425 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6426 (Z_PACKET_ACCESS_WP): Delete macros.
6427 (Z_packet_to_hw_type): Delete function.
6428 * i386-low.h: Don't include break-common.h here.
6429 (Z_packet_to_hw_type): Delete declaration.
6430 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6431 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6432 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6433 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6434 * linux-aarch64-low.c: Don't include break-common.h here.
6435 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6436 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6437 (Z_packet_to_target_hw_bp_type): Delete function.
6438 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6439 function.
6440 (mips_insert_point, mips_remove_point): Use
6441 Z_packet_to_target_hw_bp_type.
6442
6443 2014-05-20 Pedro Alves <palves@redhat.com>
6444
6445 * linux-aarch64-low.c: Include break-common.h.
6446 (enum target_point_type): Delete.
6447 (Z_packet_to_point_type): Rename to ...
6448 (Z_packet_to_target_hw_bp_type): ... this, and return a
6449 target_hw_bp_type instead.
6450 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6451 instead of an enum target_point_type.
6452 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6453 breakpoint type.
6454 (aarch64_dr_state_insert_one_point)
6455 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6456 (aarch64_handle_aligned_watchpoint)
6457 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6458 Take an enum target_hw_bp_type instead of an enum
6459 target_point_type.
6460 (aarch64_supports_z_point_type): New function.
6461 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6462 use Z_packet_to_target_hw_bp_type.
6463
6464 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6465
6466 * configure.ac: Only use -Werror by default when DEVELOPMENT
6467 is true.
6468 * configure: Regenerate.
6469
6470 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6471
6472 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6473 * linux-x86-low.c (X86_64_USER_REGS): New.
6474 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6475
6476 2014-04-28 Yao Qi <yao@codesourcery.com>
6477
6478 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6479 name.
6480
6481 2014-04-25 Pedro Alves <palves@redhat.com>
6482
6483 PR server/16255
6484 * linux-low.c (linux_attach_fail_reason_string): New function.
6485 (linux_attach_lwp): Delete.
6486 (linux_attach_lwp_1): Rename to ...
6487 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6488 argument. Remove "initial" parameter. Return int instead of
6489 void. Don't error or warn here.
6490 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6491 failure to attach to the tgid. Call warning when failing to
6492 attach to an lwp.
6493 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6494 argument. Remove "initial" parameter. Return int instead of
6495 void. Don't error or warn here.
6496 (linux_attach_fail_reason_string): New declaration.
6497 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6498 interface change. Use linux_attach_fail_reason_string.
6499
6500 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6501 Walfred Tedeschi <walfred.tedeschi@intel.com>
6502
6503 * Makefile.in: Added rules to handle new files
6504 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6505 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6506 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6507 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6508 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6509 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6510 x32-avx512-linux.o.
6511 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6512 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6513 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6514 i386/x32-avx512.xml.
6515 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6516 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6517 i386/x32-avx512-linux.xml.
6518 * i387-fp.c (num_avx512_k_registers): New constant for number
6519 of K registers.
6520 (num_avx512_zmmh_low_registers): New constant for number of
6521 lower ZMM registers (0-15).
6522 (num_avx512_zmmh_high_registers): New constant for number of
6523 higher ZMM registers (16-31).
6524 (num_avx512_ymmh_registers): New contant for number of higher
6525 YMM registers (ymm16-31 added by avx521 on x86_64).
6526 (num_avx512_xmm_registers): New constant for number of higher
6527 XMM registers (xmm16-31 added by AVX512 on x86_64).
6528 (struct i387_xsave): Add space for AVX512 registers.
6529 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6530 Add code to handle AVX512 registers.
6531 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6532 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6533 prototypei from generated file.
6534 (tdesc_amd64_avx512_linux): Likewise.
6535 (init_registers_x32_avx512_linux): Likewise.
6536 (tdesc_x32_avx512_linux): Likewise.
6537 (init_registers_i386_avx512_linux): Likewise.
6538 (tdesc_i386_avx512_linux): Likewise.
6539 (x86_64_regmap): Add AVX512 registers.
6540 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6541 mask.
6542 (initialize_low_arch): Add code to initialize AVX512 registers.
6543
6544 2014-04-23 Pedro Alves <palves@redhat.com>
6545
6546 * mem-break.c (find_gdb_breakpoint_at): Make static.
6547 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6548
6549 2014-04-23 Pedro Alves <palves@redhat.com>
6550
6551 * i386-low.c: Don't include break-common.h here.
6552 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6553 prototype to take target_hw_bp_type as argument instead of a Z
6554 packet char.
6555 * i386-low.h: Include break-common.h here.
6556 (Z_packet_to_hw_type): Declare.
6557 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6558 prototypes.
6559 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6560 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6561 (x86_remove_point): Convert the packet number to a
6562 target_hw_bp_type before calling i386_low_remove_watchpoint.
6563 * win32-i386-low.c (i386_insert_point): Convert the packet number
6564 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6565 (i386_remove_point): Convert the packet number to a
6566 target_hw_bp_type before calling i386_low_remove_watchpoint.
6567
6568 2014-04-23 Pedro Alves <palves@redhat.com>
6569
6570 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6571
6572 2014-04-10 Pedro Alves <palves@redhat.com>
6573
6574 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6575 Check if the condition or command is NULL before checking if the
6576 breakpoint is known. On success, return true.
6577 * mem-break.h (add_breakpoint_condition): Document return.
6578 (add_breakpoint_commands): Add describing comment.
6579 * server.c (skip_to_semicolon): New function.
6580 (process_point_options): Use it.
6581
6582 2014-04-09 Pedro Alves <palves@redhat.com>
6583
6584 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6585 to lwpid_of.
6586
6587 2014-02-27 Pedro Alves <palves@redhat.com>
6588
6589 PR 12702
6590 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6591 macros.
6592 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6593 output.
6594 (last_thread_of_process_p): Take a PID argument instead of a
6595 thread pointer.
6596 (linux_wait_for_lwp): Delete.
6597 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6598 functions.
6599 (linux_low_filter_event): New function, party factored out from
6600 linux_wait_for_event.
6601 (linux_wait_for_event): Rename to ...
6602 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6603 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6604 sigsuspend. Check for zombie leaders.
6605 (linux_wait_for_event): Reimplement as wrapper around
6606 linux_wait_for_event_filtered.
6607 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6608 a normal or signal exit is seen, it's the whole process exiting.
6609 (wait_for_sigstop): No longer a for_each_inferior callback.
6610 Rewrite on top of linux_wait_for_event_filtered.
6611 (stop_all_lwps): Call wait_for_sigstop directly.
6612 * server.c (resume, handle_target_event): Handle
6613 TARGET_WAITKIND_NO_RESUMED.
6614
6615 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6616
6617 * win32-low.c (psapi_get_dll_name,
6618 * win32_CreateToolhelp32Snapshot): Delete.
6619 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6620 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6621 Delete.
6622 (handle_load_dll): Add function description.
6623 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6624
6625 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6626
6627 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6628 Add comment.
6629 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6630 base address when calling win32_add_one_solib.
6631 (handle_load_dll): Delete local variable load_addr.
6632 Remove 0x1000 offset applied to DLL base address when calling
6633 win32_add_one_solib.
6634 (handle_unload_dll): Add comment.
6635
6636 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6637
6638 * win32-low.c (win32_add_all_dlls): Renames
6639 win32_ensure_ntdll_loaded. Rewrite function documentation.
6640 Adjust implementation to always load all DLLs.
6641 Add 0x1000 offset to DLL base address when calling
6642 win32_add_one_solib.
6643 (child_initialization_done): New static global.
6644 (do_initial_child_stuff): Set child_initialization_done to
6645 zero during child initialization, and 1 after. Replace call
6646 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6647 Add comment.
6648 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6649 (handle_unload_dll): Add function documentation.
6650 (get_child_debug_event): Ignore load and unload DLL events
6651 during child initialization.
6652
6653 2014-02-20 Doug Evans <dje@google.com>
6654
6655 Remove global all_lwps.
6656 * inferiors.h (ptid_of): Move here from linux-low.h.
6657 (pid_of, lwpid_of): Ditto.
6658 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6659 parameter is a struct thread_info * now.
6660 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6661 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6662 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6663 directly.
6664 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6665 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6666 * linux-arm-low.c (update_registers_callback): Update, "entry"
6667 parameter is a struct thread_info * now.
6668 Fetch lwpid from current_inferior directly.
6669 (arm_insert_point): Pass &all_threads to find_inferior instead of
6670 &all_lwps.
6671 (arm_remove_point): Ditto.
6672 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6673 (arm_prepare_to_resume): Fetch pid from thread.
6674 (arm_read_description): Fetch lwpid from current_inferior directly.
6675 * linux-low.c (all_lwps): Delete.
6676 (delete_lwp): Delete call to remove_inferior.
6677 (handle_extended_wait): Fetch lwpid from thread.
6678 (add_lwp): Don't set lwp->entry.id. Remove call to
6679 add_inferior_to_list.
6680 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6681 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6682 (kill_one_lwp_callback): Ditto.
6683 (linux_kill): Don't dereference NULL pointer.
6684 Fetch ptid,lwpid from thread.
6685 (get_detach_signal): Fetch ptid from thread.
6686 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6687 Simplify call to regcache_invalidate_thread.
6688 (delete_lwp_callback): Update, "entry" parameter is a
6689 struct thread_info * now. Fetch pid from thread.
6690 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6691 (status_pending_p_callback): Update, "entry" parameter is a
6692 struct thread_info * now. Fetch ptid from thread.
6693 (find_lwp_pid): Update, "entry" parameter is a
6694 struct thread_info * now.
6695 (linux_wait_for_lwp): Fetch pid from thread.
6696 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6697 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6698 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6699 (dequeue_one_deferred_signal): Ditto.
6700 (cancel_breakpoint): Fetch ptid from current_inferior.
6701 (linux_wait_for_event): Pass &all_threads to find_inferior,
6702 not &all_lwps. Fetch ptid, lwpid from thread.
6703 (count_events_callback): Update, "entry" parameter is a
6704 struct thread_info * now.
6705 (select_singlestep_lwp_callback): Ditto.
6706 (select_event_lwp_callback): Ditto.
6707 (cancel_breakpoints_callback): Ditto.
6708 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6709 not &all_lwps.
6710 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6711 (unsuspend_one_lwp): Update, "entry" parameter is a
6712 struct thread_info * now.
6713 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6714 not &all_lwps.
6715 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6716 Fetch lwpid from thread, not lwp.
6717 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6718 Pass &all_threads to find_inferior, not &all_lwps.
6719 (send_sigstop): Fetch lwpid from thread, not lwp.
6720 (send_sigstop_callback): Update, "entry" parameter is a
6721 struct thread_info * now.
6722 (suspend_and_send_sigstop_callback): Ditto.
6723 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6724 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6725 struct thread_info * now.
6726 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6727 from thread, lwp.
6728 (lwp_running): Update, "entry" parameter is a
6729 struct thread_info * now.
6730 (stop_all_lwps): Fetch ptid from thread.
6731 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6732 (linux_resume_one_lwp): Fetch lwpid from thread.
6733 (linux_set_resume_request): Update, "entry" parameter is a
6734 struct thread_info * now. Fetch pid, lwpid from thread.
6735 (resume_status_pending_p): Update, "entry" parameter is a
6736 struct thread_info * now.
6737 (need_step_over_p): Ditto. Fetch lwpid from thread.
6738 (start_step_over): Fetch lwpid from thread.
6739 (linux_resume_one_thread): Update, "entry" parameter is a
6740 struct thread_info * now. Fetch lwpid from thread.
6741 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6742 (proceed_one_lwp): Update, "entry" parameter is a
6743 struct thread_info * now. Fetch lwpid from thread.
6744 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6745 struct thread_info * now.
6746 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6747 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6748 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6749 directly.
6750 (regsets_store_inferior_registers): Ditto.
6751 (fetch_register, store_register): Ditto.
6752 (linux_read_memory, linux_write_memory): Ditto.
6753 (linux_request_interrupt): Ditto.
6754 (linux_read_auxv): Ditto.
6755 (linux_xfer_siginfo): Ditto.
6756 (linux_qxfer_spu): Ditto.
6757 (linux_qxfer_libraries_svr4): Ditto.
6758 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6759 moved to inferiors.h.
6760 (get_lwp): Delete.
6761 (get_thread_lwp): Update.
6762 (struct lwp_info): Delete member "entry". Simplify comment for
6763 member "thread".
6764 (all_lwps): Delete.
6765 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6766 current_inferior directly.
6767 (update_watch_registers_callback): Update, "entry" parameter is a
6768 struct thread_info * now. Fetch pid from thread.
6769 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6770 (mips_insert_point): Fetch lwpid from current_inferior.
6771 Pass &all_threads to find_inferior, not &all_lwps.
6772 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6773 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6774 directly.
6775 (mips_stopped_data_address): Ditto.
6776 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6777 directly.
6778 * linux-tile-low.c (tile_arch_setup): Ditto.
6779 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6780 (update_debug_registers_callback): Update, "entry" parameter is a
6781 struct thread_info * now. Fetch pid from thread.
6782 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6783 Pass &all_threads to find_inferior, not &all_lwps.
6784 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6785 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6786 Pass &all_threads to find_inferior, not &all_lwps.
6787 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6788 (i386_dr_low_get_status): Ditto.
6789 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6790 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6791 (x86_linux_read_description): Ditto.
6792 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6793
6794 2014-02-20 Doug Evans <dje@google.com>
6795
6796 * inferiors.c (get_first_inferior): Fix buglet.
6797
6798 2014-02-19 Doug Evans <dje@google.com>
6799
6800 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6801 * inferiors.c (add_thread): Change result type to struct thread_info *.
6802 All callers updated.
6803 (add_lwp): Call add_thread here instead of in callers.
6804 All callers updated.
6805 * linux-low.h (get_lwp_thread): Rewrite.
6806 (struct lwp_info): New member "thread".
6807
6808 2014-02-19 Doug Evans <dje@google.com>
6809
6810 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6811 All callers updated.
6812
6813 2014-02-19 Doug Evans <dje@google.com>
6814
6815 * inferiors.c (add_thread): Fix whitespace.
6816
6817 2014-02-19 Doug Evans <dje@google.com>
6818
6819 * dll.c (clear_dlls): Replace accessing list implemention details
6820 with API function.
6821 * gdbthread.h (get_first_thread): Declare.
6822 * inferiors.c (for_each_inferior_with_data): New function.
6823 (get_first_thread): New function.
6824 (find_thread_ptid): Simplify.
6825 (get_first_inferior): New function.
6826 (clear_list): Delete.
6827 (one_inferior_p): New function.
6828 (clear_inferior_list): New function.
6829 (clear_inferiors): Update.
6830 * inferiors.h (for_each_inferior_with_data): Declare.
6831 (clear_inferior_list): Declare.
6832 (one_inferior_p): Declare.
6833 (get_first_inferior): Declare.
6834 * linux-low.c (linux_wait_for_event): Replace accessing list
6835 implemention details with API function.
6836 * server.c (target_running): Ditto.
6837 (accumulate_file_name_length): New function.
6838 (emit_dll_description): New function.
6839 (handle_qxfer_libraries): Replace accessing list implemention
6840 details with API function.
6841 (handle_qxfer_threads_worker): New function.
6842 (handle_qxfer_threads_proper): Replace accessing list implemention
6843 details with API function.
6844 (handle_query): Ditto.
6845 (visit_actioned_threads_callback_ftype): New typedef.
6846 (visit_actioned_threads_data): New struct.
6847 (visit_actioned_threads): Rewrite to be find_inferior callback.
6848 (resume): Call find_inferior.
6849 (handle_status): Replace accessing list implemention
6850 details with API function.
6851 (process_serial_event): Replace accessing list implemention details
6852 with API function.
6853 * target.c (set_desired_inferior): Replace accessing list implemention
6854 details with API function.
6855 * tracepoint.c (same_process_p): New function.
6856 (gdb_agent_about_to_close): Replace accessing list implemention
6857 details with API function.
6858 * win32-low.c (child_delete_thread): Replace accessing list
6859 implemention details with API function.
6860 (match_dll_by_basename): New function.
6861 (dll_is_loaded_by_basename): New function.
6862 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6863 details call to dll_is_loaded_by_basename.
6864
6865 2014-02-19 Doug Evans <dje@google.com>
6866
6867 * dll.h (struct dll_info): Add comment.
6868 * gdbthread.h (struct thread_info): Add comment.
6869 (current_ptid): Simplify.
6870 * inferiors.c (add_process): Update.
6871 (remove_process): Update.
6872 * inferiors.h (struct process_info): Rename member "head" to "entry".
6873 * linux-low.c (delete_lwp): Update.
6874 (add_lwp): Update.
6875 (last_thread_of_process_p): Update.
6876 (kill_one_lwp_callback, linux_kill): Update.
6877 (status_pending_p_callback): Update.
6878 (wait_for_sigstop): Update. Simplify read of ptid.
6879 (start_step_over): Update.
6880 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6881 (get_lwp_thread): Update.
6882 (struct lwp_info): Rename member "head" to "entry".
6883 * regcache.h (inferior_list_entry): Delete.
6884 * server.c (kill_inferior_callback): Update.
6885 (detach_or_kill_inferior_callback): Update.
6886 (print_started_pid): Update.
6887 (print_attached_pid): Update.
6888 (process_serial_event): Simplify read of ptid.
6889 * thread-db.c (thread_db_create_event): Update.
6890 (thread_db_get_tls_address): Update.
6891 * win32-low.c (current_inferior_ptid): Simplify.
6892
6893 2014-02-19 Tom Tromey <tromey@redhat.com>
6894
6895 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6896 argument.
6897 (target_supports_btrace): Update.
6898
6899 2014-02-14 Yao Qi <yao@codesourcery.com>
6900
6901 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6902 (rsp-low-ipa.o): New target.
6903
6904 2014-02-12 Tom Tromey <tromey@redhat.com>
6905
6906 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6907 convert_ascii_to_int.
6908 * regcache.c (registers_to_string): Likewise.
6909 * remote-utils.c (decode_M_packet): Likewise.
6910 * server.c (process_serial_event): Likewise.
6911
6912 2014-02-12 Tom Tromey <tromey@redhat.com>
6913
6914 * server.c (handle_query, handle_v_run): Use hex2bin, not
6915 unhexify.
6916 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6917
6918 2014-02-12 Tom Tromey <tromey@redhat.com>
6919
6920 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6921 convert_int_to_ascii.
6922 * regcache.c (registers_to_string, collect_register_as_string):
6923 Likewise.
6924 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6925 Likewise.
6926 * server.c (process_serial_event): Likewise.
6927 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6928 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6929
6930 2014-02-12 Tom Tromey <tromey@redhat.com>
6931
6932 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6933 bin2hex, not hexify.
6934 * tracepoint.c (cmd_qtstatus): Likewise.
6935
6936 2014-02-12 Tom Tromey <tromey@redhat.com>
6937
6938 * remote-utils.c (monitor_output): Pass explicit length to
6939 hexify.
6940
6941 2014-02-12 Tom Tromey <tromey@redhat.com>
6942
6943 * tracepoint.c: Include rsp-low.h.
6944 * server.c: Include rsp-low.h.
6945 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6946 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6947 declare.
6948 * remote-utils.c: Include rsp-low.h.
6949 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6950 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6951 (convert_int_to_ascii, convert_ascii_to_int): Move to
6952 common/rsp-low.c.
6953 * regcache.c: Include rsp-low.h.
6954 * ax.c: Include rsp-low.h.
6955 * Makefile.in (SFILES): Add common/rsp-low.c.
6956 (OBS): Add rsp-low.o.
6957 (rsp-low.o): New target.
6958
6959 2014-02-12 Tom Tromey <tromey@redhat.com>
6960
6961 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6962 Include print-utils.h.
6963 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6964 (plongest, thirty_two, phex_nz): Remove.
6965 * Makefile.in (SFILES): Add common/print-utils.c.
6966 (OBS): Add print-utils.o.
6967 (print-utils-ipa.o): New target.
6968 (print-utils.o): New target.
6969 (IPA_OBJS): Add print-utils-ipa.o.
6970
6971 2014-02-06 Tom Tromey <tromey@redhat.com>
6972
6973 * Makefile.in (SFILES): Fix indentation.
6974
6975 2014-02-05 Doug Evans <dje@google.com>
6976
6977 * linux-low.c (linux_wait_for_event): Improve comment.
6978 (linux_wait_1): Keep current_inferior in sync with event_child.
6979
6980 2014-01-22 Doug Evans <dje@google.com>
6981
6982 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6983
6984 2014-01-22 Doug Evans <dje@google.com>
6985
6986 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6987 * configure: Regenerate.
6988 * config.in: Regenerate.
6989 * Makefile.in (SFILES): Add debug.c.
6990 (OBS): Add debug.o.
6991 * debug.c: New file.
6992 * debug.h: New file.
6993 * linux-aarch64-low.c (*): Update all debugging printfs to use
6994 debug_printf instead of fprintf.
6995 * linux-arm-low.c (*): Ditto.
6996 * linux-cris-low.c (*): Ditto.
6997 * linux-crisv32-low.c (*): Ditto.
6998 * linux-m32r-low.c (*): Ditto.
6999 * linux-sparc-low.c (*): Ditto.
7000 * linux-x86.c (*): Ditto.
7001 * linux-low.c (*): Ditto.
7002 (linux_wait_1): Add calls to debug_enter, debug_exit.
7003 (linux_wait): Remove redundant debugging printf.
7004 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7005 (linux_resume, unstop_all_lwps): Ditto.
7006 * mem-break.c (*): Update all debugging printfs to use
7007 debug_printf instead of fprintf.
7008 * remote-utils.c (*): Ditto.
7009 * thread-db.c (*): Ditto.
7010 * server.c #include <ctype.h>, "gdb_vecs.h".
7011 (debug_threads): Moved to debug.c.
7012 (*): Update all debugging printfs to use debug_printf instead of
7013 fprintf.
7014 (start_inferior): Replace call to fflush with call to debug_flush.
7015 (monitor_show_help): Mention set debug-format.
7016 (parse_debug_format_options): New function.
7017 (handle_monitor_command): Handle "monitor set debug-format".
7018 (gdbserver_usage): Mention --debug-format.
7019 (main): Parse --debug-format.
7020 * server.h (debug_threads): Declaration moved to debug.h.
7021 #include "debug.h".
7022 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7023 trace_debug_1 that uses debug_printf.
7024 (tracepoint_look_up_symbols): Update all debugging printfs to use
7025 debug_printf instead of fprintf.
7026
7027 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7028
7029 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7030 sys/ptrace.h.
7031
7032 2014-01-17 Pedro Alves <palves@redhat.com>
7033
7034 PR build/16445
7035 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7036 defined after including gdb_proc_service.h.
7037
7038 2014-01-16 Doug Evans <dje@google.com>
7039
7040 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7041 (match_dll): Use it.
7042
7043 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7044
7045 * target.h (target_ops) <read_btrace>: Change parameters and
7046 return type to allow error reporting.
7047 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7048 trace reading errors on.
7049 * linux-low.c (linux_low_read_btrace): Pass trace reading
7050 errors on.
7051 (linux_low_disable_btrace): New.
7052
7053 2014-01-15 Doug Evans <dje@google.com>
7054
7055 * inferiors.c (thread_id_to_gdb_id): Delete.
7056 * inferiors.h (thread_id_to_gdb_id): Delete.
7057
7058 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7059
7060 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7061 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7062 versions.
7063
7064 2014-01-08 Pedro Alves <palves@redhat.com>
7065
7066 * server.c (handle_status): Don't discard previous queued stop
7067 replies or thread's pending status here.
7068 (main) <disconnection>: Do it here instead.
7069
7070 2014-01-08 Pedro Alves <palves@redhat.com>
7071
7072 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7073 * server.c (visit_actioned_threads, handle_pending_status): New
7074 function.
7075 (handle_v_cont): Factor out parts to ...
7076 (resume): ... this new function. If in all-stop, and a thread
7077 being resumed has a pending status, report it without actually
7078 resuming.
7079 (myresume): Adjust to use the new 'resume' function.
7080 (clear_pending_status_callback, set_pending_status_callback)
7081 (find_status_pending_thread_callback): New functions.
7082 (handle_status): Handle the case of multiple threads having
7083 interesting statuses to report. Report threads' real last signal
7084 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7085 with an interesting thread to report the status for, instead of
7086 always reporting the status of the first thread.
7087
7088 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7089
7090 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7091 * gdbreplay.c (gdbreplay_version): Likewise.
7092
7093 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7094
7095 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7096 iov.iov_len with the real length in use.
7097
7098 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7099
7100 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7101 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7102 for all targets that use win32-low.c.
7103 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7104 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7105
7106 2013-12-13 Pedro Alves <palves@redhat.com>
7107
7108 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7109 if equal to TARGET_WAITKIND_LOADED.
7110 * win32-low.c (cached_status): New static global.
7111 (win32_wait): Add declaration.
7112 (do_initial_child_stuff): Flush all initial pending debug events
7113 up to the initial breakpoint.
7114 (win32_wait): If CACHED_STATUS was set, return that instead
7115 of doing a real wait. Remove the code resuming the execution
7116 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7117 during the initial phase. Also remove the code changing
7118 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7119 TARGET_WAITKIND_STOPPED.
7120
7121 2013-12-11 Yao Qi <yao@codesourcery.com>
7122
7123 * notif.c (handle_notif_ack): Return 0 if no notification
7124 matches.
7125
7126 2013-11-20 Doug Evans <dje@google.com>
7127
7128 * linux-low.c (linux_set_resume_request): Fix comment.
7129
7130 2013-11-20 Doug Evans <dje@google.com>
7131
7132 * linux-low.c (resume_status_pending_p): Tweak comment.
7133
7134 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7135
7136 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7137 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7138 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7139 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7140 (srv_amd64_regobj): Add amd64-mpx.o.
7141 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7142 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7143 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7144 * i387-fp.c (num_pl_bnd_register) Added constant.
7145 (num_pl_bnd_cfg_registers) Added constant.
7146 (struct i387_xsave) Added reserved area and MPX fields.
7147 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7148 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7149 function.
7150 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7151 (init_registers_amd64_mpx_linux): Declare new function.
7152 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7153 (x86_64_regmap): Add MPX registers.
7154 (x86_linux_read_description): Add MPX case.
7155 (initialize_low_arch): Initialize MPX targets.
7156
7157 2013-11-18 Tom Tromey <tromey@redhat.com>
7158
7159 * configure: Rebuild.
7160 * configure.ac: Don't check for stdlib.h.
7161 * gdbreplay.c: Unconditionally include stdlib.h.
7162
7163 2013-11-18 Tom Tromey <tromey@redhat.com>
7164
7165 * config.in: Rebuild.
7166 * configure: Rebuild.
7167 * configure.ac: Don't use AC_HEADER_DIRENT.
7168
7169 2013-11-18 Tom Tromey <tromey@redhat.com>
7170
7171 * server.h: Don't check HAVE_STRING_H.
7172 * gdbreplay.c: Don't check HAVE_STRING_H.
7173 * configure: Rebuild.
7174
7175 2013-11-18 Tom Tromey <tromey@redhat.com>
7176
7177 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7178 LIBGNU.
7179
7180 2013-11-08 Tom Tromey <tromey@redhat.com>
7181
7182 * configure, config.in: Rebuild.
7183 * configure.ac: Remove unused configury.
7184
7185 2013-11-08 Tom Tromey <tromey@redhat.com>
7186
7187 * acinclude.m4: Include common.m4, codeset.m4.
7188 * configure, config.in: Rebuild.
7189 * configure.ac: Use GDB_AC_COMMON.
7190
7191 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7192
7193 * linux-s390-low.c (HWCAP_S390_TE): New define.
7194 (s390_arch_setup): Consider the TE field in the HWCAP for
7195 determining 'have_regset_tdb'.
7196
7197 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7198
7199 PR gdb/16014
7200 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7201 call to sizeof.
7202
7203 2013-10-02 Pedro Alves <palves@redhat.com>
7204
7205 * server.c (process_serial_event): Don't output "GDBserver
7206 exiting" if GDB is connected through stdio.
7207 * target.c (mywait): Likewise, be silent if GDB is connected
7208 through stdio.
7209
7210 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7211
7212 * lynx-low.c (lynx_add_threads_after_attach): New function.
7213 (lynx_attach): Remove call to add_thread. Add call to
7214 lynx_add_threads_after_attach instead.
7215
7216 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7217
7218 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7219 * config.in, configure: Regenerated.
7220
7221 2013-09-18 Yao Qi <yao@codesourcery.com>
7222
7223 PR server/15959
7224 * server.c (start_inferior): Clear 'resume_info'.
7225
7226 2013-09-16 Jiong Wang <jiwang@tilera.com>
7227
7228 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7229 for each register.
7230
7231 2013-09-16 Jiong Wang <jiwang@tilera.com>
7232
7233 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7234 linux-tile-low.o to srv_tgtobj.
7235
7236 2013-09-16 Will Newton <will.newton@linaro.org>
7237
7238 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7239 out regs.
7240
7241 2013-09-06 Pedro Alves <palves@redhat.com>
7242
7243 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7244 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7245 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7246 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7247 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7248 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7249
7250 2013-09-06 Pedro Alves <palves@redhat.com>
7251
7252 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7253 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7254
7255 2013-09-06 Pedro Alves <palves@redhat.com>
7256
7257 * linux-amd64-ipa.c: Include tracepoint.h.
7258 * linux-i386-ipa.c: Include tracepoint.h.
7259
7260 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7261
7262 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7263 (ps_get_thread_area): New function.
7264
7265 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7266
7267 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7268 (initialize_low_arch): Call init_registers_crisv32 rather than
7269 init_register_crisv32.
7270
7271 2013-09-05 Pedro Alves <palves@redhat.com>
7272
7273 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7274 to ...
7275 * hostio.h: ... this new file.
7276 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7277 win32-low.c: Include hostio.h.
7278
7279 2013-09-05 Pedro Alves <palves@redhat.com>
7280
7281 * server.h (gdb_client_data, handler_func, callback_handler_func)
7282 (delete_file_handler, add_file_handler, append_callback_event)
7283 (delete_callback_event, start_event_loop, initialize_event_loop):
7284 Move to event-loop.h and include it.
7285 * event-loop.h: New file.
7286
7287 2013-09-05 Pedro Alves <palves@redhat.com>
7288
7289 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7290 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7291 (loaded_dll, unloaded_dll): Move to ...
7292 * dll.h: ... this new file.
7293 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7294
7295 2013-09-05 Pedro Alves <palves@redhat.com>
7296
7297 * server.h (current_process, get_thread_process, all_processes)
7298 (add_inferior_to_list, for_each_inferior, current_inferior)
7299 (remove_inferior, add_process, remove_process, find_process_pid)
7300 (have_started_inferiors_p, have_attached_inferiors_p)
7301 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7302 (clear_inferiors, find_inferior, find_inferior_id)
7303 (inferior_target_data, set_inferior_target_data)
7304 (inferior_regcache_data, set_inferior_regcache_data): Move to
7305 inferiors.h, and include it.
7306 * inferiors.h: New file.
7307
7308 2013-09-05 Pedro Alves <palves@redhat.com>
7309
7310 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7311 Move ...
7312 * ax.h: ... here.
7313
7314 2013-09-05 Pedro Alves <palves@redhat.com>
7315
7316 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7317 tracepoint.h.
7318 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7319 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7320 (handle_tracepoint_general_set, handle_tracepoint_query)
7321 (tracepoint_finished_step, tracepoint_was_hit)
7322 (release_while_stepping_state_list, current_traceframe)
7323 (in_readonly_region, traceframe_read_mem)
7324 (fetch_traceframe_registers, traceframe_read_sdata)
7325 (traceframe_read_info, struct fast_tpoint_collect_status)
7326 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7327 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7328 (supply_fast_tracepoint_registers)
7329 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7330 (ipa_tdesc, claim_trampoline_space)
7331 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7332 (agent_mem_read, agent_get_trace_state_variable_value)
7333 (agent_set_trace_state_variable_value, agent_tsv_read)
7334 (agent_mem_read_string, get_raw_reg_func_addr)
7335 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7336 * tracepoint.h: ... this new file.
7337
7338 2013-09-05 Pedro Alves <palves@redhat.com>
7339
7340 * server.h (perror_with_name, error, fatal, warning, paddress)
7341 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7342 include it.
7343 * utils.h: New file.
7344
7345 2013-09-05 Pedro Alves <palves@redhat.com>
7346
7347 * server.h (remote_debug, noack_mode, transport_is_reliable)
7348 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7349 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7350 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7351 (write_enn, initialize_async_io, enable_async_io)
7352 (disable_async_io, check_remote_input_interrupt_request)
7353 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7354 (dead_thread_notify, prepare_resume_reply)
7355 (decode_address_to_semicolon, decode_address, decode_m_packet)
7356 (decode_M_packet, decode_X_packet, decode_xfer_write)
7357 (decode_search_memory_packet, unhexify, hexify)
7358 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7359 (look_up_one_symbol, relocate_instruction)
7360 (monitor_output): Move to remote-utils.h, and include it.
7361 * remote-utils.h: New file.
7362
7363 2013-09-05 Pedro Alves <palves@redhat.com>
7364
7365 * server.h (_): Delete.
7366
7367 2013-09-02 Pedro Alves <palves@redhat.com>
7368
7369 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7370 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7371 allocated.
7372 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7373
7374 2013-09-02 Pierre Muller <muller@sourceware.org>
7375
7376 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7377 or WriteProcessMemory complete successfully and handle
7378 ERROR_PARTIAL_COPY error.
7379
7380 2013-09-02 Pedro Alves <palves@redhat.com>
7381
7382 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7383 error instead of EIO.
7384
7385 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7386
7387 PR server/15604
7388 * linux-low.c: Include filestuff.h.
7389 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7390 * lynx-low.c: Include filestuff.h.
7391 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7392 * server.c: Include filestuff.h.
7393 (main): Call notice_open_fds.
7394 * spu-low.c: Include filestuff.h.
7395 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7396
7397 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7398
7399 * Makefile.in: Explain why ../target and ../nat are not
7400 listed as include file search paths.
7401 (linux-waitpid.o): New object file rule.
7402 * configure.srv (srv_native_linux_obj): New variable.
7403 Replace all occurrences of linux native object files with
7404 $srv_native_linux_obj.
7405 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7406 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7407 (linux_enable_event_reporting): Remove declaration.
7408 (my_waitpid): Moved to common/linux-waitpid.c.
7409 (linux_wait_for_event): Pass ptid when calling
7410 linux_enable_event_reporting.
7411 (linux_supports_tracefork_flag): Remove.
7412 (linux_enable_event_reporting): Likewise.
7413 (linux_tracefork_grandchild): Remove.
7414 (STACK_SIZE): Moved to common/linux-ptrace.c.
7415 (linux_tracefork_child): Remove.
7416 (linux_test_for_tracefork): Remove.
7417 (linux_look_up_symbols): Call linux_supports_traceclone.
7418 (initialize_low): Remove call to linux_test_for_tracefork.
7419 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7420 common/linux-ptrace.h.
7421 (PTRACE_TYPE_ARG4): Likewise.
7422 Include linux-ptrace.h.
7423
7424 2013-08-21 Pedro Alves <palves@redhat.com>
7425
7426 * config.in: Renegerate.
7427
7428 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7429
7430 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7431 (SFILES): Remove $(srcdir)/common/target-common.c and
7432 add $(srcdir)/target/waitstatus.c.
7433 (OBS): Remove target-common.o and add waitstatus.o.
7434 (server_h): Remove $(srcdir)/../common/target-common.h and
7435 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7436 and $(srcdir)/../target/waitstatus.h.
7437 (target-common.o): Remove.
7438 (waitstatus.o): New target object file.
7439 * target.h: Do not include target-common.h and
7440 include target/resume.h, target/wait.h and
7441 target/waitstatus.h.
7442
7443 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7444
7445 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7446 to PTRACE_TYPE_ARG3.
7447 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7448 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7449 PTRACE_TYPE_ARG4.
7450 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7451 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7452
7453 2013-07-27 Jie Zhang <jie@codesourcery.com>
7454 Daniel Jacobowitz <dan@codesourcery.com>
7455 Yao Qi <yao@codesourcery.com>
7456
7457 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7458 (mips-linux-watch.o): New rule.
7459 (mips_linux_watch_h): New variable.
7460 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7461 srv_tgtobj.
7462 * linux-mips-low.c: Include mips-linux-watch.h.
7463 (struct arch_process_info, struct arch_lwp_info): New.
7464 (update_watch_registers_callback): New function.
7465 (mips_linux_new_process, mips_linux_new_thread) New functions.
7466 (mips_linux_prepare_to_resume, mips_insert_point): New
7467 functions.
7468 (mips_remove_point, mips_stopped_by_watchpoint): New
7469 functions.
7470 (rsp_bp_type_to_target_hw_bp_type): New function.
7471 (mips_stopped_data_address): New function.
7472 (the_low_target): Add watchpoint support functions.
7473
7474 2013-07-27 Yao Qi <yao@codesourcery.com>
7475
7476 * i386-low.c: Include break-common.h.
7477 (enum target_hw_bp_type): Remove.
7478
7479 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7480
7481 * Makefile.in (SFILES): /common/target-common.c.
7482 (OBS): Add target-common.o.
7483 (server_h): Add $(srcdir)/../common/target-common.h.
7484 (target-common.o): New target.
7485 * server.c (queue_stop_reply_callback): Free
7486 status string after use.
7487 * target.c (target_waitstatus_to_string): Remove.
7488 * target.h: Include target-common.h.
7489 (resume_kind): Likewise.
7490 (target_waitkind): Likewise.
7491 (target_waitstatus): Likewise.
7492 (TARGET_WNOHANG): Likewise.
7493
7494 2013-07-04 Yao Qi <yao@codesourcery.com>
7495
7496 * Makefile.in (host_alias): Use @host_noncanonical@.
7497 (target_alias): Use @target_noncanonical@.
7498 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7499 ACX_NONCANONICAL_HOST.
7500 * configure: Regenerated.
7501
7502 Revert:
7503 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7504
7505 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7506 * configure: Rebuild.
7507 * Makefile.in (version_host, version_target): Get from configure.
7508 (version.c): Use $(version_host) and $(version_target).
7509
7510 2013-07-03 Pedro Alves <palves@redhat.com>
7511
7512 * Makefile.in (config.status): Depend on development.sh.
7513 * acinclude.m4: Include libmcheck.m4.
7514 * configure: Regenerate.
7515
7516 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7517
7518 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7519 attribute inside the parentheses.
7520 (winapi_DebugSetProcessKillOnExit): Ditto.
7521 (winapi_DebugBreakProcess): Ditto.
7522 (winapi_GenerateConsoleCtrlEvent): Ditto.
7523
7524 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7525
7526 * notif.h (notif_event): Add a dummy member to avoid compiler
7527 errors.
7528
7529 2013-07-01 Pedro Alves <palves@redhat.com>
7530
7531 * hostio.c (HOSTIO_PATH_MAX): Define.
7532 (require_filename, handle_open, handle_unlink, handle_readlink):
7533 Use it.
7534
7535 2013-07-01 Pedro Alves <palves@redhat.com>
7536
7537 * server.h: Include "pathmax.h".
7538 * linux-low.c: Don't include sys/param.h.
7539 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7540 MAXPATHLEN.
7541 * win32-low.c: Don't include sys/param.h.
7542 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7543
7544 2013-07-01 Pedro Alves <palves@redhat.com>
7545
7546 * event-loop.c: Don't check HAVE_UNISTD_H before including
7547 <unistd.h>.
7548 * gdbreplay.c: Likewise.
7549 * remote-utils.c: Likewise.
7550 * server.c: Likewise.
7551 * configure.ac: Don't check for unistd.h.
7552 * configure: Regenerate.
7553
7554 2013-06-28 Tom Tromey <tromey@redhat.com>
7555
7556 * Makefile.in (version.c): Use version.in, not
7557 common/version.in.
7558
7559 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7560
7561 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7562 * configure: Rebuild.
7563 * Makefile.in (version_host, version_target): Get from configure.
7564 (version.c): Use $(version_host) and $(version_target).
7565
7566 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7567
7568 Fix trace-status to output user name without trailing colon.
7569 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7570
7571 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7572
7573 Fix trace-status to output proper start-time and stop-time.
7574 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7575 output start time and stop time in hex as gdb expects.
7576
7577 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7578
7579 * tracepoint.c (build_traceframe_info_xml): Output trace state
7580 variables present in the trace buffer.
7581
7582 2013-06-24 Tom Tromey <tromey@redhat.com>
7583
7584 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7585 create-version.sh.
7586 (version.o): Remove.
7587 * gdbreplay.c: Include version.h.
7588 (version, host_name): Don't declare.
7589 * server.h: Include version.h.
7590 (version, host_name): Don't declare.
7591
7592 2013-06-12 Pedro Alves <palves@redhat.com>
7593
7594 * linux-x86-low.c (linux_is_elf64): Delete global.
7595 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7596 with local linux_pid_exe_is_elf_64_file use.
7597
7598 2013-06-11 Pedro Alves <palves@redhat.com>
7599
7600 * linux-low.c (regset_disabled, disable_regset): New functions.
7601 (regsets_fetch_inferior_registers)
7602 (regsets_store_inferior_registers): Use them.
7603 (initialize_regsets_info); Don't allocate the disabled_regsets
7604 array here.
7605 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7606 comment.
7607
7608 2013-06-11 Pedro Alves <palves@redhat.com>
7609
7610 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7611 xmalloc.
7612
7613 2013-06-11 Pedro Alves <palves@redhat.com>
7614
7615 * linux-x86-low.c (initialize_low_arch): Call
7616 init_registers_x32_avx_linux.
7617
7618 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7619
7620 Fix compatibility with Android Bionic.
7621 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7622 it is not empty.
7623
7624 2013-06-07 Pedro Alves <palves@redhat.com>
7625
7626 PR server/14823
7627 * Makefile.in (OBS): Add tdesc.o.
7628 (IPA_OBJS): Add tdesc-ipa.o.
7629 (tdesc-ipa.o): New rule.
7630 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7631 interface.
7632 * linux-low.c (new_inferior): Delete.
7633 (disabled_regsets, num_regsets): Delete.
7634 (linux_add_process): Adjust to set the new per-process
7635 new_inferior flag.
7636 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7637 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7638 was a stop. When calling arch_setup, switch the current inferior
7639 to the thread that got an event.
7640 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7641 (regsets_fetch_inferior_registers)
7642 (regsets_store_inferior_registers): New regsets_info parameter.
7643 Adjust to use it.
7644 (linux_register_in_regsets): New regs_info parameter. Adjust to
7645 use it.
7646 (register_addr, fetch_register, store_register): New usrregs_info
7647 parameter. Adjust to use it.
7648 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7649 parameter regs_info. Adjust to use it.
7650 (linux_fetch_registers): Get the current inferior's regs_info, and
7651 adjust to use it.
7652 (linux_store_registers): Ditto.
7653 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7654 (initialize_low): Don't initialize the target_regsets here. Call
7655 initialize_low_arch.
7656 * linux-low.h (target_regsets): Delete declaration.
7657 (struct regsets_info): New.
7658 (struct usrregs_info): New.
7659 (struct regs_info): New.
7660 (struct process_info_private) <new_inferior>: New field.
7661 (struct linux_target_ops): Delete the num_regs, regmap, and
7662 regset_bitmap fields. New field regs_info.
7663 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7664 * i387-fp.c (num_xmm_registers): Delete.
7665 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7666 calls to new interface.
7667 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7668 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7669 Infer the number of xmm registers from the regcache's target
7670 description.
7671 * i387-fp.h (num_xmm_registers): Delete.
7672 * inferiors.c (add_thread): Don't install the thread's regcache
7673 here.
7674 * proc-service.c (gregset_info): Fetch the current inferior's
7675 regs_info. Adjust to use it.
7676 * regcache.c: Include tdesc.h.
7677 (register_bytes, reg_defs, num_registers)
7678 (gdbserver_expedite_regs): Delete.
7679 (get_thread_regcache): If the thread doesn't have a regcache yet,
7680 create one, instead of aborting gdbserver.
7681 (regcache_invalidate_one): Rename to ...
7682 (regcache_invalidate_thread): ... this.
7683 (regcache_invalidate_one): New.
7684 (regcache_invalidate): Only invalidate registers of the current
7685 process.
7686 (init_register_cache): Add target_desc parameter, and use it.
7687 (new_register_cache): Ditto. Assert the target description has a
7688 non zero registers_size.
7689 (regcache_cpy): Add assertions. Adjust.
7690 (realloc_register_cache, set_register_cache): Delete.
7691 (registers_to_string, registers_from_string): Adjust.
7692 (find_register_by_name, find_regno, find_register_by_number)
7693 (register_cache_size): Add target_desc parameter, and use it.
7694 (free_register_cache_thread, free_register_cache_thread_one)
7695 (regcache_release, register_cache_size): New.
7696 (register_size): Add target_desc parameter, and use it.
7697 (register_data, supply_register, supply_register_zeroed)
7698 (supply_regblock, supply_register_by_name, collect_register)
7699 (collect_register_as_string, collect_register_by_name): Adjust.
7700 * regcache.h (struct target_desc): Forward declare.
7701 (struct regcache) <tdesc>: New field.
7702 (init_register_cache, new_register_cache): Add target_desc
7703 parameter.
7704 (regcache_invalidate_thread): Declare.
7705 (regcache_invalidate_one): Delete declaration.
7706 (regcache_release): Declare.
7707 (find_register_by_number, register_cache_size, register_size)
7708 (find_regno): Add target_desc parameter.
7709 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7710 declarations.
7711 * remote-utils.c: Include tdesc.h.
7712 (outreg, prepare_resume_reply): Adjust.
7713 * server.c: Include tdesc.h.
7714 (gdbserver_xmltarget): Delete declaration.
7715 (get_features_xml, process_serial_event): Adjust.
7716 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7717 declare.
7718 (struct process_info) <tdesc>: New field.
7719 (ipa_tdesc): Declare.
7720 * tdesc.c: New file.
7721 * tdesc.h: New file.
7722 * tracepoint.c: Include tdesc.h.
7723 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7724 (get_context_regcache): Adjust to pass ipa_tdesc down.
7725 (do_action_at_tracepoint): Adjust to get the register cache size
7726 from the context regcache's description.
7727 (traceframe_walk_blocks): Adjust to get the register cache size
7728 from the current trace frame's description.
7729 (traceframe_get_pc): Adjust to get current trace frame's
7730 description and pass it down.
7731 (gdb_collect): Adjust to get the register cache size from the
7732 IPA's description.
7733 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7734 (gdbserver_xmltarget): Delete.
7735 (initialize_low_tracepoint): Set the ipa's target description.
7736 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7737 (initialize_low_tracepoint): Set the ipa's target description.
7738 * linux-x86-low.c: Include tdesc.h.
7739 [__x86_64__] (is_64bit_tdesc): New.
7740 (ps_get_thread_area, x86_get_thread_area): Use it.
7741 (i386_cannot_store_register): Rename to ...
7742 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7743 (i386_cannot_fetch_register): Rename to ...
7744 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7745 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7746 to new interface.
7747 (target_regsets): Rename to ...
7748 (x86_regsets): ... this.
7749 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7750 interface.
7751 (x86_siginfo_fixup): Use is_64bit_tdesc.
7752 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7753 (tdesc_x32_avx_linux, tdesc_x32_linux)
7754 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7755 Declare.
7756 (x86_linux_update_xmltarget): Delete.
7757 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7758 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7759 (AMD64_LINUX_USER64_CS): New.
7760 (x86_linux_read_description): New, based on
7761 x86_linux_update_xmltarget.
7762 (same_process_callback): New.
7763 (x86_arch_setup_process_callback): New.
7764 (x86_linux_update_xmltarget): New.
7765 (x86_regsets_info): New.
7766 (amd64_linux_regs_info): New.
7767 (i386_linux_usrregs_info): New.
7768 (i386_linux_regs_info): New.
7769 (x86_linux_regs_info): New.
7770 (x86_arch_setup): Reimplement.
7771 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7772 (x86_emit_ops): Ditto.
7773 (the_low_target): Adjust. Install x86_linux_regs_info,
7774 x86_cannot_fetch_register, and x86_cannot_store_register.
7775 (initialize_low_arch): New.
7776 * linux-ia64-low.c (tdesc_ia64): Declare.
7777 (ia64_fetch_register): Adjust.
7778 (ia64_usrregs_info, regs_info): New globals.
7779 (ia64_regs_info): New function.
7780 (the_low_target): Adjust.
7781 (initialize_low_arch): New function.
7782 * linux-sparc-low.c (tdesc_sparc64): Declare.
7783 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7784 Adjust.
7785 (sparc_arch_setup): New function.
7786 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7787 (the_low_target): Adjust.
7788 (initialize_low_arch): New function.
7789 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7790 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7791 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7792 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7793 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7794 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7795 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7796 (tdesc_powerpc_isa205_vsx64l): Declare.
7797 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7798 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7799 (ppc_set_pc, ppc_get_hwcap): Adjust.
7800 (ppc_usrregs_info): Forward declare.
7801 (!__powerpc64__) ppc_regmap_adjusted: New global.
7802 (ppc_arch_setup): Adjust to the current process'es target
7803 description.
7804 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7805 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7806 (ppc_store_evrregset): Adjust.
7807 (target_regsets): Rename to ...
7808 (ppc_regsets): ... this, and make static.
7809 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7810 (ppc_regs_info): New function.
7811 (the_low_target): Adjust.
7812 (initialize_low_arch): New function.
7813 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7814 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7815 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7816 (tdesc_s390x_linux64v2): Declare.
7817 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7818 (s390_fill_gregset, s390_store_last_break): Adjust.
7819 (target_regsets): Rename to ...
7820 (s390_regsets): ... this, and make static.
7821 (s390_get_pc, s390_set_pc): Adjust.
7822 (s390_get_hwcap): New target_desc parameter, and use it.
7823 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7824 (s390_arch_setup): Adjust to set the current process'es target
7825 description. Don't adjust the regmap.
7826 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7827 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7828 (regs_info_3264): New globals.
7829 (s390_regs_info): New function.
7830 (the_low_target): Adjust.
7831 (initialize_low_arch): New function.
7832 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7833 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7834 [__mips64] (init_registers_mips_linux)
7835 (init_registers_mips_dsp_linux): Delete defines.
7836 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7837 (have_dsp): New global.
7838 (mips_read_description): New, based on mips_arch_setup.
7839 (mips_arch_setup): Reimplement.
7840 (get_usrregs_info): New function.
7841 (mips_cannot_fetch_register, mips_cannot_store_register)
7842 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7843 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7844 (target_regsets): Rename to ...
7845 (mips_regsets): ... this, and make static.
7846 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7847 (dsp_regs_info, regs_info): New globals.
7848 (mips_regs_info): New function.
7849 (the_low_target): Adjust.
7850 (initialize_low_arch): New function.
7851 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7852 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7853 Declare.
7854 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7855 (arm_read_description): New, with bits factored from
7856 arm_arch_setup.
7857 (arm_arch_setup): Reimplement.
7858 (target_regsets): Rename to ...
7859 (arm_regsets): ... this, and make static.
7860 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7861 (arm_regs_info): New function.
7862 (the_low_target): Adjust.
7863 (initialize_low_arch): New function.
7864 * linux-m68k-low.c (tdesc_m68k): Declare.
7865 (target_regsets): Rename to ...
7866 (m68k_regsets): ... this, and make static.
7867 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7868 (m68k_regs_info): New function.
7869 (m68k_arch_setup): New function.
7870 (the_low_target): Adjust.
7871 (initialize_low_arch): New function.
7872 * linux-sh-low.c (tdesc_sharch): Declare.
7873 (target_regsets): Rename to ...
7874 (sh_regsets): ... this, and make static.
7875 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7876 (sh_regs_info, sh_arch_setup): New functions.
7877 (the_low_target): Adjust.
7878 (initialize_low_arch): New function.
7879 * linux-bfin-low.c (tdesc_bfin): Declare.
7880 (bfin_arch_setup): New function.
7881 (bfin_usrregs_info, regs_info): New globals.
7882 (bfin_regs_info): New function.
7883 (the_low_target): Adjust.
7884 (initialize_low_arch): New function.
7885 * linux-cris-low.c (tdesc_cris): Declare.
7886 (cris_arch_setup): New function.
7887 (cris_usrregs_info, regs_info): New globals.
7888 (cris_regs_info): New function.
7889 (the_low_target): Adjust.
7890 (initialize_low_arch): New function.
7891 * linux-cris-low.c (tdesc_crisv32): Declare.
7892 (cris_arch_setup): New function.
7893 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7894 (cris_regs_info): New function.
7895 (the_low_target): Adjust.
7896 (initialize_low_arch): New function.
7897 * linux-m32r-low.c (tdesc_m32r): Declare.
7898 (m32r_arch_setup): New function.
7899 (m32r_usrregs_info, regs_info): New globals.
7900 (m32r_regs_info): Adjust.
7901 (initialize_low_arch): New function.
7902 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7903 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7904 (tic6x_usrregs_info): Forward declare.
7905 (tic6x_read_description): New function, based on ...
7906 (tic6x_arch_setup): ... this. Reimplement.
7907 (target_regsets): Rename to ...
7908 (tic6x_regsets): ... this, and make static.
7909 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7910 (tic6x_regs_info): New function.
7911 (the_low_target): Adjust.
7912 (initialize_low_arch): New function.
7913 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7914 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7915 (target_regsets): Rename to ...
7916 (xtensa_regsets): ... this, and make static.
7917 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7918 globals.
7919 (xtensa_arch_setup, xtensa_regs_info): New functions.
7920 (the_low_target): Adjust.
7921 (initialize_low_arch): New function.
7922 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7923 (nios2_arch_setup): Set the current process'es tdesc.
7924 (target_regsets): Rename to ...
7925 (nios2_regsets): ... this.
7926 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7927 (nios2_regs_info): New function.
7928 (the_low_target): Adjust.
7929 (initialize_low_arch): New function.
7930 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7931 (aarch64_arch_setup): Set the current process'es tdesc.
7932 (target_regsets): Rename to ...
7933 (aarch64_regsets): ... this.
7934 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7935 (aarch64_regs_info): New function.
7936 (the_low_target): Adjust.
7937 (initialize_low_arch): New function.
7938 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7939 globals.
7940 (target_regsets): Rename to ...
7941 (tile_regsets): ... this.
7942 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7943 (tile_regs_info): New function.
7944 (tile_arch_setup): Set the current process'es tdesc.
7945 (the_low_target): Adjust.
7946 (initialize_low_arch): New function.
7947 * spu-low.c (tdesc_spu): Declare.
7948 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7949 * win32-arm-low.c (tdesc_arm): Declare.
7950 (arm_arch_setup): New function.
7951 (the_low_target): Install arm_arch_setup instead of
7952 init_registers_arm.
7953 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7954 (init_windows_x86): Rename to ...
7955 (i386_arch_setup): ... this. Set `win32_tdesc'.
7956 (the_low_target): Adjust.
7957 * win32-low.c (win32_tdesc): New global.
7958 (child_add_thread): Don't create the thread cache here.
7959 (do_initial_child_stuff): Set the new process'es tdesc.
7960 * win32-low.h (struct target_desc): Forward declare.
7961 (win32_tdesc): Declare.
7962 * lynx-i386-low.c (tdesc_i386): Declare global.
7963 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7964 * lynx-low.c (lynx_tdesc): New global.
7965 (lynx_add_process): Set the new process'es tdesc.
7966 * lynx-low.h (struct target_desc): Forward declare.
7967 (lynx_tdesc): Declare global.
7968 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7969 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7970 * nto-low.c (nto_tdesc): New global.
7971 (do_attach): Set the new process'es tdesc.
7972 * nto-low.h (struct target_desc): Forward declare.
7973 (nto_tdesc): Declare.
7974 * nto-x86-low.c (tdesc_i386): Declare.
7975 (nto_x86_arch_setup): Set `nto_tdesc'.
7976
7977 2013-06-04 Gary Benson <gbenson@redhat.com>
7978
7979 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7980 to qSupported response when appropriate.
7981 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7982 with nonzero-length annex.
7983 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7984 arguments supplied in annex.
7985
7986 2013-05-31 Doug Evans <dje@google.com>
7987
7988 PR server/15594
7989 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7990 64 bits in 64-cross-32 environment.
7991
7992 2013-05-28 Pedro Alves <palves@redhat.com>
7993
7994 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7995 (aarch64-without-fpu.c): Delete rule.
7996 * configure.srv (aarch64*-*-linux*): Remove references to
7997 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7998 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7999 declaration.
8000
8001 2013-05-24 Pedro Alves <palves@redhat.com>
8002
8003 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8004 instead of strchr/decode_address. Error if the range isn't split
8005 with a ','. Don't assume there's be a ':' in the action.
8006
8007 2013-05-23 Yao Qi <yao@codesourcery.com>
8008 Pedro Alves <palves@redhat.com>
8009
8010 * linux-low.c (lwp_in_step_range): New function.
8011 (linux_wait_1): If the thread was range stepping and stopped
8012 outside the stepping range, report the stop to GDB. Otherwise,
8013 continue stepping. Add range stepping debug output.
8014 (linux_set_resume_request): Copy the step range from the resume
8015 request to the lwp.
8016 (linux_supports_range_stepping): New.
8017 (linux_target_ops) <supports_range_stepping>: Set to
8018 linux_supports_range_stepping.
8019 * linux-low.h (struct linux_target_ops)
8020 <supports_range_stepping>: New field.
8021 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8022 * linux-x86-low.c (x86_supports_range_stepping): New.
8023 (the_low_target) <supports_range_stepping>: Set to
8024 x86_supports_range_stepping.
8025 * server.c (handle_v_cont): Handle 'r' action.
8026 (handle_v_requests): Append ";r" if the target supports range
8027 stepping.
8028 * target.h (struct thread_resume) <step_range_start,
8029 step_range_end>: New fields.
8030 (struct target_ops) <supports_range_stepping>:
8031 New field.
8032 (target_supports_range_stepping): New macro.
8033
8034 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8035
8036 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8037 confusion in comment.
8038
8039 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8040
8041 * lynx-low.c (struct process_info_private): New type.
8042 (lynx_add_process): New function.
8043 (lynx_create_inferior, lynx_attach): Replace calls to
8044 add_process by calls to lynx_add_process.
8045 (lynx_resume): If PTID is null, then try using
8046 current_process()->private->last_wait_event_ptid.
8047 Add comments.
8048 (lynx_clear_inferiors): Delete. The contents of that function
8049 has been inlined in lynx_mourn;
8050 (lynx_wait_1): Save the ptid in the process's private data.
8051 (lynx_mourn): Free the process' private data. Replace call
8052 to lynx_clear_inferiors by call to clear_inferiors.
8053
8054 2013-05-17 Yao Qi <yao@codesourcery.com>
8055
8056 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8057 the right place.
8058
8059 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8060
8061 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8062 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8063 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8064 PT_TEXT_END_ADDR guards. Update comments.
8065 (linux_target_op) <read_offsets>: Conditionally define to
8066 linux_read_offsets if the target is UCLIBC and if it defines
8067 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8068
8069 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8070 Andrew Jenner <andrew@codesourcery.com>
8071
8072 * Makefile.in (SFILES): Add linux-nios2-low.c.
8073 (clean): Add action to delete nios2-linux.c.
8074 (nios2-linux.c): New rule.
8075 * configure.srv: Add nios2*-*-linux*.
8076 * linux-nios2-low.c: New.
8077
8078 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8079
8080 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8081
8082 2013-04-25 Hui Zhu <hui@codesourcery.com>
8083
8084 PR gdb/15186
8085 * ax.c (ax_printf): Add fflush.
8086
8087 2013-04-22 Tom Tromey <tromey@redhat.com>
8088
8089 * Makefile.in (SFILES): Add filestuff.c.
8090 (OBS): Add filestuff.o.
8091 (filestuff.o): New target.
8092 * config.in, configure: Rebuild.
8093 * configure.ac: Check for fdwalk, pipe2.
8094
8095 2013-04-17 Pedro Alves <palves@redhat.com>
8096
8097 * configure.ac (USE_THREAD_DB): Delete variable.
8098 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8099 Don't AC_SUBST USE_THREAD_DB.
8100 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8101 * config.in, configure: Regenerate.
8102
8103 2013-04-16 Pedro Alves <palves@redhat.com>
8104
8105 * linux-low.h (struct lwp_info) <thread_known>: Move under
8106 the USE_THREAD_DB #ifdef.
8107
8108 2013-04-16 Pedro Alves <palves@redhat.com>
8109
8110 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8111 (linux-low.o): Delete rule.
8112 * linux-low.h: Always include "gdb_thread_db.h" instead of
8113 conditionally including thread_db.h.
8114 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8115 HAVE_THREAD_DB_H.
8116
8117 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8118
8119 * Makefile.in (install-only): Fix make install regression.
8120
8121 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8122
8123 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8124 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8125 installation.
8126 * gdbserver.1: Remove.
8127
8128 2013-03-22 Pedro Alves <palves@redhat.com>
8129
8130 * linux-low.c (handle_extended_wait): Don't call
8131 linux_enable_event_reporting.
8132
8133 2013-03-15 Tony Theodore <tonyt@logyst.com>
8134
8135 PR build/9098:
8136 * Makefile.in (SHELL): Use @SHELL@.
8137
8138 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8139
8140 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8141 compiler warning.
8142
8143 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8144
8145 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8146 Remove extraneous NULL element.
8147
8148 2013-03-13 Yao Qi <yao@codesourcery.com>
8149
8150 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8151 'V' block in trace frame.
8152
8153 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8154
8155 * target.h (struct target_ops): Add btrace ops.
8156 (target_supports_btrace): New macro.
8157 (target_enable_btrace): New macro.
8158 (target_disable_btrace): New macro.
8159 (target_read_btrace): New macro.
8160 * gdbthread.h (struct thread_info): Add btrace field.
8161 * server.c: Include btrace-common.h.
8162 (handle_btrace_general_set): New function.
8163 (handle_btrace_enable): New function.
8164 (handle_btrace_disable): New function.
8165 (handle_general_set): Call handle_btrace_general_set.
8166 (handle_qxfer_btrace): New function.
8167 (struct qxfer qxfer_packets[]): Add btrace entry.
8168 * inferiors.c (remove_thread): Disable btrace.
8169 * linux-low: Include linux-btrace.h.
8170 (linux_low_enable_btrace): New function.
8171 (linux_low_read_btrace): New function.
8172 (linux_target_ops): Add btrace ops.
8173 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8174 Add srv_linux_btrace=yes.
8175 (x86_64-*-linux*): Add linux-btrace.o.
8176 Add srv_linux_btrace=yes.
8177 * configure.ac: Define HAVE_LINUX_BTRACE.
8178 * config.in: Regenerated.
8179 * configure: Regenerated.
8180
8181 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8182
8183 * server.c (handle_qxfer): Preserve error message if -3 is
8184 returned.
8185 (qxfer): Document the -3 return value.
8186
8187 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8188
8189 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8190 (linux_btrace_h): New variable.
8191 (linux-btrace.o): New rule.
8192
8193 2013-03-08 Stan Shebs <stan@codesourcery.com>
8194 Hafiz Abid Qadeer <abidh@codesourcery.com>
8195
8196 * tracepoint.c (trace_buffer_size): New global.
8197 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8198 (init_trace_buffer): Change to one-argument function. Allocate
8199 trace buffer memory.
8200 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8201 handle QTBuffer:size packet.
8202 (cmd_bigqtbuffer_size): New function.
8203 (initialize_tracepoint): Call init_trace_buffer with
8204 DEFAULT_TRACE_BUFFER_SIZE.
8205 * server.c (handle_query): Add QTBuffer:size in the
8206 supported packets.
8207
8208 2013-03-07 Yao Qi <yao@codesourcery.com>
8209
8210 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8211 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8212 of -1.
8213 (cmd_qtsp): Adjust condition. Do post increment.
8214 Set cur_action and cur_step_action back to 0.
8215
8216 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8217
8218 PR server/15236
8219 * linux-low.c (linux_write_memory): Return early success if LEN is
8220 zero.
8221
8222 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8223
8224 * configure.srv: Add x86_64-*-cygwin* as target.
8225
8226 2013-02-28 Tom Tromey <tromey@redhat.com>
8227
8228 * configure.ac: Invoke AC_SYS_LARGEFILE.
8229 * configure, config.in: Rebuild.
8230
8231 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8232
8233 * win32-low.c: Throughout, fix format strings and casts of
8234 printf-like functions to avoid type related warnings on all
8235 platforms.
8236 (get_child_debug_event): Print dwDebugEventCode as hex since
8237 that's how it's usually documented.
8238
8239 2013-02-28 Yao Qi <yao@codesourcery.com>
8240
8241 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8242 pulongest.
8243
8244 2013-02-27 Jiong Wang <jiwang@tilera.com>
8245
8246 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8247 (reg-tilegx32.c): New rule.
8248 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8249 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8250 different register info initializer according to elf class.
8251 (init_registers_tilgx32): New function. The tilegx32 register info
8252 initializer.
8253 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8254 (tile_store_gregset): Likewise.
8255
8256 2013-02-27 Yao Qi <yao@codesourcery.com>
8257
8258 * server.c (process_point_options): Print debug message when
8259 debug_threads is true.
8260
8261 2013-02-26 Yao Qi <yao@codesourcery.com>
8262
8263 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8264
8265 2013-02-19 Pedro Alves <palves@redhat.com>
8266 Kai Tietz <ktietz@redhat.com>
8267
8268 PR gdb/15161
8269
8270 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8271 instead of strtoul to extract address from packet.
8272 (process_serial_event) <'z'>: Likewise.
8273
8274 2013-02-18 Yao Qi <yao@codesourcery.com>
8275
8276 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8277
8278 2013-02-14 Pedro Alves <palves@redhat.com>
8279
8280 Plug memory leak.
8281
8282 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8283 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8284
8285 2013-02-14 Pedro Alves <palves@redhat.com>
8286
8287 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8288
8289 2013-02-14 Pedro Alves <palves@redhat.com>
8290
8291 * tracepoint.c (save_string): Delete.
8292 (add_tracepoint_action): Use savestring instead of save_string.
8293
8294 2013-02-12 Pedro Alves <palves@redhat.com>
8295
8296 * linux-xtensa-low.c: Ditto.
8297 * xtensa-xtregs.c: Ditto.
8298
8299 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8300
8301 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8302 thread_db.
8303
8304 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8305
8306 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8307 aarch64_num_wp_regs and aarch64_num_bp_regs to
8308 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8309
8310 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8311
8312 * linux-aarch64-low.c (ps_get_thread_area): Replace
8313 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8314
8315 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8316 Marcus Shawcroft <marcus.shawcroft@arm.com>
8317 Nigel Stephens <nigel.stephens@arm.com>
8318 Yufeng Zhang <yufeng.zhang@arm.com>
8319
8320 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8321 (aarch64.c, aarch64-without-fpu.c): New targets.
8322 * configure.srv (aarch64*-*-linux*): New.
8323 * linux-aarch64-low.c: New file.
8324
8325 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8326
8327 * linux-low.c (handle_extended_wait, linux_create_inferior)
8328 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8329 (dequeue_one_deferred_signal, linux_resume_one_thread)
8330 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8331 (linux_tracefork_grandchild, linux_test_for_tracefork)
8332 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8333 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8334 where the argument is 0.
8335
8336 2013-01-25 Yao Qi <yao@codesourcery.com>
8337
8338 * event-loop.c: Include "queue.h".
8339 (gdb_event_p): New typedef.
8340 (struct gdb_event) <next_event>: Remove.
8341 (event_queue): Change to QUEUE(gdb_event_p).
8342 (async_queue_event): Remove.
8343 (gdb_event_xfree): New.
8344 (initialize_event_loop): New.
8345 (process_event): Use API from QUEUE.
8346 (wait_for_event): Likewise.
8347 * server.c (main): Call initialize_event_loop.
8348 * server.h (initialize_event_loop): Declare.
8349
8350 2013-01-18 Yao Qi <yao@codesourcery.com>
8351
8352 * ax.h (struct eval_agent_expr_context): New.
8353 (gdb_eval_agent_expr): Update declaration.
8354 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8355 TFRAME. Add new argument CTX.
8356 * server.h (struct eval_agent_expr_context): Declare.
8357 (agent_mem_read, agent_tsv_read): Update declaration.
8358 (agent_mem_read_string): Likewise.
8359 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8360 (add_traceframe_block): Add new argument TPOINT.
8361 Increase TPOINT->traceframe_usage.
8362 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8363 eval_tracepoint_agent_expr.
8364 (condition_true_at_tracepoint): Likewise.
8365 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8366 (agent_mem_read_string, agent_tsv_read): Likewise.
8367
8368 2013-01-16 Yao Qi <yao@codesourcery.com>
8369
8370 * linux-low.c (linux_resume_one_lwp): Don't check
8371 'lwp->bp_reinsert != 0'.
8372
8373 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8374 Pedro Alves <palves@redhat.com>
8375
8376 * lynx-low.c (ptrace_request_to_str): Define a temporary
8377 macro and use it to simplify this function's implementation.
8378
8379 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8380
8381 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8382 sets errno.
8383
8384 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8385
8386 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8387
8388 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8389
8390 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8391
8392 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8393
8394 * lynx-low.c (lynx_resume): Use the resume_info parameter
8395 to determine the ptid for the lynx_ptrace call, unless
8396 it is equal to minus_one_ptid, in which case we use the
8397 ptid of the current_inferior.
8398 (lynx_wait_1): After having received a thread create/exit
8399 event, resume the inferior's execution using the signaling
8400 thread's ptid, rather than the old ptid.
8401
8402 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8403
8404 * lynx-low.c (lynx_resume): Delete variable ret.
8405
8406 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8407
8408 * gdbreplay.c (gdbreplay_version): Update copyright year.
8409 * server.c (gdbserver_version): Likewise.
8410
8411 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8412
8413 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8414 new thread.
8415
8416 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8417
8418 * lynx-low.c (ptrace_request_to_str): Add handling for
8419 PTRACE_GETTRACESIG.
8420
8421 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8422
8423 * lynx-low.c (lynx_attach): Delete variable new_process.
8424
8425 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8426
8427 * lynx-low.c (lynx_create_inferior): Delete variable
8428 new_process.
8429
8430 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8431
8432 * lynx-low.c (ptrace_request_to_str): Do not handle
8433 PTRACE_GETTHREADLIST if this macro does not exist.
8434
8435 2012-12-15 Yao Qi <yao@codesourcery.com>
8436
8437 * Makefile.in (OBS): Add notif.o.
8438 * notif.c, notif.h: New.
8439 * server.c: Include "notif.h".
8440 (struct vstop_notif) <next>: Remove.
8441 <base>: New field.
8442 (queue_stop_reply): Update.
8443 (push_event, send_next_stop_reply): Remove.
8444 (discard_queued_stop_replies): Update.
8445 (notif_stop): New variable.
8446 (handle_v_stopped): Remove.
8447 (handle_v_requests): Don't call handle_v_stopped. Call
8448 handle_ack_notif instead.
8449 (queue_stop_reply_callback): Call notif_event_enque instead
8450 of queue_stop_reply.
8451 (handle_status): Don't call send_next_stop_reply, call
8452 notif_write_event instead.
8453 (kill_inferior_callback): Likewise.
8454 (detach_or_kill_inferior_callback): Likewise.
8455 (main): Call initialize_notif.
8456 (process_serial_event): Call QUEUE_is_empty.
8457 (handle_target_event): Call notif_push instead of push event.
8458 * server.h (push_event): Remove declaration.
8459
8460 2012-12-10 Tom Tromey <tromey@redhat.com>
8461
8462 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8463 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8464 macros.
8465 (.c.o): Rewrite.
8466 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8467 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8468 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8469 (amd64-linux-ipa.o, ax.o): Rewrite.
8470 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8471 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8472 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8473 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8474 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8475 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8476 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8477 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8478 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8479 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8480 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8481 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8482 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8483 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8484 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8485 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8486 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8487 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8488 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8489 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8490 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8491 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8492 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8493 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8494 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8495 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8496 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8497 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8498 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8499 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8500 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8501 (reg-tilegx.o): Remove.
8502 (all_object_files): New macro.
8503 Include .deps files.
8504 * aclocal.m4, configure: Rebuild.
8505 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8506 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8507 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8508
8509 2012-12-05 Tom Tromey <tromey@redhat.com>
8510
8511 PR gdb/14917:
8512 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8513
8514 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8515
8516 * configure.ac: Check for linux/perf_event.h.
8517 * config.in: Regenerated.
8518 * configure: Regenerated.
8519
8520 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8521
8522 * hostio.c (handle_readlink): Decrease buffer size
8523 parameter passed to readlink by one byte.
8524
8525 2012-11-26 Yao Qi <yao@codesourcery.com>
8526
8527 * configure.ac (build_warnings): Append '-Wempty-body'.
8528 * configure: Regenerated.
8529 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8530 body.
8531
8532 2012-11-15 Pierre Muller <muller@sourceware.org>
8533
8534 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8535 * config.in: Regenerate.
8536 * configure: Regenerate.
8537 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8538 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8539 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8540 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8541 header.
8542 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8543 instead of <sys/wait.h> header.
8544 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8545
8546 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8547
8548 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8549 (various make rules): Remove -DGDBSERVER
8550
8551 2012-11-09 Yao Qi <yao@codesourcery.com>
8552
8553 * spu-low.c (current_ptid): Move it to ..
8554 * gdbthread.h: ... here. New.
8555 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8556 * server.c (myresume, process_serial_event): Likewise.
8557 * thread-db.c (thread_db_find_new_threads): Likewise.
8558 * tracepoint.c (run_inferior_command): Likewise.
8559
8560 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8561
8562 * server.c (handle_search_memory_1): Include access length in
8563 warning message.
8564
8565 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8566
8567 * linux-crisv32-low.c: Fix compile errors.
8568
8569 2012-09-04 Yao Qi <yao@codesourcery.com>
8570
8571 * tracepoint.c (cmd_qtsv): Adjust debug message.
8572 Don't check CUR_TPOINT.
8573
8574 2012-08-28 Yao Qi <yao@codesourcery.com>
8575
8576 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8577 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8578 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8579 Remove declarations of xmalloc, xreallloc, xstrdup and
8580 freeargv.
8581 * Makefile.in (libiberty_h): New.
8582 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8583 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8584
8585 2012-08-23 Yao Qi <yao@codesourcery.com>
8586
8587 * server.h: Remove declaration of 'xsnprintf'.
8588
8589 2012-08-22 Keith Seitz <keiths@redhat.com>
8590
8591 * server.h: Include build-gnulib-gbserver/config.h.
8592 * gdbreplay.c: Likewise.
8593
8594 2012-08-08 Doug Evans <dje@google.com>
8595
8596 * Makefile.in (SFILES): Add gdb_vecs.c.
8597 (OBS): Add gdb_vecs.o.
8598 (gdb_vecs_h, host_defs_h): New variables.
8599 (thread-db.o): Add $(gdb_vecs_h) dependency.
8600 (gdb_vecs.o): New rule.
8601 * thread-db.c: #include "gdb_vecs.h".
8602 (thread_db_load_search): Use a vector to iterate over path elements.
8603 Handle text appearing after "$pdir".
8604
8605 * configure.ac: Add check for strstr.
8606 * config.in: Regenerate.
8607 * configure: Regenerate.
8608
8609 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8610
8611 * hostio.c (handle_pread): If pread fails, fall back to attempting
8612 lseek/read.
8613 (handle_pwrite): Likewise for pwrite.
8614
8615 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8616
8617 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8618 between unsupported TYPE and unimplementable ADDR/LEN combination.
8619 (arm_insert_point): Act on new return value.
8620
8621 2012-07-31 Pedro Alves <palves@redhat.com>
8622
8623 * server.c (process_point_options): Only skip tokens if we find
8624 one that is unrecognized. Don't treat 'X' specially while
8625 skipping unrecognized tokens.
8626
8627 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8628
8629 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8630 to 4-byte-align HW breakpoint addresses for Thumb.
8631
8632 2012-07-27 Yao Qi <yao@codesourcery.com>
8633
8634 PR remote/14161.
8635
8636 * server.h: Declare gdb_agent_about_to_close.
8637 * target.c (kill_inferior): Include "agent.h".
8638 New. Send command 'kill'.
8639 * target.h (kill_inferior): Removed macro.
8640 * tracepoint.c (gdb_agent_about_to_close): New.
8641 (gdb_agent_helper_thread): Handle command 'close'.
8642 Wait endlessly until the inferior stops.
8643 Install gdb_agent_remove_socket to atexit hook.
8644 (agent_socket_name): New static variable.
8645 (gdb_agent_socket_init): Replace local variable 'name' with
8646 'agent_socket_name'.
8647 (gdb_agent_remove_socket): New.
8648
8649 2012-07-27 Yao Qi <yao@codesourcery.com>
8650
8651 * server.c (process_point_options): Stop at 'X' when parsing.
8652
8653 2012-07-19 Michael Eager <eager@eagercon.com>
8654
8655 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8656 to hw_execute.
8657 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8658 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8659 hardware breakpoint.
8660
8661 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8662
8663 * gdbserver/linux-low.c (initialize_low): Call
8664 linux_ptrace_init_warnings.
8665
8666 2012-07-02 Doug Evans <dje@google.com>
8667
8668 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8669 pointer to int.
8670
8671 2012-07-02 Stan Shebs <stan@codesourcery.com>
8672
8673 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8674 (ax.o): Add it to build rule.
8675 (ax-ipa.o): Ditto.
8676 (OBS): Add format.o.
8677 (IPA_OBS): Add format.o.
8678 * server.c (handle_query): Claim support for breakpoint commands.
8679 (process_point_options): Add command case.
8680 (process_serial_event): Leave running if there are printfs in
8681 effect.
8682 * mem-break.h (any_persistent_commands): Declare.
8683 (add_breakpoint_commands): Declare.
8684 (gdb_no_commands_at_breakpoint): Declare.
8685 (run_breakpoint_commands): Declare.
8686 * mem-break.c (struct point_command_list): New struct.
8687 (struct breakpoint): New field command_list.
8688 (any_persistent_commands): New function.
8689 (add_commands_to_breakpoint): New function.
8690 (add_breakpoint_commands): New function.
8691 (gdb_no_commands_at_breakpoint): New function.
8692 (run_breakpoint_commands): New function.
8693 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8694 locally.
8695 * ax.c: Include format.h.
8696 (ax_printf): New function.
8697 (gdb_eval_agent_expr): Add printf opcode.
8698
8699 2012-06-13 Yao Qi <yao@codesourcery.com>
8700
8701 * server.c (start_inferior): Remove duplicated writes to fields
8702 'last_resume_kind' and 'last_status' of 'current_inferior'.
8703
8704 2012-06-12 Yao Qi <yao@codesourcery.com>
8705 Pedro Alves <palves@redhat.com>
8706
8707 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8708 comment.
8709 * server.c (handle_v_cont): Extend comment.
8710
8711 2012-06-11 Yao Qi <yao@codesourcery.com>
8712
8713 * linux-low.c (linux_attach): Add 'static'.
8714
8715 2012-06-06 Yao Qi <yao@codesourcery.com>
8716
8717 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8718
8719 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8720
8721 Fix gcc -flto compilation warning.
8722 * server.c (main): Make variable multi_mode and attach volatile.
8723
8724 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8725
8726 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8727 if the platform doesn't know about it.
8728
8729 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8730
8731 * Makefile.in (SFILES): Add linux-tile-low.c.
8732 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8733 * configure.srv: Handle tilegx-*-linux*.
8734 * linux-tile-low.c: New file.
8735
8736 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8737
8738 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8739
8740 2012-05-24 Pedro Alves <palves@redhat.com>
8741
8742 PR gdb/7205
8743
8744 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8745
8746 2012-05-24 Pedro Alves <palves@redhat.com>
8747
8748 PR gdb/7205
8749
8750 Replace target_signal with gdb_signal throughout.
8751
8752 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8753
8754 * linux-low.c (linux_store_registers): Avoid the copying sequence
8755 when no data has been retrieved by ptrace.
8756
8757 2012-05-22 Will Deacon <will.deacon@arm.com>
8758
8759 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8760 Include asm/ptrace.h.
8761 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8762 already defined.
8763
8764 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8765
8766 * linux-low.c (linux_store_registers): Don't re-retrieve data
8767 with ptrace that has already been obtained from /proc. Always
8768 copy any data retrieved with ptrace to the buffer supplied.
8769
8770 2012-05-11 Yao Qi <yao@codesourcery.com>
8771 Pedro Alves <palves@redhat.com>
8772
8773 * linux-low.c (enum stopping_threads_kind): New.
8774 (stopping_threads): Change type to `enum stopping_threads_kind'.
8775 (handle_extended_wait): If stopping and suspending threads, leave
8776 the new_lwp suspended too.
8777 (linux_wait_for_event): Adjust.
8778 (stop_all_lwps): Set `stopping_threads' to
8779 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8780 whether we're suspending threads or just stopping them. Assert no
8781 recursion happens.
8782
8783 2012-04-29 Yao Qi <yao@codesourcery.com>
8784
8785 * server.h: Move some code to ...
8786 * gdbthread.h: ... here. New.
8787 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8788 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8789 (nto-low.o, win32-low.o): Likewise.
8790 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8791 * regcache.c, remote-utils.c, server.c: Likewise.
8792 * target.c, tracepoint.c, win32-low.c: Likewise.
8793
8794 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8795
8796 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8797 (PTRACE_ARG4_TYPE): Likewise.
8798 (PTRACE_XFER_TYPE): Likewise.
8799 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8800 ptrace to PTRACE_ARG3_TYPE.
8801 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8802 (PTRACE_ARG4_TYPE): Likewise.
8803 (PTRACE_XFER_TYPE): Likewise.
8804 (linux_detach_one_lwp): Cast fourth argument of
8805 ptrace to long then PTRACE_ARG4_TYPE.
8806 (regsets_fetch_inferior_registers): Cast third argument of
8807 ptrace to long then PTRACE_ARG3_TYPE.
8808 (regsets_store_inferior_registers): Likewise.
8809
8810 2012-04-20 Pedro Alves <palves@redhat.com>
8811
8812 * configure: Regenerate.
8813
8814 2012-04-19 Pedro Alves <palves@redhat.com>
8815
8816 * Makefile.in (GNULIB_BUILDDIR): New.
8817 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8818 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8819 (all, install-only, uninstall, clean-info, all-lib, clean): No
8820 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8821 (maintainer-clean realclean distclean): Use subdir_do.
8822 (subdir_do): New.
8823 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8824 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8825 * acinclude.m4: Include acx_configure_dir.m4.
8826 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8827 calls. Call AC_PROG_RANLIB. Configure gnulib using
8828 ACX_CONFIGURE_DIR.
8829 (GNULIB): New.
8830 (GNULIB_STDINT_H): Adjust.
8831 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8832 * gdbreplay.c: Include build-gnulib/config.h.
8833 * server.h: Likewise.
8834 * aclocal.m4: Regenerate.
8835 * config.in: Regenerate.
8836 * configure: Regenerate.
8837
8838 2012-04-19 Pedro Alves <palves@redhat.com>
8839
8840 * Makefile.in (LIBGNU, INCGNU): Adjust.
8841 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8842 (all, install-only, uninstall, clean-info, all-lib, clean)
8843 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8844 * configure.ac: Adjust AC_OUTPUT output.
8845 * aclocal.m4: Regenerate.
8846 * configure: Regenerate.
8847
8848 2012-04-19 Pedro Alves <palves@redhat.com>
8849
8850 * Makefile.in (generated_files): New.
8851 (server_h): Remove the explicit dependency on config.h, and depend
8852 on $generated_files.
8853
8854 2012-04-19 Pedro Alves <palves@redhat.com>
8855
8856 * Makefile.in (INCGNU): Add -Ignulib.
8857
8858 2012-04-19 Pedro Alves <palves@redhat.com>
8859
8860 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8861 (INCGNU): ... this, and spell out -I here.
8862 (GNULIB_LIB): Rename to ...
8863 (LIBGNU): ... this.
8864 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8865
8866 2012-04-19 Pedro Alves <palves@redhat.com>
8867
8868 * config.in: Regenerate.
8869
8870 2012-04-19 Pedro Alves <palves@redhat.com>
8871
8872 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8873 * server.h (memmem): Remove declaration.
8874 * config.in: Regenerate.
8875 * configure: Regenerate.
8876
8877 2012-04-19 Yao Qi <yao@codesourcery.com>
8878
8879 * Makefile.in (SFILES): Add common/vec.c.
8880 (OBS): Add vec.o.
8881 (vec.o): New rule.
8882
8883 2012-04-19 Yao Qi <yao@codesourcery.com>
8884
8885 * remote-utils.c (prepare_resume_reply): Replace with macro
8886 target_core_of_thread.
8887 * server.c (handle_qxfer_threads_proper): Likewise.
8888 * target.h (traget_core_of_thread): New macro.
8889
8890 2012-04-18 Pedro Alves <palves@redhat.com>
8891
8892 * aclocal.m4: Regenerate.
8893 * configure: Regenerate.
8894
8895 2012-04-16 Yao Qi <yao@codesourcery.com>
8896
8897 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8898 duplicated on address.
8899
8900 2012-04-16 Yao Qi <yao@codesourcery.com>
8901
8902 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8903 (struct tracepoint_action_ops) <send>: New field.
8904 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8905 (agent_expr_send, x_tracepoint_action_send): New.
8906 (l_tracepoint_action_send): New.
8907 (cmd_qtdp): Download and install tracepoint
8908 according to `use_agent'.
8909 (run_inferior_command): Add one more parameter `len'.
8910 Update callers.
8911 (tracepoint_send_agent): New.
8912 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8913
8914 2012-04-16 Yao Qi <yao@codesourcery.com>
8915
8916 * tracepoint.c (download_tracepoints): Moved to ...
8917 (cmd_qtstart): ... here.
8918
8919 2012-04-14 Yao Qi <yao@codesourcery.com>
8920
8921 * tracepoint.c: Include inttypes.h.
8922 (struct collect_memory_action): Use sized types.
8923 (struct tracepoint): Likewise.
8924 (cmd_qtdp, stop_tracing): Update print specifiers.
8925 (cmd_qtp, response_tracepoint): Likewise.
8926 (collect_data_at_tracepoint): Likewise.
8927 (collect_data_at_step): Likewise.
8928
8929 2012-04-14 Yao Qi <yao@codesourcery.com>
8930
8931 Import gnulib module inttypes.
8932 * aclocal.m4, config.in, configure: Regenerated.
8933
8934 2012-04-14 Yao Qi <yao@codesourcery.com>
8935
8936 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8937 Makefile and config.status at last.
8938
8939 2012-04-13 Yao Qi <yao@codesourcery.com>
8940
8941 * tracepoint.c: Include stdint.h unconditionally.
8942
8943 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8944
8945 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8946 on BFD_HAVE_SYS_PROCFS_TYPE.
8947 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8948 * configure: Regenerate.
8949 * config.in: Likewise.
8950
8951 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8952
8953 * Makefile.in (clean): Also remove x32.c x32-linux.c
8954 x32-avx.c x32-avx-linux.c.
8955 (x32.o): New target.
8956 (x32.c): Likewise.
8957 (x32-linux.o): Likewise.
8958 (x32-linux.c): Likewise.
8959 (x32-avx.o): Likewise.
8960 (x32-avx.c): Likewise.
8961 (x32-avx-linux.o): Likewise.
8962 (x32-avx-linux.c): Likewise.
8963
8964 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8965 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8966 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8967 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8968 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8969 i386/x32-avx-linux.xml.
8970
8971 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8972 (init_registers_x32_avx_linux): Likwise.
8973 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8974 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8975
8976 2012-04-13 Pedro Alves <palves@redhat.com>
8977
8978 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8979 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8980 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8981 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8982 the sub-make.
8983
8984 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8985
8986 * linux-x86-low.c (compat_x32_clock_t): New.
8987 (compat_x32_siginfo_t): Likewise.
8988 (compat_x32_siginfo_from_siginfo): Likewise.
8989 (siginfo_from_compat_x32_siginfo): Likewise.
8990 (linux_is_elf64): Likewise.
8991 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8992 and siginfo_from_compat_x32_siginfo for x32.
8993 (x86_arch_setup): Set linux_is_elf64.
8994
8995 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8996
8997 PR gdb/13969
8998 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8999 e_machine field.
9000 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9001 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9002 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9003 compatible with process.
9004
9005 2012-04-12 Yao Qi <yao@codesourcery.com>
9006
9007 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9008 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9009 (install-only, install-info, clean): Handle sub dir gnulib.
9010 (all-lib, am--refresh): New targets.
9011 (memmem.o): Remove target.
9012 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9013 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9014 (AC_REPLACE_FUNCS): Remove memmem.
9015 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9016 (AC_OUTPUT): Generate Makefile in gnulib/.
9017 * aclocal.m4, config.in, configure: Regenerated.
9018
9019 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9020
9021 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9022
9023 2012-04-05 Pedro Alves <palves@redhat.com>
9024
9025 -Werror=strict-aliasing
9026
9027 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9028 pointer.
9029
9030 2012-04-04 Pedro Alves <palves@redhat.com>
9031
9032 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9033 (sparc_store_gregset_from_stack, sparc_store_gregset)
9034 (sparc_breakpoint_at): Fix formatting.
9035
9036 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9037
9038 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9039 are available.
9040 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9041 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9042 * config.in: Regenerate.
9043 * configure: Likewise.
9044
9045 2012-03-29 Pedro Alves <palves@redhat.com>
9046
9047 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9048 Correct ptrace arguments.
9049
9050 2012-03-28 Pedro Alves <palves@redhat.com>
9051
9052 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9053 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9054 (IA64_FR1_REGNUM): New defines.
9055 (ia64_fetch_register): New.
9056 (the_low_target): Install it.
9057 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9058 field.
9059 * linux-low.c (linux_fetch_registers): Try the
9060 the_low_target.fetch_register hook first.
9061
9062 * linux-arm-low.c (the_low_target): Adjust.
9063 * linux-bfin-low.c (the_low_target): Adjust.
9064 * linux-cris-low.c (the_low_target): Adjust.
9065 * linux-crisv32-low.c (the_low_target): Adjust.
9066 * linux-m32r-low.c (the_low_target): Adjust.
9067 * linux-m68k-low.c (the_low_target): Adjust.
9068 * linux-mips-low.c (the_low_target): Adjust.
9069 * linux-ppc-low.c (the_low_target): Adjust.
9070 * linux-s390-low.c (the_low_target): Adjust.
9071 * linux-sh-low.c (the_low_target): Adjust.
9072 * linux-sparc-low.c (the_low_target): Adjust.
9073 * linux-tic6x-low.c (the_low_target): Adjust.
9074 * linux-x86-low.c (the_low_target): Adjust.
9075 * linux-xtensa-low.c (the_low_target): Adjust.
9076
9077 2012-03-26 Pedro Alves <palves@redhat.com>
9078
9079 * server.c (handle_qxfer_libraries): Don't bail early if
9080 the_target->qxfer_libraries_svr4 is not NULL.
9081
9082 2012-03-26 Pedro Alves <palves@redhat.com>
9083
9084 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9085
9086 2012-03-23 Pedro Alves <palves@redhat.com>
9087
9088 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9089 "library-list-svr4" element's start tag when the the DSO list is
9090 empty.
9091
9092 2012-03-23 Pedro Alves <palves@redhat.com>
9093
9094 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9095 a variable whose type size is the same as the inferior's pointer
9096 size.
9097
9098 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9099
9100 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9101 struct siginfo.
9102 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9103 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9104 * linux-low.h: Include <signal.h>.
9105 (struct siginfo): Remove forward declaration.
9106 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9107 struct siginfo.
9108
9109 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9110
9111 * .gitignore: Ignore more files.
9112
9113 2012-03-19 Pedro Alves <palves@redhat.com>
9114 Jan Kratochvil <jan.kratochvil@redhat.com>
9115
9116 * server.c (cont_thread, general_thread): Add describing comments.
9117 (start_inferior): Clear `cont_thread'.
9118 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9119 of a process.
9120
9121 2012-03-15 Yao Qi <yao@codesourcery.com>
9122
9123 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9124 handling to ...
9125 (cmd_qtdp): ... here.
9126
9127 2012-03-15 Yao Qi <yao@codesourcery.com>
9128
9129 * tracepoint.c (struct tracepoint_action_ops): New.
9130 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9131 (m_tracepoint_action_download): New.
9132 (r_tracepoint_action_download): New.
9133 (x_tracepoint_action_download): New.
9134 (l_tracepoint_action_download): New.
9135 (add_tracepoint_action): Install `action->ops' according type.
9136 (download_tracepoint_1): Move code `download' function pointer
9137 of various tracepoint_action_ops.
9138
9139 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9140
9141 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9142 linux_ptrace_attach_warnings.
9143
9144 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9145
9146 * Makefile.in (linux-ptrace.o): New.
9147 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9148 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9149 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9150 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9151 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9152 of these targets.
9153 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9154
9155 2012-03-08 Yao Qi <yao@codesourcery.com>
9156 Pedro Alves <palves@redhat.com>
9157
9158 Fix PR server/13392.
9159 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9160 offset of JMP insn.
9161 * tracepoint.c (remove_tracepoint): New.
9162 (cmd_qtdp): Call remove_tracepoint when failed to install.
9163
9164 2012-03-07 Pedro Alves <palves@redhat.com>
9165
9166 * linux-low.c (get_detach_signal): New.
9167 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9168 Pass on pending signals to PTRACE_DETACH. Check the result of the
9169 ptrace call.
9170 * server.c (program_signals, program_signals_p): New.
9171 (handle_general_set): Handle QProgramSignals.
9172 * server.h (program_signals, program_signals_p): Declare.
9173
9174 2012-03-05 Pedro Alves <palves@redhat.com>
9175 Jan Kratochvil <jan.kratochvil@redhat.com>
9176
9177 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9178 New comment why.
9179
9180 2012-03-03 Yao Qi <yao@codesourcery.com>
9181
9182 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9183 agent_look_up_symbols.
9184
9185 2012-03-03 Yao Qi <yao@codesourcery.com>
9186
9187 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9188 (linux-x86-low.o): Likewise.
9189 * server.h: Remove in_process_agent_loaded.
9190 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9191 common/agent.c.
9192 Update callers.
9193
9194 2012-03-03 Yao Qi <yao@codesourcery.com>
9195
9196 * tracepoint.c (gdb_agent_capability): New global.
9197 (in_process_agent_loaded_ust): Renamed to
9198 `in_process_agent_supports_ust'.
9199 Update callers.
9200 (in_process_agent_supports_ust): Call agent_capability_check.
9201 (clear_installed_tracepoints): Assert that agent supports
9202 agent.
9203
9204 2012-03-03 Yao Qi <yao@codesourcery.com>
9205
9206 * linux-low.c (linux_supports_agent): New.
9207 (linux_target_ops): Initialize field `supports_agent' with
9208 linux_supports_agent.
9209 * target.h (struct target_ops) <supports_agent>: New.
9210 (target_supports_agent): New macro.
9211 * server.c (handle_general_set): Handle packet 'QAgent'.
9212 (handle_query): Send `QAgent+'.
9213 * Makefile.in (server.o): Depends on agent.h.
9214
9215 2012-03-03 Yao Qi <yao@codesourcery.com>
9216
9217 * Makefile.in (OBS): Add agent.o.
9218 Add new rule for agent.o.
9219 Track dependence of tracepoint.c on agent.h.
9220 * tracepoint.c (run_inferior_command_1):
9221 (run_inferior_command): Call agent_run_command.
9222 (gdb_ust_connect_sync_socket): Deleted. Move it to
9223 common/agent.c.
9224 (resume_thread, stop_thread): Likewise.
9225 (gdb_ust_socket_init): Renamed to ...
9226 (gdb_agent_socket_init): ... New.
9227 (gdb_ust_thread): Renamed to ...
9228 (gdb_agent_helper_thread): ... New.
9229 (gdb_ust_init): Move some code to ...
9230 (gdb_agent_init): ... here. New.
9231 [HAVE_UST]: Call gdb_ust_init.
9232 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9233 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9234 * config.in, configure: Regenerated.
9235
9236 2012-03-02 Pedro Alves <palves@redhat.com>
9237
9238 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9239 * linux-low.c (struct simple_pid_list): New.
9240 (stopped_pids): New a struct simple_pid_list pointer.
9241 (add_to_pid_list, pull_pid_from_list): New.
9242 (handle_extended_wait): Don't assume the first signal new children
9243 report is SIGSTOP. Adjust call to pull_pid_from_list.
9244 (linux_wait_for_lwp): Adjust.
9245
9246 2012-03-02 Yao Qi <yao@codesourcery.com>
9247
9248 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9249 debug log.
9250
9251 2012-03-02 Yao Qi <yao@codesourcery.com>
9252
9253 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9254 `stop_pc' and `tpoint'. Update caller.
9255
9256 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9257
9258 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9259 * linux-low.c (use_linux_regsets): New macro.
9260 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9261 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9262 (linux_register_in_regsets): New function.
9263 (usr_fetch_inferior_registers): Skip registers covered by
9264 regsets.
9265 (usr_store_inferior_registers): Likewise.
9266 (usr_fetch_inferior_registers): New macro.
9267 (usr_store_inferior_registers): Likewise.
9268 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9269 (linux_store_registers): Likewise.
9270 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9271 prototype.
9272 (init_registers_mips64_dsp_linux): Likewise.
9273 (init_registers_mips_linux): New macro.
9274 (init_registers_mips_dsp_linux): Likewise.
9275 (mips_dsp_num_regs): Likewise.
9276 (DSP_BASE, DSP_CONTROL): New fallback macros.
9277 (mips_base_regs): New macro.
9278 (mips_regmap): Use it. Fix the size.
9279 (mips_dsp_regmap): New variable.
9280 (mips_dsp_regset_bitmap): Likewise.
9281 (mips_arch_setup): New function.
9282 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9283 than mips_regmap.
9284 (mips_cannot_store_register): Likewise.
9285 (the_low_target): Update .arch_setup, .num_regs and .regmap
9286 initializers. Add .regset_bitmap initializer.
9287 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9288 initializer.
9289 * linux-bfin-low.c (the_low_target): Likewise.
9290 * linux-cris-low.c (the_low_target): Likewise.
9291 * linux-crisv32-low.c (the_low_target): Likewise.
9292 * linux-ia64-low.c (the_low_target): Likewise.
9293 * linux-m32r-low.c (the_low_target): Likewise.
9294 * linux-m68k-low.c (the_low_target): Likewise.
9295 * linux-ppc-low.c (the_low_target): Likewise.
9296 * linux-s390-low.c (the_low_target): Likewise.
9297 * linux-sh-low.c (the_low_target): Likewise.
9298 * linux-sparc-low.c (the_low_target): Likewise.
9299 * linux-tic6x-low.c (the_low_target): Likewise.
9300 * linux-x86-low.c (the_low_target): Likewise.
9301 * linux-xtensa-low.c (the_low_target): Likewise.
9302 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9303 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9304 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9305 srv_xmlfiles.
9306 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9307 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9308
9309 2012-02-29 Yao Qi <yao@codesourcery.com>
9310 Pedro Alves <palves@redhat.com>
9311
9312 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9313 `step_over_finished' is true.
9314
9315 2012-02-27 Pedro Alves <palves@redhat.com>
9316
9317 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9318 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9319
9320 2012-02-27 Pedro Alves <palves@redhat.com>
9321
9322 PR server/9684
9323 * linux-low.c (pid_is_stopped): New.
9324 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9325
9326 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9327
9328 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9329 of conditions.
9330
9331 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9332
9333 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9334
9335 2012-02-24 Luis Machado <lgustavo@codesourcery>
9336
9337 * server.c (handle_query): Advertise support for target-side
9338 breakpoint condition evaluation.
9339 (process_point_options): New function.
9340 (process_serial_event): When inserting a breakpoint, check for
9341 a target-side condition that should be evaluated.
9342
9343 * mem-break.c: Include regcache.h and ax.h.
9344 (point_cond_list_t): New data structure.
9345 (breakpoint) <cond_list>: New field.
9346 (find_gdb_breakpoint_at): Make non-static.
9347 (delete_gdb_breakpoint_at): Clear any target-side
9348 conditions.
9349 (clear_gdb_breakpoint_conditions): New function.
9350 (add_condition_to_breakpoint): Likewise.
9351 (add_breakpoint_condition): Likewise.
9352 (gdb_condition_true_at_breakpoint): Likewise.
9353 (gdb_breakpoint_here): Return result directly instead
9354 of going through a local variable.
9355
9356 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9357 (clear_gdb_breakpoint_conditions): Likewise.
9358 (add_breakpoint_condition): Likewise.
9359 (gdb_condition_true_at_breakpoint): Likewise.
9360
9361 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9362 (need_step_over_p): Take target-side breakpoint condition into
9363 consideration.
9364
9365 2012-02-24 Luis Machado <lgustavo@codesourcery>
9366
9367 * server.h: Include tracepoint.h.
9368 (agent_mem_read, agent_get_trace_state_variable_value,
9369 agent_set_trace_state_variable_value,
9370 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9371 get_set_tsv_func_addr): New prototypes.
9372
9373 * ax.h: New include file.
9374 * ax.c: New source file.
9375
9376 * tracepoint.c: Include ax.h.
9377 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9378 agent_expr, eval_result_type): Move to ax.h.
9379 (parse_agent_expr): Rename to ...
9380 (gdb_parse_agent_expr): ... this, make it non-static and move
9381 to ax.h.
9382 (unparse_agent_expr) Rename to ...
9383 (gdb_unparse_agent_expr): ... this, make it non-static and move
9384 to ax.h.
9385 (eval_agent_expr): Rename to ...
9386 (eval_tracepoint_agent_expr): ... this.
9387 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9388 forward declarations.
9389 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9390 (agent_get_trace_state_variable_value): New function.
9391 (agent_set_trace_state_variable_value): New function.
9392 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9393 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9394 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9395 (condition_true_at_tracepoint): Likewise.
9396 (parse_agent_expr): Rename to ...
9397 (gdb_parse_agent_expr): ... this and move to ax.c.
9398 (unparse_agent_expr): Rename to ...
9399 (gdb_unparse_agent_expr): ... this and move to ax.c.
9400 (gdb_agent_op_name): Move to ax.c.
9401 (eval_agent_expr): Rename to ...
9402 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9403 and move to ax.c.
9404 (eval_tracepoint_agent_expr): New function.
9405 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9406 non-static.
9407 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9408 ax.c.
9409 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9410 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9411 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9412 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9413 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9414 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9415 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9416 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9417 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9418 (compile_bytecodes): Remove forward declaration.
9419 (is_goto_target): Move to ax.c.
9420 (compile_bytecodes): Move to ax.c and call
9421 agent_get_trace_state_variable_value (...) and
9422 agent_set_trace_state_variable_value (...).
9423
9424 * Makefile.in: Update ax.c and IPA dependencies.
9425
9426 2012-02-24 Pedro Alves <palves@redhat.com>
9427
9428 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9429 (cmd_bigqtbuffer_circular): ... this. Only handle
9430 'QTBuffer:circular:'.
9431 (handle_tracepoint_general_set): Adjust.
9432
9433 2012-02-16 Yao Qi <yao@codesourcery.com>
9434
9435 * inferiors.c: Move code to ...
9436 * dll.c: .... here. New.
9437 * server.h: Declare clear_dlls.
9438 * Makefile.in (SFILES): Add dll.c.
9439 (OBS): Add dll.o
9440 (dll.o): New rule.
9441
9442 2012-02-11 Yao Qi <yao@codesourcery.com>
9443
9444 * server.c: (handle_monitor_command): Add a new parameter
9445 `own_buf'.
9446 (handle_query): Update caller.
9447
9448 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9449
9450 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9451 * configure, config.in: Regenerate.
9452 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9453 is not defined.
9454
9455 2012-02-02 Pedro Alves <palves@redhat.com>
9456
9457 Try SIGKILL first, then PTRACE_KILL.
9458 * linux-low.c (linux_kill_one_lwp): New.
9459 (linux_kill_one_lwp): Rename to ...
9460 (kill_one_lwp_callback): ... this. Use the new
9461 linux_kill_one_lwp.
9462
9463 2012-02-02 Pedro Alves <palves@redhat.com>
9464
9465 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9466 inferior.
9467
9468 2012-01-27 Pedro Alves <palves@redhat.com>
9469
9470 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9471 (elf_64_file_p): Make static.
9472 (linux_pid_exe_is_elf_64_file): New.
9473 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9474 Delete declarations.
9475 (linux_pid_exe_is_elf_64_file): Declare.
9476 * linux-x86-low.c (x86_arch_setup): Use
9477 linux_pid_exe_is_elf_64_file.
9478
9479 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9480
9481 * linux-low.c (linux_wait_for_event_1): Rename to ...
9482 (linux_wait_for_event): ... here and merge it with former
9483 linux_wait_for_event - new variable wait_ptid, use it.
9484 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9485
9486 2012-01-23 Pedro Alves <palves@redhat.com>
9487
9488 * server.c (main): Avoid yet another case of infinite loop while
9489 detaching/killing after a longjmp.
9490
9491 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9492
9493 Code cleanup.
9494 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9495
9496 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9497
9498 * hostio.c (handle_readlink): New function.
9499 (handle_vFile): Call it to handle "vFile:readlink" packets.
9500
9501 2012-01-20 Pedro Alves <palves@redhat.com>
9502 Ulrich Weigand <ulrich.weigand@linaro.org>
9503
9504 * server.c (handle_v_requests): Only support vAttach and vRun to
9505 start multiple processes when in extended protocol mode.
9506
9507 2012-01-17 Pedro Alves <palves@redhat.com>
9508
9509 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9510 memalign plus mprotect to allocate the scratch buffer.
9511
9512 2012-01-13 Pedro Alves <palves@redhat.com>
9513
9514 * server.c (attach_inferior): Clear `cont_thread'.
9515
9516 2012-01-13 Pedro Alves <palves@redhat.com>
9517
9518 * server.c (main): Avoid infinite loop while detaching/killing
9519 after a longjmp.
9520
9521 2012-01-09 Doug Evans <dje@google.com>
9522
9523 * server.c (start_inferior): Set last_ptid in --wrapper case.
9524
9525 2012-01-06 Yao Qi <yao@codesourcery.com>
9526
9527 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9528 defined.
9529 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9530
9531 2012-01-04 Yao Qi <yao@codesourcery.com>
9532
9533 * tracepoint.c (cmd_qtdp): Print debug message
9534 for static tracepoint.
9535
9536 2012-01-04 Yao Qi <yao@codesourcery.com>
9537
9538 * tracepoint.c (trace_vdebug): Differentiate debug message
9539 between gdbserver and IPA.
9540
9541 2012-01-03 Yao Qi <yao@codesourcery.com>
9542
9543 * tracepoint.c (tracepoint_was_hit): Don't collect for
9544 static tracepoint.
9545
9546 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9547
9548 * terminal.h: Reformat copyright header.
9549
9550 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9551
9552 * server.c (gdbserver_version): Update copyright year.
9553 * gdbreplay.c (gdbreplay_version): Likewise.
9554
9555 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9556
9557 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9558
9559 Revert:
9560 2011-12-18 Hui Zhu <teawater@gmail.com>
9561 * linux-low.c (linux_create_inferior): Save return value to ret.
9562
9563 2011-12-18 Hui Zhu <teawater@gmail.com>
9564
9565 * linux-low.c (linux_create_inferior): Save return value to ret.
9566
9567 2011-12-16 Doug Evans <dje@google.com>
9568
9569 * linux-low.c (linux_create_inferior): If stdio connection,
9570 redirect stdin from /dev/null, stdout to stderr.
9571 * remote-utils.c (remote_is_stdio): New static global.
9572 (remote_connection_is_stdio): New function.
9573 (remote_prepare): Handle stdio connection.
9574 (remote_open): Ditto.
9575 (remote_close): Don't close stdin for stdio connections.
9576 (read_prim,write_prim): New functions. Replace all calls to
9577 read/write to these.
9578 * server.c (main): Watch for "-" argument. Move call to
9579 remote_prepare before start_inferior.
9580 * server.h (STDIO_CONNECTION_NAME): New macro.
9581 (remote_connection_is_stdio): Declare.
9582
9583 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9584 in debugging output.
9585
9586 2011-12-15 Yao Qi <yao@codesourcery.com>
9587
9588 * tracepoint.c: Include sys/syscall.h.
9589 (gdb_ust_thread): Remove preprocessor conditional.
9590
9591 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9592
9593 * linux-low.c (linux_detach_one_lwp): Call
9594 the_low_target.prepare_to_resume before detaching.
9595
9596 2011-12-14 Yao Qi <yao@codesourcery.com>
9597
9598 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9599 of write.
9600
9601 2011-12-14 Yao Qi <yao@codesourcery.com>
9602
9603 * i386-low.c (i386_low_stopped_data_address): Initialize local
9604 variable `control'.
9605
9606 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9607
9608 PR remote/13492
9609
9610 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9611 DR_CONTROL unless necessary. Extend comments.
9612 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9613 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9614
9615 2011-12-13 Yao Qi <yao@codesourcery.com>
9616
9617 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9618 macros.
9619 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9620
9621 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9622
9623 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9624 Print new debug message for such case.
9625
9626 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9627
9628 Fix overlapping memcpy.
9629 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9630 the read_inferior_memory transfer.
9631 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9632 write_inferior_memory transfer.
9633 (set_fast_tracepoint_jump): New variable buf. Use it for the
9634 read_inferior_memory and write_inferior_memory transfers.
9635 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9636 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9637 Use it for the write_inferior_memory transfer.
9638 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9639 buffers.
9640
9641 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9642
9643 * linux-low.c (fetch_register, store_register): Make code
9644 consistent, fix formatting.
9645
9646 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9647
9648 * linux-low.c (usr_store_inferior_registers): Factor out code
9649 to handle individual registers into...
9650 (store_register): ... this new function.
9651
9652 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9653
9654 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9655 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9656 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9657 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9658 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9659 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9660 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9661 (srv_xmlfiles): Add new XML files.
9662
9663 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9664 and <sys/uio.h>.
9665 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9666 (init_registers_s390_linux32v1): Add prototype.
9667 (init_registers_s390_linux32v2): Likewise.
9668 (init_registers_s390_linux64v1): Likewise.
9669 (init_registers_s390_linux64v2): Likewise.
9670 (init_registers_s390x_linux64v1): Likewise.
9671 (init_registers_s390x_linux64v2): Likewise.
9672 (s390_num_regs): Increment to 52.
9673 (s390_regmap): Add orig_r2 register.
9674 (s390_num_regs_3264): Increment to 68.
9675 (s390_regmap_3264): Add orig_r2 register.
9676 (s390_collect_ptrace_register): Handle orig_r2 register.
9677 (s390_supply_ptrace_register): Likewise.
9678 (s390_fill_last_break): New function.
9679 (s390_store_last_break): Likewise.
9680 (s390_fill_system_call): New function.
9681 (s390_store_system_call): Likewise.
9682 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9683 register sets.
9684 (s390_check_regset): New function.
9685 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9686 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9687 Update target_regsets for available register sets.
9688
9689 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9690 Jan Kratochvil <jan.kratochvil@redhat.com>
9691
9692 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9693 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9694 New.
9695 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9696 * linux-low.h (struct process_info_private): New member r_debug.
9697 * server.c (handle_qxfer_libraries): Call
9698 the_target->qxfer_libraries_svr4.
9699 (handle_qxfer_libraries_svr4): New function.
9700 (qxfer_packets): New entry "libraries-svr4".
9701 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9702 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9703 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9704 PACKET_qXfer_libraries_svr4.
9705
9706 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9707
9708 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9709 PSW address/mask between 8-byte and 16-byte formats.
9710 (s390_supply_ptrace_register): Likewise.
9711 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9712 basic addressing mode bit.
9713
9714 2011-11-24 Stan Shebs <stan@codesourcery.com>
9715
9716 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9717
9718 2011-11-17 Stan Shebs <stan@codesourcery.com>
9719
9720 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9721 (tracing_start_time): New global.
9722 (tracing_stop_time): New global.
9723 (tracing_user_name): New global.
9724 (tracing_notes): New global.
9725 (tracing_stop_note): New global.
9726 (cmd_qtstart): Set traceframe_usage, start_time.
9727 (stop_tracing): Set stop_time.
9728 (cmd_qtstatus): Report additional status.
9729 (cmd_qtp): New function.
9730 (handle_tracepoint_query): Call it.
9731 (cmd_qtnotes): New function.
9732 (handle_tracepoint_general_set): Call it.
9733 (get_timestamp): Rename from tsv_get_timestamp.
9734
9735 2011-11-14 Stan Shebs <stan@codesourcery.com>
9736 Kwok Cheung Yeung <kcy@codesourcery.com>
9737
9738 * linux-x86-low.c (small_jump_insn): New.
9739 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9740 trampoline and error message, build a trampoline and issue a small
9741 jump instruction to it.
9742 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9743 trampoline and error message.
9744 (x86_get_min_fast_tracepoint_insn_len): New.
9745 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9746 * linux-low.h (struct linux_target_ops): Add arguments to
9747 install_fast_tracepoint_jump_pad operation, add new operation.
9748 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9749 arguments.
9750 (linux_get_min_fast_tracepoint_insn_len): New function.
9751 (linux_target_op): Add new operation.
9752 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9753 (gdb_trampoline_buffer_end): Ditto.
9754 (gdb_trampoline_buffer_error): Ditto.
9755 (struct ipa_sym_addresses): Add fields for new IPA variables.
9756 (symbol_list): Add entries for new IPA variables.
9757 (struct tracepoint): Add fields to hold the address range of the
9758 trampoline used by the tracepoint.
9759 (trampoline_buffer_head): New static variable.
9760 (trampoline_buffer_tail): Ditto.
9761 (claim_trampoline_space): New function.
9762 (have_fast_tracepoint_trampoline_buffer): New function.
9763 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9764 structure.
9765 (install_fast_tracepoint): Ditto, also add error buffer argument.
9766 (cmd_qtminftpilen): New function.
9767 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9768 (fast_tracepoint_from_trampoline_address): New function.
9769 (fast_tracepoint_collecting): Handle trampoline as part of jump
9770 pad space.
9771 (set_trampoline_buffer_space): New function.
9772 (initialize_tracepoint): Initialize new IPA variables.
9773 * target.h (struct target_ops): Add arguments to
9774 install_fast_tracepoint_jump_pad operation, add new
9775 get_min_fast_tracepoint_insn_len operation.
9776 (target_get_min_fast_tracepoint_insn_len): New.
9777 (install_fast_tracepoint_jump_pad): Add arguments.
9778 * server.h (IPA_BUFSIZ): Define.
9779 * linux-i386-ipa.c: Include extra header files.
9780 (initialize_fast_tracepoint_trampoline_buffer): New function.
9781 (initialize_low_tracepoint): Call it.
9782 * server.h (set_trampoline_buffer_space): Declare.
9783 (claim_trampoline_space): Ditto.
9784 (have_fast_tracepoint_trampoline_buffer): Ditto.
9785
9786 2011-11-14 Yao Qi <yao@codesourcery.com>
9787
9788 * server.c (handle_query): Handle InstallInTrace for qSupported.
9789 * tracepoint.c (add_tracepoint): Sort list.
9790 (install_tracepoint, download_tracepoint): New.
9791 (cmd_qtdp): Call them to install and download tracepoints.
9792 (sort_tracepoints): Removed.
9793 (cmd_qtstart): Update.
9794
9795 2011-11-14 Yao Qi <yao@codesourcery.com>
9796
9797 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9798 * mem-break.h: Declare.
9799 * tracepoint.c (cmd_qtstart): Move some code to ...
9800 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9801 New.
9802 (download_tracepoints): Move some code to ...
9803 (download_tracepoint_1): ... here. New.
9804
9805 2011-11-08 Yao Qi <yao@codesourcery.com>
9806
9807 * remote-utils.c (relocate_instruction): A comment fix.
9808
9809 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9810
9811 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9812 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9813 dr_status_mirror and dr_control_mirror from debug_reg_state.
9814 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9815 (i386_initial_stuff): Remove use of deleted globals.
9816 (i386_get_thread_context, i386_set_thread_context,
9817 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9818 from debug_reg_state.
9819
9820 2011-11-05 Yao Qi <yao@codesourcery.com>
9821
9822 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9823 address as TPOINT's.
9824
9825 2011-11-02 Stan Shebs <stan@codesourcery.com>
9826
9827 * tracepoint.c (agent_mem_read_string): New function.
9828 (eval_agent_expr): Call it for tracenz.
9829 * server.c (handle_query): Report support for tracenz.
9830
9831 2011-11-02 Yao Qi <yao@codesourcery.com>
9832
9833 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9834
9835 2011-11-02 Yao Qi <yao@codesourcery.com>
9836
9837 * target.h: Fix a typo in comment.
9838
9839 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9840
9841 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9842 clobber the breakpoints' shadows with fast tracepoint jumps.
9843 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9844 * target.c (write_inferior_memory): Also pass MYADDR down to
9845 check_mem_write.
9846
9847 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9848
9849 * configure.ac: Check support for personality routine.
9850 * configure: Regenerate.
9851 * config.in: Likewise.
9852 * linux-low.c: Include <sys/personality.h>.
9853 Define ADDR_NO_RANDOMIZE if necessary.
9854 (linux_create_inferior): Disable address space randomization when
9855 forking inferior, if requested.
9856 (linux_supports_disable_randomization): New function.
9857 (linux_target_ops): Install it.
9858 * server.h (disable_randomization): Declare.
9859 * server.c (disable_randomization): New global variable.
9860 (handle_general_set): Handle QDisableRandomization.
9861 (handle_query): Likewise for qSupported.
9862 (main): Support --disable-randomization and --no-disable-randomization
9863 command line arguments.
9864 * target.h (struct target_ops): Add supports_disable_randomization.
9865 (target_supports_disable_randomization): New macro.
9866
9867 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9868
9869 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9870 ifdef check.
9871 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9872 [!PT_GETDSBT] (target_loadmap): New definition.
9873 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9874 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9875 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9876 and PT_GETDSBT to LINUX_LOADMAP.
9877 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9878 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9879
9880 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9881
9882 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9883 (arm_linux_hwbp_cap): New static variable.
9884 (arm_linux_get_hwbp_cap): Replace by ...
9885 (arm_linux_init_hwbp_cap): ... this new function.
9886 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9887 (arm_linux_get_hw_watchpoint_count): Likewise.
9888 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9889 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9890 (arm_prepare_to_resume): Use perror_with_name instead of error.
9891
9892 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9893
9894 * linux-arm-low.c: Include <signal.h>.
9895 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9896 (struct arm_linux_hwbp_cap): New data type.
9897 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9898 (struct arm_linux_hw_breakpoint): New data type.
9899 (MAX_BPTS, MAX_WPTS): Define.
9900 (struct arch_process_info, struct arch_lwp_info): New data types.
9901 (arm_linux_get_hwbp_cap): New function.
9902 (arm_linux_get_hw_breakpoint_count): Likewise.
9903 (arm_linux_get_hw_watchpoint_count): Likewise.
9904 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9905 (arm_hwbp_control_initialize): Likewise.
9906 (arm_hwbp_control_is_enabled): Likewise.
9907 (arm_hwbp_control_is_initialized): Likewise.
9908 (arm_hwbp_control_disable): Likewise.
9909 (arm_linux_hw_breakpoint_equal): Likewise.
9910 (arm_linux_hw_point_initialize): Likewise.
9911 (struct update_registers_data): New data structure.
9912 (update_registers_callback: New function.
9913 (arm_insert_point): Likewise.
9914 (arm_remove_point): Likewise.
9915 (arm_stopped_by_watchpoint): Likewise.
9916 (arm_stopped_data_address): Likewise.
9917 (arm_new_process): Likewise.
9918 (arm_new_thread): Likewise.
9919 (arm_prepare_to_resume): Likewise.
9920 (the_low_target): Register arm_insert_point, arm_remove_point,
9921 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9922 arm_new_thread, and arm_prepare_to_resume.
9923
9924 2011-09-15 Stan Shebs <stan@codesourcery.com>
9925
9926 * server.h (struct emit_ops): Add compare-goto fields.
9927 * tracepoint.c (gdb_agent_op_sizes): New table.
9928 (emit_eq_goto): New function.
9929 (emit_ne_goto): New function.
9930 (emit_lt_goto): New function.
9931 (emit_le_goto): New function.
9932 (emit_gt_goto): New function.
9933 (emit_ge_goto): New function.
9934 (is_goto_target): New function.
9935 (compile_bytecodes): Recognize special cases of compare-goto
9936 combinations and call specialized emitters for them.
9937 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9938 (amd64_emit_ne_goto): New function.
9939 (amd64_emit_lt_goto): New function.
9940 (amd64_emit_le_goto): New function.
9941 (amd64_emit_gt_goto): New function.
9942 (amd64_emit_ge_goto): New function.
9943 (amd64_emit_ops): Add the new functions.
9944 (i386_emit_eq_goto): New function.
9945 (i386_emit_ne_goto): New function.
9946 (i386_emit_lt_goto): New function.
9947 (i386_emit_le_goto): New function.
9948 (i386_emit_gt_goto): New function.
9949 (i386_emit_ge_goto): New function.
9950 (i386_emit_ops): Add the new functions.
9951
9952 2011-09-08 Stan Shebs <stan@codesourcery.com>
9953
9954 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9955 (i386_emit_epilogue): Restore %ebx.
9956
9957 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9958
9959 * server.c (step_thread): Remove definition.
9960 (process_serial_event): Don't handle Hs.
9961 * server.h (step_thread): Remove declaration.
9962 * target.c (set_desired_inferior): Remove use of step_thread.
9963
9964 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9965
9966 * linux-low.c: Include linux-procfs.h.
9967 (linux_attach_lwp_1): Update comments.
9968 (linux_attach): Scan for existing threads when attaching to a
9969 process that is the tgid.
9970 * Makefile.in: Update dependencies.
9971
9972 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9973
9974 * configure.srv: Add linux-procfs.o dependencies.
9975
9976 2011-08-14 Yao Qi <yao@codesourcery.com>
9977
9978 * target.h (struct target_ops): Fix indent.
9979 * win32-low.c (win32_target_ops): Fix comment.
9980
9981 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9982 Yao Qi <yao@codesourcery.com>
9983
9984 * Makefile.in (clean): Remove tic6x-*.c files.
9985 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9986 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9987 (tic6x-c64xp-linux.c): Likewise.
9988 * configure.srv: Add support for tic6x-*-uclinux.
9989 * linux-tic6x-low.c: New.
9990 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9991
9992 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9993 Yao Qi <yao@codesourcery.com>
9994
9995 * target.h (struct target_ops): Add read_loadmap.
9996 * linux-low.c (struct target_loadseg): New type.
9997 (struct target_loadmap): New type.
9998 (linux_read_loadmap): New function.
9999 (linux_target_ops): Add linux_read_loadmap.
10000 * server.c (handle_query): Support qXfer:fdpic:read packet.
10001 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10002 to NULL.
10003
10004 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10005
10006 * win32-low.c: Include <stdint.h>.
10007
10008 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10009
10010 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10011 to the inferior here.
10012 (i386_remove_aligned_watchpoint): Ditto.
10013 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10014 fit part of the watchpoint in the debug registers.
10015 (i386_update_inferior_debug_regs): New.
10016 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10017 registers, and only update the inferior on success.
10018 (i386_low_remove_watchpoint): Ditto.
10019
10020 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10021
10022 * linux-low.c (compare_ints, unique, list_threads, show_process,
10023 linux_core_of_thread): Delete.
10024 (linux_target_ops): Change linux_core_of_thread to
10025 linux_common_core_of_thread.
10026 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10027 * utils.c (malloc_failure): Change type of argument.
10028 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10029 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10030 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10031 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10032 (IPA_OBJS): Add common-utils-ipa.o.
10033 (ptid_h, linux_osdata_h): New macros.
10034 (server_h): Add common/common-utils.h, common/xml-utils.h,
10035 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10036 common/ptid.h.
10037 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10038 ptid.o, buffer.o): New rules.
10039 (linux-low.o): Add common/linux-osdata.h as a dependency.
10040 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10041 * configure.ac: Add AC_HEADER_DIRENT check.
10042 * config.in: Regenerate.
10043 * configure: Regenerate.
10044 * remote-utils.c (xml_escape_text): Delete.
10045 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10046 buffer_xml_printf): Move to common/buffer.c.
10047 * server.c (main): Remove call to initialize_inferiors.
10048 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10049 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10050 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10051 internal_error, gdb_assert, gdb_assert_fail): Delete.
10052 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10053 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10054 common/buffer.h.
10055 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10056 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10057 initialize_inferiors): Delete.
10058
10059 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10060
10061 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10062 symbol error.
10063
10064 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10065
10066 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10067 assertion.
10068 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10069
10070 2011-05-26 Yao Qi <yao@codesourcery.com>
10071
10072 * Makefile.in (thread-db.o): Track dependence to
10073 common/gdb_thread_db.h.
10074 * thread-db.c: include gdb_thread_db.h from right place.
10075
10076 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10077
10078 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10079 __FILE__ and __LINE__ to internal_error.
10080
10081 2011-05-13 Doug Evans <dje@google.com>
10082
10083 * thread-db.c (try_thread_db_load_from_sdir): New function.
10084 (try_thread_db_load_from_dir): New function.
10085 (thread_db_load_search): Handle $sdir, ignore $pdir.
10086 Remove trying of system directories if search of
10087 libthread-db-search-path fails, that is now done via $sdir.
10088
10089 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10090
10091 * server.c (handle_query): Add EnableDisableTracepoints to the list
10092 of supported features.
10093 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10094 tracepoints.
10095 (cmd_qtenable_disable): New.
10096 (cmd_qtstart): Install tracepoints even if disabled.
10097 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10098 receiving a QTEnable or QTDisable packet.
10099 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10100 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10101 tracepoints.
10102 (gdb_probe): Skip data collection if static tracepoint is disabled.
10103
10104 2011-05-10 Doug Evans <dje@google.com>
10105
10106 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10107
10108 2011-05-04 Doug Evans <dje@google.com>
10109
10110 * linux-low.c (linux_join): Skip process lookup.
10111 * spu-low.c (spu_join): Ditto.
10112 * server.c (join_inferiors_callback): Delete.
10113 (process_serial_event): For 'D' packet (detach) call join_inferior
10114 directly.
10115
10116 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10117
10118 * README: Don't mention xscale*-*-linux*.
10119 * configure.srv (xscale*-*-linux*): Don't handle target.
10120
10121 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10122
10123 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10124 casting pointers.
10125 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10126 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10127 (i386_emit_void_call_2): Likewise.
10128
10129 2011-04-26 Yao Qi <yao@codesourcery.com>
10130
10131 * linux-low.c: Move common macros to linux-ptrace.h.
10132 Include linux-ptrace.h.
10133 * Makefile.in (linux_ptrace_h): New.
10134 (linux-low.o): Depends on linux-ptrace.h.
10135
10136 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10137
10138 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10139 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10140 (remote_prepare): New function with most of the TCP code from ...
10141 (remote_open): ... here. Detect PORT here unconditionally. Move also
10142 setting transport_is_reliable.
10143 * server.c (run_once): New variable.
10144 (gdbserver_usage): Document it.
10145 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10146 the first run if RUN_ONCE.
10147 * server.h (run_once, remote_prepare): New declarations.
10148
10149 2011-04-19 Tom Tromey <tromey@redhat.com>
10150
10151 * win32-low.c (handle_load_dll): Remove duplicate "the".
10152
10153 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10154
10155 Remove support for old Cygwin 1.5 versions.
10156 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10157 function to avoid warning.
10158 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10159 warning.
10160
10161 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10162
10163 * gdbserver/server.h (Macro _): Define it if not available.
10164
10165 2011-03-14 Michael Snyder <msnyder@vmware.com>
10166
10167 * hostio.c (handle_close): Remove unnecessary null test.
10168
10169 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10170
10171 * Makefile.in (maintainer-clean realclean distclean): Remove
10172 "make ... subdir_do" command.
10173
10174 2011-03-10 Michael Snyder <msnyder@vmware.com>
10175
10176 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10177
10178 * server.c (handle_v_run): Free alloced buffer on early return.
10179
10180 2011-03-09 Yao Qi <yao@codesourcery.com>
10181
10182 Revert:
10183 2011-03-04 Yao Qi <yao@codesourcery.com>
10184
10185 * Makefile.in: Remove GNU make feature --directory.
10186
10187 2011-03-05 Yao Qi <yao@codesourcery.com>
10188
10189 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10190 (subdir_do): New make target. Copied from gdb/Makefile.
10191 (maintainer-clean, realclean, distclean, clean): Call corresponding
10192 make targets in common/Makefile.
10193
10194 2011-02-11 Yao Qi <yao@codesourcery.com>
10195
10196 * configure.ac: Call AC_PROG_RANLIB.
10197 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10198 * configure: Regenerate.
10199
10200 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10201
10202 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10203
10204 2011-03-06 Yao Qi <yao@codesourcery.com>
10205
10206 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10207
10208 2011-03-05 Yao Qi <yao@codesourcery.com>
10209
10210 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10211 (subdir_do): New make target. Copied from gdb/Makefile.
10212 (maintainer-clean, realclean, distclean, clean): Call corresponding
10213 make targets in common/Makefile.
10214
10215 2011-03-04 Yao Qi <yao@codesourcery.com>
10216
10217 * Makefile.in: Remove GNU make feature --directory.
10218
10219 2011-03-04 Michael Snyder <msnyder@vmware.com>
10220
10221 * server.c (queue_stop_reply): Call xmalloc not malloc.
10222
10223 2011-03-02 Michael Snyder <msnyder@vmware.com>
10224
10225 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10226
10227 2011-02-28 Michael Snyder <msnyder@vmware.com>
10228
10229 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10230 (cmd_qtframe): Ditto.
10231 (cmd_qtbuffer): Ditto.
10232 (cmd_bigqtbuffer): Ditto.
10233
10234 * utils.c (decimal2str): Initialize 'width' to nine, then
10235 don't mess with it.
10236
10237 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10238
10239 * hostio.c (require_data): Free *data, not data.
10240
10241 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10242
10243 * hostio.c (require_data): Use free, not xfree.
10244
10245 2011-02-27 Michael Snyder <msnyder@vmware.com>
10246
10247 * server.c (handle_query): Discard unused value.
10248
10249 * hostio.c (require_data): Free malloc memory before returning
10250 error.
10251
10252 2011-02-26 Michael Snyder <msnyder@vmware.com>
10253
10254 * linux-low.c (list_threads): Call closedir for dirent.
10255
10256 2011-02-27 Michael Snyder <msnyder@vmware.com>
10257
10258 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10259 a case statement falls through.
10260
10261 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10262
10263 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10264 in comparison.
10265
10266 2011-02-26 Michael Snyder <msnyder@vmware.com>
10267
10268 * utils.c (decimal2str): Eliminate dead code and dead param.
10269 (pulongest): Drop dead param from call to decimal2str.
10270 (plongest): Ditto.
10271
10272 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10273
10274 Revert the following patch (not approved yet):
10275 2011-02-21 Hui Zhu <teawater@gmail.com>
10276 * tracepoint.c (tp_printf): New function.
10277 (eval_agent_expr): Handle gdb_agent_op_printf.
10278
10279 2011-02-21 Hui Zhu <teawater@gmail.com>
10280
10281 * tracepoint.c (tp_printf): New function.
10282 (eval_agent_expr): Handle gdb_agent_op_printf.
10283
10284 2011-02-18 Tom Tromey <tromey@redhat.com>
10285
10286 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10287 (tracepoint.o): Likewise.
10288 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10289 (gdb_agent_op_names): Likewise.
10290
10291 2011-02-18 Tom Tromey <tromey@redhat.com>
10292
10293 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10294 gdb_agent_op_rot>: New constants.
10295 (gdb_agent_op_names): Add pick and roll.
10296 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10297 cases.
10298
10299 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10300
10301 * aclocal.m4: Regenerated with aclocal-1.11.1.
10302
10303 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10304
10305 * server.c (handle_qxfer_traceframe_info): New.
10306 (qxfer_packets): Register "traceframe-info".
10307 (handle_query): Report support for qXfer:traceframe-info:read+.
10308 * tracepoint.c (match_blocktype): New.
10309 (traceframe_find_block_type): Rename to ...
10310 (traceframe_walk_blocks): ... this. Add callback filter argument,
10311 and use it.
10312 (traceframe_find_block_type): New, reimplemented on top of
10313 traceframe_walk_blocks.
10314 (build_traceframe_info_xml): New.
10315 (traceframe_read_info): New.
10316 * server.h (traceframe_read_info): Declare.
10317
10318 2011-02-11 Yao Qi <yao@codesourcery.com>
10319
10320 * configure.ac: Call AC_PROG_RANLIB.
10321 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10322 * configure: Regenerate.
10323
10324 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10325
10326 * server.c (gdb_read_memory): Change return semantics to allow
10327 partial transfers.
10328 (handle_search_memory_1): Adjust.
10329 (process_serial_event) <'m' packet>: Handle partial transfers.
10330 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10331
10332 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10333
10334 * regcache.c (init_register_cache): Initialize
10335 regcache->register_status.
10336 (free_register_cache): Release regcache->register_status.
10337 (regcache_cpy): Copy register_status.
10338 (registers_to_string): Print 'x's for unavailable registers.
10339 (supply_register): Mark the register's status valid or
10340 unavailable, depending on whether a buffer was passed in or not.
10341 (supply_register_zeroed): New.
10342 (supply_regblock): Mark the registers' status valid or
10343 unavailable, depending on whether a buffer was passed in or not.
10344 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10345 (struct regcache): New `register_status' field.
10346 (supply_register_zeroed): Declare.
10347 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10348 supply_register_zeroed, rather than passing a NULL buffer to
10349 supply_register.
10350 * tracepoint.c (fetch_traceframe_registers): Update comment.
10351
10352 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10353
10354 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10355 buffer explicit.
10356
10357 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10358
10359 * server.h (decode_xfer_write): Change prototype.
10360 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10361 and don't extract the annex here.
10362 * server.c (decode_xfer_read): Remove `annex' parameter,
10363 and don't extract the annex here.
10364 (decode_xfer): New.
10365 (struct qxfer): New.
10366 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10367 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10368 (handle_qxfer_statictrace): New functions, abstracted out from
10369 handle_query, and made to use the struct qxfer interface.
10370 (handle_threads_qxfer_proper): Rename to ...
10371 (handle_qxfer_threads_proper): ... this.
10372 (handle_threads_qxfer): Rename to ...
10373 (handle_qxfer_threads): ... this. Adjust.
10374 (qxfer_packets): New array.
10375 (handle_qxfer): New function.
10376 (handle_query): Use handle_qxfer.
10377
10378 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10379
10380 * gdbreplay.c: Shorten lines of >= 80 columns.
10381 * linux-low.c: Ditto.
10382 * linux-ppc-low.c: Ditto.
10383 * linux-s390-low.c: Ditto.
10384 * linux-sparc-low.c: Ditto.
10385 * linux-x86-low.c: Ditto.
10386 * linux-xtensa-low.c: Ditto.
10387 * mem-break.c: Ditto.
10388 * nto-low.c: Ditto.
10389 * regcache.h: Ditto.
10390 * remote-utils.c: Ditto.
10391 * server.c: Ditto.
10392 * server.h: Ditto.
10393 * thread-db.c: Ditto.
10394 * tracepoint.c: Ditto.
10395 * utils.c: Ditto.
10396 * win32-low.h: Ditto.
10397
10398 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10399
10400 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10401 update.
10402
10403 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10404
10405 * server.c (gdbserver_version): Update copyright year in version
10406 output.
10407 * gdbreplay.c (gdbreplay_version): Ditto.
10408
10409 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10410
10411 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10412 * linux-bfin-low.c: New file.
10413 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10414 PT_DATA_ADDR for BFIN targets.
10415 * Makefile.in (SFILES): Add linux-bfin-low.c.
10416 (clean): Remove reg-bfin.c.
10417 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10418 * README: Mention supported Blackfin targets.
10419
10420 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10421
10422 * .gitignore: New file.
10423
10424 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10425
10426 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10427
10428 2010-10-22 Jie Zhang <jie@codesourcery.com>
10429
10430 * Makefile.in: Add FLAGS_TO_PASS variable.
10431 (install): Remove dependency of install-only and recursively
10432 invoke make for install-only.
10433
10434 2010-10-04 Doug Evans <dje@google.com>
10435
10436 * Makefile.in (uninstall): Use $(DESTDIR).
10437
10438 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10439
10440 PR gdb/11842
10441
10442 * linux-x86-low.c (compat_siginfo_from_siginfo)
10443 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10444 si_code is < 0. Check for si_code == SI_TIMER before checking for
10445 si_code < 0.
10446
10447 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10448
10449 * lynx-i386-low.c: New file.
10450 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10451
10452 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10453
10454 * lynx-low.c (ptrace_request_to_str): Remove handling for
10455 request values that have been removed in LynxOS 5.x.
10456
10457 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10458
10459 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10460 <ptrace.h>
10461
10462 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10463
10464 * configure.ac: Add --enable-inprocess-agent option.
10465 * configure: Rebuilt.
10466
10467 2010-09-06 Yao Qi <yao@codesourcery.com>
10468
10469 * linux-low.c (linux_kill): Remove unused variable.
10470 (linux_stabilize_threads): Likewise.
10471 * server.c (start_inferior): Likewise.
10472 (queue_stop_reply_callback): Likewise.
10473 * tracepoint.c (do_action_at_tracepoint): Likewise.
10474
10475 2010-09-06 Yao Qi <yao@codesourcery.com>
10476
10477 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10478 on return.
10479
10480 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10481
10482 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10483
10484 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10485
10486 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10487 "$(IPA_DEPFILES)".
10488
10489 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10490
10491 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10492 gdbserver/lynx-ppc-low.c: New files.
10493 * Makefile.in (lynx_low_h): New variable.
10494 (lynx-low.o, lynx-ppc-low.o): New rules.
10495 * configure.ac: On LynxOS, link with -lnetinet.
10496 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10497 * configure: regenerate.
10498
10499 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10500
10501 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10502 * configure.ac: Add check for vasprintf and vsnprintf.
10503 * configure, config.in: Regenerate.
10504 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10505
10506 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10507
10508 * gdbreplay.c: Move include of alloca.h up, next to include of
10509 malloc.h.
10510 * server.h: Add include of malloc.h.
10511 * mem-break.c: Remove include of malloc.h.
10512 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10513
10514 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10515
10516 * Makefile.in (memmem.o): Build with -Wno-error.
10517
10518 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10519
10520 * utils.c (xsnprintf): Make non-static.
10521 * server.h: Add xsnprintf declaration.
10522 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10523 replace calls to snprintf by calls to xsnprintf throughout.
10524
10525 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10526
10527 * configure.ac: Add configure check for alloca.
10528 * configure, config.in: Regenerate.
10529 * server.h: Include alloca.h if it exists.
10530 * gdbreplay.c: Include alloca.h if it exists.
10531
10532 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10533
10534 * linux-low.c (__SIGRTMIN): Define if not already defined.
10535 (linux_create_inferior): Check for __ANDROID__ rather than
10536 __SIGRTMIN.
10537 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10538 are already deferred.
10539 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10540 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10541 stopped and already has a pending signal to report.
10542 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10543 a pending signal to report or is moving out of a jump pad.
10544 (linux_init_signals): Check for __ANDROID__ rather than
10545 __SIGRTMIN.
10546
10547 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10548
10549 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10550 debug_threads check. Avoid a linear search when not doing debug
10551 output.
10552
10553 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10554
10555 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10556 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10557 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10558 (process_event): Change local fd's type to gdb_fildes_t.
10559 (create_file_handler): Adjust prototype.
10560 (delete_file_handler): Adjust prototype.
10561 (handle_file_event): Adjust prototype. Use pfildes.
10562 (create_file_event): Adjsut prototype.
10563 * remote-utils.c (remote_desc, listen_desc): Change type to
10564 gdb_fildes_t.
10565 * server.h: New gdb_fildes_t typedef.
10566 [USE_WIN32API]: Include winsock2.h.
10567 (delete_file_handler, add_file_handler): Adjust prototypes.
10568 (pfildes): Declare.
10569 * utils.c (pfildes): New.
10570
10571 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10572
10573 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10574 * configure: Regenerate.
10575
10576 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10577
10578 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10579 (linux_done_accessing_memory): ... this.
10580 (linux_target_ops): Adjust.
10581 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10582 * nto-low.c (nto_target_ops): Adjust comment.
10583 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10584 * spu-low.c (spu_target_ops): Adjust comment.
10585 * target.h (target_ops): Rename unprepare_to_access_memory field
10586 to done_accessing_memory.
10587 (unprepare_to_access_memory): Rename to ...
10588 (done_accessing_memory): ... this.
10589
10590 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10591
10592 * linux-low.c (linux_prepare_to_access_memory): New.
10593 (linux_unprepare_to_access_memory): New.
10594 (linux_target_ops): Install them.
10595 * server.c (read_memory): Rename to ...
10596 (gdb_read_memory): ... this. Use
10597 prepare_to_access_memory/prepare_to_access_memory.
10598 (write_memory): Rename to ...
10599 (gdb_write_memory): ... this. Use
10600 prepare_to_access_memory/prepare_to_access_memory.
10601 (handle_search_memory_1): Adjust.
10602 (process_serial_event): Adjust.
10603 * target.h (struct target_ops): New fields
10604 prepare_to_access_memory and unprepare_to_access_memory.
10605 (prepare_to_access_memory, unprepare_to_access_memory): New.
10606 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10607 prepare_to_access_memory/prepare_to_access_memory.
10608 * nto-low.c (nto_target_ops): Adjust.
10609 * spu-low.c (spu_target_ops): Adjust.
10610 * win32-low.c (win32_target_ops): Adjust.
10611
10612 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10613
10614 * Makefile.in (WARN_CFLAGS): Get it from configure.
10615 (WERROR_CFLAGS): New.
10616 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10617 * configure.ac: Introduce --enable-werror, which adds -Werror to
10618 the compiler command line. Enabled by default. Disable with
10619 --disable-werror. Add -Wdeclaration-after-statement
10620 Wpointer-arith and -Wformat-nonliteral to warning flags.
10621 * configure: Regenerate.
10622
10623 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10624
10625 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10626
10627 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10628
10629 * gdbreplay.c (remote_error): New.
10630 (gdbchar): New.
10631 (expect): Use gdbchar. Check for error reading from GDB.
10632 Clarify sync error output.
10633 (play): Check for errors writing to GDB.
10634 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10635 * remote-utils.c (getpkt): Check for errors writing to the remote
10636 descriptor.
10637
10638 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10639
10640 * linux-low.c (linux_wait_1): Move non-debugging code out of
10641 `debug_threads' control.
10642
10643 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10644
10645 * linux-low.c (linux_wait_1): Don't set last_status here.
10646 * server.c (push_event, queue_stop_reply_callback): Assert we're
10647 not pushing a TARGET_WAITKIND_IGNORE event.
10648 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10649 (myresume, handle_target_event): Set the thread's last_resume_kind
10650 and last_status from the target returned status.
10651
10652 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10653
10654 PR threads/10729
10655
10656 * linux-x86-low.c (update_debug_registers_callback): New.
10657 (i386_dr_low_set_addr): Use it.
10658 (i386_dr_low_get_addr): New.
10659 (i386_dr_low_set_control): Use update_debug_registers_callback.
10660 (i386_dr_low_get_control): New.
10661 (i386_dr_low_get_status): Adjust.
10662 * linux-low.c (linux_stop_lwp): New.
10663 * linux-low.h (linux_stop_lwp): Declare.
10664
10665 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10666 argument instead of a i386_debug_reg_state.
10667 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10668 a i386_debug_reg_state.
10669 (i386_insert_aligned_watchpoint): Adjust.
10670 (i386_remove_aligned_watchpoint): Adjust.
10671 (i386_low_stopped_data_address): Read the debug registers from the
10672 inferior instead of from the mirrors.
10673 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10674 (i386_dr_low_get_addr): Declare.
10675 (i386_dr_low_get_control): Declare.
10676 (i386_dr_low_get_status): Change prototype.
10677
10678 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10679 (i386_dr_low_get_addr): New.
10680 (i386_dr_low_get_control): New.
10681 (i386_dr_low_get_status): Adjust prototype. Return
10682 dr_status_mirror.
10683 (i386_initial_stuff): Clear dr_status_mirror and
10684 dr_control_mirror.
10685 (i386_get_thread_context): Adjust.
10686 (i386_set_thread_context): Adjust.
10687 (i386_thread_added): Adjust.
10688
10689 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10690
10691 * linux-low.h (linux_thread_area): Delete declaration.
10692
10693 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10694
10695 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10696 after its termination.
10697
10698 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10699
10700 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10701 (gdb_wants_all_stopped): Delete.
10702 (linux_wait_1): Don't call them.
10703 * server.c (handle_v_cont): Tag all threads as want-stopped.
10704 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10705 stopped as "client-wants-stopped".
10706
10707 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10708
10709 * Makefile.in (signals_h): New.
10710 (server_h): Depend on it.
10711 (server.o): Don't depend on $(signals_def).
10712 (signals.o): Depend on $(signals_def).
10713
10714 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10715
10716 * Makefile.in (signals_def): New.
10717 (server_h): Append include/gdb/signals.h and signals_def.
10718 (server.o): Append signals_def.
10719
10720 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10721
10722 * server.c (handle_target_event): Use target_signal_to_host for
10723 resume_info.sig initialization.
10724 * target.h (struct thread_resume) <sig>: New comment.
10725
10726 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10727
10728 * server.c (handle_query): strcpy() the returned string from paddress()
10729 instead of sprintf().
10730 * utils.c (paddress): Return phex_nz().
10731
10732 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10733
10734 * server.c (handle_v_cont): Call mourn_inferior if process
10735 just exited.
10736 (myresume): Likewise.
10737
10738 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10739
10740 Static tracepoints, and integration with UST.
10741
10742 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10743 * mem-break.c (uninsert_all_breakpoints)
10744 (reinsert_all_breakpoints): New.
10745 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10746 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10747 (gdb_agent_ust_loaded, helper_thread_id)
10748 (gdb_agent_helper_thread_id): New macros.
10749 (struct ipa_sym_addresses): Add addr_ust_loaded,
10750 addr_helper_thread_id, addr_cmd_buf.
10751 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10752 (in_process_agent_loaded_ust): New.
10753 (write_e_ust_not_loaded): New.
10754 (maybe_write_ipa_ust_not_loaded): New.
10755 (struct collect_static_trace_data_action): New.
10756 (enum tracepoint_type) <static_tracepoint>: New.
10757 (struct tracepoint) <handle>: Mention static tracepoints.
10758 (struct static_tracepoint_ctx): New.
10759 (CMD_BUF_SIZE): New.
10760 (add_tracepoint_action): Handle static tracepoint actions.
10761 (unprobe_marker_at): New.
10762 (clear_installed_tracepoints): Handle static tracepoints.
10763 (cmd_qtdp): Handle static tracepoints.
10764 (probe_marker_at): New.
10765 (cmd_qtstart): Handle static tracepoints.
10766 (response_tracepoint): Handle static tracepoints.
10767 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10768 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10769 (get_context_regcache): Handle static tracepoints.
10770 (do_action_at_tracepoint): Handle static tracepoint actions.
10771 (traceframe_find_block_type): Handle static trace data blocks.
10772 (traceframe_read_sdata): New.
10773 (download_tracepoints): Download static tracepoint actions.
10774 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10775 (GDB_PROBE_NAME): New.
10776 (ust_ops): New.
10777 (GET_UST_SYM): New.
10778 (USTF): New.
10779 (dlsym_ust): New.
10780 (ust_marker_to_static_tracepoint): New.
10781 (gdb_probe): New.
10782 (collect_ust_data_at_tracepoint): New.
10783 (gdb_ust_probe): New.
10784 (UNIX_PATH_MAX, SOCK_DIR): New.
10785 (gdb_ust_connect_sync_socket): New.
10786 (resume_thread, stop_thread): New.
10787 (run_inferior_command): New.
10788 (init_named_socket): New.
10789 (gdb_ust_socket_init): New.
10790 (cstr_to_hexstr): New.
10791 (next_st): New.
10792 (first_marker, next_marker): New.
10793 (response_ust_marker): New.
10794 (cmd_qtfstm, cmd_qtsstm): New.
10795 (unprobe_marker_at, probe_marker_at): New.
10796 (cmd_qtstmat, gdb_ust_thread): New.
10797 (gdb_ust_init): New.
10798 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10799 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10800 (ST_REGENTRY): New.
10801 (x86_64_st_collect_regmap): New.
10802 (X86_64_NUM_ST_COLLECT_GREGS): New.
10803 (AMD64_RIP_REGNUM): New.
10804 (supply_static_tracepoint_registers): New.
10805 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10806 (ST_REGENTRY): New.
10807 (i386_st_collect_regmap): New.
10808 (i386_NUM_ST_COLLECT_GREGS): New.
10809 (supply_static_tracepoint_registers): New.
10810 * server.c (handle_query): Handle qXfer:statictrace:read.
10811 <qSupported>: Report support for StaticTracepoints, and
10812 qXfer:statictrace:read features.
10813 * server.h (traceframe_read_sdata)
10814 (supply_static_tracepoint_registers): Declare.
10815 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10816 (unpack_varlen_hex): Include in IPA build.
10817 * Makefile.in (ustlibs, ustinc): New.
10818 (IPA_OBJS): Add remote-utils-ipa.o.
10819 ($(IPA_LIB)): Link -ldl and -lpthread.
10820 (UST_CFLAGS): New.
10821 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10822 * config.in, configure: Regenerate.
10823
10824 2010-06-20 Ian Lance Taylor <iant@google.com>
10825 Pedro Alves <pedro@codesourcery.com>
10826
10827 * linux-x86-low.c (always_true): Delete.
10828 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10829 trying to fool the compiler with always_true.
10830
10831 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10832
10833 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10834 conditions in gdbserver.
10835
10836 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10837
10838 * spu-low.c (spu_read_memory): Wrap around local store limit.
10839 (spu_write_memory): Likewise.
10840
10841 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10842
10843 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10844 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10845 LONGEST uses.
10846 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10847 uses.
10848 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10849 uses with LONGEST uses.
10850
10851 2010-06-14 Stan Shebs <stan@codesourcery.com>
10852 Pedro Alves <pedro@codesourcery.com>
10853
10854 Bytecode compiler.
10855
10856 * linux-x86-low.c: Include limits.h.
10857 (add_insns): New.
10858 (always_true): New.
10859 (EMIT_ASM): New.
10860 (EMIT_ASM32): New.
10861 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10862 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10863 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10864 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10865 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10866 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10867 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10868 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10869 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10870 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10871 (amd64_emit_void_call_2): New.
10872 (amd64_emit_ops): New.
10873 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10874 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10875 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10876 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10877 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10878 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10879 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10880 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10881 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10882 (i386_emit_stack_adjust, i386_emit_int_call_1)
10883 (i386_emit_void_call_2): New.
10884 (i386_emit_ops): New.
10885 (x86_emit_ops): New.
10886 (the_low_target): Install x86_emit_ops.
10887 * server.h (struct emit_ops): New.
10888 (get_raw_reg_func_addr): Declare.
10889 (current_insn_ptr, emit_error): Declare.
10890 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10891 (set_trace_state_variable_value): New defines.
10892 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10893 addr_get_trace_state_variable_value and
10894 addr_set_trace_state_variable_value.
10895 (symbol_list): New fields for get_raw_reg,
10896 get_trace_state_variable_value and set_trace_state_variable_value.
10897 (condfn): New typedef.
10898 (struct tracepoint): New field `compiled_cond'.
10899 (do_action_at_tracepoint): Clear compiled_cond.
10900 (get_trace_state_variable_value, set_trace_state_variable_value):
10901 Export in the IPA.
10902 (condition_true_at_tracepoint): If there's a compiled condition,
10903 run that.
10904 (current_insn_ptr, emit_error): New globals.
10905 (struct bytecode_address): New.
10906 (get_raw_reg_func_addr): New.
10907 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10908 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10909 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10910 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10911 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10912 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10913 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10914 (compile_tracepoint_condition, compile_bytecodes): New.
10915 * target.h (emit_ops): Forward declare.
10916 (struct target_ops): New field emit_ops.
10917 (target_emit_ops): New.
10918 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10919 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10920 * linux-low.c (linux_emit_ops): New.
10921 (linux_target_ops): Install it.
10922 * linux-low.h (struct linux_target_ops): New field emit_ops.
10923
10924 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10925
10926 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10927 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10928
10929 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10930 Stan Shebs <stan@codesourcery.com>
10931
10932 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10933 (all): Depend on $(extra_libraries).
10934 (install-only): Install the IPA.
10935 (IPA_OBJS, IPA_LIB): New.
10936 (clean): Remove the IPA lib.
10937 (IPAGENT_CFLAGS): New.
10938 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10939 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10940 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10941 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10942 * configure.ac: Check for atomic builtins support in the compiler.
10943 (IPA_DEPFILES, extra_libraries): Define.
10944 * configure.srv (ipa_obj): Add description.
10945 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10946 (i[34567]86-*-linux*): Set ipa_obj.
10947 (x86_64-*-linux*): Set ipa_obj.
10948 * linux-low.c (stabilizing_threads): New.
10949 (supports_fast_tracepoints): New.
10950 (linux_detach): Stabilize threads before detaching.
10951 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10952 the lwp is either not stabilizing, or is moving out of a jump pad.
10953 (linux_fast_tracepoint_collecting): New.
10954 (maybe_move_out_of_jump_pad): New.
10955 (enqueue_one_deferred_signal): New.
10956 (dequeue_one_deferred_signal): New.
10957 (linux_wait_for_event_1): If moving out of a jump pad, defer
10958 pending signals to later.
10959 (linux_stabilize_threads): New.
10960 (linux_wait_1): Check if threads need moving out of jump pads, and
10961 do it if so.
10962 (stuck_in_jump_pad_callback): New.
10963 (move_out_of_jump_pad_callback): New.
10964 (lwp_running): New.
10965 (linux_resume_one_lwp): Handle moving out of jump pads.
10966 (linux_set_resume_request): Dequeue deferred signals.
10967 (need_step_over_p): Also step over fast tracepoint jumps.
10968 (start_step_over): Also uninsert fast tracepoint jumps.
10969 (finish_step_over): Also reinsert fast tracepoint jumps.
10970 (linux_install_fast_tracepoint_jump): New.
10971 (linux_target_ops): Install linux_stabilize_threads and
10972 linux_install_fast_tracepoint_jump_pad.
10973 * linux-low.h (linux_target_ops) <get_thread_area,
10974 install_fast_tracepoint_jump_pad>: New fields.
10975 (struct lwp_info) <collecting_fast_tracepoint,
10976 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10977 (linux_get_thread_area): Declare.
10978 * linux-x86-low.c (jump_insn): New.
10979 (x86_get_thread_area): New.
10980 (append_insns): New.
10981 (push_opcode): New.
10982 (amd64_install_fast_tracepoint_jump_pad): New.
10983 (i386_install_fast_tracepoint_jump_pad): New.
10984 (x86_install_fast_tracepoint_jump_pad): New.
10985 (the_low_target): Install x86_get_thread_area and
10986 x86_install_fast_tracepoint_jump_pad.
10987 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10988 (struct fast_tracepoint_jump): New.
10989 (fast_tracepoint_jump_insn): New.
10990 (fast_tracepoint_jump_shadow): New.
10991 (find_fast_tracepoint_jump_at): New.
10992 (fast_tracepoint_jump_here): New.
10993 (delete_fast_tracepoint_jump): New.
10994 (set_fast_tracepoint_jump): New.
10995 (uninsert_fast_tracepoint_jumps_at): New.
10996 (reinsert_fast_tracepoint_jumps_at): New.
10997 (set_breakpoint_at): Use write_inferior_memory.
10998 (uninsert_raw_breakpoint): Use write_inferior_memory.
10999 (check_mem_read): Mask out fast tracepoint jumps.
11000 (check_mem_write): Mask out fast tracepoint jumps.
11001 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11002 (set_fast_tracepoint_jump): Declare.
11003 (delete_fast_tracepoint_jump)
11004 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11005 (reinsert_fast_tracepoint_jumps_at): Declare.
11006 * regcache.c: Don't compile many functions when building the
11007 in-process agent library.
11008 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11009 the register buffer in the heap.
11010 (free_register_cache): If the register buffer isn't owned by the
11011 regcache, don't free it.
11012 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11013 pre-existing register caches.
11014 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11015 type.
11016 (convert_ascii_to_int): : Constify `from' parameter type.
11017 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11018 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11019 the needed buffer in-place.
11020 (relocate_instruction): New.
11021 * server.c (handle_query) <qSymbols>: If the target supports
11022 tracepoints, give it a chance of looking up symbols. Report
11023 support for fast tracepoints.
11024 (handle_status): Stabilize threads.
11025 (process_serial_event): Adjust.
11026 * server.h (struct fast_tracepoint_jump): Forward declare.
11027 (struct process_info) <fast_tracepoint_jumps>: New field.
11028 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11029 (decode_X_packet, decode_M_packet): Adjust.
11030 (relocate_instruction): Declare.
11031 (in_process_agent_loaded): Declare.
11032 (tracepoint_look_up_symbols): Declare.
11033 (struct fast_tpoint_collect_status): Declare.
11034 (fast_tracepoint_collecting): Declare.
11035 (force_unlock_trace_buffer): Declare.
11036 (handle_tracepoint_bkpts): Declare.
11037 (initialize_low_tracepoint)
11038 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11039 * target.h (struct target_ops) <stabilize_threads,
11040 install_fast_tracepoint_jump_pad>: New fields.
11041 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11042 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11043 [HAVE_STDINT_H]: Include stdint.h.
11044 (trace_debug_1): Rename to ...
11045 (trace_vdebug): ... this.
11046 (trace_debug): Rename to ...
11047 (trace_debug_1): ... this. Add `level' parameter.
11048 (trace_debug): New.
11049 (ATTR_USED, ATTR_NOINLINE): New.
11050 (IP_AGENT_EXPORT): New.
11051 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11052 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11053 (about_to_request_buffer_space, trace_buffer_is_full)
11054 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11055 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11056 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11057 (traceframe_write_count, traceframes_created)
11058 (trace_state_variables)
11059 New renaming defines.
11060 (struct ipa_sym_addresses): New.
11061 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11062 (symbol_list): New.
11063 (ipa_sym_addrs): New.
11064 (all_tracepoint_symbols_looked_up): New.
11065 (in_process_agent_loaded): New.
11066 (write_e_ipa_not_loaded): New.
11067 (maybe_write_ipa_not_loaded): New.
11068 (tracepoint_look_up_symbols): New.
11069 (debug_threads) [IN_PROCESS_AGENT]: New.
11070 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11071 (UNKNOWN_SIDE_EFFECTS): New.
11072 (stop_tracing): New.
11073 (flush_trace_buffer): New.
11074 (stop_tracing_bkpt): New.
11075 (flush_trace_buffer_bkpt): New.
11076 (read_inferior_integer): New.
11077 (read_inferior_uinteger): New.
11078 (read_inferior_data_pointer): New.
11079 (write_inferior_data_pointer): New.
11080 (write_inferior_integer): New.
11081 (write_inferior_uinteger): New.
11082 (struct collect_static_trace_data_action): Delete.
11083 (enum tracepoint_type): New.
11084 (struct tracepoint) <type>: New field `type'.
11085 <actions_str, step_actions, step_actions_str>: Only include in
11086 GDBserver.
11087 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11088 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11089 (tracepoints): Use IP_AGENT_EXPORT.
11090 (last_tracepoint): Don't include in the IPA.
11091 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11092 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11093 (alloced_trace_state_variables): New.
11094 (trace_state_variables): Use IP_AGENT_EXPORT.
11095 (traceframe_t): Delete unused variable.
11096 (circular_trace_buffer): Don't include in the IPA.
11097 (trace_buffer_start): Delete.
11098 (struct trace_buffer_control): New.
11099 (trace_buffer_free): Delete.
11100 (struct ipa_trace_buffer_control): New.
11101 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11102 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11103 New.
11104 (trace_buffer_ctrl): New.
11105 (TRACE_BUFFER_CTRL_CURR): New.
11106 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11107 Reimplement as macros.
11108 (trace_buffer_wrap): Delete.
11109 (traceframe_write_count, traceframe_read_count)
11110 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11111 (struct tracepoint_hit_ctx) <type>: New field.
11112 (struct fast_tracepoint_ctx): New.
11113 (memory_barrier): New.
11114 (cmpxchg): New.
11115 (record_tracepoint_error): Update atomically in the IPA.
11116 (clear_inferior_trace_buffer): New.
11117 (about_to_request_buffer_space): New.
11118 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11119 updating the same buffer.
11120 (add_tracepoint): Default the tracepoint's type to trap
11121 tracepoint, and orig_size to -1.
11122 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11123 internal variables.
11124 (create_trace_state_variable): New parameter `gdb'. Handle it.
11125 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11126 (cmd_qtdp): Handle fast tracepoints.
11127 (cmd_qtdv): Adjust.
11128 (max_jump_pad_size): New.
11129 (gdb_jump_pad_head): New.
11130 (get_jump_space_head): New.
11131 (claim_jump_space): New.
11132 (sort_tracepoints): New.
11133 (MAX_JUMP_SIZE): New.
11134 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11135 IPA.
11136 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11137 support. Upload fast traceframes, and delete internal IPA
11138 breakpoints.
11139 (stop_tracing_handler): New.
11140 (flush_trace_buffer_handler): New.
11141 (cmd_qtstop): Upload fast tracepoints.
11142 (response_tracepoint): Handle fast tracepoints.
11143 (tracepoint_finished_step): Upload fast traceframes. Set the
11144 tracepoint hit context's tracepoint type.
11145 (handle_tracepoint_bkpts): New.
11146 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11147 type. Add comment about fast tracepoints.
11148 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11149 non-existing action_str field.
11150 (get_context_regcache): Handle fast tracepoints.
11151 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11152 to the regcache.
11153 (fast_tracepoint_from_jump_pad_address): New.
11154 (fast_tracepoint_from_ipa_tpoint_address): New.
11155 (collecting_t): New.
11156 (force_unlock_trace_buffer): New.
11157 (fast_tracepoint_collecting): New.
11158 (collecting): New.
11159 (gdb_collect): New.
11160 (write_inferior_data_ptr): New.
11161 (target_tp_heap): New.
11162 (target_malloc): New.
11163 (download_agent_expr): New.
11164 (UALIGN): New.
11165 (download_tracepoints): New.
11166 (download_trace_state_variables): New.
11167 (upload_fast_traceframes): New.
11168 (IPA_FIRST_TRACEFRAME): New.
11169 (IPA_NEXT_TRACEFRAME_1): New.
11170 (IPA_NEXT_TRACEFRAME): New.
11171 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11172 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11173 (gdb_jump_pad_buffer_end): New.
11174 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11175 (initialize_tracepoint): Adjust.
11176 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11177 buffer. Initialize the low module.
11178 * utils.c (PREFIX, TOOLNAME): New.
11179 (malloc_failure): Use PREFIX.
11180 (error): In the IPA, an error causes an exit.
11181 (fatal, warning): Use PREFIX.
11182 (internal_error): Use TOOLNAME.
11183 (NUMCELLS): Increase to 10.
11184 * configure, config.in: Regenerate.
11185
11186 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11187
11188 * server.c (handle_query) <qSupported>: Do two passes over the
11189 qSupported string to avoid nesting strtok.
11190
11191 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11192
11193 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11194 (CDEPS): New.
11195 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11196 -Wl,--dynamic-list.
11197 * configure: Regenerate.
11198 * proc-service.list: New.
11199
11200 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11201
11202 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11203 New comment.
11204
11205 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11206
11207 * gdbreplay.c (remote_open): Check error return from socket() call by
11208 its equality to -1 not by it being negative.
11209 * remote-utils.c (remote_open): Likewise.
11210
11211 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11212
11213 * config.h: Regenerate.
11214
11215 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11216
11217 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11218 doesn't provide PTRACE_GET_THREAD_AREA.
11219
11220 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11221
11222 * linux-m68k-low.c: Include <asm/ptrace.h>
11223 (ps_get_thread_area): Implement.
11224
11225 2010-05-03 Doug Evans <dje@google.com>
11226
11227 * event-loop.c (struct callback_event): New struct.
11228 (callback_list): New global.
11229 (append_callback_event, delete_callback_event): New functions.
11230 (process_callback): New function.
11231 (start_event_loop): Call it.
11232 * remote-utils.c (NOT_SCHEDULED): Define.
11233 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11234 moved out of readchar.
11235 (readchar): Rewrite. Call reschedule before returning.
11236 (reset_readchar): New function.
11237 (remote_close): Call it.
11238 (process_remaining, reschedule): New functions.
11239 * server.h (callback_handler_func): New typedef.
11240 (append_callback_event, delete_callback_event): Declare.
11241
11242 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11243
11244 * proc-service.c (ps_pglobal_lookup): Use
11245 thread_db_look_up_one_symbol.
11246 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11247 parameter. Use it instead of all_symbols_looked_up.
11248 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11249 field.
11250 (all_symbols_looked_up): Don't declare.
11251 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11252 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11253 field.
11254 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11255 Set all_symbols_looked_up here.
11256 (thread_db_look_up_one_symbol): New.
11257 (thread_db_get_tls_address): Adjust.
11258 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11259 thread_db object on the heap, and tentatively set it in the
11260 process structure.
11261 (thread_db_init): Don't set all_symbols_looked_up here.
11262 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11263
11264 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11265
11266 * linux-low.c (linux_kill, linux_detach): Adjust.
11267 (status_pending_p_callback): Remove redundant statement. Check
11268 for !TARGET_WAITIKIND_IGNORE, instead of
11269 TARGET_WAITKIND_STOPPED.
11270 (handle_tracepoints): Make sure LWP is locked. Adjust.
11271 (linux_wait_for_event_1): Adjust.
11272 (linux_cancel_breakpoints): New.
11273 (unsuspend_one_lwp): New.
11274 (unsuspend_all_lwps): New.
11275 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11276 (send_sigstop_callback): Change return type to int, add new
11277 `except' parameter and handle it.
11278 (suspend_and_send_sigstop_callback): New.
11279 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11280 pass them down. If SUSPEND, also increment the lwp's suspend
11281 count.
11282 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11283 (need_step_over_p): Don't consider suspended LWPs.
11284 (start_step_over): Adjust.
11285 (proceed_one_lwp): Change return type to int, add new `except'
11286 parameter and handle it.
11287 (unsuspend_and_proceed_one_lwp): New.
11288 (proceed_all_lwps): Use find_inferior instead of
11289 for_each_inferior.
11290 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11291 also decrement the suspend count of LWPs. Pass `except' down,
11292 instead of hacking its suspend count.
11293 (linux_pause_all): Add `freeze' parameter. Adjust.
11294 (linux_unpause_all): New.
11295 (linux_target_ops): Install linux_unpause_all.
11296 * server.c (handle_status): Adjust.
11297 * target.h (struct target_ops): New fields `unpause_all' and
11298 `cancel_breakpoints'. Add new parameter to `pause_all'.
11299 (pause_all): Add new `freeze' parameter.
11300 (unpause_all): New.
11301 (cancel_breakpoints): New.
11302 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11303 cancel breakpoints.
11304 (cmd_qtstart): Pause threads.
11305 (stop_tracing): Pause threads, and cancel breakpoints.
11306 * win32-low.c (win32_target_ops): Adjust.
11307
11308 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11309
11310 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11311 the inferior right away from here...
11312 (linux_wait_1): ... to here, and adjust to check the thread's
11313 last_resume_kind instead of the lwp's step or stop_expected flags.
11314
11315 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11316
11317 * README: Use consistent `GDB' and `GDBserver' spellings.
11318
11319 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11320
11321 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11322 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11323 (linux_detach_one_lwp): Assume the lwp is stopped.
11324 (any_thread_of): Delete.
11325 (linux_detach): Stop all lwps here. Don't blindly delete all
11326 breakpoints.
11327 (delete_lwp_callback): New.
11328 (linux_mourn): Delete all lwps of the process that is gone.
11329 (linux_wait_1): Don't delete the last lwp of the process here.
11330 * mem-break.h (mark_breakpoints_out): Declare.
11331 * mem-break.c (mark_breakpoints_out): New.
11332 (free_all_breakpoints): Use it.
11333 * server.c (handle_target_event): If the process is gone, mark
11334 breakpoints out.
11335 * thread-db.c (struct thread_db) <create_bp>: New field.
11336 (thread_db_enable_reporting): Fix prototype. Store a thread event
11337 breakpoint reference in the thread_db struct.
11338 (thread_db_load_search): Clear the thread_db object.
11339 (try_thread_db_load_1): Ditto.
11340 (switch_to_process): New.
11341 (disable_thread_event_reporting): Use it.
11342 (remove_thread_event_breakpoints): New.
11343 (thread_db_detach, thread_db_mourn): Use it.
11344
11345 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11346
11347 * linux-low.c (linux_enable_event_reporting): New.
11348 (linux_wait_for_event_1, handle_extended_wait): Use it.
11349
11350 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11351
11352 * linux-low.c (linux_kill_one_lwp, linux_kill)
11353 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11354 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11355 SIGSTOP even if the LWP is stopped.
11356 (send_sigstop_callback): New.
11357 (stop_all_lwps): Use send_sigstop_callback instead.
11358 (linux_resume_one_thread): Adjust.
11359 (proceed_one_lwp): Still proceed an LWP that the client has
11360 requested to stop, if we haven't reported it as stopped yet. Make
11361 sure that LWPs the client want stopped, have a pending SIGSTOP.
11362
11363 2010-04-26 Doug Evans <dje@google.com>
11364
11365 * server.c (handle_general_set): Make static.
11366
11367 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11368 Print received char after testing for error/eof instead of before.
11369 (input_interrupt): Tweak comment.
11370
11371 2010-04-23 Doug Evans <dje@google.com>
11372
11373 * server.c (start_inferior): Print inferior argv if --debug.
11374
11375 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11376
11377 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11378 * nto-x86-low.c: Include server.h
11379
11380 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11381
11382 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11383 be consistent with other sources of this directory.
11384 (init_registers_amd64): Correct name of source file of this function
11385 in the comment.
11386
11387 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11388
11389 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11390 64-bit executables.
11391
11392 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11393
11394 * win32-i386-low.c: Add 64-bit support.
11395 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11396 (init_registers_amd64): Declare.
11397 (mappings): Add 64-bit version of array.
11398 (init_windows_x86): New function.
11399 (the_low_target): Change init_arch field to init_windows_x86.
11400
11401 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11402
11403 * win32-low.c: Adapt to support also 64-bit architecture.
11404 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11405 (get_image_name): Use SIZE_T type for local variable `done'.
11406 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11407 (toolhelp_get_dll_name): Idem.
11408 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11409 Use uintptr_t typecast to avoid warning.
11410 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11411 (handle_exception): Use phex_nz to avoid warning.
11412 (win32_wait): Remove unused local variable `process'.
11413
11414 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11415
11416 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11417 `amd64-avx.o'.
11418
11419 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11420
11421 * configure.ac: Use `ws2_32' library for srv_mingw.
11422 * configure: Regenerate.
11423 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11424 * remote-utils.c: Likewise.
11425
11426 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11427
11428 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11429 if __x86_64__ is defined.
11430
11431 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11432
11433 * configure: Regenerate.
11434
11435 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11436
11437 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11438 * target.h (target_ops): New get_tib_address field.
11439 * win32-low.h (win32_thread_info): Add thread_local_base field.
11440 * win32-low.c (child_add_thread): Add tlb argument.
11441 Set thread_local_base field to TLB.
11442 (get_child_debug_event): Adapt to child_add_thread change.
11443 (win32_get_tib_address): New function.
11444 (win32_target_ops): Set get_tib_address field to
11445 win32_get_tib_address.
11446 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11447
11448 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11449
11450 * linux-low.c (linux_mourn): Also remove the process.
11451 * server.c (handle_target_event): Don't remove the process here.
11452 * nto-low.c (nto_mourn): New.
11453 (nto_target_ops): Install it.
11454 * spu-low.c (spu_mourn): New.
11455 (spu_target_ops): Install it.
11456 * win32-low.c (win32_mourn): New.
11457 (win32_target_ops): Install it.
11458
11459 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11460
11461 * server.h (buffer_xml_printf): Remove redundant `;'.
11462
11463 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11464
11465 * regcache.c (set_register_cache): Invalidate regcaches before
11466 changing the register cache layout.
11467 (regcache_invalidate_one): Allow a NULL regcache.
11468 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11469 regcaches before changing the register cache layout or the target
11470 regsets.
11471
11472 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11473
11474 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11475 variable warning on Linux/x86-64.
11476
11477 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11478
11479 GDBserver disconnected tracing support.
11480
11481 * linux-low.c (linux_remove_process): Delete.
11482 (add_lwp): Don't set last_resume_kind here.
11483 (linux_kill): Use `mourn'.
11484 (linux_detach): Use `thread_db_detach', and `mourn'.
11485 (linux_mourn): New.
11486 (linux_attach_lwp_1): Adjust comment.
11487 (linux_attach): last_resume_kind moved the thread_info; adjust.
11488 (status_pending_p_callback): Adjust.
11489 (linux_wait_for_event_1): Adjust.
11490 (count_events_callback, select_singlestep_lwp_callback)
11491 (select_event_lwp_callback, cancel_breakpoints_callback)
11492 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11493 (proceed_one_lwp): Adjust.
11494 (linux_async): Add debug output.
11495 (linux_thread_stopped): New.
11496 (linux_pause_all): New.
11497 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11498 linux_pause_all.
11499 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11500 (thread_db_free): Delete declaration.
11501 (thread_db_detach, thread_db_mourn): Declare.
11502 * thread-db.c (thread_db_init): Use thread_db_mourn.
11503 (thread_db_free): Delete, split in two.
11504 (disable_thread_event_reporting): New.
11505 (thread_db_detach): New.
11506 (thread_db_mourn): New.
11507
11508 * server.h (struct thread_info) <last_resume_kind>: New field.
11509 <attached>: Add comment.
11510 <gdb_detached>: New field.
11511 (handler_func): Change return type to int.
11512 (handle_serial_event, handle_target_event): Ditto.
11513 (gdb_connected): Declare.
11514 (tracing): Delete.
11515 (disconnected_tracing): Declare.
11516 (stop_tracing): Declare.
11517
11518 * server.c (handle_query) <qSupported>: Report support for
11519 disconnected tracing.
11520 (queue_stop_reply_callback): Account for running threads.
11521 (gdb_wants_thread_stopped): New.
11522 (gdb_wants_all_threads_stopped): New.
11523 (gdb_reattached_process): New.
11524 (handle_status): Clear the `gdb_detached' flag of all processes.
11525 In all-stop, stop all threads.
11526 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11527 (process_serial_event): If the remote connection breaks, or if an
11528 exit was forced with "monitor exit", force an event loop exit.
11529 Handle disconnected tracing on detach.
11530 (handle_serial_event): Adjust.
11531 (handle_target_event): If GDB isn't connected, forward events back
11532 to the inferior, unless the last process exited, in which case,
11533 exit gdbserver. Adjust interface.
11534
11535 * remote-utils.c (remote_open): Don't block in accept. Instead
11536 register an event loop source on the listen socket file
11537 descriptor. Refactor bits into ...
11538 (listen_desc): ... this new global.
11539 (gdb_connected): ... this new function.
11540 (enable_async_notification): ... this new function.
11541 (handle_accept_event): ... this new function.
11542 (remote_close): Clear remote_desc.
11543
11544 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11545
11546 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11547 New fields.
11548 (mourn_inferior): Define.
11549 (target_process_qsupported): Avoid the dangling else problem.
11550 (thread_stopped): Define.
11551 (pause_all): Define.
11552 (target_waitstatus_to_string): Declare.
11553 * target.c (target_waitstatus_to_string): New.
11554
11555 * tracepoint.c (tracing): Make extern.
11556 (disconnected_tracing): New.
11557 (stop_tracing): Make extern. Handle tracing stops due to GDB
11558 disconnecting.
11559 (cmd_qtdisconnected): New.
11560 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11561 (handle_tracepoint_general_set): Handle QTDisconnected.
11562
11563 * event-loop.c (event_handler_func): Change return type to int.
11564 (process_event): Bail out if the event handler wants the event
11565 loop to stop.
11566 (handle_file_event): Ditto.
11567 (start_event_loop): Bail out if the event handler wants the event
11568 loop to stop.
11569
11570 * nto-low.c (nto_target_ops): Adjust.
11571 * spu-low.c (spu_wait): Don't remove the process here.
11572 (spu_target_ops): Adjust.
11573 * win32-low.c (win32_wait): Don't remove the process here.
11574 (win32_target_ops): Adjust.
11575
11576 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11577
11578 * regcache.c (realloc_register_cache): Invalidate inferior's
11579 regcache before recreating it.
11580
11581 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11582
11583 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11584
11585 2010-04-09 Stan Shebs <stan@codesourcery.com>
11586 Pedro Alves <pedro@codesourcery.com>
11587
11588 * server.h (LONGEST): New.
11589 (struct thread_info) <while_stepping>: New field.
11590 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11591 Declare.
11592 (initialize_tracepoint, handle_tracepoint_general_set)
11593 (handle_tracepoint_query, tracepoint_finished_step)
11594 (tracepoint_was_hit, release_while_stepping_state_list):
11595 (current_traceframe): Declare.
11596 * server.c (handle_general_set): Handle tracepoint packets.
11597 (read_memory): New.
11598 (write_memory): New.
11599 (handle_search_memory_1): Use read_memory.
11600 (handle_query): Report support for conditional tracepoints, trace
11601 state variables, and tracepoint sources. Handle tracepoint
11602 queries.
11603 (main): Initialize the tracepoints module.
11604 (process_serial_event): Handle traceframe reads/writes.
11605
11606 * linux-low.c (handle_tracepoints): New.
11607 (linux_wait_1): Call it.
11608 (linux_resume_one_lwp): Handle while-stepping.
11609 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11610 (linux_target_ops): Install them.
11611 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11612 New field.
11613 * linux-x86-low.c (x86_supports_tracepoints): New.
11614 (the_low_target). Install it.
11615
11616 * mem-break.h (delete_breakpoint): Declare.
11617 * mem-break.c (delete_breakpoint): Make external.
11618
11619 * target.h (struct target_ops): Add `supports_tracepoints',
11620 `read_pc', and `write_pc' fields.
11621 (target_supports_tracepoints): Define.
11622 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11623 (phex_nz): New.
11624
11625 * regcache.h (struct regcache) <registers_owned>: New field.
11626 (init_register_cache, regcache_cpy): Declare.
11627 (regcache_read_pc, regcache_write_pc): Declare.
11628 (register_cache_size): Declare.
11629 (supply_regblock): Declare.
11630 * regcache.c (init_register_cache): New.
11631 (new_register_cache): Use it.
11632 (regcache_cpy): New.
11633 (register_cache_size): New.
11634 (supply_regblock): New.
11635 (regcache_read_pc, regcache_write_pc): New.
11636
11637 * tracepoint.c: New.
11638
11639 * Makefile.in (OBS): Add tracepoint.o.
11640 (tracepoint.o): New rule.
11641
11642 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11643
11644 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11645 (i386-mmx.o): New.
11646 (i386-mmx.c): Likewise.
11647 (i386-mmx-linux.o): Likewise.
11648 (i386-mmx-linux.c): Likewise.
11649
11650 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11651 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11652 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11653 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11654
11655 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11656 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11657 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11658
11659 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11660
11661 * Makefile.in (clean): Updated.
11662 (i386-avx.o): New.
11663 (i386-avx.c): Likewise.
11664 (i386-avx-linux.o): Likewise.
11665 (i386-avx-linux.c): Likewise.
11666 (amd64-avx.o): Likewise.
11667 (amd64-avx.c): Likewise.
11668 (amd64-avx-linux.o): Likewise.
11669 (amd64-avx-linux.c): Likewise.
11670
11671 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11672 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11673 (srv_amd64_regobj): Add amd64-avx.o.
11674 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11675 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11676 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11677 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11678 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11679 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11680 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11681
11682 * i387-fp.c: Include "i386-xstate.h".
11683 (i387_xsave): New.
11684 (i387_cache_to_xsave): Likewise.
11685 (i387_xsave_to_cache): Likewise.
11686 (x86_xcr0): Likewise.
11687
11688 * i387-fp.h (i387_cache_to_xsave): Likewise.
11689 (i387_xsave_to_cache): Likewise.
11690 (x86_xcr0): Likewise.
11691
11692 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11693 * linux-crisv32-low.c (target_regsets): Likewise.
11694 * linux-m68k-low.c (target_regsets): Likewise.
11695 * linux-mips-low.c (target_regsets): Likewise.
11696 * linux-ppc-low.c (target_regsets): Likewise.
11697 * linux-s390-low.c (target_regsets): Likewise.
11698 * linux-sh-low.c (target_regsets): Likewise.
11699 * linux-sparc-low.c (target_regsets): Likewise.
11700 * linux-xtensa-low.c (target_regsets): Likewise.
11701
11702 * linux-low.c: Include <sys/uio.h>.
11703 (regsets_fetch_inferior_registers): Support nt_type.
11704 (regsets_store_inferior_registers): Likewise.
11705 (linux_process_qsupported): New.
11706 (linux_target_ops): Add linux_process_qsupported.
11707
11708 * linux-low.h (regset_info): Add nt_type.
11709 (linux_target_ops): Add process_qsupported.
11710
11711 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11712 and <sys/uio.h>.
11713 (init_registers_i386_avx_linux): New.
11714 (init_registers_amd64_avx_linux): Likewise.
11715 (xmltarget_i386_linux_no_xml): Likewise.
11716 (xmltarget_amd64_linux_no_xml): Likewise.
11717 (PTRACE_GETREGSET): Likewise.
11718 (PTRACE_SETREGSET): Likewise.
11719 (x86_fill_xstateregset): Likewise.
11720 (x86_store_xstateregset): Likewise.
11721 (use_xml): Likewise.
11722 (x86_linux_update_xmltarget): Likewise.
11723 (x86_linux_process_qsupported): Likewise.
11724 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11725 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11726 init_registers_i386_linux here. Call
11727 x86_linux_update_xmltarget.
11728 (the_low_target): Add x86_linux_process_qsupported.
11729
11730 * server.c (handle_query): Call target_process_qsupported.
11731
11732 * target.h (target_ops): Add process_qsupported.
11733 (target_process_qsupported): New.
11734
11735 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11736
11737 * inferiors.c (add_thread): Set last_status kind to
11738 TARGET_WAITKIND_IGNORE.
11739 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11740 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11741 (linux_wait_1): Move `thread' local definition to block that uses
11742 it. Don't NULL initialize `event_child'.
11743 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11744 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11745 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11746
11747 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11748
11749 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11750 an extended waitstatus, or by a watchpoint.
11751 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11752 thread was stepping or has been stopped by a watchpoint.
11753
11754 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11755
11756 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11757 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11758 of another, then delete the previous, and validate all
11759 breakpoints.
11760 (validate_inserted_breakpoint): New.
11761 (delete_disabled_breakpoints): New.
11762 (validate_breakpoints): New.
11763 (check_mem_read): Validate breakpoints before trusting their
11764 shadow. Delete disabled breakpoints.
11765 (check_mem_write): Validate breakpoints before trusting they
11766 should be inserted. Delete disabled breakpoints.
11767 * mem-break.h (validate_breakpoints):
11768 * server.c (handle_query): Validate breakpoints when we see a
11769 qSymbol query.
11770
11771 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11772
11773 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11774 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11775 if we could tell there's a GDB breakpoint at stop_pc.
11776 (need_step_over_p): Don't do a step over if we find a GDB
11777 breakpoint at the resume PC.
11778
11779 * mem-break.c (struct raw_breakpoint): New.
11780 (enum bkpt_type): New type `gdb_breakpoint'.
11781 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11782 fields. New field `raw'.
11783 (find_raw_breakpoint_at): New.
11784 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11785 breakpoint instead.
11786 (set_breakpoint_at): Adjust.
11787 (delete_raw_breakpoint): New.
11788 (release_breakpoint): New.
11789 (delete_breakpoint): Rename to...
11790 (delete_breakpoint_1): ... this. Add proc parameter. Use
11791 release_breakpoint. Return ENOENT.
11792 (delete_breakpoint): Reimplement.
11793 (find_breakpoint_at): Delete.
11794 (find_gdb_breakpoint_at): New.
11795 (delete_breakpoint_at): Delete.
11796 (set_gdb_breakpoint_at): New.
11797 (delete_gdb_breakpoint_at): New.
11798 (gdb_breakpoint_here): New.
11799 (set_reinsert_breakpoint): Use release_breakpoint.
11800 (uninsert_breakpoint): Rename to ...
11801 (uninsert_raw_breakpoint): ... this.
11802 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11803 (reinsert_raw_breakpoint): Change parameter type to
11804 raw_breakpoint.
11805 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11806 instead.
11807 (check_breakpoints): Adjust. Use release_breakpoint.
11808 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11809 (breakpoint_inserted_here): Ditto.
11810 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11811 Don't trust the breakpoint's shadow if it is not inserted.
11812 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11813 (delete_all_breakpoints): Adjust.
11814 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11815 use delete_breakpoint_1.
11816
11817 * mem-break.h (breakpoints_supported): Delete declaration.
11818 (set_gdb_breakpoint_at): Declare.
11819 (gdb_breakpoint_here): Declare.
11820 (delete_breakpoint_at): Delete.
11821 (delete_gdb_breakpoint_at): Declare.
11822
11823 * server.h (struct raw_breakpoint): Forward declare.
11824 (struct process_info): New field `raw_breakpoints'.
11825
11826 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11827 breakpoints.
11828
11829 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11830
11831 * linux-low.c (status_pending_p_callback): Fix comment.
11832 (linux_wait_for_event_1): Move most of the internal breakpoint
11833 handling from here...
11834 (linux_wait_1): ... to here.
11835 (count_events_callback): New.
11836 (select_singlestep_lwp_callback): New.
11837 (select_event_lwp_callback): New.
11838 (cancel_breakpoints_callback): New.
11839 (select_event_lwp): New.
11840 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11841 priority to all LWPs that have had events that should be reported
11842 to the client. Cancel breakpoints when about to reporting the
11843 event to the client, not while stopping lwps. No longer cancel
11844 finished single-steps here.
11845 (cancel_finished_single_step): Delete.
11846 (cancel_finished_single_steps): Delete.
11847
11848 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11849
11850 * mem-break.c (enum bkpt_type): New.
11851 (struct breakpoint): New field `type'.
11852 (set_breakpoint_at): Change return type to struct breakpoint
11853 pointer. Set type to `other_breakpoint' by default.
11854 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11855 in the breakpoint list.
11856 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11857 (reinsert_breakpoint): Rename to ...
11858 (reinsert_raw_breakpoint): ... this.
11859 (reinsert_breakpoints_at): Adjust.
11860 * mem-break.h (struct breakpoint): Declare.
11861 (set_breakpoint_at): Change return type to struct breakpoint
11862 pointer.
11863
11864 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11865
11866 * server.c (handle_query): Assign, not compare.
11867
11868 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11869
11870 Teach linux gdbserver to step-over-breakpoints.
11871
11872 * linux-low.c (can_hardware_single_step): New.
11873 (supports_breakpoints): New.
11874 (handle_extended_wait): If stopping threads, read the stop pc of
11875 the new cloned LWP.
11876 (get_pc): New.
11877 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11878 low target doesn't support retrieving the PC.
11879 (add_lwp): Set last_resume_kind to resume_continue.
11880 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11881 (linux_attach): Don't clear stop_expected. Set the lwp's
11882 last_resume_kind to resume_stop.
11883 (linux_detach_one_lwp): Don't check for removed breakpoints.
11884 (check_removed_breakpoint): Delete.
11885 (status_pending_p): Rename to ...
11886 (status_pending_p_callback): ... this. Don't check for removed
11887 breakpoints. Don't consider threads that are stopped from GDB's
11888 perspective.
11889 (linux_wait_for_lwp): Always read the stop_pc here.
11890 (cancel_breakpoint): New.
11891 (step_over_bkpt): New global.
11892 (linux_wait_for_event_1): Implement stepping over breakpoints.
11893 (gdb_wants_lwp_stopped): New.
11894 (gdb_wants_all_stopped): New.
11895 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11896 single-step traps here. Store the thread's last reported target
11897 wait status.
11898 (send_sigstop): Don't clear stop_expected. Always set it,
11899 instead.
11900 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11901 (cancel_finished_single_step): New.
11902 (cancel_finished_single_steps): New.
11903 (wait_for_sigstop): Don't cancel finished single-step traps here.
11904 (linux_resume_one_lwp): Don't check for removed breakpoints.
11905 Don't set `step' on non-hardware step archs.
11906 (linux_set_resume_request): Ignore resume_stop requests if already
11907 stopping or stopped. Set the lwp's last_resume_kind.
11908 (resume_status_pending_p): Don't check for removed breakpoints.
11909 (need_step_over_p): New.
11910 (start_step_over): New.
11911 (finish_step_over): New.
11912 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11913 requests. Clear the thread's last reported target waitstatus.
11914 Don't use the `suspended' flag. Don't consider pending breakpoints.
11915 (linux_resume): Start a step-over if necessary.
11916 (proceed_one_lwp): New.
11917 (proceed_all_lwps): New.
11918 (unstop_all_lwps): New.
11919 * linux-low.h (struct lwp_info): Rewrite comment for the
11920 `suspended' flag. Add the `stop_pc' field. Delete the
11921 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11922 Add `'last_resume_kind' and `need_step_over' fields.
11923 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11924 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11925 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11926 (set_raw_breakpoint_at): New.
11927 (set_breakpoint_at): Rewrite to use it.
11928 (reinsert_breakpoint_handler): Delete.
11929 (set_reinsert_breakpoint): New.
11930 (reinsert_breakpoint_by_bp): Delete.
11931 (delete_reinsert_breakpoints): New.
11932 (uninsert_breakpoint): Rewrite.
11933 (uninsert_breakpoints_at): New.
11934 (reinsert_breakpoint): Rewrite.
11935 (reinsert_breakpoints_at): New.
11936 (check_breakpoints): Rewrite.
11937 (breakpoint_here): New.
11938 (breakpoint_inserted_here): New.
11939 (check_mem_read): Adjust.
11940 * mem-break.h (breakpoints_supported, breakpoint_here)
11941 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11942 (reinsert_breakpoint_by_bp): Delete declaration.
11943 (delete_reinsert_breakpoints): Declare.
11944 (reinsert_breakpoint): Delete declaration.
11945 (reinsert_breakpoints_at): Declare.
11946 (uninsert_breakpoint): Delete declaration.
11947 (uninsert_breakpoints_at): Declare.
11948 (check_breakpoints): Adjust prototype.
11949 * server.h: Adjust include order.
11950 (struct thread_info): Declare here. Add a `last_status' field.
11951
11952 2010-03-23 Michael Snyder <msnyder@vmware.com>
11953
11954 * server.c (crc32): New function.
11955 (handle_query): Add handling for 'qCRC:' request.
11956
11957 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11958
11959 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11960 lwp had been stopped by a watchpoint.
11961
11962 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11963
11964 * server.h (internal_error): Declare.
11965 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11966 * utils.c (internal_error): New function.
11967
11968 2010-03-15 Andreas Schwab <schwab@redhat.com>
11969
11970 * configure.srv: Fix typo setting srv_regobj.
11971
11972 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11973
11974 * linux-low.c (fetch_register): Avoid passing a non string literal
11975 format to `error'.
11976 (usr_store_inferior_registers): Ditto.
11977
11978 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11979
11980 * linux-low.c (linux_write_memory): Bail out early if peeking
11981 memory failed.
11982
11983 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11984
11985 * linux-low.h (struct lwp_info): New fields
11986 `stopped_by_watchpoint' and `stopped_data_address'.
11987 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11988 here, and cache them in the lwp object.
11989 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11990 directly.
11991 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11992 field.
11993 (linux_stopped_by_watchpoint): Rewrite.
11994 (linux_stopped_data_address): Rewrite.
11995
11996 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11997
11998 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11999 switching the current inferior, not before.
12000
12001 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12002
12003 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12004 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12005 i386-linux.c and amd64-linux.c.
12006 (reg-i386.o): Removed.
12007 (reg-i386.c): Likewise.
12008 (reg-i386-linux.o): Likewise.
12009 (reg-i386-linux.c): Likewise.
12010 (reg-x86-64.o): Likewise.
12011 (reg-x86-64.c): Likewise.
12012 (reg-x86-64-linux.o): Likewise.
12013 (reg-x86-64-linux.c): Likewise.
12014 (i386.o): New.
12015 (i386.c): Likewise.
12016 (i386-linux.o): Likewise.
12017 (i386-linux.c): Likewise.
12018 (amd64.o): Likewise.
12019 (amd64.c): Likewise.
12020 (amd64-linux.o): Likewise.
12021 (amd64-linux.c): Likewise.
12022
12023 * configure.srv (srv_i386_regobj): New.
12024 (srv_i386_linux_regobj): Likewise.
12025 (srv_amd64_regobj): Likewise.
12026 (srv_amd64_linux_regobj): Likewise.
12027 (srv_i386_32bit_xmlfiles): Likewise.
12028 (srv_i386_64bit_xmlfiles): Likewise.
12029 (srv_i386_xmlfiles): Likewise.
12030 (srv_amd64_xmlfiles): Likewise.
12031 (srv_i386_linux_xmlfiles): Likewise.
12032 (srv_amd64_linux_xmlfiles): Likewise.
12033 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12034 srv_xmlfiles to $srv_i386_xmlfiles.
12035 (i[34567]86-*-mingw32ce*): Likewise.
12036 (i[34567]86-*-mingw*): Likewise.
12037 (i[34567]86-*-nto*): Likewise.
12038 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12039 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12040 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12041 (x86_64-*-linux*): Likewise.
12042
12043 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12044 (init_registers_amd64_linux): New.
12045 (x86_arch_setup): Replace init_registers_x86_64_linux with
12046 init_registers_amd64_linux.
12047
12048 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12049
12050 * configure.ac: Check for libdl. If it is not available link against
12051 static libthread_db.
12052 * configure: Regenerate.
12053
12054 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12055
12056 PR9605
12057
12058 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12059 handing a read watchpoint.
12060 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12061
12062 2010-02-12 Doug Evans <dje@google.com>
12063
12064 * linux-low.c (linux_supports_tracefork_flag): Document.
12065 (linux_look_up_symbols): Add comment.
12066
12067 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12068
12069 * regcache.c (supply_register): Clear regcache if buf is NULL.
12070
12071 2010-02-02 Nicolas Roche <roche@sourceware.org>
12072 Joel Brobecker <brobecker@adacore.com>
12073
12074 * inferiors.c (find_inferior): Add function documentation.
12075 (unloaded_dll): Handle the case where the unloaded dll has not
12076 been previously registered in the dll list.
12077
12078 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12079
12080 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12081 (thumb2_breakpoint): New.
12082 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12083
12084 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12085
12086 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12087 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12088 breakpoints.
12089
12090 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12091
12092 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12093
12094 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12095
12096 * linux-s390-low.c (s390_collect_ptrace_register)
12097 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12098
12099 2010-01-21 Doug Evans <dje@google.com>
12100
12101 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12102 (PTRACE_ARG4_TYPE): New macro.
12103 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12104 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12105 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12106 (usr_store_inferior_registers): Ditto.
12107 (linux_read_memory, linux_write_memory): Ditto.
12108 (linux_test_for_tracefork): Ditto.
12109
12110 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12111 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12112
12113 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12114
12115 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12116 target.
12117
12118 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12119
12120 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12121 prototype to take a regcache. Adjust.
12122
12123 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12124
12125 * regcache.h (struct thread_info): Forward declare.
12126 (struct regcache): New.
12127 (new_register_cache): Adjust prototype.
12128 (get_thread_regcache): Declare.
12129 (free_register_cache): Adjust prototype.
12130 (registers_to_string, registers_from_string): Ditto.
12131 (supply_register, supply_register_by_name, collect_register)
12132 (collect_register_as_string, collect_register_by_name): Ditto.
12133 * regcache.c (struct inferior_regcache_data): Delete.
12134 (get_regcache): Rename to ...
12135 (get_thread_regcache): ... this. Adjust. Switch inferior before
12136 fetching registers.
12137 (regcache_invalidate_one): Adjust.
12138 (regcache_invalidate): Fix prototype.
12139 (new_register_cache): Return the new register cache.
12140 (free_register_cache): Change prototype.
12141 (realloc_register_cache): Adjust.
12142 (registers_to_string): Change prototype to take a regcache. Adjust.
12143 (registers_from_string): Ditto.
12144 (register_data): Ditto.
12145 (supply_register): Ditto.
12146 (supply_register_by_name): Ditto.
12147 (collect_register): Ditto.
12148 (collect_register_as_string): Ditto.
12149 (collect_register_by_name): Ditto.
12150 * server.c (process_serial_event): Adjust.
12151 * linux-low.h (regset_fill_func, regset_store_func): Change
12152 prototype.
12153 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12154 Change prototype.
12155 * linux-low.c (get_stop_pc): Adjust.
12156 (check_removed_breakpoint): Adjust.
12157 (linux_wait_for_event): Adjust.
12158 (linux_resume_one_lwp): Adjust.
12159 (fetch_register): Add regcache parameter. Adjust.
12160 (usr_store_inferior_registers): Ditto.
12161 (regsets_fetch_inferior_registers): Ditto.
12162 (regsets_store_inferior_registers): Ditto.
12163 (linux_fetch_registers, linux_store_registers): Ditto.
12164 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12165 regcache. Adjust.
12166 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12167 Ditto.
12168 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12169 prototype to take a regcache.
12170 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12171 * remote-utils.c (convert_ascii_to_int, outreg)
12172 (prepare_resume_reply): Change prototype to take a regcache.
12173 Adjust.
12174 * target.h (struct target_ops) <fetch_registers, store_registers>:
12175 Change prototype to take a regcache.
12176 (fetch_inferior_registers, store_inferior_registers): Change
12177 prototype to take a regcache. Adjust.
12178 * proc-service.c (ps_lgetregs): Adjust.
12179 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12180 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12181 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12182 take a regcache. Adjust.
12183 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12184 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12185 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12186 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12187 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12188 (cris_cannot_fetch_register):
12189 (cris_breakpoint_at): Change prototype to take a regcache.
12190 Adjust.
12191 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12192 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12193 to take a regcache. Adjust.
12194 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12195 Adjust.
12196 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12197 take a regcache. Adjust.
12198 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12199 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12200 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12201 * linux-mips-low.c (mips_get_pc):
12202 (mips_set_pc): Change prototype to take a regcache. Adjust.
12203 (mips_reinsert_addr): Adjust.
12204 (mips_collect_register): Change prototype to take a regcache.
12205 Adjust.
12206 (mips_supply_register):
12207 (mips_collect_register_32bit, mips_supply_register_32bit)
12208 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12209 (mips_store_fpregset): Ditto.
12210 * linux-ppc-low.c (ppc_supply_ptrace_register)
12211 (ppc_supply_ptrace_register): Ditto.
12212 (parse_spufs_run): Adjust.
12213 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12214 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12215 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12216 take a regcache. Adjust.
12217 * linux-s390-low.c (s390_collect_ptrace_register)
12218 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12219 (s390_set_pc): Change prototype to take a regcache. Adjust.
12220 (s390_arch_setup): Adjust.
12221 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12222 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12223 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12224 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12225 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12226 regcache. Adjust.
12227 (sparc_breakpoint_at): Adjust.
12228 * linux-xtensa-low.c (xtensa_fill_gregset):
12229 (xtensa_store_gregset):
12230 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12231 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12232 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12233 prototype to take a regcache. Adjust.
12234 * win32-arm-low.c (arm_fetch_inferior_register)
12235 (arm_store_inferior_register): Change prototype to take a
12236 regcache. Adjust.
12237 * win32-i386-low.c (i386_fetch_inferior_register)
12238 (i386_store_inferior_register): Change prototype to take a
12239 regcache. Adjust.
12240 * win32-low.c (child_fetch_inferior_registers)
12241 (child_store_inferior_registers): Change prototype to take a
12242 regcache. Adjust.
12243 (win32_wait): Adjust.
12244 (win32_fetch_inferior_registers): Change prototype to take a
12245 regcache. Adjust.
12246 (win32_store_inferior_registers): Adjust.
12247 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12248 store_inferior_register>: Change prototype to take a regcache.
12249
12250 2010-01-20 Doug Evans <dje@google.com>
12251
12252 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12253 #ifdef.
12254 (linux_wait_for_event1, linux_init_signals): Ditto.
12255 (W_STOPCODE): Provide definition if missing.
12256
12257 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12258
12259 * linux-low.c (linux_core_of_thread): New.
12260 (compare_ints, show_process, list_threads): New.
12261 (linux_qxfer_osdata): Report threads and cores.
12262 (linux_target_op): Register linux_core_of_thread.
12263 * remote-utils.c (prepare_resume_reply): Report the core.
12264 (buffer_xml_printf): Support %d specifier.
12265 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12266 New.
12267 (handle_query): Handle qXfer:threads. Announce availability
12268 thereof.
12269 * target.h (struct target_ops): New field core_of_thread.
12270
12271 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12272
12273 * Makefile.in (clean): Remove new generated files.
12274 (reg-s390.o, reg-s390.c): Remove rules.
12275 (reg-s390x.o, reg-s390x.c): Likewise.
12276 (s390-linux32.o, s390-linux32.c): Add rules.
12277 (s390-linux64.o, s390-linux64.c): Likewise.
12278 (s390x-linux64.o, s390x-linux64.c): Likewise.
12279 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12280 * linux-s390-low.c: Include <elf.h>.
12281 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12282 (init_registers_s390): Remove prototype.
12283 (init_registers_s390x): Likewise.
12284 (init_registers_s390_linux32): Add prototype.
12285 (init_registers_s390_linux64): Likewise.
12286 (init_registers_s390x_linux64): Likewise.
12287 (s390_num_regs_3264): New define.
12288 (s390_regmap_3264): New global variable.
12289 (s390_cannot_fetch_register): Remove obsolete check.
12290 (s390_cannot_store_register): Likewise.
12291 (s390_collect_ptrace_register): Handle upper/lower register halves.
12292 (s390_supply_ptrace_register): Likewise.
12293 (s390_fill_gregset): Update to register number changes.
12294 (s390_get_hwcap): New routine.
12295 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12296 Install appropriate regmap and register set.
12297
12298 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12299
12300 * server.c (gdbserver_version): Update copyright year to 2010.
12301 * gdbreplay.c (gdbreplay_version): Likewise.
12302
12303 2009-12-28 Doug Evans <dje@google.com>
12304
12305 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12306 elf/external.h. Include <elf.h> instead but only if necessary.
12307
12308 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12309
12310 * linux-low.c (linux_remove_process): Remove `detaching'
12311 parameter. Don't release/detach from thread_db here.
12312 (linux_kill): Release/detach from thread_db here, ...
12313 (linux_detach): ... and here, before actually detaching.
12314 (linux_wait_1): ... and here, when a process exits.
12315 * thread-db.c (any_thread_of): New.
12316 (thread_db_free): Switch the current inferior to a thread of the
12317 passed in process.
12318
12319 2009-12-21 Doug Evans <dje@google.com>
12320
12321 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12322
12323 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12324 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12325 warning ifndef __NR_tkill. Move setting of errno there too.
12326 Delete unnecessary resetting of errno after syscall.
12327 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12328
12329 * configure.ac: Check for dladdr.
12330 * config.in: Regenerate.
12331 * configure: Regenerate.
12332 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12333 (try_thread_db_load): Update.
12334
12335 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12336
12337 2009-12-18 Doug Evans <dje@google.com>
12338
12339 * event-loop.c: Include unistd.h if it exists.
12340
12341 * linux-low.c (my_waitpid): Move definition away from being in
12342 between linux_tracefork_child/linux_test_for_tracefork.
12343
12344 * gdb_proc_service.h (psaddr_t): Fix type.
12345 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12346 signature to match glibc.
12347
12348 2009-12-16 Doug Evans <dje@google.com>
12349
12350 * linux-low.c (linux_read_memory): Fix argument to read.
12351
12352 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12353
12354 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12355 events, don't leave current_inferior pointing at null.
12356
12357 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12358
12359 * win32-low.c (LOG): Delete.
12360 (OUTMSG): Output to stderr.
12361 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12362 on compile time LOG macro.
12363 (win32_wait): Fix debug output.
12364
12365 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12366
12367 * win32-low.c (win32_add_one_solib): If the dll name is
12368 "ntdll.dll", prepend the system directory to the dll path.
12369
12370 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12371
12372 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12373
12374 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12375 Vladimir Prus <vladimir@codesourcery.com>
12376
12377 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12378 * configure.ac: Check for __mcoldfire__ and set
12379 gdb_cv_m68k_is_coldfire.
12380 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12381 reg-cf.o and reg-m68k.o.
12382 * configure: Regenerated.
12383
12384 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12385
12386 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12387 Pass it to thread_db_free.
12388 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12389 proper `detaching' argument to linux_remove_process.
12390 * linux-low.h (thread_db_free): Add `detaching' parameter.
12391 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12392 to thread_db_free.
12393 (thread_db_free): Add `detaching' parameter. Only
12394 call td_ta_clear_event if detaching from process.
12395
12396 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12397
12398 * thread-db.c (thread_db_free): Fix typo.
12399
12400 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12401
12402 PR gdb/10838
12403 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12404
12405 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12406
12407 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12408 with an i686 compiler.
12409 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12410 needed.
12411 * configure: Rebuilt.
12412
12413 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12414
12415 PR gdb/10783
12416
12417 * server.c (handle_search_memory_1): Correct read_addr initialization
12418 in loop for searching subsequent chunks.
12419
12420 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12421
12422 * configure.ac: New --with-libthread-db option.
12423 * thread-db.c: Allow direct dependence on libthread_db.
12424 (thread_db_free): Adjust.
12425 * config.in: Regenerate.
12426 * configure: Likewise.
12427
12428 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12429
12430 PR gdb/10757
12431 * thread-db.c (attach_thread): New function.
12432 (maybe_attach_thread): Return success/failure.
12433 (find_new_threads_callback): Adjust.
12434 (thread_db_find_new_threads): Loop until no new threads.
12435
12436 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12437
12438 * proc-service.c (ps_lgetregs): Formatting.
12439
12440 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12441
12442 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12443 * configure.ac: Adjust.
12444 * linux-low.h (struct process_info_private): Move members to struct
12445 thread_db.
12446 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12447 * linux-low.c (linux_remove_process): Adjust.
12448 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12449 * server.c (handle_query): Move code ...
12450 (handle_monitor_command): ... here. New function.
12451 * target.h (struct target_ops): New member.
12452 * thread-db.c (struct thread_db): New.
12453 (libthread_db_search_path): New variable.
12454 (thread_db_create_event, thread_db_enable_reporting)
12455 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12456 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12457 (try_thread_db_load_1, dladdr_to_soname): New functions.
12458 (try_thread_db_load, thread_db_load_search): New functions.
12459 (thread_db_init): Search for libthread_db.
12460 (thread_db_free): New function.
12461 (thread_db_handle_monitor_command): Likewise.
12462 * config.in: Regenerate.
12463 * configure: Regenerate.
12464
12465 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12466
12467 * spu-low.c (spu_kill): Wait for inferior to terminate.
12468 Call clear_inferiors.
12469 (spu_detach): Call clear_inferiors.
12470
12471 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12472
12473 * aclocal.m4: Regenerate.
12474 * config.in: Likewise.
12475 * configure: Likewise.
12476
12477 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12478
12479 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12480 (parse_spufs_run): New function.
12481 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12482 (ppc_breakpoint_at): Handle SPU breakpoints.
12483
12484 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12485
12486 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12487 (SPUFS_MAGIC): Define.
12488 (spu_enumerate_spu_ids): New function.
12489 (linux_qxfer_spu): New function.
12490 (linux_target_ops): Install linux_qxfer_spu.
12491
12492 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12493
12494 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12495 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12496 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12497 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12498 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12499 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12500 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12501 (init_registers_powerpc_cell32l): Add prototype.
12502 (init_registers_powerpc_cell64l): Likewise.
12503 (ppc_arch_setup): Detect Cell/B.E. architecture.
12504
12505 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12506
12507 * Makefile.in (datarootdir): New variable.
12508
12509 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12510
12511 * linux-low.c (linux_write_memory): Update debugging output.
12512 * Makefile.in (clean): Add new descriptions.
12513 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12514 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12515 * configure.srv: Add new files for arm*-*-linux*.
12516 * linux-arm-low.c: Add new declarations.
12517 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12518 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12519 (HWCAP_VFPv3D16): New.
12520 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12521 instead of __IWMMXT__.
12522 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12523 (arm_arch_setup): New.
12524 (target_regsets): Remove #ifdef. Add VFP regset.
12525 (the_low_target): Use arm_arch_setup.
12526
12527 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12528
12529 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12530 the main thread again.
12531
12532 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12533
12534 Adding Neutrino gdbserver.
12535 * configure: Regenerated.
12536 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12537 * configure.srv (i[34567]86-*-nto*): New target.
12538 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12539 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12540 (nto_comctrl) [__QNX__]: New function.
12541 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12542
12543 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12544
12545 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12546 srv_tgtobj.
12547
12548 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12549 Pedro Alves <pedro@codesourcery.com>
12550
12551 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12552 don't support CONTEXT_EXTENDED_REGISTERS.
12553 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12554 (the_low_target): Install them.
12555 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12556 failing with ERROR_PIPE_NOT_CONNECTED.
12557
12558 2009-06-30 Doug Evans <dje@google.com>
12559 Pierre Muller <muller@ics.u-strasbg.fr>
12560
12561 Add h/w watchpoint support to x86-linux, win32-i386.
12562 * Makefile.in (SFILES): Add i386-low.c
12563 (i386_low_h): Define.
12564 (i386-low.o): Add dependencies.
12565 (linux-x86-low.o): Add i386-low.h dependency.
12566 (win32-i386-low.o): Ditto.
12567 * i386-low.c: New file.
12568 * i386-low.h: New file.
12569 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12570 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12571 * linux-low.c (linux_add_process): Initialize arch_private.
12572 (linux_remove_process): Free arch_private.
12573 (add_lwp): Initialize arch_private.
12574 (delete_lwp): Free arch_private.
12575 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12576 provided.
12577 * linux-low.h (process_info_private): New member arch_private.
12578 (lwp_info): New member arch_private.
12579 (linux_target_ops): New members new_process, new_thread,
12580 prepare_to_resume.
12581 (ptid_of): New macro.
12582 * linux-x86-low.c: Include stddef.h, i386-low.h.
12583 (arch_process_info): New struct.
12584 (arch_lwp_info): New struct.
12585 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12586 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12587 (i386_dr_low_get_status): New function.
12588 (x86_insert_point, x86_remove_point): New functions.
12589 (x86_stopped_by_watchpoint): New function.
12590 (x86_stopped_data_address): New function.
12591 (x86_linux_new_process, x86_linux_new_thread): New functions.
12592 (x86_linux_prepare_to_resume): New function.
12593 (the_low_target): Add entries for insert_point, remove_point,
12594 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12595 prepare_to_resume.
12596 * server.c (debug_hw_points): New global.
12597 (monitor_show_help): Document set debug-hw-points.
12598 (handle_query): Process "set debug-hw-points".
12599 * server.h (debug_hw_points): Declare.
12600 (paddress): Declare.
12601 * utils.c (NUMCELLS, CELLSIZE): New macros.
12602 (get_sell, xsnprintf, paddress): New functions.
12603 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12604 remove_point, stopped_by_watchpoint, stopped_data_address.
12605 * win32-i386-low.c: Include i386-low.h.
12606 (debug_reg_state): Replaces dr.
12607 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12608 (i386_dr_low_get_status): New function.
12609 (i386_insert_point, i386_remove_point): New functions.
12610 (i386_stopped_by_watchpoint): New function.
12611 (i386_stopped_data_address): New function.
12612 (i386_initial_stuff): Update.
12613 (get_thread_context,set_thread_context,i386_thread_added): Update.
12614 (the_low_target): Add entries for insert_point,
12615 remove_point, stopped_by_watchpoint, stopped_data_address.
12616 * win32-low.c (win32_insert_watchpoint): New function.
12617 (win32_remove_watchpoint): New function.
12618 (win32_stopped_by_watchpoint): New function.
12619 (win32_stopped_data_address): New function.
12620 (win32_target_ops): Add entries for insert_watchpoint,
12621 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12622 * win32-low.h (win32_target_ops): New members insert_point,
12623 remove_point, stopped_by_watchpoint, stopped_data_address.
12624
12625 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12626
12627 * server.c (process_serial_event): Re-return unsupported, not
12628 error, if the type isn't recognized. Re-allow supporting only
12629 insert or remove packets. Also call require_running for
12630 breakpoints. Add missing break statement to default case. Tidy.
12631 * target.h (struct target_ops): Rename insert_watchpoint to
12632 insert_point, and remove_watchpoint to remove_point.
12633
12634 * linux-low.h (struct linux_target_ops): Likewise.
12635 * linux-low.c (linux_insert_watchpoint): Rename to ...
12636 (linux_insert_point): ... this. Adjust.
12637 (linux_remove_watchpoint): Rename to ...
12638 (linux_remove_point): ... this. Adjust.
12639 (linux_target_ops): Adjust.
12640 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12641 (cris_insert_point): ... this.
12642 (cris_remove_watchpoint): Rename to ...
12643 (cris_remove_point): ... this.
12644 (the_low_target): Adjust.
12645
12646 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12647
12648 * server.c (handle_v_kill): Pass signal_pid to
12649 kill_inferior if multi_process is zero.
12650
12651 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12652
12653 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12654 * target.h (target_ops): Comment for *_watchpoint to make it clear
12655 the functions can get types '0' and '1'.
12656
12657 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12658
12659 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12660 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12661 * regcache.c (get_regcache): Likewise.
12662 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12663 * win32-low.c (child_fetch_inferior_registers): Remove check for
12664 regno 0.
12665
12666 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12667 Pedro Alves <pedro@codesourcery.com>
12668
12669 * target.h (struct target_ops) <supports_multi_process>: New
12670 callback.
12671 (target_supports_multi_process): New.
12672 * server.c (handle_query): Even if GDB reports support, only
12673 enable multi-process if the target also supports it. Report
12674 multi-process support only if the target backend supports it.
12675 * linux-low.c (linux_supports_multi_process): New function.
12676 (linux_target_ops): Install it as target_supports_multi_process
12677 callback.
12678
12679 2009-05-24 Doug Evans <dje@google.com>
12680
12681 Global renaming of find_thread_pid to find_thread_ptid.
12682 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12683 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12684 All callers updated.
12685
12686 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12687 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12688 directly.
12689
12690 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12691 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12692 (linux_resume_one_lwp): Ditto.
12693
12694 2009-05-23 Doug Evans <dje@google.com>
12695
12696 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12697 from struct inferior_list_entry * to struct lwp_info *.
12698 All callers updated.
12699
12700 2009-05-13 Doug Evans <dje@google.com>
12701
12702 * linux-x86-low.c: Don't include assert.h.
12703 (x86_siginfo_fixup): Use fatal, not assert.
12704 (x86_arch_setup): Fix comment.
12705
12706 2009-05-12 Doug Evans <dje@google.com>
12707
12708 Biarch support for i386/amd64 gdbserver.
12709 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12710 Add linux-x86-low.c.
12711 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12712 (linux-x86-low.o): Add.
12713 * linux-x86-64-low.c: Delete.
12714 * linux-i386-low.c: Delete.
12715 * linux-x86-low.c: New file.
12716 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12717 linux-x86-low.o.
12718 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12719 linux-x86-low.o.
12720 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12721 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12722 (linux_child_pid_to_exec_file): New function.
12723 (elf_64_header_p, elf_64_file_p): New functions.
12724 (siginfo_fixup): New function.
12725 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12726 give target a chance to convert layout.
12727 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12728 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12729
12730 2009-05-07 Doug Evans <dje@google.com>
12731
12732 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12733 (regsets_store_inferior_registers): Ditto.
12734
12735 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12736
12737 PR server/10048
12738
12739 * linux-low.c (must_set_ptrace_flags): Delete.
12740 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12741 of the global.
12742 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12743 `lwp->must_set_ptrace_flags' instead.
12744 (linux_wait_for_event_1): Set ptrace options here.
12745 (linux_wait_1): ... not here.
12746
12747 2009-04-30 Doug Evans <dje@google.com>
12748
12749 * inferiors.c (started_inferior_callback): New function.
12750 (attached_inferior_callback): New function.
12751 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12752 * server.c (print_started_pid, print_attached_pid): New functions.
12753 (detach_or_kill_for_exit): New function.
12754 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12755 * server.h (have_started_inferiors_p): Declare.
12756 (have_attached_inferiors_p): Declare.
12757
12758 * inferiors.c (remove_process): Fix memory leak, free process.
12759 * linux-low.c (linux_remove_process): New function.
12760 (linux_kill): Call it instead of remove_process.
12761 (linux_detach, linux_wait_1): Ditto.
12762
12763 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12764
12765 * configure.srv: Add x86 Windows CE target.
12766
12767 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12768
12769 * inferiors.c (get_thread_process): Make global.
12770 * server.h (get_thread_process): Add prototype.
12771 * thread-db.c (find_one_thread): Use get_thread_process
12772 instead of current_process.
12773 (thread_db_get_tls_address): Do not crash if called when
12774 thread layer is not yet initialized.
12775
12776 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12777
12778 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12779 * spu-low.c (current_tid): Rename to ...
12780 (current_ptid): ... this.
12781 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12782 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12783 ptid_get_lwp (current_ptid) instead of current_tid.
12784 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12785 instead of current_tid. Use find_process_pid to verify pid
12786 argument is valid. Pass proper argument to remove_process.
12787 (spu_thread_alive): Compare current_ptid instead of current_tid.
12788 (spu_resume): Likewise.
12789
12790 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12791
12792 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12793 variable.
12794
12795 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12796
12797 Implement the multiprocess extensions, and add linux multiprocess
12798 support.
12799
12800 * server.h (ULONGEST): Declare.
12801 (struct ptid, ptid_t): New.
12802 (minus_one_ptid, null_ptid): Declare.
12803 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12804 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12805 (struct inferior_list_entry): Change `id' type from unsigned from
12806 to ptid_t.
12807 (struct sym_cache, struct breakpoint, struct
12808 process_info_private): Forward declare.
12809 (struct process_info): Declare.
12810 (current_process): Declare.
12811 (all_processes): Declare.
12812 (initialize_inferiors): Declare.
12813 (add_thread): Adjust to use ptid_t.
12814 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12815 (add_process, remove_process, find_thread_pid): Declare.
12816 (find_inferior_id): Adjust to use ptid_t.
12817 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12818 (multi_process): Declare.
12819 (push_event): Adjust to use ptid_t.
12820 (read_ptid, write_ptid): Declare.
12821 (prepare_resume_reply): Adjust to use ptid_t.
12822 (clear_symbol_cache): Declare.
12823 * inferiors.c (all_processes): New.
12824 (null_ptid, minus_one_ptid): New.
12825 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12826 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12827 (add_thread): Change unsigned long to ptid. Remove gdb_id
12828 parameter. Adjust.
12829 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12830 (gdb_id_to_thread): Rename to ...
12831 (find_thread_pid): ... this. Change unsigned long to ptid.
12832 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12833 (loaded_dll, pull_pid_from_list): Adjust.
12834 (add_process, remove_process, find_process_pid)
12835 (get_thread_process, current_process, initialize_inferiors): New.
12836 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12837 (struct target_waitstatus) <related_pid>: Ditto.
12838 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12839 return type to int.
12840 (struct target_ops) <join>: Add `pid' argument.
12841 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12842 (struct target_ops) <wait>: Add `ptid' field. Change return type
12843 to ptid.
12844 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12845 (mywait): Add `ptid' argument. Change return type to ptid_t.
12846 (target_pid_to_str): Declare.
12847 * target.c (set_desired_inferior): Adjust to use ptids.
12848 (mywait): Add new `ptid' argument. Adjust.
12849 (target_pid_to_str): New.
12850 * mem-break.h (free_all_breakpoints): Declare.
12851 * mem-break.c (breakpoints): Delelete.
12852 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12853 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12854 to use per-process breakpoint list.
12855 (free_all_breakpoints): New.
12856 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12857 (symbol_cache, all_symbols_looked_up): Delete.
12858 (hexchars): New.
12859 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12860 read_ptid): New.
12861 (prepare_resume_reply): Change ptid argument's type from unsigned
12862 long to ptid_t. Adjust. Implement W;process and X;process.
12863 (free_sym_cache, clear_symbol_cache): New.
12864 (look_up_one_symbol): Adjust to per-process symbol cache. *
12865 * server.c (cont_thread, general_thread, step_thread): Change type
12866 to ptid_t.
12867 (attached): Delete.
12868 (multi_process): New.
12869 (last_ptid): Change type to ptid_t.
12870 (struct vstop_notif) <ptid>: Change type to ptid_t.
12871 (queue_stop_reply, push_event): Change `ptid' argument's type to
12872 ptid_t.
12873 (discard_queued_stop_replies): Add `pid' argument.
12874 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12875 changes. Don't reference the `attached' global.
12876 (attach_inferior): Adjust to mywait interface changes.
12877 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12878 features. Handle and report "multiprocess+". Handle
12879 "qAttached:PID".
12880 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12881 changes.
12882 (handle_v_kill): New.
12883 (handle_v_stopped): Adjust to use target_pid_to_str.
12884 (handle_v_requests): Allow multiple attaches and runs when
12885 multiprocess extensions are in effect. Handle "vKill".
12886 (myresume): Adjust to use ptids.
12887 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12888 (handle_status): Adjust to discard_queued_stop_replies interface
12889 change.
12890 (first_thread_of, kill_inferior_callback)
12891 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12892 (main): Call initialize_inferiors. Adjust to use ptids, killing
12893 and detaching from all inferiors. Handle multiprocess packet
12894 variants.
12895 * linux-low.h: Include gdb_proc_service.h.
12896 (struct process_info_private): New.
12897 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12898 <lwpid_of>: Use ptid_get_lwp.
12899 (get_lwp_thread): Adjust.
12900 (struct lwp_info): Add `dead' member.
12901 (find_lwp_pid): Declare.
12902 * linux-low.c (thread_db_active): Delete.
12903 (new_inferior): Adjust comment.
12904 (inferior_pid): Delete.
12905 (linux_add_process): New.
12906 (handle_extended_wait): Adjust.
12907 (add_lwp): Change unsigned long to ptid.
12908 (linux_create_inferior): Add process to processes table. Adjust
12909 to use ptids. Don't set new_inferior here.
12910 (linux_attach_lwp): Rename to ...
12911 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12912 it. Adjust to use ptids.
12913 (linux_attach_lwp): New.
12914 (linux_attach): Add process to processes table. Don't set
12915 new_inferior here.
12916 (struct counter): New.
12917 (second_thread_of_pid_p, last_thread_of_process_p): New.
12918 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12919 multiple processes.
12920 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12921 processes. Remove process from process table.
12922 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12923 to multiple processes.
12924 (any_thread_of): New.
12925 (linux_detach): Add `pid' argument, and handle it. Remove process
12926 from processes table.
12927 (linux_join): Add `pid' argument. Handle it.
12928 (linux_thread_alive): Change unsighed long argument to ptid_t.
12929 Consider dead lwps as not being alive.
12930 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12931 threads we're not interested in.
12932 (same_lwp, find_lwp_pid): New.
12933 (linux_wait_for_lwp): Change `pid' argument's type from int to
12934 ptid_t. Adjust.
12935 (linux_wait_for_event): Rename to ...
12936 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12937 from int to ptid_t. Adjust.
12938 (linux_wait_for_event): New.
12939 (linux_wait_1): Add `ptid' argument. Change return type to
12940 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12941 that exit from the process table.
12942 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12943 Adjust.
12944 (mark_lwp_dead): New.
12945 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12946 stopping all threads, mark its main lwp as dead.
12947 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12948 ptids.
12949 (fetch_register, usr_store_inferior_registers)
12950 (regsets_fetch_inferior_registers)
12951 (regsets_store_inferior_registers, linux_read_memory)
12952 (linux_write_memory): Inline `inferior_pid'.
12953 (linux_look_up_symbols): Adjust to use per-process
12954 `thread_db_active'.
12955 (linux_request_interrupt): Adjust to use ptids.
12956 (linux_read_auxv): Inline `inferior_pid'.
12957 (initialize_low): Don't reference thread_db_active.
12958 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12959 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12960 (ps_getpid): Return the pid of the current inferior.
12961 * thread-db.c (proc_handle, thread_agent): Delete.
12962 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12963 per-process data.
12964 (find_one_thread): Change argument type to ptid_t. Adjust to
12965 per-process data.
12966 (maybe_attach_thread): Adjust to per-process data and ptids.
12967 (thread_db_find_new_threads): Ditto.
12968 (thread_db_init): Ditto.
12969 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12970 processes table. Adjust to use ptids.
12971 (spu_kill, spu_detach): Adjust interface. Remove process from
12972 processes table.
12973 (spu_join, spu_thread_alive): Adjust interface.
12974 (spu_wait): Adjust interface. Remove process from processes
12975 table. Adjust to use ptids.
12976 * win32-low.c (current_inferior_tid): Delete.
12977 (current_inferior_ptid): New.
12978 (debug_event_ptid): New.
12979 (thread_rec): Take a ptid. Adjust.
12980 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12981 (child_delete_thread): Ditto.
12982 (do_initial_child_stuff): Add `attached' argument. Add process to
12983 processes table.
12984 (child_fetch_inferior_registers, child_store_inferior_registers):
12985 Adjust.
12986 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12987 (win32_attach): Pass 1 to do_initial_child_stuff.
12988 (win32_kill): Adjust interface. Remove process from processes
12989 table.
12990 (win32_detach): Ditto.
12991 (win32_join): Adjust interface.
12992 (win32_thread_alive): Take a ptid.
12993 (win32_resume): Adjust to use ptids.
12994 (get_child_debug_event): Ditto.
12995 (win32_wait): Adjust interface. Remove exiting process from
12996 processes table.
12997
12998 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12999
13000 Non-stop mode support.
13001
13002 * server.h (non_stop): Declare.
13003 (gdb_client_data, handler_func): Declare.
13004 (delete_file_handler, add_file_handler, start_event_loop):
13005 Declare.
13006 (handle_serial_event, handle_target_event, push_event)
13007 (putpkt_notif): Declare.
13008 * target.h (enum resume_kind): New.
13009 (struct thread_resume): Replace `step' field by `kind' field.
13010 (TARGET_WNOHANG): Define.
13011 (struct target_ops) <wait>: Add `options' argument.
13012 <supports_non_stop, async, start_non_stop>: New fields.
13013 (target_supports_non_stop, target_async): New.
13014 (start_non_stop): Declare.
13015 (mywait): Add `options' argument.
13016 * target.c (mywait): Add `options' argument. Print child exit
13017 notifications here.
13018 (start_non_stop): New.
13019 * server.c (non_stop, own_buf, mem_buf): New globals.
13020 (struct vstop_notif): New.
13021 (notif_queue): New global.
13022 (queue_stop_reply, push_event, discard_queued_stop_replies)
13023 (send_next_stop_reply): New.
13024 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13025 interface changes.
13026 (attach_inferior): In non-stop mode, don't wait for the target
13027 here.
13028 (handle_general_set): Handle QNonStop.
13029 (handle_query): When handling qC, return the current general
13030 thread, instead of the first thread of the list.
13031 (handle_query): If the backend supports non-stop mode, include
13032 QNonStop+ in the qSupported query response.
13033 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13034 and non-stop mode.
13035 (handle_v_attach, handle_v_run): Handle non-stop mode.
13036 (handle_v_stopped): New.
13037 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13038 (myresume): Adjust to use resume_kind. Handle non-stop.
13039 (queue_stop_reply_callback): New.
13040 (handle_status): Handle non-stop mode.
13041 (main): Clear non_stop flag on reconnection. Use the event-loop.
13042 Refactor serial protocol handling from here ...
13043 (process_serial_event): ... to this new function. When GDB
13044 selects any thread, select one here. In non-stop mode, wait until
13045 GDB acks all pending events before exiting.
13046 (handle_serial_event, handle_target_event): New.
13047 * remote-utils.c (remote_open): Install remote_desc in the event
13048 loop.
13049 (remote_close): Remove remote_desc from the event loop.
13050 (putpkt_binary): Rename to...
13051 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13052 (putpkt_binary): New as wrapper around putpkt_binary_1.
13053 (putpkt_notif): New.
13054 (prepare_resume_reply): In non-stop mode, don't change the
13055 general_thread.
13056 * event-loop.c: New.
13057 * Makefile.in (OBJ): Add event-loop.o.
13058 (event-loop.o): New rule.
13059
13060 * linux-low.h (pid_of): Moved here.
13061 (lwpid_of): New.
13062 (get_lwp_thread): Use lwpid_of.
13063 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13064 * linux-low.c (pid_of): Delete.
13065 (inferior_pid): Use lwpid_of.
13066 (linux_event_pipe): New.
13067 (target_is_async_p): New.
13068 (delete_lwp): New.
13069 (handle_extended_wait): Use lwpid_of.
13070 (add_lwp): Don't set lwpid field.
13071 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13072 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13073 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13074 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13075 first. Adjust to linux_wait_for_event interface changes. Use
13076 lwpid_of.
13077 (linux_detach): Don't delete the main lwp here.
13078 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13079 (status_pending_p): Don't consider explicitly suspended lwps.
13080 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13081 pointer. Add OPTIONS argument. Change return type to int. Use
13082 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13083 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13084 pointer. Add status pointer argument. Return a pid instead of a
13085 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13086 changes. In non-stop mode, don't switch to a random thread.
13087 (linux_wait): Rename to...
13088 (linux_wait_1): ... this. Add target_options argument, and handle
13089 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13090 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13091 clean exit and signal exit code. Don't stop all threads in
13092 non-stop mode. In all-stop mode, only stop all threads when
13093 reporting a stop to GDB. Handle explicit thread stop requests.
13094 (async_file_flush, async_file_mark): New.
13095 (linux_wait): New.
13096 (send_sigstop): Use lwpid_of.
13097 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13098 interface changes. In non-stop mode, don't switch to a random
13099 thread.
13100 (linux_resume_one_lwp): Use lwpid_of.
13101 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13102 (linux_resume_one_thread): ... this. Handle resume_stop. In
13103 non-stop mode, don't look for pending flag in all threads.
13104 (resume_status_pending_p): Don't consider explicitly suspended
13105 threads.
13106 (my_waitpid): Reimplement. Emulate __WALL.
13107 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13108 Use lwpid_of.
13109 (sigchld_handler, linux_supports_non_stop, linux_async)
13110 (linux_start_non_stop): New.
13111 (linux_target_ops): Register linux_supports_non_stop, linux_async
13112 and linux_start_non_stop.
13113 (initialize_low): Install SIGCHLD handler.
13114 * thread-db.c (thread_db_create_event, find_one_thread)
13115 (thread_db_get_tls_address): Use lwpid_of.
13116 * win32-low.c (win32_detach): Adjust to use resume_kind.
13117 (win32_wait): Add `options' argument.
13118 * spu-low.c (spu_resume): Adjust to use resume_kind.
13119 (spu_wait): Add `options' argument.
13120
13121 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13122
13123 Decouple target code from remote protocol.
13124
13125 * target.h (enum target_waitkind): New.
13126 (struct target_waitstatus): New.
13127 (struct target_ops) <wait>: Return an unsigned long. Take a
13128 target_waitstatus pointer instead of a char pointer.
13129 (mywait): Likewise.
13130 * target.c (mywait): Change prototype to return an unsigned long.
13131 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13132 * server.h (thread_from_wait, old_thread_from_wait): Delete
13133 declarations.
13134 (prepare_resume_reply): Change prototype to take a
13135 target_waitstatus.
13136 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13137 (last_status, last_ptid): New.
13138 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13139 pid instead of a signal.
13140 (attach_inferior): Remove "status" and "signal" parameters.
13141 Adjust.
13142 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13143 not as an address.
13144 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13145 (handle_v_requests, myresume): Remove "status" and "signal"
13146 parameters. Adjust.
13147 (handle_status): New.
13148 (main): Delete local `status'. Adjust.
13149 * remote-utils.c: Include target.h.
13150 (prepare_resume_reply): Change prototype to take a
13151 target_waitstatus. Adjust.
13152
13153 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13154 interface.
13155 * spu-low.c (spu_wait): Adjust.
13156 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13157 Delete.
13158 (win32_wait): Adjust.
13159
13160 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13161
13162 * target.h (struct thread_resume): Delete leave_stopped member.
13163 (struct target_ops): Add a `n' argument to the `resume' callback.
13164 * server.c (start_inferior): Adjust.
13165 (handle_v_cont, myresume): Adjust.
13166 * linux-low.c (check_removed_breakpoint): Adjust to resume
13167 interface change, and to removed leave_stopped field.
13168 (resume_ptr): Delete.
13169 (struct thread_resume_array): New.
13170 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13171 resume interface change.
13172 (linux_continue_one_thread, linux_queue_one_thread)
13173 (resume_status_pending_p): Check if the resume field is NULL
13174 instead of checking the leave_stopped member.
13175 (linux_resume): Adjust to the target resume interface change.
13176 * spu-low.c (spu_resume): Adjust to the target resume interface
13177 change.
13178 * win32-low.c (win32_detach, win32_resume): Ditto.
13179
13180 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13181
13182 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13183 flag.
13184 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13185 pending.
13186 (linux_continue_one_thread): Only preserve the stepping flag if
13187 there's a pending breakpoint.
13188
13189 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13190
13191 * server.c (main): After the inferior having exited, call
13192 remote_close before exiting gdbserver.
13193
13194 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13195
13196 Fix size of FPSCR in Power 7 processors.
13197 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13198 (PPC_FEATURE_HAS_DFP): New #define.
13199 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13200 size of the FPSCR.
13201
13202 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13203
13204 * server.c (handle_query) Whitespace and formatting.
13205
13206 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13207
13208 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13209 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13210 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13211 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13212 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13213 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13214 Makefile.in, configure.ac: Fix whitespace throughout.
13215 * configure: Regenerate.
13216
13217 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13218
13219 * inferiors.c (find_inferior): Make it safe for the callback
13220 function to delete the currently iterated inferior.
13221
13222 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13223
13224 * Makefile.in (linuw_low_h): Move higher.
13225 (thread-db.o): Depend on $(linux_low_h).
13226
13227 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13228
13229 Rename "process" to "lwp" throughout.
13230
13231 * linux-low.c (all_processes): Rename to...
13232 (all_lwps): ... this.
13233 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13234 (add_process): Rename to ...
13235 (add_lwp): ... this. Adjust.
13236 (linux_create_inferior): Adjust.
13237 (linux_attach_lwp): Adjust.
13238 (linux_attach): Adjust.
13239 (linux_kill_one_process): Rename to ...
13240 (linux_kill_one_lwp): ... this. Adjust.
13241 (linux_kill): Adjust.
13242 (linux_detach_one_process): Rename to ...
13243 (linux_detach_one_lwp): ... this. Adjust.
13244 (linux_detach): Adjust.
13245 (check_removed_breakpoint): Adjust.
13246 (status_pending_p): Adjust.
13247 (linux_wait_for_process): Rename to ...
13248 (linux_wait_for_lwp): ... this. Adjust.
13249 (linux_wait_for_event): Adjust.
13250 (send_sigstop): Adjust.
13251 (wait_for_sigstop): Adjust.
13252 (stop_all_processes): Rename to ...
13253 (stop_all_lwps): ... this.
13254 (linux_resume_one_process): Rename to ...
13255 (linux_resume_one_lwp): ... this. Adjust.
13256 (linux_set_resume_request, linux_continue_one_thread)
13257 (linux_queue_one_thread, resume_status_pending_p)
13258 (usr_store_inferior_registers, regsets_store_inferior_registers)
13259 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13260 Adjust.
13261 * linux-low.h (get_process): Rename to ...
13262 (get_lwp): ... this. Adjust.
13263 (get_thread_process): Rename to ...
13264 (get_thread_lwp): ... this. Adjust.
13265 (get_process_thread): Rename to ...
13266 (get_lwp_thread): ... this. Adjust.
13267 (struct process_info): Rename to ...
13268 (struct lwp_info): ... this.
13269 (all_processes): Rename to ...
13270 (all_lwps): ... this.
13271 * proc-service.c (ps_lgetregs): Adjust.
13272 * thread-db.c (thread_db_create_event, find_one_thread)
13273 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13274
13275 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13276
13277 * server.c (handle_query): Handle "qAttached".
13278
13279 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13280
13281 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13282 GPLv3, update license URL.
13283
13284 2009-03-01 Doug Evans <dje@google.com>
13285
13286 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13287 (server_h): Add gdb_signals.h.
13288 (signals.o): Update.
13289 * server.h (target_signal_from_host,target_signal_to_host_p)
13290 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13291
13292 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13293
13294 * remote-utils.c (getpkt): Also generate remote-debug
13295 information if noack_mode is set.
13296
13297 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13298
13299 * server.c (handle_query): Report qXfer:siginfo:read and
13300 qXfer:siginfo:write as supported and handle them.
13301 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13302 * linux-low.c (linux_xfer_siginfo): New.
13303 (linux_target_ops): Set it.
13304
13305 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13306
13307 * server.c (gdbserver_usage): Mention --remote-debug.
13308 (main): Accept '--remote-debug' switch.
13309
13310 2009-01-18 Doug Evans <dje@google.com>
13311
13312 * regcache.c (new_register_cache): No need to check result of xcalloc.
13313 * server.c (handle_search_memory): Back out calls to xmalloc,
13314 result is checked and error is returned to user upon failure.
13315 (handle_query): Ditto. Add more checks for result of malloc.
13316 (handle_v_cont): Check result of malloc, report error back to
13317 user upon failure.
13318 (handle_v_run): Ditto. Call freeargv.
13319 * server.h (freeargv): Declare.
13320 * utils.c (freeargv): New fn.
13321
13322 2009-01-15 Doug Evans <dje@google.com>
13323
13324 * gdbreplay.c (perror_with_name): Make arg const char *.
13325 * server.h (target_signal_to_name): Make return type const char *.
13326 * thread-db.c (thread_db_err_str): Make return type const char *.
13327 * utils.c (perror_with_name): Make arg const char *.
13328
13329 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13330
13331 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13332 when handling a EXIT_PROCESS_DEBUG_EVENT.
13333
13334 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13335
13336 * gdbreplay.c (gdbreplay_version): Update copyright year.
13337 * server.c (gdbserver_version): Likewise.
13338
13339 2009-01-05 Doug Evans <dje@google.com>
13340
13341 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13342 (handle_extended_wait): Improve comment.
13343
13344 2008-12-13 Doug Evans <dje@google.com>
13345
13346 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13347 * server.h (ATTR_MALLOC): New macro.
13348 (xmalloc,xcalloc,xstrdup): Declare.
13349 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13350 * inferiors.c: Ditto.
13351 * linux-low.c: Ditto.
13352 * mem-break.c: Ditto.
13353 * regcache.c: Ditto.
13354 * remote-utils.c: Ditto.
13355 * server.c: Ditto.
13356 * target.c: Ditto.
13357 * win32-low.c: Ditto.
13358
13359 2008-12-12 Doug Evans <dje@google.com>
13360
13361 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13362 in debugging printf.
13363
13364 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13365
13366 2008-12-09 Doug Evans <dje@google.com>
13367
13368 * linux-low.h (struct process_info): Delete member tid, unused.
13369 * thread-db.c (find_one_thread): Update.
13370 (maybe_attach_thread): Update.
13371
13372 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13373
13374 * target.h (struct target_ops): Add qxfer_osdata member.
13375 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13376 and dirent.h.
13377 (linux_qxfer_osdata): New functions.
13378 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13379 callback.
13380 * server.c (handle_query): Handle "qXfer:osdata:read:".
13381 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13382 (buffer_xml_printf): New functions.
13383 * server.h (struct buffer): New.
13384 (buffer_grow_str, buffer_grow_str0): New macros.
13385 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13386 (buffer_xml_printf): Declare.
13387
13388 2008-11-24 Doug Evans <dje@google.com>
13389
13390 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13391
13392 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13393
13394 * server.c (handle_v_run): Always use the supplied argument list.
13395
13396 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13397
13398 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13399 (xtensa_regmap_table): Add entry for scompare1.
13400
13401 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13402
13403 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13404 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13405 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13406 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13407 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13408 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13409 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13410 XML target descriptions.
13411 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13412 when inferior is running on an ISA 2.05 or later processor. Add
13413 special case to return offset for full 64-bit slot of FPSCR when
13414 in 32-bits.
13415
13416 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13417
13418 * Makefile.in (SFILES, clean): Added sparc64 files.
13419 (reg-sparc64.o, reg-sparc64.c): New.
13420 * configure.srv (sparc*-*-linux*): New configuration.
13421 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13422 syscall arguments for SPARC.
13423 (regsets_store_inferior_registers): Likewise.
13424 * linux-sparc-low.c: New file.
13425
13426 2008-10-21 Doug Evans <dje@google.com>
13427
13428 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13429 (READLINE_DIR,READLINE_DEP): Delete.
13430 (INTERNAL_CFLAGS): Update.
13431 (LINTFLAGS): Update.
13432
13433 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13434
13435 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13436 whole argv from the last run, not just argv[0].
13437
13438 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13439
13440 * regcache.c (new_register_cache): Return NULL if the register
13441 cache size isn't known yet.
13442 (free_register_cache): Avoid dereferencing a NULL regcache.
13443
13444 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13445
13446 * configure.srv: Merge MIPS and MIPS64.
13447
13448 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13449
13450 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13451
13452 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13453
13454 * Makefile.in: Add required vsx dependencies.
13455
13456 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13457 Declare init_registers_powerpc_vsx32l.
13458 Declare init_registers_powerpc_vsx64l.
13459 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13460 (ppc_arch_setup): Check for VSX in hwcap.
13461 (ppc_fill_vsxregset): New function.
13462 (ppc_store_vsxregset): New function.
13463 Add new VSX entry in regset_info target_regsets.
13464
13465 * configure.srv: Add new VSX dependencies.
13466
13467 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13468
13469 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13470 (remote_open): Set or clear transport_is_reliable.
13471 (putpkt_binary): Don't expect acks in noack mode.
13472 (getpkt): Don't send ack/nac in noack mode.
13473 * server.c (handle_general_set): Handle QStartNoAckMode.
13474 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13475 qSupported.
13476 (main): Reset noack_mode on every connection.
13477 * server.h (noack_mode): Declare.
13478
13479 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13480
13481 * Makefile.in (GDBREPLAY_OBS): New variable.
13482 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13483
13484 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13485 Daniel Jacobowitz <dan@codesourcery.com>
13486
13487 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13488 (usr_store_inferior_registers): Likewise.
13489 (regsets_store_inferior_registers): Likewise.
13490
13491 2008-07-31 Rolf Jansen <rj@surtec.com>
13492 Pedro Alves <pedro@codesourcery.com>
13493
13494 * configure.ac: Check for memmem declaration.
13495 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13496 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13497 (disable_packet_qfThreadInfo): Unconditionally compile.
13498 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13499 * configure, config.in: Regenerate.
13500
13501 2008-07-28 Doug Kwan <dougkwan@google.com>
13502
13503 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13504 (linux_write_memory): Remove declaration of errno.
13505
13506 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13507
13508 * linux-low.c (handle_extended_wait): Do not use "status"
13509 variable uninitialized.
13510
13511 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13512
13513 * server.c (handle_v_attach): Inhibit reporting dll changes.
13514
13515 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13516
13517 * remote-utils.c (prepare_resume_reply): If requested, don't
13518 output "thread:TID" in the T stop reply.
13519
13520 * server.c (disable_packet_vCont, disable_packet_Tthread)
13521 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13522 (handle_query): If requested, disable support for qC, qfThreadInfo
13523 and qsThreadInfo.
13524 (handle_v_requests): If requested, disable support for vCont.
13525 (gdbserver_show_disableable): New.
13526 (main): Handle --disable-packet and --disable-packet=LIST.
13527
13528 * server.h (disable_packet_vCont, disable_packet_Tthread)
13529 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13530
13531 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13532
13533 * server.c (gdbserver_usage): Mention --version.
13534
13535 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13536
13537 * Makefile.in (gdbreplay.o): New rule.
13538
13539 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13540
13541 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13542 message, not gdbserver.
13543
13544 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13545 Nathan Sidwell <nathan@codesourcery.com>
13546 Joseph Myers <joseph@codesourcery.com>
13547
13548 * acinclude.m4: Include ../../config/acx.m4.
13549 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13550 * configure, config.in: Regenerate.
13551 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13552 * server.c (gdbserver_version): Print PKGVERSION.
13553 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13554 (main): Adjust gdbserver_usage calls.
13555 * gdbreplay.c (version, host_name): Add declarations.
13556 (gdbreplay_version, gdbreplay_usage): New.
13557 (main): Accept --version and --help options.
13558
13559 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13560
13561 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13562 (arm_breakpoint_at): Handle Thumb.
13563 (the_low_target): Add comment.
13564
13565 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13566
13567 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13568
13569 2008-05-09 Doug Evans <dje@google.com>
13570
13571 * server.h (decode_search_memory_packet): Declare.
13572 * remote-utils.c (decode_search_memory_packet): New fn.
13573 * server.c (handle_search_memory_1): New fn.
13574 (handle_search_memory): New fn.
13575 (handle_query): Process qSearch:memory packets.
13576
13577 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13578
13579 * regcache.c (registers_length): Remove.
13580 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13581 full register packet.
13582 * regcache.h (registers_length): Remove prototype.
13583 * server.h (PBUFSIZ): Define to 16384.
13584
13585 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13586
13587 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13588 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13589 powerpc-64l.o, and powerpc-altivec64l.o.
13590 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13591 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13592 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13593 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13594 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13595 to srv_xmlfiles.
13596
13597 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13598 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13599 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13600 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13601 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13602 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13603 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13604 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13605 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13606 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13607 (clean): Update.
13608
13609 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13610 (init_registers_powerpc_32l): ... this new prototype.
13611 (init_registers_powerpc_32): Remove, replace by ...
13612 (init_registers_powerpc_altivec32l): ... this new prototype.
13613 (init_registers_powerpc_e500): Remove, replace by ...
13614 (init_registers_powerpc_e500l): ... this new prototype.
13615 (init_registers_ppc64): Remove, replace by ...
13616 (init_registers_powerpc_64l): ... this new prototype.
13617 (init_registers_powerpc_64): Remove, replace by ...
13618 (init_registers_powerpc_altivec64l): ... this new prototype.
13619 (ppc_num_regs): Set to 73.
13620 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13621 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13622 (ppc_cannot_store_register): Handle orig_r3 and trap.
13623 (ppc_arch_setup): Update init_registers_... calls.
13624 (ppc_fill_gregset): Handle orig_r3 and trap.
13625
13626 * inferiors.c (clear_inferiors): Reset current_inferior.
13627
13628 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13629
13630 * acinclude.m4: Add override.m4.
13631 * configure: Regenerate.
13632
13633 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13634
13635 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13636 initial call to init_register_ppc64.
13637
13638 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13639
13640 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13641 single powerpc*-*-linux* case.
13642 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13643
13644 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13645
13646 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13647 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13648 from reg_xmlfiles.
13649 * linux-ppc-low.c: Include <elf.h>.
13650 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13651 (ppc_hwcap): New global variable.
13652 (ppc_regmap): Remove __SPE__ #ifdef sections.
13653 (ppc_regmap_e500): New global variable.
13654 (ppc_cannot_store_register): Update __SPE__ special case.
13655 (ppc_get_hwcap): New function.
13656 (ppc_arch_setup): Use it to determine whether inferior supports
13657 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13658 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13659 Do not access registers if target does not support AltiVec.
13660 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13661 Do not access registers if target does not support SPE.
13662 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13663
13664 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13665
13666 * linux-low.c (disabled_regsets, num_regsets): New.
13667 (use_regsets_p): Delete.
13668 (linux_wait_for_process): Clear disabled_regsets.
13669 (regsets_fetch_inferior_registers): Check and set it.
13670 (regsets_store_inferior_registers): Likewise.
13671 (linux_fetch_registers, linux_store_registers): Do not use
13672 use_regsets_p.
13673 (initialize_low): Allocate disabled_regsets.
13674
13675 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13676
13677 * Makefile.in (LIBOBJS): New.
13678 (OBS): Use LIBOBJS.
13679 (memmem.o): New rule.
13680 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13681 * configure: Regenerated.
13682
13683 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13684
13685 * server.c (handle_query): Never return "unsupported" for
13686 qXfer:features:read queries.
13687
13688 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13689
13690 * server.c (get_features_xml): Fix inverted condition.
13691 (handle_query): Always support qXfer:feature:read.
13692
13693 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13694
13695 * server.c (wrapper_argv): New.
13696 (start_inferior): Handle wrapper_argv. If set, expect an extra
13697 trap.
13698 (gdbserver_usage): Document --wrapper.
13699 (main): Parse --wrapper.
13700
13701 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13702
13703 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13704 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13705 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13706 (ppc_set_pc): Likewise.
13707 (ppc_arch_setup): New function.
13708 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13709 of collect_register.
13710 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13711
13712 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13713
13714 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13715 instead of linux-ppc64-low.o.
13716 * linux-ppc64-low.c: Remove file.
13717 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13718 (linux-ppc64-low.o): Remove rule.
13719
13720 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13721 (init_registers_powerpc_64): Likewise.
13722 (ppc_regmap): Conditionally define depending on __powerpc64__.
13723 (ppc_cannot_store_register): Do not special-case "fpscr" when
13724 compiled on __powerpc64__.
13725 (ppc_collect_ptrace_register): New function.
13726 (ppc_supply_ptrace_register): New function.
13727 (ppc_breakpoint): Change type to "unsigned int".
13728 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13729 (the_low_target): Conditionally provide initializers for the
13730 arch_setup member depending on __powerpc64__. Install
13731 collect_ptrace_register and supply_ptrace_register members.
13732
13733 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13734
13735 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13736 * server.c (gdbserver_xmltarget): Define.
13737 (get_features_xml): Use it to replace "target.xml" and arch_string.
13738
13739 * configure.srv: Remove srv_xmltarget. Add XML files that were
13740 mentioned there to srv_xmlfiles instead. Remove conditional tests
13741 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13742 srv_xmlfiles and srv_regobj to include all possible choices.
13743 * configure.ac (srv_xmltarget): Remove.
13744 (srv_xmlfiles): Do not add "target.xml".
13745 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13746 checks for supplementary target information.
13747 * configure: Regenerate.
13748 * Makefile.in (XML_TARGET): Remove.
13749 (target.xml): Remove rule.
13750 (clean): Do not clean up target.xml.
13751 (.PRECIOUS): Do not mention target.xml.
13752
13753 * target.h (struct target_ops): Remove arch_string member.
13754 * linux-low.c (linux_arch_string): Remove.
13755 (linux_target_ops): Remove arch_string initializer.
13756 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13757 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13758 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13759 * spu-low.c (spu_arch_string): Remove.
13760 (spu_target_ops): Remove arch_string initializer.
13761 * win32-low.c (win32_arch_string): Remove.
13762 (win32_target_ops): Remove arch_string initializer.
13763 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13764 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13765 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13766
13767 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13768
13769 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13770 by collect_ptrace_register and supply_ptrace_register hooks.
13771 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13772 instead of checking for the_low_target.left_pad_xfer.
13773 (usr_store_inferior_registers): Use collect_ptrace_register callback
13774 instead of checking for the_low_target.left_pad_xfer.
13775
13776 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13777 (s390_supply_ptrace_register): Likewise.
13778 (s390_fill_gregset): Call s390_collect_ptrace_register.
13779 (the_low_target): Update.
13780
13781 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13782 (ppc_supply_ptrace_register): Likewise.
13783 (the_low_target): Update.
13784
13785 * linux-i386-low.c (the_low_target): Update.
13786 * linux-x86-64-low.c (the_low_target): Update.
13787
13788 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13789
13790 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13791 reg-s390.o and reg-s390x.o.
13792
13793 * linux-low.c (new_inferior): New global variable.
13794 (linux_create_inferior, linux_attach): Set it.
13795 (linux_wait_for_process): Call the_low_target.arch_setup after the
13796 target has stopped for the first time.
13797 (initialize_low): Do not call the_low_target.arch_setup.
13798
13799 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13800 (s390_set_pc): Likewise.
13801 (s390_arch_setup): New function.
13802 (the_low_target): Use s390_arch_setup as arch_setup routine.
13803
13804 * regcache.c (realloc_register_cache): New function.
13805 (set_register_cache): Call it for each existing regcache.
13806
13807 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13808
13809 * server.h (init_registers): Remove prototype.
13810
13811 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13812 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13813 instead of init_registers ().
13814 * linux-arm-low.c (init_registers_arm): Add prototype.
13815 (init_registers_arm_with_iwmmxt): Likewise.
13816 (the_low_target): Add initializer for arch_setup field.
13817 * linux-cris-low.c (init_registers_cris): Add prototype.
13818 (the_low_target): Add initializer for arch_setup field.
13819 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13820 (the_low_target): Add initializer for arch_setup field.
13821 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13822 (the_low_target): Add initializer for arch_setup field.
13823 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13824 (the_low_target): Add initializer for arch_setup field.
13825 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13826 (the_low_target): Add initializer for arch_setup field.
13827 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13828 (the_low_target): Add initializer for arch_setup field.
13829 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13830 (init_registers_mips64_linux): Likewise.
13831 (the_low_target): Add initializer for arch_setup field.
13832 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13833 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13834 (the_low_target): Add initializer for arch_setup field.
13835 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13836 (init_registers_powerpc_64): Likewise.
13837 (the_low_target): Add initializer for arch_setup field.
13838 * linux-s390-low.c (init_registers_s390): Add prototype.
13839 (init_registers_s390x): Likewise.
13840 (the_low_target): Add initializer for arch_setup field.
13841 * linux-sh-low.c (init_registers_sh): Add prototype.
13842 (the_low_target): Add initializer for arch_setup field.
13843 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13844 (the_low_target): Add initializer for arch_setup field.
13845 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13846 (the_low_target): Add initializer for arch_setup field.
13847
13848 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13849 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13850 instead of init_registers ().
13851 * win32-arm-low.c (init_registers_arm): Add prototype.
13852 (the_low_target): Add initializer for arch_setup field.
13853 * win32-i386-low.c (init_registers_i386): Add prototype.
13854 (the_low_target): Add initializer for arch_setup field.
13855
13856 * spu-low.c (init_registers_spu): Add prototype.
13857 (initialize_low): Call initialie_registers_spu () instead of
13858 initialize_registers ().
13859
13860 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13861
13862 * server.c (handle_v_requests): When handling the vRun and vAttach
13863 packets, if already debugging a process, don't kill it. Return an
13864 error instead.
13865
13866 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13867
13868 * server.c (handle_query): Correct length check.
13869
13870 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13871
13872 * win32-low.c (do_initial_child_stuff): Add process handle
13873 parameter. Set current_process_handle and current_process_id from the
13874 parameters. Clear globals.
13875 (win32_create_inferior): Don't set current_process_handle and
13876 current_process_id here. Instead pass them on the call to
13877 do_initial_child_stuff.
13878 (win32_attach): Likewise.
13879 (win32_clear_inferiors): New.
13880 (win32_kill): Don't close the current process handle or the
13881 current thread handle here. Instead call win32_clear_inferiors.
13882 (win32_detach): Don't open a new handle to the process. Call
13883 win32_clear_inferiors.
13884 (win32_join): Don't rely on current_process_handle; open a new
13885 handle using the process id.
13886 (win32_wait): Call win32_clear_inferiors when the inferior process
13887 has exited.
13888
13889 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13890
13891 * server.c (monitor_show_help): Add "exit".
13892
13893 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13894
13895 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13896 (clean): Add reg-xtensa.c.
13897 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13898 * configure.srv (xtensa*-*-linux*) New target.
13899 * linux-xtensa-low.c: New.
13900 * xtensa-xtregs.c: New.
13901
13902 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13903
13904 * hostio.c: Don't include errno.h.
13905 (errno_to_fileio_errno): Move to hostio-errno.
13906 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13907 error number outputting to the target->hostio_last_error callback.
13908 (hostio_packet_error): Use FILEIO_EINVAL directly.
13909 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13910 calls to hostio_error.
13911 * hostio-errno.c: New.
13912 * server.h (hostio_last_error_from_errno): Declare.
13913 * target.h (target_ops): Add hostio_last_error member.
13914 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13915 as hostio_last_error handler.
13916 * spu-low.c (spu_target_ops): Likewise.
13917 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13918 (wince_hostio_last_error): New functions.
13919 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13920 as hostio_last_error handler.
13921 (win32_target_ops) [!_WIN32_WCE]: Register
13922 hostio_last_error_from_errno as hostio_last_error handler.
13923 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13924 (hostio-errno.o): New rule.
13925 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13926 * configure.srv (srv_hostio_err_objs): New variable. Default to
13927 hostio-errno.o.
13928 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13929 * configure: Regenerate.
13930
13931 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13932
13933 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13934 (linux_kill, linux_detach): Clean up the process list.
13935 * remote-utils.c (remote_open): Improve port number parsing.
13936 (putpkt_binary, input_interrupt): Only send interrupts if the target
13937 is running.
13938 * server.c (extended_protocol): Make static.
13939 (attached): Define earlier.
13940 (exit_requested, response_needed, program_argv): New variables.
13941 (target_running): New.
13942 (start_inferior): Clear attached here.
13943 (attach_inferior): Set attached here.
13944 (require_running): Define.
13945 (handle_query): Use require_running and target_running. Implement
13946 "monitor exit".
13947 (handle_v_attach, handle_v_run): New.
13948 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13949 (gdbserver_usage): Update.
13950 (main): Redo argument parsing. Handle --debug and --multi. Handle
13951 --attach along with other options or after the port. Save
13952 program_argv. Support no initial program. Resynchronize
13953 communication with GDB after an error. Handle "monitor exit".
13954 Use require_running and target_running. Always allow the extended
13955 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13956 restart in extended mode.
13957 * README: Refer to the GDB manual. Update --attach usage.
13958
13959 2007-12-20 Andreas Schwab <schwab@suse.de>
13960
13961 * linux-low.c (STACK_SIZE): Define.
13962 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13963 (linux_test_for_tracefork): Likewise.
13964
13965 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13966
13967 * linux-low.c (linux_wait_for_event): Update messages. Do not
13968 reinsert auto-delete breakpoints.
13969 * mem-break.c (struct breakpoint): Change return type of handler to
13970 int.
13971 (set_breakpoint_at): Update handler type.
13972 (reinsert_breakpoint_handler): Return 1 instead of calling
13973 delete_breakpoint.
13974 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13975 setting a new one.
13976 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13977 * mem-break.h (set_breakpoint_at): Update handler type.
13978 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13979 * win32-low.c (auto_delete_breakpoint): New.
13980 (get_child_debug_event): Use it.
13981
13982 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13983
13984 * configure.ac: Check for pread and pwrite.
13985 * hostio.c (handle_pread): Fall back to lseek and read.
13986 (handle_pwrite): Fall back to lseek and write.
13987 * config.in, configure: Regenerated.
13988
13989 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13990
13991 * server.c (myresume): Add own_buf argument.
13992 (main): Update calls.
13993
13994 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13995
13996 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13997 * remote-utils.c (remote_open): Do not call disable_async_io.
13998 (block_async_io): Delete.
13999 (unblock_async_io): Make static.
14000 (initialize_async_io): New.
14001 * server.c (handle_v_cont): Handle async I/O here.
14002 (myresume): Likewise. Move other common resume tasks here...
14003 (main): ... from here. Call initialize_async_io. Disable async
14004 I/O before the main loop.
14005 * server.h (initialize_async_io): Declare.
14006 (block_async_io, unblock_async_io): Delete prototypes.
14007 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14008
14009 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14010
14011 * remote-utils.c (readchar): Allow binary data in received messages.
14012
14013 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14014
14015 * win32-low.c (attaching): New global.
14016 (win32_create_inferior): Clear the `attaching' global.
14017 (win32_attach): Set the `attaching' global.
14018 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14019 attaching. Only set a breakpoint at the entry point if not
14020 attaching.
14021
14022 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14023
14024 * server.c (main): Don't report dll events on the initial
14025 connection on attaches.
14026
14027 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14028
14029 * server.c (main): Relax numerical bases supported for the pid of
14030 the --attach command line argument.
14031
14032 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14033
14034 * win32-low.c (win32_attach): Call OpenProcess before
14035 DebugActiveProcess, not after. Add last error output to error
14036 call.
14037
14038 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14039
14040 * win32-low.c (win32_get_thread_context)
14041 (win32_set_thread_context): New functions.
14042 (thread_rec): Use win32_get_thread_context.
14043 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14044 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14045 field.
14046
14047 2007-12-03 Leo Zayas
14048 Pedro Alves <pedro_alves@portugalmail.pt>
14049
14050 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14051 global variables.
14052 (child_add_thread): Minor cleanup.
14053 (child_continue): Resume artificially suspended threads before
14054 calling ContinueDebugEvent.
14055 (suspend_one_thread): New.
14056 (fake_breakpoint_event): New.
14057 (get_child_debug_event): Change return type to int. Check here if
14058 gdb sent an interrupt request. If a soft interrupt was requested,
14059 fake a breakpoint event. Return 0 if there is no event to handle,
14060 and 1 otherwise.
14061 (win32_wait): Don't check here if gdb sent an interrupt request.
14062 Ensure there is a valid event to handle.
14063 (win32_request_interrupt): Add soft interruption method as last
14064 resort.
14065
14066 2007-12-03 Leo Zayas
14067 Pedro Alves <pedro_alves@portugalmail.pt>
14068
14069 * win32-low.h (win32_thread_info): Add descriptions to the
14070 structure members. Replace `suspend_count' counter by a
14071 `suspended' flag.
14072 * win32-low.c (thread_rec): Update condition of when to get the
14073 context from the inferior. Rely on ContextFlags being set if it
14074 has already been retrieved. Only suspend the inferior thread if
14075 we haven't already. Warn if that fails.
14076 (continue_one_thread): s/suspend_count/suspended/. Only call
14077 ResumeThread once. Warn if that fails.
14078
14079 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14080
14081 * win32-low.c (win32_wait): Don't read from the inferior when it
14082 has already exited.
14083
14084 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14085
14086 * Makefile.in (win32_low_h): New variable.
14087 (win32-low.o): Add dependency on $(win32_low_h).
14088 (win32-arm-low.o, win32-i386-low.o): New rules.
14089
14090 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14091
14092 * hostio.c: Correct copyright year.
14093
14094 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14095
14096 * Makefile.in (OBS): Add hostio.o.
14097 (hostio.o): New rule.
14098 * server.h (handle_vFile): Declare.
14099 * hostio.c: New file.
14100 * server.c (handle_v_requests): Take packet_len and new_packet_len
14101 for binary packets. Call handle_vFile.
14102 (main): Update call to handle_v_requests.
14103
14104 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14105
14106 * linux-low.c: Include <sched.h>.
14107
14108 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14109
14110 * linux-low.c (linux_tracefork_grandchild): New.
14111 (linux_tracefork_child): Use clone.
14112 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14113
14114 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14115
14116 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14117
14118 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14119
14120 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14121
14122 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14123
14124 * inferiors.c (change_inferior_id): Delete.
14125 (add_pid_to_list, pull_pid_from_list): New.
14126 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14127 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14128 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14129 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14130 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14131 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14132 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14133 (using_threads): Always set to 1.
14134 (handle_extended_wait): New.
14135 (add_process): Do not set TID.
14136 (linux_create_inferior): Set must_set_ptrace_flags.
14137 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14138 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14139 (linux_thread_alive): Rename TID argument to LWPID.
14140 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14141 (linux_wait_for_event): Do not use TID or check using_threads. Update
14142 call to dead_thread_notify. Call handle_extended_wait.
14143 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14144 (send_sigstop): Delete sigstop_sent.
14145 (wait_for_sigstop): Avoid TID.
14146 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14147 (linux_test_for_tracefork): New.
14148 (linux_lookup_signals): Use thread_db_active and
14149 linux_supports_tracefork_flag.
14150 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14151 * linux-low.h (get_process_thread): Avoid TID.
14152 (struct process_ifo): Move thread_known and tid to the end. Remove
14153 sigstop_sent.
14154 (linux_attach_lwp, thread_db_init): Update prototypes.
14155 * server.h (change_inferior_id): Delete prototype.
14156 (add_pid_to_list, pull_pid_from_list): New prototypes.
14157 * thread-db.c (thread_db_use_events): New.
14158 (find_first_thread): Rename to...
14159 (find_one_thread): ...this. Update callers and messages. Do not
14160 call fatal. Check thread_db_use_events. Do not call
14161 change_inferior_id or new_thread_notify.
14162 (maybe_attach_thread): Update. Do not call new_thread_notify.
14163 (thread_db_init): Set thread_db_use_events. Check use_events.
14164 * utils.c (fatal, warning): Correct message prefix.
14165
14166 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14167
14168 * Makefile.in (clean): Remove new files.
14169 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14170 (powerpc-64.o, powerpc-64.c): New rules.
14171 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14172 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14173 with SPE.
14174 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14175 SPE targets.
14176 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14177 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14178 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14179 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14180 (target_regsets): Add AltiVec and SPE register sets.
14181 * configure.ac: Check for AltiVec and SPE.
14182 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14183 (ppc_fill_vrregset, ppc_store_vrregset): New.
14184 (target_regsets): Add AltiVec register set.
14185 * configure: Regenerated.
14186
14187 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14188
14189 * linux-low.c (O_LARGEFILE): Define.
14190 (linux_read_memory): Use /proc/PID/mem.
14191 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14192 * configure, config.in: Regenerated.
14193
14194 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14195
14196 * linux-low.c (linux_wait_for_event): Do not pass signals while
14197 single-stepping.
14198
14199 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14200
14201 * win32-low.c (create_process): New.
14202 (win32_create_inferior): Use create_process instead of
14203 CreateProcess. If create_process failed retry appending an ".exe"
14204 suffix. Store the GetLastError result immediatelly after
14205 create_process calls and use it on the call to error.
14206
14207 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14208
14209 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14210
14211 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14212
14213 * configure.ac: Switch license to GPLv3.
14214
14215 2007-08-01 Michael Snyder <msnyder@access-company.com>
14216
14217 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14218
14219 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14220
14221 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14222 typedef.
14223 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14224 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14225 CloseToolhelp32Snapshot.
14226 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14227 CloseToolhelp32Snapshot.
14228
14229 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14230
14231 * server.c (main): Check for inferior exit before main loop.
14232
14233 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14234
14235 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14236 instead of on tmp_desc.
14237
14238 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14239 Daniel Jacobowitz <dan@codesourcery.com>
14240
14241 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14242 (add_thread): Minor cleanups.
14243 (clear_inferiors): Move lower in the file. Clear the DLL
14244 list.
14245 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14246 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14247 (xml_escape_text): New.
14248 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14249 for qSupported.
14250 (handle_v_cont): Report errors.
14251 (gdbserver_version): Update.
14252 (main): Correct size of own_buf. Do not report initial DLL events.
14253 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14254 (unloaded_dll, xml_escape_text): New.
14255 * win32-low.c (enum target_waitkind): Update comments.
14256 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14257 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14258 (win32_EnumProcessModules, win32_GetModuleInformation)
14259 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14260 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14261 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14262 (win32_Module32First, win32_Module32Next, load_toolhelp)
14263 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14264 (get_child_debug_event): Handle DLL events.
14265 (win32_wait): Likewise.
14266
14267 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14268
14269 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14270 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14271
14272 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14273
14274 * win32-low.c (handle_output_debug_string): Ignore event if not
14275 waiting.
14276
14277 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14278
14279 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14280
14281 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14282
14283 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14284
14285 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14286
14287 * inferiors.c (change_inferior_id): Add comment.
14288 * linux-low.c (check_removed_breakpoint): Add an early
14289 prototype. Improve debug output.
14290 (linux_attach): Doc update.
14291 (linux_detach_one_process, linux_detach): Clean up before releasing
14292 each process.
14293 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14294 * linux-low.h (struct process_info): Doc improvement.
14295 * mem-break.c (delete_all_breakpoints): New.
14296 * mem-break.h (delete_all_breakpoints): New prototype.
14297 * thread-db.c (find_first_thread): New.
14298 (thread_db_create_event): Call it instead of
14299 thread_db_find_new_threads. Clean up unused variables.
14300 (maybe_attach_thread): Remove first thread handling.
14301 (thread_db_find_new_threads): Use find_first_thread.
14302 (thread_db_get_tls_address): Likewise.
14303
14304 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14305
14306 * thread-db.c (thread_db_find_new_threads): Add prototype.
14307 (thread_db_create_event): Check for the main thread before adding
14308 a new thread.
14309 (maybe_attach_thread): Only enable event reporting if TID == 0.
14310 (thread_db_get_tls_address): Check for new threads.
14311
14312 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14313
14314 * linux-low.c (linux_create_inferior): Try execv before execvp.
14315 * spu-low.c (spu_create_inferior): Likewise.
14316
14317 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14318
14319 * linux-low.c (linux_create_inferior): Change execv to execvp.
14320 * spu-low.c (spu_create_inferior): Likewies.
14321
14322 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14323
14324 * Makefile.in (clean): Clean new files instead of deleted ones.
14325 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14326 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14327 rules.
14328 * configure.srv: Specify XML files and new regformats for MIPS and
14329 MIPS64 GNU/Linux.
14330 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14331 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14332 an entry for the restart register.
14333 (mips_cannot_fetch_register, mips_cannot_store_register)
14334 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14335 register names to match the XML descriptions.
14336 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14337 restart register instead of $0.
14338
14339 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14340 Markus Deuling <deuling@de.ibm.com>
14341
14342 * remote-utils.c (decode_xfer_write): New function.
14343 * server.h (decode_xfer_write): Add prototype.
14344 * server.c (handle_query): Add PACKET_LEN argument. Support
14345 qXfer:spu:read and qXfer:spu:write packets.
14346 (main): Pass packet_len to handle_query.
14347 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14348 * target.h (target_ops): Add qxfer_spu.
14349
14350 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14351
14352 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14353 accessing non-seekable spufs files.
14354
14355 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14356
14357 * server.c (handle_query): Add reply for qC packet.
14358
14359 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14360 Leo Zayas <lerele@champenstudios@com>
14361
14362 * server.h (check_remote_input_interrupt_request): New function.
14363 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14364 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14365 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14366 (check_remote_input_interrupt_request): New function.
14367 * server.h (check_remote_input_interrupt_request): Declare.
14368 * win32-low.c (winapi_DebugBreakProcess,
14369 winapi_GenerateConsoleCtrlEvent): New typedefs.
14370 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14371 to 250 ms.
14372 (win32_wait): Check for remote interrupt request
14373 with check_remote_input_interrupt_request.
14374 (win32_request_interrupt): New function.
14375 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14376
14377 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14378
14379 * win32-low.c (debug_registers_changed,
14380 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14381 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14382 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14383 (thread_rec): Get context using the low target.
14384 (child_add_thread): Call thread_added on the low target,
14385 which does the same thing.
14386 (regptr): Delete.
14387 (do_initial_child_stuff): Remove debug registers references.
14388 Set context using the low target. Resume threads after
14389 setting the contexts.
14390 (child_continue): Remove dead variable. Remove debug
14391 registers references.
14392 (child_fetch_inferior_registers): Go through the low target.
14393 (do_child_store_inferior_registers): Remove.
14394 (child_store_inferior_registers): Go through the low target.
14395 (win32_resume): Remove debug registers references.
14396 Set context using the low target.
14397 (handle_exception): Change return type to void. Don't record
14398 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14399 first chance exception.
14400 (get_child_debug_event): Change return type to void. Remove
14401 goto loop. Always return after waiting for debug event.
14402 (win32_wait): Convert to switch statement. Handle spurious
14403 events.
14404
14405 * win32-i386-low.c (debug_registers_changed,
14406 debug_registers_used): New.
14407 (initial_stuff): Rename to ...
14408 (i386_initial_stuff): ... this. Clear debug registers
14409 state variables.
14410 (store_debug_registers): Delete.
14411 (i386_get_thread_context): New.
14412 (load_debug_registers): Delete.
14413 (i386_set_thread_context): New.
14414 (i386_thread_added): New.
14415 (single_step): Rename to ...
14416 (i386_single_step): ... this.
14417 (do_fetch_inferior_registers): Rename to ...
14418 (i386_fetch_inferior_register): ... this.
14419 (i386_store_inferior_register): New.
14420 (the_low_target): Adapt to new interface.
14421
14422 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14423 (arm_get_thread_context): New.
14424 (arm_set_thread_context): New.
14425 (regptr): New.
14426 (do_fetch_inferior_registers): Rename to ...
14427 (arm_fetch_inferior_register): ... this.
14428 (arm_store_inferior_register): New.
14429 (arm_wince_breakpoint): Reimplement as unsigned long.
14430 (arm_wince_breakpoint_len): Define.
14431 (the_low_target): Adapt to new interface.
14432
14433 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14434 load_debug_registers. Add get_thread_context, set_thread_context,
14435 thread_added and store_inferior_register. Rename
14436 fetch_inferior_registers to fetch_inferior_register.
14437 (regptr): Remove declaration.
14438
14439 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14440
14441 * linux-low.c (linux_detach): Change return type to int. Return 0.
14442 * spu-low.c (spu_detach): Likewise.
14443
14444 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14445
14446 * target.h (target_ops): Change return type of detach to int.
14447 Add join.
14448 (join_inferior): New.
14449 * server.c (main): Don't skip detach support on mingw32.
14450 If the inferior doesn't support detaching return error.
14451 Call join_inferior instead of using waitpid.
14452 * linux-low.c (linux_join): New.
14453 (linux_target_op): Add linux_join.
14454 * spu-low.c (spu_join): New.
14455 (spu_target_ops): Add spu_join.
14456 * win32-low.c (win32_detach): Adapt to new interface.
14457 Reopen current_process_handle before detaching. Issue a child
14458 resume before detaching.
14459 (win32_join): New.
14460 (win32_target_op): Add win32_join.
14461
14462 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14463
14464 * win32-low.c (win32-attach): Fix return value.
14465 * target.h (target_ops): Describe ATTACH return values.
14466
14467 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14468
14469 * win32-low.c (GETPROCADDRESS): Define.
14470 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14471 (winapi_DebugSetProcessKillOnExit): Likewise.
14472 (win32_create_inferior): Force usage of ansi CreateProcessA.
14473 (win32_attach): Use GETPROCADDRESS.
14474 (win32_detach): Likewise.
14475
14476 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14477
14478 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14479
14480 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14481
14482 * win32-low.c: Commit leftover changes from 2007-03-29.
14483
14484 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14485
14486 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14487 fields short instead of int. Add explicit padding.
14488 (i387_cache_to_fsave): Remove unnecessary casts.
14489 (i387_fsave_to_cache): Doc fix.
14490 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14491
14492 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14493
14494 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14495 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14496
14497 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14498
14499 * configure.srv (arm*-*-mingw32ce*): Move near the other
14500 arm targets.
14501
14502 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14503
14504 * configure.ac: Add errno checking.
14505 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14506 sys/file.h and malloc.h.
14507 (AC_CHECK_DECLS): Add perror.
14508 (srv_mingwce): Handle.
14509 * configure.srv (i[34567]86-*-cygwin*): Add
14510 win32-i386-low.o to srv_tgtobj.
14511 (i[34567]86-*-mingw*): Likewise.
14512 (arm*-*-mingw32ce*): Add case.
14513 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14514 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14515 [__MINGW32CE__] (strerror): New function.
14516 [__MINGW32CE__] (errno): Define to GetLastError.
14517 [__MINGW32CE__] (COUNTOF): New macro.
14518 (remote_open): Remove extra close call.
14519 * mem-break.c (delete_breakpoint_at): New function.
14520 * mem-break.h (delete_breakpoint_at): Declare.
14521 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14522 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14523 [USE_WIN32API] (read, write): Add char* casts.
14524 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14525 * server.h: Include wincecompat.h on Windows CE.
14526 [HAVE_ERRNO_H]: Check.
14527 (perror): Declare if not declared.
14528 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14529 (perror_with_name): Remove errno declaration.
14530 * wincecompat.h: New.
14531 * wincecompat.c: New.
14532 * win32-low.h: New.
14533 * win32-arm-low.c: New.
14534 * win32-i386-low.c: New.
14535 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14536 (OUTMSG2): Make it safe.
14537 (_T): New macro.
14538 (COUNTOF): New macro.
14539 (NUM_REGS): Get it from the low target.
14540 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14541 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14542 (thread_rec): Let low target handle debug registers.
14543 (child_add_thread): Likewise.
14544 (child_init_thread_list): Likewise.
14545 (continue_one_thread): Likewise.
14546 (regptr): New.
14547 (do_child_fetch_inferior_registers): Move to ...
14548 * win32-i386-low.c: ... here, and rename to ...
14549 (do_fetch_inferior_registers): ... this.
14550 * win32-low.c (child_fetch_inferior_registers):
14551 Go through the low target.
14552 (do_child_store_inferior_registers): Use regptr.
14553 (strwinerror): New function.
14554 (win32_create_inferior): Handle Windows CE.
14555 Use strwinerror instead of strerror on Windows error
14556 codes. Add program to the error output.
14557 Don't close the main thread handle on Windows CE.
14558 (win32_attach): Use coredll.dll on Windows CE.
14559 (win32_kill): Close current process and current
14560 thread handles.
14561 (win32_detach): Use coredll.dll on Windows CE.
14562 (win32_resume): Let low target handle debug registers, and
14563 step request.
14564 (handle_exception): Add/Remove initial breakpoint. Avoid
14565 non-existant WSTOPSIG on Windows CE.
14566 (win32_read_inferior_memory): Cast to remove warning.
14567 (win32_arch_string): Go through the low target.
14568 (initialize_low): Call set_breakpoint_data with the low
14569 target's breakpoint.
14570 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14571 FOP_REGNUM, mappings): Move to ...
14572 * win32-i386-low.c: ... here.
14573 * win32-low.c (win32_thread_info): Move to ...
14574 * win32-low.h: ... here.
14575 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14576 win32-arm-low.c and wincecompat.c.
14577 (all:): Add $EXEEXT.
14578 (install-only:): Likewise.
14579 (gdbserver:): Likewise.
14580 (gdbreplay:): Likewise.
14581 * config.in: Regenerate.
14582 * configure: Regenerate.
14583
14584 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14585
14586 * win32-low.c: Rename typedef thread_info to
14587 win32_thread_info throughout.
14588
14589 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14590
14591 * win32-i386-low.c: Rename to ...
14592 * win32-low.c: ... this.
14593 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14594 * Makefile.in: Likewise.
14595
14596 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14597
14598 * remote-utils.c (monitor_output): Constify msg parameter.
14599 * server.h (monitor_output): Likewise.
14600 * win32-i386-low.c (handle_output_debug_string): New.
14601 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14602 handle_output_debug_string.
14603 (get_child_debug_event): Likewise.
14604
14605 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14606
14607 * server.c (main): Correct strtoul check.
14608
14609 2007-03-27 Jon Ringle <jon@ringle.org>
14610
14611 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14612
14613 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14614
14615 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14616
14617 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14618
14619 * terminal.h: Check HAVE_SGTTY_H.
14620
14621 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14622
14623 * remote-utils.c (remote_open): Print out the assigned port number.
14624
14625 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14626
14627 * remote-utils.c (monitor_output): New function.
14628 * server.c (debug_threads): Define here.
14629 (monitor_show_help): New function.
14630 (handle_query): Handle qRcmd.
14631 (main): Do not handle 'd' packet.
14632 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14633 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14634 of debug_threads.
14635
14636 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14637
14638 * Makefile.in (EXEEXT): New.
14639 (clean): Use $(EXEEXT).
14640
14641 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14642
14643 * target.h (target_ops): Rename send_signal to request_interrupt,
14644 and remove enum target_signal parameter.
14645 * linux-low.c (linux_request_interrupt): Rename from
14646 linux_send_signal, and always send SIGINT.
14647 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14648 and always send SIGINT.
14649 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14650 of send_signal.
14651 (input_interrupt): Likewise.
14652
14653 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14654
14655 * server.c (get_features_xml): Check if target implemented
14656 arch_string.
14657 * win32-i386-low.c (win32_arch_string): New.
14658 (win32_target_ops): Add win32_arch_string as arch_string member.
14659
14660 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14661
14662 * spu-low.c (spu_arch_string): New.
14663 (spu_target_ops): Add spu_arch_string.
14664
14665 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14666
14667 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14668 * configure.ac: Do not check for terminal.h.
14669 * configure, config.in: Regenerated.
14670
14671 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14672
14673 * Makefile.in (OBS): Add $(XML_BUILTIN).
14674 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14675 (clean): Update.
14676 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14677 (arm-with-iwmmxt.c): New.
14678 * config.in, configure: Regenerate.
14679 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14680 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14681 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14682 (arm*-*-linux*): Add iWMMXt and regset support.
14683 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14684 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14685 (arm_store_wmmxregset, target_regsets): New.
14686 * server.c (get_features_xml): Take annex argument. Check builtin
14687 XML documents.
14688 (handle_query): Handle multiple annexes.
14689
14690 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14691
14692 * remote-utils.c [USE_WIN32API] (read, write): Define.
14693 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14694 write.
14695
14696 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14697
14698 * linux-i386-low.c (the_low_target): Set arch_string.
14699 * linux-x86-64-low.c (the_low_target): Likewise.
14700 * linux-low.c (linux_arch_string): New.
14701 (linux_target_ops): Add it.
14702 * linux-low.h (struct linux_target_ops): Add arch_string.
14703 * server.c (write_qxfer_response): Use const void * for DATA.
14704 (get_features_xml): New.
14705 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14706 * target.h (struct target_ops): Add arch_string method.
14707
14708 2007-01-03 Denis Pilat <denis.pilat@st.com>
14709 Daniel Jacobowitz <dan@codesourcery.com>
14710
14711 * linux-low.c (linux_kill): Handle being called with no threads.
14712 * win32-i386-low.c (win32_kill): Likewise.
14713 (get_child_debug_event): Clear current_process_handle.
14714
14715 2006-12-30 Denis PILAT <denis.pilat@st.com>
14716 Daniel Jacobowitz <dan@codesourcery.com>
14717
14718 * remote-utils.c (remote_open): Check the type of specified
14719 serial port devices before opening them.
14720 * server.c (main): Kill the inferior if an error occurs during
14721 the first remote_open.
14722
14723 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14724
14725 * README: Update supported targets.
14726
14727 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14728
14729 * Makefile.in (clean): Remove reg-mips64.c.
14730 (reg-mips64.c, reg-mips64.o): New rules.
14731 * configure.srv: Handle mips64. Include regset support for mips.
14732 * linux-mips-low.c (union mips_register): New.
14733 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14734 (mips_breakpoint, mips_breakpoint_at): Use int.
14735 (mips_collect_register, mips_supply_register)
14736 (mips_collect_register_32bit, mips_supply_register_32bit)
14737 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14738 (mips_store_fpregset, target_regsets): New.
14739 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14740
14741 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14742
14743 * configure.srv: Add target "spu*-*-*".
14744 * Makefile.in (clean): Remove reg-spu.c.
14745 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14746 * spu-low.c: New file.
14747
14748 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14749
14750 * configure.ac: Correct td_thr_tls_get_addr test.
14751 * configure: Regenerated.
14752
14753 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14754
14755 * linux-low.c (linux_wait_for_event): Reformat. Use the
14756 pass_signals array.
14757 * remote-utils.c (decode_address_to_semicolon): New.
14758 * server.c (pass_signals, handle_general_set): New.
14759 (handle_query): Mention QPassSignals for qSupported.
14760 (main): Call handle_general_set.
14761 * server.h (pass_signals, decode_address_to_semicolon): New.
14762
14763 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14764
14765 * server.c (handle_query): Correct error handling for read_auxv.
14766
14767 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14768
14769 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14770 and srv_linux_thread_db to yes.
14771 * linux-s390-low.c (s390_fill_gregset): New function.
14772 (target_regsets): Define data structure.
14773
14774 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14775
14776 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14777 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14778 * config.in, configure: Regenerated.
14779 * inferiors.c (gdb_id_to_thread): New function.
14780 (gdb_id_to_thread_id): Use it.
14781 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14782 * linux-low.h (struct process_info): Add th member.
14783 (thread_db_get_tls_address): New prototype.
14784 * remote-utils.c (decode_address): Make non-static.
14785 * server.c (handle_query): Handle qGetTLSAddr.
14786 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14787 * target.h (struct target_ops): Add get_tls_address.
14788 * thread-db.c (maybe_attach_thread): Save the thread handle.
14789 (thread_db_get_tls_address): New.
14790
14791 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14792
14793 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14794 (linux_resume_one_process): Take a siginfo_t *. Update all
14795 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14796 (struct pending_signals): Add a siginfo_t.
14797 (linux_wait_for_process): Always set last_status.
14798 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14799 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14800 * linux-low.h (struct process_info): Add last_status.
14801
14802 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14803
14804 * remote-utils.c (try_rle): New function.
14805 (putpkt_binary): Use it.
14806
14807 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14808
14809 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14810 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14811 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14812 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14813 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14814 point registers.
14815
14816 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14817
14818 * server.c (terminal_fd): New variable.
14819 (old_foreground_pgrp): Likewise.
14820 (restore_old_foreground_pgrp): New function.
14821 (start_inferior): Record the terminal file descriptor in terminal_fd
14822 and its original foreground group in old_foreground_pgrp. Register
14823 restore_old_foreground_pgrp with atexit().
14824
14825 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14826
14827 * server.c (handle_query): Correct qPart to qXfer.
14828
14829 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14830
14831 * configure.ac: Check for more headers which are missing on
14832 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14833 * configure.srv: Add Cygwin and mingw32.
14834 * remote-utils.c: Don't include headers unconditionally which
14835 are missing on mingw32. Include <winsock.h> for mingw32.
14836 (remote_open): Adjust for mingw32 support. Flush
14837 standard error after writing to it.
14838 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14839 (unblock_async_io, enable_async_io, disable_async_io)
14840 (readchar, getpkt): Update for Winsock support.
14841 (prepare_resume_reply): Expect a protocol signal number.
14842 * server.c: Disable <sys/wait.h> on mingw32.
14843 (start_inferior): Adjust for mingw32 support. Flush
14844 standard error after writing to it.
14845 (attach_inferior): Likewise. Use protocol signal
14846 numbers.
14847 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14848 and names.
14849 * win32-i386-low.c: New file.
14850 * Makefile.in (XM_CLIBS): Set.
14851 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14852 (win32-i386-low.o): New dependency rule.
14853 * linux-low.c (linux_wait): Use target signal numbers.
14854 * target.h (struct target_ops): Doc fix.
14855 * server.h (target_signal_to_name): New prototype.
14856 * gdbreplay.c: Don't include headers unconditionally which
14857 are missing on mingw32. Include <winsock.h> for mingw32.
14858 (remote_close, remote_open): Adjust for Winsock support.
14859 * configure, config.in: Regenerated.
14860
14861 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14862
14863 * server.c (decode_xfer_read, write_qxfer_response): New.
14864 (handle_query): Take a packet length argument. Handle
14865 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14866 the qSupported response.
14867 (main): Update call to handle_query.
14868
14869 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14870
14871 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14872 (putpkt_binary): Renamed from putpkt and adjusted for binary
14873 data.
14874 (putpkt): New wrapper for putpkt_binary.
14875 (readchar): Don't mask off the high bit.
14876 (decode_X_packet): New function.
14877 * server.c (main): Call putpkt_binary if a handler sets the packet
14878 length. Save the length of the incoming packet. Handle 'X'.
14879 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14880
14881 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14882
14883 * server.c (handle_query): Handle qSupported.
14884
14885 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14886
14887 * remote-utils.c (all_symbols_looked_up): New variable.
14888 (look_up_one_symbol): Check it.
14889 * server.h (look_up_one_symbol): New declaration.
14890 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14891
14892 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14893
14894 * Makefile.in (linux-arm-low.o): Update dependencies.
14895 * linux-arm-low.c: Include "gdb_proc_service.h".
14896 (PTRACE_GET_THREAD_AREA): Define.
14897 (ps_get_thread_area): New function.
14898
14899 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14900
14901 * configure.srv (m68k*-*-uclinux*): New target.
14902 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14903 (linux_resume_one_process): Remove extraneous cast.
14904 (linux_read_offsets): New.
14905 (linux_target_op): Add linux_read_offsets on mmuless systems.
14906 * server.c (handle_query): Add qOffsets logic.
14907 * target.h (struct target_ops): Add read_offsets.
14908
14909 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14910
14911 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14912 (PTRACE_GET_THREAD_AREA): Define.
14913 (ps_get_thread_area): New function.
14914 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14915 (linux-x86-64-low.o): Update.
14916
14917 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14918
14919 * configure.ac: Remove checks for prfpregset_t.
14920 * gdb_proc_service.h: New file.
14921 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14922 new "gdb_proc_service.h".
14923 * proc-service.c: Likewise.
14924 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14925 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14926 * Makefile.in (gdb_proc_service_h): Updated.
14927 * configure, config.in: Regenerated.
14928
14929 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14930
14931 * remote-utils.c (prepare_resume_reply): Move declaration
14932 of gdb_id_from_wait to the top of the block.
14933
14934 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14935
14936 * linux-low.c (regsets_store_inferior_registers): Read the regset
14937 from the target before filling it.
14938
14939 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14940
14941 * server.c (attach_inferior): Return SIGTRAP for a successful
14942 attach.
14943
14944 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14945
14946 * Makefile.in (OBS): Add version.o.
14947 (STAGESTUFF): Delete.
14948 (version.o): Add dependencies.
14949 (version.c): Replace rule.
14950 (clean): Remove version.c.
14951 * server.c (gdbserver_version): New.
14952 (gdbserver_usage): Use printf.
14953 (main): Handle --version and --help.
14954 * server.h (version, host_name): Add declarations.
14955
14956 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14957
14958 * linux-arm-low.c:
14959 * linux-arm-low.c:
14960 * inferiors.c:
14961 * i387-fp.h:
14962 * i387-fp.c:
14963 * gdbreplay.c:
14964 * regcache.c:
14965 * proc-service.c:
14966 * mem-break.h:
14967 * mem-break.c:
14968 * linux-x86-64-low.c:
14969 * linux-sh-low.c:
14970 * linux-s390-low.c:
14971 * linux-ppc64-low.c:
14972 * linux-ppc-low.c:
14973 * linux-mips-low.c:
14974 * linux-m68k-low.c:
14975 * linux-m32r-low.c:
14976 * linux-low.h:
14977 * linux-low.c:
14978 * linux-ia64-low.c:
14979 * linux-i386-low.c:
14980 * linux-crisv32-low.c:
14981 * thread-db.c:
14982 * terminal.h:
14983 * target.h:
14984 * target.c:
14985 * server.h:
14986 * server.c:
14987 * remote-utils.c:
14988 * regcache.h:
14989 * utils.c:
14990 * Makefile.in:
14991 * configure.ac:
14992 * gdbserver.1: Add (C) after Copyright. Update the FSF
14993 address.
14994
14995 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14996
14997 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14998 (arm_breakpoint_at): Recognize both breakpoints.
14999 (the_low_target): Use the correct breakpoint instruction.
15000
15001 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15002
15003 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15004 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15005 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15006 (the_low_target): Update.
15007
15008 2005-10-25 Andreas Schwab <schwab@suse.de>
15009
15010 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15011
15012 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15013 (ia64_num_regs): Reduce to 462.
15014
15015 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15016
15017 * acinclude.m4: Correct quoting.
15018 * aclocal.m4: Regenerated.
15019
15020 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15021 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15022 (thread_db_init): Call thread_db_err_str.
15023 * configure.ac: Check for TD_VERSION.
15024 * config.in, configure: Regenerated.
15025
15026 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15027
15028 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15029
15030 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15031
15032 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15033 is not available. Define HAVE_PTRACE_GETREGS if it is.
15034 * config.in, configure: Regenerated.
15035 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15036 * linux-i386-low.c, linux-m68k-low.c: Update to use
15037 HAVE_PTRACE_GETREGS.
15038 * linux-low.c (regsets_fetch_inferior_registers)
15039 (regsets_store_inferior_registers): Only return 0 if we processed
15040 GENERAL_REGS.
15041 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15042 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15043
15044 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15045
15046 * inferiors.c (struct thread_info): Add gdb_id.
15047 (add_thread): Add gdb_id argument.
15048 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15049 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15050 calls to add_thread.
15051 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15052 * server.c (handle_query): Use thread_to_gdb_id.
15053 (handle_v_cont, main): Use gdb_id_to_thread_id.
15054 * server.h (add_thread): Update prototype.
15055 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15056 prototypes.
15057
15058 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15059
15060 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15061 left-padded registers.
15062 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15063 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15064
15065 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15066
15067 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15068 * configure: Regenerate.
15069 * config.in: Regenerate.
15070 * server.h (NEED_DECLARATION_STRERROR):
15071 Replace with !HAVE_DECL_STRERROR.
15072
15073 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15074
15075 * linux-low.c (linux_wait, linux_send_signal): Don't test
15076 an unsigned long variable for > 0 if it could be MAX_ULONG.
15077 * server.c (myresume): Likewise.
15078 * target.c (set_desired_inferior): Likewise.
15079
15080 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15081
15082 * configure.ac: Simplify and improve check for socklen_t.
15083 * configure, config.in: Regenerate.
15084
15085 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15086
15087 * acconfig.h: Remove.
15088 * configure.ac: Add a test for socklen_t. Use three-argument
15089 AC_DEFINE throughout.
15090 * config.in: Regenerated using autoheader 2.59.
15091 * configure: Regenerated.
15092
15093 * gdbreplay.c (socklen_t): Provide a default.
15094 (remote_open): Use socklen_t.
15095 * remote-utils.c (socklen_t): Provide a default.
15096 (remote_open): Use socklen_t.
15097 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15098 unsigned char.
15099
15100 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15101 char for buffers.
15102 * linux-low.c (linux_read_memory, linux_write_memory)
15103 (linux_read_auxv): Likewise.
15104 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15105 (check_mem_write): Likewise.
15106 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15107 Likewise.
15108 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15109 (registers_from_string, register_data): Likewise.
15110 * server.c (handle_query, main): Likewise.
15111 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15112 (decode_M_packet): Likewise.
15113 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15114 * target.h (struct target_ops): Update read_memory, write_memory,
15115 and read_auxv.
15116 (read_inferior_memory, write_inferior_memory): Update.
15117 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15118 to unsigned char *.
15119 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15120 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15121 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15122 linux-s390-low.c, linux-sh-low.c: Update for changes in
15123 read_inferior_memory and the_low_target->breakpoint.
15124
15125 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15126
15127 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15128 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15129 * configure.srv: Add powerpc64-*-linux*.
15130 * linux-ppc64-low.c: New file.
15131
15132 2005-05-23 Orjan Friberg <orjanf@axis.com>
15133
15134 * linux-cris-low.c: New file with support for CRIS.
15135 * linux-crisv32-low.c: Ditto for CRISv32.
15136 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15137 (clean): Add reg-cris.c and reg-crisv32.c.
15138 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15139 reg-crisv32.o, and reg-crisv32.c to make rules.
15140 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15141 recognized targets.
15142
15143 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15144
15145 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15146 of sizeof (PTRACE_XFER_TYPE).
15147 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15148
15149 2005-05-12 Orjan Friberg <orjanf@axis.com>
15150
15151 * target.h (struct target_ops): Add insert_watchpoint,
15152 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15153 pointers for hardware watchpoint support.
15154 * linux-low.h (struct linux_target_ops): Ditto.
15155 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15156 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15157 to linux_target_ops.
15158 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15159 reply packet.
15160 * server.c (main): Recognize 'Z' and 'z' packets.
15161
15162 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15163
15164 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15165 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15166 (the_low_target): Add new members.
15167
15168 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15169
15170 * proc-service.c (ps_lgetregs): Search all_processes instead of
15171 all_threads.
15172
15173 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15174
15175 * server.c (start_inferior): Change return type to int.
15176 (attach_inferior): Change sigptr to int *.
15177 (handle_v_cont, handle_v_requests): Change signal to int *.
15178 (main): Change signal to int.
15179
15180 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15181
15182 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15183 * configure.srv: Add m32r*-*-linux*.
15184 * linux-m32r-low.c: New file.
15185
15186 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15187
15188 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15189
15190 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15191
15192 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15193 Take unsigned long arguments for PIDs.
15194 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15195 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15196 (wait_for_sigstop, linux_resume_one_process)
15197 (regsets_fetch_inferior_registers, linux_send_signal)
15198 (linux_read_auxv): Likewise. Update the types of variables holding
15199 PIDs. Update format string specifiers.
15200 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15201 * remote-utils.c (prepare_resume_reply): Likewise.
15202 * server.c (cont_thread, general_thread, step_thread)
15203 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15204 unsigned long.
15205 (handle_query): Update format specifiers.
15206 (handle_v_cont, main): Use strtoul for thread IDs.
15207 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15208 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15209 (general_thread, step_thread, thread_from_wait)
15210 (old_thread_from_wait): Update.
15211 * target.h (struct thread_resume): Use unsigned long for THREAD.
15212 (struct target_ops): Use unsigned long for arguments to attach and
15213 thread_alive.
15214
15215 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15216
15217 * acinclude.m4: Include bfd/bfd.m4 directly.
15218 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15219 <agriffis@toolchain.org>.
15220 * aclocal.m4, configure: Regenerated.
15221
15222 2005-01-07 Andrew Cagney <cagney@gnu.org>
15223
15224 * configure.ac: Rename configure.in, require autoconf 2.59.
15225 * configure: Re-generate.
15226
15227 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15228
15229 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15230 LIBS when finished.
15231 * aclocal.m4: Regenerated.
15232 * configure: Regenerated.
15233
15234 2004-11-21 Andreas Schwab <schwab@suse.de>
15235
15236 * linux-m68k-low.c (m68k_num_gregs): Define.
15237 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15238 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15239 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15240 (m68k_breakpoint_at): New. Add to the_low_target.
15241
15242 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15243 srv_linux_thread_db to yes.
15244
15245 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15246
15247 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15248 (ARCH_SET_FS): Likewise.
15249 (ARCH_GET_FS): Likewise.
15250 (ARCH_GET_GS): Likewise.
15251
15252 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15253
15254 * linux-i386-low.c (ps_get_thread_area): New.
15255 * linux-x86-64-low.c (ps_get_thread_area): New.
15256 * linux-low.c: Include <sys/syscall.h>.
15257 (linux_kill_one_process): Don't kill the first thread here.
15258 (linux_kill): Kill the first thread here.
15259 (kill_lwp): New function.
15260 (send_sigstop, linux_send_signal): Use it.
15261 * proc-service.c: Clean up #ifdefs.
15262 (fpregset_info): Delete.
15263 (ps_lgetregs): Update and enable implementation.
15264 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15265 implementations.
15266 * remote-utils.c (struct sym_cache, symbol_cache): New.
15267 (input_interrupt): Print a clearer message.
15268 (async_io_enabled): New variable.
15269 (enable_async_io, disable_async_io): Use it. Update comments.
15270 (look_up_one_symbol): Use the symbol cache.
15271 * thread-db.c (thread_db_look_up_symbols): New function.
15272 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15273
15274 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15275
15276 * configure.in: Test for -rdynamic.
15277 * configure: Regenerated.
15278 * Makefile (INTERNAL_LDFLAGS): New.
15279 (gdbserver, gdbreplay): Use it.
15280
15281 2004-09-02 Andrew Cagney <cagney@gnu.org>
15282
15283 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15284
15285 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15286
15287 * linux-low.c (linux_wait): Clear all_processes list also.
15288
15289 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15290
15291 * linux-low.c: Include <errno.h>. Remove extern declaration of
15292 errno.
15293
15294 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15295
15296 * gdbreplay.c, server.h, utils.c: Update copyright years.
15297
15298 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15299
15300 * server.c (main): Print child status or termination signal from
15301 variable 'signal', not 'sig'.
15302
15303 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15304
15305 * linux-low.c (linux_read_memory): Change return type to
15306 int. Check for and return error from ptrace().
15307 * target.c (read_inferior_memory): Change return type to int. Pass
15308 back return status from the_target->read_memory().
15309 * target.h (struct target_ops): Adapt *read_memory() prototype.
15310 Update comment.
15311 (read_inferior_memory): Adapt prototype.
15312 * server.c (main): Return an error packet if
15313 read_inferior_memory() returns an error.
15314
15315 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15316
15317 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15318 Unify with other clean targets.
15319
15320 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15321
15322 * server.c (handle_v_cont): Call set_desired_inferior.
15323
15324 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15325
15326 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15327
15328 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15329
15330 * linux-low.c (linux_wait): Unblock async I/O.
15331 (linux_resume): Block and enable async I/O.
15332 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15333 * server.h (block_async_io, unblock_async_io): Add prototypes.
15334
15335 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15336
15337 * remote-utils.c (remote_open): Print a status notice after
15338 opening a TCP port.
15339 * server.c (attach_inferior): Print a status notice after
15340 attaching.
15341
15342 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15343
15344 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15345
15346 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15347
15348 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15349 error packet.
15350 * server.c, target.h: Update copyright years.
15351
15352 2004-02-25 Roland McGrath <roland@redhat.com>
15353
15354 * target.h (struct target_ops): New member `read_auxv'.
15355 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15356 * linux-low.c (linux_read_auxv): New function.
15357 (linux_target_ops): Initialize `read_auxv' member to that.
15358
15359 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15360
15361 Committed by Jim Blandy <jimb@redhat.com>.
15362
15363 * linux-s390-low.c (s390_num_regs): Update.
15364 (s390_regmap): Remove control registers. Use __s390x__ predefine
15365 instead of GPR_SIZE to distiguish s390 and s390x targets.
15366
15367 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15368
15369 * linux-low.c: Update copyright year.
15370 (check_removed_breakpoint): Clear pending_is_breakpoint.
15371 (linux_set_resume_request, linux_queue_one_thread)
15372 (resume_status_pending_p): New functions.
15373 (linux_continue_one_thread): Use process->resume.
15374 (linux_resume): Only resume threads if there are no pending events.
15375 * linux-low.h (struct process_info): Add resume request
15376 pointer.
15377
15378 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15379
15380 * regcache.c (new_register_cache): Clear the allocated register
15381 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15382
15383 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15384
15385 * linux-low.c (linux_resume): Take a struct thread_resume *
15386 argument.
15387 (linux_wait): Update call.
15388 (resume_ptr): New static variable.
15389 (linux_continue_one_thread): Renamed from
15390 linux_continue_one_process. Use resume_ptr.
15391 (linux_resume): Use linux_continue_one_thread.
15392 * server.c (handle_v_cont, handle_v_requests): New functions.
15393 (myresume): New function.
15394 (main): Handle 'v' case.
15395 * target.h (struct thread_resume): New type.
15396 (struct target_ops): Change argument of "resume" to struct
15397 thread_resume *.
15398 (myresume): Delete macro.
15399
15400 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15401
15402 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15403 (uninstall): Support DESTDIR.
15404
15405 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15406
15407 * configure.srv: Add xscale*linux copy of arm*linux entry.
15408
15409 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15410
15411 * linux-arm-low.c (arm_reinsert_addr): New function.
15412 (the_low_target): Add arm_reinsert_addr.
15413
15414 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15415
15416 * mem-break.c: Remove whitespace at end of file.
15417
15418 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15419
15420 * configure.in: Check whether we need to prototype strerror.
15421 * server.h: Optionally prototype strerror.
15422 * gdbreplay.c (perror_with_name): Use strerror.
15423 * linux-low.c (linux_attach_lwp): Use strerror.
15424 * utils.c (perror_with_name): Use strerror.
15425 * config.in, configure: Regenerated.
15426
15427 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15428
15429 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15430 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15431
15432 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15433
15434 * Makefile.in (SFILES): Update.
15435 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15436 low-sun3.c: Remove files.
15437
15438 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15439
15440 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15441 (linux_detach_one_process, linux_detach): New functions.
15442 (linux_target_ops): Add linux_detach.
15443 * server.c (main): Handle 'D' packet.
15444 * target.h (struct target_ops): Add "detach" member.
15445 (detach_inferior): Define.
15446
15447 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15448
15449 From Kelley Cook <kelleycook@wideopenwest.com>:
15450 * configure.srv: Accept i[34567]86 variants.
15451
15452 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15453
15454 * linux-low.c (linux_wait_for_event): Correct comment typos.
15455 (linux_resume_one_process): Call check_removed_breakpoint.
15456 (linux_send_signal): New function.
15457 (linux_target_ops): Add linux_send_signal.
15458 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15459 of kill.
15460 * target.h (struct target_ops): Add send_signal.
15461
15462 2003-05-29 Jim Blandy <jimb@redhat.com>
15463
15464 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15465 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15466 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15467 away part of the register's value.
15468
15469 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15470
15471 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15472 (linux_wait_for_event, linux_init_signals): Likewise.
15473
15474 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15475
15476 * configure.in: Check for stdlib.h.
15477 * configure: Regenerated.
15478 * config.in: Regenerated.
15479
15480 2003-01-04 Andreas Schwab <schwab@suse.de>
15481
15482 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15483
15484 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15485
15486 * Makefile.in: Remove obsolete code.
15487
15488 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15489
15490 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15491 defined(PT_FPR0_HI).
15492
15493 2002-11-17 Stuart Hughes <seh@zee2.com>
15494
15495 * linux-arm-low.c (arm_num_regs): Increase.
15496 (arm_regmap): Include status register.
15497
15498 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15499
15500 * linux-low.c (register_addr): Remove incorrect -1 check.
15501
15502 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15503
15504 * linux-low.c (linux_create_inferior): Call setpgid. Return
15505 the new PID.
15506 (unstopped_p, linux_signal_pid): Remove.
15507 (linux_target_ops): Remove linux_signal_pid.
15508 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15509 global instead of target method.
15510 * target.h (struct target_ops): Remove signal_pid. Update comment
15511 for create_inferior.
15512 * server.c (signal_pid): New variable.
15513 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15514 gdbserver. Set the child to be the foreground process group.
15515 (attach_inferior): Set signal_pid.
15516
15517 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15518
15519 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15520
15521 2002-08-20 Jim Blandy <jimb@redhat.com>
15522
15523 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15524 default for this.
15525
15526 2002-08-01 Andrew Cagney <cagney@redhat.com>
15527
15528 * Makefile.in: Make chill references obsolete.
15529
15530 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15531
15532 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15533 * configure: Regenerate.
15534 * config.in: Regenerate.
15535
15536 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15537
15538 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15539 (perror_with_name, remote_close, remote_open, expect, play): Static.
15540
15541 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15542
15543 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15544 byte offsets instead of an array of indexes.
15545 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15546
15547 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15548
15549 * regcache.c: Add comment.
15550
15551 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15552
15553 * thread-db.c: New file.
15554 * proc-service.c: New file.
15555 * acinclude.m4: New file.
15556 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15557 proc-service.o, and thread-db.o.
15558 (linux-low.o): Add USE_THREAD_DB.
15559 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15560 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15561 * aclocal.m4: Regenerated.
15562 * config.in: Regenerated.
15563 * configure: Regenerated.
15564 * configure.in: Check for proc_service.h, sys/procfs.h,
15565 thread_db.h, and linux/elf.h headrs.
15566 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15567 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15568 Check for -lthread_db and thread support.
15569 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15570 PowerPC, and SuperH.
15571 * i387-fp.c: Constify arguments.
15572 * i387-fp.h: Likewise.
15573 * inferiors.c: (struct thread_info): Renamed from
15574 `struct inferior_info'. Remove PID member. Use generic inferior
15575 list header. All uses updated.
15576 (inferiors, signal_pid): Removed.
15577 (all_threads): New variable.
15578 (get_thread): Define.
15579 (add_inferior_to_list): New function.
15580 (for_each_inferior): New function.
15581 (change_inferior_id): New function.
15582 (add_inferior): Removed.
15583 (remove_inferior): New function.
15584 (add_thread): New function.
15585 (free_one_thread): New function.
15586 (remove_thread): New function.
15587 (clear_inferiors): Use for_each_inferior and free_one_thread.
15588 (find_inferior): New function.
15589 (find_inferior_id): New function.
15590 (inferior_target_data): Update argument type.
15591 (set_inferior_target_data): Likewise.
15592 (inferior_regcache_data): Likewise.
15593 (set_inferior_regcache_data): Likewise.
15594 * linux-low.c (linux_bp_reinsert): Remove.
15595 (all_processes, stopping_threads, using_thrads)
15596 (struct pending_signals, debug_threads, pid_of): New.
15597 (inferior_pid): Replace with macro.
15598 (struct inferior_linux_data): Remove.
15599 (get_stop_pc, add_process): New functions.
15600 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15601 Use add_process and add_thread.
15602 (linux_attach_lwp): New function, based on old linux_attach. Use
15603 add_process and add_thread. Set stop_expected for new threads.
15604 (linux_attach): New function.
15605 (linux_kill_one_process): New function.
15606 (linux_kill): Kill all LWPs.
15607 (linux_thread_alive): Use find_inferior_id.
15608 (check_removed_breakpoints, status_pending_p): New functions.
15609 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15610 Update. Use WNOHANG. Wait for cloned processes also. Update process
15611 struct for the found process.
15612 (linux_wait_for_event): New function.
15613 (linux_wait): Use it. Support LWPs.
15614 (send_sigstop, wait_for_sigstop, stop_all_processes)
15615 (linux_resume_one_process, linux_continue_one_process): New functions.
15616 (linux_resume): Support LWPs.
15617 (REGISTER_RAW_SIZE): Remove.
15618 (fetch_register): Use register_size instead. Call supply_register.
15619 (usr_store_inferior_registers): Likewise. Call collect_register.
15620 Fix recursive case.
15621 (regsets_fetch_inferior_registers): Improve error message.
15622 (regsets_store_inferior_registers): Add debugging.
15623 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15624 (unstopped_p, linux_signal_pid): New functions.
15625 (linux_target_ops): Add linux_signal_pid.
15626 (linux_init_signals): New function.
15627 (initialize_low): Call it. Initialize using_threads.
15628 * regcache.c (inferior_regcache_data): Add valid
15629 flag.
15630 (get_regcache): Fetch registers lazily. Add fetch argument
15631 and update all callers.
15632 (regcache_invalidate_one, regcache_invalidate): New
15633 functions.
15634 (new_register_cache): Renamed from create_register_cache.
15635 Return the new regcache.
15636 (free_register_cache): Change argument to a void *.
15637 (registers_to_string, registers_from_string): Call get_regcache
15638 with fetch flag set.
15639 (register_data): Make static. Pass fetch flag to get_regcache.
15640 (supply_register): Call get_regcache with fetch flag clear.
15641 (collect_register): Call get_regcache with fetch flag set.
15642 (collect_register_as_string): New function.
15643 * regcache.h: Update.
15644 * remote-utils.c (putpkt): Flush after debug output and use
15645 stderr.
15646 Handle input interrupts while waiting for an ACK.
15647 (input_interrupt): Use signal_pid method.
15648 (getpkt): Flush after debug output and use stderr.
15649 (outreg): Use collect_register_as_string.
15650 (new_thread_notify, dead_thread_notify): New functions.
15651 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15652 and general_thread.
15653 (look_up_one_symbol): Flush after debug output.
15654 * server.c (step_thread, server_waiting): New variables.
15655 (start_inferior): Don't use signal_pid. Update call to mywait.
15656 (attach_inferior): Update call to mywait.
15657 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15658 (main): Don't fetch/store registers explicitly. Use
15659 set_desired_inferior. Support proposed ``Hs'' packet. Update
15660 calls to mywait.
15661 * server.h: Update.
15662 (struct inferior_list, struct_inferior_list_entry): New.
15663 * target.c (set_desired_inferior): New.
15664 (write_inferior_memory): Constify.
15665 (mywait): New function.
15666 * target.h: Update.
15667 (struct target_ops): New signal_pid method.
15668 (mywait): Removed macro, added prototype.
15669
15670 * linux-low.h (regset_func): Removed.
15671 (regset_fill_func, regset_store_func): New.
15672 (enum regset_type): New.
15673 (struct regset_info): Add type field. Use new operation types.
15674 (struct linux_target_ops): stop_pc renamed to get_pc.
15675 Add decr_pc_after_break and breakpoint_at.
15676 (get_process, get_thread_proess, get_process_thread)
15677 (strut process_info, all_processes, linux_attach_lwp)
15678 (thread_db_init): New.
15679
15680 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15681 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15682 (the_low_target): Add new members.
15683 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15684 (i386_store_fpxregset): Constify.
15685 (target_regsets): Add new kind identifier.
15686 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15687 (i386_set_pc): Add debugging.
15688 (i386_breakpoint_at): New function.
15689 (the_low_target): Add new members.
15690 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15691 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15692 (mips_breakpoint_at): New.
15693 (the_low_target): Add new members.
15694 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15695 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15696 (the_low_target): Add new members.
15697 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15698 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15699 (the_low_target): Add new members.
15700 * linux-x86-64-low.c (target_regsets): Add new kind
15701 identifier.
15702
15703 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15704
15705 From Martin Pool <mbp@samba.org>:
15706 * server.c (gdbserver_usage): New function.
15707 (main): Call it.
15708
15709 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15710
15711 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15712 stop_at -> stop_pc.
15713
15714 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15715
15716 * Makefile.in: Remove obsolete code.
15717
15718 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15719
15720 * linux-low.c (regsets_fetch_inferior_registers),
15721 (regsets_store_inferior_registers): Removed cast to int from
15722 ptrace() calls.
15723 * regcache.h: Added declaration of struct inferior_info.
15724
15725 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15726
15727 * inferiors.c (struct inferior_info): Add regcache_data.
15728 (add_inferior): Call create_register_cache.
15729 (clear_inferiors): Call free_register_cache.
15730 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15731 * regcache.c (struct inferior_regcache_data): New.
15732 (registers): Remove.
15733 (get_regcache): New function.
15734 (create_register_cache, free_register_cache): New functions.
15735 (set_register_cache): Don't initialize the register cache here.
15736 (registers_to_string, registers_from_string, register_data): Call
15737 get_regcache.
15738 * regcache.h: Add prototypes.
15739 * server.h: Likewise.
15740
15741 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15742
15743 * mem-break.c: New file.
15744 * mem-break.h: New file.
15745 * Makefile.in: Add mem-break.o rule; update server.h
15746 dependencies.
15747 * inferiors.c (struct inferior_info): Add target_data
15748 member.
15749 (clear_inferiors): Free target_data member if set.
15750 (inferior_target_data, set_inferior_target_data): New functions.
15751 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15752 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15753 * linux-low.c (linux_bp_reinsert): New variable.
15754 (struct inferior_linux_data): New.
15755 (linux_create_inferior): Use set_inferior_target_data.
15756 (linux_attach): Likewise. Call add_inferior.
15757 (linux_wait_for_one_inferior): New function.
15758 (linux_wait): Call it.
15759 (linux_write_memory): Add const.
15760 (initialize_low): Call set_breakpoint_data.
15761 * linux-low.h (struct linux_target_ops): Add breakpoint
15762 handling members.
15763 * server.c (attach_inferior): Remove extra add_inferior
15764 call.
15765 * server.h: Include mem-break.h. Update inferior.c
15766 prototypes.
15767 * target.c (read_inferior_memory)
15768 (write_inferior_memory): New functions.
15769 * target.h (read_inferior_memory)
15770 (write_inferior_memory): Change macros to prototypes.
15771 (struct target_ops): Update comments. Add const to write_memory
15772 definition.
15773
15774 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15775
15776 * linux-low.c (usr_store_inferior_registers): Support
15777 registers which are allowed to fail to store.
15778 * linux-low.h (linux_target_ops): Likewise.
15779 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15780 (ppc_cannot_store_register): FPSCR may not be storable.
15781
15782 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15783
15784 * server.h: Include <string.h> if HAVE_STRING_H.
15785 * ChangeLog: Correct paths in last ChangeLog entry.
15786
15787 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15788
15789 * linux-low.h: Remove obsolete prototypes.
15790 (struct linux_target_ops): New.
15791 (extern the_low_target): New.
15792 * linux-low.c (num_regs, regmap): Remove declarations.
15793 (register_addr): Use the_low_target explicitly.
15794 (fetch_register): Likewise.
15795 (usr_fetch_inferior_registers): Likewise.
15796 (usr_store_inferior_registers): Likewise.
15797 * linux-arm-low.c (num_regs): Remove.
15798 (arm_num_regs): Define.
15799 (arm_regmap): Renamed from regmap, made static.
15800 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15801 made static.
15802 (arm_cannot_store_register): Renamed from cannot_store_register,
15803 made static.
15804 (the_low_target): New.
15805 * linux-i386-low.c (num_regs): Remove.
15806 (i386_num_regs): Define.
15807 (i386_regmap): Renamed from regmap, made static.
15808 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15809 made static.
15810 (i386_cannot_store_register): Renamed from cannot_store_register,
15811 made static.
15812 (the_low_target): New.
15813 * linux-ia64-low.c (num_regs): Remove.
15814 (ia64_num_regs): Define.
15815 (ia64_regmap): Renamed from regmap, made static.
15816 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15817 made static.
15818 (ia64_cannot_store_register): Renamed from cannot_store_register,
15819 made static.
15820 (the_low_target): New.
15821 * linux-m68k-low.c (num_regs): Remove.
15822 (m68k_num_regs): Define.
15823 (m68k_regmap): Renamed from regmap, made static.
15824 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15825 made static.
15826 (m68k_cannot_store_register): Renamed from cannot_store_register,
15827 made static.
15828 (the_low_target): New.
15829 * linux-mips-low.c (num_regs): Remove.
15830 (mips_num_regs): Define.
15831 (mips_regmap): Renamed from regmap, made static.
15832 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15833 made static.
15834 (mips_cannot_store_register): Renamed from cannot_store_register,
15835 made static.
15836 (the_low_target): New.
15837 * linux-ppc-low.c (num_regs): Remove.
15838 (ppc_num_regs): Define.
15839 (ppc_regmap): Renamed from regmap, made static.
15840 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15841 made static.
15842 (ppc_cannot_store_register): Renamed from cannot_store_register,
15843 made static.
15844 (the_low_target): New.
15845 * linux-s390-low.c (num_regs): Remove.
15846 (s390_num_regs): Define.
15847 (s390_regmap): Renamed from regmap, made static.
15848 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15849 made static.
15850 (s390_cannot_store_register): Renamed from cannot_store_register,
15851 made static.
15852 (the_low_target): New.
15853 * linux-sh-low.c (num_regs): Remove.
15854 (sh_num_regs): Define.
15855 (sh_regmap): Renamed from regmap, made static.
15856 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15857 made static.
15858 (sh_cannot_store_register): Renamed from cannot_store_register,
15859 made static.
15860 (the_low_target): New.
15861 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15862 (the_low_target): New.
15863
15864 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15865
15866 * Makefile.in: Add stamp-h target.
15867 * configure.in: Create stamp-h.
15868 * configure: Regenerated.
15869
15870 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15871
15872 * inferiors.c: New file.
15873 * target.c: New file.
15874 * target.h: New file.
15875 * Makefile.in: Add target.o and inferiors.o. Update
15876 dependencies.
15877 * linux-low.c (inferior_pid): New static variable,
15878 moved from server.c.
15879 (linux_create_inferior): Renamed from create_inferior.
15880 Call add_inferior. Return 0 on success instead of a PID.
15881 (linux_attach): Renamed from myattach.
15882 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15883 (linux_thread_alive): Renamed from mythread_alive.
15884 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15885 child dies.
15886 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15887 (regsets_store_inferior_registers): Correct error message.
15888 Add missing ``return 0''.
15889 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15890 (linux_store_registers): Renamed from store_inferior_registers.
15891 (linux_read_memory): Renamed from read_inferior_memory.
15892 (linux_write_memory): Renamed from write_inferior_memory.
15893 (linux_target_ops): New structure.
15894 (initialize_low): Call set_target_ops ().
15895 * remote-utils.c (unhexify): New function.
15896 (hexify): New function.
15897 (input_interrupt): Send signals to ``signal_pid''.
15898 * server.c (inferior_pid): Remove.
15899 (start_inferior): Update create_inferior call.
15900 (attach_inferior): Call add_inferior.
15901 (handle_query): New function.
15902 (main): Call handle_query for `q' packets.
15903 * server.h: Include "target.h". Remove obsolete prototypes.
15904 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15905
15906 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15907
15908 * Makefile.in: Add WARN_CFLAGS. Update configury
15909 dependencies.
15910 * configure.in: Check for <string.h>
15911 * configure: Regenerate.
15912 * config.in: Regenerate.
15913 * gdbreplay.c: Include needed system headers.
15914 (remote_open): Remove strchr prototype.
15915 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15916 * regcache.c (supply_register): Change buf argument to const void *.
15917 (supply_register_by_name): Likewise.
15918 (collect_register): Change buf argument to void *.
15919 (collect_register_by_name): Likewise.
15920 * regcache.h: Add missing prototypes.
15921 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15922 * server.c (handle_query): New function.
15923 (attached): New static variable, moved out of main.
15924 (main): Quiet longjmp clobber warnings.
15925 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15926 * utils.c (error): Remove NORETURN.
15927 (fatal): Likewise.
This page took 0.375777 seconds and 4 git commands to generate.