Remove usage of find_inferior in win32-low.c
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2
3 * win32-low.c (continue_one_thread): Return void, take argument
4 directly.
5 (child_continue): Use for_each_thread.
6
7 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
8
9 * win32-i386-low.c (update_debug_registers_callback): Rename
10 to ...
11 (update_debug_registers): ... this, return void, remove pid_p arg.
12 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
13
14 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
15
16 * inferiors.h (struct process_info): Add constructor, initialize
17 fields..
18 <syscalls_to_catch>: Change type to std::vector<int>.
19 * inferiors.c (add_process): Allocate process_info with new.
20 (remove_process): Free process_info with delete.
21 * linux-low.c (handle_extended_wait): Adjust.
22 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
23 * server.c (handle_general_set): Adjust.
24
25 2017-11-16 Pedro Alves <palves@redhat.com>
26
27 * remote-utils.c (remote_close): Block SIGIO signals instead of
28 uninstalling the SIGIO handler.
29
30 2017-11-16 Alan Hayward <alan.hayward@arm.com>
31
32 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
33
34 2017-11-16 Yao Qi <yao.qi@linaro.org>
35
36 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
37 (tic6x_store_gregset): Likewise.
38 (tic6x_usrregs_info): Move it up.
39
40 2017-11-15 Alan Hayward <alan.hayward@arm.com>
41
42 * Makefile.in: Update arch rules.
43 * configure.srv: Explicitly mark arch/ files.
44
45 2017-11-13 Andreas Schwab <schwab@suse.de>
46
47 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
48 function.
49 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
50
51 2017-11-06 Pedro Alves <palves@redhat.com>
52
53 * config.in, configure: Regenerate.
54
55 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
56
57 * target.c (struct thread_search): Remove.
58 (thread_search_callback): Remove.
59 (prepare_to_access_memory): Use for_each_thread instead of
60 find_inferior. Inline code from thread_search_callback.
61
62 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
63
64 * server.c (struct visit_actioned_threads_data): Remove.
65 (visit_actioned_threads): Change prototype to take arguments
66 directly.
67 (resume): Use find_thread instead of find_inferior.
68
69 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
70
71 * server.c (queue_stop_reply_callback): Change prototype, return
72 void.
73 (find_status_pending_thread_callback): Remove.
74 (handle_status): Replace find_inferior with find_thread and
75 for_each_thread.
76
77 2017-10-25 Alan Hayward <alan.hayward@arm.com>
78
79 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
80 with REGNO.
81 (aarch64_store_gregset): Likewise.
82 (aarch64_fill_fpregset): Likewise.
83 (aarch64_store_fpregset): Likewise.
84
85 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
86
87 * gdbthread.h (find_thread, for_each_thread): New functions.
88 * inferiors.c (thread_of_pid): Remove.
89 (find_any_thread_of_pid): Use find_thread.
90 * linux-low.c (num_lwps): Use for_each_thread.
91
92 2017-10-17 Yao Qi <yao.qi@linaro.org>
93
94 * Makefile.in: Remove one rule.
95 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
96
97 2017-10-17 Yao Qi <yao.qi@linaro.org>
98
99 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
100 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
101
102 2017-10-17 Yao Qi <yao.qi@linaro.org>
103
104 * configure.srv: Rename arm.o with arch/arm.o.
105
106 2017-10-17 Yao Qi <yao.qi@linaro.org>
107
108 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
109 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
110 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
111 (arch-i386.o, arch-amd64.o): Remove rules.
112 (arch/%.o): New rule.
113 Update POSTCOMPILE and COMPILE.pre.
114 * configure.ac: Invoke AC_CONFIG_COMMANDS.
115 * configure: Re-generated.
116 * configure.srv: Replace arch-i386.o with arch/i386.o.
117 Replace arch-amd64.o with arch/amd64.o.
118
119 2017-10-16 Yao Qi <yao.qi@linaro.org>
120
121 * configure: Regenerated.
122
123 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
124
125 * inferiors.h: (struct inferior_list): Remove.
126 (struct inferior_list_entry); Remove.
127 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
128 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
129 get_first_inferior): Remove.
130 (for_each_inferior, for_each_inferior_with_data, find_inferior,
131 find_inferior_id, find_inferior_in_random): Change signature.
132 * inferiors.c (all_threads): Change type to
133 std::list<thread_info *>.
134 (get_thread): Remove macro.
135 (find_inferior, find_inferior_id): Change signature, implement
136 using find_thread.
137 (find_inferior_in_random): Change signature, implement using
138 find_thread_in_random.
139 (for_each_inferior, for_each_inferior_with_data): Change
140 signature, implement using for_each_thread.
141 (add_inferior_to_list, remove_inferior): Remove.
142 (add_thread, get_first_thread, thread_of_pid,
143 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
144 (get_first_inferior, one_inferior_p, clear_inferior_list):
145 Remove.
146 (clear_inferiors, get_thread_process): Update.
147 * gdbthread.h: Include <list>.
148 (struct thread_info) <entry>: Remove field.
149 <id>: New field.
150 (all_threads): Change type to std::list<thread_info *>.
151 (get_first_inferior): Add doc.
152 (find_thread, for_each_thread, find_thread_in_random): New
153 functions.
154 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
155 * linux-arm-low.c (update_registers_callback): Update.
156 * linux-low.c (second_thread_of_pid_p): Update.
157 (kill_one_lwp_callback, linux_detach_lwp_callback,
158 delete_lwp_callback, status_pending_p_callback, same_lwp,
159 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
160 iterate_over_lwps, not_stopped_callback,
161 resume_stopped_resumed_lwps, count_events_callback,
162 select_singlestep_lwp_callback, select_event_lwp_callback,
163 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
164 suspend_and_send_sigstop_callback, wait_for_sigstop,
165 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
166 lwp_running, linux_set_resume_request, resume_status_pending_p,
167 need_step_over_p, start_step_over, linux_resume_one_thread,
168 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
169 reset_lwp_ptrace_options_callback): Update.
170 * linux-mips-low.c (update_watch_registers_callback): Update.
171 * regcache.c (regcache_invalidate_one, regcache_invalidate):
172 Update.
173 (free_register_cache_thread_one): Remove.
174 (regcache_release): Update.
175 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
176 handle_qxfer_threads_worker): Update.
177 (handle_query): Update, use list iterator.
178 (visit_actioned_threads, handle_pending_status,
179 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
180 clear_pending_status_callback, set_pending_status_callback,
181 find_status_pending_thread_callback, handle_status,
182 process_serial_event): Update.
183 * target.c (thread_search_callback): Update.
184 * thread-db.c (thread_db_get_tls_address): Update.
185 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
186 Update.
187 * win32-i386-low.c (update_debug_registers_callback): Update.
188 * win32-low.c (delete_thread_info, child_delete_thread,
189 continue_one_thread, suspend_one_thread,
190 get_child_debug_event): Adjust.
191
192 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
193
194 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
195 * inferiors.h: Include <list>.
196 (struct process_info) <entry>: Remove field.
197 <pid>: New field.
198 (pid_of): Change macro to function.
199 (ptid_of, lwpid_of): Remove macro.
200 (all_processes): Change type to std::list<process_info *>.
201 (ALL_PROCESSES): Remove macro.
202 (for_each_process, find_process): New function.
203 * inferiors.c (all_processes): Change type to
204 std::list<process_info *>.
205 (find_thread_process): Adjust.
206 (add_process): Likewise.
207 (remove_process): Likewise.
208 (find_process_pid): Likewise.
209 (get_first_process): Likewise.
210 (started_inferior_callback): Remove.
211 (have_started_inferiors_p): Adjust.
212 (attached_inferior_callback): Remove.
213 (have_attached_inferiors_p): Adjust.
214 * linux-low.c (check_zombie_leaders): Likewise.
215 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
216 (x86_linux_update_xmltarget): Adjust.
217 * server.c (handle_query): Likewise.
218 (gdb_reattached_process): Remove.
219 (handle_status): Adjust.
220 (kill_inferior_callback): Likewise.
221 (detach_or_kill_inferior): Remove.
222 (print_started_pid): Likewise.
223 (print_attached_pid): Likewise.
224 (detach_or_kill_for_exit): Update.
225 (process_serial_event): Likewise.
226 * linux-arm-low.c (arm_new_fork): Likewise.
227
228 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
229
230 * dll.h: Include <list>.
231 (struct dll_info): Add constructor.
232 <entry>: Remove field.
233 (all_dlls): Change type to std::list<dll_info>.
234 * dll.c: Include <algorithm>.
235 (get_dll): Remove macro.
236 (all_dlls): Change type to std::list<dll_info *>.
237 (free_one_dll): Remove.
238 (match_dll): Likewise.
239 (loaded_dll): Adjust.
240 (unloaded_dll): Adjust to all_dlls type change, use
241 std::find_if. Inline code from match_dll.
242 (clear_dlls): Adjust to all_dlls type change.
243 * server.c (emit_dll_description): Remove.
244 (handle_qxfer_libraries): Adjust to all_dlls type change,
245 integrate emit_dll_description's functionality.
246
247 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
248
249 * linux-low.h (struct linux_target_ops) <delete_process>: New
250 field.
251 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
252 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
253 (struct linux_target_ops): Add delete_process callback.
254 * linux-arm-low.c (arm_delete_process): New.
255 (struct linux_target_ops): Add delete_process callback.
256 * linux-bfin-low.c (struct linux_target_ops): Likewise.
257 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
258 * linux-m32r-low.c (struct linux_target_ops): Likewise.
259 * linux-mips-low.c (mips_linux_delete_process): New.
260 (struct linux_target_ops): Add delete_process callback.
261 * linux-ppc-low.c (struct linux_target_ops): Likewise.
262 * linux-s390-low.c (struct linux_target_ops): Likewise.
263 * linux-sh-low.c (struct linux_target_ops): Likewise.
264 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
265 * linux-tile-low.c (struct linux_target_ops): Likewise.
266 * linux-x86-low.c (x86_linux_delete_process): New.
267 (struct linux_target_ops): Add delete_process callback.
268 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
269
270 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
271
272 * linux-aarch64-low.c (the_low_target): Add thread delete
273 callback.
274 * linux-arm-low.c (arm_delete_thread): New function.
275 (the_low_target): Add thread delete callback.
276 * linux-bfin-low.c (the_low_target): Likewise.
277 * linux-crisv32-low.c (the_low_target): Likewise.
278 * linux-low.c (delete_lwp): Invoke delete_thread callback if
279 set.
280 * linux-low.h (struct linux_target_ops) <delete_thread>: New
281 field.
282 * linux-m32r-low.c (the_low_target): Add thread delete callback.
283 * linux-mips-low.c (mips_linux_delete_thread): New function.
284 (the_low_target): Add thread delete callback.
285 * linux-ppc-low.c (the_low_target): Likewise.
286 * linux-s390-low.c (the_low_target): Likewise.
287 * linux-sh-low.c (the_low_target): Likewise.
288 * linux-tic6x-low.c (the_low_target): Likewise.
289 * linux-tile-low.c (the_low_target): Likewise.
290 * linux-x86-low.c (the_low_target): Likewise.
291 * linux-xtensa-low.c (the_low_target): Likewise.
292
293 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
294
295 * win32-low.c: Include "common-inferior.h".
296
297 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
298
299 * inferiors.c (set_inferior_cwd): New function.
300 * server.c (handle_general_set): Handle QSetWorkingDir packet.
301 (handle_query): Inform that QSetWorkingDir is supported.
302 * win32-low.c (create_process): Pass the inferior's cwd to
303 CreateProcess.
304
305 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
306
307 * inferiors.c (current_inferior_cwd): New global variable.
308 (get_inferior_cwd): New function.
309 * inferiors.h (struct process_info) <cwd>: New field.
310
311 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
312
313 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
314 (OBS): Add gdb_tilde_expand.o.
315
316 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
317
318 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
319 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
320
321 2017-09-29 Pedro Alves <palves@redhat.com>
322
323 * ax.c (gdb_parse_agent_expr): Constify.
324 * ax.h (gdb_parse_agent_expr): Constify.
325 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
326 Constify.
327 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
328 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
329 * remote-utils.h (read_ptid): Constify.
330 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
331 (process_point_options, process_serial_event): Constify.
332 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
333 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
334 (cmd_qtbuffer): Constify.
335
336 2017-09-29 Pedro Alves <palves@redhat.com>
337
338 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
339 fails.
340
341 2017-09-29 Pedro Alves <palves@redhat.com>
342
343 * linux-low.c (handle_extended_wait): Pass parent thread instead
344 of process to thread_db_notice_clone.
345 * linux-low.h (thread_db_notice_clone): Replace parent process
346 parameter with parent thread parameter.
347 * thread-db.c (find_one_thread): Add comment.
348 (thread_db_notice_clone): Replace parent process parameter with
349 parent thread parameter. Temporarily switch to the parent thread.
350
351 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
352
353 * gdbthread.h: Include "common-gdbthread.h".
354 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
355 "if" when validating the ptid.
356 * remote-utils.c: Include "gdbthread.h".
357 (prepare_resume_reply): Use "switch_to_thread".
358 * target.c (done_accessing_memory): Likewise.
359
360 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
361
362 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
363 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
364 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
365 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
366 s390x-gs-linux64-ipa.o to ipa_obj.
367 * linux-s390-low.c (HWCAP_S390_GS): New define.
368 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
369 New functions.
370 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
371 (s390_arch_setup): Check for guarded-storage support and choose
372 appropriate tdesc.
373 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
374 init_registers_s390x_gs_linux64.
375 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
376 enum value.
377 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
378 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
379
380 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
381
382 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
383
384 2017-09-21 Kevin Buettner <kevinb@redhat.com>
385
386 * linux-low.h (struct lwp_info): Add new field, thread_handle.
387 (thread_db_thread_handle): Declare.
388 * linux-low.c (linux_target_ops): Initialize thread_handle.
389 * server.c (handle_qxfer_threads_worker): Add support for
390 "handle" attribute.
391 * target.h (struct target_ops): Add new function pointer,
392 thread_handle.
393 (target_thread_handle): Define.
394 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
395 field in lwp.
396 (thread_db_thread_handle): New function.
397
398 2017-09-21 Kevin Buettner <kevinb@redhat.com>
399
400 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
401 * linux-low.h (thread_db_notice_clone): Declare.
402 * thread-db.c (thread_db_notice_clone): New function.
403
404 2017-09-21 Pedro Alves <palves@redhat.com>
405
406 * server.c (gdb_read_memory, handle_status, process_serial_event)
407 (handle_serial_event, handle_target_event): Adjust to
408 set_desired_thread prototype change.
409 * target.c (set_desired_thread): Remove 'use_general' parameter
410 and adjust.
411 * target.h (set_desired_thread): Remove 'use_general' parameter.
412
413 2017-09-20 Tom Tromey <tom@tromey.com>
414
415 * target.c (target_terminal::terminal_state): Define.
416 (target_terminal::init): Rename from target_terminal_init.
417 (target_terminal::inferior): Rename from
418 target_terminal_inferior.
419 (target_terminal::ours): Rename from target_terminal_ours.
420 (target_terminal::ours_for_output, target_terminal::info): New.
421
422 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
423
424 * server.c (accumulate_file_name_length): Remove.
425 (emit_dll_description): Adjust to std::string change.
426 (handle_qxfer_libraries): Use std::string to hold document.
427
428 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
429
430 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
431 return type of xml_escape_text.
432 * server.c (emit_dll_description): Likewise.
433
434 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
435
436 * server.c (captured_main): Accept argument for --selftest.
437 Update run_tests call.
438 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
439 when registering selftests.
440
441 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
442
443 * regcache.c (get_thread_regcache): Update code to use "std::vector"
444 instead of "VEC" for "target_desc.reg_defs".
445 (regcache_cpy): Likewise.
446 (registers_to_string): Likewise.
447 (registers_from_string): Likewise.
448 (find_regno): Likewise.
449 (supply_regblock): Likewise.
450 (regcache_raw_read_unsigned): Likewise.
451 * tdesc.c (init_target_desc): Likewise.
452 (tdesc_create_reg): Likewise.
453 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
454 (struct target_desc) <reg_defs>: Convert to "std::vector".
455 (target_desc): Do not initialize "reg_defs".
456 (~target_desc): Update code to use "std::vector" instead of "VEC"
457 for "target_desc.reg_defs".
458 (operator==): Likewise.
459
460 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
461
462 * inferiors.h (thread_to_gdb_id): Remove.
463 * inferiors.c (thread_to_gdb_id): Remove.
464 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
465 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
466 lynx_store_registers, lynx_read_memory, lynx_write_memory):
467 Likewise.
468 * nto-low.c (nto_fetch_registers, nto_store_registers,
469 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
470
471 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
472
473 * inferiors.h (gdb_id_to_thread_id): Remove.
474 * inferiors.c (gdb_id_to_thread_id): Remove.
475 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
476 removal. Move pid declaration closer to where it's used.
477
478 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
479
480 * server.c (handle_detach): New function.
481 (process_serial_event): Move code out, call handle_detach.
482
483 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
484
485 * server.c (require_running): Rename to ...
486 (require_running_or_return): ... this ...
487 (require_running_or_break): ... and this.
488 (handle_query, process_serial_event): Adjust.
489
490 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
491
492 * linux-low.c (linux_set_resume_request): Remove unused
493 variables.
494
495 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
496
497 * server.c (first_thread_of): Remove.
498 (process_serial_event): Replace usage of first_thread_of with
499 find_any_thread_of_pid.
500 * tracepoint.c (same_process_p): Remove.
501 (gdb_agent_about_to_close): Replace usage of same_process_p with
502 find_any_thread_of_pid.
503 * linux-x86-low.c (same_process_callback): Remove.
504 (x86_arch_setup_process_callback): Replace usage of
505 same_process_callback with find_any_thread_of_pid.
506 * thread-db.c (any_thread_of): Remove.
507 (switch_to_process): Replace usage of any_thread_of with
508 find_any_thread_of_pid.
509 * inferiors.c (thread_pid_matches_callback): Remove.
510 (find_thread_process): Adjust to use find_any_thread_of_pid.
511
512 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
513
514 * regcache.c (get_thread_regcache): Guard calls to "memset"
515 with "!VEC_empty".
516
517 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
518
519 * linux-low.c (handle_extended_wait): Use
520 "allocate_target_description" instead of "XNEW".
521 * linux-x86-low.c (initialize_low_arch): Likewise.
522
523 2017-09-05 Yao Qi <yao.qi@linaro.org>
524
525 * configure.srv (srv_i386_regobj): Remove.
526 (srv_amd64_regobj): Remove.
527 (srv_regobj): Set it to "" for x86 non-linux targets.
528 * linux-x86-tdesc.c (i386_linux_read_description):
529 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
530 (init_registers_i386): Remove the declaration.
531 (tdesc_i386): Remove the declaration.
532 (lynx_i386_arch_setup): Call i386_create_target_description.
533 * nto-x86-low.c: Likewise.
534 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
535 [!__x86_64__]: include arch/i386.h.
536 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
537
538 2017-09-05 Yao Qi <yao.qi@linaro.org>
539
540 * configure.srv (srv_amd64_linux_xmlfiles): Remove
541 i386/amd64-XXX-linux from it.
542
543 2017-09-05 Yao Qi <yao.qi@linaro.org>
544
545 * configure.srv: Empty srv_amd64_linux_regobj if $development is
546 false.
547 (ipa_amd64_linux_regobj): Remove.
548 (ipa_x32_linux_regobj): Remove.
549
550 2017-09-05 Yao Qi <yao.qi@linaro.org>
551
552 * Makefile.in (arch-amd64.o): New rule.
553 * configure.srv: Append arch-amd64.o.
554 * linux-amd64-ipa.c: Include common/x86-xstate.h.
555 (get_ipa_tdesc): Call amd64_linux_read_description.
556 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
557 and init_registers_amd64_XXX.
558 * linux-x86-low.c (x86_linux_read_description): Call
559 amd64_linux_read_description.
560 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
561 (initialize_low_arch): Don't call init_registers_x32_XXX and
562 init_registers_amd64_XXX.
563 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
564 and tdesc_amd64_XXX.
565 [__x86_64__] (amd64_tdesc_test): New function.
566 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
567 and init_registers_amd64_XXX.
568 * linux-x86-tdesc.c: Include arch/amd64.h.
569 (xcr0_to_tdesc_idx): New function.
570 (i386_linux_read_description): New function.
571 (amd64_get_ipa_tdesc_idx): New function.
572 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
573 (amd64_get_ipa_tdesc): Declare.
574
575 2017-09-05 Yao Qi <yao.qi@linaro.org>
576
577 * configure.srv (srv_i386_linux_xmlfiles): Remove
578 i386/i386-XXX-linux.xml from it.
579
580 2017-09-05 Yao Qi <yao.qi@linaro.org>
581
582 * configure.srv: Set srv_i386_linux_regobj empty if $development
583 is false.
584 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
585 initialize_low_tdesc.
586 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
587 with #if initialize_low_tdesc.
588 * linux-x86-tdesc-selftest.c: New file.
589 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
590
591 2017-09-05 Yao Qi <yao.qi@linaro.org>
592
593 * Makefile.in (arch-i386.o): New rule.
594 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
595 (x86_64-*-linux*): Likewise.
596 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
597 include arch/i386.h.
598 (i386_linux_read_description): Remove code and call
599 i386_create_target_description.
600 * tdesc.c (allocate_target_description): New function.
601 * tdesc.h (set_tdesc_architecture): Remove declaration.
602 (set_tdesc_osabi): Likewise.
603
604 2017-09-05 Yao Qi <yao.qi@linaro.org>
605
606 * linux-x86-tdesc.c: Don't include <inttypes.h>.
607 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
608 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
609 .xmltarget.
610 * server.c (get_features_xml): Call tdesc_get_features_xml.
611 * tdesc.c (set_tdesc_architecture): New function.
612 (set_tdesc_osabi): New function.
613 (tdesc_get_features_xml): New function.
614 (tdesc_create_feature): Add an argument.
615 * tdesc.h (struct target_desc) <features>: New field.
616 <arch, osabi>: New field.
617 (~target_desc): xfree features, arch, and osabi.
618 (target_desc::oerator==): Don't compare .xmltarget.
619 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
620 (set_tdesc_osabi): Likewise.
621 (tdesc_get_features_xml): Likewise.
622
623 2017-09-05 Yao Qi <yao.qi@linaro.org>
624
625 * linux-x86-tdesc.c: Include selftest.h.
626 (i386_tdesc_test): New function.
627 (initialize_low_tdesc): Call selftests::register_test.
628 * tdesc.h: Include regdef.h.
629 (target_desc): Override operator == and !=.
630
631 2017-09-05 Yao Qi <yao.qi@linaro.org>
632
633 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
634 (ipa_obj): Likewise.
635 * linux-i386-ipa.c: Include common/x86-xstate.h
636 (get_ipa_tdesc): Call i386_linux_read_description.
637 (initialize_low_tracepoint): Don't call init_registers_XXX
638 functions, call initialize_low_tdesc instead.
639 * linux-x86-low.c (x86_linux_read_description): Call
640 i386_linux_read_description.
641 (initialize_low_arch): Don't call init_registers_i386_XXX
642 functions, call initialize_low_tdesc.
643 * linux-x86-tdesc.c: New file.
644 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
645 (i386_get_ipa_tdesc_idx): Declare.
646 (i386_get_ipa_tdesc): Declare.
647 (initialize_low_tdesc): Declare.
648
649 2017-09-05 Yao Qi <yao.qi@linaro.org>
650
651 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
652 instead of 0.
653
654 2017-09-05 Yao Qi <yao.qi@linaro.org>
655
656 * Makefile.in (IPA_OBJS): Add vec-ipa.o
657 * regcache.c (get_thread_regcache): Use VEC_length.
658 (init_register_cache): Likewise.
659 (regcache_cpy): Likewise.
660 (registers_to_string): Iterate reg_defs via VEC_iterate.
661 (find_regno): Likewise.
662 (find_register_by_number): Use VEC_index.
663 (register_size): Call find_register_by_number.
664 (register_data): Call find_register_by_number.
665 (supply_regblock): Use VEC_length.
666 (regcache_raw_read_unsigned): Likewise.
667 * tdesc.c (init_target_desc): Iterate reg_defs via
668 VEC_iterate.
669 (default_description): Update initializer.
670 (copy_target_description): Don't update field num_registers.
671 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
672 <num_registers>: Remove.
673
674 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
675
676 * Makefile.in (.SECONDARY): Define target.
677
678 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
679
680 * linux-low.c (linux_wait_1): Adjust.
681 * server.c (queue_stop_reply_callback): Adjust.
682
683 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
684
685 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
686 QEnvironmentUnset and QEnvironmentReset packets.
687 (handle_query): Inform remote that QEnvironmentHexEncoded,
688 QEnvironmentUnset and QEnvironmentReset are supported.
689
690 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
691
692 * inferiors.h (inferior_target_data): Rename to ...
693 (thread_target_data): ... this.
694 (inferior_regcache_data): Rename to ...
695 (thread_regcache_data): ... this.
696 (set_inferior_regcache_data): Rename to ...
697 (set_thread_regcache_data): ... this.
698 * inferiors.c (inferior_target_data): Rename to ...
699 (thread_target_data): ... this.
700 (inferior_regcache_data): Rename to ...
701 (thread_regcache_data): ... this.
702 (set_inferior_regcache_data): Rename to ...
703 (set_thread_regcache_data): ... this.
704 (free_one_thread): Update.
705 * linux-low.h (get_thread_lwp): Update.
706 * regcache.c (get_thread_regcache): Update.
707 (regcache_invalidate_thread): Update.
708 (free_register_cache_thread): Update.
709 * win32-i386-low.c (update_debug_registers_callback): Update.
710 (win32_get_current_dr): Update.
711 * win32-low.c (thread_rec): Update.
712 (delete_thread_info): Update.
713 (continue_one_thread): Update.
714 (suspend_one_thread): Update.
715
716 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
717
718 * inferiors.c (set_inferior_target_data): Remove.
719 * inferiors.h (set_inferior_target_data): Remove.
720
721 2017-08-18 Yao Qi <yao.qi@linaro.org>
722
723 * Makefile.in (OBS): Add selftest.o.
724 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
725 * configure, config.in: Re-generated.
726 * server.c: Include common/sefltest.h.
727 (captured_main): Handle option --selftest.
728
729 2017-08-09 Yao Qi <yao.qi@linaro.org>
730
731 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
732 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
733 i386-avx-mpx.o and i386-mmx.o.
734 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
735 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
736 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
737 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
738 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
739 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
740 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
741 i386/amd64-avx-mpx.xml.
742
743 2017-08-09 Yao Qi <yao.qi@linaro.org>
744
745 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
746 and x32-avx-avx512.o.
747 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
748 i386/x32-avx-avx512.xml.
749
750 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
751
752 * tracepoint.h (enum class fast_tpoint_collect_result): New
753 enumeration.
754 (fast_tracepoint_collecting): Change return type to
755 fast_tpoint_collect_result.
756 * tracepoint.c (fast_tracepoint_collecting): Likewise.
757 * linux-low.h: Include tracepoint.h.
758 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
759 fast_tpoint_collect_result.
760 * linux-low.c (handle_tracepoints): Adjust.
761 (linux_fast_tracepoint_collecting): Change return type to
762 fast_tpoint_collect_result.
763 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
764 linux_wait_1, stuck_in_jump_pad_callback,
765 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
766 proceed_one_lwp): Adjust to type change.
767
768 2017-07-10 Yao Qi <yao.qi@linaro.org>
769
770 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
771
772 2017-06-29 Yao Qi <yao.qi@linaro.org>
773
774 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
775 Remove.
776 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
777
778 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
779
780 * Makefile.in (IPA_OBJS): Sort and format one item per line.
781
782 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
783
784 * linux-low.c (linux_create_inferior): Adjust code to access the
785 environment information via 'gdb_environ' class.
786 * lynx-low.c (lynx_create_inferior): Likewise.
787 * server.c (our_environ): Make it an instance of 'gdb_environ'.
788 (get_environ): Return a pointer to 'our_environ'.
789 (captured_main): Initialize 'our_environ'.
790 * server.h (get_environ): Adjust prototype.
791 * spu-low.c (spu_create_inferior): Adjust code to access the
792 environment information via 'gdb_environ' class.
793
794 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
795
796 * linux-low.c (linux_read_memory, linux_write_memory): Remove
797 usage of "register" keyword.
798
799 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
800
801 * configure: Re-generate.
802
803 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
804
805 * configure: Re-generate.
806
807 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
808
809 * Makefile.in (COMPILE.pre): Add "-x c++".
810
811 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
812
813 * fork-child.c: Conditionally include <signal.h>.
814
815 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
816
817 * server.c (handle_general_set): Handle new packet
818 "QStartupWithShell".
819 (handle_query): Add "QStartupWithShell" to the list of supported
820 packets.
821 (gdbserver_usage): Add help text explaining the
822 new "--startup-with-shell" and "--no-startup-with-shell" CLI
823 options.
824 (captured_main): Recognize and act upon the presence of the new
825 CLI options.
826
827 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
828 Pedro Alves <palves@redhat.com>
829
830 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
831 * configure: Regenerate.
832 * configure.srv (srv_linux_obj): Add "fork-child.o" and
833 "fork-inferior.o".
834 (i[34567]86-*-lynxos*): Likewise.
835 (spu*-*-*): Likewise.
836 * fork-child.c: New file.
837 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
838 and "environ.h".
839 (linux_ptrace_fun): New function.
840 (linux_create_inferior): Adjust function prototype to reflect
841 change on "target.h". Adjust function code to use
842 "fork_inferior".
843 (linux_request_interrupt): Delete "signal_pid".
844 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
845 (lynx_ptrace_fun): New function.
846 (lynx_create_inferior): Adjust function prototype to reflect
847 change on "target.h". Adjust function code to use
848 "fork_inferior".
849 * nto-low.c (nto_create_inferior): Adjust function prototype and
850 code to reflect change on "target.h". Update comments.
851 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
852 "common-terminal.h" and "environ.h".
853 (terminal_fd): Moved to fork-child.c.
854 (old_foreground_pgrp): Likewise.
855 (restore_old_foreground_pgrp): Likewise.
856 (last_status): Make it global.
857 (last_ptid): Likewise.
858 (our_environ): New variable.
859 (startup_with_shell): Likewise.
860 (program_name): Likewise.
861 (program_argv): Rename to...
862 (program_args): ...this.
863 (wrapper_argv): New variable.
864 (start_inferior): Delete function.
865 (get_exec_wrapper): New function.
866 (get_exec_file): Likewise.
867 (get_environ): Likewise.
868 (prefork_hook): Likewise.
869 (post_fork_inferior): Likewise.
870 (postfork_hook): Likewise.
871 (postfork_child_hook): Likewise.
872 (handle_v_run): Update code to deal with arguments coming from the
873 remote host. Update calls from "start_inferior" to
874 "create_inferior".
875 (captured_main): Likewise. Initialize environment variable. Call
876 "have_job_control".
877 * server.h (post_fork_inferior): New prototype.
878 (get_environ): Likewise.
879 (last_status): Declare.
880 (last_ptid): Likewise.
881 (signal_pid): Likewise.
882 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
883 (spu_ptrace_fun): New function.
884 (spu_create_inferior): Adjust function prototype to reflect change
885 on "target.h". Adjust function code to use "fork_inferior".
886 * target.c (target_terminal_init): New function.
887 (target_terminal_inferior): Likewise.
888 (target_terminal_ours): Likewise.
889 * target.h: Include <vector>.
890 (struct target_ops) <create_inferior>: Update prototype.
891 (create_inferior): Update macro.
892 * utils.c (gdb_flush_out_err): New function.
893 * win32-low.c (win32_create_inferior): Adjust function prototype
894 and code to reflect change on "target.h".
895
896 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
897
898 * inferiors.c (switch_to_thread): New function.
899
900 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
901
902 * Makefile.in (SFILE): Add "common/job-control.c".
903 (OBS): Add "job-control.o".
904
905 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
906
907 * Makefile: Remove "@host_makefile_frag@".
908
909 2017-05-05 Pedro Alves <palves@redhat.com>
910
911 * configure: Regenerate.
912
913 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
914
915 * configure: Regenerate.
916
917 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
918
919 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
920 software_single_step change of return type to
921 std::vector<CORE_ADDR>.
922 * linux-low.c (install_software_single_step_breakpoints):
923 Likewise.
924 * linux-low.h (install_software_single_step_breakpoints):
925 Likewise.
926
927 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
928
929 * remote-utils.c: Include "gdb_termios.h" instead of
930 "terminal.h".
931 * terminal.h: Delete file.
932
933 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
934
935 * server.c: Include <vector>.
936 <program_argv, wrapper_argv>: Convert to std::vector.
937 (start_inferior): Rewrite function to use C++.
938 (handle_v_run): Likewise. Update code that calculates the argv
939 based on the vRun packet; use C++.
940 (captured_main): Likewise.
941
942 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
943
944 * server.c (handle_v_cont): Initialize thread_resume::thread
945 with null_ptid.
946
947 2017-04-05 Pedro Alves <palves@redhat.com>
948
949 * configure: Regenerate.
950
951 2017-04-05 Pedro Alves <palves@redhat.com>
952
953 * gdbreplay.c (sync_error): Constify.
954 * linux-x86-low.c (push_opcode): Constify.
955
956 2017-04-05 Pedro Alves <palves@redhat.com>
957
958 * win32-low.c (get_child_debug_event)
959 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
960 Report TARGET_WAITKIND_SPURIOUS instead.
961
962 2017-04-05 Pedro Alves <palves@redhat.com>
963
964 * remote-utils.c (remote_prepare, remote_open): Constify.
965 * remote-utils.h (remote_prepare, remote_open): Constify.
966 * server.c (captured_main): Constify 'port' handling.
967
968 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
969
970 * Makefile.in (clean): Clear .deps.
971
972 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
973
974 * .gitignore: Remove generated files, replace with wildcard.
975 * (clean): Replace removal of generated files with wildcard.
976 (version.c): Replace with...
977 (version-generated.c): ...this.
978 (xml-builtin.c): Replace with...
979 (xml-builtin-generated.c): ...this.
980 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
981 (%.c: *regformats*): Replace with...
982 (%-generated.c: *regformats*): ...this.
983
984 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
985
986 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
987 (xtensa_fill_gregset): Call collect_register_by_name for
988 threadptr register.
989 (xtensa_store_gregset): Call supply_register_by_name for
990 threadptr register.
991
992 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
993
994 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
995 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
996 (xtensa_store_gregset): Call supply_register for all registers in
997 a0_regnum..a0_regnum + C0_NREGS range.
998
999 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1000
1001 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1002 (ax-ipa.o: ax.c): Remove.
1003 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1004 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1005 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1006 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1007 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1008
1009 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1010
1011 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1012 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1013 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1014 (errors-ipa.o: ../common/errors.c): Remove.
1015 (format-ipa.o: ../common/format.c): Remove.
1016 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1017
1018 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1019
1020 * Makefile.in (%-ipa.o: %.c): New rule.
1021 (tracepoint-ipa.o: tracepoint.c): Remove.
1022 (utils-ipa.o: utils.c): Remove.
1023 (remote-utils-ipa.o: remote-utils.c): Remove.
1024 (regcache-ipa.o: regcache.c): Remove.
1025 (i386-linux-ipa.o: i386-linux.c): Remove.
1026 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1027 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1028 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1029 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1030 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1031 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1032 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1033 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1034 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1035 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1036 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1037 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1038 (aarch64-ipa.o: aarch64.c): Remove.
1039 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1040 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1041 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1042 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1043 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1044 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1045 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1046 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1047 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1048 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1049 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1050 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1051 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1052 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1053 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1054 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1055 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1056 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1057 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1058 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1059 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1060 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1061 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1062 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1063 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1064 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1065 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1066 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1067 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1068 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1069 (tdesc-ipa.o: tdesc.c): Remove.
1070 (x32-linux-ipa.o: x32-linux.c): Remove.
1071 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1072 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1073
1074 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1075
1076 * Makefile.in (%.o: ../arch/%.c): New rule.
1077 (arm.o: ../arch/arm.c): Remove.
1078 (arm-linux.o: ../arch/arm-linux.c): Remove.
1079 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1080 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1081
1082 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1083
1084 * Makefile.in (%.o: ../nat/%.c): New rule.
1085 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1086 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1087 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1088 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1089 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1090 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1091 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1092 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1093 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1094 (linux-personality.o: ../nat/linux-personality.c): Remove.
1095 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1096 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1097 (x86-linux.o: ../nat/x86-linux.c): Remove.
1098 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1099 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1100
1101 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1102
1103 * Makefile.in (%.o: ../common/%.c): New rule.
1104 (signals.o: ../common/signals.c): Remove.
1105 (print-utils.o: ../common/print-utils.c): Remove.
1106 (rsp-low.o: ../common/rsp-low.c): Remove.
1107 (common-utils.o: ../common/common-utils.c): Remove.
1108 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1109 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1110 (vec.o: ../common/vec.c): Remove.
1111 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1112 (xml-utils.o: ../common/xml-utils.c): Remove.
1113 (ptid.o: ../common/ptid.c): Remove.
1114 (buffer.o: ../common/buffer.c): Remove.
1115 (format.o: ../common/format.c): Remove.
1116 (filestuff.o: ../common/filestuff.c): Remove.
1117 (agent.o: ../common/agent.c): Remove.
1118 (errors.o: ../common/errors.c): Remove.
1119 (environ.o: ../common/environ.c): Remove.
1120 (common-debug.o: ../common/common-debug.c): Remove.
1121 (cleanups.o: ../common/cleanups.c): Remove.
1122 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1123 (fileio.o: ../common/fileio.c): Remove.
1124 (common-regcache.o: ../common/common-regcache.c): Remove.
1125 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1126 (new-op.o: ../common/new-op.c): Remove.
1127 (btrace-common.o: ../common/btrace-common.c): Remove.
1128
1129 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1130
1131 * Makefile.in (%.o: ../target/%.c): New rule.
1132 (waitstatus.o: ../target/waitstatus.c): Remove.
1133
1134 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1135
1136 * Makefile.in
1137 (%.c: ../regformats/%.dat,
1138 (%.c: ../regformats/arm/%.dat,
1139 (%.c: ../regformats/i386/%.dat,
1140 (%.c: ../regformats/rs6000/%.dat): New rules.
1141 (aarch64.c): Remove.
1142 (reg-arm.c): Remove.
1143 (arm-with-iwmmxt.c): Remove.
1144 (arm-with-vfpv2.c): Remove.
1145 (arm-with-vfpv3.c): Remove.
1146 (arm-with-neon.c): Remove.
1147 (reg-bfin.c): Remove.
1148 (reg-cris.c): Remove.
1149 (reg-crisv32.c): Remove.
1150 (i386.c): Remove.
1151 (i386-linux.c): Remove.
1152 (i386-avx.c): Remove.
1153 (i386-avx-linux.c): Remove.
1154 (i386-avx-avx512.c): Remove.
1155 (i386-avx-avx512-linux.c): Remove.
1156 (i386-mpx.c): Remove.
1157 (i386-mpx-linux.c): Remove.
1158 (i386-avx-mpx-avx512-pku.c): Remove.
1159 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1160 (i386-avx-mpx.c): Remove.
1161 (i386-avx-mpx-linux.c): Remove.
1162 (i386-mmx.c): Remove.
1163 (i386-mmx-linux.c): Remove.
1164 (reg-ia64.c): Remove.
1165 (reg-m32r.c): Remove.
1166 (reg-m68k.c): Remove.
1167 (reg-cf.c): Remove.
1168 (mips-linux.c): Remove.
1169 (mips-dsp-linux.c): Remove.
1170 (mips64-linux.c): Remove.
1171 (mips64-dsp-linux.c): Remove.
1172 (nios2-linux.c): Remove.
1173 (powerpc-32.c): Remove.
1174 (powerpc-32l.c): Remove.
1175 (powerpc-altivec32l.c): Remove.
1176 (powerpc-cell32l.c): Remove.
1177 (powerpc-vsx32l.c): Remove.
1178 (powerpc-isa205-32l.c): Remove.
1179 (powerpc-isa205-altivec32l.c): Remove.
1180 (powerpc-isa205-vsx32l.c): Remove.
1181 (powerpc-e500l.c): Remove.
1182 (powerpc-64l.c): Remove.
1183 (powerpc-altivec64l.c): Remove.
1184 (powerpc-cell64l.c): Remove.
1185 (powerpc-vsx64l.c): Remove.
1186 (powerpc-isa205-64l.c): Remove.
1187 (powerpc-isa205-altivec64l.c): Remove.
1188 (powerpc-isa205-vsx64l.c): Remove.
1189 (s390-linux32.c): Remove.
1190 (s390-linux32v1.c): Remove.
1191 (s390-linux32v2.c): Remove.
1192 (s390-linux64.c): Remove.
1193 (s390-linux64v1.c): Remove.
1194 (s390-linux64v2.c): Remove.
1195 (s390-te-linux64.c): Remove.
1196 (s390-vx-linux64.c): Remove.
1197 (s390-tevx-linux64.c): Remove.
1198 (s390x-linux64.c): Remove.
1199 (s390x-linux64v1.c): Remove.
1200 (s390x-linux64v2.c): Remove.
1201 (s390x-te-linux64.c): Remove.
1202 (s390x-vx-linux64.c): Remove.
1203 (s390x-tevx-linux64.c): Remove.
1204 (tic6x-c64xp-linux.c): Remove.
1205 (tic6x-c64x-linux.c): Remove.
1206 (tic6x-c62x-linux.c): Remove.
1207 (reg-sh.c): Remove.
1208 (reg-sparc64.c): Remove.
1209 (reg-spu.c): Remove.
1210 (amd64.c): Remove.
1211 (amd64-linux.c): Remove.
1212 (amd64-avx.c): Remove.
1213 (amd64-avx-linux.c): Remove.
1214 (amd64-avx-avx512.c): Remove.
1215 (amd64-avx-avx512-linux.c): Remove.
1216 (amd64-mpx.c): Remove.
1217 (amd64-mpx-linux.c): Remove.
1218 (amd64-avx-mpx-avx512-pku.c): Remove.
1219 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1220 (amd64-avx-mpx.c): Remove.
1221 (amd64-avx-mpx-linux.c): Remove.
1222 (x32.c): Remove.
1223 (x32-linux.c): Remove.
1224 (x32-avx.c): Remove.
1225 (x32-avx-linux.c): Remove.
1226 (x32-avx-avx512.c): Remove.
1227 (x32-avx-avx512-linux.c): Remove.
1228 (reg-xtensa.c): Remove.
1229 (reg-tilegx.c): Remove.
1230 (reg-tilegx32.c): Remove.
1231
1232 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1233
1234 * Makefile.in (SFILES): Add "common/environ.c".
1235 (OBJS): Add "common/environ.h".
1236
1237 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1238
1239 * configure.ac: Check if the fs_base and gs_base members of
1240 `struct user_regs_struct' exist.
1241 * config.in: Regenerated.
1242 * configure: Likewise.
1243
1244 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1245
1246 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1247 target_read_memory.
1248 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1249 (get_next_pcs_syscall_next_pc): Likewise.
1250
1251 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1252
1253 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1254 * nto-x86-low.c: Likewise.
1255
1256 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1257
1258 * Makefile.in: Include disable-implicit-rules.mk.
1259
1260 2016-11-23 Pedro Alves <palves@redhat.com>
1261
1262 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1263 (debug_vprintf): Use std::chrono::steady_clock instead of
1264 gettimeofday. Use '.' instead of ':'.
1265 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1266 (get_timestamp): Use std::chrono::steady_clock instead of
1267 gettimeofday.
1268
1269 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1270
1271 * Makefile.in: Fix whitespace formatting.
1272
1273 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1274
1275 * Makefile.in (SFILES, OBS): Flatten list and order
1276 alphabetically.
1277
1278 2016-11-23 Pedro Alves <palves@redhat.com>
1279
1280 * event-loop.c (handle_file_event): Use warning.
1281 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1282 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1283 Use warning.
1284
1285 2016-11-23 Pedro Alves <palves@redhat.com>
1286
1287 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1288 output.
1289 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1290 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1291 debug_printf and debug_flush for debug output.
1292 * server.c (handle_general_set): Likewise.
1293 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1294 output.
1295
1296 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1297
1298 * Makefile.in (.c.o): Replace rule with ...
1299 (%.o: %.c): ... this one.
1300
1301 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1302
1303 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1304 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1305 make.
1306 * configure.ac: Remove checks for the make program.
1307 * configure: Re-generate.
1308
1309 2016-10-28 Pedro Alves <palves@redhat.com>
1310
1311 * Makefile.in (CXX_DIALECT): Get from configure.
1312 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1313 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1314 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1315 * config.in: Regenerate.
1316 * configure: Regenerate.
1317
1318 2016-10-27 Yao Qi <yao.qi@linaro.org>
1319
1320 * linux-low.c (linux_supports_range_stepping): Return true if
1321 can_software_single_step return true.
1322
1323 2016-10-27 Yao Qi <yao.qi@linaro.org>
1324
1325 * inferiors.c (find_inferior_in_random): New function.
1326 * inferiors.h (find_inferior_in_random): Declare.
1327 * linux-low.c (linux_wait_for_event_filtered): Call
1328 find_inferior_in_random instead of find_inferior.
1329
1330 2016-10-27 Yao Qi <yao.qi@linaro.org>
1331
1332 * linux-low.c (linux_wait_1): If single-step breakpoints are
1333 inserted, remove them.
1334
1335 2016-10-26 Pedro Alves <palves@redhat.com>
1336
1337 * linux-low.c (handle_extended_wait): Link parent/child fork
1338 threads.
1339 (linux_wait_1): Unlink them.
1340 (linux_set_resume_request): Ignore resume requests for
1341 already-resumed and unhandled fork child threads.
1342 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1343 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1344 New functions.
1345 (handle_v_requests) <vCont>: Don't call require_running.
1346 * server.h (in_queued_stop_replies): New declaration.
1347
1348 2016-10-24 Yao Qi <yao.qi@linaro.org>
1349
1350 PR server/20733
1351 * linux-aarch64-low.c (append_insns): Cast the return value to
1352 'uint32_t *'.
1353
1354 2016-10-10 Yao Qi <yao.qi@linaro.org>
1355
1356 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1357
1358 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1359
1360 * target.c (target_supports_multi_process): New function, moved
1361 from...
1362 * target.h (target_supports_multi_process): ... here. Remove
1363 macro.
1364
1365 2016-10-05 Tom Tromey <tom@tromey.com>
1366
1367 PR remote/20655:
1368 * tracepoint.c (handle_tracepoint_bkpts): Check
1369 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1370
1371 2016-10-05 Yao Qi <yao.qi@linaro.org>
1372
1373 * configure.srv: Update the path of arm-*.xml files.
1374
1375 2016-10-05 Terry Guo <terry.guo@arm.com>
1376 Yao Qi <yao.qi@linaro.org>
1377
1378 * Makefile.in: Adjust the path of rules.
1379 * configure.srv: Update the path of xml files.
1380 * regformats/arm-with-iwmmxt.dat: Regenerated.
1381 * regformats/arm-with-neon.dat: Likewise.
1382 * regformats/arm-with-vfpv2.dat: Likewise.
1383 * regformats/arm-with-vfpv3.dat Likewise.
1384
1385 2016-09-30 Yao Qi <yao.qi@linaro.org>
1386
1387 PR gdbserver/20627
1388 * target.c (target_stop_and_wait): Don't call
1389 target_continue_no_signal, use resume_stop instead.
1390
1391 2016-09-26 Yao Qi <yao.qi@linaro.org>
1392
1393 * linux-low.c (linux_wait_1): Call debug_exit.
1394
1395 2016-09-23 Pedro Alves <palves@redhat.com>
1396
1397 * Makefile.in (SFILES): Add common/new-op.c.
1398 (OBS): Add common/new-op.o.
1399 (new-op.o): New rule.
1400
1401 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1402
1403 * .gitinore: Ignore more files.
1404
1405 2016-09-21 Yao Qi <yao.qi@linaro.org>
1406
1407 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1408 23.
1409
1410 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1411
1412 * server.c (start_inferior): Call target_mourn_inferior instead of
1413 mourn_inferior; pass ptid_t argument to it.
1414 (resume): Likewise.
1415 (handle_target_event): Likewise.
1416 * target.c (target_mourn_inferior): New function.
1417 * target.h (mourn_inferior): Delete macro.
1418
1419 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1420
1421 * linux-low.c (lwp_is_stepping): New function.
1422
1423 2016-09-06 Carl Love <cel@us.ibm.com>
1424
1425 * server.c (start_inferior): Fixed comment, requested comment change
1426 didn't get updated correctly. Removed reference to ptrace () call as
1427 it is only true on Linux systems.
1428
1429 2016-09-06 Carl Love <cel@us.ibm.com>
1430
1431 * server.c (start_inferior): Do not call
1432 function target_post_create_inferior () if the
1433 inferior process has already exited.
1434
1435 2016-09-05 Pedro Alves <palves@redhat.com>
1436
1437 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1438 (COMPILE.pre, CC_LD): Use CXX directly.
1439 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1440 * acinclude.m4: Don't include build-with-cxx.m4.
1441 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1442 * configure: Regenerate.
1443
1444 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1445
1446 PR gdb/19495
1447 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1448 call writing data to own_buf.
1449
1450 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1451
1452 * target.c (mywait): Call target_wait instead of
1453 the_target->wait.
1454 (target_wait): New function.
1455
1456 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1457
1458 * server.c (start_inferior): New variable 'ptid'. Replace calls
1459 to the_target->resume by target_continue{,_no_signal}, depending
1460 on the case.
1461 * target.c (target_stop_and_wait): Call target_continue_no_signal
1462 instead of the_target->resume.
1463 (target_continue): New function.
1464
1465 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1466
1467 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1468
1469 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1470
1471 PR server/20491
1472 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1473 ps_prochandle.
1474 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1475 * linux-arm-low.c (ps_get_thread_area): Likewise.
1476 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1477 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1478 * linux-mips-low.c (ps_get_thread_area): Likewise.
1479 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1480 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1481 * linux-x86-low.c (ps_get_thread_area): Likewise.
1482 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1483
1484 2016-08-19 Pedro Alves <palves@redhat.com>
1485
1486 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1487
1488 2016-08-19 Pedro Alves <palves@redhat.com>
1489
1490 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1491 comment. Use memcpy instead of casting through unsigned long.
1492
1493 2016-08-19 Pedro Alves <palves@redhat.com>
1494
1495 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1496 allocating around 0x80000000.
1497
1498 2016-08-19 Pedro Alves <palves@redhat.com>
1499
1500 PR gdb/20415
1501 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1502 (x32-avx512-linux-ipa.o): New rules.
1503 * configure.ac (x86_64-*-linux*): New x32 check.
1504 * configure.srv (ipa_x32_linux_regobj): New.
1505 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1506 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1507 descriptions.
1508 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1509 descriptions.
1510 * configure: Regenerate.
1511
1512 2016-08-09 Pedro Alves <palves@redhat.com>
1513
1514 PR gdb/18653
1515 * Makefile.in (OBS): Add signals-state-save-restore.o.
1516 (signals-state-save-restore.o): New rule.
1517 * config.in: Regenerate.
1518 * configure: Regenerate.
1519 * linux-low.c: Include "signals-state-save-restore.h".
1520 (linux_create_inferior): Call
1521 restore_original_signals_state.
1522 * server.c: Include "dispositions-save-restore.h".
1523 (captured_main): Call save_original_signals_state.
1524
1525 2016-08-05 Pedro Alves <palves@redhat.com>
1526
1527 * configure: Regenerate.
1528
1529 2016-08-04 Yao Qi <yao.qi@linaro.org>
1530
1531 * linux-low.c (regsets_fetch_inferior_registers): Check
1532 errno is ESRCH or not.
1533
1534 2016-08-02 Yao Qi <yao.qi@linaro.org>
1535
1536 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1537 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1538 (thread_db_load_search): Update.
1539 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1540 td_ta_set_event and td_ta_event_getmsg.
1541
1542 2016-07-26 Pedro Alves <palves@redhat.com>
1543
1544 PR server/20414
1545 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1546 of unsigned long for 64-bit registers and use uint32_t instead of
1547 unsigned int for 32-bit registers.
1548
1549 2016-07-26 Pedro Alves <palves@redhat.com>
1550
1551 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1552 to 'ptrace'.
1553
1554 2016-07-21 Tom Tromey <tom@tromey.com>
1555
1556 * configure: Rebuild.
1557
1558 2016-07-21 Yao Qi <yao.qi@linaro.org>
1559
1560 * mem-break.c (find_gdb_breakpoint): Cast bp to
1561 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1562
1563 2016-07-21 Yao Qi <yao.qi@linaro.org>
1564
1565 * server.c (handle_v_requests): Support s and S actions
1566 if target_supports_software_single_step return true.
1567
1568 2016-07-21 Yao Qi <yao.qi@linaro.org>
1569
1570 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1571 is resume_step, call maybe_hw_step.
1572 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1573 and unstop them.
1574 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1575 breakpoints or not.
1576 (proceed_one_lwp): If resume request is resume_step, install
1577 reinsert breakpoints and call maybe_hw_step.
1578
1579 2016-07-21 Yao Qi <yao.qi@linaro.org>
1580
1581 * linux-low.c (proceed_one_lwp): Declare.
1582 (linux_resume_one_thread): Remove local variable 'step'.
1583 Lift code enqueue signal. Call proceed_one_lwp instead of
1584 linux_resume_one_lwp.
1585
1586 2016-07-21 Yao Qi <yao.qi@linaro.org>
1587
1588 * linux-low.c (linux_resume_one_thread): Call
1589 enqueue_pending_signal.
1590
1591 2016-07-21 Yao Qi <yao.qi@linaro.org>
1592
1593 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1594 * inferiors.c (do_restore_current_thread_cleanup): New function.
1595 (make_cleanup_restore_current_thread): Likewise.
1596 * linux-low.c (install_software_single_step_breakpoints): Call
1597 make_cleanup_restore_current_thread. Switch current_thread to
1598 thread.
1599
1600 2016-07-21 Yao Qi <yao.qi@linaro.org>
1601
1602 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1603 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1604 (clone_one_breakpoint): Likewise.
1605 (delete_reinsert_breakpoints): Change parameter to thread.
1606 Callers updated.
1607 (has_reinsert_breakpoints): Likewise.
1608 (uninsert_reinsert_breakpoints): Likewise.
1609 (reinsert_reinsert_breakpoints): Likewise.
1610 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1611 (delete_reinsert_breakpoints): Likewise.
1612 (reinsert_reinsert_breakpoints): Likewise.
1613 (uninsert_reinsert_breakpoints): Likewise.
1614 (has_reinsert_breakpoints): Likewise.
1615
1616 2016-07-21 Yao Qi <yao.qi@linaro.org>
1617
1618 * inferiors.c (get_thread_process): Make parameter const.
1619 * inferiors.h (get_thread_process): Update declaration.
1620 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1621 Add new parameters child_thread and parent_thread. Callers
1622 updated.
1623 * mem-break.h (clone_all_breakpoints): Update declaration.
1624
1625 2016-07-21 Yao Qi <yao.qi@linaro.org>
1626
1627 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1628 <command_list, handler>: Remove.
1629 (struct gdb_breakpoint): New.
1630 (struct other_breakpoint): New.
1631 (struct reinsert_breakpoint): New.
1632 (is_gdb_breakpoint): New function.
1633 (any_persistent_commands): Update command_list if
1634 is_gdb_breakpoint returns true.
1635 (set_breakpoint): Create breakpoints according to their types.
1636 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1637 (set_gdb_breakpoint_1): Likewise.
1638 (set_gdb_breakpoint): Likewise.
1639 (clear_breakpoint_conditions): Change parameter type to
1640 'struct gdb_breakpoint *'.
1641 (clear_breakpoint_commands): Likewise.
1642 (clear_breakpoint_conditions_and_commands): Likewise.
1643 (add_condition_to_breakpoint): Likewise.
1644 (add_breakpoint_condition): Likewise.
1645 (add_commands_to_breakpoint): Likewise.
1646 (check_breakpoints): Check other_breakpoint.
1647 (clone_one_breakpoint): Clone breakpopint according to its type.
1648 * mem-break.h (struct gdb_breakpoint): Declare.
1649 (set_gdb_breakpoint): Update declaration.
1650 (clear_breakpoint_conditions_and_commands): Likewise.
1651 (add_breakpoint_condition): Likewise.
1652 (add_breakpoint_commands): Likewise.
1653 * server.c (process_point_options): Change parameter type to
1654 'struct gdb_breakpoint *'.
1655
1656 2016-07-21 Yao Qi <yao.qi@linaro.org>
1657
1658 * mem-break.c (set_breakpoint_at): Rename it to ...
1659 (set_breakpoint_type_at): ... it.
1660 (set_breakpoint_at): Call set_breakpoint_type_at.
1661 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1662 * mem-break.h (set_breakpoint_at): Update comments.
1663
1664 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1665
1666 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1667 to buf parameter.
1668 (nios2_store_gregset): Likewise.
1669
1670 2016-07-01 Pedro Alves <palves@redhat.com>
1671 Antoine Tremblay <antoine.tremblay@ericsson.com>
1672
1673 * linux-low.c: Change interface to take the target lwp_info
1674 pointer directly and return void. Handle detaching from a zombie
1675 thread.
1676 (linux_detach_lwp_callback): New function.
1677 (linux_detach): Detach from the leader thread after detaching from
1678 the clone threads.
1679
1680 2016-06-28 Yao Qi <yao.qi@linaro.org>
1681
1682 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1683 for variable new_offset.
1684 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1685 (aarch64_ftrace_insn_reloc_cb): Likewise.
1686 (aarch64_ftrace_insn_reloc_tb): Likewise.
1687 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1688 PRIx64 instead of PRIx32.
1689
1690 2016-06-28 Yao Qi <yao.qi@linaro.org>
1691
1692 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1693 (the_low_target): Install arm_get_syscall_trapinfo.
1694
1695 2016-06-28 Yao Qi <yao.qi@linaro.org>
1696
1697 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1698 function.
1699 (the_low_target): Install aarch64_get_syscall_trapinfo.
1700
1701 2016-06-28 Yao Qi <yao.qi@linaro.org>
1702
1703 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1704 Callers updated.
1705 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1706 Remove parameter sysno.
1707 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1708 sysret.
1709
1710 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1711
1712 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1713 (s390_emit_ne_goto): Likewise.
1714 (s390_emit_lt_goto): Likewise.
1715 (s390_emit_le_goto): Likewise.
1716 (s390_emit_gt_goto): Likewise.
1717 (s390_emit_ge_goto): Likewise.
1718 (s390x_emit_eq_goto): Likewise.
1719 (s390x_emit_ne_goto): Likewise.
1720 (s390x_emit_lt_goto): Likewise.
1721 (s390x_emit_le_goto): Likewise.
1722 (s390x_emit_gt_goto): Likewise.
1723 (s390x_emit_ge_goto): Likewise.
1724 (s390_emit_ops_impl): Mark variable static.
1725 (s390x_emit_ops): Likewise.
1726
1727 2016-06-17 Yao Qi <yao.qi@linaro.org>
1728
1729 * linux-low.c (handle_extended_wait): Call
1730 uninsert_reinsert_breakpoints for the parent process. Remove
1731 reinsert breakpoints from the child process. Reinsert them to
1732 the parent process when vfork is done.
1733 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1734 (reinsert_reinsert_breakpoints): New function.
1735 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1736 (reinsert_reinsert_breakpoints): Declare.
1737
1738 2016-06-17 Yao Qi <yao.qi@linaro.org>
1739
1740 * linux-low.c (handle_extended_wait): If the parent is doing
1741 step-over, remove the reinsert breakpoints from the forked child.
1742
1743 2016-06-17 Yao Qi <yao.qi@linaro.org>
1744
1745 * linux-low.c (unsuspend_all_lwps): Declare.
1746 (linux_low_filter_event): If thread exited, call finish_step_over.
1747 If step-over is finished, unsuspend other threads.
1748
1749 2016-06-17 Yao Qi <yao.qi@linaro.org>
1750
1751 * linux-low.c (linux_resume_one_lwp_throw): Assert
1752 has_reinsert_breakpoints returns false.
1753 * mem-break.c (delete_disabled_breakpoints): Assert
1754 bp type isn't reinsert_breakpoint.
1755
1756 2016-06-17 Yao Qi <yao.qi@linaro.org>
1757
1758 * linux-low.c (maybe_hw_step): New function.
1759 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1760 (finish_step_over): Switch current_thread to lwp temporarily,
1761 and assert has_reinsert_breakpoints returns true.
1762 (proceed_one_lwp): Call maybe_hw_step.
1763 * mem-break.c (has_reinsert_breakpoints): New function.
1764 * mem-break.h (has_reinsert_breakpoints): Declare.
1765
1766 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1767
1768 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1769
1770 2016-05-17 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1773 instead of find_inferior.
1774
1775 2016-05-05 Yao Qi <yao.qi@linaro.org>
1776
1777 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1778 Initialize res to zero.
1779
1780 2016-05-05 Yao Qi <yao.qi@linaro.org>
1781
1782 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1783 to uint32_t.
1784
1785 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1786
1787 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1788 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1789 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1790
1791 2016-04-28 Par Olsson <par.olsson@windriver.com>
1792 Simon Marchi <simon.marchi@ericsson.com>
1793
1794 * tracepoint.c (write_inferior_int8): New function.
1795 (cmd_qtenable_disable): Write enable flag using
1796 write_inferior_int8.
1797
1798 2016-04-25 Yao Qi <yao.qi@linaro.org>
1799
1800 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1801 (need_step_over_p): Return zero if the LWP has pending signals
1802 can be delivered on software single step target.
1803
1804 2016-04-25 Yao Qi <yao.qi@linaro.org>
1805
1806 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1807 return instead of error.
1808
1809 2016-04-22 Yao Qi <yao.qi@linaro.org>
1810
1811 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1812 to 23.
1813
1814 2016-04-22 Yao Qi <yao.qi@linaro.org>
1815
1816 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1817 signal when stepping over breakpoint with software single
1818 step.
1819
1820 2016-04-21 Pedro Alves <palves@redhat.com>
1821
1822 * linux-s390-low.c (s390_collect_ptrace_register)
1823 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1824 add casts.
1825 (s390_check_regset): Use void * instead of gdb_byte *.
1826
1827 2016-04-20 Pedro Alves <palves@redhat.com>
1828
1829 * configure: Renegerate.
1830
1831 2016-04-20 Yao Qi <yao.qi@linaro.org>
1832
1833 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1834 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1835 number 16.
1836 (arm_store_gregset): Likewise.
1837
1838 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1839
1840 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1841 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1842 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1843 (amd64-avx-mpx-linux.c): New rules.
1844 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1845 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1846 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1847 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1848 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1849 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1850 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1851 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1852 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1853 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1854 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1855 * linux-x86-low.c (x86_linux_read_description): Add case for
1856 X86_XSTATE_AVX_MPX_MASK.
1857 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1858 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1859 init_registers_i386_avx_mpx_linux.
1860 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1861 (initialize_low_tracepoint): Call
1862 init_registers_i386_avx_mpx_linux.
1863 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1864 (initialize_low_tracepoint): Call
1865 init_registers_amd64_avx_mpx_linux.
1866 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1867 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1868 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1869 declarations.
1870
1871 2016-04-18 Pedro Alves <palves@redhat.com>
1872
1873 * configure: Regenerate.
1874
1875 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1876
1877 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1878 (aarch64_emit_sub): Likewise.
1879
1880 2016-04-12 Pedro Alves <palves@redhat.com>
1881
1882 * utils.c (prepare_to_throw_exception): Delete.
1883
1884 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1885
1886 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1887
1888 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1889
1890 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1891
1892 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1893
1894 * linux-aarch64-ipa.c: Add <elf.h> include.
1895 * linux-ppc-ipa.c: Add <elf.h> include.
1896 * linux-s390-ipa.c: Add <elf.h> include.
1897
1898 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1899
1900 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1901 (get_raw_reg_ptr): Likewise.
1902 (get_trace_state_variable_value_ptr): Likewise.
1903 (set_trace_state_variable_value_ptr): Likewise.
1904 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1905 char *.
1906
1907 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1908 Marcin Kościelnicki <koriakin@0x04.net>
1909
1910 PR/17221
1911 * linux-ppc-low.c (emit_insns): New function.
1912 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1913 (ppc_emit_prologue): New function.
1914 (ppc_emit_epilogue): New function.
1915 (ppc_emit_add): New function.
1916 (ppc_emit_sub): New function.
1917 (ppc_emit_mul): New function.
1918 (ppc_emit_lsh): New function.
1919 (ppc_emit_rsh_signed): New function.
1920 (ppc_emit_rsh_unsigned): New function.
1921 (ppc_emit_ext): New function.
1922 (ppc_emit_zero_ext): New function.
1923 (ppc_emit_log_not): New function.
1924 (ppc_emit_bit_and): New function.
1925 (ppc_emit_bit_or): New function.
1926 (ppc_emit_bit_xor): New function.
1927 (ppc_emit_bit_not): New function.
1928 (ppc_emit_equal): New function.
1929 (ppc_emit_less_signed): New function.
1930 (ppc_emit_less_unsigned): New function.
1931 (ppc_emit_ref): New function.
1932 (ppc_emit_const): New function.
1933 (ppc_emit_reg): New function.
1934 (ppc_emit_pop): New function.
1935 (ppc_emit_stack_flush): New function.
1936 (ppc_emit_swap): New function.
1937 (ppc_emit_stack_adjust): New function.
1938 (ppc_emit_call): New function.
1939 (ppc_emit_int_call_1): New function.
1940 (ppc_emit_void_call_2): New function.
1941 (ppc_emit_if_goto): New function.
1942 (ppc_emit_goto): New function.
1943 (ppc_emit_eq_goto): New function.
1944 (ppc_emit_ne_goto): New function.
1945 (ppc_emit_lt_goto): New function.
1946 (ppc_emit_le_goto): New function.
1947 (ppc_emit_gt_goto): New function.
1948 (ppc_emit_ge_goto): New function.
1949 (ppc_write_goto_address): New function.
1950 (ppc_emit_ops_impl): New static variable.
1951 (ppc64v1_emit_prologue): New function.
1952 (ppc64v2_emit_prologue): New function.
1953 (ppc64_emit_epilogue): New function.
1954 (ppc64_emit_add): New function.
1955 (ppc64_emit_sub): New function.
1956 (ppc64_emit_mul): New function.
1957 (ppc64_emit_lsh): New function.
1958 (ppc64_emit_rsh_signed): New function.
1959 (ppc64_emit_rsh_unsigned): New function.
1960 (ppc64_emit_ext): New function.
1961 (ppc64_emit_zero_ext): New function.
1962 (ppc64_emit_log_not): New function.
1963 (ppc64_emit_bit_and): New function.
1964 (ppc64_emit_bit_or): New function.
1965 (ppc64_emit_bit_xor): New function.
1966 (ppc64_emit_bit_not): New function.
1967 (ppc64_emit_equal): New function.
1968 (ppc64_emit_less_signed): New function.
1969 (ppc64_emit_less_unsigned): New function.
1970 (ppc64_emit_ref): New function.
1971 (ppc64_emit_const): New function.
1972 (ppc64v1_emit_reg): New function.
1973 (ppc64v2_emit_reg): New function.
1974 (ppc64_emit_pop): New function.
1975 (ppc64_emit_stack_flush): New function.
1976 (ppc64_emit_swap): New function.
1977 (ppc64v1_emit_call): New function.
1978 (ppc64v2_emit_call): New function.
1979 (ppc64v1_emit_int_call_1): New function.
1980 (ppc64v2_emit_int_call_1): New function.
1981 (ppc64v1_emit_void_call_2): New function.
1982 (ppc64v2_emit_void_call_2): New function.
1983 (ppc64_emit_if_goto): New function.
1984 (ppc64_emit_eq_goto): New function.
1985 (ppc64_emit_ne_goto): New function.
1986 (ppc64_emit_lt_goto): New function.
1987 (ppc64_emit_le_goto): New function.
1988 (ppc64_emit_gt_goto): New function.
1989 (ppc64_emit_ge_goto): New function.
1990 (ppc64v1_emit_ops_impl): New static variable.
1991 (ppc64v2_emit_ops_impl): New static variable.
1992 (ppc_emit_ops): New function.
1993 (linux_low_target): Wire in ppc_emit_ops.
1994
1995 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1996 Marcin Kościelnicki <koriakin@0x04.net>
1997
1998 PR/17221
1999 * Makefile.in: Add powerpc-*-ipa.o
2000 * configure.srv: Add ipa_obj for powerpc*-linux.
2001 * linux-ppc-ipa.c: New file.
2002 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2003 includes.
2004 (PPC_FIELD): New macro.
2005 (PPC_SEXT): New macro.
2006 (PPC_OP6): New macro.
2007 (PPC_BO): New macro.
2008 (PPC_LI): New macro.
2009 (PPC_BD): New macro.
2010 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2011 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2012 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2013 (ppc_get_thread_area): New function.
2014 (is_elfv2_inferior): New function.
2015 (gen_ds_form): New function.
2016 (GEN_STD): New macro.
2017 (GEN_STDU): New macro.
2018 (GEN_LD): New macro.
2019 (GEN_LDU): New macro.
2020 (gen_d_form): New function.
2021 (GEN_ADDI): New macro.
2022 (GEN_ADDIS): New macro.
2023 (GEN_LI): New macro.
2024 (GEN_LIS): New macro.
2025 (GEN_ORI): New macro.
2026 (GEN_ORIS): New macro.
2027 (GEN_LWZ): New macro.
2028 (GEN_STW): New macro.
2029 (GEN_STWU): New macro.
2030 (gen_xfx_form): New function.
2031 (GEN_MFSPR): New macro.
2032 (GEN_MTSPR): New macro.
2033 (GEN_MFCR): New macro.
2034 (GEN_MTCR): New macro.
2035 (GEN_SYNC): New macro.
2036 (GEN_LWSYNC): New macro.
2037 (gen_x_form): New function.
2038 (GEN_OR): New macro.
2039 (GEN_MR): New macro.
2040 (GEN_LWARX): New macro.
2041 (GEN_STWCX): New macro.
2042 (GEN_CMPW): New macro.
2043 (gen_md_form): New function.
2044 (GEN_RLDICL): New macro.
2045 (GEN_RLDICR): New macro.
2046 (gen_i_form): New function.
2047 (GEN_B): New macro.
2048 (GEN_BL): New macro.
2049 (gen_b_form): New function.
2050 (GEN_BNE): New macro.
2051 (GEN_LOAD): New macro.
2052 (GEN_STORE): New macro.
2053 (gen_limm): New function.
2054 (gen_atomic_xchg): New function.
2055 (gen_call): New function.
2056 (ppc_relocate_instruction): New function.
2057 (ppc_install_fast_tracepoint_jump_pad): New function.
2058 (ppc_get_min_fast_tracepoint_insn_len): New function.
2059 (ppc_get_ipa_tdesc_idx): New function.
2060 (the_low_target): Wire in the new functions.
2061 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2062 tdescs.
2063 * linux-ppc-tdesc.h: New file.
2064
2065 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2066
2067 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2068 (alloc_jump_pad_buffer): New function.
2069 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2070 (alloc_jump_pad_buffer): New function.
2071 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2072 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2073 (alloc_jump_pad_buffer): New function.
2074 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2075 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2076 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2077 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2078
2079 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2080
2081 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2082 * linux-amd64-ipa.c: Likewise.
2083 * linux-i386-ipa.c: Likewise.
2084 * linux-s390-ipa.c: Likewise.
2085 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2086 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2087 set_trace_state_variable_value_ptr.
2088 (struct ipa_sym_addresses): Likewise.
2089 (symbol_list): Likewise.
2090 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2091 accessing gdb_collect directly.
2092 (gdb_collect_ptr_type): New typedef.
2093 (get_raw_reg_ptr_type): New typedef.
2094 (get_trace_state_variable_value_ptr_type): New typedef.
2095 (set_trace_state_variable_value_ptr_type): New typedef.
2096 (gdb_collect_ptr): New global.
2097 (get_raw_reg_ptr): New global.
2098 (get_trace_state_variable_value_ptr): New global.
2099 (set_trace_state_variable_value_ptr): New global.
2100 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2101 accessing get_raw_reg directly.
2102 (get_get_tsv_func_addr): Likewise for
2103 get_trace_state_variable_value_ptr.
2104 (get_set_tsv_func_addr): Likewise for
2105 set_trace_state_variable_value_ptr.
2106 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2107
2108 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2109
2110 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2111
2112 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2113
2114 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2115 packets.
2116 (relocate_instruction): Remove own_buf.
2117 * server.c (own_buf): Make global.
2118 (handle_v_requests): Make global.
2119 * server.h (own_buf): New declaration.
2120 (handle_v_requests): New prototype.
2121
2122 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2123
2124 PR 18377
2125 * linux-s390-low.c (add_insns): New function.
2126 (s390_emit_prologue): New function.
2127 (s390_emit_epilogue): New function.
2128 (s390_emit_add): New function.
2129 (s390_emit_sub): New function.
2130 (s390_emit_mul): New function.
2131 (s390_emit_lsh): New function.
2132 (s390_emit_rsh_signed): New function.
2133 (s390_emit_rsh_unsigned): New function.
2134 (s390_emit_ext): New function.
2135 (s390_emit_log_not): New function.
2136 (s390_emit_bit_and): New function.
2137 (s390_emit_bit_or): New function.
2138 (s390_emit_bit_xor): New function.
2139 (s390_emit_bit_not): New function.
2140 (s390_emit_equal): New function.
2141 (s390_emit_less_signed): New function.
2142 (s390_emit_less_unsigned): New function.
2143 (s390_emit_ref): New function.
2144 (s390_emit_if_goto): New function.
2145 (s390_emit_goto): New function.
2146 (s390_write_goto_address): New function.
2147 (s390_emit_litpool): New function.
2148 (s390_emit_const): New function.
2149 (s390_emit_call): New function.
2150 (s390_emit_reg): New function.
2151 (s390_emit_pop): New function.
2152 (s390_emit_stack_flush): New function.
2153 (s390_emit_zero_ext): New function.
2154 (s390_emit_swap): New function.
2155 (s390_emit_stack_adjust): New function.
2156 (s390_emit_set_r2): New function.
2157 (s390_emit_int_call_1): New function.
2158 (s390_emit_void_call_2): New function.
2159 (s390_emit_eq_goto): New function.
2160 (s390_emit_ne_goto): New function.
2161 (s390_emit_lt_goto): New function.
2162 (s390_emit_le_goto): New function.
2163 (s390_emit_gt_goto): New function.
2164 (s390_emit_ge_goto): New function.
2165 (s390x_emit_prologue): New function.
2166 (s390x_emit_epilogue): New function.
2167 (s390x_emit_add): New function.
2168 (s390x_emit_sub): New function.
2169 (s390x_emit_mul): New function.
2170 (s390x_emit_lsh): New function.
2171 (s390x_emit_rsh_signed): New function.
2172 (s390x_emit_rsh_unsigned): New function.
2173 (s390x_emit_ext): New function.
2174 (s390x_emit_log_not): New function.
2175 (s390x_emit_bit_and): New function.
2176 (s390x_emit_bit_or): New function.
2177 (s390x_emit_bit_xor): New function.
2178 (s390x_emit_bit_not): New function.
2179 (s390x_emit_equal): New function.
2180 (s390x_emit_less_signed): New function.
2181 (s390x_emit_less_unsigned): New function.
2182 (s390x_emit_ref): New function.
2183 (s390x_emit_if_goto): New function.
2184 (s390x_emit_const): New function.
2185 (s390x_emit_call): New function.
2186 (s390x_emit_reg): New function.
2187 (s390x_emit_pop): New function.
2188 (s390x_emit_stack_flush): New function.
2189 (s390x_emit_zero_ext): New function.
2190 (s390x_emit_swap): New function.
2191 (s390x_emit_stack_adjust): New function.
2192 (s390x_emit_int_call_1): New function.
2193 (s390x_emit_void_call_2): New function.
2194 (s390x_emit_eq_goto): New function.
2195 (s390x_emit_ne_goto): New function.
2196 (s390x_emit_lt_goto): New function.
2197 (s390x_emit_le_goto): New function.
2198 (s390x_emit_gt_goto): New function.
2199 (s390x_emit_ge_goto): New function.
2200 (s390_emit_ops): New function.
2201 (struct linux_target_ops): Fill in emit_ops hook.
2202
2203 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2204
2205 PR 18377
2206 * Makefile.in: Add s390 IPA files.
2207 * configure.srv: Build IPA for s390.
2208 * linux-s390-ipa.c: New file.
2209 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2210 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2211 (tdesc_s390_linux32): Likewise.
2212 (init_registers_s390_linux32v1): Likewise.
2213 (tdesc_s390_linux32v1): Likewise.
2214 (init_registers_s390_linux32v2): Likewise.
2215 (tdesc_s390_linux32v2): Likewise.
2216 (init_registers_s390_linux64): Likewise.
2217 (tdesc_s390_linux64): Likewise.
2218 (init_registers_s390_linux64v1): Likewise.
2219 (tdesc_s390_linux64v1): Likewise.
2220 (init_registers_s390_linux64v2): Likewise.
2221 (tdesc_s390_linux64v2): Likewise.
2222 (init_registers_s390_te_linux64): Likewise.
2223 (tdesc_s390_te_linux64): Likewise.
2224 (init_registers_s390_vx_linux64): Likewise.
2225 (tdesc_s390_vx_linux64): Likewise.
2226 (init_registers_s390_tevx_linux64): Likewise.
2227 (tdesc_s390_tevx_linux64): Likewise.
2228 (init_registers_s390x_linux64): Likewise.
2229 (tdesc_s390x_linux64): Likewise.
2230 (init_registers_s390x_linux64v1): Likewise.
2231 (tdesc_s390x_linux64v1): Likewise.
2232 (init_registers_s390x_linux64v2): Likewise.
2233 (tdesc_s390x_linux64v2): Likewise.
2234 (init_registers_s390x_te_linux64): Likewise.
2235 (tdesc_s390x_te_linux64): Likewise.
2236 (init_registers_s390x_vx_linux64): Likewise.
2237 (tdesc_s390x_vx_linux64): Likewise.
2238 (init_registers_s390x_tevx_linux64): Likewise.
2239 (tdesc_s390x_tevx_linux64): Likewise.
2240 (have_hwcap_s390_vx): New static variable.
2241 (s390_arch_setup): Fill have_hwcap_s390_vx.
2242 (s390_get_thread_area): New function.
2243 (s390_ft_entry_gpr_esa): New const.
2244 (s390_ft_entry_gpr_zarch): New const.
2245 (s390_ft_entry_misc): New const.
2246 (s390_ft_entry_fr): New const.
2247 (s390_ft_entry_vr): New const.
2248 (s390_ft_main_31): New const.
2249 (s390_ft_main_64): New const.
2250 (s390_ft_exit_fr): New const.
2251 (s390_ft_exit_vr): New const.
2252 (s390_ft_exit_misc): New const.
2253 (s390_ft_exit_gpr_esa): New const.
2254 (s390_ft_exit_gpr_zarch): New const.
2255 (append_insns): New function.
2256 (s390_relocate_instruction): New function.
2257 (s390_install_fast_tracepoint_jump_pad): New function.
2258 (s390_get_min_fast_tracepoint_insn_len): New function.
2259 (s390_get_ipa_tdesc_idx): New function.
2260 (struct linux_target_ops): Wire in the above functions.
2261 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2262 * linux-s390-tdesc.h: New file.
2263
2264 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2265
2266 * linux-s390-low.c (s390_supports_tracepoints): New function.
2267 (struct linux_target_ops): Fill supports_tracepoints hook.
2268
2269 2016-03-18 Yao Qi <yao.qi@linaro.org>
2270
2271 * linux-low.c (lwp_signal_can_be_delivered): New function.
2272 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2273
2274 2016-03-18 Yao Qi <yao.qi@linaro.org>
2275
2276 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2277 0 if signal is enqueued. Remove 'signal' from one debugging
2278 message. Move one debugging message to some lines below.
2279 Remove code setting 'signal' to 0.
2280
2281 2016-03-18 Yao Qi <yao.qi@linaro.org>
2282
2283 * linux-low.c (linux_low_filter_event): Remove redundant
2284 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2285
2286 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2287
2288 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2289 (struct linux_target_ops): Wire in the above.
2290
2291 2016-03-03 Yao Qi <yao.qi@linaro.org>
2292
2293 * linux-low.c: Update comments to start_step_over.
2294
2295 2016-03-03 Yao Qi <yao.qi@linaro.org>
2296
2297 PR server/19736
2298 * linux-low.c (handle_extended_wait): Set child suspended
2299 if event_lwp->bp_reinsert isn't zero.
2300
2301 2016-03-02 Yao Qi <yao.qi@linaro.org>
2302
2303 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2304 enqueue_pending_signal.
2305
2306 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2307
2308 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2309 is actually loaded.
2310
2311 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2312
2313 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2314 (s390_regmap_3264) [!__s390x__]: New global.
2315 (s390_collect_ptrace_register): Skip map entries containing -1.
2316 (s390_supply_ptrace_register): Ditto.
2317 (s390_fill_gprs_high): New function.
2318 (s390_store_gprs_high): New function.
2319 (s390_regsets): Add NT_S390_HIGH_GPRS.
2320 (s390_get_hwcap): Enable on 31-bit.
2321 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2322 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2323 Detect NT_S390_HIGH_GPRS.
2324 (s390_usrregs_info_3264): Enable on 31-bit.
2325 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2326 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2327
2328 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2329
2330 PR gdb/13808
2331 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2332 * configure.srv: Ditto.
2333 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2334 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2335 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2336 (init_registers_amd64_linux): Remove prototype.
2337 (tdesc_amd64_linux): Remove declaration.
2338 (get_ipa_tdesc): New function.
2339 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2340 initialize remaining tdescs.
2341 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2342 (init_registers_i386_linux): Remove prototype.
2343 (tdesc_i386_linux): Remove declaration.
2344 (get_ipa_tdesc): New function.
2345 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2346 initialize remaining tdescs.
2347 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2348 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2349 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2350 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2351 (x86_get_ipa_tdesc_idx): New function.
2352 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2353 * linux-x86-tdesc.h: New file.
2354 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2355 (target_get_ipa_tdesc_idx): New macro.
2356 * tracepoint.c (ipa_tdesc_idx): New macro.
2357 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2358 (symbol_list): Add ipa_tdesc_idx.
2359 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2360 (ipa_tdesc): Remove.
2361 (ipa_tdesc_idx): New variable.
2362 (get_context_regcache): Use get_ipa_tdesc.
2363 (gdb_collect): Ditto.
2364 (gdb_probe): Ditto.
2365 * tracepoint.h (get_ipa_tdesc): New prototype.
2366 (ipa_tdesc): Remove.
2367
2368 2016-02-24 Pedro Alves <palves@redhat.com>
2369
2370 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2371 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2372 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2373 Factor out common code between the USE_SIGTRAP_SIGINFO and
2374 !USE_SIGTRAP_SIGINFO blocks.
2375 (linux_low_filter_event): Call save_stop_reason instead of
2376 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2377 Update comments.
2378 (linux_wait_1): Update comments.
2379
2380 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2381
2382 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2383 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2384 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2385 ppc_insert_point, ppc_remove_point.
2386
2387 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2388
2389 * linux-s390-low.c (s390_supports_z_point_type): New function.
2390 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2391
2392 2016-02-16 Yao Qi <yao.qi@linaro.org>
2393
2394 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2395 PC. Get pc from regcache_read_pc.
2396
2397 2016-02-12 Yao Qi <yao.qi@linaro.org>
2398
2399 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2400 or linux_get_pc_32bit.
2401 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2402
2403 2016-02-12 Yao Qi <yao.qi@linaro.org>
2404
2405 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2406 arm_linux_get_next_pcs_fixup.
2407
2408 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2409
2410 * tracepoint.c (x_tracepoint_action_download): Change
2411 write_inferior_data_ptr to write_inferior_data_pointer.
2412 (cmd_qtstart): Likewise.
2413 (write_inferior_data_ptr): Remove.
2414 (download_agent_expr): Change write_inferior_data_ptr to
2415 write_inferior_data_pointer.
2416 (download_tracepoint_1): Likewise.
2417 (download_tracepoint): Likewise.
2418 (download_trace_state_variables): Likewise.
2419
2420 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2421 Marcin Kościelnicki <koriakin@0x04.net>
2422
2423 * tracepoint.c (struct tracepoint_action_ops): Remove.
2424 (struct tracepoint_action): Remove ops.
2425 (m_tracepoint_action_download, r_tracepoint_action_download)
2426 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2427 size and offset accordingly.
2428 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2429 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2430 (tracepoint_action_send, tracepoint_action_download): New functions.
2431 Helpers for trace action handlers.
2432 (add_tracepoint_action): Remove setup actions ops.
2433 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2434
2435 2016-02-10 Yao Qi <yao.qi@linaro.org>
2436
2437 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2438
2439 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2440
2441 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2442 to AC_OUTPUT.
2443 * configure: Regenerate.
2444
2445 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2446
2447 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2448 void * to gdb_byte *.
2449 * linux-low.c (siginfo_fixup): Likewise.
2450 (linux_xfer_siginfo): Likewise.
2451 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2452 Likewise.
2453 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2454
2455 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2456
2457 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2458 to srv_tgtobj.
2459 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2460 to srv_tgtobj.
2461 * linux-x86-low.c [__x86_64__]: Include
2462 "nat/amd64-linux-siginfo.h".
2463 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2464 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2465 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2466 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2467 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2468 (cpt_si_fd, si_timerid, si_overrun): Move from
2469 nat/amd64-linux-siginfo.c.
2470 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2471
2472 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2473
2474 * server.c (skip_to_semicolon): Remove.
2475 (process_point_options): Use strchrnul instead of
2476 skip_to_semicolon.
2477
2478 2016-01-26 Yao Qi <yao.qi@linaro.org>
2479
2480 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2481 * linux-low.c (install_software_single_step_breakpoints): Don't
2482 call regcache_read_pc.
2483 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2484 argument pc.
2485
2486 2016-01-26 Yao Qi <yao.qi@linaro.org>
2487
2488 * linux-low.c (install_software_single_step_breakpoints): Call
2489 regcache_read_pc instead of get_pc.
2490
2491 2016-01-26 Yao Qi <yao.qi@linaro.org>
2492
2493 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2494 (unblock_async_io): Rename to ...
2495 (block_unblock_async_io): ... it. New function.
2496 (enable_async_io): Don't install SIGIO handler. Unblock it
2497 instead.
2498 (disable_async_io): Don't ignore SIGIO. Block it instead.
2499 (initialize_async_io): Install SIGIO handler. Don't call
2500 unblock_async_io.
2501
2502 2016-01-26 Yao Qi <yao.qi@linaro.org>
2503
2504 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2505 first character is '\003', call *the_target->request_interrupt.
2506
2507 2016-01-25 Yao Qi <yao.qi@linaro.org>
2508
2509 * remote-utils.c (new_thread_notify): Remove.
2510 (dead_thread_notify): Likewise.
2511 * remote-utils.h (new_thread_notify): Remove declaration.
2512 (dead_thread_notify): Likewise.
2513
2514 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2515
2516 * gdb.trace/pending.exp: Fix expected message on continue.
2517
2518 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2519
2520 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2521 it works properly on big-endian machines where sizeof (CORE_ADDR)
2522 != sizeof (void *).
2523
2524 2016-01-21 Pedro Alves <palves@redhat.com>
2525
2526 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2527 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2528 * configure: Regenerate.
2529
2530 2016-01-21 Yao Qi <yao.qi@linaro.org>
2531
2532 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2533 is_thumb and set it according to CPSR saved on the stack.
2534 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2535 arm_sigreturn_next_pc.
2536
2537 2016-01-18 Yao Qi <yao.qi@linaro.org>
2538
2539 * linux-low.c (linux_set_pc_64bit): New function.
2540 (linux_get_pc_64bit): New function.
2541 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2542 Declare.
2543 * linux-sparc-low.c (debug_threads): Remove declaration.
2544 (sparc_get_pc): Remove.
2545 (the_low_target): Use linux_get_pc_64bit instead of
2546 sparc_get_pc.
2547 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2548 (the_low_target): Use linux_get_pc_64bit and
2549 linux_set_pc_64bit.
2550
2551 2016-01-18 Yao Qi <yao.qi@linaro.org>
2552
2553 * linux-arm-low.c (debug_threads): Remove declaration.
2554 (arm_get_pc, arm_set_pc): Remove.
2555 (the_low_target): Use linux_get_pc_32bit and
2556 linux_set_pc_32bit.
2557 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2558 (the_low_target): Use linux_get_pc_32bit and
2559 linux_set_pc_32bit.
2560 * linux-cris-low.c (debug_threads): Remove declaration.
2561 (cris_get_pc, cris_set_pc,): Remove.
2562 (the_low_target): Use linux_get_pc_32bit and
2563 linux_set_pc_32bit.
2564 * linux-crisv32-low.c (debug_threads): Remove declaration.
2565 (cris_get_pc, cris_set_pc): Remove.
2566 (the_low_target): Use linux_get_pc_32bit and
2567 linux_set_pc_32bit.
2568 * linux-low.c: Include inttypes.h.
2569 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2570 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2571 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2572 (the_low_target): Use linux_get_pc_32bit and
2573 linux_set_pc_32bit.
2574 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2575 (the_low_target): Use linux_get_pc_32bit and
2576 linux_set_pc_32bit.
2577 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2578 (the_low_target): Use linux_get_pc_32bit and
2579 linux_set_pc_32bit.
2580 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2581 (the_low_target): Use linux_get_pc_32bit and
2582 linux_set_pc_32bit.
2583 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2584 (the_low_target): Use linux_get_pc_32bit and
2585 linux_set_pc_32bit.
2586
2587 2016-01-18 Gary Benson <gbenson@redhat.com>
2588
2589 * configure.ac (AC_FUNC_FORK): New check.
2590 * config.in: Regenerate.
2591 * configure: Likewise.
2592
2593 2016-01-14 Yao Qi <yao.qi@linaro.org>
2594
2595 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2596 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2597 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2598 arm_get_next_pcs_ctor.
2599
2600 2016-01-12 Josh Stone <jistone@redhat.com>
2601 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2602
2603 * inferiors.h: Include "gdb_vecs.h".
2604 (struct process_info): Add syscalls_to_catch.
2605 * inferiors.c (remove_process): Free syscalls_to_catch.
2606 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2607 syscall_return stops.
2608 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2609 * server.c (handle_general_set): Handle QCatchSyscalls.
2610 (handle_query): Report support for QCatchSyscalls.
2611 * target.h (struct target_ops): Add supports_catch_syscall.
2612 (target_supports_catch_syscall): New macro.
2613 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2614 (struct lwp_info): Add syscall_state.
2615 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2616 Maintain syscall_state and syscalls_to_catch across exec.
2617 (get_syscall_trapinfo): New function, proxy to the_low_target.
2618 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2619 (linux_low_filter_event): Toggle syscall_state entry/return for
2620 syscall traps, and set it ignored for all others.
2621 (gdb_catching_syscalls_p): New function.
2622 (gdb_catch_this_syscall_p): New function.
2623 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2624 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2625 (linux_supports_catch_syscall): New function.
2626 (linux_target_ops): Install it.
2627 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2628 (the_low_target): Install it.
2629
2630 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2631
2632 * acinclude.m4: Include new ../warning.m4 file.
2633 * configure: Regenerated.
2634 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2635
2636 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2637
2638 * ax.c (is_goto_target): Mark static.
2639 * linux-low.c (register_addr): Likewise.
2640 (linux_fetch_registers, linux_store_registers): Likewise.
2641 * mem-break.c (any_persistent_commands): Fix old prototype.
2642 (add_commands_to_breakpoint): Mark static.
2643 * regcache.c (find_register_by_name): Delete unused func.
2644 * remote-utils.c (hex_or_minus_one): Mark static.
2645 * server.c (monitor_show_help): Mark static.
2646 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2647 handle_v_requests): Likewise.
2648
2649 2016-01-12 Pedro Alves <palves@redhat.com>
2650
2651 Remove use of the registered trademark symbol throughout.
2652
2653 2016-01-08 Yao Qi <yao.qi@linaro.org>
2654
2655 * remote-utils.c (getpkt): If c is '\003', call target hook
2656 request_interrupt.
2657
2658 2016-01-06 Yao Qi <yao.qi@linaro.org>
2659
2660 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2661 linux-aarch32-low.c.
2662 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2663 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2664 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2665 (thumb2_breakpoint): Declare.
2666 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2667 linux-aarch32-low.h.
2668 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2669 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2670 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2671
2672 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2673
2674 * gdbreplay.c (gdbreplay_version): Change copyright year in
2675 version message.
2676 * server.c (gdbserver_version): Likewise.
2677
2678 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2679
2680 * server.c (crc32_table): Delete.
2681 (crc32): Use libiberty's xcrc32 function.
2682
2683 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2684
2685 * lynx-low.c (lynx_delete_thread_callback): New function.
2686 (lynx_mourn): Properly delete our process and all of its
2687 threads. Remove call to clear_inferiors.
2688
2689 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2690
2691 * target.c (thread_search_callback): Add check that
2692 the thread_stopped target callback is not NULL before
2693 calling it.
2694
2695 2015-12-21 Yao Qi <yao.qi@linaro.org>
2696
2697 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2698 arm breakpoint.
2699
2700 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2701
2702 * server.c (handle_query): Call target_supports_software_single_step.
2703
2704 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2705
2706 * linux-low.c (single_step): New function.
2707 (linux_resume_one_lwp_throw): Call single_step.
2708 (start_step_over): Likewise.
2709
2710 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2711
2712 * Makefile.in (SFILES): Append arch/arm-linux.c,
2713 arch/arm-get-next-pcs.c.
2714 (arm-linux.o): New rule.
2715 (arm-get-next-pcs.o): New rule.
2716 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2717 arm-linux.o.
2718 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2719 to linux-aarch32-low.c.
2720 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2721 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2722 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2723 (thumb2_breakpoint_len): Likewise.
2724 (arm_is_thumb_mode): Make non-static.
2725 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2726 from linux-aarch32-low.c.
2727 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2728 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2729 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2730 (thumb2_breakpoint_len): Likewise.
2731 (arm_is_thumb_mode): New declaration.
2732 * linux-arm-low.c: Include arch/arm-linux.h
2733 aarch/arm-get-next-pcs.h, sys/syscall.h.
2734 (get_next_pcs_ops): New struct.
2735 (get_next_pcs_addr_bits_remove): New function.
2736 (get_next_pcs_is_thumb): New function.
2737 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2738 (arm_sigreturn_next_pc): Likewise.
2739 (get_next_pcs_syscall_next_pc): Likewise.
2740 (arm_gdbserver_get_next_pcs): Likewise.
2741 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2742 Initialize.
2743 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2744 * server.h: Include gdb_vecs.h.
2745
2746 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2747
2748 * Makefile.in (SFILES): Append common/common-regcache.c.
2749 (OBS): Append common-regcache.o.
2750 (common-regcache.o): New rule.
2751 * regcache.c (init_register_cache): Initialize cache to
2752 REG_UNAVAILABLE.
2753 (regcache_raw_read_unsigned): New function.
2754 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2755 register_status enum.
2756
2757 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2758
2759 * linux-aarch64-low.c (the_low_targets): Rename
2760 breakpoint_reinsert_addr to get_next_pcs.
2761 * linux-arm-low.c (the_low_targets): Likewise.
2762 * linux-bfin-low.c (the_low_targets): Likewise.
2763 * linux-cris-low.c (the_low_targets): Likewise.
2764 * linux-crisv32-low.c (the_low_targets): Likewise.
2765 * linux-low.c (can_software_single_step): Likewise.
2766 (install_software_single_step_breakpoints): New function.
2767 (start_step_over): Use install_software_single_step_breakpoints.
2768 * linux-low.h: New CORE_ADDR vector.
2769 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2770 get_next_pcs.
2771 * linux-mips-low.c (the_low_targets): Likewise.
2772 * linux-nios2-low.c (the_low_targets): Likewise.
2773 * linux-sparc-low.c (the_low_targets): Likewise.
2774
2775 2015-12-17 Pedro Alves <palves@redhat.com>
2776
2777 * linux-low.c (linux_kill_one_lwp): Remove references to
2778 LinuxThreads.
2779 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2780 to 'kill'.
2781 (linux_init_signals): Delete.
2782 (initialize_low): Adjust.
2783 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2784
2785 2015-12-16 Pedro Alves <palves@redhat.com>
2786
2787 * configure.ac (compiler warning flags): When testing a
2788 -Wno-foo option, check whether -Wfoo works instead.
2789 * configure: Regenerate.
2790
2791 2015-12-11 Don Breazeal <donb@codesourcery.com>
2792
2793 * server.c (process_serial_event): Don't exit from gdbserver
2794 in remote mode if there are still active inferiors.
2795
2796 2015-12-11 Yao Qi <yao.qi@linaro.org>
2797
2798 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2799 arm_breakpoint_at if the process is 32-bit.
2800
2801 2015-12-11 Yao Qi <yao.qi@linaro.org>
2802
2803 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2804 arm breakpoint.
2805
2806 2015-12-07 Yao Qi <yao.qi@linaro.org>
2807
2808 * configure.srv: Append arm.o to srv_tgtobj for
2809 aarch64*-*-linux* target.
2810 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2811 from linux-arm-low.c.
2812 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2813 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2814 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2815 (thumb2_breakpoint_len): Likewise.
2816 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2817 (arm_breakpoint_kinds): Likewise.
2818 (arm_breakpoint_kind_from_pc): Likewise.
2819 (arm_sw_breakpoint_from_kind): Likewise.
2820 (arm_breakpoint_kind_from_current_state): Likewise.
2821 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2822 (arm_sw_breakpoint_from_kind): Declare.
2823 (arm_breakpoint_kind_from_current_state): Declare.
2824 (arm_breakpoint_at): Declare.
2825 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2826 arm_sw_breakpoint_from_kind if process is 32-bit.
2827 (aarch64_breakpoint_kind_from_pc): New function.
2828 (aarch64_breakpoint_kind_from_current_state): New function.
2829 (the_low_target): Initialize fields breakpoint_kind_from_pc
2830 and breakpoint_kind_from_current_state.
2831 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2832 linux-aarch32-low.c.
2833 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2834 (arm_breakpoint, arm_breakpoint_len): Likewise.
2835 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2836 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2837 (arm_is_thumb_mode): Likewise.
2838 (arm_breakpoint_at): Likewise.
2839 (arm_breakpoint_kind_from_pc): Likewise.
2840 (arm_sw_breakpoint_from_kind): Likewise.
2841 (arm_breakpoint_kind_from_current_state): Likewise.
2842
2843 Revert:
2844 2015-08-04 Yao Qi <yao.qi@linaro.org>
2845
2846 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2847 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2848 * server.c (extended_protocol): Remove "static".
2849 * server.h (extended_protocol): Declare it.
2850
2851 2015-12-04 Josh Stone <jistone@redhat.com>
2852
2853 * target.h (struct target_ops) <arch_setup>: Rename to ...
2854 (struct target_ops) <post_create_inferior>: ... this.
2855 (target_arch_setup): Rename to ...
2856 (target_post_create_inferior): ... this, calling post_create_inferior.
2857 * server.c (start_inferior): Update target_arch_setup calls to
2858 target_post_create_inferior.
2859 * linux-low.c (linux_low_ptrace_options): Forward declare.
2860 (linux_arch_setup): Update its comment for general use.
2861 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2862 (struct linux_target_ops): Use linux_post_create_inferior.
2863 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2864 to post_create_inferior.
2865 * nto-low.c (struct nto_target_ops): Likewise.
2866 * spu-low.c (struct spu_target_ops): Likewise.
2867 * win32-low.c (struct win32_target_ops): Likewise.
2868
2869 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2870
2871 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2872
2873 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2874
2875 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2876 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2877 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2878 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2879 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2880 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2881 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2882 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2883 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2884 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2885 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2886 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2887
2888 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2889
2890 * linux-low.c (linux_look_up_symbols): Don't call
2891 linux_supports_traceclone.
2892 * linux-low.h (thread_db_init): Remove use_events argument.
2893 * thread-db.c (thread_db_use_event): Remove global variable.
2894 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2895 (struct thread_db) <td_create_bp>: Remove field.
2896 (thread_db_create_event): Remove function.
2897 (thread_db_enable_reporting): Likewise.
2898 (find_one_thread): Don't check for thread_db_use_events.
2899 (attach_thread): Likewise.
2900 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2901 (try_thread_db_load_1): Don't check for thread_db_use_events.
2902 (thread_db_init): Remove use_events argument and thread events
2903 handling.
2904 (remove_thread_event_breakpoints): Remove function.
2905 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2906
2907 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2908
2909 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2910 New function.
2911 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2912 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2913 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2914 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2915 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2916 Initialize.
2917 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2918 New function.
2919 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2920 * linux-low.c (can_hardware_single_step): Use
2921 supports_hardware_single_step.
2922 (can_software_single_step): New function.
2923 (start_step_over): Call can_software_single_step.
2924 (linux_supports_hardware_single_step): New function.
2925 (struct target_ops) <supports_software_single_step>: Initialize.
2926 * linux-low.h (struct linux_target_ops)
2927 <supports_hardware_single_step>: Initialize.
2928 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2929 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2930 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2931 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2932 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2933 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2934 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2935 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2936 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2937 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2938 Initialize.
2939 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2940 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2941 Initialize.
2942 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2943 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2944 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2945 New function.
2946 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2947 * target.h (struct target_ops): <supports_software_single_step>:
2948 New field.
2949 (target_supports_software_single_step): New macro.
2950
2951 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2952
2953 * linux-low.c (linux_wait_1): Fix pc advance condition.
2954 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2955 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2956
2957 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2958
2959 * linux-arm-low.c (arm_is_thumb_mode): New function.
2960 (arm_breakpoint_at): Use arm_is_thumb_mode.
2961 (arm_breakpoint_kind_from_current_state): New function.
2962 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2963 Initialize.
2964 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2965 (linux_breakpoint_kind_from_current_state): New function.
2966 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2967 * linux-low.h (struct linux_target_ops)
2968 <breakpoint_kind_from_current_state>: New field.
2969 * target.h (struct target_ops): Likewise.
2970 (target_breakpoint_kind_from_current_state): New macro.
2971
2972 2015-11-30 Pedro Alves <palves@redhat.com>
2973
2974 * linux-low.c (linux_resume): Wake up the event loop before
2975 returning.
2976
2977 2015-11-30 Pedro Alves <palves@redhat.com>
2978
2979 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2980 check.
2981 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2982 to -1.
2983 * target.c (struct thread_search): New structure.
2984 (thread_search_callback): New function.
2985 (prev_general_thread): New global.
2986 (prepare_to_access_memory, done_accessing_memory): New functions.
2987 * target.h (prepare_to_access_memory, done_accessing_memory):
2988 Replace macros with function declarations.
2989
2990 2015-11-30 Pedro Alves <palves@redhat.com>
2991
2992 PR 14618
2993 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2994 report TARGET_WAITKIND_NO_RESUMED.
2995 * remote-utils.c (prepare_resume_reply): Handle
2996 TARGET_WAITKIND_NO_RESUMED.
2997 * server.c (report_no_resumed): New global.
2998 (handle_query) <qSupported>: Handle "no-resumed+". Report
2999 "no-resumed+" support.
3000 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3001 return error if the client doesn't support no-resumed events.
3002 (push_stop_notification): New function.
3003 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3004 events if the client supports them.
3005
3006 2015-11-30 Pedro Alves <palves@redhat.com>
3007
3008 * linux-low.c (thread_still_has_status_pending_p): Don't check
3009 vCont;t here.
3010 (lwp_resumed): New function.
3011 (status_pending_p_callback): Return early if the LWP is not
3012 supposed to be resumed.
3013
3014 2015-11-30 Pedro Alves <palves@redhat.com>
3015
3016 * linux-low.c (handle_extended_wait): Assert that the LWP's
3017 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3018 thread create events, leave the new child's status pending.
3019 (linux_low_filter_event): If GDB wants to hear about thread exit
3020 events, leave the LWP marked dead and don't delete it.
3021 (linux_wait_for_event_filtered): Don't check for thread exit.
3022 (filter_exit_event): New function.
3023 (linux_wait_1): Use it, when returning an exit event.
3024 (linux_resume_one_lwp_throw): Assert that the LWP's
3025 waitstatus is TARGET_WAITKIND_IGNORE.
3026 * remote-utils.c (prepare_resume_reply): Handle
3027 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3028 * server.c (report_thread_events): New global.
3029 (handle_general_set): Handle QThreadEvents.
3030 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3031 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3032 TARGET_WAITKIND_THREAD_EXITED.
3033 * server.h (report_thread_events): Declare.
3034
3035 2015-11-30 Pedro Alves <palves@redhat.com>
3036
3037 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3038 the thread's last_resume_kind was resume_stop.
3039
3040 2015-11-30 Pedro Alves <palves@redhat.com>
3041
3042 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3043 before returning.
3044
3045 2015-11-30 Pedro Alves <palves@redhat.com>
3046
3047 * server.c (handle_v_requests): Handle vCtrlC.
3048
3049 2015-11-30 Pedro Alves <palves@redhat.com>
3050
3051 * gdbthread.h (find_any_thread_of_pid): Declare.
3052 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3053 functions.
3054 * server.c (handle_query): If current_thread is NULL, look for
3055 another thread of the selected process.
3056
3057 2015-11-26 Daniel Colascione <dancol@dancol.org>
3058 Simon Marchi <simon.marchi@ericsson.com>
3059
3060 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3061 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3062 name in reply.
3063 * target.h (struct target_ops) <thread_name>: New field.
3064 (target_thread_name): New macro.
3065
3066 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3067
3068 * regcache.h (regcache_invalidate_pid): Add declaration.
3069 * regcache.c (regcache_invalidate_pid): New function, extracted
3070 from regcache_invalidate.
3071 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3072 Add trivial documentation comment.
3073 * lynx-low.c: Use regcache_invalidate_pid instead of
3074 regcache_invalidate.
3075
3076 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3077
3078 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3079 and Elf64_auxv_t if the target is Android.
3080
3081 2015-11-22 Doug Evans <xdje42@gmail.com>
3082
3083 * target.h: #include <sys/types.h>.
3084
3085 2015-11-19 Pedro Alves <palves@redhat.com>
3086
3087 * linux-low.c (linux_process_qsupported): Change prototype.
3088 Adjust.
3089 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3090 Change prototype.
3091 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3092 and adjust to loop over all features.
3093 * server.c (handle_query) <qSupported>: Adjust to call
3094 target_process_qsupported once, passing it a vector of unprocessed
3095 features.
3096 * target.h (struct target_ops) <process_qsupported>: Change
3097 prototype.
3098 (target_process_qsupported): Adjust.
3099
3100 2015-11-19 Pedro Alves <palves@redhat.com>
3101
3102 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3103 mode.
3104 * configure: Regenerate.
3105
3106 2015-11-19 Pedro Alves <palves@redhat.com>
3107
3108 * configure: Regenerate.
3109
3110 2015-11-19 Yao Qi <yao.qi@linaro.org>
3111
3112 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3113 type to uint32_t.
3114
3115 2015-11-19 Yao Qi <yao.qi@linaro.org>
3116
3117 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3118 (struct aarch64_operand): Move enum out.
3119
3120 2015-11-19 Yao Qi <yao.qi@linaro.org>
3121
3122 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3123 struct user_fpsimd_state *.
3124 (aarch64_store_fpregset): Likewise.
3125
3126 2015-11-19 Yao Qi <yao.qi@linaro.org>
3127
3128 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3129 struct user_pt_regs *.
3130 (aarch64_store_gregset): Likewise.
3131
3132 2015-11-18 Pedro Alves <palves@redhat.com>
3133
3134 * Makefile.in (all_object_files): Add $IPA_OBJS.
3135
3136 2015-11-17 Pedro Alves <palves@redhat.com>
3137
3138 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3139 GDB_SIGNAL_0 and gdb_signal_to_string.
3140
3141 2015-11-17 Pedro Alves <palves@redhat.com>
3142
3143 * win32-low.c (handle_output_debug_string): Remove parameter.
3144 (win32_kill): Remove our_status local and adjust call to
3145 handle_output_debug_string.
3146 (get_child_debug_event): Adjust call to
3147 handle_output_debug_string.
3148
3149 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3150
3151 * linux-mips-low.c (mips_fill_gregset): Add cast.
3152 (mips_store_gregset): Likewise.
3153 (mips_fill_fpregset): Likewise.
3154 (mips_store_fpregset): Likewise.
3155
3156 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3157
3158 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3159 priv.
3160
3161 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3162
3163 * linux-mips-low.c (mips_linux_new_thread): Change type of
3164 watch_type to enum target_hw_bp_type.
3165
3166 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3167
3168 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3169 Change return type to arm_hwbp_type.
3170
3171 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3172
3173 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3174 (arm_store_gregset): Likewise.
3175 * linux-arm-low.c (arm_get_hwcap): Likewise.
3176 (arm_read_description): Likewise.
3177
3178 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3179
3180 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3181
3182 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3183
3184 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3185 (ppc_fill_vsxregset): Likewise.
3186 (ppc_store_vsxregset): Likewise.
3187 (ppc_fill_vrregset): Likewise.
3188 (ppc_store_vrregset): Likewise.
3189 (ppc_fill_evrregset): Likewise.
3190 (ppc_store_evrregset): Likewise.
3191
3192 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3193
3194 * linux-ppc-low.c (ppc_usrregs_info): Remove
3195 forward-declaration.
3196 (ppc_arch_setup): Move lower in file.
3197
3198 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3199
3200 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3201 (ps_pdwrite): Likewise.
3202
3203 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3204
3205 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3206 to after assert checks.
3207
3208 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3209
3210 * proc-service.c (ps_pdread): Add/adjust casts.
3211 (ps_pdwrite): Add/adjust casts.
3212
3213 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3214
3215 * server.c (handle_search_memory_1): Cast return value of
3216 memmem.
3217
3218 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3219
3220 * server.c (write_qxfer_response): Change type of data to
3221 gdb_byte *.
3222
3223 2015-10-29 Pedro Alves <palves@redhat.com>
3224
3225 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3226
3227 2015-10-29 Pedro Alves <palves@redhat.com>
3228
3229 * tracepoint.c (clear_installed_tracepoints): Add casts.
3230
3231 2015-10-29 Pedro Alves <palves@redhat.com>
3232
3233 * server.c (handle_v_cont, process_serial_event): Add enum
3234 gdb_signal casts to signal parsing code.
3235
3236 2015-10-29 Pedro Alves <palves@redhat.com>
3237
3238 * linux-low.h (NULL_REGSET): Define.
3239 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3240 * linux-arm-low.c (arm_regsets): Likewise.
3241 * linux-crisv32-low.c (cris_regsets): Likewise.
3242 * linux-m68k-low.c (m68k_regsets): Likewise.
3243 * linux-mips-low.c (mips_regsets): Likewise.
3244 * linux-nios2-low.c (nios2_regsets): Likewise.
3245 * linux-ppc-low.c (ppc_regsets): Likewise.
3246 * linux-s390-low.c (s390_regsets): Likewise.
3247 * linux-sh-low.c (sh_regsets): Likewise.
3248 * linux-sparc-low.c (sparc_regsets): Likewise.
3249 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3250 * linux-tile-low.c (tile_regsets): Likewise.
3251 * linux-x86-low.c (x86_regsets): Likewise.
3252 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3253
3254 2015-10-29 Pedro Alves <palves@redhat.com>
3255
3256 * linux-low.h (NULL_REGSET): Define.
3257 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3258 * linux-arm-low.c (arm_regsets): Likewise.
3259 * linux-crisv32-low.c (cris_regsets): Likewise.
3260 * linux-m68k-low.c (m68k_regsets): Likewise.
3261 * linux-mips-low.c (mips_regsets): Likewise.
3262 * linux-nios2-low.c (nios2_regsets): Likewise.
3263 * linux-ppc-low.c (ppc_regsets): Likewise.
3264 * linux-s390-low.c (s390_regsets): Likewise.
3265 * linux-sh-low.c (sh_regsets): Likewise.
3266 * linux-sparc-low.c (sparc_regsets): Likewise.
3267 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3268 * linux-tile-low.c (tile_regsets): Likewise.
3269 * linux-x86-low.c (x86_regsets): Likewise.
3270 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3271
3272 2015-10-26 Doug Evans <dje@google.com>
3273
3274 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3275
3276 2015-10-26 Doug Evans <dje@google.com>
3277
3278 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3279
3280 2015-10-26 Doug Evans <dje@google.com>
3281
3282 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3283 for debug_printf.
3284 (attach_thread, find_new_threads_callback): Ditto.
3285
3286 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3287
3288 * mem-break.h (set_breakpoint_data): Remove.
3289
3290 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3291
3292 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3293 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3294 (initialize_low): Remove set_breakpoint_data call.
3295 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3296 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3297 (initialize_low): Remove set_breakpoint_data call.
3298 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3299 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3300 (initialize_low): Remove set_breakpoint_data call.
3301
3302 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3303
3304 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3305 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3306 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3307 * target.h (target_breakpoint_kind_from_pc): New macro.
3308
3309 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3310
3311 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3312 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3313 the default breakpoint kind.
3314
3315 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3316
3317 * linux-arm-low.c (arm_supports_z_point_type): Add software
3318 breakpoint support.
3319
3320 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3321
3322 * linux-arm-low.c: Refactor breakpoint definitions.
3323 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3324 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3325
3326 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3327
3328 * Makefile.in: Add arm.c/o.
3329 * configure.srv: Likewise.
3330 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3331 (arm_breakpoint_kind_from_pc): New function.
3332 (arm_sw_breakpoint_from_kind): Return proper kind.
3333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3334
3335 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3336
3337 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3338 removal.
3339 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3340 (struct raw_breakpoint) <size>: Remove.
3341 (struct raw_breakpoint) <kind>: Add.
3342 (bp_size): New function.
3343 (bp_opcode): Likewise.
3344 (find_raw_breakpoint_at): Adjust for kind.
3345 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3346 (remove_memory_breakpoint): Adjust for kind call bp_size.
3347 (set_raw_breakpoint_at): Adjust for kind.
3348 (set_breakpoint): Likewise.
3349 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3350 (delete_raw_breakpoint): Adjust for kind.
3351 (delete_breakpoint): Likewise.
3352 (find_gdb_breakpoint): Likewise.
3353 (set_gdb_breakpoint_1): Likewise.
3354 (set_gdb_breakpoint): Likewise.
3355 (delete_gdb_breakpoint_1): Likewise.
3356 (delete_gdb_breakpoint): Likewise.
3357 (uninsert_raw_breakpoint): Likewise.
3358 (reinsert_raw_breakpoint): Likewise.
3359 (set_breakpoint_data): Remove.
3360 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3361 (check_mem_read): Adjust for kind call bp_size.
3362 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3363 (clone_one_breakpoint): Adjust for kind.
3364 * mem-break.h (set_gdb_breakpoint): Likewise.
3365 (delete_gdb_breakpoint): Likewise.
3366 * server.c (process_serial_event): Likewise.
3367
3368 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3369
3370 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3371 (struct linux_target_ops) <breakpoint>: Remove.
3372 (struct linux_target_ops) <breakpoint_len>: Remove.
3373 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3374 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3375 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3376 (arm_sw_breakpoint_from_kind): New function.
3377 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3378 (struct linux_target_ops) <breakpoint>: Remove.
3379 (struct linux_target_ops) <breakpoint_len>: Remove.
3380 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3381 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3382 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3383 (struct linux_target_ops) <breakpoint>: Remove.
3384 (struct linux_target_ops) <breakpoint_len>: Remove.
3385 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3386 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3387 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3388 (struct linux_target_ops) <breakpoint>: Remove.
3389 (struct linux_target_ops) <breakpoint_len>: Remove.
3390 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3391 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3392 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3393 and sw_breakpoint_from_kind to increment the pc.
3394 (linux_breakpoint_kind_from_pc): New function.
3395 (linux_sw_breakpoint_from_kind): New function.
3396 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3397 (initialize_low): Call breakpoint_kind_from_pc and
3398 sw_breakpoint_from_kind to replace breakpoint_data/len.
3399 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3400 New field.
3401 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3402 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3403 (struct linux_target_ops) <breakpoint>: Remove.
3404 (struct linux_target_ops) <breakpoint_len>: Remove.
3405 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3406 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3407 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3408 (struct linux_target_ops) <breakpoint>: Remove.
3409 (struct linux_target_ops) <breakpoint_len>: Remove.
3410 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3411 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3412 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3413 (struct linux_target_ops) <breakpoint>: Remove.
3414 (struct linux_target_ops) <breakpoint_len>: Remove.
3415 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3416 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3417 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3418 (struct linux_target_ops) <breakpoint>: Remove.
3419 (struct linux_target_ops) <breakpoint_len>: Remove.
3420 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3421 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3422 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3423 (struct linux_target_ops) <breakpoint>: Remove.
3424 (struct linux_target_ops) <breakpoint_len>: Remove.
3425 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3426 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3427 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3428 (struct linux_target_ops) <breakpoint>: Remove.
3429 (struct linux_target_ops) <breakpoint_len>: Remove.
3430 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3431 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3432 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3433 (struct linux_target_ops) <breakpoint>: Remove.
3434 (struct linux_target_ops) <breakpoint_len>: Remove.
3435 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3436 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3437 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3438 (struct linux_target_ops) <breakpoint>: Remove.
3439 (struct linux_target_ops) <breakpoint_len>: Remove.
3440 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3441 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3442 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3443 (struct linux_target_ops) <breakpoint>: Remove.
3444 (struct linux_target_ops) <breakpoint_len>: Remove.
3445 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3446 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3447 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3448 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3454 (struct linux_target_ops) <breakpoint>: Remove.
3455 (struct linux_target_ops) <breakpoint_len>: Remove.
3456 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3457 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3458
3459 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3460
3461 * linux-cris-low.c (cris_get_pc): Remove void arg.
3462
3463 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3464
3465 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3466 variable name.
3467
3468 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3469
3470 * inferiors.c (thread_pid_matches_callback): New function.
3471 (find_thread_process): New function.
3472 (remove_thread): Reset current_thread.
3473 (remove_process): Assert threads have been removed first.
3474
3475 2015-10-15 Yao Qi <yao.qi@linaro.org>
3476
3477 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3478 if it is 3.
3479 (aarch64_remove_point): Likewise.
3480 * regcache.c (regcache_register_size): New function.
3481
3482 2015-10-12 Yao Qi <yao.qi@linaro.org>
3483
3484 * linux-aarch64-low.c: Update all callers as emit_load_store
3485 is renamed to aarch64_emit_load_store.
3486
3487 2015-10-12 Yao Qi <yao.qi@linaro.org>
3488
3489 * linux-aarch64-low.c: Update all callers of function renaming
3490 from emit_insn to aarch64_emit_insn.
3491
3492 2015-10-12 Yao Qi <yao.qi@linaro.org>
3493
3494 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3495 arch/aarch64-insn.h.
3496 (struct aarch64_memory_operand): Likewise.
3497 (ENCODE): Likewise.
3498 (emit_insn): Move to arch/aarch64-insn.c.
3499 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3500 (emit_load_store): Move to arch/aarch64-insn.c.
3501 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3502 (can_encode_int32): Remove.
3503
3504 2015-10-12 Yao Qi <yao.qi@linaro.org>
3505
3506 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3507 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3508 (aarch64_relocate_instruction): Likewise.
3509 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3510 (struct aarch64_insn_visitor): Likewise.
3511
3512 2015-10-12 Yao Qi <yao.qi@linaro.org>
3513
3514 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3515 (struct aarch64_insn_visitor): New.
3516 (struct aarch64_insn_relocation_data): New.
3517 (aarch64_ftrace_insn_reloc_b): New function.
3518 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3519 (aarch64_ftrace_insn_reloc_cb): Likewise.
3520 (aarch64_ftrace_insn_reloc_tb): Likewise.
3521 (aarch64_ftrace_insn_reloc_adr): Likewise.
3522 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3523 (aarch64_ftrace_insn_reloc_others): Likewise.
3524 (visitor): New.
3525 (aarch64_relocate_instruction): Use visitor.
3526
3527 2015-10-12 Yao Qi <yao.qi@linaro.org>
3528
3529 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3530 int. Add argument buf.
3531 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3532 aarch64_relocate_instruction.
3533
3534 2015-10-12 Yao Qi <yao.qi@linaro.org>
3535
3536 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3537 argument insn. Remove local variable insn. Don't call
3538 target_read_uint32.
3539 (aarch64_install_fast_tracepoint_jump_pad): Call
3540 target_read_uint32.
3541
3542 2015-09-30 Yao Qi <yao.qi@linaro.org>
3543
3544 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3545 (emit_load_store_pair): Likewise.
3546
3547 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3548
3549 * dll.c (match_dll): Add cast(s).
3550 (unloaded_dll): Likewise.
3551 * linux-low.c (second_thread_of_pid_p): Likewise.
3552 (delete_lwp_callback): Likewise.
3553 (count_events_callback): Likewise.
3554 (select_event_lwp_callback): Likewise.
3555 (linux_set_resume_request): Likewise.
3556 * server.c (accumulate_file_name_length): Likewise.
3557 (emit_dll_description): Likewise.
3558 (handle_qxfer_threads_worker): Likewise.
3559 (visit_actioned_threads): Likewise.
3560 * thread-db.c (any_thread_of): Likewise.
3561 * tracepoint.c (same_process_p): Likewise.
3562 (match_blocktype): Likewise.
3563 (build_traceframe_info_xml): Likewise.
3564
3565 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3566
3567 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3568 assignment.
3569 (gdb_unparse_agent_expr): Likewise.
3570 * hostio.c (require_data): Likewise.
3571 (handle_pread): Likewise.
3572 * linux-low.c (disable_regset): Likewise.
3573 (fetch_register): Likewise.
3574 (store_register): Likewise.
3575 (get_dynamic): Likewise.
3576 (linux_qxfer_libraries_svr4): Likewise.
3577 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3578 (set_fast_tracepoint_jump): Likewise.
3579 (uninsert_fast_tracepoint_jumps_at): Likewise.
3580 (reinsert_fast_tracepoint_jumps_at): Likewise.
3581 (validate_inserted_breakpoint): Likewise.
3582 (clone_agent_expr): Likewise.
3583 * regcache.c (init_register_cache): Likewise.
3584 * remote-utils.c (putpkt_binary_1): Likewise.
3585 (decode_M_packet): Likewise.
3586 (decode_X_packet): Likewise.
3587 (look_up_one_symbol): Likewise.
3588 (relocate_instruction): Likewise.
3589 (monitor_output): Likewise.
3590 * server.c (handle_search_memory): Likewise.
3591 (handle_qxfer_exec_file): Likewise.
3592 (handle_qxfer_libraries): Likewise.
3593 (handle_qxfer): Likewise.
3594 (handle_query): Likewise.
3595 (handle_v_cont): Likewise.
3596 (handle_v_run): Likewise.
3597 (captured_main): Likewise.
3598 * target.c (write_inferior_memory): Likewise.
3599 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3600 * tracepoint.c (init_trace_buffer): Likewise.
3601 (add_tracepoint_action): Likewise.
3602 (add_traceframe): Likewise.
3603 (add_traceframe_block): Likewise.
3604 (cmd_qtdpsrc): Likewise.
3605 (cmd_qtdv): Likewise.
3606 (cmd_qtstatus): Likewise.
3607 (response_source): Likewise.
3608 (response_tsv): Likewise.
3609 (cmd_qtnotes): Likewise.
3610 (gdb_collect): Likewise.
3611 (initialize_tracepoint): Likewise.
3612
3613 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3614
3615 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3616 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3617 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3618 <NOP>: New.
3619 (enum aarch64_condition_codes): New enum.
3620 (w0): New static global.
3621 (fp): Likewise.
3622 (lr): Likewise.
3623 (struct aarch64_memory_operand) <type>: New
3624 MEMORY_OPERAND_POSTINDEX type.
3625 (postindex_memory_operand): New helper function.
3626 (emit_ret): New function.
3627 (emit_load_store_pair): New function, factored out of emit_stp
3628 with support for MEMORY_OPERAND_POSTINDEX.
3629 (emit_stp): Rewrite using emit_load_store_pair.
3630 (emit_ldp): New function.
3631 (emit_load_store): Likewise.
3632 (emit_ldr): Mention post-index instruction in comment.
3633 (emit_ldrh): New function.
3634 (emit_ldrb): New function.
3635 (emit_ldrsw): Mention post-index instruction in comment.
3636 (emit_str): Likewise.
3637 (emit_subs): New function.
3638 (emit_cmp): Likewise.
3639 (emit_and): Likewise.
3640 (emit_orr): Likewise.
3641 (emit_orn): Likewise.
3642 (emit_eor): Likewise.
3643 (emit_mvn): Likewise.
3644 (emit_lslv): Likewise.
3645 (emit_lsrv): Likewise.
3646 (emit_asrv): Likewise.
3647 (emit_mul): Likewise.
3648 (emit_sbfm): Likewise.
3649 (emit_sbfx): Likewise.
3650 (emit_ubfm): Likewise.
3651 (emit_ubfx): Likewise.
3652 (emit_csinc): Likewise.
3653 (emit_cset): Likewise.
3654 (emit_nop): Likewise.
3655 (emit_ops_insns): New helper function.
3656 (emit_pop): Likewise.
3657 (emit_push): Likewise.
3658 (aarch64_emit_prologue): New function.
3659 (aarch64_emit_epilogue): Likewise.
3660 (aarch64_emit_add): Likewise.
3661 (aarch64_emit_sub): Likewise.
3662 (aarch64_emit_mul): Likewise.
3663 (aarch64_emit_lsh): Likewise.
3664 (aarch64_emit_rsh_signed): Likewise.
3665 (aarch64_emit_rsh_unsigned): Likewise.
3666 (aarch64_emit_ext): Likewise.
3667 (aarch64_emit_log_not): Likewise.
3668 (aarch64_emit_bit_and): Likewise.
3669 (aarch64_emit_bit_or): Likewise.
3670 (aarch64_emit_bit_xor): Likewise.
3671 (aarch64_emit_bit_not): Likewise.
3672 (aarch64_emit_equal): Likewise.
3673 (aarch64_emit_less_signed): Likewise.
3674 (aarch64_emit_less_unsigned): Likewise.
3675 (aarch64_emit_ref): Likewise.
3676 (aarch64_emit_if_goto): Likewise.
3677 (aarch64_emit_goto): Likewise.
3678 (aarch64_write_goto_address): Likewise.
3679 (aarch64_emit_const): Likewise.
3680 (aarch64_emit_call): Likewise.
3681 (aarch64_emit_reg): Likewise.
3682 (aarch64_emit_pop): Likewise.
3683 (aarch64_emit_stack_flush): Likewise.
3684 (aarch64_emit_zero_ext): Likewise.
3685 (aarch64_emit_swap): Likewise.
3686 (aarch64_emit_stack_adjust): Likewise.
3687 (aarch64_emit_int_call_1): Likewise.
3688 (aarch64_emit_void_call_2): Likewise.
3689 (aarch64_emit_eq_goto): Likewise.
3690 (aarch64_emit_ne_goto): Likewise.
3691 (aarch64_emit_lt_goto): Likewise.
3692 (aarch64_emit_le_goto): Likewise.
3693 (aarch64_emit_gt_goto): Likewise.
3694 (aarch64_emit_ge_got): Likewise.
3695 (aarch64_emit_ops_impl): New static global variable.
3696 (aarch64_emit_ops): New target function, return
3697 &aarch64_emit_ops_impl.
3698 (struct linux_target_ops): Install it.
3699
3700 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3701
3702 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3703 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3704 aarch64-ipa.o.
3705 * linux-aarch64-ipa.c: New file.
3706 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3707 and endian.h.
3708 (aarch64_get_thread_area): New target method.
3709 (extract_signed_bitfield): New helper function.
3710 (aarch64_decode_ldr_literal): New function.
3711 (enum aarch64_opcodes): New enum.
3712 (struct aarch64_register): New struct.
3713 (struct aarch64_operand): New struct.
3714 (x0): New static global.
3715 (x1): Likewise.
3716 (x2): Likewise.
3717 (x3): Likewise.
3718 (x4): Likewise.
3719 (w2): Likewise.
3720 (ip0): Likewise.
3721 (sp): Likewise.
3722 (xzr): Likewise.
3723 (aarch64_register): New helper function.
3724 (register_operand): Likewise.
3725 (immediate_operand): Likewise.
3726 (struct aarch64_memory_operand): New struct.
3727 (offset_memory_operand): New helper function.
3728 (preindex_memory_operand): Likewise.
3729 (enum aarch64_system_control_registers): New enum.
3730 (ENCODE): New macro.
3731 (emit_insn): New helper function.
3732 (emit_b): New function.
3733 (emit_bcond): Likewise.
3734 (emit_cb): Likewise.
3735 (emit_tb): Likewise.
3736 (emit_blr): Likewise.
3737 (emit_stp): Likewise.
3738 (emit_ldp_q_offset): Likewise.
3739 (emit_stp_q_offset): Likewise.
3740 (emit_load_store): Likewise.
3741 (emit_ldr): Likewise.
3742 (emit_ldrsw): Likewise.
3743 (emit_str): Likewise.
3744 (emit_ldaxr): Likewise.
3745 (emit_stxr): Likewise.
3746 (emit_stlr): Likewise.
3747 (emit_data_processing_reg): Likewise.
3748 (emit_data_processing): Likewise.
3749 (emit_add): Likewise.
3750 (emit_sub): Likewise.
3751 (emit_mov): Likewise.
3752 (emit_movk): Likewise.
3753 (emit_mov_addr): Likewise.
3754 (emit_mrs): Likewise.
3755 (emit_msr): Likewise.
3756 (emit_sevl): Likewise.
3757 (emit_wfe): Likewise.
3758 (append_insns): Likewise.
3759 (can_encode_int32_in): New helper function.
3760 (aarch64_relocate_instruction): New function.
3761 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3762 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3763 (struct linux_target_ops): Install aarch64_get_thread_area,
3764 aarch64_install_fast_tracepoint_jump_pad and
3765 aarch64_get_min_fast_tracepoint_insn_len.
3766
3767 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3768
3769 * Makefile.in (aarch64-insn.o): New rule.
3770 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3771
3772 2015-09-21 Yao Qi <yao.qi@linaro.org>
3773
3774 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3775
3776 2015-09-21 Yao Qi <yao.qi@linaro.org>
3777
3778 * tracepoint.c (max_jump_pad_size): Remove.
3779
3780 2015-09-18 Yao Qi <yao.qi@linaro.org>
3781
3782 * linux-aarch64-low.c: Don't include sys/uio.h.
3783 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3784
3785 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3786
3787 * tracepoint.c (eval_result_type): Change prototype.
3788 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3789
3790 2015-09-15 Pedro Alves <palves@redhat.com>
3791
3792 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3793 Check whether to report exec events instead of checking whether
3794 multiprocess is enabled.
3795
3796 2015-09-15 Pedro Alves <palves@redhat.com>
3797
3798 PR remote/18965
3799 * remote-utils.c (prepare_resume_reply): Merge
3800 TARGET_WAITKIND_VFORK_DONE switch case with the
3801 TARGET_WAITKIND_FORKED case.
3802
3803 2015-09-15 Yao Qi <yao.qi@linaro.org>
3804
3805 * server.c (handle_query): Check string comparison using
3806 "else if" instead of "if".
3807
3808 2015-09-15 Yao Qi <yao.qi@linaro.org>
3809
3810 * server.c (vCont_supported): New global variable.
3811 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3812 matches. Append ";vContSupported+" to own_buf.
3813 (handle_v_requests): Append ";s;S" to own_buf if target supports
3814 hardware single step or vCont_supported is false.
3815 (capture_main): Set vCont_supported to zero.
3816
3817 2015-09-15 Yao Qi <yao.qi@linaro.org>
3818
3819 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3820 it to ...
3821 (linux_supports_hardware_single_step): ... New function.
3822 (linux_target_ops): Update.
3823 * lynx-low.c (lynx_target_ops): Set field
3824 supports_hardware_single_step to target_can_do_hardware_single_step.
3825 * nto-low.c (nto_target_ops): Likewise.
3826 * spu-low.c (spu_target_ops): Likewise.
3827 * win32-low.c (win32_target_ops): Likewise.
3828 * target.c (target_can_do_hardware_single_step): New function.
3829 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3830 Remove. <supports_hardware_single_step>: New field.
3831 (target_supports_conditional_breakpoints): Remove.
3832 (target_supports_hardware_single_step): New macro.
3833 (target_can_do_hardware_single_step): Declare.
3834 * server.c (handle_query): Use target_supports_hardware_single_step
3835 instead of target_supports_conditional_breakpoints.
3836
3837 2015-09-15 Yao Qi <yao.qi@linaro.org>
3838
3839 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3840 function.
3841 (struct linux_target_ops the_low_target): Install
3842 aarch64_linux_siginfo_fixup.
3843
3844 2015-09-11 Don Breazeal <donb@codesourcery.com>
3845 Luis Machado <lgustavo@codesourcery.com>
3846
3847 * linux-low.c (linux_mourn): Static declaration.
3848 (linux_arch_setup): Move in front of
3849 handle_extended_wait.
3850 (linux_arch_setup_thread): New function.
3851 (handle_extended_wait): Handle exec events. Call
3852 linux_arch_setup_thread. Make event_lwp argument a
3853 pointer-to-a-pointer.
3854 (check_zombie_leaders): Do not check stopped threads.
3855 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3856 (linux_low_filter_event): Add lwp and thread for exec'ing
3857 non-leader thread if leader thread has been deleted.
3858 Refactor code into linux_arch_setup_thread and call it.
3859 Pass child lwp pointer by reference to handle_extended_wait.
3860 (linux_wait_for_event_filtered): Update comment.
3861 (linux_wait_1): Prevent clobbering exec event status.
3862 (linux_supports_exec_events): New function.
3863 (linux_target_ops) <supports_exec_events>: Initialize new member.
3864 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3865 new member.
3866 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3867 * server.c (report_exec_events): New global variable.
3868 (handle_query): Handle qSupported query for exec-events feature.
3869 (captured_main): Initialize report_exec_events.
3870 * server.h (report_exec_events): Declare new global variable.
3871 * target.h (struct target_ops) <supports_exec_events>: New
3872 member.
3873 (target_supports_exec_events): New macro.
3874 * win32-low.c (win32_target_ops) <supports_exec_events>:
3875 Initialize new member.
3876
3877 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3878
3879 * linux-low.c (linux_low_enable_btrace): Remove.
3880 (linux_target_ops): Replace linux_low_enable_btrace with
3881 linux_enable_btrace.
3882
3883 2015-09-03 Yao Qi <yao.qi@linaro.org>
3884
3885 * linux-aarch64-low.c (aarch64_insert_point): Call
3886 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3887 returns true.
3888
3889 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3890
3891 * linux-low.c (check_stopped_by_breakpoint): Use
3892 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3893
3894 2015-08-27 Pedro Alves <palves@redhat.com>
3895
3896 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3897
3898 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3899
3900 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3901 the XNEW-family equivalent.
3902 (compile_bytecodes): Likewise.
3903 * dll.c (loaded_dll): Likewise.
3904 * event-loop.c (append_callback_event): Likewise.
3905 (create_file_handler): Likewise.
3906 (create_file_event): Likewise.
3907 * hostio.c (handle_open): Likewise.
3908 * inferiors.c (add_thread): Likewise.
3909 (add_process): Likewise.
3910 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3911 * linux-arm-low.c (arm_new_process): Likewise.
3912 (arm_new_thread): Likewise.
3913 * linux-low.c (add_to_pid_list): Likewise.
3914 (linux_add_process): Likewise.
3915 (handle_extended_wait): Likewise.
3916 (add_lwp): Likewise.
3917 (enqueue_one_deferred_signal): Likewise.
3918 (enqueue_pending_signal): Likewise.
3919 (linux_resume_one_lwp_throw): Likewise.
3920 (linux_resume_one_thread): Likewise.
3921 (linux_read_memory): Likewise.
3922 (linux_write_memory): Likewise.
3923 * linux-mips-low.c (mips_linux_new_process): Likewise.
3924 (mips_linux_new_thread): Likewise.
3925 (mips_add_watchpoint): Likewise.
3926 * linux-x86-low.c (initialize_low_arch): Likewise.
3927 * lynx-low.c (lynx_add_process): Likewise.
3928 * mem-break.c (set_raw_breakpoint_at): Likewise.
3929 (set_breakpoint): Likewise.
3930 (add_condition_to_breakpoint): Likewise.
3931 (add_commands_to_breakpoint): Likewise.
3932 (clone_agent_expr): Likewise.
3933 (clone_one_breakpoint): Likewise.
3934 * regcache.c (new_register_cache): Likewise.
3935 * remote-utils.c (look_up_one_symbol): Likewise.
3936 * server.c (queue_stop_reply): Likewise.
3937 (start_inferior): Likewise.
3938 (queue_stop_reply_callback): Likewise.
3939 (handle_target_event): Likewise.
3940 * spu-low.c (fetch_ppc_memory): Likewise.
3941 (store_ppc_memory): Likewise.
3942 * target.c (set_target_ops): Likewise.
3943 * thread-db.c (thread_db_load_search): Likewise.
3944 (try_thread_db_load_1): Likewise.
3945 * tracepoint.c (add_tracepoint): Likewise.
3946 (add_tracepoint_action): Likewise.
3947 (create_trace_state_variable): Likewise.
3948 (cmd_qtdpsrc): Likewise.
3949 (cmd_qtro): Likewise.
3950 (add_while_stepping_state): Likewise.
3951 * win32-low.c (child_add_thread): Likewise.
3952 (get_image_name): Likewise.
3953
3954 2015-08-25 Yao Qi <yao.qi@linaro.org>
3955
3956 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3957
3958 2015-08-25 Yao Qi <yao.qi@linaro.org>
3959
3960 * Makefile.in (aarch64-linux.o): New rule.
3961 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3962 srv_tgtobj.
3963 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3964 (aarch64_init_debug_reg_state): Make it extern.
3965 (aarch64_linux_prepare_to_resume): Remove.
3966
3967 2015-08-25 Yao Qi <yao.qi@linaro.org>
3968
3969 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3970 lwp_arch_private_info and ptid_of_lwp.
3971
3972 2015-08-25 Yao Qi <yao.qi@linaro.org>
3973
3974 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3975 Find proc_info by find_process_pid. All callers updated.
3976
3977 2015-08-25 Yao Qi <yao.qi@linaro.org>
3978
3979 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3980 Remove.
3981 (debug_reg_change_callback): Remove.
3982 (aarch64_notify_debug_reg_change): Remove.
3983
3984 2015-08-25 Yao Qi <yao.qi@linaro.org>
3985
3986 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3987 Call current_lwp_ptid.
3988
3989 2015-08-25 Yao Qi <yao.qi@linaro.org>
3990
3991 * linux-aarch64-low.c (debug_reg_change_callback): Use
3992 debug_printf.
3993
3994 2015-08-25 Yao Qi <yao.qi@linaro.org>
3995
3996 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3997
3998 2015-08-25 Yao Qi <yao.qi@linaro.org>
3999
4000 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4001
4002 2015-08-25 Yao Qi <yao.qi@linaro.org>
4003
4004 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4005 the code.
4006
4007 2015-08-25 Yao Qi <yao.qi@linaro.org>
4008
4009 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4010 Remove.
4011 (debug_reg_change_callback): Remove argument entry and add argument
4012 lwp. Remove local variable thread. Don't print thread id in the
4013 debugging output. Don't check whether pid of thread equals to pid.
4014 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4015 iterate_over_lwps instead find_inferior.
4016
4017 2015-08-24 Pedro Alves <palves@redhat.com>
4018
4019 * inferiors.c (get_first_process): New function.
4020 * inferiors.h (get_first_process): New declaration.
4021 * remote-utils.c (read_ptid): Default to the first process in the
4022 list, instead of to the current thread's process.
4023
4024 2015-08-24 Pedro Alves <palves@redhat.com>
4025
4026 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4027 * event-loop.c: Likewise.
4028 * remote-utils.c: Likewise.
4029 * tracepoint.c: Likewise.
4030
4031 2015-08-24 Pedro Alves <palves@redhat.com>
4032
4033 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4034 ptid_get_lwp.
4035
4036 2015-08-21 Pedro Alves <palves@redhat.com>
4037
4038 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4039 instead of literal 1.
4040
4041 2015-08-21 Pedro Alves <palves@redhat.com>
4042
4043 * tdesc.c (default_description): Explicitly zero-initialize.
4044
4045 2015-08-21 Pedro Alves <palves@redhat.com>
4046
4047 PR gdb/18749
4048 * inferiors.c (remove_thread): Discard any pending stop reply for
4049 this thread.
4050 * server.c (remove_all_on_match_pid): Rename to ...
4051 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4052 instead of a pid.
4053 (discard_queued_stop_replies): Change parameter to a ptid. Now
4054 extern.
4055 (handle_v_kill, kill_inferior_callback, captured_main)
4056 (process_serial_event): Adjust.
4057 * server.h (discard_queued_stop_replies): Declare.
4058
4059 2015-08-21 Pedro Alves <palves@redhat.com>
4060
4061 * linux-low.c (wait_for_sigstop): Always switch to no thread
4062 selected if the previously current thread dies.
4063 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4064 process instead of the current thread's.
4065 * remote-utils.c (input_interrupt): Don't check if there's no
4066 current thread.
4067 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4068 current thread to the general thread fails, error out.
4069 (handle_qxfer_auxv, handle_qxfer_libraries)
4070 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4071 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4072 (handle_query): Check if there's a thread selected instead of
4073 checking whether there's any thread in the thread list.
4074 (handle_qxfer_threads, handle_qxfer_btrace)
4075 (handle_qxfer_btrace_conf): Don't error out early if there's no
4076 thread in the thread list.
4077 (handle_v_cont, myresume): Don't set the current thread to the
4078 continue thread.
4079 (process_serial_event) <Hg handling>: Also set thread_id if the
4080 previous general thread is still alive.
4081 (process_serial_event) <g/G handling>: If setting the current
4082 thread to the general thread fails, error out.
4083 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4084 thread's lwp instead of the current thread's.
4085 * target.c (set_desired_thread): If the desired thread was not
4086 found, leave the current thread pointing to NULL. Return an int
4087 (boolean) indicating success.
4088 * target.h (set_desired_thread): Change return type to int.
4089
4090 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4091
4092 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4093 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4094 #includes.
4095 (ps_get_thread_area): New function.
4096
4097 2015-08-19 Gary Benson <gbenson@redhat.com>
4098
4099 * hostio.c (handle_pread): Do not attempt to read more data
4100 than hostio_reply_with_data can fit in a packet.
4101
4102 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4103
4104 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4105
4106 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4107
4108 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4109
4110 2015-08-06 Pedro Alves <palves@redhat.com>
4111
4112 * tracepoint.c (expr_eval_result): Now an int.
4113
4114 2015-08-06 Pedro Alves <palves@redhat.com>
4115
4116 * gdbthread.h (struct regcache): Forward declare.
4117 (struct thread_info) <regcache_data>: Now a struct regcache
4118 pointer.
4119 * inferiors.c (inferior_regcache_data)
4120 (set_inferior_regcache_data): Now work with struct regcache
4121 pointers.
4122 * inferiors.h (struct regcache): Forward declare.
4123 (inferior_regcache_data, set_inferior_regcache_data): Now work
4124 with struct regcache pointers.
4125 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4126 (free_register_cache_thread): Remove struct regcache pointer
4127 casts.
4128
4129 2015-08-06 Pedro Alves <palves@redhat.com>
4130
4131 * server.c (captured_main): On error, print the exception message
4132 to stderr, and if run_once is set, throw a quit.
4133
4134 2015-08-06 Pedro Alves <palves@redhat.com>
4135
4136 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4137 the current thread.
4138
4139 2015-08-06 Pedro Alves <palves@redhat.com>
4140
4141 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4142 reading beyond the passed in buffer length.
4143
4144 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4145
4146 * tracepoint.c (symbol_list) <required>: Remove.
4147
4148 2015-08-06 Pedro Alves <palves@redhat.com>
4149
4150 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4151 count if stopping and suspending threads.
4152 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4153 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4154 (linux_detach): Complete an ongoing step-over.
4155 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4156 throughout.
4157 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4158 (linux_wait_1): If passing a signal to the inferior after
4159 finishing a step-over, unsuspend and re-resume all lwps. If we
4160 see a single-step event but the thread should be continuing, don't
4161 pass the trap to gdb.
4162 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4163 internal_error instead of gdb_assert.
4164 (enqueue_pending_signal): New function.
4165 (check_ptrace_stopped_lwp_gone): Add debug output.
4166 (start_step_over): Use internal_error instead of gdb_assert.
4167 (complete_ongoing_step_over): New function.
4168 (linux_resume_one_thread): Don't resume a suspended thread.
4169 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4170 it stepping.
4171
4172 2015-08-06 Pedro Alves <palves@redhat.com>
4173
4174 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4175 (linux_thread_alive): Use lwp_is_marked_dead.
4176 (extended_event_reported): Delete.
4177 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4178 instead of extended_event_reported.
4179 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4180 as well.
4181 (lwp_is_marked_dead): New function.
4182 (lwp_running): Use lwp_is_marked_dead.
4183 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4184 comment.
4185
4186 2015-08-06 Pedro Alves <palves@redhat.com>
4187
4188 * linux-low.c (linux_wait_1): Move fork event output out of the
4189 !report_to_gdb check. Pass event_child->waitstatus to
4190 target_waitstatus_to_string instead of ourstatus.
4191
4192 2015-08-04 Yao Qi <yao.qi@linaro.org>
4193
4194 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4195 if current_thread is 32 bit.
4196
4197 2015-08-04 Yao Qi <yao.qi@linaro.org>
4198
4199 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4200 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4201 * server.c (extended_protocol): Remove "static".
4202 * server.h (extended_protocol): Declare it.
4203
4204 2015-08-04 Yao Qi <yao.qi@linaro.org>
4205
4206 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4207 both aarch64 and aarch32.
4208 (aarch64_set_pc): Likewise.
4209
4210 2015-08-04 Yao Qi <yao.qi@linaro.org>
4211
4212 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4213 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4214 arm-with-neon.xml to srv_xmlfiles.
4215 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4216 (is_64bit_tdesc): New function.
4217 (aarch64_linux_read_description): New function.
4218 (aarch64_arch_setup): Call aarch64_linux_read_description.
4219 (regs_info): Rename to regs_info_aarch64.
4220 (aarch64_regs_info): Return right regs_info.
4221 (initialize_low_arch): Call initialize_low_arch_aarch32.
4222
4223 2015-08-04 Yao Qi <yao.qi@linaro.org>
4224
4225 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4226 * linux-aarch32-low.c: New file.
4227 * linux-aarch32-low.h: New file.
4228 * linux-arm-low.c (arm_fill_gregset): Move it to
4229 linux-aarch32-low.c.
4230 (arm_store_gregset): Likewise.
4231 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4232 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4233 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4234 (regs_info): Rename to regs_info_arm.
4235 (arm_regs_info): Return regs_info_aarch32 if
4236 have_ptrace_getregset is 1 and target description is
4237 arm_with_neon or arm_with_vfpv3.
4238 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4239 Call initialize_low_arch_aarch32 instead.
4240
4241 2015-08-04 Yao Qi <yao.qi@linaro.org>
4242
4243 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4244 * linux-low.c: ... here.
4245 * linux-low.h (have_ptrace_getregset): Declare it.
4246
4247 2015-08-04 Pedro Alves <palves@redhat.com>
4248
4249 * thread-db.c (struct thread_db): Use new typedefs.
4250 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4251 CHK calls.
4252 (disable_thread_event_reporting): Cast result of dlsym to
4253 destination function pointer type.
4254 (thread_db_mourn): Use td_ta_delete_ftype.
4255
4256 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4257
4258 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4259 arch variant.
4260 (CDX_BREAKPOINT): Define for R2.
4261 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4262 (the_low_target): Add comments.
4263
4264 2015-07-30 Yao Qi <yao.qi@linaro.org>
4265
4266 * linux-arm-low.c (arm_hwcap): Remove it.
4267 (arm_read_description): New local variable arm_hwcap. Don't
4268 set arm_hwcap to zero.
4269
4270 2015-07-30 Yao Qi <yao.qi@linaro.org>
4271
4272 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4273 Use regcache->tdesc instead.
4274 (arm_store_wmmxregset): Likewise.
4275 (arm_fill_vfpregset): Likewise.
4276 (arm_store_vfpregset): Likewise.
4277
4278 2015-07-30 Yao Qi <yao.qi@linaro.org>
4279
4280 * linux-arm-low.c: Include arch/arm.h.
4281 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4282 (arm_store_gregset): Likewise.
4283
4284 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4285
4286 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4287 ptrace's 4th parameter.
4288
4289 2015-07-27 Yao Qi <yao.qi@linaro.org>
4290
4291 * configure.srv (case aarch64*-*-linux*): Don't set
4292 srv_linux_usrregs.
4293
4294 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4295
4296 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4297 sys/ptrace.h.
4298 * linux-arm-low.c: Likewise.
4299 * linux-cris-low.c: Likewise.
4300 * linux-crisv32-low.c: Likewise.
4301 * linux-low.c: Likewise.
4302 * linux-m68k-low.c: Likewise.
4303 * linux-mips-low.c: Likewise.
4304 * linux-nios2-low.c: Likewise.
4305 * linux-s390-low.c: Likewise.
4306 * linux-sparc-low.c: Likewise.
4307 * linux-tic6x-low.c: Likewise.
4308 * linux-tile-low.c: Likewise.
4309 * linux-x86-low.c: Likewise.
4310
4311 2015-07-24 Pedro Alves <palves@redhat.com>
4312
4313 * config.in: Regenerate.
4314 * configure: Regenerate.
4315
4316 2015-07-24 Pedro Alves <palves@redhat.com>
4317
4318 * acinclude.m4: Include ../ptrace.m4.
4319 * configure.ac: Call GDB_AC_PTRACE.
4320 * config.in, configure: Regenerate.
4321
4322 2015-07-24 Yao Qi <yao.qi@linaro.org>
4323
4324 * linux-low.c (linux_create_inferior): Remove setting to
4325 proc->priv->new_inferior.
4326 (linux_attach): Likewise.
4327 (linux_low_filter_event): Likewise.
4328 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4329
4330 2015-07-24 Yao Qi <yao.qi@linaro.org>
4331
4332 * linux-low.c (linux_arch_setup): New function.
4333 (linux_low_filter_event): If proc->tdesc is NULL and
4334 proc->attached is true, call the_low_target.arch_setup.
4335 Otherwise, keep status pending, and return.
4336 (linux_resume_one_lwp_throw): Don't call get_pc if
4337 thread->while_stepping isn't NULL. Don't call
4338 get_thread_regcache if proc->tdesc is NULL.
4339 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4340 (linux_target_ops): Install arch_setup.
4341 * server.c (start_inferior): Call the_target->arch_setup.
4342 * target.h (struct target_ops) <arch_setup>: New field.
4343 (target_arch_setup): New marco.
4344 * lynx-low.c (lynx_target_ops): Update.
4345 * nto-low.c (nto_target_ops): Update.
4346 * spu-low.c (spu_target_ops): Update.
4347 * win32-low.c (win32_target_ops): Update.
4348
4349 2015-07-24 Yao Qi <yao.qi@linaro.org>
4350
4351 * linux-low.c (linux_add_process): Don't set
4352 proc->priv->new_inferior.
4353 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4354 (linux_attach): Likewise.
4355
4356 2015-07-24 Yao Qi <yao.qi@linaro.org>
4357
4358 * server.c (start_inferior): Code refactor.
4359
4360 2015-07-24 Yao Qi <yao.qi@linaro.org>
4361
4362 * server.c (process_serial_event): Set general_thread.
4363
4364 2015-07-21 Yao Qi <yao.qi@linaro.org>
4365
4366 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4367 aarch64_linux_get_debug_reg_capacity.
4368
4369 2015-07-17 Yao Qi <yao.qi@linaro.org>
4370
4371 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4372 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4373 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4374 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4375 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4376 (AARCH64_HWP_ALIGNMENT): Likewise.
4377 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4378 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4379 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4380 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4381 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4382 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4383 (struct aarch64_debug_reg_state): Likewise.
4384 (struct arch_lwp_info): Likewise.
4385 (aarch64_align_watchpoint): Likewise.
4386 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4387 (aarch64_watchpoint_length): Likewise.
4388 (aarch64_point_encode_ctrl_reg): Likewise
4389 (aarch64_point_is_aligned): Likewise.
4390 (aarch64_align_watchpoint): Likewise.
4391 (aarch64_linux_set_debug_regs):
4392 (aarch64_dr_state_insert_one_point): Likewise.
4393 (aarch64_dr_state_remove_one_point): Likewise.
4394 (aarch64_handle_breakpoint): Likewise.
4395 (aarch64_handle_aligned_watchpoint): Likewise.
4396 (aarch64_handle_unaligned_watchpoint): Likewise.
4397 (aarch64_handle_watchpoint): Likewise.
4398
4399 2015-07-17 Yao Qi <yao.qi@linaro.org>
4400
4401 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4402 and don't aarch64_get_debug_reg_state. All callers update.
4403 (aarch64_handle_aligned_watchpoint): Likewise.
4404 (aarch64_handle_unaligned_watchpoint): Likewise.
4405 (aarch64_handle_watchpoint): Likewise.
4406 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4407 (aarch64_remove_point): Likewise.
4408
4409 2015-07-17 Yao Qi <yao.qi@linaro.org>
4410
4411 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4412 debug_printf.
4413 (aarch64_handle_unaligned_watchpoint): Likewise.
4414
4415 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4416
4417 Revert the previous 3 commits:
4418 Move gdb_regex* to common/
4419 Move linux_find_memory_regions_full & co.
4420 gdbserver build-id attribute generator
4421
4422 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4423 Jan Kratochvil <jan.kratochvil@redhat.com>
4424
4425 gdbserver build-id attribute generator.
4426 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4427 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4428 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4429 (find_phdr): New.
4430 (get_dynamic): Use find_pdhr to traverse program headers.
4431 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4432 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4433 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4434 (get_hex_build_id): New.
4435 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4436 to reply XML document.
4437
4438 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4439 Jan Kratochvil <jan.kratochvil@redhat.com>
4440
4441 * target.c: Include target/target-utils.h and fcntl.h.
4442 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4443 (target_fileio_read_stralloc): New functions.
4444
4445 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4446
4447 * Makefile.in (OBS): Add gdb_regex.o.
4448 (gdb_regex.o): New.
4449 * config.in: Rebuilt.
4450 * configure: Rebuilt.
4451
4452 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4453 Jan Kratochvil <jan.kratochvil@redhat.com>
4454
4455 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4456 * Makefile.in (OBS): Add target-utils.o.
4457 (linux-maps.o, target-utils.o): New.
4458 * configure.srv (srv_linux_obj): Add linux-maps.o.
4459
4460 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4461
4462 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4463 function, return 1.
4464 (the_low_target): Install it.
4465
4466 2015-07-14 Pedro Alves <palves@redhat.com>
4467
4468 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4469 Instead, ignore ECHILD, and throw an error for other errnos.
4470
4471 2015-07-10 Pedro Alves <palves@redhat.com>
4472
4473 * event-loop.c (struct callback_event) <data>: Change type to
4474 gdb_client_data instance instead of gdb_client_data pointer.
4475 (append_callback_event): Adjust.
4476
4477 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4478
4479 * linux-aarch64-low.c: Add comments for each linux_target_ops
4480 method. Remove comments already covered in target_ops and
4481 linux_target_ops definitions.
4482 (the_low_target): Add comments for each unimplemented method.
4483
4484 2015-07-09 Yao Qi <yao.qi@linaro.org>
4485
4486 * linux-aarch64-low.c (aarch64_regmap): Remove.
4487 (aarch64_usrregs_info): Remove.
4488 (regs_info): Set field usrregs to NULL.
4489
4490 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4491
4492 * linux-low.c: Include "rsp-low.h"
4493 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4494 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4495 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4496 (handle_btrace_enable_pt): New.
4497 (handle_btrace_general_set): Support "pt".
4498 (handle_btrace_conf_general_set): Support "pt:size".
4499
4500 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4501
4502 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4503 Z_PACKET_SW_BP.
4504
4505 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4506
4507 * linux-aarch64-low.c: Remove comment about endianness.
4508 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4509 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4510 memcmp.
4511
4512 2015-06-24 Gary Benson <gbenson@redhat.com>
4513
4514 * linux-i386-ipa.c (stdint.h): Do not include.
4515 * lynx-i386-low.c (stdint.h): Likewise.
4516 * lynx-ppc-low.c (stdint.h): Likewise.
4517 * mem-break.c (stdint.h): Likewise.
4518 * thread-db.c (stdint.h): Likewise.
4519 * tracepoint.c (stdint.h): Likewise.
4520 * win32-low.c (stdint.h): Likewise.
4521
4522 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4523
4524 * server.c (write_qxfer_response): Update call to
4525 remote_escape_output.
4526
4527 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4528 Jan Kratochvil <jan.kratochvil@redhat.com>
4529
4530 Merge multiple hex conversions.
4531 * gdbreplay.c (tohex): Rename to 'fromhex'.
4532 (logchar): Use fromhex.
4533
4534 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4535
4536 * server.c (handle_qxfer_libraries): Set `version' attribute for
4537 <library-list>.
4538
4539 2015-06-10 Gary Benson <gbenson@redhat.com>
4540
4541 * target.h (struct target_ops) <multifs_open>: New field.
4542 <multifs_unlink>: Likewise.
4543 <multifs_readlink>: Likewise.
4544 * linux-low.c (nat/linux-namespaces.h): New include.
4545 (linux_target_ops): Initialize the_target->multifs_open,
4546 the_target->multifs_unlink and the_target->multifs_readlink.
4547 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4548 * hostio.c (hostio_fs_pid): New static variable.
4549 (hostio_handle_new_gdb_connection): New function.
4550 (handle_setfs): Likewise.
4551 (handle_open): Use the_target->multifs_open as appropriate.
4552 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4553 (handle_readlink): Use the_target->multifs_readlink as
4554 appropriate.
4555 (handle_vFile): Handle vFile:setfs packets.
4556 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4557 after target_handle_new_gdb_connection.
4558
4559 2015-06-10 Gary Benson <gbenson@redhat.com>
4560
4561 * configure.ac (AC_CHECK_FUNCS): Add setns.
4562 * config.in: Regenerate.
4563 * configure: Likewise.
4564 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4565 (linux-namespaces.o): New rule.
4566 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4567
4568 2015-06-09 Gary Benson <gbenson@redhat.com>
4569
4570 * hostio.c (handle_open): Process mode argument with
4571 fileio_to_host_mode.
4572
4573 2015-06-01 Yao Qi <yao.qi@linaro.org>
4574
4575 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4576 * linux-x86-low.c: Likewise.
4577
4578 2015-05-28 Don Breazeal <donb@codesourcery.com>
4579
4580 * linux-low.c (handle_extended_wait): Initialize
4581 thread_info.last_resume_kind for new fork children.
4582
4583 2015-05-15 Pedro Alves <palves@redhat.com>
4584
4585 * target.h (target_handle_new_gdb_connection): Rewrite using if
4586 wrapped in do/while.
4587
4588 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4589
4590 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4591 * configure, config.in: Regenerate.
4592 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4593 Declare typedef.
4594
4595 2015-05-12 Don Breazeal <donb@codesourcery.com>
4596
4597 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4598 PTRACE_EVENT_VFORK_DONE.
4599 (linux_low_ptrace_options, extended_event_reported): Add vfork
4600 events.
4601 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4602 and "vforkdone" for RSP 'T' Stop Reply Packet.
4603 * server.h (report_vfork_events): Declare
4604 global variable.
4605
4606 2015-05-12 Don Breazeal <donb@codesourcery.com>
4607
4608 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4609 (the_low_target) <new_fork>: Initialize new member.
4610 * linux-arm-low.c (arm_new_fork): New function.
4611 (the_low_target) <new_fork>: Initialize new member.
4612 * linux-low.c (handle_extended_wait): Call new target function
4613 new_fork.
4614 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4615 * linux-mips-low.c (mips_add_watchpoint): New function
4616 extracted from mips_insert_point.
4617 (the_low_target) <new_fork>: Initialize new member.
4618 (mips_linux_new_fork): New function.
4619 (mips_insert_point): Call mips_add_watchpoint.
4620 * linux-x86-low.c (x86_linux_new_fork): New function.
4621 (the_low_target) <new_fork>: Initialize new member.
4622
4623 2015-05-12 Don Breazeal <donb@codesourcery.com>
4624
4625 * linux-low.c (handle_extended_wait): Implement return value,
4626 rename argument 'event_child' to 'event_lwp', handle
4627 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4628 (linux_low_ptrace_options): New function.
4629 (linux_low_filter_event): Call linux_low_ptrace_options,
4630 use different argument fo linux_enable_event_reporting,
4631 use return value from handle_extended_wait.
4632 (extended_event_reported): New function.
4633 (linux_wait_1): Call extended_event_reported and set
4634 status to report fork events.
4635 (linux_write_memory): Add pid to debug message.
4636 (reset_lwp_ptrace_options_callback): New function.
4637 (linux_handle_new_gdb_connection): New function.
4638 (linux_target_ops): Initialize new structure member.
4639 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4640 * lynx-low.c: Initialize new structure member.
4641 * remote-utils.c (prepare_resume_reply): Implement stop reason
4642 "fork" for "T" stop message.
4643 * server.c (handle_query): Call handle_new_gdb_connection.
4644 * server.h (report_fork_events): Declare global flag.
4645 * target.h (struct target_ops) <handle_new_gdb_connection>:
4646 New member.
4647 (target_handle_new_gdb_connection): New macro.
4648 * win32-low.c: Initialize new structure member.
4649
4650 2015-05-12 Don Breazeal <donb@codesourcery.com>
4651
4652 * mem-break.c (APPEND_TO_LIST): Define macro.
4653 (clone_agent_expr): New function.
4654 (clone_one_breakpoint): New function.
4655 (clone_all_breakpoints): New function.
4656 * mem-break.h: Declare new functions.
4657
4658 2015-05-12 Don Breazeal <donb@codesourcery.com>
4659
4660 * linux-low.c (linux_supports_fork_events): New function.
4661 (linux_supports_vfork_events): New function.
4662 (linux_target_ops): Initialize new structure members.
4663 (initialize_low): Call linux_check_ptrace_features.
4664 * lynx-low.c (lynx_target_ops): Initialize new structure
4665 members.
4666 * server.c (report_fork_events, report_vfork_events):
4667 New global flags.
4668 (handle_query): Add new features to qSupported packet and
4669 response.
4670 (captured_main): Initialize new global variables.
4671 * target.h (struct target_ops) <supports_fork_events>:
4672 New member.
4673 <supports_vfork_events>: New member.
4674 (target_supports_fork_events): New macro.
4675 (target_supports_vfork_events): New macro.
4676 * win32-low.c (win32_target_ops): Initialize new structure
4677 members.
4678
4679 2015-05-12 Gary Benson <gbenson@redhat.com>
4680
4681 * server.c (handle_qxfer_exec_file): Use current process
4682 if annex is empty.
4683
4684 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4685
4686 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4687 Remove HAVE_PTRACE_GETREGS conditionals.
4688 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4689 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4690
4691 2015-05-08 Yao Qi <yao.qi@linaro.org>
4692
4693 * linux-low.c (linux_supports_conditional_breakpoints): New
4694 function.
4695 (linux_target_ops): Install new target method.
4696 * lynx-low.c (lynx_target_ops): Install NULL hook for
4697 supports_conditional_breakpoints.
4698 * nto-low.c (nto_target_ops): Likewise.
4699 * spu-low.c (spu_target_ops): Likewise.
4700 * win32-low.c (win32_target_ops): Likewise.
4701 * server.c (handle_query): Check
4702 target_supports_conditional_breakpoints.
4703 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4704 New field.
4705 (target_supports_conditional_breakpoints): New macro.
4706
4707 2015-05-06 Pedro Alves <palves@redhat.com>
4708
4709 PR server/18081
4710 * server.c (start_inferior): If the process exits, mourn it.
4711
4712 2015-04-21 Gary Benson <gbenson@redhat.com>
4713
4714 * hostio.c (fileio_open_flags_to_host): Factored out to
4715 fileio_to_host_openflags in common/fileio.c. Single use
4716 updated.
4717
4718 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4719
4720 * linux-xtensa-low.c (xtensa_fill_gregset)
4721 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4722 XCHAL_HAVE_LOOP.
4723
4724 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4725
4726 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4727 (regs_info): Replace usrregs pointer with NULL.
4728
4729 2015-04-17 Gary Benson <gbenson@redhat.com>
4730
4731 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4732 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4733 * server.c (handle_qxfer_exec_file): New function.
4734 (qxfer_packets): Add exec-file entry.
4735 (handle_query): Report qXfer:exec-file:read as supported packet.
4736
4737 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4738
4739 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4740
4741 2015-04-09 Gary Benson <gbenson@redhat.com>
4742
4743 * hostio-errno.c (errno_to_fileio_error): Remove function.
4744 Update caller to use remote_fileio_to_fio_error.
4745
4746 2015-04-09 Yao Qi <yao.qi@linaro.org>
4747
4748 * linux-low.c (linux_insert_point): Call
4749 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4750 (linux_remove_point): Call remove_memory_breakpoint if type is
4751 raw_bkpt_type_sw.
4752 * linux-x86-low.c (x86_insert_point): Don't call
4753 insert_memory_breakpoint.
4754 (x86_remove_point): Don't call remove_memory_breakpoint.
4755
4756 2015-04-01 Pedro Alves <palves@redhat.com>
4757 Cleber Rosa <crosa@redhat.com>
4758
4759 * server.c (gdbserver_usage): Reorganize and extend the usage
4760 message.
4761
4762 2015-03-24 Pedro Alves <palves@redhat.com>
4763
4764 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4765 output. Also dump TRAP_TRACE.
4766 (linux_low_filter_event): In debug output, distinguish a
4767 resume_stop SIGSTOP from a delayed SIGSTOP.
4768
4769 2015-03-24 Gary Benson <gbenson@redhat.com>
4770
4771 * linux-x86-low.c (x86_linux_new_thread): Moved to
4772 nat/x86-linux.c.
4773 (x86_linux_prepare_to_resume): Likewise.
4774
4775 2015-03-24 Gary Benson <gbenson@redhat.com>
4776
4777 * Makefile.in (x86-linux-dregs.o): New rule.
4778 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4779 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4780 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4781 (x86_linux_dr_get): Likewise.
4782 (x86_linux_dr_set): Likewise.
4783 (update_debug_registers_callback): Likewise.
4784 (x86_linux_dr_set_addr): Likewise.
4785 (x86_linux_dr_get_addr): Likewise.
4786 (x86_linux_dr_set_control): Likewise.
4787 (x86_linux_dr_get_control): Likewise.
4788 (x86_linux_dr_get_status): Likewise.
4789 (x86_linux_update_debug_registers): Likewise.
4790
4791 2015-03-24 Gary Benson <gbenson@redhat.com>
4792
4793 * linux-x86-low.c (x86_linux_update_debug_registers):
4794 New function, factored out from...
4795 (x86_linux_prepare_to_resume): ...this.
4796
4797 2015-03-24 Gary Benson <gbenson@redhat.com>
4798
4799 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4800 (x86_linux_dr_set): Likewise.
4801 (update_debug_registers_callback): Likewise.
4802 (x86_linux_dr_set_addr): Likewise.
4803 (x86_linux_dr_get_addr): Likewise.
4804 (x86_linux_dr_set_control): Likewise.
4805 (x86_linux_dr_get_control): Likewise.
4806 (x86_linux_dr_get_status): Likewise.
4807 (x86_linux_prepare_to_resume): Likewise.
4808
4809 2015-03-24 Gary Benson <gbenson@redhat.com>
4810
4811 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4812 Use perror_with_name. Pass string through gettext.
4813 (x86_linux_dr_set): Likewise.
4814
4815 2015-03-24 Gary Benson <gbenson@redhat.com>
4816
4817 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4818 (x86_linux_dr_set_addr): ...this.
4819 (x86_dr_low_get_addr): Rename to...
4820 (x86_linux_dr_get_addr): ...this.
4821 (x86_dr_low_set_control): Rename to...
4822 (x86_linux_dr_set_control): ...this.
4823 (x86_dr_low_get_control): Rename to...
4824 (x86_linux_dr_get_control): ...this.
4825 (x86_dr_low_get_status): Rename to...
4826 (x86_linux_dr_get_status): ...this.
4827 (x86_dr_low): Update with new function names.
4828
4829 2015-03-24 Gary Benson <gbenson@redhat.com>
4830
4831 * Makefile.in (x86-linux.o): New rule.
4832 * configure.srv: Add x86-linux.o to relevant targets.
4833 * linux-low.c (lwp_set_arch_private_info): New function.
4834 (lwp_arch_private_info): Likewise.
4835 * linux-x86-low.c: Include nat/x86-linux.h.
4836 (arch_lwp_info): Removed structure.
4837 (update_debug_registers_callback):
4838 Use lwp_set_debug_registers_changed.
4839 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4840 and lwp_set_debug_registers_changed.
4841 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4842
4843 2015-03-24 Gary Benson <gbenson@redhat.com>
4844
4845 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4846 * linux-arm-low.c (arm_new_thread): Likewise.
4847 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4848 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4849 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4850 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4851
4852 2015-03-24 Gary Benson <gbenson@redhat.com>
4853
4854 * linux-low.c (ptid_of_lwp): New function.
4855 (lwp_is_stopped): Likewise.
4856 (lwp_stop_reason): Likewise.
4857 * linux-x86-low.c (update_debug_registers_callback):
4858 Use lwp_is_stopped.
4859 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4860 lwp_stop_reason.
4861
4862 2015-03-24 Gary Benson <gbenson@redhat.com>
4863
4864 * linux-low.h (linux_stop_lwp): Remove declaration.
4865
4866 2015-03-24 Gary Benson <gbenson@redhat.com>
4867
4868 * linux-low.h: Include nat/linux-nat.h.
4869 * linux-low.c (iterate_over_lwps_args): New structure.
4870 (iterate_over_lwps_filter): New function.
4871 (iterate_over_lwps): Likewise.
4872 * linux-x86-low.c (update_debug_registers_callback):
4873 Update signature to what iterate_over_lwps expects.
4874 Remove PID check that iterate_over_lwps now performs.
4875 (x86_dr_low_set_addr): Use iterate_over_lwps.
4876 (x86_dr_low_set_control): Likewise.
4877
4878 2015-03-24 Gary Benson <gbenson@redhat.com>
4879
4880 * linux-x86-low.c (x86_debug_reg_state): New function.
4881 (x86_linux_prepare_to_resume): Use the above.
4882
4883 2015-03-24 Gary Benson <gbenson@redhat.com>
4884
4885 * linux-low.c (current_lwp_ptid): New function.
4886 * linux-x86-low.c: Include nat/linux-nat.h.
4887 (x86_dr_low_get_addr): Use current_lwp_ptid.
4888 (x86_dr_low_get_control): Likewise.
4889 (x86_dr_low_get_status): Likewise.
4890
4891 2015-03-20 Pedro Alves <palves@redhat.com>
4892
4893 * tracepoint.c (cmd_qtstatus): Make "str" const.
4894
4895 2015-03-20 Pedro Alves <palves@redhat.com>
4896
4897 * server.c (handle_general_set): Make "req_str" const.
4898
4899 2015-03-19 Pedro Alves <palves@redhat.com>
4900
4901 * linux-low.c (linux_resume_one_lwp): Rename to ...
4902 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4903 instead call perror_with_name.
4904 (check_ptrace_stopped_lwp_gone): New function.
4905 (linux_resume_one_lwp): Reimplement as wrapper around
4906 linux_resume_one_lwp_throw that swallows errors if the LWP is
4907 gone.
4908
4909 2015-03-19 Pedro Alves <palves@redhat.com>
4910
4911 * linux-low.c (count_events_callback, select_event_lwp_callback):
4912 No longer check whether the thread has resume_stop as last resume
4913 kind.
4914
4915 2015-03-19 Pedro Alves <palves@redhat.com>
4916
4917 * linux-low.c (count_events_callback, select_event_lwp_callback):
4918 Use the lwp's status_pending_p field, not the thread's.
4919
4920 2015-03-19 Pedro Alves <palves@redhat.com>
4921
4922 * linux-low.c (select_event_lwp_callback): Update comments to
4923 no longer mention SIGTRAP.
4924
4925 2015-03-18 Gary Benson <gbenson@redhat.com>
4926
4927 * server.c (handle_query): Do not report vFile:fstat as supported.
4928
4929 2015-03-11 Gary Benson <gbenson@redhat.com>
4930
4931 * hostio.c (sys/types.h): New include.
4932 (sys/stat.h): Likewise.
4933 (common-remote-fileio.h): Likewise.
4934 (handle_fstat): New function.
4935 (handle_vFile): Handle vFile:fstat packets.
4936
4937 2015-03-11 Gary Benson <gbenson@redhat.com>
4938
4939 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4940 struct stat.st_blocks and struct stat.st_blksize.
4941 * configure: Regenerate.
4942 * config.in: Likewise.
4943 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4944 (OBS): Add common-remote-fileio.o.
4945 (common-remote-fileio.o): New rule.
4946
4947 2015-03-09 Pedro Alves <palves@redhat.com>
4948
4949 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4950 'struct sockaddr' pointer in 'accept' call.
4951
4952 2015-03-09 Pedro Alves <palves@redhat.com>
4953
4954 Revert:
4955 2015-03-07 Pedro Alves <palves@redhat.com>
4956 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4957 or <winsock2.h> here. Instead include "gdb_socket.h".
4958 (remote_open): Use union gdb_sockaddr_u.
4959 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4960 or <winsock2.h> here. Instead include "gdb_socket.h".
4961 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4962 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4963 or <sys/un.h>.
4964 (init_named_socket, gdb_agent_helper_thread): Use union
4965 gdb_sockaddr_u.
4966
4967 2015-03-07 Pedro Alves <palves@redhat.com>
4968
4969 * configure.ac (build_warnings): Move
4970 -Wdeclaration-after-statement to the C-specific set.
4971 * configure: Regenerate.
4972
4973 2015-03-07 Pedro Alves <palves@redhat.com>
4974
4975 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4976 or <winsock2.h> here. Instead include "gdb_socket.h".
4977 (remote_open): Use union gdb_sockaddr_u.
4978 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4979 or <winsock2.h> here. Instead include "gdb_socket.h".
4980 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4981 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4982 or <sys/un.h>.
4983 (init_named_socket, gdb_agent_helper_thread): Use union
4984 gdb_sockaddr_u.
4985
4986 2015-03-07 Pedro Alves <palves@redhat.com>
4987
4988 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4989 instead.
4990
4991 2015-03-06 Yao Qi <yao.qi@linaro.org>
4992
4993 * linux-aarch64-low.c (aarch64_insert_point): Use
4994 show_debug_regs as a boolean.
4995 (aarch64_remove_point): Likewise.
4996
4997 2015-03-05 Pedro Alves <palves@redhat.com>
4998
4999 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5000 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5001 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5002 * nto-low.c (nto_target_ops): Likewise.
5003 * spu-low.c (spu_target_ops): Likewise.
5004 * win32-low.c (win32_target_ops): Likewise.
5005
5006 2015-03-04 Pedro Alves <palves@redhat.com>
5007
5008 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5009 Decide whether a breakpoint triggered based on the SIGTRAP's
5010 siginfo.si_code.
5011 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5012 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5013 (linux_low_filter_event): Check for breakpoints before checking
5014 watchpoints.
5015 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5016 siginfo.si_code.
5017 (linux_stopped_by_sw_breakpoint)
5018 (linux_supports_stopped_by_sw_breakpoint)
5019 (linux_stopped_by_hw_breakpoint)
5020 (linux_supports_stopped_by_hw_breakpoint): New functions.
5021 (linux_target_ops): Install new target methods.
5022
5023 2015-03-04 Pedro Alves <palves@redhat.com>
5024
5025 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5026 * server.c (swbreak_feature, hwbreak_feature): New globals.
5027 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5028 (captured_main): Clear swbreak_feature and hwbreak_feature.
5029 * server.h (swbreak_feature, hwbreak_feature): Declare.
5030 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5031 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5032 supports_stopped_by_hw_breakpoint>: New fields.
5033 (target_supports_stopped_by_sw_breakpoint)
5034 (target_stopped_by_sw_breakpoint)
5035 (target_supports_stopped_by_hw_breakpoint)
5036 (target_stopped_by_hw_breakpoint): Declare.
5037
5038 2015-03-04 Pedro Alves <palves@redhat.com>
5039
5040 enum lwp_stop_reason -> enum target_stop_reason
5041 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5042 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5043 (linux_wait_1, stuck_in_jump_pad_callback)
5044 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5045 (linux_stopped_by_watchpoint):
5046 * linux-low.h (enum lwp_stop_reason): Delete.
5047 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5048 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5049
5050 2015-03-04 Yao Qi <yao.qi@linaro.org>
5051
5052 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5053
5054 2015-03-03 Gary Benson <gbenson@redhat.com>
5055
5056 * hostio.c (handle_vFile): Fix prefix lengths.
5057
5058 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5059
5060 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5061 ptr_bits.
5062
5063 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5064
5065 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5066 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5067 (clean): Add "rm -f" for above C files.
5068 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5069 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5070 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5071 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5072 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5073 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5074 (init_registers_s390x_vx_linux64)
5075 (init_registers_s390x_tevx_linux64)
5076 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5077 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5078 declarations.
5079 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5080 (s390_store_vxrs_high): New functions.
5081 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5082 NT_S390_VXRS_HIGH.
5083 (s390_arch_setup): Add logic for selecting one of the new target
5084 descriptions. Activate the new vector regsets if applicable.
5085 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5086 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5087 and init_registers_s390x_tevx_linux64.
5088
5089 2015-03-01 Pedro Alves <palves@redhat.com>
5090
5091 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5092 parameter.
5093
5094 2015-02-27 Pedro Alves <palves@redhat.com>
5095
5096 * linux-x86-low.c (u_debugreg_offset): New function.
5097 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5098
5099 2015-02-27 Pedro Alves <palves@redhat.com>
5100
5101 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5102 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5103 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5104 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5105 (ps_lsetfpregs, ps_getpid)
5106 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5107 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5108 (ps_lsetxregs, ps_plog): Declare.
5109
5110 2015-02-27 Pedro Alves <palves@redhat.com>
5111
5112 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5113 IP_AGENT_EXPORT_FUNC.
5114 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5115 IP_AGENT_EXPORT_FUNC.
5116 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5117 (IP_AGENT_EXPORT): Delete.
5118 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5119 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5120 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5121 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5122 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5123 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5124 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5125 (traceframe_read_count, traceframe_write_count)
5126 (traceframes_created, trace_state_variables, get_raw_reg)
5127 (get_trace_state_variable_value, set_trace_state_variable_value)
5128 (ust_loaded, helper_thread_id, cmd_buf): Use
5129 IPA_SYM_EXPORTED_NAME.
5130 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5131 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5132 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5133 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5134 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5135 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5136 EXTERN_C_PUSH/EXTERN_C_POP.
5137 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5138 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5139 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5140 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5141 (traceframe_write_count, traceframe_read_count)
5142 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5143 (about_to_request_buffer_space, get_trace_state_variable_value)
5144 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5145 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5146 EXTERN_C_PUSH/EXTERN_C_POP.
5147 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5148 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5149 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5150 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5151 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5152 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5153 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5154 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5155 Define.
5156 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5157 (IP_AGENT_EXPORT_VAR_DECL): Define.
5158 (tracing): Declare.
5159 (gdb_agent_get_raw_reg): Declare.
5160
5161 2015-02-27 Tom Tromey <tromey@redhat.com>
5162 Pedro Alves <palves@redhat.com>
5163
5164 Rename symbols whose names are reserved C++ keywords throughout.
5165
5166 2015-02-27 Pedro Alves <palves@redhat.com>
5167
5168 * Makefile.in (COMPILER): New, get it from autoconf.
5169 (CXX): Get from autoconf instead.
5170 (COMPILE.pre): Use COMPILER.
5171 (CC-LD): Rename to ...
5172 (CC_LD): ... this. Use COMPILER.
5173 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5174 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5175 * acinclude.m4: Include build-with-cxx.m4.
5176 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5177 Disable -Werror by default if building in C++ mode.
5178 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5179 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5180 the C++ compiler. Save/restore CXXFLAGS too.
5181 * configure: Regenerate.
5182
5183 2015-02-27 Pedro Alves <palves@redhat.com>
5184
5185 * acinclude.m4: Include libiberty.m4.
5186 * configure.ac: Call libiberty_INIT.
5187 * config.in, configure: Regenerate.
5188
5189 2015-02-26 Pedro Alves <palves@redhat.com>
5190
5191 * linux-low.c (linux_wait_1): When incrementing the PC past a
5192 program breakpoint always use the_low_target.breakpoint_len as
5193 increment, rather than the maximum between that and
5194 the_low_target.decr_pc_after_break.
5195
5196 2015-02-23 Pedro Alves <palves@redhat.com>
5197
5198 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5199 thread was doing a step-over; always adjust the PC if
5200 we stepped over a permanent breakpoint.
5201 (linux_wait_1): If we stepped over breakpoint that was on top of a
5202 permanent breakpoint, manually advance the PC past it.
5203
5204 2015-02-23 Pedro Alves <palves@redhat.com>
5205
5206 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5207 modes.
5208 (x86_fill_gregset, x86_store_gregset): Use it when handling
5209 $orig_eax.
5210
5211 2015-02-20 Pedro Alves <palves@redhat.com>
5212
5213 * thread-db.c: Include "nat/linux-procfs.h".
5214 (thread_db_init): Skip listing new threads if the kernel supports
5215 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5216
5217 2015-02-20 Pedro Alves <palves@redhat.com>
5218
5219 * linux-low.c (status_pending_p_callback): Use ptid_match.
5220
5221 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5222
5223 PR breakpoints/16812
5224 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5225 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5226 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5227
5228 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5229
5230 PR breakpoints/15956
5231 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5232
5233 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5234
5235 * linux-low.c (linux_low_btrace_conf): Print size.
5236 * server.c (handle_btrace_conf_general_set): New.
5237 (hanle_general_set): Call handle_btrace_conf_general_set.
5238 (handle_query): Report Qbtrace-conf:bts:size as supported.
5239
5240 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5241
5242 * linux-low.c (linux_low_enable_btrace): Update parameters.
5243 (linux_low_btrace_conf): New.
5244 (linux_target_ops)<to_btrace_conf>: Initialize.
5245 * server.c (current_btrace_conf): New.
5246 (handle_btrace_enable): Rename to ...
5247 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5248 to target_enable_btrace. Update comment. Update users.
5249 (handle_qxfer_btrace_conf): New.
5250 (qxfer_packets): Add btrace-conf entry.
5251 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5252 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5253 (target_ops)<read_btrace_conf>: New.
5254 (target_enable_btrace): Update parameters.
5255 (target_read_btrace_conf): New.
5256
5257 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5258
5259 * server.c (handle_btrace_general_set): Remove call to
5260 target_supports_btrace.
5261 (supported_btrace_packets): New.
5262 (handle_query): Call supported_btrace_packets.
5263 * target.h: include btrace-common.h.
5264 (btrace_target_info): Removed.
5265 (supports_btrace, target_supports_btrace): Update parameters.
5266
5267 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5268
5269 * Makefile.in (SFILES): Add common/btrace-common.c.
5270 (OBS): Add common/btrace-common.o.
5271 (btrace-common.o): Add build rules.
5272 * linux-low: Include btrace-common.h.
5273 (linux_low_read_btrace): Use struct btrace_data. Call
5274 btrace_data_init and btrace_data_fini.
5275
5276 2015-02-06 Pedro Alves <palves@redhat.com>
5277
5278 * thread-db.c (find_new_threads_callback): Add debug output.
5279
5280 2015-02-04 Pedro Alves <palves@redhat.com>
5281
5282 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5283 (resume_stopped_resumed_lwps): New function.
5284 (linux_wait_for_event_filtered): Use it.
5285
5286 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5287
5288 * Makefile.in (SFILES): Add linux-personality.c.
5289 (linux-personality.o): New rule.
5290 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5291 list of objects to be built.
5292 * linux-low.c: Include nat/linux-personality.h.
5293 (linux_create_inferior): Remove code to disable address space
5294 randomization (moved to ../nat/linux-personality.c). Create
5295 cleanup to disable address space randomization.
5296
5297 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5298
5299 * Makefile.in (posix-strerror.o): New rule.
5300 (mingw-strerror.o): Likewise.
5301 * configure: Regenerated.
5302 * configure.ac: Source file ../common/common.host. Initialize new
5303 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5304
5305 2015-01-14 Yao Qi <yao@codesourcery.com>
5306
5307 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5308 (ppc-linux.o): New rule.
5309 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5310 * configure.ac: AC_CHECK_FUNCS(getauxval).
5311 * config.in: Re-generated.
5312 * configure: Re-generated.
5313 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5314 ppc64_64bit_inferior_p
5315
5316 2015-01-14 Yao Qi <yao@codesourcery.com>
5317
5318 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5319 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5320 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5321 (PT_ORIG_R3, PT_TRAP): Likewise.
5322 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5323 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5324 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5325
5326 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5327
5328 * i387-fp.c (i387_cache_to_xsave): In look over
5329 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5330 zmmh_low_space field by use of zmmh_high_space.
5331
5332 2015-01-09 Pedro Alves <palves@redhat.com>
5333
5334 * linux-low.c (step_over_bkpt): Move higher up in the file.
5335 (handle_extended_wait): Don't store the stop_pc here.
5336 (get_stop_pc): Adjust comments and rename to ...
5337 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5338 stopped for a software breakpoint or hardware breakpoint.
5339 (thread_still_has_status_pending_p): New function.
5340 (status_pending_p_callback): Use
5341 thread_still_has_status_pending_p. If the event is no longer
5342 interesting, resume the LWP.
5343 (handle_tracepoints): Add assert.
5344 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5345 (wstatus_maybe_breakpoint): New function.
5346 (cancel_breakpoint): Delete function.
5347 (check_stopped_by_watchpoint): New function, factored out from
5348 linux_low_filter_event.
5349 (lp_status_maybe_breakpoint): Delete function.
5350 (linux_low_filter_event): Remove filter_ptid argument.
5351 Leave thread group exits pending here. Store the LWP's stop PC.
5352 Always leave events pending.
5353 (linux_wait_for_event_filtered): Pull all events out of the
5354 kernel, and leave them all pending.
5355 (count_events_callback, select_event_lwp_callback): Consider all
5356 events.
5357 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5358 (select_event_lwp): Only give preference to the stepping LWP in
5359 all-stop mode. Adjust comments.
5360 (ignore_event): New function.
5361 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5362 references to cancel_breakpoints. Adjust to renames. Also give
5363 equal priority to all LWPs that have had events in non-stop mode.
5364 If reporting a software breakpoint event, unadjust the LWP's PC.
5365 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5366 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5367 Adjust.
5368 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5369 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5370 (linux_stopped_by_watchpoint): Adjust.
5371 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5372 * linux-low.h (enum lwp_stop_reason): New.
5373 (struct lwp_info) <stop_pc>: Adjust comment.
5374 <stopped_by_watchpoint>: Delete field.
5375 <stop_reason>: New field.
5376 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5377 * mem-break.c (software_breakpoint_inserted_here)
5378 (hardware_breakpoint_inserted_here): New function.
5379 * mem-break.h (software_breakpoint_inserted_here)
5380 (hardware_breakpoint_inserted_here): Declare.
5381 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5382 (cancel_breakpoints): Delete.
5383 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5384 (upload_fast_traceframes): Remove references to
5385 cancel_breakpoints.
5386
5387 2015-01-09 Pedro Alves <palves@redhat.com>
5388
5389 * thread-db.c (find_new_threads_callback): Ignore thread if the
5390 kernel thread ID is -1.
5391
5392 2015-01-09 Pedro Alves <palves@redhat.com>
5393
5394 * linux-low.c (linux_attach_fail_reason_string): Move to
5395 nat/linux-ptrace.c, and rename.
5396 (linux_attach_lwp): Update comment.
5397 (attach_proc_task_lwp_callback): New function.
5398 (linux_attach): Adjust to rename and use
5399 linux_proc_attach_tgid_threads.
5400 (linux_attach_fail_reason_string): Delete declaration.
5401
5402 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5403
5404 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5405 * server.c (gdbserver_version): Likewise.
5406
5407 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5408
5409 * remote-utils.c: Include ctype.h.
5410 (input_interrupt): Explicitly handle the case when the char
5411 received is the NUL byte. Improve the printing of non-ASCII
5412 characters.
5413
5414 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5415
5416 * linux-low.c (linux_low_filter_event): Update call to
5417 linux_enable_event_reporting following the addition of
5418 a new parameter to that function.
5419
5420 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5421
5422 PR server/17457
5423 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5424 (AARCH64_FPCR_REGNO): Likewise.
5425 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5426 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5427 (aarch64_store_fpregset): Likewise.
5428
5429 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5430
5431 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5432 Remove FIXME comment about assumption about N.
5433
5434 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5435
5436 * configure.ac: If large-file support is disabled in GDBserver,
5437 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5438 * configure: Regenerate.
5439
5440 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5441
5442 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5443 warning upon ENODATA from ptrace.
5444 * linux-s390-low.c (s390_store_tdb): New.
5445 (s390_regsets): Add regset for NT_S390_TDB.
5446
5447 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5448
5449 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5450 without a fill_function.
5451 * linux-s390-low.c (s390_fill_last_break): Remove.
5452 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5453 (s390_arch_setup): Use regset's size instead of fill_function for
5454 loop end condition.
5455
5456 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5457
5458 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5459 the regset's store function when ptrace returned an error.
5460 * regcache.c (get_thread_regcache): Invalidate register cache
5461 before fetching inferior's registers.
5462
5463 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5464
5465 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5466 while-loop as for-loop.
5467 (regsets_store_inferior_registers): Likewise.
5468
5469 2014-11-28 Yao Qi <yao@codesourcery.com>
5470
5471 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5472 * config.in, configure: Re-generate.
5473 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5474 is defined.
5475
5476 2014-11-21 Yao Qi <yao@codesourcery.com>
5477
5478 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5479 (AC_CHECK_HEADERS): Remove malloc.h.
5480 * configure: Re-generated.
5481 * config.in: Re-generated.
5482 * server.h: Don't include alloca.h and malloc.h.
5483 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5484 Don't include malloc.h.
5485
5486 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5487
5488 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5489 corresponding ERRNO check in same block.
5490
5491 2014-11-12 Pedro Alves <palves@redhat.com>
5492
5493 * server.c (cont_thread): Update comment.
5494 (start_inferior, attach_inferior): No longer clear cont_thread.
5495 (handle_v_cont): No longer set cont_thread.
5496 (captured_main): Clear cont_thread each time a GDB connects.
5497
5498 2014-11-12 Pedro Alves <palves@redhat.com>
5499
5500 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5501 thread, and don't resume all threads if the Hc thread has exited.
5502
5503 2014-11-12 Pedro Alves <palves@redhat.com>
5504
5505 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5506 the process group instead of to a specific LWP.
5507
5508 2014-10-15 Pedro Alves <palves@redhat.com>
5509
5510 PR server/17487
5511 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5512 parameter.
5513 (arm_set_thread_context): Delete.
5514 (the_low_target): Adjust.
5515 * win32-i386-low.c (debug_registers_changed)
5516 (debug_registers_used): Delete.
5517 (update_debug_registers_callback): New function.
5518 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5519 needing to update their debug registers.
5520 (win32_get_current_dr): New function.
5521 (x86_dr_low_get_addr, x86_dr_low_get_control)
5522 (x86_dr_low_get_status): Fetch the debug register from the thread
5523 record's context.
5524 (i386_initial_stuff): Adjust.
5525 (i386_get_thread_context): Remove current_event parameter. Don't
5526 clear debug_registers_changed nor copy DR values to
5527 debug_reg_state.
5528 (i386_set_thread_context): Delete.
5529 (i386_prepare_to_resume): New function.
5530 (i386_thread_added): Mark the thread as needing to update irs
5531 debug registers.
5532 (the_low_target): Remove i386_set_thread_context and install
5533 i386_prepare_to_resume.
5534 * win32-low.c (win32_get_thread_context): Adjust.
5535 (win32_set_thread_context): Use SetThreadContext
5536 directly.
5537 (win32_prepare_to_resume): New function.
5538 (win32_require_context): New function, factored out from ...
5539 (thread_rec): ... this.
5540 (continue_one_thread): Call win32_prepare_to_resume on each thread
5541 we're about to continue.
5542 (win32_resume): Call win32_prepare_to_resume on the event thread.
5543 * win32-low.h (struct win32_thread_info)
5544 <debug_registers_changed>: New field.
5545 (struct win32_target_ops): Change prototype of set_thread_context,
5546 delete set_thread_context and add prepare_to_resume.
5547 (win32_require_context): New declaration.
5548
5549 2014-10-08 Gary Benson <gbenson@redhat.com>
5550
5551 * server.h: Do not include common-exceptions.h.
5552
5553 2014-10-08 Gary Benson <gbenson@redhat.com>
5554
5555 * server.h: Do not include cleanups.h.
5556
5557 2014-09-30 James Hogan <james.hogan@imgtec.com>
5558
5559 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5560 mips64-dsp-linux.c.
5561
5562 2014-09-23 Yao Qi <yao@codesourcery.com>
5563
5564 * linux-low.c (lp_status_maybe_breakpoint): New function.
5565 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5566 (count_events_callback): Likewise.
5567 (select_event_lwp_callback): Likewise.
5568 (cancel_breakpoints_callback): Likewise.
5569
5570 2014-09-19 Don Breazeal <donb@codesourcery.com>
5571
5572 * linux-low.c (handle_extended_wait): Call
5573 linux_ptrace_get_extended_event.
5574 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5575 linux_is_extended_waitstatus.
5576
5577 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5578
5579 * Makefile.in (CPPFLAGS): Define.
5580 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5581 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5582
5583 2014-09-16 Gary Benson <gbenson@redhat.com>
5584
5585 * inferiors.h (current_inferior): Renamed as...
5586 (current_thread): New variable. All uses updated.
5587 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5588 (maybe_move_out_of_jump_pad): Likewise.
5589 (cancel_breakpoint): Likewise.
5590 (linux_low_filter_event): Likewise.
5591 (wait_for_sigstop): Likewise.
5592 (linux_resume_one_lwp): Likewise.
5593 (need_step_over_p): Likewise.
5594 (start_step_over): Likewise.
5595 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5596 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5597 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5598 and save_inferior as saved_thread.
5599 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5600 saved_thread.
5601 (regcache_invalidate_thread): Likewise.
5602 * remote-utils.c (prepare_resume_reply): Likewise.
5603 * thread-db.c (thread_db_get_tls_address): Likewise.
5604 (disable_thread_event_reporting): Likewise.
5605 (remove_thread_event_breakpoints): Likewise.
5606 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5607 as saved_thread.
5608 * target.h (set_desired_inferior): Renamed as...
5609 (set_desired_thread): New declaration. All uses updated.
5610 * server.c (myresume): Updated comment to reference thread instead
5611 of inferior.
5612 (handle_serial_event): Likewise.
5613 (handle_target_event): Likewise.
5614
5615 2014-09-12 Tom Tromey <tromey@redhat.com>
5616 Gary Benson <gbenson@redhat.com>
5617
5618 * regcache.h: Include common-regcache.h.
5619 (regcache_read_pc): Don't declare.
5620 * regcache.c (get_thread_regcache_for_ptid): New function.
5621
5622 2014-09-11 Tom Tromey <tromey@redhat.com>
5623 Gary Benson <gbenson@redhat.com>
5624
5625 * symbol.c: New file.
5626 * Makefile.in (SFILES): Add symbol.c.
5627 (OBS): Add symbol.o.
5628
5629 2014-09-11 Gary Benson <gbenson@redhat.com>
5630
5631 * target.c (target_stop_ptid, target_continue_ptid): New
5632 functions.
5633
5634 2014-09-11 Tom Tromey <tromey@redhat.com>
5635 Gary Benson <gbenson@redhat.com>
5636
5637 * target.h: Include target/target.h.
5638 * target.c (target_read_memory, target_read_uint32)
5639 (target_write_memory): New functions.
5640
5641 2014-09-11 Gary Benson <gbenson@redhat.com>
5642
5643 * server.h (debug_hw_points): Don't declare.
5644 * server.c (debug_hw_points): Don't define. Replace all uses
5645 with show_debug_regs.
5646 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5647 all uses with show_debug_regs.
5648
5649 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5650
5651 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5652 endianness into account.
5653 (ppc_supply_ptrace_register): Likewise.
5654
5655 2014-09-03 James Hogan <james.hogan@imgtec.com>
5656
5657 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5658 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5659
5660 2014-09-03 Gary Benson <gbenson@redhat.com>
5661
5662 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5663 ALL_DEBUG_ADDRESS_REGISTERS.
5664
5665 2014-09-02 Gary Benson <gbenson@redhat.com>
5666
5667 * i386-low.h: Renamed as...
5668 * x86-low.h: New file. All type, function and variable name
5669 prefixes changed from "i386_" to "x86_". All references updated.
5670 * i386-low.c: Renamed as...
5671 * x86-low.c: New file. All type, function and variable name
5672 prefixes changed from "i386_" to "x86_". All references updated.
5673
5674 2014-09-02 Gary Benson <gbenson@redhat.com>
5675
5676 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5677 (x86_linux_new_thread): Likewise.
5678
5679 2014-08-29 Gary Benson <gbenson@redhat.com>
5680
5681 * server.h (setjmp.h): Do not include.
5682 (toplevel): Do not declare.
5683 (common-exceptions.h): Include.
5684 (cleanups.h): Likewise.
5685 * server.c (toplevel): Do not define.
5686 (exit_code): New static global.
5687 (detach_or_kill_for_exit_cleanup): New function.
5688 (main): New function. Original main renamed to...
5689 (captured_main): New function.
5690 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5691
5692 2014-08-29 Gary Benson <gbenson@redhat.com>
5693
5694 * Makefile.in (SFILES): Add common/common-exceptions.c.
5695 (OBS): Add common-exceptions.o.
5696 (common-exceptions.o): New rule.
5697 * utils.c (prepare_to_throw_exception): New function.
5698
5699 2014-08-29 Gary Benson <gbenson@redhat.com>
5700
5701 * config.in: Regenerate.
5702 * configure: Likewise.
5703
5704 2014-08-29 Gary Benson <gbenson@redhat.com>
5705
5706 * Makefile.in (SFILES): Add common/cleanups.c.
5707 (OBS): cleanups.o.
5708 (cleanups.o): New rule.
5709
5710 2014-08-29 Gary Benson <gbenson@redhat.com>
5711
5712 * utils.c (internal_vwarning): New function.
5713
5714 2014-08-28 Gary Benson <gbenson@redhat.com>
5715
5716 * utils.h (fatal): Remove declaration.
5717 * utils.c (fatal): Remove function.
5718
5719 2014-08-28 Gary Benson <gbenson@redhat.com>
5720
5721 * tracepoint.c (gdb_agent_init): Replace fatal with
5722 perror_with_name.
5723 (initialize_tracepoint): Likewise.
5724
5725 2014-08-28 Gary Benson <gbenson@redhat.com>
5726
5727 * remote-utils.c (remote_prepare): Replace fatal with error.
5728
5729 2014-08-28 Gary Benson <gbenson@redhat.com>
5730
5731 * linux-low.c (linux_async): Replace fatal with warning.
5732 Tidy up and return.
5733 (linux_start_non_stop): Return -1 if linux_async failed.
5734
5735 2014-08-28 Gary Benson <gbenson@redhat.com>
5736
5737 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5738 gdb_assert.
5739 (i386_dr_low_get_addr): Remove vague comment.
5740 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5741 gdb_assert.
5742
5743 2014-08-28 Gary Benson <gbenson@redhat.com>
5744
5745 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5746 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5747 internal_error.
5748 (linux_resume_one_lwp): Likewise.
5749 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5750 gdb_assert.
5751 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5752 with internal_error.
5753 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5754 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5755 (find_register_by_name): Replace fatal with internal_error.
5756 (find_regno): Likewise.
5757 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5758 * thread-db.c (thread_db_create_event): Likewise.
5759 (thread_db_load_search): Likewise.
5760 (try_thread_db_load_1): Likewise.
5761 * tracepoint.c (get_jump_space_head): Replace fatal with
5762 internal_error.
5763 (claim_trampoline_space): Likewise.
5764 (have_fast_tracepoint_trampoline_buffer): Likewise.
5765 (cmd_qtstart): Likewise.
5766 (stop_tracing): Likewise.
5767 (fast_tracepoint_collecting): Likewise.
5768 (target_malloc): Likewise.
5769 (download_tracepoint): Likewise.
5770 (download_trace_state_variables): Replace check with gdb_assert.
5771 (upload_fast_traceframes): Replace fatal with internal_error.
5772
5773 2014-08-19 Tom Tromey <tromey@redhat.com>
5774 Gary Benson <gbenson@redhat.com>
5775
5776 * Makefile.in (SFILES): Add common/common-debug.c.
5777 (OBS): Add common-debug.o.
5778 (common-debug.o): New rule.
5779 * debug.h (debug_printf): Don't declare.
5780 * debug.c (debug_printf): Renamed and rewritten as...
5781 (debug_vprintf): New function.
5782
5783 2014-08-19 Gary Benson <gbenson@redhat.com>
5784
5785 * utils.h: Do not include print-utils.h.
5786
5787 2014-08-19 Tom Tromey <tromey@redhat.com>
5788 Gary Benson <gbenson@redhat.com>
5789
5790 * server.h: Add static assertion.
5791 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5792
5793 2014-08-19 Tom Tromey <tromey@redhat.com>
5794 Gary Benson <gbenson@redhat.com>
5795
5796 * Makefile.in (SFILES): Add common/errors.c.
5797 (OBS): Add errors.o.
5798 (IPA_OBS): Add errors-ipa.o.
5799 (errors.o): New rule.
5800 (errors-ipa.o): Likewise.
5801 * utils.h (perror_with_name, error, warning): Don't declare.
5802 * utils.c (warning): Renamed and rewritten as...
5803 (vwarning): New function.
5804 (error): Renamed and rewritten as...
5805 (verror): New function.
5806 (internal_error): Renamed and rewritten as...
5807 (internal_verror): New function.
5808
5809 2014-08-07 Gary Benson <gbenson@redhat.com>
5810
5811 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5812 * configure: Regenerate.
5813 * config.in: Likewise.
5814 * server.h: Do not include errno.h.
5815 * event-loop.c: Likewise.
5816 * hostio-errno.c: Likewise.
5817 * linux-low.c: Likewise.
5818 * remote-utils.c: Likewise.
5819 * spu-low.c: Likewise.
5820 * utils.c: Likewise.
5821 * gdbreplay.c: Unconditionally include errno.h.
5822
5823 2014-08-07 Gary Benson <gbenson@redhat.com>
5824
5825 * server.h: Do not include string.h.
5826 * event-loop.c: Likewise.
5827 * linux-low.c: Likewise.
5828 * regcache.c: Likewise.
5829 * remote-utils.c: Likewise.
5830 * spu-low.c: Likewise.
5831 * utils.c: Likewise.
5832
5833 2014-08-07 Gary Benson <gbenson@redhat.com>
5834
5835 * server.h: Do not include gdb_assert.h.
5836
5837 2014-08-07 Gary Benson <gbenson@redhat.com>
5838
5839 * server.h: Do not include common-utils.h.
5840
5841 2014-08-07 Gary Benson <gbenson@redhat.com>
5842
5843 * server.h: Do not include ptid.h.
5844 * notif.h: Likewise.
5845
5846 2014-08-07 Gary Benson <gbenson@redhat.com>
5847
5848 * server.h: Do not include gdb_locale.h.
5849
5850 2014-08-07 Gary Benson <gbenson@redhat.com>
5851
5852 * server.h: Do not include gdb/signals.h.
5853 * win32-low.c: Likewise.
5854
5855 2014-08-07 Gary Benson <gbenson@redhat.com>
5856
5857 * server.h: Do not include pathmax.h.
5858
5859 2014-08-07 Gary Benson <gbenson@redhat.com>
5860
5861 * server.h: Do not include libiberty.h.
5862 * linux-bfin-low.c: Likewise.
5863
5864 2014-08-07 Gary Benson <gbenson@redhat.com>
5865
5866 * server.h: Do not include ansidecl.h.
5867
5868 2014-08-07 Gary Benson <gbenson@redhat.com>
5869
5870 * linux-x86-low.c: Do not include stddef.h.
5871 * lynx-ppc-low.c: Likewise.
5872 * tracepoint.c: Likewise.
5873
5874 2014-08-07 Gary Benson <gbenson@redhat.com>
5875
5876 * server.h: Do not include stdarg.h.
5877 * nto-low.c: Likewise.
5878
5879 2014-08-07 Gary Benson <gbenson@redhat.com>
5880
5881 * server.h: Do not include stdlib.h.
5882 * inferiors.c: Likewise.
5883 * linux-low.c: Likewise.
5884 * regcache.c: Likewise.
5885 * spu-low.c: Likewise.
5886 * tracepoint.c: Likewise.
5887 * utils.c: Likewise.
5888
5889 2014-08-07 Gary Benson <gbenson@redhat.com>
5890
5891 * server.h: Do not include stdio.h.
5892 * linux-low.c: Likewise.
5893 * remote-utils.c: Likewise.
5894 * spu-low.c: Likewise.
5895 * utils.c: Likewise.
5896 * wincecompat.c: Likewise.
5897
5898 2014-08-06 Gary Benson <gbenson@redhat.com>
5899
5900 * regcache.c (init_register_cache): Move conditionals inside if.
5901
5902 2014-08-06 Gary Benson <gbenson@redhat.com>
5903
5904 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5905
5906 2014-07-31 Gary Benson <gbenson@redhat.com>
5907
5908 * ax.h: Do not include server.h.
5909 * gdbthread.h: Likewise.
5910 * lynx-low.h: Likewise.
5911 * notif.h: Likewise.
5912
5913 2014-07-30 Gary Benson <gbenson@redhat.com>
5914
5915 * server.h: Include common-defs.h.
5916 Do not include config.h or build-gnulib-gdbserver/config.h.
5917
5918 2014-07-30 Gary Benson <gbenson@redhat.com>
5919
5920 * hostio-errno.c: Move server.h to top of includes list.
5921 * inferiors.c: Likewise.
5922 * linux-x86-low.c: Likewise.
5923 * notif.c: Include server.h.
5924
5925 2014-07-24 Tom Tromey <tromey@redhat.com>
5926 Gary Benson <gbenson@redhat.com>
5927
5928 * server.h (CORE_ADDR): Now unsigned.
5929
5930 2014-07-16 Pedro Alves <palves@redhat.com>
5931
5932 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5933
5934 2014-07-15 Pedro Alves <palves@redhat.com>
5935
5936 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5937 copy.
5938
5939 2014-07-11 Pedro Alves <palves@redhat.com>
5940
5941 * linux-low.c (kill_wait_lwp): New function, based on
5942 kill_one_lwp_callback, but use my_waitpid directly.
5943 (kill_one_lwp_callback, linux_kill): Use it.
5944
5945 2014-06-23 Pedro Alves <palves@redhat.com>
5946
5947 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5948 before setting DR0..DR3.
5949
5950 2014-06-20 Gary Benson <gbenson@redhat.com>
5951
5952 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5953 * configure: Regenerated.
5954 * config.in: Likewise.
5955
5956 2014-06-20 Gary Benson <gbenson@redhat.com>
5957
5958 * Makefile.in (SFILES): Update locations for files moved
5959 from common to nat.
5960 (object file files): Reordered.
5961
5962 2014-06-20 Gary Benson <gbenson@redhat.com>
5963
5964 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5965 (i386_dr_low_set_addr): Likewise.
5966 (i386_dr_low_get_addr): Likewise.
5967 (i386_dr_low_can_set_control): Likewise.
5968 (i386_dr_low_set_control): Likewise.
5969 (i386_dr_low_get_control): Likewise.
5970 (i386_dr_low_get_status): Likewise.
5971 (i386_get_debug_register_length): Likewise.
5972 * linux-x86-low.c (i386_dr_low_set_addr):
5973 Changed signature. Made static.
5974 (i386_dr_low_get_addr): Likewise.
5975 (i386_dr_low_set_control): Likewise.
5976 (i386_dr_low_get_control): Likewise.
5977 (i386_dr_low_get_status): Likewise.
5978 (i386_dr_low): New global variable.
5979 * win32-i386-low.c (i386_dr_low_set_addr):
5980 Changed signature. Made static.
5981 (i386_dr_low_get_addr): Likewise.
5982 (i386_dr_low_set_control): Likewise.
5983 (i386_dr_low_get_control): Likewise.
5984 (i386_dr_low_get_status): Likewise.
5985 (i386_dr_low): New global variable.
5986
5987 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5988
5989 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5990 * Makefile.in (AR, AR_FLAGS): Define.
5991 * configure: Regenerate.
5992
5993 2014-06-19 Gary Benson <gbenson@redhat.com>
5994
5995 * Makefile.in (i386-dregs.o): New rule.
5996 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5997 * i386-low.c (target.h): Remove include.
5998 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5999 (DR_CONTROL_SHIFT): Likewise.
6000 (DR_CONTROL_SIZE): Likewise.
6001 (DR_RW_EXECUTE): Likewise.
6002 (DR_RW_WRITE): Likewise.
6003 (DR_RW_READ): Likewise.
6004 (DR_RW_IORW): Likewise.
6005 (DR_LEN_1): Likewise.
6006 (DR_LEN_2): Likewise.
6007 (DR_LEN_4): Likewise.
6008 (DR_LEN_8): Likewise.
6009 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6010 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6011 (DR_ENABLE_SIZE): Likewise.
6012 (DR_LOCAL_SLOWDOWN): Likewise.
6013 (DR_GLOBAL_SLOWDOWN): Likewise.
6014 (DR_CONTROL_RESERVED): Likewise.
6015 (I386_DR_CONTROL_MASK): Likewise.
6016 (I386_DR_VACANT): Likewise.
6017 (I386_DR_LOCAL_ENABLE): Likewise.
6018 (I386_DR_GLOBAL_ENABLE): Likewise.
6019 (I386_DR_DISABLE): Likewise.
6020 (I386_DR_SET_RW_LEN): Likewise.
6021 (I386_DR_GET_RW_LEN): Likewise.
6022 (I386_DR_WATCH_HIT): Likewise.
6023 (i386_wp_op_t): Likewise.
6024 (i386_show_dr): Likewise.
6025 (i386_length_and_rw_bits): Likewise.
6026 (i386_insert_aligned_watchpoint): Likewise.
6027 (i386_remove_aligned_watchpoint): Likewise.
6028 (i386_handle_nonaligned_watchpoint): Likewise.
6029 i386_update_inferior_debug_regs(): Likewise.
6030 (i386_dr_insert_watchpoint): Likewise.
6031 (i386_dr_remove_watchpoint): Likewise.
6032 (i386_dr_region_ok_for_watchpoint): Likewise.
6033 (i386_dr_stopped_data_address): Likewise.
6034 (i386_dr_stopped_by_watchpoint): Likewise.
6035
6036 2014-06-19 Gary Benson <gbenson@redhat.com>
6037
6038 * i386-low.c (i386_dr_show): Renamed to
6039 i386_show_dr and made static. All uses updated.
6040 (i386_dr_length_and_rw_bits): Renamed to
6041 i386_length_and_rw_bits and made static.
6042 All uses updated.
6043 (i386_dr_insert_aligned_watchpoint): Renamed to
6044 i386_insert_aligned_watchpoint and made static.
6045 All uses updated.
6046 (i386_dr_remove_aligned_watchpoint): Renamed to
6047 i386_remove_aligned_watchpoint and made static.
6048 All uses updated.
6049 (i386_dr_update_inferior_debug_regs): Renamed to
6050 i386_update_inferior_debug_regs and made static.
6051 All uses updated.
6052
6053 2014-06-18 Gary Benson <gbenson@redhat.com>
6054
6055 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6056 (i386_dr_low_can_set_control): Likewise.
6057 (i386_get_debug_register_length): Likewise.
6058 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6059 (i386_dr_low_can_set_control): Likewise.
6060 (i386_get_debug_register_length): Likewise.
6061
6062 2014-06-17 Gary Benson <gbenson@redhat.com>
6063
6064 * i386-low.h (i386-dregs.h): New include.
6065 (DR_FIRSTADDR): Now in i386-dregs.h.
6066 (DR_LASTADDR): Likewise.
6067 (DR_NADDR): Likewise.
6068 (DR_STATUS): Likewise.
6069 (DR_CONTROL): Likewise.
6070 (i386_debug_reg_state): Likewise.
6071 (i386_dr_insert_watchpoint): Likewise.
6072 (i386_dr_remove_watchpoint): Likewise.
6073 (i386_dr_region_ok_for_watchpoint): Likewise.
6074 (i386_dr_stopped_data_address): Likewise.
6075 (i386_dr_stopped_by_watchpoint): Likewise.
6076 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6077
6078 2014-06-18 Gary Benson <gbenson@redhat.com>
6079
6080 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6081 i386_dr_insert_watchpoint.
6082 (i386_low_remove_watchpoint): Renamed to
6083 i386_dr_remove_watchpoint.
6084 (i386_low_region_ok_for_watchpoint): Renamed to
6085 i386_dr_region_ok_for_watchpoint.
6086 (i386_low_stopped_data_address): Renamed to
6087 i386_dr_stopped_data_address.
6088 (i386_low_stopped_by_watchpoint): Renamed to
6089 i386_dr_stopped_by_watchpoint.
6090 * i386-low.c (i386_show_dr): Renamed to
6091 i386_dr_show and made nonstatic. All uses updated.
6092 (i386_length_and_rw_bits): Renamed to
6093 i386_dr_length_and_rw_bits and made nonstatic.
6094 All uses updated.
6095 (i386_insert_aligned_watchpoint): Renamed to
6096 i386_dr_insert_aligned_watchpoint and made nonstatic.
6097 All uses updated.
6098 (i386_remove_aligned_watchpoint): Renamed to
6099 i386_dr_remove_aligned_watchpoint and made nonstatic.
6100 All uses updated.
6101 (i386_update_inferior_debug_regs): Renamed to
6102 i386_dr_update_inferior_debug_regs and made nonstatic.
6103 All uses updated.
6104 (i386_low_insert_watchpoint): Renamed to
6105 i386_dr_insert_watchpoint. All uses updated.
6106 (i386_low_remove_watchpoint): Renamed to
6107 i386_dr_remove_watchpoint. All uses updated.
6108 (i386_low_region_ok_for_watchpoint): Renamed to
6109 i386_dr_region_ok_for_watchpoint. All uses updated.
6110 (i386_low_stopped_data_address): Renamed to
6111 i386_dr_stopped_data_address. All uses updated.
6112 (i386_low_stopped_by_watchpoint): Renamed to
6113 i386_dr_stopped_by_watchpoint. All uses updated.
6114
6115 2014-06-18 Gary Benson <gbenson@redhat.com>
6116
6117 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6118 (i386_dr_low_can_set_control): Likewise.
6119 (i386_insert_aligned_watchpoint): New check.
6120
6121 2014-06-18 Gary Benson <gbenson@redhat.com>
6122
6123 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6124 Renamed to state.
6125
6126 2014-06-18 Gary Benson <gbenson@redhat.com>
6127
6128 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6129 instead of fatal and error.
6130 (i386_handle_nonaligned_watchpoint): Likewise.
6131
6132 2014-06-18 Gary Benson <gbenson@redhat.com>
6133
6134 * i386-low.c (i386_get_debug_register_length): New macro.
6135 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6136 (i386_show_dr): Use debug_printf instead of fprintf. Use
6137 phex to format values.
6138
6139 2014-06-18 Gary Benson <gbenson@redhat.com>
6140
6141 * i386-low.h: Comment changes.
6142 * i386-low.c: Likewise.
6143
6144 2014-06-18 Gary Benson <gbenson@redhat.com>
6145
6146 * i386-low.c: Whitespace changes.
6147
6148 2014-06-12 Tom Tromey <tromey@redhat.com>
6149
6150 * utils.c (freeargv): Remove.
6151
6152 2014-06-12 Tom Tromey <tromey@redhat.com>
6153
6154 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6155 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6156 (parse_debug_format_options): Likewise.
6157 (gdbserver_usage): Likewise.
6158 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6159 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6160 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6161 against libiberty.
6162 ($(LIBGNU)): Depend on libiberty.
6163 (all-lib): Recurse into all subdirs.
6164 (install-only): Invoke "install" target in subdirs.
6165 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6166 targets.
6167 * configure: Rebuild.
6168 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6169 for vasprintf, vsnprintf, or gettimeofday.
6170 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6171 srv_tgtobj.
6172
6173 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6174
6175 * development.sh: Delete.
6176 * Makefile.in (config.status): Adjust dependency on development.sh.
6177 * configure.ac: Adjust development.sh source call.
6178 * configure: Regenerate.
6179
6180 2014-06-02 Pedro Alves <palves@redhat.com>
6181
6182 * ax.c (gdb_free_agent_expr): New function.
6183 * ax.h (gdb_free_agent_expr): New declaration.
6184 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6185 list.
6186 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6187 static.
6188 (clear_breakpoint_conditions_and_commands): New function.
6189 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6190 (clear_breakpoint_conditions_and_commands): New declaration.
6191
6192 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6193
6194 * linux-aarch64-low.c (asm/ptrace.h): Include.
6195
6196 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6197
6198 Fix TLS access for -static -pthread.
6199 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6200 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6201 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6202
6203 2014-05-20 Pedro Alves <palves@redhat.com>
6204
6205 * linux-aarch64-low.c (aarch64_insert_point)
6206 (aarch64_remove_point): No longer check whether the type is
6207 supported here. Adjust to new interface.
6208 (the_low_target): Install aarch64_supports_z_point_type as
6209 supports_z_point_type method.
6210 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6211 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6212 instead of a Z packet char. Adjust.
6213 (arm_supports_z_point_type): New function.
6214 (arm_insert_point, arm_remove_point): Adjust to new interface.
6215 (the_low_target): Install arm_supports_z_point_type.
6216 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6217 (cris_insert_point, cris_remove_point): Adjust to new interface.
6218 Don't check whether the type is supported here.
6219 (the_low_target): Install cris_supports_z_point_type.
6220 * linux-low.c (linux_supports_z_point_type): New function.
6221 (linux_insert_point, linux_remove_point): Adjust to new interface.
6222 * linux-low.h (struct linux_target_ops) <insert_point,
6223 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6224 raw_breakpoint pointer parameter.
6225 <supports_z_point_type>: New method.
6226 * linux-mips-low.c (mips_supports_z_point_type): New function.
6227 (mips_insert_point, mips_remove_point): Adjust to new interface.
6228 Use mips_supports_z_point_type.
6229 (the_low_target): Install mips_supports_z_point_type.
6230 * linux-ppc-low.c (the_low_target): Install NULL as
6231 supports_z_point_type method.
6232 * linux-s390-low.c (the_low_target): Install NULL as
6233 supports_z_point_type method.
6234 * linux-sparc-low.c (the_low_target): Install NULL as
6235 supports_z_point_type method.
6236 * linux-x86-low.c (x86_supports_z_point_type): New function.
6237 (x86_insert_point): Adjust to new insert_point interface. Use
6238 insert_memory_breakpoint. Adjust to new
6239 i386_low_insert_watchpoint interface.
6240 (x86_remove_point): Adjust to remove_point interface. Use
6241 remove_memory_breakpoint. Adjust to new
6242 i386_low_remove_watchpoint interface.
6243 (the_low_target): Install x86_supports_z_point_type.
6244 * lynx-low.c (lynx_target_ops): Install NULL as
6245 supports_z_point_type callback.
6246 * nto-low.c (nto_supports_z_point_type): New.
6247 (nto_insert_point, nto_remove_point): Adjust to new interface.
6248 (nto_target_ops): Install nto_supports_z_point_type.
6249 * mem-break.c: Adjust intro comment.
6250 (struct raw_breakpoint) <raw_type, size>: New fields.
6251 <inserted>: Update comment.
6252 <shlib_disabled>: Delete field.
6253 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6254 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6255 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6256 (raw_bkpt_type_to_target_hw_bp_type): New function.
6257 (find_enabled_raw_code_breakpoint_at): New function.
6258 (find_raw_breakpoint_at): New type and size parameters. Use them.
6259 (insert_memory_breakpoint): New function, based off
6260 set_raw_breakpoint_at.
6261 (remove_memory_breakpoint): New function.
6262 (set_raw_breakpoint_at): Reimplement.
6263 (set_breakpoint): New, based on set_breakpoint_at.
6264 (set_breakpoint_at): Reimplement.
6265 (delete_raw_breakpoint): Go through the_target->remove_point
6266 instead of assuming memory breakpoints.
6267 (find_gdb_breakpoint_at): Delete.
6268 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6269 (find_gdb_breakpoint): New function.
6270 (set_gdb_breakpoint_at): Delete.
6271 (z_type_supported): New function.
6272 (set_gdb_breakpoint_1): New function, loosely based off
6273 set_gdb_breakpoint_at.
6274 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6275 (delete_gdb_breakpoint_at): Delete.
6276 (delete_gdb_breakpoint_1): New function, loosely based off
6277 delete_gdb_breakpoint_at.
6278 (delete_gdb_breakpoint): New function.
6279 (clear_gdb_breakpoint_conditions): Rename to ...
6280 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6281 breakpoint.
6282 (add_condition_to_breakpoint): Make static.
6283 (add_breakpoint_condition): Take a struct breakpoint pointer
6284 instead of an address. Adjust.
6285 (gdb_condition_true_at_breakpoint): Rename to ...
6286 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6287 z_type parameter.
6288 (gdb_condition_true_at_breakpoint): Reimplement.
6289 (add_breakpoint_commands): Take a struct breakpoint pointer
6290 instead of an address. Adjust.
6291 (gdb_no_commands_at_breakpoint): Rename to ...
6292 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6293 parameter. Return true if no breakpoint was found. Change debug
6294 output.
6295 (gdb_no_commands_at_breakpoint): Reimplement.
6296 (run_breakpoint_commands): Rename to ...
6297 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6298 and change return type to boolean.
6299 (run_breakpoint_commands): New function.
6300 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6301 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6302 breakpoint. Go through the_target->remove_point instead of
6303 assuming memory breakpoint.
6304 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6305 software and hardware breakpoints.
6306 (reinsert_raw_breakpoint): Go through the_target->insert_point
6307 instead of assuming memory breakpoint.
6308 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6309 software and hardware breakpoints.
6310 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6311 Check both software and hardware breakpoints.
6312 (validate_inserted_breakpoint): Assert the breakpoint is a
6313 software breakpoint. Set the inserted flag to -1 instead of
6314 setting shlib_disabled.
6315 (delete_disabled_breakpoints): Adjust.
6316 (validate_breakpoints): Only validate software breakpoints.
6317 Adjust to inserted flag change.
6318 (check_mem_read, check_mem_write): Skip breakpoint types other
6319 than software breakpoints. Adjust to inserted flag change.
6320 * mem-break.h (enum raw_bkpt_type): New enum.
6321 (raw_breakpoint, struct process_info): Forward declare.
6322 (Z_packet_to_target_hw_bp_type): Delete declaration.
6323 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6324 (set_gdb_breakpoint, delete_gdb_breakpoint)
6325 (clear_breakpoint_conditions): New declarations.
6326 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6327 (breakpoint_inserted_here): Update comment.
6328 (add_breakpoint_condition, add_breakpoint_commands): Replace
6329 address parameter with a breakpoint pointer parameter.
6330 (gdb_breakpoint_here): Update comment.
6331 (delete_gdb_breakpoint_at): Delete.
6332 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6333 * server.c (process_point_options): Take a struct breakpoint
6334 pointer instead of an address. Adjust.
6335 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6336 delete_gdb_breakpoint.
6337 * spu-low.c (spu_target_ops): Install NULL as
6338 supports_z_point_type method.
6339 * target.h: Include mem-break.h.
6340 (struct target_ops) <prepare_to_access_memory>: Update comment.
6341 <supports_z_point_type>: New field.
6342 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6343 instead of a char. Also take a raw breakpoint pointer.
6344 * win32-arm-low.c (the_low_target): Install NULL as
6345 supports_z_point_type.
6346 * win32-i386-low.c (i386_supports_z_point_type): New function.
6347 (i386_insert_point, i386_remove_point): Adjust to new interface.
6348 (the_low_target): Install i386_supports_z_point_type.
6349 * win32-low.c (win32_supports_z_point_type): New function.
6350 (win32_insert_point, win32_remove_point): Adjust to new interface.
6351 (win32_target_ops): Install win32_supports_z_point_type.
6352 * win32-low.h (struct win32_target_ops):
6353 <supports_z_point_type>: New method.
6354 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6355 instead of a char. Also take a raw breakpoint pointer.
6356
6357 2014-05-20 Pedro Alves <palves@redhat.com>
6358
6359 * mem-break.h: Include break-common.h.
6360 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6361 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6362 (Z_packet_to_target_hw_bp_type): New declaration.
6363 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6364 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6365 (Z_PACKET_ACCESS_WP): Delete macros.
6366 (Z_packet_to_hw_type): Delete function.
6367 * i386-low.h: Don't include break-common.h here.
6368 (Z_packet_to_hw_type): Delete declaration.
6369 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6370 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6371 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6372 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6373 * linux-aarch64-low.c: Don't include break-common.h here.
6374 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6375 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6376 (Z_packet_to_target_hw_bp_type): Delete function.
6377 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6378 function.
6379 (mips_insert_point, mips_remove_point): Use
6380 Z_packet_to_target_hw_bp_type.
6381
6382 2014-05-20 Pedro Alves <palves@redhat.com>
6383
6384 * linux-aarch64-low.c: Include break-common.h.
6385 (enum target_point_type): Delete.
6386 (Z_packet_to_point_type): Rename to ...
6387 (Z_packet_to_target_hw_bp_type): ... this, and return a
6388 target_hw_bp_type instead.
6389 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6390 instead of an enum target_point_type.
6391 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6392 breakpoint type.
6393 (aarch64_dr_state_insert_one_point)
6394 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6395 (aarch64_handle_aligned_watchpoint)
6396 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6397 Take an enum target_hw_bp_type instead of an enum
6398 target_point_type.
6399 (aarch64_supports_z_point_type): New function.
6400 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6401 use Z_packet_to_target_hw_bp_type.
6402
6403 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6404
6405 * configure.ac: Only use -Werror by default when DEVELOPMENT
6406 is true.
6407 * configure: Regenerate.
6408
6409 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6410
6411 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6412 * linux-x86-low.c (X86_64_USER_REGS): New.
6413 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6414
6415 2014-04-28 Yao Qi <yao@codesourcery.com>
6416
6417 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6418 name.
6419
6420 2014-04-25 Pedro Alves <palves@redhat.com>
6421
6422 PR server/16255
6423 * linux-low.c (linux_attach_fail_reason_string): New function.
6424 (linux_attach_lwp): Delete.
6425 (linux_attach_lwp_1): Rename to ...
6426 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6427 argument. Remove "initial" parameter. Return int instead of
6428 void. Don't error or warn here.
6429 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6430 failure to attach to the tgid. Call warning when failing to
6431 attach to an lwp.
6432 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6433 argument. Remove "initial" parameter. Return int instead of
6434 void. Don't error or warn here.
6435 (linux_attach_fail_reason_string): New declaration.
6436 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6437 interface change. Use linux_attach_fail_reason_string.
6438
6439 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6440 Walfred Tedeschi <walfred.tedeschi@intel.com>
6441
6442 * Makefile.in: Added rules to handle new files
6443 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6444 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6445 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6446 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6447 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6448 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6449 x32-avx512-linux.o.
6450 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6451 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6452 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6453 i386/x32-avx512.xml.
6454 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6455 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6456 i386/x32-avx512-linux.xml.
6457 * i387-fp.c (num_avx512_k_registers): New constant for number
6458 of K registers.
6459 (num_avx512_zmmh_low_registers): New constant for number of
6460 lower ZMM registers (0-15).
6461 (num_avx512_zmmh_high_registers): New constant for number of
6462 higher ZMM registers (16-31).
6463 (num_avx512_ymmh_registers): New contant for number of higher
6464 YMM registers (ymm16-31 added by avx521 on x86_64).
6465 (num_avx512_xmm_registers): New constant for number of higher
6466 XMM registers (xmm16-31 added by AVX512 on x86_64).
6467 (struct i387_xsave): Add space for AVX512 registers.
6468 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6469 Add code to handle AVX512 registers.
6470 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6471 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6472 prototypei from generated file.
6473 (tdesc_amd64_avx512_linux): Likewise.
6474 (init_registers_x32_avx512_linux): Likewise.
6475 (tdesc_x32_avx512_linux): Likewise.
6476 (init_registers_i386_avx512_linux): Likewise.
6477 (tdesc_i386_avx512_linux): Likewise.
6478 (x86_64_regmap): Add AVX512 registers.
6479 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6480 mask.
6481 (initialize_low_arch): Add code to initialize AVX512 registers.
6482
6483 2014-04-23 Pedro Alves <palves@redhat.com>
6484
6485 * mem-break.c (find_gdb_breakpoint_at): Make static.
6486 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6487
6488 2014-04-23 Pedro Alves <palves@redhat.com>
6489
6490 * i386-low.c: Don't include break-common.h here.
6491 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6492 prototype to take target_hw_bp_type as argument instead of a Z
6493 packet char.
6494 * i386-low.h: Include break-common.h here.
6495 (Z_packet_to_hw_type): Declare.
6496 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6497 prototypes.
6498 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6499 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6500 (x86_remove_point): Convert the packet number to a
6501 target_hw_bp_type before calling i386_low_remove_watchpoint.
6502 * win32-i386-low.c (i386_insert_point): Convert the packet number
6503 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6504 (i386_remove_point): Convert the packet number to a
6505 target_hw_bp_type before calling i386_low_remove_watchpoint.
6506
6507 2014-04-23 Pedro Alves <palves@redhat.com>
6508
6509 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6510
6511 2014-04-10 Pedro Alves <palves@redhat.com>
6512
6513 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6514 Check if the condition or command is NULL before checking if the
6515 breakpoint is known. On success, return true.
6516 * mem-break.h (add_breakpoint_condition): Document return.
6517 (add_breakpoint_commands): Add describing comment.
6518 * server.c (skip_to_semicolon): New function.
6519 (process_point_options): Use it.
6520
6521 2014-04-09 Pedro Alves <palves@redhat.com>
6522
6523 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6524 to lwpid_of.
6525
6526 2014-02-27 Pedro Alves <palves@redhat.com>
6527
6528 PR 12702
6529 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6530 macros.
6531 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6532 output.
6533 (last_thread_of_process_p): Take a PID argument instead of a
6534 thread pointer.
6535 (linux_wait_for_lwp): Delete.
6536 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6537 functions.
6538 (linux_low_filter_event): New function, party factored out from
6539 linux_wait_for_event.
6540 (linux_wait_for_event): Rename to ...
6541 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6542 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6543 sigsuspend. Check for zombie leaders.
6544 (linux_wait_for_event): Reimplement as wrapper around
6545 linux_wait_for_event_filtered.
6546 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6547 a normal or signal exit is seen, it's the whole process exiting.
6548 (wait_for_sigstop): No longer a for_each_inferior callback.
6549 Rewrite on top of linux_wait_for_event_filtered.
6550 (stop_all_lwps): Call wait_for_sigstop directly.
6551 * server.c (resume, handle_target_event): Handle
6552 TARGET_WAITKIND_NO_RESUMED.
6553
6554 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6555
6556 * win32-low.c (psapi_get_dll_name,
6557 * win32_CreateToolhelp32Snapshot): Delete.
6558 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6559 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6560 Delete.
6561 (handle_load_dll): Add function description.
6562 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6563
6564 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6565
6566 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6567 Add comment.
6568 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6569 base address when calling win32_add_one_solib.
6570 (handle_load_dll): Delete local variable load_addr.
6571 Remove 0x1000 offset applied to DLL base address when calling
6572 win32_add_one_solib.
6573 (handle_unload_dll): Add comment.
6574
6575 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6576
6577 * win32-low.c (win32_add_all_dlls): Renames
6578 win32_ensure_ntdll_loaded. Rewrite function documentation.
6579 Adjust implementation to always load all DLLs.
6580 Add 0x1000 offset to DLL base address when calling
6581 win32_add_one_solib.
6582 (child_initialization_done): New static global.
6583 (do_initial_child_stuff): Set child_initialization_done to
6584 zero during child initialization, and 1 after. Replace call
6585 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6586 Add comment.
6587 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6588 (handle_unload_dll): Add function documentation.
6589 (get_child_debug_event): Ignore load and unload DLL events
6590 during child initialization.
6591
6592 2014-02-20 Doug Evans <dje@google.com>
6593
6594 Remove global all_lwps.
6595 * inferiors.h (ptid_of): Move here from linux-low.h.
6596 (pid_of, lwpid_of): Ditto.
6597 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6598 parameter is a struct thread_info * now.
6599 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6600 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6601 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6602 directly.
6603 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6604 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6605 * linux-arm-low.c (update_registers_callback): Update, "entry"
6606 parameter is a struct thread_info * now.
6607 Fetch lwpid from current_inferior directly.
6608 (arm_insert_point): Pass &all_threads to find_inferior instead of
6609 &all_lwps.
6610 (arm_remove_point): Ditto.
6611 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6612 (arm_prepare_to_resume): Fetch pid from thread.
6613 (arm_read_description): Fetch lwpid from current_inferior directly.
6614 * linux-low.c (all_lwps): Delete.
6615 (delete_lwp): Delete call to remove_inferior.
6616 (handle_extended_wait): Fetch lwpid from thread.
6617 (add_lwp): Don't set lwp->entry.id. Remove call to
6618 add_inferior_to_list.
6619 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6620 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6621 (kill_one_lwp_callback): Ditto.
6622 (linux_kill): Don't dereference NULL pointer.
6623 Fetch ptid,lwpid from thread.
6624 (get_detach_signal): Fetch ptid from thread.
6625 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6626 Simplify call to regcache_invalidate_thread.
6627 (delete_lwp_callback): Update, "entry" parameter is a
6628 struct thread_info * now. Fetch pid from thread.
6629 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6630 (status_pending_p_callback): Update, "entry" parameter is a
6631 struct thread_info * now. Fetch ptid from thread.
6632 (find_lwp_pid): Update, "entry" parameter is a
6633 struct thread_info * now.
6634 (linux_wait_for_lwp): Fetch pid from thread.
6635 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6636 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6637 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6638 (dequeue_one_deferred_signal): Ditto.
6639 (cancel_breakpoint): Fetch ptid from current_inferior.
6640 (linux_wait_for_event): Pass &all_threads to find_inferior,
6641 not &all_lwps. Fetch ptid, lwpid from thread.
6642 (count_events_callback): Update, "entry" parameter is a
6643 struct thread_info * now.
6644 (select_singlestep_lwp_callback): Ditto.
6645 (select_event_lwp_callback): Ditto.
6646 (cancel_breakpoints_callback): Ditto.
6647 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6648 not &all_lwps.
6649 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6650 (unsuspend_one_lwp): Update, "entry" parameter is a
6651 struct thread_info * now.
6652 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6653 not &all_lwps.
6654 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6655 Fetch lwpid from thread, not lwp.
6656 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6657 Pass &all_threads to find_inferior, not &all_lwps.
6658 (send_sigstop): Fetch lwpid from thread, not lwp.
6659 (send_sigstop_callback): Update, "entry" parameter is a
6660 struct thread_info * now.
6661 (suspend_and_send_sigstop_callback): Ditto.
6662 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6663 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6664 struct thread_info * now.
6665 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6666 from thread, lwp.
6667 (lwp_running): Update, "entry" parameter is a
6668 struct thread_info * now.
6669 (stop_all_lwps): Fetch ptid from thread.
6670 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6671 (linux_resume_one_lwp): Fetch lwpid from thread.
6672 (linux_set_resume_request): Update, "entry" parameter is a
6673 struct thread_info * now. Fetch pid, lwpid from thread.
6674 (resume_status_pending_p): Update, "entry" parameter is a
6675 struct thread_info * now.
6676 (need_step_over_p): Ditto. Fetch lwpid from thread.
6677 (start_step_over): Fetch lwpid from thread.
6678 (linux_resume_one_thread): Update, "entry" parameter is a
6679 struct thread_info * now. Fetch lwpid from thread.
6680 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6681 (proceed_one_lwp): Update, "entry" parameter is a
6682 struct thread_info * now. Fetch lwpid from thread.
6683 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6684 struct thread_info * now.
6685 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6686 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6687 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6688 directly.
6689 (regsets_store_inferior_registers): Ditto.
6690 (fetch_register, store_register): Ditto.
6691 (linux_read_memory, linux_write_memory): Ditto.
6692 (linux_request_interrupt): Ditto.
6693 (linux_read_auxv): Ditto.
6694 (linux_xfer_siginfo): Ditto.
6695 (linux_qxfer_spu): Ditto.
6696 (linux_qxfer_libraries_svr4): Ditto.
6697 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6698 moved to inferiors.h.
6699 (get_lwp): Delete.
6700 (get_thread_lwp): Update.
6701 (struct lwp_info): Delete member "entry". Simplify comment for
6702 member "thread".
6703 (all_lwps): Delete.
6704 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6705 current_inferior directly.
6706 (update_watch_registers_callback): Update, "entry" parameter is a
6707 struct thread_info * now. Fetch pid from thread.
6708 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6709 (mips_insert_point): Fetch lwpid from current_inferior.
6710 Pass &all_threads to find_inferior, not &all_lwps.
6711 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6712 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6713 directly.
6714 (mips_stopped_data_address): Ditto.
6715 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6716 directly.
6717 * linux-tile-low.c (tile_arch_setup): Ditto.
6718 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6719 (update_debug_registers_callback): Update, "entry" parameter is a
6720 struct thread_info * now. Fetch pid from thread.
6721 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6722 Pass &all_threads to find_inferior, not &all_lwps.
6723 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6724 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6725 Pass &all_threads to find_inferior, not &all_lwps.
6726 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6727 (i386_dr_low_get_status): Ditto.
6728 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6729 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6730 (x86_linux_read_description): Ditto.
6731 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6732
6733 2014-02-20 Doug Evans <dje@google.com>
6734
6735 * inferiors.c (get_first_inferior): Fix buglet.
6736
6737 2014-02-19 Doug Evans <dje@google.com>
6738
6739 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6740 * inferiors.c (add_thread): Change result type to struct thread_info *.
6741 All callers updated.
6742 (add_lwp): Call add_thread here instead of in callers.
6743 All callers updated.
6744 * linux-low.h (get_lwp_thread): Rewrite.
6745 (struct lwp_info): New member "thread".
6746
6747 2014-02-19 Doug Evans <dje@google.com>
6748
6749 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6750 All callers updated.
6751
6752 2014-02-19 Doug Evans <dje@google.com>
6753
6754 * inferiors.c (add_thread): Fix whitespace.
6755
6756 2014-02-19 Doug Evans <dje@google.com>
6757
6758 * dll.c (clear_dlls): Replace accessing list implemention details
6759 with API function.
6760 * gdbthread.h (get_first_thread): Declare.
6761 * inferiors.c (for_each_inferior_with_data): New function.
6762 (get_first_thread): New function.
6763 (find_thread_ptid): Simplify.
6764 (get_first_inferior): New function.
6765 (clear_list): Delete.
6766 (one_inferior_p): New function.
6767 (clear_inferior_list): New function.
6768 (clear_inferiors): Update.
6769 * inferiors.h (for_each_inferior_with_data): Declare.
6770 (clear_inferior_list): Declare.
6771 (one_inferior_p): Declare.
6772 (get_first_inferior): Declare.
6773 * linux-low.c (linux_wait_for_event): Replace accessing list
6774 implemention details with API function.
6775 * server.c (target_running): Ditto.
6776 (accumulate_file_name_length): New function.
6777 (emit_dll_description): New function.
6778 (handle_qxfer_libraries): Replace accessing list implemention
6779 details with API function.
6780 (handle_qxfer_threads_worker): New function.
6781 (handle_qxfer_threads_proper): Replace accessing list implemention
6782 details with API function.
6783 (handle_query): Ditto.
6784 (visit_actioned_threads_callback_ftype): New typedef.
6785 (visit_actioned_threads_data): New struct.
6786 (visit_actioned_threads): Rewrite to be find_inferior callback.
6787 (resume): Call find_inferior.
6788 (handle_status): Replace accessing list implemention
6789 details with API function.
6790 (process_serial_event): Replace accessing list implemention details
6791 with API function.
6792 * target.c (set_desired_inferior): Replace accessing list implemention
6793 details with API function.
6794 * tracepoint.c (same_process_p): New function.
6795 (gdb_agent_about_to_close): Replace accessing list implemention
6796 details with API function.
6797 * win32-low.c (child_delete_thread): Replace accessing list
6798 implemention details with API function.
6799 (match_dll_by_basename): New function.
6800 (dll_is_loaded_by_basename): New function.
6801 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6802 details call to dll_is_loaded_by_basename.
6803
6804 2014-02-19 Doug Evans <dje@google.com>
6805
6806 * dll.h (struct dll_info): Add comment.
6807 * gdbthread.h (struct thread_info): Add comment.
6808 (current_ptid): Simplify.
6809 * inferiors.c (add_process): Update.
6810 (remove_process): Update.
6811 * inferiors.h (struct process_info): Rename member "head" to "entry".
6812 * linux-low.c (delete_lwp): Update.
6813 (add_lwp): Update.
6814 (last_thread_of_process_p): Update.
6815 (kill_one_lwp_callback, linux_kill): Update.
6816 (status_pending_p_callback): Update.
6817 (wait_for_sigstop): Update. Simplify read of ptid.
6818 (start_step_over): Update.
6819 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6820 (get_lwp_thread): Update.
6821 (struct lwp_info): Rename member "head" to "entry".
6822 * regcache.h (inferior_list_entry): Delete.
6823 * server.c (kill_inferior_callback): Update.
6824 (detach_or_kill_inferior_callback): Update.
6825 (print_started_pid): Update.
6826 (print_attached_pid): Update.
6827 (process_serial_event): Simplify read of ptid.
6828 * thread-db.c (thread_db_create_event): Update.
6829 (thread_db_get_tls_address): Update.
6830 * win32-low.c (current_inferior_ptid): Simplify.
6831
6832 2014-02-19 Tom Tromey <tromey@redhat.com>
6833
6834 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6835 argument.
6836 (target_supports_btrace): Update.
6837
6838 2014-02-14 Yao Qi <yao@codesourcery.com>
6839
6840 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6841 (rsp-low-ipa.o): New target.
6842
6843 2014-02-12 Tom Tromey <tromey@redhat.com>
6844
6845 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6846 convert_ascii_to_int.
6847 * regcache.c (registers_to_string): Likewise.
6848 * remote-utils.c (decode_M_packet): Likewise.
6849 * server.c (process_serial_event): Likewise.
6850
6851 2014-02-12 Tom Tromey <tromey@redhat.com>
6852
6853 * server.c (handle_query, handle_v_run): Use hex2bin, not
6854 unhexify.
6855 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6856
6857 2014-02-12 Tom Tromey <tromey@redhat.com>
6858
6859 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6860 convert_int_to_ascii.
6861 * regcache.c (registers_to_string, collect_register_as_string):
6862 Likewise.
6863 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6864 Likewise.
6865 * server.c (process_serial_event): Likewise.
6866 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6867 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6868
6869 2014-02-12 Tom Tromey <tromey@redhat.com>
6870
6871 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6872 bin2hex, not hexify.
6873 * tracepoint.c (cmd_qtstatus): Likewise.
6874
6875 2014-02-12 Tom Tromey <tromey@redhat.com>
6876
6877 * remote-utils.c (monitor_output): Pass explicit length to
6878 hexify.
6879
6880 2014-02-12 Tom Tromey <tromey@redhat.com>
6881
6882 * tracepoint.c: Include rsp-low.h.
6883 * server.c: Include rsp-low.h.
6884 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6885 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6886 declare.
6887 * remote-utils.c: Include rsp-low.h.
6888 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6889 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6890 (convert_int_to_ascii, convert_ascii_to_int): Move to
6891 common/rsp-low.c.
6892 * regcache.c: Include rsp-low.h.
6893 * ax.c: Include rsp-low.h.
6894 * Makefile.in (SFILES): Add common/rsp-low.c.
6895 (OBS): Add rsp-low.o.
6896 (rsp-low.o): New target.
6897
6898 2014-02-12 Tom Tromey <tromey@redhat.com>
6899
6900 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6901 Include print-utils.h.
6902 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6903 (plongest, thirty_two, phex_nz): Remove.
6904 * Makefile.in (SFILES): Add common/print-utils.c.
6905 (OBS): Add print-utils.o.
6906 (print-utils-ipa.o): New target.
6907 (print-utils.o): New target.
6908 (IPA_OBJS): Add print-utils-ipa.o.
6909
6910 2014-02-06 Tom Tromey <tromey@redhat.com>
6911
6912 * Makefile.in (SFILES): Fix indentation.
6913
6914 2014-02-05 Doug Evans <dje@google.com>
6915
6916 * linux-low.c (linux_wait_for_event): Improve comment.
6917 (linux_wait_1): Keep current_inferior in sync with event_child.
6918
6919 2014-01-22 Doug Evans <dje@google.com>
6920
6921 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6922
6923 2014-01-22 Doug Evans <dje@google.com>
6924
6925 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6926 * configure: Regenerate.
6927 * config.in: Regenerate.
6928 * Makefile.in (SFILES): Add debug.c.
6929 (OBS): Add debug.o.
6930 * debug.c: New file.
6931 * debug.h: New file.
6932 * linux-aarch64-low.c (*): Update all debugging printfs to use
6933 debug_printf instead of fprintf.
6934 * linux-arm-low.c (*): Ditto.
6935 * linux-cris-low.c (*): Ditto.
6936 * linux-crisv32-low.c (*): Ditto.
6937 * linux-m32r-low.c (*): Ditto.
6938 * linux-sparc-low.c (*): Ditto.
6939 * linux-x86.c (*): Ditto.
6940 * linux-low.c (*): Ditto.
6941 (linux_wait_1): Add calls to debug_enter, debug_exit.
6942 (linux_wait): Remove redundant debugging printf.
6943 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6944 (linux_resume, unstop_all_lwps): Ditto.
6945 * mem-break.c (*): Update all debugging printfs to use
6946 debug_printf instead of fprintf.
6947 * remote-utils.c (*): Ditto.
6948 * thread-db.c (*): Ditto.
6949 * server.c #include <ctype.h>, "gdb_vecs.h".
6950 (debug_threads): Moved to debug.c.
6951 (*): Update all debugging printfs to use debug_printf instead of
6952 fprintf.
6953 (start_inferior): Replace call to fflush with call to debug_flush.
6954 (monitor_show_help): Mention set debug-format.
6955 (parse_debug_format_options): New function.
6956 (handle_monitor_command): Handle "monitor set debug-format".
6957 (gdbserver_usage): Mention --debug-format.
6958 (main): Parse --debug-format.
6959 * server.h (debug_threads): Declaration moved to debug.h.
6960 #include "debug.h".
6961 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6962 trace_debug_1 that uses debug_printf.
6963 (tracepoint_look_up_symbols): Update all debugging printfs to use
6964 debug_printf instead of fprintf.
6965
6966 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6967
6968 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6969 sys/ptrace.h.
6970
6971 2014-01-17 Pedro Alves <palves@redhat.com>
6972
6973 PR build/16445
6974 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6975 defined after including gdb_proc_service.h.
6976
6977 2014-01-16 Doug Evans <dje@google.com>
6978
6979 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6980 (match_dll): Use it.
6981
6982 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6983
6984 * target.h (target_ops) <read_btrace>: Change parameters and
6985 return type to allow error reporting.
6986 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6987 trace reading errors on.
6988 * linux-low.c (linux_low_read_btrace): Pass trace reading
6989 errors on.
6990 (linux_low_disable_btrace): New.
6991
6992 2014-01-15 Doug Evans <dje@google.com>
6993
6994 * inferiors.c (thread_id_to_gdb_id): Delete.
6995 * inferiors.h (thread_id_to_gdb_id): Delete.
6996
6997 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6998
6999 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7000 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7001 versions.
7002
7003 2014-01-08 Pedro Alves <palves@redhat.com>
7004
7005 * server.c (handle_status): Don't discard previous queued stop
7006 replies or thread's pending status here.
7007 (main) <disconnection>: Do it here instead.
7008
7009 2014-01-08 Pedro Alves <palves@redhat.com>
7010
7011 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7012 * server.c (visit_actioned_threads, handle_pending_status): New
7013 function.
7014 (handle_v_cont): Factor out parts to ...
7015 (resume): ... this new function. If in all-stop, and a thread
7016 being resumed has a pending status, report it without actually
7017 resuming.
7018 (myresume): Adjust to use the new 'resume' function.
7019 (clear_pending_status_callback, set_pending_status_callback)
7020 (find_status_pending_thread_callback): New functions.
7021 (handle_status): Handle the case of multiple threads having
7022 interesting statuses to report. Report threads' real last signal
7023 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7024 with an interesting thread to report the status for, instead of
7025 always reporting the status of the first thread.
7026
7027 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7028
7029 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7030 * gdbreplay.c (gdbreplay_version): Likewise.
7031
7032 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7033
7034 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7035 iov.iov_len with the real length in use.
7036
7037 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7038
7039 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7040 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7041 for all targets that use win32-low.c.
7042 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7043 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7044
7045 2013-12-13 Pedro Alves <palves@redhat.com>
7046
7047 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7048 if equal to TARGET_WAITKIND_LOADED.
7049 * win32-low.c (cached_status): New static global.
7050 (win32_wait): Add declaration.
7051 (do_initial_child_stuff): Flush all initial pending debug events
7052 up to the initial breakpoint.
7053 (win32_wait): If CACHED_STATUS was set, return that instead
7054 of doing a real wait. Remove the code resuming the execution
7055 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7056 during the initial phase. Also remove the code changing
7057 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7058 TARGET_WAITKIND_STOPPED.
7059
7060 2013-12-11 Yao Qi <yao@codesourcery.com>
7061
7062 * notif.c (handle_notif_ack): Return 0 if no notification
7063 matches.
7064
7065 2013-11-20 Doug Evans <dje@google.com>
7066
7067 * linux-low.c (linux_set_resume_request): Fix comment.
7068
7069 2013-11-20 Doug Evans <dje@google.com>
7070
7071 * linux-low.c (resume_status_pending_p): Tweak comment.
7072
7073 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7074
7075 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7076 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7077 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7078 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7079 (srv_amd64_regobj): Add amd64-mpx.o.
7080 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7081 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7082 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7083 * i387-fp.c (num_pl_bnd_register) Added constant.
7084 (num_pl_bnd_cfg_registers) Added constant.
7085 (struct i387_xsave) Added reserved area and MPX fields.
7086 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7087 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7088 function.
7089 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7090 (init_registers_amd64_mpx_linux): Declare new function.
7091 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7092 (x86_64_regmap): Add MPX registers.
7093 (x86_linux_read_description): Add MPX case.
7094 (initialize_low_arch): Initialize MPX targets.
7095
7096 2013-11-18 Tom Tromey <tromey@redhat.com>
7097
7098 * configure: Rebuild.
7099 * configure.ac: Don't check for stdlib.h.
7100 * gdbreplay.c: Unconditionally include stdlib.h.
7101
7102 2013-11-18 Tom Tromey <tromey@redhat.com>
7103
7104 * config.in: Rebuild.
7105 * configure: Rebuild.
7106 * configure.ac: Don't use AC_HEADER_DIRENT.
7107
7108 2013-11-18 Tom Tromey <tromey@redhat.com>
7109
7110 * server.h: Don't check HAVE_STRING_H.
7111 * gdbreplay.c: Don't check HAVE_STRING_H.
7112 * configure: Rebuild.
7113
7114 2013-11-18 Tom Tromey <tromey@redhat.com>
7115
7116 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7117 LIBGNU.
7118
7119 2013-11-08 Tom Tromey <tromey@redhat.com>
7120
7121 * configure, config.in: Rebuild.
7122 * configure.ac: Remove unused configury.
7123
7124 2013-11-08 Tom Tromey <tromey@redhat.com>
7125
7126 * acinclude.m4: Include common.m4, codeset.m4.
7127 * configure, config.in: Rebuild.
7128 * configure.ac: Use GDB_AC_COMMON.
7129
7130 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7131
7132 * linux-s390-low.c (HWCAP_S390_TE): New define.
7133 (s390_arch_setup): Consider the TE field in the HWCAP for
7134 determining 'have_regset_tdb'.
7135
7136 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7137
7138 PR gdb/16014
7139 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7140 call to sizeof.
7141
7142 2013-10-02 Pedro Alves <palves@redhat.com>
7143
7144 * server.c (process_serial_event): Don't output "GDBserver
7145 exiting" if GDB is connected through stdio.
7146 * target.c (mywait): Likewise, be silent if GDB is connected
7147 through stdio.
7148
7149 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7150
7151 * lynx-low.c (lynx_add_threads_after_attach): New function.
7152 (lynx_attach): Remove call to add_thread. Add call to
7153 lynx_add_threads_after_attach instead.
7154
7155 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7156
7157 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7158 * config.in, configure: Regenerated.
7159
7160 2013-09-18 Yao Qi <yao@codesourcery.com>
7161
7162 PR server/15959
7163 * server.c (start_inferior): Clear 'resume_info'.
7164
7165 2013-09-16 Jiong Wang <jiwang@tilera.com>
7166
7167 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7168 for each register.
7169
7170 2013-09-16 Jiong Wang <jiwang@tilera.com>
7171
7172 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7173 linux-tile-low.o to srv_tgtobj.
7174
7175 2013-09-16 Will Newton <will.newton@linaro.org>
7176
7177 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7178 out regs.
7179
7180 2013-09-06 Pedro Alves <palves@redhat.com>
7181
7182 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7183 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7184 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7185 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7186 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7187 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7188
7189 2013-09-06 Pedro Alves <palves@redhat.com>
7190
7191 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7192 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7193
7194 2013-09-06 Pedro Alves <palves@redhat.com>
7195
7196 * linux-amd64-ipa.c: Include tracepoint.h.
7197 * linux-i386-ipa.c: Include tracepoint.h.
7198
7199 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7200
7201 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7202 (ps_get_thread_area): New function.
7203
7204 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7205
7206 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7207 (initialize_low_arch): Call init_registers_crisv32 rather than
7208 init_register_crisv32.
7209
7210 2013-09-05 Pedro Alves <palves@redhat.com>
7211
7212 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7213 to ...
7214 * hostio.h: ... this new file.
7215 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7216 win32-low.c: Include hostio.h.
7217
7218 2013-09-05 Pedro Alves <palves@redhat.com>
7219
7220 * server.h (gdb_client_data, handler_func, callback_handler_func)
7221 (delete_file_handler, add_file_handler, append_callback_event)
7222 (delete_callback_event, start_event_loop, initialize_event_loop):
7223 Move to event-loop.h and include it.
7224 * event-loop.h: New file.
7225
7226 2013-09-05 Pedro Alves <palves@redhat.com>
7227
7228 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7229 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7230 (loaded_dll, unloaded_dll): Move to ...
7231 * dll.h: ... this new file.
7232 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7233
7234 2013-09-05 Pedro Alves <palves@redhat.com>
7235
7236 * server.h (current_process, get_thread_process, all_processes)
7237 (add_inferior_to_list, for_each_inferior, current_inferior)
7238 (remove_inferior, add_process, remove_process, find_process_pid)
7239 (have_started_inferiors_p, have_attached_inferiors_p)
7240 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7241 (clear_inferiors, find_inferior, find_inferior_id)
7242 (inferior_target_data, set_inferior_target_data)
7243 (inferior_regcache_data, set_inferior_regcache_data): Move to
7244 inferiors.h, and include it.
7245 * inferiors.h: New file.
7246
7247 2013-09-05 Pedro Alves <palves@redhat.com>
7248
7249 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7250 Move ...
7251 * ax.h: ... here.
7252
7253 2013-09-05 Pedro Alves <palves@redhat.com>
7254
7255 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7256 tracepoint.h.
7257 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7258 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7259 (handle_tracepoint_general_set, handle_tracepoint_query)
7260 (tracepoint_finished_step, tracepoint_was_hit)
7261 (release_while_stepping_state_list, current_traceframe)
7262 (in_readonly_region, traceframe_read_mem)
7263 (fetch_traceframe_registers, traceframe_read_sdata)
7264 (traceframe_read_info, struct fast_tpoint_collect_status)
7265 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7266 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7267 (supply_fast_tracepoint_registers)
7268 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7269 (ipa_tdesc, claim_trampoline_space)
7270 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7271 (agent_mem_read, agent_get_trace_state_variable_value)
7272 (agent_set_trace_state_variable_value, agent_tsv_read)
7273 (agent_mem_read_string, get_raw_reg_func_addr)
7274 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7275 * tracepoint.h: ... this new file.
7276
7277 2013-09-05 Pedro Alves <palves@redhat.com>
7278
7279 * server.h (perror_with_name, error, fatal, warning, paddress)
7280 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7281 include it.
7282 * utils.h: New file.
7283
7284 2013-09-05 Pedro Alves <palves@redhat.com>
7285
7286 * server.h (remote_debug, noack_mode, transport_is_reliable)
7287 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7288 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7289 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7290 (write_enn, initialize_async_io, enable_async_io)
7291 (disable_async_io, check_remote_input_interrupt_request)
7292 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7293 (dead_thread_notify, prepare_resume_reply)
7294 (decode_address_to_semicolon, decode_address, decode_m_packet)
7295 (decode_M_packet, decode_X_packet, decode_xfer_write)
7296 (decode_search_memory_packet, unhexify, hexify)
7297 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7298 (look_up_one_symbol, relocate_instruction)
7299 (monitor_output): Move to remote-utils.h, and include it.
7300 * remote-utils.h: New file.
7301
7302 2013-09-05 Pedro Alves <palves@redhat.com>
7303
7304 * server.h (_): Delete.
7305
7306 2013-09-02 Pedro Alves <palves@redhat.com>
7307
7308 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7309 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7310 allocated.
7311 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7312
7313 2013-09-02 Pierre Muller <muller@sourceware.org>
7314
7315 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7316 or WriteProcessMemory complete successfully and handle
7317 ERROR_PARTIAL_COPY error.
7318
7319 2013-09-02 Pedro Alves <palves@redhat.com>
7320
7321 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7322 error instead of EIO.
7323
7324 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7325
7326 PR server/15604
7327 * linux-low.c: Include filestuff.h.
7328 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7329 * lynx-low.c: Include filestuff.h.
7330 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7331 * server.c: Include filestuff.h.
7332 (main): Call notice_open_fds.
7333 * spu-low.c: Include filestuff.h.
7334 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7335
7336 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7337
7338 * Makefile.in: Explain why ../target and ../nat are not
7339 listed as include file search paths.
7340 (linux-waitpid.o): New object file rule.
7341 * configure.srv (srv_native_linux_obj): New variable.
7342 Replace all occurrences of linux native object files with
7343 $srv_native_linux_obj.
7344 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7345 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7346 (linux_enable_event_reporting): Remove declaration.
7347 (my_waitpid): Moved to common/linux-waitpid.c.
7348 (linux_wait_for_event): Pass ptid when calling
7349 linux_enable_event_reporting.
7350 (linux_supports_tracefork_flag): Remove.
7351 (linux_enable_event_reporting): Likewise.
7352 (linux_tracefork_grandchild): Remove.
7353 (STACK_SIZE): Moved to common/linux-ptrace.c.
7354 (linux_tracefork_child): Remove.
7355 (linux_test_for_tracefork): Remove.
7356 (linux_look_up_symbols): Call linux_supports_traceclone.
7357 (initialize_low): Remove call to linux_test_for_tracefork.
7358 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7359 common/linux-ptrace.h.
7360 (PTRACE_TYPE_ARG4): Likewise.
7361 Include linux-ptrace.h.
7362
7363 2013-08-21 Pedro Alves <palves@redhat.com>
7364
7365 * config.in: Renegerate.
7366
7367 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7368
7369 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7370 (SFILES): Remove $(srcdir)/common/target-common.c and
7371 add $(srcdir)/target/waitstatus.c.
7372 (OBS): Remove target-common.o and add waitstatus.o.
7373 (server_h): Remove $(srcdir)/../common/target-common.h and
7374 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7375 and $(srcdir)/../target/waitstatus.h.
7376 (target-common.o): Remove.
7377 (waitstatus.o): New target object file.
7378 * target.h: Do not include target-common.h and
7379 include target/resume.h, target/wait.h and
7380 target/waitstatus.h.
7381
7382 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7383
7384 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7385 to PTRACE_TYPE_ARG3.
7386 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7387 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7388 PTRACE_TYPE_ARG4.
7389 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7390 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7391
7392 2013-07-27 Jie Zhang <jie@codesourcery.com>
7393 Daniel Jacobowitz <dan@codesourcery.com>
7394 Yao Qi <yao@codesourcery.com>
7395
7396 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7397 (mips-linux-watch.o): New rule.
7398 (mips_linux_watch_h): New variable.
7399 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7400 srv_tgtobj.
7401 * linux-mips-low.c: Include mips-linux-watch.h.
7402 (struct arch_process_info, struct arch_lwp_info): New.
7403 (update_watch_registers_callback): New function.
7404 (mips_linux_new_process, mips_linux_new_thread) New functions.
7405 (mips_linux_prepare_to_resume, mips_insert_point): New
7406 functions.
7407 (mips_remove_point, mips_stopped_by_watchpoint): New
7408 functions.
7409 (rsp_bp_type_to_target_hw_bp_type): New function.
7410 (mips_stopped_data_address): New function.
7411 (the_low_target): Add watchpoint support functions.
7412
7413 2013-07-27 Yao Qi <yao@codesourcery.com>
7414
7415 * i386-low.c: Include break-common.h.
7416 (enum target_hw_bp_type): Remove.
7417
7418 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7419
7420 * Makefile.in (SFILES): /common/target-common.c.
7421 (OBS): Add target-common.o.
7422 (server_h): Add $(srcdir)/../common/target-common.h.
7423 (target-common.o): New target.
7424 * server.c (queue_stop_reply_callback): Free
7425 status string after use.
7426 * target.c (target_waitstatus_to_string): Remove.
7427 * target.h: Include target-common.h.
7428 (resume_kind): Likewise.
7429 (target_waitkind): Likewise.
7430 (target_waitstatus): Likewise.
7431 (TARGET_WNOHANG): Likewise.
7432
7433 2013-07-04 Yao Qi <yao@codesourcery.com>
7434
7435 * Makefile.in (host_alias): Use @host_noncanonical@.
7436 (target_alias): Use @target_noncanonical@.
7437 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7438 ACX_NONCANONICAL_HOST.
7439 * configure: Regenerated.
7440
7441 Revert:
7442 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7443
7444 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7445 * configure: Rebuild.
7446 * Makefile.in (version_host, version_target): Get from configure.
7447 (version.c): Use $(version_host) and $(version_target).
7448
7449 2013-07-03 Pedro Alves <palves@redhat.com>
7450
7451 * Makefile.in (config.status): Depend on development.sh.
7452 * acinclude.m4: Include libmcheck.m4.
7453 * configure: Regenerate.
7454
7455 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7456
7457 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7458 attribute inside the parentheses.
7459 (winapi_DebugSetProcessKillOnExit): Ditto.
7460 (winapi_DebugBreakProcess): Ditto.
7461 (winapi_GenerateConsoleCtrlEvent): Ditto.
7462
7463 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7464
7465 * notif.h (notif_event): Add a dummy member to avoid compiler
7466 errors.
7467
7468 2013-07-01 Pedro Alves <palves@redhat.com>
7469
7470 * hostio.c (HOSTIO_PATH_MAX): Define.
7471 (require_filename, handle_open, handle_unlink, handle_readlink):
7472 Use it.
7473
7474 2013-07-01 Pedro Alves <palves@redhat.com>
7475
7476 * server.h: Include "pathmax.h".
7477 * linux-low.c: Don't include sys/param.h.
7478 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7479 MAXPATHLEN.
7480 * win32-low.c: Don't include sys/param.h.
7481 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7482
7483 2013-07-01 Pedro Alves <palves@redhat.com>
7484
7485 * event-loop.c: Don't check HAVE_UNISTD_H before including
7486 <unistd.h>.
7487 * gdbreplay.c: Likewise.
7488 * remote-utils.c: Likewise.
7489 * server.c: Likewise.
7490 * configure.ac: Don't check for unistd.h.
7491 * configure: Regenerate.
7492
7493 2013-06-28 Tom Tromey <tromey@redhat.com>
7494
7495 * Makefile.in (version.c): Use version.in, not
7496 common/version.in.
7497
7498 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7499
7500 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7501 * configure: Rebuild.
7502 * Makefile.in (version_host, version_target): Get from configure.
7503 (version.c): Use $(version_host) and $(version_target).
7504
7505 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7506
7507 Fix trace-status to output user name without trailing colon.
7508 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7509
7510 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7511
7512 Fix trace-status to output proper start-time and stop-time.
7513 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7514 output start time and stop time in hex as gdb expects.
7515
7516 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7517
7518 * tracepoint.c (build_traceframe_info_xml): Output trace state
7519 variables present in the trace buffer.
7520
7521 2013-06-24 Tom Tromey <tromey@redhat.com>
7522
7523 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7524 create-version.sh.
7525 (version.o): Remove.
7526 * gdbreplay.c: Include version.h.
7527 (version, host_name): Don't declare.
7528 * server.h: Include version.h.
7529 (version, host_name): Don't declare.
7530
7531 2013-06-12 Pedro Alves <palves@redhat.com>
7532
7533 * linux-x86-low.c (linux_is_elf64): Delete global.
7534 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7535 with local linux_pid_exe_is_elf_64_file use.
7536
7537 2013-06-11 Pedro Alves <palves@redhat.com>
7538
7539 * linux-low.c (regset_disabled, disable_regset): New functions.
7540 (regsets_fetch_inferior_registers)
7541 (regsets_store_inferior_registers): Use them.
7542 (initialize_regsets_info); Don't allocate the disabled_regsets
7543 array here.
7544 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7545 comment.
7546
7547 2013-06-11 Pedro Alves <palves@redhat.com>
7548
7549 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7550 xmalloc.
7551
7552 2013-06-11 Pedro Alves <palves@redhat.com>
7553
7554 * linux-x86-low.c (initialize_low_arch): Call
7555 init_registers_x32_avx_linux.
7556
7557 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7558
7559 Fix compatibility with Android Bionic.
7560 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7561 it is not empty.
7562
7563 2013-06-07 Pedro Alves <palves@redhat.com>
7564
7565 PR server/14823
7566 * Makefile.in (OBS): Add tdesc.o.
7567 (IPA_OBJS): Add tdesc-ipa.o.
7568 (tdesc-ipa.o): New rule.
7569 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7570 interface.
7571 * linux-low.c (new_inferior): Delete.
7572 (disabled_regsets, num_regsets): Delete.
7573 (linux_add_process): Adjust to set the new per-process
7574 new_inferior flag.
7575 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7576 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7577 was a stop. When calling arch_setup, switch the current inferior
7578 to the thread that got an event.
7579 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7580 (regsets_fetch_inferior_registers)
7581 (regsets_store_inferior_registers): New regsets_info parameter.
7582 Adjust to use it.
7583 (linux_register_in_regsets): New regs_info parameter. Adjust to
7584 use it.
7585 (register_addr, fetch_register, store_register): New usrregs_info
7586 parameter. Adjust to use it.
7587 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7588 parameter regs_info. Adjust to use it.
7589 (linux_fetch_registers): Get the current inferior's regs_info, and
7590 adjust to use it.
7591 (linux_store_registers): Ditto.
7592 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7593 (initialize_low): Don't initialize the target_regsets here. Call
7594 initialize_low_arch.
7595 * linux-low.h (target_regsets): Delete declaration.
7596 (struct regsets_info): New.
7597 (struct usrregs_info): New.
7598 (struct regs_info): New.
7599 (struct process_info_private) <new_inferior>: New field.
7600 (struct linux_target_ops): Delete the num_regs, regmap, and
7601 regset_bitmap fields. New field regs_info.
7602 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7603 * i387-fp.c (num_xmm_registers): Delete.
7604 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7605 calls to new interface.
7606 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7607 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7608 Infer the number of xmm registers from the regcache's target
7609 description.
7610 * i387-fp.h (num_xmm_registers): Delete.
7611 * inferiors.c (add_thread): Don't install the thread's regcache
7612 here.
7613 * proc-service.c (gregset_info): Fetch the current inferior's
7614 regs_info. Adjust to use it.
7615 * regcache.c: Include tdesc.h.
7616 (register_bytes, reg_defs, num_registers)
7617 (gdbserver_expedite_regs): Delete.
7618 (get_thread_regcache): If the thread doesn't have a regcache yet,
7619 create one, instead of aborting gdbserver.
7620 (regcache_invalidate_one): Rename to ...
7621 (regcache_invalidate_thread): ... this.
7622 (regcache_invalidate_one): New.
7623 (regcache_invalidate): Only invalidate registers of the current
7624 process.
7625 (init_register_cache): Add target_desc parameter, and use it.
7626 (new_register_cache): Ditto. Assert the target description has a
7627 non zero registers_size.
7628 (regcache_cpy): Add assertions. Adjust.
7629 (realloc_register_cache, set_register_cache): Delete.
7630 (registers_to_string, registers_from_string): Adjust.
7631 (find_register_by_name, find_regno, find_register_by_number)
7632 (register_cache_size): Add target_desc parameter, and use it.
7633 (free_register_cache_thread, free_register_cache_thread_one)
7634 (regcache_release, register_cache_size): New.
7635 (register_size): Add target_desc parameter, and use it.
7636 (register_data, supply_register, supply_register_zeroed)
7637 (supply_regblock, supply_register_by_name, collect_register)
7638 (collect_register_as_string, collect_register_by_name): Adjust.
7639 * regcache.h (struct target_desc): Forward declare.
7640 (struct regcache) <tdesc>: New field.
7641 (init_register_cache, new_register_cache): Add target_desc
7642 parameter.
7643 (regcache_invalidate_thread): Declare.
7644 (regcache_invalidate_one): Delete declaration.
7645 (regcache_release): Declare.
7646 (find_register_by_number, register_cache_size, register_size)
7647 (find_regno): Add target_desc parameter.
7648 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7649 declarations.
7650 * remote-utils.c: Include tdesc.h.
7651 (outreg, prepare_resume_reply): Adjust.
7652 * server.c: Include tdesc.h.
7653 (gdbserver_xmltarget): Delete declaration.
7654 (get_features_xml, process_serial_event): Adjust.
7655 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7656 declare.
7657 (struct process_info) <tdesc>: New field.
7658 (ipa_tdesc): Declare.
7659 * tdesc.c: New file.
7660 * tdesc.h: New file.
7661 * tracepoint.c: Include tdesc.h.
7662 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7663 (get_context_regcache): Adjust to pass ipa_tdesc down.
7664 (do_action_at_tracepoint): Adjust to get the register cache size
7665 from the context regcache's description.
7666 (traceframe_walk_blocks): Adjust to get the register cache size
7667 from the current trace frame's description.
7668 (traceframe_get_pc): Adjust to get current trace frame's
7669 description and pass it down.
7670 (gdb_collect): Adjust to get the register cache size from the
7671 IPA's description.
7672 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7673 (gdbserver_xmltarget): Delete.
7674 (initialize_low_tracepoint): Set the ipa's target description.
7675 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7676 (initialize_low_tracepoint): Set the ipa's target description.
7677 * linux-x86-low.c: Include tdesc.h.
7678 [__x86_64__] (is_64bit_tdesc): New.
7679 (ps_get_thread_area, x86_get_thread_area): Use it.
7680 (i386_cannot_store_register): Rename to ...
7681 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7682 (i386_cannot_fetch_register): Rename to ...
7683 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7684 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7685 to new interface.
7686 (target_regsets): Rename to ...
7687 (x86_regsets): ... this.
7688 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7689 interface.
7690 (x86_siginfo_fixup): Use is_64bit_tdesc.
7691 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7692 (tdesc_x32_avx_linux, tdesc_x32_linux)
7693 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7694 Declare.
7695 (x86_linux_update_xmltarget): Delete.
7696 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7697 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7698 (AMD64_LINUX_USER64_CS): New.
7699 (x86_linux_read_description): New, based on
7700 x86_linux_update_xmltarget.
7701 (same_process_callback): New.
7702 (x86_arch_setup_process_callback): New.
7703 (x86_linux_update_xmltarget): New.
7704 (x86_regsets_info): New.
7705 (amd64_linux_regs_info): New.
7706 (i386_linux_usrregs_info): New.
7707 (i386_linux_regs_info): New.
7708 (x86_linux_regs_info): New.
7709 (x86_arch_setup): Reimplement.
7710 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7711 (x86_emit_ops): Ditto.
7712 (the_low_target): Adjust. Install x86_linux_regs_info,
7713 x86_cannot_fetch_register, and x86_cannot_store_register.
7714 (initialize_low_arch): New.
7715 * linux-ia64-low.c (tdesc_ia64): Declare.
7716 (ia64_fetch_register): Adjust.
7717 (ia64_usrregs_info, regs_info): New globals.
7718 (ia64_regs_info): New function.
7719 (the_low_target): Adjust.
7720 (initialize_low_arch): New function.
7721 * linux-sparc-low.c (tdesc_sparc64): Declare.
7722 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7723 Adjust.
7724 (sparc_arch_setup): New function.
7725 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7726 (the_low_target): Adjust.
7727 (initialize_low_arch): New function.
7728 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7729 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7730 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7731 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7732 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7733 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7734 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7735 (tdesc_powerpc_isa205_vsx64l): Declare.
7736 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7737 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7738 (ppc_set_pc, ppc_get_hwcap): Adjust.
7739 (ppc_usrregs_info): Forward declare.
7740 (!__powerpc64__) ppc_regmap_adjusted: New global.
7741 (ppc_arch_setup): Adjust to the current process'es target
7742 description.
7743 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7744 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7745 (ppc_store_evrregset): Adjust.
7746 (target_regsets): Rename to ...
7747 (ppc_regsets): ... this, and make static.
7748 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7749 (ppc_regs_info): New function.
7750 (the_low_target): Adjust.
7751 (initialize_low_arch): New function.
7752 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7753 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7754 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7755 (tdesc_s390x_linux64v2): Declare.
7756 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7757 (s390_fill_gregset, s390_store_last_break): Adjust.
7758 (target_regsets): Rename to ...
7759 (s390_regsets): ... this, and make static.
7760 (s390_get_pc, s390_set_pc): Adjust.
7761 (s390_get_hwcap): New target_desc parameter, and use it.
7762 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7763 (s390_arch_setup): Adjust to set the current process'es target
7764 description. Don't adjust the regmap.
7765 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7766 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7767 (regs_info_3264): New globals.
7768 (s390_regs_info): New function.
7769 (the_low_target): Adjust.
7770 (initialize_low_arch): New function.
7771 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7772 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7773 [__mips64] (init_registers_mips_linux)
7774 (init_registers_mips_dsp_linux): Delete defines.
7775 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7776 (have_dsp): New global.
7777 (mips_read_description): New, based on mips_arch_setup.
7778 (mips_arch_setup): Reimplement.
7779 (get_usrregs_info): New function.
7780 (mips_cannot_fetch_register, mips_cannot_store_register)
7781 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7782 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7783 (target_regsets): Rename to ...
7784 (mips_regsets): ... this, and make static.
7785 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7786 (dsp_regs_info, regs_info): New globals.
7787 (mips_regs_info): New function.
7788 (the_low_target): Adjust.
7789 (initialize_low_arch): New function.
7790 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7791 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7792 Declare.
7793 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7794 (arm_read_description): New, with bits factored from
7795 arm_arch_setup.
7796 (arm_arch_setup): Reimplement.
7797 (target_regsets): Rename to ...
7798 (arm_regsets): ... this, and make static.
7799 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7800 (arm_regs_info): New function.
7801 (the_low_target): Adjust.
7802 (initialize_low_arch): New function.
7803 * linux-m68k-low.c (tdesc_m68k): Declare.
7804 (target_regsets): Rename to ...
7805 (m68k_regsets): ... this, and make static.
7806 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7807 (m68k_regs_info): New function.
7808 (m68k_arch_setup): New function.
7809 (the_low_target): Adjust.
7810 (initialize_low_arch): New function.
7811 * linux-sh-low.c (tdesc_sharch): Declare.
7812 (target_regsets): Rename to ...
7813 (sh_regsets): ... this, and make static.
7814 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7815 (sh_regs_info, sh_arch_setup): New functions.
7816 (the_low_target): Adjust.
7817 (initialize_low_arch): New function.
7818 * linux-bfin-low.c (tdesc_bfin): Declare.
7819 (bfin_arch_setup): New function.
7820 (bfin_usrregs_info, regs_info): New globals.
7821 (bfin_regs_info): New function.
7822 (the_low_target): Adjust.
7823 (initialize_low_arch): New function.
7824 * linux-cris-low.c (tdesc_cris): Declare.
7825 (cris_arch_setup): New function.
7826 (cris_usrregs_info, regs_info): New globals.
7827 (cris_regs_info): New function.
7828 (the_low_target): Adjust.
7829 (initialize_low_arch): New function.
7830 * linux-cris-low.c (tdesc_crisv32): Declare.
7831 (cris_arch_setup): New function.
7832 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7833 (cris_regs_info): New function.
7834 (the_low_target): Adjust.
7835 (initialize_low_arch): New function.
7836 * linux-m32r-low.c (tdesc_m32r): Declare.
7837 (m32r_arch_setup): New function.
7838 (m32r_usrregs_info, regs_info): New globals.
7839 (m32r_regs_info): Adjust.
7840 (initialize_low_arch): New function.
7841 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7842 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7843 (tic6x_usrregs_info): Forward declare.
7844 (tic6x_read_description): New function, based on ...
7845 (tic6x_arch_setup): ... this. Reimplement.
7846 (target_regsets): Rename to ...
7847 (tic6x_regsets): ... this, and make static.
7848 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7849 (tic6x_regs_info): New function.
7850 (the_low_target): Adjust.
7851 (initialize_low_arch): New function.
7852 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7853 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7854 (target_regsets): Rename to ...
7855 (xtensa_regsets): ... this, and make static.
7856 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7857 globals.
7858 (xtensa_arch_setup, xtensa_regs_info): New functions.
7859 (the_low_target): Adjust.
7860 (initialize_low_arch): New function.
7861 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7862 (nios2_arch_setup): Set the current process'es tdesc.
7863 (target_regsets): Rename to ...
7864 (nios2_regsets): ... this.
7865 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7866 (nios2_regs_info): New function.
7867 (the_low_target): Adjust.
7868 (initialize_low_arch): New function.
7869 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7870 (aarch64_arch_setup): Set the current process'es tdesc.
7871 (target_regsets): Rename to ...
7872 (aarch64_regsets): ... this.
7873 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7874 (aarch64_regs_info): New function.
7875 (the_low_target): Adjust.
7876 (initialize_low_arch): New function.
7877 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7878 globals.
7879 (target_regsets): Rename to ...
7880 (tile_regsets): ... this.
7881 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7882 (tile_regs_info): New function.
7883 (tile_arch_setup): Set the current process'es tdesc.
7884 (the_low_target): Adjust.
7885 (initialize_low_arch): New function.
7886 * spu-low.c (tdesc_spu): Declare.
7887 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7888 * win32-arm-low.c (tdesc_arm): Declare.
7889 (arm_arch_setup): New function.
7890 (the_low_target): Install arm_arch_setup instead of
7891 init_registers_arm.
7892 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7893 (init_windows_x86): Rename to ...
7894 (i386_arch_setup): ... this. Set `win32_tdesc'.
7895 (the_low_target): Adjust.
7896 * win32-low.c (win32_tdesc): New global.
7897 (child_add_thread): Don't create the thread cache here.
7898 (do_initial_child_stuff): Set the new process'es tdesc.
7899 * win32-low.h (struct target_desc): Forward declare.
7900 (win32_tdesc): Declare.
7901 * lynx-i386-low.c (tdesc_i386): Declare global.
7902 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7903 * lynx-low.c (lynx_tdesc): New global.
7904 (lynx_add_process): Set the new process'es tdesc.
7905 * lynx-low.h (struct target_desc): Forward declare.
7906 (lynx_tdesc): Declare global.
7907 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7908 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7909 * nto-low.c (nto_tdesc): New global.
7910 (do_attach): Set the new process'es tdesc.
7911 * nto-low.h (struct target_desc): Forward declare.
7912 (nto_tdesc): Declare.
7913 * nto-x86-low.c (tdesc_i386): Declare.
7914 (nto_x86_arch_setup): Set `nto_tdesc'.
7915
7916 2013-06-04 Gary Benson <gbenson@redhat.com>
7917
7918 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7919 to qSupported response when appropriate.
7920 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7921 with nonzero-length annex.
7922 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7923 arguments supplied in annex.
7924
7925 2013-05-31 Doug Evans <dje@google.com>
7926
7927 PR server/15594
7928 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7929 64 bits in 64-cross-32 environment.
7930
7931 2013-05-28 Pedro Alves <palves@redhat.com>
7932
7933 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7934 (aarch64-without-fpu.c): Delete rule.
7935 * configure.srv (aarch64*-*-linux*): Remove references to
7936 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7937 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7938 declaration.
7939
7940 2013-05-24 Pedro Alves <palves@redhat.com>
7941
7942 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7943 instead of strchr/decode_address. Error if the range isn't split
7944 with a ','. Don't assume there's be a ':' in the action.
7945
7946 2013-05-23 Yao Qi <yao@codesourcery.com>
7947 Pedro Alves <palves@redhat.com>
7948
7949 * linux-low.c (lwp_in_step_range): New function.
7950 (linux_wait_1): If the thread was range stepping and stopped
7951 outside the stepping range, report the stop to GDB. Otherwise,
7952 continue stepping. Add range stepping debug output.
7953 (linux_set_resume_request): Copy the step range from the resume
7954 request to the lwp.
7955 (linux_supports_range_stepping): New.
7956 (linux_target_ops) <supports_range_stepping>: Set to
7957 linux_supports_range_stepping.
7958 * linux-low.h (struct linux_target_ops)
7959 <supports_range_stepping>: New field.
7960 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7961 * linux-x86-low.c (x86_supports_range_stepping): New.
7962 (the_low_target) <supports_range_stepping>: Set to
7963 x86_supports_range_stepping.
7964 * server.c (handle_v_cont): Handle 'r' action.
7965 (handle_v_requests): Append ";r" if the target supports range
7966 stepping.
7967 * target.h (struct thread_resume) <step_range_start,
7968 step_range_end>: New fields.
7969 (struct target_ops) <supports_range_stepping>:
7970 New field.
7971 (target_supports_range_stepping): New macro.
7972
7973 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7974
7975 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7976 confusion in comment.
7977
7978 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7979
7980 * lynx-low.c (struct process_info_private): New type.
7981 (lynx_add_process): New function.
7982 (lynx_create_inferior, lynx_attach): Replace calls to
7983 add_process by calls to lynx_add_process.
7984 (lynx_resume): If PTID is null, then try using
7985 current_process()->private->last_wait_event_ptid.
7986 Add comments.
7987 (lynx_clear_inferiors): Delete. The contents of that function
7988 has been inlined in lynx_mourn;
7989 (lynx_wait_1): Save the ptid in the process's private data.
7990 (lynx_mourn): Free the process' private data. Replace call
7991 to lynx_clear_inferiors by call to clear_inferiors.
7992
7993 2013-05-17 Yao Qi <yao@codesourcery.com>
7994
7995 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7996 the right place.
7997
7998 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7999
8000 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8001 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8002 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8003 PT_TEXT_END_ADDR guards. Update comments.
8004 (linux_target_op) <read_offsets>: Conditionally define to
8005 linux_read_offsets if the target is UCLIBC and if it defines
8006 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8007
8008 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8009 Andrew Jenner <andrew@codesourcery.com>
8010
8011 * Makefile.in (SFILES): Add linux-nios2-low.c.
8012 (clean): Add action to delete nios2-linux.c.
8013 (nios2-linux.c): New rule.
8014 * configure.srv: Add nios2*-*-linux*.
8015 * linux-nios2-low.c: New.
8016
8017 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8018
8019 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8020
8021 2013-04-25 Hui Zhu <hui@codesourcery.com>
8022
8023 PR gdb/15186
8024 * ax.c (ax_printf): Add fflush.
8025
8026 2013-04-22 Tom Tromey <tromey@redhat.com>
8027
8028 * Makefile.in (SFILES): Add filestuff.c.
8029 (OBS): Add filestuff.o.
8030 (filestuff.o): New target.
8031 * config.in, configure: Rebuild.
8032 * configure.ac: Check for fdwalk, pipe2.
8033
8034 2013-04-17 Pedro Alves <palves@redhat.com>
8035
8036 * configure.ac (USE_THREAD_DB): Delete variable.
8037 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8038 Don't AC_SUBST USE_THREAD_DB.
8039 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8040 * config.in, configure: Regenerate.
8041
8042 2013-04-16 Pedro Alves <palves@redhat.com>
8043
8044 * linux-low.h (struct lwp_info) <thread_known>: Move under
8045 the USE_THREAD_DB #ifdef.
8046
8047 2013-04-16 Pedro Alves <palves@redhat.com>
8048
8049 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8050 (linux-low.o): Delete rule.
8051 * linux-low.h: Always include "gdb_thread_db.h" instead of
8052 conditionally including thread_db.h.
8053 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8054 HAVE_THREAD_DB_H.
8055
8056 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8057
8058 * Makefile.in (install-only): Fix make install regression.
8059
8060 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8061
8062 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8063 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8064 installation.
8065 * gdbserver.1: Remove.
8066
8067 2013-03-22 Pedro Alves <palves@redhat.com>
8068
8069 * linux-low.c (handle_extended_wait): Don't call
8070 linux_enable_event_reporting.
8071
8072 2013-03-15 Tony Theodore <tonyt@logyst.com>
8073
8074 PR build/9098:
8075 * Makefile.in (SHELL): Use @SHELL@.
8076
8077 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8078
8079 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8080 compiler warning.
8081
8082 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8083
8084 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8085 Remove extraneous NULL element.
8086
8087 2013-03-13 Yao Qi <yao@codesourcery.com>
8088
8089 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8090 'V' block in trace frame.
8091
8092 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8093
8094 * target.h (struct target_ops): Add btrace ops.
8095 (target_supports_btrace): New macro.
8096 (target_enable_btrace): New macro.
8097 (target_disable_btrace): New macro.
8098 (target_read_btrace): New macro.
8099 * gdbthread.h (struct thread_info): Add btrace field.
8100 * server.c: Include btrace-common.h.
8101 (handle_btrace_general_set): New function.
8102 (handle_btrace_enable): New function.
8103 (handle_btrace_disable): New function.
8104 (handle_general_set): Call handle_btrace_general_set.
8105 (handle_qxfer_btrace): New function.
8106 (struct qxfer qxfer_packets[]): Add btrace entry.
8107 * inferiors.c (remove_thread): Disable btrace.
8108 * linux-low: Include linux-btrace.h.
8109 (linux_low_enable_btrace): New function.
8110 (linux_low_read_btrace): New function.
8111 (linux_target_ops): Add btrace ops.
8112 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8113 Add srv_linux_btrace=yes.
8114 (x86_64-*-linux*): Add linux-btrace.o.
8115 Add srv_linux_btrace=yes.
8116 * configure.ac: Define HAVE_LINUX_BTRACE.
8117 * config.in: Regenerated.
8118 * configure: Regenerated.
8119
8120 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8121
8122 * server.c (handle_qxfer): Preserve error message if -3 is
8123 returned.
8124 (qxfer): Document the -3 return value.
8125
8126 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8127
8128 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8129 (linux_btrace_h): New variable.
8130 (linux-btrace.o): New rule.
8131
8132 2013-03-08 Stan Shebs <stan@codesourcery.com>
8133 Hafiz Abid Qadeer <abidh@codesourcery.com>
8134
8135 * tracepoint.c (trace_buffer_size): New global.
8136 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8137 (init_trace_buffer): Change to one-argument function. Allocate
8138 trace buffer memory.
8139 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8140 handle QTBuffer:size packet.
8141 (cmd_bigqtbuffer_size): New function.
8142 (initialize_tracepoint): Call init_trace_buffer with
8143 DEFAULT_TRACE_BUFFER_SIZE.
8144 * server.c (handle_query): Add QTBuffer:size in the
8145 supported packets.
8146
8147 2013-03-07 Yao Qi <yao@codesourcery.com>
8148
8149 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8150 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8151 of -1.
8152 (cmd_qtsp): Adjust condition. Do post increment.
8153 Set cur_action and cur_step_action back to 0.
8154
8155 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8156
8157 PR server/15236
8158 * linux-low.c (linux_write_memory): Return early success if LEN is
8159 zero.
8160
8161 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8162
8163 * configure.srv: Add x86_64-*-cygwin* as target.
8164
8165 2013-02-28 Tom Tromey <tromey@redhat.com>
8166
8167 * configure.ac: Invoke AC_SYS_LARGEFILE.
8168 * configure, config.in: Rebuild.
8169
8170 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8171
8172 * win32-low.c: Throughout, fix format strings and casts of
8173 printf-like functions to avoid type related warnings on all
8174 platforms.
8175 (get_child_debug_event): Print dwDebugEventCode as hex since
8176 that's how it's usually documented.
8177
8178 2013-02-28 Yao Qi <yao@codesourcery.com>
8179
8180 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8181 pulongest.
8182
8183 2013-02-27 Jiong Wang <jiwang@tilera.com>
8184
8185 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8186 (reg-tilegx32.c): New rule.
8187 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8188 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8189 different register info initializer according to elf class.
8190 (init_registers_tilgx32): New function. The tilegx32 register info
8191 initializer.
8192 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8193 (tile_store_gregset): Likewise.
8194
8195 2013-02-27 Yao Qi <yao@codesourcery.com>
8196
8197 * server.c (process_point_options): Print debug message when
8198 debug_threads is true.
8199
8200 2013-02-26 Yao Qi <yao@codesourcery.com>
8201
8202 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8203
8204 2013-02-19 Pedro Alves <palves@redhat.com>
8205 Kai Tietz <ktietz@redhat.com>
8206
8207 PR gdb/15161
8208
8209 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8210 instead of strtoul to extract address from packet.
8211 (process_serial_event) <'z'>: Likewise.
8212
8213 2013-02-18 Yao Qi <yao@codesourcery.com>
8214
8215 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8216
8217 2013-02-14 Pedro Alves <palves@redhat.com>
8218
8219 Plug memory leak.
8220
8221 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8222 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8223
8224 2013-02-14 Pedro Alves <palves@redhat.com>
8225
8226 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8227
8228 2013-02-14 Pedro Alves <palves@redhat.com>
8229
8230 * tracepoint.c (save_string): Delete.
8231 (add_tracepoint_action): Use savestring instead of save_string.
8232
8233 2013-02-12 Pedro Alves <palves@redhat.com>
8234
8235 * linux-xtensa-low.c: Ditto.
8236 * xtensa-xtregs.c: Ditto.
8237
8238 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8239
8240 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8241 thread_db.
8242
8243 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8244
8245 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8246 aarch64_num_wp_regs and aarch64_num_bp_regs to
8247 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8248
8249 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8250
8251 * linux-aarch64-low.c (ps_get_thread_area): Replace
8252 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8253
8254 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8255 Marcus Shawcroft <marcus.shawcroft@arm.com>
8256 Nigel Stephens <nigel.stephens@arm.com>
8257 Yufeng Zhang <yufeng.zhang@arm.com>
8258
8259 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8260 (aarch64.c, aarch64-without-fpu.c): New targets.
8261 * configure.srv (aarch64*-*-linux*): New.
8262 * linux-aarch64-low.c: New file.
8263
8264 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8265
8266 * linux-low.c (handle_extended_wait, linux_create_inferior)
8267 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8268 (dequeue_one_deferred_signal, linux_resume_one_thread)
8269 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8270 (linux_tracefork_grandchild, linux_test_for_tracefork)
8271 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8272 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8273 where the argument is 0.
8274
8275 2013-01-25 Yao Qi <yao@codesourcery.com>
8276
8277 * event-loop.c: Include "queue.h".
8278 (gdb_event_p): New typedef.
8279 (struct gdb_event) <next_event>: Remove.
8280 (event_queue): Change to QUEUE(gdb_event_p).
8281 (async_queue_event): Remove.
8282 (gdb_event_xfree): New.
8283 (initialize_event_loop): New.
8284 (process_event): Use API from QUEUE.
8285 (wait_for_event): Likewise.
8286 * server.c (main): Call initialize_event_loop.
8287 * server.h (initialize_event_loop): Declare.
8288
8289 2013-01-18 Yao Qi <yao@codesourcery.com>
8290
8291 * ax.h (struct eval_agent_expr_context): New.
8292 (gdb_eval_agent_expr): Update declaration.
8293 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8294 TFRAME. Add new argument CTX.
8295 * server.h (struct eval_agent_expr_context): Declare.
8296 (agent_mem_read, agent_tsv_read): Update declaration.
8297 (agent_mem_read_string): Likewise.
8298 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8299 (add_traceframe_block): Add new argument TPOINT.
8300 Increase TPOINT->traceframe_usage.
8301 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8302 eval_tracepoint_agent_expr.
8303 (condition_true_at_tracepoint): Likewise.
8304 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8305 (agent_mem_read_string, agent_tsv_read): Likewise.
8306
8307 2013-01-16 Yao Qi <yao@codesourcery.com>
8308
8309 * linux-low.c (linux_resume_one_lwp): Don't check
8310 'lwp->bp_reinsert != 0'.
8311
8312 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8313 Pedro Alves <palves@redhat.com>
8314
8315 * lynx-low.c (ptrace_request_to_str): Define a temporary
8316 macro and use it to simplify this function's implementation.
8317
8318 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8319
8320 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8321 sets errno.
8322
8323 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8324
8325 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8326
8327 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8328
8329 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8330
8331 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8332
8333 * lynx-low.c (lynx_resume): Use the resume_info parameter
8334 to determine the ptid for the lynx_ptrace call, unless
8335 it is equal to minus_one_ptid, in which case we use the
8336 ptid of the current_inferior.
8337 (lynx_wait_1): After having received a thread create/exit
8338 event, resume the inferior's execution using the signaling
8339 thread's ptid, rather than the old ptid.
8340
8341 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8342
8343 * lynx-low.c (lynx_resume): Delete variable ret.
8344
8345 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8346
8347 * gdbreplay.c (gdbreplay_version): Update copyright year.
8348 * server.c (gdbserver_version): Likewise.
8349
8350 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8351
8352 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8353 new thread.
8354
8355 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8356
8357 * lynx-low.c (ptrace_request_to_str): Add handling for
8358 PTRACE_GETTRACESIG.
8359
8360 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8361
8362 * lynx-low.c (lynx_attach): Delete variable new_process.
8363
8364 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8365
8366 * lynx-low.c (lynx_create_inferior): Delete variable
8367 new_process.
8368
8369 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8370
8371 * lynx-low.c (ptrace_request_to_str): Do not handle
8372 PTRACE_GETTHREADLIST if this macro does not exist.
8373
8374 2012-12-15 Yao Qi <yao@codesourcery.com>
8375
8376 * Makefile.in (OBS): Add notif.o.
8377 * notif.c, notif.h: New.
8378 * server.c: Include "notif.h".
8379 (struct vstop_notif) <next>: Remove.
8380 <base>: New field.
8381 (queue_stop_reply): Update.
8382 (push_event, send_next_stop_reply): Remove.
8383 (discard_queued_stop_replies): Update.
8384 (notif_stop): New variable.
8385 (handle_v_stopped): Remove.
8386 (handle_v_requests): Don't call handle_v_stopped. Call
8387 handle_ack_notif instead.
8388 (queue_stop_reply_callback): Call notif_event_enque instead
8389 of queue_stop_reply.
8390 (handle_status): Don't call send_next_stop_reply, call
8391 notif_write_event instead.
8392 (kill_inferior_callback): Likewise.
8393 (detach_or_kill_inferior_callback): Likewise.
8394 (main): Call initialize_notif.
8395 (process_serial_event): Call QUEUE_is_empty.
8396 (handle_target_event): Call notif_push instead of push event.
8397 * server.h (push_event): Remove declaration.
8398
8399 2012-12-10 Tom Tromey <tromey@redhat.com>
8400
8401 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8402 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8403 macros.
8404 (.c.o): Rewrite.
8405 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8406 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8407 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8408 (amd64-linux-ipa.o, ax.o): Rewrite.
8409 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8410 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8411 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8412 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8413 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8414 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8415 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8416 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8417 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8418 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8419 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8420 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8421 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8422 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8423 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8424 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8425 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8426 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8427 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8428 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8429 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8430 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8431 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8432 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8433 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8434 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8435 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8436 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8437 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8438 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8439 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8440 (reg-tilegx.o): Remove.
8441 (all_object_files): New macro.
8442 Include .deps files.
8443 * aclocal.m4, configure: Rebuild.
8444 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8445 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8446 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8447
8448 2012-12-05 Tom Tromey <tromey@redhat.com>
8449
8450 PR gdb/14917:
8451 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8452
8453 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8454
8455 * configure.ac: Check for linux/perf_event.h.
8456 * config.in: Regenerated.
8457 * configure: Regenerated.
8458
8459 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8460
8461 * hostio.c (handle_readlink): Decrease buffer size
8462 parameter passed to readlink by one byte.
8463
8464 2012-11-26 Yao Qi <yao@codesourcery.com>
8465
8466 * configure.ac (build_warnings): Append '-Wempty-body'.
8467 * configure: Regenerated.
8468 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8469 body.
8470
8471 2012-11-15 Pierre Muller <muller@sourceware.org>
8472
8473 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8474 * config.in: Regenerate.
8475 * configure: Regenerate.
8476 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8477 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8478 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8479 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8480 header.
8481 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8482 instead of <sys/wait.h> header.
8483 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8484
8485 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8486
8487 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8488 (various make rules): Remove -DGDBSERVER
8489
8490 2012-11-09 Yao Qi <yao@codesourcery.com>
8491
8492 * spu-low.c (current_ptid): Move it to ..
8493 * gdbthread.h: ... here. New.
8494 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8495 * server.c (myresume, process_serial_event): Likewise.
8496 * thread-db.c (thread_db_find_new_threads): Likewise.
8497 * tracepoint.c (run_inferior_command): Likewise.
8498
8499 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8500
8501 * server.c (handle_search_memory_1): Include access length in
8502 warning message.
8503
8504 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8505
8506 * linux-crisv32-low.c: Fix compile errors.
8507
8508 2012-09-04 Yao Qi <yao@codesourcery.com>
8509
8510 * tracepoint.c (cmd_qtsv): Adjust debug message.
8511 Don't check CUR_TPOINT.
8512
8513 2012-08-28 Yao Qi <yao@codesourcery.com>
8514
8515 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8516 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8517 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8518 Remove declarations of xmalloc, xreallloc, xstrdup and
8519 freeargv.
8520 * Makefile.in (libiberty_h): New.
8521 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8522 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8523
8524 2012-08-23 Yao Qi <yao@codesourcery.com>
8525
8526 * server.h: Remove declaration of 'xsnprintf'.
8527
8528 2012-08-22 Keith Seitz <keiths@redhat.com>
8529
8530 * server.h: Include build-gnulib-gbserver/config.h.
8531 * gdbreplay.c: Likewise.
8532
8533 2012-08-08 Doug Evans <dje@google.com>
8534
8535 * Makefile.in (SFILES): Add gdb_vecs.c.
8536 (OBS): Add gdb_vecs.o.
8537 (gdb_vecs_h, host_defs_h): New variables.
8538 (thread-db.o): Add $(gdb_vecs_h) dependency.
8539 (gdb_vecs.o): New rule.
8540 * thread-db.c: #include "gdb_vecs.h".
8541 (thread_db_load_search): Use a vector to iterate over path elements.
8542 Handle text appearing after "$pdir".
8543
8544 * configure.ac: Add check for strstr.
8545 * config.in: Regenerate.
8546 * configure: Regenerate.
8547
8548 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8549
8550 * hostio.c (handle_pread): If pread fails, fall back to attempting
8551 lseek/read.
8552 (handle_pwrite): Likewise for pwrite.
8553
8554 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8555
8556 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8557 between unsupported TYPE and unimplementable ADDR/LEN combination.
8558 (arm_insert_point): Act on new return value.
8559
8560 2012-07-31 Pedro Alves <palves@redhat.com>
8561
8562 * server.c (process_point_options): Only skip tokens if we find
8563 one that is unrecognized. Don't treat 'X' specially while
8564 skipping unrecognized tokens.
8565
8566 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8567
8568 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8569 to 4-byte-align HW breakpoint addresses for Thumb.
8570
8571 2012-07-27 Yao Qi <yao@codesourcery.com>
8572
8573 PR remote/14161.
8574
8575 * server.h: Declare gdb_agent_about_to_close.
8576 * target.c (kill_inferior): Include "agent.h".
8577 New. Send command 'kill'.
8578 * target.h (kill_inferior): Removed macro.
8579 * tracepoint.c (gdb_agent_about_to_close): New.
8580 (gdb_agent_helper_thread): Handle command 'close'.
8581 Wait endlessly until the inferior stops.
8582 Install gdb_agent_remove_socket to atexit hook.
8583 (agent_socket_name): New static variable.
8584 (gdb_agent_socket_init): Replace local variable 'name' with
8585 'agent_socket_name'.
8586 (gdb_agent_remove_socket): New.
8587
8588 2012-07-27 Yao Qi <yao@codesourcery.com>
8589
8590 * server.c (process_point_options): Stop at 'X' when parsing.
8591
8592 2012-07-19 Michael Eager <eager@eagercon.com>
8593
8594 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8595 to hw_execute.
8596 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8597 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8598 hardware breakpoint.
8599
8600 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8601
8602 * gdbserver/linux-low.c (initialize_low): Call
8603 linux_ptrace_init_warnings.
8604
8605 2012-07-02 Doug Evans <dje@google.com>
8606
8607 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8608 pointer to int.
8609
8610 2012-07-02 Stan Shebs <stan@codesourcery.com>
8611
8612 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8613 (ax.o): Add it to build rule.
8614 (ax-ipa.o): Ditto.
8615 (OBS): Add format.o.
8616 (IPA_OBS): Add format.o.
8617 * server.c (handle_query): Claim support for breakpoint commands.
8618 (process_point_options): Add command case.
8619 (process_serial_event): Leave running if there are printfs in
8620 effect.
8621 * mem-break.h (any_persistent_commands): Declare.
8622 (add_breakpoint_commands): Declare.
8623 (gdb_no_commands_at_breakpoint): Declare.
8624 (run_breakpoint_commands): Declare.
8625 * mem-break.c (struct point_command_list): New struct.
8626 (struct breakpoint): New field command_list.
8627 (any_persistent_commands): New function.
8628 (add_commands_to_breakpoint): New function.
8629 (add_breakpoint_commands): New function.
8630 (gdb_no_commands_at_breakpoint): New function.
8631 (run_breakpoint_commands): New function.
8632 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8633 locally.
8634 * ax.c: Include format.h.
8635 (ax_printf): New function.
8636 (gdb_eval_agent_expr): Add printf opcode.
8637
8638 2012-06-13 Yao Qi <yao@codesourcery.com>
8639
8640 * server.c (start_inferior): Remove duplicated writes to fields
8641 'last_resume_kind' and 'last_status' of 'current_inferior'.
8642
8643 2012-06-12 Yao Qi <yao@codesourcery.com>
8644 Pedro Alves <palves@redhat.com>
8645
8646 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8647 comment.
8648 * server.c (handle_v_cont): Extend comment.
8649
8650 2012-06-11 Yao Qi <yao@codesourcery.com>
8651
8652 * linux-low.c (linux_attach): Add 'static'.
8653
8654 2012-06-06 Yao Qi <yao@codesourcery.com>
8655
8656 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8657
8658 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8659
8660 Fix gcc -flto compilation warning.
8661 * server.c (main): Make variable multi_mode and attach volatile.
8662
8663 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8664
8665 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8666 if the platform doesn't know about it.
8667
8668 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8669
8670 * Makefile.in (SFILES): Add linux-tile-low.c.
8671 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8672 * configure.srv: Handle tilegx-*-linux*.
8673 * linux-tile-low.c: New file.
8674
8675 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8676
8677 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8678
8679 2012-05-24 Pedro Alves <palves@redhat.com>
8680
8681 PR gdb/7205
8682
8683 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8684
8685 2012-05-24 Pedro Alves <palves@redhat.com>
8686
8687 PR gdb/7205
8688
8689 Replace target_signal with gdb_signal throughout.
8690
8691 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8692
8693 * linux-low.c (linux_store_registers): Avoid the copying sequence
8694 when no data has been retrieved by ptrace.
8695
8696 2012-05-22 Will Deacon <will.deacon@arm.com>
8697
8698 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8699 Include asm/ptrace.h.
8700 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8701 already defined.
8702
8703 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8704
8705 * linux-low.c (linux_store_registers): Don't re-retrieve data
8706 with ptrace that has already been obtained from /proc. Always
8707 copy any data retrieved with ptrace to the buffer supplied.
8708
8709 2012-05-11 Yao Qi <yao@codesourcery.com>
8710 Pedro Alves <palves@redhat.com>
8711
8712 * linux-low.c (enum stopping_threads_kind): New.
8713 (stopping_threads): Change type to `enum stopping_threads_kind'.
8714 (handle_extended_wait): If stopping and suspending threads, leave
8715 the new_lwp suspended too.
8716 (linux_wait_for_event): Adjust.
8717 (stop_all_lwps): Set `stopping_threads' to
8718 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8719 whether we're suspending threads or just stopping them. Assert no
8720 recursion happens.
8721
8722 2012-04-29 Yao Qi <yao@codesourcery.com>
8723
8724 * server.h: Move some code to ...
8725 * gdbthread.h: ... here. New.
8726 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8727 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8728 (nto-low.o, win32-low.o): Likewise.
8729 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8730 * regcache.c, remote-utils.c, server.c: Likewise.
8731 * target.c, tracepoint.c, win32-low.c: Likewise.
8732
8733 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8734
8735 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8736 (PTRACE_ARG4_TYPE): Likewise.
8737 (PTRACE_XFER_TYPE): Likewise.
8738 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8739 ptrace to PTRACE_ARG3_TYPE.
8740 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8741 (PTRACE_ARG4_TYPE): Likewise.
8742 (PTRACE_XFER_TYPE): Likewise.
8743 (linux_detach_one_lwp): Cast fourth argument of
8744 ptrace to long then PTRACE_ARG4_TYPE.
8745 (regsets_fetch_inferior_registers): Cast third argument of
8746 ptrace to long then PTRACE_ARG3_TYPE.
8747 (regsets_store_inferior_registers): Likewise.
8748
8749 2012-04-20 Pedro Alves <palves@redhat.com>
8750
8751 * configure: Regenerate.
8752
8753 2012-04-19 Pedro Alves <palves@redhat.com>
8754
8755 * Makefile.in (GNULIB_BUILDDIR): New.
8756 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8757 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8758 (all, install-only, uninstall, clean-info, all-lib, clean): No
8759 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8760 (maintainer-clean realclean distclean): Use subdir_do.
8761 (subdir_do): New.
8762 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8763 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8764 * acinclude.m4: Include acx_configure_dir.m4.
8765 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8766 calls. Call AC_PROG_RANLIB. Configure gnulib using
8767 ACX_CONFIGURE_DIR.
8768 (GNULIB): New.
8769 (GNULIB_STDINT_H): Adjust.
8770 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8771 * gdbreplay.c: Include build-gnulib/config.h.
8772 * server.h: Likewise.
8773 * aclocal.m4: Regenerate.
8774 * config.in: Regenerate.
8775 * configure: Regenerate.
8776
8777 2012-04-19 Pedro Alves <palves@redhat.com>
8778
8779 * Makefile.in (LIBGNU, INCGNU): Adjust.
8780 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8781 (all, install-only, uninstall, clean-info, all-lib, clean)
8782 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8783 * configure.ac: Adjust AC_OUTPUT output.
8784 * aclocal.m4: Regenerate.
8785 * configure: Regenerate.
8786
8787 2012-04-19 Pedro Alves <palves@redhat.com>
8788
8789 * Makefile.in (generated_files): New.
8790 (server_h): Remove the explicit dependency on config.h, and depend
8791 on $generated_files.
8792
8793 2012-04-19 Pedro Alves <palves@redhat.com>
8794
8795 * Makefile.in (INCGNU): Add -Ignulib.
8796
8797 2012-04-19 Pedro Alves <palves@redhat.com>
8798
8799 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8800 (INCGNU): ... this, and spell out -I here.
8801 (GNULIB_LIB): Rename to ...
8802 (LIBGNU): ... this.
8803 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8804
8805 2012-04-19 Pedro Alves <palves@redhat.com>
8806
8807 * config.in: Regenerate.
8808
8809 2012-04-19 Pedro Alves <palves@redhat.com>
8810
8811 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8812 * server.h (memmem): Remove declaration.
8813 * config.in: Regenerate.
8814 * configure: Regenerate.
8815
8816 2012-04-19 Yao Qi <yao@codesourcery.com>
8817
8818 * Makefile.in (SFILES): Add common/vec.c.
8819 (OBS): Add vec.o.
8820 (vec.o): New rule.
8821
8822 2012-04-19 Yao Qi <yao@codesourcery.com>
8823
8824 * remote-utils.c (prepare_resume_reply): Replace with macro
8825 target_core_of_thread.
8826 * server.c (handle_qxfer_threads_proper): Likewise.
8827 * target.h (traget_core_of_thread): New macro.
8828
8829 2012-04-18 Pedro Alves <palves@redhat.com>
8830
8831 * aclocal.m4: Regenerate.
8832 * configure: Regenerate.
8833
8834 2012-04-16 Yao Qi <yao@codesourcery.com>
8835
8836 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8837 duplicated on address.
8838
8839 2012-04-16 Yao Qi <yao@codesourcery.com>
8840
8841 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8842 (struct tracepoint_action_ops) <send>: New field.
8843 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8844 (agent_expr_send, x_tracepoint_action_send): New.
8845 (l_tracepoint_action_send): New.
8846 (cmd_qtdp): Download and install tracepoint
8847 according to `use_agent'.
8848 (run_inferior_command): Add one more parameter `len'.
8849 Update callers.
8850 (tracepoint_send_agent): New.
8851 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8852
8853 2012-04-16 Yao Qi <yao@codesourcery.com>
8854
8855 * tracepoint.c (download_tracepoints): Moved to ...
8856 (cmd_qtstart): ... here.
8857
8858 2012-04-14 Yao Qi <yao@codesourcery.com>
8859
8860 * tracepoint.c: Include inttypes.h.
8861 (struct collect_memory_action): Use sized types.
8862 (struct tracepoint): Likewise.
8863 (cmd_qtdp, stop_tracing): Update print specifiers.
8864 (cmd_qtp, response_tracepoint): Likewise.
8865 (collect_data_at_tracepoint): Likewise.
8866 (collect_data_at_step): Likewise.
8867
8868 2012-04-14 Yao Qi <yao@codesourcery.com>
8869
8870 Import gnulib module inttypes.
8871 * aclocal.m4, config.in, configure: Regenerated.
8872
8873 2012-04-14 Yao Qi <yao@codesourcery.com>
8874
8875 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8876 Makefile and config.status at last.
8877
8878 2012-04-13 Yao Qi <yao@codesourcery.com>
8879
8880 * tracepoint.c: Include stdint.h unconditionally.
8881
8882 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8883
8884 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8885 on BFD_HAVE_SYS_PROCFS_TYPE.
8886 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8887 * configure: Regenerate.
8888 * config.in: Likewise.
8889
8890 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8891
8892 * Makefile.in (clean): Also remove x32.c x32-linux.c
8893 x32-avx.c x32-avx-linux.c.
8894 (x32.o): New target.
8895 (x32.c): Likewise.
8896 (x32-linux.o): Likewise.
8897 (x32-linux.c): Likewise.
8898 (x32-avx.o): Likewise.
8899 (x32-avx.c): Likewise.
8900 (x32-avx-linux.o): Likewise.
8901 (x32-avx-linux.c): Likewise.
8902
8903 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8904 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8905 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8906 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8907 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8908 i386/x32-avx-linux.xml.
8909
8910 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8911 (init_registers_x32_avx_linux): Likwise.
8912 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8913 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8914
8915 2012-04-13 Pedro Alves <palves@redhat.com>
8916
8917 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8918 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8919 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8920 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8921 the sub-make.
8922
8923 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8924
8925 * linux-x86-low.c (compat_x32_clock_t): New.
8926 (compat_x32_siginfo_t): Likewise.
8927 (compat_x32_siginfo_from_siginfo): Likewise.
8928 (siginfo_from_compat_x32_siginfo): Likewise.
8929 (linux_is_elf64): Likewise.
8930 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8931 and siginfo_from_compat_x32_siginfo for x32.
8932 (x86_arch_setup): Set linux_is_elf64.
8933
8934 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8935
8936 PR gdb/13969
8937 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8938 e_machine field.
8939 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8940 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8941 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8942 compatible with process.
8943
8944 2012-04-12 Yao Qi <yao@codesourcery.com>
8945
8946 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8947 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8948 (install-only, install-info, clean): Handle sub dir gnulib.
8949 (all-lib, am--refresh): New targets.
8950 (memmem.o): Remove target.
8951 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8952 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8953 (AC_REPLACE_FUNCS): Remove memmem.
8954 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8955 (AC_OUTPUT): Generate Makefile in gnulib/.
8956 * aclocal.m4, config.in, configure: Regenerated.
8957
8958 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8959
8960 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8961
8962 2012-04-05 Pedro Alves <palves@redhat.com>
8963
8964 -Werror=strict-aliasing
8965
8966 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8967 pointer.
8968
8969 2012-04-04 Pedro Alves <palves@redhat.com>
8970
8971 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8972 (sparc_store_gregset_from_stack, sparc_store_gregset)
8973 (sparc_breakpoint_at): Fix formatting.
8974
8975 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8976
8977 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8978 are available.
8979 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8980 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8981 * config.in: Regenerate.
8982 * configure: Likewise.
8983
8984 2012-03-29 Pedro Alves <palves@redhat.com>
8985
8986 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8987 Correct ptrace arguments.
8988
8989 2012-03-28 Pedro Alves <palves@redhat.com>
8990
8991 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8992 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8993 (IA64_FR1_REGNUM): New defines.
8994 (ia64_fetch_register): New.
8995 (the_low_target): Install it.
8996 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8997 field.
8998 * linux-low.c (linux_fetch_registers): Try the
8999 the_low_target.fetch_register hook first.
9000
9001 * linux-arm-low.c (the_low_target): Adjust.
9002 * linux-bfin-low.c (the_low_target): Adjust.
9003 * linux-cris-low.c (the_low_target): Adjust.
9004 * linux-crisv32-low.c (the_low_target): Adjust.
9005 * linux-m32r-low.c (the_low_target): Adjust.
9006 * linux-m68k-low.c (the_low_target): Adjust.
9007 * linux-mips-low.c (the_low_target): Adjust.
9008 * linux-ppc-low.c (the_low_target): Adjust.
9009 * linux-s390-low.c (the_low_target): Adjust.
9010 * linux-sh-low.c (the_low_target): Adjust.
9011 * linux-sparc-low.c (the_low_target): Adjust.
9012 * linux-tic6x-low.c (the_low_target): Adjust.
9013 * linux-x86-low.c (the_low_target): Adjust.
9014 * linux-xtensa-low.c (the_low_target): Adjust.
9015
9016 2012-03-26 Pedro Alves <palves@redhat.com>
9017
9018 * server.c (handle_qxfer_libraries): Don't bail early if
9019 the_target->qxfer_libraries_svr4 is not NULL.
9020
9021 2012-03-26 Pedro Alves <palves@redhat.com>
9022
9023 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9024
9025 2012-03-23 Pedro Alves <palves@redhat.com>
9026
9027 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9028 "library-list-svr4" element's start tag when the the DSO list is
9029 empty.
9030
9031 2012-03-23 Pedro Alves <palves@redhat.com>
9032
9033 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9034 a variable whose type size is the same as the inferior's pointer
9035 size.
9036
9037 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9038
9039 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9040 struct siginfo.
9041 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9042 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9043 * linux-low.h: Include <signal.h>.
9044 (struct siginfo): Remove forward declaration.
9045 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9046 struct siginfo.
9047
9048 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9049
9050 * .gitignore: Ignore more files.
9051
9052 2012-03-19 Pedro Alves <palves@redhat.com>
9053 Jan Kratochvil <jan.kratochvil@redhat.com>
9054
9055 * server.c (cont_thread, general_thread): Add describing comments.
9056 (start_inferior): Clear `cont_thread'.
9057 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9058 of a process.
9059
9060 2012-03-15 Yao Qi <yao@codesourcery.com>
9061
9062 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9063 handling to ...
9064 (cmd_qtdp): ... here.
9065
9066 2012-03-15 Yao Qi <yao@codesourcery.com>
9067
9068 * tracepoint.c (struct tracepoint_action_ops): New.
9069 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9070 (m_tracepoint_action_download): New.
9071 (r_tracepoint_action_download): New.
9072 (x_tracepoint_action_download): New.
9073 (l_tracepoint_action_download): New.
9074 (add_tracepoint_action): Install `action->ops' according type.
9075 (download_tracepoint_1): Move code `download' function pointer
9076 of various tracepoint_action_ops.
9077
9078 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9079
9080 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9081 linux_ptrace_attach_warnings.
9082
9083 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9084
9085 * Makefile.in (linux-ptrace.o): New.
9086 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9087 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9088 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9089 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9090 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9091 of these targets.
9092 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9093
9094 2012-03-08 Yao Qi <yao@codesourcery.com>
9095 Pedro Alves <palves@redhat.com>
9096
9097 Fix PR server/13392.
9098 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9099 offset of JMP insn.
9100 * tracepoint.c (remove_tracepoint): New.
9101 (cmd_qtdp): Call remove_tracepoint when failed to install.
9102
9103 2012-03-07 Pedro Alves <palves@redhat.com>
9104
9105 * linux-low.c (get_detach_signal): New.
9106 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9107 Pass on pending signals to PTRACE_DETACH. Check the result of the
9108 ptrace call.
9109 * server.c (program_signals, program_signals_p): New.
9110 (handle_general_set): Handle QProgramSignals.
9111 * server.h (program_signals, program_signals_p): Declare.
9112
9113 2012-03-05 Pedro Alves <palves@redhat.com>
9114 Jan Kratochvil <jan.kratochvil@redhat.com>
9115
9116 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9117 New comment why.
9118
9119 2012-03-03 Yao Qi <yao@codesourcery.com>
9120
9121 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9122 agent_look_up_symbols.
9123
9124 2012-03-03 Yao Qi <yao@codesourcery.com>
9125
9126 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9127 (linux-x86-low.o): Likewise.
9128 * server.h: Remove in_process_agent_loaded.
9129 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9130 common/agent.c.
9131 Update callers.
9132
9133 2012-03-03 Yao Qi <yao@codesourcery.com>
9134
9135 * tracepoint.c (gdb_agent_capability): New global.
9136 (in_process_agent_loaded_ust): Renamed to
9137 `in_process_agent_supports_ust'.
9138 Update callers.
9139 (in_process_agent_supports_ust): Call agent_capability_check.
9140 (clear_installed_tracepoints): Assert that agent supports
9141 agent.
9142
9143 2012-03-03 Yao Qi <yao@codesourcery.com>
9144
9145 * linux-low.c (linux_supports_agent): New.
9146 (linux_target_ops): Initialize field `supports_agent' with
9147 linux_supports_agent.
9148 * target.h (struct target_ops) <supports_agent>: New.
9149 (target_supports_agent): New macro.
9150 * server.c (handle_general_set): Handle packet 'QAgent'.
9151 (handle_query): Send `QAgent+'.
9152 * Makefile.in (server.o): Depends on agent.h.
9153
9154 2012-03-03 Yao Qi <yao@codesourcery.com>
9155
9156 * Makefile.in (OBS): Add agent.o.
9157 Add new rule for agent.o.
9158 Track dependence of tracepoint.c on agent.h.
9159 * tracepoint.c (run_inferior_command_1):
9160 (run_inferior_command): Call agent_run_command.
9161 (gdb_ust_connect_sync_socket): Deleted. Move it to
9162 common/agent.c.
9163 (resume_thread, stop_thread): Likewise.
9164 (gdb_ust_socket_init): Renamed to ...
9165 (gdb_agent_socket_init): ... New.
9166 (gdb_ust_thread): Renamed to ...
9167 (gdb_agent_helper_thread): ... New.
9168 (gdb_ust_init): Move some code to ...
9169 (gdb_agent_init): ... here. New.
9170 [HAVE_UST]: Call gdb_ust_init.
9171 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9172 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9173 * config.in, configure: Regenerated.
9174
9175 2012-03-02 Pedro Alves <palves@redhat.com>
9176
9177 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9178 * linux-low.c (struct simple_pid_list): New.
9179 (stopped_pids): New a struct simple_pid_list pointer.
9180 (add_to_pid_list, pull_pid_from_list): New.
9181 (handle_extended_wait): Don't assume the first signal new children
9182 report is SIGSTOP. Adjust call to pull_pid_from_list.
9183 (linux_wait_for_lwp): Adjust.
9184
9185 2012-03-02 Yao Qi <yao@codesourcery.com>
9186
9187 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9188 debug log.
9189
9190 2012-03-02 Yao Qi <yao@codesourcery.com>
9191
9192 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9193 `stop_pc' and `tpoint'. Update caller.
9194
9195 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9196
9197 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9198 * linux-low.c (use_linux_regsets): New macro.
9199 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9200 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9201 (linux_register_in_regsets): New function.
9202 (usr_fetch_inferior_registers): Skip registers covered by
9203 regsets.
9204 (usr_store_inferior_registers): Likewise.
9205 (usr_fetch_inferior_registers): New macro.
9206 (usr_store_inferior_registers): Likewise.
9207 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9208 (linux_store_registers): Likewise.
9209 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9210 prototype.
9211 (init_registers_mips64_dsp_linux): Likewise.
9212 (init_registers_mips_linux): New macro.
9213 (init_registers_mips_dsp_linux): Likewise.
9214 (mips_dsp_num_regs): Likewise.
9215 (DSP_BASE, DSP_CONTROL): New fallback macros.
9216 (mips_base_regs): New macro.
9217 (mips_regmap): Use it. Fix the size.
9218 (mips_dsp_regmap): New variable.
9219 (mips_dsp_regset_bitmap): Likewise.
9220 (mips_arch_setup): New function.
9221 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9222 than mips_regmap.
9223 (mips_cannot_store_register): Likewise.
9224 (the_low_target): Update .arch_setup, .num_regs and .regmap
9225 initializers. Add .regset_bitmap initializer.
9226 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9227 initializer.
9228 * linux-bfin-low.c (the_low_target): Likewise.
9229 * linux-cris-low.c (the_low_target): Likewise.
9230 * linux-crisv32-low.c (the_low_target): Likewise.
9231 * linux-ia64-low.c (the_low_target): Likewise.
9232 * linux-m32r-low.c (the_low_target): Likewise.
9233 * linux-m68k-low.c (the_low_target): Likewise.
9234 * linux-ppc-low.c (the_low_target): Likewise.
9235 * linux-s390-low.c (the_low_target): Likewise.
9236 * linux-sh-low.c (the_low_target): Likewise.
9237 * linux-sparc-low.c (the_low_target): Likewise.
9238 * linux-tic6x-low.c (the_low_target): Likewise.
9239 * linux-x86-low.c (the_low_target): Likewise.
9240 * linux-xtensa-low.c (the_low_target): Likewise.
9241 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9242 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9243 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9244 srv_xmlfiles.
9245 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9246 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9247
9248 2012-02-29 Yao Qi <yao@codesourcery.com>
9249 Pedro Alves <palves@redhat.com>
9250
9251 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9252 `step_over_finished' is true.
9253
9254 2012-02-27 Pedro Alves <palves@redhat.com>
9255
9256 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9257 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9258
9259 2012-02-27 Pedro Alves <palves@redhat.com>
9260
9261 PR server/9684
9262 * linux-low.c (pid_is_stopped): New.
9263 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9264
9265 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9266
9267 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9268 of conditions.
9269
9270 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9271
9272 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9273
9274 2012-02-24 Luis Machado <lgustavo@codesourcery>
9275
9276 * server.c (handle_query): Advertise support for target-side
9277 breakpoint condition evaluation.
9278 (process_point_options): New function.
9279 (process_serial_event): When inserting a breakpoint, check for
9280 a target-side condition that should be evaluated.
9281
9282 * mem-break.c: Include regcache.h and ax.h.
9283 (point_cond_list_t): New data structure.
9284 (breakpoint) <cond_list>: New field.
9285 (find_gdb_breakpoint_at): Make non-static.
9286 (delete_gdb_breakpoint_at): Clear any target-side
9287 conditions.
9288 (clear_gdb_breakpoint_conditions): New function.
9289 (add_condition_to_breakpoint): Likewise.
9290 (add_breakpoint_condition): Likewise.
9291 (gdb_condition_true_at_breakpoint): Likewise.
9292 (gdb_breakpoint_here): Return result directly instead
9293 of going through a local variable.
9294
9295 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9296 (clear_gdb_breakpoint_conditions): Likewise.
9297 (add_breakpoint_condition): Likewise.
9298 (gdb_condition_true_at_breakpoint): Likewise.
9299
9300 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9301 (need_step_over_p): Take target-side breakpoint condition into
9302 consideration.
9303
9304 2012-02-24 Luis Machado <lgustavo@codesourcery>
9305
9306 * server.h: Include tracepoint.h.
9307 (agent_mem_read, agent_get_trace_state_variable_value,
9308 agent_set_trace_state_variable_value,
9309 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9310 get_set_tsv_func_addr): New prototypes.
9311
9312 * ax.h: New include file.
9313 * ax.c: New source file.
9314
9315 * tracepoint.c: Include ax.h.
9316 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9317 agent_expr, eval_result_type): Move to ax.h.
9318 (parse_agent_expr): Rename to ...
9319 (gdb_parse_agent_expr): ... this, make it non-static and move
9320 to ax.h.
9321 (unparse_agent_expr) Rename to ...
9322 (gdb_unparse_agent_expr): ... this, make it non-static and move
9323 to ax.h.
9324 (eval_agent_expr): Rename to ...
9325 (eval_tracepoint_agent_expr): ... this.
9326 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9327 forward declarations.
9328 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9329 (agent_get_trace_state_variable_value): New function.
9330 (agent_set_trace_state_variable_value): New function.
9331 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9332 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9333 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9334 (condition_true_at_tracepoint): Likewise.
9335 (parse_agent_expr): Rename to ...
9336 (gdb_parse_agent_expr): ... this and move to ax.c.
9337 (unparse_agent_expr): Rename to ...
9338 (gdb_unparse_agent_expr): ... this and move to ax.c.
9339 (gdb_agent_op_name): Move to ax.c.
9340 (eval_agent_expr): Rename to ...
9341 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9342 and move to ax.c.
9343 (eval_tracepoint_agent_expr): New function.
9344 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9345 non-static.
9346 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9347 ax.c.
9348 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9349 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9350 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9351 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9352 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9353 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9354 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9355 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9356 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9357 (compile_bytecodes): Remove forward declaration.
9358 (is_goto_target): Move to ax.c.
9359 (compile_bytecodes): Move to ax.c and call
9360 agent_get_trace_state_variable_value (...) and
9361 agent_set_trace_state_variable_value (...).
9362
9363 * Makefile.in: Update ax.c and IPA dependencies.
9364
9365 2012-02-24 Pedro Alves <palves@redhat.com>
9366
9367 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9368 (cmd_bigqtbuffer_circular): ... this. Only handle
9369 'QTBuffer:circular:'.
9370 (handle_tracepoint_general_set): Adjust.
9371
9372 2012-02-16 Yao Qi <yao@codesourcery.com>
9373
9374 * inferiors.c: Move code to ...
9375 * dll.c: .... here. New.
9376 * server.h: Declare clear_dlls.
9377 * Makefile.in (SFILES): Add dll.c.
9378 (OBS): Add dll.o
9379 (dll.o): New rule.
9380
9381 2012-02-11 Yao Qi <yao@codesourcery.com>
9382
9383 * server.c: (handle_monitor_command): Add a new parameter
9384 `own_buf'.
9385 (handle_query): Update caller.
9386
9387 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9388
9389 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9390 * configure, config.in: Regenerate.
9391 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9392 is not defined.
9393
9394 2012-02-02 Pedro Alves <palves@redhat.com>
9395
9396 Try SIGKILL first, then PTRACE_KILL.
9397 * linux-low.c (linux_kill_one_lwp): New.
9398 (linux_kill_one_lwp): Rename to ...
9399 (kill_one_lwp_callback): ... this. Use the new
9400 linux_kill_one_lwp.
9401
9402 2012-02-02 Pedro Alves <palves@redhat.com>
9403
9404 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9405 inferior.
9406
9407 2012-01-27 Pedro Alves <palves@redhat.com>
9408
9409 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9410 (elf_64_file_p): Make static.
9411 (linux_pid_exe_is_elf_64_file): New.
9412 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9413 Delete declarations.
9414 (linux_pid_exe_is_elf_64_file): Declare.
9415 * linux-x86-low.c (x86_arch_setup): Use
9416 linux_pid_exe_is_elf_64_file.
9417
9418 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9419
9420 * linux-low.c (linux_wait_for_event_1): Rename to ...
9421 (linux_wait_for_event): ... here and merge it with former
9422 linux_wait_for_event - new variable wait_ptid, use it.
9423 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9424
9425 2012-01-23 Pedro Alves <palves@redhat.com>
9426
9427 * server.c (main): Avoid yet another case of infinite loop while
9428 detaching/killing after a longjmp.
9429
9430 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9431
9432 Code cleanup.
9433 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9434
9435 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9436
9437 * hostio.c (handle_readlink): New function.
9438 (handle_vFile): Call it to handle "vFile:readlink" packets.
9439
9440 2012-01-20 Pedro Alves <palves@redhat.com>
9441 Ulrich Weigand <ulrich.weigand@linaro.org>
9442
9443 * server.c (handle_v_requests): Only support vAttach and vRun to
9444 start multiple processes when in extended protocol mode.
9445
9446 2012-01-17 Pedro Alves <palves@redhat.com>
9447
9448 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9449 memalign plus mprotect to allocate the scratch buffer.
9450
9451 2012-01-13 Pedro Alves <palves@redhat.com>
9452
9453 * server.c (attach_inferior): Clear `cont_thread'.
9454
9455 2012-01-13 Pedro Alves <palves@redhat.com>
9456
9457 * server.c (main): Avoid infinite loop while detaching/killing
9458 after a longjmp.
9459
9460 2012-01-09 Doug Evans <dje@google.com>
9461
9462 * server.c (start_inferior): Set last_ptid in --wrapper case.
9463
9464 2012-01-06 Yao Qi <yao@codesourcery.com>
9465
9466 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9467 defined.
9468 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9469
9470 2012-01-04 Yao Qi <yao@codesourcery.com>
9471
9472 * tracepoint.c (cmd_qtdp): Print debug message
9473 for static tracepoint.
9474
9475 2012-01-04 Yao Qi <yao@codesourcery.com>
9476
9477 * tracepoint.c (trace_vdebug): Differentiate debug message
9478 between gdbserver and IPA.
9479
9480 2012-01-03 Yao Qi <yao@codesourcery.com>
9481
9482 * tracepoint.c (tracepoint_was_hit): Don't collect for
9483 static tracepoint.
9484
9485 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9486
9487 * terminal.h: Reformat copyright header.
9488
9489 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9490
9491 * server.c (gdbserver_version): Update copyright year.
9492 * gdbreplay.c (gdbreplay_version): Likewise.
9493
9494 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9495
9496 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9497
9498 Revert:
9499 2011-12-18 Hui Zhu <teawater@gmail.com>
9500 * linux-low.c (linux_create_inferior): Save return value to ret.
9501
9502 2011-12-18 Hui Zhu <teawater@gmail.com>
9503
9504 * linux-low.c (linux_create_inferior): Save return value to ret.
9505
9506 2011-12-16 Doug Evans <dje@google.com>
9507
9508 * linux-low.c (linux_create_inferior): If stdio connection,
9509 redirect stdin from /dev/null, stdout to stderr.
9510 * remote-utils.c (remote_is_stdio): New static global.
9511 (remote_connection_is_stdio): New function.
9512 (remote_prepare): Handle stdio connection.
9513 (remote_open): Ditto.
9514 (remote_close): Don't close stdin for stdio connections.
9515 (read_prim,write_prim): New functions. Replace all calls to
9516 read/write to these.
9517 * server.c (main): Watch for "-" argument. Move call to
9518 remote_prepare before start_inferior.
9519 * server.h (STDIO_CONNECTION_NAME): New macro.
9520 (remote_connection_is_stdio): Declare.
9521
9522 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9523 in debugging output.
9524
9525 2011-12-15 Yao Qi <yao@codesourcery.com>
9526
9527 * tracepoint.c: Include sys/syscall.h.
9528 (gdb_ust_thread): Remove preprocessor conditional.
9529
9530 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9531
9532 * linux-low.c (linux_detach_one_lwp): Call
9533 the_low_target.prepare_to_resume before detaching.
9534
9535 2011-12-14 Yao Qi <yao@codesourcery.com>
9536
9537 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9538 of write.
9539
9540 2011-12-14 Yao Qi <yao@codesourcery.com>
9541
9542 * i386-low.c (i386_low_stopped_data_address): Initialize local
9543 variable `control'.
9544
9545 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9546
9547 PR remote/13492
9548
9549 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9550 DR_CONTROL unless necessary. Extend comments.
9551 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9552 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9553
9554 2011-12-13 Yao Qi <yao@codesourcery.com>
9555
9556 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9557 macros.
9558 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9559
9560 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9561
9562 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9563 Print new debug message for such case.
9564
9565 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9566
9567 Fix overlapping memcpy.
9568 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9569 the read_inferior_memory transfer.
9570 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9571 write_inferior_memory transfer.
9572 (set_fast_tracepoint_jump): New variable buf. Use it for the
9573 read_inferior_memory and write_inferior_memory transfers.
9574 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9575 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9576 Use it for the write_inferior_memory transfer.
9577 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9578 buffers.
9579
9580 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9581
9582 * linux-low.c (fetch_register, store_register): Make code
9583 consistent, fix formatting.
9584
9585 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9586
9587 * linux-low.c (usr_store_inferior_registers): Factor out code
9588 to handle individual registers into...
9589 (store_register): ... this new function.
9590
9591 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9592
9593 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9594 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9595 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9596 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9597 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9598 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9599 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9600 (srv_xmlfiles): Add new XML files.
9601
9602 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9603 and <sys/uio.h>.
9604 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9605 (init_registers_s390_linux32v1): Add prototype.
9606 (init_registers_s390_linux32v2): Likewise.
9607 (init_registers_s390_linux64v1): Likewise.
9608 (init_registers_s390_linux64v2): Likewise.
9609 (init_registers_s390x_linux64v1): Likewise.
9610 (init_registers_s390x_linux64v2): Likewise.
9611 (s390_num_regs): Increment to 52.
9612 (s390_regmap): Add orig_r2 register.
9613 (s390_num_regs_3264): Increment to 68.
9614 (s390_regmap_3264): Add orig_r2 register.
9615 (s390_collect_ptrace_register): Handle orig_r2 register.
9616 (s390_supply_ptrace_register): Likewise.
9617 (s390_fill_last_break): New function.
9618 (s390_store_last_break): Likewise.
9619 (s390_fill_system_call): New function.
9620 (s390_store_system_call): Likewise.
9621 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9622 register sets.
9623 (s390_check_regset): New function.
9624 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9625 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9626 Update target_regsets for available register sets.
9627
9628 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9629 Jan Kratochvil <jan.kratochvil@redhat.com>
9630
9631 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9632 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9633 New.
9634 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9635 * linux-low.h (struct process_info_private): New member r_debug.
9636 * server.c (handle_qxfer_libraries): Call
9637 the_target->qxfer_libraries_svr4.
9638 (handle_qxfer_libraries_svr4): New function.
9639 (qxfer_packets): New entry "libraries-svr4".
9640 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9641 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9642 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9643 PACKET_qXfer_libraries_svr4.
9644
9645 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9646
9647 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9648 PSW address/mask between 8-byte and 16-byte formats.
9649 (s390_supply_ptrace_register): Likewise.
9650 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9651 basic addressing mode bit.
9652
9653 2011-11-24 Stan Shebs <stan@codesourcery.com>
9654
9655 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9656
9657 2011-11-17 Stan Shebs <stan@codesourcery.com>
9658
9659 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9660 (tracing_start_time): New global.
9661 (tracing_stop_time): New global.
9662 (tracing_user_name): New global.
9663 (tracing_notes): New global.
9664 (tracing_stop_note): New global.
9665 (cmd_qtstart): Set traceframe_usage, start_time.
9666 (stop_tracing): Set stop_time.
9667 (cmd_qtstatus): Report additional status.
9668 (cmd_qtp): New function.
9669 (handle_tracepoint_query): Call it.
9670 (cmd_qtnotes): New function.
9671 (handle_tracepoint_general_set): Call it.
9672 (get_timestamp): Rename from tsv_get_timestamp.
9673
9674 2011-11-14 Stan Shebs <stan@codesourcery.com>
9675 Kwok Cheung Yeung <kcy@codesourcery.com>
9676
9677 * linux-x86-low.c (small_jump_insn): New.
9678 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9679 trampoline and error message, build a trampoline and issue a small
9680 jump instruction to it.
9681 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9682 trampoline and error message.
9683 (x86_get_min_fast_tracepoint_insn_len): New.
9684 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9685 * linux-low.h (struct linux_target_ops): Add arguments to
9686 install_fast_tracepoint_jump_pad operation, add new operation.
9687 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9688 arguments.
9689 (linux_get_min_fast_tracepoint_insn_len): New function.
9690 (linux_target_op): Add new operation.
9691 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9692 (gdb_trampoline_buffer_end): Ditto.
9693 (gdb_trampoline_buffer_error): Ditto.
9694 (struct ipa_sym_addresses): Add fields for new IPA variables.
9695 (symbol_list): Add entries for new IPA variables.
9696 (struct tracepoint): Add fields to hold the address range of the
9697 trampoline used by the tracepoint.
9698 (trampoline_buffer_head): New static variable.
9699 (trampoline_buffer_tail): Ditto.
9700 (claim_trampoline_space): New function.
9701 (have_fast_tracepoint_trampoline_buffer): New function.
9702 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9703 structure.
9704 (install_fast_tracepoint): Ditto, also add error buffer argument.
9705 (cmd_qtminftpilen): New function.
9706 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9707 (fast_tracepoint_from_trampoline_address): New function.
9708 (fast_tracepoint_collecting): Handle trampoline as part of jump
9709 pad space.
9710 (set_trampoline_buffer_space): New function.
9711 (initialize_tracepoint): Initialize new IPA variables.
9712 * target.h (struct target_ops): Add arguments to
9713 install_fast_tracepoint_jump_pad operation, add new
9714 get_min_fast_tracepoint_insn_len operation.
9715 (target_get_min_fast_tracepoint_insn_len): New.
9716 (install_fast_tracepoint_jump_pad): Add arguments.
9717 * server.h (IPA_BUFSIZ): Define.
9718 * linux-i386-ipa.c: Include extra header files.
9719 (initialize_fast_tracepoint_trampoline_buffer): New function.
9720 (initialize_low_tracepoint): Call it.
9721 * server.h (set_trampoline_buffer_space): Declare.
9722 (claim_trampoline_space): Ditto.
9723 (have_fast_tracepoint_trampoline_buffer): Ditto.
9724
9725 2011-11-14 Yao Qi <yao@codesourcery.com>
9726
9727 * server.c (handle_query): Handle InstallInTrace for qSupported.
9728 * tracepoint.c (add_tracepoint): Sort list.
9729 (install_tracepoint, download_tracepoint): New.
9730 (cmd_qtdp): Call them to install and download tracepoints.
9731 (sort_tracepoints): Removed.
9732 (cmd_qtstart): Update.
9733
9734 2011-11-14 Yao Qi <yao@codesourcery.com>
9735
9736 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9737 * mem-break.h: Declare.
9738 * tracepoint.c (cmd_qtstart): Move some code to ...
9739 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9740 New.
9741 (download_tracepoints): Move some code to ...
9742 (download_tracepoint_1): ... here. New.
9743
9744 2011-11-08 Yao Qi <yao@codesourcery.com>
9745
9746 * remote-utils.c (relocate_instruction): A comment fix.
9747
9748 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9749
9750 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9751 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9752 dr_status_mirror and dr_control_mirror from debug_reg_state.
9753 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9754 (i386_initial_stuff): Remove use of deleted globals.
9755 (i386_get_thread_context, i386_set_thread_context,
9756 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9757 from debug_reg_state.
9758
9759 2011-11-05 Yao Qi <yao@codesourcery.com>
9760
9761 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9762 address as TPOINT's.
9763
9764 2011-11-02 Stan Shebs <stan@codesourcery.com>
9765
9766 * tracepoint.c (agent_mem_read_string): New function.
9767 (eval_agent_expr): Call it for tracenz.
9768 * server.c (handle_query): Report support for tracenz.
9769
9770 2011-11-02 Yao Qi <yao@codesourcery.com>
9771
9772 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9773
9774 2011-11-02 Yao Qi <yao@codesourcery.com>
9775
9776 * target.h: Fix a typo in comment.
9777
9778 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9779
9780 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9781 clobber the breakpoints' shadows with fast tracepoint jumps.
9782 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9783 * target.c (write_inferior_memory): Also pass MYADDR down to
9784 check_mem_write.
9785
9786 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9787
9788 * configure.ac: Check support for personality routine.
9789 * configure: Regenerate.
9790 * config.in: Likewise.
9791 * linux-low.c: Include <sys/personality.h>.
9792 Define ADDR_NO_RANDOMIZE if necessary.
9793 (linux_create_inferior): Disable address space randomization when
9794 forking inferior, if requested.
9795 (linux_supports_disable_randomization): New function.
9796 (linux_target_ops): Install it.
9797 * server.h (disable_randomization): Declare.
9798 * server.c (disable_randomization): New global variable.
9799 (handle_general_set): Handle QDisableRandomization.
9800 (handle_query): Likewise for qSupported.
9801 (main): Support --disable-randomization and --no-disable-randomization
9802 command line arguments.
9803 * target.h (struct target_ops): Add supports_disable_randomization.
9804 (target_supports_disable_randomization): New macro.
9805
9806 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9807
9808 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9809 ifdef check.
9810 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9811 [!PT_GETDSBT] (target_loadmap): New definition.
9812 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9813 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9814 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9815 and PT_GETDSBT to LINUX_LOADMAP.
9816 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9817 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9818
9819 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9820
9821 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9822 (arm_linux_hwbp_cap): New static variable.
9823 (arm_linux_get_hwbp_cap): Replace by ...
9824 (arm_linux_init_hwbp_cap): ... this new function.
9825 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9826 (arm_linux_get_hw_watchpoint_count): Likewise.
9827 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9828 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9829 (arm_prepare_to_resume): Use perror_with_name instead of error.
9830
9831 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9832
9833 * linux-arm-low.c: Include <signal.h>.
9834 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9835 (struct arm_linux_hwbp_cap): New data type.
9836 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9837 (struct arm_linux_hw_breakpoint): New data type.
9838 (MAX_BPTS, MAX_WPTS): Define.
9839 (struct arch_process_info, struct arch_lwp_info): New data types.
9840 (arm_linux_get_hwbp_cap): New function.
9841 (arm_linux_get_hw_breakpoint_count): Likewise.
9842 (arm_linux_get_hw_watchpoint_count): Likewise.
9843 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9844 (arm_hwbp_control_initialize): Likewise.
9845 (arm_hwbp_control_is_enabled): Likewise.
9846 (arm_hwbp_control_is_initialized): Likewise.
9847 (arm_hwbp_control_disable): Likewise.
9848 (arm_linux_hw_breakpoint_equal): Likewise.
9849 (arm_linux_hw_point_initialize): Likewise.
9850 (struct update_registers_data): New data structure.
9851 (update_registers_callback: New function.
9852 (arm_insert_point): Likewise.
9853 (arm_remove_point): Likewise.
9854 (arm_stopped_by_watchpoint): Likewise.
9855 (arm_stopped_data_address): Likewise.
9856 (arm_new_process): Likewise.
9857 (arm_new_thread): Likewise.
9858 (arm_prepare_to_resume): Likewise.
9859 (the_low_target): Register arm_insert_point, arm_remove_point,
9860 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9861 arm_new_thread, and arm_prepare_to_resume.
9862
9863 2011-09-15 Stan Shebs <stan@codesourcery.com>
9864
9865 * server.h (struct emit_ops): Add compare-goto fields.
9866 * tracepoint.c (gdb_agent_op_sizes): New table.
9867 (emit_eq_goto): New function.
9868 (emit_ne_goto): New function.
9869 (emit_lt_goto): New function.
9870 (emit_le_goto): New function.
9871 (emit_gt_goto): New function.
9872 (emit_ge_goto): New function.
9873 (is_goto_target): New function.
9874 (compile_bytecodes): Recognize special cases of compare-goto
9875 combinations and call specialized emitters for them.
9876 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9877 (amd64_emit_ne_goto): New function.
9878 (amd64_emit_lt_goto): New function.
9879 (amd64_emit_le_goto): New function.
9880 (amd64_emit_gt_goto): New function.
9881 (amd64_emit_ge_goto): New function.
9882 (amd64_emit_ops): Add the new functions.
9883 (i386_emit_eq_goto): New function.
9884 (i386_emit_ne_goto): New function.
9885 (i386_emit_lt_goto): New function.
9886 (i386_emit_le_goto): New function.
9887 (i386_emit_gt_goto): New function.
9888 (i386_emit_ge_goto): New function.
9889 (i386_emit_ops): Add the new functions.
9890
9891 2011-09-08 Stan Shebs <stan@codesourcery.com>
9892
9893 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9894 (i386_emit_epilogue): Restore %ebx.
9895
9896 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9897
9898 * server.c (step_thread): Remove definition.
9899 (process_serial_event): Don't handle Hs.
9900 * server.h (step_thread): Remove declaration.
9901 * target.c (set_desired_inferior): Remove use of step_thread.
9902
9903 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9904
9905 * linux-low.c: Include linux-procfs.h.
9906 (linux_attach_lwp_1): Update comments.
9907 (linux_attach): Scan for existing threads when attaching to a
9908 process that is the tgid.
9909 * Makefile.in: Update dependencies.
9910
9911 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9912
9913 * configure.srv: Add linux-procfs.o dependencies.
9914
9915 2011-08-14 Yao Qi <yao@codesourcery.com>
9916
9917 * target.h (struct target_ops): Fix indent.
9918 * win32-low.c (win32_target_ops): Fix comment.
9919
9920 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9921 Yao Qi <yao@codesourcery.com>
9922
9923 * Makefile.in (clean): Remove tic6x-*.c files.
9924 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9925 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9926 (tic6x-c64xp-linux.c): Likewise.
9927 * configure.srv: Add support for tic6x-*-uclinux.
9928 * linux-tic6x-low.c: New.
9929 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9930
9931 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9932 Yao Qi <yao@codesourcery.com>
9933
9934 * target.h (struct target_ops): Add read_loadmap.
9935 * linux-low.c (struct target_loadseg): New type.
9936 (struct target_loadmap): New type.
9937 (linux_read_loadmap): New function.
9938 (linux_target_ops): Add linux_read_loadmap.
9939 * server.c (handle_query): Support qXfer:fdpic:read packet.
9940 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9941 to NULL.
9942
9943 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9944
9945 * win32-low.c: Include <stdint.h>.
9946
9947 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9948
9949 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9950 to the inferior here.
9951 (i386_remove_aligned_watchpoint): Ditto.
9952 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9953 fit part of the watchpoint in the debug registers.
9954 (i386_update_inferior_debug_regs): New.
9955 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9956 registers, and only update the inferior on success.
9957 (i386_low_remove_watchpoint): Ditto.
9958
9959 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9960
9961 * linux-low.c (compare_ints, unique, list_threads, show_process,
9962 linux_core_of_thread): Delete.
9963 (linux_target_ops): Change linux_core_of_thread to
9964 linux_common_core_of_thread.
9965 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9966 * utils.c (malloc_failure): Change type of argument.
9967 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9968 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9969 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9970 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9971 (IPA_OBJS): Add common-utils-ipa.o.
9972 (ptid_h, linux_osdata_h): New macros.
9973 (server_h): Add common/common-utils.h, common/xml-utils.h,
9974 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9975 common/ptid.h.
9976 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9977 ptid.o, buffer.o): New rules.
9978 (linux-low.o): Add common/linux-osdata.h as a dependency.
9979 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9980 * configure.ac: Add AC_HEADER_DIRENT check.
9981 * config.in: Regenerate.
9982 * configure: Regenerate.
9983 * remote-utils.c (xml_escape_text): Delete.
9984 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9985 buffer_xml_printf): Move to common/buffer.c.
9986 * server.c (main): Remove call to initialize_inferiors.
9987 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9988 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9989 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9990 internal_error, gdb_assert, gdb_assert_fail): Delete.
9991 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9992 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9993 common/buffer.h.
9994 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9995 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9996 initialize_inferiors): Delete.
9997
9998 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9999
10000 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10001 symbol error.
10002
10003 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10004
10005 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10006 assertion.
10007 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10008
10009 2011-05-26 Yao Qi <yao@codesourcery.com>
10010
10011 * Makefile.in (thread-db.o): Track dependence to
10012 common/gdb_thread_db.h.
10013 * thread-db.c: include gdb_thread_db.h from right place.
10014
10015 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10016
10017 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10018 __FILE__ and __LINE__ to internal_error.
10019
10020 2011-05-13 Doug Evans <dje@google.com>
10021
10022 * thread-db.c (try_thread_db_load_from_sdir): New function.
10023 (try_thread_db_load_from_dir): New function.
10024 (thread_db_load_search): Handle $sdir, ignore $pdir.
10025 Remove trying of system directories if search of
10026 libthread-db-search-path fails, that is now done via $sdir.
10027
10028 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10029
10030 * server.c (handle_query): Add EnableDisableTracepoints to the list
10031 of supported features.
10032 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10033 tracepoints.
10034 (cmd_qtenable_disable): New.
10035 (cmd_qtstart): Install tracepoints even if disabled.
10036 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10037 receiving a QTEnable or QTDisable packet.
10038 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10039 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10040 tracepoints.
10041 (gdb_probe): Skip data collection if static tracepoint is disabled.
10042
10043 2011-05-10 Doug Evans <dje@google.com>
10044
10045 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10046
10047 2011-05-04 Doug Evans <dje@google.com>
10048
10049 * linux-low.c (linux_join): Skip process lookup.
10050 * spu-low.c (spu_join): Ditto.
10051 * server.c (join_inferiors_callback): Delete.
10052 (process_serial_event): For 'D' packet (detach) call join_inferior
10053 directly.
10054
10055 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10056
10057 * README: Don't mention xscale*-*-linux*.
10058 * configure.srv (xscale*-*-linux*): Don't handle target.
10059
10060 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10061
10062 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10063 casting pointers.
10064 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10065 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10066 (i386_emit_void_call_2): Likewise.
10067
10068 2011-04-26 Yao Qi <yao@codesourcery.com>
10069
10070 * linux-low.c: Move common macros to linux-ptrace.h.
10071 Include linux-ptrace.h.
10072 * Makefile.in (linux_ptrace_h): New.
10073 (linux-low.o): Depends on linux-ptrace.h.
10074
10075 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10076
10077 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10078 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10079 (remote_prepare): New function with most of the TCP code from ...
10080 (remote_open): ... here. Detect PORT here unconditionally. Move also
10081 setting transport_is_reliable.
10082 * server.c (run_once): New variable.
10083 (gdbserver_usage): Document it.
10084 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10085 the first run if RUN_ONCE.
10086 * server.h (run_once, remote_prepare): New declarations.
10087
10088 2011-04-19 Tom Tromey <tromey@redhat.com>
10089
10090 * win32-low.c (handle_load_dll): Remove duplicate "the".
10091
10092 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10093
10094 Remove support for old Cygwin 1.5 versions.
10095 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10096 function to avoid warning.
10097 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10098 warning.
10099
10100 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10101
10102 * gdbserver/server.h (Macro _): Define it if not available.
10103
10104 2011-03-14 Michael Snyder <msnyder@vmware.com>
10105
10106 * hostio.c (handle_close): Remove unnecessary null test.
10107
10108 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10109
10110 * Makefile.in (maintainer-clean realclean distclean): Remove
10111 "make ... subdir_do" command.
10112
10113 2011-03-10 Michael Snyder <msnyder@vmware.com>
10114
10115 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10116
10117 * server.c (handle_v_run): Free alloced buffer on early return.
10118
10119 2011-03-09 Yao Qi <yao@codesourcery.com>
10120
10121 Revert:
10122 2011-03-04 Yao Qi <yao@codesourcery.com>
10123
10124 * Makefile.in: Remove GNU make feature --directory.
10125
10126 2011-03-05 Yao Qi <yao@codesourcery.com>
10127
10128 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10129 (subdir_do): New make target. Copied from gdb/Makefile.
10130 (maintainer-clean, realclean, distclean, clean): Call corresponding
10131 make targets in common/Makefile.
10132
10133 2011-02-11 Yao Qi <yao@codesourcery.com>
10134
10135 * configure.ac: Call AC_PROG_RANLIB.
10136 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10137 * configure: Regenerate.
10138
10139 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10140
10141 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10142
10143 2011-03-06 Yao Qi <yao@codesourcery.com>
10144
10145 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10146
10147 2011-03-05 Yao Qi <yao@codesourcery.com>
10148
10149 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10150 (subdir_do): New make target. Copied from gdb/Makefile.
10151 (maintainer-clean, realclean, distclean, clean): Call corresponding
10152 make targets in common/Makefile.
10153
10154 2011-03-04 Yao Qi <yao@codesourcery.com>
10155
10156 * Makefile.in: Remove GNU make feature --directory.
10157
10158 2011-03-04 Michael Snyder <msnyder@vmware.com>
10159
10160 * server.c (queue_stop_reply): Call xmalloc not malloc.
10161
10162 2011-03-02 Michael Snyder <msnyder@vmware.com>
10163
10164 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10165
10166 2011-02-28 Michael Snyder <msnyder@vmware.com>
10167
10168 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10169 (cmd_qtframe): Ditto.
10170 (cmd_qtbuffer): Ditto.
10171 (cmd_bigqtbuffer): Ditto.
10172
10173 * utils.c (decimal2str): Initialize 'width' to nine, then
10174 don't mess with it.
10175
10176 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10177
10178 * hostio.c (require_data): Free *data, not data.
10179
10180 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10181
10182 * hostio.c (require_data): Use free, not xfree.
10183
10184 2011-02-27 Michael Snyder <msnyder@vmware.com>
10185
10186 * server.c (handle_query): Discard unused value.
10187
10188 * hostio.c (require_data): Free malloc memory before returning
10189 error.
10190
10191 2011-02-26 Michael Snyder <msnyder@vmware.com>
10192
10193 * linux-low.c (list_threads): Call closedir for dirent.
10194
10195 2011-02-27 Michael Snyder <msnyder@vmware.com>
10196
10197 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10198 a case statement falls through.
10199
10200 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10201
10202 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10203 in comparison.
10204
10205 2011-02-26 Michael Snyder <msnyder@vmware.com>
10206
10207 * utils.c (decimal2str): Eliminate dead code and dead param.
10208 (pulongest): Drop dead param from call to decimal2str.
10209 (plongest): Ditto.
10210
10211 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10212
10213 Revert the following patch (not approved yet):
10214 2011-02-21 Hui Zhu <teawater@gmail.com>
10215 * tracepoint.c (tp_printf): New function.
10216 (eval_agent_expr): Handle gdb_agent_op_printf.
10217
10218 2011-02-21 Hui Zhu <teawater@gmail.com>
10219
10220 * tracepoint.c (tp_printf): New function.
10221 (eval_agent_expr): Handle gdb_agent_op_printf.
10222
10223 2011-02-18 Tom Tromey <tromey@redhat.com>
10224
10225 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10226 (tracepoint.o): Likewise.
10227 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10228 (gdb_agent_op_names): Likewise.
10229
10230 2011-02-18 Tom Tromey <tromey@redhat.com>
10231
10232 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10233 gdb_agent_op_rot>: New constants.
10234 (gdb_agent_op_names): Add pick and roll.
10235 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10236 cases.
10237
10238 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10239
10240 * aclocal.m4: Regenerated with aclocal-1.11.1.
10241
10242 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10243
10244 * server.c (handle_qxfer_traceframe_info): New.
10245 (qxfer_packets): Register "traceframe-info".
10246 (handle_query): Report support for qXfer:traceframe-info:read+.
10247 * tracepoint.c (match_blocktype): New.
10248 (traceframe_find_block_type): Rename to ...
10249 (traceframe_walk_blocks): ... this. Add callback filter argument,
10250 and use it.
10251 (traceframe_find_block_type): New, reimplemented on top of
10252 traceframe_walk_blocks.
10253 (build_traceframe_info_xml): New.
10254 (traceframe_read_info): New.
10255 * server.h (traceframe_read_info): Declare.
10256
10257 2011-02-11 Yao Qi <yao@codesourcery.com>
10258
10259 * configure.ac: Call AC_PROG_RANLIB.
10260 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10261 * configure: Regenerate.
10262
10263 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10264
10265 * server.c (gdb_read_memory): Change return semantics to allow
10266 partial transfers.
10267 (handle_search_memory_1): Adjust.
10268 (process_serial_event) <'m' packet>: Handle partial transfers.
10269 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10270
10271 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10272
10273 * regcache.c (init_register_cache): Initialize
10274 regcache->register_status.
10275 (free_register_cache): Release regcache->register_status.
10276 (regcache_cpy): Copy register_status.
10277 (registers_to_string): Print 'x's for unavailable registers.
10278 (supply_register): Mark the register's status valid or
10279 unavailable, depending on whether a buffer was passed in or not.
10280 (supply_register_zeroed): New.
10281 (supply_regblock): Mark the registers' status valid or
10282 unavailable, depending on whether a buffer was passed in or not.
10283 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10284 (struct regcache): New `register_status' field.
10285 (supply_register_zeroed): Declare.
10286 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10287 supply_register_zeroed, rather than passing a NULL buffer to
10288 supply_register.
10289 * tracepoint.c (fetch_traceframe_registers): Update comment.
10290
10291 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10292
10293 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10294 buffer explicit.
10295
10296 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10297
10298 * server.h (decode_xfer_write): Change prototype.
10299 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10300 and don't extract the annex here.
10301 * server.c (decode_xfer_read): Remove `annex' parameter,
10302 and don't extract the annex here.
10303 (decode_xfer): New.
10304 (struct qxfer): New.
10305 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10306 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10307 (handle_qxfer_statictrace): New functions, abstracted out from
10308 handle_query, and made to use the struct qxfer interface.
10309 (handle_threads_qxfer_proper): Rename to ...
10310 (handle_qxfer_threads_proper): ... this.
10311 (handle_threads_qxfer): Rename to ...
10312 (handle_qxfer_threads): ... this. Adjust.
10313 (qxfer_packets): New array.
10314 (handle_qxfer): New function.
10315 (handle_query): Use handle_qxfer.
10316
10317 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10318
10319 * gdbreplay.c: Shorten lines of >= 80 columns.
10320 * linux-low.c: Ditto.
10321 * linux-ppc-low.c: Ditto.
10322 * linux-s390-low.c: Ditto.
10323 * linux-sparc-low.c: Ditto.
10324 * linux-x86-low.c: Ditto.
10325 * linux-xtensa-low.c: Ditto.
10326 * mem-break.c: Ditto.
10327 * nto-low.c: Ditto.
10328 * regcache.h: Ditto.
10329 * remote-utils.c: Ditto.
10330 * server.c: Ditto.
10331 * server.h: Ditto.
10332 * thread-db.c: Ditto.
10333 * tracepoint.c: Ditto.
10334 * utils.c: Ditto.
10335 * win32-low.h: Ditto.
10336
10337 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10338
10339 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10340 update.
10341
10342 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10343
10344 * server.c (gdbserver_version): Update copyright year in version
10345 output.
10346 * gdbreplay.c (gdbreplay_version): Ditto.
10347
10348 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10349
10350 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10351 * linux-bfin-low.c: New file.
10352 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10353 PT_DATA_ADDR for BFIN targets.
10354 * Makefile.in (SFILES): Add linux-bfin-low.c.
10355 (clean): Remove reg-bfin.c.
10356 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10357 * README: Mention supported Blackfin targets.
10358
10359 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10360
10361 * .gitignore: New file.
10362
10363 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10364
10365 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10366
10367 2010-10-22 Jie Zhang <jie@codesourcery.com>
10368
10369 * Makefile.in: Add FLAGS_TO_PASS variable.
10370 (install): Remove dependency of install-only and recursively
10371 invoke make for install-only.
10372
10373 2010-10-04 Doug Evans <dje@google.com>
10374
10375 * Makefile.in (uninstall): Use $(DESTDIR).
10376
10377 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10378
10379 PR gdb/11842
10380
10381 * linux-x86-low.c (compat_siginfo_from_siginfo)
10382 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10383 si_code is < 0. Check for si_code == SI_TIMER before checking for
10384 si_code < 0.
10385
10386 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10387
10388 * lynx-i386-low.c: New file.
10389 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10390
10391 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10392
10393 * lynx-low.c (ptrace_request_to_str): Remove handling for
10394 request values that have been removed in LynxOS 5.x.
10395
10396 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10397
10398 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10399 <ptrace.h>
10400
10401 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10402
10403 * configure.ac: Add --enable-inprocess-agent option.
10404 * configure: Rebuilt.
10405
10406 2010-09-06 Yao Qi <yao@codesourcery.com>
10407
10408 * linux-low.c (linux_kill): Remove unused variable.
10409 (linux_stabilize_threads): Likewise.
10410 * server.c (start_inferior): Likewise.
10411 (queue_stop_reply_callback): Likewise.
10412 * tracepoint.c (do_action_at_tracepoint): Likewise.
10413
10414 2010-09-06 Yao Qi <yao@codesourcery.com>
10415
10416 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10417 on return.
10418
10419 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10420
10421 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10422
10423 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10424
10425 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10426 "$(IPA_DEPFILES)".
10427
10428 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10429
10430 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10431 gdbserver/lynx-ppc-low.c: New files.
10432 * Makefile.in (lynx_low_h): New variable.
10433 (lynx-low.o, lynx-ppc-low.o): New rules.
10434 * configure.ac: On LynxOS, link with -lnetinet.
10435 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10436 * configure: regenerate.
10437
10438 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10439
10440 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10441 * configure.ac: Add check for vasprintf and vsnprintf.
10442 * configure, config.in: Regenerate.
10443 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10444
10445 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10446
10447 * gdbreplay.c: Move include of alloca.h up, next to include of
10448 malloc.h.
10449 * server.h: Add include of malloc.h.
10450 * mem-break.c: Remove include of malloc.h.
10451 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10452
10453 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10454
10455 * Makefile.in (memmem.o): Build with -Wno-error.
10456
10457 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10458
10459 * utils.c (xsnprintf): Make non-static.
10460 * server.h: Add xsnprintf declaration.
10461 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10462 replace calls to snprintf by calls to xsnprintf throughout.
10463
10464 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10465
10466 * configure.ac: Add configure check for alloca.
10467 * configure, config.in: Regenerate.
10468 * server.h: Include alloca.h if it exists.
10469 * gdbreplay.c: Include alloca.h if it exists.
10470
10471 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10472
10473 * linux-low.c (__SIGRTMIN): Define if not already defined.
10474 (linux_create_inferior): Check for __ANDROID__ rather than
10475 __SIGRTMIN.
10476 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10477 are already deferred.
10478 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10479 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10480 stopped and already has a pending signal to report.
10481 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10482 a pending signal to report or is moving out of a jump pad.
10483 (linux_init_signals): Check for __ANDROID__ rather than
10484 __SIGRTMIN.
10485
10486 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10487
10488 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10489 debug_threads check. Avoid a linear search when not doing debug
10490 output.
10491
10492 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10493
10494 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10495 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10496 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10497 (process_event): Change local fd's type to gdb_fildes_t.
10498 (create_file_handler): Adjust prototype.
10499 (delete_file_handler): Adjust prototype.
10500 (handle_file_event): Adjust prototype. Use pfildes.
10501 (create_file_event): Adjsut prototype.
10502 * remote-utils.c (remote_desc, listen_desc): Change type to
10503 gdb_fildes_t.
10504 * server.h: New gdb_fildes_t typedef.
10505 [USE_WIN32API]: Include winsock2.h.
10506 (delete_file_handler, add_file_handler): Adjust prototypes.
10507 (pfildes): Declare.
10508 * utils.c (pfildes): New.
10509
10510 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10511
10512 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10513 * configure: Regenerate.
10514
10515 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10516
10517 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10518 (linux_done_accessing_memory): ... this.
10519 (linux_target_ops): Adjust.
10520 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10521 * nto-low.c (nto_target_ops): Adjust comment.
10522 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10523 * spu-low.c (spu_target_ops): Adjust comment.
10524 * target.h (target_ops): Rename unprepare_to_access_memory field
10525 to done_accessing_memory.
10526 (unprepare_to_access_memory): Rename to ...
10527 (done_accessing_memory): ... this.
10528
10529 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10530
10531 * linux-low.c (linux_prepare_to_access_memory): New.
10532 (linux_unprepare_to_access_memory): New.
10533 (linux_target_ops): Install them.
10534 * server.c (read_memory): Rename to ...
10535 (gdb_read_memory): ... this. Use
10536 prepare_to_access_memory/prepare_to_access_memory.
10537 (write_memory): Rename to ...
10538 (gdb_write_memory): ... this. Use
10539 prepare_to_access_memory/prepare_to_access_memory.
10540 (handle_search_memory_1): Adjust.
10541 (process_serial_event): Adjust.
10542 * target.h (struct target_ops): New fields
10543 prepare_to_access_memory and unprepare_to_access_memory.
10544 (prepare_to_access_memory, unprepare_to_access_memory): New.
10545 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10546 prepare_to_access_memory/prepare_to_access_memory.
10547 * nto-low.c (nto_target_ops): Adjust.
10548 * spu-low.c (spu_target_ops): Adjust.
10549 * win32-low.c (win32_target_ops): Adjust.
10550
10551 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10552
10553 * Makefile.in (WARN_CFLAGS): Get it from configure.
10554 (WERROR_CFLAGS): New.
10555 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10556 * configure.ac: Introduce --enable-werror, which adds -Werror to
10557 the compiler command line. Enabled by default. Disable with
10558 --disable-werror. Add -Wdeclaration-after-statement
10559 Wpointer-arith and -Wformat-nonliteral to warning flags.
10560 * configure: Regenerate.
10561
10562 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10563
10564 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10565
10566 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10567
10568 * gdbreplay.c (remote_error): New.
10569 (gdbchar): New.
10570 (expect): Use gdbchar. Check for error reading from GDB.
10571 Clarify sync error output.
10572 (play): Check for errors writing to GDB.
10573 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10574 * remote-utils.c (getpkt): Check for errors writing to the remote
10575 descriptor.
10576
10577 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10578
10579 * linux-low.c (linux_wait_1): Move non-debugging code out of
10580 `debug_threads' control.
10581
10582 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10583
10584 * linux-low.c (linux_wait_1): Don't set last_status here.
10585 * server.c (push_event, queue_stop_reply_callback): Assert we're
10586 not pushing a TARGET_WAITKIND_IGNORE event.
10587 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10588 (myresume, handle_target_event): Set the thread's last_resume_kind
10589 and last_status from the target returned status.
10590
10591 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10592
10593 PR threads/10729
10594
10595 * linux-x86-low.c (update_debug_registers_callback): New.
10596 (i386_dr_low_set_addr): Use it.
10597 (i386_dr_low_get_addr): New.
10598 (i386_dr_low_set_control): Use update_debug_registers_callback.
10599 (i386_dr_low_get_control): New.
10600 (i386_dr_low_get_status): Adjust.
10601 * linux-low.c (linux_stop_lwp): New.
10602 * linux-low.h (linux_stop_lwp): Declare.
10603
10604 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10605 argument instead of a i386_debug_reg_state.
10606 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10607 a i386_debug_reg_state.
10608 (i386_insert_aligned_watchpoint): Adjust.
10609 (i386_remove_aligned_watchpoint): Adjust.
10610 (i386_low_stopped_data_address): Read the debug registers from the
10611 inferior instead of from the mirrors.
10612 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10613 (i386_dr_low_get_addr): Declare.
10614 (i386_dr_low_get_control): Declare.
10615 (i386_dr_low_get_status): Change prototype.
10616
10617 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10618 (i386_dr_low_get_addr): New.
10619 (i386_dr_low_get_control): New.
10620 (i386_dr_low_get_status): Adjust prototype. Return
10621 dr_status_mirror.
10622 (i386_initial_stuff): Clear dr_status_mirror and
10623 dr_control_mirror.
10624 (i386_get_thread_context): Adjust.
10625 (i386_set_thread_context): Adjust.
10626 (i386_thread_added): Adjust.
10627
10628 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10629
10630 * linux-low.h (linux_thread_area): Delete declaration.
10631
10632 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10633
10634 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10635 after its termination.
10636
10637 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10638
10639 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10640 (gdb_wants_all_stopped): Delete.
10641 (linux_wait_1): Don't call them.
10642 * server.c (handle_v_cont): Tag all threads as want-stopped.
10643 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10644 stopped as "client-wants-stopped".
10645
10646 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10647
10648 * Makefile.in (signals_h): New.
10649 (server_h): Depend on it.
10650 (server.o): Don't depend on $(signals_def).
10651 (signals.o): Depend on $(signals_def).
10652
10653 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10654
10655 * Makefile.in (signals_def): New.
10656 (server_h): Append include/gdb/signals.h and signals_def.
10657 (server.o): Append signals_def.
10658
10659 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10660
10661 * server.c (handle_target_event): Use target_signal_to_host for
10662 resume_info.sig initialization.
10663 * target.h (struct thread_resume) <sig>: New comment.
10664
10665 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10666
10667 * server.c (handle_query): strcpy() the returned string from paddress()
10668 instead of sprintf().
10669 * utils.c (paddress): Return phex_nz().
10670
10671 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10672
10673 * server.c (handle_v_cont): Call mourn_inferior if process
10674 just exited.
10675 (myresume): Likewise.
10676
10677 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10678
10679 Static tracepoints, and integration with UST.
10680
10681 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10682 * mem-break.c (uninsert_all_breakpoints)
10683 (reinsert_all_breakpoints): New.
10684 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10685 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10686 (gdb_agent_ust_loaded, helper_thread_id)
10687 (gdb_agent_helper_thread_id): New macros.
10688 (struct ipa_sym_addresses): Add addr_ust_loaded,
10689 addr_helper_thread_id, addr_cmd_buf.
10690 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10691 (in_process_agent_loaded_ust): New.
10692 (write_e_ust_not_loaded): New.
10693 (maybe_write_ipa_ust_not_loaded): New.
10694 (struct collect_static_trace_data_action): New.
10695 (enum tracepoint_type) <static_tracepoint>: New.
10696 (struct tracepoint) <handle>: Mention static tracepoints.
10697 (struct static_tracepoint_ctx): New.
10698 (CMD_BUF_SIZE): New.
10699 (add_tracepoint_action): Handle static tracepoint actions.
10700 (unprobe_marker_at): New.
10701 (clear_installed_tracepoints): Handle static tracepoints.
10702 (cmd_qtdp): Handle static tracepoints.
10703 (probe_marker_at): New.
10704 (cmd_qtstart): Handle static tracepoints.
10705 (response_tracepoint): Handle static tracepoints.
10706 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10707 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10708 (get_context_regcache): Handle static tracepoints.
10709 (do_action_at_tracepoint): Handle static tracepoint actions.
10710 (traceframe_find_block_type): Handle static trace data blocks.
10711 (traceframe_read_sdata): New.
10712 (download_tracepoints): Download static tracepoint actions.
10713 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10714 (GDB_PROBE_NAME): New.
10715 (ust_ops): New.
10716 (GET_UST_SYM): New.
10717 (USTF): New.
10718 (dlsym_ust): New.
10719 (ust_marker_to_static_tracepoint): New.
10720 (gdb_probe): New.
10721 (collect_ust_data_at_tracepoint): New.
10722 (gdb_ust_probe): New.
10723 (UNIX_PATH_MAX, SOCK_DIR): New.
10724 (gdb_ust_connect_sync_socket): New.
10725 (resume_thread, stop_thread): New.
10726 (run_inferior_command): New.
10727 (init_named_socket): New.
10728 (gdb_ust_socket_init): New.
10729 (cstr_to_hexstr): New.
10730 (next_st): New.
10731 (first_marker, next_marker): New.
10732 (response_ust_marker): New.
10733 (cmd_qtfstm, cmd_qtsstm): New.
10734 (unprobe_marker_at, probe_marker_at): New.
10735 (cmd_qtstmat, gdb_ust_thread): New.
10736 (gdb_ust_init): New.
10737 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10738 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10739 (ST_REGENTRY): New.
10740 (x86_64_st_collect_regmap): New.
10741 (X86_64_NUM_ST_COLLECT_GREGS): New.
10742 (AMD64_RIP_REGNUM): New.
10743 (supply_static_tracepoint_registers): New.
10744 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10745 (ST_REGENTRY): New.
10746 (i386_st_collect_regmap): New.
10747 (i386_NUM_ST_COLLECT_GREGS): New.
10748 (supply_static_tracepoint_registers): New.
10749 * server.c (handle_query): Handle qXfer:statictrace:read.
10750 <qSupported>: Report support for StaticTracepoints, and
10751 qXfer:statictrace:read features.
10752 * server.h (traceframe_read_sdata)
10753 (supply_static_tracepoint_registers): Declare.
10754 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10755 (unpack_varlen_hex): Include in IPA build.
10756 * Makefile.in (ustlibs, ustinc): New.
10757 (IPA_OBJS): Add remote-utils-ipa.o.
10758 ($(IPA_LIB)): Link -ldl and -lpthread.
10759 (UST_CFLAGS): New.
10760 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10761 * config.in, configure: Regenerate.
10762
10763 2010-06-20 Ian Lance Taylor <iant@google.com>
10764 Pedro Alves <pedro@codesourcery.com>
10765
10766 * linux-x86-low.c (always_true): Delete.
10767 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10768 trying to fool the compiler with always_true.
10769
10770 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10771
10772 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10773 conditions in gdbserver.
10774
10775 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10776
10777 * spu-low.c (spu_read_memory): Wrap around local store limit.
10778 (spu_write_memory): Likewise.
10779
10780 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10781
10782 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10783 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10784 LONGEST uses.
10785 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10786 uses.
10787 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10788 uses with LONGEST uses.
10789
10790 2010-06-14 Stan Shebs <stan@codesourcery.com>
10791 Pedro Alves <pedro@codesourcery.com>
10792
10793 Bytecode compiler.
10794
10795 * linux-x86-low.c: Include limits.h.
10796 (add_insns): New.
10797 (always_true): New.
10798 (EMIT_ASM): New.
10799 (EMIT_ASM32): New.
10800 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10801 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10802 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10803 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10804 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10805 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10806 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10807 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10808 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10809 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10810 (amd64_emit_void_call_2): New.
10811 (amd64_emit_ops): New.
10812 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10813 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10814 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10815 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10816 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10817 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10818 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10819 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10820 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10821 (i386_emit_stack_adjust, i386_emit_int_call_1)
10822 (i386_emit_void_call_2): New.
10823 (i386_emit_ops): New.
10824 (x86_emit_ops): New.
10825 (the_low_target): Install x86_emit_ops.
10826 * server.h (struct emit_ops): New.
10827 (get_raw_reg_func_addr): Declare.
10828 (current_insn_ptr, emit_error): Declare.
10829 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10830 (set_trace_state_variable_value): New defines.
10831 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10832 addr_get_trace_state_variable_value and
10833 addr_set_trace_state_variable_value.
10834 (symbol_list): New fields for get_raw_reg,
10835 get_trace_state_variable_value and set_trace_state_variable_value.
10836 (condfn): New typedef.
10837 (struct tracepoint): New field `compiled_cond'.
10838 (do_action_at_tracepoint): Clear compiled_cond.
10839 (get_trace_state_variable_value, set_trace_state_variable_value):
10840 Export in the IPA.
10841 (condition_true_at_tracepoint): If there's a compiled condition,
10842 run that.
10843 (current_insn_ptr, emit_error): New globals.
10844 (struct bytecode_address): New.
10845 (get_raw_reg_func_addr): New.
10846 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10847 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10848 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10849 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10850 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10851 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10852 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10853 (compile_tracepoint_condition, compile_bytecodes): New.
10854 * target.h (emit_ops): Forward declare.
10855 (struct target_ops): New field emit_ops.
10856 (target_emit_ops): New.
10857 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10858 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10859 * linux-low.c (linux_emit_ops): New.
10860 (linux_target_ops): Install it.
10861 * linux-low.h (struct linux_target_ops): New field emit_ops.
10862
10863 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10864
10865 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10866 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10867
10868 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10869 Stan Shebs <stan@codesourcery.com>
10870
10871 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10872 (all): Depend on $(extra_libraries).
10873 (install-only): Install the IPA.
10874 (IPA_OBJS, IPA_LIB): New.
10875 (clean): Remove the IPA lib.
10876 (IPAGENT_CFLAGS): New.
10877 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10878 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10879 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10880 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10881 * configure.ac: Check for atomic builtins support in the compiler.
10882 (IPA_DEPFILES, extra_libraries): Define.
10883 * configure.srv (ipa_obj): Add description.
10884 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10885 (i[34567]86-*-linux*): Set ipa_obj.
10886 (x86_64-*-linux*): Set ipa_obj.
10887 * linux-low.c (stabilizing_threads): New.
10888 (supports_fast_tracepoints): New.
10889 (linux_detach): Stabilize threads before detaching.
10890 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10891 the lwp is either not stabilizing, or is moving out of a jump pad.
10892 (linux_fast_tracepoint_collecting): New.
10893 (maybe_move_out_of_jump_pad): New.
10894 (enqueue_one_deferred_signal): New.
10895 (dequeue_one_deferred_signal): New.
10896 (linux_wait_for_event_1): If moving out of a jump pad, defer
10897 pending signals to later.
10898 (linux_stabilize_threads): New.
10899 (linux_wait_1): Check if threads need moving out of jump pads, and
10900 do it if so.
10901 (stuck_in_jump_pad_callback): New.
10902 (move_out_of_jump_pad_callback): New.
10903 (lwp_running): New.
10904 (linux_resume_one_lwp): Handle moving out of jump pads.
10905 (linux_set_resume_request): Dequeue deferred signals.
10906 (need_step_over_p): Also step over fast tracepoint jumps.
10907 (start_step_over): Also uninsert fast tracepoint jumps.
10908 (finish_step_over): Also reinsert fast tracepoint jumps.
10909 (linux_install_fast_tracepoint_jump): New.
10910 (linux_target_ops): Install linux_stabilize_threads and
10911 linux_install_fast_tracepoint_jump_pad.
10912 * linux-low.h (linux_target_ops) <get_thread_area,
10913 install_fast_tracepoint_jump_pad>: New fields.
10914 (struct lwp_info) <collecting_fast_tracepoint,
10915 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10916 (linux_get_thread_area): Declare.
10917 * linux-x86-low.c (jump_insn): New.
10918 (x86_get_thread_area): New.
10919 (append_insns): New.
10920 (push_opcode): New.
10921 (amd64_install_fast_tracepoint_jump_pad): New.
10922 (i386_install_fast_tracepoint_jump_pad): New.
10923 (x86_install_fast_tracepoint_jump_pad): New.
10924 (the_low_target): Install x86_get_thread_area and
10925 x86_install_fast_tracepoint_jump_pad.
10926 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10927 (struct fast_tracepoint_jump): New.
10928 (fast_tracepoint_jump_insn): New.
10929 (fast_tracepoint_jump_shadow): New.
10930 (find_fast_tracepoint_jump_at): New.
10931 (fast_tracepoint_jump_here): New.
10932 (delete_fast_tracepoint_jump): New.
10933 (set_fast_tracepoint_jump): New.
10934 (uninsert_fast_tracepoint_jumps_at): New.
10935 (reinsert_fast_tracepoint_jumps_at): New.
10936 (set_breakpoint_at): Use write_inferior_memory.
10937 (uninsert_raw_breakpoint): Use write_inferior_memory.
10938 (check_mem_read): Mask out fast tracepoint jumps.
10939 (check_mem_write): Mask out fast tracepoint jumps.
10940 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10941 (set_fast_tracepoint_jump): Declare.
10942 (delete_fast_tracepoint_jump)
10943 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10944 (reinsert_fast_tracepoint_jumps_at): Declare.
10945 * regcache.c: Don't compile many functions when building the
10946 in-process agent library.
10947 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10948 the register buffer in the heap.
10949 (free_register_cache): If the register buffer isn't owned by the
10950 regcache, don't free it.
10951 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10952 pre-existing register caches.
10953 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10954 type.
10955 (convert_ascii_to_int): : Constify `from' parameter type.
10956 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10957 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10958 the needed buffer in-place.
10959 (relocate_instruction): New.
10960 * server.c (handle_query) <qSymbols>: If the target supports
10961 tracepoints, give it a chance of looking up symbols. Report
10962 support for fast tracepoints.
10963 (handle_status): Stabilize threads.
10964 (process_serial_event): Adjust.
10965 * server.h (struct fast_tracepoint_jump): Forward declare.
10966 (struct process_info) <fast_tracepoint_jumps>: New field.
10967 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10968 (decode_X_packet, decode_M_packet): Adjust.
10969 (relocate_instruction): Declare.
10970 (in_process_agent_loaded): Declare.
10971 (tracepoint_look_up_symbols): Declare.
10972 (struct fast_tpoint_collect_status): Declare.
10973 (fast_tracepoint_collecting): Declare.
10974 (force_unlock_trace_buffer): Declare.
10975 (handle_tracepoint_bkpts): Declare.
10976 (initialize_low_tracepoint)
10977 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10978 * target.h (struct target_ops) <stabilize_threads,
10979 install_fast_tracepoint_jump_pad>: New fields.
10980 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10981 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10982 [HAVE_STDINT_H]: Include stdint.h.
10983 (trace_debug_1): Rename to ...
10984 (trace_vdebug): ... this.
10985 (trace_debug): Rename to ...
10986 (trace_debug_1): ... this. Add `level' parameter.
10987 (trace_debug): New.
10988 (ATTR_USED, ATTR_NOINLINE): New.
10989 (IP_AGENT_EXPORT): New.
10990 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10991 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10992 (about_to_request_buffer_space, trace_buffer_is_full)
10993 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10994 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10995 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10996 (traceframe_write_count, traceframes_created)
10997 (trace_state_variables)
10998 New renaming defines.
10999 (struct ipa_sym_addresses): New.
11000 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11001 (symbol_list): New.
11002 (ipa_sym_addrs): New.
11003 (all_tracepoint_symbols_looked_up): New.
11004 (in_process_agent_loaded): New.
11005 (write_e_ipa_not_loaded): New.
11006 (maybe_write_ipa_not_loaded): New.
11007 (tracepoint_look_up_symbols): New.
11008 (debug_threads) [IN_PROCESS_AGENT]: New.
11009 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11010 (UNKNOWN_SIDE_EFFECTS): New.
11011 (stop_tracing): New.
11012 (flush_trace_buffer): New.
11013 (stop_tracing_bkpt): New.
11014 (flush_trace_buffer_bkpt): New.
11015 (read_inferior_integer): New.
11016 (read_inferior_uinteger): New.
11017 (read_inferior_data_pointer): New.
11018 (write_inferior_data_pointer): New.
11019 (write_inferior_integer): New.
11020 (write_inferior_uinteger): New.
11021 (struct collect_static_trace_data_action): Delete.
11022 (enum tracepoint_type): New.
11023 (struct tracepoint) <type>: New field `type'.
11024 <actions_str, step_actions, step_actions_str>: Only include in
11025 GDBserver.
11026 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11027 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11028 (tracepoints): Use IP_AGENT_EXPORT.
11029 (last_tracepoint): Don't include in the IPA.
11030 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11031 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11032 (alloced_trace_state_variables): New.
11033 (trace_state_variables): Use IP_AGENT_EXPORT.
11034 (traceframe_t): Delete unused variable.
11035 (circular_trace_buffer): Don't include in the IPA.
11036 (trace_buffer_start): Delete.
11037 (struct trace_buffer_control): New.
11038 (trace_buffer_free): Delete.
11039 (struct ipa_trace_buffer_control): New.
11040 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11041 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11042 New.
11043 (trace_buffer_ctrl): New.
11044 (TRACE_BUFFER_CTRL_CURR): New.
11045 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11046 Reimplement as macros.
11047 (trace_buffer_wrap): Delete.
11048 (traceframe_write_count, traceframe_read_count)
11049 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11050 (struct tracepoint_hit_ctx) <type>: New field.
11051 (struct fast_tracepoint_ctx): New.
11052 (memory_barrier): New.
11053 (cmpxchg): New.
11054 (record_tracepoint_error): Update atomically in the IPA.
11055 (clear_inferior_trace_buffer): New.
11056 (about_to_request_buffer_space): New.
11057 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11058 updating the same buffer.
11059 (add_tracepoint): Default the tracepoint's type to trap
11060 tracepoint, and orig_size to -1.
11061 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11062 internal variables.
11063 (create_trace_state_variable): New parameter `gdb'. Handle it.
11064 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11065 (cmd_qtdp): Handle fast tracepoints.
11066 (cmd_qtdv): Adjust.
11067 (max_jump_pad_size): New.
11068 (gdb_jump_pad_head): New.
11069 (get_jump_space_head): New.
11070 (claim_jump_space): New.
11071 (sort_tracepoints): New.
11072 (MAX_JUMP_SIZE): New.
11073 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11074 IPA.
11075 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11076 support. Upload fast traceframes, and delete internal IPA
11077 breakpoints.
11078 (stop_tracing_handler): New.
11079 (flush_trace_buffer_handler): New.
11080 (cmd_qtstop): Upload fast tracepoints.
11081 (response_tracepoint): Handle fast tracepoints.
11082 (tracepoint_finished_step): Upload fast traceframes. Set the
11083 tracepoint hit context's tracepoint type.
11084 (handle_tracepoint_bkpts): New.
11085 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11086 type. Add comment about fast tracepoints.
11087 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11088 non-existing action_str field.
11089 (get_context_regcache): Handle fast tracepoints.
11090 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11091 to the regcache.
11092 (fast_tracepoint_from_jump_pad_address): New.
11093 (fast_tracepoint_from_ipa_tpoint_address): New.
11094 (collecting_t): New.
11095 (force_unlock_trace_buffer): New.
11096 (fast_tracepoint_collecting): New.
11097 (collecting): New.
11098 (gdb_collect): New.
11099 (write_inferior_data_ptr): New.
11100 (target_tp_heap): New.
11101 (target_malloc): New.
11102 (download_agent_expr): New.
11103 (UALIGN): New.
11104 (download_tracepoints): New.
11105 (download_trace_state_variables): New.
11106 (upload_fast_traceframes): New.
11107 (IPA_FIRST_TRACEFRAME): New.
11108 (IPA_NEXT_TRACEFRAME_1): New.
11109 (IPA_NEXT_TRACEFRAME): New.
11110 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11111 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11112 (gdb_jump_pad_buffer_end): New.
11113 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11114 (initialize_tracepoint): Adjust.
11115 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11116 buffer. Initialize the low module.
11117 * utils.c (PREFIX, TOOLNAME): New.
11118 (malloc_failure): Use PREFIX.
11119 (error): In the IPA, an error causes an exit.
11120 (fatal, warning): Use PREFIX.
11121 (internal_error): Use TOOLNAME.
11122 (NUMCELLS): Increase to 10.
11123 * configure, config.in: Regenerate.
11124
11125 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11126
11127 * server.c (handle_query) <qSupported>: Do two passes over the
11128 qSupported string to avoid nesting strtok.
11129
11130 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11131
11132 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11133 (CDEPS): New.
11134 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11135 -Wl,--dynamic-list.
11136 * configure: Regenerate.
11137 * proc-service.list: New.
11138
11139 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11140
11141 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11142 New comment.
11143
11144 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11145
11146 * gdbreplay.c (remote_open): Check error return from socket() call by
11147 its equality to -1 not by it being negative.
11148 * remote-utils.c (remote_open): Likewise.
11149
11150 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11151
11152 * config.h: Regenerate.
11153
11154 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11155
11156 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11157 doesn't provide PTRACE_GET_THREAD_AREA.
11158
11159 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11160
11161 * linux-m68k-low.c: Include <asm/ptrace.h>
11162 (ps_get_thread_area): Implement.
11163
11164 2010-05-03 Doug Evans <dje@google.com>
11165
11166 * event-loop.c (struct callback_event): New struct.
11167 (callback_list): New global.
11168 (append_callback_event, delete_callback_event): New functions.
11169 (process_callback): New function.
11170 (start_event_loop): Call it.
11171 * remote-utils.c (NOT_SCHEDULED): Define.
11172 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11173 moved out of readchar.
11174 (readchar): Rewrite. Call reschedule before returning.
11175 (reset_readchar): New function.
11176 (remote_close): Call it.
11177 (process_remaining, reschedule): New functions.
11178 * server.h (callback_handler_func): New typedef.
11179 (append_callback_event, delete_callback_event): Declare.
11180
11181 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11182
11183 * proc-service.c (ps_pglobal_lookup): Use
11184 thread_db_look_up_one_symbol.
11185 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11186 parameter. Use it instead of all_symbols_looked_up.
11187 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11188 field.
11189 (all_symbols_looked_up): Don't declare.
11190 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11191 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11192 field.
11193 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11194 Set all_symbols_looked_up here.
11195 (thread_db_look_up_one_symbol): New.
11196 (thread_db_get_tls_address): Adjust.
11197 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11198 thread_db object on the heap, and tentatively set it in the
11199 process structure.
11200 (thread_db_init): Don't set all_symbols_looked_up here.
11201 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11202
11203 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11204
11205 * linux-low.c (linux_kill, linux_detach): Adjust.
11206 (status_pending_p_callback): Remove redundant statement. Check
11207 for !TARGET_WAITIKIND_IGNORE, instead of
11208 TARGET_WAITKIND_STOPPED.
11209 (handle_tracepoints): Make sure LWP is locked. Adjust.
11210 (linux_wait_for_event_1): Adjust.
11211 (linux_cancel_breakpoints): New.
11212 (unsuspend_one_lwp): New.
11213 (unsuspend_all_lwps): New.
11214 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11215 (send_sigstop_callback): Change return type to int, add new
11216 `except' parameter and handle it.
11217 (suspend_and_send_sigstop_callback): New.
11218 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11219 pass them down. If SUSPEND, also increment the lwp's suspend
11220 count.
11221 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11222 (need_step_over_p): Don't consider suspended LWPs.
11223 (start_step_over): Adjust.
11224 (proceed_one_lwp): Change return type to int, add new `except'
11225 parameter and handle it.
11226 (unsuspend_and_proceed_one_lwp): New.
11227 (proceed_all_lwps): Use find_inferior instead of
11228 for_each_inferior.
11229 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11230 also decrement the suspend count of LWPs. Pass `except' down,
11231 instead of hacking its suspend count.
11232 (linux_pause_all): Add `freeze' parameter. Adjust.
11233 (linux_unpause_all): New.
11234 (linux_target_ops): Install linux_unpause_all.
11235 * server.c (handle_status): Adjust.
11236 * target.h (struct target_ops): New fields `unpause_all' and
11237 `cancel_breakpoints'. Add new parameter to `pause_all'.
11238 (pause_all): Add new `freeze' parameter.
11239 (unpause_all): New.
11240 (cancel_breakpoints): New.
11241 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11242 cancel breakpoints.
11243 (cmd_qtstart): Pause threads.
11244 (stop_tracing): Pause threads, and cancel breakpoints.
11245 * win32-low.c (win32_target_ops): Adjust.
11246
11247 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11248
11249 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11250 the inferior right away from here...
11251 (linux_wait_1): ... to here, and adjust to check the thread's
11252 last_resume_kind instead of the lwp's step or stop_expected flags.
11253
11254 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11255
11256 * README: Use consistent `GDB' and `GDBserver' spellings.
11257
11258 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11259
11260 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11261 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11262 (linux_detach_one_lwp): Assume the lwp is stopped.
11263 (any_thread_of): Delete.
11264 (linux_detach): Stop all lwps here. Don't blindly delete all
11265 breakpoints.
11266 (delete_lwp_callback): New.
11267 (linux_mourn): Delete all lwps of the process that is gone.
11268 (linux_wait_1): Don't delete the last lwp of the process here.
11269 * mem-break.h (mark_breakpoints_out): Declare.
11270 * mem-break.c (mark_breakpoints_out): New.
11271 (free_all_breakpoints): Use it.
11272 * server.c (handle_target_event): If the process is gone, mark
11273 breakpoints out.
11274 * thread-db.c (struct thread_db) <create_bp>: New field.
11275 (thread_db_enable_reporting): Fix prototype. Store a thread event
11276 breakpoint reference in the thread_db struct.
11277 (thread_db_load_search): Clear the thread_db object.
11278 (try_thread_db_load_1): Ditto.
11279 (switch_to_process): New.
11280 (disable_thread_event_reporting): Use it.
11281 (remove_thread_event_breakpoints): New.
11282 (thread_db_detach, thread_db_mourn): Use it.
11283
11284 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11285
11286 * linux-low.c (linux_enable_event_reporting): New.
11287 (linux_wait_for_event_1, handle_extended_wait): Use it.
11288
11289 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11290
11291 * linux-low.c (linux_kill_one_lwp, linux_kill)
11292 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11293 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11294 SIGSTOP even if the LWP is stopped.
11295 (send_sigstop_callback): New.
11296 (stop_all_lwps): Use send_sigstop_callback instead.
11297 (linux_resume_one_thread): Adjust.
11298 (proceed_one_lwp): Still proceed an LWP that the client has
11299 requested to stop, if we haven't reported it as stopped yet. Make
11300 sure that LWPs the client want stopped, have a pending SIGSTOP.
11301
11302 2010-04-26 Doug Evans <dje@google.com>
11303
11304 * server.c (handle_general_set): Make static.
11305
11306 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11307 Print received char after testing for error/eof instead of before.
11308 (input_interrupt): Tweak comment.
11309
11310 2010-04-23 Doug Evans <dje@google.com>
11311
11312 * server.c (start_inferior): Print inferior argv if --debug.
11313
11314 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11315
11316 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11317 * nto-x86-low.c: Include server.h
11318
11319 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11320
11321 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11322 be consistent with other sources of this directory.
11323 (init_registers_amd64): Correct name of source file of this function
11324 in the comment.
11325
11326 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11327
11328 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11329 64-bit executables.
11330
11331 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11332
11333 * win32-i386-low.c: Add 64-bit support.
11334 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11335 (init_registers_amd64): Declare.
11336 (mappings): Add 64-bit version of array.
11337 (init_windows_x86): New function.
11338 (the_low_target): Change init_arch field to init_windows_x86.
11339
11340 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11341
11342 * win32-low.c: Adapt to support also 64-bit architecture.
11343 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11344 (get_image_name): Use SIZE_T type for local variable `done'.
11345 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11346 (toolhelp_get_dll_name): Idem.
11347 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11348 Use uintptr_t typecast to avoid warning.
11349 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11350 (handle_exception): Use phex_nz to avoid warning.
11351 (win32_wait): Remove unused local variable `process'.
11352
11353 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11354
11355 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11356 `amd64-avx.o'.
11357
11358 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11359
11360 * configure.ac: Use `ws2_32' library for srv_mingw.
11361 * configure: Regenerate.
11362 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11363 * remote-utils.c: Likewise.
11364
11365 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11366
11367 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11368 if __x86_64__ is defined.
11369
11370 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11371
11372 * configure: Regenerate.
11373
11374 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11375
11376 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11377 * target.h (target_ops): New get_tib_address field.
11378 * win32-low.h (win32_thread_info): Add thread_local_base field.
11379 * win32-low.c (child_add_thread): Add tlb argument.
11380 Set thread_local_base field to TLB.
11381 (get_child_debug_event): Adapt to child_add_thread change.
11382 (win32_get_tib_address): New function.
11383 (win32_target_ops): Set get_tib_address field to
11384 win32_get_tib_address.
11385 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11386
11387 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11388
11389 * linux-low.c (linux_mourn): Also remove the process.
11390 * server.c (handle_target_event): Don't remove the process here.
11391 * nto-low.c (nto_mourn): New.
11392 (nto_target_ops): Install it.
11393 * spu-low.c (spu_mourn): New.
11394 (spu_target_ops): Install it.
11395 * win32-low.c (win32_mourn): New.
11396 (win32_target_ops): Install it.
11397
11398 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11399
11400 * server.h (buffer_xml_printf): Remove redundant `;'.
11401
11402 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11403
11404 * regcache.c (set_register_cache): Invalidate regcaches before
11405 changing the register cache layout.
11406 (regcache_invalidate_one): Allow a NULL regcache.
11407 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11408 regcaches before changing the register cache layout or the target
11409 regsets.
11410
11411 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11412
11413 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11414 variable warning on Linux/x86-64.
11415
11416 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11417
11418 GDBserver disconnected tracing support.
11419
11420 * linux-low.c (linux_remove_process): Delete.
11421 (add_lwp): Don't set last_resume_kind here.
11422 (linux_kill): Use `mourn'.
11423 (linux_detach): Use `thread_db_detach', and `mourn'.
11424 (linux_mourn): New.
11425 (linux_attach_lwp_1): Adjust comment.
11426 (linux_attach): last_resume_kind moved the thread_info; adjust.
11427 (status_pending_p_callback): Adjust.
11428 (linux_wait_for_event_1): Adjust.
11429 (count_events_callback, select_singlestep_lwp_callback)
11430 (select_event_lwp_callback, cancel_breakpoints_callback)
11431 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11432 (proceed_one_lwp): Adjust.
11433 (linux_async): Add debug output.
11434 (linux_thread_stopped): New.
11435 (linux_pause_all): New.
11436 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11437 linux_pause_all.
11438 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11439 (thread_db_free): Delete declaration.
11440 (thread_db_detach, thread_db_mourn): Declare.
11441 * thread-db.c (thread_db_init): Use thread_db_mourn.
11442 (thread_db_free): Delete, split in two.
11443 (disable_thread_event_reporting): New.
11444 (thread_db_detach): New.
11445 (thread_db_mourn): New.
11446
11447 * server.h (struct thread_info) <last_resume_kind>: New field.
11448 <attached>: Add comment.
11449 <gdb_detached>: New field.
11450 (handler_func): Change return type to int.
11451 (handle_serial_event, handle_target_event): Ditto.
11452 (gdb_connected): Declare.
11453 (tracing): Delete.
11454 (disconnected_tracing): Declare.
11455 (stop_tracing): Declare.
11456
11457 * server.c (handle_query) <qSupported>: Report support for
11458 disconnected tracing.
11459 (queue_stop_reply_callback): Account for running threads.
11460 (gdb_wants_thread_stopped): New.
11461 (gdb_wants_all_threads_stopped): New.
11462 (gdb_reattached_process): New.
11463 (handle_status): Clear the `gdb_detached' flag of all processes.
11464 In all-stop, stop all threads.
11465 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11466 (process_serial_event): If the remote connection breaks, or if an
11467 exit was forced with "monitor exit", force an event loop exit.
11468 Handle disconnected tracing on detach.
11469 (handle_serial_event): Adjust.
11470 (handle_target_event): If GDB isn't connected, forward events back
11471 to the inferior, unless the last process exited, in which case,
11472 exit gdbserver. Adjust interface.
11473
11474 * remote-utils.c (remote_open): Don't block in accept. Instead
11475 register an event loop source on the listen socket file
11476 descriptor. Refactor bits into ...
11477 (listen_desc): ... this new global.
11478 (gdb_connected): ... this new function.
11479 (enable_async_notification): ... this new function.
11480 (handle_accept_event): ... this new function.
11481 (remote_close): Clear remote_desc.
11482
11483 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11484
11485 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11486 New fields.
11487 (mourn_inferior): Define.
11488 (target_process_qsupported): Avoid the dangling else problem.
11489 (thread_stopped): Define.
11490 (pause_all): Define.
11491 (target_waitstatus_to_string): Declare.
11492 * target.c (target_waitstatus_to_string): New.
11493
11494 * tracepoint.c (tracing): Make extern.
11495 (disconnected_tracing): New.
11496 (stop_tracing): Make extern. Handle tracing stops due to GDB
11497 disconnecting.
11498 (cmd_qtdisconnected): New.
11499 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11500 (handle_tracepoint_general_set): Handle QTDisconnected.
11501
11502 * event-loop.c (event_handler_func): Change return type to int.
11503 (process_event): Bail out if the event handler wants the event
11504 loop to stop.
11505 (handle_file_event): Ditto.
11506 (start_event_loop): Bail out if the event handler wants the event
11507 loop to stop.
11508
11509 * nto-low.c (nto_target_ops): Adjust.
11510 * spu-low.c (spu_wait): Don't remove the process here.
11511 (spu_target_ops): Adjust.
11512 * win32-low.c (win32_wait): Don't remove the process here.
11513 (win32_target_ops): Adjust.
11514
11515 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11516
11517 * regcache.c (realloc_register_cache): Invalidate inferior's
11518 regcache before recreating it.
11519
11520 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11521
11522 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11523
11524 2010-04-09 Stan Shebs <stan@codesourcery.com>
11525 Pedro Alves <pedro@codesourcery.com>
11526
11527 * server.h (LONGEST): New.
11528 (struct thread_info) <while_stepping>: New field.
11529 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11530 Declare.
11531 (initialize_tracepoint, handle_tracepoint_general_set)
11532 (handle_tracepoint_query, tracepoint_finished_step)
11533 (tracepoint_was_hit, release_while_stepping_state_list):
11534 (current_traceframe): Declare.
11535 * server.c (handle_general_set): Handle tracepoint packets.
11536 (read_memory): New.
11537 (write_memory): New.
11538 (handle_search_memory_1): Use read_memory.
11539 (handle_query): Report support for conditional tracepoints, trace
11540 state variables, and tracepoint sources. Handle tracepoint
11541 queries.
11542 (main): Initialize the tracepoints module.
11543 (process_serial_event): Handle traceframe reads/writes.
11544
11545 * linux-low.c (handle_tracepoints): New.
11546 (linux_wait_1): Call it.
11547 (linux_resume_one_lwp): Handle while-stepping.
11548 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11549 (linux_target_ops): Install them.
11550 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11551 New field.
11552 * linux-x86-low.c (x86_supports_tracepoints): New.
11553 (the_low_target). Install it.
11554
11555 * mem-break.h (delete_breakpoint): Declare.
11556 * mem-break.c (delete_breakpoint): Make external.
11557
11558 * target.h (struct target_ops): Add `supports_tracepoints',
11559 `read_pc', and `write_pc' fields.
11560 (target_supports_tracepoints): Define.
11561 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11562 (phex_nz): New.
11563
11564 * regcache.h (struct regcache) <registers_owned>: New field.
11565 (init_register_cache, regcache_cpy): Declare.
11566 (regcache_read_pc, regcache_write_pc): Declare.
11567 (register_cache_size): Declare.
11568 (supply_regblock): Declare.
11569 * regcache.c (init_register_cache): New.
11570 (new_register_cache): Use it.
11571 (regcache_cpy): New.
11572 (register_cache_size): New.
11573 (supply_regblock): New.
11574 (regcache_read_pc, regcache_write_pc): New.
11575
11576 * tracepoint.c: New.
11577
11578 * Makefile.in (OBS): Add tracepoint.o.
11579 (tracepoint.o): New rule.
11580
11581 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11582
11583 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11584 (i386-mmx.o): New.
11585 (i386-mmx.c): Likewise.
11586 (i386-mmx-linux.o): Likewise.
11587 (i386-mmx-linux.c): Likewise.
11588
11589 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11590 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11591 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11592 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11593
11594 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11595 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11596 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11597
11598 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11599
11600 * Makefile.in (clean): Updated.
11601 (i386-avx.o): New.
11602 (i386-avx.c): Likewise.
11603 (i386-avx-linux.o): Likewise.
11604 (i386-avx-linux.c): Likewise.
11605 (amd64-avx.o): Likewise.
11606 (amd64-avx.c): Likewise.
11607 (amd64-avx-linux.o): Likewise.
11608 (amd64-avx-linux.c): Likewise.
11609
11610 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11611 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11612 (srv_amd64_regobj): Add amd64-avx.o.
11613 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11614 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11615 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11616 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11617 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11618 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11619 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11620
11621 * i387-fp.c: Include "i386-xstate.h".
11622 (i387_xsave): New.
11623 (i387_cache_to_xsave): Likewise.
11624 (i387_xsave_to_cache): Likewise.
11625 (x86_xcr0): Likewise.
11626
11627 * i387-fp.h (i387_cache_to_xsave): Likewise.
11628 (i387_xsave_to_cache): Likewise.
11629 (x86_xcr0): Likewise.
11630
11631 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11632 * linux-crisv32-low.c (target_regsets): Likewise.
11633 * linux-m68k-low.c (target_regsets): Likewise.
11634 * linux-mips-low.c (target_regsets): Likewise.
11635 * linux-ppc-low.c (target_regsets): Likewise.
11636 * linux-s390-low.c (target_regsets): Likewise.
11637 * linux-sh-low.c (target_regsets): Likewise.
11638 * linux-sparc-low.c (target_regsets): Likewise.
11639 * linux-xtensa-low.c (target_regsets): Likewise.
11640
11641 * linux-low.c: Include <sys/uio.h>.
11642 (regsets_fetch_inferior_registers): Support nt_type.
11643 (regsets_store_inferior_registers): Likewise.
11644 (linux_process_qsupported): New.
11645 (linux_target_ops): Add linux_process_qsupported.
11646
11647 * linux-low.h (regset_info): Add nt_type.
11648 (linux_target_ops): Add process_qsupported.
11649
11650 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11651 and <sys/uio.h>.
11652 (init_registers_i386_avx_linux): New.
11653 (init_registers_amd64_avx_linux): Likewise.
11654 (xmltarget_i386_linux_no_xml): Likewise.
11655 (xmltarget_amd64_linux_no_xml): Likewise.
11656 (PTRACE_GETREGSET): Likewise.
11657 (PTRACE_SETREGSET): Likewise.
11658 (x86_fill_xstateregset): Likewise.
11659 (x86_store_xstateregset): Likewise.
11660 (use_xml): Likewise.
11661 (x86_linux_update_xmltarget): Likewise.
11662 (x86_linux_process_qsupported): Likewise.
11663 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11664 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11665 init_registers_i386_linux here. Call
11666 x86_linux_update_xmltarget.
11667 (the_low_target): Add x86_linux_process_qsupported.
11668
11669 * server.c (handle_query): Call target_process_qsupported.
11670
11671 * target.h (target_ops): Add process_qsupported.
11672 (target_process_qsupported): New.
11673
11674 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11675
11676 * inferiors.c (add_thread): Set last_status kind to
11677 TARGET_WAITKIND_IGNORE.
11678 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11679 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11680 (linux_wait_1): Move `thread' local definition to block that uses
11681 it. Don't NULL initialize `event_child'.
11682 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11683 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11684 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11685
11686 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11687
11688 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11689 an extended waitstatus, or by a watchpoint.
11690 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11691 thread was stepping or has been stopped by a watchpoint.
11692
11693 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11694
11695 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11696 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11697 of another, then delete the previous, and validate all
11698 breakpoints.
11699 (validate_inserted_breakpoint): New.
11700 (delete_disabled_breakpoints): New.
11701 (validate_breakpoints): New.
11702 (check_mem_read): Validate breakpoints before trusting their
11703 shadow. Delete disabled breakpoints.
11704 (check_mem_write): Validate breakpoints before trusting they
11705 should be inserted. Delete disabled breakpoints.
11706 * mem-break.h (validate_breakpoints):
11707 * server.c (handle_query): Validate breakpoints when we see a
11708 qSymbol query.
11709
11710 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11711
11712 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11713 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11714 if we could tell there's a GDB breakpoint at stop_pc.
11715 (need_step_over_p): Don't do a step over if we find a GDB
11716 breakpoint at the resume PC.
11717
11718 * mem-break.c (struct raw_breakpoint): New.
11719 (enum bkpt_type): New type `gdb_breakpoint'.
11720 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11721 fields. New field `raw'.
11722 (find_raw_breakpoint_at): New.
11723 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11724 breakpoint instead.
11725 (set_breakpoint_at): Adjust.
11726 (delete_raw_breakpoint): New.
11727 (release_breakpoint): New.
11728 (delete_breakpoint): Rename to...
11729 (delete_breakpoint_1): ... this. Add proc parameter. Use
11730 release_breakpoint. Return ENOENT.
11731 (delete_breakpoint): Reimplement.
11732 (find_breakpoint_at): Delete.
11733 (find_gdb_breakpoint_at): New.
11734 (delete_breakpoint_at): Delete.
11735 (set_gdb_breakpoint_at): New.
11736 (delete_gdb_breakpoint_at): New.
11737 (gdb_breakpoint_here): New.
11738 (set_reinsert_breakpoint): Use release_breakpoint.
11739 (uninsert_breakpoint): Rename to ...
11740 (uninsert_raw_breakpoint): ... this.
11741 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11742 (reinsert_raw_breakpoint): Change parameter type to
11743 raw_breakpoint.
11744 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11745 instead.
11746 (check_breakpoints): Adjust. Use release_breakpoint.
11747 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11748 (breakpoint_inserted_here): Ditto.
11749 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11750 Don't trust the breakpoint's shadow if it is not inserted.
11751 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11752 (delete_all_breakpoints): Adjust.
11753 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11754 use delete_breakpoint_1.
11755
11756 * mem-break.h (breakpoints_supported): Delete declaration.
11757 (set_gdb_breakpoint_at): Declare.
11758 (gdb_breakpoint_here): Declare.
11759 (delete_breakpoint_at): Delete.
11760 (delete_gdb_breakpoint_at): Declare.
11761
11762 * server.h (struct raw_breakpoint): Forward declare.
11763 (struct process_info): New field `raw_breakpoints'.
11764
11765 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11766 breakpoints.
11767
11768 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11769
11770 * linux-low.c (status_pending_p_callback): Fix comment.
11771 (linux_wait_for_event_1): Move most of the internal breakpoint
11772 handling from here...
11773 (linux_wait_1): ... to here.
11774 (count_events_callback): New.
11775 (select_singlestep_lwp_callback): New.
11776 (select_event_lwp_callback): New.
11777 (cancel_breakpoints_callback): New.
11778 (select_event_lwp): New.
11779 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11780 priority to all LWPs that have had events that should be reported
11781 to the client. Cancel breakpoints when about to reporting the
11782 event to the client, not while stopping lwps. No longer cancel
11783 finished single-steps here.
11784 (cancel_finished_single_step): Delete.
11785 (cancel_finished_single_steps): Delete.
11786
11787 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11788
11789 * mem-break.c (enum bkpt_type): New.
11790 (struct breakpoint): New field `type'.
11791 (set_breakpoint_at): Change return type to struct breakpoint
11792 pointer. Set type to `other_breakpoint' by default.
11793 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11794 in the breakpoint list.
11795 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11796 (reinsert_breakpoint): Rename to ...
11797 (reinsert_raw_breakpoint): ... this.
11798 (reinsert_breakpoints_at): Adjust.
11799 * mem-break.h (struct breakpoint): Declare.
11800 (set_breakpoint_at): Change return type to struct breakpoint
11801 pointer.
11802
11803 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11804
11805 * server.c (handle_query): Assign, not compare.
11806
11807 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11808
11809 Teach linux gdbserver to step-over-breakpoints.
11810
11811 * linux-low.c (can_hardware_single_step): New.
11812 (supports_breakpoints): New.
11813 (handle_extended_wait): If stopping threads, read the stop pc of
11814 the new cloned LWP.
11815 (get_pc): New.
11816 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11817 low target doesn't support retrieving the PC.
11818 (add_lwp): Set last_resume_kind to resume_continue.
11819 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11820 (linux_attach): Don't clear stop_expected. Set the lwp's
11821 last_resume_kind to resume_stop.
11822 (linux_detach_one_lwp): Don't check for removed breakpoints.
11823 (check_removed_breakpoint): Delete.
11824 (status_pending_p): Rename to ...
11825 (status_pending_p_callback): ... this. Don't check for removed
11826 breakpoints. Don't consider threads that are stopped from GDB's
11827 perspective.
11828 (linux_wait_for_lwp): Always read the stop_pc here.
11829 (cancel_breakpoint): New.
11830 (step_over_bkpt): New global.
11831 (linux_wait_for_event_1): Implement stepping over breakpoints.
11832 (gdb_wants_lwp_stopped): New.
11833 (gdb_wants_all_stopped): New.
11834 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11835 single-step traps here. Store the thread's last reported target
11836 wait status.
11837 (send_sigstop): Don't clear stop_expected. Always set it,
11838 instead.
11839 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11840 (cancel_finished_single_step): New.
11841 (cancel_finished_single_steps): New.
11842 (wait_for_sigstop): Don't cancel finished single-step traps here.
11843 (linux_resume_one_lwp): Don't check for removed breakpoints.
11844 Don't set `step' on non-hardware step archs.
11845 (linux_set_resume_request): Ignore resume_stop requests if already
11846 stopping or stopped. Set the lwp's last_resume_kind.
11847 (resume_status_pending_p): Don't check for removed breakpoints.
11848 (need_step_over_p): New.
11849 (start_step_over): New.
11850 (finish_step_over): New.
11851 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11852 requests. Clear the thread's last reported target waitstatus.
11853 Don't use the `suspended' flag. Don't consider pending breakpoints.
11854 (linux_resume): Start a step-over if necessary.
11855 (proceed_one_lwp): New.
11856 (proceed_all_lwps): New.
11857 (unstop_all_lwps): New.
11858 * linux-low.h (struct lwp_info): Rewrite comment for the
11859 `suspended' flag. Add the `stop_pc' field. Delete the
11860 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11861 Add `'last_resume_kind' and `need_step_over' fields.
11862 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11863 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11864 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11865 (set_raw_breakpoint_at): New.
11866 (set_breakpoint_at): Rewrite to use it.
11867 (reinsert_breakpoint_handler): Delete.
11868 (set_reinsert_breakpoint): New.
11869 (reinsert_breakpoint_by_bp): Delete.
11870 (delete_reinsert_breakpoints): New.
11871 (uninsert_breakpoint): Rewrite.
11872 (uninsert_breakpoints_at): New.
11873 (reinsert_breakpoint): Rewrite.
11874 (reinsert_breakpoints_at): New.
11875 (check_breakpoints): Rewrite.
11876 (breakpoint_here): New.
11877 (breakpoint_inserted_here): New.
11878 (check_mem_read): Adjust.
11879 * mem-break.h (breakpoints_supported, breakpoint_here)
11880 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11881 (reinsert_breakpoint_by_bp): Delete declaration.
11882 (delete_reinsert_breakpoints): Declare.
11883 (reinsert_breakpoint): Delete declaration.
11884 (reinsert_breakpoints_at): Declare.
11885 (uninsert_breakpoint): Delete declaration.
11886 (uninsert_breakpoints_at): Declare.
11887 (check_breakpoints): Adjust prototype.
11888 * server.h: Adjust include order.
11889 (struct thread_info): Declare here. Add a `last_status' field.
11890
11891 2010-03-23 Michael Snyder <msnyder@vmware.com>
11892
11893 * server.c (crc32): New function.
11894 (handle_query): Add handling for 'qCRC:' request.
11895
11896 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11897
11898 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11899 lwp had been stopped by a watchpoint.
11900
11901 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11902
11903 * server.h (internal_error): Declare.
11904 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11905 * utils.c (internal_error): New function.
11906
11907 2010-03-15 Andreas Schwab <schwab@redhat.com>
11908
11909 * configure.srv: Fix typo setting srv_regobj.
11910
11911 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11912
11913 * linux-low.c (fetch_register): Avoid passing a non string literal
11914 format to `error'.
11915 (usr_store_inferior_registers): Ditto.
11916
11917 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11918
11919 * linux-low.c (linux_write_memory): Bail out early if peeking
11920 memory failed.
11921
11922 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11923
11924 * linux-low.h (struct lwp_info): New fields
11925 `stopped_by_watchpoint' and `stopped_data_address'.
11926 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11927 here, and cache them in the lwp object.
11928 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11929 directly.
11930 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11931 field.
11932 (linux_stopped_by_watchpoint): Rewrite.
11933 (linux_stopped_data_address): Rewrite.
11934
11935 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11936
11937 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11938 switching the current inferior, not before.
11939
11940 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11941
11942 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11943 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11944 i386-linux.c and amd64-linux.c.
11945 (reg-i386.o): Removed.
11946 (reg-i386.c): Likewise.
11947 (reg-i386-linux.o): Likewise.
11948 (reg-i386-linux.c): Likewise.
11949 (reg-x86-64.o): Likewise.
11950 (reg-x86-64.c): Likewise.
11951 (reg-x86-64-linux.o): Likewise.
11952 (reg-x86-64-linux.c): Likewise.
11953 (i386.o): New.
11954 (i386.c): Likewise.
11955 (i386-linux.o): Likewise.
11956 (i386-linux.c): Likewise.
11957 (amd64.o): Likewise.
11958 (amd64.c): Likewise.
11959 (amd64-linux.o): Likewise.
11960 (amd64-linux.c): Likewise.
11961
11962 * configure.srv (srv_i386_regobj): New.
11963 (srv_i386_linux_regobj): Likewise.
11964 (srv_amd64_regobj): Likewise.
11965 (srv_amd64_linux_regobj): Likewise.
11966 (srv_i386_32bit_xmlfiles): Likewise.
11967 (srv_i386_64bit_xmlfiles): Likewise.
11968 (srv_i386_xmlfiles): Likewise.
11969 (srv_amd64_xmlfiles): Likewise.
11970 (srv_i386_linux_xmlfiles): Likewise.
11971 (srv_amd64_linux_xmlfiles): Likewise.
11972 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11973 srv_xmlfiles to $srv_i386_xmlfiles.
11974 (i[34567]86-*-mingw32ce*): Likewise.
11975 (i[34567]86-*-mingw*): Likewise.
11976 (i[34567]86-*-nto*): Likewise.
11977 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11978 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11979 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11980 (x86_64-*-linux*): Likewise.
11981
11982 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11983 (init_registers_amd64_linux): New.
11984 (x86_arch_setup): Replace init_registers_x86_64_linux with
11985 init_registers_amd64_linux.
11986
11987 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11988
11989 * configure.ac: Check for libdl. If it is not available link against
11990 static libthread_db.
11991 * configure: Regenerate.
11992
11993 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11994
11995 PR9605
11996
11997 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11998 handing a read watchpoint.
11999 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12000
12001 2010-02-12 Doug Evans <dje@google.com>
12002
12003 * linux-low.c (linux_supports_tracefork_flag): Document.
12004 (linux_look_up_symbols): Add comment.
12005
12006 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12007
12008 * regcache.c (supply_register): Clear regcache if buf is NULL.
12009
12010 2010-02-02 Nicolas Roche <roche@sourceware.org>
12011 Joel Brobecker <brobecker@adacore.com>
12012
12013 * inferiors.c (find_inferior): Add function documentation.
12014 (unloaded_dll): Handle the case where the unloaded dll has not
12015 been previously registered in the dll list.
12016
12017 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12018
12019 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12020 (thumb2_breakpoint): New.
12021 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12022
12023 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12024
12025 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12026 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12027 breakpoints.
12028
12029 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12030
12031 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12032
12033 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12034
12035 * linux-s390-low.c (s390_collect_ptrace_register)
12036 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12037
12038 2010-01-21 Doug Evans <dje@google.com>
12039
12040 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12041 (PTRACE_ARG4_TYPE): New macro.
12042 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12043 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12044 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12045 (usr_store_inferior_registers): Ditto.
12046 (linux_read_memory, linux_write_memory): Ditto.
12047 (linux_test_for_tracefork): Ditto.
12048
12049 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12050 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12051
12052 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12053
12054 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12055 target.
12056
12057 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12058
12059 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12060 prototype to take a regcache. Adjust.
12061
12062 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12063
12064 * regcache.h (struct thread_info): Forward declare.
12065 (struct regcache): New.
12066 (new_register_cache): Adjust prototype.
12067 (get_thread_regcache): Declare.
12068 (free_register_cache): Adjust prototype.
12069 (registers_to_string, registers_from_string): Ditto.
12070 (supply_register, supply_register_by_name, collect_register)
12071 (collect_register_as_string, collect_register_by_name): Ditto.
12072 * regcache.c (struct inferior_regcache_data): Delete.
12073 (get_regcache): Rename to ...
12074 (get_thread_regcache): ... this. Adjust. Switch inferior before
12075 fetching registers.
12076 (regcache_invalidate_one): Adjust.
12077 (regcache_invalidate): Fix prototype.
12078 (new_register_cache): Return the new register cache.
12079 (free_register_cache): Change prototype.
12080 (realloc_register_cache): Adjust.
12081 (registers_to_string): Change prototype to take a regcache. Adjust.
12082 (registers_from_string): Ditto.
12083 (register_data): Ditto.
12084 (supply_register): Ditto.
12085 (supply_register_by_name): Ditto.
12086 (collect_register): Ditto.
12087 (collect_register_as_string): Ditto.
12088 (collect_register_by_name): Ditto.
12089 * server.c (process_serial_event): Adjust.
12090 * linux-low.h (regset_fill_func, regset_store_func): Change
12091 prototype.
12092 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12093 Change prototype.
12094 * linux-low.c (get_stop_pc): Adjust.
12095 (check_removed_breakpoint): Adjust.
12096 (linux_wait_for_event): Adjust.
12097 (linux_resume_one_lwp): Adjust.
12098 (fetch_register): Add regcache parameter. Adjust.
12099 (usr_store_inferior_registers): Ditto.
12100 (regsets_fetch_inferior_registers): Ditto.
12101 (regsets_store_inferior_registers): Ditto.
12102 (linux_fetch_registers, linux_store_registers): Ditto.
12103 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12104 regcache. Adjust.
12105 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12106 Ditto.
12107 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12108 prototype to take a regcache.
12109 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12110 * remote-utils.c (convert_ascii_to_int, outreg)
12111 (prepare_resume_reply): Change prototype to take a regcache.
12112 Adjust.
12113 * target.h (struct target_ops) <fetch_registers, store_registers>:
12114 Change prototype to take a regcache.
12115 (fetch_inferior_registers, store_inferior_registers): Change
12116 prototype to take a regcache. Adjust.
12117 * proc-service.c (ps_lgetregs): Adjust.
12118 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12119 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12120 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12121 take a regcache. Adjust.
12122 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12123 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12124 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12125 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12126 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12127 (cris_cannot_fetch_register):
12128 (cris_breakpoint_at): Change prototype to take a regcache.
12129 Adjust.
12130 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12131 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12132 to take a regcache. Adjust.
12133 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12134 Adjust.
12135 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12136 take a regcache. Adjust.
12137 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12138 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12139 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12140 * linux-mips-low.c (mips_get_pc):
12141 (mips_set_pc): Change prototype to take a regcache. Adjust.
12142 (mips_reinsert_addr): Adjust.
12143 (mips_collect_register): Change prototype to take a regcache.
12144 Adjust.
12145 (mips_supply_register):
12146 (mips_collect_register_32bit, mips_supply_register_32bit)
12147 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12148 (mips_store_fpregset): Ditto.
12149 * linux-ppc-low.c (ppc_supply_ptrace_register)
12150 (ppc_supply_ptrace_register): Ditto.
12151 (parse_spufs_run): Adjust.
12152 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12153 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12154 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12155 take a regcache. Adjust.
12156 * linux-s390-low.c (s390_collect_ptrace_register)
12157 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12158 (s390_set_pc): Change prototype to take a regcache. Adjust.
12159 (s390_arch_setup): Adjust.
12160 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12161 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12162 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12163 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12164 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12165 regcache. Adjust.
12166 (sparc_breakpoint_at): Adjust.
12167 * linux-xtensa-low.c (xtensa_fill_gregset):
12168 (xtensa_store_gregset):
12169 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12170 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12171 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12172 prototype to take a regcache. Adjust.
12173 * win32-arm-low.c (arm_fetch_inferior_register)
12174 (arm_store_inferior_register): Change prototype to take a
12175 regcache. Adjust.
12176 * win32-i386-low.c (i386_fetch_inferior_register)
12177 (i386_store_inferior_register): Change prototype to take a
12178 regcache. Adjust.
12179 * win32-low.c (child_fetch_inferior_registers)
12180 (child_store_inferior_registers): Change prototype to take a
12181 regcache. Adjust.
12182 (win32_wait): Adjust.
12183 (win32_fetch_inferior_registers): Change prototype to take a
12184 regcache. Adjust.
12185 (win32_store_inferior_registers): Adjust.
12186 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12187 store_inferior_register>: Change prototype to take a regcache.
12188
12189 2010-01-20 Doug Evans <dje@google.com>
12190
12191 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12192 #ifdef.
12193 (linux_wait_for_event1, linux_init_signals): Ditto.
12194 (W_STOPCODE): Provide definition if missing.
12195
12196 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12197
12198 * linux-low.c (linux_core_of_thread): New.
12199 (compare_ints, show_process, list_threads): New.
12200 (linux_qxfer_osdata): Report threads and cores.
12201 (linux_target_op): Register linux_core_of_thread.
12202 * remote-utils.c (prepare_resume_reply): Report the core.
12203 (buffer_xml_printf): Support %d specifier.
12204 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12205 New.
12206 (handle_query): Handle qXfer:threads. Announce availability
12207 thereof.
12208 * target.h (struct target_ops): New field core_of_thread.
12209
12210 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12211
12212 * Makefile.in (clean): Remove new generated files.
12213 (reg-s390.o, reg-s390.c): Remove rules.
12214 (reg-s390x.o, reg-s390x.c): Likewise.
12215 (s390-linux32.o, s390-linux32.c): Add rules.
12216 (s390-linux64.o, s390-linux64.c): Likewise.
12217 (s390x-linux64.o, s390x-linux64.c): Likewise.
12218 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12219 * linux-s390-low.c: Include <elf.h>.
12220 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12221 (init_registers_s390): Remove prototype.
12222 (init_registers_s390x): Likewise.
12223 (init_registers_s390_linux32): Add prototype.
12224 (init_registers_s390_linux64): Likewise.
12225 (init_registers_s390x_linux64): Likewise.
12226 (s390_num_regs_3264): New define.
12227 (s390_regmap_3264): New global variable.
12228 (s390_cannot_fetch_register): Remove obsolete check.
12229 (s390_cannot_store_register): Likewise.
12230 (s390_collect_ptrace_register): Handle upper/lower register halves.
12231 (s390_supply_ptrace_register): Likewise.
12232 (s390_fill_gregset): Update to register number changes.
12233 (s390_get_hwcap): New routine.
12234 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12235 Install appropriate regmap and register set.
12236
12237 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12238
12239 * server.c (gdbserver_version): Update copyright year to 2010.
12240 * gdbreplay.c (gdbreplay_version): Likewise.
12241
12242 2009-12-28 Doug Evans <dje@google.com>
12243
12244 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12245 elf/external.h. Include <elf.h> instead but only if necessary.
12246
12247 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12248
12249 * linux-low.c (linux_remove_process): Remove `detaching'
12250 parameter. Don't release/detach from thread_db here.
12251 (linux_kill): Release/detach from thread_db here, ...
12252 (linux_detach): ... and here, before actually detaching.
12253 (linux_wait_1): ... and here, when a process exits.
12254 * thread-db.c (any_thread_of): New.
12255 (thread_db_free): Switch the current inferior to a thread of the
12256 passed in process.
12257
12258 2009-12-21 Doug Evans <dje@google.com>
12259
12260 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12261
12262 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12263 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12264 warning ifndef __NR_tkill. Move setting of errno there too.
12265 Delete unnecessary resetting of errno after syscall.
12266 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12267
12268 * configure.ac: Check for dladdr.
12269 * config.in: Regenerate.
12270 * configure: Regenerate.
12271 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12272 (try_thread_db_load): Update.
12273
12274 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12275
12276 2009-12-18 Doug Evans <dje@google.com>
12277
12278 * event-loop.c: Include unistd.h if it exists.
12279
12280 * linux-low.c (my_waitpid): Move definition away from being in
12281 between linux_tracefork_child/linux_test_for_tracefork.
12282
12283 * gdb_proc_service.h (psaddr_t): Fix type.
12284 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12285 signature to match glibc.
12286
12287 2009-12-16 Doug Evans <dje@google.com>
12288
12289 * linux-low.c (linux_read_memory): Fix argument to read.
12290
12291 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12292
12293 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12294 events, don't leave current_inferior pointing at null.
12295
12296 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12297
12298 * win32-low.c (LOG): Delete.
12299 (OUTMSG): Output to stderr.
12300 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12301 on compile time LOG macro.
12302 (win32_wait): Fix debug output.
12303
12304 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12305
12306 * win32-low.c (win32_add_one_solib): If the dll name is
12307 "ntdll.dll", prepend the system directory to the dll path.
12308
12309 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12310
12311 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12312
12313 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12314 Vladimir Prus <vladimir@codesourcery.com>
12315
12316 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12317 * configure.ac: Check for __mcoldfire__ and set
12318 gdb_cv_m68k_is_coldfire.
12319 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12320 reg-cf.o and reg-m68k.o.
12321 * configure: Regenerated.
12322
12323 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12324
12325 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12326 Pass it to thread_db_free.
12327 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12328 proper `detaching' argument to linux_remove_process.
12329 * linux-low.h (thread_db_free): Add `detaching' parameter.
12330 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12331 to thread_db_free.
12332 (thread_db_free): Add `detaching' parameter. Only
12333 call td_ta_clear_event if detaching from process.
12334
12335 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12336
12337 * thread-db.c (thread_db_free): Fix typo.
12338
12339 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12340
12341 PR gdb/10838
12342 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12343
12344 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12345
12346 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12347 with an i686 compiler.
12348 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12349 needed.
12350 * configure: Rebuilt.
12351
12352 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12353
12354 PR gdb/10783
12355
12356 * server.c (handle_search_memory_1): Correct read_addr initialization
12357 in loop for searching subsequent chunks.
12358
12359 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12360
12361 * configure.ac: New --with-libthread-db option.
12362 * thread-db.c: Allow direct dependence on libthread_db.
12363 (thread_db_free): Adjust.
12364 * config.in: Regenerate.
12365 * configure: Likewise.
12366
12367 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12368
12369 PR gdb/10757
12370 * thread-db.c (attach_thread): New function.
12371 (maybe_attach_thread): Return success/failure.
12372 (find_new_threads_callback): Adjust.
12373 (thread_db_find_new_threads): Loop until no new threads.
12374
12375 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12376
12377 * proc-service.c (ps_lgetregs): Formatting.
12378
12379 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12380
12381 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12382 * configure.ac: Adjust.
12383 * linux-low.h (struct process_info_private): Move members to struct
12384 thread_db.
12385 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12386 * linux-low.c (linux_remove_process): Adjust.
12387 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12388 * server.c (handle_query): Move code ...
12389 (handle_monitor_command): ... here. New function.
12390 * target.h (struct target_ops): New member.
12391 * thread-db.c (struct thread_db): New.
12392 (libthread_db_search_path): New variable.
12393 (thread_db_create_event, thread_db_enable_reporting)
12394 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12395 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12396 (try_thread_db_load_1, dladdr_to_soname): New functions.
12397 (try_thread_db_load, thread_db_load_search): New functions.
12398 (thread_db_init): Search for libthread_db.
12399 (thread_db_free): New function.
12400 (thread_db_handle_monitor_command): Likewise.
12401 * config.in: Regenerate.
12402 * configure: Regenerate.
12403
12404 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12405
12406 * spu-low.c (spu_kill): Wait for inferior to terminate.
12407 Call clear_inferiors.
12408 (spu_detach): Call clear_inferiors.
12409
12410 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12411
12412 * aclocal.m4: Regenerate.
12413 * config.in: Likewise.
12414 * configure: Likewise.
12415
12416 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12417
12418 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12419 (parse_spufs_run): New function.
12420 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12421 (ppc_breakpoint_at): Handle SPU breakpoints.
12422
12423 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12424
12425 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12426 (SPUFS_MAGIC): Define.
12427 (spu_enumerate_spu_ids): New function.
12428 (linux_qxfer_spu): New function.
12429 (linux_target_ops): Install linux_qxfer_spu.
12430
12431 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12432
12433 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12434 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12435 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12436 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12437 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12438 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12439 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12440 (init_registers_powerpc_cell32l): Add prototype.
12441 (init_registers_powerpc_cell64l): Likewise.
12442 (ppc_arch_setup): Detect Cell/B.E. architecture.
12443
12444 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12445
12446 * Makefile.in (datarootdir): New variable.
12447
12448 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12449
12450 * linux-low.c (linux_write_memory): Update debugging output.
12451 * Makefile.in (clean): Add new descriptions.
12452 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12453 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12454 * configure.srv: Add new files for arm*-*-linux*.
12455 * linux-arm-low.c: Add new declarations.
12456 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12457 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12458 (HWCAP_VFPv3D16): New.
12459 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12460 instead of __IWMMXT__.
12461 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12462 (arm_arch_setup): New.
12463 (target_regsets): Remove #ifdef. Add VFP regset.
12464 (the_low_target): Use arm_arch_setup.
12465
12466 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12467
12468 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12469 the main thread again.
12470
12471 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12472
12473 Adding Neutrino gdbserver.
12474 * configure: Regenerated.
12475 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12476 * configure.srv (i[34567]86-*-nto*): New target.
12477 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12478 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12479 (nto_comctrl) [__QNX__]: New function.
12480 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12481
12482 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12483
12484 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12485 srv_tgtobj.
12486
12487 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12488 Pedro Alves <pedro@codesourcery.com>
12489
12490 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12491 don't support CONTEXT_EXTENDED_REGISTERS.
12492 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12493 (the_low_target): Install them.
12494 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12495 failing with ERROR_PIPE_NOT_CONNECTED.
12496
12497 2009-06-30 Doug Evans <dje@google.com>
12498 Pierre Muller <muller@ics.u-strasbg.fr>
12499
12500 Add h/w watchpoint support to x86-linux, win32-i386.
12501 * Makefile.in (SFILES): Add i386-low.c
12502 (i386_low_h): Define.
12503 (i386-low.o): Add dependencies.
12504 (linux-x86-low.o): Add i386-low.h dependency.
12505 (win32-i386-low.o): Ditto.
12506 * i386-low.c: New file.
12507 * i386-low.h: New file.
12508 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12509 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12510 * linux-low.c (linux_add_process): Initialize arch_private.
12511 (linux_remove_process): Free arch_private.
12512 (add_lwp): Initialize arch_private.
12513 (delete_lwp): Free arch_private.
12514 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12515 provided.
12516 * linux-low.h (process_info_private): New member arch_private.
12517 (lwp_info): New member arch_private.
12518 (linux_target_ops): New members new_process, new_thread,
12519 prepare_to_resume.
12520 (ptid_of): New macro.
12521 * linux-x86-low.c: Include stddef.h, i386-low.h.
12522 (arch_process_info): New struct.
12523 (arch_lwp_info): New struct.
12524 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12525 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12526 (i386_dr_low_get_status): New function.
12527 (x86_insert_point, x86_remove_point): New functions.
12528 (x86_stopped_by_watchpoint): New function.
12529 (x86_stopped_data_address): New function.
12530 (x86_linux_new_process, x86_linux_new_thread): New functions.
12531 (x86_linux_prepare_to_resume): New function.
12532 (the_low_target): Add entries for insert_point, remove_point,
12533 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12534 prepare_to_resume.
12535 * server.c (debug_hw_points): New global.
12536 (monitor_show_help): Document set debug-hw-points.
12537 (handle_query): Process "set debug-hw-points".
12538 * server.h (debug_hw_points): Declare.
12539 (paddress): Declare.
12540 * utils.c (NUMCELLS, CELLSIZE): New macros.
12541 (get_sell, xsnprintf, paddress): New functions.
12542 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12543 remove_point, stopped_by_watchpoint, stopped_data_address.
12544 * win32-i386-low.c: Include i386-low.h.
12545 (debug_reg_state): Replaces dr.
12546 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12547 (i386_dr_low_get_status): New function.
12548 (i386_insert_point, i386_remove_point): New functions.
12549 (i386_stopped_by_watchpoint): New function.
12550 (i386_stopped_data_address): New function.
12551 (i386_initial_stuff): Update.
12552 (get_thread_context,set_thread_context,i386_thread_added): Update.
12553 (the_low_target): Add entries for insert_point,
12554 remove_point, stopped_by_watchpoint, stopped_data_address.
12555 * win32-low.c (win32_insert_watchpoint): New function.
12556 (win32_remove_watchpoint): New function.
12557 (win32_stopped_by_watchpoint): New function.
12558 (win32_stopped_data_address): New function.
12559 (win32_target_ops): Add entries for insert_watchpoint,
12560 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12561 * win32-low.h (win32_target_ops): New members insert_point,
12562 remove_point, stopped_by_watchpoint, stopped_data_address.
12563
12564 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12565
12566 * server.c (process_serial_event): Re-return unsupported, not
12567 error, if the type isn't recognized. Re-allow supporting only
12568 insert or remove packets. Also call require_running for
12569 breakpoints. Add missing break statement to default case. Tidy.
12570 * target.h (struct target_ops): Rename insert_watchpoint to
12571 insert_point, and remove_watchpoint to remove_point.
12572
12573 * linux-low.h (struct linux_target_ops): Likewise.
12574 * linux-low.c (linux_insert_watchpoint): Rename to ...
12575 (linux_insert_point): ... this. Adjust.
12576 (linux_remove_watchpoint): Rename to ...
12577 (linux_remove_point): ... this. Adjust.
12578 (linux_target_ops): Adjust.
12579 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12580 (cris_insert_point): ... this.
12581 (cris_remove_watchpoint): Rename to ...
12582 (cris_remove_point): ... this.
12583 (the_low_target): Adjust.
12584
12585 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12586
12587 * server.c (handle_v_kill): Pass signal_pid to
12588 kill_inferior if multi_process is zero.
12589
12590 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12591
12592 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12593 * target.h (target_ops): Comment for *_watchpoint to make it clear
12594 the functions can get types '0' and '1'.
12595
12596 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12597
12598 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12599 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12600 * regcache.c (get_regcache): Likewise.
12601 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12602 * win32-low.c (child_fetch_inferior_registers): Remove check for
12603 regno 0.
12604
12605 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12606 Pedro Alves <pedro@codesourcery.com>
12607
12608 * target.h (struct target_ops) <supports_multi_process>: New
12609 callback.
12610 (target_supports_multi_process): New.
12611 * server.c (handle_query): Even if GDB reports support, only
12612 enable multi-process if the target also supports it. Report
12613 multi-process support only if the target backend supports it.
12614 * linux-low.c (linux_supports_multi_process): New function.
12615 (linux_target_ops): Install it as target_supports_multi_process
12616 callback.
12617
12618 2009-05-24 Doug Evans <dje@google.com>
12619
12620 Global renaming of find_thread_pid to find_thread_ptid.
12621 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12622 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12623 All callers updated.
12624
12625 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12626 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12627 directly.
12628
12629 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12630 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12631 (linux_resume_one_lwp): Ditto.
12632
12633 2009-05-23 Doug Evans <dje@google.com>
12634
12635 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12636 from struct inferior_list_entry * to struct lwp_info *.
12637 All callers updated.
12638
12639 2009-05-13 Doug Evans <dje@google.com>
12640
12641 * linux-x86-low.c: Don't include assert.h.
12642 (x86_siginfo_fixup): Use fatal, not assert.
12643 (x86_arch_setup): Fix comment.
12644
12645 2009-05-12 Doug Evans <dje@google.com>
12646
12647 Biarch support for i386/amd64 gdbserver.
12648 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12649 Add linux-x86-low.c.
12650 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12651 (linux-x86-low.o): Add.
12652 * linux-x86-64-low.c: Delete.
12653 * linux-i386-low.c: Delete.
12654 * linux-x86-low.c: New file.
12655 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12656 linux-x86-low.o.
12657 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12658 linux-x86-low.o.
12659 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12660 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12661 (linux_child_pid_to_exec_file): New function.
12662 (elf_64_header_p, elf_64_file_p): New functions.
12663 (siginfo_fixup): New function.
12664 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12665 give target a chance to convert layout.
12666 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12667 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12668
12669 2009-05-07 Doug Evans <dje@google.com>
12670
12671 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12672 (regsets_store_inferior_registers): Ditto.
12673
12674 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12675
12676 PR server/10048
12677
12678 * linux-low.c (must_set_ptrace_flags): Delete.
12679 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12680 of the global.
12681 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12682 `lwp->must_set_ptrace_flags' instead.
12683 (linux_wait_for_event_1): Set ptrace options here.
12684 (linux_wait_1): ... not here.
12685
12686 2009-04-30 Doug Evans <dje@google.com>
12687
12688 * inferiors.c (started_inferior_callback): New function.
12689 (attached_inferior_callback): New function.
12690 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12691 * server.c (print_started_pid, print_attached_pid): New functions.
12692 (detach_or_kill_for_exit): New function.
12693 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12694 * server.h (have_started_inferiors_p): Declare.
12695 (have_attached_inferiors_p): Declare.
12696
12697 * inferiors.c (remove_process): Fix memory leak, free process.
12698 * linux-low.c (linux_remove_process): New function.
12699 (linux_kill): Call it instead of remove_process.
12700 (linux_detach, linux_wait_1): Ditto.
12701
12702 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12703
12704 * configure.srv: Add x86 Windows CE target.
12705
12706 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12707
12708 * inferiors.c (get_thread_process): Make global.
12709 * server.h (get_thread_process): Add prototype.
12710 * thread-db.c (find_one_thread): Use get_thread_process
12711 instead of current_process.
12712 (thread_db_get_tls_address): Do not crash if called when
12713 thread layer is not yet initialized.
12714
12715 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12716
12717 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12718 * spu-low.c (current_tid): Rename to ...
12719 (current_ptid): ... this.
12720 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12721 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12722 ptid_get_lwp (current_ptid) instead of current_tid.
12723 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12724 instead of current_tid. Use find_process_pid to verify pid
12725 argument is valid. Pass proper argument to remove_process.
12726 (spu_thread_alive): Compare current_ptid instead of current_tid.
12727 (spu_resume): Likewise.
12728
12729 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12730
12731 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12732 variable.
12733
12734 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12735
12736 Implement the multiprocess extensions, and add linux multiprocess
12737 support.
12738
12739 * server.h (ULONGEST): Declare.
12740 (struct ptid, ptid_t): New.
12741 (minus_one_ptid, null_ptid): Declare.
12742 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12743 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12744 (struct inferior_list_entry): Change `id' type from unsigned from
12745 to ptid_t.
12746 (struct sym_cache, struct breakpoint, struct
12747 process_info_private): Forward declare.
12748 (struct process_info): Declare.
12749 (current_process): Declare.
12750 (all_processes): Declare.
12751 (initialize_inferiors): Declare.
12752 (add_thread): Adjust to use ptid_t.
12753 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12754 (add_process, remove_process, find_thread_pid): Declare.
12755 (find_inferior_id): Adjust to use ptid_t.
12756 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12757 (multi_process): Declare.
12758 (push_event): Adjust to use ptid_t.
12759 (read_ptid, write_ptid): Declare.
12760 (prepare_resume_reply): Adjust to use ptid_t.
12761 (clear_symbol_cache): Declare.
12762 * inferiors.c (all_processes): New.
12763 (null_ptid, minus_one_ptid): New.
12764 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12765 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12766 (add_thread): Change unsigned long to ptid. Remove gdb_id
12767 parameter. Adjust.
12768 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12769 (gdb_id_to_thread): Rename to ...
12770 (find_thread_pid): ... this. Change unsigned long to ptid.
12771 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12772 (loaded_dll, pull_pid_from_list): Adjust.
12773 (add_process, remove_process, find_process_pid)
12774 (get_thread_process, current_process, initialize_inferiors): New.
12775 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12776 (struct target_waitstatus) <related_pid>: Ditto.
12777 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12778 return type to int.
12779 (struct target_ops) <join>: Add `pid' argument.
12780 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12781 (struct target_ops) <wait>: Add `ptid' field. Change return type
12782 to ptid.
12783 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12784 (mywait): Add `ptid' argument. Change return type to ptid_t.
12785 (target_pid_to_str): Declare.
12786 * target.c (set_desired_inferior): Adjust to use ptids.
12787 (mywait): Add new `ptid' argument. Adjust.
12788 (target_pid_to_str): New.
12789 * mem-break.h (free_all_breakpoints): Declare.
12790 * mem-break.c (breakpoints): Delelete.
12791 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12792 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12793 to use per-process breakpoint list.
12794 (free_all_breakpoints): New.
12795 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12796 (symbol_cache, all_symbols_looked_up): Delete.
12797 (hexchars): New.
12798 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12799 read_ptid): New.
12800 (prepare_resume_reply): Change ptid argument's type from unsigned
12801 long to ptid_t. Adjust. Implement W;process and X;process.
12802 (free_sym_cache, clear_symbol_cache): New.
12803 (look_up_one_symbol): Adjust to per-process symbol cache. *
12804 * server.c (cont_thread, general_thread, step_thread): Change type
12805 to ptid_t.
12806 (attached): Delete.
12807 (multi_process): New.
12808 (last_ptid): Change type to ptid_t.
12809 (struct vstop_notif) <ptid>: Change type to ptid_t.
12810 (queue_stop_reply, push_event): Change `ptid' argument's type to
12811 ptid_t.
12812 (discard_queued_stop_replies): Add `pid' argument.
12813 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12814 changes. Don't reference the `attached' global.
12815 (attach_inferior): Adjust to mywait interface changes.
12816 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12817 features. Handle and report "multiprocess+". Handle
12818 "qAttached:PID".
12819 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12820 changes.
12821 (handle_v_kill): New.
12822 (handle_v_stopped): Adjust to use target_pid_to_str.
12823 (handle_v_requests): Allow multiple attaches and runs when
12824 multiprocess extensions are in effect. Handle "vKill".
12825 (myresume): Adjust to use ptids.
12826 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12827 (handle_status): Adjust to discard_queued_stop_replies interface
12828 change.
12829 (first_thread_of, kill_inferior_callback)
12830 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12831 (main): Call initialize_inferiors. Adjust to use ptids, killing
12832 and detaching from all inferiors. Handle multiprocess packet
12833 variants.
12834 * linux-low.h: Include gdb_proc_service.h.
12835 (struct process_info_private): New.
12836 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12837 <lwpid_of>: Use ptid_get_lwp.
12838 (get_lwp_thread): Adjust.
12839 (struct lwp_info): Add `dead' member.
12840 (find_lwp_pid): Declare.
12841 * linux-low.c (thread_db_active): Delete.
12842 (new_inferior): Adjust comment.
12843 (inferior_pid): Delete.
12844 (linux_add_process): New.
12845 (handle_extended_wait): Adjust.
12846 (add_lwp): Change unsigned long to ptid.
12847 (linux_create_inferior): Add process to processes table. Adjust
12848 to use ptids. Don't set new_inferior here.
12849 (linux_attach_lwp): Rename to ...
12850 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12851 it. Adjust to use ptids.
12852 (linux_attach_lwp): New.
12853 (linux_attach): Add process to processes table. Don't set
12854 new_inferior here.
12855 (struct counter): New.
12856 (second_thread_of_pid_p, last_thread_of_process_p): New.
12857 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12858 multiple processes.
12859 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12860 processes. Remove process from process table.
12861 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12862 to multiple processes.
12863 (any_thread_of): New.
12864 (linux_detach): Add `pid' argument, and handle it. Remove process
12865 from processes table.
12866 (linux_join): Add `pid' argument. Handle it.
12867 (linux_thread_alive): Change unsighed long argument to ptid_t.
12868 Consider dead lwps as not being alive.
12869 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12870 threads we're not interested in.
12871 (same_lwp, find_lwp_pid): New.
12872 (linux_wait_for_lwp): Change `pid' argument's type from int to
12873 ptid_t. Adjust.
12874 (linux_wait_for_event): Rename to ...
12875 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12876 from int to ptid_t. Adjust.
12877 (linux_wait_for_event): New.
12878 (linux_wait_1): Add `ptid' argument. Change return type to
12879 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12880 that exit from the process table.
12881 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12882 Adjust.
12883 (mark_lwp_dead): New.
12884 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12885 stopping all threads, mark its main lwp as dead.
12886 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12887 ptids.
12888 (fetch_register, usr_store_inferior_registers)
12889 (regsets_fetch_inferior_registers)
12890 (regsets_store_inferior_registers, linux_read_memory)
12891 (linux_write_memory): Inline `inferior_pid'.
12892 (linux_look_up_symbols): Adjust to use per-process
12893 `thread_db_active'.
12894 (linux_request_interrupt): Adjust to use ptids.
12895 (linux_read_auxv): Inline `inferior_pid'.
12896 (initialize_low): Don't reference thread_db_active.
12897 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12898 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12899 (ps_getpid): Return the pid of the current inferior.
12900 * thread-db.c (proc_handle, thread_agent): Delete.
12901 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12902 per-process data.
12903 (find_one_thread): Change argument type to ptid_t. Adjust to
12904 per-process data.
12905 (maybe_attach_thread): Adjust to per-process data and ptids.
12906 (thread_db_find_new_threads): Ditto.
12907 (thread_db_init): Ditto.
12908 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12909 processes table. Adjust to use ptids.
12910 (spu_kill, spu_detach): Adjust interface. Remove process from
12911 processes table.
12912 (spu_join, spu_thread_alive): Adjust interface.
12913 (spu_wait): Adjust interface. Remove process from processes
12914 table. Adjust to use ptids.
12915 * win32-low.c (current_inferior_tid): Delete.
12916 (current_inferior_ptid): New.
12917 (debug_event_ptid): New.
12918 (thread_rec): Take a ptid. Adjust.
12919 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12920 (child_delete_thread): Ditto.
12921 (do_initial_child_stuff): Add `attached' argument. Add process to
12922 processes table.
12923 (child_fetch_inferior_registers, child_store_inferior_registers):
12924 Adjust.
12925 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12926 (win32_attach): Pass 1 to do_initial_child_stuff.
12927 (win32_kill): Adjust interface. Remove process from processes
12928 table.
12929 (win32_detach): Ditto.
12930 (win32_join): Adjust interface.
12931 (win32_thread_alive): Take a ptid.
12932 (win32_resume): Adjust to use ptids.
12933 (get_child_debug_event): Ditto.
12934 (win32_wait): Adjust interface. Remove exiting process from
12935 processes table.
12936
12937 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12938
12939 Non-stop mode support.
12940
12941 * server.h (non_stop): Declare.
12942 (gdb_client_data, handler_func): Declare.
12943 (delete_file_handler, add_file_handler, start_event_loop):
12944 Declare.
12945 (handle_serial_event, handle_target_event, push_event)
12946 (putpkt_notif): Declare.
12947 * target.h (enum resume_kind): New.
12948 (struct thread_resume): Replace `step' field by `kind' field.
12949 (TARGET_WNOHANG): Define.
12950 (struct target_ops) <wait>: Add `options' argument.
12951 <supports_non_stop, async, start_non_stop>: New fields.
12952 (target_supports_non_stop, target_async): New.
12953 (start_non_stop): Declare.
12954 (mywait): Add `options' argument.
12955 * target.c (mywait): Add `options' argument. Print child exit
12956 notifications here.
12957 (start_non_stop): New.
12958 * server.c (non_stop, own_buf, mem_buf): New globals.
12959 (struct vstop_notif): New.
12960 (notif_queue): New global.
12961 (queue_stop_reply, push_event, discard_queued_stop_replies)
12962 (send_next_stop_reply): New.
12963 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12964 interface changes.
12965 (attach_inferior): In non-stop mode, don't wait for the target
12966 here.
12967 (handle_general_set): Handle QNonStop.
12968 (handle_query): When handling qC, return the current general
12969 thread, instead of the first thread of the list.
12970 (handle_query): If the backend supports non-stop mode, include
12971 QNonStop+ in the qSupported query response.
12972 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12973 and non-stop mode.
12974 (handle_v_attach, handle_v_run): Handle non-stop mode.
12975 (handle_v_stopped): New.
12976 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12977 (myresume): Adjust to use resume_kind. Handle non-stop.
12978 (queue_stop_reply_callback): New.
12979 (handle_status): Handle non-stop mode.
12980 (main): Clear non_stop flag on reconnection. Use the event-loop.
12981 Refactor serial protocol handling from here ...
12982 (process_serial_event): ... to this new function. When GDB
12983 selects any thread, select one here. In non-stop mode, wait until
12984 GDB acks all pending events before exiting.
12985 (handle_serial_event, handle_target_event): New.
12986 * remote-utils.c (remote_open): Install remote_desc in the event
12987 loop.
12988 (remote_close): Remove remote_desc from the event loop.
12989 (putpkt_binary): Rename to...
12990 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12991 (putpkt_binary): New as wrapper around putpkt_binary_1.
12992 (putpkt_notif): New.
12993 (prepare_resume_reply): In non-stop mode, don't change the
12994 general_thread.
12995 * event-loop.c: New.
12996 * Makefile.in (OBJ): Add event-loop.o.
12997 (event-loop.o): New rule.
12998
12999 * linux-low.h (pid_of): Moved here.
13000 (lwpid_of): New.
13001 (get_lwp_thread): Use lwpid_of.
13002 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13003 * linux-low.c (pid_of): Delete.
13004 (inferior_pid): Use lwpid_of.
13005 (linux_event_pipe): New.
13006 (target_is_async_p): New.
13007 (delete_lwp): New.
13008 (handle_extended_wait): Use lwpid_of.
13009 (add_lwp): Don't set lwpid field.
13010 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13011 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13012 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13013 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13014 first. Adjust to linux_wait_for_event interface changes. Use
13015 lwpid_of.
13016 (linux_detach): Don't delete the main lwp here.
13017 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13018 (status_pending_p): Don't consider explicitly suspended lwps.
13019 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13020 pointer. Add OPTIONS argument. Change return type to int. Use
13021 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13022 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13023 pointer. Add status pointer argument. Return a pid instead of a
13024 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13025 changes. In non-stop mode, don't switch to a random thread.
13026 (linux_wait): Rename to...
13027 (linux_wait_1): ... this. Add target_options argument, and handle
13028 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13029 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13030 clean exit and signal exit code. Don't stop all threads in
13031 non-stop mode. In all-stop mode, only stop all threads when
13032 reporting a stop to GDB. Handle explicit thread stop requests.
13033 (async_file_flush, async_file_mark): New.
13034 (linux_wait): New.
13035 (send_sigstop): Use lwpid_of.
13036 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13037 interface changes. In non-stop mode, don't switch to a random
13038 thread.
13039 (linux_resume_one_lwp): Use lwpid_of.
13040 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13041 (linux_resume_one_thread): ... this. Handle resume_stop. In
13042 non-stop mode, don't look for pending flag in all threads.
13043 (resume_status_pending_p): Don't consider explicitly suspended
13044 threads.
13045 (my_waitpid): Reimplement. Emulate __WALL.
13046 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13047 Use lwpid_of.
13048 (sigchld_handler, linux_supports_non_stop, linux_async)
13049 (linux_start_non_stop): New.
13050 (linux_target_ops): Register linux_supports_non_stop, linux_async
13051 and linux_start_non_stop.
13052 (initialize_low): Install SIGCHLD handler.
13053 * thread-db.c (thread_db_create_event, find_one_thread)
13054 (thread_db_get_tls_address): Use lwpid_of.
13055 * win32-low.c (win32_detach): Adjust to use resume_kind.
13056 (win32_wait): Add `options' argument.
13057 * spu-low.c (spu_resume): Adjust to use resume_kind.
13058 (spu_wait): Add `options' argument.
13059
13060 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13061
13062 Decouple target code from remote protocol.
13063
13064 * target.h (enum target_waitkind): New.
13065 (struct target_waitstatus): New.
13066 (struct target_ops) <wait>: Return an unsigned long. Take a
13067 target_waitstatus pointer instead of a char pointer.
13068 (mywait): Likewise.
13069 * target.c (mywait): Change prototype to return an unsigned long.
13070 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13071 * server.h (thread_from_wait, old_thread_from_wait): Delete
13072 declarations.
13073 (prepare_resume_reply): Change prototype to take a
13074 target_waitstatus.
13075 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13076 (last_status, last_ptid): New.
13077 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13078 pid instead of a signal.
13079 (attach_inferior): Remove "status" and "signal" parameters.
13080 Adjust.
13081 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13082 not as an address.
13083 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13084 (handle_v_requests, myresume): Remove "status" and "signal"
13085 parameters. Adjust.
13086 (handle_status): New.
13087 (main): Delete local `status'. Adjust.
13088 * remote-utils.c: Include target.h.
13089 (prepare_resume_reply): Change prototype to take a
13090 target_waitstatus. Adjust.
13091
13092 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13093 interface.
13094 * spu-low.c (spu_wait): Adjust.
13095 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13096 Delete.
13097 (win32_wait): Adjust.
13098
13099 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13100
13101 * target.h (struct thread_resume): Delete leave_stopped member.
13102 (struct target_ops): Add a `n' argument to the `resume' callback.
13103 * server.c (start_inferior): Adjust.
13104 (handle_v_cont, myresume): Adjust.
13105 * linux-low.c (check_removed_breakpoint): Adjust to resume
13106 interface change, and to removed leave_stopped field.
13107 (resume_ptr): Delete.
13108 (struct thread_resume_array): New.
13109 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13110 resume interface change.
13111 (linux_continue_one_thread, linux_queue_one_thread)
13112 (resume_status_pending_p): Check if the resume field is NULL
13113 instead of checking the leave_stopped member.
13114 (linux_resume): Adjust to the target resume interface change.
13115 * spu-low.c (spu_resume): Adjust to the target resume interface
13116 change.
13117 * win32-low.c (win32_detach, win32_resume): Ditto.
13118
13119 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13120
13121 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13122 flag.
13123 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13124 pending.
13125 (linux_continue_one_thread): Only preserve the stepping flag if
13126 there's a pending breakpoint.
13127
13128 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13129
13130 * server.c (main): After the inferior having exited, call
13131 remote_close before exiting gdbserver.
13132
13133 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13134
13135 Fix size of FPSCR in Power 7 processors.
13136 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13137 (PPC_FEATURE_HAS_DFP): New #define.
13138 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13139 size of the FPSCR.
13140
13141 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13142
13143 * server.c (handle_query) Whitespace and formatting.
13144
13145 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13146
13147 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13148 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13149 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13150 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13151 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13152 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13153 Makefile.in, configure.ac: Fix whitespace throughout.
13154 * configure: Regenerate.
13155
13156 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13157
13158 * inferiors.c (find_inferior): Make it safe for the callback
13159 function to delete the currently iterated inferior.
13160
13161 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13162
13163 * Makefile.in (linuw_low_h): Move higher.
13164 (thread-db.o): Depend on $(linux_low_h).
13165
13166 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13167
13168 Rename "process" to "lwp" throughout.
13169
13170 * linux-low.c (all_processes): Rename to...
13171 (all_lwps): ... this.
13172 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13173 (add_process): Rename to ...
13174 (add_lwp): ... this. Adjust.
13175 (linux_create_inferior): Adjust.
13176 (linux_attach_lwp): Adjust.
13177 (linux_attach): Adjust.
13178 (linux_kill_one_process): Rename to ...
13179 (linux_kill_one_lwp): ... this. Adjust.
13180 (linux_kill): Adjust.
13181 (linux_detach_one_process): Rename to ...
13182 (linux_detach_one_lwp): ... this. Adjust.
13183 (linux_detach): Adjust.
13184 (check_removed_breakpoint): Adjust.
13185 (status_pending_p): Adjust.
13186 (linux_wait_for_process): Rename to ...
13187 (linux_wait_for_lwp): ... this. Adjust.
13188 (linux_wait_for_event): Adjust.
13189 (send_sigstop): Adjust.
13190 (wait_for_sigstop): Adjust.
13191 (stop_all_processes): Rename to ...
13192 (stop_all_lwps): ... this.
13193 (linux_resume_one_process): Rename to ...
13194 (linux_resume_one_lwp): ... this. Adjust.
13195 (linux_set_resume_request, linux_continue_one_thread)
13196 (linux_queue_one_thread, resume_status_pending_p)
13197 (usr_store_inferior_registers, regsets_store_inferior_registers)
13198 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13199 Adjust.
13200 * linux-low.h (get_process): Rename to ...
13201 (get_lwp): ... this. Adjust.
13202 (get_thread_process): Rename to ...
13203 (get_thread_lwp): ... this. Adjust.
13204 (get_process_thread): Rename to ...
13205 (get_lwp_thread): ... this. Adjust.
13206 (struct process_info): Rename to ...
13207 (struct lwp_info): ... this.
13208 (all_processes): Rename to ...
13209 (all_lwps): ... this.
13210 * proc-service.c (ps_lgetregs): Adjust.
13211 * thread-db.c (thread_db_create_event, find_one_thread)
13212 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13213
13214 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13215
13216 * server.c (handle_query): Handle "qAttached".
13217
13218 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13219
13220 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13221 GPLv3, update license URL.
13222
13223 2009-03-01 Doug Evans <dje@google.com>
13224
13225 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13226 (server_h): Add gdb_signals.h.
13227 (signals.o): Update.
13228 * server.h (target_signal_from_host,target_signal_to_host_p)
13229 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13230
13231 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13232
13233 * remote-utils.c (getpkt): Also generate remote-debug
13234 information if noack_mode is set.
13235
13236 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13237
13238 * server.c (handle_query): Report qXfer:siginfo:read and
13239 qXfer:siginfo:write as supported and handle them.
13240 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13241 * linux-low.c (linux_xfer_siginfo): New.
13242 (linux_target_ops): Set it.
13243
13244 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13245
13246 * server.c (gdbserver_usage): Mention --remote-debug.
13247 (main): Accept '--remote-debug' switch.
13248
13249 2009-01-18 Doug Evans <dje@google.com>
13250
13251 * regcache.c (new_register_cache): No need to check result of xcalloc.
13252 * server.c (handle_search_memory): Back out calls to xmalloc,
13253 result is checked and error is returned to user upon failure.
13254 (handle_query): Ditto. Add more checks for result of malloc.
13255 (handle_v_cont): Check result of malloc, report error back to
13256 user upon failure.
13257 (handle_v_run): Ditto. Call freeargv.
13258 * server.h (freeargv): Declare.
13259 * utils.c (freeargv): New fn.
13260
13261 2009-01-15 Doug Evans <dje@google.com>
13262
13263 * gdbreplay.c (perror_with_name): Make arg const char *.
13264 * server.h (target_signal_to_name): Make return type const char *.
13265 * thread-db.c (thread_db_err_str): Make return type const char *.
13266 * utils.c (perror_with_name): Make arg const char *.
13267
13268 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13269
13270 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13271 when handling a EXIT_PROCESS_DEBUG_EVENT.
13272
13273 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13274
13275 * gdbreplay.c (gdbreplay_version): Update copyright year.
13276 * server.c (gdbserver_version): Likewise.
13277
13278 2009-01-05 Doug Evans <dje@google.com>
13279
13280 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13281 (handle_extended_wait): Improve comment.
13282
13283 2008-12-13 Doug Evans <dje@google.com>
13284
13285 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13286 * server.h (ATTR_MALLOC): New macro.
13287 (xmalloc,xcalloc,xstrdup): Declare.
13288 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13289 * inferiors.c: Ditto.
13290 * linux-low.c: Ditto.
13291 * mem-break.c: Ditto.
13292 * regcache.c: Ditto.
13293 * remote-utils.c: Ditto.
13294 * server.c: Ditto.
13295 * target.c: Ditto.
13296 * win32-low.c: Ditto.
13297
13298 2008-12-12 Doug Evans <dje@google.com>
13299
13300 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13301 in debugging printf.
13302
13303 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13304
13305 2008-12-09 Doug Evans <dje@google.com>
13306
13307 * linux-low.h (struct process_info): Delete member tid, unused.
13308 * thread-db.c (find_one_thread): Update.
13309 (maybe_attach_thread): Update.
13310
13311 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13312
13313 * target.h (struct target_ops): Add qxfer_osdata member.
13314 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13315 and dirent.h.
13316 (linux_qxfer_osdata): New functions.
13317 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13318 callback.
13319 * server.c (handle_query): Handle "qXfer:osdata:read:".
13320 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13321 (buffer_xml_printf): New functions.
13322 * server.h (struct buffer): New.
13323 (buffer_grow_str, buffer_grow_str0): New macros.
13324 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13325 (buffer_xml_printf): Declare.
13326
13327 2008-11-24 Doug Evans <dje@google.com>
13328
13329 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13330
13331 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13332
13333 * server.c (handle_v_run): Always use the supplied argument list.
13334
13335 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13336
13337 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13338 (xtensa_regmap_table): Add entry for scompare1.
13339
13340 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13341
13342 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13343 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13344 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13345 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13346 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13347 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13348 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13349 XML target descriptions.
13350 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13351 when inferior is running on an ISA 2.05 or later processor. Add
13352 special case to return offset for full 64-bit slot of FPSCR when
13353 in 32-bits.
13354
13355 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13356
13357 * Makefile.in (SFILES, clean): Added sparc64 files.
13358 (reg-sparc64.o, reg-sparc64.c): New.
13359 * configure.srv (sparc*-*-linux*): New configuration.
13360 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13361 syscall arguments for SPARC.
13362 (regsets_store_inferior_registers): Likewise.
13363 * linux-sparc-low.c: New file.
13364
13365 2008-10-21 Doug Evans <dje@google.com>
13366
13367 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13368 (READLINE_DIR,READLINE_DEP): Delete.
13369 (INTERNAL_CFLAGS): Update.
13370 (LINTFLAGS): Update.
13371
13372 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13373
13374 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13375 whole argv from the last run, not just argv[0].
13376
13377 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13378
13379 * regcache.c (new_register_cache): Return NULL if the register
13380 cache size isn't known yet.
13381 (free_register_cache): Avoid dereferencing a NULL regcache.
13382
13383 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13384
13385 * configure.srv: Merge MIPS and MIPS64.
13386
13387 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13388
13389 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13390
13391 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13392
13393 * Makefile.in: Add required vsx dependencies.
13394
13395 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13396 Declare init_registers_powerpc_vsx32l.
13397 Declare init_registers_powerpc_vsx64l.
13398 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13399 (ppc_arch_setup): Check for VSX in hwcap.
13400 (ppc_fill_vsxregset): New function.
13401 (ppc_store_vsxregset): New function.
13402 Add new VSX entry in regset_info target_regsets.
13403
13404 * configure.srv: Add new VSX dependencies.
13405
13406 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13407
13408 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13409 (remote_open): Set or clear transport_is_reliable.
13410 (putpkt_binary): Don't expect acks in noack mode.
13411 (getpkt): Don't send ack/nac in noack mode.
13412 * server.c (handle_general_set): Handle QStartNoAckMode.
13413 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13414 qSupported.
13415 (main): Reset noack_mode on every connection.
13416 * server.h (noack_mode): Declare.
13417
13418 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13419
13420 * Makefile.in (GDBREPLAY_OBS): New variable.
13421 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13422
13423 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13424 Daniel Jacobowitz <dan@codesourcery.com>
13425
13426 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13427 (usr_store_inferior_registers): Likewise.
13428 (regsets_store_inferior_registers): Likewise.
13429
13430 2008-07-31 Rolf Jansen <rj@surtec.com>
13431 Pedro Alves <pedro@codesourcery.com>
13432
13433 * configure.ac: Check for memmem declaration.
13434 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13435 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13436 (disable_packet_qfThreadInfo): Unconditionally compile.
13437 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13438 * configure, config.in: Regenerate.
13439
13440 2008-07-28 Doug Kwan <dougkwan@google.com>
13441
13442 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13443 (linux_write_memory): Remove declaration of errno.
13444
13445 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13446
13447 * linux-low.c (handle_extended_wait): Do not use "status"
13448 variable uninitialized.
13449
13450 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13451
13452 * server.c (handle_v_attach): Inhibit reporting dll changes.
13453
13454 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13455
13456 * remote-utils.c (prepare_resume_reply): If requested, don't
13457 output "thread:TID" in the T stop reply.
13458
13459 * server.c (disable_packet_vCont, disable_packet_Tthread)
13460 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13461 (handle_query): If requested, disable support for qC, qfThreadInfo
13462 and qsThreadInfo.
13463 (handle_v_requests): If requested, disable support for vCont.
13464 (gdbserver_show_disableable): New.
13465 (main): Handle --disable-packet and --disable-packet=LIST.
13466
13467 * server.h (disable_packet_vCont, disable_packet_Tthread)
13468 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13469
13470 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13471
13472 * server.c (gdbserver_usage): Mention --version.
13473
13474 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13475
13476 * Makefile.in (gdbreplay.o): New rule.
13477
13478 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13479
13480 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13481 message, not gdbserver.
13482
13483 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13484 Nathan Sidwell <nathan@codesourcery.com>
13485 Joseph Myers <joseph@codesourcery.com>
13486
13487 * acinclude.m4: Include ../../config/acx.m4.
13488 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13489 * configure, config.in: Regenerate.
13490 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13491 * server.c (gdbserver_version): Print PKGVERSION.
13492 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13493 (main): Adjust gdbserver_usage calls.
13494 * gdbreplay.c (version, host_name): Add declarations.
13495 (gdbreplay_version, gdbreplay_usage): New.
13496 (main): Accept --version and --help options.
13497
13498 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13499
13500 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13501 (arm_breakpoint_at): Handle Thumb.
13502 (the_low_target): Add comment.
13503
13504 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13505
13506 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13507
13508 2008-05-09 Doug Evans <dje@google.com>
13509
13510 * server.h (decode_search_memory_packet): Declare.
13511 * remote-utils.c (decode_search_memory_packet): New fn.
13512 * server.c (handle_search_memory_1): New fn.
13513 (handle_search_memory): New fn.
13514 (handle_query): Process qSearch:memory packets.
13515
13516 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13517
13518 * regcache.c (registers_length): Remove.
13519 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13520 full register packet.
13521 * regcache.h (registers_length): Remove prototype.
13522 * server.h (PBUFSIZ): Define to 16384.
13523
13524 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13525
13526 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13527 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13528 powerpc-64l.o, and powerpc-altivec64l.o.
13529 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13530 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13531 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13532 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13533 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13534 to srv_xmlfiles.
13535
13536 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13537 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13538 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13539 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13540 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13541 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13542 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13543 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13544 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13545 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13546 (clean): Update.
13547
13548 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13549 (init_registers_powerpc_32l): ... this new prototype.
13550 (init_registers_powerpc_32): Remove, replace by ...
13551 (init_registers_powerpc_altivec32l): ... this new prototype.
13552 (init_registers_powerpc_e500): Remove, replace by ...
13553 (init_registers_powerpc_e500l): ... this new prototype.
13554 (init_registers_ppc64): Remove, replace by ...
13555 (init_registers_powerpc_64l): ... this new prototype.
13556 (init_registers_powerpc_64): Remove, replace by ...
13557 (init_registers_powerpc_altivec64l): ... this new prototype.
13558 (ppc_num_regs): Set to 73.
13559 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13560 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13561 (ppc_cannot_store_register): Handle orig_r3 and trap.
13562 (ppc_arch_setup): Update init_registers_... calls.
13563 (ppc_fill_gregset): Handle orig_r3 and trap.
13564
13565 * inferiors.c (clear_inferiors): Reset current_inferior.
13566
13567 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13568
13569 * acinclude.m4: Add override.m4.
13570 * configure: Regenerate.
13571
13572 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13573
13574 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13575 initial call to init_register_ppc64.
13576
13577 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13578
13579 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13580 single powerpc*-*-linux* case.
13581 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13582
13583 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13584
13585 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13586 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13587 from reg_xmlfiles.
13588 * linux-ppc-low.c: Include <elf.h>.
13589 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13590 (ppc_hwcap): New global variable.
13591 (ppc_regmap): Remove __SPE__ #ifdef sections.
13592 (ppc_regmap_e500): New global variable.
13593 (ppc_cannot_store_register): Update __SPE__ special case.
13594 (ppc_get_hwcap): New function.
13595 (ppc_arch_setup): Use it to determine whether inferior supports
13596 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13597 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13598 Do not access registers if target does not support AltiVec.
13599 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13600 Do not access registers if target does not support SPE.
13601 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13602
13603 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13604
13605 * linux-low.c (disabled_regsets, num_regsets): New.
13606 (use_regsets_p): Delete.
13607 (linux_wait_for_process): Clear disabled_regsets.
13608 (regsets_fetch_inferior_registers): Check and set it.
13609 (regsets_store_inferior_registers): Likewise.
13610 (linux_fetch_registers, linux_store_registers): Do not use
13611 use_regsets_p.
13612 (initialize_low): Allocate disabled_regsets.
13613
13614 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13615
13616 * Makefile.in (LIBOBJS): New.
13617 (OBS): Use LIBOBJS.
13618 (memmem.o): New rule.
13619 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13620 * configure: Regenerated.
13621
13622 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13623
13624 * server.c (handle_query): Never return "unsupported" for
13625 qXfer:features:read queries.
13626
13627 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13628
13629 * server.c (get_features_xml): Fix inverted condition.
13630 (handle_query): Always support qXfer:feature:read.
13631
13632 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13633
13634 * server.c (wrapper_argv): New.
13635 (start_inferior): Handle wrapper_argv. If set, expect an extra
13636 trap.
13637 (gdbserver_usage): Document --wrapper.
13638 (main): Parse --wrapper.
13639
13640 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13641
13642 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13643 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13644 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13645 (ppc_set_pc): Likewise.
13646 (ppc_arch_setup): New function.
13647 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13648 of collect_register.
13649 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13650
13651 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13652
13653 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13654 instead of linux-ppc64-low.o.
13655 * linux-ppc64-low.c: Remove file.
13656 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13657 (linux-ppc64-low.o): Remove rule.
13658
13659 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13660 (init_registers_powerpc_64): Likewise.
13661 (ppc_regmap): Conditionally define depending on __powerpc64__.
13662 (ppc_cannot_store_register): Do not special-case "fpscr" when
13663 compiled on __powerpc64__.
13664 (ppc_collect_ptrace_register): New function.
13665 (ppc_supply_ptrace_register): New function.
13666 (ppc_breakpoint): Change type to "unsigned int".
13667 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13668 (the_low_target): Conditionally provide initializers for the
13669 arch_setup member depending on __powerpc64__. Install
13670 collect_ptrace_register and supply_ptrace_register members.
13671
13672 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13673
13674 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13675 * server.c (gdbserver_xmltarget): Define.
13676 (get_features_xml): Use it to replace "target.xml" and arch_string.
13677
13678 * configure.srv: Remove srv_xmltarget. Add XML files that were
13679 mentioned there to srv_xmlfiles instead. Remove conditional tests
13680 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13681 srv_xmlfiles and srv_regobj to include all possible choices.
13682 * configure.ac (srv_xmltarget): Remove.
13683 (srv_xmlfiles): Do not add "target.xml".
13684 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13685 checks for supplementary target information.
13686 * configure: Regenerate.
13687 * Makefile.in (XML_TARGET): Remove.
13688 (target.xml): Remove rule.
13689 (clean): Do not clean up target.xml.
13690 (.PRECIOUS): Do not mention target.xml.
13691
13692 * target.h (struct target_ops): Remove arch_string member.
13693 * linux-low.c (linux_arch_string): Remove.
13694 (linux_target_ops): Remove arch_string initializer.
13695 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13696 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13697 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13698 * spu-low.c (spu_arch_string): Remove.
13699 (spu_target_ops): Remove arch_string initializer.
13700 * win32-low.c (win32_arch_string): Remove.
13701 (win32_target_ops): Remove arch_string initializer.
13702 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13703 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13704 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13705
13706 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13707
13708 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13709 by collect_ptrace_register and supply_ptrace_register hooks.
13710 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13711 instead of checking for the_low_target.left_pad_xfer.
13712 (usr_store_inferior_registers): Use collect_ptrace_register callback
13713 instead of checking for the_low_target.left_pad_xfer.
13714
13715 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13716 (s390_supply_ptrace_register): Likewise.
13717 (s390_fill_gregset): Call s390_collect_ptrace_register.
13718 (the_low_target): Update.
13719
13720 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13721 (ppc_supply_ptrace_register): Likewise.
13722 (the_low_target): Update.
13723
13724 * linux-i386-low.c (the_low_target): Update.
13725 * linux-x86-64-low.c (the_low_target): Update.
13726
13727 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13728
13729 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13730 reg-s390.o and reg-s390x.o.
13731
13732 * linux-low.c (new_inferior): New global variable.
13733 (linux_create_inferior, linux_attach): Set it.
13734 (linux_wait_for_process): Call the_low_target.arch_setup after the
13735 target has stopped for the first time.
13736 (initialize_low): Do not call the_low_target.arch_setup.
13737
13738 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13739 (s390_set_pc): Likewise.
13740 (s390_arch_setup): New function.
13741 (the_low_target): Use s390_arch_setup as arch_setup routine.
13742
13743 * regcache.c (realloc_register_cache): New function.
13744 (set_register_cache): Call it for each existing regcache.
13745
13746 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13747
13748 * server.h (init_registers): Remove prototype.
13749
13750 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13751 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13752 instead of init_registers ().
13753 * linux-arm-low.c (init_registers_arm): Add prototype.
13754 (init_registers_arm_with_iwmmxt): Likewise.
13755 (the_low_target): Add initializer for arch_setup field.
13756 * linux-cris-low.c (init_registers_cris): Add prototype.
13757 (the_low_target): Add initializer for arch_setup field.
13758 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13759 (the_low_target): Add initializer for arch_setup field.
13760 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13761 (the_low_target): Add initializer for arch_setup field.
13762 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13763 (the_low_target): Add initializer for arch_setup field.
13764 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13765 (the_low_target): Add initializer for arch_setup field.
13766 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13767 (the_low_target): Add initializer for arch_setup field.
13768 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13769 (init_registers_mips64_linux): Likewise.
13770 (the_low_target): Add initializer for arch_setup field.
13771 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13772 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13773 (the_low_target): Add initializer for arch_setup field.
13774 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13775 (init_registers_powerpc_64): Likewise.
13776 (the_low_target): Add initializer for arch_setup field.
13777 * linux-s390-low.c (init_registers_s390): Add prototype.
13778 (init_registers_s390x): Likewise.
13779 (the_low_target): Add initializer for arch_setup field.
13780 * linux-sh-low.c (init_registers_sh): Add prototype.
13781 (the_low_target): Add initializer for arch_setup field.
13782 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13783 (the_low_target): Add initializer for arch_setup field.
13784 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13785 (the_low_target): Add initializer for arch_setup field.
13786
13787 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13788 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13789 instead of init_registers ().
13790 * win32-arm-low.c (init_registers_arm): Add prototype.
13791 (the_low_target): Add initializer for arch_setup field.
13792 * win32-i386-low.c (init_registers_i386): Add prototype.
13793 (the_low_target): Add initializer for arch_setup field.
13794
13795 * spu-low.c (init_registers_spu): Add prototype.
13796 (initialize_low): Call initialie_registers_spu () instead of
13797 initialize_registers ().
13798
13799 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13800
13801 * server.c (handle_v_requests): When handling the vRun and vAttach
13802 packets, if already debugging a process, don't kill it. Return an
13803 error instead.
13804
13805 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13806
13807 * server.c (handle_query): Correct length check.
13808
13809 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13810
13811 * win32-low.c (do_initial_child_stuff): Add process handle
13812 parameter. Set current_process_handle and current_process_id from the
13813 parameters. Clear globals.
13814 (win32_create_inferior): Don't set current_process_handle and
13815 current_process_id here. Instead pass them on the call to
13816 do_initial_child_stuff.
13817 (win32_attach): Likewise.
13818 (win32_clear_inferiors): New.
13819 (win32_kill): Don't close the current process handle or the
13820 current thread handle here. Instead call win32_clear_inferiors.
13821 (win32_detach): Don't open a new handle to the process. Call
13822 win32_clear_inferiors.
13823 (win32_join): Don't rely on current_process_handle; open a new
13824 handle using the process id.
13825 (win32_wait): Call win32_clear_inferiors when the inferior process
13826 has exited.
13827
13828 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13829
13830 * server.c (monitor_show_help): Add "exit".
13831
13832 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13833
13834 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13835 (clean): Add reg-xtensa.c.
13836 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13837 * configure.srv (xtensa*-*-linux*) New target.
13838 * linux-xtensa-low.c: New.
13839 * xtensa-xtregs.c: New.
13840
13841 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13842
13843 * hostio.c: Don't include errno.h.
13844 (errno_to_fileio_errno): Move to hostio-errno.
13845 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13846 error number outputting to the target->hostio_last_error callback.
13847 (hostio_packet_error): Use FILEIO_EINVAL directly.
13848 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13849 calls to hostio_error.
13850 * hostio-errno.c: New.
13851 * server.h (hostio_last_error_from_errno): Declare.
13852 * target.h (target_ops): Add hostio_last_error member.
13853 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13854 as hostio_last_error handler.
13855 * spu-low.c (spu_target_ops): Likewise.
13856 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13857 (wince_hostio_last_error): New functions.
13858 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13859 as hostio_last_error handler.
13860 (win32_target_ops) [!_WIN32_WCE]: Register
13861 hostio_last_error_from_errno as hostio_last_error handler.
13862 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13863 (hostio-errno.o): New rule.
13864 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13865 * configure.srv (srv_hostio_err_objs): New variable. Default to
13866 hostio-errno.o.
13867 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13868 * configure: Regenerate.
13869
13870 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13871
13872 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13873 (linux_kill, linux_detach): Clean up the process list.
13874 * remote-utils.c (remote_open): Improve port number parsing.
13875 (putpkt_binary, input_interrupt): Only send interrupts if the target
13876 is running.
13877 * server.c (extended_protocol): Make static.
13878 (attached): Define earlier.
13879 (exit_requested, response_needed, program_argv): New variables.
13880 (target_running): New.
13881 (start_inferior): Clear attached here.
13882 (attach_inferior): Set attached here.
13883 (require_running): Define.
13884 (handle_query): Use require_running and target_running. Implement
13885 "monitor exit".
13886 (handle_v_attach, handle_v_run): New.
13887 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13888 (gdbserver_usage): Update.
13889 (main): Redo argument parsing. Handle --debug and --multi. Handle
13890 --attach along with other options or after the port. Save
13891 program_argv. Support no initial program. Resynchronize
13892 communication with GDB after an error. Handle "monitor exit".
13893 Use require_running and target_running. Always allow the extended
13894 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13895 restart in extended mode.
13896 * README: Refer to the GDB manual. Update --attach usage.
13897
13898 2007-12-20 Andreas Schwab <schwab@suse.de>
13899
13900 * linux-low.c (STACK_SIZE): Define.
13901 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13902 (linux_test_for_tracefork): Likewise.
13903
13904 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13905
13906 * linux-low.c (linux_wait_for_event): Update messages. Do not
13907 reinsert auto-delete breakpoints.
13908 * mem-break.c (struct breakpoint): Change return type of handler to
13909 int.
13910 (set_breakpoint_at): Update handler type.
13911 (reinsert_breakpoint_handler): Return 1 instead of calling
13912 delete_breakpoint.
13913 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13914 setting a new one.
13915 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13916 * mem-break.h (set_breakpoint_at): Update handler type.
13917 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13918 * win32-low.c (auto_delete_breakpoint): New.
13919 (get_child_debug_event): Use it.
13920
13921 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13922
13923 * configure.ac: Check for pread and pwrite.
13924 * hostio.c (handle_pread): Fall back to lseek and read.
13925 (handle_pwrite): Fall back to lseek and write.
13926 * config.in, configure: Regenerated.
13927
13928 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13929
13930 * server.c (myresume): Add own_buf argument.
13931 (main): Update calls.
13932
13933 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13934
13935 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13936 * remote-utils.c (remote_open): Do not call disable_async_io.
13937 (block_async_io): Delete.
13938 (unblock_async_io): Make static.
13939 (initialize_async_io): New.
13940 * server.c (handle_v_cont): Handle async I/O here.
13941 (myresume): Likewise. Move other common resume tasks here...
13942 (main): ... from here. Call initialize_async_io. Disable async
13943 I/O before the main loop.
13944 * server.h (initialize_async_io): Declare.
13945 (block_async_io, unblock_async_io): Delete prototypes.
13946 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13947
13948 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13949
13950 * remote-utils.c (readchar): Allow binary data in received messages.
13951
13952 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13953
13954 * win32-low.c (attaching): New global.
13955 (win32_create_inferior): Clear the `attaching' global.
13956 (win32_attach): Set the `attaching' global.
13957 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13958 attaching. Only set a breakpoint at the entry point if not
13959 attaching.
13960
13961 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13962
13963 * server.c (main): Don't report dll events on the initial
13964 connection on attaches.
13965
13966 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13967
13968 * server.c (main): Relax numerical bases supported for the pid of
13969 the --attach command line argument.
13970
13971 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13972
13973 * win32-low.c (win32_attach): Call OpenProcess before
13974 DebugActiveProcess, not after. Add last error output to error
13975 call.
13976
13977 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13978
13979 * win32-low.c (win32_get_thread_context)
13980 (win32_set_thread_context): New functions.
13981 (thread_rec): Use win32_get_thread_context.
13982 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13983 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13984 field.
13985
13986 2007-12-03 Leo Zayas
13987 Pedro Alves <pedro_alves@portugalmail.pt>
13988
13989 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13990 global variables.
13991 (child_add_thread): Minor cleanup.
13992 (child_continue): Resume artificially suspended threads before
13993 calling ContinueDebugEvent.
13994 (suspend_one_thread): New.
13995 (fake_breakpoint_event): New.
13996 (get_child_debug_event): Change return type to int. Check here if
13997 gdb sent an interrupt request. If a soft interrupt was requested,
13998 fake a breakpoint event. Return 0 if there is no event to handle,
13999 and 1 otherwise.
14000 (win32_wait): Don't check here if gdb sent an interrupt request.
14001 Ensure there is a valid event to handle.
14002 (win32_request_interrupt): Add soft interruption method as last
14003 resort.
14004
14005 2007-12-03 Leo Zayas
14006 Pedro Alves <pedro_alves@portugalmail.pt>
14007
14008 * win32-low.h (win32_thread_info): Add descriptions to the
14009 structure members. Replace `suspend_count' counter by a
14010 `suspended' flag.
14011 * win32-low.c (thread_rec): Update condition of when to get the
14012 context from the inferior. Rely on ContextFlags being set if it
14013 has already been retrieved. Only suspend the inferior thread if
14014 we haven't already. Warn if that fails.
14015 (continue_one_thread): s/suspend_count/suspended/. Only call
14016 ResumeThread once. Warn if that fails.
14017
14018 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14019
14020 * win32-low.c (win32_wait): Don't read from the inferior when it
14021 has already exited.
14022
14023 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14024
14025 * Makefile.in (win32_low_h): New variable.
14026 (win32-low.o): Add dependency on $(win32_low_h).
14027 (win32-arm-low.o, win32-i386-low.o): New rules.
14028
14029 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14030
14031 * hostio.c: Correct copyright year.
14032
14033 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14034
14035 * Makefile.in (OBS): Add hostio.o.
14036 (hostio.o): New rule.
14037 * server.h (handle_vFile): Declare.
14038 * hostio.c: New file.
14039 * server.c (handle_v_requests): Take packet_len and new_packet_len
14040 for binary packets. Call handle_vFile.
14041 (main): Update call to handle_v_requests.
14042
14043 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14044
14045 * linux-low.c: Include <sched.h>.
14046
14047 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14048
14049 * linux-low.c (linux_tracefork_grandchild): New.
14050 (linux_tracefork_child): Use clone.
14051 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14052
14053 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14054
14055 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14056
14057 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14058
14059 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14060
14061 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14062
14063 * inferiors.c (change_inferior_id): Delete.
14064 (add_pid_to_list, pull_pid_from_list): New.
14065 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14066 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14067 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14068 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14069 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14070 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14071 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14072 (using_threads): Always set to 1.
14073 (handle_extended_wait): New.
14074 (add_process): Do not set TID.
14075 (linux_create_inferior): Set must_set_ptrace_flags.
14076 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14077 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14078 (linux_thread_alive): Rename TID argument to LWPID.
14079 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14080 (linux_wait_for_event): Do not use TID or check using_threads. Update
14081 call to dead_thread_notify. Call handle_extended_wait.
14082 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14083 (send_sigstop): Delete sigstop_sent.
14084 (wait_for_sigstop): Avoid TID.
14085 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14086 (linux_test_for_tracefork): New.
14087 (linux_lookup_signals): Use thread_db_active and
14088 linux_supports_tracefork_flag.
14089 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14090 * linux-low.h (get_process_thread): Avoid TID.
14091 (struct process_ifo): Move thread_known and tid to the end. Remove
14092 sigstop_sent.
14093 (linux_attach_lwp, thread_db_init): Update prototypes.
14094 * server.h (change_inferior_id): Delete prototype.
14095 (add_pid_to_list, pull_pid_from_list): New prototypes.
14096 * thread-db.c (thread_db_use_events): New.
14097 (find_first_thread): Rename to...
14098 (find_one_thread): ...this. Update callers and messages. Do not
14099 call fatal. Check thread_db_use_events. Do not call
14100 change_inferior_id or new_thread_notify.
14101 (maybe_attach_thread): Update. Do not call new_thread_notify.
14102 (thread_db_init): Set thread_db_use_events. Check use_events.
14103 * utils.c (fatal, warning): Correct message prefix.
14104
14105 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14106
14107 * Makefile.in (clean): Remove new files.
14108 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14109 (powerpc-64.o, powerpc-64.c): New rules.
14110 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14111 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14112 with SPE.
14113 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14114 SPE targets.
14115 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14116 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14117 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14118 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14119 (target_regsets): Add AltiVec and SPE register sets.
14120 * configure.ac: Check for AltiVec and SPE.
14121 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14122 (ppc_fill_vrregset, ppc_store_vrregset): New.
14123 (target_regsets): Add AltiVec register set.
14124 * configure: Regenerated.
14125
14126 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14127
14128 * linux-low.c (O_LARGEFILE): Define.
14129 (linux_read_memory): Use /proc/PID/mem.
14130 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14131 * configure, config.in: Regenerated.
14132
14133 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14134
14135 * linux-low.c (linux_wait_for_event): Do not pass signals while
14136 single-stepping.
14137
14138 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14139
14140 * win32-low.c (create_process): New.
14141 (win32_create_inferior): Use create_process instead of
14142 CreateProcess. If create_process failed retry appending an ".exe"
14143 suffix. Store the GetLastError result immediatelly after
14144 create_process calls and use it on the call to error.
14145
14146 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14147
14148 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14149
14150 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14151
14152 * configure.ac: Switch license to GPLv3.
14153
14154 2007-08-01 Michael Snyder <msnyder@access-company.com>
14155
14156 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14157
14158 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14159
14160 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14161 typedef.
14162 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14163 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14164 CloseToolhelp32Snapshot.
14165 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14166 CloseToolhelp32Snapshot.
14167
14168 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14169
14170 * server.c (main): Check for inferior exit before main loop.
14171
14172 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14173
14174 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14175 instead of on tmp_desc.
14176
14177 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14178 Daniel Jacobowitz <dan@codesourcery.com>
14179
14180 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14181 (add_thread): Minor cleanups.
14182 (clear_inferiors): Move lower in the file. Clear the DLL
14183 list.
14184 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14185 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14186 (xml_escape_text): New.
14187 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14188 for qSupported.
14189 (handle_v_cont): Report errors.
14190 (gdbserver_version): Update.
14191 (main): Correct size of own_buf. Do not report initial DLL events.
14192 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14193 (unloaded_dll, xml_escape_text): New.
14194 * win32-low.c (enum target_waitkind): Update comments.
14195 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14196 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14197 (win32_EnumProcessModules, win32_GetModuleInformation)
14198 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14199 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14200 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14201 (win32_Module32First, win32_Module32Next, load_toolhelp)
14202 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14203 (get_child_debug_event): Handle DLL events.
14204 (win32_wait): Likewise.
14205
14206 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14207
14208 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14209 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14210
14211 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14212
14213 * win32-low.c (handle_output_debug_string): Ignore event if not
14214 waiting.
14215
14216 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14217
14218 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14219
14220 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14221
14222 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14223
14224 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14225
14226 * inferiors.c (change_inferior_id): Add comment.
14227 * linux-low.c (check_removed_breakpoint): Add an early
14228 prototype. Improve debug output.
14229 (linux_attach): Doc update.
14230 (linux_detach_one_process, linux_detach): Clean up before releasing
14231 each process.
14232 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14233 * linux-low.h (struct process_info): Doc improvement.
14234 * mem-break.c (delete_all_breakpoints): New.
14235 * mem-break.h (delete_all_breakpoints): New prototype.
14236 * thread-db.c (find_first_thread): New.
14237 (thread_db_create_event): Call it instead of
14238 thread_db_find_new_threads. Clean up unused variables.
14239 (maybe_attach_thread): Remove first thread handling.
14240 (thread_db_find_new_threads): Use find_first_thread.
14241 (thread_db_get_tls_address): Likewise.
14242
14243 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14244
14245 * thread-db.c (thread_db_find_new_threads): Add prototype.
14246 (thread_db_create_event): Check for the main thread before adding
14247 a new thread.
14248 (maybe_attach_thread): Only enable event reporting if TID == 0.
14249 (thread_db_get_tls_address): Check for new threads.
14250
14251 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14252
14253 * linux-low.c (linux_create_inferior): Try execv before execvp.
14254 * spu-low.c (spu_create_inferior): Likewise.
14255
14256 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14257
14258 * linux-low.c (linux_create_inferior): Change execv to execvp.
14259 * spu-low.c (spu_create_inferior): Likewies.
14260
14261 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14262
14263 * Makefile.in (clean): Clean new files instead of deleted ones.
14264 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14265 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14266 rules.
14267 * configure.srv: Specify XML files and new regformats for MIPS and
14268 MIPS64 GNU/Linux.
14269 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14270 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14271 an entry for the restart register.
14272 (mips_cannot_fetch_register, mips_cannot_store_register)
14273 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14274 register names to match the XML descriptions.
14275 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14276 restart register instead of $0.
14277
14278 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14279 Markus Deuling <deuling@de.ibm.com>
14280
14281 * remote-utils.c (decode_xfer_write): New function.
14282 * server.h (decode_xfer_write): Add prototype.
14283 * server.c (handle_query): Add PACKET_LEN argument. Support
14284 qXfer:spu:read and qXfer:spu:write packets.
14285 (main): Pass packet_len to handle_query.
14286 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14287 * target.h (target_ops): Add qxfer_spu.
14288
14289 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14290
14291 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14292 accessing non-seekable spufs files.
14293
14294 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14295
14296 * server.c (handle_query): Add reply for qC packet.
14297
14298 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14299 Leo Zayas <lerele@champenstudios@com>
14300
14301 * server.h (check_remote_input_interrupt_request): New function.
14302 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14303 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14304 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14305 (check_remote_input_interrupt_request): New function.
14306 * server.h (check_remote_input_interrupt_request): Declare.
14307 * win32-low.c (winapi_DebugBreakProcess,
14308 winapi_GenerateConsoleCtrlEvent): New typedefs.
14309 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14310 to 250 ms.
14311 (win32_wait): Check for remote interrupt request
14312 with check_remote_input_interrupt_request.
14313 (win32_request_interrupt): New function.
14314 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14315
14316 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14317
14318 * win32-low.c (debug_registers_changed,
14319 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14320 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14321 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14322 (thread_rec): Get context using the low target.
14323 (child_add_thread): Call thread_added on the low target,
14324 which does the same thing.
14325 (regptr): Delete.
14326 (do_initial_child_stuff): Remove debug registers references.
14327 Set context using the low target. Resume threads after
14328 setting the contexts.
14329 (child_continue): Remove dead variable. Remove debug
14330 registers references.
14331 (child_fetch_inferior_registers): Go through the low target.
14332 (do_child_store_inferior_registers): Remove.
14333 (child_store_inferior_registers): Go through the low target.
14334 (win32_resume): Remove debug registers references.
14335 Set context using the low target.
14336 (handle_exception): Change return type to void. Don't record
14337 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14338 first chance exception.
14339 (get_child_debug_event): Change return type to void. Remove
14340 goto loop. Always return after waiting for debug event.
14341 (win32_wait): Convert to switch statement. Handle spurious
14342 events.
14343
14344 * win32-i386-low.c (debug_registers_changed,
14345 debug_registers_used): New.
14346 (initial_stuff): Rename to ...
14347 (i386_initial_stuff): ... this. Clear debug registers
14348 state variables.
14349 (store_debug_registers): Delete.
14350 (i386_get_thread_context): New.
14351 (load_debug_registers): Delete.
14352 (i386_set_thread_context): New.
14353 (i386_thread_added): New.
14354 (single_step): Rename to ...
14355 (i386_single_step): ... this.
14356 (do_fetch_inferior_registers): Rename to ...
14357 (i386_fetch_inferior_register): ... this.
14358 (i386_store_inferior_register): New.
14359 (the_low_target): Adapt to new interface.
14360
14361 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14362 (arm_get_thread_context): New.
14363 (arm_set_thread_context): New.
14364 (regptr): New.
14365 (do_fetch_inferior_registers): Rename to ...
14366 (arm_fetch_inferior_register): ... this.
14367 (arm_store_inferior_register): New.
14368 (arm_wince_breakpoint): Reimplement as unsigned long.
14369 (arm_wince_breakpoint_len): Define.
14370 (the_low_target): Adapt to new interface.
14371
14372 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14373 load_debug_registers. Add get_thread_context, set_thread_context,
14374 thread_added and store_inferior_register. Rename
14375 fetch_inferior_registers to fetch_inferior_register.
14376 (regptr): Remove declaration.
14377
14378 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14379
14380 * linux-low.c (linux_detach): Change return type to int. Return 0.
14381 * spu-low.c (spu_detach): Likewise.
14382
14383 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14384
14385 * target.h (target_ops): Change return type of detach to int.
14386 Add join.
14387 (join_inferior): New.
14388 * server.c (main): Don't skip detach support on mingw32.
14389 If the inferior doesn't support detaching return error.
14390 Call join_inferior instead of using waitpid.
14391 * linux-low.c (linux_join): New.
14392 (linux_target_op): Add linux_join.
14393 * spu-low.c (spu_join): New.
14394 (spu_target_ops): Add spu_join.
14395 * win32-low.c (win32_detach): Adapt to new interface.
14396 Reopen current_process_handle before detaching. Issue a child
14397 resume before detaching.
14398 (win32_join): New.
14399 (win32_target_op): Add win32_join.
14400
14401 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14402
14403 * win32-low.c (win32-attach): Fix return value.
14404 * target.h (target_ops): Describe ATTACH return values.
14405
14406 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14407
14408 * win32-low.c (GETPROCADDRESS): Define.
14409 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14410 (winapi_DebugSetProcessKillOnExit): Likewise.
14411 (win32_create_inferior): Force usage of ansi CreateProcessA.
14412 (win32_attach): Use GETPROCADDRESS.
14413 (win32_detach): Likewise.
14414
14415 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14416
14417 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14418
14419 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14420
14421 * win32-low.c: Commit leftover changes from 2007-03-29.
14422
14423 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14424
14425 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14426 fields short instead of int. Add explicit padding.
14427 (i387_cache_to_fsave): Remove unnecessary casts.
14428 (i387_fsave_to_cache): Doc fix.
14429 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14430
14431 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14432
14433 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14434 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14435
14436 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14437
14438 * configure.srv (arm*-*-mingw32ce*): Move near the other
14439 arm targets.
14440
14441 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14442
14443 * configure.ac: Add errno checking.
14444 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14445 sys/file.h and malloc.h.
14446 (AC_CHECK_DECLS): Add perror.
14447 (srv_mingwce): Handle.
14448 * configure.srv (i[34567]86-*-cygwin*): Add
14449 win32-i386-low.o to srv_tgtobj.
14450 (i[34567]86-*-mingw*): Likewise.
14451 (arm*-*-mingw32ce*): Add case.
14452 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14453 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14454 [__MINGW32CE__] (strerror): New function.
14455 [__MINGW32CE__] (errno): Define to GetLastError.
14456 [__MINGW32CE__] (COUNTOF): New macro.
14457 (remote_open): Remove extra close call.
14458 * mem-break.c (delete_breakpoint_at): New function.
14459 * mem-break.h (delete_breakpoint_at): Declare.
14460 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14461 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14462 [USE_WIN32API] (read, write): Add char* casts.
14463 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14464 * server.h: Include wincecompat.h on Windows CE.
14465 [HAVE_ERRNO_H]: Check.
14466 (perror): Declare if not declared.
14467 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14468 (perror_with_name): Remove errno declaration.
14469 * wincecompat.h: New.
14470 * wincecompat.c: New.
14471 * win32-low.h: New.
14472 * win32-arm-low.c: New.
14473 * win32-i386-low.c: New.
14474 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14475 (OUTMSG2): Make it safe.
14476 (_T): New macro.
14477 (COUNTOF): New macro.
14478 (NUM_REGS): Get it from the low target.
14479 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14480 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14481 (thread_rec): Let low target handle debug registers.
14482 (child_add_thread): Likewise.
14483 (child_init_thread_list): Likewise.
14484 (continue_one_thread): Likewise.
14485 (regptr): New.
14486 (do_child_fetch_inferior_registers): Move to ...
14487 * win32-i386-low.c: ... here, and rename to ...
14488 (do_fetch_inferior_registers): ... this.
14489 * win32-low.c (child_fetch_inferior_registers):
14490 Go through the low target.
14491 (do_child_store_inferior_registers): Use regptr.
14492 (strwinerror): New function.
14493 (win32_create_inferior): Handle Windows CE.
14494 Use strwinerror instead of strerror on Windows error
14495 codes. Add program to the error output.
14496 Don't close the main thread handle on Windows CE.
14497 (win32_attach): Use coredll.dll on Windows CE.
14498 (win32_kill): Close current process and current
14499 thread handles.
14500 (win32_detach): Use coredll.dll on Windows CE.
14501 (win32_resume): Let low target handle debug registers, and
14502 step request.
14503 (handle_exception): Add/Remove initial breakpoint. Avoid
14504 non-existant WSTOPSIG on Windows CE.
14505 (win32_read_inferior_memory): Cast to remove warning.
14506 (win32_arch_string): Go through the low target.
14507 (initialize_low): Call set_breakpoint_data with the low
14508 target's breakpoint.
14509 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14510 FOP_REGNUM, mappings): Move to ...
14511 * win32-i386-low.c: ... here.
14512 * win32-low.c (win32_thread_info): Move to ...
14513 * win32-low.h: ... here.
14514 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14515 win32-arm-low.c and wincecompat.c.
14516 (all:): Add $EXEEXT.
14517 (install-only:): Likewise.
14518 (gdbserver:): Likewise.
14519 (gdbreplay:): Likewise.
14520 * config.in: Regenerate.
14521 * configure: Regenerate.
14522
14523 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14524
14525 * win32-low.c: Rename typedef thread_info to
14526 win32_thread_info throughout.
14527
14528 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14529
14530 * win32-i386-low.c: Rename to ...
14531 * win32-low.c: ... this.
14532 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14533 * Makefile.in: Likewise.
14534
14535 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14536
14537 * remote-utils.c (monitor_output): Constify msg parameter.
14538 * server.h (monitor_output): Likewise.
14539 * win32-i386-low.c (handle_output_debug_string): New.
14540 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14541 handle_output_debug_string.
14542 (get_child_debug_event): Likewise.
14543
14544 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14545
14546 * server.c (main): Correct strtoul check.
14547
14548 2007-03-27 Jon Ringle <jon@ringle.org>
14549
14550 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14551
14552 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14553
14554 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14555
14556 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14557
14558 * terminal.h: Check HAVE_SGTTY_H.
14559
14560 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14561
14562 * remote-utils.c (remote_open): Print out the assigned port number.
14563
14564 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14565
14566 * remote-utils.c (monitor_output): New function.
14567 * server.c (debug_threads): Define here.
14568 (monitor_show_help): New function.
14569 (handle_query): Handle qRcmd.
14570 (main): Do not handle 'd' packet.
14571 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14572 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14573 of debug_threads.
14574
14575 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14576
14577 * Makefile.in (EXEEXT): New.
14578 (clean): Use $(EXEEXT).
14579
14580 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14581
14582 * target.h (target_ops): Rename send_signal to request_interrupt,
14583 and remove enum target_signal parameter.
14584 * linux-low.c (linux_request_interrupt): Rename from
14585 linux_send_signal, and always send SIGINT.
14586 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14587 and always send SIGINT.
14588 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14589 of send_signal.
14590 (input_interrupt): Likewise.
14591
14592 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14593
14594 * server.c (get_features_xml): Check if target implemented
14595 arch_string.
14596 * win32-i386-low.c (win32_arch_string): New.
14597 (win32_target_ops): Add win32_arch_string as arch_string member.
14598
14599 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14600
14601 * spu-low.c (spu_arch_string): New.
14602 (spu_target_ops): Add spu_arch_string.
14603
14604 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14605
14606 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14607 * configure.ac: Do not check for terminal.h.
14608 * configure, config.in: Regenerated.
14609
14610 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14611
14612 * Makefile.in (OBS): Add $(XML_BUILTIN).
14613 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14614 (clean): Update.
14615 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14616 (arm-with-iwmmxt.c): New.
14617 * config.in, configure: Regenerate.
14618 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14619 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14620 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14621 (arm*-*-linux*): Add iWMMXt and regset support.
14622 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14623 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14624 (arm_store_wmmxregset, target_regsets): New.
14625 * server.c (get_features_xml): Take annex argument. Check builtin
14626 XML documents.
14627 (handle_query): Handle multiple annexes.
14628
14629 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14630
14631 * remote-utils.c [USE_WIN32API] (read, write): Define.
14632 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14633 write.
14634
14635 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14636
14637 * linux-i386-low.c (the_low_target): Set arch_string.
14638 * linux-x86-64-low.c (the_low_target): Likewise.
14639 * linux-low.c (linux_arch_string): New.
14640 (linux_target_ops): Add it.
14641 * linux-low.h (struct linux_target_ops): Add arch_string.
14642 * server.c (write_qxfer_response): Use const void * for DATA.
14643 (get_features_xml): New.
14644 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14645 * target.h (struct target_ops): Add arch_string method.
14646
14647 2007-01-03 Denis Pilat <denis.pilat@st.com>
14648 Daniel Jacobowitz <dan@codesourcery.com>
14649
14650 * linux-low.c (linux_kill): Handle being called with no threads.
14651 * win32-i386-low.c (win32_kill): Likewise.
14652 (get_child_debug_event): Clear current_process_handle.
14653
14654 2006-12-30 Denis PILAT <denis.pilat@st.com>
14655 Daniel Jacobowitz <dan@codesourcery.com>
14656
14657 * remote-utils.c (remote_open): Check the type of specified
14658 serial port devices before opening them.
14659 * server.c (main): Kill the inferior if an error occurs during
14660 the first remote_open.
14661
14662 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14663
14664 * README: Update supported targets.
14665
14666 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14667
14668 * Makefile.in (clean): Remove reg-mips64.c.
14669 (reg-mips64.c, reg-mips64.o): New rules.
14670 * configure.srv: Handle mips64. Include regset support for mips.
14671 * linux-mips-low.c (union mips_register): New.
14672 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14673 (mips_breakpoint, mips_breakpoint_at): Use int.
14674 (mips_collect_register, mips_supply_register)
14675 (mips_collect_register_32bit, mips_supply_register_32bit)
14676 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14677 (mips_store_fpregset, target_regsets): New.
14678 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14679
14680 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14681
14682 * configure.srv: Add target "spu*-*-*".
14683 * Makefile.in (clean): Remove reg-spu.c.
14684 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14685 * spu-low.c: New file.
14686
14687 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14688
14689 * configure.ac: Correct td_thr_tls_get_addr test.
14690 * configure: Regenerated.
14691
14692 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14693
14694 * linux-low.c (linux_wait_for_event): Reformat. Use the
14695 pass_signals array.
14696 * remote-utils.c (decode_address_to_semicolon): New.
14697 * server.c (pass_signals, handle_general_set): New.
14698 (handle_query): Mention QPassSignals for qSupported.
14699 (main): Call handle_general_set.
14700 * server.h (pass_signals, decode_address_to_semicolon): New.
14701
14702 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14703
14704 * server.c (handle_query): Correct error handling for read_auxv.
14705
14706 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14707
14708 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14709 and srv_linux_thread_db to yes.
14710 * linux-s390-low.c (s390_fill_gregset): New function.
14711 (target_regsets): Define data structure.
14712
14713 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14714
14715 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14716 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14717 * config.in, configure: Regenerated.
14718 * inferiors.c (gdb_id_to_thread): New function.
14719 (gdb_id_to_thread_id): Use it.
14720 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14721 * linux-low.h (struct process_info): Add th member.
14722 (thread_db_get_tls_address): New prototype.
14723 * remote-utils.c (decode_address): Make non-static.
14724 * server.c (handle_query): Handle qGetTLSAddr.
14725 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14726 * target.h (struct target_ops): Add get_tls_address.
14727 * thread-db.c (maybe_attach_thread): Save the thread handle.
14728 (thread_db_get_tls_address): New.
14729
14730 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14731
14732 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14733 (linux_resume_one_process): Take a siginfo_t *. Update all
14734 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14735 (struct pending_signals): Add a siginfo_t.
14736 (linux_wait_for_process): Always set last_status.
14737 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14738 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14739 * linux-low.h (struct process_info): Add last_status.
14740
14741 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14742
14743 * remote-utils.c (try_rle): New function.
14744 (putpkt_binary): Use it.
14745
14746 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14747
14748 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14749 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14750 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14751 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14752 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14753 point registers.
14754
14755 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14756
14757 * server.c (terminal_fd): New variable.
14758 (old_foreground_pgrp): Likewise.
14759 (restore_old_foreground_pgrp): New function.
14760 (start_inferior): Record the terminal file descriptor in terminal_fd
14761 and its original foreground group in old_foreground_pgrp. Register
14762 restore_old_foreground_pgrp with atexit().
14763
14764 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14765
14766 * server.c (handle_query): Correct qPart to qXfer.
14767
14768 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14769
14770 * configure.ac: Check for more headers which are missing on
14771 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14772 * configure.srv: Add Cygwin and mingw32.
14773 * remote-utils.c: Don't include headers unconditionally which
14774 are missing on mingw32. Include <winsock.h> for mingw32.
14775 (remote_open): Adjust for mingw32 support. Flush
14776 standard error after writing to it.
14777 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14778 (unblock_async_io, enable_async_io, disable_async_io)
14779 (readchar, getpkt): Update for Winsock support.
14780 (prepare_resume_reply): Expect a protocol signal number.
14781 * server.c: Disable <sys/wait.h> on mingw32.
14782 (start_inferior): Adjust for mingw32 support. Flush
14783 standard error after writing to it.
14784 (attach_inferior): Likewise. Use protocol signal
14785 numbers.
14786 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14787 and names.
14788 * win32-i386-low.c: New file.
14789 * Makefile.in (XM_CLIBS): Set.
14790 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14791 (win32-i386-low.o): New dependency rule.
14792 * linux-low.c (linux_wait): Use target signal numbers.
14793 * target.h (struct target_ops): Doc fix.
14794 * server.h (target_signal_to_name): New prototype.
14795 * gdbreplay.c: Don't include headers unconditionally which
14796 are missing on mingw32. Include <winsock.h> for mingw32.
14797 (remote_close, remote_open): Adjust for Winsock support.
14798 * configure, config.in: Regenerated.
14799
14800 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14801
14802 * server.c (decode_xfer_read, write_qxfer_response): New.
14803 (handle_query): Take a packet length argument. Handle
14804 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14805 the qSupported response.
14806 (main): Update call to handle_query.
14807
14808 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14809
14810 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14811 (putpkt_binary): Renamed from putpkt and adjusted for binary
14812 data.
14813 (putpkt): New wrapper for putpkt_binary.
14814 (readchar): Don't mask off the high bit.
14815 (decode_X_packet): New function.
14816 * server.c (main): Call putpkt_binary if a handler sets the packet
14817 length. Save the length of the incoming packet. Handle 'X'.
14818 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14819
14820 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14821
14822 * server.c (handle_query): Handle qSupported.
14823
14824 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14825
14826 * remote-utils.c (all_symbols_looked_up): New variable.
14827 (look_up_one_symbol): Check it.
14828 * server.h (look_up_one_symbol): New declaration.
14829 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14830
14831 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14832
14833 * Makefile.in (linux-arm-low.o): Update dependencies.
14834 * linux-arm-low.c: Include "gdb_proc_service.h".
14835 (PTRACE_GET_THREAD_AREA): Define.
14836 (ps_get_thread_area): New function.
14837
14838 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14839
14840 * configure.srv (m68k*-*-uclinux*): New target.
14841 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14842 (linux_resume_one_process): Remove extraneous cast.
14843 (linux_read_offsets): New.
14844 (linux_target_op): Add linux_read_offsets on mmuless systems.
14845 * server.c (handle_query): Add qOffsets logic.
14846 * target.h (struct target_ops): Add read_offsets.
14847
14848 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14849
14850 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14851 (PTRACE_GET_THREAD_AREA): Define.
14852 (ps_get_thread_area): New function.
14853 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14854 (linux-x86-64-low.o): Update.
14855
14856 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14857
14858 * configure.ac: Remove checks for prfpregset_t.
14859 * gdb_proc_service.h: New file.
14860 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14861 new "gdb_proc_service.h".
14862 * proc-service.c: Likewise.
14863 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14864 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14865 * Makefile.in (gdb_proc_service_h): Updated.
14866 * configure, config.in: Regenerated.
14867
14868 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14869
14870 * remote-utils.c (prepare_resume_reply): Move declaration
14871 of gdb_id_from_wait to the top of the block.
14872
14873 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14874
14875 * linux-low.c (regsets_store_inferior_registers): Read the regset
14876 from the target before filling it.
14877
14878 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14879
14880 * server.c (attach_inferior): Return SIGTRAP for a successful
14881 attach.
14882
14883 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14884
14885 * Makefile.in (OBS): Add version.o.
14886 (STAGESTUFF): Delete.
14887 (version.o): Add dependencies.
14888 (version.c): Replace rule.
14889 (clean): Remove version.c.
14890 * server.c (gdbserver_version): New.
14891 (gdbserver_usage): Use printf.
14892 (main): Handle --version and --help.
14893 * server.h (version, host_name): Add declarations.
14894
14895 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14896
14897 * linux-arm-low.c:
14898 * linux-arm-low.c:
14899 * inferiors.c:
14900 * i387-fp.h:
14901 * i387-fp.c:
14902 * gdbreplay.c:
14903 * regcache.c:
14904 * proc-service.c:
14905 * mem-break.h:
14906 * mem-break.c:
14907 * linux-x86-64-low.c:
14908 * linux-sh-low.c:
14909 * linux-s390-low.c:
14910 * linux-ppc64-low.c:
14911 * linux-ppc-low.c:
14912 * linux-mips-low.c:
14913 * linux-m68k-low.c:
14914 * linux-m32r-low.c:
14915 * linux-low.h:
14916 * linux-low.c:
14917 * linux-ia64-low.c:
14918 * linux-i386-low.c:
14919 * linux-crisv32-low.c:
14920 * thread-db.c:
14921 * terminal.h:
14922 * target.h:
14923 * target.c:
14924 * server.h:
14925 * server.c:
14926 * remote-utils.c:
14927 * regcache.h:
14928 * utils.c:
14929 * Makefile.in:
14930 * configure.ac:
14931 * gdbserver.1: Add (C) after Copyright. Update the FSF
14932 address.
14933
14934 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14935
14936 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14937 (arm_breakpoint_at): Recognize both breakpoints.
14938 (the_low_target): Use the correct breakpoint instruction.
14939
14940 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14941
14942 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14943 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14944 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14945 (the_low_target): Update.
14946
14947 2005-10-25 Andreas Schwab <schwab@suse.de>
14948
14949 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14950
14951 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14952 (ia64_num_regs): Reduce to 462.
14953
14954 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14955
14956 * acinclude.m4: Correct quoting.
14957 * aclocal.m4: Regenerated.
14958
14959 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14960 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14961 (thread_db_init): Call thread_db_err_str.
14962 * configure.ac: Check for TD_VERSION.
14963 * config.in, configure: Regenerated.
14964
14965 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14966
14967 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14968
14969 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14970
14971 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14972 is not available. Define HAVE_PTRACE_GETREGS if it is.
14973 * config.in, configure: Regenerated.
14974 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14975 * linux-i386-low.c, linux-m68k-low.c: Update to use
14976 HAVE_PTRACE_GETREGS.
14977 * linux-low.c (regsets_fetch_inferior_registers)
14978 (regsets_store_inferior_registers): Only return 0 if we processed
14979 GENERAL_REGS.
14980 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14981 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14982
14983 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14984
14985 * inferiors.c (struct thread_info): Add gdb_id.
14986 (add_thread): Add gdb_id argument.
14987 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14988 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14989 calls to add_thread.
14990 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14991 * server.c (handle_query): Use thread_to_gdb_id.
14992 (handle_v_cont, main): Use gdb_id_to_thread_id.
14993 * server.h (add_thread): Update prototype.
14994 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14995 prototypes.
14996
14997 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14998
14999 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15000 left-padded registers.
15001 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15002 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15003
15004 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15005
15006 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15007 * configure: Regenerate.
15008 * config.in: Regenerate.
15009 * server.h (NEED_DECLARATION_STRERROR):
15010 Replace with !HAVE_DECL_STRERROR.
15011
15012 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15013
15014 * linux-low.c (linux_wait, linux_send_signal): Don't test
15015 an unsigned long variable for > 0 if it could be MAX_ULONG.
15016 * server.c (myresume): Likewise.
15017 * target.c (set_desired_inferior): Likewise.
15018
15019 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15020
15021 * configure.ac: Simplify and improve check for socklen_t.
15022 * configure, config.in: Regenerate.
15023
15024 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * acconfig.h: Remove.
15027 * configure.ac: Add a test for socklen_t. Use three-argument
15028 AC_DEFINE throughout.
15029 * config.in: Regenerated using autoheader 2.59.
15030 * configure: Regenerated.
15031
15032 * gdbreplay.c (socklen_t): Provide a default.
15033 (remote_open): Use socklen_t.
15034 * remote-utils.c (socklen_t): Provide a default.
15035 (remote_open): Use socklen_t.
15036 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15037 unsigned char.
15038
15039 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15040 char for buffers.
15041 * linux-low.c (linux_read_memory, linux_write_memory)
15042 (linux_read_auxv): Likewise.
15043 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15044 (check_mem_write): Likewise.
15045 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15046 Likewise.
15047 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15048 (registers_from_string, register_data): Likewise.
15049 * server.c (handle_query, main): Likewise.
15050 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15051 (decode_M_packet): Likewise.
15052 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15053 * target.h (struct target_ops): Update read_memory, write_memory,
15054 and read_auxv.
15055 (read_inferior_memory, write_inferior_memory): Update.
15056 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15057 to unsigned char *.
15058 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15059 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15060 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15061 linux-s390-low.c, linux-sh-low.c: Update for changes in
15062 read_inferior_memory and the_low_target->breakpoint.
15063
15064 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15065
15066 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15067 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15068 * configure.srv: Add powerpc64-*-linux*.
15069 * linux-ppc64-low.c: New file.
15070
15071 2005-05-23 Orjan Friberg <orjanf@axis.com>
15072
15073 * linux-cris-low.c: New file with support for CRIS.
15074 * linux-crisv32-low.c: Ditto for CRISv32.
15075 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15076 (clean): Add reg-cris.c and reg-crisv32.c.
15077 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15078 reg-crisv32.o, and reg-crisv32.c to make rules.
15079 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15080 recognized targets.
15081
15082 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15083
15084 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15085 of sizeof (PTRACE_XFER_TYPE).
15086 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15087
15088 2005-05-12 Orjan Friberg <orjanf@axis.com>
15089
15090 * target.h (struct target_ops): Add insert_watchpoint,
15091 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15092 pointers for hardware watchpoint support.
15093 * linux-low.h (struct linux_target_ops): Ditto.
15094 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15095 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15096 to linux_target_ops.
15097 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15098 reply packet.
15099 * server.c (main): Recognize 'Z' and 'z' packets.
15100
15101 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15102
15103 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15104 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15105 (the_low_target): Add new members.
15106
15107 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15108
15109 * proc-service.c (ps_lgetregs): Search all_processes instead of
15110 all_threads.
15111
15112 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15113
15114 * server.c (start_inferior): Change return type to int.
15115 (attach_inferior): Change sigptr to int *.
15116 (handle_v_cont, handle_v_requests): Change signal to int *.
15117 (main): Change signal to int.
15118
15119 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15120
15121 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15122 * configure.srv: Add m32r*-*-linux*.
15123 * linux-m32r-low.c: New file.
15124
15125 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15126
15127 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15128
15129 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15130
15131 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15132 Take unsigned long arguments for PIDs.
15133 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15134 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15135 (wait_for_sigstop, linux_resume_one_process)
15136 (regsets_fetch_inferior_registers, linux_send_signal)
15137 (linux_read_auxv): Likewise. Update the types of variables holding
15138 PIDs. Update format string specifiers.
15139 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15140 * remote-utils.c (prepare_resume_reply): Likewise.
15141 * server.c (cont_thread, general_thread, step_thread)
15142 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15143 unsigned long.
15144 (handle_query): Update format specifiers.
15145 (handle_v_cont, main): Use strtoul for thread IDs.
15146 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15147 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15148 (general_thread, step_thread, thread_from_wait)
15149 (old_thread_from_wait): Update.
15150 * target.h (struct thread_resume): Use unsigned long for THREAD.
15151 (struct target_ops): Use unsigned long for arguments to attach and
15152 thread_alive.
15153
15154 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15155
15156 * acinclude.m4: Include bfd/bfd.m4 directly.
15157 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15158 <agriffis@toolchain.org>.
15159 * aclocal.m4, configure: Regenerated.
15160
15161 2005-01-07 Andrew Cagney <cagney@gnu.org>
15162
15163 * configure.ac: Rename configure.in, require autoconf 2.59.
15164 * configure: Re-generate.
15165
15166 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15167
15168 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15169 LIBS when finished.
15170 * aclocal.m4: Regenerated.
15171 * configure: Regenerated.
15172
15173 2004-11-21 Andreas Schwab <schwab@suse.de>
15174
15175 * linux-m68k-low.c (m68k_num_gregs): Define.
15176 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15177 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15178 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15179 (m68k_breakpoint_at): New. Add to the_low_target.
15180
15181 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15182 srv_linux_thread_db to yes.
15183
15184 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15185
15186 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15187 (ARCH_SET_FS): Likewise.
15188 (ARCH_GET_FS): Likewise.
15189 (ARCH_GET_GS): Likewise.
15190
15191 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15192
15193 * linux-i386-low.c (ps_get_thread_area): New.
15194 * linux-x86-64-low.c (ps_get_thread_area): New.
15195 * linux-low.c: Include <sys/syscall.h>.
15196 (linux_kill_one_process): Don't kill the first thread here.
15197 (linux_kill): Kill the first thread here.
15198 (kill_lwp): New function.
15199 (send_sigstop, linux_send_signal): Use it.
15200 * proc-service.c: Clean up #ifdefs.
15201 (fpregset_info): Delete.
15202 (ps_lgetregs): Update and enable implementation.
15203 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15204 implementations.
15205 * remote-utils.c (struct sym_cache, symbol_cache): New.
15206 (input_interrupt): Print a clearer message.
15207 (async_io_enabled): New variable.
15208 (enable_async_io, disable_async_io): Use it. Update comments.
15209 (look_up_one_symbol): Use the symbol cache.
15210 * thread-db.c (thread_db_look_up_symbols): New function.
15211 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15212
15213 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15214
15215 * configure.in: Test for -rdynamic.
15216 * configure: Regenerated.
15217 * Makefile (INTERNAL_LDFLAGS): New.
15218 (gdbserver, gdbreplay): Use it.
15219
15220 2004-09-02 Andrew Cagney <cagney@gnu.org>
15221
15222 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15223
15224 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15225
15226 * linux-low.c (linux_wait): Clear all_processes list also.
15227
15228 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15229
15230 * linux-low.c: Include <errno.h>. Remove extern declaration of
15231 errno.
15232
15233 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15234
15235 * gdbreplay.c, server.h, utils.c: Update copyright years.
15236
15237 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15238
15239 * server.c (main): Print child status or termination signal from
15240 variable 'signal', not 'sig'.
15241
15242 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15243
15244 * linux-low.c (linux_read_memory): Change return type to
15245 int. Check for and return error from ptrace().
15246 * target.c (read_inferior_memory): Change return type to int. Pass
15247 back return status from the_target->read_memory().
15248 * target.h (struct target_ops): Adapt *read_memory() prototype.
15249 Update comment.
15250 (read_inferior_memory): Adapt prototype.
15251 * server.c (main): Return an error packet if
15252 read_inferior_memory() returns an error.
15253
15254 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15255
15256 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15257 Unify with other clean targets.
15258
15259 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15260
15261 * server.c (handle_v_cont): Call set_desired_inferior.
15262
15263 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15264
15265 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15266
15267 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15268
15269 * linux-low.c (linux_wait): Unblock async I/O.
15270 (linux_resume): Block and enable async I/O.
15271 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15272 * server.h (block_async_io, unblock_async_io): Add prototypes.
15273
15274 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15275
15276 * remote-utils.c (remote_open): Print a status notice after
15277 opening a TCP port.
15278 * server.c (attach_inferior): Print a status notice after
15279 attaching.
15280
15281 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15282
15283 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15284
15285 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15286
15287 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15288 error packet.
15289 * server.c, target.h: Update copyright years.
15290
15291 2004-02-25 Roland McGrath <roland@redhat.com>
15292
15293 * target.h (struct target_ops): New member `read_auxv'.
15294 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15295 * linux-low.c (linux_read_auxv): New function.
15296 (linux_target_ops): Initialize `read_auxv' member to that.
15297
15298 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15299
15300 Committed by Jim Blandy <jimb@redhat.com>.
15301
15302 * linux-s390-low.c (s390_num_regs): Update.
15303 (s390_regmap): Remove control registers. Use __s390x__ predefine
15304 instead of GPR_SIZE to distiguish s390 and s390x targets.
15305
15306 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15307
15308 * linux-low.c: Update copyright year.
15309 (check_removed_breakpoint): Clear pending_is_breakpoint.
15310 (linux_set_resume_request, linux_queue_one_thread)
15311 (resume_status_pending_p): New functions.
15312 (linux_continue_one_thread): Use process->resume.
15313 (linux_resume): Only resume threads if there are no pending events.
15314 * linux-low.h (struct process_info): Add resume request
15315 pointer.
15316
15317 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15318
15319 * regcache.c (new_register_cache): Clear the allocated register
15320 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15321
15322 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15323
15324 * linux-low.c (linux_resume): Take a struct thread_resume *
15325 argument.
15326 (linux_wait): Update call.
15327 (resume_ptr): New static variable.
15328 (linux_continue_one_thread): Renamed from
15329 linux_continue_one_process. Use resume_ptr.
15330 (linux_resume): Use linux_continue_one_thread.
15331 * server.c (handle_v_cont, handle_v_requests): New functions.
15332 (myresume): New function.
15333 (main): Handle 'v' case.
15334 * target.h (struct thread_resume): New type.
15335 (struct target_ops): Change argument of "resume" to struct
15336 thread_resume *.
15337 (myresume): Delete macro.
15338
15339 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15340
15341 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15342 (uninstall): Support DESTDIR.
15343
15344 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15345
15346 * configure.srv: Add xscale*linux copy of arm*linux entry.
15347
15348 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15349
15350 * linux-arm-low.c (arm_reinsert_addr): New function.
15351 (the_low_target): Add arm_reinsert_addr.
15352
15353 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15354
15355 * mem-break.c: Remove whitespace at end of file.
15356
15357 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15358
15359 * configure.in: Check whether we need to prototype strerror.
15360 * server.h: Optionally prototype strerror.
15361 * gdbreplay.c (perror_with_name): Use strerror.
15362 * linux-low.c (linux_attach_lwp): Use strerror.
15363 * utils.c (perror_with_name): Use strerror.
15364 * config.in, configure: Regenerated.
15365
15366 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15367
15368 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15369 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15370
15371 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15372
15373 * Makefile.in (SFILES): Update.
15374 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15375 low-sun3.c: Remove files.
15376
15377 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15378
15379 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15380 (linux_detach_one_process, linux_detach): New functions.
15381 (linux_target_ops): Add linux_detach.
15382 * server.c (main): Handle 'D' packet.
15383 * target.h (struct target_ops): Add "detach" member.
15384 (detach_inferior): Define.
15385
15386 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15387
15388 From Kelley Cook <kelleycook@wideopenwest.com>:
15389 * configure.srv: Accept i[34567]86 variants.
15390
15391 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15392
15393 * linux-low.c (linux_wait_for_event): Correct comment typos.
15394 (linux_resume_one_process): Call check_removed_breakpoint.
15395 (linux_send_signal): New function.
15396 (linux_target_ops): Add linux_send_signal.
15397 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15398 of kill.
15399 * target.h (struct target_ops): Add send_signal.
15400
15401 2003-05-29 Jim Blandy <jimb@redhat.com>
15402
15403 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15404 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15405 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15406 away part of the register's value.
15407
15408 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15409
15410 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15411 (linux_wait_for_event, linux_init_signals): Likewise.
15412
15413 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15414
15415 * configure.in: Check for stdlib.h.
15416 * configure: Regenerated.
15417 * config.in: Regenerated.
15418
15419 2003-01-04 Andreas Schwab <schwab@suse.de>
15420
15421 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15422
15423 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15424
15425 * Makefile.in: Remove obsolete code.
15426
15427 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15428
15429 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15430 defined(PT_FPR0_HI).
15431
15432 2002-11-17 Stuart Hughes <seh@zee2.com>
15433
15434 * linux-arm-low.c (arm_num_regs): Increase.
15435 (arm_regmap): Include status register.
15436
15437 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15438
15439 * linux-low.c (register_addr): Remove incorrect -1 check.
15440
15441 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15442
15443 * linux-low.c (linux_create_inferior): Call setpgid. Return
15444 the new PID.
15445 (unstopped_p, linux_signal_pid): Remove.
15446 (linux_target_ops): Remove linux_signal_pid.
15447 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15448 global instead of target method.
15449 * target.h (struct target_ops): Remove signal_pid. Update comment
15450 for create_inferior.
15451 * server.c (signal_pid): New variable.
15452 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15453 gdbserver. Set the child to be the foreground process group.
15454 (attach_inferior): Set signal_pid.
15455
15456 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15457
15458 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15459
15460 2002-08-20 Jim Blandy <jimb@redhat.com>
15461
15462 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15463 default for this.
15464
15465 2002-08-01 Andrew Cagney <cagney@redhat.com>
15466
15467 * Makefile.in: Make chill references obsolete.
15468
15469 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15470
15471 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15472 * configure: Regenerate.
15473 * config.in: Regenerate.
15474
15475 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15476
15477 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15478 (perror_with_name, remote_close, remote_open, expect, play): Static.
15479
15480 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15481
15482 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15483 byte offsets instead of an array of indexes.
15484 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15485
15486 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15487
15488 * regcache.c: Add comment.
15489
15490 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15491
15492 * thread-db.c: New file.
15493 * proc-service.c: New file.
15494 * acinclude.m4: New file.
15495 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15496 proc-service.o, and thread-db.o.
15497 (linux-low.o): Add USE_THREAD_DB.
15498 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15499 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15500 * aclocal.m4: Regenerated.
15501 * config.in: Regenerated.
15502 * configure: Regenerated.
15503 * configure.in: Check for proc_service.h, sys/procfs.h,
15504 thread_db.h, and linux/elf.h headrs.
15505 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15506 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15507 Check for -lthread_db and thread support.
15508 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15509 PowerPC, and SuperH.
15510 * i387-fp.c: Constify arguments.
15511 * i387-fp.h: Likewise.
15512 * inferiors.c: (struct thread_info): Renamed from
15513 `struct inferior_info'. Remove PID member. Use generic inferior
15514 list header. All uses updated.
15515 (inferiors, signal_pid): Removed.
15516 (all_threads): New variable.
15517 (get_thread): Define.
15518 (add_inferior_to_list): New function.
15519 (for_each_inferior): New function.
15520 (change_inferior_id): New function.
15521 (add_inferior): Removed.
15522 (remove_inferior): New function.
15523 (add_thread): New function.
15524 (free_one_thread): New function.
15525 (remove_thread): New function.
15526 (clear_inferiors): Use for_each_inferior and free_one_thread.
15527 (find_inferior): New function.
15528 (find_inferior_id): New function.
15529 (inferior_target_data): Update argument type.
15530 (set_inferior_target_data): Likewise.
15531 (inferior_regcache_data): Likewise.
15532 (set_inferior_regcache_data): Likewise.
15533 * linux-low.c (linux_bp_reinsert): Remove.
15534 (all_processes, stopping_threads, using_thrads)
15535 (struct pending_signals, debug_threads, pid_of): New.
15536 (inferior_pid): Replace with macro.
15537 (struct inferior_linux_data): Remove.
15538 (get_stop_pc, add_process): New functions.
15539 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15540 Use add_process and add_thread.
15541 (linux_attach_lwp): New function, based on old linux_attach. Use
15542 add_process and add_thread. Set stop_expected for new threads.
15543 (linux_attach): New function.
15544 (linux_kill_one_process): New function.
15545 (linux_kill): Kill all LWPs.
15546 (linux_thread_alive): Use find_inferior_id.
15547 (check_removed_breakpoints, status_pending_p): New functions.
15548 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15549 Update. Use WNOHANG. Wait for cloned processes also. Update process
15550 struct for the found process.
15551 (linux_wait_for_event): New function.
15552 (linux_wait): Use it. Support LWPs.
15553 (send_sigstop, wait_for_sigstop, stop_all_processes)
15554 (linux_resume_one_process, linux_continue_one_process): New functions.
15555 (linux_resume): Support LWPs.
15556 (REGISTER_RAW_SIZE): Remove.
15557 (fetch_register): Use register_size instead. Call supply_register.
15558 (usr_store_inferior_registers): Likewise. Call collect_register.
15559 Fix recursive case.
15560 (regsets_fetch_inferior_registers): Improve error message.
15561 (regsets_store_inferior_registers): Add debugging.
15562 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15563 (unstopped_p, linux_signal_pid): New functions.
15564 (linux_target_ops): Add linux_signal_pid.
15565 (linux_init_signals): New function.
15566 (initialize_low): Call it. Initialize using_threads.
15567 * regcache.c (inferior_regcache_data): Add valid
15568 flag.
15569 (get_regcache): Fetch registers lazily. Add fetch argument
15570 and update all callers.
15571 (regcache_invalidate_one, regcache_invalidate): New
15572 functions.
15573 (new_register_cache): Renamed from create_register_cache.
15574 Return the new regcache.
15575 (free_register_cache): Change argument to a void *.
15576 (registers_to_string, registers_from_string): Call get_regcache
15577 with fetch flag set.
15578 (register_data): Make static. Pass fetch flag to get_regcache.
15579 (supply_register): Call get_regcache with fetch flag clear.
15580 (collect_register): Call get_regcache with fetch flag set.
15581 (collect_register_as_string): New function.
15582 * regcache.h: Update.
15583 * remote-utils.c (putpkt): Flush after debug output and use
15584 stderr.
15585 Handle input interrupts while waiting for an ACK.
15586 (input_interrupt): Use signal_pid method.
15587 (getpkt): Flush after debug output and use stderr.
15588 (outreg): Use collect_register_as_string.
15589 (new_thread_notify, dead_thread_notify): New functions.
15590 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15591 and general_thread.
15592 (look_up_one_symbol): Flush after debug output.
15593 * server.c (step_thread, server_waiting): New variables.
15594 (start_inferior): Don't use signal_pid. Update call to mywait.
15595 (attach_inferior): Update call to mywait.
15596 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15597 (main): Don't fetch/store registers explicitly. Use
15598 set_desired_inferior. Support proposed ``Hs'' packet. Update
15599 calls to mywait.
15600 * server.h: Update.
15601 (struct inferior_list, struct_inferior_list_entry): New.
15602 * target.c (set_desired_inferior): New.
15603 (write_inferior_memory): Constify.
15604 (mywait): New function.
15605 * target.h: Update.
15606 (struct target_ops): New signal_pid method.
15607 (mywait): Removed macro, added prototype.
15608
15609 * linux-low.h (regset_func): Removed.
15610 (regset_fill_func, regset_store_func): New.
15611 (enum regset_type): New.
15612 (struct regset_info): Add type field. Use new operation types.
15613 (struct linux_target_ops): stop_pc renamed to get_pc.
15614 Add decr_pc_after_break and breakpoint_at.
15615 (get_process, get_thread_proess, get_process_thread)
15616 (strut process_info, all_processes, linux_attach_lwp)
15617 (thread_db_init): New.
15618
15619 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15620 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15621 (the_low_target): Add new members.
15622 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15623 (i386_store_fpxregset): Constify.
15624 (target_regsets): Add new kind identifier.
15625 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15626 (i386_set_pc): Add debugging.
15627 (i386_breakpoint_at): New function.
15628 (the_low_target): Add new members.
15629 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15630 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15631 (mips_breakpoint_at): New.
15632 (the_low_target): Add new members.
15633 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15634 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15635 (the_low_target): Add new members.
15636 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15637 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15638 (the_low_target): Add new members.
15639 * linux-x86-64-low.c (target_regsets): Add new kind
15640 identifier.
15641
15642 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15643
15644 From Martin Pool <mbp@samba.org>:
15645 * server.c (gdbserver_usage): New function.
15646 (main): Call it.
15647
15648 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15649
15650 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15651 stop_at -> stop_pc.
15652
15653 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15654
15655 * Makefile.in: Remove obsolete code.
15656
15657 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15658
15659 * linux-low.c (regsets_fetch_inferior_registers),
15660 (regsets_store_inferior_registers): Removed cast to int from
15661 ptrace() calls.
15662 * regcache.h: Added declaration of struct inferior_info.
15663
15664 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15665
15666 * inferiors.c (struct inferior_info): Add regcache_data.
15667 (add_inferior): Call create_register_cache.
15668 (clear_inferiors): Call free_register_cache.
15669 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15670 * regcache.c (struct inferior_regcache_data): New.
15671 (registers): Remove.
15672 (get_regcache): New function.
15673 (create_register_cache, free_register_cache): New functions.
15674 (set_register_cache): Don't initialize the register cache here.
15675 (registers_to_string, registers_from_string, register_data): Call
15676 get_regcache.
15677 * regcache.h: Add prototypes.
15678 * server.h: Likewise.
15679
15680 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15681
15682 * mem-break.c: New file.
15683 * mem-break.h: New file.
15684 * Makefile.in: Add mem-break.o rule; update server.h
15685 dependencies.
15686 * inferiors.c (struct inferior_info): Add target_data
15687 member.
15688 (clear_inferiors): Free target_data member if set.
15689 (inferior_target_data, set_inferior_target_data): New functions.
15690 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15691 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15692 * linux-low.c (linux_bp_reinsert): New variable.
15693 (struct inferior_linux_data): New.
15694 (linux_create_inferior): Use set_inferior_target_data.
15695 (linux_attach): Likewise. Call add_inferior.
15696 (linux_wait_for_one_inferior): New function.
15697 (linux_wait): Call it.
15698 (linux_write_memory): Add const.
15699 (initialize_low): Call set_breakpoint_data.
15700 * linux-low.h (struct linux_target_ops): Add breakpoint
15701 handling members.
15702 * server.c (attach_inferior): Remove extra add_inferior
15703 call.
15704 * server.h: Include mem-break.h. Update inferior.c
15705 prototypes.
15706 * target.c (read_inferior_memory)
15707 (write_inferior_memory): New functions.
15708 * target.h (read_inferior_memory)
15709 (write_inferior_memory): Change macros to prototypes.
15710 (struct target_ops): Update comments. Add const to write_memory
15711 definition.
15712
15713 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15714
15715 * linux-low.c (usr_store_inferior_registers): Support
15716 registers which are allowed to fail to store.
15717 * linux-low.h (linux_target_ops): Likewise.
15718 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15719 (ppc_cannot_store_register): FPSCR may not be storable.
15720
15721 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15722
15723 * server.h: Include <string.h> if HAVE_STRING_H.
15724 * ChangeLog: Correct paths in last ChangeLog entry.
15725
15726 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15727
15728 * linux-low.h: Remove obsolete prototypes.
15729 (struct linux_target_ops): New.
15730 (extern the_low_target): New.
15731 * linux-low.c (num_regs, regmap): Remove declarations.
15732 (register_addr): Use the_low_target explicitly.
15733 (fetch_register): Likewise.
15734 (usr_fetch_inferior_registers): Likewise.
15735 (usr_store_inferior_registers): Likewise.
15736 * linux-arm-low.c (num_regs): Remove.
15737 (arm_num_regs): Define.
15738 (arm_regmap): Renamed from regmap, made static.
15739 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15740 made static.
15741 (arm_cannot_store_register): Renamed from cannot_store_register,
15742 made static.
15743 (the_low_target): New.
15744 * linux-i386-low.c (num_regs): Remove.
15745 (i386_num_regs): Define.
15746 (i386_regmap): Renamed from regmap, made static.
15747 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15748 made static.
15749 (i386_cannot_store_register): Renamed from cannot_store_register,
15750 made static.
15751 (the_low_target): New.
15752 * linux-ia64-low.c (num_regs): Remove.
15753 (ia64_num_regs): Define.
15754 (ia64_regmap): Renamed from regmap, made static.
15755 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15756 made static.
15757 (ia64_cannot_store_register): Renamed from cannot_store_register,
15758 made static.
15759 (the_low_target): New.
15760 * linux-m68k-low.c (num_regs): Remove.
15761 (m68k_num_regs): Define.
15762 (m68k_regmap): Renamed from regmap, made static.
15763 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15764 made static.
15765 (m68k_cannot_store_register): Renamed from cannot_store_register,
15766 made static.
15767 (the_low_target): New.
15768 * linux-mips-low.c (num_regs): Remove.
15769 (mips_num_regs): Define.
15770 (mips_regmap): Renamed from regmap, made static.
15771 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15772 made static.
15773 (mips_cannot_store_register): Renamed from cannot_store_register,
15774 made static.
15775 (the_low_target): New.
15776 * linux-ppc-low.c (num_regs): Remove.
15777 (ppc_num_regs): Define.
15778 (ppc_regmap): Renamed from regmap, made static.
15779 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15780 made static.
15781 (ppc_cannot_store_register): Renamed from cannot_store_register,
15782 made static.
15783 (the_low_target): New.
15784 * linux-s390-low.c (num_regs): Remove.
15785 (s390_num_regs): Define.
15786 (s390_regmap): Renamed from regmap, made static.
15787 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15788 made static.
15789 (s390_cannot_store_register): Renamed from cannot_store_register,
15790 made static.
15791 (the_low_target): New.
15792 * linux-sh-low.c (num_regs): Remove.
15793 (sh_num_regs): Define.
15794 (sh_regmap): Renamed from regmap, made static.
15795 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15796 made static.
15797 (sh_cannot_store_register): Renamed from cannot_store_register,
15798 made static.
15799 (the_low_target): New.
15800 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15801 (the_low_target): New.
15802
15803 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15804
15805 * Makefile.in: Add stamp-h target.
15806 * configure.in: Create stamp-h.
15807 * configure: Regenerated.
15808
15809 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15810
15811 * inferiors.c: New file.
15812 * target.c: New file.
15813 * target.h: New file.
15814 * Makefile.in: Add target.o and inferiors.o. Update
15815 dependencies.
15816 * linux-low.c (inferior_pid): New static variable,
15817 moved from server.c.
15818 (linux_create_inferior): Renamed from create_inferior.
15819 Call add_inferior. Return 0 on success instead of a PID.
15820 (linux_attach): Renamed from myattach.
15821 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15822 (linux_thread_alive): Renamed from mythread_alive.
15823 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15824 child dies.
15825 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15826 (regsets_store_inferior_registers): Correct error message.
15827 Add missing ``return 0''.
15828 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15829 (linux_store_registers): Renamed from store_inferior_registers.
15830 (linux_read_memory): Renamed from read_inferior_memory.
15831 (linux_write_memory): Renamed from write_inferior_memory.
15832 (linux_target_ops): New structure.
15833 (initialize_low): Call set_target_ops ().
15834 * remote-utils.c (unhexify): New function.
15835 (hexify): New function.
15836 (input_interrupt): Send signals to ``signal_pid''.
15837 * server.c (inferior_pid): Remove.
15838 (start_inferior): Update create_inferior call.
15839 (attach_inferior): Call add_inferior.
15840 (handle_query): New function.
15841 (main): Call handle_query for `q' packets.
15842 * server.h: Include "target.h". Remove obsolete prototypes.
15843 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15844
15845 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15846
15847 * Makefile.in: Add WARN_CFLAGS. Update configury
15848 dependencies.
15849 * configure.in: Check for <string.h>
15850 * configure: Regenerate.
15851 * config.in: Regenerate.
15852 * gdbreplay.c: Include needed system headers.
15853 (remote_open): Remove strchr prototype.
15854 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15855 * regcache.c (supply_register): Change buf argument to const void *.
15856 (supply_register_by_name): Likewise.
15857 (collect_register): Change buf argument to void *.
15858 (collect_register_by_name): Likewise.
15859 * regcache.h: Add missing prototypes.
15860 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15861 * server.c (handle_query): New function.
15862 (attached): New static variable, moved out of main.
15863 (main): Quiet longjmp clobber warnings.
15864 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15865 * utils.c (error): Remove NORETURN.
15866 (fatal): Likewise.
This page took 0.366154 seconds and 5 git commands to generate.