0652f074b98467d8f6202380bed7baf0e19cfd31
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2017-11-13 Andreas Schwab <schwab@suse.de>
2
3 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
4 function.
5 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6
7 2017-11-06 Pedro Alves <palves@redhat.com>
8
9 * config.in, configure: Regenerate.
10
11 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
12
13 * target.c (struct thread_search): Remove.
14 (thread_search_callback): Remove.
15 (prepare_to_access_memory): Use for_each_thread instead of
16 find_inferior. Inline code from thread_search_callback.
17
18 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
19
20 * server.c (struct visit_actioned_threads_data): Remove.
21 (visit_actioned_threads): Change prototype to take arguments
22 directly.
23 (resume): Use find_thread instead of find_inferior.
24
25 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
26
27 * server.c (queue_stop_reply_callback): Change prototype, return
28 void.
29 (find_status_pending_thread_callback): Remove.
30 (handle_status): Replace find_inferior with find_thread and
31 for_each_thread.
32
33 2017-10-25 Alan Hayward <alan.hayward@arm.com>
34
35 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
36 with REGNO.
37 (aarch64_store_gregset): Likewise.
38 (aarch64_fill_fpregset): Likewise.
39 (aarch64_store_fpregset): Likewise.
40
41 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
42
43 * gdbthread.h (find_thread, for_each_thread): New functions.
44 * inferiors.c (thread_of_pid): Remove.
45 (find_any_thread_of_pid): Use find_thread.
46 * linux-low.c (num_lwps): Use for_each_thread.
47
48 2017-10-17 Yao Qi <yao.qi@linaro.org>
49
50 * Makefile.in: Remove one rule.
51 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
52
53 2017-10-17 Yao Qi <yao.qi@linaro.org>
54
55 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
56 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
57
58 2017-10-17 Yao Qi <yao.qi@linaro.org>
59
60 * configure.srv: Rename arm.o with arch/arm.o.
61
62 2017-10-17 Yao Qi <yao.qi@linaro.org>
63
64 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
65 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
66 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
67 (arch-i386.o, arch-amd64.o): Remove rules.
68 (arch/%.o): New rule.
69 Update POSTCOMPILE and COMPILE.pre.
70 * configure.ac: Invoke AC_CONFIG_COMMANDS.
71 * configure: Re-generated.
72 * configure.srv: Replace arch-i386.o with arch/i386.o.
73 Replace arch-amd64.o with arch/amd64.o.
74
75 2017-10-16 Yao Qi <yao.qi@linaro.org>
76
77 * configure: Regenerated.
78
79 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
80
81 * inferiors.h: (struct inferior_list): Remove.
82 (struct inferior_list_entry); Remove.
83 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
84 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
85 get_first_inferior): Remove.
86 (for_each_inferior, for_each_inferior_with_data, find_inferior,
87 find_inferior_id, find_inferior_in_random): Change signature.
88 * inferiors.c (all_threads): Change type to
89 std::list<thread_info *>.
90 (get_thread): Remove macro.
91 (find_inferior, find_inferior_id): Change signature, implement
92 using find_thread.
93 (find_inferior_in_random): Change signature, implement using
94 find_thread_in_random.
95 (for_each_inferior, for_each_inferior_with_data): Change
96 signature, implement using for_each_thread.
97 (add_inferior_to_list, remove_inferior): Remove.
98 (add_thread, get_first_thread, thread_of_pid,
99 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
100 (get_first_inferior, one_inferior_p, clear_inferior_list):
101 Remove.
102 (clear_inferiors, get_thread_process): Update.
103 * gdbthread.h: Include <list>.
104 (struct thread_info) <entry>: Remove field.
105 <id>: New field.
106 (all_threads): Change type to std::list<thread_info *>.
107 (get_first_inferior): Add doc.
108 (find_thread, for_each_thread, find_thread_in_random): New
109 functions.
110 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
111 * linux-arm-low.c (update_registers_callback): Update.
112 * linux-low.c (second_thread_of_pid_p): Update.
113 (kill_one_lwp_callback, linux_detach_lwp_callback,
114 delete_lwp_callback, status_pending_p_callback, same_lwp,
115 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
116 iterate_over_lwps, not_stopped_callback,
117 resume_stopped_resumed_lwps, count_events_callback,
118 select_singlestep_lwp_callback, select_event_lwp_callback,
119 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
120 suspend_and_send_sigstop_callback, wait_for_sigstop,
121 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
122 lwp_running, linux_set_resume_request, resume_status_pending_p,
123 need_step_over_p, start_step_over, linux_resume_one_thread,
124 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
125 reset_lwp_ptrace_options_callback): Update.
126 * linux-mips-low.c (update_watch_registers_callback): Update.
127 * regcache.c (regcache_invalidate_one, regcache_invalidate):
128 Update.
129 (free_register_cache_thread_one): Remove.
130 (regcache_release): Update.
131 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
132 handle_qxfer_threads_worker): Update.
133 (handle_query): Update, use list iterator.
134 (visit_actioned_threads, handle_pending_status,
135 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
136 clear_pending_status_callback, set_pending_status_callback,
137 find_status_pending_thread_callback, handle_status,
138 process_serial_event): Update.
139 * target.c (thread_search_callback): Update.
140 * thread-db.c (thread_db_get_tls_address): Update.
141 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
142 Update.
143 * win32-i386-low.c (update_debug_registers_callback): Update.
144 * win32-low.c (delete_thread_info, child_delete_thread,
145 continue_one_thread, suspend_one_thread,
146 get_child_debug_event): Adjust.
147
148 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
149
150 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
151 * inferiors.h: Include <list>.
152 (struct process_info) <entry>: Remove field.
153 <pid>: New field.
154 (pid_of): Change macro to function.
155 (ptid_of, lwpid_of): Remove macro.
156 (all_processes): Change type to std::list<process_info *>.
157 (ALL_PROCESSES): Remove macro.
158 (for_each_process, find_process): New function.
159 * inferiors.c (all_processes): Change type to
160 std::list<process_info *>.
161 (find_thread_process): Adjust.
162 (add_process): Likewise.
163 (remove_process): Likewise.
164 (find_process_pid): Likewise.
165 (get_first_process): Likewise.
166 (started_inferior_callback): Remove.
167 (have_started_inferiors_p): Adjust.
168 (attached_inferior_callback): Remove.
169 (have_attached_inferiors_p): Adjust.
170 * linux-low.c (check_zombie_leaders): Likewise.
171 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
172 (x86_linux_update_xmltarget): Adjust.
173 * server.c (handle_query): Likewise.
174 (gdb_reattached_process): Remove.
175 (handle_status): Adjust.
176 (kill_inferior_callback): Likewise.
177 (detach_or_kill_inferior): Remove.
178 (print_started_pid): Likewise.
179 (print_attached_pid): Likewise.
180 (detach_or_kill_for_exit): Update.
181 (process_serial_event): Likewise.
182 * linux-arm-low.c (arm_new_fork): Likewise.
183
184 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
185
186 * dll.h: Include <list>.
187 (struct dll_info): Add constructor.
188 <entry>: Remove field.
189 (all_dlls): Change type to std::list<dll_info>.
190 * dll.c: Include <algorithm>.
191 (get_dll): Remove macro.
192 (all_dlls): Change type to std::list<dll_info *>.
193 (free_one_dll): Remove.
194 (match_dll): Likewise.
195 (loaded_dll): Adjust.
196 (unloaded_dll): Adjust to all_dlls type change, use
197 std::find_if. Inline code from match_dll.
198 (clear_dlls): Adjust to all_dlls type change.
199 * server.c (emit_dll_description): Remove.
200 (handle_qxfer_libraries): Adjust to all_dlls type change,
201 integrate emit_dll_description's functionality.
202
203 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
204
205 * linux-low.h (struct linux_target_ops) <delete_process>: New
206 field.
207 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
208 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
209 (struct linux_target_ops): Add delete_process callback.
210 * linux-arm-low.c (arm_delete_process): New.
211 (struct linux_target_ops): Add delete_process callback.
212 * linux-bfin-low.c (struct linux_target_ops): Likewise.
213 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
214 * linux-m32r-low.c (struct linux_target_ops): Likewise.
215 * linux-mips-low.c (mips_linux_delete_process): New.
216 (struct linux_target_ops): Add delete_process callback.
217 * linux-ppc-low.c (struct linux_target_ops): Likewise.
218 * linux-s390-low.c (struct linux_target_ops): Likewise.
219 * linux-sh-low.c (struct linux_target_ops): Likewise.
220 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
221 * linux-tile-low.c (struct linux_target_ops): Likewise.
222 * linux-x86-low.c (x86_linux_delete_process): New.
223 (struct linux_target_ops): Add delete_process callback.
224 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
225
226 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
227
228 * linux-aarch64-low.c (the_low_target): Add thread delete
229 callback.
230 * linux-arm-low.c (arm_delete_thread): New function.
231 (the_low_target): Add thread delete callback.
232 * linux-bfin-low.c (the_low_target): Likewise.
233 * linux-crisv32-low.c (the_low_target): Likewise.
234 * linux-low.c (delete_lwp): Invoke delete_thread callback if
235 set.
236 * linux-low.h (struct linux_target_ops) <delete_thread>: New
237 field.
238 * linux-m32r-low.c (the_low_target): Add thread delete callback.
239 * linux-mips-low.c (mips_linux_delete_thread): New function.
240 (the_low_target): Add thread delete callback.
241 * linux-ppc-low.c (the_low_target): Likewise.
242 * linux-s390-low.c (the_low_target): Likewise.
243 * linux-sh-low.c (the_low_target): Likewise.
244 * linux-tic6x-low.c (the_low_target): Likewise.
245 * linux-tile-low.c (the_low_target): Likewise.
246 * linux-x86-low.c (the_low_target): Likewise.
247 * linux-xtensa-low.c (the_low_target): Likewise.
248
249 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
250
251 * win32-low.c: Include "common-inferior.h".
252
253 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
254
255 * inferiors.c (set_inferior_cwd): New function.
256 * server.c (handle_general_set): Handle QSetWorkingDir packet.
257 (handle_query): Inform that QSetWorkingDir is supported.
258 * win32-low.c (create_process): Pass the inferior's cwd to
259 CreateProcess.
260
261 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
262
263 * inferiors.c (current_inferior_cwd): New global variable.
264 (get_inferior_cwd): New function.
265 * inferiors.h (struct process_info) <cwd>: New field.
266
267 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
268
269 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
270 (OBS): Add gdb_tilde_expand.o.
271
272 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
273
274 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
275 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
276
277 2017-09-29 Pedro Alves <palves@redhat.com>
278
279 * ax.c (gdb_parse_agent_expr): Constify.
280 * ax.h (gdb_parse_agent_expr): Constify.
281 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
282 Constify.
283 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
284 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
285 * remote-utils.h (read_ptid): Constify.
286 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
287 (process_point_options, process_serial_event): Constify.
288 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
289 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
290 (cmd_qtbuffer): Constify.
291
292 2017-09-29 Pedro Alves <palves@redhat.com>
293
294 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
295 fails.
296
297 2017-09-29 Pedro Alves <palves@redhat.com>
298
299 * linux-low.c (handle_extended_wait): Pass parent thread instead
300 of process to thread_db_notice_clone.
301 * linux-low.h (thread_db_notice_clone): Replace parent process
302 parameter with parent thread parameter.
303 * thread-db.c (find_one_thread): Add comment.
304 (thread_db_notice_clone): Replace parent process parameter with
305 parent thread parameter. Temporarily switch to the parent thread.
306
307 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
308
309 * gdbthread.h: Include "common-gdbthread.h".
310 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
311 "if" when validating the ptid.
312 * remote-utils.c: Include "gdbthread.h".
313 (prepare_resume_reply): Use "switch_to_thread".
314 * target.c (done_accessing_memory): Likewise.
315
316 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
317
318 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
319 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
320 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
321 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
322 s390x-gs-linux64-ipa.o to ipa_obj.
323 * linux-s390-low.c (HWCAP_S390_GS): New define.
324 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
325 New functions.
326 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
327 (s390_arch_setup): Check for guarded-storage support and choose
328 appropriate tdesc.
329 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
330 init_registers_s390x_gs_linux64.
331 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
332 enum value.
333 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
334 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
335
336 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
337
338 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
339
340 2017-09-21 Kevin Buettner <kevinb@redhat.com>
341
342 * linux-low.h (struct lwp_info): Add new field, thread_handle.
343 (thread_db_thread_handle): Declare.
344 * linux-low.c (linux_target_ops): Initialize thread_handle.
345 * server.c (handle_qxfer_threads_worker): Add support for
346 "handle" attribute.
347 * target.h (struct target_ops): Add new function pointer,
348 thread_handle.
349 (target_thread_handle): Define.
350 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
351 field in lwp.
352 (thread_db_thread_handle): New function.
353
354 2017-09-21 Kevin Buettner <kevinb@redhat.com>
355
356 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
357 * linux-low.h (thread_db_notice_clone): Declare.
358 * thread-db.c (thread_db_notice_clone): New function.
359
360 2017-09-21 Pedro Alves <palves@redhat.com>
361
362 * server.c (gdb_read_memory, handle_status, process_serial_event)
363 (handle_serial_event, handle_target_event): Adjust to
364 set_desired_thread prototype change.
365 * target.c (set_desired_thread): Remove 'use_general' parameter
366 and adjust.
367 * target.h (set_desired_thread): Remove 'use_general' parameter.
368
369 2017-09-20 Tom Tromey <tom@tromey.com>
370
371 * target.c (target_terminal::terminal_state): Define.
372 (target_terminal::init): Rename from target_terminal_init.
373 (target_terminal::inferior): Rename from
374 target_terminal_inferior.
375 (target_terminal::ours): Rename from target_terminal_ours.
376 (target_terminal::ours_for_output, target_terminal::info): New.
377
378 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
379
380 * server.c (accumulate_file_name_length): Remove.
381 (emit_dll_description): Adjust to std::string change.
382 (handle_qxfer_libraries): Use std::string to hold document.
383
384 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
385
386 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
387 return type of xml_escape_text.
388 * server.c (emit_dll_description): Likewise.
389
390 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
391
392 * server.c (captured_main): Accept argument for --selftest.
393 Update run_tests call.
394 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
395 when registering selftests.
396
397 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
398
399 * regcache.c (get_thread_regcache): Update code to use "std::vector"
400 instead of "VEC" for "target_desc.reg_defs".
401 (regcache_cpy): Likewise.
402 (registers_to_string): Likewise.
403 (registers_from_string): Likewise.
404 (find_regno): Likewise.
405 (supply_regblock): Likewise.
406 (regcache_raw_read_unsigned): Likewise.
407 * tdesc.c (init_target_desc): Likewise.
408 (tdesc_create_reg): Likewise.
409 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
410 (struct target_desc) <reg_defs>: Convert to "std::vector".
411 (target_desc): Do not initialize "reg_defs".
412 (~target_desc): Update code to use "std::vector" instead of "VEC"
413 for "target_desc.reg_defs".
414 (operator==): Likewise.
415
416 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
417
418 * inferiors.h (thread_to_gdb_id): Remove.
419 * inferiors.c (thread_to_gdb_id): Remove.
420 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
421 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
422 lynx_store_registers, lynx_read_memory, lynx_write_memory):
423 Likewise.
424 * nto-low.c (nto_fetch_registers, nto_store_registers,
425 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
426
427 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
428
429 * inferiors.h (gdb_id_to_thread_id): Remove.
430 * inferiors.c (gdb_id_to_thread_id): Remove.
431 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
432 removal. Move pid declaration closer to where it's used.
433
434 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
435
436 * server.c (handle_detach): New function.
437 (process_serial_event): Move code out, call handle_detach.
438
439 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
440
441 * server.c (require_running): Rename to ...
442 (require_running_or_return): ... this ...
443 (require_running_or_break): ... and this.
444 (handle_query, process_serial_event): Adjust.
445
446 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
447
448 * linux-low.c (linux_set_resume_request): Remove unused
449 variables.
450
451 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
452
453 * server.c (first_thread_of): Remove.
454 (process_serial_event): Replace usage of first_thread_of with
455 find_any_thread_of_pid.
456 * tracepoint.c (same_process_p): Remove.
457 (gdb_agent_about_to_close): Replace usage of same_process_p with
458 find_any_thread_of_pid.
459 * linux-x86-low.c (same_process_callback): Remove.
460 (x86_arch_setup_process_callback): Replace usage of
461 same_process_callback with find_any_thread_of_pid.
462 * thread-db.c (any_thread_of): Remove.
463 (switch_to_process): Replace usage of any_thread_of with
464 find_any_thread_of_pid.
465 * inferiors.c (thread_pid_matches_callback): Remove.
466 (find_thread_process): Adjust to use find_any_thread_of_pid.
467
468 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
469
470 * regcache.c (get_thread_regcache): Guard calls to "memset"
471 with "!VEC_empty".
472
473 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
474
475 * linux-low.c (handle_extended_wait): Use
476 "allocate_target_description" instead of "XNEW".
477 * linux-x86-low.c (initialize_low_arch): Likewise.
478
479 2017-09-05 Yao Qi <yao.qi@linaro.org>
480
481 * configure.srv (srv_i386_regobj): Remove.
482 (srv_amd64_regobj): Remove.
483 (srv_regobj): Set it to "" for x86 non-linux targets.
484 * linux-x86-tdesc.c (i386_linux_read_description):
485 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
486 (init_registers_i386): Remove the declaration.
487 (tdesc_i386): Remove the declaration.
488 (lynx_i386_arch_setup): Call i386_create_target_description.
489 * nto-x86-low.c: Likewise.
490 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
491 [!__x86_64__]: include arch/i386.h.
492 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
493
494 2017-09-05 Yao Qi <yao.qi@linaro.org>
495
496 * configure.srv (srv_amd64_linux_xmlfiles): Remove
497 i386/amd64-XXX-linux from it.
498
499 2017-09-05 Yao Qi <yao.qi@linaro.org>
500
501 * configure.srv: Empty srv_amd64_linux_regobj if $development is
502 false.
503 (ipa_amd64_linux_regobj): Remove.
504 (ipa_x32_linux_regobj): Remove.
505
506 2017-09-05 Yao Qi <yao.qi@linaro.org>
507
508 * Makefile.in (arch-amd64.o): New rule.
509 * configure.srv: Append arch-amd64.o.
510 * linux-amd64-ipa.c: Include common/x86-xstate.h.
511 (get_ipa_tdesc): Call amd64_linux_read_description.
512 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
513 and init_registers_amd64_XXX.
514 * linux-x86-low.c (x86_linux_read_description): Call
515 amd64_linux_read_description.
516 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
517 (initialize_low_arch): Don't call init_registers_x32_XXX and
518 init_registers_amd64_XXX.
519 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
520 and tdesc_amd64_XXX.
521 [__x86_64__] (amd64_tdesc_test): New function.
522 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
523 and init_registers_amd64_XXX.
524 * linux-x86-tdesc.c: Include arch/amd64.h.
525 (xcr0_to_tdesc_idx): New function.
526 (i386_linux_read_description): New function.
527 (amd64_get_ipa_tdesc_idx): New function.
528 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
529 (amd64_get_ipa_tdesc): Declare.
530
531 2017-09-05 Yao Qi <yao.qi@linaro.org>
532
533 * configure.srv (srv_i386_linux_xmlfiles): Remove
534 i386/i386-XXX-linux.xml from it.
535
536 2017-09-05 Yao Qi <yao.qi@linaro.org>
537
538 * configure.srv: Set srv_i386_linux_regobj empty if $development
539 is false.
540 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
541 initialize_low_tdesc.
542 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
543 with #if initialize_low_tdesc.
544 * linux-x86-tdesc-selftest.c: New file.
545 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
546
547 2017-09-05 Yao Qi <yao.qi@linaro.org>
548
549 * Makefile.in (arch-i386.o): New rule.
550 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
551 (x86_64-*-linux*): Likewise.
552 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
553 include arch/i386.h.
554 (i386_linux_read_description): Remove code and call
555 i386_create_target_description.
556 * tdesc.c (allocate_target_description): New function.
557 * tdesc.h (set_tdesc_architecture): Remove declaration.
558 (set_tdesc_osabi): Likewise.
559
560 2017-09-05 Yao Qi <yao.qi@linaro.org>
561
562 * linux-x86-tdesc.c: Don't include <inttypes.h>.
563 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
564 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
565 .xmltarget.
566 * server.c (get_features_xml): Call tdesc_get_features_xml.
567 * tdesc.c (set_tdesc_architecture): New function.
568 (set_tdesc_osabi): New function.
569 (tdesc_get_features_xml): New function.
570 (tdesc_create_feature): Add an argument.
571 * tdesc.h (struct target_desc) <features>: New field.
572 <arch, osabi>: New field.
573 (~target_desc): xfree features, arch, and osabi.
574 (target_desc::oerator==): Don't compare .xmltarget.
575 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
576 (set_tdesc_osabi): Likewise.
577 (tdesc_get_features_xml): Likewise.
578
579 2017-09-05 Yao Qi <yao.qi@linaro.org>
580
581 * linux-x86-tdesc.c: Include selftest.h.
582 (i386_tdesc_test): New function.
583 (initialize_low_tdesc): Call selftests::register_test.
584 * tdesc.h: Include regdef.h.
585 (target_desc): Override operator == and !=.
586
587 2017-09-05 Yao Qi <yao.qi@linaro.org>
588
589 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
590 (ipa_obj): Likewise.
591 * linux-i386-ipa.c: Include common/x86-xstate.h
592 (get_ipa_tdesc): Call i386_linux_read_description.
593 (initialize_low_tracepoint): Don't call init_registers_XXX
594 functions, call initialize_low_tdesc instead.
595 * linux-x86-low.c (x86_linux_read_description): Call
596 i386_linux_read_description.
597 (initialize_low_arch): Don't call init_registers_i386_XXX
598 functions, call initialize_low_tdesc.
599 * linux-x86-tdesc.c: New file.
600 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
601 (i386_get_ipa_tdesc_idx): Declare.
602 (i386_get_ipa_tdesc): Declare.
603 (initialize_low_tdesc): Declare.
604
605 2017-09-05 Yao Qi <yao.qi@linaro.org>
606
607 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
608 instead of 0.
609
610 2017-09-05 Yao Qi <yao.qi@linaro.org>
611
612 * Makefile.in (IPA_OBJS): Add vec-ipa.o
613 * regcache.c (get_thread_regcache): Use VEC_length.
614 (init_register_cache): Likewise.
615 (regcache_cpy): Likewise.
616 (registers_to_string): Iterate reg_defs via VEC_iterate.
617 (find_regno): Likewise.
618 (find_register_by_number): Use VEC_index.
619 (register_size): Call find_register_by_number.
620 (register_data): Call find_register_by_number.
621 (supply_regblock): Use VEC_length.
622 (regcache_raw_read_unsigned): Likewise.
623 * tdesc.c (init_target_desc): Iterate reg_defs via
624 VEC_iterate.
625 (default_description): Update initializer.
626 (copy_target_description): Don't update field num_registers.
627 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
628 <num_registers>: Remove.
629
630 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
631
632 * Makefile.in (.SECONDARY): Define target.
633
634 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
635
636 * linux-low.c (linux_wait_1): Adjust.
637 * server.c (queue_stop_reply_callback): Adjust.
638
639 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
640
641 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
642 QEnvironmentUnset and QEnvironmentReset packets.
643 (handle_query): Inform remote that QEnvironmentHexEncoded,
644 QEnvironmentUnset and QEnvironmentReset are supported.
645
646 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
647
648 * inferiors.h (inferior_target_data): Rename to ...
649 (thread_target_data): ... this.
650 (inferior_regcache_data): Rename to ...
651 (thread_regcache_data): ... this.
652 (set_inferior_regcache_data): Rename to ...
653 (set_thread_regcache_data): ... this.
654 * inferiors.c (inferior_target_data): Rename to ...
655 (thread_target_data): ... this.
656 (inferior_regcache_data): Rename to ...
657 (thread_regcache_data): ... this.
658 (set_inferior_regcache_data): Rename to ...
659 (set_thread_regcache_data): ... this.
660 (free_one_thread): Update.
661 * linux-low.h (get_thread_lwp): Update.
662 * regcache.c (get_thread_regcache): Update.
663 (regcache_invalidate_thread): Update.
664 (free_register_cache_thread): Update.
665 * win32-i386-low.c (update_debug_registers_callback): Update.
666 (win32_get_current_dr): Update.
667 * win32-low.c (thread_rec): Update.
668 (delete_thread_info): Update.
669 (continue_one_thread): Update.
670 (suspend_one_thread): Update.
671
672 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
673
674 * inferiors.c (set_inferior_target_data): Remove.
675 * inferiors.h (set_inferior_target_data): Remove.
676
677 2017-08-18 Yao Qi <yao.qi@linaro.org>
678
679 * Makefile.in (OBS): Add selftest.o.
680 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
681 * configure, config.in: Re-generated.
682 * server.c: Include common/sefltest.h.
683 (captured_main): Handle option --selftest.
684
685 2017-08-09 Yao Qi <yao.qi@linaro.org>
686
687 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
688 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
689 i386-avx-mpx.o and i386-mmx.o.
690 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
691 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
692 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
693 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
694 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
695 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
696 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
697 i386/amd64-avx-mpx.xml.
698
699 2017-08-09 Yao Qi <yao.qi@linaro.org>
700
701 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
702 and x32-avx-avx512.o.
703 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
704 i386/x32-avx-avx512.xml.
705
706 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
707
708 * tracepoint.h (enum class fast_tpoint_collect_result): New
709 enumeration.
710 (fast_tracepoint_collecting): Change return type to
711 fast_tpoint_collect_result.
712 * tracepoint.c (fast_tracepoint_collecting): Likewise.
713 * linux-low.h: Include tracepoint.h.
714 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
715 fast_tpoint_collect_result.
716 * linux-low.c (handle_tracepoints): Adjust.
717 (linux_fast_tracepoint_collecting): Change return type to
718 fast_tpoint_collect_result.
719 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
720 linux_wait_1, stuck_in_jump_pad_callback,
721 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
722 proceed_one_lwp): Adjust to type change.
723
724 2017-07-10 Yao Qi <yao.qi@linaro.org>
725
726 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
727
728 2017-06-29 Yao Qi <yao.qi@linaro.org>
729
730 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
731 Remove.
732 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
733
734 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
735
736 * Makefile.in (IPA_OBJS): Sort and format one item per line.
737
738 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
739
740 * linux-low.c (linux_create_inferior): Adjust code to access the
741 environment information via 'gdb_environ' class.
742 * lynx-low.c (lynx_create_inferior): Likewise.
743 * server.c (our_environ): Make it an instance of 'gdb_environ'.
744 (get_environ): Return a pointer to 'our_environ'.
745 (captured_main): Initialize 'our_environ'.
746 * server.h (get_environ): Adjust prototype.
747 * spu-low.c (spu_create_inferior): Adjust code to access the
748 environment information via 'gdb_environ' class.
749
750 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
751
752 * linux-low.c (linux_read_memory, linux_write_memory): Remove
753 usage of "register" keyword.
754
755 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
756
757 * configure: Re-generate.
758
759 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
760
761 * configure: Re-generate.
762
763 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
764
765 * Makefile.in (COMPILE.pre): Add "-x c++".
766
767 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
768
769 * fork-child.c: Conditionally include <signal.h>.
770
771 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
772
773 * server.c (handle_general_set): Handle new packet
774 "QStartupWithShell".
775 (handle_query): Add "QStartupWithShell" to the list of supported
776 packets.
777 (gdbserver_usage): Add help text explaining the
778 new "--startup-with-shell" and "--no-startup-with-shell" CLI
779 options.
780 (captured_main): Recognize and act upon the presence of the new
781 CLI options.
782
783 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
784 Pedro Alves <palves@redhat.com>
785
786 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
787 * configure: Regenerate.
788 * configure.srv (srv_linux_obj): Add "fork-child.o" and
789 "fork-inferior.o".
790 (i[34567]86-*-lynxos*): Likewise.
791 (spu*-*-*): Likewise.
792 * fork-child.c: New file.
793 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
794 and "environ.h".
795 (linux_ptrace_fun): New function.
796 (linux_create_inferior): Adjust function prototype to reflect
797 change on "target.h". Adjust function code to use
798 "fork_inferior".
799 (linux_request_interrupt): Delete "signal_pid".
800 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
801 (lynx_ptrace_fun): New function.
802 (lynx_create_inferior): Adjust function prototype to reflect
803 change on "target.h". Adjust function code to use
804 "fork_inferior".
805 * nto-low.c (nto_create_inferior): Adjust function prototype and
806 code to reflect change on "target.h". Update comments.
807 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
808 "common-terminal.h" and "environ.h".
809 (terminal_fd): Moved to fork-child.c.
810 (old_foreground_pgrp): Likewise.
811 (restore_old_foreground_pgrp): Likewise.
812 (last_status): Make it global.
813 (last_ptid): Likewise.
814 (our_environ): New variable.
815 (startup_with_shell): Likewise.
816 (program_name): Likewise.
817 (program_argv): Rename to...
818 (program_args): ...this.
819 (wrapper_argv): New variable.
820 (start_inferior): Delete function.
821 (get_exec_wrapper): New function.
822 (get_exec_file): Likewise.
823 (get_environ): Likewise.
824 (prefork_hook): Likewise.
825 (post_fork_inferior): Likewise.
826 (postfork_hook): Likewise.
827 (postfork_child_hook): Likewise.
828 (handle_v_run): Update code to deal with arguments coming from the
829 remote host. Update calls from "start_inferior" to
830 "create_inferior".
831 (captured_main): Likewise. Initialize environment variable. Call
832 "have_job_control".
833 * server.h (post_fork_inferior): New prototype.
834 (get_environ): Likewise.
835 (last_status): Declare.
836 (last_ptid): Likewise.
837 (signal_pid): Likewise.
838 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
839 (spu_ptrace_fun): New function.
840 (spu_create_inferior): Adjust function prototype to reflect change
841 on "target.h". Adjust function code to use "fork_inferior".
842 * target.c (target_terminal_init): New function.
843 (target_terminal_inferior): Likewise.
844 (target_terminal_ours): Likewise.
845 * target.h: Include <vector>.
846 (struct target_ops) <create_inferior>: Update prototype.
847 (create_inferior): Update macro.
848 * utils.c (gdb_flush_out_err): New function.
849 * win32-low.c (win32_create_inferior): Adjust function prototype
850 and code to reflect change on "target.h".
851
852 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
853
854 * inferiors.c (switch_to_thread): New function.
855
856 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
857
858 * Makefile.in (SFILE): Add "common/job-control.c".
859 (OBS): Add "job-control.o".
860
861 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
862
863 * Makefile: Remove "@host_makefile_frag@".
864
865 2017-05-05 Pedro Alves <palves@redhat.com>
866
867 * configure: Regenerate.
868
869 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
870
871 * configure: Regenerate.
872
873 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
874
875 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
876 software_single_step change of return type to
877 std::vector<CORE_ADDR>.
878 * linux-low.c (install_software_single_step_breakpoints):
879 Likewise.
880 * linux-low.h (install_software_single_step_breakpoints):
881 Likewise.
882
883 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
884
885 * remote-utils.c: Include "gdb_termios.h" instead of
886 "terminal.h".
887 * terminal.h: Delete file.
888
889 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
890
891 * server.c: Include <vector>.
892 <program_argv, wrapper_argv>: Convert to std::vector.
893 (start_inferior): Rewrite function to use C++.
894 (handle_v_run): Likewise. Update code that calculates the argv
895 based on the vRun packet; use C++.
896 (captured_main): Likewise.
897
898 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
899
900 * server.c (handle_v_cont): Initialize thread_resume::thread
901 with null_ptid.
902
903 2017-04-05 Pedro Alves <palves@redhat.com>
904
905 * configure: Regenerate.
906
907 2017-04-05 Pedro Alves <palves@redhat.com>
908
909 * gdbreplay.c (sync_error): Constify.
910 * linux-x86-low.c (push_opcode): Constify.
911
912 2017-04-05 Pedro Alves <palves@redhat.com>
913
914 * win32-low.c (get_child_debug_event)
915 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
916 Report TARGET_WAITKIND_SPURIOUS instead.
917
918 2017-04-05 Pedro Alves <palves@redhat.com>
919
920 * remote-utils.c (remote_prepare, remote_open): Constify.
921 * remote-utils.h (remote_prepare, remote_open): Constify.
922 * server.c (captured_main): Constify 'port' handling.
923
924 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
925
926 * Makefile.in (clean): Clear .deps.
927
928 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
929
930 * .gitignore: Remove generated files, replace with wildcard.
931 * (clean): Replace removal of generated files with wildcard.
932 (version.c): Replace with...
933 (version-generated.c): ...this.
934 (xml-builtin.c): Replace with...
935 (xml-builtin-generated.c): ...this.
936 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
937 (%.c: *regformats*): Replace with...
938 (%-generated.c: *regformats*): ...this.
939
940 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
941
942 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
943 (xtensa_fill_gregset): Call collect_register_by_name for
944 threadptr register.
945 (xtensa_store_gregset): Call supply_register_by_name for
946 threadptr register.
947
948 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
949
950 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
951 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
952 (xtensa_store_gregset): Call supply_register for all registers in
953 a0_regnum..a0_regnum + C0_NREGS range.
954
955 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
956
957 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
958 (ax-ipa.o: ax.c): Remove.
959 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
960 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
961 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
962 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
963 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
964
965 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
966
967 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
968 (print-utils-ipa.o: ../common/print-utils.c): Remove.
969 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
970 (errors-ipa.o: ../common/errors.c): Remove.
971 (format-ipa.o: ../common/format.c): Remove.
972 (common-utils-ipa.o: ../common/common-utils.c): Remove.
973
974 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
975
976 * Makefile.in (%-ipa.o: %.c): New rule.
977 (tracepoint-ipa.o: tracepoint.c): Remove.
978 (utils-ipa.o: utils.c): Remove.
979 (remote-utils-ipa.o: remote-utils.c): Remove.
980 (regcache-ipa.o: regcache.c): Remove.
981 (i386-linux-ipa.o: i386-linux.c): Remove.
982 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
983 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
984 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
985 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
986 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
987 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
988 (amd64-linux-ipa.o: amd64-linux.c): Remove.
989 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
990 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
991 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
992 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
993 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
994 (aarch64-ipa.o: aarch64.c): Remove.
995 (s390-linux32-ipa.o: s390-linux32.c): Remove.
996 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
997 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
998 (s390-linux64-ipa.o: s390-linux64.c): Remove.
999 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1000 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1001 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1002 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1003 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1004 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1005 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1006 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1007 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1008 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1009 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1010 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1011 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1012 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1013 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1014 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1015 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1016 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1017 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1018 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1019 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1020 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1021 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1022 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1023 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1024 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1025 (tdesc-ipa.o: tdesc.c): Remove.
1026 (x32-linux-ipa.o: x32-linux.c): Remove.
1027 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1028 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1029
1030 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1031
1032 * Makefile.in (%.o: ../arch/%.c): New rule.
1033 (arm.o: ../arch/arm.c): Remove.
1034 (arm-linux.o: ../arch/arm-linux.c): Remove.
1035 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1036 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1037
1038 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1039
1040 * Makefile.in (%.o: ../nat/%.c): New rule.
1041 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1042 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1043 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1044 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1045 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1046 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1047 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1048 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1049 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1050 (linux-personality.o: ../nat/linux-personality.c): Remove.
1051 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1052 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1053 (x86-linux.o: ../nat/x86-linux.c): Remove.
1054 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1055 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1056
1057 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1058
1059 * Makefile.in (%.o: ../common/%.c): New rule.
1060 (signals.o: ../common/signals.c): Remove.
1061 (print-utils.o: ../common/print-utils.c): Remove.
1062 (rsp-low.o: ../common/rsp-low.c): Remove.
1063 (common-utils.o: ../common/common-utils.c): Remove.
1064 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1065 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1066 (vec.o: ../common/vec.c): Remove.
1067 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1068 (xml-utils.o: ../common/xml-utils.c): Remove.
1069 (ptid.o: ../common/ptid.c): Remove.
1070 (buffer.o: ../common/buffer.c): Remove.
1071 (format.o: ../common/format.c): Remove.
1072 (filestuff.o: ../common/filestuff.c): Remove.
1073 (agent.o: ../common/agent.c): Remove.
1074 (errors.o: ../common/errors.c): Remove.
1075 (environ.o: ../common/environ.c): Remove.
1076 (common-debug.o: ../common/common-debug.c): Remove.
1077 (cleanups.o: ../common/cleanups.c): Remove.
1078 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1079 (fileio.o: ../common/fileio.c): Remove.
1080 (common-regcache.o: ../common/common-regcache.c): Remove.
1081 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1082 (new-op.o: ../common/new-op.c): Remove.
1083 (btrace-common.o: ../common/btrace-common.c): Remove.
1084
1085 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1086
1087 * Makefile.in (%.o: ../target/%.c): New rule.
1088 (waitstatus.o: ../target/waitstatus.c): Remove.
1089
1090 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1091
1092 * Makefile.in
1093 (%.c: ../regformats/%.dat,
1094 (%.c: ../regformats/arm/%.dat,
1095 (%.c: ../regformats/i386/%.dat,
1096 (%.c: ../regformats/rs6000/%.dat): New rules.
1097 (aarch64.c): Remove.
1098 (reg-arm.c): Remove.
1099 (arm-with-iwmmxt.c): Remove.
1100 (arm-with-vfpv2.c): Remove.
1101 (arm-with-vfpv3.c): Remove.
1102 (arm-with-neon.c): Remove.
1103 (reg-bfin.c): Remove.
1104 (reg-cris.c): Remove.
1105 (reg-crisv32.c): Remove.
1106 (i386.c): Remove.
1107 (i386-linux.c): Remove.
1108 (i386-avx.c): Remove.
1109 (i386-avx-linux.c): Remove.
1110 (i386-avx-avx512.c): Remove.
1111 (i386-avx-avx512-linux.c): Remove.
1112 (i386-mpx.c): Remove.
1113 (i386-mpx-linux.c): Remove.
1114 (i386-avx-mpx-avx512-pku.c): Remove.
1115 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1116 (i386-avx-mpx.c): Remove.
1117 (i386-avx-mpx-linux.c): Remove.
1118 (i386-mmx.c): Remove.
1119 (i386-mmx-linux.c): Remove.
1120 (reg-ia64.c): Remove.
1121 (reg-m32r.c): Remove.
1122 (reg-m68k.c): Remove.
1123 (reg-cf.c): Remove.
1124 (mips-linux.c): Remove.
1125 (mips-dsp-linux.c): Remove.
1126 (mips64-linux.c): Remove.
1127 (mips64-dsp-linux.c): Remove.
1128 (nios2-linux.c): Remove.
1129 (powerpc-32.c): Remove.
1130 (powerpc-32l.c): Remove.
1131 (powerpc-altivec32l.c): Remove.
1132 (powerpc-cell32l.c): Remove.
1133 (powerpc-vsx32l.c): Remove.
1134 (powerpc-isa205-32l.c): Remove.
1135 (powerpc-isa205-altivec32l.c): Remove.
1136 (powerpc-isa205-vsx32l.c): Remove.
1137 (powerpc-e500l.c): Remove.
1138 (powerpc-64l.c): Remove.
1139 (powerpc-altivec64l.c): Remove.
1140 (powerpc-cell64l.c): Remove.
1141 (powerpc-vsx64l.c): Remove.
1142 (powerpc-isa205-64l.c): Remove.
1143 (powerpc-isa205-altivec64l.c): Remove.
1144 (powerpc-isa205-vsx64l.c): Remove.
1145 (s390-linux32.c): Remove.
1146 (s390-linux32v1.c): Remove.
1147 (s390-linux32v2.c): Remove.
1148 (s390-linux64.c): Remove.
1149 (s390-linux64v1.c): Remove.
1150 (s390-linux64v2.c): Remove.
1151 (s390-te-linux64.c): Remove.
1152 (s390-vx-linux64.c): Remove.
1153 (s390-tevx-linux64.c): Remove.
1154 (s390x-linux64.c): Remove.
1155 (s390x-linux64v1.c): Remove.
1156 (s390x-linux64v2.c): Remove.
1157 (s390x-te-linux64.c): Remove.
1158 (s390x-vx-linux64.c): Remove.
1159 (s390x-tevx-linux64.c): Remove.
1160 (tic6x-c64xp-linux.c): Remove.
1161 (tic6x-c64x-linux.c): Remove.
1162 (tic6x-c62x-linux.c): Remove.
1163 (reg-sh.c): Remove.
1164 (reg-sparc64.c): Remove.
1165 (reg-spu.c): Remove.
1166 (amd64.c): Remove.
1167 (amd64-linux.c): Remove.
1168 (amd64-avx.c): Remove.
1169 (amd64-avx-linux.c): Remove.
1170 (amd64-avx-avx512.c): Remove.
1171 (amd64-avx-avx512-linux.c): Remove.
1172 (amd64-mpx.c): Remove.
1173 (amd64-mpx-linux.c): Remove.
1174 (amd64-avx-mpx-avx512-pku.c): Remove.
1175 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1176 (amd64-avx-mpx.c): Remove.
1177 (amd64-avx-mpx-linux.c): Remove.
1178 (x32.c): Remove.
1179 (x32-linux.c): Remove.
1180 (x32-avx.c): Remove.
1181 (x32-avx-linux.c): Remove.
1182 (x32-avx-avx512.c): Remove.
1183 (x32-avx-avx512-linux.c): Remove.
1184 (reg-xtensa.c): Remove.
1185 (reg-tilegx.c): Remove.
1186 (reg-tilegx32.c): Remove.
1187
1188 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1189
1190 * Makefile.in (SFILES): Add "common/environ.c".
1191 (OBJS): Add "common/environ.h".
1192
1193 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1194
1195 * configure.ac: Check if the fs_base and gs_base members of
1196 `struct user_regs_struct' exist.
1197 * config.in: Regenerated.
1198 * configure: Likewise.
1199
1200 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1201
1202 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1203 target_read_memory.
1204 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1205 (get_next_pcs_syscall_next_pc): Likewise.
1206
1207 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1208
1209 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1210 * nto-x86-low.c: Likewise.
1211
1212 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1213
1214 * Makefile.in: Include disable-implicit-rules.mk.
1215
1216 2016-11-23 Pedro Alves <palves@redhat.com>
1217
1218 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1219 (debug_vprintf): Use std::chrono::steady_clock instead of
1220 gettimeofday. Use '.' instead of ':'.
1221 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1222 (get_timestamp): Use std::chrono::steady_clock instead of
1223 gettimeofday.
1224
1225 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1226
1227 * Makefile.in: Fix whitespace formatting.
1228
1229 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1230
1231 * Makefile.in (SFILES, OBS): Flatten list and order
1232 alphabetically.
1233
1234 2016-11-23 Pedro Alves <palves@redhat.com>
1235
1236 * event-loop.c (handle_file_event): Use warning.
1237 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1238 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1239 Use warning.
1240
1241 2016-11-23 Pedro Alves <palves@redhat.com>
1242
1243 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1244 output.
1245 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1246 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1247 debug_printf and debug_flush for debug output.
1248 * server.c (handle_general_set): Likewise.
1249 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1250 output.
1251
1252 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1253
1254 * Makefile.in (.c.o): Replace rule with ...
1255 (%.o: %.c): ... this one.
1256
1257 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1258
1259 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1260 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1261 make.
1262 * configure.ac: Remove checks for the make program.
1263 * configure: Re-generate.
1264
1265 2016-10-28 Pedro Alves <palves@redhat.com>
1266
1267 * Makefile.in (CXX_DIALECT): Get from configure.
1268 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1269 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1270 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1271 * config.in: Regenerate.
1272 * configure: Regenerate.
1273
1274 2016-10-27 Yao Qi <yao.qi@linaro.org>
1275
1276 * linux-low.c (linux_supports_range_stepping): Return true if
1277 can_software_single_step return true.
1278
1279 2016-10-27 Yao Qi <yao.qi@linaro.org>
1280
1281 * inferiors.c (find_inferior_in_random): New function.
1282 * inferiors.h (find_inferior_in_random): Declare.
1283 * linux-low.c (linux_wait_for_event_filtered): Call
1284 find_inferior_in_random instead of find_inferior.
1285
1286 2016-10-27 Yao Qi <yao.qi@linaro.org>
1287
1288 * linux-low.c (linux_wait_1): If single-step breakpoints are
1289 inserted, remove them.
1290
1291 2016-10-26 Pedro Alves <palves@redhat.com>
1292
1293 * linux-low.c (handle_extended_wait): Link parent/child fork
1294 threads.
1295 (linux_wait_1): Unlink them.
1296 (linux_set_resume_request): Ignore resume requests for
1297 already-resumed and unhandled fork child threads.
1298 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1299 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1300 New functions.
1301 (handle_v_requests) <vCont>: Don't call require_running.
1302 * server.h (in_queued_stop_replies): New declaration.
1303
1304 2016-10-24 Yao Qi <yao.qi@linaro.org>
1305
1306 PR server/20733
1307 * linux-aarch64-low.c (append_insns): Cast the return value to
1308 'uint32_t *'.
1309
1310 2016-10-10 Yao Qi <yao.qi@linaro.org>
1311
1312 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1313
1314 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1315
1316 * target.c (target_supports_multi_process): New function, moved
1317 from...
1318 * target.h (target_supports_multi_process): ... here. Remove
1319 macro.
1320
1321 2016-10-05 Tom Tromey <tom@tromey.com>
1322
1323 PR remote/20655:
1324 * tracepoint.c (handle_tracepoint_bkpts): Check
1325 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1326
1327 2016-10-05 Yao Qi <yao.qi@linaro.org>
1328
1329 * configure.srv: Update the path of arm-*.xml files.
1330
1331 2016-10-05 Terry Guo <terry.guo@arm.com>
1332 Yao Qi <yao.qi@linaro.org>
1333
1334 * Makefile.in: Adjust the path of rules.
1335 * configure.srv: Update the path of xml files.
1336 * regformats/arm-with-iwmmxt.dat: Regenerated.
1337 * regformats/arm-with-neon.dat: Likewise.
1338 * regformats/arm-with-vfpv2.dat: Likewise.
1339 * regformats/arm-with-vfpv3.dat Likewise.
1340
1341 2016-09-30 Yao Qi <yao.qi@linaro.org>
1342
1343 PR gdbserver/20627
1344 * target.c (target_stop_and_wait): Don't call
1345 target_continue_no_signal, use resume_stop instead.
1346
1347 2016-09-26 Yao Qi <yao.qi@linaro.org>
1348
1349 * linux-low.c (linux_wait_1): Call debug_exit.
1350
1351 2016-09-23 Pedro Alves <palves@redhat.com>
1352
1353 * Makefile.in (SFILES): Add common/new-op.c.
1354 (OBS): Add common/new-op.o.
1355 (new-op.o): New rule.
1356
1357 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1358
1359 * .gitinore: Ignore more files.
1360
1361 2016-09-21 Yao Qi <yao.qi@linaro.org>
1362
1363 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1364 23.
1365
1366 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1367
1368 * server.c (start_inferior): Call target_mourn_inferior instead of
1369 mourn_inferior; pass ptid_t argument to it.
1370 (resume): Likewise.
1371 (handle_target_event): Likewise.
1372 * target.c (target_mourn_inferior): New function.
1373 * target.h (mourn_inferior): Delete macro.
1374
1375 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1376
1377 * linux-low.c (lwp_is_stepping): New function.
1378
1379 2016-09-06 Carl Love <cel@us.ibm.com>
1380
1381 * server.c (start_inferior): Fixed comment, requested comment change
1382 didn't get updated correctly. Removed reference to ptrace () call as
1383 it is only true on Linux systems.
1384
1385 2016-09-06 Carl Love <cel@us.ibm.com>
1386
1387 * server.c (start_inferior): Do not call
1388 function target_post_create_inferior () if the
1389 inferior process has already exited.
1390
1391 2016-09-05 Pedro Alves <palves@redhat.com>
1392
1393 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1394 (COMPILE.pre, CC_LD): Use CXX directly.
1395 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1396 * acinclude.m4: Don't include build-with-cxx.m4.
1397 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1398 * configure: Regenerate.
1399
1400 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1401
1402 PR gdb/19495
1403 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1404 call writing data to own_buf.
1405
1406 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1407
1408 * target.c (mywait): Call target_wait instead of
1409 the_target->wait.
1410 (target_wait): New function.
1411
1412 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1413
1414 * server.c (start_inferior): New variable 'ptid'. Replace calls
1415 to the_target->resume by target_continue{,_no_signal}, depending
1416 on the case.
1417 * target.c (target_stop_and_wait): Call target_continue_no_signal
1418 instead of the_target->resume.
1419 (target_continue): New function.
1420
1421 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1422
1423 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1424
1425 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1426
1427 PR server/20491
1428 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1429 ps_prochandle.
1430 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1431 * linux-arm-low.c (ps_get_thread_area): Likewise.
1432 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1433 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1434 * linux-mips-low.c (ps_get_thread_area): Likewise.
1435 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1436 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1437 * linux-x86-low.c (ps_get_thread_area): Likewise.
1438 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1439
1440 2016-08-19 Pedro Alves <palves@redhat.com>
1441
1442 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1443
1444 2016-08-19 Pedro Alves <palves@redhat.com>
1445
1446 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1447 comment. Use memcpy instead of casting through unsigned long.
1448
1449 2016-08-19 Pedro Alves <palves@redhat.com>
1450
1451 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1452 allocating around 0x80000000.
1453
1454 2016-08-19 Pedro Alves <palves@redhat.com>
1455
1456 PR gdb/20415
1457 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1458 (x32-avx512-linux-ipa.o): New rules.
1459 * configure.ac (x86_64-*-linux*): New x32 check.
1460 * configure.srv (ipa_x32_linux_regobj): New.
1461 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1462 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1463 descriptions.
1464 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1465 descriptions.
1466 * configure: Regenerate.
1467
1468 2016-08-09 Pedro Alves <palves@redhat.com>
1469
1470 PR gdb/18653
1471 * Makefile.in (OBS): Add signals-state-save-restore.o.
1472 (signals-state-save-restore.o): New rule.
1473 * config.in: Regenerate.
1474 * configure: Regenerate.
1475 * linux-low.c: Include "signals-state-save-restore.h".
1476 (linux_create_inferior): Call
1477 restore_original_signals_state.
1478 * server.c: Include "dispositions-save-restore.h".
1479 (captured_main): Call save_original_signals_state.
1480
1481 2016-08-05 Pedro Alves <palves@redhat.com>
1482
1483 * configure: Regenerate.
1484
1485 2016-08-04 Yao Qi <yao.qi@linaro.org>
1486
1487 * linux-low.c (regsets_fetch_inferior_registers): Check
1488 errno is ESRCH or not.
1489
1490 2016-08-02 Yao Qi <yao.qi@linaro.org>
1491
1492 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1493 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1494 (thread_db_load_search): Update.
1495 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1496 td_ta_set_event and td_ta_event_getmsg.
1497
1498 2016-07-26 Pedro Alves <palves@redhat.com>
1499
1500 PR server/20414
1501 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1502 of unsigned long for 64-bit registers and use uint32_t instead of
1503 unsigned int for 32-bit registers.
1504
1505 2016-07-26 Pedro Alves <palves@redhat.com>
1506
1507 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1508 to 'ptrace'.
1509
1510 2016-07-21 Tom Tromey <tom@tromey.com>
1511
1512 * configure: Rebuild.
1513
1514 2016-07-21 Yao Qi <yao.qi@linaro.org>
1515
1516 * mem-break.c (find_gdb_breakpoint): Cast bp to
1517 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1518
1519 2016-07-21 Yao Qi <yao.qi@linaro.org>
1520
1521 * server.c (handle_v_requests): Support s and S actions
1522 if target_supports_software_single_step return true.
1523
1524 2016-07-21 Yao Qi <yao.qi@linaro.org>
1525
1526 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1527 is resume_step, call maybe_hw_step.
1528 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1529 and unstop them.
1530 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1531 breakpoints or not.
1532 (proceed_one_lwp): If resume request is resume_step, install
1533 reinsert breakpoints and call maybe_hw_step.
1534
1535 2016-07-21 Yao Qi <yao.qi@linaro.org>
1536
1537 * linux-low.c (proceed_one_lwp): Declare.
1538 (linux_resume_one_thread): Remove local variable 'step'.
1539 Lift code enqueue signal. Call proceed_one_lwp instead of
1540 linux_resume_one_lwp.
1541
1542 2016-07-21 Yao Qi <yao.qi@linaro.org>
1543
1544 * linux-low.c (linux_resume_one_thread): Call
1545 enqueue_pending_signal.
1546
1547 2016-07-21 Yao Qi <yao.qi@linaro.org>
1548
1549 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1550 * inferiors.c (do_restore_current_thread_cleanup): New function.
1551 (make_cleanup_restore_current_thread): Likewise.
1552 * linux-low.c (install_software_single_step_breakpoints): Call
1553 make_cleanup_restore_current_thread. Switch current_thread to
1554 thread.
1555
1556 2016-07-21 Yao Qi <yao.qi@linaro.org>
1557
1558 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1559 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1560 (clone_one_breakpoint): Likewise.
1561 (delete_reinsert_breakpoints): Change parameter to thread.
1562 Callers updated.
1563 (has_reinsert_breakpoints): Likewise.
1564 (uninsert_reinsert_breakpoints): Likewise.
1565 (reinsert_reinsert_breakpoints): Likewise.
1566 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1567 (delete_reinsert_breakpoints): Likewise.
1568 (reinsert_reinsert_breakpoints): Likewise.
1569 (uninsert_reinsert_breakpoints): Likewise.
1570 (has_reinsert_breakpoints): Likewise.
1571
1572 2016-07-21 Yao Qi <yao.qi@linaro.org>
1573
1574 * inferiors.c (get_thread_process): Make parameter const.
1575 * inferiors.h (get_thread_process): Update declaration.
1576 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1577 Add new parameters child_thread and parent_thread. Callers
1578 updated.
1579 * mem-break.h (clone_all_breakpoints): Update declaration.
1580
1581 2016-07-21 Yao Qi <yao.qi@linaro.org>
1582
1583 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1584 <command_list, handler>: Remove.
1585 (struct gdb_breakpoint): New.
1586 (struct other_breakpoint): New.
1587 (struct reinsert_breakpoint): New.
1588 (is_gdb_breakpoint): New function.
1589 (any_persistent_commands): Update command_list if
1590 is_gdb_breakpoint returns true.
1591 (set_breakpoint): Create breakpoints according to their types.
1592 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1593 (set_gdb_breakpoint_1): Likewise.
1594 (set_gdb_breakpoint): Likewise.
1595 (clear_breakpoint_conditions): Change parameter type to
1596 'struct gdb_breakpoint *'.
1597 (clear_breakpoint_commands): Likewise.
1598 (clear_breakpoint_conditions_and_commands): Likewise.
1599 (add_condition_to_breakpoint): Likewise.
1600 (add_breakpoint_condition): Likewise.
1601 (add_commands_to_breakpoint): Likewise.
1602 (check_breakpoints): Check other_breakpoint.
1603 (clone_one_breakpoint): Clone breakpopint according to its type.
1604 * mem-break.h (struct gdb_breakpoint): Declare.
1605 (set_gdb_breakpoint): Update declaration.
1606 (clear_breakpoint_conditions_and_commands): Likewise.
1607 (add_breakpoint_condition): Likewise.
1608 (add_breakpoint_commands): Likewise.
1609 * server.c (process_point_options): Change parameter type to
1610 'struct gdb_breakpoint *'.
1611
1612 2016-07-21 Yao Qi <yao.qi@linaro.org>
1613
1614 * mem-break.c (set_breakpoint_at): Rename it to ...
1615 (set_breakpoint_type_at): ... it.
1616 (set_breakpoint_at): Call set_breakpoint_type_at.
1617 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1618 * mem-break.h (set_breakpoint_at): Update comments.
1619
1620 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1621
1622 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1623 to buf parameter.
1624 (nios2_store_gregset): Likewise.
1625
1626 2016-07-01 Pedro Alves <palves@redhat.com>
1627 Antoine Tremblay <antoine.tremblay@ericsson.com>
1628
1629 * linux-low.c: Change interface to take the target lwp_info
1630 pointer directly and return void. Handle detaching from a zombie
1631 thread.
1632 (linux_detach_lwp_callback): New function.
1633 (linux_detach): Detach from the leader thread after detaching from
1634 the clone threads.
1635
1636 2016-06-28 Yao Qi <yao.qi@linaro.org>
1637
1638 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1639 for variable new_offset.
1640 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1641 (aarch64_ftrace_insn_reloc_cb): Likewise.
1642 (aarch64_ftrace_insn_reloc_tb): Likewise.
1643 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1644 PRIx64 instead of PRIx32.
1645
1646 2016-06-28 Yao Qi <yao.qi@linaro.org>
1647
1648 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1649 (the_low_target): Install arm_get_syscall_trapinfo.
1650
1651 2016-06-28 Yao Qi <yao.qi@linaro.org>
1652
1653 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1654 function.
1655 (the_low_target): Install aarch64_get_syscall_trapinfo.
1656
1657 2016-06-28 Yao Qi <yao.qi@linaro.org>
1658
1659 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1660 Callers updated.
1661 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1662 Remove parameter sysno.
1663 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1664 sysret.
1665
1666 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1667
1668 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1669 (s390_emit_ne_goto): Likewise.
1670 (s390_emit_lt_goto): Likewise.
1671 (s390_emit_le_goto): Likewise.
1672 (s390_emit_gt_goto): Likewise.
1673 (s390_emit_ge_goto): Likewise.
1674 (s390x_emit_eq_goto): Likewise.
1675 (s390x_emit_ne_goto): Likewise.
1676 (s390x_emit_lt_goto): Likewise.
1677 (s390x_emit_le_goto): Likewise.
1678 (s390x_emit_gt_goto): Likewise.
1679 (s390x_emit_ge_goto): Likewise.
1680 (s390_emit_ops_impl): Mark variable static.
1681 (s390x_emit_ops): Likewise.
1682
1683 2016-06-17 Yao Qi <yao.qi@linaro.org>
1684
1685 * linux-low.c (handle_extended_wait): Call
1686 uninsert_reinsert_breakpoints for the parent process. Remove
1687 reinsert breakpoints from the child process. Reinsert them to
1688 the parent process when vfork is done.
1689 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1690 (reinsert_reinsert_breakpoints): New function.
1691 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1692 (reinsert_reinsert_breakpoints): Declare.
1693
1694 2016-06-17 Yao Qi <yao.qi@linaro.org>
1695
1696 * linux-low.c (handle_extended_wait): If the parent is doing
1697 step-over, remove the reinsert breakpoints from the forked child.
1698
1699 2016-06-17 Yao Qi <yao.qi@linaro.org>
1700
1701 * linux-low.c (unsuspend_all_lwps): Declare.
1702 (linux_low_filter_event): If thread exited, call finish_step_over.
1703 If step-over is finished, unsuspend other threads.
1704
1705 2016-06-17 Yao Qi <yao.qi@linaro.org>
1706
1707 * linux-low.c (linux_resume_one_lwp_throw): Assert
1708 has_reinsert_breakpoints returns false.
1709 * mem-break.c (delete_disabled_breakpoints): Assert
1710 bp type isn't reinsert_breakpoint.
1711
1712 2016-06-17 Yao Qi <yao.qi@linaro.org>
1713
1714 * linux-low.c (maybe_hw_step): New function.
1715 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1716 (finish_step_over): Switch current_thread to lwp temporarily,
1717 and assert has_reinsert_breakpoints returns true.
1718 (proceed_one_lwp): Call maybe_hw_step.
1719 * mem-break.c (has_reinsert_breakpoints): New function.
1720 * mem-break.h (has_reinsert_breakpoints): Declare.
1721
1722 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1723
1724 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1725
1726 2016-05-17 Yao Qi <yao.qi@linaro.org>
1727
1728 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1729 instead of find_inferior.
1730
1731 2016-05-05 Yao Qi <yao.qi@linaro.org>
1732
1733 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1734 Initialize res to zero.
1735
1736 2016-05-05 Yao Qi <yao.qi@linaro.org>
1737
1738 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1739 to uint32_t.
1740
1741 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1742
1743 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1744 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1745 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1746
1747 2016-04-28 Par Olsson <par.olsson@windriver.com>
1748 Simon Marchi <simon.marchi@ericsson.com>
1749
1750 * tracepoint.c (write_inferior_int8): New function.
1751 (cmd_qtenable_disable): Write enable flag using
1752 write_inferior_int8.
1753
1754 2016-04-25 Yao Qi <yao.qi@linaro.org>
1755
1756 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1757 (need_step_over_p): Return zero if the LWP has pending signals
1758 can be delivered on software single step target.
1759
1760 2016-04-25 Yao Qi <yao.qi@linaro.org>
1761
1762 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1763 return instead of error.
1764
1765 2016-04-22 Yao Qi <yao.qi@linaro.org>
1766
1767 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1768 to 23.
1769
1770 2016-04-22 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1773 signal when stepping over breakpoint with software single
1774 step.
1775
1776 2016-04-21 Pedro Alves <palves@redhat.com>
1777
1778 * linux-s390-low.c (s390_collect_ptrace_register)
1779 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1780 add casts.
1781 (s390_check_regset): Use void * instead of gdb_byte *.
1782
1783 2016-04-20 Pedro Alves <palves@redhat.com>
1784
1785 * configure: Renegerate.
1786
1787 2016-04-20 Yao Qi <yao.qi@linaro.org>
1788
1789 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1790 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1791 number 16.
1792 (arm_store_gregset): Likewise.
1793
1794 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1795
1796 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1797 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1798 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1799 (amd64-avx-mpx-linux.c): New rules.
1800 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1801 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1802 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1803 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1804 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1805 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1806 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1807 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1808 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1809 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1810 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1811 * linux-x86-low.c (x86_linux_read_description): Add case for
1812 X86_XSTATE_AVX_MPX_MASK.
1813 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1814 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1815 init_registers_i386_avx_mpx_linux.
1816 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1817 (initialize_low_tracepoint): Call
1818 init_registers_i386_avx_mpx_linux.
1819 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1820 (initialize_low_tracepoint): Call
1821 init_registers_amd64_avx_mpx_linux.
1822 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1823 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1824 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1825 declarations.
1826
1827 2016-04-18 Pedro Alves <palves@redhat.com>
1828
1829 * configure: Regenerate.
1830
1831 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1832
1833 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1834 (aarch64_emit_sub): Likewise.
1835
1836 2016-04-12 Pedro Alves <palves@redhat.com>
1837
1838 * utils.c (prepare_to_throw_exception): Delete.
1839
1840 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1841
1842 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1843
1844 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1845
1846 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1847
1848 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1849
1850 * linux-aarch64-ipa.c: Add <elf.h> include.
1851 * linux-ppc-ipa.c: Add <elf.h> include.
1852 * linux-s390-ipa.c: Add <elf.h> include.
1853
1854 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1855
1856 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1857 (get_raw_reg_ptr): Likewise.
1858 (get_trace_state_variable_value_ptr): Likewise.
1859 (set_trace_state_variable_value_ptr): Likewise.
1860 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1861 char *.
1862
1863 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1864 Marcin Kościelnicki <koriakin@0x04.net>
1865
1866 PR/17221
1867 * linux-ppc-low.c (emit_insns): New function.
1868 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1869 (ppc_emit_prologue): New function.
1870 (ppc_emit_epilogue): New function.
1871 (ppc_emit_add): New function.
1872 (ppc_emit_sub): New function.
1873 (ppc_emit_mul): New function.
1874 (ppc_emit_lsh): New function.
1875 (ppc_emit_rsh_signed): New function.
1876 (ppc_emit_rsh_unsigned): New function.
1877 (ppc_emit_ext): New function.
1878 (ppc_emit_zero_ext): New function.
1879 (ppc_emit_log_not): New function.
1880 (ppc_emit_bit_and): New function.
1881 (ppc_emit_bit_or): New function.
1882 (ppc_emit_bit_xor): New function.
1883 (ppc_emit_bit_not): New function.
1884 (ppc_emit_equal): New function.
1885 (ppc_emit_less_signed): New function.
1886 (ppc_emit_less_unsigned): New function.
1887 (ppc_emit_ref): New function.
1888 (ppc_emit_const): New function.
1889 (ppc_emit_reg): New function.
1890 (ppc_emit_pop): New function.
1891 (ppc_emit_stack_flush): New function.
1892 (ppc_emit_swap): New function.
1893 (ppc_emit_stack_adjust): New function.
1894 (ppc_emit_call): New function.
1895 (ppc_emit_int_call_1): New function.
1896 (ppc_emit_void_call_2): New function.
1897 (ppc_emit_if_goto): New function.
1898 (ppc_emit_goto): New function.
1899 (ppc_emit_eq_goto): New function.
1900 (ppc_emit_ne_goto): New function.
1901 (ppc_emit_lt_goto): New function.
1902 (ppc_emit_le_goto): New function.
1903 (ppc_emit_gt_goto): New function.
1904 (ppc_emit_ge_goto): New function.
1905 (ppc_write_goto_address): New function.
1906 (ppc_emit_ops_impl): New static variable.
1907 (ppc64v1_emit_prologue): New function.
1908 (ppc64v2_emit_prologue): New function.
1909 (ppc64_emit_epilogue): New function.
1910 (ppc64_emit_add): New function.
1911 (ppc64_emit_sub): New function.
1912 (ppc64_emit_mul): New function.
1913 (ppc64_emit_lsh): New function.
1914 (ppc64_emit_rsh_signed): New function.
1915 (ppc64_emit_rsh_unsigned): New function.
1916 (ppc64_emit_ext): New function.
1917 (ppc64_emit_zero_ext): New function.
1918 (ppc64_emit_log_not): New function.
1919 (ppc64_emit_bit_and): New function.
1920 (ppc64_emit_bit_or): New function.
1921 (ppc64_emit_bit_xor): New function.
1922 (ppc64_emit_bit_not): New function.
1923 (ppc64_emit_equal): New function.
1924 (ppc64_emit_less_signed): New function.
1925 (ppc64_emit_less_unsigned): New function.
1926 (ppc64_emit_ref): New function.
1927 (ppc64_emit_const): New function.
1928 (ppc64v1_emit_reg): New function.
1929 (ppc64v2_emit_reg): New function.
1930 (ppc64_emit_pop): New function.
1931 (ppc64_emit_stack_flush): New function.
1932 (ppc64_emit_swap): New function.
1933 (ppc64v1_emit_call): New function.
1934 (ppc64v2_emit_call): New function.
1935 (ppc64v1_emit_int_call_1): New function.
1936 (ppc64v2_emit_int_call_1): New function.
1937 (ppc64v1_emit_void_call_2): New function.
1938 (ppc64v2_emit_void_call_2): New function.
1939 (ppc64_emit_if_goto): New function.
1940 (ppc64_emit_eq_goto): New function.
1941 (ppc64_emit_ne_goto): New function.
1942 (ppc64_emit_lt_goto): New function.
1943 (ppc64_emit_le_goto): New function.
1944 (ppc64_emit_gt_goto): New function.
1945 (ppc64_emit_ge_goto): New function.
1946 (ppc64v1_emit_ops_impl): New static variable.
1947 (ppc64v2_emit_ops_impl): New static variable.
1948 (ppc_emit_ops): New function.
1949 (linux_low_target): Wire in ppc_emit_ops.
1950
1951 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
1952 Marcin Kościelnicki <koriakin@0x04.net>
1953
1954 PR/17221
1955 * Makefile.in: Add powerpc-*-ipa.o
1956 * configure.srv: Add ipa_obj for powerpc*-linux.
1957 * linux-ppc-ipa.c: New file.
1958 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1959 includes.
1960 (PPC_FIELD): New macro.
1961 (PPC_SEXT): New macro.
1962 (PPC_OP6): New macro.
1963 (PPC_BO): New macro.
1964 (PPC_LI): New macro.
1965 (PPC_BD): New macro.
1966 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1967 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1968 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1969 (ppc_get_thread_area): New function.
1970 (is_elfv2_inferior): New function.
1971 (gen_ds_form): New function.
1972 (GEN_STD): New macro.
1973 (GEN_STDU): New macro.
1974 (GEN_LD): New macro.
1975 (GEN_LDU): New macro.
1976 (gen_d_form): New function.
1977 (GEN_ADDI): New macro.
1978 (GEN_ADDIS): New macro.
1979 (GEN_LI): New macro.
1980 (GEN_LIS): New macro.
1981 (GEN_ORI): New macro.
1982 (GEN_ORIS): New macro.
1983 (GEN_LWZ): New macro.
1984 (GEN_STW): New macro.
1985 (GEN_STWU): New macro.
1986 (gen_xfx_form): New function.
1987 (GEN_MFSPR): New macro.
1988 (GEN_MTSPR): New macro.
1989 (GEN_MFCR): New macro.
1990 (GEN_MTCR): New macro.
1991 (GEN_SYNC): New macro.
1992 (GEN_LWSYNC): New macro.
1993 (gen_x_form): New function.
1994 (GEN_OR): New macro.
1995 (GEN_MR): New macro.
1996 (GEN_LWARX): New macro.
1997 (GEN_STWCX): New macro.
1998 (GEN_CMPW): New macro.
1999 (gen_md_form): New function.
2000 (GEN_RLDICL): New macro.
2001 (GEN_RLDICR): New macro.
2002 (gen_i_form): New function.
2003 (GEN_B): New macro.
2004 (GEN_BL): New macro.
2005 (gen_b_form): New function.
2006 (GEN_BNE): New macro.
2007 (GEN_LOAD): New macro.
2008 (GEN_STORE): New macro.
2009 (gen_limm): New function.
2010 (gen_atomic_xchg): New function.
2011 (gen_call): New function.
2012 (ppc_relocate_instruction): New function.
2013 (ppc_install_fast_tracepoint_jump_pad): New function.
2014 (ppc_get_min_fast_tracepoint_insn_len): New function.
2015 (ppc_get_ipa_tdesc_idx): New function.
2016 (the_low_target): Wire in the new functions.
2017 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2018 tdescs.
2019 * linux-ppc-tdesc.h: New file.
2020
2021 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2022
2023 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2024 (alloc_jump_pad_buffer): New function.
2025 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2026 (alloc_jump_pad_buffer): New function.
2027 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2028 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2029 (alloc_jump_pad_buffer): New function.
2030 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2031 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2032 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2033 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2034
2035 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2036
2037 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2038 * linux-amd64-ipa.c: Likewise.
2039 * linux-i386-ipa.c: Likewise.
2040 * linux-s390-ipa.c: Likewise.
2041 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2042 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2043 set_trace_state_variable_value_ptr.
2044 (struct ipa_sym_addresses): Likewise.
2045 (symbol_list): Likewise.
2046 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2047 accessing gdb_collect directly.
2048 (gdb_collect_ptr_type): New typedef.
2049 (get_raw_reg_ptr_type): New typedef.
2050 (get_trace_state_variable_value_ptr_type): New typedef.
2051 (set_trace_state_variable_value_ptr_type): New typedef.
2052 (gdb_collect_ptr): New global.
2053 (get_raw_reg_ptr): New global.
2054 (get_trace_state_variable_value_ptr): New global.
2055 (set_trace_state_variable_value_ptr): New global.
2056 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2057 accessing get_raw_reg directly.
2058 (get_get_tsv_func_addr): Likewise for
2059 get_trace_state_variable_value_ptr.
2060 (get_set_tsv_func_addr): Likewise for
2061 set_trace_state_variable_value_ptr.
2062 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2063
2064 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2065
2066 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2067
2068 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2069
2070 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2071 packets.
2072 (relocate_instruction): Remove own_buf.
2073 * server.c (own_buf): Make global.
2074 (handle_v_requests): Make global.
2075 * server.h (own_buf): New declaration.
2076 (handle_v_requests): New prototype.
2077
2078 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2079
2080 PR 18377
2081 * linux-s390-low.c (add_insns): New function.
2082 (s390_emit_prologue): New function.
2083 (s390_emit_epilogue): New function.
2084 (s390_emit_add): New function.
2085 (s390_emit_sub): New function.
2086 (s390_emit_mul): New function.
2087 (s390_emit_lsh): New function.
2088 (s390_emit_rsh_signed): New function.
2089 (s390_emit_rsh_unsigned): New function.
2090 (s390_emit_ext): New function.
2091 (s390_emit_log_not): New function.
2092 (s390_emit_bit_and): New function.
2093 (s390_emit_bit_or): New function.
2094 (s390_emit_bit_xor): New function.
2095 (s390_emit_bit_not): New function.
2096 (s390_emit_equal): New function.
2097 (s390_emit_less_signed): New function.
2098 (s390_emit_less_unsigned): New function.
2099 (s390_emit_ref): New function.
2100 (s390_emit_if_goto): New function.
2101 (s390_emit_goto): New function.
2102 (s390_write_goto_address): New function.
2103 (s390_emit_litpool): New function.
2104 (s390_emit_const): New function.
2105 (s390_emit_call): New function.
2106 (s390_emit_reg): New function.
2107 (s390_emit_pop): New function.
2108 (s390_emit_stack_flush): New function.
2109 (s390_emit_zero_ext): New function.
2110 (s390_emit_swap): New function.
2111 (s390_emit_stack_adjust): New function.
2112 (s390_emit_set_r2): New function.
2113 (s390_emit_int_call_1): New function.
2114 (s390_emit_void_call_2): New function.
2115 (s390_emit_eq_goto): New function.
2116 (s390_emit_ne_goto): New function.
2117 (s390_emit_lt_goto): New function.
2118 (s390_emit_le_goto): New function.
2119 (s390_emit_gt_goto): New function.
2120 (s390_emit_ge_goto): New function.
2121 (s390x_emit_prologue): New function.
2122 (s390x_emit_epilogue): New function.
2123 (s390x_emit_add): New function.
2124 (s390x_emit_sub): New function.
2125 (s390x_emit_mul): New function.
2126 (s390x_emit_lsh): New function.
2127 (s390x_emit_rsh_signed): New function.
2128 (s390x_emit_rsh_unsigned): New function.
2129 (s390x_emit_ext): New function.
2130 (s390x_emit_log_not): New function.
2131 (s390x_emit_bit_and): New function.
2132 (s390x_emit_bit_or): New function.
2133 (s390x_emit_bit_xor): New function.
2134 (s390x_emit_bit_not): New function.
2135 (s390x_emit_equal): New function.
2136 (s390x_emit_less_signed): New function.
2137 (s390x_emit_less_unsigned): New function.
2138 (s390x_emit_ref): New function.
2139 (s390x_emit_if_goto): New function.
2140 (s390x_emit_const): New function.
2141 (s390x_emit_call): New function.
2142 (s390x_emit_reg): New function.
2143 (s390x_emit_pop): New function.
2144 (s390x_emit_stack_flush): New function.
2145 (s390x_emit_zero_ext): New function.
2146 (s390x_emit_swap): New function.
2147 (s390x_emit_stack_adjust): New function.
2148 (s390x_emit_int_call_1): New function.
2149 (s390x_emit_void_call_2): New function.
2150 (s390x_emit_eq_goto): New function.
2151 (s390x_emit_ne_goto): New function.
2152 (s390x_emit_lt_goto): New function.
2153 (s390x_emit_le_goto): New function.
2154 (s390x_emit_gt_goto): New function.
2155 (s390x_emit_ge_goto): New function.
2156 (s390_emit_ops): New function.
2157 (struct linux_target_ops): Fill in emit_ops hook.
2158
2159 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2160
2161 PR 18377
2162 * Makefile.in: Add s390 IPA files.
2163 * configure.srv: Build IPA for s390.
2164 * linux-s390-ipa.c: New file.
2165 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2166 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2167 (tdesc_s390_linux32): Likewise.
2168 (init_registers_s390_linux32v1): Likewise.
2169 (tdesc_s390_linux32v1): Likewise.
2170 (init_registers_s390_linux32v2): Likewise.
2171 (tdesc_s390_linux32v2): Likewise.
2172 (init_registers_s390_linux64): Likewise.
2173 (tdesc_s390_linux64): Likewise.
2174 (init_registers_s390_linux64v1): Likewise.
2175 (tdesc_s390_linux64v1): Likewise.
2176 (init_registers_s390_linux64v2): Likewise.
2177 (tdesc_s390_linux64v2): Likewise.
2178 (init_registers_s390_te_linux64): Likewise.
2179 (tdesc_s390_te_linux64): Likewise.
2180 (init_registers_s390_vx_linux64): Likewise.
2181 (tdesc_s390_vx_linux64): Likewise.
2182 (init_registers_s390_tevx_linux64): Likewise.
2183 (tdesc_s390_tevx_linux64): Likewise.
2184 (init_registers_s390x_linux64): Likewise.
2185 (tdesc_s390x_linux64): Likewise.
2186 (init_registers_s390x_linux64v1): Likewise.
2187 (tdesc_s390x_linux64v1): Likewise.
2188 (init_registers_s390x_linux64v2): Likewise.
2189 (tdesc_s390x_linux64v2): Likewise.
2190 (init_registers_s390x_te_linux64): Likewise.
2191 (tdesc_s390x_te_linux64): Likewise.
2192 (init_registers_s390x_vx_linux64): Likewise.
2193 (tdesc_s390x_vx_linux64): Likewise.
2194 (init_registers_s390x_tevx_linux64): Likewise.
2195 (tdesc_s390x_tevx_linux64): Likewise.
2196 (have_hwcap_s390_vx): New static variable.
2197 (s390_arch_setup): Fill have_hwcap_s390_vx.
2198 (s390_get_thread_area): New function.
2199 (s390_ft_entry_gpr_esa): New const.
2200 (s390_ft_entry_gpr_zarch): New const.
2201 (s390_ft_entry_misc): New const.
2202 (s390_ft_entry_fr): New const.
2203 (s390_ft_entry_vr): New const.
2204 (s390_ft_main_31): New const.
2205 (s390_ft_main_64): New const.
2206 (s390_ft_exit_fr): New const.
2207 (s390_ft_exit_vr): New const.
2208 (s390_ft_exit_misc): New const.
2209 (s390_ft_exit_gpr_esa): New const.
2210 (s390_ft_exit_gpr_zarch): New const.
2211 (append_insns): New function.
2212 (s390_relocate_instruction): New function.
2213 (s390_install_fast_tracepoint_jump_pad): New function.
2214 (s390_get_min_fast_tracepoint_insn_len): New function.
2215 (s390_get_ipa_tdesc_idx): New function.
2216 (struct linux_target_ops): Wire in the above functions.
2217 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2218 * linux-s390-tdesc.h: New file.
2219
2220 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2221
2222 * linux-s390-low.c (s390_supports_tracepoints): New function.
2223 (struct linux_target_ops): Fill supports_tracepoints hook.
2224
2225 2016-03-18 Yao Qi <yao.qi@linaro.org>
2226
2227 * linux-low.c (lwp_signal_can_be_delivered): New function.
2228 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2229
2230 2016-03-18 Yao Qi <yao.qi@linaro.org>
2231
2232 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2233 0 if signal is enqueued. Remove 'signal' from one debugging
2234 message. Move one debugging message to some lines below.
2235 Remove code setting 'signal' to 0.
2236
2237 2016-03-18 Yao Qi <yao.qi@linaro.org>
2238
2239 * linux-low.c (linux_low_filter_event): Remove redundant
2240 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2241
2242 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2243
2244 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2245 (struct linux_target_ops): Wire in the above.
2246
2247 2016-03-03 Yao Qi <yao.qi@linaro.org>
2248
2249 * linux-low.c: Update comments to start_step_over.
2250
2251 2016-03-03 Yao Qi <yao.qi@linaro.org>
2252
2253 PR server/19736
2254 * linux-low.c (handle_extended_wait): Set child suspended
2255 if event_lwp->bp_reinsert isn't zero.
2256
2257 2016-03-02 Yao Qi <yao.qi@linaro.org>
2258
2259 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2260 enqueue_pending_signal.
2261
2262 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2263
2264 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2265 is actually loaded.
2266
2267 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2268
2269 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2270 (s390_regmap_3264) [!__s390x__]: New global.
2271 (s390_collect_ptrace_register): Skip map entries containing -1.
2272 (s390_supply_ptrace_register): Ditto.
2273 (s390_fill_gprs_high): New function.
2274 (s390_store_gprs_high): New function.
2275 (s390_regsets): Add NT_S390_HIGH_GPRS.
2276 (s390_get_hwcap): Enable on 31-bit.
2277 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2278 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2279 Detect NT_S390_HIGH_GPRS.
2280 (s390_usrregs_info_3264): Enable on 31-bit.
2281 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2282 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2283
2284 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2285
2286 PR gdb/13808
2287 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2288 * configure.srv: Ditto.
2289 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2290 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2291 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2292 (init_registers_amd64_linux): Remove prototype.
2293 (tdesc_amd64_linux): Remove declaration.
2294 (get_ipa_tdesc): New function.
2295 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2296 initialize remaining tdescs.
2297 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2298 (init_registers_i386_linux): Remove prototype.
2299 (tdesc_i386_linux): Remove declaration.
2300 (get_ipa_tdesc): New function.
2301 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2302 initialize remaining tdescs.
2303 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2304 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2305 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2306 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2307 (x86_get_ipa_tdesc_idx): New function.
2308 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2309 * linux-x86-tdesc.h: New file.
2310 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2311 (target_get_ipa_tdesc_idx): New macro.
2312 * tracepoint.c (ipa_tdesc_idx): New macro.
2313 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2314 (symbol_list): Add ipa_tdesc_idx.
2315 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2316 (ipa_tdesc): Remove.
2317 (ipa_tdesc_idx): New variable.
2318 (get_context_regcache): Use get_ipa_tdesc.
2319 (gdb_collect): Ditto.
2320 (gdb_probe): Ditto.
2321 * tracepoint.h (get_ipa_tdesc): New prototype.
2322 (ipa_tdesc): Remove.
2323
2324 2016-02-24 Pedro Alves <palves@redhat.com>
2325
2326 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2327 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2328 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2329 Factor out common code between the USE_SIGTRAP_SIGINFO and
2330 !USE_SIGTRAP_SIGINFO blocks.
2331 (linux_low_filter_event): Call save_stop_reason instead of
2332 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2333 Update comments.
2334 (linux_wait_1): Update comments.
2335
2336 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2337
2338 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2339 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2340 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2341 ppc_insert_point, ppc_remove_point.
2342
2343 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2344
2345 * linux-s390-low.c (s390_supports_z_point_type): New function.
2346 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2347
2348 2016-02-16 Yao Qi <yao.qi@linaro.org>
2349
2350 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2351 PC. Get pc from regcache_read_pc.
2352
2353 2016-02-12 Yao Qi <yao.qi@linaro.org>
2354
2355 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2356 or linux_get_pc_32bit.
2357 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2358
2359 2016-02-12 Yao Qi <yao.qi@linaro.org>
2360
2361 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2362 arm_linux_get_next_pcs_fixup.
2363
2364 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2365
2366 * tracepoint.c (x_tracepoint_action_download): Change
2367 write_inferior_data_ptr to write_inferior_data_pointer.
2368 (cmd_qtstart): Likewise.
2369 (write_inferior_data_ptr): Remove.
2370 (download_agent_expr): Change write_inferior_data_ptr to
2371 write_inferior_data_pointer.
2372 (download_tracepoint_1): Likewise.
2373 (download_tracepoint): Likewise.
2374 (download_trace_state_variables): Likewise.
2375
2376 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2377 Marcin Kościelnicki <koriakin@0x04.net>
2378
2379 * tracepoint.c (struct tracepoint_action_ops): Remove.
2380 (struct tracepoint_action): Remove ops.
2381 (m_tracepoint_action_download, r_tracepoint_action_download)
2382 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2383 size and offset accordingly.
2384 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2385 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2386 (tracepoint_action_send, tracepoint_action_download): New functions.
2387 Helpers for trace action handlers.
2388 (add_tracepoint_action): Remove setup actions ops.
2389 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2390
2391 2016-02-10 Yao Qi <yao.qi@linaro.org>
2392
2393 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2394
2395 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2396
2397 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2398 to AC_OUTPUT.
2399 * configure: Regenerate.
2400
2401 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2402
2403 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2404 void * to gdb_byte *.
2405 * linux-low.c (siginfo_fixup): Likewise.
2406 (linux_xfer_siginfo): Likewise.
2407 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2408 Likewise.
2409 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2410
2411 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2412
2413 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2414 to srv_tgtobj.
2415 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2416 to srv_tgtobj.
2417 * linux-x86-low.c [__x86_64__]: Include
2418 "nat/amd64-linux-siginfo.h".
2419 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2420 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2421 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2422 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2423 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2424 (cpt_si_fd, si_timerid, si_overrun): Move from
2425 nat/amd64-linux-siginfo.c.
2426 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2427
2428 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2429
2430 * server.c (skip_to_semicolon): Remove.
2431 (process_point_options): Use strchrnul instead of
2432 skip_to_semicolon.
2433
2434 2016-01-26 Yao Qi <yao.qi@linaro.org>
2435
2436 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2437 * linux-low.c (install_software_single_step_breakpoints): Don't
2438 call regcache_read_pc.
2439 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2440 argument pc.
2441
2442 2016-01-26 Yao Qi <yao.qi@linaro.org>
2443
2444 * linux-low.c (install_software_single_step_breakpoints): Call
2445 regcache_read_pc instead of get_pc.
2446
2447 2016-01-26 Yao Qi <yao.qi@linaro.org>
2448
2449 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2450 (unblock_async_io): Rename to ...
2451 (block_unblock_async_io): ... it. New function.
2452 (enable_async_io): Don't install SIGIO handler. Unblock it
2453 instead.
2454 (disable_async_io): Don't ignore SIGIO. Block it instead.
2455 (initialize_async_io): Install SIGIO handler. Don't call
2456 unblock_async_io.
2457
2458 2016-01-26 Yao Qi <yao.qi@linaro.org>
2459
2460 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2461 first character is '\003', call *the_target->request_interrupt.
2462
2463 2016-01-25 Yao Qi <yao.qi@linaro.org>
2464
2465 * remote-utils.c (new_thread_notify): Remove.
2466 (dead_thread_notify): Likewise.
2467 * remote-utils.h (new_thread_notify): Remove declaration.
2468 (dead_thread_notify): Likewise.
2469
2470 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2471
2472 * gdb.trace/pending.exp: Fix expected message on continue.
2473
2474 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2475
2476 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2477 it works properly on big-endian machines where sizeof (CORE_ADDR)
2478 != sizeof (void *).
2479
2480 2016-01-21 Pedro Alves <palves@redhat.com>
2481
2482 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2483 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2484 * configure: Regenerate.
2485
2486 2016-01-21 Yao Qi <yao.qi@linaro.org>
2487
2488 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2489 is_thumb and set it according to CPSR saved on the stack.
2490 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2491 arm_sigreturn_next_pc.
2492
2493 2016-01-18 Yao Qi <yao.qi@linaro.org>
2494
2495 * linux-low.c (linux_set_pc_64bit): New function.
2496 (linux_get_pc_64bit): New function.
2497 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2498 Declare.
2499 * linux-sparc-low.c (debug_threads): Remove declaration.
2500 (sparc_get_pc): Remove.
2501 (the_low_target): Use linux_get_pc_64bit instead of
2502 sparc_get_pc.
2503 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2504 (the_low_target): Use linux_get_pc_64bit and
2505 linux_set_pc_64bit.
2506
2507 2016-01-18 Yao Qi <yao.qi@linaro.org>
2508
2509 * linux-arm-low.c (debug_threads): Remove declaration.
2510 (arm_get_pc, arm_set_pc): Remove.
2511 (the_low_target): Use linux_get_pc_32bit and
2512 linux_set_pc_32bit.
2513 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2514 (the_low_target): Use linux_get_pc_32bit and
2515 linux_set_pc_32bit.
2516 * linux-cris-low.c (debug_threads): Remove declaration.
2517 (cris_get_pc, cris_set_pc,): Remove.
2518 (the_low_target): Use linux_get_pc_32bit and
2519 linux_set_pc_32bit.
2520 * linux-crisv32-low.c (debug_threads): Remove declaration.
2521 (cris_get_pc, cris_set_pc): Remove.
2522 (the_low_target): Use linux_get_pc_32bit and
2523 linux_set_pc_32bit.
2524 * linux-low.c: Include inttypes.h.
2525 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2526 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2527 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2528 (the_low_target): Use linux_get_pc_32bit and
2529 linux_set_pc_32bit.
2530 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2531 (the_low_target): Use linux_get_pc_32bit and
2532 linux_set_pc_32bit.
2533 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2534 (the_low_target): Use linux_get_pc_32bit and
2535 linux_set_pc_32bit.
2536 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2537 (the_low_target): Use linux_get_pc_32bit and
2538 linux_set_pc_32bit.
2539 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2540 (the_low_target): Use linux_get_pc_32bit and
2541 linux_set_pc_32bit.
2542
2543 2016-01-18 Gary Benson <gbenson@redhat.com>
2544
2545 * configure.ac (AC_FUNC_FORK): New check.
2546 * config.in: Regenerate.
2547 * configure: Likewise.
2548
2549 2016-01-14 Yao Qi <yao.qi@linaro.org>
2550
2551 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2552 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2553 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2554 arm_get_next_pcs_ctor.
2555
2556 2016-01-12 Josh Stone <jistone@redhat.com>
2557 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2558
2559 * inferiors.h: Include "gdb_vecs.h".
2560 (struct process_info): Add syscalls_to_catch.
2561 * inferiors.c (remove_process): Free syscalls_to_catch.
2562 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2563 syscall_return stops.
2564 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2565 * server.c (handle_general_set): Handle QCatchSyscalls.
2566 (handle_query): Report support for QCatchSyscalls.
2567 * target.h (struct target_ops): Add supports_catch_syscall.
2568 (target_supports_catch_syscall): New macro.
2569 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2570 (struct lwp_info): Add syscall_state.
2571 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2572 Maintain syscall_state and syscalls_to_catch across exec.
2573 (get_syscall_trapinfo): New function, proxy to the_low_target.
2574 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2575 (linux_low_filter_event): Toggle syscall_state entry/return for
2576 syscall traps, and set it ignored for all others.
2577 (gdb_catching_syscalls_p): New function.
2578 (gdb_catch_this_syscall_p): New function.
2579 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2580 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2581 (linux_supports_catch_syscall): New function.
2582 (linux_target_ops): Install it.
2583 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2584 (the_low_target): Install it.
2585
2586 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2587
2588 * acinclude.m4: Include new ../warning.m4 file.
2589 * configure: Regenerated.
2590 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2591
2592 2016-01-12 Mike Frysinger <vapier@gentoo.org>
2593
2594 * ax.c (is_goto_target): Mark static.
2595 * linux-low.c (register_addr): Likewise.
2596 (linux_fetch_registers, linux_store_registers): Likewise.
2597 * mem-break.c (any_persistent_commands): Fix old prototype.
2598 (add_commands_to_breakpoint): Mark static.
2599 * regcache.c (find_register_by_name): Delete unused func.
2600 * remote-utils.c (hex_or_minus_one): Mark static.
2601 * server.c (monitor_show_help): Mark static.
2602 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2603 handle_v_requests): Likewise.
2604
2605 2016-01-12 Pedro Alves <palves@redhat.com>
2606
2607 Remove use of the registered trademark symbol throughout.
2608
2609 2016-01-08 Yao Qi <yao.qi@linaro.org>
2610
2611 * remote-utils.c (getpkt): If c is '\003', call target hook
2612 request_interrupt.
2613
2614 2016-01-06 Yao Qi <yao.qi@linaro.org>
2615
2616 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2617 linux-aarch32-low.c.
2618 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2619 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2620 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2621 (thumb2_breakpoint): Declare.
2622 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2623 linux-aarch32-low.h.
2624 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2625 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2626 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2627
2628 2016-01-01 Joel Brobecker <brobecker@adacore.com>
2629
2630 * gdbreplay.c (gdbreplay_version): Change copyright year in
2631 version message.
2632 * server.c (gdbserver_version): Likewise.
2633
2634 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2635
2636 * server.c (crc32_table): Delete.
2637 (crc32): Use libiberty's xcrc32 function.
2638
2639 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2640
2641 * lynx-low.c (lynx_delete_thread_callback): New function.
2642 (lynx_mourn): Properly delete our process and all of its
2643 threads. Remove call to clear_inferiors.
2644
2645 2015-12-22 Joel Brobecker <brobecker@adacore.com>
2646
2647 * target.c (thread_search_callback): Add check that
2648 the thread_stopped target callback is not NULL before
2649 calling it.
2650
2651 2015-12-21 Yao Qi <yao.qi@linaro.org>
2652
2653 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2654 arm breakpoint.
2655
2656 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2657
2658 * server.c (handle_query): Call target_supports_software_single_step.
2659
2660 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2661
2662 * linux-low.c (single_step): New function.
2663 (linux_resume_one_lwp_throw): Call single_step.
2664 (start_step_over): Likewise.
2665
2666 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2667
2668 * Makefile.in (SFILES): Append arch/arm-linux.c,
2669 arch/arm-get-next-pcs.c.
2670 (arm-linux.o): New rule.
2671 (arm-get-next-pcs.o): New rule.
2672 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2673 arm-linux.o.
2674 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2675 to linux-aarch32-low.c.
2676 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2677 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2678 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2679 (thumb2_breakpoint_len): Likewise.
2680 (arm_is_thumb_mode): Make non-static.
2681 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2682 from linux-aarch32-low.c.
2683 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2684 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2685 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2686 (thumb2_breakpoint_len): Likewise.
2687 (arm_is_thumb_mode): New declaration.
2688 * linux-arm-low.c: Include arch/arm-linux.h
2689 aarch/arm-get-next-pcs.h, sys/syscall.h.
2690 (get_next_pcs_ops): New struct.
2691 (get_next_pcs_addr_bits_remove): New function.
2692 (get_next_pcs_is_thumb): New function.
2693 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2694 (arm_sigreturn_next_pc): Likewise.
2695 (get_next_pcs_syscall_next_pc): Likewise.
2696 (arm_gdbserver_get_next_pcs): Likewise.
2697 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2698 Initialize.
2699 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2700 * server.h: Include gdb_vecs.h.
2701
2702 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2703
2704 * Makefile.in (SFILES): Append common/common-regcache.c.
2705 (OBS): Append common-regcache.o.
2706 (common-regcache.o): New rule.
2707 * regcache.c (init_register_cache): Initialize cache to
2708 REG_UNAVAILABLE.
2709 (regcache_raw_read_unsigned): New function.
2710 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2711 register_status enum.
2712
2713 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2714
2715 * linux-aarch64-low.c (the_low_targets): Rename
2716 breakpoint_reinsert_addr to get_next_pcs.
2717 * linux-arm-low.c (the_low_targets): Likewise.
2718 * linux-bfin-low.c (the_low_targets): Likewise.
2719 * linux-cris-low.c (the_low_targets): Likewise.
2720 * linux-crisv32-low.c (the_low_targets): Likewise.
2721 * linux-low.c (can_software_single_step): Likewise.
2722 (install_software_single_step_breakpoints): New function.
2723 (start_step_over): Use install_software_single_step_breakpoints.
2724 * linux-low.h: New CORE_ADDR vector.
2725 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2726 get_next_pcs.
2727 * linux-mips-low.c (the_low_targets): Likewise.
2728 * linux-nios2-low.c (the_low_targets): Likewise.
2729 * linux-sparc-low.c (the_low_targets): Likewise.
2730
2731 2015-12-17 Pedro Alves <palves@redhat.com>
2732
2733 * linux-low.c (linux_kill_one_lwp): Remove references to
2734 LinuxThreads.
2735 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2736 to 'kill'.
2737 (linux_init_signals): Delete.
2738 (initialize_low): Adjust.
2739 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2740
2741 2015-12-16 Pedro Alves <palves@redhat.com>
2742
2743 * configure.ac (compiler warning flags): When testing a
2744 -Wno-foo option, check whether -Wfoo works instead.
2745 * configure: Regenerate.
2746
2747 2015-12-11 Don Breazeal <donb@codesourcery.com>
2748
2749 * server.c (process_serial_event): Don't exit from gdbserver
2750 in remote mode if there are still active inferiors.
2751
2752 2015-12-11 Yao Qi <yao.qi@linaro.org>
2753
2754 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2755 arm_breakpoint_at if the process is 32-bit.
2756
2757 2015-12-11 Yao Qi <yao.qi@linaro.org>
2758
2759 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2760 arm breakpoint.
2761
2762 2015-12-07 Yao Qi <yao.qi@linaro.org>
2763
2764 * configure.srv: Append arm.o to srv_tgtobj for
2765 aarch64*-*-linux* target.
2766 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2767 from linux-arm-low.c.
2768 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2769 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2770 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2771 (thumb2_breakpoint_len): Likewise.
2772 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2773 (arm_breakpoint_kinds): Likewise.
2774 (arm_breakpoint_kind_from_pc): Likewise.
2775 (arm_sw_breakpoint_from_kind): Likewise.
2776 (arm_breakpoint_kind_from_current_state): Likewise.
2777 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2778 (arm_sw_breakpoint_from_kind): Declare.
2779 (arm_breakpoint_kind_from_current_state): Declare.
2780 (arm_breakpoint_at): Declare.
2781 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2782 arm_sw_breakpoint_from_kind if process is 32-bit.
2783 (aarch64_breakpoint_kind_from_pc): New function.
2784 (aarch64_breakpoint_kind_from_current_state): New function.
2785 (the_low_target): Initialize fields breakpoint_kind_from_pc
2786 and breakpoint_kind_from_current_state.
2787 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2788 linux-aarch32-low.c.
2789 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2790 (arm_breakpoint, arm_breakpoint_len): Likewise.
2791 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2792 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2793 (arm_is_thumb_mode): Likewise.
2794 (arm_breakpoint_at): Likewise.
2795 (arm_breakpoint_kind_from_pc): Likewise.
2796 (arm_sw_breakpoint_from_kind): Likewise.
2797 (arm_breakpoint_kind_from_current_state): Likewise.
2798
2799 Revert:
2800 2015-08-04 Yao Qi <yao.qi@linaro.org>
2801
2802 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2803 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2804 * server.c (extended_protocol): Remove "static".
2805 * server.h (extended_protocol): Declare it.
2806
2807 2015-12-04 Josh Stone <jistone@redhat.com>
2808
2809 * target.h (struct target_ops) <arch_setup>: Rename to ...
2810 (struct target_ops) <post_create_inferior>: ... this.
2811 (target_arch_setup): Rename to ...
2812 (target_post_create_inferior): ... this, calling post_create_inferior.
2813 * server.c (start_inferior): Update target_arch_setup calls to
2814 target_post_create_inferior.
2815 * linux-low.c (linux_low_ptrace_options): Forward declare.
2816 (linux_arch_setup): Update its comment for general use.
2817 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2818 (struct linux_target_ops): Use linux_post_create_inferior.
2819 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2820 to post_create_inferior.
2821 * nto-low.c (struct nto_target_ops): Likewise.
2822 * spu-low.c (struct spu_target_ops): Likewise.
2823 * win32-low.c (struct win32_target_ops): Likewise.
2824
2825 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2826
2827 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2828
2829 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2830
2831 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2832 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2833 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2834 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2835 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2836 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2837 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2838 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2839 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2840 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2841 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2842 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2843
2844 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2845
2846 * linux-low.c (linux_look_up_symbols): Don't call
2847 linux_supports_traceclone.
2848 * linux-low.h (thread_db_init): Remove use_events argument.
2849 * thread-db.c (thread_db_use_event): Remove global variable.
2850 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2851 (struct thread_db) <td_create_bp>: Remove field.
2852 (thread_db_create_event): Remove function.
2853 (thread_db_enable_reporting): Likewise.
2854 (find_one_thread): Don't check for thread_db_use_events.
2855 (attach_thread): Likewise.
2856 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2857 (try_thread_db_load_1): Don't check for thread_db_use_events.
2858 (thread_db_init): Remove use_events argument and thread events
2859 handling.
2860 (remove_thread_event_breakpoints): Remove function.
2861 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2862
2863 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2864
2865 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2866 New function.
2867 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2868 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2869 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2870 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2871 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2872 Initialize.
2873 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2874 New function.
2875 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2876 * linux-low.c (can_hardware_single_step): Use
2877 supports_hardware_single_step.
2878 (can_software_single_step): New function.
2879 (start_step_over): Call can_software_single_step.
2880 (linux_supports_hardware_single_step): New function.
2881 (struct target_ops) <supports_software_single_step>: Initialize.
2882 * linux-low.h (struct linux_target_ops)
2883 <supports_hardware_single_step>: Initialize.
2884 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2885 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2886 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2887 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2888 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2889 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2890 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2891 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2892 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2893 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2894 Initialize.
2895 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2896 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2897 Initialize.
2898 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2899 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2900 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2901 New function.
2902 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2903 * target.h (struct target_ops): <supports_software_single_step>:
2904 New field.
2905 (target_supports_software_single_step): New macro.
2906
2907 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2908
2909 * linux-low.c (linux_wait_1): Fix pc advance condition.
2910 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2911 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2912
2913 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2914
2915 * linux-arm-low.c (arm_is_thumb_mode): New function.
2916 (arm_breakpoint_at): Use arm_is_thumb_mode.
2917 (arm_breakpoint_kind_from_current_state): New function.
2918 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2919 Initialize.
2920 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2921 (linux_breakpoint_kind_from_current_state): New function.
2922 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2923 * linux-low.h (struct linux_target_ops)
2924 <breakpoint_kind_from_current_state>: New field.
2925 * target.h (struct target_ops): Likewise.
2926 (target_breakpoint_kind_from_current_state): New macro.
2927
2928 2015-11-30 Pedro Alves <palves@redhat.com>
2929
2930 * linux-low.c (linux_resume): Wake up the event loop before
2931 returning.
2932
2933 2015-11-30 Pedro Alves <palves@redhat.com>
2934
2935 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2936 check.
2937 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2938 to -1.
2939 * target.c (struct thread_search): New structure.
2940 (thread_search_callback): New function.
2941 (prev_general_thread): New global.
2942 (prepare_to_access_memory, done_accessing_memory): New functions.
2943 * target.h (prepare_to_access_memory, done_accessing_memory):
2944 Replace macros with function declarations.
2945
2946 2015-11-30 Pedro Alves <palves@redhat.com>
2947
2948 PR 14618
2949 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2950 report TARGET_WAITKIND_NO_RESUMED.
2951 * remote-utils.c (prepare_resume_reply): Handle
2952 TARGET_WAITKIND_NO_RESUMED.
2953 * server.c (report_no_resumed): New global.
2954 (handle_query) <qSupported>: Handle "no-resumed+". Report
2955 "no-resumed+" support.
2956 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2957 return error if the client doesn't support no-resumed events.
2958 (push_stop_notification): New function.
2959 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
2960 events if the client supports them.
2961
2962 2015-11-30 Pedro Alves <palves@redhat.com>
2963
2964 * linux-low.c (thread_still_has_status_pending_p): Don't check
2965 vCont;t here.
2966 (lwp_resumed): New function.
2967 (status_pending_p_callback): Return early if the LWP is not
2968 supposed to be resumed.
2969
2970 2015-11-30 Pedro Alves <palves@redhat.com>
2971
2972 * linux-low.c (handle_extended_wait): Assert that the LWP's
2973 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
2974 thread create events, leave the new child's status pending.
2975 (linux_low_filter_event): If GDB wants to hear about thread exit
2976 events, leave the LWP marked dead and don't delete it.
2977 (linux_wait_for_event_filtered): Don't check for thread exit.
2978 (filter_exit_event): New function.
2979 (linux_wait_1): Use it, when returning an exit event.
2980 (linux_resume_one_lwp_throw): Assert that the LWP's
2981 waitstatus is TARGET_WAITKIND_IGNORE.
2982 * remote-utils.c (prepare_resume_reply): Handle
2983 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2984 * server.c (report_thread_events): New global.
2985 (handle_general_set): Handle QThreadEvents.
2986 (handle_query) <qSupported>: Handle and report QThreadEvents+;
2987 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2988 TARGET_WAITKIND_THREAD_EXITED.
2989 * server.h (report_thread_events): Declare.
2990
2991 2015-11-30 Pedro Alves <palves@redhat.com>
2992
2993 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2994 the thread's last_resume_kind was resume_stop.
2995
2996 2015-11-30 Pedro Alves <palves@redhat.com>
2997
2998 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2999 before returning.
3000
3001 2015-11-30 Pedro Alves <palves@redhat.com>
3002
3003 * server.c (handle_v_requests): Handle vCtrlC.
3004
3005 2015-11-30 Pedro Alves <palves@redhat.com>
3006
3007 * gdbthread.h (find_any_thread_of_pid): Declare.
3008 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3009 functions.
3010 * server.c (handle_query): If current_thread is NULL, look for
3011 another thread of the selected process.
3012
3013 2015-11-26 Daniel Colascione <dancol@dancol.org>
3014 Simon Marchi <simon.marchi@ericsson.com>
3015
3016 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3017 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3018 name in reply.
3019 * target.h (struct target_ops) <thread_name>: New field.
3020 (target_thread_name): New macro.
3021
3022 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3023
3024 * regcache.h (regcache_invalidate_pid): Add declaration.
3025 * regcache.c (regcache_invalidate_pid): New function, extracted
3026 from regcache_invalidate.
3027 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3028 Add trivial documentation comment.
3029 * lynx-low.c: Use regcache_invalidate_pid instead of
3030 regcache_invalidate.
3031
3032 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3033
3034 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3035 and Elf64_auxv_t if the target is Android.
3036
3037 2015-11-22 Doug Evans <xdje42@gmail.com>
3038
3039 * target.h: #include <sys/types.h>.
3040
3041 2015-11-19 Pedro Alves <palves@redhat.com>
3042
3043 * linux-low.c (linux_process_qsupported): Change prototype.
3044 Adjust.
3045 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3046 Change prototype.
3047 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3048 and adjust to loop over all features.
3049 * server.c (handle_query) <qSupported>: Adjust to call
3050 target_process_qsupported once, passing it a vector of unprocessed
3051 features.
3052 * target.h (struct target_ops) <process_qsupported>: Change
3053 prototype.
3054 (target_process_qsupported): Adjust.
3055
3056 2015-11-19 Pedro Alves <palves@redhat.com>
3057
3058 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3059 mode.
3060 * configure: Regenerate.
3061
3062 2015-11-19 Pedro Alves <palves@redhat.com>
3063
3064 * configure: Regenerate.
3065
3066 2015-11-19 Yao Qi <yao.qi@linaro.org>
3067
3068 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3069 type to uint32_t.
3070
3071 2015-11-19 Yao Qi <yao.qi@linaro.org>
3072
3073 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3074 (struct aarch64_operand): Move enum out.
3075
3076 2015-11-19 Yao Qi <yao.qi@linaro.org>
3077
3078 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3079 struct user_fpsimd_state *.
3080 (aarch64_store_fpregset): Likewise.
3081
3082 2015-11-19 Yao Qi <yao.qi@linaro.org>
3083
3084 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3085 struct user_pt_regs *.
3086 (aarch64_store_gregset): Likewise.
3087
3088 2015-11-18 Pedro Alves <palves@redhat.com>
3089
3090 * Makefile.in (all_object_files): Add $IPA_OBJS.
3091
3092 2015-11-17 Pedro Alves <palves@redhat.com>
3093
3094 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3095 GDB_SIGNAL_0 and gdb_signal_to_string.
3096
3097 2015-11-17 Pedro Alves <palves@redhat.com>
3098
3099 * win32-low.c (handle_output_debug_string): Remove parameter.
3100 (win32_kill): Remove our_status local and adjust call to
3101 handle_output_debug_string.
3102 (get_child_debug_event): Adjust call to
3103 handle_output_debug_string.
3104
3105 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3106
3107 * linux-mips-low.c (mips_fill_gregset): Add cast.
3108 (mips_store_gregset): Likewise.
3109 (mips_fill_fpregset): Likewise.
3110 (mips_store_fpregset): Likewise.
3111
3112 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3113
3114 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3115 priv.
3116
3117 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3118
3119 * linux-mips-low.c (mips_linux_new_thread): Change type of
3120 watch_type to enum target_hw_bp_type.
3121
3122 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3123
3124 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3125 Change return type to arm_hwbp_type.
3126
3127 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3128
3129 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3130 (arm_store_gregset): Likewise.
3131 * linux-arm-low.c (arm_get_hwcap): Likewise.
3132 (arm_read_description): Likewise.
3133
3134 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3135
3136 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3137
3138 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3139
3140 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3141 (ppc_fill_vsxregset): Likewise.
3142 (ppc_store_vsxregset): Likewise.
3143 (ppc_fill_vrregset): Likewise.
3144 (ppc_store_vrregset): Likewise.
3145 (ppc_fill_evrregset): Likewise.
3146 (ppc_store_evrregset): Likewise.
3147
3148 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3149
3150 * linux-ppc-low.c (ppc_usrregs_info): Remove
3151 forward-declaration.
3152 (ppc_arch_setup): Move lower in file.
3153
3154 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3155
3156 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3157 (ps_pdwrite): Likewise.
3158
3159 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3160
3161 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3162 to after assert checks.
3163
3164 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3165
3166 * proc-service.c (ps_pdread): Add/adjust casts.
3167 (ps_pdwrite): Add/adjust casts.
3168
3169 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3170
3171 * server.c (handle_search_memory_1): Cast return value of
3172 memmem.
3173
3174 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3175
3176 * server.c (write_qxfer_response): Change type of data to
3177 gdb_byte *.
3178
3179 2015-10-29 Pedro Alves <palves@redhat.com>
3180
3181 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3182
3183 2015-10-29 Pedro Alves <palves@redhat.com>
3184
3185 * tracepoint.c (clear_installed_tracepoints): Add casts.
3186
3187 2015-10-29 Pedro Alves <palves@redhat.com>
3188
3189 * server.c (handle_v_cont, process_serial_event): Add enum
3190 gdb_signal casts to signal parsing code.
3191
3192 2015-10-29 Pedro Alves <palves@redhat.com>
3193
3194 * linux-low.h (NULL_REGSET): Define.
3195 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3196 * linux-arm-low.c (arm_regsets): Likewise.
3197 * linux-crisv32-low.c (cris_regsets): Likewise.
3198 * linux-m68k-low.c (m68k_regsets): Likewise.
3199 * linux-mips-low.c (mips_regsets): Likewise.
3200 * linux-nios2-low.c (nios2_regsets): Likewise.
3201 * linux-ppc-low.c (ppc_regsets): Likewise.
3202 * linux-s390-low.c (s390_regsets): Likewise.
3203 * linux-sh-low.c (sh_regsets): Likewise.
3204 * linux-sparc-low.c (sparc_regsets): Likewise.
3205 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3206 * linux-tile-low.c (tile_regsets): Likewise.
3207 * linux-x86-low.c (x86_regsets): Likewise.
3208 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3209
3210 2015-10-29 Pedro Alves <palves@redhat.com>
3211
3212 * linux-low.h (NULL_REGSET): Define.
3213 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3214 * linux-arm-low.c (arm_regsets): Likewise.
3215 * linux-crisv32-low.c (cris_regsets): Likewise.
3216 * linux-m68k-low.c (m68k_regsets): Likewise.
3217 * linux-mips-low.c (mips_regsets): Likewise.
3218 * linux-nios2-low.c (nios2_regsets): Likewise.
3219 * linux-ppc-low.c (ppc_regsets): Likewise.
3220 * linux-s390-low.c (s390_regsets): Likewise.
3221 * linux-sh-low.c (sh_regsets): Likewise.
3222 * linux-sparc-low.c (sparc_regsets): Likewise.
3223 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3224 * linux-tile-low.c (tile_regsets): Likewise.
3225 * linux-x86-low.c (x86_regsets): Likewise.
3226 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3227
3228 2015-10-26 Doug Evans <dje@google.com>
3229
3230 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3231
3232 2015-10-26 Doug Evans <dje@google.com>
3233
3234 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3235
3236 2015-10-26 Doug Evans <dje@google.com>
3237
3238 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3239 for debug_printf.
3240 (attach_thread, find_new_threads_callback): Ditto.
3241
3242 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3243
3244 * mem-break.h (set_breakpoint_data): Remove.
3245
3246 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3247
3248 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3249 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3250 (initialize_low): Remove set_breakpoint_data call.
3251 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3252 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3253 (initialize_low): Remove set_breakpoint_data call.
3254 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3255 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3256 (initialize_low): Remove set_breakpoint_data call.
3257
3258 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3259
3260 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3261 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3262 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3263 * target.h (target_breakpoint_kind_from_pc): New macro.
3264
3265 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3266
3267 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3268 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3269 the default breakpoint kind.
3270
3271 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3272
3273 * linux-arm-low.c (arm_supports_z_point_type): Add software
3274 breakpoint support.
3275
3276 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3277
3278 * linux-arm-low.c: Refactor breakpoint definitions.
3279 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3280 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3281
3282 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3283
3284 * Makefile.in: Add arm.c/o.
3285 * configure.srv: Likewise.
3286 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3287 (arm_breakpoint_kind_from_pc): New function.
3288 (arm_sw_breakpoint_from_kind): Return proper kind.
3289 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3290
3291 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3292
3293 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3294 removal.
3295 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3296 (struct raw_breakpoint) <size>: Remove.
3297 (struct raw_breakpoint) <kind>: Add.
3298 (bp_size): New function.
3299 (bp_opcode): Likewise.
3300 (find_raw_breakpoint_at): Adjust for kind.
3301 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3302 (remove_memory_breakpoint): Adjust for kind call bp_size.
3303 (set_raw_breakpoint_at): Adjust for kind.
3304 (set_breakpoint): Likewise.
3305 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3306 (delete_raw_breakpoint): Adjust for kind.
3307 (delete_breakpoint): Likewise.
3308 (find_gdb_breakpoint): Likewise.
3309 (set_gdb_breakpoint_1): Likewise.
3310 (set_gdb_breakpoint): Likewise.
3311 (delete_gdb_breakpoint_1): Likewise.
3312 (delete_gdb_breakpoint): Likewise.
3313 (uninsert_raw_breakpoint): Likewise.
3314 (reinsert_raw_breakpoint): Likewise.
3315 (set_breakpoint_data): Remove.
3316 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3317 (check_mem_read): Adjust for kind call bp_size.
3318 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3319 (clone_one_breakpoint): Adjust for kind.
3320 * mem-break.h (set_gdb_breakpoint): Likewise.
3321 (delete_gdb_breakpoint): Likewise.
3322 * server.c (process_serial_event): Likewise.
3323
3324 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3325
3326 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3327 (struct linux_target_ops) <breakpoint>: Remove.
3328 (struct linux_target_ops) <breakpoint_len>: Remove.
3329 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3330 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3331 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3332 (arm_sw_breakpoint_from_kind): New function.
3333 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3334 (struct linux_target_ops) <breakpoint>: Remove.
3335 (struct linux_target_ops) <breakpoint_len>: Remove.
3336 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3337 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3338 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3339 (struct linux_target_ops) <breakpoint>: Remove.
3340 (struct linux_target_ops) <breakpoint_len>: Remove.
3341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3342 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3343 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3344 (struct linux_target_ops) <breakpoint>: Remove.
3345 (struct linux_target_ops) <breakpoint_len>: Remove.
3346 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3347 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3348 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3349 and sw_breakpoint_from_kind to increment the pc.
3350 (linux_breakpoint_kind_from_pc): New function.
3351 (linux_sw_breakpoint_from_kind): New function.
3352 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3353 (initialize_low): Call breakpoint_kind_from_pc and
3354 sw_breakpoint_from_kind to replace breakpoint_data/len.
3355 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3356 New field.
3357 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3358 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3359 (struct linux_target_ops) <breakpoint>: Remove.
3360 (struct linux_target_ops) <breakpoint_len>: Remove.
3361 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3362 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3363 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3364 (struct linux_target_ops) <breakpoint>: Remove.
3365 (struct linux_target_ops) <breakpoint_len>: Remove.
3366 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3367 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3368 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3369 (struct linux_target_ops) <breakpoint>: Remove.
3370 (struct linux_target_ops) <breakpoint_len>: Remove.
3371 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3372 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3373 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3374 (struct linux_target_ops) <breakpoint>: Remove.
3375 (struct linux_target_ops) <breakpoint_len>: Remove.
3376 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3377 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3378 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3379 (struct linux_target_ops) <breakpoint>: Remove.
3380 (struct linux_target_ops) <breakpoint_len>: Remove.
3381 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3382 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3383 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3384 (struct linux_target_ops) <breakpoint>: Remove.
3385 (struct linux_target_ops) <breakpoint_len>: Remove.
3386 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3387 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3388 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3389 (struct linux_target_ops) <breakpoint>: Remove.
3390 (struct linux_target_ops) <breakpoint_len>: Remove.
3391 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3392 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3393 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3394 (struct linux_target_ops) <breakpoint>: Remove.
3395 (struct linux_target_ops) <breakpoint_len>: Remove.
3396 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3397 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3398 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3399 (struct linux_target_ops) <breakpoint>: Remove.
3400 (struct linux_target_ops) <breakpoint_len>: Remove.
3401 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3402 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3403 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3404 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3405 (struct linux_target_ops) <breakpoint>: Remove.
3406 (struct linux_target_ops) <breakpoint_len>: Remove.
3407 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3408 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3409 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3410 (struct linux_target_ops) <breakpoint>: Remove.
3411 (struct linux_target_ops) <breakpoint_len>: Remove.
3412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3414
3415 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3416
3417 * linux-cris-low.c (cris_get_pc): Remove void arg.
3418
3419 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3420
3421 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3422 variable name.
3423
3424 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3425
3426 * inferiors.c (thread_pid_matches_callback): New function.
3427 (find_thread_process): New function.
3428 (remove_thread): Reset current_thread.
3429 (remove_process): Assert threads have been removed first.
3430
3431 2015-10-15 Yao Qi <yao.qi@linaro.org>
3432
3433 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3434 if it is 3.
3435 (aarch64_remove_point): Likewise.
3436 * regcache.c (regcache_register_size): New function.
3437
3438 2015-10-12 Yao Qi <yao.qi@linaro.org>
3439
3440 * linux-aarch64-low.c: Update all callers as emit_load_store
3441 is renamed to aarch64_emit_load_store.
3442
3443 2015-10-12 Yao Qi <yao.qi@linaro.org>
3444
3445 * linux-aarch64-low.c: Update all callers of function renaming
3446 from emit_insn to aarch64_emit_insn.
3447
3448 2015-10-12 Yao Qi <yao.qi@linaro.org>
3449
3450 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3451 arch/aarch64-insn.h.
3452 (struct aarch64_memory_operand): Likewise.
3453 (ENCODE): Likewise.
3454 (emit_insn): Move to arch/aarch64-insn.c.
3455 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3456 (emit_load_store): Move to arch/aarch64-insn.c.
3457 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3458 (can_encode_int32): Remove.
3459
3460 2015-10-12 Yao Qi <yao.qi@linaro.org>
3461
3462 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3463 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3464 (aarch64_relocate_instruction): Likewise.
3465 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3466 (struct aarch64_insn_visitor): Likewise.
3467
3468 2015-10-12 Yao Qi <yao.qi@linaro.org>
3469
3470 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3471 (struct aarch64_insn_visitor): New.
3472 (struct aarch64_insn_relocation_data): New.
3473 (aarch64_ftrace_insn_reloc_b): New function.
3474 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3475 (aarch64_ftrace_insn_reloc_cb): Likewise.
3476 (aarch64_ftrace_insn_reloc_tb): Likewise.
3477 (aarch64_ftrace_insn_reloc_adr): Likewise.
3478 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3479 (aarch64_ftrace_insn_reloc_others): Likewise.
3480 (visitor): New.
3481 (aarch64_relocate_instruction): Use visitor.
3482
3483 2015-10-12 Yao Qi <yao.qi@linaro.org>
3484
3485 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3486 int. Add argument buf.
3487 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3488 aarch64_relocate_instruction.
3489
3490 2015-10-12 Yao Qi <yao.qi@linaro.org>
3491
3492 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3493 argument insn. Remove local variable insn. Don't call
3494 target_read_uint32.
3495 (aarch64_install_fast_tracepoint_jump_pad): Call
3496 target_read_uint32.
3497
3498 2015-09-30 Yao Qi <yao.qi@linaro.org>
3499
3500 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3501 (emit_load_store_pair): Likewise.
3502
3503 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3504
3505 * dll.c (match_dll): Add cast(s).
3506 (unloaded_dll): Likewise.
3507 * linux-low.c (second_thread_of_pid_p): Likewise.
3508 (delete_lwp_callback): Likewise.
3509 (count_events_callback): Likewise.
3510 (select_event_lwp_callback): Likewise.
3511 (linux_set_resume_request): Likewise.
3512 * server.c (accumulate_file_name_length): Likewise.
3513 (emit_dll_description): Likewise.
3514 (handle_qxfer_threads_worker): Likewise.
3515 (visit_actioned_threads): Likewise.
3516 * thread-db.c (any_thread_of): Likewise.
3517 * tracepoint.c (same_process_p): Likewise.
3518 (match_blocktype): Likewise.
3519 (build_traceframe_info_xml): Likewise.
3520
3521 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3522
3523 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3524 assignment.
3525 (gdb_unparse_agent_expr): Likewise.
3526 * hostio.c (require_data): Likewise.
3527 (handle_pread): Likewise.
3528 * linux-low.c (disable_regset): Likewise.
3529 (fetch_register): Likewise.
3530 (store_register): Likewise.
3531 (get_dynamic): Likewise.
3532 (linux_qxfer_libraries_svr4): Likewise.
3533 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3534 (set_fast_tracepoint_jump): Likewise.
3535 (uninsert_fast_tracepoint_jumps_at): Likewise.
3536 (reinsert_fast_tracepoint_jumps_at): Likewise.
3537 (validate_inserted_breakpoint): Likewise.
3538 (clone_agent_expr): Likewise.
3539 * regcache.c (init_register_cache): Likewise.
3540 * remote-utils.c (putpkt_binary_1): Likewise.
3541 (decode_M_packet): Likewise.
3542 (decode_X_packet): Likewise.
3543 (look_up_one_symbol): Likewise.
3544 (relocate_instruction): Likewise.
3545 (monitor_output): Likewise.
3546 * server.c (handle_search_memory): Likewise.
3547 (handle_qxfer_exec_file): Likewise.
3548 (handle_qxfer_libraries): Likewise.
3549 (handle_qxfer): Likewise.
3550 (handle_query): Likewise.
3551 (handle_v_cont): Likewise.
3552 (handle_v_run): Likewise.
3553 (captured_main): Likewise.
3554 * target.c (write_inferior_memory): Likewise.
3555 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3556 * tracepoint.c (init_trace_buffer): Likewise.
3557 (add_tracepoint_action): Likewise.
3558 (add_traceframe): Likewise.
3559 (add_traceframe_block): Likewise.
3560 (cmd_qtdpsrc): Likewise.
3561 (cmd_qtdv): Likewise.
3562 (cmd_qtstatus): Likewise.
3563 (response_source): Likewise.
3564 (response_tsv): Likewise.
3565 (cmd_qtnotes): Likewise.
3566 (gdb_collect): Likewise.
3567 (initialize_tracepoint): Likewise.
3568
3569 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3570
3571 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3572 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3573 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3574 <NOP>: New.
3575 (enum aarch64_condition_codes): New enum.
3576 (w0): New static global.
3577 (fp): Likewise.
3578 (lr): Likewise.
3579 (struct aarch64_memory_operand) <type>: New
3580 MEMORY_OPERAND_POSTINDEX type.
3581 (postindex_memory_operand): New helper function.
3582 (emit_ret): New function.
3583 (emit_load_store_pair): New function, factored out of emit_stp
3584 with support for MEMORY_OPERAND_POSTINDEX.
3585 (emit_stp): Rewrite using emit_load_store_pair.
3586 (emit_ldp): New function.
3587 (emit_load_store): Likewise.
3588 (emit_ldr): Mention post-index instruction in comment.
3589 (emit_ldrh): New function.
3590 (emit_ldrb): New function.
3591 (emit_ldrsw): Mention post-index instruction in comment.
3592 (emit_str): Likewise.
3593 (emit_subs): New function.
3594 (emit_cmp): Likewise.
3595 (emit_and): Likewise.
3596 (emit_orr): Likewise.
3597 (emit_orn): Likewise.
3598 (emit_eor): Likewise.
3599 (emit_mvn): Likewise.
3600 (emit_lslv): Likewise.
3601 (emit_lsrv): Likewise.
3602 (emit_asrv): Likewise.
3603 (emit_mul): Likewise.
3604 (emit_sbfm): Likewise.
3605 (emit_sbfx): Likewise.
3606 (emit_ubfm): Likewise.
3607 (emit_ubfx): Likewise.
3608 (emit_csinc): Likewise.
3609 (emit_cset): Likewise.
3610 (emit_nop): Likewise.
3611 (emit_ops_insns): New helper function.
3612 (emit_pop): Likewise.
3613 (emit_push): Likewise.
3614 (aarch64_emit_prologue): New function.
3615 (aarch64_emit_epilogue): Likewise.
3616 (aarch64_emit_add): Likewise.
3617 (aarch64_emit_sub): Likewise.
3618 (aarch64_emit_mul): Likewise.
3619 (aarch64_emit_lsh): Likewise.
3620 (aarch64_emit_rsh_signed): Likewise.
3621 (aarch64_emit_rsh_unsigned): Likewise.
3622 (aarch64_emit_ext): Likewise.
3623 (aarch64_emit_log_not): Likewise.
3624 (aarch64_emit_bit_and): Likewise.
3625 (aarch64_emit_bit_or): Likewise.
3626 (aarch64_emit_bit_xor): Likewise.
3627 (aarch64_emit_bit_not): Likewise.
3628 (aarch64_emit_equal): Likewise.
3629 (aarch64_emit_less_signed): Likewise.
3630 (aarch64_emit_less_unsigned): Likewise.
3631 (aarch64_emit_ref): Likewise.
3632 (aarch64_emit_if_goto): Likewise.
3633 (aarch64_emit_goto): Likewise.
3634 (aarch64_write_goto_address): Likewise.
3635 (aarch64_emit_const): Likewise.
3636 (aarch64_emit_call): Likewise.
3637 (aarch64_emit_reg): Likewise.
3638 (aarch64_emit_pop): Likewise.
3639 (aarch64_emit_stack_flush): Likewise.
3640 (aarch64_emit_zero_ext): Likewise.
3641 (aarch64_emit_swap): Likewise.
3642 (aarch64_emit_stack_adjust): Likewise.
3643 (aarch64_emit_int_call_1): Likewise.
3644 (aarch64_emit_void_call_2): Likewise.
3645 (aarch64_emit_eq_goto): Likewise.
3646 (aarch64_emit_ne_goto): Likewise.
3647 (aarch64_emit_lt_goto): Likewise.
3648 (aarch64_emit_le_goto): Likewise.
3649 (aarch64_emit_gt_goto): Likewise.
3650 (aarch64_emit_ge_got): Likewise.
3651 (aarch64_emit_ops_impl): New static global variable.
3652 (aarch64_emit_ops): New target function, return
3653 &aarch64_emit_ops_impl.
3654 (struct linux_target_ops): Install it.
3655
3656 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3657
3658 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3659 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3660 aarch64-ipa.o.
3661 * linux-aarch64-ipa.c: New file.
3662 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3663 and endian.h.
3664 (aarch64_get_thread_area): New target method.
3665 (extract_signed_bitfield): New helper function.
3666 (aarch64_decode_ldr_literal): New function.
3667 (enum aarch64_opcodes): New enum.
3668 (struct aarch64_register): New struct.
3669 (struct aarch64_operand): New struct.
3670 (x0): New static global.
3671 (x1): Likewise.
3672 (x2): Likewise.
3673 (x3): Likewise.
3674 (x4): Likewise.
3675 (w2): Likewise.
3676 (ip0): Likewise.
3677 (sp): Likewise.
3678 (xzr): Likewise.
3679 (aarch64_register): New helper function.
3680 (register_operand): Likewise.
3681 (immediate_operand): Likewise.
3682 (struct aarch64_memory_operand): New struct.
3683 (offset_memory_operand): New helper function.
3684 (preindex_memory_operand): Likewise.
3685 (enum aarch64_system_control_registers): New enum.
3686 (ENCODE): New macro.
3687 (emit_insn): New helper function.
3688 (emit_b): New function.
3689 (emit_bcond): Likewise.
3690 (emit_cb): Likewise.
3691 (emit_tb): Likewise.
3692 (emit_blr): Likewise.
3693 (emit_stp): Likewise.
3694 (emit_ldp_q_offset): Likewise.
3695 (emit_stp_q_offset): Likewise.
3696 (emit_load_store): Likewise.
3697 (emit_ldr): Likewise.
3698 (emit_ldrsw): Likewise.
3699 (emit_str): Likewise.
3700 (emit_ldaxr): Likewise.
3701 (emit_stxr): Likewise.
3702 (emit_stlr): Likewise.
3703 (emit_data_processing_reg): Likewise.
3704 (emit_data_processing): Likewise.
3705 (emit_add): Likewise.
3706 (emit_sub): Likewise.
3707 (emit_mov): Likewise.
3708 (emit_movk): Likewise.
3709 (emit_mov_addr): Likewise.
3710 (emit_mrs): Likewise.
3711 (emit_msr): Likewise.
3712 (emit_sevl): Likewise.
3713 (emit_wfe): Likewise.
3714 (append_insns): Likewise.
3715 (can_encode_int32_in): New helper function.
3716 (aarch64_relocate_instruction): New function.
3717 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3718 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3719 (struct linux_target_ops): Install aarch64_get_thread_area,
3720 aarch64_install_fast_tracepoint_jump_pad and
3721 aarch64_get_min_fast_tracepoint_insn_len.
3722
3723 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3724
3725 * Makefile.in (aarch64-insn.o): New rule.
3726 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3727
3728 2015-09-21 Yao Qi <yao.qi@linaro.org>
3729
3730 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3731
3732 2015-09-21 Yao Qi <yao.qi@linaro.org>
3733
3734 * tracepoint.c (max_jump_pad_size): Remove.
3735
3736 2015-09-18 Yao Qi <yao.qi@linaro.org>
3737
3738 * linux-aarch64-low.c: Don't include sys/uio.h.
3739 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3740
3741 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
3742
3743 * tracepoint.c (eval_result_type): Change prototype.
3744 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3745
3746 2015-09-15 Pedro Alves <palves@redhat.com>
3747
3748 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3749 Check whether to report exec events instead of checking whether
3750 multiprocess is enabled.
3751
3752 2015-09-15 Pedro Alves <palves@redhat.com>
3753
3754 PR remote/18965
3755 * remote-utils.c (prepare_resume_reply): Merge
3756 TARGET_WAITKIND_VFORK_DONE switch case with the
3757 TARGET_WAITKIND_FORKED case.
3758
3759 2015-09-15 Yao Qi <yao.qi@linaro.org>
3760
3761 * server.c (handle_query): Check string comparison using
3762 "else if" instead of "if".
3763
3764 2015-09-15 Yao Qi <yao.qi@linaro.org>
3765
3766 * server.c (vCont_supported): New global variable.
3767 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3768 matches. Append ";vContSupported+" to own_buf.
3769 (handle_v_requests): Append ";s;S" to own_buf if target supports
3770 hardware single step or vCont_supported is false.
3771 (capture_main): Set vCont_supported to zero.
3772
3773 2015-09-15 Yao Qi <yao.qi@linaro.org>
3774
3775 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3776 it to ...
3777 (linux_supports_hardware_single_step): ... New function.
3778 (linux_target_ops): Update.
3779 * lynx-low.c (lynx_target_ops): Set field
3780 supports_hardware_single_step to target_can_do_hardware_single_step.
3781 * nto-low.c (nto_target_ops): Likewise.
3782 * spu-low.c (spu_target_ops): Likewise.
3783 * win32-low.c (win32_target_ops): Likewise.
3784 * target.c (target_can_do_hardware_single_step): New function.
3785 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3786 Remove. <supports_hardware_single_step>: New field.
3787 (target_supports_conditional_breakpoints): Remove.
3788 (target_supports_hardware_single_step): New macro.
3789 (target_can_do_hardware_single_step): Declare.
3790 * server.c (handle_query): Use target_supports_hardware_single_step
3791 instead of target_supports_conditional_breakpoints.
3792
3793 2015-09-15 Yao Qi <yao.qi@linaro.org>
3794
3795 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3796 function.
3797 (struct linux_target_ops the_low_target): Install
3798 aarch64_linux_siginfo_fixup.
3799
3800 2015-09-11 Don Breazeal <donb@codesourcery.com>
3801 Luis Machado <lgustavo@codesourcery.com>
3802
3803 * linux-low.c (linux_mourn): Static declaration.
3804 (linux_arch_setup): Move in front of
3805 handle_extended_wait.
3806 (linux_arch_setup_thread): New function.
3807 (handle_extended_wait): Handle exec events. Call
3808 linux_arch_setup_thread. Make event_lwp argument a
3809 pointer-to-a-pointer.
3810 (check_zombie_leaders): Do not check stopped threads.
3811 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3812 (linux_low_filter_event): Add lwp and thread for exec'ing
3813 non-leader thread if leader thread has been deleted.
3814 Refactor code into linux_arch_setup_thread and call it.
3815 Pass child lwp pointer by reference to handle_extended_wait.
3816 (linux_wait_for_event_filtered): Update comment.
3817 (linux_wait_1): Prevent clobbering exec event status.
3818 (linux_supports_exec_events): New function.
3819 (linux_target_ops) <supports_exec_events>: Initialize new member.
3820 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3821 new member.
3822 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3823 * server.c (report_exec_events): New global variable.
3824 (handle_query): Handle qSupported query for exec-events feature.
3825 (captured_main): Initialize report_exec_events.
3826 * server.h (report_exec_events): Declare new global variable.
3827 * target.h (struct target_ops) <supports_exec_events>: New
3828 member.
3829 (target_supports_exec_events): New macro.
3830 * win32-low.c (win32_target_ops) <supports_exec_events>:
3831 Initialize new member.
3832
3833 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3834
3835 * linux-low.c (linux_low_enable_btrace): Remove.
3836 (linux_target_ops): Replace linux_low_enable_btrace with
3837 linux_enable_btrace.
3838
3839 2015-09-03 Yao Qi <yao.qi@linaro.org>
3840
3841 * linux-aarch64-low.c (aarch64_insert_point): Call
3842 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3843 returns true.
3844
3845 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3846
3847 * linux-low.c (check_stopped_by_breakpoint): Use
3848 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3849
3850 2015-08-27 Pedro Alves <palves@redhat.com>
3851
3852 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3853
3854 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3855
3856 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3857 the XNEW-family equivalent.
3858 (compile_bytecodes): Likewise.
3859 * dll.c (loaded_dll): Likewise.
3860 * event-loop.c (append_callback_event): Likewise.
3861 (create_file_handler): Likewise.
3862 (create_file_event): Likewise.
3863 * hostio.c (handle_open): Likewise.
3864 * inferiors.c (add_thread): Likewise.
3865 (add_process): Likewise.
3866 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3867 * linux-arm-low.c (arm_new_process): Likewise.
3868 (arm_new_thread): Likewise.
3869 * linux-low.c (add_to_pid_list): Likewise.
3870 (linux_add_process): Likewise.
3871 (handle_extended_wait): Likewise.
3872 (add_lwp): Likewise.
3873 (enqueue_one_deferred_signal): Likewise.
3874 (enqueue_pending_signal): Likewise.
3875 (linux_resume_one_lwp_throw): Likewise.
3876 (linux_resume_one_thread): Likewise.
3877 (linux_read_memory): Likewise.
3878 (linux_write_memory): Likewise.
3879 * linux-mips-low.c (mips_linux_new_process): Likewise.
3880 (mips_linux_new_thread): Likewise.
3881 (mips_add_watchpoint): Likewise.
3882 * linux-x86-low.c (initialize_low_arch): Likewise.
3883 * lynx-low.c (lynx_add_process): Likewise.
3884 * mem-break.c (set_raw_breakpoint_at): Likewise.
3885 (set_breakpoint): Likewise.
3886 (add_condition_to_breakpoint): Likewise.
3887 (add_commands_to_breakpoint): Likewise.
3888 (clone_agent_expr): Likewise.
3889 (clone_one_breakpoint): Likewise.
3890 * regcache.c (new_register_cache): Likewise.
3891 * remote-utils.c (look_up_one_symbol): Likewise.
3892 * server.c (queue_stop_reply): Likewise.
3893 (start_inferior): Likewise.
3894 (queue_stop_reply_callback): Likewise.
3895 (handle_target_event): Likewise.
3896 * spu-low.c (fetch_ppc_memory): Likewise.
3897 (store_ppc_memory): Likewise.
3898 * target.c (set_target_ops): Likewise.
3899 * thread-db.c (thread_db_load_search): Likewise.
3900 (try_thread_db_load_1): Likewise.
3901 * tracepoint.c (add_tracepoint): Likewise.
3902 (add_tracepoint_action): Likewise.
3903 (create_trace_state_variable): Likewise.
3904 (cmd_qtdpsrc): Likewise.
3905 (cmd_qtro): Likewise.
3906 (add_while_stepping_state): Likewise.
3907 * win32-low.c (child_add_thread): Likewise.
3908 (get_image_name): Likewise.
3909
3910 2015-08-25 Yao Qi <yao.qi@linaro.org>
3911
3912 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3913
3914 2015-08-25 Yao Qi <yao.qi@linaro.org>
3915
3916 * Makefile.in (aarch64-linux.o): New rule.
3917 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3918 srv_tgtobj.
3919 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3920 (aarch64_init_debug_reg_state): Make it extern.
3921 (aarch64_linux_prepare_to_resume): Remove.
3922
3923 2015-08-25 Yao Qi <yao.qi@linaro.org>
3924
3925 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3926 lwp_arch_private_info and ptid_of_lwp.
3927
3928 2015-08-25 Yao Qi <yao.qi@linaro.org>
3929
3930 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3931 Find proc_info by find_process_pid. All callers updated.
3932
3933 2015-08-25 Yao Qi <yao.qi@linaro.org>
3934
3935 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3936 Remove.
3937 (debug_reg_change_callback): Remove.
3938 (aarch64_notify_debug_reg_change): Remove.
3939
3940 2015-08-25 Yao Qi <yao.qi@linaro.org>
3941
3942 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3943 Call current_lwp_ptid.
3944
3945 2015-08-25 Yao Qi <yao.qi@linaro.org>
3946
3947 * linux-aarch64-low.c (debug_reg_change_callback): Use
3948 debug_printf.
3949
3950 2015-08-25 Yao Qi <yao.qi@linaro.org>
3951
3952 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3953
3954 2015-08-25 Yao Qi <yao.qi@linaro.org>
3955
3956 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3957
3958 2015-08-25 Yao Qi <yao.qi@linaro.org>
3959
3960 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3961 the code.
3962
3963 2015-08-25 Yao Qi <yao.qi@linaro.org>
3964
3965 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3966 Remove.
3967 (debug_reg_change_callback): Remove argument entry and add argument
3968 lwp. Remove local variable thread. Don't print thread id in the
3969 debugging output. Don't check whether pid of thread equals to pid.
3970 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
3971 iterate_over_lwps instead find_inferior.
3972
3973 2015-08-24 Pedro Alves <palves@redhat.com>
3974
3975 * inferiors.c (get_first_process): New function.
3976 * inferiors.h (get_first_process): New declaration.
3977 * remote-utils.c (read_ptid): Default to the first process in the
3978 list, instead of to the current thread's process.
3979
3980 2015-08-24 Pedro Alves <palves@redhat.com>
3981
3982 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3983 * event-loop.c: Likewise.
3984 * remote-utils.c: Likewise.
3985 * tracepoint.c: Likewise.
3986
3987 2015-08-24 Pedro Alves <palves@redhat.com>
3988
3989 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3990 ptid_get_lwp.
3991
3992 2015-08-21 Pedro Alves <palves@redhat.com>
3993
3994 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3995 instead of literal 1.
3996
3997 2015-08-21 Pedro Alves <palves@redhat.com>
3998
3999 * tdesc.c (default_description): Explicitly zero-initialize.
4000
4001 2015-08-21 Pedro Alves <palves@redhat.com>
4002
4003 PR gdb/18749
4004 * inferiors.c (remove_thread): Discard any pending stop reply for
4005 this thread.
4006 * server.c (remove_all_on_match_pid): Rename to ...
4007 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4008 instead of a pid.
4009 (discard_queued_stop_replies): Change parameter to a ptid. Now
4010 extern.
4011 (handle_v_kill, kill_inferior_callback, captured_main)
4012 (process_serial_event): Adjust.
4013 * server.h (discard_queued_stop_replies): Declare.
4014
4015 2015-08-21 Pedro Alves <palves@redhat.com>
4016
4017 * linux-low.c (wait_for_sigstop): Always switch to no thread
4018 selected if the previously current thread dies.
4019 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4020 process instead of the current thread's.
4021 * remote-utils.c (input_interrupt): Don't check if there's no
4022 current thread.
4023 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4024 current thread to the general thread fails, error out.
4025 (handle_qxfer_auxv, handle_qxfer_libraries)
4026 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4027 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4028 (handle_query): Check if there's a thread selected instead of
4029 checking whether there's any thread in the thread list.
4030 (handle_qxfer_threads, handle_qxfer_btrace)
4031 (handle_qxfer_btrace_conf): Don't error out early if there's no
4032 thread in the thread list.
4033 (handle_v_cont, myresume): Don't set the current thread to the
4034 continue thread.
4035 (process_serial_event) <Hg handling>: Also set thread_id if the
4036 previous general thread is still alive.
4037 (process_serial_event) <g/G handling>: If setting the current
4038 thread to the general thread fails, error out.
4039 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4040 thread's lwp instead of the current thread's.
4041 * target.c (set_desired_thread): If the desired thread was not
4042 found, leave the current thread pointing to NULL. Return an int
4043 (boolean) indicating success.
4044 * target.h (set_desired_thread): Change return type to int.
4045
4046 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4047
4048 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4049 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4050 #includes.
4051 (ps_get_thread_area): New function.
4052
4053 2015-08-19 Gary Benson <gbenson@redhat.com>
4054
4055 * hostio.c (handle_pread): Do not attempt to read more data
4056 than hostio_reply_with_data can fit in a packet.
4057
4058 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4059
4060 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4061
4062 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4063
4064 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4065
4066 2015-08-06 Pedro Alves <palves@redhat.com>
4067
4068 * tracepoint.c (expr_eval_result): Now an int.
4069
4070 2015-08-06 Pedro Alves <palves@redhat.com>
4071
4072 * gdbthread.h (struct regcache): Forward declare.
4073 (struct thread_info) <regcache_data>: Now a struct regcache
4074 pointer.
4075 * inferiors.c (inferior_regcache_data)
4076 (set_inferior_regcache_data): Now work with struct regcache
4077 pointers.
4078 * inferiors.h (struct regcache): Forward declare.
4079 (inferior_regcache_data, set_inferior_regcache_data): Now work
4080 with struct regcache pointers.
4081 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4082 (free_register_cache_thread): Remove struct regcache pointer
4083 casts.
4084
4085 2015-08-06 Pedro Alves <palves@redhat.com>
4086
4087 * server.c (captured_main): On error, print the exception message
4088 to stderr, and if run_once is set, throw a quit.
4089
4090 2015-08-06 Pedro Alves <palves@redhat.com>
4091
4092 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4093 the current thread.
4094
4095 2015-08-06 Pedro Alves <palves@redhat.com>
4096
4097 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4098 reading beyond the passed in buffer length.
4099
4100 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4101
4102 * tracepoint.c (symbol_list) <required>: Remove.
4103
4104 2015-08-06 Pedro Alves <palves@redhat.com>
4105
4106 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4107 count if stopping and suspending threads.
4108 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4109 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4110 (linux_detach): Complete an ongoing step-over.
4111 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4112 throughout.
4113 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4114 (linux_wait_1): If passing a signal to the inferior after
4115 finishing a step-over, unsuspend and re-resume all lwps. If we
4116 see a single-step event but the thread should be continuing, don't
4117 pass the trap to gdb.
4118 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4119 internal_error instead of gdb_assert.
4120 (enqueue_pending_signal): New function.
4121 (check_ptrace_stopped_lwp_gone): Add debug output.
4122 (start_step_over): Use internal_error instead of gdb_assert.
4123 (complete_ongoing_step_over): New function.
4124 (linux_resume_one_thread): Don't resume a suspended thread.
4125 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4126 it stepping.
4127
4128 2015-08-06 Pedro Alves <palves@redhat.com>
4129
4130 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4131 (linux_thread_alive): Use lwp_is_marked_dead.
4132 (extended_event_reported): Delete.
4133 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4134 instead of extended_event_reported.
4135 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4136 as well.
4137 (lwp_is_marked_dead): New function.
4138 (lwp_running): Use lwp_is_marked_dead.
4139 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4140 comment.
4141
4142 2015-08-06 Pedro Alves <palves@redhat.com>
4143
4144 * linux-low.c (linux_wait_1): Move fork event output out of the
4145 !report_to_gdb check. Pass event_child->waitstatus to
4146 target_waitstatus_to_string instead of ourstatus.
4147
4148 2015-08-04 Yao Qi <yao.qi@linaro.org>
4149
4150 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4151 if current_thread is 32 bit.
4152
4153 2015-08-04 Yao Qi <yao.qi@linaro.org>
4154
4155 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4156 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4157 * server.c (extended_protocol): Remove "static".
4158 * server.h (extended_protocol): Declare it.
4159
4160 2015-08-04 Yao Qi <yao.qi@linaro.org>
4161
4162 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4163 both aarch64 and aarch32.
4164 (aarch64_set_pc): Likewise.
4165
4166 2015-08-04 Yao Qi <yao.qi@linaro.org>
4167
4168 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4169 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4170 arm-with-neon.xml to srv_xmlfiles.
4171 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4172 (is_64bit_tdesc): New function.
4173 (aarch64_linux_read_description): New function.
4174 (aarch64_arch_setup): Call aarch64_linux_read_description.
4175 (regs_info): Rename to regs_info_aarch64.
4176 (aarch64_regs_info): Return right regs_info.
4177 (initialize_low_arch): Call initialize_low_arch_aarch32.
4178
4179 2015-08-04 Yao Qi <yao.qi@linaro.org>
4180
4181 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4182 * linux-aarch32-low.c: New file.
4183 * linux-aarch32-low.h: New file.
4184 * linux-arm-low.c (arm_fill_gregset): Move it to
4185 linux-aarch32-low.c.
4186 (arm_store_gregset): Likewise.
4187 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4188 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4189 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4190 (regs_info): Rename to regs_info_arm.
4191 (arm_regs_info): Return regs_info_aarch32 if
4192 have_ptrace_getregset is 1 and target description is
4193 arm_with_neon or arm_with_vfpv3.
4194 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4195 Call initialize_low_arch_aarch32 instead.
4196
4197 2015-08-04 Yao Qi <yao.qi@linaro.org>
4198
4199 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4200 * linux-low.c: ... here.
4201 * linux-low.h (have_ptrace_getregset): Declare it.
4202
4203 2015-08-04 Pedro Alves <palves@redhat.com>
4204
4205 * thread-db.c (struct thread_db): Use new typedefs.
4206 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4207 CHK calls.
4208 (disable_thread_event_reporting): Cast result of dlsym to
4209 destination function pointer type.
4210 (thread_db_mourn): Use td_ta_delete_ftype.
4211
4212 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4213
4214 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4215 arch variant.
4216 (CDX_BREAKPOINT): Define for R2.
4217 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4218 (the_low_target): Add comments.
4219
4220 2015-07-30 Yao Qi <yao.qi@linaro.org>
4221
4222 * linux-arm-low.c (arm_hwcap): Remove it.
4223 (arm_read_description): New local variable arm_hwcap. Don't
4224 set arm_hwcap to zero.
4225
4226 2015-07-30 Yao Qi <yao.qi@linaro.org>
4227
4228 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4229 Use regcache->tdesc instead.
4230 (arm_store_wmmxregset): Likewise.
4231 (arm_fill_vfpregset): Likewise.
4232 (arm_store_vfpregset): Likewise.
4233
4234 2015-07-30 Yao Qi <yao.qi@linaro.org>
4235
4236 * linux-arm-low.c: Include arch/arm.h.
4237 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4238 (arm_store_gregset): Likewise.
4239
4240 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4241
4242 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4243 ptrace's 4th parameter.
4244
4245 2015-07-27 Yao Qi <yao.qi@linaro.org>
4246
4247 * configure.srv (case aarch64*-*-linux*): Don't set
4248 srv_linux_usrregs.
4249
4250 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4251
4252 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4253 sys/ptrace.h.
4254 * linux-arm-low.c: Likewise.
4255 * linux-cris-low.c: Likewise.
4256 * linux-crisv32-low.c: Likewise.
4257 * linux-low.c: Likewise.
4258 * linux-m68k-low.c: Likewise.
4259 * linux-mips-low.c: Likewise.
4260 * linux-nios2-low.c: Likewise.
4261 * linux-s390-low.c: Likewise.
4262 * linux-sparc-low.c: Likewise.
4263 * linux-tic6x-low.c: Likewise.
4264 * linux-tile-low.c: Likewise.
4265 * linux-x86-low.c: Likewise.
4266
4267 2015-07-24 Pedro Alves <palves@redhat.com>
4268
4269 * config.in: Regenerate.
4270 * configure: Regenerate.
4271
4272 2015-07-24 Pedro Alves <palves@redhat.com>
4273
4274 * acinclude.m4: Include ../ptrace.m4.
4275 * configure.ac: Call GDB_AC_PTRACE.
4276 * config.in, configure: Regenerate.
4277
4278 2015-07-24 Yao Qi <yao.qi@linaro.org>
4279
4280 * linux-low.c (linux_create_inferior): Remove setting to
4281 proc->priv->new_inferior.
4282 (linux_attach): Likewise.
4283 (linux_low_filter_event): Likewise.
4284 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4285
4286 2015-07-24 Yao Qi <yao.qi@linaro.org>
4287
4288 * linux-low.c (linux_arch_setup): New function.
4289 (linux_low_filter_event): If proc->tdesc is NULL and
4290 proc->attached is true, call the_low_target.arch_setup.
4291 Otherwise, keep status pending, and return.
4292 (linux_resume_one_lwp_throw): Don't call get_pc if
4293 thread->while_stepping isn't NULL. Don't call
4294 get_thread_regcache if proc->tdesc is NULL.
4295 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4296 (linux_target_ops): Install arch_setup.
4297 * server.c (start_inferior): Call the_target->arch_setup.
4298 * target.h (struct target_ops) <arch_setup>: New field.
4299 (target_arch_setup): New marco.
4300 * lynx-low.c (lynx_target_ops): Update.
4301 * nto-low.c (nto_target_ops): Update.
4302 * spu-low.c (spu_target_ops): Update.
4303 * win32-low.c (win32_target_ops): Update.
4304
4305 2015-07-24 Yao Qi <yao.qi@linaro.org>
4306
4307 * linux-low.c (linux_add_process): Don't set
4308 proc->priv->new_inferior.
4309 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4310 (linux_attach): Likewise.
4311
4312 2015-07-24 Yao Qi <yao.qi@linaro.org>
4313
4314 * server.c (start_inferior): Code refactor.
4315
4316 2015-07-24 Yao Qi <yao.qi@linaro.org>
4317
4318 * server.c (process_serial_event): Set general_thread.
4319
4320 2015-07-21 Yao Qi <yao.qi@linaro.org>
4321
4322 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4323 aarch64_linux_get_debug_reg_capacity.
4324
4325 2015-07-17 Yao Qi <yao.qi@linaro.org>
4326
4327 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4328 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4329 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4330 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4331 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4332 (AARCH64_HWP_ALIGNMENT): Likewise.
4333 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4334 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4335 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4336 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4337 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4338 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4339 (struct aarch64_debug_reg_state): Likewise.
4340 (struct arch_lwp_info): Likewise.
4341 (aarch64_align_watchpoint): Likewise.
4342 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4343 (aarch64_watchpoint_length): Likewise.
4344 (aarch64_point_encode_ctrl_reg): Likewise
4345 (aarch64_point_is_aligned): Likewise.
4346 (aarch64_align_watchpoint): Likewise.
4347 (aarch64_linux_set_debug_regs):
4348 (aarch64_dr_state_insert_one_point): Likewise.
4349 (aarch64_dr_state_remove_one_point): Likewise.
4350 (aarch64_handle_breakpoint): Likewise.
4351 (aarch64_handle_aligned_watchpoint): Likewise.
4352 (aarch64_handle_unaligned_watchpoint): Likewise.
4353 (aarch64_handle_watchpoint): Likewise.
4354
4355 2015-07-17 Yao Qi <yao.qi@linaro.org>
4356
4357 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4358 and don't aarch64_get_debug_reg_state. All callers update.
4359 (aarch64_handle_aligned_watchpoint): Likewise.
4360 (aarch64_handle_unaligned_watchpoint): Likewise.
4361 (aarch64_handle_watchpoint): Likewise.
4362 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4363 (aarch64_remove_point): Likewise.
4364
4365 2015-07-17 Yao Qi <yao.qi@linaro.org>
4366
4367 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4368 debug_printf.
4369 (aarch64_handle_unaligned_watchpoint): Likewise.
4370
4371 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4372
4373 Revert the previous 3 commits:
4374 Move gdb_regex* to common/
4375 Move linux_find_memory_regions_full & co.
4376 gdbserver build-id attribute generator
4377
4378 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4379 Jan Kratochvil <jan.kratochvil@redhat.com>
4380
4381 gdbserver build-id attribute generator.
4382 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4383 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4384 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4385 (find_phdr): New.
4386 (get_dynamic): Use find_pdhr to traverse program headers.
4387 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4388 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4389 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4390 (get_hex_build_id): New.
4391 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4392 to reply XML document.
4393
4394 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4395 Jan Kratochvil <jan.kratochvil@redhat.com>
4396
4397 * target.c: Include target/target-utils.h and fcntl.h.
4398 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4399 (target_fileio_read_stralloc): New functions.
4400
4401 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4402
4403 * Makefile.in (OBS): Add gdb_regex.o.
4404 (gdb_regex.o): New.
4405 * config.in: Rebuilt.
4406 * configure: Rebuilt.
4407
4408 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4409 Jan Kratochvil <jan.kratochvil@redhat.com>
4410
4411 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4412 * Makefile.in (OBS): Add target-utils.o.
4413 (linux-maps.o, target-utils.o): New.
4414 * configure.srv (srv_linux_obj): Add linux-maps.o.
4415
4416 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4417
4418 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4419 function, return 1.
4420 (the_low_target): Install it.
4421
4422 2015-07-14 Pedro Alves <palves@redhat.com>
4423
4424 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4425 Instead, ignore ECHILD, and throw an error for other errnos.
4426
4427 2015-07-10 Pedro Alves <palves@redhat.com>
4428
4429 * event-loop.c (struct callback_event) <data>: Change type to
4430 gdb_client_data instance instead of gdb_client_data pointer.
4431 (append_callback_event): Adjust.
4432
4433 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4434
4435 * linux-aarch64-low.c: Add comments for each linux_target_ops
4436 method. Remove comments already covered in target_ops and
4437 linux_target_ops definitions.
4438 (the_low_target): Add comments for each unimplemented method.
4439
4440 2015-07-09 Yao Qi <yao.qi@linaro.org>
4441
4442 * linux-aarch64-low.c (aarch64_regmap): Remove.
4443 (aarch64_usrregs_info): Remove.
4444 (regs_info): Set field usrregs to NULL.
4445
4446 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4447
4448 * linux-low.c: Include "rsp-low.h"
4449 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4450 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4451 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4452 (handle_btrace_enable_pt): New.
4453 (handle_btrace_general_set): Support "pt".
4454 (handle_btrace_conf_general_set): Support "pt:size".
4455
4456 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4457
4458 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4459 Z_PACKET_SW_BP.
4460
4461 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4462
4463 * linux-aarch64-low.c: Remove comment about endianness.
4464 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4465 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4466 memcmp.
4467
4468 2015-06-24 Gary Benson <gbenson@redhat.com>
4469
4470 * linux-i386-ipa.c (stdint.h): Do not include.
4471 * lynx-i386-low.c (stdint.h): Likewise.
4472 * lynx-ppc-low.c (stdint.h): Likewise.
4473 * mem-break.c (stdint.h): Likewise.
4474 * thread-db.c (stdint.h): Likewise.
4475 * tracepoint.c (stdint.h): Likewise.
4476 * win32-low.c (stdint.h): Likewise.
4477
4478 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4479
4480 * server.c (write_qxfer_response): Update call to
4481 remote_escape_output.
4482
4483 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4484 Jan Kratochvil <jan.kratochvil@redhat.com>
4485
4486 Merge multiple hex conversions.
4487 * gdbreplay.c (tohex): Rename to 'fromhex'.
4488 (logchar): Use fromhex.
4489
4490 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4491
4492 * server.c (handle_qxfer_libraries): Set `version' attribute for
4493 <library-list>.
4494
4495 2015-06-10 Gary Benson <gbenson@redhat.com>
4496
4497 * target.h (struct target_ops) <multifs_open>: New field.
4498 <multifs_unlink>: Likewise.
4499 <multifs_readlink>: Likewise.
4500 * linux-low.c (nat/linux-namespaces.h): New include.
4501 (linux_target_ops): Initialize the_target->multifs_open,
4502 the_target->multifs_unlink and the_target->multifs_readlink.
4503 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4504 * hostio.c (hostio_fs_pid): New static variable.
4505 (hostio_handle_new_gdb_connection): New function.
4506 (handle_setfs): Likewise.
4507 (handle_open): Use the_target->multifs_open as appropriate.
4508 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4509 (handle_readlink): Use the_target->multifs_readlink as
4510 appropriate.
4511 (handle_vFile): Handle vFile:setfs packets.
4512 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4513 after target_handle_new_gdb_connection.
4514
4515 2015-06-10 Gary Benson <gbenson@redhat.com>
4516
4517 * configure.ac (AC_CHECK_FUNCS): Add setns.
4518 * config.in: Regenerate.
4519 * configure: Likewise.
4520 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4521 (linux-namespaces.o): New rule.
4522 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4523
4524 2015-06-09 Gary Benson <gbenson@redhat.com>
4525
4526 * hostio.c (handle_open): Process mode argument with
4527 fileio_to_host_mode.
4528
4529 2015-06-01 Yao Qi <yao.qi@linaro.org>
4530
4531 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4532 * linux-x86-low.c: Likewise.
4533
4534 2015-05-28 Don Breazeal <donb@codesourcery.com>
4535
4536 * linux-low.c (handle_extended_wait): Initialize
4537 thread_info.last_resume_kind for new fork children.
4538
4539 2015-05-15 Pedro Alves <palves@redhat.com>
4540
4541 * target.h (target_handle_new_gdb_connection): Rewrite using if
4542 wrapped in do/while.
4543
4544 2015-05-14 Joel Brobecker <brobecker@adacore.com>
4545
4546 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4547 * configure, config.in: Regenerate.
4548 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4549 Declare typedef.
4550
4551 2015-05-12 Don Breazeal <donb@codesourcery.com>
4552
4553 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4554 PTRACE_EVENT_VFORK_DONE.
4555 (linux_low_ptrace_options, extended_event_reported): Add vfork
4556 events.
4557 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4558 and "vforkdone" for RSP 'T' Stop Reply Packet.
4559 * server.h (report_vfork_events): Declare
4560 global variable.
4561
4562 2015-05-12 Don Breazeal <donb@codesourcery.com>
4563
4564 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4565 (the_low_target) <new_fork>: Initialize new member.
4566 * linux-arm-low.c (arm_new_fork): New function.
4567 (the_low_target) <new_fork>: Initialize new member.
4568 * linux-low.c (handle_extended_wait): Call new target function
4569 new_fork.
4570 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4571 * linux-mips-low.c (mips_add_watchpoint): New function
4572 extracted from mips_insert_point.
4573 (the_low_target) <new_fork>: Initialize new member.
4574 (mips_linux_new_fork): New function.
4575 (mips_insert_point): Call mips_add_watchpoint.
4576 * linux-x86-low.c (x86_linux_new_fork): New function.
4577 (the_low_target) <new_fork>: Initialize new member.
4578
4579 2015-05-12 Don Breazeal <donb@codesourcery.com>
4580
4581 * linux-low.c (handle_extended_wait): Implement return value,
4582 rename argument 'event_child' to 'event_lwp', handle
4583 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4584 (linux_low_ptrace_options): New function.
4585 (linux_low_filter_event): Call linux_low_ptrace_options,
4586 use different argument fo linux_enable_event_reporting,
4587 use return value from handle_extended_wait.
4588 (extended_event_reported): New function.
4589 (linux_wait_1): Call extended_event_reported and set
4590 status to report fork events.
4591 (linux_write_memory): Add pid to debug message.
4592 (reset_lwp_ptrace_options_callback): New function.
4593 (linux_handle_new_gdb_connection): New function.
4594 (linux_target_ops): Initialize new structure member.
4595 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4596 * lynx-low.c: Initialize new structure member.
4597 * remote-utils.c (prepare_resume_reply): Implement stop reason
4598 "fork" for "T" stop message.
4599 * server.c (handle_query): Call handle_new_gdb_connection.
4600 * server.h (report_fork_events): Declare global flag.
4601 * target.h (struct target_ops) <handle_new_gdb_connection>:
4602 New member.
4603 (target_handle_new_gdb_connection): New macro.
4604 * win32-low.c: Initialize new structure member.
4605
4606 2015-05-12 Don Breazeal <donb@codesourcery.com>
4607
4608 * mem-break.c (APPEND_TO_LIST): Define macro.
4609 (clone_agent_expr): New function.
4610 (clone_one_breakpoint): New function.
4611 (clone_all_breakpoints): New function.
4612 * mem-break.h: Declare new functions.
4613
4614 2015-05-12 Don Breazeal <donb@codesourcery.com>
4615
4616 * linux-low.c (linux_supports_fork_events): New function.
4617 (linux_supports_vfork_events): New function.
4618 (linux_target_ops): Initialize new structure members.
4619 (initialize_low): Call linux_check_ptrace_features.
4620 * lynx-low.c (lynx_target_ops): Initialize new structure
4621 members.
4622 * server.c (report_fork_events, report_vfork_events):
4623 New global flags.
4624 (handle_query): Add new features to qSupported packet and
4625 response.
4626 (captured_main): Initialize new global variables.
4627 * target.h (struct target_ops) <supports_fork_events>:
4628 New member.
4629 <supports_vfork_events>: New member.
4630 (target_supports_fork_events): New macro.
4631 (target_supports_vfork_events): New macro.
4632 * win32-low.c (win32_target_ops): Initialize new structure
4633 members.
4634
4635 2015-05-12 Gary Benson <gbenson@redhat.com>
4636
4637 * server.c (handle_qxfer_exec_file): Use current process
4638 if annex is empty.
4639
4640 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4641
4642 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4643 Remove HAVE_PTRACE_GETREGS conditionals.
4644 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4645 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4646
4647 2015-05-08 Yao Qi <yao.qi@linaro.org>
4648
4649 * linux-low.c (linux_supports_conditional_breakpoints): New
4650 function.
4651 (linux_target_ops): Install new target method.
4652 * lynx-low.c (lynx_target_ops): Install NULL hook for
4653 supports_conditional_breakpoints.
4654 * nto-low.c (nto_target_ops): Likewise.
4655 * spu-low.c (spu_target_ops): Likewise.
4656 * win32-low.c (win32_target_ops): Likewise.
4657 * server.c (handle_query): Check
4658 target_supports_conditional_breakpoints.
4659 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4660 New field.
4661 (target_supports_conditional_breakpoints): New macro.
4662
4663 2015-05-06 Pedro Alves <palves@redhat.com>
4664
4665 PR server/18081
4666 * server.c (start_inferior): If the process exits, mourn it.
4667
4668 2015-04-21 Gary Benson <gbenson@redhat.com>
4669
4670 * hostio.c (fileio_open_flags_to_host): Factored out to
4671 fileio_to_host_openflags in common/fileio.c. Single use
4672 updated.
4673
4674 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4675
4676 * linux-xtensa-low.c (xtensa_fill_gregset)
4677 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4678 XCHAL_HAVE_LOOP.
4679
4680 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4681
4682 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4683 (regs_info): Replace usrregs pointer with NULL.
4684
4685 2015-04-17 Gary Benson <gbenson@redhat.com>
4686
4687 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4688 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4689 * server.c (handle_qxfer_exec_file): New function.
4690 (qxfer_packets): Add exec-file entry.
4691 (handle_query): Report qXfer:exec-file:read as supported packet.
4692
4693 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4694
4695 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4696
4697 2015-04-09 Gary Benson <gbenson@redhat.com>
4698
4699 * hostio-errno.c (errno_to_fileio_error): Remove function.
4700 Update caller to use remote_fileio_to_fio_error.
4701
4702 2015-04-09 Yao Qi <yao.qi@linaro.org>
4703
4704 * linux-low.c (linux_insert_point): Call
4705 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4706 (linux_remove_point): Call remove_memory_breakpoint if type is
4707 raw_bkpt_type_sw.
4708 * linux-x86-low.c (x86_insert_point): Don't call
4709 insert_memory_breakpoint.
4710 (x86_remove_point): Don't call remove_memory_breakpoint.
4711
4712 2015-04-01 Pedro Alves <palves@redhat.com>
4713 Cleber Rosa <crosa@redhat.com>
4714
4715 * server.c (gdbserver_usage): Reorganize and extend the usage
4716 message.
4717
4718 2015-03-24 Pedro Alves <palves@redhat.com>
4719
4720 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4721 output. Also dump TRAP_TRACE.
4722 (linux_low_filter_event): In debug output, distinguish a
4723 resume_stop SIGSTOP from a delayed SIGSTOP.
4724
4725 2015-03-24 Gary Benson <gbenson@redhat.com>
4726
4727 * linux-x86-low.c (x86_linux_new_thread): Moved to
4728 nat/x86-linux.c.
4729 (x86_linux_prepare_to_resume): Likewise.
4730
4731 2015-03-24 Gary Benson <gbenson@redhat.com>
4732
4733 * Makefile.in (x86-linux-dregs.o): New rule.
4734 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4735 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4736 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4737 (x86_linux_dr_get): Likewise.
4738 (x86_linux_dr_set): Likewise.
4739 (update_debug_registers_callback): Likewise.
4740 (x86_linux_dr_set_addr): Likewise.
4741 (x86_linux_dr_get_addr): Likewise.
4742 (x86_linux_dr_set_control): Likewise.
4743 (x86_linux_dr_get_control): Likewise.
4744 (x86_linux_dr_get_status): Likewise.
4745 (x86_linux_update_debug_registers): Likewise.
4746
4747 2015-03-24 Gary Benson <gbenson@redhat.com>
4748
4749 * linux-x86-low.c (x86_linux_update_debug_registers):
4750 New function, factored out from...
4751 (x86_linux_prepare_to_resume): ...this.
4752
4753 2015-03-24 Gary Benson <gbenson@redhat.com>
4754
4755 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4756 (x86_linux_dr_set): Likewise.
4757 (update_debug_registers_callback): Likewise.
4758 (x86_linux_dr_set_addr): Likewise.
4759 (x86_linux_dr_get_addr): Likewise.
4760 (x86_linux_dr_set_control): Likewise.
4761 (x86_linux_dr_get_control): Likewise.
4762 (x86_linux_dr_get_status): Likewise.
4763 (x86_linux_prepare_to_resume): Likewise.
4764
4765 2015-03-24 Gary Benson <gbenson@redhat.com>
4766
4767 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4768 Use perror_with_name. Pass string through gettext.
4769 (x86_linux_dr_set): Likewise.
4770
4771 2015-03-24 Gary Benson <gbenson@redhat.com>
4772
4773 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4774 (x86_linux_dr_set_addr): ...this.
4775 (x86_dr_low_get_addr): Rename to...
4776 (x86_linux_dr_get_addr): ...this.
4777 (x86_dr_low_set_control): Rename to...
4778 (x86_linux_dr_set_control): ...this.
4779 (x86_dr_low_get_control): Rename to...
4780 (x86_linux_dr_get_control): ...this.
4781 (x86_dr_low_get_status): Rename to...
4782 (x86_linux_dr_get_status): ...this.
4783 (x86_dr_low): Update with new function names.
4784
4785 2015-03-24 Gary Benson <gbenson@redhat.com>
4786
4787 * Makefile.in (x86-linux.o): New rule.
4788 * configure.srv: Add x86-linux.o to relevant targets.
4789 * linux-low.c (lwp_set_arch_private_info): New function.
4790 (lwp_arch_private_info): Likewise.
4791 * linux-x86-low.c: Include nat/x86-linux.h.
4792 (arch_lwp_info): Removed structure.
4793 (update_debug_registers_callback):
4794 Use lwp_set_debug_registers_changed.
4795 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4796 and lwp_set_debug_registers_changed.
4797 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4798
4799 2015-03-24 Gary Benson <gbenson@redhat.com>
4800
4801 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4802 * linux-arm-low.c (arm_new_thread): Likewise.
4803 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4804 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4805 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4806 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4807
4808 2015-03-24 Gary Benson <gbenson@redhat.com>
4809
4810 * linux-low.c (ptid_of_lwp): New function.
4811 (lwp_is_stopped): Likewise.
4812 (lwp_stop_reason): Likewise.
4813 * linux-x86-low.c (update_debug_registers_callback):
4814 Use lwp_is_stopped.
4815 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4816 lwp_stop_reason.
4817
4818 2015-03-24 Gary Benson <gbenson@redhat.com>
4819
4820 * linux-low.h (linux_stop_lwp): Remove declaration.
4821
4822 2015-03-24 Gary Benson <gbenson@redhat.com>
4823
4824 * linux-low.h: Include nat/linux-nat.h.
4825 * linux-low.c (iterate_over_lwps_args): New structure.
4826 (iterate_over_lwps_filter): New function.
4827 (iterate_over_lwps): Likewise.
4828 * linux-x86-low.c (update_debug_registers_callback):
4829 Update signature to what iterate_over_lwps expects.
4830 Remove PID check that iterate_over_lwps now performs.
4831 (x86_dr_low_set_addr): Use iterate_over_lwps.
4832 (x86_dr_low_set_control): Likewise.
4833
4834 2015-03-24 Gary Benson <gbenson@redhat.com>
4835
4836 * linux-x86-low.c (x86_debug_reg_state): New function.
4837 (x86_linux_prepare_to_resume): Use the above.
4838
4839 2015-03-24 Gary Benson <gbenson@redhat.com>
4840
4841 * linux-low.c (current_lwp_ptid): New function.
4842 * linux-x86-low.c: Include nat/linux-nat.h.
4843 (x86_dr_low_get_addr): Use current_lwp_ptid.
4844 (x86_dr_low_get_control): Likewise.
4845 (x86_dr_low_get_status): Likewise.
4846
4847 2015-03-20 Pedro Alves <palves@redhat.com>
4848
4849 * tracepoint.c (cmd_qtstatus): Make "str" const.
4850
4851 2015-03-20 Pedro Alves <palves@redhat.com>
4852
4853 * server.c (handle_general_set): Make "req_str" const.
4854
4855 2015-03-19 Pedro Alves <palves@redhat.com>
4856
4857 * linux-low.c (linux_resume_one_lwp): Rename to ...
4858 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4859 instead call perror_with_name.
4860 (check_ptrace_stopped_lwp_gone): New function.
4861 (linux_resume_one_lwp): Reimplement as wrapper around
4862 linux_resume_one_lwp_throw that swallows errors if the LWP is
4863 gone.
4864
4865 2015-03-19 Pedro Alves <palves@redhat.com>
4866
4867 * linux-low.c (count_events_callback, select_event_lwp_callback):
4868 No longer check whether the thread has resume_stop as last resume
4869 kind.
4870
4871 2015-03-19 Pedro Alves <palves@redhat.com>
4872
4873 * linux-low.c (count_events_callback, select_event_lwp_callback):
4874 Use the lwp's status_pending_p field, not the thread's.
4875
4876 2015-03-19 Pedro Alves <palves@redhat.com>
4877
4878 * linux-low.c (select_event_lwp_callback): Update comments to
4879 no longer mention SIGTRAP.
4880
4881 2015-03-18 Gary Benson <gbenson@redhat.com>
4882
4883 * server.c (handle_query): Do not report vFile:fstat as supported.
4884
4885 2015-03-11 Gary Benson <gbenson@redhat.com>
4886
4887 * hostio.c (sys/types.h): New include.
4888 (sys/stat.h): Likewise.
4889 (common-remote-fileio.h): Likewise.
4890 (handle_fstat): New function.
4891 (handle_vFile): Handle vFile:fstat packets.
4892
4893 2015-03-11 Gary Benson <gbenson@redhat.com>
4894
4895 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4896 struct stat.st_blocks and struct stat.st_blksize.
4897 * configure: Regenerate.
4898 * config.in: Likewise.
4899 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4900 (OBS): Add common-remote-fileio.o.
4901 (common-remote-fileio.o): New rule.
4902
4903 2015-03-09 Pedro Alves <palves@redhat.com>
4904
4905 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4906 'struct sockaddr' pointer in 'accept' call.
4907
4908 2015-03-09 Pedro Alves <palves@redhat.com>
4909
4910 Revert:
4911 2015-03-07 Pedro Alves <palves@redhat.com>
4912 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4913 or <winsock2.h> here. Instead include "gdb_socket.h".
4914 (remote_open): Use union gdb_sockaddr_u.
4915 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4916 or <winsock2.h> here. Instead include "gdb_socket.h".
4917 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4918 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4919 or <sys/un.h>.
4920 (init_named_socket, gdb_agent_helper_thread): Use union
4921 gdb_sockaddr_u.
4922
4923 2015-03-07 Pedro Alves <palves@redhat.com>
4924
4925 * configure.ac (build_warnings): Move
4926 -Wdeclaration-after-statement to the C-specific set.
4927 * configure: Regenerate.
4928
4929 2015-03-07 Pedro Alves <palves@redhat.com>
4930
4931 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4932 or <winsock2.h> here. Instead include "gdb_socket.h".
4933 (remote_open): Use union gdb_sockaddr_u.
4934 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4935 or <winsock2.h> here. Instead include "gdb_socket.h".
4936 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4937 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4938 or <sys/un.h>.
4939 (init_named_socket, gdb_agent_helper_thread): Use union
4940 gdb_sockaddr_u.
4941
4942 2015-03-07 Pedro Alves <palves@redhat.com>
4943
4944 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4945 instead.
4946
4947 2015-03-06 Yao Qi <yao.qi@linaro.org>
4948
4949 * linux-aarch64-low.c (aarch64_insert_point): Use
4950 show_debug_regs as a boolean.
4951 (aarch64_remove_point): Likewise.
4952
4953 2015-03-05 Pedro Alves <palves@redhat.com>
4954
4955 * lynx-low.c (lynx_target_ops): Install NULL hooks for
4956 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4957 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4958 * nto-low.c (nto_target_ops): Likewise.
4959 * spu-low.c (spu_target_ops): Likewise.
4960 * win32-low.c (win32_target_ops): Likewise.
4961
4962 2015-03-04 Pedro Alves <palves@redhat.com>
4963
4964 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4965 Decide whether a breakpoint triggered based on the SIGTRAP's
4966 siginfo.si_code.
4967 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4968 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4969 (linux_low_filter_event): Check for breakpoints before checking
4970 watchpoints.
4971 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4972 siginfo.si_code.
4973 (linux_stopped_by_sw_breakpoint)
4974 (linux_supports_stopped_by_sw_breakpoint)
4975 (linux_stopped_by_hw_breakpoint)
4976 (linux_supports_stopped_by_hw_breakpoint): New functions.
4977 (linux_target_ops): Install new target methods.
4978
4979 2015-03-04 Pedro Alves <palves@redhat.com>
4980
4981 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4982 * server.c (swbreak_feature, hwbreak_feature): New globals.
4983 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4984 (captured_main): Clear swbreak_feature and hwbreak_feature.
4985 * server.h (swbreak_feature, hwbreak_feature): Declare.
4986 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4987 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4988 supports_stopped_by_hw_breakpoint>: New fields.
4989 (target_supports_stopped_by_sw_breakpoint)
4990 (target_stopped_by_sw_breakpoint)
4991 (target_supports_stopped_by_hw_breakpoint)
4992 (target_stopped_by_hw_breakpoint): Declare.
4993
4994 2015-03-04 Pedro Alves <palves@redhat.com>
4995
4996 enum lwp_stop_reason -> enum target_stop_reason
4997 * linux-low.c (check_stopped_by_breakpoint): Adjust.
4998 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4999 (linux_wait_1, stuck_in_jump_pad_callback)
5000 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5001 (linux_stopped_by_watchpoint):
5002 * linux-low.h (enum lwp_stop_reason): Delete.
5003 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5004 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5005
5006 2015-03-04 Yao Qi <yao.qi@linaro.org>
5007
5008 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5009
5010 2015-03-03 Gary Benson <gbenson@redhat.com>
5011
5012 * hostio.c (handle_vFile): Fix prefix lengths.
5013
5014 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5015
5016 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5017 ptr_bits.
5018
5019 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5020
5021 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5022 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5023 (clean): Add "rm -f" for above C files.
5024 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5025 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5026 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5027 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5028 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5029 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5030 (init_registers_s390x_vx_linux64)
5031 (init_registers_s390x_tevx_linux64)
5032 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5033 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5034 declarations.
5035 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5036 (s390_store_vxrs_high): New functions.
5037 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5038 NT_S390_VXRS_HIGH.
5039 (s390_arch_setup): Add logic for selecting one of the new target
5040 descriptions. Activate the new vector regsets if applicable.
5041 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5042 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5043 and init_registers_s390x_tevx_linux64.
5044
5045 2015-03-01 Pedro Alves <palves@redhat.com>
5046
5047 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5048 parameter.
5049
5050 2015-02-27 Pedro Alves <palves@redhat.com>
5051
5052 * linux-x86-low.c (u_debugreg_offset): New function.
5053 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5054
5055 2015-02-27 Pedro Alves <palves@redhat.com>
5056
5057 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5058 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5059 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5060 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5061 (ps_lsetfpregs, ps_getpid)
5062 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5063 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5064 (ps_lsetxregs, ps_plog): Declare.
5065
5066 2015-02-27 Pedro Alves <palves@redhat.com>
5067
5068 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5069 IP_AGENT_EXPORT_FUNC.
5070 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5071 IP_AGENT_EXPORT_FUNC.
5072 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5073 (IP_AGENT_EXPORT): Delete.
5074 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5075 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5076 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5077 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5078 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5079 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5080 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5081 (traceframe_read_count, traceframe_write_count)
5082 (traceframes_created, trace_state_variables, get_raw_reg)
5083 (get_trace_state_variable_value, set_trace_state_variable_value)
5084 (ust_loaded, helper_thread_id, cmd_buf): Use
5085 IPA_SYM_EXPORTED_NAME.
5086 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5087 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5088 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5089 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5090 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5091 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5092 EXTERN_C_PUSH/EXTERN_C_POP.
5093 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5094 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5095 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5096 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5097 (traceframe_write_count, traceframe_read_count)
5098 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5099 (about_to_request_buffer_space, get_trace_state_variable_value)
5100 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5101 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5102 EXTERN_C_PUSH/EXTERN_C_POP.
5103 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5104 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5105 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5106 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5107 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5108 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5109 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5110 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5111 Define.
5112 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5113 (IP_AGENT_EXPORT_VAR_DECL): Define.
5114 (tracing): Declare.
5115 (gdb_agent_get_raw_reg): Declare.
5116
5117 2015-02-27 Tom Tromey <tromey@redhat.com>
5118 Pedro Alves <palves@redhat.com>
5119
5120 Rename symbols whose names are reserved C++ keywords throughout.
5121
5122 2015-02-27 Pedro Alves <palves@redhat.com>
5123
5124 * Makefile.in (COMPILER): New, get it from autoconf.
5125 (CXX): Get from autoconf instead.
5126 (COMPILE.pre): Use COMPILER.
5127 (CC-LD): Rename to ...
5128 (CC_LD): ... this. Use COMPILER.
5129 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5130 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5131 * acinclude.m4: Include build-with-cxx.m4.
5132 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5133 Disable -Werror by default if building in C++ mode.
5134 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5135 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5136 the C++ compiler. Save/restore CXXFLAGS too.
5137 * configure: Regenerate.
5138
5139 2015-02-27 Pedro Alves <palves@redhat.com>
5140
5141 * acinclude.m4: Include libiberty.m4.
5142 * configure.ac: Call libiberty_INIT.
5143 * config.in, configure: Regenerate.
5144
5145 2015-02-26 Pedro Alves <palves@redhat.com>
5146
5147 * linux-low.c (linux_wait_1): When incrementing the PC past a
5148 program breakpoint always use the_low_target.breakpoint_len as
5149 increment, rather than the maximum between that and
5150 the_low_target.decr_pc_after_break.
5151
5152 2015-02-23 Pedro Alves <palves@redhat.com>
5153
5154 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5155 thread was doing a step-over; always adjust the PC if
5156 we stepped over a permanent breakpoint.
5157 (linux_wait_1): If we stepped over breakpoint that was on top of a
5158 permanent breakpoint, manually advance the PC past it.
5159
5160 2015-02-23 Pedro Alves <palves@redhat.com>
5161
5162 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5163 modes.
5164 (x86_fill_gregset, x86_store_gregset): Use it when handling
5165 $orig_eax.
5166
5167 2015-02-20 Pedro Alves <palves@redhat.com>
5168
5169 * thread-db.c: Include "nat/linux-procfs.h".
5170 (thread_db_init): Skip listing new threads if the kernel supports
5171 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5172
5173 2015-02-20 Pedro Alves <palves@redhat.com>
5174
5175 * linux-low.c (status_pending_p_callback): Use ptid_match.
5176
5177 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5178
5179 PR breakpoints/16812
5180 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5181 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5182 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5183
5184 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5185
5186 PR breakpoints/15956
5187 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5188
5189 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5190
5191 * linux-low.c (linux_low_btrace_conf): Print size.
5192 * server.c (handle_btrace_conf_general_set): New.
5193 (hanle_general_set): Call handle_btrace_conf_general_set.
5194 (handle_query): Report Qbtrace-conf:bts:size as supported.
5195
5196 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5197
5198 * linux-low.c (linux_low_enable_btrace): Update parameters.
5199 (linux_low_btrace_conf): New.
5200 (linux_target_ops)<to_btrace_conf>: Initialize.
5201 * server.c (current_btrace_conf): New.
5202 (handle_btrace_enable): Rename to ...
5203 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5204 to target_enable_btrace. Update comment. Update users.
5205 (handle_qxfer_btrace_conf): New.
5206 (qxfer_packets): Add btrace-conf entry.
5207 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5208 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5209 (target_ops)<read_btrace_conf>: New.
5210 (target_enable_btrace): Update parameters.
5211 (target_read_btrace_conf): New.
5212
5213 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5214
5215 * server.c (handle_btrace_general_set): Remove call to
5216 target_supports_btrace.
5217 (supported_btrace_packets): New.
5218 (handle_query): Call supported_btrace_packets.
5219 * target.h: include btrace-common.h.
5220 (btrace_target_info): Removed.
5221 (supports_btrace, target_supports_btrace): Update parameters.
5222
5223 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5224
5225 * Makefile.in (SFILES): Add common/btrace-common.c.
5226 (OBS): Add common/btrace-common.o.
5227 (btrace-common.o): Add build rules.
5228 * linux-low: Include btrace-common.h.
5229 (linux_low_read_btrace): Use struct btrace_data. Call
5230 btrace_data_init and btrace_data_fini.
5231
5232 2015-02-06 Pedro Alves <palves@redhat.com>
5233
5234 * thread-db.c (find_new_threads_callback): Add debug output.
5235
5236 2015-02-04 Pedro Alves <palves@redhat.com>
5237
5238 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5239 (resume_stopped_resumed_lwps): New function.
5240 (linux_wait_for_event_filtered): Use it.
5241
5242 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5243
5244 * Makefile.in (SFILES): Add linux-personality.c.
5245 (linux-personality.o): New rule.
5246 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5247 list of objects to be built.
5248 * linux-low.c: Include nat/linux-personality.h.
5249 (linux_create_inferior): Remove code to disable address space
5250 randomization (moved to ../nat/linux-personality.c). Create
5251 cleanup to disable address space randomization.
5252
5253 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5254
5255 * Makefile.in (posix-strerror.o): New rule.
5256 (mingw-strerror.o): Likewise.
5257 * configure: Regenerated.
5258 * configure.ac: Source file ../common/common.host. Initialize new
5259 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5260
5261 2015-01-14 Yao Qi <yao@codesourcery.com>
5262
5263 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5264 (ppc-linux.o): New rule.
5265 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5266 * configure.ac: AC_CHECK_FUNCS(getauxval).
5267 * config.in: Re-generated.
5268 * configure: Re-generated.
5269 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5270 ppc64_64bit_inferior_p
5271
5272 2015-01-14 Yao Qi <yao@codesourcery.com>
5273
5274 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5275 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5276 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5277 (PT_ORIG_R3, PT_TRAP): Likewise.
5278 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5279 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5280 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5281
5282 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5283
5284 * i387-fp.c (i387_cache_to_xsave): In look over
5285 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5286 zmmh_low_space field by use of zmmh_high_space.
5287
5288 2015-01-09 Pedro Alves <palves@redhat.com>
5289
5290 * linux-low.c (step_over_bkpt): Move higher up in the file.
5291 (handle_extended_wait): Don't store the stop_pc here.
5292 (get_stop_pc): Adjust comments and rename to ...
5293 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5294 stopped for a software breakpoint or hardware breakpoint.
5295 (thread_still_has_status_pending_p): New function.
5296 (status_pending_p_callback): Use
5297 thread_still_has_status_pending_p. If the event is no longer
5298 interesting, resume the LWP.
5299 (handle_tracepoints): Add assert.
5300 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5301 (wstatus_maybe_breakpoint): New function.
5302 (cancel_breakpoint): Delete function.
5303 (check_stopped_by_watchpoint): New function, factored out from
5304 linux_low_filter_event.
5305 (lp_status_maybe_breakpoint): Delete function.
5306 (linux_low_filter_event): Remove filter_ptid argument.
5307 Leave thread group exits pending here. Store the LWP's stop PC.
5308 Always leave events pending.
5309 (linux_wait_for_event_filtered): Pull all events out of the
5310 kernel, and leave them all pending.
5311 (count_events_callback, select_event_lwp_callback): Consider all
5312 events.
5313 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5314 (select_event_lwp): Only give preference to the stepping LWP in
5315 all-stop mode. Adjust comments.
5316 (ignore_event): New function.
5317 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5318 references to cancel_breakpoints. Adjust to renames. Also give
5319 equal priority to all LWPs that have had events in non-stop mode.
5320 If reporting a software breakpoint event, unadjust the LWP's PC.
5321 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5322 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5323 Adjust.
5324 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5325 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5326 (linux_stopped_by_watchpoint): Adjust.
5327 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5328 * linux-low.h (enum lwp_stop_reason): New.
5329 (struct lwp_info) <stop_pc>: Adjust comment.
5330 <stopped_by_watchpoint>: Delete field.
5331 <stop_reason>: New field.
5332 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5333 * mem-break.c (software_breakpoint_inserted_here)
5334 (hardware_breakpoint_inserted_here): New function.
5335 * mem-break.h (software_breakpoint_inserted_here)
5336 (hardware_breakpoint_inserted_here): Declare.
5337 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5338 (cancel_breakpoints): Delete.
5339 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5340 (upload_fast_traceframes): Remove references to
5341 cancel_breakpoints.
5342
5343 2015-01-09 Pedro Alves <palves@redhat.com>
5344
5345 * thread-db.c (find_new_threads_callback): Ignore thread if the
5346 kernel thread ID is -1.
5347
5348 2015-01-09 Pedro Alves <palves@redhat.com>
5349
5350 * linux-low.c (linux_attach_fail_reason_string): Move to
5351 nat/linux-ptrace.c, and rename.
5352 (linux_attach_lwp): Update comment.
5353 (attach_proc_task_lwp_callback): New function.
5354 (linux_attach): Adjust to rename and use
5355 linux_proc_attach_tgid_threads.
5356 (linux_attach_fail_reason_string): Delete declaration.
5357
5358 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5359
5360 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5361 * server.c (gdbserver_version): Likewise.
5362
5363 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5364
5365 * remote-utils.c: Include ctype.h.
5366 (input_interrupt): Explicitly handle the case when the char
5367 received is the NUL byte. Improve the printing of non-ASCII
5368 characters.
5369
5370 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5371
5372 * linux-low.c (linux_low_filter_event): Update call to
5373 linux_enable_event_reporting following the addition of
5374 a new parameter to that function.
5375
5376 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5377
5378 PR server/17457
5379 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5380 (AARCH64_FPCR_REGNO): Likewise.
5381 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5382 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5383 (aarch64_store_fpregset): Likewise.
5384
5385 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5386
5387 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5388 Remove FIXME comment about assumption about N.
5389
5390 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5391
5392 * configure.ac: If large-file support is disabled in GDBserver,
5393 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5394 * configure: Regenerate.
5395
5396 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5397
5398 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5399 warning upon ENODATA from ptrace.
5400 * linux-s390-low.c (s390_store_tdb): New.
5401 (s390_regsets): Add regset for NT_S390_TDB.
5402
5403 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5404
5405 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5406 without a fill_function.
5407 * linux-s390-low.c (s390_fill_last_break): Remove.
5408 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5409 (s390_arch_setup): Use regset's size instead of fill_function for
5410 loop end condition.
5411
5412 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5413
5414 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5415 the regset's store function when ptrace returned an error.
5416 * regcache.c (get_thread_regcache): Invalidate register cache
5417 before fetching inferior's registers.
5418
5419 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5420
5421 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5422 while-loop as for-loop.
5423 (regsets_store_inferior_registers): Likewise.
5424
5425 2014-11-28 Yao Qi <yao@codesourcery.com>
5426
5427 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5428 * config.in, configure: Re-generate.
5429 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5430 is defined.
5431
5432 2014-11-21 Yao Qi <yao@codesourcery.com>
5433
5434 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5435 (AC_CHECK_HEADERS): Remove malloc.h.
5436 * configure: Re-generated.
5437 * config.in: Re-generated.
5438 * server.h: Don't include alloca.h and malloc.h.
5439 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5440 Don't include malloc.h.
5441
5442 2014-11-17 Joel Brobecker <brobecker@adacore.com>
5443
5444 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5445 corresponding ERRNO check in same block.
5446
5447 2014-11-12 Pedro Alves <palves@redhat.com>
5448
5449 * server.c (cont_thread): Update comment.
5450 (start_inferior, attach_inferior): No longer clear cont_thread.
5451 (handle_v_cont): No longer set cont_thread.
5452 (captured_main): Clear cont_thread each time a GDB connects.
5453
5454 2014-11-12 Pedro Alves <palves@redhat.com>
5455
5456 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5457 thread, and don't resume all threads if the Hc thread has exited.
5458
5459 2014-11-12 Pedro Alves <palves@redhat.com>
5460
5461 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5462 the process group instead of to a specific LWP.
5463
5464 2014-10-15 Pedro Alves <palves@redhat.com>
5465
5466 PR server/17487
5467 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5468 parameter.
5469 (arm_set_thread_context): Delete.
5470 (the_low_target): Adjust.
5471 * win32-i386-low.c (debug_registers_changed)
5472 (debug_registers_used): Delete.
5473 (update_debug_registers_callback): New function.
5474 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5475 needing to update their debug registers.
5476 (win32_get_current_dr): New function.
5477 (x86_dr_low_get_addr, x86_dr_low_get_control)
5478 (x86_dr_low_get_status): Fetch the debug register from the thread
5479 record's context.
5480 (i386_initial_stuff): Adjust.
5481 (i386_get_thread_context): Remove current_event parameter. Don't
5482 clear debug_registers_changed nor copy DR values to
5483 debug_reg_state.
5484 (i386_set_thread_context): Delete.
5485 (i386_prepare_to_resume): New function.
5486 (i386_thread_added): Mark the thread as needing to update irs
5487 debug registers.
5488 (the_low_target): Remove i386_set_thread_context and install
5489 i386_prepare_to_resume.
5490 * win32-low.c (win32_get_thread_context): Adjust.
5491 (win32_set_thread_context): Use SetThreadContext
5492 directly.
5493 (win32_prepare_to_resume): New function.
5494 (win32_require_context): New function, factored out from ...
5495 (thread_rec): ... this.
5496 (continue_one_thread): Call win32_prepare_to_resume on each thread
5497 we're about to continue.
5498 (win32_resume): Call win32_prepare_to_resume on the event thread.
5499 * win32-low.h (struct win32_thread_info)
5500 <debug_registers_changed>: New field.
5501 (struct win32_target_ops): Change prototype of set_thread_context,
5502 delete set_thread_context and add prepare_to_resume.
5503 (win32_require_context): New declaration.
5504
5505 2014-10-08 Gary Benson <gbenson@redhat.com>
5506
5507 * server.h: Do not include common-exceptions.h.
5508
5509 2014-10-08 Gary Benson <gbenson@redhat.com>
5510
5511 * server.h: Do not include cleanups.h.
5512
5513 2014-09-30 James Hogan <james.hogan@imgtec.com>
5514
5515 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5516 mips64-dsp-linux.c.
5517
5518 2014-09-23 Yao Qi <yao@codesourcery.com>
5519
5520 * linux-low.c (lp_status_maybe_breakpoint): New function.
5521 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5522 (count_events_callback): Likewise.
5523 (select_event_lwp_callback): Likewise.
5524 (cancel_breakpoints_callback): Likewise.
5525
5526 2014-09-19 Don Breazeal <donb@codesourcery.com>
5527
5528 * linux-low.c (handle_extended_wait): Call
5529 linux_ptrace_get_extended_event.
5530 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5531 linux_is_extended_waitstatus.
5532
5533 2014-09-16 Joel Brobecker <brobecker@adacore.com>
5534
5535 * Makefile.in (CPPFLAGS): Define.
5536 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5537 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5538
5539 2014-09-16 Gary Benson <gbenson@redhat.com>
5540
5541 * inferiors.h (current_inferior): Renamed as...
5542 (current_thread): New variable. All uses updated.
5543 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5544 (maybe_move_out_of_jump_pad): Likewise.
5545 (cancel_breakpoint): Likewise.
5546 (linux_low_filter_event): Likewise.
5547 (wait_for_sigstop): Likewise.
5548 (linux_resume_one_lwp): Likewise.
5549 (need_step_over_p): Likewise.
5550 (start_step_over): Likewise.
5551 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5552 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5553 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5554 and save_inferior as saved_thread.
5555 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5556 saved_thread.
5557 (regcache_invalidate_thread): Likewise.
5558 * remote-utils.c (prepare_resume_reply): Likewise.
5559 * thread-db.c (thread_db_get_tls_address): Likewise.
5560 (disable_thread_event_reporting): Likewise.
5561 (remove_thread_event_breakpoints): Likewise.
5562 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5563 as saved_thread.
5564 * target.h (set_desired_inferior): Renamed as...
5565 (set_desired_thread): New declaration. All uses updated.
5566 * server.c (myresume): Updated comment to reference thread instead
5567 of inferior.
5568 (handle_serial_event): Likewise.
5569 (handle_target_event): Likewise.
5570
5571 2014-09-12 Tom Tromey <tromey@redhat.com>
5572 Gary Benson <gbenson@redhat.com>
5573
5574 * regcache.h: Include common-regcache.h.
5575 (regcache_read_pc): Don't declare.
5576 * regcache.c (get_thread_regcache_for_ptid): New function.
5577
5578 2014-09-11 Tom Tromey <tromey@redhat.com>
5579 Gary Benson <gbenson@redhat.com>
5580
5581 * symbol.c: New file.
5582 * Makefile.in (SFILES): Add symbol.c.
5583 (OBS): Add symbol.o.
5584
5585 2014-09-11 Gary Benson <gbenson@redhat.com>
5586
5587 * target.c (target_stop_ptid, target_continue_ptid): New
5588 functions.
5589
5590 2014-09-11 Tom Tromey <tromey@redhat.com>
5591 Gary Benson <gbenson@redhat.com>
5592
5593 * target.h: Include target/target.h.
5594 * target.c (target_read_memory, target_read_uint32)
5595 (target_write_memory): New functions.
5596
5597 2014-09-11 Gary Benson <gbenson@redhat.com>
5598
5599 * server.h (debug_hw_points): Don't declare.
5600 * server.c (debug_hw_points): Don't define. Replace all uses
5601 with show_debug_regs.
5602 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5603 all uses with show_debug_regs.
5604
5605 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5606
5607 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5608 endianness into account.
5609 (ppc_supply_ptrace_register): Likewise.
5610
5611 2014-09-03 James Hogan <james.hogan@imgtec.com>
5612
5613 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5614 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5615
5616 2014-09-03 Gary Benson <gbenson@redhat.com>
5617
5618 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5619 ALL_DEBUG_ADDRESS_REGISTERS.
5620
5621 2014-09-02 Gary Benson <gbenson@redhat.com>
5622
5623 * i386-low.h: Renamed as...
5624 * x86-low.h: New file. All type, function and variable name
5625 prefixes changed from "i386_" to "x86_". All references updated.
5626 * i386-low.c: Renamed as...
5627 * x86-low.c: New file. All type, function and variable name
5628 prefixes changed from "i386_" to "x86_". All references updated.
5629
5630 2014-09-02 Gary Benson <gbenson@redhat.com>
5631
5632 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5633 (x86_linux_new_thread): Likewise.
5634
5635 2014-08-29 Gary Benson <gbenson@redhat.com>
5636
5637 * server.h (setjmp.h): Do not include.
5638 (toplevel): Do not declare.
5639 (common-exceptions.h): Include.
5640 (cleanups.h): Likewise.
5641 * server.c (toplevel): Do not define.
5642 (exit_code): New static global.
5643 (detach_or_kill_for_exit_cleanup): New function.
5644 (main): New function. Original main renamed to...
5645 (captured_main): New function.
5646 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5647
5648 2014-08-29 Gary Benson <gbenson@redhat.com>
5649
5650 * Makefile.in (SFILES): Add common/common-exceptions.c.
5651 (OBS): Add common-exceptions.o.
5652 (common-exceptions.o): New rule.
5653 * utils.c (prepare_to_throw_exception): New function.
5654
5655 2014-08-29 Gary Benson <gbenson@redhat.com>
5656
5657 * config.in: Regenerate.
5658 * configure: Likewise.
5659
5660 2014-08-29 Gary Benson <gbenson@redhat.com>
5661
5662 * Makefile.in (SFILES): Add common/cleanups.c.
5663 (OBS): cleanups.o.
5664 (cleanups.o): New rule.
5665
5666 2014-08-29 Gary Benson <gbenson@redhat.com>
5667
5668 * utils.c (internal_vwarning): New function.
5669
5670 2014-08-28 Gary Benson <gbenson@redhat.com>
5671
5672 * utils.h (fatal): Remove declaration.
5673 * utils.c (fatal): Remove function.
5674
5675 2014-08-28 Gary Benson <gbenson@redhat.com>
5676
5677 * tracepoint.c (gdb_agent_init): Replace fatal with
5678 perror_with_name.
5679 (initialize_tracepoint): Likewise.
5680
5681 2014-08-28 Gary Benson <gbenson@redhat.com>
5682
5683 * remote-utils.c (remote_prepare): Replace fatal with error.
5684
5685 2014-08-28 Gary Benson <gbenson@redhat.com>
5686
5687 * linux-low.c (linux_async): Replace fatal with warning.
5688 Tidy up and return.
5689 (linux_start_non_stop): Return -1 if linux_async failed.
5690
5691 2014-08-28 Gary Benson <gbenson@redhat.com>
5692
5693 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5694 gdb_assert.
5695 (i386_dr_low_get_addr): Remove vague comment.
5696 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5697 gdb_assert.
5698
5699 2014-08-28 Gary Benson <gbenson@redhat.com>
5700
5701 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5702 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5703 internal_error.
5704 (linux_resume_one_lwp): Likewise.
5705 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5706 gdb_assert.
5707 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5708 with internal_error.
5709 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5710 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5711 (find_register_by_name): Replace fatal with internal_error.
5712 (find_regno): Likewise.
5713 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5714 * thread-db.c (thread_db_create_event): Likewise.
5715 (thread_db_load_search): Likewise.
5716 (try_thread_db_load_1): Likewise.
5717 * tracepoint.c (get_jump_space_head): Replace fatal with
5718 internal_error.
5719 (claim_trampoline_space): Likewise.
5720 (have_fast_tracepoint_trampoline_buffer): Likewise.
5721 (cmd_qtstart): Likewise.
5722 (stop_tracing): Likewise.
5723 (fast_tracepoint_collecting): Likewise.
5724 (target_malloc): Likewise.
5725 (download_tracepoint): Likewise.
5726 (download_trace_state_variables): Replace check with gdb_assert.
5727 (upload_fast_traceframes): Replace fatal with internal_error.
5728
5729 2014-08-19 Tom Tromey <tromey@redhat.com>
5730 Gary Benson <gbenson@redhat.com>
5731
5732 * Makefile.in (SFILES): Add common/common-debug.c.
5733 (OBS): Add common-debug.o.
5734 (common-debug.o): New rule.
5735 * debug.h (debug_printf): Don't declare.
5736 * debug.c (debug_printf): Renamed and rewritten as...
5737 (debug_vprintf): New function.
5738
5739 2014-08-19 Gary Benson <gbenson@redhat.com>
5740
5741 * utils.h: Do not include print-utils.h.
5742
5743 2014-08-19 Tom Tromey <tromey@redhat.com>
5744 Gary Benson <gbenson@redhat.com>
5745
5746 * server.h: Add static assertion.
5747 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5748
5749 2014-08-19 Tom Tromey <tromey@redhat.com>
5750 Gary Benson <gbenson@redhat.com>
5751
5752 * Makefile.in (SFILES): Add common/errors.c.
5753 (OBS): Add errors.o.
5754 (IPA_OBS): Add errors-ipa.o.
5755 (errors.o): New rule.
5756 (errors-ipa.o): Likewise.
5757 * utils.h (perror_with_name, error, warning): Don't declare.
5758 * utils.c (warning): Renamed and rewritten as...
5759 (vwarning): New function.
5760 (error): Renamed and rewritten as...
5761 (verror): New function.
5762 (internal_error): Renamed and rewritten as...
5763 (internal_verror): New function.
5764
5765 2014-08-07 Gary Benson <gbenson@redhat.com>
5766
5767 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5768 * configure: Regenerate.
5769 * config.in: Likewise.
5770 * server.h: Do not include errno.h.
5771 * event-loop.c: Likewise.
5772 * hostio-errno.c: Likewise.
5773 * linux-low.c: Likewise.
5774 * remote-utils.c: Likewise.
5775 * spu-low.c: Likewise.
5776 * utils.c: Likewise.
5777 * gdbreplay.c: Unconditionally include errno.h.
5778
5779 2014-08-07 Gary Benson <gbenson@redhat.com>
5780
5781 * server.h: Do not include string.h.
5782 * event-loop.c: Likewise.
5783 * linux-low.c: Likewise.
5784 * regcache.c: Likewise.
5785 * remote-utils.c: Likewise.
5786 * spu-low.c: Likewise.
5787 * utils.c: Likewise.
5788
5789 2014-08-07 Gary Benson <gbenson@redhat.com>
5790
5791 * server.h: Do not include gdb_assert.h.
5792
5793 2014-08-07 Gary Benson <gbenson@redhat.com>
5794
5795 * server.h: Do not include common-utils.h.
5796
5797 2014-08-07 Gary Benson <gbenson@redhat.com>
5798
5799 * server.h: Do not include ptid.h.
5800 * notif.h: Likewise.
5801
5802 2014-08-07 Gary Benson <gbenson@redhat.com>
5803
5804 * server.h: Do not include gdb_locale.h.
5805
5806 2014-08-07 Gary Benson <gbenson@redhat.com>
5807
5808 * server.h: Do not include gdb/signals.h.
5809 * win32-low.c: Likewise.
5810
5811 2014-08-07 Gary Benson <gbenson@redhat.com>
5812
5813 * server.h: Do not include pathmax.h.
5814
5815 2014-08-07 Gary Benson <gbenson@redhat.com>
5816
5817 * server.h: Do not include libiberty.h.
5818 * linux-bfin-low.c: Likewise.
5819
5820 2014-08-07 Gary Benson <gbenson@redhat.com>
5821
5822 * server.h: Do not include ansidecl.h.
5823
5824 2014-08-07 Gary Benson <gbenson@redhat.com>
5825
5826 * linux-x86-low.c: Do not include stddef.h.
5827 * lynx-ppc-low.c: Likewise.
5828 * tracepoint.c: Likewise.
5829
5830 2014-08-07 Gary Benson <gbenson@redhat.com>
5831
5832 * server.h: Do not include stdarg.h.
5833 * nto-low.c: Likewise.
5834
5835 2014-08-07 Gary Benson <gbenson@redhat.com>
5836
5837 * server.h: Do not include stdlib.h.
5838 * inferiors.c: Likewise.
5839 * linux-low.c: Likewise.
5840 * regcache.c: Likewise.
5841 * spu-low.c: Likewise.
5842 * tracepoint.c: Likewise.
5843 * utils.c: Likewise.
5844
5845 2014-08-07 Gary Benson <gbenson@redhat.com>
5846
5847 * server.h: Do not include stdio.h.
5848 * linux-low.c: Likewise.
5849 * remote-utils.c: Likewise.
5850 * spu-low.c: Likewise.
5851 * utils.c: Likewise.
5852 * wincecompat.c: Likewise.
5853
5854 2014-08-06 Gary Benson <gbenson@redhat.com>
5855
5856 * regcache.c (init_register_cache): Move conditionals inside if.
5857
5858 2014-08-06 Gary Benson <gbenson@redhat.com>
5859
5860 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5861
5862 2014-07-31 Gary Benson <gbenson@redhat.com>
5863
5864 * ax.h: Do not include server.h.
5865 * gdbthread.h: Likewise.
5866 * lynx-low.h: Likewise.
5867 * notif.h: Likewise.
5868
5869 2014-07-30 Gary Benson <gbenson@redhat.com>
5870
5871 * server.h: Include common-defs.h.
5872 Do not include config.h or build-gnulib-gdbserver/config.h.
5873
5874 2014-07-30 Gary Benson <gbenson@redhat.com>
5875
5876 * hostio-errno.c: Move server.h to top of includes list.
5877 * inferiors.c: Likewise.
5878 * linux-x86-low.c: Likewise.
5879 * notif.c: Include server.h.
5880
5881 2014-07-24 Tom Tromey <tromey@redhat.com>
5882 Gary Benson <gbenson@redhat.com>
5883
5884 * server.h (CORE_ADDR): Now unsigned.
5885
5886 2014-07-16 Pedro Alves <palves@redhat.com>
5887
5888 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5889
5890 2014-07-15 Pedro Alves <palves@redhat.com>
5891
5892 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5893 copy.
5894
5895 2014-07-11 Pedro Alves <palves@redhat.com>
5896
5897 * linux-low.c (kill_wait_lwp): New function, based on
5898 kill_one_lwp_callback, but use my_waitpid directly.
5899 (kill_one_lwp_callback, linux_kill): Use it.
5900
5901 2014-06-23 Pedro Alves <palves@redhat.com>
5902
5903 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5904 before setting DR0..DR3.
5905
5906 2014-06-20 Gary Benson <gbenson@redhat.com>
5907
5908 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5909 * configure: Regenerated.
5910 * config.in: Likewise.
5911
5912 2014-06-20 Gary Benson <gbenson@redhat.com>
5913
5914 * Makefile.in (SFILES): Update locations for files moved
5915 from common to nat.
5916 (object file files): Reordered.
5917
5918 2014-06-20 Gary Benson <gbenson@redhat.com>
5919
5920 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5921 (i386_dr_low_set_addr): Likewise.
5922 (i386_dr_low_get_addr): Likewise.
5923 (i386_dr_low_can_set_control): Likewise.
5924 (i386_dr_low_set_control): Likewise.
5925 (i386_dr_low_get_control): Likewise.
5926 (i386_dr_low_get_status): Likewise.
5927 (i386_get_debug_register_length): Likewise.
5928 * linux-x86-low.c (i386_dr_low_set_addr):
5929 Changed signature. Made static.
5930 (i386_dr_low_get_addr): Likewise.
5931 (i386_dr_low_set_control): Likewise.
5932 (i386_dr_low_get_control): Likewise.
5933 (i386_dr_low_get_status): Likewise.
5934 (i386_dr_low): New global variable.
5935 * win32-i386-low.c (i386_dr_low_set_addr):
5936 Changed signature. Made static.
5937 (i386_dr_low_get_addr): Likewise.
5938 (i386_dr_low_set_control): Likewise.
5939 (i386_dr_low_get_control): Likewise.
5940 (i386_dr_low_get_status): Likewise.
5941 (i386_dr_low): New global variable.
5942
5943 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5944
5945 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5946 * Makefile.in (AR, AR_FLAGS): Define.
5947 * configure: Regenerate.
5948
5949 2014-06-19 Gary Benson <gbenson@redhat.com>
5950
5951 * Makefile.in (i386-dregs.o): New rule.
5952 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5953 * i386-low.c (target.h): Remove include.
5954 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5955 (DR_CONTROL_SHIFT): Likewise.
5956 (DR_CONTROL_SIZE): Likewise.
5957 (DR_RW_EXECUTE): Likewise.
5958 (DR_RW_WRITE): Likewise.
5959 (DR_RW_READ): Likewise.
5960 (DR_RW_IORW): Likewise.
5961 (DR_LEN_1): Likewise.
5962 (DR_LEN_2): Likewise.
5963 (DR_LEN_4): Likewise.
5964 (DR_LEN_8): Likewise.
5965 (DR_LOCAL_ENABLE_SHIFT): Likewise.
5966 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5967 (DR_ENABLE_SIZE): Likewise.
5968 (DR_LOCAL_SLOWDOWN): Likewise.
5969 (DR_GLOBAL_SLOWDOWN): Likewise.
5970 (DR_CONTROL_RESERVED): Likewise.
5971 (I386_DR_CONTROL_MASK): Likewise.
5972 (I386_DR_VACANT): Likewise.
5973 (I386_DR_LOCAL_ENABLE): Likewise.
5974 (I386_DR_GLOBAL_ENABLE): Likewise.
5975 (I386_DR_DISABLE): Likewise.
5976 (I386_DR_SET_RW_LEN): Likewise.
5977 (I386_DR_GET_RW_LEN): Likewise.
5978 (I386_DR_WATCH_HIT): Likewise.
5979 (i386_wp_op_t): Likewise.
5980 (i386_show_dr): Likewise.
5981 (i386_length_and_rw_bits): Likewise.
5982 (i386_insert_aligned_watchpoint): Likewise.
5983 (i386_remove_aligned_watchpoint): Likewise.
5984 (i386_handle_nonaligned_watchpoint): Likewise.
5985 i386_update_inferior_debug_regs(): Likewise.
5986 (i386_dr_insert_watchpoint): Likewise.
5987 (i386_dr_remove_watchpoint): Likewise.
5988 (i386_dr_region_ok_for_watchpoint): Likewise.
5989 (i386_dr_stopped_data_address): Likewise.
5990 (i386_dr_stopped_by_watchpoint): Likewise.
5991
5992 2014-06-19 Gary Benson <gbenson@redhat.com>
5993
5994 * i386-low.c (i386_dr_show): Renamed to
5995 i386_show_dr and made static. All uses updated.
5996 (i386_dr_length_and_rw_bits): Renamed to
5997 i386_length_and_rw_bits and made static.
5998 All uses updated.
5999 (i386_dr_insert_aligned_watchpoint): Renamed to
6000 i386_insert_aligned_watchpoint and made static.
6001 All uses updated.
6002 (i386_dr_remove_aligned_watchpoint): Renamed to
6003 i386_remove_aligned_watchpoint and made static.
6004 All uses updated.
6005 (i386_dr_update_inferior_debug_regs): Renamed to
6006 i386_update_inferior_debug_regs and made static.
6007 All uses updated.
6008
6009 2014-06-18 Gary Benson <gbenson@redhat.com>
6010
6011 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6012 (i386_dr_low_can_set_control): Likewise.
6013 (i386_get_debug_register_length): Likewise.
6014 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6015 (i386_dr_low_can_set_control): Likewise.
6016 (i386_get_debug_register_length): Likewise.
6017
6018 2014-06-17 Gary Benson <gbenson@redhat.com>
6019
6020 * i386-low.h (i386-dregs.h): New include.
6021 (DR_FIRSTADDR): Now in i386-dregs.h.
6022 (DR_LASTADDR): Likewise.
6023 (DR_NADDR): Likewise.
6024 (DR_STATUS): Likewise.
6025 (DR_CONTROL): Likewise.
6026 (i386_debug_reg_state): Likewise.
6027 (i386_dr_insert_watchpoint): Likewise.
6028 (i386_dr_remove_watchpoint): Likewise.
6029 (i386_dr_region_ok_for_watchpoint): Likewise.
6030 (i386_dr_stopped_data_address): Likewise.
6031 (i386_dr_stopped_by_watchpoint): Likewise.
6032 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6033
6034 2014-06-18 Gary Benson <gbenson@redhat.com>
6035
6036 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6037 i386_dr_insert_watchpoint.
6038 (i386_low_remove_watchpoint): Renamed to
6039 i386_dr_remove_watchpoint.
6040 (i386_low_region_ok_for_watchpoint): Renamed to
6041 i386_dr_region_ok_for_watchpoint.
6042 (i386_low_stopped_data_address): Renamed to
6043 i386_dr_stopped_data_address.
6044 (i386_low_stopped_by_watchpoint): Renamed to
6045 i386_dr_stopped_by_watchpoint.
6046 * i386-low.c (i386_show_dr): Renamed to
6047 i386_dr_show and made nonstatic. All uses updated.
6048 (i386_length_and_rw_bits): Renamed to
6049 i386_dr_length_and_rw_bits and made nonstatic.
6050 All uses updated.
6051 (i386_insert_aligned_watchpoint): Renamed to
6052 i386_dr_insert_aligned_watchpoint and made nonstatic.
6053 All uses updated.
6054 (i386_remove_aligned_watchpoint): Renamed to
6055 i386_dr_remove_aligned_watchpoint and made nonstatic.
6056 All uses updated.
6057 (i386_update_inferior_debug_regs): Renamed to
6058 i386_dr_update_inferior_debug_regs and made nonstatic.
6059 All uses updated.
6060 (i386_low_insert_watchpoint): Renamed to
6061 i386_dr_insert_watchpoint. All uses updated.
6062 (i386_low_remove_watchpoint): Renamed to
6063 i386_dr_remove_watchpoint. All uses updated.
6064 (i386_low_region_ok_for_watchpoint): Renamed to
6065 i386_dr_region_ok_for_watchpoint. All uses updated.
6066 (i386_low_stopped_data_address): Renamed to
6067 i386_dr_stopped_data_address. All uses updated.
6068 (i386_low_stopped_by_watchpoint): Renamed to
6069 i386_dr_stopped_by_watchpoint. All uses updated.
6070
6071 2014-06-18 Gary Benson <gbenson@redhat.com>
6072
6073 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6074 (i386_dr_low_can_set_control): Likewise.
6075 (i386_insert_aligned_watchpoint): New check.
6076
6077 2014-06-18 Gary Benson <gbenson@redhat.com>
6078
6079 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6080 Renamed to state.
6081
6082 2014-06-18 Gary Benson <gbenson@redhat.com>
6083
6084 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6085 instead of fatal and error.
6086 (i386_handle_nonaligned_watchpoint): Likewise.
6087
6088 2014-06-18 Gary Benson <gbenson@redhat.com>
6089
6090 * i386-low.c (i386_get_debug_register_length): New macro.
6091 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6092 (i386_show_dr): Use debug_printf instead of fprintf. Use
6093 phex to format values.
6094
6095 2014-06-18 Gary Benson <gbenson@redhat.com>
6096
6097 * i386-low.h: Comment changes.
6098 * i386-low.c: Likewise.
6099
6100 2014-06-18 Gary Benson <gbenson@redhat.com>
6101
6102 * i386-low.c: Whitespace changes.
6103
6104 2014-06-12 Tom Tromey <tromey@redhat.com>
6105
6106 * utils.c (freeargv): Remove.
6107
6108 2014-06-12 Tom Tromey <tromey@redhat.com>
6109
6110 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6111 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6112 (parse_debug_format_options): Likewise.
6113 (gdbserver_usage): Likewise.
6114 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6115 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6116 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6117 against libiberty.
6118 ($(LIBGNU)): Depend on libiberty.
6119 (all-lib): Recurse into all subdirs.
6120 (install-only): Invoke "install" target in subdirs.
6121 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6122 targets.
6123 * configure: Rebuild.
6124 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6125 for vasprintf, vsnprintf, or gettimeofday.
6126 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6127 srv_tgtobj.
6128
6129 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6130
6131 * development.sh: Delete.
6132 * Makefile.in (config.status): Adjust dependency on development.sh.
6133 * configure.ac: Adjust development.sh source call.
6134 * configure: Regenerate.
6135
6136 2014-06-02 Pedro Alves <palves@redhat.com>
6137
6138 * ax.c (gdb_free_agent_expr): New function.
6139 * ax.h (gdb_free_agent_expr): New declaration.
6140 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6141 list.
6142 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6143 static.
6144 (clear_breakpoint_conditions_and_commands): New function.
6145 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6146 (clear_breakpoint_conditions_and_commands): New declaration.
6147
6148 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6149
6150 * linux-aarch64-low.c (asm/ptrace.h): Include.
6151
6152 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6153
6154 Fix TLS access for -static -pthread.
6155 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6156 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6157 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6158
6159 2014-05-20 Pedro Alves <palves@redhat.com>
6160
6161 * linux-aarch64-low.c (aarch64_insert_point)
6162 (aarch64_remove_point): No longer check whether the type is
6163 supported here. Adjust to new interface.
6164 (the_low_target): Install aarch64_supports_z_point_type as
6165 supports_z_point_type method.
6166 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6167 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6168 instead of a Z packet char. Adjust.
6169 (arm_supports_z_point_type): New function.
6170 (arm_insert_point, arm_remove_point): Adjust to new interface.
6171 (the_low_target): Install arm_supports_z_point_type.
6172 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6173 (cris_insert_point, cris_remove_point): Adjust to new interface.
6174 Don't check whether the type is supported here.
6175 (the_low_target): Install cris_supports_z_point_type.
6176 * linux-low.c (linux_supports_z_point_type): New function.
6177 (linux_insert_point, linux_remove_point): Adjust to new interface.
6178 * linux-low.h (struct linux_target_ops) <insert_point,
6179 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6180 raw_breakpoint pointer parameter.
6181 <supports_z_point_type>: New method.
6182 * linux-mips-low.c (mips_supports_z_point_type): New function.
6183 (mips_insert_point, mips_remove_point): Adjust to new interface.
6184 Use mips_supports_z_point_type.
6185 (the_low_target): Install mips_supports_z_point_type.
6186 * linux-ppc-low.c (the_low_target): Install NULL as
6187 supports_z_point_type method.
6188 * linux-s390-low.c (the_low_target): Install NULL as
6189 supports_z_point_type method.
6190 * linux-sparc-low.c (the_low_target): Install NULL as
6191 supports_z_point_type method.
6192 * linux-x86-low.c (x86_supports_z_point_type): New function.
6193 (x86_insert_point): Adjust to new insert_point interface. Use
6194 insert_memory_breakpoint. Adjust to new
6195 i386_low_insert_watchpoint interface.
6196 (x86_remove_point): Adjust to remove_point interface. Use
6197 remove_memory_breakpoint. Adjust to new
6198 i386_low_remove_watchpoint interface.
6199 (the_low_target): Install x86_supports_z_point_type.
6200 * lynx-low.c (lynx_target_ops): Install NULL as
6201 supports_z_point_type callback.
6202 * nto-low.c (nto_supports_z_point_type): New.
6203 (nto_insert_point, nto_remove_point): Adjust to new interface.
6204 (nto_target_ops): Install nto_supports_z_point_type.
6205 * mem-break.c: Adjust intro comment.
6206 (struct raw_breakpoint) <raw_type, size>: New fields.
6207 <inserted>: Update comment.
6208 <shlib_disabled>: Delete field.
6209 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6210 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6211 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6212 (raw_bkpt_type_to_target_hw_bp_type): New function.
6213 (find_enabled_raw_code_breakpoint_at): New function.
6214 (find_raw_breakpoint_at): New type and size parameters. Use them.
6215 (insert_memory_breakpoint): New function, based off
6216 set_raw_breakpoint_at.
6217 (remove_memory_breakpoint): New function.
6218 (set_raw_breakpoint_at): Reimplement.
6219 (set_breakpoint): New, based on set_breakpoint_at.
6220 (set_breakpoint_at): Reimplement.
6221 (delete_raw_breakpoint): Go through the_target->remove_point
6222 instead of assuming memory breakpoints.
6223 (find_gdb_breakpoint_at): Delete.
6224 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6225 (find_gdb_breakpoint): New function.
6226 (set_gdb_breakpoint_at): Delete.
6227 (z_type_supported): New function.
6228 (set_gdb_breakpoint_1): New function, loosely based off
6229 set_gdb_breakpoint_at.
6230 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6231 (delete_gdb_breakpoint_at): Delete.
6232 (delete_gdb_breakpoint_1): New function, loosely based off
6233 delete_gdb_breakpoint_at.
6234 (delete_gdb_breakpoint): New function.
6235 (clear_gdb_breakpoint_conditions): Rename to ...
6236 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6237 breakpoint.
6238 (add_condition_to_breakpoint): Make static.
6239 (add_breakpoint_condition): Take a struct breakpoint pointer
6240 instead of an address. Adjust.
6241 (gdb_condition_true_at_breakpoint): Rename to ...
6242 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6243 z_type parameter.
6244 (gdb_condition_true_at_breakpoint): Reimplement.
6245 (add_breakpoint_commands): Take a struct breakpoint pointer
6246 instead of an address. Adjust.
6247 (gdb_no_commands_at_breakpoint): Rename to ...
6248 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6249 parameter. Return true if no breakpoint was found. Change debug
6250 output.
6251 (gdb_no_commands_at_breakpoint): Reimplement.
6252 (run_breakpoint_commands): Rename to ...
6253 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6254 and change return type to boolean.
6255 (run_breakpoint_commands): New function.
6256 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6257 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6258 breakpoint. Go through the_target->remove_point instead of
6259 assuming memory breakpoint.
6260 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6261 software and hardware breakpoints.
6262 (reinsert_raw_breakpoint): Go through the_target->insert_point
6263 instead of assuming memory breakpoint.
6264 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6265 software and hardware breakpoints.
6266 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6267 Check both software and hardware breakpoints.
6268 (validate_inserted_breakpoint): Assert the breakpoint is a
6269 software breakpoint. Set the inserted flag to -1 instead of
6270 setting shlib_disabled.
6271 (delete_disabled_breakpoints): Adjust.
6272 (validate_breakpoints): Only validate software breakpoints.
6273 Adjust to inserted flag change.
6274 (check_mem_read, check_mem_write): Skip breakpoint types other
6275 than software breakpoints. Adjust to inserted flag change.
6276 * mem-break.h (enum raw_bkpt_type): New enum.
6277 (raw_breakpoint, struct process_info): Forward declare.
6278 (Z_packet_to_target_hw_bp_type): Delete declaration.
6279 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6280 (set_gdb_breakpoint, delete_gdb_breakpoint)
6281 (clear_breakpoint_conditions): New declarations.
6282 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6283 (breakpoint_inserted_here): Update comment.
6284 (add_breakpoint_condition, add_breakpoint_commands): Replace
6285 address parameter with a breakpoint pointer parameter.
6286 (gdb_breakpoint_here): Update comment.
6287 (delete_gdb_breakpoint_at): Delete.
6288 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6289 * server.c (process_point_options): Take a struct breakpoint
6290 pointer instead of an address. Adjust.
6291 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6292 delete_gdb_breakpoint.
6293 * spu-low.c (spu_target_ops): Install NULL as
6294 supports_z_point_type method.
6295 * target.h: Include mem-break.h.
6296 (struct target_ops) <prepare_to_access_memory>: Update comment.
6297 <supports_z_point_type>: New field.
6298 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6299 instead of a char. Also take a raw breakpoint pointer.
6300 * win32-arm-low.c (the_low_target): Install NULL as
6301 supports_z_point_type.
6302 * win32-i386-low.c (i386_supports_z_point_type): New function.
6303 (i386_insert_point, i386_remove_point): Adjust to new interface.
6304 (the_low_target): Install i386_supports_z_point_type.
6305 * win32-low.c (win32_supports_z_point_type): New function.
6306 (win32_insert_point, win32_remove_point): Adjust to new interface.
6307 (win32_target_ops): Install win32_supports_z_point_type.
6308 * win32-low.h (struct win32_target_ops):
6309 <supports_z_point_type>: New method.
6310 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6311 instead of a char. Also take a raw breakpoint pointer.
6312
6313 2014-05-20 Pedro Alves <palves@redhat.com>
6314
6315 * mem-break.h: Include break-common.h.
6316 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6317 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6318 (Z_packet_to_target_hw_bp_type): New declaration.
6319 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6320 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6321 (Z_PACKET_ACCESS_WP): Delete macros.
6322 (Z_packet_to_hw_type): Delete function.
6323 * i386-low.h: Don't include break-common.h here.
6324 (Z_packet_to_hw_type): Delete declaration.
6325 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6326 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6327 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6328 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6329 * linux-aarch64-low.c: Don't include break-common.h here.
6330 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6331 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6332 (Z_packet_to_target_hw_bp_type): Delete function.
6333 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6334 function.
6335 (mips_insert_point, mips_remove_point): Use
6336 Z_packet_to_target_hw_bp_type.
6337
6338 2014-05-20 Pedro Alves <palves@redhat.com>
6339
6340 * linux-aarch64-low.c: Include break-common.h.
6341 (enum target_point_type): Delete.
6342 (Z_packet_to_point_type): Rename to ...
6343 (Z_packet_to_target_hw_bp_type): ... this, and return a
6344 target_hw_bp_type instead.
6345 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6346 instead of an enum target_point_type.
6347 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6348 breakpoint type.
6349 (aarch64_dr_state_insert_one_point)
6350 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6351 (aarch64_handle_aligned_watchpoint)
6352 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6353 Take an enum target_hw_bp_type instead of an enum
6354 target_point_type.
6355 (aarch64_supports_z_point_type): New function.
6356 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6357 use Z_packet_to_target_hw_bp_type.
6358
6359 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6360
6361 * configure.ac: Only use -Werror by default when DEVELOPMENT
6362 is true.
6363 * configure: Regenerate.
6364
6365 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6366
6367 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6368 * linux-x86-low.c (X86_64_USER_REGS): New.
6369 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6370
6371 2014-04-28 Yao Qi <yao@codesourcery.com>
6372
6373 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6374 name.
6375
6376 2014-04-25 Pedro Alves <palves@redhat.com>
6377
6378 PR server/16255
6379 * linux-low.c (linux_attach_fail_reason_string): New function.
6380 (linux_attach_lwp): Delete.
6381 (linux_attach_lwp_1): Rename to ...
6382 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6383 argument. Remove "initial" parameter. Return int instead of
6384 void. Don't error or warn here.
6385 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6386 failure to attach to the tgid. Call warning when failing to
6387 attach to an lwp.
6388 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6389 argument. Remove "initial" parameter. Return int instead of
6390 void. Don't error or warn here.
6391 (linux_attach_fail_reason_string): New declaration.
6392 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6393 interface change. Use linux_attach_fail_reason_string.
6394
6395 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6396 Walfred Tedeschi <walfred.tedeschi@intel.com>
6397
6398 * Makefile.in: Added rules to handle new files
6399 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6400 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6401 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6402 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6403 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6404 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6405 x32-avx512-linux.o.
6406 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6407 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6408 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6409 i386/x32-avx512.xml.
6410 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6411 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6412 i386/x32-avx512-linux.xml.
6413 * i387-fp.c (num_avx512_k_registers): New constant for number
6414 of K registers.
6415 (num_avx512_zmmh_low_registers): New constant for number of
6416 lower ZMM registers (0-15).
6417 (num_avx512_zmmh_high_registers): New constant for number of
6418 higher ZMM registers (16-31).
6419 (num_avx512_ymmh_registers): New contant for number of higher
6420 YMM registers (ymm16-31 added by avx521 on x86_64).
6421 (num_avx512_xmm_registers): New constant for number of higher
6422 XMM registers (xmm16-31 added by AVX512 on x86_64).
6423 (struct i387_xsave): Add space for AVX512 registers.
6424 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6425 Add code to handle AVX512 registers.
6426 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6427 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6428 prototypei from generated file.
6429 (tdesc_amd64_avx512_linux): Likewise.
6430 (init_registers_x32_avx512_linux): Likewise.
6431 (tdesc_x32_avx512_linux): Likewise.
6432 (init_registers_i386_avx512_linux): Likewise.
6433 (tdesc_i386_avx512_linux): Likewise.
6434 (x86_64_regmap): Add AVX512 registers.
6435 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6436 mask.
6437 (initialize_low_arch): Add code to initialize AVX512 registers.
6438
6439 2014-04-23 Pedro Alves <palves@redhat.com>
6440
6441 * mem-break.c (find_gdb_breakpoint_at): Make static.
6442 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6443
6444 2014-04-23 Pedro Alves <palves@redhat.com>
6445
6446 * i386-low.c: Don't include break-common.h here.
6447 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6448 prototype to take target_hw_bp_type as argument instead of a Z
6449 packet char.
6450 * i386-low.h: Include break-common.h here.
6451 (Z_packet_to_hw_type): Declare.
6452 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6453 prototypes.
6454 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6455 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6456 (x86_remove_point): Convert the packet number to a
6457 target_hw_bp_type before calling i386_low_remove_watchpoint.
6458 * win32-i386-low.c (i386_insert_point): Convert the packet number
6459 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6460 (i386_remove_point): Convert the packet number to a
6461 target_hw_bp_type before calling i386_low_remove_watchpoint.
6462
6463 2014-04-23 Pedro Alves <palves@redhat.com>
6464
6465 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6466
6467 2014-04-10 Pedro Alves <palves@redhat.com>
6468
6469 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6470 Check if the condition or command is NULL before checking if the
6471 breakpoint is known. On success, return true.
6472 * mem-break.h (add_breakpoint_condition): Document return.
6473 (add_breakpoint_commands): Add describing comment.
6474 * server.c (skip_to_semicolon): New function.
6475 (process_point_options): Use it.
6476
6477 2014-04-09 Pedro Alves <palves@redhat.com>
6478
6479 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6480 to lwpid_of.
6481
6482 2014-02-27 Pedro Alves <palves@redhat.com>
6483
6484 PR 12702
6485 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6486 macros.
6487 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6488 output.
6489 (last_thread_of_process_p): Take a PID argument instead of a
6490 thread pointer.
6491 (linux_wait_for_lwp): Delete.
6492 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6493 functions.
6494 (linux_low_filter_event): New function, party factored out from
6495 linux_wait_for_event.
6496 (linux_wait_for_event): Rename to ...
6497 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6498 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6499 sigsuspend. Check for zombie leaders.
6500 (linux_wait_for_event): Reimplement as wrapper around
6501 linux_wait_for_event_filtered.
6502 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6503 a normal or signal exit is seen, it's the whole process exiting.
6504 (wait_for_sigstop): No longer a for_each_inferior callback.
6505 Rewrite on top of linux_wait_for_event_filtered.
6506 (stop_all_lwps): Call wait_for_sigstop directly.
6507 * server.c (resume, handle_target_event): Handle
6508 TARGET_WAITKIND_NO_RESUMED.
6509
6510 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6511
6512 * win32-low.c (psapi_get_dll_name,
6513 * win32_CreateToolhelp32Snapshot): Delete.
6514 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6515 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6516 Delete.
6517 (handle_load_dll): Add function description.
6518 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6519
6520 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6521
6522 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6523 Add comment.
6524 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6525 base address when calling win32_add_one_solib.
6526 (handle_load_dll): Delete local variable load_addr.
6527 Remove 0x1000 offset applied to DLL base address when calling
6528 win32_add_one_solib.
6529 (handle_unload_dll): Add comment.
6530
6531 2014-02-26 Joel Brobecker <brobecker@adacore.com>
6532
6533 * win32-low.c (win32_add_all_dlls): Renames
6534 win32_ensure_ntdll_loaded. Rewrite function documentation.
6535 Adjust implementation to always load all DLLs.
6536 Add 0x1000 offset to DLL base address when calling
6537 win32_add_one_solib.
6538 (child_initialization_done): New static global.
6539 (do_initial_child_stuff): Set child_initialization_done to
6540 zero during child initialization, and 1 after. Replace call
6541 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6542 Add comment.
6543 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6544 (handle_unload_dll): Add function documentation.
6545 (get_child_debug_event): Ignore load and unload DLL events
6546 during child initialization.
6547
6548 2014-02-20 Doug Evans <dje@google.com>
6549
6550 Remove global all_lwps.
6551 * inferiors.h (ptid_of): Move here from linux-low.h.
6552 (pid_of, lwpid_of): Ditto.
6553 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6554 parameter is a struct thread_info * now.
6555 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6556 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6557 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6558 directly.
6559 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6560 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6561 * linux-arm-low.c (update_registers_callback): Update, "entry"
6562 parameter is a struct thread_info * now.
6563 Fetch lwpid from current_inferior directly.
6564 (arm_insert_point): Pass &all_threads to find_inferior instead of
6565 &all_lwps.
6566 (arm_remove_point): Ditto.
6567 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6568 (arm_prepare_to_resume): Fetch pid from thread.
6569 (arm_read_description): Fetch lwpid from current_inferior directly.
6570 * linux-low.c (all_lwps): Delete.
6571 (delete_lwp): Delete call to remove_inferior.
6572 (handle_extended_wait): Fetch lwpid from thread.
6573 (add_lwp): Don't set lwp->entry.id. Remove call to
6574 add_inferior_to_list.
6575 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6576 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6577 (kill_one_lwp_callback): Ditto.
6578 (linux_kill): Don't dereference NULL pointer.
6579 Fetch ptid,lwpid from thread.
6580 (get_detach_signal): Fetch ptid from thread.
6581 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6582 Simplify call to regcache_invalidate_thread.
6583 (delete_lwp_callback): Update, "entry" parameter is a
6584 struct thread_info * now. Fetch pid from thread.
6585 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6586 (status_pending_p_callback): Update, "entry" parameter is a
6587 struct thread_info * now. Fetch ptid from thread.
6588 (find_lwp_pid): Update, "entry" parameter is a
6589 struct thread_info * now.
6590 (linux_wait_for_lwp): Fetch pid from thread.
6591 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6592 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6593 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6594 (dequeue_one_deferred_signal): Ditto.
6595 (cancel_breakpoint): Fetch ptid from current_inferior.
6596 (linux_wait_for_event): Pass &all_threads to find_inferior,
6597 not &all_lwps. Fetch ptid, lwpid from thread.
6598 (count_events_callback): Update, "entry" parameter is a
6599 struct thread_info * now.
6600 (select_singlestep_lwp_callback): Ditto.
6601 (select_event_lwp_callback): Ditto.
6602 (cancel_breakpoints_callback): Ditto.
6603 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6604 not &all_lwps.
6605 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6606 (unsuspend_one_lwp): Update, "entry" parameter is a
6607 struct thread_info * now.
6608 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6609 not &all_lwps.
6610 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6611 Fetch lwpid from thread, not lwp.
6612 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6613 Pass &all_threads to find_inferior, not &all_lwps.
6614 (send_sigstop): Fetch lwpid from thread, not lwp.
6615 (send_sigstop_callback): Update, "entry" parameter is a
6616 struct thread_info * now.
6617 (suspend_and_send_sigstop_callback): Ditto.
6618 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6619 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6620 struct thread_info * now.
6621 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6622 from thread, lwp.
6623 (lwp_running): Update, "entry" parameter is a
6624 struct thread_info * now.
6625 (stop_all_lwps): Fetch ptid from thread.
6626 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6627 (linux_resume_one_lwp): Fetch lwpid from thread.
6628 (linux_set_resume_request): Update, "entry" parameter is a
6629 struct thread_info * now. Fetch pid, lwpid from thread.
6630 (resume_status_pending_p): Update, "entry" parameter is a
6631 struct thread_info * now.
6632 (need_step_over_p): Ditto. Fetch lwpid from thread.
6633 (start_step_over): Fetch lwpid from thread.
6634 (linux_resume_one_thread): Update, "entry" parameter is a
6635 struct thread_info * now. Fetch lwpid from thread.
6636 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6637 (proceed_one_lwp): Update, "entry" parameter is a
6638 struct thread_info * now. Fetch lwpid from thread.
6639 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6640 struct thread_info * now.
6641 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6642 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6643 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6644 directly.
6645 (regsets_store_inferior_registers): Ditto.
6646 (fetch_register, store_register): Ditto.
6647 (linux_read_memory, linux_write_memory): Ditto.
6648 (linux_request_interrupt): Ditto.
6649 (linux_read_auxv): Ditto.
6650 (linux_xfer_siginfo): Ditto.
6651 (linux_qxfer_spu): Ditto.
6652 (linux_qxfer_libraries_svr4): Ditto.
6653 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6654 moved to inferiors.h.
6655 (get_lwp): Delete.
6656 (get_thread_lwp): Update.
6657 (struct lwp_info): Delete member "entry". Simplify comment for
6658 member "thread".
6659 (all_lwps): Delete.
6660 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6661 current_inferior directly.
6662 (update_watch_registers_callback): Update, "entry" parameter is a
6663 struct thread_info * now. Fetch pid from thread.
6664 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6665 (mips_insert_point): Fetch lwpid from current_inferior.
6666 Pass &all_threads to find_inferior, not &all_lwps.
6667 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6668 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6669 directly.
6670 (mips_stopped_data_address): Ditto.
6671 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6672 directly.
6673 * linux-tile-low.c (tile_arch_setup): Ditto.
6674 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6675 (update_debug_registers_callback): Update, "entry" parameter is a
6676 struct thread_info * now. Fetch pid from thread.
6677 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6678 Pass &all_threads to find_inferior, not &all_lwps.
6679 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6680 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6681 Pass &all_threads to find_inferior, not &all_lwps.
6682 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6683 (i386_dr_low_get_status): Ditto.
6684 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6685 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6686 (x86_linux_read_description): Ditto.
6687 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6688
6689 2014-02-20 Doug Evans <dje@google.com>
6690
6691 * inferiors.c (get_first_inferior): Fix buglet.
6692
6693 2014-02-19 Doug Evans <dje@google.com>
6694
6695 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6696 * inferiors.c (add_thread): Change result type to struct thread_info *.
6697 All callers updated.
6698 (add_lwp): Call add_thread here instead of in callers.
6699 All callers updated.
6700 * linux-low.h (get_lwp_thread): Rewrite.
6701 (struct lwp_info): New member "thread".
6702
6703 2014-02-19 Doug Evans <dje@google.com>
6704
6705 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6706 All callers updated.
6707
6708 2014-02-19 Doug Evans <dje@google.com>
6709
6710 * inferiors.c (add_thread): Fix whitespace.
6711
6712 2014-02-19 Doug Evans <dje@google.com>
6713
6714 * dll.c (clear_dlls): Replace accessing list implemention details
6715 with API function.
6716 * gdbthread.h (get_first_thread): Declare.
6717 * inferiors.c (for_each_inferior_with_data): New function.
6718 (get_first_thread): New function.
6719 (find_thread_ptid): Simplify.
6720 (get_first_inferior): New function.
6721 (clear_list): Delete.
6722 (one_inferior_p): New function.
6723 (clear_inferior_list): New function.
6724 (clear_inferiors): Update.
6725 * inferiors.h (for_each_inferior_with_data): Declare.
6726 (clear_inferior_list): Declare.
6727 (one_inferior_p): Declare.
6728 (get_first_inferior): Declare.
6729 * linux-low.c (linux_wait_for_event): Replace accessing list
6730 implemention details with API function.
6731 * server.c (target_running): Ditto.
6732 (accumulate_file_name_length): New function.
6733 (emit_dll_description): New function.
6734 (handle_qxfer_libraries): Replace accessing list implemention
6735 details with API function.
6736 (handle_qxfer_threads_worker): New function.
6737 (handle_qxfer_threads_proper): Replace accessing list implemention
6738 details with API function.
6739 (handle_query): Ditto.
6740 (visit_actioned_threads_callback_ftype): New typedef.
6741 (visit_actioned_threads_data): New struct.
6742 (visit_actioned_threads): Rewrite to be find_inferior callback.
6743 (resume): Call find_inferior.
6744 (handle_status): Replace accessing list implemention
6745 details with API function.
6746 (process_serial_event): Replace accessing list implemention details
6747 with API function.
6748 * target.c (set_desired_inferior): Replace accessing list implemention
6749 details with API function.
6750 * tracepoint.c (same_process_p): New function.
6751 (gdb_agent_about_to_close): Replace accessing list implemention
6752 details with API function.
6753 * win32-low.c (child_delete_thread): Replace accessing list
6754 implemention details with API function.
6755 (match_dll_by_basename): New function.
6756 (dll_is_loaded_by_basename): New function.
6757 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6758 details call to dll_is_loaded_by_basename.
6759
6760 2014-02-19 Doug Evans <dje@google.com>
6761
6762 * dll.h (struct dll_info): Add comment.
6763 * gdbthread.h (struct thread_info): Add comment.
6764 (current_ptid): Simplify.
6765 * inferiors.c (add_process): Update.
6766 (remove_process): Update.
6767 * inferiors.h (struct process_info): Rename member "head" to "entry".
6768 * linux-low.c (delete_lwp): Update.
6769 (add_lwp): Update.
6770 (last_thread_of_process_p): Update.
6771 (kill_one_lwp_callback, linux_kill): Update.
6772 (status_pending_p_callback): Update.
6773 (wait_for_sigstop): Update. Simplify read of ptid.
6774 (start_step_over): Update.
6775 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6776 (get_lwp_thread): Update.
6777 (struct lwp_info): Rename member "head" to "entry".
6778 * regcache.h (inferior_list_entry): Delete.
6779 * server.c (kill_inferior_callback): Update.
6780 (detach_or_kill_inferior_callback): Update.
6781 (print_started_pid): Update.
6782 (print_attached_pid): Update.
6783 (process_serial_event): Simplify read of ptid.
6784 * thread-db.c (thread_db_create_event): Update.
6785 (thread_db_get_tls_address): Update.
6786 * win32-low.c (current_inferior_ptid): Simplify.
6787
6788 2014-02-19 Tom Tromey <tromey@redhat.com>
6789
6790 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6791 argument.
6792 (target_supports_btrace): Update.
6793
6794 2014-02-14 Yao Qi <yao@codesourcery.com>
6795
6796 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6797 (rsp-low-ipa.o): New target.
6798
6799 2014-02-12 Tom Tromey <tromey@redhat.com>
6800
6801 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6802 convert_ascii_to_int.
6803 * regcache.c (registers_to_string): Likewise.
6804 * remote-utils.c (decode_M_packet): Likewise.
6805 * server.c (process_serial_event): Likewise.
6806
6807 2014-02-12 Tom Tromey <tromey@redhat.com>
6808
6809 * server.c (handle_query, handle_v_run): Use hex2bin, not
6810 unhexify.
6811 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6812
6813 2014-02-12 Tom Tromey <tromey@redhat.com>
6814
6815 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6816 convert_int_to_ascii.
6817 * regcache.c (registers_to_string, collect_register_as_string):
6818 Likewise.
6819 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6820 Likewise.
6821 * server.c (process_serial_event): Likewise.
6822 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6823 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6824
6825 2014-02-12 Tom Tromey <tromey@redhat.com>
6826
6827 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6828 bin2hex, not hexify.
6829 * tracepoint.c (cmd_qtstatus): Likewise.
6830
6831 2014-02-12 Tom Tromey <tromey@redhat.com>
6832
6833 * remote-utils.c (monitor_output): Pass explicit length to
6834 hexify.
6835
6836 2014-02-12 Tom Tromey <tromey@redhat.com>
6837
6838 * tracepoint.c: Include rsp-low.h.
6839 * server.c: Include rsp-low.h.
6840 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6841 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6842 declare.
6843 * remote-utils.c: Include rsp-low.h.
6844 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6845 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6846 (convert_int_to_ascii, convert_ascii_to_int): Move to
6847 common/rsp-low.c.
6848 * regcache.c: Include rsp-low.h.
6849 * ax.c: Include rsp-low.h.
6850 * Makefile.in (SFILES): Add common/rsp-low.c.
6851 (OBS): Add rsp-low.o.
6852 (rsp-low.o): New target.
6853
6854 2014-02-12 Tom Tromey <tromey@redhat.com>
6855
6856 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6857 Include print-utils.h.
6858 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6859 (plongest, thirty_two, phex_nz): Remove.
6860 * Makefile.in (SFILES): Add common/print-utils.c.
6861 (OBS): Add print-utils.o.
6862 (print-utils-ipa.o): New target.
6863 (print-utils.o): New target.
6864 (IPA_OBJS): Add print-utils-ipa.o.
6865
6866 2014-02-06 Tom Tromey <tromey@redhat.com>
6867
6868 * Makefile.in (SFILES): Fix indentation.
6869
6870 2014-02-05 Doug Evans <dje@google.com>
6871
6872 * linux-low.c (linux_wait_for_event): Improve comment.
6873 (linux_wait_1): Keep current_inferior in sync with event_child.
6874
6875 2014-01-22 Doug Evans <dje@google.com>
6876
6877 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6878
6879 2014-01-22 Doug Evans <dje@google.com>
6880
6881 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6882 * configure: Regenerate.
6883 * config.in: Regenerate.
6884 * Makefile.in (SFILES): Add debug.c.
6885 (OBS): Add debug.o.
6886 * debug.c: New file.
6887 * debug.h: New file.
6888 * linux-aarch64-low.c (*): Update all debugging printfs to use
6889 debug_printf instead of fprintf.
6890 * linux-arm-low.c (*): Ditto.
6891 * linux-cris-low.c (*): Ditto.
6892 * linux-crisv32-low.c (*): Ditto.
6893 * linux-m32r-low.c (*): Ditto.
6894 * linux-sparc-low.c (*): Ditto.
6895 * linux-x86.c (*): Ditto.
6896 * linux-low.c (*): Ditto.
6897 (linux_wait_1): Add calls to debug_enter, debug_exit.
6898 (linux_wait): Remove redundant debugging printf.
6899 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6900 (linux_resume, unstop_all_lwps): Ditto.
6901 * mem-break.c (*): Update all debugging printfs to use
6902 debug_printf instead of fprintf.
6903 * remote-utils.c (*): Ditto.
6904 * thread-db.c (*): Ditto.
6905 * server.c #include <ctype.h>, "gdb_vecs.h".
6906 (debug_threads): Moved to debug.c.
6907 (*): Update all debugging printfs to use debug_printf instead of
6908 fprintf.
6909 (start_inferior): Replace call to fflush with call to debug_flush.
6910 (monitor_show_help): Mention set debug-format.
6911 (parse_debug_format_options): New function.
6912 (handle_monitor_command): Handle "monitor set debug-format".
6913 (gdbserver_usage): Mention --debug-format.
6914 (main): Parse --debug-format.
6915 * server.h (debug_threads): Declaration moved to debug.h.
6916 #include "debug.h".
6917 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6918 trace_debug_1 that uses debug_printf.
6919 (tracepoint_look_up_symbols): Update all debugging printfs to use
6920 debug_printf instead of fprintf.
6921
6922 2014-01-20 Baruch Siach <baruch@tkos.co.il>
6923
6924 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6925 sys/ptrace.h.
6926
6927 2014-01-17 Pedro Alves <palves@redhat.com>
6928
6929 PR build/16445
6930 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6931 defined after including gdb_proc_service.h.
6932
6933 2014-01-16 Doug Evans <dje@google.com>
6934
6935 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6936 (match_dll): Use it.
6937
6938 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6939
6940 * target.h (target_ops) <read_btrace>: Change parameters and
6941 return type to allow error reporting.
6942 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6943 trace reading errors on.
6944 * linux-low.c (linux_low_read_btrace): Pass trace reading
6945 errors on.
6946 (linux_low_disable_btrace): New.
6947
6948 2014-01-15 Doug Evans <dje@google.com>
6949
6950 * inferiors.c (thread_id_to_gdb_id): Delete.
6951 * inferiors.h (thread_id_to_gdb_id): Delete.
6952
6953 2014-01-13 Eli Zaretskii <eliz@gnu.org>
6954
6955 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6956 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
6957 versions.
6958
6959 2014-01-08 Pedro Alves <palves@redhat.com>
6960
6961 * server.c (handle_status): Don't discard previous queued stop
6962 replies or thread's pending status here.
6963 (main) <disconnection>: Do it here instead.
6964
6965 2014-01-08 Pedro Alves <palves@redhat.com>
6966
6967 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6968 * server.c (visit_actioned_threads, handle_pending_status): New
6969 function.
6970 (handle_v_cont): Factor out parts to ...
6971 (resume): ... this new function. If in all-stop, and a thread
6972 being resumed has a pending status, report it without actually
6973 resuming.
6974 (myresume): Adjust to use the new 'resume' function.
6975 (clear_pending_status_callback, set_pending_status_callback)
6976 (find_status_pending_thread_callback): New functions.
6977 (handle_status): Handle the case of multiple threads having
6978 interesting statuses to report. Report threads' real last signal
6979 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
6980 with an interesting thread to report the status for, instead of
6981 always reporting the status of the first thread.
6982
6983 2014-01-01 Joel Brobecker <brobecker@adacore.com>
6984
6985 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6986 * gdbreplay.c (gdbreplay_version): Likewise.
6987
6988 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
6989
6990 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6991 iov.iov_len with the real length in use.
6992
6993 2013-12-13 Joel Brobecker <brobecker@adacore.com>
6994
6995 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6996 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6997 for all targets that use win32-low.c.
6998 * win32-low.c (win32_ensure_ntdll_loaded): New function.
6999 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7000
7001 2013-12-13 Pedro Alves <palves@redhat.com>
7002
7003 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7004 if equal to TARGET_WAITKIND_LOADED.
7005 * win32-low.c (cached_status): New static global.
7006 (win32_wait): Add declaration.
7007 (do_initial_child_stuff): Flush all initial pending debug events
7008 up to the initial breakpoint.
7009 (win32_wait): If CACHED_STATUS was set, return that instead
7010 of doing a real wait. Remove the code resuming the execution
7011 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7012 during the initial phase. Also remove the code changing
7013 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7014 TARGET_WAITKIND_STOPPED.
7015
7016 2013-12-11 Yao Qi <yao@codesourcery.com>
7017
7018 * notif.c (handle_notif_ack): Return 0 if no notification
7019 matches.
7020
7021 2013-11-20 Doug Evans <dje@google.com>
7022
7023 * linux-low.c (linux_set_resume_request): Fix comment.
7024
7025 2013-11-20 Doug Evans <dje@google.com>
7026
7027 * linux-low.c (resume_status_pending_p): Tweak comment.
7028
7029 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7030
7031 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7032 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7033 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7034 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7035 (srv_amd64_regobj): Add amd64-mpx.o.
7036 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7037 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7038 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7039 * i387-fp.c (num_pl_bnd_register) Added constant.
7040 (num_pl_bnd_cfg_registers) Added constant.
7041 (struct i387_xsave) Added reserved area and MPX fields.
7042 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7043 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7044 function.
7045 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7046 (init_registers_amd64_mpx_linux): Declare new function.
7047 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7048 (x86_64_regmap): Add MPX registers.
7049 (x86_linux_read_description): Add MPX case.
7050 (initialize_low_arch): Initialize MPX targets.
7051
7052 2013-11-18 Tom Tromey <tromey@redhat.com>
7053
7054 * configure: Rebuild.
7055 * configure.ac: Don't check for stdlib.h.
7056 * gdbreplay.c: Unconditionally include stdlib.h.
7057
7058 2013-11-18 Tom Tromey <tromey@redhat.com>
7059
7060 * config.in: Rebuild.
7061 * configure: Rebuild.
7062 * configure.ac: Don't use AC_HEADER_DIRENT.
7063
7064 2013-11-18 Tom Tromey <tromey@redhat.com>
7065
7066 * server.h: Don't check HAVE_STRING_H.
7067 * gdbreplay.c: Don't check HAVE_STRING_H.
7068 * configure: Rebuild.
7069
7070 2013-11-18 Tom Tromey <tromey@redhat.com>
7071
7072 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7073 LIBGNU.
7074
7075 2013-11-08 Tom Tromey <tromey@redhat.com>
7076
7077 * configure, config.in: Rebuild.
7078 * configure.ac: Remove unused configury.
7079
7080 2013-11-08 Tom Tromey <tromey@redhat.com>
7081
7082 * acinclude.m4: Include common.m4, codeset.m4.
7083 * configure, config.in: Rebuild.
7084 * configure.ac: Use GDB_AC_COMMON.
7085
7086 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7087
7088 * linux-s390-low.c (HWCAP_S390_TE): New define.
7089 (s390_arch_setup): Consider the TE field in the HWCAP for
7090 determining 'have_regset_tdb'.
7091
7092 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7093
7094 PR gdb/16014
7095 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7096 call to sizeof.
7097
7098 2013-10-02 Pedro Alves <palves@redhat.com>
7099
7100 * server.c (process_serial_event): Don't output "GDBserver
7101 exiting" if GDB is connected through stdio.
7102 * target.c (mywait): Likewise, be silent if GDB is connected
7103 through stdio.
7104
7105 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7106
7107 * lynx-low.c (lynx_add_threads_after_attach): New function.
7108 (lynx_attach): Remove call to add_thread. Add call to
7109 lynx_add_threads_after_attach instead.
7110
7111 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7112
7113 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7114 * config.in, configure: Regenerated.
7115
7116 2013-09-18 Yao Qi <yao@codesourcery.com>
7117
7118 PR server/15959
7119 * server.c (start_inferior): Clear 'resume_info'.
7120
7121 2013-09-16 Jiong Wang <jiwang@tilera.com>
7122
7123 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7124 for each register.
7125
7126 2013-09-16 Jiong Wang <jiwang@tilera.com>
7127
7128 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7129 linux-tile-low.o to srv_tgtobj.
7130
7131 2013-09-16 Will Newton <will.newton@linaro.org>
7132
7133 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7134 out regs.
7135
7136 2013-09-06 Pedro Alves <palves@redhat.com>
7137
7138 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7139 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7140 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7141 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7142 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7143 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7144
7145 2013-09-06 Pedro Alves <palves@redhat.com>
7146
7147 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7148 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7149
7150 2013-09-06 Pedro Alves <palves@redhat.com>
7151
7152 * linux-amd64-ipa.c: Include tracepoint.h.
7153 * linux-i386-ipa.c: Include tracepoint.h.
7154
7155 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7156
7157 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7158 (ps_get_thread_area): New function.
7159
7160 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7161
7162 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7163 (initialize_low_arch): Call init_registers_crisv32 rather than
7164 init_register_crisv32.
7165
7166 2013-09-05 Pedro Alves <palves@redhat.com>
7167
7168 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7169 to ...
7170 * hostio.h: ... this new file.
7171 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7172 win32-low.c: Include hostio.h.
7173
7174 2013-09-05 Pedro Alves <palves@redhat.com>
7175
7176 * server.h (gdb_client_data, handler_func, callback_handler_func)
7177 (delete_file_handler, add_file_handler, append_callback_event)
7178 (delete_callback_event, start_event_loop, initialize_event_loop):
7179 Move to event-loop.h and include it.
7180 * event-loop.h: New file.
7181
7182 2013-09-05 Pedro Alves <palves@redhat.com>
7183
7184 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7185 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7186 (loaded_dll, unloaded_dll): Move to ...
7187 * dll.h: ... this new file.
7188 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7189
7190 2013-09-05 Pedro Alves <palves@redhat.com>
7191
7192 * server.h (current_process, get_thread_process, all_processes)
7193 (add_inferior_to_list, for_each_inferior, current_inferior)
7194 (remove_inferior, add_process, remove_process, find_process_pid)
7195 (have_started_inferiors_p, have_attached_inferiors_p)
7196 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7197 (clear_inferiors, find_inferior, find_inferior_id)
7198 (inferior_target_data, set_inferior_target_data)
7199 (inferior_regcache_data, set_inferior_regcache_data): Move to
7200 inferiors.h, and include it.
7201 * inferiors.h: New file.
7202
7203 2013-09-05 Pedro Alves <palves@redhat.com>
7204
7205 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7206 Move ...
7207 * ax.h: ... here.
7208
7209 2013-09-05 Pedro Alves <palves@redhat.com>
7210
7211 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7212 tracepoint.h.
7213 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7214 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7215 (handle_tracepoint_general_set, handle_tracepoint_query)
7216 (tracepoint_finished_step, tracepoint_was_hit)
7217 (release_while_stepping_state_list, current_traceframe)
7218 (in_readonly_region, traceframe_read_mem)
7219 (fetch_traceframe_registers, traceframe_read_sdata)
7220 (traceframe_read_info, struct fast_tpoint_collect_status)
7221 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7222 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7223 (supply_fast_tracepoint_registers)
7224 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7225 (ipa_tdesc, claim_trampoline_space)
7226 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7227 (agent_mem_read, agent_get_trace_state_variable_value)
7228 (agent_set_trace_state_variable_value, agent_tsv_read)
7229 (agent_mem_read_string, get_raw_reg_func_addr)
7230 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7231 * tracepoint.h: ... this new file.
7232
7233 2013-09-05 Pedro Alves <palves@redhat.com>
7234
7235 * server.h (perror_with_name, error, fatal, warning, paddress)
7236 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7237 include it.
7238 * utils.h: New file.
7239
7240 2013-09-05 Pedro Alves <palves@redhat.com>
7241
7242 * server.h (remote_debug, noack_mode, transport_is_reliable)
7243 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7244 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7245 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7246 (write_enn, initialize_async_io, enable_async_io)
7247 (disable_async_io, check_remote_input_interrupt_request)
7248 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7249 (dead_thread_notify, prepare_resume_reply)
7250 (decode_address_to_semicolon, decode_address, decode_m_packet)
7251 (decode_M_packet, decode_X_packet, decode_xfer_write)
7252 (decode_search_memory_packet, unhexify, hexify)
7253 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7254 (look_up_one_symbol, relocate_instruction)
7255 (monitor_output): Move to remote-utils.h, and include it.
7256 * remote-utils.h: New file.
7257
7258 2013-09-05 Pedro Alves <palves@redhat.com>
7259
7260 * server.h (_): Delete.
7261
7262 2013-09-02 Pedro Alves <palves@redhat.com>
7263
7264 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7265 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7266 allocated.
7267 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7268
7269 2013-09-02 Pierre Muller <muller@sourceware.org>
7270
7271 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7272 or WriteProcessMemory complete successfully and handle
7273 ERROR_PARTIAL_COPY error.
7274
7275 2013-09-02 Pedro Alves <palves@redhat.com>
7276
7277 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7278 error instead of EIO.
7279
7280 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7281
7282 PR server/15604
7283 * linux-low.c: Include filestuff.h.
7284 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7285 * lynx-low.c: Include filestuff.h.
7286 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7287 * server.c: Include filestuff.h.
7288 (main): Call notice_open_fds.
7289 * spu-low.c: Include filestuff.h.
7290 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7291
7292 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7293
7294 * Makefile.in: Explain why ../target and ../nat are not
7295 listed as include file search paths.
7296 (linux-waitpid.o): New object file rule.
7297 * configure.srv (srv_native_linux_obj): New variable.
7298 Replace all occurrences of linux native object files with
7299 $srv_native_linux_obj.
7300 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7301 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7302 (linux_enable_event_reporting): Remove declaration.
7303 (my_waitpid): Moved to common/linux-waitpid.c.
7304 (linux_wait_for_event): Pass ptid when calling
7305 linux_enable_event_reporting.
7306 (linux_supports_tracefork_flag): Remove.
7307 (linux_enable_event_reporting): Likewise.
7308 (linux_tracefork_grandchild): Remove.
7309 (STACK_SIZE): Moved to common/linux-ptrace.c.
7310 (linux_tracefork_child): Remove.
7311 (linux_test_for_tracefork): Remove.
7312 (linux_look_up_symbols): Call linux_supports_traceclone.
7313 (initialize_low): Remove call to linux_test_for_tracefork.
7314 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7315 common/linux-ptrace.h.
7316 (PTRACE_TYPE_ARG4): Likewise.
7317 Include linux-ptrace.h.
7318
7319 2013-08-21 Pedro Alves <palves@redhat.com>
7320
7321 * config.in: Renegerate.
7322
7323 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7324
7325 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7326 (SFILES): Remove $(srcdir)/common/target-common.c and
7327 add $(srcdir)/target/waitstatus.c.
7328 (OBS): Remove target-common.o and add waitstatus.o.
7329 (server_h): Remove $(srcdir)/../common/target-common.h and
7330 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7331 and $(srcdir)/../target/waitstatus.h.
7332 (target-common.o): Remove.
7333 (waitstatus.o): New target object file.
7334 * target.h: Do not include target-common.h and
7335 include target/resume.h, target/wait.h and
7336 target/waitstatus.h.
7337
7338 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7339
7340 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7341 to PTRACE_TYPE_ARG3.
7342 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7343 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7344 PTRACE_TYPE_ARG4.
7345 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7346 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7347
7348 2013-07-27 Jie Zhang <jie@codesourcery.com>
7349 Daniel Jacobowitz <dan@codesourcery.com>
7350 Yao Qi <yao@codesourcery.com>
7351
7352 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7353 (mips-linux-watch.o): New rule.
7354 (mips_linux_watch_h): New variable.
7355 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7356 srv_tgtobj.
7357 * linux-mips-low.c: Include mips-linux-watch.h.
7358 (struct arch_process_info, struct arch_lwp_info): New.
7359 (update_watch_registers_callback): New function.
7360 (mips_linux_new_process, mips_linux_new_thread) New functions.
7361 (mips_linux_prepare_to_resume, mips_insert_point): New
7362 functions.
7363 (mips_remove_point, mips_stopped_by_watchpoint): New
7364 functions.
7365 (rsp_bp_type_to_target_hw_bp_type): New function.
7366 (mips_stopped_data_address): New function.
7367 (the_low_target): Add watchpoint support functions.
7368
7369 2013-07-27 Yao Qi <yao@codesourcery.com>
7370
7371 * i386-low.c: Include break-common.h.
7372 (enum target_hw_bp_type): Remove.
7373
7374 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7375
7376 * Makefile.in (SFILES): /common/target-common.c.
7377 (OBS): Add target-common.o.
7378 (server_h): Add $(srcdir)/../common/target-common.h.
7379 (target-common.o): New target.
7380 * server.c (queue_stop_reply_callback): Free
7381 status string after use.
7382 * target.c (target_waitstatus_to_string): Remove.
7383 * target.h: Include target-common.h.
7384 (resume_kind): Likewise.
7385 (target_waitkind): Likewise.
7386 (target_waitstatus): Likewise.
7387 (TARGET_WNOHANG): Likewise.
7388
7389 2013-07-04 Yao Qi <yao@codesourcery.com>
7390
7391 * Makefile.in (host_alias): Use @host_noncanonical@.
7392 (target_alias): Use @target_noncanonical@.
7393 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7394 ACX_NONCANONICAL_HOST.
7395 * configure: Regenerated.
7396
7397 Revert:
7398 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7399
7400 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7401 * configure: Rebuild.
7402 * Makefile.in (version_host, version_target): Get from configure.
7403 (version.c): Use $(version_host) and $(version_target).
7404
7405 2013-07-03 Pedro Alves <palves@redhat.com>
7406
7407 * Makefile.in (config.status): Depend on development.sh.
7408 * acinclude.m4: Include libmcheck.m4.
7409 * configure: Regenerate.
7410
7411 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7412
7413 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7414 attribute inside the parentheses.
7415 (winapi_DebugSetProcessKillOnExit): Ditto.
7416 (winapi_DebugBreakProcess): Ditto.
7417 (winapi_GenerateConsoleCtrlEvent): Ditto.
7418
7419 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7420
7421 * notif.h (notif_event): Add a dummy member to avoid compiler
7422 errors.
7423
7424 2013-07-01 Pedro Alves <palves@redhat.com>
7425
7426 * hostio.c (HOSTIO_PATH_MAX): Define.
7427 (require_filename, handle_open, handle_unlink, handle_readlink):
7428 Use it.
7429
7430 2013-07-01 Pedro Alves <palves@redhat.com>
7431
7432 * server.h: Include "pathmax.h".
7433 * linux-low.c: Don't include sys/param.h.
7434 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7435 MAXPATHLEN.
7436 * win32-low.c: Don't include sys/param.h.
7437 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7438
7439 2013-07-01 Pedro Alves <palves@redhat.com>
7440
7441 * event-loop.c: Don't check HAVE_UNISTD_H before including
7442 <unistd.h>.
7443 * gdbreplay.c: Likewise.
7444 * remote-utils.c: Likewise.
7445 * server.c: Likewise.
7446 * configure.ac: Don't check for unistd.h.
7447 * configure: Regenerate.
7448
7449 2013-06-28 Tom Tromey <tromey@redhat.com>
7450
7451 * Makefile.in (version.c): Use version.in, not
7452 common/version.in.
7453
7454 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7455
7456 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7457 * configure: Rebuild.
7458 * Makefile.in (version_host, version_target): Get from configure.
7459 (version.c): Use $(version_host) and $(version_target).
7460
7461 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7462
7463 Fix trace-status to output user name without trailing colon.
7464 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7465
7466 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7467
7468 Fix trace-status to output proper start-time and stop-time.
7469 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7470 output start time and stop time in hex as gdb expects.
7471
7472 2013-06-26 Pedro Alves <pedro@codesourcery.com>
7473
7474 * tracepoint.c (build_traceframe_info_xml): Output trace state
7475 variables present in the trace buffer.
7476
7477 2013-06-24 Tom Tromey <tromey@redhat.com>
7478
7479 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7480 create-version.sh.
7481 (version.o): Remove.
7482 * gdbreplay.c: Include version.h.
7483 (version, host_name): Don't declare.
7484 * server.h: Include version.h.
7485 (version, host_name): Don't declare.
7486
7487 2013-06-12 Pedro Alves <palves@redhat.com>
7488
7489 * linux-x86-low.c (linux_is_elf64): Delete global.
7490 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7491 with local linux_pid_exe_is_elf_64_file use.
7492
7493 2013-06-11 Pedro Alves <palves@redhat.com>
7494
7495 * linux-low.c (regset_disabled, disable_regset): New functions.
7496 (regsets_fetch_inferior_registers)
7497 (regsets_store_inferior_registers): Use them.
7498 (initialize_regsets_info); Don't allocate the disabled_regsets
7499 array here.
7500 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7501 comment.
7502
7503 2013-06-11 Pedro Alves <palves@redhat.com>
7504
7505 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7506 xmalloc.
7507
7508 2013-06-11 Pedro Alves <palves@redhat.com>
7509
7510 * linux-x86-low.c (initialize_low_arch): Call
7511 init_registers_x32_avx_linux.
7512
7513 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7514
7515 Fix compatibility with Android Bionic.
7516 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7517 it is not empty.
7518
7519 2013-06-07 Pedro Alves <palves@redhat.com>
7520
7521 PR server/14823
7522 * Makefile.in (OBS): Add tdesc.o.
7523 (IPA_OBJS): Add tdesc-ipa.o.
7524 (tdesc-ipa.o): New rule.
7525 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7526 interface.
7527 * linux-low.c (new_inferior): Delete.
7528 (disabled_regsets, num_regsets): Delete.
7529 (linux_add_process): Adjust to set the new per-process
7530 new_inferior flag.
7531 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7532 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7533 was a stop. When calling arch_setup, switch the current inferior
7534 to the thread that got an event.
7535 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7536 (regsets_fetch_inferior_registers)
7537 (regsets_store_inferior_registers): New regsets_info parameter.
7538 Adjust to use it.
7539 (linux_register_in_regsets): New regs_info parameter. Adjust to
7540 use it.
7541 (register_addr, fetch_register, store_register): New usrregs_info
7542 parameter. Adjust to use it.
7543 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7544 parameter regs_info. Adjust to use it.
7545 (linux_fetch_registers): Get the current inferior's regs_info, and
7546 adjust to use it.
7547 (linux_store_registers): Ditto.
7548 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7549 (initialize_low): Don't initialize the target_regsets here. Call
7550 initialize_low_arch.
7551 * linux-low.h (target_regsets): Delete declaration.
7552 (struct regsets_info): New.
7553 (struct usrregs_info): New.
7554 (struct regs_info): New.
7555 (struct process_info_private) <new_inferior>: New field.
7556 (struct linux_target_ops): Delete the num_regs, regmap, and
7557 regset_bitmap fields. New field regs_info.
7558 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7559 * i387-fp.c (num_xmm_registers): Delete.
7560 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7561 calls to new interface.
7562 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7563 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7564 Infer the number of xmm registers from the regcache's target
7565 description.
7566 * i387-fp.h (num_xmm_registers): Delete.
7567 * inferiors.c (add_thread): Don't install the thread's regcache
7568 here.
7569 * proc-service.c (gregset_info): Fetch the current inferior's
7570 regs_info. Adjust to use it.
7571 * regcache.c: Include tdesc.h.
7572 (register_bytes, reg_defs, num_registers)
7573 (gdbserver_expedite_regs): Delete.
7574 (get_thread_regcache): If the thread doesn't have a regcache yet,
7575 create one, instead of aborting gdbserver.
7576 (regcache_invalidate_one): Rename to ...
7577 (regcache_invalidate_thread): ... this.
7578 (regcache_invalidate_one): New.
7579 (regcache_invalidate): Only invalidate registers of the current
7580 process.
7581 (init_register_cache): Add target_desc parameter, and use it.
7582 (new_register_cache): Ditto. Assert the target description has a
7583 non zero registers_size.
7584 (regcache_cpy): Add assertions. Adjust.
7585 (realloc_register_cache, set_register_cache): Delete.
7586 (registers_to_string, registers_from_string): Adjust.
7587 (find_register_by_name, find_regno, find_register_by_number)
7588 (register_cache_size): Add target_desc parameter, and use it.
7589 (free_register_cache_thread, free_register_cache_thread_one)
7590 (regcache_release, register_cache_size): New.
7591 (register_size): Add target_desc parameter, and use it.
7592 (register_data, supply_register, supply_register_zeroed)
7593 (supply_regblock, supply_register_by_name, collect_register)
7594 (collect_register_as_string, collect_register_by_name): Adjust.
7595 * regcache.h (struct target_desc): Forward declare.
7596 (struct regcache) <tdesc>: New field.
7597 (init_register_cache, new_register_cache): Add target_desc
7598 parameter.
7599 (regcache_invalidate_thread): Declare.
7600 (regcache_invalidate_one): Delete declaration.
7601 (regcache_release): Declare.
7602 (find_register_by_number, register_cache_size, register_size)
7603 (find_regno): Add target_desc parameter.
7604 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7605 declarations.
7606 * remote-utils.c: Include tdesc.h.
7607 (outreg, prepare_resume_reply): Adjust.
7608 * server.c: Include tdesc.h.
7609 (gdbserver_xmltarget): Delete declaration.
7610 (get_features_xml, process_serial_event): Adjust.
7611 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7612 declare.
7613 (struct process_info) <tdesc>: New field.
7614 (ipa_tdesc): Declare.
7615 * tdesc.c: New file.
7616 * tdesc.h: New file.
7617 * tracepoint.c: Include tdesc.h.
7618 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7619 (get_context_regcache): Adjust to pass ipa_tdesc down.
7620 (do_action_at_tracepoint): Adjust to get the register cache size
7621 from the context regcache's description.
7622 (traceframe_walk_blocks): Adjust to get the register cache size
7623 from the current trace frame's description.
7624 (traceframe_get_pc): Adjust to get current trace frame's
7625 description and pass it down.
7626 (gdb_collect): Adjust to get the register cache size from the
7627 IPA's description.
7628 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7629 (gdbserver_xmltarget): Delete.
7630 (initialize_low_tracepoint): Set the ipa's target description.
7631 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7632 (initialize_low_tracepoint): Set the ipa's target description.
7633 * linux-x86-low.c: Include tdesc.h.
7634 [__x86_64__] (is_64bit_tdesc): New.
7635 (ps_get_thread_area, x86_get_thread_area): Use it.
7636 (i386_cannot_store_register): Rename to ...
7637 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7638 (i386_cannot_fetch_register): Rename to ...
7639 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7640 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7641 to new interface.
7642 (target_regsets): Rename to ...
7643 (x86_regsets): ... this.
7644 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7645 interface.
7646 (x86_siginfo_fixup): Use is_64bit_tdesc.
7647 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7648 (tdesc_x32_avx_linux, tdesc_x32_linux)
7649 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7650 Declare.
7651 (x86_linux_update_xmltarget): Delete.
7652 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7653 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7654 (AMD64_LINUX_USER64_CS): New.
7655 (x86_linux_read_description): New, based on
7656 x86_linux_update_xmltarget.
7657 (same_process_callback): New.
7658 (x86_arch_setup_process_callback): New.
7659 (x86_linux_update_xmltarget): New.
7660 (x86_regsets_info): New.
7661 (amd64_linux_regs_info): New.
7662 (i386_linux_usrregs_info): New.
7663 (i386_linux_regs_info): New.
7664 (x86_linux_regs_info): New.
7665 (x86_arch_setup): Reimplement.
7666 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7667 (x86_emit_ops): Ditto.
7668 (the_low_target): Adjust. Install x86_linux_regs_info,
7669 x86_cannot_fetch_register, and x86_cannot_store_register.
7670 (initialize_low_arch): New.
7671 * linux-ia64-low.c (tdesc_ia64): Declare.
7672 (ia64_fetch_register): Adjust.
7673 (ia64_usrregs_info, regs_info): New globals.
7674 (ia64_regs_info): New function.
7675 (the_low_target): Adjust.
7676 (initialize_low_arch): New function.
7677 * linux-sparc-low.c (tdesc_sparc64): Declare.
7678 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7679 Adjust.
7680 (sparc_arch_setup): New function.
7681 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7682 (the_low_target): Adjust.
7683 (initialize_low_arch): New function.
7684 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7685 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7686 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7687 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7688 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7689 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7690 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7691 (tdesc_powerpc_isa205_vsx64l): Declare.
7692 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7693 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7694 (ppc_set_pc, ppc_get_hwcap): Adjust.
7695 (ppc_usrregs_info): Forward declare.
7696 (!__powerpc64__) ppc_regmap_adjusted: New global.
7697 (ppc_arch_setup): Adjust to the current process'es target
7698 description.
7699 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7700 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7701 (ppc_store_evrregset): Adjust.
7702 (target_regsets): Rename to ...
7703 (ppc_regsets): ... this, and make static.
7704 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7705 (ppc_regs_info): New function.
7706 (the_low_target): Adjust.
7707 (initialize_low_arch): New function.
7708 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7709 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7710 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7711 (tdesc_s390x_linux64v2): Declare.
7712 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7713 (s390_fill_gregset, s390_store_last_break): Adjust.
7714 (target_regsets): Rename to ...
7715 (s390_regsets): ... this, and make static.
7716 (s390_get_pc, s390_set_pc): Adjust.
7717 (s390_get_hwcap): New target_desc parameter, and use it.
7718 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7719 (s390_arch_setup): Adjust to set the current process'es target
7720 description. Don't adjust the regmap.
7721 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7722 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7723 (regs_info_3264): New globals.
7724 (s390_regs_info): New function.
7725 (the_low_target): Adjust.
7726 (initialize_low_arch): New function.
7727 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7728 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7729 [__mips64] (init_registers_mips_linux)
7730 (init_registers_mips_dsp_linux): Delete defines.
7731 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7732 (have_dsp): New global.
7733 (mips_read_description): New, based on mips_arch_setup.
7734 (mips_arch_setup): Reimplement.
7735 (get_usrregs_info): New function.
7736 (mips_cannot_fetch_register, mips_cannot_store_register)
7737 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7738 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7739 (target_regsets): Rename to ...
7740 (mips_regsets): ... this, and make static.
7741 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7742 (dsp_regs_info, regs_info): New globals.
7743 (mips_regs_info): New function.
7744 (the_low_target): Adjust.
7745 (initialize_low_arch): New function.
7746 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7747 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7748 Declare.
7749 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7750 (arm_read_description): New, with bits factored from
7751 arm_arch_setup.
7752 (arm_arch_setup): Reimplement.
7753 (target_regsets): Rename to ...
7754 (arm_regsets): ... this, and make static.
7755 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7756 (arm_regs_info): New function.
7757 (the_low_target): Adjust.
7758 (initialize_low_arch): New function.
7759 * linux-m68k-low.c (tdesc_m68k): Declare.
7760 (target_regsets): Rename to ...
7761 (m68k_regsets): ... this, and make static.
7762 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7763 (m68k_regs_info): New function.
7764 (m68k_arch_setup): New function.
7765 (the_low_target): Adjust.
7766 (initialize_low_arch): New function.
7767 * linux-sh-low.c (tdesc_sharch): Declare.
7768 (target_regsets): Rename to ...
7769 (sh_regsets): ... this, and make static.
7770 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7771 (sh_regs_info, sh_arch_setup): New functions.
7772 (the_low_target): Adjust.
7773 (initialize_low_arch): New function.
7774 * linux-bfin-low.c (tdesc_bfin): Declare.
7775 (bfin_arch_setup): New function.
7776 (bfin_usrregs_info, regs_info): New globals.
7777 (bfin_regs_info): New function.
7778 (the_low_target): Adjust.
7779 (initialize_low_arch): New function.
7780 * linux-cris-low.c (tdesc_cris): Declare.
7781 (cris_arch_setup): New function.
7782 (cris_usrregs_info, regs_info): New globals.
7783 (cris_regs_info): New function.
7784 (the_low_target): Adjust.
7785 (initialize_low_arch): New function.
7786 * linux-cris-low.c (tdesc_crisv32): Declare.
7787 (cris_arch_setup): New function.
7788 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7789 (cris_regs_info): New function.
7790 (the_low_target): Adjust.
7791 (initialize_low_arch): New function.
7792 * linux-m32r-low.c (tdesc_m32r): Declare.
7793 (m32r_arch_setup): New function.
7794 (m32r_usrregs_info, regs_info): New globals.
7795 (m32r_regs_info): Adjust.
7796 (initialize_low_arch): New function.
7797 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7798 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7799 (tic6x_usrregs_info): Forward declare.
7800 (tic6x_read_description): New function, based on ...
7801 (tic6x_arch_setup): ... this. Reimplement.
7802 (target_regsets): Rename to ...
7803 (tic6x_regsets): ... this, and make static.
7804 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7805 (tic6x_regs_info): New function.
7806 (the_low_target): Adjust.
7807 (initialize_low_arch): New function.
7808 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7809 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7810 (target_regsets): Rename to ...
7811 (xtensa_regsets): ... this, and make static.
7812 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7813 globals.
7814 (xtensa_arch_setup, xtensa_regs_info): New functions.
7815 (the_low_target): Adjust.
7816 (initialize_low_arch): New function.
7817 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7818 (nios2_arch_setup): Set the current process'es tdesc.
7819 (target_regsets): Rename to ...
7820 (nios2_regsets): ... this.
7821 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7822 (nios2_regs_info): New function.
7823 (the_low_target): Adjust.
7824 (initialize_low_arch): New function.
7825 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7826 (aarch64_arch_setup): Set the current process'es tdesc.
7827 (target_regsets): Rename to ...
7828 (aarch64_regsets): ... this.
7829 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7830 (aarch64_regs_info): New function.
7831 (the_low_target): Adjust.
7832 (initialize_low_arch): New function.
7833 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7834 globals.
7835 (target_regsets): Rename to ...
7836 (tile_regsets): ... this.
7837 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7838 (tile_regs_info): New function.
7839 (tile_arch_setup): Set the current process'es tdesc.
7840 (the_low_target): Adjust.
7841 (initialize_low_arch): New function.
7842 * spu-low.c (tdesc_spu): Declare.
7843 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7844 * win32-arm-low.c (tdesc_arm): Declare.
7845 (arm_arch_setup): New function.
7846 (the_low_target): Install arm_arch_setup instead of
7847 init_registers_arm.
7848 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7849 (init_windows_x86): Rename to ...
7850 (i386_arch_setup): ... this. Set `win32_tdesc'.
7851 (the_low_target): Adjust.
7852 * win32-low.c (win32_tdesc): New global.
7853 (child_add_thread): Don't create the thread cache here.
7854 (do_initial_child_stuff): Set the new process'es tdesc.
7855 * win32-low.h (struct target_desc): Forward declare.
7856 (win32_tdesc): Declare.
7857 * lynx-i386-low.c (tdesc_i386): Declare global.
7858 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7859 * lynx-low.c (lynx_tdesc): New global.
7860 (lynx_add_process): Set the new process'es tdesc.
7861 * lynx-low.h (struct target_desc): Forward declare.
7862 (lynx_tdesc): Declare global.
7863 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7864 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7865 * nto-low.c (nto_tdesc): New global.
7866 (do_attach): Set the new process'es tdesc.
7867 * nto-low.h (struct target_desc): Forward declare.
7868 (nto_tdesc): Declare.
7869 * nto-x86-low.c (tdesc_i386): Declare.
7870 (nto_x86_arch_setup): Set `nto_tdesc'.
7871
7872 2013-06-04 Gary Benson <gbenson@redhat.com>
7873
7874 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7875 to qSupported response when appropriate.
7876 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7877 with nonzero-length annex.
7878 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7879 arguments supplied in annex.
7880
7881 2013-05-31 Doug Evans <dje@google.com>
7882
7883 PR server/15594
7884 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7885 64 bits in 64-cross-32 environment.
7886
7887 2013-05-28 Pedro Alves <palves@redhat.com>
7888
7889 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7890 (aarch64-without-fpu.c): Delete rule.
7891 * configure.srv (aarch64*-*-linux*): Remove references to
7892 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7893 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7894 declaration.
7895
7896 2013-05-24 Pedro Alves <palves@redhat.com>
7897
7898 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7899 instead of strchr/decode_address. Error if the range isn't split
7900 with a ','. Don't assume there's be a ':' in the action.
7901
7902 2013-05-23 Yao Qi <yao@codesourcery.com>
7903 Pedro Alves <palves@redhat.com>
7904
7905 * linux-low.c (lwp_in_step_range): New function.
7906 (linux_wait_1): If the thread was range stepping and stopped
7907 outside the stepping range, report the stop to GDB. Otherwise,
7908 continue stepping. Add range stepping debug output.
7909 (linux_set_resume_request): Copy the step range from the resume
7910 request to the lwp.
7911 (linux_supports_range_stepping): New.
7912 (linux_target_ops) <supports_range_stepping>: Set to
7913 linux_supports_range_stepping.
7914 * linux-low.h (struct linux_target_ops)
7915 <supports_range_stepping>: New field.
7916 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7917 * linux-x86-low.c (x86_supports_range_stepping): New.
7918 (the_low_target) <supports_range_stepping>: Set to
7919 x86_supports_range_stepping.
7920 * server.c (handle_v_cont): Handle 'r' action.
7921 (handle_v_requests): Append ";r" if the target supports range
7922 stepping.
7923 * target.h (struct thread_resume) <step_range_start,
7924 step_range_end>: New fields.
7925 (struct target_ops) <supports_range_stepping>:
7926 New field.
7927 (target_supports_range_stepping): New macro.
7928
7929 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7930
7931 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7932 confusion in comment.
7933
7934 2013-05-17 Joel Brobecker <brobecker@adacore.com>
7935
7936 * lynx-low.c (struct process_info_private): New type.
7937 (lynx_add_process): New function.
7938 (lynx_create_inferior, lynx_attach): Replace calls to
7939 add_process by calls to lynx_add_process.
7940 (lynx_resume): If PTID is null, then try using
7941 current_process()->private->last_wait_event_ptid.
7942 Add comments.
7943 (lynx_clear_inferiors): Delete. The contents of that function
7944 has been inlined in lynx_mourn;
7945 (lynx_wait_1): Save the ptid in the process's private data.
7946 (lynx_mourn): Free the process' private data. Replace call
7947 to lynx_clear_inferiors by call to clear_inferiors.
7948
7949 2013-05-17 Yao Qi <yao@codesourcery.com>
7950
7951 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7952 the right place.
7953
7954 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
7955
7956 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7957 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
7958 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7959 PT_TEXT_END_ADDR guards. Update comments.
7960 (linux_target_op) <read_offsets>: Conditionally define to
7961 linux_read_offsets if the target is UCLIBC and if it defines
7962 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7963
7964 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
7965 Andrew Jenner <andrew@codesourcery.com>
7966
7967 * Makefile.in (SFILES): Add linux-nios2-low.c.
7968 (clean): Add action to delete nios2-linux.c.
7969 (nios2-linux.c): New rule.
7970 * configure.srv: Add nios2*-*-linux*.
7971 * linux-nios2-low.c: New.
7972
7973 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
7974
7975 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7976
7977 2013-04-25 Hui Zhu <hui@codesourcery.com>
7978
7979 PR gdb/15186
7980 * ax.c (ax_printf): Add fflush.
7981
7982 2013-04-22 Tom Tromey <tromey@redhat.com>
7983
7984 * Makefile.in (SFILES): Add filestuff.c.
7985 (OBS): Add filestuff.o.
7986 (filestuff.o): New target.
7987 * config.in, configure: Rebuild.
7988 * configure.ac: Check for fdwalk, pipe2.
7989
7990 2013-04-17 Pedro Alves <palves@redhat.com>
7991
7992 * configure.ac (USE_THREAD_DB): Delete variable.
7993 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7994 Don't AC_SUBST USE_THREAD_DB.
7995 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7996 * config.in, configure: Regenerate.
7997
7998 2013-04-16 Pedro Alves <palves@redhat.com>
7999
8000 * linux-low.h (struct lwp_info) <thread_known>: Move under
8001 the USE_THREAD_DB #ifdef.
8002
8003 2013-04-16 Pedro Alves <palves@redhat.com>
8004
8005 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8006 (linux-low.o): Delete rule.
8007 * linux-low.h: Always include "gdb_thread_db.h" instead of
8008 conditionally including thread_db.h.
8009 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8010 HAVE_THREAD_DB_H.
8011
8012 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8013
8014 * Makefile.in (install-only): Fix make install regression.
8015
8016 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8017
8018 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8019 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8020 installation.
8021 * gdbserver.1: Remove.
8022
8023 2013-03-22 Pedro Alves <palves@redhat.com>
8024
8025 * linux-low.c (handle_extended_wait): Don't call
8026 linux_enable_event_reporting.
8027
8028 2013-03-15 Tony Theodore <tonyt@logyst.com>
8029
8030 PR build/9098:
8031 * Makefile.in (SHELL): Use @SHELL@.
8032
8033 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8034
8035 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8036 compiler warning.
8037
8038 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8039
8040 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8041 Remove extraneous NULL element.
8042
8043 2013-03-13 Yao Qi <yao@codesourcery.com>
8044
8045 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8046 'V' block in trace frame.
8047
8048 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8049
8050 * target.h (struct target_ops): Add btrace ops.
8051 (target_supports_btrace): New macro.
8052 (target_enable_btrace): New macro.
8053 (target_disable_btrace): New macro.
8054 (target_read_btrace): New macro.
8055 * gdbthread.h (struct thread_info): Add btrace field.
8056 * server.c: Include btrace-common.h.
8057 (handle_btrace_general_set): New function.
8058 (handle_btrace_enable): New function.
8059 (handle_btrace_disable): New function.
8060 (handle_general_set): Call handle_btrace_general_set.
8061 (handle_qxfer_btrace): New function.
8062 (struct qxfer qxfer_packets[]): Add btrace entry.
8063 * inferiors.c (remove_thread): Disable btrace.
8064 * linux-low: Include linux-btrace.h.
8065 (linux_low_enable_btrace): New function.
8066 (linux_low_read_btrace): New function.
8067 (linux_target_ops): Add btrace ops.
8068 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8069 Add srv_linux_btrace=yes.
8070 (x86_64-*-linux*): Add linux-btrace.o.
8071 Add srv_linux_btrace=yes.
8072 * configure.ac: Define HAVE_LINUX_BTRACE.
8073 * config.in: Regenerated.
8074 * configure: Regenerated.
8075
8076 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8077
8078 * server.c (handle_qxfer): Preserve error message if -3 is
8079 returned.
8080 (qxfer): Document the -3 return value.
8081
8082 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8083
8084 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8085 (linux_btrace_h): New variable.
8086 (linux-btrace.o): New rule.
8087
8088 2013-03-08 Stan Shebs <stan@codesourcery.com>
8089 Hafiz Abid Qadeer <abidh@codesourcery.com>
8090
8091 * tracepoint.c (trace_buffer_size): New global.
8092 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8093 (init_trace_buffer): Change to one-argument function. Allocate
8094 trace buffer memory.
8095 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8096 handle QTBuffer:size packet.
8097 (cmd_bigqtbuffer_size): New function.
8098 (initialize_tracepoint): Call init_trace_buffer with
8099 DEFAULT_TRACE_BUFFER_SIZE.
8100 * server.c (handle_query): Add QTBuffer:size in the
8101 supported packets.
8102
8103 2013-03-07 Yao Qi <yao@codesourcery.com>
8104
8105 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8106 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8107 of -1.
8108 (cmd_qtsp): Adjust condition. Do post increment.
8109 Set cur_action and cur_step_action back to 0.
8110
8111 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8112
8113 PR server/15236
8114 * linux-low.c (linux_write_memory): Return early success if LEN is
8115 zero.
8116
8117 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8118
8119 * configure.srv: Add x86_64-*-cygwin* as target.
8120
8121 2013-02-28 Tom Tromey <tromey@redhat.com>
8122
8123 * configure.ac: Invoke AC_SYS_LARGEFILE.
8124 * configure, config.in: Rebuild.
8125
8126 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8127
8128 * win32-low.c: Throughout, fix format strings and casts of
8129 printf-like functions to avoid type related warnings on all
8130 platforms.
8131 (get_child_debug_event): Print dwDebugEventCode as hex since
8132 that's how it's usually documented.
8133
8134 2013-02-28 Yao Qi <yao@codesourcery.com>
8135
8136 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8137 pulongest.
8138
8139 2013-02-27 Jiong Wang <jiwang@tilera.com>
8140
8141 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8142 (reg-tilegx32.c): New rule.
8143 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8144 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8145 different register info initializer according to elf class.
8146 (init_registers_tilgx32): New function. The tilegx32 register info
8147 initializer.
8148 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8149 (tile_store_gregset): Likewise.
8150
8151 2013-02-27 Yao Qi <yao@codesourcery.com>
8152
8153 * server.c (process_point_options): Print debug message when
8154 debug_threads is true.
8155
8156 2013-02-26 Yao Qi <yao@codesourcery.com>
8157
8158 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8159
8160 2013-02-19 Pedro Alves <palves@redhat.com>
8161 Kai Tietz <ktietz@redhat.com>
8162
8163 PR gdb/15161
8164
8165 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8166 instead of strtoul to extract address from packet.
8167 (process_serial_event) <'z'>: Likewise.
8168
8169 2013-02-18 Yao Qi <yao@codesourcery.com>
8170
8171 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8172
8173 2013-02-14 Pedro Alves <palves@redhat.com>
8174
8175 Plug memory leak.
8176
8177 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8178 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8179
8180 2013-02-14 Pedro Alves <palves@redhat.com>
8181
8182 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8183
8184 2013-02-14 Pedro Alves <palves@redhat.com>
8185
8186 * tracepoint.c (save_string): Delete.
8187 (add_tracepoint_action): Use savestring instead of save_string.
8188
8189 2013-02-12 Pedro Alves <palves@redhat.com>
8190
8191 * linux-xtensa-low.c: Ditto.
8192 * xtensa-xtregs.c: Ditto.
8193
8194 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8195
8196 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8197 thread_db.
8198
8199 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8200
8201 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8202 aarch64_num_wp_regs and aarch64_num_bp_regs to
8203 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8204
8205 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8206
8207 * linux-aarch64-low.c (ps_get_thread_area): Replace
8208 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8209
8210 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8211 Marcus Shawcroft <marcus.shawcroft@arm.com>
8212 Nigel Stephens <nigel.stephens@arm.com>
8213 Yufeng Zhang <yufeng.zhang@arm.com>
8214
8215 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8216 (aarch64.c, aarch64-without-fpu.c): New targets.
8217 * configure.srv (aarch64*-*-linux*): New.
8218 * linux-aarch64-low.c: New file.
8219
8220 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8221
8222 * linux-low.c (handle_extended_wait, linux_create_inferior)
8223 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8224 (dequeue_one_deferred_signal, linux_resume_one_thread)
8225 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8226 (linux_tracefork_grandchild, linux_test_for_tracefork)
8227 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8228 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8229 where the argument is 0.
8230
8231 2013-01-25 Yao Qi <yao@codesourcery.com>
8232
8233 * event-loop.c: Include "queue.h".
8234 (gdb_event_p): New typedef.
8235 (struct gdb_event) <next_event>: Remove.
8236 (event_queue): Change to QUEUE(gdb_event_p).
8237 (async_queue_event): Remove.
8238 (gdb_event_xfree): New.
8239 (initialize_event_loop): New.
8240 (process_event): Use API from QUEUE.
8241 (wait_for_event): Likewise.
8242 * server.c (main): Call initialize_event_loop.
8243 * server.h (initialize_event_loop): Declare.
8244
8245 2013-01-18 Yao Qi <yao@codesourcery.com>
8246
8247 * ax.h (struct eval_agent_expr_context): New.
8248 (gdb_eval_agent_expr): Update declaration.
8249 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8250 TFRAME. Add new argument CTX.
8251 * server.h (struct eval_agent_expr_context): Declare.
8252 (agent_mem_read, agent_tsv_read): Update declaration.
8253 (agent_mem_read_string): Likewise.
8254 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8255 (add_traceframe_block): Add new argument TPOINT.
8256 Increase TPOINT->traceframe_usage.
8257 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8258 eval_tracepoint_agent_expr.
8259 (condition_true_at_tracepoint): Likewise.
8260 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8261 (agent_mem_read_string, agent_tsv_read): Likewise.
8262
8263 2013-01-16 Yao Qi <yao@codesourcery.com>
8264
8265 * linux-low.c (linux_resume_one_lwp): Don't check
8266 'lwp->bp_reinsert != 0'.
8267
8268 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8269 Pedro Alves <palves@redhat.com>
8270
8271 * lynx-low.c (ptrace_request_to_str): Define a temporary
8272 macro and use it to simplify this function's implementation.
8273
8274 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8275
8276 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8277 sets errno.
8278
8279 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8280
8281 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8282
8283 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8284
8285 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8286
8287 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8288
8289 * lynx-low.c (lynx_resume): Use the resume_info parameter
8290 to determine the ptid for the lynx_ptrace call, unless
8291 it is equal to minus_one_ptid, in which case we use the
8292 ptid of the current_inferior.
8293 (lynx_wait_1): After having received a thread create/exit
8294 event, resume the inferior's execution using the signaling
8295 thread's ptid, rather than the old ptid.
8296
8297 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8298
8299 * lynx-low.c (lynx_resume): Delete variable ret.
8300
8301 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8302
8303 * gdbreplay.c (gdbreplay_version): Update copyright year.
8304 * server.c (gdbserver_version): Likewise.
8305
8306 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8307
8308 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8309 new thread.
8310
8311 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8312
8313 * lynx-low.c (ptrace_request_to_str): Add handling for
8314 PTRACE_GETTRACESIG.
8315
8316 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8317
8318 * lynx-low.c (lynx_attach): Delete variable new_process.
8319
8320 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8321
8322 * lynx-low.c (lynx_create_inferior): Delete variable
8323 new_process.
8324
8325 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8326
8327 * lynx-low.c (ptrace_request_to_str): Do not handle
8328 PTRACE_GETTHREADLIST if this macro does not exist.
8329
8330 2012-12-15 Yao Qi <yao@codesourcery.com>
8331
8332 * Makefile.in (OBS): Add notif.o.
8333 * notif.c, notif.h: New.
8334 * server.c: Include "notif.h".
8335 (struct vstop_notif) <next>: Remove.
8336 <base>: New field.
8337 (queue_stop_reply): Update.
8338 (push_event, send_next_stop_reply): Remove.
8339 (discard_queued_stop_replies): Update.
8340 (notif_stop): New variable.
8341 (handle_v_stopped): Remove.
8342 (handle_v_requests): Don't call handle_v_stopped. Call
8343 handle_ack_notif instead.
8344 (queue_stop_reply_callback): Call notif_event_enque instead
8345 of queue_stop_reply.
8346 (handle_status): Don't call send_next_stop_reply, call
8347 notif_write_event instead.
8348 (kill_inferior_callback): Likewise.
8349 (detach_or_kill_inferior_callback): Likewise.
8350 (main): Call initialize_notif.
8351 (process_serial_event): Call QUEUE_is_empty.
8352 (handle_target_event): Call notif_push instead of push event.
8353 * server.h (push_event): Remove declaration.
8354
8355 2012-12-10 Tom Tromey <tromey@redhat.com>
8356
8357 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8358 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8359 macros.
8360 (.c.o): Rewrite.
8361 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8362 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8363 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8364 (amd64-linux-ipa.o, ax.o): Rewrite.
8365 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8366 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8367 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8368 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8369 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8370 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8371 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8372 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8373 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8374 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8375 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8376 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8377 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8378 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8379 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8380 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8381 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8382 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8383 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8384 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8385 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8386 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8387 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8388 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8389 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8390 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8391 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8392 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8393 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8394 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8395 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8396 (reg-tilegx.o): Remove.
8397 (all_object_files): New macro.
8398 Include .deps files.
8399 * aclocal.m4, configure: Rebuild.
8400 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8401 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8402 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8403
8404 2012-12-05 Tom Tromey <tromey@redhat.com>
8405
8406 PR gdb/14917:
8407 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8408
8409 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8410
8411 * configure.ac: Check for linux/perf_event.h.
8412 * config.in: Regenerated.
8413 * configure: Regenerated.
8414
8415 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8416
8417 * hostio.c (handle_readlink): Decrease buffer size
8418 parameter passed to readlink by one byte.
8419
8420 2012-11-26 Yao Qi <yao@codesourcery.com>
8421
8422 * configure.ac (build_warnings): Append '-Wempty-body'.
8423 * configure: Regenerated.
8424 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8425 body.
8426
8427 2012-11-15 Pierre Muller <muller@sourceware.org>
8428
8429 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8430 * config.in: Regenerate.
8431 * configure: Regenerate.
8432 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8433 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8434 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8435 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8436 header.
8437 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8438 instead of <sys/wait.h> header.
8439 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8440
8441 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
8442
8443 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8444 (various make rules): Remove -DGDBSERVER
8445
8446 2012-11-09 Yao Qi <yao@codesourcery.com>
8447
8448 * spu-low.c (current_ptid): Move it to ..
8449 * gdbthread.h: ... here. New.
8450 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8451 * server.c (myresume, process_serial_event): Likewise.
8452 * thread-db.c (thread_db_find_new_threads): Likewise.
8453 * tracepoint.c (run_inferior_command): Likewise.
8454
8455 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
8456
8457 * server.c (handle_search_memory_1): Include access length in
8458 warning message.
8459
8460 2012-09-05 Michael Brandt <michael.brandt@axis.com>
8461
8462 * linux-crisv32-low.c: Fix compile errors.
8463
8464 2012-09-04 Yao Qi <yao@codesourcery.com>
8465
8466 * tracepoint.c (cmd_qtsv): Adjust debug message.
8467 Don't check CUR_TPOINT.
8468
8469 2012-08-28 Yao Qi <yao@codesourcery.com>
8470
8471 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8472 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8473 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8474 Remove declarations of xmalloc, xreallloc, xstrdup and
8475 freeargv.
8476 * Makefile.in (libiberty_h): New.
8477 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8478 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8479
8480 2012-08-23 Yao Qi <yao@codesourcery.com>
8481
8482 * server.h: Remove declaration of 'xsnprintf'.
8483
8484 2012-08-22 Keith Seitz <keiths@redhat.com>
8485
8486 * server.h: Include build-gnulib-gbserver/config.h.
8487 * gdbreplay.c: Likewise.
8488
8489 2012-08-08 Doug Evans <dje@google.com>
8490
8491 * Makefile.in (SFILES): Add gdb_vecs.c.
8492 (OBS): Add gdb_vecs.o.
8493 (gdb_vecs_h, host_defs_h): New variables.
8494 (thread-db.o): Add $(gdb_vecs_h) dependency.
8495 (gdb_vecs.o): New rule.
8496 * thread-db.c: #include "gdb_vecs.h".
8497 (thread_db_load_search): Use a vector to iterate over path elements.
8498 Handle text appearing after "$pdir".
8499
8500 * configure.ac: Add check for strstr.
8501 * config.in: Regenerate.
8502 * configure: Regenerate.
8503
8504 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8505
8506 * hostio.c (handle_pread): If pread fails, fall back to attempting
8507 lseek/read.
8508 (handle_pwrite): Likewise for pwrite.
8509
8510 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8511
8512 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8513 between unsupported TYPE and unimplementable ADDR/LEN combination.
8514 (arm_insert_point): Act on new return value.
8515
8516 2012-07-31 Pedro Alves <palves@redhat.com>
8517
8518 * server.c (process_point_options): Only skip tokens if we find
8519 one that is unrecognized. Don't treat 'X' specially while
8520 skipping unrecognized tokens.
8521
8522 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8523
8524 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8525 to 4-byte-align HW breakpoint addresses for Thumb.
8526
8527 2012-07-27 Yao Qi <yao@codesourcery.com>
8528
8529 PR remote/14161.
8530
8531 * server.h: Declare gdb_agent_about_to_close.
8532 * target.c (kill_inferior): Include "agent.h".
8533 New. Send command 'kill'.
8534 * target.h (kill_inferior): Removed macro.
8535 * tracepoint.c (gdb_agent_about_to_close): New.
8536 (gdb_agent_helper_thread): Handle command 'close'.
8537 Wait endlessly until the inferior stops.
8538 Install gdb_agent_remove_socket to atexit hook.
8539 (agent_socket_name): New static variable.
8540 (gdb_agent_socket_init): Replace local variable 'name' with
8541 'agent_socket_name'.
8542 (gdb_agent_remove_socket): New.
8543
8544 2012-07-27 Yao Qi <yao@codesourcery.com>
8545
8546 * server.c (process_point_options): Stop at 'X' when parsing.
8547
8548 2012-07-19 Michael Eager <eager@eagercon.com>
8549
8550 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
8551 to hw_execute.
8552 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8553 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8554 hardware breakpoint.
8555
8556 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8557
8558 * gdbserver/linux-low.c (initialize_low): Call
8559 linux_ptrace_init_warnings.
8560
8561 2012-07-02 Doug Evans <dje@google.com>
8562
8563 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8564 pointer to int.
8565
8566 2012-07-02 Stan Shebs <stan@codesourcery.com>
8567
8568 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8569 (ax.o): Add it to build rule.
8570 (ax-ipa.o): Ditto.
8571 (OBS): Add format.o.
8572 (IPA_OBS): Add format.o.
8573 * server.c (handle_query): Claim support for breakpoint commands.
8574 (process_point_options): Add command case.
8575 (process_serial_event): Leave running if there are printfs in
8576 effect.
8577 * mem-break.h (any_persistent_commands): Declare.
8578 (add_breakpoint_commands): Declare.
8579 (gdb_no_commands_at_breakpoint): Declare.
8580 (run_breakpoint_commands): Declare.
8581 * mem-break.c (struct point_command_list): New struct.
8582 (struct breakpoint): New field command_list.
8583 (any_persistent_commands): New function.
8584 (add_commands_to_breakpoint): New function.
8585 (add_breakpoint_commands): New function.
8586 (gdb_no_commands_at_breakpoint): New function.
8587 (run_breakpoint_commands): New function.
8588 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8589 locally.
8590 * ax.c: Include format.h.
8591 (ax_printf): New function.
8592 (gdb_eval_agent_expr): Add printf opcode.
8593
8594 2012-06-13 Yao Qi <yao@codesourcery.com>
8595
8596 * server.c (start_inferior): Remove duplicated writes to fields
8597 'last_resume_kind' and 'last_status' of 'current_inferior'.
8598
8599 2012-06-12 Yao Qi <yao@codesourcery.com>
8600 Pedro Alves <palves@redhat.com>
8601
8602 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8603 comment.
8604 * server.c (handle_v_cont): Extend comment.
8605
8606 2012-06-11 Yao Qi <yao@codesourcery.com>
8607
8608 * linux-low.c (linux_attach): Add 'static'.
8609
8610 2012-06-06 Yao Qi <yao@codesourcery.com>
8611
8612 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8613
8614 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8615
8616 Fix gcc -flto compilation warning.
8617 * server.c (main): Make variable multi_mode and attach volatile.
8618
8619 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8620
8621 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8622 if the platform doesn't know about it.
8623
8624 2012-05-30 Jeff Kenton <jkenton@tilera.com>
8625
8626 * Makefile.in (SFILES): Add linux-tile-low.c.
8627 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8628 * configure.srv: Handle tilegx-*-linux*.
8629 * linux-tile-low.c: New file.
8630
8631 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8632
8633 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8634
8635 2012-05-24 Pedro Alves <palves@redhat.com>
8636
8637 PR gdb/7205
8638
8639 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
8640
8641 2012-05-24 Pedro Alves <palves@redhat.com>
8642
8643 PR gdb/7205
8644
8645 Replace target_signal with gdb_signal throughout.
8646
8647 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8648
8649 * linux-low.c (linux_store_registers): Avoid the copying sequence
8650 when no data has been retrieved by ptrace.
8651
8652 2012-05-22 Will Deacon <will.deacon@arm.com>
8653
8654 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8655 Include asm/ptrace.h.
8656 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8657 already defined.
8658
8659 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8660
8661 * linux-low.c (linux_store_registers): Don't re-retrieve data
8662 with ptrace that has already been obtained from /proc. Always
8663 copy any data retrieved with ptrace to the buffer supplied.
8664
8665 2012-05-11 Yao Qi <yao@codesourcery.com>
8666 Pedro Alves <palves@redhat.com>
8667
8668 * linux-low.c (enum stopping_threads_kind): New.
8669 (stopping_threads): Change type to `enum stopping_threads_kind'.
8670 (handle_extended_wait): If stopping and suspending threads, leave
8671 the new_lwp suspended too.
8672 (linux_wait_for_event): Adjust.
8673 (stop_all_lwps): Set `stopping_threads' to
8674 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8675 whether we're suspending threads or just stopping them. Assert no
8676 recursion happens.
8677
8678 2012-04-29 Yao Qi <yao@codesourcery.com>
8679
8680 * server.h: Move some code to ...
8681 * gdbthread.h: ... here. New.
8682 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8683 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8684 (nto-low.o, win32-low.o): Likewise.
8685 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8686 * regcache.c, remote-utils.c, server.c: Likewise.
8687 * target.c, tracepoint.c, win32-low.c: Likewise.
8688
8689 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8690
8691 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8692 (PTRACE_ARG4_TYPE): Likewise.
8693 (PTRACE_XFER_TYPE): Likewise.
8694 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8695 ptrace to PTRACE_ARG3_TYPE.
8696 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8697 (PTRACE_ARG4_TYPE): Likewise.
8698 (PTRACE_XFER_TYPE): Likewise.
8699 (linux_detach_one_lwp): Cast fourth argument of
8700 ptrace to long then PTRACE_ARG4_TYPE.
8701 (regsets_fetch_inferior_registers): Cast third argument of
8702 ptrace to long then PTRACE_ARG3_TYPE.
8703 (regsets_store_inferior_registers): Likewise.
8704
8705 2012-04-20 Pedro Alves <palves@redhat.com>
8706
8707 * configure: Regenerate.
8708
8709 2012-04-19 Pedro Alves <palves@redhat.com>
8710
8711 * Makefile.in (GNULIB_BUILDDIR): New.
8712 (LIBGNU, INCGNU, GNULIB_H): Adjust.
8713 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8714 (all, install-only, uninstall, clean-info, all-lib, clean): No
8715 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8716 (maintainer-clean realclean distclean): Use subdir_do.
8717 (subdir_do): New.
8718 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
8719 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
8720 * acinclude.m4: Include acx_configure_dir.m4.
8721 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8722 calls. Call AC_PROG_RANLIB. Configure gnulib using
8723 ACX_CONFIGURE_DIR.
8724 (GNULIB): New.
8725 (GNULIB_STDINT_H): Adjust.
8726 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8727 * gdbreplay.c: Include build-gnulib/config.h.
8728 * server.h: Likewise.
8729 * aclocal.m4: Regenerate.
8730 * config.in: Regenerate.
8731 * configure: Regenerate.
8732
8733 2012-04-19 Pedro Alves <palves@redhat.com>
8734
8735 * Makefile.in (LIBGNU, INCGNU): Adjust.
8736 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8737 (all, install-only, uninstall, clean-info, all-lib, clean)
8738 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8739 * configure.ac: Adjust AC_OUTPUT output.
8740 * aclocal.m4: Regenerate.
8741 * configure: Regenerate.
8742
8743 2012-04-19 Pedro Alves <palves@redhat.com>
8744
8745 * Makefile.in (generated_files): New.
8746 (server_h): Remove the explicit dependency on config.h, and depend
8747 on $generated_files.
8748
8749 2012-04-19 Pedro Alves <palves@redhat.com>
8750
8751 * Makefile.in (INCGNU): Add -Ignulib.
8752
8753 2012-04-19 Pedro Alves <palves@redhat.com>
8754
8755 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8756 (INCGNU): ... this, and spell out -I here.
8757 (GNULIB_LIB): Rename to ...
8758 (LIBGNU): ... this.
8759 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8760
8761 2012-04-19 Pedro Alves <palves@redhat.com>
8762
8763 * config.in: Regenerate.
8764
8765 2012-04-19 Pedro Alves <palves@redhat.com>
8766
8767 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8768 * server.h (memmem): Remove declaration.
8769 * config.in: Regenerate.
8770 * configure: Regenerate.
8771
8772 2012-04-19 Yao Qi <yao@codesourcery.com>
8773
8774 * Makefile.in (SFILES): Add common/vec.c.
8775 (OBS): Add vec.o.
8776 (vec.o): New rule.
8777
8778 2012-04-19 Yao Qi <yao@codesourcery.com>
8779
8780 * remote-utils.c (prepare_resume_reply): Replace with macro
8781 target_core_of_thread.
8782 * server.c (handle_qxfer_threads_proper): Likewise.
8783 * target.h (traget_core_of_thread): New macro.
8784
8785 2012-04-18 Pedro Alves <palves@redhat.com>
8786
8787 * aclocal.m4: Regenerate.
8788 * configure: Regenerate.
8789
8790 2012-04-16 Yao Qi <yao@codesourcery.com>
8791
8792 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8793 duplicated on address.
8794
8795 2012-04-16 Yao Qi <yao@codesourcery.com>
8796
8797 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8798 (struct tracepoint_action_ops) <send>: New field.
8799 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8800 (agent_expr_send, x_tracepoint_action_send): New.
8801 (l_tracepoint_action_send): New.
8802 (cmd_qtdp): Download and install tracepoint
8803 according to `use_agent'.
8804 (run_inferior_command): Add one more parameter `len'.
8805 Update callers.
8806 (tracepoint_send_agent): New.
8807 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8808
8809 2012-04-16 Yao Qi <yao@codesourcery.com>
8810
8811 * tracepoint.c (download_tracepoints): Moved to ...
8812 (cmd_qtstart): ... here.
8813
8814 2012-04-14 Yao Qi <yao@codesourcery.com>
8815
8816 * tracepoint.c: Include inttypes.h.
8817 (struct collect_memory_action): Use sized types.
8818 (struct tracepoint): Likewise.
8819 (cmd_qtdp, stop_tracing): Update print specifiers.
8820 (cmd_qtp, response_tracepoint): Likewise.
8821 (collect_data_at_tracepoint): Likewise.
8822 (collect_data_at_step): Likewise.
8823
8824 2012-04-14 Yao Qi <yao@codesourcery.com>
8825
8826 Import gnulib module inttypes.
8827 * aclocal.m4, config.in, configure: Regenerated.
8828
8829 2012-04-14 Yao Qi <yao@codesourcery.com>
8830
8831 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8832 Makefile and config.status at last.
8833
8834 2012-04-13 Yao Qi <yao@codesourcery.com>
8835
8836 * tracepoint.c: Include stdint.h unconditionally.
8837
8838 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8839
8840 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8841 on BFD_HAVE_SYS_PROCFS_TYPE.
8842 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8843 * configure: Regenerate.
8844 * config.in: Likewise.
8845
8846 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8847
8848 * Makefile.in (clean): Also remove x32.c x32-linux.c
8849 x32-avx.c x32-avx-linux.c.
8850 (x32.o): New target.
8851 (x32.c): Likewise.
8852 (x32-linux.o): Likewise.
8853 (x32-linux.c): Likewise.
8854 (x32-avx.o): Likewise.
8855 (x32-avx.c): Likewise.
8856 (x32-avx-linux.o): Likewise.
8857 (x32-avx-linux.c): Likewise.
8858
8859 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8860 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8861 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8862 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8863 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8864 i386/x32-avx-linux.xml.
8865
8866 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8867 (init_registers_x32_avx_linux): Likwise.
8868 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8869 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8870
8871 2012-04-13 Pedro Alves <palves@redhat.com>
8872
8873 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8874 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8875 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8876 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8877 the sub-make.
8878
8879 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8880
8881 * linux-x86-low.c (compat_x32_clock_t): New.
8882 (compat_x32_siginfo_t): Likewise.
8883 (compat_x32_siginfo_from_siginfo): Likewise.
8884 (siginfo_from_compat_x32_siginfo): Likewise.
8885 (linux_is_elf64): Likewise.
8886 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8887 and siginfo_from_compat_x32_siginfo for x32.
8888 (x86_arch_setup): Set linux_is_elf64.
8889
8890 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8891
8892 PR gdb/13969
8893 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8894 e_machine field.
8895 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8896 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8897 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8898 compatible with process.
8899
8900 2012-04-12 Yao Qi <yao@codesourcery.com>
8901
8902 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8903 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8904 (install-only, install-info, clean): Handle sub dir gnulib.
8905 (all-lib, am--refresh): New targets.
8906 (memmem.o): Remove target.
8907 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8908 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8909 (AC_REPLACE_FUNCS): Remove memmem.
8910 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8911 (AC_OUTPUT): Generate Makefile in gnulib/.
8912 * aclocal.m4, config.in, configure: Regenerated.
8913
8914 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8915
8916 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8917
8918 2012-04-05 Pedro Alves <palves@redhat.com>
8919
8920 -Werror=strict-aliasing
8921
8922 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8923 pointer.
8924
8925 2012-04-04 Pedro Alves <palves@redhat.com>
8926
8927 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8928 (sparc_store_gregset_from_stack, sparc_store_gregset)
8929 (sparc_breakpoint_at): Fix formatting.
8930
8931 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8932
8933 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8934 are available.
8935 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8936 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8937 * config.in: Regenerate.
8938 * configure: Likewise.
8939
8940 2012-03-29 Pedro Alves <palves@redhat.com>
8941
8942 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8943 Correct ptrace arguments.
8944
8945 2012-03-28 Pedro Alves <palves@redhat.com>
8946
8947 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8948 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8949 (IA64_FR1_REGNUM): New defines.
8950 (ia64_fetch_register): New.
8951 (the_low_target): Install it.
8952 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8953 field.
8954 * linux-low.c (linux_fetch_registers): Try the
8955 the_low_target.fetch_register hook first.
8956
8957 * linux-arm-low.c (the_low_target): Adjust.
8958 * linux-bfin-low.c (the_low_target): Adjust.
8959 * linux-cris-low.c (the_low_target): Adjust.
8960 * linux-crisv32-low.c (the_low_target): Adjust.
8961 * linux-m32r-low.c (the_low_target): Adjust.
8962 * linux-m68k-low.c (the_low_target): Adjust.
8963 * linux-mips-low.c (the_low_target): Adjust.
8964 * linux-ppc-low.c (the_low_target): Adjust.
8965 * linux-s390-low.c (the_low_target): Adjust.
8966 * linux-sh-low.c (the_low_target): Adjust.
8967 * linux-sparc-low.c (the_low_target): Adjust.
8968 * linux-tic6x-low.c (the_low_target): Adjust.
8969 * linux-x86-low.c (the_low_target): Adjust.
8970 * linux-xtensa-low.c (the_low_target): Adjust.
8971
8972 2012-03-26 Pedro Alves <palves@redhat.com>
8973
8974 * server.c (handle_qxfer_libraries): Don't bail early if
8975 the_target->qxfer_libraries_svr4 is not NULL.
8976
8977 2012-03-26 Pedro Alves <palves@redhat.com>
8978
8979 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8980
8981 2012-03-23 Pedro Alves <palves@redhat.com>
8982
8983 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8984 "library-list-svr4" element's start tag when the the DSO list is
8985 empty.
8986
8987 2012-03-23 Pedro Alves <palves@redhat.com>
8988
8989 * linux-low.c (read_one_ptr): Read the inferior's pointer through
8990 a variable whose type size is the same as the inferior's pointer
8991 size.
8992
8993 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
8994
8995 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8996 struct siginfo.
8997 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8998 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8999 * linux-low.h: Include <signal.h>.
9000 (struct siginfo): Remove forward declaration.
9001 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9002 struct siginfo.
9003
9004 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9005
9006 * .gitignore: Ignore more files.
9007
9008 2012-03-19 Pedro Alves <palves@redhat.com>
9009 Jan Kratochvil <jan.kratochvil@redhat.com>
9010
9011 * server.c (cont_thread, general_thread): Add describing comments.
9012 (start_inferior): Clear `cont_thread'.
9013 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9014 of a process.
9015
9016 2012-03-15 Yao Qi <yao@codesourcery.com>
9017
9018 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9019 handling to ...
9020 (cmd_qtdp): ... here.
9021
9022 2012-03-15 Yao Qi <yao@codesourcery.com>
9023
9024 * tracepoint.c (struct tracepoint_action_ops): New.
9025 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9026 (m_tracepoint_action_download): New.
9027 (r_tracepoint_action_download): New.
9028 (x_tracepoint_action_download): New.
9029 (l_tracepoint_action_download): New.
9030 (add_tracepoint_action): Install `action->ops' according type.
9031 (download_tracepoint_1): Move code `download' function pointer
9032 of various tracepoint_action_ops.
9033
9034 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9035
9036 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9037 linux_ptrace_attach_warnings.
9038
9039 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9040
9041 * Makefile.in (linux-ptrace.o): New.
9042 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9043 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9044 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9045 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9046 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9047 of these targets.
9048 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9049
9050 2012-03-08 Yao Qi <yao@codesourcery.com>
9051 Pedro Alves <palves@redhat.com>
9052
9053 Fix PR server/13392.
9054 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9055 offset of JMP insn.
9056 * tracepoint.c (remove_tracepoint): New.
9057 (cmd_qtdp): Call remove_tracepoint when failed to install.
9058
9059 2012-03-07 Pedro Alves <palves@redhat.com>
9060
9061 * linux-low.c (get_detach_signal): New.
9062 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9063 Pass on pending signals to PTRACE_DETACH. Check the result of the
9064 ptrace call.
9065 * server.c (program_signals, program_signals_p): New.
9066 (handle_general_set): Handle QProgramSignals.
9067 * server.h (program_signals, program_signals_p): Declare.
9068
9069 2012-03-05 Pedro Alves <palves@redhat.com>
9070 Jan Kratochvil <jan.kratochvil@redhat.com>
9071
9072 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9073 New comment why.
9074
9075 2012-03-03 Yao Qi <yao@codesourcery.com>
9076
9077 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9078 agent_look_up_symbols.
9079
9080 2012-03-03 Yao Qi <yao@codesourcery.com>
9081
9082 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9083 (linux-x86-low.o): Likewise.
9084 * server.h: Remove in_process_agent_loaded.
9085 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9086 common/agent.c.
9087 Update callers.
9088
9089 2012-03-03 Yao Qi <yao@codesourcery.com>
9090
9091 * tracepoint.c (gdb_agent_capability): New global.
9092 (in_process_agent_loaded_ust): Renamed to
9093 `in_process_agent_supports_ust'.
9094 Update callers.
9095 (in_process_agent_supports_ust): Call agent_capability_check.
9096 (clear_installed_tracepoints): Assert that agent supports
9097 agent.
9098
9099 2012-03-03 Yao Qi <yao@codesourcery.com>
9100
9101 * linux-low.c (linux_supports_agent): New.
9102 (linux_target_ops): Initialize field `supports_agent' with
9103 linux_supports_agent.
9104 * target.h (struct target_ops) <supports_agent>: New.
9105 (target_supports_agent): New macro.
9106 * server.c (handle_general_set): Handle packet 'QAgent'.
9107 (handle_query): Send `QAgent+'.
9108 * Makefile.in (server.o): Depends on agent.h.
9109
9110 2012-03-03 Yao Qi <yao@codesourcery.com>
9111
9112 * Makefile.in (OBS): Add agent.o.
9113 Add new rule for agent.o.
9114 Track dependence of tracepoint.c on agent.h.
9115 * tracepoint.c (run_inferior_command_1):
9116 (run_inferior_command): Call agent_run_command.
9117 (gdb_ust_connect_sync_socket): Deleted. Move it to
9118 common/agent.c.
9119 (resume_thread, stop_thread): Likewise.
9120 (gdb_ust_socket_init): Renamed to ...
9121 (gdb_agent_socket_init): ... New.
9122 (gdb_ust_thread): Renamed to ...
9123 (gdb_agent_helper_thread): ... New.
9124 (gdb_ust_init): Move some code to ...
9125 (gdb_agent_init): ... here. New.
9126 [HAVE_UST]: Call gdb_ust_init.
9127 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9128 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9129 * config.in, configure: Regenerated.
9130
9131 2012-03-02 Pedro Alves <palves@redhat.com>
9132
9133 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9134 * linux-low.c (struct simple_pid_list): New.
9135 (stopped_pids): New a struct simple_pid_list pointer.
9136 (add_to_pid_list, pull_pid_from_list): New.
9137 (handle_extended_wait): Don't assume the first signal new children
9138 report is SIGSTOP. Adjust call to pull_pid_from_list.
9139 (linux_wait_for_lwp): Adjust.
9140
9141 2012-03-02 Yao Qi <yao@codesourcery.com>
9142
9143 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9144 debug log.
9145
9146 2012-03-02 Yao Qi <yao@codesourcery.com>
9147
9148 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9149 `stop_pc' and `tpoint'. Update caller.
9150
9151 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9152
9153 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9154 * linux-low.c (use_linux_regsets): New macro.
9155 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9156 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9157 (linux_register_in_regsets): New function.
9158 (usr_fetch_inferior_registers): Skip registers covered by
9159 regsets.
9160 (usr_store_inferior_registers): Likewise.
9161 (usr_fetch_inferior_registers): New macro.
9162 (usr_store_inferior_registers): Likewise.
9163 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9164 (linux_store_registers): Likewise.
9165 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9166 prototype.
9167 (init_registers_mips64_dsp_linux): Likewise.
9168 (init_registers_mips_linux): New macro.
9169 (init_registers_mips_dsp_linux): Likewise.
9170 (mips_dsp_num_regs): Likewise.
9171 (DSP_BASE, DSP_CONTROL): New fallback macros.
9172 (mips_base_regs): New macro.
9173 (mips_regmap): Use it. Fix the size.
9174 (mips_dsp_regmap): New variable.
9175 (mips_dsp_regset_bitmap): Likewise.
9176 (mips_arch_setup): New function.
9177 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9178 than mips_regmap.
9179 (mips_cannot_store_register): Likewise.
9180 (the_low_target): Update .arch_setup, .num_regs and .regmap
9181 initializers. Add .regset_bitmap initializer.
9182 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9183 initializer.
9184 * linux-bfin-low.c (the_low_target): Likewise.
9185 * linux-cris-low.c (the_low_target): Likewise.
9186 * linux-crisv32-low.c (the_low_target): Likewise.
9187 * linux-ia64-low.c (the_low_target): Likewise.
9188 * linux-m32r-low.c (the_low_target): Likewise.
9189 * linux-m68k-low.c (the_low_target): Likewise.
9190 * linux-ppc-low.c (the_low_target): Likewise.
9191 * linux-s390-low.c (the_low_target): Likewise.
9192 * linux-sh-low.c (the_low_target): Likewise.
9193 * linux-sparc-low.c (the_low_target): Likewise.
9194 * linux-tic6x-low.c (the_low_target): Likewise.
9195 * linux-x86-low.c (the_low_target): Likewise.
9196 * linux-xtensa-low.c (the_low_target): Likewise.
9197 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9198 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9199 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9200 srv_xmlfiles.
9201 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9202 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9203
9204 2012-02-29 Yao Qi <yao@codesourcery.com>
9205 Pedro Alves <palves@redhat.com>
9206
9207 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9208 `step_over_finished' is true.
9209
9210 2012-02-27 Pedro Alves <palves@redhat.com>
9211
9212 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9213 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9214
9215 2012-02-27 Pedro Alves <palves@redhat.com>
9216
9217 PR server/9684
9218 * linux-low.c (pid_is_stopped): New.
9219 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9220
9221 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9222
9223 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9224 of conditions.
9225
9226 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9227
9228 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9229
9230 2012-02-24 Luis Machado <lgustavo@codesourcery>
9231
9232 * server.c (handle_query): Advertise support for target-side
9233 breakpoint condition evaluation.
9234 (process_point_options): New function.
9235 (process_serial_event): When inserting a breakpoint, check for
9236 a target-side condition that should be evaluated.
9237
9238 * mem-break.c: Include regcache.h and ax.h.
9239 (point_cond_list_t): New data structure.
9240 (breakpoint) <cond_list>: New field.
9241 (find_gdb_breakpoint_at): Make non-static.
9242 (delete_gdb_breakpoint_at): Clear any target-side
9243 conditions.
9244 (clear_gdb_breakpoint_conditions): New function.
9245 (add_condition_to_breakpoint): Likewise.
9246 (add_breakpoint_condition): Likewise.
9247 (gdb_condition_true_at_breakpoint): Likewise.
9248 (gdb_breakpoint_here): Return result directly instead
9249 of going through a local variable.
9250
9251 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9252 (clear_gdb_breakpoint_conditions): Likewise.
9253 (add_breakpoint_condition): Likewise.
9254 (gdb_condition_true_at_breakpoint): Likewise.
9255
9256 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9257 (need_step_over_p): Take target-side breakpoint condition into
9258 consideration.
9259
9260 2012-02-24 Luis Machado <lgustavo@codesourcery>
9261
9262 * server.h: Include tracepoint.h.
9263 (agent_mem_read, agent_get_trace_state_variable_value,
9264 agent_set_trace_state_variable_value,
9265 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9266 get_set_tsv_func_addr): New prototypes.
9267
9268 * ax.h: New include file.
9269 * ax.c: New source file.
9270
9271 * tracepoint.c: Include ax.h.
9272 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9273 agent_expr, eval_result_type): Move to ax.h.
9274 (parse_agent_expr): Rename to ...
9275 (gdb_parse_agent_expr): ... this, make it non-static and move
9276 to ax.h.
9277 (unparse_agent_expr) Rename to ...
9278 (gdb_unparse_agent_expr): ... this, make it non-static and move
9279 to ax.h.
9280 (eval_agent_expr): Rename to ...
9281 (eval_tracepoint_agent_expr): ... this.
9282 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9283 forward declarations.
9284 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9285 (agent_get_trace_state_variable_value): New function.
9286 (agent_set_trace_state_variable_value): New function.
9287 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9288 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9289 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9290 (condition_true_at_tracepoint): Likewise.
9291 (parse_agent_expr): Rename to ...
9292 (gdb_parse_agent_expr): ... this and move to ax.c.
9293 (unparse_agent_expr): Rename to ...
9294 (gdb_unparse_agent_expr): ... this and move to ax.c.
9295 (gdb_agent_op_name): Move to ax.c.
9296 (eval_agent_expr): Rename to ...
9297 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9298 and move to ax.c.
9299 (eval_tracepoint_agent_expr): New function.
9300 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9301 non-static.
9302 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9303 ax.c.
9304 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9305 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9306 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9307 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9308 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9309 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9310 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9311 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9312 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9313 (compile_bytecodes): Remove forward declaration.
9314 (is_goto_target): Move to ax.c.
9315 (compile_bytecodes): Move to ax.c and call
9316 agent_get_trace_state_variable_value (...) and
9317 agent_set_trace_state_variable_value (...).
9318
9319 * Makefile.in: Update ax.c and IPA dependencies.
9320
9321 2012-02-24 Pedro Alves <palves@redhat.com>
9322
9323 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9324 (cmd_bigqtbuffer_circular): ... this. Only handle
9325 'QTBuffer:circular:'.
9326 (handle_tracepoint_general_set): Adjust.
9327
9328 2012-02-16 Yao Qi <yao@codesourcery.com>
9329
9330 * inferiors.c: Move code to ...
9331 * dll.c: .... here. New.
9332 * server.h: Declare clear_dlls.
9333 * Makefile.in (SFILES): Add dll.c.
9334 (OBS): Add dll.o
9335 (dll.o): New rule.
9336
9337 2012-02-11 Yao Qi <yao@codesourcery.com>
9338
9339 * server.c: (handle_monitor_command): Add a new parameter
9340 `own_buf'.
9341 (handle_query): Update caller.
9342
9343 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9344
9345 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9346 * configure, config.in: Regenerate.
9347 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9348 is not defined.
9349
9350 2012-02-02 Pedro Alves <palves@redhat.com>
9351
9352 Try SIGKILL first, then PTRACE_KILL.
9353 * linux-low.c (linux_kill_one_lwp): New.
9354 (linux_kill_one_lwp): Rename to ...
9355 (kill_one_lwp_callback): ... this. Use the new
9356 linux_kill_one_lwp.
9357
9358 2012-02-02 Pedro Alves <palves@redhat.com>
9359
9360 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9361 inferior.
9362
9363 2012-01-27 Pedro Alves <palves@redhat.com>
9364
9365 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9366 (elf_64_file_p): Make static.
9367 (linux_pid_exe_is_elf_64_file): New.
9368 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9369 Delete declarations.
9370 (linux_pid_exe_is_elf_64_file): Declare.
9371 * linux-x86-low.c (x86_arch_setup): Use
9372 linux_pid_exe_is_elf_64_file.
9373
9374 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9375
9376 * linux-low.c (linux_wait_for_event_1): Rename to ...
9377 (linux_wait_for_event): ... here and merge it with former
9378 linux_wait_for_event - new variable wait_ptid, use it.
9379 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9380
9381 2012-01-23 Pedro Alves <palves@redhat.com>
9382
9383 * server.c (main): Avoid yet another case of infinite loop while
9384 detaching/killing after a longjmp.
9385
9386 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9387
9388 Code cleanup.
9389 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9390
9391 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9392
9393 * hostio.c (handle_readlink): New function.
9394 (handle_vFile): Call it to handle "vFile:readlink" packets.
9395
9396 2012-01-20 Pedro Alves <palves@redhat.com>
9397 Ulrich Weigand <ulrich.weigand@linaro.org>
9398
9399 * server.c (handle_v_requests): Only support vAttach and vRun to
9400 start multiple processes when in extended protocol mode.
9401
9402 2012-01-17 Pedro Alves <palves@redhat.com>
9403
9404 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9405 memalign plus mprotect to allocate the scratch buffer.
9406
9407 2012-01-13 Pedro Alves <palves@redhat.com>
9408
9409 * server.c (attach_inferior): Clear `cont_thread'.
9410
9411 2012-01-13 Pedro Alves <palves@redhat.com>
9412
9413 * server.c (main): Avoid infinite loop while detaching/killing
9414 after a longjmp.
9415
9416 2012-01-09 Doug Evans <dje@google.com>
9417
9418 * server.c (start_inferior): Set last_ptid in --wrapper case.
9419
9420 2012-01-06 Yao Qi <yao@codesourcery.com>
9421
9422 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9423 defined.
9424 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9425
9426 2012-01-04 Yao Qi <yao@codesourcery.com>
9427
9428 * tracepoint.c (cmd_qtdp): Print debug message
9429 for static tracepoint.
9430
9431 2012-01-04 Yao Qi <yao@codesourcery.com>
9432
9433 * tracepoint.c (trace_vdebug): Differentiate debug message
9434 between gdbserver and IPA.
9435
9436 2012-01-03 Yao Qi <yao@codesourcery.com>
9437
9438 * tracepoint.c (tracepoint_was_hit): Don't collect for
9439 static tracepoint.
9440
9441 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9442
9443 * terminal.h: Reformat copyright header.
9444
9445 2012-01-02 Joel Brobecker <brobecker@adacore.com>
9446
9447 * server.c (gdbserver_version): Update copyright year.
9448 * gdbreplay.c (gdbreplay_version): Likewise.
9449
9450 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9451
9452 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9453
9454 Revert:
9455 2011-12-18 Hui Zhu <teawater@gmail.com>
9456 * linux-low.c (linux_create_inferior): Save return value to ret.
9457
9458 2011-12-18 Hui Zhu <teawater@gmail.com>
9459
9460 * linux-low.c (linux_create_inferior): Save return value to ret.
9461
9462 2011-12-16 Doug Evans <dje@google.com>
9463
9464 * linux-low.c (linux_create_inferior): If stdio connection,
9465 redirect stdin from /dev/null, stdout to stderr.
9466 * remote-utils.c (remote_is_stdio): New static global.
9467 (remote_connection_is_stdio): New function.
9468 (remote_prepare): Handle stdio connection.
9469 (remote_open): Ditto.
9470 (remote_close): Don't close stdin for stdio connections.
9471 (read_prim,write_prim): New functions. Replace all calls to
9472 read/write to these.
9473 * server.c (main): Watch for "-" argument. Move call to
9474 remote_prepare before start_inferior.
9475 * server.h (STDIO_CONNECTION_NAME): New macro.
9476 (remote_connection_is_stdio): Declare.
9477
9478 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9479 in debugging output.
9480
9481 2011-12-15 Yao Qi <yao@codesourcery.com>
9482
9483 * tracepoint.c: Include sys/syscall.h.
9484 (gdb_ust_thread): Remove preprocessor conditional.
9485
9486 2011-12-14 Pedro Alves <pedro@codesourcery.com>
9487
9488 * linux-low.c (linux_detach_one_lwp): Call
9489 the_low_target.prepare_to_resume before detaching.
9490
9491 2011-12-14 Yao Qi <yao@codesourcery.com>
9492
9493 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9494 of write.
9495
9496 2011-12-14 Yao Qi <yao@codesourcery.com>
9497
9498 * i386-low.c (i386_low_stopped_data_address): Initialize local
9499 variable `control'.
9500
9501 2011-12-13 Pedro Alves <pedro@codesourcery.com>
9502
9503 PR remote/13492
9504
9505 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9506 DR_CONTROL unless necessary. Extend comments.
9507 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9508 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9509
9510 2011-12-13 Yao Qi <yao@codesourcery.com>
9511
9512 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9513 macros.
9514 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9515
9516 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9517
9518 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9519 Print new debug message for such case.
9520
9521 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9522
9523 Fix overlapping memcpy.
9524 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9525 the read_inferior_memory transfer.
9526 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9527 write_inferior_memory transfer.
9528 (set_fast_tracepoint_jump): New variable buf. Use it for the
9529 read_inferior_memory and write_inferior_memory transfers.
9530 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9531 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9532 Use it for the write_inferior_memory transfer.
9533 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9534 buffers.
9535
9536 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9537
9538 * linux-low.c (fetch_register, store_register): Make code
9539 consistent, fix formatting.
9540
9541 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9542
9543 * linux-low.c (usr_store_inferior_registers): Factor out code
9544 to handle individual registers into...
9545 (store_register): ... this new function.
9546
9547 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9548
9549 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9550 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9551 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9552 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9553 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9554 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9555 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9556 (srv_xmlfiles): Add new XML files.
9557
9558 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9559 and <sys/uio.h>.
9560 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9561 (init_registers_s390_linux32v1): Add prototype.
9562 (init_registers_s390_linux32v2): Likewise.
9563 (init_registers_s390_linux64v1): Likewise.
9564 (init_registers_s390_linux64v2): Likewise.
9565 (init_registers_s390x_linux64v1): Likewise.
9566 (init_registers_s390x_linux64v2): Likewise.
9567 (s390_num_regs): Increment to 52.
9568 (s390_regmap): Add orig_r2 register.
9569 (s390_num_regs_3264): Increment to 68.
9570 (s390_regmap_3264): Add orig_r2 register.
9571 (s390_collect_ptrace_register): Handle orig_r2 register.
9572 (s390_supply_ptrace_register): Likewise.
9573 (s390_fill_last_break): New function.
9574 (s390_store_last_break): Likewise.
9575 (s390_fill_system_call): New function.
9576 (s390_store_system_call): Likewise.
9577 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9578 register sets.
9579 (s390_check_regset): New function.
9580 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9581 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9582 Update target_regsets for available register sets.
9583
9584 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9585 Jan Kratochvil <jan.kratochvil@redhat.com>
9586
9587 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9588 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9589 New.
9590 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9591 * linux-low.h (struct process_info_private): New member r_debug.
9592 * server.c (handle_qxfer_libraries): Call
9593 the_target->qxfer_libraries_svr4.
9594 (handle_qxfer_libraries_svr4): New function.
9595 (qxfer_packets): New entry "libraries-svr4".
9596 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9597 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9598 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9599 PACKET_qXfer_libraries_svr4.
9600
9601 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9602
9603 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9604 PSW address/mask between 8-byte and 16-byte formats.
9605 (s390_supply_ptrace_register): Likewise.
9606 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9607 basic addressing mode bit.
9608
9609 2011-11-24 Stan Shebs <stan@codesourcery.com>
9610
9611 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9612
9613 2011-11-17 Stan Shebs <stan@codesourcery.com>
9614
9615 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9616 (tracing_start_time): New global.
9617 (tracing_stop_time): New global.
9618 (tracing_user_name): New global.
9619 (tracing_notes): New global.
9620 (tracing_stop_note): New global.
9621 (cmd_qtstart): Set traceframe_usage, start_time.
9622 (stop_tracing): Set stop_time.
9623 (cmd_qtstatus): Report additional status.
9624 (cmd_qtp): New function.
9625 (handle_tracepoint_query): Call it.
9626 (cmd_qtnotes): New function.
9627 (handle_tracepoint_general_set): Call it.
9628 (get_timestamp): Rename from tsv_get_timestamp.
9629
9630 2011-11-14 Stan Shebs <stan@codesourcery.com>
9631 Kwok Cheung Yeung <kcy@codesourcery.com>
9632
9633 * linux-x86-low.c (small_jump_insn): New.
9634 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9635 trampoline and error message, build a trampoline and issue a small
9636 jump instruction to it.
9637 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9638 trampoline and error message.
9639 (x86_get_min_fast_tracepoint_insn_len): New.
9640 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9641 * linux-low.h (struct linux_target_ops): Add arguments to
9642 install_fast_tracepoint_jump_pad operation, add new operation.
9643 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9644 arguments.
9645 (linux_get_min_fast_tracepoint_insn_len): New function.
9646 (linux_target_op): Add new operation.
9647 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9648 (gdb_trampoline_buffer_end): Ditto.
9649 (gdb_trampoline_buffer_error): Ditto.
9650 (struct ipa_sym_addresses): Add fields for new IPA variables.
9651 (symbol_list): Add entries for new IPA variables.
9652 (struct tracepoint): Add fields to hold the address range of the
9653 trampoline used by the tracepoint.
9654 (trampoline_buffer_head): New static variable.
9655 (trampoline_buffer_tail): Ditto.
9656 (claim_trampoline_space): New function.
9657 (have_fast_tracepoint_trampoline_buffer): New function.
9658 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9659 structure.
9660 (install_fast_tracepoint): Ditto, also add error buffer argument.
9661 (cmd_qtminftpilen): New function.
9662 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9663 (fast_tracepoint_from_trampoline_address): New function.
9664 (fast_tracepoint_collecting): Handle trampoline as part of jump
9665 pad space.
9666 (set_trampoline_buffer_space): New function.
9667 (initialize_tracepoint): Initialize new IPA variables.
9668 * target.h (struct target_ops): Add arguments to
9669 install_fast_tracepoint_jump_pad operation, add new
9670 get_min_fast_tracepoint_insn_len operation.
9671 (target_get_min_fast_tracepoint_insn_len): New.
9672 (install_fast_tracepoint_jump_pad): Add arguments.
9673 * server.h (IPA_BUFSIZ): Define.
9674 * linux-i386-ipa.c: Include extra header files.
9675 (initialize_fast_tracepoint_trampoline_buffer): New function.
9676 (initialize_low_tracepoint): Call it.
9677 * server.h (set_trampoline_buffer_space): Declare.
9678 (claim_trampoline_space): Ditto.
9679 (have_fast_tracepoint_trampoline_buffer): Ditto.
9680
9681 2011-11-14 Yao Qi <yao@codesourcery.com>
9682
9683 * server.c (handle_query): Handle InstallInTrace for qSupported.
9684 * tracepoint.c (add_tracepoint): Sort list.
9685 (install_tracepoint, download_tracepoint): New.
9686 (cmd_qtdp): Call them to install and download tracepoints.
9687 (sort_tracepoints): Removed.
9688 (cmd_qtstart): Update.
9689
9690 2011-11-14 Yao Qi <yao@codesourcery.com>
9691
9692 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9693 * mem-break.h: Declare.
9694 * tracepoint.c (cmd_qtstart): Move some code to ...
9695 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9696 New.
9697 (download_tracepoints): Move some code to ...
9698 (download_tracepoint_1): ... here. New.
9699
9700 2011-11-08 Yao Qi <yao@codesourcery.com>
9701
9702 * remote-utils.c (relocate_instruction): A comment fix.
9703
9704 2011-11-07 Joel Brobecker <brobecker@adacore.com>
9705
9706 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9707 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9708 dr_status_mirror and dr_control_mirror from debug_reg_state.
9709 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9710 (i386_initial_stuff): Remove use of deleted globals.
9711 (i386_get_thread_context, i386_set_thread_context,
9712 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9713 from debug_reg_state.
9714
9715 2011-11-05 Yao Qi <yao@codesourcery.com>
9716
9717 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9718 address as TPOINT's.
9719
9720 2011-11-02 Stan Shebs <stan@codesourcery.com>
9721
9722 * tracepoint.c (agent_mem_read_string): New function.
9723 (eval_agent_expr): Call it for tracenz.
9724 * server.c (handle_query): Report support for tracenz.
9725
9726 2011-11-02 Yao Qi <yao@codesourcery.com>
9727
9728 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9729
9730 2011-11-02 Yao Qi <yao@codesourcery.com>
9731
9732 * target.h: Fix a typo in comment.
9733
9734 2011-10-31 Pedro Alves <pedro@codesourcery.com>
9735
9736 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9737 clobber the breakpoints' shadows with fast tracepoint jumps.
9738 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9739 * target.c (write_inferior_memory): Also pass MYADDR down to
9740 check_mem_write.
9741
9742 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9743
9744 * configure.ac: Check support for personality routine.
9745 * configure: Regenerate.
9746 * config.in: Likewise.
9747 * linux-low.c: Include <sys/personality.h>.
9748 Define ADDR_NO_RANDOMIZE if necessary.
9749 (linux_create_inferior): Disable address space randomization when
9750 forking inferior, if requested.
9751 (linux_supports_disable_randomization): New function.
9752 (linux_target_ops): Install it.
9753 * server.h (disable_randomization): Declare.
9754 * server.c (disable_randomization): New global variable.
9755 (handle_general_set): Handle QDisableRandomization.
9756 (handle_query): Likewise for qSupported.
9757 (main): Support --disable-randomization and --no-disable-randomization
9758 command line arguments.
9759 * target.h (struct target_ops): Add supports_disable_randomization.
9760 (target_supports_disable_randomization): New macro.
9761
9762 2011-09-29 Mike Frysinger <vapier@gentoo.org>
9763
9764 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9765 ifdef check.
9766 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9767 [!PT_GETDSBT] (target_loadmap): New definition.
9768 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9769 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9770 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9771 and PT_GETDSBT to LINUX_LOADMAP.
9772 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9773 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9774
9775 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9776
9777 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9778 (arm_linux_hwbp_cap): New static variable.
9779 (arm_linux_get_hwbp_cap): Replace by ...
9780 (arm_linux_init_hwbp_cap): ... this new function.
9781 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9782 (arm_linux_get_hw_watchpoint_count): Likewise.
9783 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9784 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9785 (arm_prepare_to_resume): Use perror_with_name instead of error.
9786
9787 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
9788
9789 * linux-arm-low.c: Include <signal.h>.
9790 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9791 (struct arm_linux_hwbp_cap): New data type.
9792 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9793 (struct arm_linux_hw_breakpoint): New data type.
9794 (MAX_BPTS, MAX_WPTS): Define.
9795 (struct arch_process_info, struct arch_lwp_info): New data types.
9796 (arm_linux_get_hwbp_cap): New function.
9797 (arm_linux_get_hw_breakpoint_count): Likewise.
9798 (arm_linux_get_hw_watchpoint_count): Likewise.
9799 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9800 (arm_hwbp_control_initialize): Likewise.
9801 (arm_hwbp_control_is_enabled): Likewise.
9802 (arm_hwbp_control_is_initialized): Likewise.
9803 (arm_hwbp_control_disable): Likewise.
9804 (arm_linux_hw_breakpoint_equal): Likewise.
9805 (arm_linux_hw_point_initialize): Likewise.
9806 (struct update_registers_data): New data structure.
9807 (update_registers_callback: New function.
9808 (arm_insert_point): Likewise.
9809 (arm_remove_point): Likewise.
9810 (arm_stopped_by_watchpoint): Likewise.
9811 (arm_stopped_data_address): Likewise.
9812 (arm_new_process): Likewise.
9813 (arm_new_thread): Likewise.
9814 (arm_prepare_to_resume): Likewise.
9815 (the_low_target): Register arm_insert_point, arm_remove_point,
9816 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9817 arm_new_thread, and arm_prepare_to_resume.
9818
9819 2011-09-15 Stan Shebs <stan@codesourcery.com>
9820
9821 * server.h (struct emit_ops): Add compare-goto fields.
9822 * tracepoint.c (gdb_agent_op_sizes): New table.
9823 (emit_eq_goto): New function.
9824 (emit_ne_goto): New function.
9825 (emit_lt_goto): New function.
9826 (emit_le_goto): New function.
9827 (emit_gt_goto): New function.
9828 (emit_ge_goto): New function.
9829 (is_goto_target): New function.
9830 (compile_bytecodes): Recognize special cases of compare-goto
9831 combinations and call specialized emitters for them.
9832 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9833 (amd64_emit_ne_goto): New function.
9834 (amd64_emit_lt_goto): New function.
9835 (amd64_emit_le_goto): New function.
9836 (amd64_emit_gt_goto): New function.
9837 (amd64_emit_ge_goto): New function.
9838 (amd64_emit_ops): Add the new functions.
9839 (i386_emit_eq_goto): New function.
9840 (i386_emit_ne_goto): New function.
9841 (i386_emit_lt_goto): New function.
9842 (i386_emit_le_goto): New function.
9843 (i386_emit_gt_goto): New function.
9844 (i386_emit_ge_goto): New function.
9845 (i386_emit_ops): Add the new functions.
9846
9847 2011-09-08 Stan Shebs <stan@codesourcery.com>
9848
9849 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9850 (i386_emit_epilogue): Restore %ebx.
9851
9852 2011-08-31 Jie Zhang <jzhang918@gmail.com>
9853
9854 * server.c (step_thread): Remove definition.
9855 (process_serial_event): Don't handle Hs.
9856 * server.h (step_thread): Remove declaration.
9857 * target.c (set_desired_inferior): Remove use of step_thread.
9858
9859 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9860
9861 * linux-low.c: Include linux-procfs.h.
9862 (linux_attach_lwp_1): Update comments.
9863 (linux_attach): Scan for existing threads when attaching to a
9864 process that is the tgid.
9865 * Makefile.in: Update dependencies.
9866
9867 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
9868
9869 * configure.srv: Add linux-procfs.o dependencies.
9870
9871 2011-08-14 Yao Qi <yao@codesourcery.com>
9872
9873 * target.h (struct target_ops): Fix indent.
9874 * win32-low.c (win32_target_ops): Fix comment.
9875
9876 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
9877 Yao Qi <yao@codesourcery.com>
9878
9879 * Makefile.in (clean): Remove tic6x-*.c files.
9880 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9881 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9882 (tic6x-c64xp-linux.c): Likewise.
9883 * configure.srv: Add support for tic6x-*-uclinux.
9884 * linux-tic6x-low.c: New.
9885 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9886
9887 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
9888 Yao Qi <yao@codesourcery.com>
9889
9890 * target.h (struct target_ops): Add read_loadmap.
9891 * linux-low.c (struct target_loadseg): New type.
9892 (struct target_loadmap): New type.
9893 (linux_read_loadmap): New function.
9894 (linux_target_ops): Add linux_read_loadmap.
9895 * server.c (handle_query): Support qXfer:fdpic:read packet.
9896 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9897 to NULL.
9898
9899 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9900
9901 * win32-low.c: Include <stdint.h>.
9902
9903 2011-07-22 Pedro Alves <pedro@codesourcery.com>
9904
9905 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9906 to the inferior here.
9907 (i386_remove_aligned_watchpoint): Ditto.
9908 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9909 fit part of the watchpoint in the debug registers.
9910 (i386_update_inferior_debug_regs): New.
9911 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9912 registers, and only update the inferior on success.
9913 (i386_low_remove_watchpoint): Ditto.
9914
9915 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9916
9917 * linux-low.c (compare_ints, unique, list_threads, show_process,
9918 linux_core_of_thread): Delete.
9919 (linux_target_ops): Change linux_core_of_thread to
9920 linux_common_core_of_thread.
9921 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9922 * utils.c (malloc_failure): Change type of argument.
9923 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9924 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9925 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9926 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9927 (IPA_OBJS): Add common-utils-ipa.o.
9928 (ptid_h, linux_osdata_h): New macros.
9929 (server_h): Add common/common-utils.h, common/xml-utils.h,
9930 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9931 common/ptid.h.
9932 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9933 ptid.o, buffer.o): New rules.
9934 (linux-low.o): Add common/linux-osdata.h as a dependency.
9935 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9936 * configure.ac: Add AC_HEADER_DIRENT check.
9937 * config.in: Regenerate.
9938 * configure: Regenerate.
9939 * remote-utils.c (xml_escape_text): Delete.
9940 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9941 buffer_xml_printf): Move to common/buffer.c.
9942 * server.c (main): Remove call to initialize_inferiors.
9943 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9944 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9945 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9946 internal_error, gdb_assert, gdb_assert_fail): Delete.
9947 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9948 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9949 common/buffer.h.
9950 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9951 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9952 initialize_inferiors): Delete.
9953
9954 2011-07-20 Pedro Alves <pedro@codesourcery.com>
9955
9956 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9957 symbol error.
9958
9959 2011-05-31 Pedro Alves <pedro@codesourcery.com>
9960
9961 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9962 assertion.
9963 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9964
9965 2011-05-26 Yao Qi <yao@codesourcery.com>
9966
9967 * Makefile.in (thread-db.o): Track dependence to
9968 common/gdb_thread_db.h.
9969 * thread-db.c: include gdb_thread_db.h from right place.
9970
9971 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
9972
9973 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9974 __FILE__ and __LINE__ to internal_error.
9975
9976 2011-05-13 Doug Evans <dje@google.com>
9977
9978 * thread-db.c (try_thread_db_load_from_sdir): New function.
9979 (try_thread_db_load_from_dir): New function.
9980 (thread_db_load_search): Handle $sdir, ignore $pdir.
9981 Remove trying of system directories if search of
9982 libthread-db-search-path fails, that is now done via $sdir.
9983
9984 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
9985
9986 * server.c (handle_query): Add EnableDisableTracepoints to the list
9987 of supported features.
9988 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9989 tracepoints.
9990 (cmd_qtenable_disable): New.
9991 (cmd_qtstart): Install tracepoints even if disabled.
9992 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9993 receiving a QTEnable or QTDisable packet.
9994 (gdb_collect): Skip data collection if fast tracepoint is disabled.
9995 (ust_marker_to_static_tracepoint): Do not ignore disabled static
9996 tracepoints.
9997 (gdb_probe): Skip data collection if static tracepoint is disabled.
9998
9999 2011-05-10 Doug Evans <dje@google.com>
10000
10001 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10002
10003 2011-05-04 Doug Evans <dje@google.com>
10004
10005 * linux-low.c (linux_join): Skip process lookup.
10006 * spu-low.c (spu_join): Ditto.
10007 * server.c (join_inferiors_callback): Delete.
10008 (process_serial_event): For 'D' packet (detach) call join_inferior
10009 directly.
10010
10011 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10012
10013 * README: Don't mention xscale*-*-linux*.
10014 * configure.srv (xscale*-*-linux*): Don't handle target.
10015
10016 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10017
10018 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10019 casting pointers.
10020 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10021 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10022 (i386_emit_void_call_2): Likewise.
10023
10024 2011-04-26 Yao Qi <yao@codesourcery.com>
10025
10026 * linux-low.c: Move common macros to linux-ptrace.h.
10027 Include linux-ptrace.h.
10028 * Makefile.in (linux_ptrace_h): New.
10029 (linux-low.o): Depends on linux-ptrace.h.
10030
10031 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10032
10033 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10034 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10035 (remote_prepare): New function with most of the TCP code from ...
10036 (remote_open): ... here. Detect PORT here unconditionally. Move also
10037 setting transport_is_reliable.
10038 * server.c (run_once): New variable.
10039 (gdbserver_usage): Document it.
10040 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10041 the first run if RUN_ONCE.
10042 * server.h (run_once, remote_prepare): New declarations.
10043
10044 2011-04-19 Tom Tromey <tromey@redhat.com>
10045
10046 * win32-low.c (handle_load_dll): Remove duplicate "the".
10047
10048 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10049
10050 Remove support for old Cygwin 1.5 versions.
10051 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10052 function to avoid warning.
10053 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10054 warning.
10055
10056 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10057
10058 * gdbserver/server.h (Macro _): Define it if not available.
10059
10060 2011-03-14 Michael Snyder <msnyder@vmware.com>
10061
10062 * hostio.c (handle_close): Remove unnecessary null test.
10063
10064 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10065
10066 * Makefile.in (maintainer-clean realclean distclean): Remove
10067 "make ... subdir_do" command.
10068
10069 2011-03-10 Michael Snyder <msnyder@vmware.com>
10070
10071 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10072
10073 * server.c (handle_v_run): Free alloced buffer on early return.
10074
10075 2011-03-09 Yao Qi <yao@codesourcery.com>
10076
10077 Revert:
10078 2011-03-04 Yao Qi <yao@codesourcery.com>
10079
10080 * Makefile.in: Remove GNU make feature --directory.
10081
10082 2011-03-05 Yao Qi <yao@codesourcery.com>
10083
10084 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10085 (subdir_do): New make target. Copied from gdb/Makefile.
10086 (maintainer-clean, realclean, distclean, clean): Call corresponding
10087 make targets in common/Makefile.
10088
10089 2011-02-11 Yao Qi <yao@codesourcery.com>
10090
10091 * configure.ac: Call AC_PROG_RANLIB.
10092 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10093 * configure: Regenerate.
10094
10095 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10096
10097 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10098
10099 2011-03-06 Yao Qi <yao@codesourcery.com>
10100
10101 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10102
10103 2011-03-05 Yao Qi <yao@codesourcery.com>
10104
10105 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10106 (subdir_do): New make target. Copied from gdb/Makefile.
10107 (maintainer-clean, realclean, distclean, clean): Call corresponding
10108 make targets in common/Makefile.
10109
10110 2011-03-04 Yao Qi <yao@codesourcery.com>
10111
10112 * Makefile.in: Remove GNU make feature --directory.
10113
10114 2011-03-04 Michael Snyder <msnyder@vmware.com>
10115
10116 * server.c (queue_stop_reply): Call xmalloc not malloc.
10117
10118 2011-03-02 Michael Snyder <msnyder@vmware.com>
10119
10120 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10121
10122 2011-02-28 Michael Snyder <msnyder@vmware.com>
10123
10124 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10125 (cmd_qtframe): Ditto.
10126 (cmd_qtbuffer): Ditto.
10127 (cmd_bigqtbuffer): Ditto.
10128
10129 * utils.c (decimal2str): Initialize 'width' to nine, then
10130 don't mess with it.
10131
10132 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10133
10134 * hostio.c (require_data): Free *data, not data.
10135
10136 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10137
10138 * hostio.c (require_data): Use free, not xfree.
10139
10140 2011-02-27 Michael Snyder <msnyder@vmware.com>
10141
10142 * server.c (handle_query): Discard unused value.
10143
10144 * hostio.c (require_data): Free malloc memory before returning
10145 error.
10146
10147 2011-02-26 Michael Snyder <msnyder@vmware.com>
10148
10149 * linux-low.c (list_threads): Call closedir for dirent.
10150
10151 2011-02-27 Michael Snyder <msnyder@vmware.com>
10152
10153 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10154 a case statement falls through.
10155
10156 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10157
10158 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10159 in comparison.
10160
10161 2011-02-26 Michael Snyder <msnyder@vmware.com>
10162
10163 * utils.c (decimal2str): Eliminate dead code and dead param.
10164 (pulongest): Drop dead param from call to decimal2str.
10165 (plongest): Ditto.
10166
10167 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10168
10169 Revert the following patch (not approved yet):
10170 2011-02-21 Hui Zhu <teawater@gmail.com>
10171 * tracepoint.c (tp_printf): New function.
10172 (eval_agent_expr): Handle gdb_agent_op_printf.
10173
10174 2011-02-21 Hui Zhu <teawater@gmail.com>
10175
10176 * tracepoint.c (tp_printf): New function.
10177 (eval_agent_expr): Handle gdb_agent_op_printf.
10178
10179 2011-02-18 Tom Tromey <tromey@redhat.com>
10180
10181 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10182 (tracepoint.o): Likewise.
10183 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10184 (gdb_agent_op_names): Likewise.
10185
10186 2011-02-18 Tom Tromey <tromey@redhat.com>
10187
10188 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10189 gdb_agent_op_rot>: New constants.
10190 (gdb_agent_op_names): Add pick and roll.
10191 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10192 cases.
10193
10194 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10195
10196 * aclocal.m4: Regenerated with aclocal-1.11.1.
10197
10198 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10199
10200 * server.c (handle_qxfer_traceframe_info): New.
10201 (qxfer_packets): Register "traceframe-info".
10202 (handle_query): Report support for qXfer:traceframe-info:read+.
10203 * tracepoint.c (match_blocktype): New.
10204 (traceframe_find_block_type): Rename to ...
10205 (traceframe_walk_blocks): ... this. Add callback filter argument,
10206 and use it.
10207 (traceframe_find_block_type): New, reimplemented on top of
10208 traceframe_walk_blocks.
10209 (build_traceframe_info_xml): New.
10210 (traceframe_read_info): New.
10211 * server.h (traceframe_read_info): Declare.
10212
10213 2011-02-11 Yao Qi <yao@codesourcery.com>
10214
10215 * configure.ac: Call AC_PROG_RANLIB.
10216 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10217 * configure: Regenerate.
10218
10219 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10220
10221 * server.c (gdb_read_memory): Change return semantics to allow
10222 partial transfers.
10223 (handle_search_memory_1): Adjust.
10224 (process_serial_event) <'m' packet>: Handle partial transfers.
10225 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10226
10227 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10228
10229 * regcache.c (init_register_cache): Initialize
10230 regcache->register_status.
10231 (free_register_cache): Release regcache->register_status.
10232 (regcache_cpy): Copy register_status.
10233 (registers_to_string): Print 'x's for unavailable registers.
10234 (supply_register): Mark the register's status valid or
10235 unavailable, depending on whether a buffer was passed in or not.
10236 (supply_register_zeroed): New.
10237 (supply_regblock): Mark the registers' status valid or
10238 unavailable, depending on whether a buffer was passed in or not.
10239 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10240 (struct regcache): New `register_status' field.
10241 (supply_register_zeroed): Declare.
10242 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10243 supply_register_zeroed, rather than passing a NULL buffer to
10244 supply_register.
10245 * tracepoint.c (fetch_traceframe_registers): Update comment.
10246
10247 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10248
10249 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10250 buffer explicit.
10251
10252 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10253
10254 * server.h (decode_xfer_write): Change prototype.
10255 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10256 and don't extract the annex here.
10257 * server.c (decode_xfer_read): Remove `annex' parameter,
10258 and don't extract the annex here.
10259 (decode_xfer): New.
10260 (struct qxfer): New.
10261 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10262 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10263 (handle_qxfer_statictrace): New functions, abstracted out from
10264 handle_query, and made to use the struct qxfer interface.
10265 (handle_threads_qxfer_proper): Rename to ...
10266 (handle_qxfer_threads_proper): ... this.
10267 (handle_threads_qxfer): Rename to ...
10268 (handle_qxfer_threads): ... this. Adjust.
10269 (qxfer_packets): New array.
10270 (handle_qxfer): New function.
10271 (handle_query): Use handle_qxfer.
10272
10273 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10274
10275 * gdbreplay.c: Shorten lines of >= 80 columns.
10276 * linux-low.c: Ditto.
10277 * linux-ppc-low.c: Ditto.
10278 * linux-s390-low.c: Ditto.
10279 * linux-sparc-low.c: Ditto.
10280 * linux-x86-low.c: Ditto.
10281 * linux-xtensa-low.c: Ditto.
10282 * mem-break.c: Ditto.
10283 * nto-low.c: Ditto.
10284 * regcache.h: Ditto.
10285 * remote-utils.c: Ditto.
10286 * server.c: Ditto.
10287 * server.h: Ditto.
10288 * thread-db.c: Ditto.
10289 * tracepoint.c: Ditto.
10290 * utils.c: Ditto.
10291 * win32-low.h: Ditto.
10292
10293 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10294
10295 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10296 update.
10297
10298 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10299
10300 * server.c (gdbserver_version): Update copyright year in version
10301 output.
10302 * gdbreplay.c (gdbreplay_version): Ditto.
10303
10304 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10305
10306 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10307 * linux-bfin-low.c: New file.
10308 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10309 PT_DATA_ADDR for BFIN targets.
10310 * Makefile.in (SFILES): Add linux-bfin-low.c.
10311 (clean): Remove reg-bfin.c.
10312 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10313 * README: Mention supported Blackfin targets.
10314
10315 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10316
10317 * .gitignore: New file.
10318
10319 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10320
10321 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10322
10323 2010-10-22 Jie Zhang <jie@codesourcery.com>
10324
10325 * Makefile.in: Add FLAGS_TO_PASS variable.
10326 (install): Remove dependency of install-only and recursively
10327 invoke make for install-only.
10328
10329 2010-10-04 Doug Evans <dje@google.com>
10330
10331 * Makefile.in (uninstall): Use $(DESTDIR).
10332
10333 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10334
10335 PR gdb/11842
10336
10337 * linux-x86-low.c (compat_siginfo_from_siginfo)
10338 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10339 si_code is < 0. Check for si_code == SI_TIMER before checking for
10340 si_code < 0.
10341
10342 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10343
10344 * lynx-i386-low.c: New file.
10345 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10346
10347 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10348
10349 * lynx-low.c (ptrace_request_to_str): Remove handling for
10350 request values that have been removed in LynxOS 5.x.
10351
10352 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10353
10354 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10355 <ptrace.h>
10356
10357 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10358
10359 * configure.ac: Add --enable-inprocess-agent option.
10360 * configure: Rebuilt.
10361
10362 2010-09-06 Yao Qi <yao@codesourcery.com>
10363
10364 * linux-low.c (linux_kill): Remove unused variable.
10365 (linux_stabilize_threads): Likewise.
10366 * server.c (start_inferior): Likewise.
10367 (queue_stop_reply_callback): Likewise.
10368 * tracepoint.c (do_action_at_tracepoint): Likewise.
10369
10370 2010-09-06 Yao Qi <yao@codesourcery.com>
10371
10372 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10373 on return.
10374
10375 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10376
10377 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10378
10379 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10380
10381 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10382 "$(IPA_DEPFILES)".
10383
10384 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10385
10386 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10387 gdbserver/lynx-ppc-low.c: New files.
10388 * Makefile.in (lynx_low_h): New variable.
10389 (lynx-low.o, lynx-ppc-low.o): New rules.
10390 * configure.ac: On LynxOS, link with -lnetinet.
10391 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10392 * configure: regenerate.
10393
10394 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10395
10396 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10397 * configure.ac: Add check for vasprintf and vsnprintf.
10398 * configure, config.in: Regenerate.
10399 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10400
10401 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10402
10403 * gdbreplay.c: Move include of alloca.h up, next to include of
10404 malloc.h.
10405 * server.h: Add include of malloc.h.
10406 * mem-break.c: Remove include of malloc.h.
10407 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10408
10409 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10410
10411 * Makefile.in (memmem.o): Build with -Wno-error.
10412
10413 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10414
10415 * utils.c (xsnprintf): Make non-static.
10416 * server.h: Add xsnprintf declaration.
10417 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10418 replace calls to snprintf by calls to xsnprintf throughout.
10419
10420 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10421
10422 * configure.ac: Add configure check for alloca.
10423 * configure, config.in: Regenerate.
10424 * server.h: Include alloca.h if it exists.
10425 * gdbreplay.c: Include alloca.h if it exists.
10426
10427 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10428
10429 * linux-low.c (__SIGRTMIN): Define if not already defined.
10430 (linux_create_inferior): Check for __ANDROID__ rather than
10431 __SIGRTMIN.
10432 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10433 are already deferred.
10434 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10435 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10436 stopped and already has a pending signal to report.
10437 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10438 a pending signal to report or is moving out of a jump pad.
10439 (linux_init_signals): Check for __ANDROID__ rather than
10440 __SIGRTMIN.
10441
10442 2010-08-28 Pedro Alves <pedro@codesourcery.com>
10443
10444 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10445 debug_threads check. Avoid a linear search when not doing debug
10446 output.
10447
10448 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10449
10450 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10451 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10452 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10453 (process_event): Change local fd's type to gdb_fildes_t.
10454 (create_file_handler): Adjust prototype.
10455 (delete_file_handler): Adjust prototype.
10456 (handle_file_event): Adjust prototype. Use pfildes.
10457 (create_file_event): Adjsut prototype.
10458 * remote-utils.c (remote_desc, listen_desc): Change type to
10459 gdb_fildes_t.
10460 * server.h: New gdb_fildes_t typedef.
10461 [USE_WIN32API]: Include winsock2.h.
10462 (delete_file_handler, add_file_handler): Adjust prototypes.
10463 (pfildes): Declare.
10464 * utils.c (pfildes): New.
10465
10466 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10467
10468 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10469 * configure: Regenerate.
10470
10471 2010-08-27 Pedro Alves <pedro@codesourcery.com>
10472
10473 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10474 (linux_done_accessing_memory): ... this.
10475 (linux_target_ops): Adjust.
10476 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10477 * nto-low.c (nto_target_ops): Adjust comment.
10478 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10479 * spu-low.c (spu_target_ops): Adjust comment.
10480 * target.h (target_ops): Rename unprepare_to_access_memory field
10481 to done_accessing_memory.
10482 (unprepare_to_access_memory): Rename to ...
10483 (done_accessing_memory): ... this.
10484
10485 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10486
10487 * linux-low.c (linux_prepare_to_access_memory): New.
10488 (linux_unprepare_to_access_memory): New.
10489 (linux_target_ops): Install them.
10490 * server.c (read_memory): Rename to ...
10491 (gdb_read_memory): ... this. Use
10492 prepare_to_access_memory/prepare_to_access_memory.
10493 (write_memory): Rename to ...
10494 (gdb_write_memory): ... this. Use
10495 prepare_to_access_memory/prepare_to_access_memory.
10496 (handle_search_memory_1): Adjust.
10497 (process_serial_event): Adjust.
10498 * target.h (struct target_ops): New fields
10499 prepare_to_access_memory and unprepare_to_access_memory.
10500 (prepare_to_access_memory, unprepare_to_access_memory): New.
10501 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10502 prepare_to_access_memory/prepare_to_access_memory.
10503 * nto-low.c (nto_target_ops): Adjust.
10504 * spu-low.c (spu_target_ops): Adjust.
10505 * win32-low.c (win32_target_ops): Adjust.
10506
10507 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10508
10509 * Makefile.in (WARN_CFLAGS): Get it from configure.
10510 (WERROR_CFLAGS): New.
10511 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10512 * configure.ac: Introduce --enable-werror, which adds -Werror to
10513 the compiler command line. Enabled by default. Disable with
10514 --disable-werror. Add -Wdeclaration-after-statement
10515 Wpointer-arith and -Wformat-nonliteral to warning flags.
10516 * configure: Regenerate.
10517
10518 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10519
10520 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10521
10522 2010-08-26 Pedro Alves <pedro@codesourcery.com>
10523
10524 * gdbreplay.c (remote_error): New.
10525 (gdbchar): New.
10526 (expect): Use gdbchar. Check for error reading from GDB.
10527 Clarify sync error output.
10528 (play): Check for errors writing to GDB.
10529 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10530 * remote-utils.c (getpkt): Check for errors writing to the remote
10531 descriptor.
10532
10533 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10534
10535 * linux-low.c (linux_wait_1): Move non-debugging code out of
10536 `debug_threads' control.
10537
10538 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10539
10540 * linux-low.c (linux_wait_1): Don't set last_status here.
10541 * server.c (push_event, queue_stop_reply_callback): Assert we're
10542 not pushing a TARGET_WAITKIND_IGNORE event.
10543 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10544 (myresume, handle_target_event): Set the thread's last_resume_kind
10545 and last_status from the target returned status.
10546
10547 2010-08-25 Pedro Alves <pedro@codesourcery.com>
10548
10549 PR threads/10729
10550
10551 * linux-x86-low.c (update_debug_registers_callback): New.
10552 (i386_dr_low_set_addr): Use it.
10553 (i386_dr_low_get_addr): New.
10554 (i386_dr_low_set_control): Use update_debug_registers_callback.
10555 (i386_dr_low_get_control): New.
10556 (i386_dr_low_get_status): Adjust.
10557 * linux-low.c (linux_stop_lwp): New.
10558 * linux-low.h (linux_stop_lwp): Declare.
10559
10560 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10561 argument instead of a i386_debug_reg_state.
10562 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10563 a i386_debug_reg_state.
10564 (i386_insert_aligned_watchpoint): Adjust.
10565 (i386_remove_aligned_watchpoint): Adjust.
10566 (i386_low_stopped_data_address): Read the debug registers from the
10567 inferior instead of from the mirrors.
10568 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10569 (i386_dr_low_get_addr): Declare.
10570 (i386_dr_low_get_control): Declare.
10571 (i386_dr_low_get_status): Change prototype.
10572
10573 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10574 (i386_dr_low_get_addr): New.
10575 (i386_dr_low_get_control): New.
10576 (i386_dr_low_get_status): Adjust prototype. Return
10577 dr_status_mirror.
10578 (i386_initial_stuff): Clear dr_status_mirror and
10579 dr_control_mirror.
10580 (i386_get_thread_context): Adjust.
10581 (i386_set_thread_context): Adjust.
10582 (i386_thread_added): Adjust.
10583
10584 2010-08-24 Pedro Alves <pedro@codesourcery.com>
10585
10586 * linux-low.h (linux_thread_area): Delete declaration.
10587
10588 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10589
10590 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10591 after its termination.
10592
10593 2010-08-09 Pedro Alves <pedro@codesourcery.com>
10594
10595 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10596 (gdb_wants_all_stopped): Delete.
10597 (linux_wait_1): Don't call them.
10598 * server.c (handle_v_cont): Tag all threads as want-stopped.
10599 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10600 stopped as "client-wants-stopped".
10601
10602 2010-07-31 Pedro Alves <pedro@codesourcery.com>
10603
10604 * Makefile.in (signals_h): New.
10605 (server_h): Depend on it.
10606 (server.o): Don't depend on $(signals_def).
10607 (signals.o): Depend on $(signals_def).
10608
10609 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10610
10611 * Makefile.in (signals_def): New.
10612 (server_h): Append include/gdb/signals.h and signals_def.
10613 (server.o): Append signals_def.
10614
10615 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10616
10617 * server.c (handle_target_event): Use target_signal_to_host for
10618 resume_info.sig initialization.
10619 * target.h (struct thread_resume) <sig>: New comment.
10620
10621 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10622
10623 * server.c (handle_query): strcpy() the returned string from paddress()
10624 instead of sprintf().
10625 * utils.c (paddress): Return phex_nz().
10626
10627 2010-07-07 Joel Brobecker <brobecker@adacore.com>
10628
10629 * server.c (handle_v_cont): Call mourn_inferior if process
10630 just exited.
10631 (myresume): Likewise.
10632
10633 2010-07-01 Pedro Alves <pedro@codesourcery.com>
10634
10635 Static tracepoints, and integration with UST.
10636
10637 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10638 * mem-break.c (uninsert_all_breakpoints)
10639 (reinsert_all_breakpoints): New.
10640 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10641 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10642 (gdb_agent_ust_loaded, helper_thread_id)
10643 (gdb_agent_helper_thread_id): New macros.
10644 (struct ipa_sym_addresses): Add addr_ust_loaded,
10645 addr_helper_thread_id, addr_cmd_buf.
10646 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10647 (in_process_agent_loaded_ust): New.
10648 (write_e_ust_not_loaded): New.
10649 (maybe_write_ipa_ust_not_loaded): New.
10650 (struct collect_static_trace_data_action): New.
10651 (enum tracepoint_type) <static_tracepoint>: New.
10652 (struct tracepoint) <handle>: Mention static tracepoints.
10653 (struct static_tracepoint_ctx): New.
10654 (CMD_BUF_SIZE): New.
10655 (add_tracepoint_action): Handle static tracepoint actions.
10656 (unprobe_marker_at): New.
10657 (clear_installed_tracepoints): Handle static tracepoints.
10658 (cmd_qtdp): Handle static tracepoints.
10659 (probe_marker_at): New.
10660 (cmd_qtstart): Handle static tracepoints.
10661 (response_tracepoint): Handle static tracepoints.
10662 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10663 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10664 (get_context_regcache): Handle static tracepoints.
10665 (do_action_at_tracepoint): Handle static tracepoint actions.
10666 (traceframe_find_block_type): Handle static trace data blocks.
10667 (traceframe_read_sdata): New.
10668 (download_tracepoints): Download static tracepoint actions.
10669 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10670 (GDB_PROBE_NAME): New.
10671 (ust_ops): New.
10672 (GET_UST_SYM): New.
10673 (USTF): New.
10674 (dlsym_ust): New.
10675 (ust_marker_to_static_tracepoint): New.
10676 (gdb_probe): New.
10677 (collect_ust_data_at_tracepoint): New.
10678 (gdb_ust_probe): New.
10679 (UNIX_PATH_MAX, SOCK_DIR): New.
10680 (gdb_ust_connect_sync_socket): New.
10681 (resume_thread, stop_thread): New.
10682 (run_inferior_command): New.
10683 (init_named_socket): New.
10684 (gdb_ust_socket_init): New.
10685 (cstr_to_hexstr): New.
10686 (next_st): New.
10687 (first_marker, next_marker): New.
10688 (response_ust_marker): New.
10689 (cmd_qtfstm, cmd_qtsstm): New.
10690 (unprobe_marker_at, probe_marker_at): New.
10691 (cmd_qtstmat, gdb_ust_thread): New.
10692 (gdb_ust_init): New.
10693 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10694 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10695 (ST_REGENTRY): New.
10696 (x86_64_st_collect_regmap): New.
10697 (X86_64_NUM_ST_COLLECT_GREGS): New.
10698 (AMD64_RIP_REGNUM): New.
10699 (supply_static_tracepoint_registers): New.
10700 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10701 (ST_REGENTRY): New.
10702 (i386_st_collect_regmap): New.
10703 (i386_NUM_ST_COLLECT_GREGS): New.
10704 (supply_static_tracepoint_registers): New.
10705 * server.c (handle_query): Handle qXfer:statictrace:read.
10706 <qSupported>: Report support for StaticTracepoints, and
10707 qXfer:statictrace:read features.
10708 * server.h (traceframe_read_sdata)
10709 (supply_static_tracepoint_registers): Declare.
10710 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10711 (unpack_varlen_hex): Include in IPA build.
10712 * Makefile.in (ustlibs, ustinc): New.
10713 (IPA_OBJS): Add remote-utils-ipa.o.
10714 ($(IPA_LIB)): Link -ldl and -lpthread.
10715 (UST_CFLAGS): New.
10716 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10717 * config.in, configure: Regenerate.
10718
10719 2010-06-20 Ian Lance Taylor <iant@google.com>
10720 Pedro Alves <pedro@codesourcery.com>
10721
10722 * linux-x86-low.c (always_true): Delete.
10723 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10724 trying to fool the compiler with always_true.
10725
10726 2010-06-20 Pedro Alves <pedro@codesourcery.com>
10727
10728 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10729 conditions in gdbserver.
10730
10731 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10732
10733 * spu-low.c (spu_read_memory): Wrap around local store limit.
10734 (spu_write_memory): Likewise.
10735
10736 2010-06-15 Pedro Alves <pedro@codesourcery.com>
10737
10738 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10739 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10740 LONGEST uses.
10741 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10742 uses.
10743 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10744 uses with LONGEST uses.
10745
10746 2010-06-14 Stan Shebs <stan@codesourcery.com>
10747 Pedro Alves <pedro@codesourcery.com>
10748
10749 Bytecode compiler.
10750
10751 * linux-x86-low.c: Include limits.h.
10752 (add_insns): New.
10753 (always_true): New.
10754 (EMIT_ASM): New.
10755 (EMIT_ASM32): New.
10756 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10757 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10758 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10759 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10760 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10761 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10762 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10763 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10764 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10765 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10766 (amd64_emit_void_call_2): New.
10767 (amd64_emit_ops): New.
10768 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10769 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10770 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10771 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10772 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10773 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10774 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10775 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10776 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10777 (i386_emit_stack_adjust, i386_emit_int_call_1)
10778 (i386_emit_void_call_2): New.
10779 (i386_emit_ops): New.
10780 (x86_emit_ops): New.
10781 (the_low_target): Install x86_emit_ops.
10782 * server.h (struct emit_ops): New.
10783 (get_raw_reg_func_addr): Declare.
10784 (current_insn_ptr, emit_error): Declare.
10785 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10786 (set_trace_state_variable_value): New defines.
10787 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10788 addr_get_trace_state_variable_value and
10789 addr_set_trace_state_variable_value.
10790 (symbol_list): New fields for get_raw_reg,
10791 get_trace_state_variable_value and set_trace_state_variable_value.
10792 (condfn): New typedef.
10793 (struct tracepoint): New field `compiled_cond'.
10794 (do_action_at_tracepoint): Clear compiled_cond.
10795 (get_trace_state_variable_value, set_trace_state_variable_value):
10796 Export in the IPA.
10797 (condition_true_at_tracepoint): If there's a compiled condition,
10798 run that.
10799 (current_insn_ptr, emit_error): New globals.
10800 (struct bytecode_address): New.
10801 (get_raw_reg_func_addr): New.
10802 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10803 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10804 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10805 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10806 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10807 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10808 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10809 (compile_tracepoint_condition, compile_bytecodes): New.
10810 * target.h (emit_ops): Forward declare.
10811 (struct target_ops): New field emit_ops.
10812 (target_emit_ops): New.
10813 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10814 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10815 * linux-low.c (linux_emit_ops): New.
10816 (linux_target_ops): Install it.
10817 * linux-low.h (struct linux_target_ops): New field emit_ops.
10818
10819 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10820
10821 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10822 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10823
10824 2010-06-01 Pedro Alves <pedro@codesourcery.com>
10825 Stan Shebs <stan@codesourcery.com>
10826
10827 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10828 (all): Depend on $(extra_libraries).
10829 (install-only): Install the IPA.
10830 (IPA_OBJS, IPA_LIB): New.
10831 (clean): Remove the IPA lib.
10832 (IPAGENT_CFLAGS): New.
10833 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10834 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10835 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10836 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10837 * configure.ac: Check for atomic builtins support in the compiler.
10838 (IPA_DEPFILES, extra_libraries): Define.
10839 * configure.srv (ipa_obj): Add description.
10840 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10841 (i[34567]86-*-linux*): Set ipa_obj.
10842 (x86_64-*-linux*): Set ipa_obj.
10843 * linux-low.c (stabilizing_threads): New.
10844 (supports_fast_tracepoints): New.
10845 (linux_detach): Stabilize threads before detaching.
10846 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10847 the lwp is either not stabilizing, or is moving out of a jump pad.
10848 (linux_fast_tracepoint_collecting): New.
10849 (maybe_move_out_of_jump_pad): New.
10850 (enqueue_one_deferred_signal): New.
10851 (dequeue_one_deferred_signal): New.
10852 (linux_wait_for_event_1): If moving out of a jump pad, defer
10853 pending signals to later.
10854 (linux_stabilize_threads): New.
10855 (linux_wait_1): Check if threads need moving out of jump pads, and
10856 do it if so.
10857 (stuck_in_jump_pad_callback): New.
10858 (move_out_of_jump_pad_callback): New.
10859 (lwp_running): New.
10860 (linux_resume_one_lwp): Handle moving out of jump pads.
10861 (linux_set_resume_request): Dequeue deferred signals.
10862 (need_step_over_p): Also step over fast tracepoint jumps.
10863 (start_step_over): Also uninsert fast tracepoint jumps.
10864 (finish_step_over): Also reinsert fast tracepoint jumps.
10865 (linux_install_fast_tracepoint_jump): New.
10866 (linux_target_ops): Install linux_stabilize_threads and
10867 linux_install_fast_tracepoint_jump_pad.
10868 * linux-low.h (linux_target_ops) <get_thread_area,
10869 install_fast_tracepoint_jump_pad>: New fields.
10870 (struct lwp_info) <collecting_fast_tracepoint,
10871 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10872 (linux_get_thread_area): Declare.
10873 * linux-x86-low.c (jump_insn): New.
10874 (x86_get_thread_area): New.
10875 (append_insns): New.
10876 (push_opcode): New.
10877 (amd64_install_fast_tracepoint_jump_pad): New.
10878 (i386_install_fast_tracepoint_jump_pad): New.
10879 (x86_install_fast_tracepoint_jump_pad): New.
10880 (the_low_target): Install x86_get_thread_area and
10881 x86_install_fast_tracepoint_jump_pad.
10882 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10883 (struct fast_tracepoint_jump): New.
10884 (fast_tracepoint_jump_insn): New.
10885 (fast_tracepoint_jump_shadow): New.
10886 (find_fast_tracepoint_jump_at): New.
10887 (fast_tracepoint_jump_here): New.
10888 (delete_fast_tracepoint_jump): New.
10889 (set_fast_tracepoint_jump): New.
10890 (uninsert_fast_tracepoint_jumps_at): New.
10891 (reinsert_fast_tracepoint_jumps_at): New.
10892 (set_breakpoint_at): Use write_inferior_memory.
10893 (uninsert_raw_breakpoint): Use write_inferior_memory.
10894 (check_mem_read): Mask out fast tracepoint jumps.
10895 (check_mem_write): Mask out fast tracepoint jumps.
10896 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10897 (set_fast_tracepoint_jump): Declare.
10898 (delete_fast_tracepoint_jump)
10899 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10900 (reinsert_fast_tracepoint_jumps_at): Declare.
10901 * regcache.c: Don't compile many functions when building the
10902 in-process agent library.
10903 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10904 the register buffer in the heap.
10905 (free_register_cache): If the register buffer isn't owned by the
10906 regcache, don't free it.
10907 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10908 pre-existing register caches.
10909 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10910 type.
10911 (convert_ascii_to_int): : Constify `from' parameter type.
10912 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10913 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10914 the needed buffer in-place.
10915 (relocate_instruction): New.
10916 * server.c (handle_query) <qSymbols>: If the target supports
10917 tracepoints, give it a chance of looking up symbols. Report
10918 support for fast tracepoints.
10919 (handle_status): Stabilize threads.
10920 (process_serial_event): Adjust.
10921 * server.h (struct fast_tracepoint_jump): Forward declare.
10922 (struct process_info) <fast_tracepoint_jumps>: New field.
10923 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10924 (decode_X_packet, decode_M_packet): Adjust.
10925 (relocate_instruction): Declare.
10926 (in_process_agent_loaded): Declare.
10927 (tracepoint_look_up_symbols): Declare.
10928 (struct fast_tpoint_collect_status): Declare.
10929 (fast_tracepoint_collecting): Declare.
10930 (force_unlock_trace_buffer): Declare.
10931 (handle_tracepoint_bkpts): Declare.
10932 (initialize_low_tracepoint)
10933 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10934 * target.h (struct target_ops) <stabilize_threads,
10935 install_fast_tracepoint_jump_pad>: New fields.
10936 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10937 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10938 [HAVE_STDINT_H]: Include stdint.h.
10939 (trace_debug_1): Rename to ...
10940 (trace_vdebug): ... this.
10941 (trace_debug): Rename to ...
10942 (trace_debug_1): ... this. Add `level' parameter.
10943 (trace_debug): New.
10944 (ATTR_USED, ATTR_NOINLINE): New.
10945 (IP_AGENT_EXPORT): New.
10946 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10947 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10948 (about_to_request_buffer_space, trace_buffer_is_full)
10949 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10950 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10951 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10952 (traceframe_write_count, traceframes_created)
10953 (trace_state_variables)
10954 New renaming defines.
10955 (struct ipa_sym_addresses): New.
10956 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10957 (symbol_list): New.
10958 (ipa_sym_addrs): New.
10959 (all_tracepoint_symbols_looked_up): New.
10960 (in_process_agent_loaded): New.
10961 (write_e_ipa_not_loaded): New.
10962 (maybe_write_ipa_not_loaded): New.
10963 (tracepoint_look_up_symbols): New.
10964 (debug_threads) [IN_PROCESS_AGENT]: New.
10965 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10966 (UNKNOWN_SIDE_EFFECTS): New.
10967 (stop_tracing): New.
10968 (flush_trace_buffer): New.
10969 (stop_tracing_bkpt): New.
10970 (flush_trace_buffer_bkpt): New.
10971 (read_inferior_integer): New.
10972 (read_inferior_uinteger): New.
10973 (read_inferior_data_pointer): New.
10974 (write_inferior_data_pointer): New.
10975 (write_inferior_integer): New.
10976 (write_inferior_uinteger): New.
10977 (struct collect_static_trace_data_action): Delete.
10978 (enum tracepoint_type): New.
10979 (struct tracepoint) <type>: New field `type'.
10980 <actions_str, step_actions, step_actions_str>: Only include in
10981 GDBserver.
10982 <orig_size, obj_addr_on_target, adjusted_insn_addr>
10983 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10984 (tracepoints): Use IP_AGENT_EXPORT.
10985 (last_tracepoint): Don't include in the IPA.
10986 (stopping_tracepoint): Use IP_AGENT_EXPORT.
10987 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10988 (alloced_trace_state_variables): New.
10989 (trace_state_variables): Use IP_AGENT_EXPORT.
10990 (traceframe_t): Delete unused variable.
10991 (circular_trace_buffer): Don't include in the IPA.
10992 (trace_buffer_start): Delete.
10993 (struct trace_buffer_control): New.
10994 (trace_buffer_free): Delete.
10995 (struct ipa_trace_buffer_control): New.
10996 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10997 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10998 New.
10999 (trace_buffer_ctrl): New.
11000 (TRACE_BUFFER_CTRL_CURR): New.
11001 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11002 Reimplement as macros.
11003 (trace_buffer_wrap): Delete.
11004 (traceframe_write_count, traceframe_read_count)
11005 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11006 (struct tracepoint_hit_ctx) <type>: New field.
11007 (struct fast_tracepoint_ctx): New.
11008 (memory_barrier): New.
11009 (cmpxchg): New.
11010 (record_tracepoint_error): Update atomically in the IPA.
11011 (clear_inferior_trace_buffer): New.
11012 (about_to_request_buffer_space): New.
11013 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11014 updating the same buffer.
11015 (add_tracepoint): Default the tracepoint's type to trap
11016 tracepoint, and orig_size to -1.
11017 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11018 internal variables.
11019 (create_trace_state_variable): New parameter `gdb'. Handle it.
11020 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11021 (cmd_qtdp): Handle fast tracepoints.
11022 (cmd_qtdv): Adjust.
11023 (max_jump_pad_size): New.
11024 (gdb_jump_pad_head): New.
11025 (get_jump_space_head): New.
11026 (claim_jump_space): New.
11027 (sort_tracepoints): New.
11028 (MAX_JUMP_SIZE): New.
11029 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11030 IPA.
11031 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11032 support. Upload fast traceframes, and delete internal IPA
11033 breakpoints.
11034 (stop_tracing_handler): New.
11035 (flush_trace_buffer_handler): New.
11036 (cmd_qtstop): Upload fast tracepoints.
11037 (response_tracepoint): Handle fast tracepoints.
11038 (tracepoint_finished_step): Upload fast traceframes. Set the
11039 tracepoint hit context's tracepoint type.
11040 (handle_tracepoint_bkpts): New.
11041 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11042 type. Add comment about fast tracepoints.
11043 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11044 non-existing action_str field.
11045 (get_context_regcache): Handle fast tracepoints.
11046 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11047 to the regcache.
11048 (fast_tracepoint_from_jump_pad_address): New.
11049 (fast_tracepoint_from_ipa_tpoint_address): New.
11050 (collecting_t): New.
11051 (force_unlock_trace_buffer): New.
11052 (fast_tracepoint_collecting): New.
11053 (collecting): New.
11054 (gdb_collect): New.
11055 (write_inferior_data_ptr): New.
11056 (target_tp_heap): New.
11057 (target_malloc): New.
11058 (download_agent_expr): New.
11059 (UALIGN): New.
11060 (download_tracepoints): New.
11061 (download_trace_state_variables): New.
11062 (upload_fast_traceframes): New.
11063 (IPA_FIRST_TRACEFRAME): New.
11064 (IPA_NEXT_TRACEFRAME_1): New.
11065 (IPA_NEXT_TRACEFRAME): New.
11066 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11067 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11068 (gdb_jump_pad_buffer_end): New.
11069 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11070 (initialize_tracepoint): Adjust.
11071 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11072 buffer. Initialize the low module.
11073 * utils.c (PREFIX, TOOLNAME): New.
11074 (malloc_failure): Use PREFIX.
11075 (error): In the IPA, an error causes an exit.
11076 (fatal, warning): Use PREFIX.
11077 (internal_error): Use TOOLNAME.
11078 (NUMCELLS): Increase to 10.
11079 * configure, config.in: Regenerate.
11080
11081 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11082
11083 * server.c (handle_query) <qSupported>: Do two passes over the
11084 qSupported string to avoid nesting strtok.
11085
11086 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11087
11088 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11089 (CDEPS): New.
11090 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11091 -Wl,--dynamic-list.
11092 * configure: Regenerate.
11093 * proc-service.list: New.
11094
11095 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11096
11097 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11098 New comment.
11099
11100 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11101
11102 * gdbreplay.c (remote_open): Check error return from socket() call by
11103 its equality to -1 not by it being negative.
11104 * remote-utils.c (remote_open): Likewise.
11105
11106 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11107
11108 * config.h: Regenerate.
11109
11110 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11111
11112 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11113 doesn't provide PTRACE_GET_THREAD_AREA.
11114
11115 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11116
11117 * linux-m68k-low.c: Include <asm/ptrace.h>
11118 (ps_get_thread_area): Implement.
11119
11120 2010-05-03 Doug Evans <dje@google.com>
11121
11122 * event-loop.c (struct callback_event): New struct.
11123 (callback_list): New global.
11124 (append_callback_event, delete_callback_event): New functions.
11125 (process_callback): New function.
11126 (start_event_loop): Call it.
11127 * remote-utils.c (NOT_SCHEDULED): Define.
11128 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11129 moved out of readchar.
11130 (readchar): Rewrite. Call reschedule before returning.
11131 (reset_readchar): New function.
11132 (remote_close): Call it.
11133 (process_remaining, reschedule): New functions.
11134 * server.h (callback_handler_func): New typedef.
11135 (append_callback_event, delete_callback_event): Declare.
11136
11137 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11138
11139 * proc-service.c (ps_pglobal_lookup): Use
11140 thread_db_look_up_one_symbol.
11141 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11142 parameter. Use it instead of all_symbols_looked_up.
11143 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11144 field.
11145 (all_symbols_looked_up): Don't declare.
11146 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11147 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11148 field.
11149 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11150 Set all_symbols_looked_up here.
11151 (thread_db_look_up_one_symbol): New.
11152 (thread_db_get_tls_address): Adjust.
11153 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11154 thread_db object on the heap, and tentatively set it in the
11155 process structure.
11156 (thread_db_init): Don't set all_symbols_looked_up here.
11157 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11158
11159 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11160
11161 * linux-low.c (linux_kill, linux_detach): Adjust.
11162 (status_pending_p_callback): Remove redundant statement. Check
11163 for !TARGET_WAITIKIND_IGNORE, instead of
11164 TARGET_WAITKIND_STOPPED.
11165 (handle_tracepoints): Make sure LWP is locked. Adjust.
11166 (linux_wait_for_event_1): Adjust.
11167 (linux_cancel_breakpoints): New.
11168 (unsuspend_one_lwp): New.
11169 (unsuspend_all_lwps): New.
11170 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11171 (send_sigstop_callback): Change return type to int, add new
11172 `except' parameter and handle it.
11173 (suspend_and_send_sigstop_callback): New.
11174 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11175 pass them down. If SUSPEND, also increment the lwp's suspend
11176 count.
11177 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11178 (need_step_over_p): Don't consider suspended LWPs.
11179 (start_step_over): Adjust.
11180 (proceed_one_lwp): Change return type to int, add new `except'
11181 parameter and handle it.
11182 (unsuspend_and_proceed_one_lwp): New.
11183 (proceed_all_lwps): Use find_inferior instead of
11184 for_each_inferior.
11185 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11186 also decrement the suspend count of LWPs. Pass `except' down,
11187 instead of hacking its suspend count.
11188 (linux_pause_all): Add `freeze' parameter. Adjust.
11189 (linux_unpause_all): New.
11190 (linux_target_ops): Install linux_unpause_all.
11191 * server.c (handle_status): Adjust.
11192 * target.h (struct target_ops): New fields `unpause_all' and
11193 `cancel_breakpoints'. Add new parameter to `pause_all'.
11194 (pause_all): Add new `freeze' parameter.
11195 (unpause_all): New.
11196 (cancel_breakpoints): New.
11197 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11198 cancel breakpoints.
11199 (cmd_qtstart): Pause threads.
11200 (stop_tracing): Pause threads, and cancel breakpoints.
11201 * win32-low.c (win32_target_ops): Adjust.
11202
11203 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11204
11205 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11206 the inferior right away from here...
11207 (linux_wait_1): ... to here, and adjust to check the thread's
11208 last_resume_kind instead of the lwp's step or stop_expected flags.
11209
11210 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11211
11212 * README: Use consistent `GDB' and `GDBserver' spellings.
11213
11214 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11215
11216 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11217 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11218 (linux_detach_one_lwp): Assume the lwp is stopped.
11219 (any_thread_of): Delete.
11220 (linux_detach): Stop all lwps here. Don't blindly delete all
11221 breakpoints.
11222 (delete_lwp_callback): New.
11223 (linux_mourn): Delete all lwps of the process that is gone.
11224 (linux_wait_1): Don't delete the last lwp of the process here.
11225 * mem-break.h (mark_breakpoints_out): Declare.
11226 * mem-break.c (mark_breakpoints_out): New.
11227 (free_all_breakpoints): Use it.
11228 * server.c (handle_target_event): If the process is gone, mark
11229 breakpoints out.
11230 * thread-db.c (struct thread_db) <create_bp>: New field.
11231 (thread_db_enable_reporting): Fix prototype. Store a thread event
11232 breakpoint reference in the thread_db struct.
11233 (thread_db_load_search): Clear the thread_db object.
11234 (try_thread_db_load_1): Ditto.
11235 (switch_to_process): New.
11236 (disable_thread_event_reporting): Use it.
11237 (remove_thread_event_breakpoints): New.
11238 (thread_db_detach, thread_db_mourn): Use it.
11239
11240 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11241
11242 * linux-low.c (linux_enable_event_reporting): New.
11243 (linux_wait_for_event_1, handle_extended_wait): Use it.
11244
11245 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11246
11247 * linux-low.c (linux_kill_one_lwp, linux_kill)
11248 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11249 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11250 SIGSTOP even if the LWP is stopped.
11251 (send_sigstop_callback): New.
11252 (stop_all_lwps): Use send_sigstop_callback instead.
11253 (linux_resume_one_thread): Adjust.
11254 (proceed_one_lwp): Still proceed an LWP that the client has
11255 requested to stop, if we haven't reported it as stopped yet. Make
11256 sure that LWPs the client want stopped, have a pending SIGSTOP.
11257
11258 2010-04-26 Doug Evans <dje@google.com>
11259
11260 * server.c (handle_general_set): Make static.
11261
11262 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11263 Print received char after testing for error/eof instead of before.
11264 (input_interrupt): Tweak comment.
11265
11266 2010-04-23 Doug Evans <dje@google.com>
11267
11268 * server.c (start_inferior): Print inferior argv if --debug.
11269
11270 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11271
11272 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11273 * nto-x86-low.c: Include server.h
11274
11275 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11276
11277 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11278 be consistent with other sources of this directory.
11279 (init_registers_amd64): Correct name of source file of this function
11280 in the comment.
11281
11282 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11283
11284 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11285 64-bit executables.
11286
11287 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11288
11289 * win32-i386-low.c: Add 64-bit support.
11290 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11291 (init_registers_amd64): Declare.
11292 (mappings): Add 64-bit version of array.
11293 (init_windows_x86): New function.
11294 (the_low_target): Change init_arch field to init_windows_x86.
11295
11296 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11297
11298 * win32-low.c: Adapt to support also 64-bit architecture.
11299 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11300 (get_image_name): Use SIZE_T type for local variable `done'.
11301 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11302 (toolhelp_get_dll_name): Idem.
11303 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11304 Use uintptr_t typecast to avoid warning.
11305 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11306 (handle_exception): Use phex_nz to avoid warning.
11307 (win32_wait): Remove unused local variable `process'.
11308
11309 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11310
11311 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11312 `amd64-avx.o'.
11313
11314 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11315
11316 * configure.ac: Use `ws2_32' library for srv_mingw.
11317 * configure: Regenerate.
11318 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11319 * remote-utils.c: Likewise.
11320
11321 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11322
11323 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11324 if __x86_64__ is defined.
11325
11326 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11327
11328 * configure: Regenerate.
11329
11330 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11331
11332 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11333 * target.h (target_ops): New get_tib_address field.
11334 * win32-low.h (win32_thread_info): Add thread_local_base field.
11335 * win32-low.c (child_add_thread): Add tlb argument.
11336 Set thread_local_base field to TLB.
11337 (get_child_debug_event): Adapt to child_add_thread change.
11338 (win32_get_tib_address): New function.
11339 (win32_target_ops): Set get_tib_address field to
11340 win32_get_tib_address.
11341 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11342
11343 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11344
11345 * linux-low.c (linux_mourn): Also remove the process.
11346 * server.c (handle_target_event): Don't remove the process here.
11347 * nto-low.c (nto_mourn): New.
11348 (nto_target_ops): Install it.
11349 * spu-low.c (spu_mourn): New.
11350 (spu_target_ops): Install it.
11351 * win32-low.c (win32_mourn): New.
11352 (win32_target_ops): Install it.
11353
11354 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11355
11356 * server.h (buffer_xml_printf): Remove redundant `;'.
11357
11358 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11359
11360 * regcache.c (set_register_cache): Invalidate regcaches before
11361 changing the register cache layout.
11362 (regcache_invalidate_one): Allow a NULL regcache.
11363 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11364 regcaches before changing the register cache layout or the target
11365 regsets.
11366
11367 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11368
11369 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11370 variable warning on Linux/x86-64.
11371
11372 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11373
11374 GDBserver disconnected tracing support.
11375
11376 * linux-low.c (linux_remove_process): Delete.
11377 (add_lwp): Don't set last_resume_kind here.
11378 (linux_kill): Use `mourn'.
11379 (linux_detach): Use `thread_db_detach', and `mourn'.
11380 (linux_mourn): New.
11381 (linux_attach_lwp_1): Adjust comment.
11382 (linux_attach): last_resume_kind moved the thread_info; adjust.
11383 (status_pending_p_callback): Adjust.
11384 (linux_wait_for_event_1): Adjust.
11385 (count_events_callback, select_singlestep_lwp_callback)
11386 (select_event_lwp_callback, cancel_breakpoints_callback)
11387 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11388 (proceed_one_lwp): Adjust.
11389 (linux_async): Add debug output.
11390 (linux_thread_stopped): New.
11391 (linux_pause_all): New.
11392 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11393 linux_pause_all.
11394 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11395 (thread_db_free): Delete declaration.
11396 (thread_db_detach, thread_db_mourn): Declare.
11397 * thread-db.c (thread_db_init): Use thread_db_mourn.
11398 (thread_db_free): Delete, split in two.
11399 (disable_thread_event_reporting): New.
11400 (thread_db_detach): New.
11401 (thread_db_mourn): New.
11402
11403 * server.h (struct thread_info) <last_resume_kind>: New field.
11404 <attached>: Add comment.
11405 <gdb_detached>: New field.
11406 (handler_func): Change return type to int.
11407 (handle_serial_event, handle_target_event): Ditto.
11408 (gdb_connected): Declare.
11409 (tracing): Delete.
11410 (disconnected_tracing): Declare.
11411 (stop_tracing): Declare.
11412
11413 * server.c (handle_query) <qSupported>: Report support for
11414 disconnected tracing.
11415 (queue_stop_reply_callback): Account for running threads.
11416 (gdb_wants_thread_stopped): New.
11417 (gdb_wants_all_threads_stopped): New.
11418 (gdb_reattached_process): New.
11419 (handle_status): Clear the `gdb_detached' flag of all processes.
11420 In all-stop, stop all threads.
11421 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11422 (process_serial_event): If the remote connection breaks, or if an
11423 exit was forced with "monitor exit", force an event loop exit.
11424 Handle disconnected tracing on detach.
11425 (handle_serial_event): Adjust.
11426 (handle_target_event): If GDB isn't connected, forward events back
11427 to the inferior, unless the last process exited, in which case,
11428 exit gdbserver. Adjust interface.
11429
11430 * remote-utils.c (remote_open): Don't block in accept. Instead
11431 register an event loop source on the listen socket file
11432 descriptor. Refactor bits into ...
11433 (listen_desc): ... this new global.
11434 (gdb_connected): ... this new function.
11435 (enable_async_notification): ... this new function.
11436 (handle_accept_event): ... this new function.
11437 (remote_close): Clear remote_desc.
11438
11439 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11440
11441 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11442 New fields.
11443 (mourn_inferior): Define.
11444 (target_process_qsupported): Avoid the dangling else problem.
11445 (thread_stopped): Define.
11446 (pause_all): Define.
11447 (target_waitstatus_to_string): Declare.
11448 * target.c (target_waitstatus_to_string): New.
11449
11450 * tracepoint.c (tracing): Make extern.
11451 (disconnected_tracing): New.
11452 (stop_tracing): Make extern. Handle tracing stops due to GDB
11453 disconnecting.
11454 (cmd_qtdisconnected): New.
11455 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11456 (handle_tracepoint_general_set): Handle QTDisconnected.
11457
11458 * event-loop.c (event_handler_func): Change return type to int.
11459 (process_event): Bail out if the event handler wants the event
11460 loop to stop.
11461 (handle_file_event): Ditto.
11462 (start_event_loop): Bail out if the event handler wants the event
11463 loop to stop.
11464
11465 * nto-low.c (nto_target_ops): Adjust.
11466 * spu-low.c (spu_wait): Don't remove the process here.
11467 (spu_target_ops): Adjust.
11468 * win32-low.c (win32_wait): Don't remove the process here.
11469 (win32_target_ops): Adjust.
11470
11471 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11472
11473 * regcache.c (realloc_register_cache): Invalidate inferior's
11474 regcache before recreating it.
11475
11476 2010-04-09 Pedro Alves <pedro@codesourcery.com>
11477
11478 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11479
11480 2010-04-09 Stan Shebs <stan@codesourcery.com>
11481 Pedro Alves <pedro@codesourcery.com>
11482
11483 * server.h (LONGEST): New.
11484 (struct thread_info) <while_stepping>: New field.
11485 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11486 Declare.
11487 (initialize_tracepoint, handle_tracepoint_general_set)
11488 (handle_tracepoint_query, tracepoint_finished_step)
11489 (tracepoint_was_hit, release_while_stepping_state_list):
11490 (current_traceframe): Declare.
11491 * server.c (handle_general_set): Handle tracepoint packets.
11492 (read_memory): New.
11493 (write_memory): New.
11494 (handle_search_memory_1): Use read_memory.
11495 (handle_query): Report support for conditional tracepoints, trace
11496 state variables, and tracepoint sources. Handle tracepoint
11497 queries.
11498 (main): Initialize the tracepoints module.
11499 (process_serial_event): Handle traceframe reads/writes.
11500
11501 * linux-low.c (handle_tracepoints): New.
11502 (linux_wait_1): Call it.
11503 (linux_resume_one_lwp): Handle while-stepping.
11504 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11505 (linux_target_ops): Install them.
11506 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11507 New field.
11508 * linux-x86-low.c (x86_supports_tracepoints): New.
11509 (the_low_target). Install it.
11510
11511 * mem-break.h (delete_breakpoint): Declare.
11512 * mem-break.c (delete_breakpoint): Make external.
11513
11514 * target.h (struct target_ops): Add `supports_tracepoints',
11515 `read_pc', and `write_pc' fields.
11516 (target_supports_tracepoints): Define.
11517 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11518 (phex_nz): New.
11519
11520 * regcache.h (struct regcache) <registers_owned>: New field.
11521 (init_register_cache, regcache_cpy): Declare.
11522 (regcache_read_pc, regcache_write_pc): Declare.
11523 (register_cache_size): Declare.
11524 (supply_regblock): Declare.
11525 * regcache.c (init_register_cache): New.
11526 (new_register_cache): Use it.
11527 (regcache_cpy): New.
11528 (register_cache_size): New.
11529 (supply_regblock): New.
11530 (regcache_read_pc, regcache_write_pc): New.
11531
11532 * tracepoint.c: New.
11533
11534 * Makefile.in (OBS): Add tracepoint.o.
11535 (tracepoint.o): New rule.
11536
11537 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11538
11539 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11540 (i386-mmx.o): New.
11541 (i386-mmx.c): Likewise.
11542 (i386-mmx-linux.o): Likewise.
11543 (i386-mmx-linux.c): Likewise.
11544
11545 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11546 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11547 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11548 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11549
11550 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11551 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11552 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11553
11554 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11555
11556 * Makefile.in (clean): Updated.
11557 (i386-avx.o): New.
11558 (i386-avx.c): Likewise.
11559 (i386-avx-linux.o): Likewise.
11560 (i386-avx-linux.c): Likewise.
11561 (amd64-avx.o): Likewise.
11562 (amd64-avx.c): Likewise.
11563 (amd64-avx-linux.o): Likewise.
11564 (amd64-avx-linux.c): Likewise.
11565
11566 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11567 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11568 (srv_amd64_regobj): Add amd64-avx.o.
11569 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11570 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11571 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11572 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11573 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11574 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11575 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11576
11577 * i387-fp.c: Include "i386-xstate.h".
11578 (i387_xsave): New.
11579 (i387_cache_to_xsave): Likewise.
11580 (i387_xsave_to_cache): Likewise.
11581 (x86_xcr0): Likewise.
11582
11583 * i387-fp.h (i387_cache_to_xsave): Likewise.
11584 (i387_xsave_to_cache): Likewise.
11585 (x86_xcr0): Likewise.
11586
11587 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11588 * linux-crisv32-low.c (target_regsets): Likewise.
11589 * linux-m68k-low.c (target_regsets): Likewise.
11590 * linux-mips-low.c (target_regsets): Likewise.
11591 * linux-ppc-low.c (target_regsets): Likewise.
11592 * linux-s390-low.c (target_regsets): Likewise.
11593 * linux-sh-low.c (target_regsets): Likewise.
11594 * linux-sparc-low.c (target_regsets): Likewise.
11595 * linux-xtensa-low.c (target_regsets): Likewise.
11596
11597 * linux-low.c: Include <sys/uio.h>.
11598 (regsets_fetch_inferior_registers): Support nt_type.
11599 (regsets_store_inferior_registers): Likewise.
11600 (linux_process_qsupported): New.
11601 (linux_target_ops): Add linux_process_qsupported.
11602
11603 * linux-low.h (regset_info): Add nt_type.
11604 (linux_target_ops): Add process_qsupported.
11605
11606 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11607 and <sys/uio.h>.
11608 (init_registers_i386_avx_linux): New.
11609 (init_registers_amd64_avx_linux): Likewise.
11610 (xmltarget_i386_linux_no_xml): Likewise.
11611 (xmltarget_amd64_linux_no_xml): Likewise.
11612 (PTRACE_GETREGSET): Likewise.
11613 (PTRACE_SETREGSET): Likewise.
11614 (x86_fill_xstateregset): Likewise.
11615 (x86_store_xstateregset): Likewise.
11616 (use_xml): Likewise.
11617 (x86_linux_update_xmltarget): Likewise.
11618 (x86_linux_process_qsupported): Likewise.
11619 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11620 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11621 init_registers_i386_linux here. Call
11622 x86_linux_update_xmltarget.
11623 (the_low_target): Add x86_linux_process_qsupported.
11624
11625 * server.c (handle_query): Call target_process_qsupported.
11626
11627 * target.h (target_ops): Add process_qsupported.
11628 (target_process_qsupported): New.
11629
11630 2010-04-03 Pedro Alves <pedro@codesourcery.com>
11631
11632 * inferiors.c (add_thread): Set last_status kind to
11633 TARGET_WAITKIND_IGNORE.
11634 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11635 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11636 (linux_wait_1): Move `thread' local definition to block that uses
11637 it. Don't NULL initialize `event_child'.
11638 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11639 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11640 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11641
11642 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11643
11644 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11645 an extended waitstatus, or by a watchpoint.
11646 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11647 thread was stepping or has been stopped by a watchpoint.
11648
11649 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11650
11651 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11652 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11653 of another, then delete the previous, and validate all
11654 breakpoints.
11655 (validate_inserted_breakpoint): New.
11656 (delete_disabled_breakpoints): New.
11657 (validate_breakpoints): New.
11658 (check_mem_read): Validate breakpoints before trusting their
11659 shadow. Delete disabled breakpoints.
11660 (check_mem_write): Validate breakpoints before trusting they
11661 should be inserted. Delete disabled breakpoints.
11662 * mem-break.h (validate_breakpoints):
11663 * server.c (handle_query): Validate breakpoints when we see a
11664 qSymbol query.
11665
11666 2010-04-01 Pedro Alves <pedro@codesourcery.com>
11667
11668 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11669 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11670 if we could tell there's a GDB breakpoint at stop_pc.
11671 (need_step_over_p): Don't do a step over if we find a GDB
11672 breakpoint at the resume PC.
11673
11674 * mem-break.c (struct raw_breakpoint): New.
11675 (enum bkpt_type): New type `gdb_breakpoint'.
11676 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11677 fields. New field `raw'.
11678 (find_raw_breakpoint_at): New.
11679 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11680 breakpoint instead.
11681 (set_breakpoint_at): Adjust.
11682 (delete_raw_breakpoint): New.
11683 (release_breakpoint): New.
11684 (delete_breakpoint): Rename to...
11685 (delete_breakpoint_1): ... this. Add proc parameter. Use
11686 release_breakpoint. Return ENOENT.
11687 (delete_breakpoint): Reimplement.
11688 (find_breakpoint_at): Delete.
11689 (find_gdb_breakpoint_at): New.
11690 (delete_breakpoint_at): Delete.
11691 (set_gdb_breakpoint_at): New.
11692 (delete_gdb_breakpoint_at): New.
11693 (gdb_breakpoint_here): New.
11694 (set_reinsert_breakpoint): Use release_breakpoint.
11695 (uninsert_breakpoint): Rename to ...
11696 (uninsert_raw_breakpoint): ... this.
11697 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11698 (reinsert_raw_breakpoint): Change parameter type to
11699 raw_breakpoint.
11700 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11701 instead.
11702 (check_breakpoints): Adjust. Use release_breakpoint.
11703 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11704 (breakpoint_inserted_here): Ditto.
11705 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11706 Don't trust the breakpoint's shadow if it is not inserted.
11707 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11708 (delete_all_breakpoints): Adjust.
11709 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11710 use delete_breakpoint_1.
11711
11712 * mem-break.h (breakpoints_supported): Delete declaration.
11713 (set_gdb_breakpoint_at): Declare.
11714 (gdb_breakpoint_here): Declare.
11715 (delete_breakpoint_at): Delete.
11716 (delete_gdb_breakpoint_at): Declare.
11717
11718 * server.h (struct raw_breakpoint): Forward declare.
11719 (struct process_info): New field `raw_breakpoints'.
11720
11721 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11722 breakpoints.
11723
11724 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11725
11726 * linux-low.c (status_pending_p_callback): Fix comment.
11727 (linux_wait_for_event_1): Move most of the internal breakpoint
11728 handling from here...
11729 (linux_wait_1): ... to here.
11730 (count_events_callback): New.
11731 (select_singlestep_lwp_callback): New.
11732 (select_event_lwp_callback): New.
11733 (cancel_breakpoints_callback): New.
11734 (select_event_lwp): New.
11735 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11736 priority to all LWPs that have had events that should be reported
11737 to the client. Cancel breakpoints when about to reporting the
11738 event to the client, not while stopping lwps. No longer cancel
11739 finished single-steps here.
11740 (cancel_finished_single_step): Delete.
11741 (cancel_finished_single_steps): Delete.
11742
11743 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11744
11745 * mem-break.c (enum bkpt_type): New.
11746 (struct breakpoint): New field `type'.
11747 (set_breakpoint_at): Change return type to struct breakpoint
11748 pointer. Set type to `other_breakpoint' by default.
11749 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11750 in the breakpoint list.
11751 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11752 (reinsert_breakpoint): Rename to ...
11753 (reinsert_raw_breakpoint): ... this.
11754 (reinsert_breakpoints_at): Adjust.
11755 * mem-break.h (struct breakpoint): Declare.
11756 (set_breakpoint_at): Change return type to struct breakpoint
11757 pointer.
11758
11759 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11760
11761 * server.c (handle_query): Assign, not compare.
11762
11763 2010-03-24 Pedro Alves <pedro@codesourcery.com>
11764
11765 Teach linux gdbserver to step-over-breakpoints.
11766
11767 * linux-low.c (can_hardware_single_step): New.
11768 (supports_breakpoints): New.
11769 (handle_extended_wait): If stopping threads, read the stop pc of
11770 the new cloned LWP.
11771 (get_pc): New.
11772 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11773 low target doesn't support retrieving the PC.
11774 (add_lwp): Set last_resume_kind to resume_continue.
11775 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11776 (linux_attach): Don't clear stop_expected. Set the lwp's
11777 last_resume_kind to resume_stop.
11778 (linux_detach_one_lwp): Don't check for removed breakpoints.
11779 (check_removed_breakpoint): Delete.
11780 (status_pending_p): Rename to ...
11781 (status_pending_p_callback): ... this. Don't check for removed
11782 breakpoints. Don't consider threads that are stopped from GDB's
11783 perspective.
11784 (linux_wait_for_lwp): Always read the stop_pc here.
11785 (cancel_breakpoint): New.
11786 (step_over_bkpt): New global.
11787 (linux_wait_for_event_1): Implement stepping over breakpoints.
11788 (gdb_wants_lwp_stopped): New.
11789 (gdb_wants_all_stopped): New.
11790 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11791 single-step traps here. Store the thread's last reported target
11792 wait status.
11793 (send_sigstop): Don't clear stop_expected. Always set it,
11794 instead.
11795 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11796 (cancel_finished_single_step): New.
11797 (cancel_finished_single_steps): New.
11798 (wait_for_sigstop): Don't cancel finished single-step traps here.
11799 (linux_resume_one_lwp): Don't check for removed breakpoints.
11800 Don't set `step' on non-hardware step archs.
11801 (linux_set_resume_request): Ignore resume_stop requests if already
11802 stopping or stopped. Set the lwp's last_resume_kind.
11803 (resume_status_pending_p): Don't check for removed breakpoints.
11804 (need_step_over_p): New.
11805 (start_step_over): New.
11806 (finish_step_over): New.
11807 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11808 requests. Clear the thread's last reported target waitstatus.
11809 Don't use the `suspended' flag. Don't consider pending breakpoints.
11810 (linux_resume): Start a step-over if necessary.
11811 (proceed_one_lwp): New.
11812 (proceed_all_lwps): New.
11813 (unstop_all_lwps): New.
11814 * linux-low.h (struct lwp_info): Rewrite comment for the
11815 `suspended' flag. Add the `stop_pc' field. Delete the
11816 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11817 Add `'last_resume_kind' and `need_step_over' fields.
11818 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11819 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11820 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11821 (set_raw_breakpoint_at): New.
11822 (set_breakpoint_at): Rewrite to use it.
11823 (reinsert_breakpoint_handler): Delete.
11824 (set_reinsert_breakpoint): New.
11825 (reinsert_breakpoint_by_bp): Delete.
11826 (delete_reinsert_breakpoints): New.
11827 (uninsert_breakpoint): Rewrite.
11828 (uninsert_breakpoints_at): New.
11829 (reinsert_breakpoint): Rewrite.
11830 (reinsert_breakpoints_at): New.
11831 (check_breakpoints): Rewrite.
11832 (breakpoint_here): New.
11833 (breakpoint_inserted_here): New.
11834 (check_mem_read): Adjust.
11835 * mem-break.h (breakpoints_supported, breakpoint_here)
11836 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11837 (reinsert_breakpoint_by_bp): Delete declaration.
11838 (delete_reinsert_breakpoints): Declare.
11839 (reinsert_breakpoint): Delete declaration.
11840 (reinsert_breakpoints_at): Declare.
11841 (uninsert_breakpoint): Delete declaration.
11842 (uninsert_breakpoints_at): Declare.
11843 (check_breakpoints): Adjust prototype.
11844 * server.h: Adjust include order.
11845 (struct thread_info): Declare here. Add a `last_status' field.
11846
11847 2010-03-23 Michael Snyder <msnyder@vmware.com>
11848
11849 * server.c (crc32): New function.
11850 (handle_query): Add handling for 'qCRC:' request.
11851
11852 2010-03-23 Pedro Alves <pedro@codesourcery.com>
11853
11854 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11855 lwp had been stopped by a watchpoint.
11856
11857 2010-03-16 Pedro Alves <pedro@codesourcery.com>
11858
11859 * server.h (internal_error): Declare.
11860 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11861 * utils.c (internal_error): New function.
11862
11863 2010-03-15 Andreas Schwab <schwab@redhat.com>
11864
11865 * configure.srv: Fix typo setting srv_regobj.
11866
11867 2010-03-15 Pedro Alves <pedro@codesourcery.com>
11868
11869 * linux-low.c (fetch_register): Avoid passing a non string literal
11870 format to `error'.
11871 (usr_store_inferior_registers): Ditto.
11872
11873 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11874
11875 * linux-low.c (linux_write_memory): Bail out early if peeking
11876 memory failed.
11877
11878 2010-03-14 Pedro Alves <pedro@codesourcery.com>
11879
11880 * linux-low.h (struct lwp_info): New fields
11881 `stopped_by_watchpoint' and `stopped_data_address'.
11882 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11883 here, and cache them in the lwp object.
11884 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11885 directly.
11886 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11887 field.
11888 (linux_stopped_by_watchpoint): Rewrite.
11889 (linux_stopped_data_address): Rewrite.
11890
11891 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
11892
11893 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11894 switching the current inferior, not before.
11895
11896 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11897
11898 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11899 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11900 i386-linux.c and amd64-linux.c.
11901 (reg-i386.o): Removed.
11902 (reg-i386.c): Likewise.
11903 (reg-i386-linux.o): Likewise.
11904 (reg-i386-linux.c): Likewise.
11905 (reg-x86-64.o): Likewise.
11906 (reg-x86-64.c): Likewise.
11907 (reg-x86-64-linux.o): Likewise.
11908 (reg-x86-64-linux.c): Likewise.
11909 (i386.o): New.
11910 (i386.c): Likewise.
11911 (i386-linux.o): Likewise.
11912 (i386-linux.c): Likewise.
11913 (amd64.o): Likewise.
11914 (amd64.c): Likewise.
11915 (amd64-linux.o): Likewise.
11916 (amd64-linux.c): Likewise.
11917
11918 * configure.srv (srv_i386_regobj): New.
11919 (srv_i386_linux_regobj): Likewise.
11920 (srv_amd64_regobj): Likewise.
11921 (srv_amd64_linux_regobj): Likewise.
11922 (srv_i386_32bit_xmlfiles): Likewise.
11923 (srv_i386_64bit_xmlfiles): Likewise.
11924 (srv_i386_xmlfiles): Likewise.
11925 (srv_amd64_xmlfiles): Likewise.
11926 (srv_i386_linux_xmlfiles): Likewise.
11927 (srv_amd64_linux_xmlfiles): Likewise.
11928 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11929 srv_xmlfiles to $srv_i386_xmlfiles.
11930 (i[34567]86-*-mingw32ce*): Likewise.
11931 (i[34567]86-*-mingw*): Likewise.
11932 (i[34567]86-*-nto*): Likewise.
11933 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11934 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11935 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11936 (x86_64-*-linux*): Likewise.
11937
11938 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11939 (init_registers_amd64_linux): New.
11940 (x86_arch_setup): Replace init_registers_x86_64_linux with
11941 init_registers_amd64_linux.
11942
11943 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11944
11945 * configure.ac: Check for libdl. If it is not available link against
11946 static libthread_db.
11947 * configure: Regenerate.
11948
11949 2010-02-22 Pedro Alves <pedro@codesourcery.com>
11950
11951 PR9605
11952
11953 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11954 handing a read watchpoint.
11955 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11956
11957 2010-02-12 Doug Evans <dje@google.com>
11958
11959 * linux-low.c (linux_supports_tracefork_flag): Document.
11960 (linux_look_up_symbols): Add comment.
11961
11962 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
11963
11964 * regcache.c (supply_register): Clear regcache if buf is NULL.
11965
11966 2010-02-02 Nicolas Roche <roche@sourceware.org>
11967 Joel Brobecker <brobecker@adacore.com>
11968
11969 * inferiors.c (find_inferior): Add function documentation.
11970 (unloaded_dll): Handle the case where the unloaded dll has not
11971 been previously registered in the dll list.
11972
11973 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11974
11975 * linux-arm-low.c (thumb_breakpoint_len): Delete.
11976 (thumb2_breakpoint): New.
11977 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11978
11979 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11980
11981 * linux-low.c (get_stop_pc): Check for SIGTRAP.
11982 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11983 breakpoints.
11984
11985 2010-01-21 Pedro Alves <pedro@codesourcery.com>
11986
11987 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11988
11989 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
11990
11991 * linux-s390-low.c (s390_collect_ptrace_register)
11992 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11993
11994 2010-01-21 Doug Evans <dje@google.com>
11995
11996 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11997 (PTRACE_ARG4_TYPE): New macro.
11998 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11999 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12000 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12001 (usr_store_inferior_registers): Ditto.
12002 (linux_read_memory, linux_write_memory): Ditto.
12003 (linux_test_for_tracefork): Ditto.
12004
12005 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12006 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12007
12008 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12009
12010 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12011 target.
12012
12013 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12014
12015 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12016 prototype to take a regcache. Adjust.
12017
12018 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12019
12020 * regcache.h (struct thread_info): Forward declare.
12021 (struct regcache): New.
12022 (new_register_cache): Adjust prototype.
12023 (get_thread_regcache): Declare.
12024 (free_register_cache): Adjust prototype.
12025 (registers_to_string, registers_from_string): Ditto.
12026 (supply_register, supply_register_by_name, collect_register)
12027 (collect_register_as_string, collect_register_by_name): Ditto.
12028 * regcache.c (struct inferior_regcache_data): Delete.
12029 (get_regcache): Rename to ...
12030 (get_thread_regcache): ... this. Adjust. Switch inferior before
12031 fetching registers.
12032 (regcache_invalidate_one): Adjust.
12033 (regcache_invalidate): Fix prototype.
12034 (new_register_cache): Return the new register cache.
12035 (free_register_cache): Change prototype.
12036 (realloc_register_cache): Adjust.
12037 (registers_to_string): Change prototype to take a regcache. Adjust.
12038 (registers_from_string): Ditto.
12039 (register_data): Ditto.
12040 (supply_register): Ditto.
12041 (supply_register_by_name): Ditto.
12042 (collect_register): Ditto.
12043 (collect_register_as_string): Ditto.
12044 (collect_register_by_name): Ditto.
12045 * server.c (process_serial_event): Adjust.
12046 * linux-low.h (regset_fill_func, regset_store_func): Change
12047 prototype.
12048 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12049 Change prototype.
12050 * linux-low.c (get_stop_pc): Adjust.
12051 (check_removed_breakpoint): Adjust.
12052 (linux_wait_for_event): Adjust.
12053 (linux_resume_one_lwp): Adjust.
12054 (fetch_register): Add regcache parameter. Adjust.
12055 (usr_store_inferior_registers): Ditto.
12056 (regsets_fetch_inferior_registers): Ditto.
12057 (regsets_store_inferior_registers): Ditto.
12058 (linux_fetch_registers, linux_store_registers): Ditto.
12059 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12060 regcache. Adjust.
12061 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12062 Ditto.
12063 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12064 prototype to take a regcache.
12065 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12066 * remote-utils.c (convert_ascii_to_int, outreg)
12067 (prepare_resume_reply): Change prototype to take a regcache.
12068 Adjust.
12069 * target.h (struct target_ops) <fetch_registers, store_registers>:
12070 Change prototype to take a regcache.
12071 (fetch_inferior_registers, store_inferior_registers): Change
12072 prototype to take a regcache. Adjust.
12073 * proc-service.c (ps_lgetregs): Adjust.
12074 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12075 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12076 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12077 take a regcache. Adjust.
12078 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12079 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12080 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12081 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12082 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12083 (cris_cannot_fetch_register):
12084 (cris_breakpoint_at): Change prototype to take a regcache.
12085 Adjust.
12086 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12087 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12088 to take a regcache. Adjust.
12089 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12090 Adjust.
12091 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12092 take a regcache. Adjust.
12093 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12094 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12095 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12096 * linux-mips-low.c (mips_get_pc):
12097 (mips_set_pc): Change prototype to take a regcache. Adjust.
12098 (mips_reinsert_addr): Adjust.
12099 (mips_collect_register): Change prototype to take a regcache.
12100 Adjust.
12101 (mips_supply_register):
12102 (mips_collect_register_32bit, mips_supply_register_32bit)
12103 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12104 (mips_store_fpregset): Ditto.
12105 * linux-ppc-low.c (ppc_supply_ptrace_register)
12106 (ppc_supply_ptrace_register): Ditto.
12107 (parse_spufs_run): Adjust.
12108 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12109 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12110 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12111 take a regcache. Adjust.
12112 * linux-s390-low.c (s390_collect_ptrace_register)
12113 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12114 (s390_set_pc): Change prototype to take a regcache. Adjust.
12115 (s390_arch_setup): Adjust.
12116 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12117 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12118 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12119 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12120 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12121 regcache. Adjust.
12122 (sparc_breakpoint_at): Adjust.
12123 * linux-xtensa-low.c (xtensa_fill_gregset):
12124 (xtensa_store_gregset):
12125 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12126 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12127 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12128 prototype to take a regcache. Adjust.
12129 * win32-arm-low.c (arm_fetch_inferior_register)
12130 (arm_store_inferior_register): Change prototype to take a
12131 regcache. Adjust.
12132 * win32-i386-low.c (i386_fetch_inferior_register)
12133 (i386_store_inferior_register): Change prototype to take a
12134 regcache. Adjust.
12135 * win32-low.c (child_fetch_inferior_registers)
12136 (child_store_inferior_registers): Change prototype to take a
12137 regcache. Adjust.
12138 (win32_wait): Adjust.
12139 (win32_fetch_inferior_registers): Change prototype to take a
12140 regcache. Adjust.
12141 (win32_store_inferior_registers): Adjust.
12142 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12143 store_inferior_register>: Change prototype to take a regcache.
12144
12145 2010-01-20 Doug Evans <dje@google.com>
12146
12147 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12148 #ifdef.
12149 (linux_wait_for_event1, linux_init_signals): Ditto.
12150 (W_STOPCODE): Provide definition if missing.
12151
12152 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12153
12154 * linux-low.c (linux_core_of_thread): New.
12155 (compare_ints, show_process, list_threads): New.
12156 (linux_qxfer_osdata): Report threads and cores.
12157 (linux_target_op): Register linux_core_of_thread.
12158 * remote-utils.c (prepare_resume_reply): Report the core.
12159 (buffer_xml_printf): Support %d specifier.
12160 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12161 New.
12162 (handle_query): Handle qXfer:threads. Announce availability
12163 thereof.
12164 * target.h (struct target_ops): New field core_of_thread.
12165
12166 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12167
12168 * Makefile.in (clean): Remove new generated files.
12169 (reg-s390.o, reg-s390.c): Remove rules.
12170 (reg-s390x.o, reg-s390x.c): Likewise.
12171 (s390-linux32.o, s390-linux32.c): Add rules.
12172 (s390-linux64.o, s390-linux64.c): Likewise.
12173 (s390x-linux64.o, s390x-linux64.c): Likewise.
12174 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12175 * linux-s390-low.c: Include <elf.h>.
12176 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12177 (init_registers_s390): Remove prototype.
12178 (init_registers_s390x): Likewise.
12179 (init_registers_s390_linux32): Add prototype.
12180 (init_registers_s390_linux64): Likewise.
12181 (init_registers_s390x_linux64): Likewise.
12182 (s390_num_regs_3264): New define.
12183 (s390_regmap_3264): New global variable.
12184 (s390_cannot_fetch_register): Remove obsolete check.
12185 (s390_cannot_store_register): Likewise.
12186 (s390_collect_ptrace_register): Handle upper/lower register halves.
12187 (s390_supply_ptrace_register): Likewise.
12188 (s390_fill_gregset): Update to register number changes.
12189 (s390_get_hwcap): New routine.
12190 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12191 Install appropriate regmap and register set.
12192
12193 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12194
12195 * server.c (gdbserver_version): Update copyright year to 2010.
12196 * gdbreplay.c (gdbreplay_version): Likewise.
12197
12198 2009-12-28 Doug Evans <dje@google.com>
12199
12200 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12201 elf/external.h. Include <elf.h> instead but only if necessary.
12202
12203 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12204
12205 * linux-low.c (linux_remove_process): Remove `detaching'
12206 parameter. Don't release/detach from thread_db here.
12207 (linux_kill): Release/detach from thread_db here, ...
12208 (linux_detach): ... and here, before actually detaching.
12209 (linux_wait_1): ... and here, when a process exits.
12210 * thread-db.c (any_thread_of): New.
12211 (thread_db_free): Switch the current inferior to a thread of the
12212 passed in process.
12213
12214 2009-12-21 Doug Evans <dje@google.com>
12215
12216 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12217
12218 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12219 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12220 warning ifndef __NR_tkill. Move setting of errno there too.
12221 Delete unnecessary resetting of errno after syscall.
12222 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12223
12224 * configure.ac: Check for dladdr.
12225 * config.in: Regenerate.
12226 * configure: Regenerate.
12227 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12228 (try_thread_db_load): Update.
12229
12230 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12231
12232 2009-12-18 Doug Evans <dje@google.com>
12233
12234 * event-loop.c: Include unistd.h if it exists.
12235
12236 * linux-low.c (my_waitpid): Move definition away from being in
12237 between linux_tracefork_child/linux_test_for_tracefork.
12238
12239 * gdb_proc_service.h (psaddr_t): Fix type.
12240 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12241 signature to match glibc.
12242
12243 2009-12-16 Doug Evans <dje@google.com>
12244
12245 * linux-low.c (linux_read_memory): Fix argument to read.
12246
12247 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12248
12249 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12250 events, don't leave current_inferior pointing at null.
12251
12252 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12253
12254 * win32-low.c (LOG): Delete.
12255 (OUTMSG): Output to stderr.
12256 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12257 on compile time LOG macro.
12258 (win32_wait): Fix debug output.
12259
12260 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12261
12262 * win32-low.c (win32_add_one_solib): If the dll name is
12263 "ntdll.dll", prepend the system directory to the dll path.
12264
12265 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12266
12267 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12268
12269 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12270 Vladimir Prus <vladimir@codesourcery.com>
12271
12272 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12273 * configure.ac: Check for __mcoldfire__ and set
12274 gdb_cv_m68k_is_coldfire.
12275 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12276 reg-cf.o and reg-m68k.o.
12277 * configure: Regenerated.
12278
12279 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12280
12281 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12282 Pass it to thread_db_free.
12283 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12284 proper `detaching' argument to linux_remove_process.
12285 * linux-low.h (thread_db_free): Add `detaching' parameter.
12286 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12287 to thread_db_free.
12288 (thread_db_free): Add `detaching' parameter. Only
12289 call td_ta_clear_event if detaching from process.
12290
12291 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12292
12293 * thread-db.c (thread_db_free): Fix typo.
12294
12295 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12296
12297 PR gdb/10838
12298 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12299
12300 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12301
12302 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12303 with an i686 compiler.
12304 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12305 needed.
12306 * configure: Rebuilt.
12307
12308 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12309
12310 PR gdb/10783
12311
12312 * server.c (handle_search_memory_1): Correct read_addr initialization
12313 in loop for searching subsequent chunks.
12314
12315 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12316
12317 * configure.ac: New --with-libthread-db option.
12318 * thread-db.c: Allow direct dependence on libthread_db.
12319 (thread_db_free): Adjust.
12320 * config.in: Regenerate.
12321 * configure: Likewise.
12322
12323 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12324
12325 PR gdb/10757
12326 * thread-db.c (attach_thread): New function.
12327 (maybe_attach_thread): Return success/failure.
12328 (find_new_threads_callback): Adjust.
12329 (thread_db_find_new_threads): Loop until no new threads.
12330
12331 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12332
12333 * proc-service.c (ps_lgetregs): Formatting.
12334
12335 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12336
12337 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12338 * configure.ac: Adjust.
12339 * linux-low.h (struct process_info_private): Move members to struct
12340 thread_db.
12341 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12342 * linux-low.c (linux_remove_process): Adjust.
12343 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12344 * server.c (handle_query): Move code ...
12345 (handle_monitor_command): ... here. New function.
12346 * target.h (struct target_ops): New member.
12347 * thread-db.c (struct thread_db): New.
12348 (libthread_db_search_path): New variable.
12349 (thread_db_create_event, thread_db_enable_reporting)
12350 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12351 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12352 (try_thread_db_load_1, dladdr_to_soname): New functions.
12353 (try_thread_db_load, thread_db_load_search): New functions.
12354 (thread_db_init): Search for libthread_db.
12355 (thread_db_free): New function.
12356 (thread_db_handle_monitor_command): Likewise.
12357 * config.in: Regenerate.
12358 * configure: Regenerate.
12359
12360 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12361
12362 * spu-low.c (spu_kill): Wait for inferior to terminate.
12363 Call clear_inferiors.
12364 (spu_detach): Call clear_inferiors.
12365
12366 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12367
12368 * aclocal.m4: Regenerate.
12369 * config.in: Likewise.
12370 * configure: Likewise.
12371
12372 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12373
12374 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12375 (parse_spufs_run): New function.
12376 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12377 (ppc_breakpoint_at): Handle SPU breakpoints.
12378
12379 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12380
12381 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12382 (SPUFS_MAGIC): Define.
12383 (spu_enumerate_spu_ids): New function.
12384 (linux_qxfer_spu): New function.
12385 (linux_target_ops): Install linux_qxfer_spu.
12386
12387 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12388
12389 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12390 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12391 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12392 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12393 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12394 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12395 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12396 (init_registers_powerpc_cell32l): Add prototype.
12397 (init_registers_powerpc_cell64l): Likewise.
12398 (ppc_arch_setup): Detect Cell/B.E. architecture.
12399
12400 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12401
12402 * Makefile.in (datarootdir): New variable.
12403
12404 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12405
12406 * linux-low.c (linux_write_memory): Update debugging output.
12407 * Makefile.in (clean): Add new descriptions.
12408 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12409 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12410 * configure.srv: Add new files for arm*-*-linux*.
12411 * linux-arm-low.c: Add new declarations.
12412 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12413 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12414 (HWCAP_VFPv3D16): New.
12415 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12416 instead of __IWMMXT__.
12417 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12418 (arm_arch_setup): New.
12419 (target_regsets): Remove #ifdef. Add VFP regset.
12420 (the_low_target): Use arm_arch_setup.
12421
12422 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12423
12424 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12425 the main thread again.
12426
12427 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12428
12429 Adding Neutrino gdbserver.
12430 * configure: Regenerated.
12431 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12432 * configure.srv (i[34567]86-*-nto*): New target.
12433 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12434 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12435 (nto_comctrl) [__QNX__]: New function.
12436 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12437
12438 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
12439
12440 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12441 srv_tgtobj.
12442
12443 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12444 Pedro Alves <pedro@codesourcery.com>
12445
12446 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12447 don't support CONTEXT_EXTENDED_REGISTERS.
12448 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12449 (the_low_target): Install them.
12450 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12451 failing with ERROR_PIPE_NOT_CONNECTED.
12452
12453 2009-06-30 Doug Evans <dje@google.com>
12454 Pierre Muller <muller@ics.u-strasbg.fr>
12455
12456 Add h/w watchpoint support to x86-linux, win32-i386.
12457 * Makefile.in (SFILES): Add i386-low.c
12458 (i386_low_h): Define.
12459 (i386-low.o): Add dependencies.
12460 (linux-x86-low.o): Add i386-low.h dependency.
12461 (win32-i386-low.o): Ditto.
12462 * i386-low.c: New file.
12463 * i386-low.h: New file.
12464 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12465 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12466 * linux-low.c (linux_add_process): Initialize arch_private.
12467 (linux_remove_process): Free arch_private.
12468 (add_lwp): Initialize arch_private.
12469 (delete_lwp): Free arch_private.
12470 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12471 provided.
12472 * linux-low.h (process_info_private): New member arch_private.
12473 (lwp_info): New member arch_private.
12474 (linux_target_ops): New members new_process, new_thread,
12475 prepare_to_resume.
12476 (ptid_of): New macro.
12477 * linux-x86-low.c: Include stddef.h, i386-low.h.
12478 (arch_process_info): New struct.
12479 (arch_lwp_info): New struct.
12480 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12481 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12482 (i386_dr_low_get_status): New function.
12483 (x86_insert_point, x86_remove_point): New functions.
12484 (x86_stopped_by_watchpoint): New function.
12485 (x86_stopped_data_address): New function.
12486 (x86_linux_new_process, x86_linux_new_thread): New functions.
12487 (x86_linux_prepare_to_resume): New function.
12488 (the_low_target): Add entries for insert_point, remove_point,
12489 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12490 prepare_to_resume.
12491 * server.c (debug_hw_points): New global.
12492 (monitor_show_help): Document set debug-hw-points.
12493 (handle_query): Process "set debug-hw-points".
12494 * server.h (debug_hw_points): Declare.
12495 (paddress): Declare.
12496 * utils.c (NUMCELLS, CELLSIZE): New macros.
12497 (get_sell, xsnprintf, paddress): New functions.
12498 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12499 remove_point, stopped_by_watchpoint, stopped_data_address.
12500 * win32-i386-low.c: Include i386-low.h.
12501 (debug_reg_state): Replaces dr.
12502 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12503 (i386_dr_low_get_status): New function.
12504 (i386_insert_point, i386_remove_point): New functions.
12505 (i386_stopped_by_watchpoint): New function.
12506 (i386_stopped_data_address): New function.
12507 (i386_initial_stuff): Update.
12508 (get_thread_context,set_thread_context,i386_thread_added): Update.
12509 (the_low_target): Add entries for insert_point,
12510 remove_point, stopped_by_watchpoint, stopped_data_address.
12511 * win32-low.c (win32_insert_watchpoint): New function.
12512 (win32_remove_watchpoint): New function.
12513 (win32_stopped_by_watchpoint): New function.
12514 (win32_stopped_data_address): New function.
12515 (win32_target_ops): Add entries for insert_watchpoint,
12516 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12517 * win32-low.h (win32_target_ops): New members insert_point,
12518 remove_point, stopped_by_watchpoint, stopped_data_address.
12519
12520 2009-06-25 Pedro Alves <pedro@codesourcery.com>
12521
12522 * server.c (process_serial_event): Re-return unsupported, not
12523 error, if the type isn't recognized. Re-allow supporting only
12524 insert or remove packets. Also call require_running for
12525 breakpoints. Add missing break statement to default case. Tidy.
12526 * target.h (struct target_ops): Rename insert_watchpoint to
12527 insert_point, and remove_watchpoint to remove_point.
12528
12529 * linux-low.h (struct linux_target_ops): Likewise.
12530 * linux-low.c (linux_insert_watchpoint): Rename to ...
12531 (linux_insert_point): ... this. Adjust.
12532 (linux_remove_watchpoint): Rename to ...
12533 (linux_remove_point): ... this. Adjust.
12534 (linux_target_ops): Adjust.
12535 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12536 (cris_insert_point): ... this.
12537 (cris_remove_watchpoint): Rename to ...
12538 (cris_remove_point): ... this.
12539 (the_low_target): Adjust.
12540
12541 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12542
12543 * server.c (handle_v_kill): Pass signal_pid to
12544 kill_inferior if multi_process is zero.
12545
12546 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12547
12548 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12549 * target.h (target_ops): Comment for *_watchpoint to make it clear
12550 the functions can get types '0' and '1'.
12551
12552 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12553
12554 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12555 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12556 * regcache.c (get_regcache): Likewise.
12557 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12558 * win32-low.c (child_fetch_inferior_registers): Remove check for
12559 regno 0.
12560
12561 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12562 Pedro Alves <pedro@codesourcery.com>
12563
12564 * target.h (struct target_ops) <supports_multi_process>: New
12565 callback.
12566 (target_supports_multi_process): New.
12567 * server.c (handle_query): Even if GDB reports support, only
12568 enable multi-process if the target also supports it. Report
12569 multi-process support only if the target backend supports it.
12570 * linux-low.c (linux_supports_multi_process): New function.
12571 (linux_target_ops): Install it as target_supports_multi_process
12572 callback.
12573
12574 2009-05-24 Doug Evans <dje@google.com>
12575
12576 Global renaming of find_thread_pid to find_thread_ptid.
12577 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12578 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12579 All callers updated.
12580
12581 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12582 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12583 directly.
12584
12585 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12586 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12587 (linux_resume_one_lwp): Ditto.
12588
12589 2009-05-23 Doug Evans <dje@google.com>
12590
12591 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12592 from struct inferior_list_entry * to struct lwp_info *.
12593 All callers updated.
12594
12595 2009-05-13 Doug Evans <dje@google.com>
12596
12597 * linux-x86-low.c: Don't include assert.h.
12598 (x86_siginfo_fixup): Use fatal, not assert.
12599 (x86_arch_setup): Fix comment.
12600
12601 2009-05-12 Doug Evans <dje@google.com>
12602
12603 Biarch support for i386/amd64 gdbserver.
12604 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12605 Add linux-x86-low.c.
12606 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12607 (linux-x86-low.o): Add.
12608 * linux-x86-64-low.c: Delete.
12609 * linux-i386-low.c: Delete.
12610 * linux-x86-low.c: New file.
12611 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12612 linux-x86-low.o.
12613 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12614 linux-x86-low.o.
12615 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12616 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12617 (linux_child_pid_to_exec_file): New function.
12618 (elf_64_header_p, elf_64_file_p): New functions.
12619 (siginfo_fixup): New function.
12620 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12621 give target a chance to convert layout.
12622 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12623 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12624
12625 2009-05-07 Doug Evans <dje@google.com>
12626
12627 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12628 (regsets_store_inferior_registers): Ditto.
12629
12630 2009-05-06 Pedro Alves <pedro@codesourcery.com>
12631
12632 PR server/10048
12633
12634 * linux-low.c (must_set_ptrace_flags): Delete.
12635 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12636 of the global.
12637 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12638 `lwp->must_set_ptrace_flags' instead.
12639 (linux_wait_for_event_1): Set ptrace options here.
12640 (linux_wait_1): ... not here.
12641
12642 2009-04-30 Doug Evans <dje@google.com>
12643
12644 * inferiors.c (started_inferior_callback): New function.
12645 (attached_inferior_callback): New function.
12646 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12647 * server.c (print_started_pid, print_attached_pid): New functions.
12648 (detach_or_kill_for_exit): New function.
12649 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12650 * server.h (have_started_inferiors_p): Declare.
12651 (have_attached_inferiors_p): Declare.
12652
12653 * inferiors.c (remove_process): Fix memory leak, free process.
12654 * linux-low.c (linux_remove_process): New function.
12655 (linux_kill): Call it instead of remove_process.
12656 (linux_detach, linux_wait_1): Ditto.
12657
12658 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12659
12660 * configure.srv: Add x86 Windows CE target.
12661
12662 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12663
12664 * inferiors.c (get_thread_process): Make global.
12665 * server.h (get_thread_process): Add prototype.
12666 * thread-db.c (find_one_thread): Use get_thread_process
12667 instead of current_process.
12668 (thread_db_get_tls_address): Do not crash if called when
12669 thread layer is not yet initialized.
12670
12671 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12672
12673 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12674 * spu-low.c (current_tid): Rename to ...
12675 (current_ptid): ... this.
12676 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12677 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12678 ptid_get_lwp (current_ptid) instead of current_tid.
12679 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12680 instead of current_tid. Use find_process_pid to verify pid
12681 argument is valid. Pass proper argument to remove_process.
12682 (spu_thread_alive): Compare current_ptid instead of current_tid.
12683 (spu_resume): Likewise.
12684
12685 2009-04-02 Pedro Alves <pedro@codesourcery.com>
12686
12687 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12688 variable.
12689
12690 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12691
12692 Implement the multiprocess extensions, and add linux multiprocess
12693 support.
12694
12695 * server.h (ULONGEST): Declare.
12696 (struct ptid, ptid_t): New.
12697 (minus_one_ptid, null_ptid): Declare.
12698 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12699 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12700 (struct inferior_list_entry): Change `id' type from unsigned from
12701 to ptid_t.
12702 (struct sym_cache, struct breakpoint, struct
12703 process_info_private): Forward declare.
12704 (struct process_info): Declare.
12705 (current_process): Declare.
12706 (all_processes): Declare.
12707 (initialize_inferiors): Declare.
12708 (add_thread): Adjust to use ptid_t.
12709 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12710 (add_process, remove_process, find_thread_pid): Declare.
12711 (find_inferior_id): Adjust to use ptid_t.
12712 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12713 (multi_process): Declare.
12714 (push_event): Adjust to use ptid_t.
12715 (read_ptid, write_ptid): Declare.
12716 (prepare_resume_reply): Adjust to use ptid_t.
12717 (clear_symbol_cache): Declare.
12718 * inferiors.c (all_processes): New.
12719 (null_ptid, minus_one_ptid): New.
12720 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12721 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12722 (add_thread): Change unsigned long to ptid. Remove gdb_id
12723 parameter. Adjust.
12724 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12725 (gdb_id_to_thread): Rename to ...
12726 (find_thread_pid): ... this. Change unsigned long to ptid.
12727 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12728 (loaded_dll, pull_pid_from_list): Adjust.
12729 (add_process, remove_process, find_process_pid)
12730 (get_thread_process, current_process, initialize_inferiors): New.
12731 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12732 (struct target_waitstatus) <related_pid>: Ditto.
12733 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12734 return type to int.
12735 (struct target_ops) <join>: Add `pid' argument.
12736 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12737 (struct target_ops) <wait>: Add `ptid' field. Change return type
12738 to ptid.
12739 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12740 (mywait): Add `ptid' argument. Change return type to ptid_t.
12741 (target_pid_to_str): Declare.
12742 * target.c (set_desired_inferior): Adjust to use ptids.
12743 (mywait): Add new `ptid' argument. Adjust.
12744 (target_pid_to_str): New.
12745 * mem-break.h (free_all_breakpoints): Declare.
12746 * mem-break.c (breakpoints): Delelete.
12747 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12748 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12749 to use per-process breakpoint list.
12750 (free_all_breakpoints): New.
12751 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12752 (symbol_cache, all_symbols_looked_up): Delete.
12753 (hexchars): New.
12754 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12755 read_ptid): New.
12756 (prepare_resume_reply): Change ptid argument's type from unsigned
12757 long to ptid_t. Adjust. Implement W;process and X;process.
12758 (free_sym_cache, clear_symbol_cache): New.
12759 (look_up_one_symbol): Adjust to per-process symbol cache. *
12760 * server.c (cont_thread, general_thread, step_thread): Change type
12761 to ptid_t.
12762 (attached): Delete.
12763 (multi_process): New.
12764 (last_ptid): Change type to ptid_t.
12765 (struct vstop_notif) <ptid>: Change type to ptid_t.
12766 (queue_stop_reply, push_event): Change `ptid' argument's type to
12767 ptid_t.
12768 (discard_queued_stop_replies): Add `pid' argument.
12769 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12770 changes. Don't reference the `attached' global.
12771 (attach_inferior): Adjust to mywait interface changes.
12772 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12773 features. Handle and report "multiprocess+". Handle
12774 "qAttached:PID".
12775 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12776 changes.
12777 (handle_v_kill): New.
12778 (handle_v_stopped): Adjust to use target_pid_to_str.
12779 (handle_v_requests): Allow multiple attaches and runs when
12780 multiprocess extensions are in effect. Handle "vKill".
12781 (myresume): Adjust to use ptids.
12782 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12783 (handle_status): Adjust to discard_queued_stop_replies interface
12784 change.
12785 (first_thread_of, kill_inferior_callback)
12786 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12787 (main): Call initialize_inferiors. Adjust to use ptids, killing
12788 and detaching from all inferiors. Handle multiprocess packet
12789 variants.
12790 * linux-low.h: Include gdb_proc_service.h.
12791 (struct process_info_private): New.
12792 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12793 <lwpid_of>: Use ptid_get_lwp.
12794 (get_lwp_thread): Adjust.
12795 (struct lwp_info): Add `dead' member.
12796 (find_lwp_pid): Declare.
12797 * linux-low.c (thread_db_active): Delete.
12798 (new_inferior): Adjust comment.
12799 (inferior_pid): Delete.
12800 (linux_add_process): New.
12801 (handle_extended_wait): Adjust.
12802 (add_lwp): Change unsigned long to ptid.
12803 (linux_create_inferior): Add process to processes table. Adjust
12804 to use ptids. Don't set new_inferior here.
12805 (linux_attach_lwp): Rename to ...
12806 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12807 it. Adjust to use ptids.
12808 (linux_attach_lwp): New.
12809 (linux_attach): Add process to processes table. Don't set
12810 new_inferior here.
12811 (struct counter): New.
12812 (second_thread_of_pid_p, last_thread_of_process_p): New.
12813 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12814 multiple processes.
12815 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12816 processes. Remove process from process table.
12817 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12818 to multiple processes.
12819 (any_thread_of): New.
12820 (linux_detach): Add `pid' argument, and handle it. Remove process
12821 from processes table.
12822 (linux_join): Add `pid' argument. Handle it.
12823 (linux_thread_alive): Change unsighed long argument to ptid_t.
12824 Consider dead lwps as not being alive.
12825 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12826 threads we're not interested in.
12827 (same_lwp, find_lwp_pid): New.
12828 (linux_wait_for_lwp): Change `pid' argument's type from int to
12829 ptid_t. Adjust.
12830 (linux_wait_for_event): Rename to ...
12831 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12832 from int to ptid_t. Adjust.
12833 (linux_wait_for_event): New.
12834 (linux_wait_1): Add `ptid' argument. Change return type to
12835 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12836 that exit from the process table.
12837 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12838 Adjust.
12839 (mark_lwp_dead): New.
12840 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12841 stopping all threads, mark its main lwp as dead.
12842 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12843 ptids.
12844 (fetch_register, usr_store_inferior_registers)
12845 (regsets_fetch_inferior_registers)
12846 (regsets_store_inferior_registers, linux_read_memory)
12847 (linux_write_memory): Inline `inferior_pid'.
12848 (linux_look_up_symbols): Adjust to use per-process
12849 `thread_db_active'.
12850 (linux_request_interrupt): Adjust to use ptids.
12851 (linux_read_auxv): Inline `inferior_pid'.
12852 (initialize_low): Don't reference thread_db_active.
12853 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12854 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12855 (ps_getpid): Return the pid of the current inferior.
12856 * thread-db.c (proc_handle, thread_agent): Delete.
12857 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12858 per-process data.
12859 (find_one_thread): Change argument type to ptid_t. Adjust to
12860 per-process data.
12861 (maybe_attach_thread): Adjust to per-process data and ptids.
12862 (thread_db_find_new_threads): Ditto.
12863 (thread_db_init): Ditto.
12864 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12865 processes table. Adjust to use ptids.
12866 (spu_kill, spu_detach): Adjust interface. Remove process from
12867 processes table.
12868 (spu_join, spu_thread_alive): Adjust interface.
12869 (spu_wait): Adjust interface. Remove process from processes
12870 table. Adjust to use ptids.
12871 * win32-low.c (current_inferior_tid): Delete.
12872 (current_inferior_ptid): New.
12873 (debug_event_ptid): New.
12874 (thread_rec): Take a ptid. Adjust.
12875 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12876 (child_delete_thread): Ditto.
12877 (do_initial_child_stuff): Add `attached' argument. Add process to
12878 processes table.
12879 (child_fetch_inferior_registers, child_store_inferior_registers):
12880 Adjust.
12881 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12882 (win32_attach): Pass 1 to do_initial_child_stuff.
12883 (win32_kill): Adjust interface. Remove process from processes
12884 table.
12885 (win32_detach): Ditto.
12886 (win32_join): Adjust interface.
12887 (win32_thread_alive): Take a ptid.
12888 (win32_resume): Adjust to use ptids.
12889 (get_child_debug_event): Ditto.
12890 (win32_wait): Adjust interface. Remove exiting process from
12891 processes table.
12892
12893 2009-04-01 Pedro Alves <pedro@codesourcery.com>
12894
12895 Non-stop mode support.
12896
12897 * server.h (non_stop): Declare.
12898 (gdb_client_data, handler_func): Declare.
12899 (delete_file_handler, add_file_handler, start_event_loop):
12900 Declare.
12901 (handle_serial_event, handle_target_event, push_event)
12902 (putpkt_notif): Declare.
12903 * target.h (enum resume_kind): New.
12904 (struct thread_resume): Replace `step' field by `kind' field.
12905 (TARGET_WNOHANG): Define.
12906 (struct target_ops) <wait>: Add `options' argument.
12907 <supports_non_stop, async, start_non_stop>: New fields.
12908 (target_supports_non_stop, target_async): New.
12909 (start_non_stop): Declare.
12910 (mywait): Add `options' argument.
12911 * target.c (mywait): Add `options' argument. Print child exit
12912 notifications here.
12913 (start_non_stop): New.
12914 * server.c (non_stop, own_buf, mem_buf): New globals.
12915 (struct vstop_notif): New.
12916 (notif_queue): New global.
12917 (queue_stop_reply, push_event, discard_queued_stop_replies)
12918 (send_next_stop_reply): New.
12919 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12920 interface changes.
12921 (attach_inferior): In non-stop mode, don't wait for the target
12922 here.
12923 (handle_general_set): Handle QNonStop.
12924 (handle_query): When handling qC, return the current general
12925 thread, instead of the first thread of the list.
12926 (handle_query): If the backend supports non-stop mode, include
12927 QNonStop+ in the qSupported query response.
12928 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12929 and non-stop mode.
12930 (handle_v_attach, handle_v_run): Handle non-stop mode.
12931 (handle_v_stopped): New.
12932 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12933 (myresume): Adjust to use resume_kind. Handle non-stop.
12934 (queue_stop_reply_callback): New.
12935 (handle_status): Handle non-stop mode.
12936 (main): Clear non_stop flag on reconnection. Use the event-loop.
12937 Refactor serial protocol handling from here ...
12938 (process_serial_event): ... to this new function. When GDB
12939 selects any thread, select one here. In non-stop mode, wait until
12940 GDB acks all pending events before exiting.
12941 (handle_serial_event, handle_target_event): New.
12942 * remote-utils.c (remote_open): Install remote_desc in the event
12943 loop.
12944 (remote_close): Remove remote_desc from the event loop.
12945 (putpkt_binary): Rename to...
12946 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12947 (putpkt_binary): New as wrapper around putpkt_binary_1.
12948 (putpkt_notif): New.
12949 (prepare_resume_reply): In non-stop mode, don't change the
12950 general_thread.
12951 * event-loop.c: New.
12952 * Makefile.in (OBJ): Add event-loop.o.
12953 (event-loop.o): New rule.
12954
12955 * linux-low.h (pid_of): Moved here.
12956 (lwpid_of): New.
12957 (get_lwp_thread): Use lwpid_of.
12958 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
12959 * linux-low.c (pid_of): Delete.
12960 (inferior_pid): Use lwpid_of.
12961 (linux_event_pipe): New.
12962 (target_is_async_p): New.
12963 (delete_lwp): New.
12964 (handle_extended_wait): Use lwpid_of.
12965 (add_lwp): Don't set lwpid field.
12966 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
12967 (linux_kill_one_lwp): If killing a running lwp, stop it first.
12968 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
12969 (linux_detach_one_lwp): If detaching from a running lwp, stop it
12970 first. Adjust to linux_wait_for_event interface changes. Use
12971 lwpid_of.
12972 (linux_detach): Don't delete the main lwp here.
12973 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
12974 (status_pending_p): Don't consider explicitly suspended lwps.
12975 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12976 pointer. Add OPTIONS argument. Change return type to int. Use
12977 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
12978 (linux_wait_for_event): Take an integer pid instead of a lwp_info
12979 pointer. Add status pointer argument. Return a pid instead of a
12980 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
12981 changes. In non-stop mode, don't switch to a random thread.
12982 (linux_wait): Rename to...
12983 (linux_wait_1): ... this. Add target_options argument, and handle
12984 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
12985 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
12986 clean exit and signal exit code. Don't stop all threads in
12987 non-stop mode. In all-stop mode, only stop all threads when
12988 reporting a stop to GDB. Handle explicit thread stop requests.
12989 (async_file_flush, async_file_mark): New.
12990 (linux_wait): New.
12991 (send_sigstop): Use lwpid_of.
12992 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
12993 interface changes. In non-stop mode, don't switch to a random
12994 thread.
12995 (linux_resume_one_lwp): Use lwpid_of.
12996 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12997 (linux_resume_one_thread): ... this. Handle resume_stop. In
12998 non-stop mode, don't look for pending flag in all threads.
12999 (resume_status_pending_p): Don't consider explicitly suspended
13000 threads.
13001 (my_waitpid): Reimplement. Emulate __WALL.
13002 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13003 Use lwpid_of.
13004 (sigchld_handler, linux_supports_non_stop, linux_async)
13005 (linux_start_non_stop): New.
13006 (linux_target_ops): Register linux_supports_non_stop, linux_async
13007 and linux_start_non_stop.
13008 (initialize_low): Install SIGCHLD handler.
13009 * thread-db.c (thread_db_create_event, find_one_thread)
13010 (thread_db_get_tls_address): Use lwpid_of.
13011 * win32-low.c (win32_detach): Adjust to use resume_kind.
13012 (win32_wait): Add `options' argument.
13013 * spu-low.c (spu_resume): Adjust to use resume_kind.
13014 (spu_wait): Add `options' argument.
13015
13016 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13017
13018 Decouple target code from remote protocol.
13019
13020 * target.h (enum target_waitkind): New.
13021 (struct target_waitstatus): New.
13022 (struct target_ops) <wait>: Return an unsigned long. Take a
13023 target_waitstatus pointer instead of a char pointer.
13024 (mywait): Likewise.
13025 * target.c (mywait): Change prototype to return an unsigned long.
13026 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13027 * server.h (thread_from_wait, old_thread_from_wait): Delete
13028 declarations.
13029 (prepare_resume_reply): Change prototype to take a
13030 target_waitstatus.
13031 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13032 (last_status, last_ptid): New.
13033 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13034 pid instead of a signal.
13035 (attach_inferior): Remove "status" and "signal" parameters.
13036 Adjust.
13037 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13038 not as an address.
13039 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13040 (handle_v_requests, myresume): Remove "status" and "signal"
13041 parameters. Adjust.
13042 (handle_status): New.
13043 (main): Delete local `status'. Adjust.
13044 * remote-utils.c: Include target.h.
13045 (prepare_resume_reply): Change prototype to take a
13046 target_waitstatus. Adjust.
13047
13048 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13049 interface.
13050 * spu-low.c (spu_wait): Adjust.
13051 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13052 Delete.
13053 (win32_wait): Adjust.
13054
13055 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13056
13057 * target.h (struct thread_resume): Delete leave_stopped member.
13058 (struct target_ops): Add a `n' argument to the `resume' callback.
13059 * server.c (start_inferior): Adjust.
13060 (handle_v_cont, myresume): Adjust.
13061 * linux-low.c (check_removed_breakpoint): Adjust to resume
13062 interface change, and to removed leave_stopped field.
13063 (resume_ptr): Delete.
13064 (struct thread_resume_array): New.
13065 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13066 resume interface change.
13067 (linux_continue_one_thread, linux_queue_one_thread)
13068 (resume_status_pending_p): Check if the resume field is NULL
13069 instead of checking the leave_stopped member.
13070 (linux_resume): Adjust to the target resume interface change.
13071 * spu-low.c (spu_resume): Adjust to the target resume interface
13072 change.
13073 * win32-low.c (win32_detach, win32_resume): Ditto.
13074
13075 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13076
13077 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13078 flag.
13079 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13080 pending.
13081 (linux_continue_one_thread): Only preserve the stepping flag if
13082 there's a pending breakpoint.
13083
13084 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13085
13086 * server.c (main): After the inferior having exited, call
13087 remote_close before exiting gdbserver.
13088
13089 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13090
13091 Fix size of FPSCR in Power 7 processors.
13092 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13093 (PPC_FEATURE_HAS_DFP): New #define.
13094 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13095 size of the FPSCR.
13096
13097 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13098
13099 * server.c (handle_query) Whitespace and formatting.
13100
13101 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13102
13103 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13104 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13105 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13106 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13107 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13108 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13109 Makefile.in, configure.ac: Fix whitespace throughout.
13110 * configure: Regenerate.
13111
13112 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13113
13114 * inferiors.c (find_inferior): Make it safe for the callback
13115 function to delete the currently iterated inferior.
13116
13117 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13118
13119 * Makefile.in (linuw_low_h): Move higher.
13120 (thread-db.o): Depend on $(linux_low_h).
13121
13122 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13123
13124 Rename "process" to "lwp" throughout.
13125
13126 * linux-low.c (all_processes): Rename to...
13127 (all_lwps): ... this.
13128 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13129 (add_process): Rename to ...
13130 (add_lwp): ... this. Adjust.
13131 (linux_create_inferior): Adjust.
13132 (linux_attach_lwp): Adjust.
13133 (linux_attach): Adjust.
13134 (linux_kill_one_process): Rename to ...
13135 (linux_kill_one_lwp): ... this. Adjust.
13136 (linux_kill): Adjust.
13137 (linux_detach_one_process): Rename to ...
13138 (linux_detach_one_lwp): ... this. Adjust.
13139 (linux_detach): Adjust.
13140 (check_removed_breakpoint): Adjust.
13141 (status_pending_p): Adjust.
13142 (linux_wait_for_process): Rename to ...
13143 (linux_wait_for_lwp): ... this. Adjust.
13144 (linux_wait_for_event): Adjust.
13145 (send_sigstop): Adjust.
13146 (wait_for_sigstop): Adjust.
13147 (stop_all_processes): Rename to ...
13148 (stop_all_lwps): ... this.
13149 (linux_resume_one_process): Rename to ...
13150 (linux_resume_one_lwp): ... this. Adjust.
13151 (linux_set_resume_request, linux_continue_one_thread)
13152 (linux_queue_one_thread, resume_status_pending_p)
13153 (usr_store_inferior_registers, regsets_store_inferior_registers)
13154 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13155 Adjust.
13156 * linux-low.h (get_process): Rename to ...
13157 (get_lwp): ... this. Adjust.
13158 (get_thread_process): Rename to ...
13159 (get_thread_lwp): ... this. Adjust.
13160 (get_process_thread): Rename to ...
13161 (get_lwp_thread): ... this. Adjust.
13162 (struct process_info): Rename to ...
13163 (struct lwp_info): ... this.
13164 (all_processes): Rename to ...
13165 (all_lwps): ... this.
13166 * proc-service.c (ps_lgetregs): Adjust.
13167 * thread-db.c (thread_db_create_event, find_one_thread)
13168 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13169
13170 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13171
13172 * server.c (handle_query): Handle "qAttached".
13173
13174 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13175
13176 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13177 GPLv3, update license URL.
13178
13179 2009-03-01 Doug Evans <dje@google.com>
13180
13181 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13182 (server_h): Add gdb_signals.h.
13183 (signals.o): Update.
13184 * server.h (target_signal_from_host,target_signal_to_host_p)
13185 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13186
13187 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13188
13189 * remote-utils.c (getpkt): Also generate remote-debug
13190 information if noack_mode is set.
13191
13192 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13193
13194 * server.c (handle_query): Report qXfer:siginfo:read and
13195 qXfer:siginfo:write as supported and handle them.
13196 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13197 * linux-low.c (linux_xfer_siginfo): New.
13198 (linux_target_ops): Set it.
13199
13200 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13201
13202 * server.c (gdbserver_usage): Mention --remote-debug.
13203 (main): Accept '--remote-debug' switch.
13204
13205 2009-01-18 Doug Evans <dje@google.com>
13206
13207 * regcache.c (new_register_cache): No need to check result of xcalloc.
13208 * server.c (handle_search_memory): Back out calls to xmalloc,
13209 result is checked and error is returned to user upon failure.
13210 (handle_query): Ditto. Add more checks for result of malloc.
13211 (handle_v_cont): Check result of malloc, report error back to
13212 user upon failure.
13213 (handle_v_run): Ditto. Call freeargv.
13214 * server.h (freeargv): Declare.
13215 * utils.c (freeargv): New fn.
13216
13217 2009-01-15 Doug Evans <dje@google.com>
13218
13219 * gdbreplay.c (perror_with_name): Make arg const char *.
13220 * server.h (target_signal_to_name): Make return type const char *.
13221 * thread-db.c (thread_db_err_str): Make return type const char *.
13222 * utils.c (perror_with_name): Make arg const char *.
13223
13224 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13225
13226 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13227 when handling a EXIT_PROCESS_DEBUG_EVENT.
13228
13229 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13230
13231 * gdbreplay.c (gdbreplay_version): Update copyright year.
13232 * server.c (gdbserver_version): Likewise.
13233
13234 2009-01-05 Doug Evans <dje@google.com>
13235
13236 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13237 (handle_extended_wait): Improve comment.
13238
13239 2008-12-13 Doug Evans <dje@google.com>
13240
13241 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13242 * server.h (ATTR_MALLOC): New macro.
13243 (xmalloc,xcalloc,xstrdup): Declare.
13244 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13245 * inferiors.c: Ditto.
13246 * linux-low.c: Ditto.
13247 * mem-break.c: Ditto.
13248 * regcache.c: Ditto.
13249 * remote-utils.c: Ditto.
13250 * server.c: Ditto.
13251 * target.c: Ditto.
13252 * win32-low.c: Ditto.
13253
13254 2008-12-12 Doug Evans <dje@google.com>
13255
13256 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13257 in debugging printf.
13258
13259 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13260
13261 2008-12-09 Doug Evans <dje@google.com>
13262
13263 * linux-low.h (struct process_info): Delete member tid, unused.
13264 * thread-db.c (find_one_thread): Update.
13265 (maybe_attach_thread): Update.
13266
13267 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13268
13269 * target.h (struct target_ops): Add qxfer_osdata member.
13270 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13271 and dirent.h.
13272 (linux_qxfer_osdata): New functions.
13273 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13274 callback.
13275 * server.c (handle_query): Handle "qXfer:osdata:read:".
13276 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13277 (buffer_xml_printf): New functions.
13278 * server.h (struct buffer): New.
13279 (buffer_grow_str, buffer_grow_str0): New macros.
13280 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13281 (buffer_xml_printf): Declare.
13282
13283 2008-11-24 Doug Evans <dje@google.com>
13284
13285 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13286
13287 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13288
13289 * server.c (handle_v_run): Always use the supplied argument list.
13290
13291 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13292
13293 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13294 (xtensa_regmap_table): Add entry for scompare1.
13295
13296 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13297
13298 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13299 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13300 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13301 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13302 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13303 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13304 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13305 XML target descriptions.
13306 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13307 when inferior is running on an ISA 2.05 or later processor. Add
13308 special case to return offset for full 64-bit slot of FPSCR when
13309 in 32-bits.
13310
13311 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13312
13313 * Makefile.in (SFILES, clean): Added sparc64 files.
13314 (reg-sparc64.o, reg-sparc64.c): New.
13315 * configure.srv (sparc*-*-linux*): New configuration.
13316 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13317 syscall arguments for SPARC.
13318 (regsets_store_inferior_registers): Likewise.
13319 * linux-sparc-low.c: New file.
13320
13321 2008-10-21 Doug Evans <dje@google.com>
13322
13323 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13324 (READLINE_DIR,READLINE_DEP): Delete.
13325 (INTERNAL_CFLAGS): Update.
13326 (LINTFLAGS): Update.
13327
13328 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13329
13330 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13331 whole argv from the last run, not just argv[0].
13332
13333 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13334
13335 * regcache.c (new_register_cache): Return NULL if the register
13336 cache size isn't known yet.
13337 (free_register_cache): Avoid dereferencing a NULL regcache.
13338
13339 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13340
13341 * configure.srv: Merge MIPS and MIPS64.
13342
13343 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13344
13345 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13346
13347 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13348
13349 * Makefile.in: Add required vsx dependencies.
13350
13351 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13352 Declare init_registers_powerpc_vsx32l.
13353 Declare init_registers_powerpc_vsx64l.
13354 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13355 (ppc_arch_setup): Check for VSX in hwcap.
13356 (ppc_fill_vsxregset): New function.
13357 (ppc_store_vsxregset): New function.
13358 Add new VSX entry in regset_info target_regsets.
13359
13360 * configure.srv: Add new VSX dependencies.
13361
13362 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13363
13364 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13365 (remote_open): Set or clear transport_is_reliable.
13366 (putpkt_binary): Don't expect acks in noack mode.
13367 (getpkt): Don't send ack/nac in noack mode.
13368 * server.c (handle_general_set): Handle QStartNoAckMode.
13369 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13370 qSupported.
13371 (main): Reset noack_mode on every connection.
13372 * server.h (noack_mode): Declare.
13373
13374 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13375
13376 * Makefile.in (GDBREPLAY_OBS): New variable.
13377 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13378
13379 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13380 Daniel Jacobowitz <dan@codesourcery.com>
13381
13382 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13383 (usr_store_inferior_registers): Likewise.
13384 (regsets_store_inferior_registers): Likewise.
13385
13386 2008-07-31 Rolf Jansen <rj@surtec.com>
13387 Pedro Alves <pedro@codesourcery.com>
13388
13389 * configure.ac: Check for memmem declaration.
13390 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13391 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13392 (disable_packet_qfThreadInfo): Unconditionally compile.
13393 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13394 * configure, config.in: Regenerate.
13395
13396 2008-07-28 Doug Kwan <dougkwan@google.com>
13397
13398 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13399 (linux_write_memory): Remove declaration of errno.
13400
13401 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13402
13403 * linux-low.c (handle_extended_wait): Do not use "status"
13404 variable uninitialized.
13405
13406 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13407
13408 * server.c (handle_v_attach): Inhibit reporting dll changes.
13409
13410 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13411
13412 * remote-utils.c (prepare_resume_reply): If requested, don't
13413 output "thread:TID" in the T stop reply.
13414
13415 * server.c (disable_packet_vCont, disable_packet_Tthread)
13416 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13417 (handle_query): If requested, disable support for qC, qfThreadInfo
13418 and qsThreadInfo.
13419 (handle_v_requests): If requested, disable support for vCont.
13420 (gdbserver_show_disableable): New.
13421 (main): Handle --disable-packet and --disable-packet=LIST.
13422
13423 * server.h (disable_packet_vCont, disable_packet_Tthread)
13424 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13425
13426 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13427
13428 * server.c (gdbserver_usage): Mention --version.
13429
13430 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13431
13432 * Makefile.in (gdbreplay.o): New rule.
13433
13434 2008-06-06 Joseph Myers <joseph@codesourcery.com>
13435
13436 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13437 message, not gdbserver.
13438
13439 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
13440 Nathan Sidwell <nathan@codesourcery.com>
13441 Joseph Myers <joseph@codesourcery.com>
13442
13443 * acinclude.m4: Include ../../config/acx.m4.
13444 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13445 * configure, config.in: Regenerate.
13446 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13447 * server.c (gdbserver_version): Print PKGVERSION.
13448 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13449 (main): Adjust gdbserver_usage calls.
13450 * gdbreplay.c (version, host_name): Add declarations.
13451 (gdbreplay_version, gdbreplay_usage): New.
13452 (main): Accept --version and --help options.
13453
13454 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13455
13456 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13457 (arm_breakpoint_at): Handle Thumb.
13458 (the_low_target): Add comment.
13459
13460 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13461
13462 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13463
13464 2008-05-09 Doug Evans <dje@google.com>
13465
13466 * server.h (decode_search_memory_packet): Declare.
13467 * remote-utils.c (decode_search_memory_packet): New fn.
13468 * server.c (handle_search_memory_1): New fn.
13469 (handle_search_memory): New fn.
13470 (handle_query): Process qSearch:memory packets.
13471
13472 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13473
13474 * regcache.c (registers_length): Remove.
13475 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13476 full register packet.
13477 * regcache.h (registers_length): Remove prototype.
13478 * server.h (PBUFSIZ): Define to 16384.
13479
13480 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13481
13482 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13483 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13484 powerpc-64l.o, and powerpc-altivec64l.o.
13485 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13486 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13487 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13488 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13489 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13490 to srv_xmlfiles.
13491
13492 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13493 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13494 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13495 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13496 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13497 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13498 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13499 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13500 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13501 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13502 (clean): Update.
13503
13504 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13505 (init_registers_powerpc_32l): ... this new prototype.
13506 (init_registers_powerpc_32): Remove, replace by ...
13507 (init_registers_powerpc_altivec32l): ... this new prototype.
13508 (init_registers_powerpc_e500): Remove, replace by ...
13509 (init_registers_powerpc_e500l): ... this new prototype.
13510 (init_registers_ppc64): Remove, replace by ...
13511 (init_registers_powerpc_64l): ... this new prototype.
13512 (init_registers_powerpc_64): Remove, replace by ...
13513 (init_registers_powerpc_altivec64l): ... this new prototype.
13514 (ppc_num_regs): Set to 73.
13515 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13516 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13517 (ppc_cannot_store_register): Handle orig_r3 and trap.
13518 (ppc_arch_setup): Update init_registers_... calls.
13519 (ppc_fill_gregset): Handle orig_r3 and trap.
13520
13521 * inferiors.c (clear_inferiors): Reset current_inferior.
13522
13523 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
13524
13525 * acinclude.m4: Add override.m4.
13526 * configure: Regenerate.
13527
13528 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13529
13530 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13531 initial call to init_register_ppc64.
13532
13533 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13534
13535 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13536 single powerpc*-*-linux* case.
13537 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13538
13539 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13540
13541 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
13542 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
13543 from reg_xmlfiles.
13544 * linux-ppc-low.c: Include <elf.h>.
13545 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13546 (ppc_hwcap): New global variable.
13547 (ppc_regmap): Remove __SPE__ #ifdef sections.
13548 (ppc_regmap_e500): New global variable.
13549 (ppc_cannot_store_register): Update __SPE__ special case.
13550 (ppc_get_hwcap): New function.
13551 (ppc_arch_setup): Use it to determine whether inferior supports
13552 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13553 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13554 Do not access registers if target does not support AltiVec.
13555 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13556 Do not access registers if target does not support SPE.
13557 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13558
13559 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13560
13561 * linux-low.c (disabled_regsets, num_regsets): New.
13562 (use_regsets_p): Delete.
13563 (linux_wait_for_process): Clear disabled_regsets.
13564 (regsets_fetch_inferior_registers): Check and set it.
13565 (regsets_store_inferior_registers): Likewise.
13566 (linux_fetch_registers, linux_store_registers): Do not use
13567 use_regsets_p.
13568 (initialize_low): Allocate disabled_regsets.
13569
13570 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13571
13572 * Makefile.in (LIBOBJS): New.
13573 (OBS): Use LIBOBJS.
13574 (memmem.o): New rule.
13575 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13576 * configure: Regenerated.
13577
13578 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13579
13580 * server.c (handle_query): Never return "unsupported" for
13581 qXfer:features:read queries.
13582
13583 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13584
13585 * server.c (get_features_xml): Fix inverted condition.
13586 (handle_query): Always support qXfer:feature:read.
13587
13588 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13589
13590 * server.c (wrapper_argv): New.
13591 (start_inferior): Handle wrapper_argv. If set, expect an extra
13592 trap.
13593 (gdbserver_usage): Document --wrapper.
13594 (main): Parse --wrapper.
13595
13596 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13597
13598 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13599 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13600 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13601 (ppc_set_pc): Likewise.
13602 (ppc_arch_setup): New function.
13603 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13604 of collect_register.
13605 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
13606
13607 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13608
13609 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13610 instead of linux-ppc64-low.o.
13611 * linux-ppc64-low.c: Remove file.
13612 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13613 (linux-ppc64-low.o): Remove rule.
13614
13615 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13616 (init_registers_powerpc_64): Likewise.
13617 (ppc_regmap): Conditionally define depending on __powerpc64__.
13618 (ppc_cannot_store_register): Do not special-case "fpscr" when
13619 compiled on __powerpc64__.
13620 (ppc_collect_ptrace_register): New function.
13621 (ppc_supply_ptrace_register): New function.
13622 (ppc_breakpoint): Change type to "unsigned int".
13623 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13624 (the_low_target): Conditionally provide initializers for the
13625 arch_setup member depending on __powerpc64__. Install
13626 collect_ptrace_register and supply_ptrace_register members.
13627
13628 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13629
13630 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13631 * server.c (gdbserver_xmltarget): Define.
13632 (get_features_xml): Use it to replace "target.xml" and arch_string.
13633
13634 * configure.srv: Remove srv_xmltarget. Add XML files that were
13635 mentioned there to srv_xmlfiles instead. Remove conditional tests
13636 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13637 srv_xmlfiles and srv_regobj to include all possible choices.
13638 * configure.ac (srv_xmltarget): Remove.
13639 (srv_xmlfiles): Do not add "target.xml".
13640 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13641 checks for supplementary target information.
13642 * configure: Regenerate.
13643 * Makefile.in (XML_TARGET): Remove.
13644 (target.xml): Remove rule.
13645 (clean): Do not clean up target.xml.
13646 (.PRECIOUS): Do not mention target.xml.
13647
13648 * target.h (struct target_ops): Remove arch_string member.
13649 * linux-low.c (linux_arch_string): Remove.
13650 (linux_target_ops): Remove arch_string initializer.
13651 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13652 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13653 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13654 * spu-low.c (spu_arch_string): Remove.
13655 (spu_target_ops): Remove arch_string initializer.
13656 * win32-low.c (win32_arch_string): Remove.
13657 (win32_target_ops): Remove arch_string initializer.
13658 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13659 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13660 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13661
13662 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13663
13664 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13665 by collect_ptrace_register and supply_ptrace_register hooks.
13666 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13667 instead of checking for the_low_target.left_pad_xfer.
13668 (usr_store_inferior_registers): Use collect_ptrace_register callback
13669 instead of checking for the_low_target.left_pad_xfer.
13670
13671 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13672 (s390_supply_ptrace_register): Likewise.
13673 (s390_fill_gregset): Call s390_collect_ptrace_register.
13674 (the_low_target): Update.
13675
13676 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13677 (ppc_supply_ptrace_register): Likewise.
13678 (the_low_target): Update.
13679
13680 * linux-i386-low.c (the_low_target): Update.
13681 * linux-x86-64-low.c (the_low_target): Update.
13682
13683 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13684
13685 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13686 reg-s390.o and reg-s390x.o.
13687
13688 * linux-low.c (new_inferior): New global variable.
13689 (linux_create_inferior, linux_attach): Set it.
13690 (linux_wait_for_process): Call the_low_target.arch_setup after the
13691 target has stopped for the first time.
13692 (initialize_low): Do not call the_low_target.arch_setup.
13693
13694 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13695 (s390_set_pc): Likewise.
13696 (s390_arch_setup): New function.
13697 (the_low_target): Use s390_arch_setup as arch_setup routine.
13698
13699 * regcache.c (realloc_register_cache): New function.
13700 (set_register_cache): Call it for each existing regcache.
13701
13702 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13703
13704 * server.h (init_registers): Remove prototype.
13705
13706 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13707 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13708 instead of init_registers ().
13709 * linux-arm-low.c (init_registers_arm): Add prototype.
13710 (init_registers_arm_with_iwmmxt): Likewise.
13711 (the_low_target): Add initializer for arch_setup field.
13712 * linux-cris-low.c (init_registers_cris): Add prototype.
13713 (the_low_target): Add initializer for arch_setup field.
13714 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13715 (the_low_target): Add initializer for arch_setup field.
13716 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13717 (the_low_target): Add initializer for arch_setup field.
13718 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13719 (the_low_target): Add initializer for arch_setup field.
13720 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13721 (the_low_target): Add initializer for arch_setup field.
13722 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13723 (the_low_target): Add initializer for arch_setup field.
13724 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13725 (init_registers_mips64_linux): Likewise.
13726 (the_low_target): Add initializer for arch_setup field.
13727 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13728 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13729 (the_low_target): Add initializer for arch_setup field.
13730 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13731 (init_registers_powerpc_64): Likewise.
13732 (the_low_target): Add initializer for arch_setup field.
13733 * linux-s390-low.c (init_registers_s390): Add prototype.
13734 (init_registers_s390x): Likewise.
13735 (the_low_target): Add initializer for arch_setup field.
13736 * linux-sh-low.c (init_registers_sh): Add prototype.
13737 (the_low_target): Add initializer for arch_setup field.
13738 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13739 (the_low_target): Add initializer for arch_setup field.
13740 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13741 (the_low_target): Add initializer for arch_setup field.
13742
13743 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13744 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13745 instead of init_registers ().
13746 * win32-arm-low.c (init_registers_arm): Add prototype.
13747 (the_low_target): Add initializer for arch_setup field.
13748 * win32-i386-low.c (init_registers_i386): Add prototype.
13749 (the_low_target): Add initializer for arch_setup field.
13750
13751 * spu-low.c (init_registers_spu): Add prototype.
13752 (initialize_low): Call initialie_registers_spu () instead of
13753 initialize_registers ().
13754
13755 2008-02-19 Pedro Alves <pedro@codesourcery.com>
13756
13757 * server.c (handle_v_requests): When handling the vRun and vAttach
13758 packets, if already debugging a process, don't kill it. Return an
13759 error instead.
13760
13761 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13762
13763 * server.c (handle_query): Correct length check.
13764
13765 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13766
13767 * win32-low.c (do_initial_child_stuff): Add process handle
13768 parameter. Set current_process_handle and current_process_id from the
13769 parameters. Clear globals.
13770 (win32_create_inferior): Don't set current_process_handle and
13771 current_process_id here. Instead pass them on the call to
13772 do_initial_child_stuff.
13773 (win32_attach): Likewise.
13774 (win32_clear_inferiors): New.
13775 (win32_kill): Don't close the current process handle or the
13776 current thread handle here. Instead call win32_clear_inferiors.
13777 (win32_detach): Don't open a new handle to the process. Call
13778 win32_clear_inferiors.
13779 (win32_join): Don't rely on current_process_handle; open a new
13780 handle using the process id.
13781 (win32_wait): Call win32_clear_inferiors when the inferior process
13782 has exited.
13783
13784 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13785
13786 * server.c (monitor_show_help): Add "exit".
13787
13788 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13789
13790 * Makefile.in (SFILES): Add linux-xtensa-low.c.
13791 (clean): Add reg-xtensa.c.
13792 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
13793 * configure.srv (xtensa*-*-linux*) New target.
13794 * linux-xtensa-low.c: New.
13795 * xtensa-xtregs.c: New.
13796
13797 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13798
13799 * hostio.c: Don't include errno.h.
13800 (errno_to_fileio_errno): Move to hostio-errno.
13801 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13802 error number outputting to the target->hostio_last_error callback.
13803 (hostio_packet_error): Use FILEIO_EINVAL directly.
13804 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13805 calls to hostio_error.
13806 * hostio-errno.c: New.
13807 * server.h (hostio_last_error_from_errno): Declare.
13808 * target.h (target_ops): Add hostio_last_error member.
13809 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13810 as hostio_last_error handler.
13811 * spu-low.c (spu_target_ops): Likewise.
13812 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13813 (wince_hostio_last_error): New functions.
13814 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13815 as hostio_last_error handler.
13816 (win32_target_ops) [!_WIN32_WCE]: Register
13817 hostio_last_error_from_errno as hostio_last_error handler.
13818 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13819 (hostio-errno.o): New rule.
13820 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13821 * configure.srv (srv_hostio_err_objs): New variable. Default to
13822 hostio-errno.o.
13823 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13824 * configure: Regenerate.
13825
13826 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13827
13828 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13829 (linux_kill, linux_detach): Clean up the process list.
13830 * remote-utils.c (remote_open): Improve port number parsing.
13831 (putpkt_binary, input_interrupt): Only send interrupts if the target
13832 is running.
13833 * server.c (extended_protocol): Make static.
13834 (attached): Define earlier.
13835 (exit_requested, response_needed, program_argv): New variables.
13836 (target_running): New.
13837 (start_inferior): Clear attached here.
13838 (attach_inferior): Set attached here.
13839 (require_running): Define.
13840 (handle_query): Use require_running and target_running. Implement
13841 "monitor exit".
13842 (handle_v_attach, handle_v_run): New.
13843 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13844 (gdbserver_usage): Update.
13845 (main): Redo argument parsing. Handle --debug and --multi. Handle
13846 --attach along with other options or after the port. Save
13847 program_argv. Support no initial program. Resynchronize
13848 communication with GDB after an error. Handle "monitor exit".
13849 Use require_running and target_running. Always allow the extended
13850 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13851 restart in extended mode.
13852 * README: Refer to the GDB manual. Update --attach usage.
13853
13854 2007-12-20 Andreas Schwab <schwab@suse.de>
13855
13856 * linux-low.c (STACK_SIZE): Define.
13857 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13858 (linux_test_for_tracefork): Likewise.
13859
13860 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13861
13862 * linux-low.c (linux_wait_for_event): Update messages. Do not
13863 reinsert auto-delete breakpoints.
13864 * mem-break.c (struct breakpoint): Change return type of handler to
13865 int.
13866 (set_breakpoint_at): Update handler type.
13867 (reinsert_breakpoint_handler): Return 1 instead of calling
13868 delete_breakpoint.
13869 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13870 setting a new one.
13871 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13872 * mem-break.h (set_breakpoint_at): Update handler type.
13873 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13874 * win32-low.c (auto_delete_breakpoint): New.
13875 (get_child_debug_event): Use it.
13876
13877 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13878
13879 * configure.ac: Check for pread and pwrite.
13880 * hostio.c (handle_pread): Fall back to lseek and read.
13881 (handle_pwrite): Fall back to lseek and write.
13882 * config.in, configure: Regenerated.
13883
13884 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13885
13886 * server.c (myresume): Add own_buf argument.
13887 (main): Update calls.
13888
13889 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13890
13891 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13892 * remote-utils.c (remote_open): Do not call disable_async_io.
13893 (block_async_io): Delete.
13894 (unblock_async_io): Make static.
13895 (initialize_async_io): New.
13896 * server.c (handle_v_cont): Handle async I/O here.
13897 (myresume): Likewise. Move other common resume tasks here...
13898 (main): ... from here. Call initialize_async_io. Disable async
13899 I/O before the main loop.
13900 * server.h (initialize_async_io): Declare.
13901 (block_async_io, unblock_async_io): Delete prototypes.
13902 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13903
13904 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13905
13906 * remote-utils.c (readchar): Allow binary data in received messages.
13907
13908 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13909
13910 * win32-low.c (attaching): New global.
13911 (win32_create_inferior): Clear the `attaching' global.
13912 (win32_attach): Set the `attaching' global.
13913 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13914 attaching. Only set a breakpoint at the entry point if not
13915 attaching.
13916
13917 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13918
13919 * server.c (main): Don't report dll events on the initial
13920 connection on attaches.
13921
13922 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13923
13924 * server.c (main): Relax numerical bases supported for the pid of
13925 the --attach command line argument.
13926
13927 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13928
13929 * win32-low.c (win32_attach): Call OpenProcess before
13930 DebugActiveProcess, not after. Add last error output to error
13931 call.
13932
13933 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13934
13935 * win32-low.c (win32_get_thread_context)
13936 (win32_set_thread_context): New functions.
13937 (thread_rec): Use win32_get_thread_context.
13938 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13939 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13940 field.
13941
13942 2007-12-03 Leo Zayas
13943 Pedro Alves <pedro_alves@portugalmail.pt>
13944
13945 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13946 global variables.
13947 (child_add_thread): Minor cleanup.
13948 (child_continue): Resume artificially suspended threads before
13949 calling ContinueDebugEvent.
13950 (suspend_one_thread): New.
13951 (fake_breakpoint_event): New.
13952 (get_child_debug_event): Change return type to int. Check here if
13953 gdb sent an interrupt request. If a soft interrupt was requested,
13954 fake a breakpoint event. Return 0 if there is no event to handle,
13955 and 1 otherwise.
13956 (win32_wait): Don't check here if gdb sent an interrupt request.
13957 Ensure there is a valid event to handle.
13958 (win32_request_interrupt): Add soft interruption method as last
13959 resort.
13960
13961 2007-12-03 Leo Zayas
13962 Pedro Alves <pedro_alves@portugalmail.pt>
13963
13964 * win32-low.h (win32_thread_info): Add descriptions to the
13965 structure members. Replace `suspend_count' counter by a
13966 `suspended' flag.
13967 * win32-low.c (thread_rec): Update condition of when to get the
13968 context from the inferior. Rely on ContextFlags being set if it
13969 has already been retrieved. Only suspend the inferior thread if
13970 we haven't already. Warn if that fails.
13971 (continue_one_thread): s/suspend_count/suspended/. Only call
13972 ResumeThread once. Warn if that fails.
13973
13974 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13975
13976 * win32-low.c (win32_wait): Don't read from the inferior when it
13977 has already exited.
13978
13979 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
13980
13981 * Makefile.in (win32_low_h): New variable.
13982 (win32-low.o): Add dependency on $(win32_low_h).
13983 (win32-arm-low.o, win32-i386-low.o): New rules.
13984
13985 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13986
13987 * hostio.c: Correct copyright year.
13988
13989 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
13990
13991 * Makefile.in (OBS): Add hostio.o.
13992 (hostio.o): New rule.
13993 * server.h (handle_vFile): Declare.
13994 * hostio.c: New file.
13995 * server.c (handle_v_requests): Take packet_len and new_packet_len
13996 for binary packets. Call handle_vFile.
13997 (main): Update call to handle_v_requests.
13998
13999 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14000
14001 * linux-low.c: Include <sched.h>.
14002
14003 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14004
14005 * linux-low.c (linux_tracefork_grandchild): New.
14006 (linux_tracefork_child): Use clone.
14007 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14008
14009 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14010
14011 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14012
14013 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14014
14015 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14016
14017 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14018
14019 * inferiors.c (change_inferior_id): Delete.
14020 (add_pid_to_list, pull_pid_from_list): New.
14021 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14022 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14023 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14024 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14025 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14026 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14027 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14028 (using_threads): Always set to 1.
14029 (handle_extended_wait): New.
14030 (add_process): Do not set TID.
14031 (linux_create_inferior): Set must_set_ptrace_flags.
14032 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14033 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14034 (linux_thread_alive): Rename TID argument to LWPID.
14035 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14036 (linux_wait_for_event): Do not use TID or check using_threads. Update
14037 call to dead_thread_notify. Call handle_extended_wait.
14038 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14039 (send_sigstop): Delete sigstop_sent.
14040 (wait_for_sigstop): Avoid TID.
14041 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14042 (linux_test_for_tracefork): New.
14043 (linux_lookup_signals): Use thread_db_active and
14044 linux_supports_tracefork_flag.
14045 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14046 * linux-low.h (get_process_thread): Avoid TID.
14047 (struct process_ifo): Move thread_known and tid to the end. Remove
14048 sigstop_sent.
14049 (linux_attach_lwp, thread_db_init): Update prototypes.
14050 * server.h (change_inferior_id): Delete prototype.
14051 (add_pid_to_list, pull_pid_from_list): New prototypes.
14052 * thread-db.c (thread_db_use_events): New.
14053 (find_first_thread): Rename to...
14054 (find_one_thread): ...this. Update callers and messages. Do not
14055 call fatal. Check thread_db_use_events. Do not call
14056 change_inferior_id or new_thread_notify.
14057 (maybe_attach_thread): Update. Do not call new_thread_notify.
14058 (thread_db_init): Set thread_db_use_events. Check use_events.
14059 * utils.c (fatal, warning): Correct message prefix.
14060
14061 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14062
14063 * Makefile.in (clean): Remove new files.
14064 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14065 (powerpc-64.o, powerpc-64.c): New rules.
14066 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14067 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14068 with SPE.
14069 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14070 SPE targets.
14071 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14072 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14073 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14074 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14075 (target_regsets): Add AltiVec and SPE register sets.
14076 * configure.ac: Check for AltiVec and SPE.
14077 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14078 (ppc_fill_vrregset, ppc_store_vrregset): New.
14079 (target_regsets): Add AltiVec register set.
14080 * configure: Regenerated.
14081
14082 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14083
14084 * linux-low.c (O_LARGEFILE): Define.
14085 (linux_read_memory): Use /proc/PID/mem.
14086 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14087 * configure, config.in: Regenerated.
14088
14089 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14090
14091 * linux-low.c (linux_wait_for_event): Do not pass signals while
14092 single-stepping.
14093
14094 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14095
14096 * win32-low.c (create_process): New.
14097 (win32_create_inferior): Use create_process instead of
14098 CreateProcess. If create_process failed retry appending an ".exe"
14099 suffix. Store the GetLastError result immediatelly after
14100 create_process calls and use it on the call to error.
14101
14102 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14103
14104 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14105
14106 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14107
14108 * configure.ac: Switch license to GPLv3.
14109
14110 2007-08-01 Michael Snyder <msnyder@access-company.com>
14111
14112 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14113
14114 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14115
14116 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14117 typedef.
14118 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14119 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14120 CloseToolhelp32Snapshot.
14121 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14122 CloseToolhelp32Snapshot.
14123
14124 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14125
14126 * server.c (main): Check for inferior exit before main loop.
14127
14128 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14129
14130 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14131 instead of on tmp_desc.
14132
14133 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14134 Daniel Jacobowitz <dan@codesourcery.com>
14135
14136 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14137 (add_thread): Minor cleanups.
14138 (clear_inferiors): Move lower in the file. Clear the DLL
14139 list.
14140 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14141 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14142 (xml_escape_text): New.
14143 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14144 for qSupported.
14145 (handle_v_cont): Report errors.
14146 (gdbserver_version): Update.
14147 (main): Correct size of own_buf. Do not report initial DLL events.
14148 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14149 (unloaded_dll, xml_escape_text): New.
14150 * win32-low.c (enum target_waitkind): Update comments.
14151 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14152 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14153 (win32_EnumProcessModules, win32_GetModuleInformation)
14154 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14155 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14156 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14157 (win32_Module32First, win32_Module32Next, load_toolhelp)
14158 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14159 (get_child_debug_event): Handle DLL events.
14160 (win32_wait): Likewise.
14161
14162 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14163
14164 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14165 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14166
14167 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14168
14169 * win32-low.c (handle_output_debug_string): Ignore event if not
14170 waiting.
14171
14172 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14173
14174 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14175
14176 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14177
14178 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14179
14180 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14181
14182 * inferiors.c (change_inferior_id): Add comment.
14183 * linux-low.c (check_removed_breakpoint): Add an early
14184 prototype. Improve debug output.
14185 (linux_attach): Doc update.
14186 (linux_detach_one_process, linux_detach): Clean up before releasing
14187 each process.
14188 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14189 * linux-low.h (struct process_info): Doc improvement.
14190 * mem-break.c (delete_all_breakpoints): New.
14191 * mem-break.h (delete_all_breakpoints): New prototype.
14192 * thread-db.c (find_first_thread): New.
14193 (thread_db_create_event): Call it instead of
14194 thread_db_find_new_threads. Clean up unused variables.
14195 (maybe_attach_thread): Remove first thread handling.
14196 (thread_db_find_new_threads): Use find_first_thread.
14197 (thread_db_get_tls_address): Likewise.
14198
14199 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14200
14201 * thread-db.c (thread_db_find_new_threads): Add prototype.
14202 (thread_db_create_event): Check for the main thread before adding
14203 a new thread.
14204 (maybe_attach_thread): Only enable event reporting if TID == 0.
14205 (thread_db_get_tls_address): Check for new threads.
14206
14207 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14208
14209 * linux-low.c (linux_create_inferior): Try execv before execvp.
14210 * spu-low.c (spu_create_inferior): Likewise.
14211
14212 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14213
14214 * linux-low.c (linux_create_inferior): Change execv to execvp.
14215 * spu-low.c (spu_create_inferior): Likewies.
14216
14217 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14218
14219 * Makefile.in (clean): Clean new files instead of deleted ones.
14220 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14221 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14222 rules.
14223 * configure.srv: Specify XML files and new regformats for MIPS and
14224 MIPS64 GNU/Linux.
14225 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14226 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14227 an entry for the restart register.
14228 (mips_cannot_fetch_register, mips_cannot_store_register)
14229 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14230 register names to match the XML descriptions.
14231 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14232 restart register instead of $0.
14233
14234 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14235 Markus Deuling <deuling@de.ibm.com>
14236
14237 * remote-utils.c (decode_xfer_write): New function.
14238 * server.h (decode_xfer_write): Add prototype.
14239 * server.c (handle_query): Add PACKET_LEN argument. Support
14240 qXfer:spu:read and qXfer:spu:write packets.
14241 (main): Pass packet_len to handle_query.
14242 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14243 * target.h (target_ops): Add qxfer_spu.
14244
14245 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14246
14247 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14248 accessing non-seekable spufs files.
14249
14250 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14251
14252 * server.c (handle_query): Add reply for qC packet.
14253
14254 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14255 Leo Zayas <lerele@champenstudios@com>
14256
14257 * server.h (check_remote_input_interrupt_request): New function.
14258 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14259 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14260 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14261 (check_remote_input_interrupt_request): New function.
14262 * server.h (check_remote_input_interrupt_request): Declare.
14263 * win32-low.c (winapi_DebugBreakProcess,
14264 winapi_GenerateConsoleCtrlEvent): New typedefs.
14265 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14266 to 250 ms.
14267 (win32_wait): Check for remote interrupt request
14268 with check_remote_input_interrupt_request.
14269 (win32_request_interrupt): New function.
14270 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14271
14272 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14273
14274 * win32-low.c (debug_registers_changed,
14275 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14276 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14277 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14278 (thread_rec): Get context using the low target.
14279 (child_add_thread): Call thread_added on the low target,
14280 which does the same thing.
14281 (regptr): Delete.
14282 (do_initial_child_stuff): Remove debug registers references.
14283 Set context using the low target. Resume threads after
14284 setting the contexts.
14285 (child_continue): Remove dead variable. Remove debug
14286 registers references.
14287 (child_fetch_inferior_registers): Go through the low target.
14288 (do_child_store_inferior_registers): Remove.
14289 (child_store_inferior_registers): Go through the low target.
14290 (win32_resume): Remove debug registers references.
14291 Set context using the low target.
14292 (handle_exception): Change return type to void. Don't record
14293 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14294 first chance exception.
14295 (get_child_debug_event): Change return type to void. Remove
14296 goto loop. Always return after waiting for debug event.
14297 (win32_wait): Convert to switch statement. Handle spurious
14298 events.
14299
14300 * win32-i386-low.c (debug_registers_changed,
14301 debug_registers_used): New.
14302 (initial_stuff): Rename to ...
14303 (i386_initial_stuff): ... this. Clear debug registers
14304 state variables.
14305 (store_debug_registers): Delete.
14306 (i386_get_thread_context): New.
14307 (load_debug_registers): Delete.
14308 (i386_set_thread_context): New.
14309 (i386_thread_added): New.
14310 (single_step): Rename to ...
14311 (i386_single_step): ... this.
14312 (do_fetch_inferior_registers): Rename to ...
14313 (i386_fetch_inferior_register): ... this.
14314 (i386_store_inferior_register): New.
14315 (the_low_target): Adapt to new interface.
14316
14317 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14318 (arm_get_thread_context): New.
14319 (arm_set_thread_context): New.
14320 (regptr): New.
14321 (do_fetch_inferior_registers): Rename to ...
14322 (arm_fetch_inferior_register): ... this.
14323 (arm_store_inferior_register): New.
14324 (arm_wince_breakpoint): Reimplement as unsigned long.
14325 (arm_wince_breakpoint_len): Define.
14326 (the_low_target): Adapt to new interface.
14327
14328 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14329 load_debug_registers. Add get_thread_context, set_thread_context,
14330 thread_added and store_inferior_register. Rename
14331 fetch_inferior_registers to fetch_inferior_register.
14332 (regptr): Remove declaration.
14333
14334 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14335
14336 * linux-low.c (linux_detach): Change return type to int. Return 0.
14337 * spu-low.c (spu_detach): Likewise.
14338
14339 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14340
14341 * target.h (target_ops): Change return type of detach to int.
14342 Add join.
14343 (join_inferior): New.
14344 * server.c (main): Don't skip detach support on mingw32.
14345 If the inferior doesn't support detaching return error.
14346 Call join_inferior instead of using waitpid.
14347 * linux-low.c (linux_join): New.
14348 (linux_target_op): Add linux_join.
14349 * spu-low.c (spu_join): New.
14350 (spu_target_ops): Add spu_join.
14351 * win32-low.c (win32_detach): Adapt to new interface.
14352 Reopen current_process_handle before detaching. Issue a child
14353 resume before detaching.
14354 (win32_join): New.
14355 (win32_target_op): Add win32_join.
14356
14357 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14358
14359 * win32-low.c (win32-attach): Fix return value.
14360 * target.h (target_ops): Describe ATTACH return values.
14361
14362 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14363
14364 * win32-low.c (GETPROCADDRESS): Define.
14365 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14366 (winapi_DebugSetProcessKillOnExit): Likewise.
14367 (win32_create_inferior): Force usage of ansi CreateProcessA.
14368 (win32_attach): Use GETPROCADDRESS.
14369 (win32_detach): Likewise.
14370
14371 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14372
14373 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14374
14375 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14376
14377 * win32-low.c: Commit leftover changes from 2007-03-29.
14378
14379 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14380
14381 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14382 fields short instead of int. Add explicit padding.
14383 (i387_cache_to_fsave): Remove unnecessary casts.
14384 (i387_fsave_to_cache): Doc fix.
14385 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14386
14387 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14388
14389 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14390 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14391
14392 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14393
14394 * configure.srv (arm*-*-mingw32ce*): Move near the other
14395 arm targets.
14396
14397 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14398
14399 * configure.ac: Add errno checking.
14400 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14401 sys/file.h and malloc.h.
14402 (AC_CHECK_DECLS): Add perror.
14403 (srv_mingwce): Handle.
14404 * configure.srv (i[34567]86-*-cygwin*): Add
14405 win32-i386-low.o to srv_tgtobj.
14406 (i[34567]86-*-mingw*): Likewise.
14407 (arm*-*-mingw32ce*): Add case.
14408 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14409 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14410 [__MINGW32CE__] (strerror): New function.
14411 [__MINGW32CE__] (errno): Define to GetLastError.
14412 [__MINGW32CE__] (COUNTOF): New macro.
14413 (remote_open): Remove extra close call.
14414 * mem-break.c (delete_breakpoint_at): New function.
14415 * mem-break.h (delete_breakpoint_at): Declare.
14416 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14417 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14418 [USE_WIN32API] (read, write): Add char* casts.
14419 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14420 * server.h: Include wincecompat.h on Windows CE.
14421 [HAVE_ERRNO_H]: Check.
14422 (perror): Declare if not declared.
14423 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14424 (perror_with_name): Remove errno declaration.
14425 * wincecompat.h: New.
14426 * wincecompat.c: New.
14427 * win32-low.h: New.
14428 * win32-arm-low.c: New.
14429 * win32-i386-low.c: New.
14430 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14431 (OUTMSG2): Make it safe.
14432 (_T): New macro.
14433 (COUNTOF): New macro.
14434 (NUM_REGS): Get it from the low target.
14435 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14436 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14437 (thread_rec): Let low target handle debug registers.
14438 (child_add_thread): Likewise.
14439 (child_init_thread_list): Likewise.
14440 (continue_one_thread): Likewise.
14441 (regptr): New.
14442 (do_child_fetch_inferior_registers): Move to ...
14443 * win32-i386-low.c: ... here, and rename to ...
14444 (do_fetch_inferior_registers): ... this.
14445 * win32-low.c (child_fetch_inferior_registers):
14446 Go through the low target.
14447 (do_child_store_inferior_registers): Use regptr.
14448 (strwinerror): New function.
14449 (win32_create_inferior): Handle Windows CE.
14450 Use strwinerror instead of strerror on Windows error
14451 codes. Add program to the error output.
14452 Don't close the main thread handle on Windows CE.
14453 (win32_attach): Use coredll.dll on Windows CE.
14454 (win32_kill): Close current process and current
14455 thread handles.
14456 (win32_detach): Use coredll.dll on Windows CE.
14457 (win32_resume): Let low target handle debug registers, and
14458 step request.
14459 (handle_exception): Add/Remove initial breakpoint. Avoid
14460 non-existant WSTOPSIG on Windows CE.
14461 (win32_read_inferior_memory): Cast to remove warning.
14462 (win32_arch_string): Go through the low target.
14463 (initialize_low): Call set_breakpoint_data with the low
14464 target's breakpoint.
14465 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14466 FOP_REGNUM, mappings): Move to ...
14467 * win32-i386-low.c: ... here.
14468 * win32-low.c (win32_thread_info): Move to ...
14469 * win32-low.h: ... here.
14470 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14471 win32-arm-low.c and wincecompat.c.
14472 (all:): Add $EXEEXT.
14473 (install-only:): Likewise.
14474 (gdbserver:): Likewise.
14475 (gdbreplay:): Likewise.
14476 * config.in: Regenerate.
14477 * configure: Regenerate.
14478
14479 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14480
14481 * win32-low.c: Rename typedef thread_info to
14482 win32_thread_info throughout.
14483
14484 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14485
14486 * win32-i386-low.c: Rename to ...
14487 * win32-low.c: ... this.
14488 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14489 * Makefile.in: Likewise.
14490
14491 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14492
14493 * remote-utils.c (monitor_output): Constify msg parameter.
14494 * server.h (monitor_output): Likewise.
14495 * win32-i386-low.c (handle_output_debug_string): New.
14496 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14497 handle_output_debug_string.
14498 (get_child_debug_event): Likewise.
14499
14500 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14501
14502 * server.c (main): Correct strtoul check.
14503
14504 2007-03-27 Jon Ringle <jon@ringle.org>
14505
14506 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14507
14508 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14509
14510 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14511
14512 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14513
14514 * terminal.h: Check HAVE_SGTTY_H.
14515
14516 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
14517
14518 * remote-utils.c (remote_open): Print out the assigned port number.
14519
14520 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14521
14522 * remote-utils.c (monitor_output): New function.
14523 * server.c (debug_threads): Define here.
14524 (monitor_show_help): New function.
14525 (handle_query): Handle qRcmd.
14526 (main): Do not handle 'd' packet.
14527 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14528 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14529 of debug_threads.
14530
14531 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14532
14533 * Makefile.in (EXEEXT): New.
14534 (clean): Use $(EXEEXT).
14535
14536 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14537
14538 * target.h (target_ops): Rename send_signal to request_interrupt,
14539 and remove enum target_signal parameter.
14540 * linux-low.c (linux_request_interrupt): Rename from
14541 linux_send_signal, and always send SIGINT.
14542 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14543 and always send SIGINT.
14544 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14545 of send_signal.
14546 (input_interrupt): Likewise.
14547
14548 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14549
14550 * server.c (get_features_xml): Check if target implemented
14551 arch_string.
14552 * win32-i386-low.c (win32_arch_string): New.
14553 (win32_target_ops): Add win32_arch_string as arch_string member.
14554
14555 2007-02-22 Markus Deuling <deuling@de.ibm.com>
14556
14557 * spu-low.c (spu_arch_string): New.
14558 (spu_target_ops): Add spu_arch_string.
14559
14560 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14561
14562 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14563 * configure.ac: Do not check for terminal.h.
14564 * configure, config.in: Regenerated.
14565
14566 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14567
14568 * Makefile.in (OBS): Add $(XML_BUILTIN).
14569 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14570 (clean): Update.
14571 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14572 (arm-with-iwmmxt.c): New.
14573 * config.in, configure: Regenerate.
14574 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14575 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14576 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14577 (arm*-*-linux*): Add iWMMXt and regset support.
14578 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14579 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14580 (arm_store_wmmxregset, target_regsets): New.
14581 * server.c (get_features_xml): Take annex argument. Check builtin
14582 XML documents.
14583 (handle_query): Handle multiple annexes.
14584
14585 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14586
14587 * remote-utils.c [USE_WIN32API] (read, write): Define.
14588 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14589 write.
14590
14591 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14592
14593 * linux-i386-low.c (the_low_target): Set arch_string.
14594 * linux-x86-64-low.c (the_low_target): Likewise.
14595 * linux-low.c (linux_arch_string): New.
14596 (linux_target_ops): Add it.
14597 * linux-low.h (struct linux_target_ops): Add arch_string.
14598 * server.c (write_qxfer_response): Use const void * for DATA.
14599 (get_features_xml): New.
14600 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14601 * target.h (struct target_ops): Add arch_string method.
14602
14603 2007-01-03 Denis Pilat <denis.pilat@st.com>
14604 Daniel Jacobowitz <dan@codesourcery.com>
14605
14606 * linux-low.c (linux_kill): Handle being called with no threads.
14607 * win32-i386-low.c (win32_kill): Likewise.
14608 (get_child_debug_event): Clear current_process_handle.
14609
14610 2006-12-30 Denis PILAT <denis.pilat@st.com>
14611 Daniel Jacobowitz <dan@codesourcery.com>
14612
14613 * remote-utils.c (remote_open): Check the type of specified
14614 serial port devices before opening them.
14615 * server.c (main): Kill the inferior if an error occurs during
14616 the first remote_open.
14617
14618 2006-12-05 Markus Deuling <deuling@de.ibm.com>
14619
14620 * README: Update supported targets.
14621
14622 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14623
14624 * Makefile.in (clean): Remove reg-mips64.c.
14625 (reg-mips64.c, reg-mips64.o): New rules.
14626 * configure.srv: Handle mips64. Include regset support for mips.
14627 * linux-mips-low.c (union mips_register): New.
14628 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14629 (mips_breakpoint, mips_breakpoint_at): Use int.
14630 (mips_collect_register, mips_supply_register)
14631 (mips_collect_register_32bit, mips_supply_register_32bit)
14632 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14633 (mips_store_fpregset, target_regsets): New.
14634 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14635
14636 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14637
14638 * configure.srv: Add target "spu*-*-*".
14639 * Makefile.in (clean): Remove reg-spu.c.
14640 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14641 * spu-low.c: New file.
14642
14643 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14644
14645 * configure.ac: Correct td_thr_tls_get_addr test.
14646 * configure: Regenerated.
14647
14648 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14649
14650 * linux-low.c (linux_wait_for_event): Reformat. Use the
14651 pass_signals array.
14652 * remote-utils.c (decode_address_to_semicolon): New.
14653 * server.c (pass_signals, handle_general_set): New.
14654 (handle_query): Mention QPassSignals for qSupported.
14655 (main): Call handle_general_set.
14656 * server.h (pass_signals, decode_address_to_semicolon): New.
14657
14658 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14659
14660 * server.c (handle_query): Correct error handling for read_auxv.
14661
14662 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14663
14664 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14665 and srv_linux_thread_db to yes.
14666 * linux-s390-low.c (s390_fill_gregset): New function.
14667 (target_regsets): Define data structure.
14668
14669 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14670
14671 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14672 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14673 * config.in, configure: Regenerated.
14674 * inferiors.c (gdb_id_to_thread): New function.
14675 (gdb_id_to_thread_id): Use it.
14676 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14677 * linux-low.h (struct process_info): Add th member.
14678 (thread_db_get_tls_address): New prototype.
14679 * remote-utils.c (decode_address): Make non-static.
14680 * server.c (handle_query): Handle qGetTLSAddr.
14681 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14682 * target.h (struct target_ops): Add get_tls_address.
14683 * thread-db.c (maybe_attach_thread): Save the thread handle.
14684 (thread_db_get_tls_address): New.
14685
14686 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14687
14688 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14689 (linux_resume_one_process): Take a siginfo_t *. Update all
14690 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14691 (struct pending_signals): Add a siginfo_t.
14692 (linux_wait_for_process): Always set last_status.
14693 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14694 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14695 * linux-low.h (struct process_info): Add last_status.
14696
14697 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14698
14699 * remote-utils.c (try_rle): New function.
14700 (putpkt_binary): Use it.
14701
14702 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14703
14704 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14705 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14706 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14707 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14708 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14709 point registers.
14710
14711 2006-08-08 Richard Sandiford <richard@codesourcery.com>
14712
14713 * server.c (terminal_fd): New variable.
14714 (old_foreground_pgrp): Likewise.
14715 (restore_old_foreground_pgrp): New function.
14716 (start_inferior): Record the terminal file descriptor in terminal_fd
14717 and its original foreground group in old_foreground_pgrp. Register
14718 restore_old_foreground_pgrp with atexit().
14719
14720 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14721
14722 * server.c (handle_query): Correct qPart to qXfer.
14723
14724 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14725
14726 * configure.ac: Check for more headers which are missing on
14727 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14728 * configure.srv: Add Cygwin and mingw32.
14729 * remote-utils.c: Don't include headers unconditionally which
14730 are missing on mingw32. Include <winsock.h> for mingw32.
14731 (remote_open): Adjust for mingw32 support. Flush
14732 standard error after writing to it.
14733 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14734 (unblock_async_io, enable_async_io, disable_async_io)
14735 (readchar, getpkt): Update for Winsock support.
14736 (prepare_resume_reply): Expect a protocol signal number.
14737 * server.c: Disable <sys/wait.h> on mingw32.
14738 (start_inferior): Adjust for mingw32 support. Flush
14739 standard error after writing to it.
14740 (attach_inferior): Likewise. Use protocol signal
14741 numbers.
14742 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14743 and names.
14744 * win32-i386-low.c: New file.
14745 * Makefile.in (XM_CLIBS): Set.
14746 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14747 (win32-i386-low.o): New dependency rule.
14748 * linux-low.c (linux_wait): Use target signal numbers.
14749 * target.h (struct target_ops): Doc fix.
14750 * server.h (target_signal_to_name): New prototype.
14751 * gdbreplay.c: Don't include headers unconditionally which
14752 are missing on mingw32. Include <winsock.h> for mingw32.
14753 (remote_close, remote_open): Adjust for Winsock support.
14754 * configure, config.in: Regenerated.
14755
14756 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14757
14758 * server.c (decode_xfer_read, write_qxfer_response): New.
14759 (handle_query): Take a packet length argument. Handle
14760 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14761 the qSupported response.
14762 (main): Update call to handle_query.
14763
14764 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14765
14766 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14767 (putpkt_binary): Renamed from putpkt and adjusted for binary
14768 data.
14769 (putpkt): New wrapper for putpkt_binary.
14770 (readchar): Don't mask off the high bit.
14771 (decode_X_packet): New function.
14772 * server.c (main): Call putpkt_binary if a handler sets the packet
14773 length. Save the length of the incoming packet. Handle 'X'.
14774 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14775
14776 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14777
14778 * server.c (handle_query): Handle qSupported.
14779
14780 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14781
14782 * remote-utils.c (all_symbols_looked_up): New variable.
14783 (look_up_one_symbol): Check it.
14784 * server.h (look_up_one_symbol): New declaration.
14785 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14786
14787 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14788
14789 * Makefile.in (linux-arm-low.o): Update dependencies.
14790 * linux-arm-low.c: Include "gdb_proc_service.h".
14791 (PTRACE_GET_THREAD_AREA): Define.
14792 (ps_get_thread_area): New function.
14793
14794 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14795
14796 * configure.srv (m68k*-*-uclinux*): New target.
14797 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14798 (linux_resume_one_process): Remove extraneous cast.
14799 (linux_read_offsets): New.
14800 (linux_target_op): Add linux_read_offsets on mmuless systems.
14801 * server.c (handle_query): Add qOffsets logic.
14802 * target.h (struct target_ops): Add read_offsets.
14803
14804 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14805
14806 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14807 (PTRACE_GET_THREAD_AREA): Define.
14808 (ps_get_thread_area): New function.
14809 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14810 (linux-x86-64-low.o): Update.
14811
14812 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14813
14814 * configure.ac: Remove checks for prfpregset_t.
14815 * gdb_proc_service.h: New file.
14816 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14817 new "gdb_proc_service.h".
14818 * proc-service.c: Likewise.
14819 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14820 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14821 * Makefile.in (gdb_proc_service_h): Updated.
14822 * configure, config.in: Regenerated.
14823
14824 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14825
14826 * remote-utils.c (prepare_resume_reply): Move declaration
14827 of gdb_id_from_wait to the top of the block.
14828
14829 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14830
14831 * linux-low.c (regsets_store_inferior_registers): Read the regset
14832 from the target before filling it.
14833
14834 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14835
14836 * server.c (attach_inferior): Return SIGTRAP for a successful
14837 attach.
14838
14839 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14840
14841 * Makefile.in (OBS): Add version.o.
14842 (STAGESTUFF): Delete.
14843 (version.o): Add dependencies.
14844 (version.c): Replace rule.
14845 (clean): Remove version.c.
14846 * server.c (gdbserver_version): New.
14847 (gdbserver_usage): Use printf.
14848 (main): Handle --version and --help.
14849 * server.h (version, host_name): Add declarations.
14850
14851 2005-12-23 Eli Zaretskii <eliz@gnu.org>
14852
14853 * linux-arm-low.c:
14854 * linux-arm-low.c:
14855 * inferiors.c:
14856 * i387-fp.h:
14857 * i387-fp.c:
14858 * gdbreplay.c:
14859 * regcache.c:
14860 * proc-service.c:
14861 * mem-break.h:
14862 * mem-break.c:
14863 * linux-x86-64-low.c:
14864 * linux-sh-low.c:
14865 * linux-s390-low.c:
14866 * linux-ppc64-low.c:
14867 * linux-ppc-low.c:
14868 * linux-mips-low.c:
14869 * linux-m68k-low.c:
14870 * linux-m32r-low.c:
14871 * linux-low.h:
14872 * linux-low.c:
14873 * linux-ia64-low.c:
14874 * linux-i386-low.c:
14875 * linux-crisv32-low.c:
14876 * thread-db.c:
14877 * terminal.h:
14878 * target.h:
14879 * target.c:
14880 * server.h:
14881 * server.c:
14882 * remote-utils.c:
14883 * regcache.h:
14884 * utils.c:
14885 * Makefile.in:
14886 * configure.ac:
14887 * gdbserver.1: Add (C) after Copyright. Update the FSF
14888 address.
14889
14890 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14891
14892 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14893 (arm_breakpoint_at): Recognize both breakpoints.
14894 (the_low_target): Use the correct breakpoint instruction.
14895
14896 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14897
14898 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14899 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14900 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14901 (the_low_target): Update.
14902
14903 2005-10-25 Andreas Schwab <schwab@suse.de>
14904
14905 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14906
14907 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14908 (ia64_num_regs): Reduce to 462.
14909
14910 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14911
14912 * acinclude.m4: Correct quoting.
14913 * aclocal.m4: Regenerated.
14914
14915 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14916 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14917 (thread_db_init): Call thread_db_err_str.
14918 * configure.ac: Check for TD_VERSION.
14919 * config.in, configure: Regenerated.
14920
14921 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14922
14923 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14924
14925 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14926
14927 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14928 is not available. Define HAVE_PTRACE_GETREGS if it is.
14929 * config.in, configure: Regenerated.
14930 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14931 * linux-i386-low.c, linux-m68k-low.c: Update to use
14932 HAVE_PTRACE_GETREGS.
14933 * linux-low.c (regsets_fetch_inferior_registers)
14934 (regsets_store_inferior_registers): Only return 0 if we processed
14935 GENERAL_REGS.
14936 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14937 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14938
14939 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14940
14941 * inferiors.c (struct thread_info): Add gdb_id.
14942 (add_thread): Add gdb_id argument.
14943 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14944 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14945 calls to add_thread.
14946 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14947 * server.c (handle_query): Use thread_to_gdb_id.
14948 (handle_v_cont, main): Use gdb_id_to_thread_id.
14949 * server.h (add_thread): Update prototype.
14950 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14951 prototypes.
14952
14953 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14954
14955 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14956 left-padded registers.
14957 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14958 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14959
14960 2005-07-01 Steve Ellcey <sje@cup.hp.com>
14961
14962 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14963 * configure: Regenerate.
14964 * config.in: Regenerate.
14965 * server.h (NEED_DECLARATION_STRERROR):
14966 Replace with !HAVE_DECL_STRERROR.
14967
14968 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
14969
14970 * linux-low.c (linux_wait, linux_send_signal): Don't test
14971 an unsigned long variable for > 0 if it could be MAX_ULONG.
14972 * server.c (myresume): Likewise.
14973 * target.c (set_desired_inferior): Likewise.
14974
14975 2005-06-13 Mark Kettenis <kettenis@gnu.org>
14976
14977 * configure.ac: Simplify and improve check for socklen_t.
14978 * configure, config.in: Regenerate.
14979
14980 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
14981
14982 * acconfig.h: Remove.
14983 * configure.ac: Add a test for socklen_t. Use three-argument
14984 AC_DEFINE throughout.
14985 * config.in: Regenerated using autoheader 2.59.
14986 * configure: Regenerated.
14987
14988 * gdbreplay.c (socklen_t): Provide a default.
14989 (remote_open): Use socklen_t.
14990 * remote-utils.c (socklen_t): Provide a default.
14991 (remote_open): Use socklen_t.
14992 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14993 unsigned char.
14994
14995 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14996 char for buffers.
14997 * linux-low.c (linux_read_memory, linux_write_memory)
14998 (linux_read_auxv): Likewise.
14999 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15000 (check_mem_write): Likewise.
15001 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15002 Likewise.
15003 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15004 (registers_from_string, register_data): Likewise.
15005 * server.c (handle_query, main): Likewise.
15006 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15007 (decode_M_packet): Likewise.
15008 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15009 * target.h (struct target_ops): Update read_memory, write_memory,
15010 and read_auxv.
15011 (read_inferior_memory, write_inferior_memory): Update.
15012 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15013 to unsigned char *.
15014 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15015 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15016 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15017 linux-s390-low.c, linux-sh-low.c: Update for changes in
15018 read_inferior_memory and the_low_target->breakpoint.
15019
15020 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15021
15022 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15023 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15024 * configure.srv: Add powerpc64-*-linux*.
15025 * linux-ppc64-low.c: New file.
15026
15027 2005-05-23 Orjan Friberg <orjanf@axis.com>
15028
15029 * linux-cris-low.c: New file with support for CRIS.
15030 * linux-crisv32-low.c: Ditto for CRISv32.
15031 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15032 (clean): Add reg-cris.c and reg-crisv32.c.
15033 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15034 reg-crisv32.o, and reg-crisv32.c to make rules.
15035 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15036 recognized targets.
15037
15038 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15039
15040 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15041 of sizeof (PTRACE_XFER_TYPE).
15042 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15043
15044 2005-05-12 Orjan Friberg <orjanf@axis.com>
15045
15046 * target.h (struct target_ops): Add insert_watchpoint,
15047 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15048 pointers for hardware watchpoint support.
15049 * linux-low.h (struct linux_target_ops): Ditto.
15050 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15051 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15052 to linux_target_ops.
15053 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15054 reply packet.
15055 * server.c (main): Recognize 'Z' and 'z' packets.
15056
15057 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15058
15059 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15060 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15061 (the_low_target): Add new members.
15062
15063 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15064
15065 * proc-service.c (ps_lgetregs): Search all_processes instead of
15066 all_threads.
15067
15068 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15069
15070 * server.c (start_inferior): Change return type to int.
15071 (attach_inferior): Change sigptr to int *.
15072 (handle_v_cont, handle_v_requests): Change signal to int *.
15073 (main): Change signal to int.
15074
15075 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15076
15077 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15078 * configure.srv: Add m32r*-*-linux*.
15079 * linux-m32r-low.c: New file.
15080
15081 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15082
15083 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15084
15085 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15086
15087 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15088 Take unsigned long arguments for PIDs.
15089 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15090 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15091 (wait_for_sigstop, linux_resume_one_process)
15092 (regsets_fetch_inferior_registers, linux_send_signal)
15093 (linux_read_auxv): Likewise. Update the types of variables holding
15094 PIDs. Update format string specifiers.
15095 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15096 * remote-utils.c (prepare_resume_reply): Likewise.
15097 * server.c (cont_thread, general_thread, step_thread)
15098 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15099 unsigned long.
15100 (handle_query): Update format specifiers.
15101 (handle_v_cont, main): Use strtoul for thread IDs.
15102 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15103 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15104 (general_thread, step_thread, thread_from_wait)
15105 (old_thread_from_wait): Update.
15106 * target.h (struct thread_resume): Use unsigned long for THREAD.
15107 (struct target_ops): Use unsigned long for arguments to attach and
15108 thread_alive.
15109
15110 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15111
15112 * acinclude.m4: Include bfd/bfd.m4 directly.
15113 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15114 <agriffis@toolchain.org>.
15115 * aclocal.m4, configure: Regenerated.
15116
15117 2005-01-07 Andrew Cagney <cagney@gnu.org>
15118
15119 * configure.ac: Rename configure.in, require autoconf 2.59.
15120 * configure: Re-generate.
15121
15122 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15123
15124 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15125 LIBS when finished.
15126 * aclocal.m4: Regenerated.
15127 * configure: Regenerated.
15128
15129 2004-11-21 Andreas Schwab <schwab@suse.de>
15130
15131 * linux-m68k-low.c (m68k_num_gregs): Define.
15132 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15133 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15134 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15135 (m68k_breakpoint_at): New. Add to the_low_target.
15136
15137 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15138 srv_linux_thread_db to yes.
15139
15140 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15141
15142 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15143 (ARCH_SET_FS): Likewise.
15144 (ARCH_GET_FS): Likewise.
15145 (ARCH_GET_GS): Likewise.
15146
15147 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15148
15149 * linux-i386-low.c (ps_get_thread_area): New.
15150 * linux-x86-64-low.c (ps_get_thread_area): New.
15151 * linux-low.c: Include <sys/syscall.h>.
15152 (linux_kill_one_process): Don't kill the first thread here.
15153 (linux_kill): Kill the first thread here.
15154 (kill_lwp): New function.
15155 (send_sigstop, linux_send_signal): Use it.
15156 * proc-service.c: Clean up #ifdefs.
15157 (fpregset_info): Delete.
15158 (ps_lgetregs): Update and enable implementation.
15159 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15160 implementations.
15161 * remote-utils.c (struct sym_cache, symbol_cache): New.
15162 (input_interrupt): Print a clearer message.
15163 (async_io_enabled): New variable.
15164 (enable_async_io, disable_async_io): Use it. Update comments.
15165 (look_up_one_symbol): Use the symbol cache.
15166 * thread-db.c (thread_db_look_up_symbols): New function.
15167 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15168
15169 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15170
15171 * configure.in: Test for -rdynamic.
15172 * configure: Regenerated.
15173 * Makefile (INTERNAL_LDFLAGS): New.
15174 (gdbserver, gdbreplay): Use it.
15175
15176 2004-09-02 Andrew Cagney <cagney@gnu.org>
15177
15178 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15179
15180 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15181
15182 * linux-low.c (linux_wait): Clear all_processes list also.
15183
15184 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15185
15186 * linux-low.c: Include <errno.h>. Remove extern declaration of
15187 errno.
15188
15189 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15190
15191 * gdbreplay.c, server.h, utils.c: Update copyright years.
15192
15193 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15194
15195 * server.c (main): Print child status or termination signal from
15196 variable 'signal', not 'sig'.
15197
15198 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15199
15200 * linux-low.c (linux_read_memory): Change return type to
15201 int. Check for and return error from ptrace().
15202 * target.c (read_inferior_memory): Change return type to int. Pass
15203 back return status from the_target->read_memory().
15204 * target.h (struct target_ops): Adapt *read_memory() prototype.
15205 Update comment.
15206 (read_inferior_memory): Adapt prototype.
15207 * server.c (main): Return an error packet if
15208 read_inferior_memory() returns an error.
15209
15210 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15211
15212 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15213 Unify with other clean targets.
15214
15215 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15216
15217 * server.c (handle_v_cont): Call set_desired_inferior.
15218
15219 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15220
15221 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15222
15223 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15224
15225 * linux-low.c (linux_wait): Unblock async I/O.
15226 (linux_resume): Block and enable async I/O.
15227 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15228 * server.h (block_async_io, unblock_async_io): Add prototypes.
15229
15230 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15231
15232 * remote-utils.c (remote_open): Print a status notice after
15233 opening a TCP port.
15234 * server.c (attach_inferior): Print a status notice after
15235 attaching.
15236
15237 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15238
15239 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15240
15241 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15242
15243 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15244 error packet.
15245 * server.c, target.h: Update copyright years.
15246
15247 2004-02-25 Roland McGrath <roland@redhat.com>
15248
15249 * target.h (struct target_ops): New member `read_auxv'.
15250 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15251 * linux-low.c (linux_read_auxv): New function.
15252 (linux_target_ops): Initialize `read_auxv' member to that.
15253
15254 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15255
15256 Committed by Jim Blandy <jimb@redhat.com>.
15257
15258 * linux-s390-low.c (s390_num_regs): Update.
15259 (s390_regmap): Remove control registers. Use __s390x__ predefine
15260 instead of GPR_SIZE to distiguish s390 and s390x targets.
15261
15262 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15263
15264 * linux-low.c: Update copyright year.
15265 (check_removed_breakpoint): Clear pending_is_breakpoint.
15266 (linux_set_resume_request, linux_queue_one_thread)
15267 (resume_status_pending_p): New functions.
15268 (linux_continue_one_thread): Use process->resume.
15269 (linux_resume): Only resume threads if there are no pending events.
15270 * linux-low.h (struct process_info): Add resume request
15271 pointer.
15272
15273 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15274
15275 * regcache.c (new_register_cache): Clear the allocated register
15276 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15277
15278 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15279
15280 * linux-low.c (linux_resume): Take a struct thread_resume *
15281 argument.
15282 (linux_wait): Update call.
15283 (resume_ptr): New static variable.
15284 (linux_continue_one_thread): Renamed from
15285 linux_continue_one_process. Use resume_ptr.
15286 (linux_resume): Use linux_continue_one_thread.
15287 * server.c (handle_v_cont, handle_v_requests): New functions.
15288 (myresume): New function.
15289 (main): Handle 'v' case.
15290 * target.h (struct thread_resume): New type.
15291 (struct target_ops): Change argument of "resume" to struct
15292 thread_resume *.
15293 (myresume): Delete macro.
15294
15295 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15296
15297 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15298 (uninstall): Support DESTDIR.
15299
15300 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15301
15302 * configure.srv: Add xscale*linux copy of arm*linux entry.
15303
15304 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15305
15306 * linux-arm-low.c (arm_reinsert_addr): New function.
15307 (the_low_target): Add arm_reinsert_addr.
15308
15309 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15310
15311 * mem-break.c: Remove whitespace at end of file.
15312
15313 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15314
15315 * configure.in: Check whether we need to prototype strerror.
15316 * server.h: Optionally prototype strerror.
15317 * gdbreplay.c (perror_with_name): Use strerror.
15318 * linux-low.c (linux_attach_lwp): Use strerror.
15319 * utils.c (perror_with_name): Use strerror.
15320 * config.in, configure: Regenerated.
15321
15322 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15323
15324 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15325 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15326
15327 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15328
15329 * Makefile.in (SFILES): Update.
15330 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15331 low-sun3.c: Remove files.
15332
15333 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15334
15335 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15336 (linux_detach_one_process, linux_detach): New functions.
15337 (linux_target_ops): Add linux_detach.
15338 * server.c (main): Handle 'D' packet.
15339 * target.h (struct target_ops): Add "detach" member.
15340 (detach_inferior): Define.
15341
15342 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15343
15344 From Kelley Cook <kelleycook@wideopenwest.com>:
15345 * configure.srv: Accept i[34567]86 variants.
15346
15347 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15348
15349 * linux-low.c (linux_wait_for_event): Correct comment typos.
15350 (linux_resume_one_process): Call check_removed_breakpoint.
15351 (linux_send_signal): New function.
15352 (linux_target_ops): Add linux_send_signal.
15353 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15354 of kill.
15355 * target.h (struct target_ops): Add send_signal.
15356
15357 2003-05-29 Jim Blandy <jimb@redhat.com>
15358
15359 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15360 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15361 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15362 away part of the register's value.
15363
15364 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15365
15366 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15367 (linux_wait_for_event, linux_init_signals): Likewise.
15368
15369 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15370
15371 * configure.in: Check for stdlib.h.
15372 * configure: Regenerated.
15373 * config.in: Regenerated.
15374
15375 2003-01-04 Andreas Schwab <schwab@suse.de>
15376
15377 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15378
15379 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15380
15381 * Makefile.in: Remove obsolete code.
15382
15383 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15384
15385 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15386 defined(PT_FPR0_HI).
15387
15388 2002-11-17 Stuart Hughes <seh@zee2.com>
15389
15390 * linux-arm-low.c (arm_num_regs): Increase.
15391 (arm_regmap): Include status register.
15392
15393 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15394
15395 * linux-low.c (register_addr): Remove incorrect -1 check.
15396
15397 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15398
15399 * linux-low.c (linux_create_inferior): Call setpgid. Return
15400 the new PID.
15401 (unstopped_p, linux_signal_pid): Remove.
15402 (linux_target_ops): Remove linux_signal_pid.
15403 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15404 global instead of target method.
15405 * target.h (struct target_ops): Remove signal_pid. Update comment
15406 for create_inferior.
15407 * server.c (signal_pid): New variable.
15408 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15409 gdbserver. Set the child to be the foreground process group.
15410 (attach_inferior): Set signal_pid.
15411
15412 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
15413
15414 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15415
15416 2002-08-20 Jim Blandy <jimb@redhat.com>
15417
15418 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15419 default for this.
15420
15421 2002-08-01 Andrew Cagney <cagney@redhat.com>
15422
15423 * Makefile.in: Make chill references obsolete.
15424
15425 2002-07-24 Kevin Buettner <kevinb@redhat.com>
15426
15427 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15428 * configure: Regenerate.
15429 * config.in: Regenerate.
15430
15431 2002-07-09 David O'Brien <obrien@FreeBSD.org>
15432
15433 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15434 (perror_with_name, remote_close, remote_open, expect, play): Static.
15435
15436 2002-07-04 Michal Ludvig <mludvig@suse.cz>
15437
15438 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
15439 byte offsets instead of an array of indexes.
15440 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15441
15442 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
15443
15444 * regcache.c: Add comment.
15445
15446 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
15447
15448 * thread-db.c: New file.
15449 * proc-service.c: New file.
15450 * acinclude.m4: New file.
15451 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15452 proc-service.o, and thread-db.o.
15453 (linux-low.o): Add USE_THREAD_DB.
15454 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15455 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15456 * aclocal.m4: Regenerated.
15457 * config.in: Regenerated.
15458 * configure: Regenerated.
15459 * configure.in: Check for proc_service.h, sys/procfs.h,
15460 thread_db.h, and linux/elf.h headrs.
15461 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15462 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15463 Check for -lthread_db and thread support.
15464 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15465 PowerPC, and SuperH.
15466 * i387-fp.c: Constify arguments.
15467 * i387-fp.h: Likewise.
15468 * inferiors.c: (struct thread_info): Renamed from
15469 `struct inferior_info'. Remove PID member. Use generic inferior
15470 list header. All uses updated.
15471 (inferiors, signal_pid): Removed.
15472 (all_threads): New variable.
15473 (get_thread): Define.
15474 (add_inferior_to_list): New function.
15475 (for_each_inferior): New function.
15476 (change_inferior_id): New function.
15477 (add_inferior): Removed.
15478 (remove_inferior): New function.
15479 (add_thread): New function.
15480 (free_one_thread): New function.
15481 (remove_thread): New function.
15482 (clear_inferiors): Use for_each_inferior and free_one_thread.
15483 (find_inferior): New function.
15484 (find_inferior_id): New function.
15485 (inferior_target_data): Update argument type.
15486 (set_inferior_target_data): Likewise.
15487 (inferior_regcache_data): Likewise.
15488 (set_inferior_regcache_data): Likewise.
15489 * linux-low.c (linux_bp_reinsert): Remove.
15490 (all_processes, stopping_threads, using_thrads)
15491 (struct pending_signals, debug_threads, pid_of): New.
15492 (inferior_pid): Replace with macro.
15493 (struct inferior_linux_data): Remove.
15494 (get_stop_pc, add_process): New functions.
15495 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15496 Use add_process and add_thread.
15497 (linux_attach_lwp): New function, based on old linux_attach. Use
15498 add_process and add_thread. Set stop_expected for new threads.
15499 (linux_attach): New function.
15500 (linux_kill_one_process): New function.
15501 (linux_kill): Kill all LWPs.
15502 (linux_thread_alive): Use find_inferior_id.
15503 (check_removed_breakpoints, status_pending_p): New functions.
15504 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15505 Update. Use WNOHANG. Wait for cloned processes also. Update process
15506 struct for the found process.
15507 (linux_wait_for_event): New function.
15508 (linux_wait): Use it. Support LWPs.
15509 (send_sigstop, wait_for_sigstop, stop_all_processes)
15510 (linux_resume_one_process, linux_continue_one_process): New functions.
15511 (linux_resume): Support LWPs.
15512 (REGISTER_RAW_SIZE): Remove.
15513 (fetch_register): Use register_size instead. Call supply_register.
15514 (usr_store_inferior_registers): Likewise. Call collect_register.
15515 Fix recursive case.
15516 (regsets_fetch_inferior_registers): Improve error message.
15517 (regsets_store_inferior_registers): Add debugging.
15518 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15519 (unstopped_p, linux_signal_pid): New functions.
15520 (linux_target_ops): Add linux_signal_pid.
15521 (linux_init_signals): New function.
15522 (initialize_low): Call it. Initialize using_threads.
15523 * regcache.c (inferior_regcache_data): Add valid
15524 flag.
15525 (get_regcache): Fetch registers lazily. Add fetch argument
15526 and update all callers.
15527 (regcache_invalidate_one, regcache_invalidate): New
15528 functions.
15529 (new_register_cache): Renamed from create_register_cache.
15530 Return the new regcache.
15531 (free_register_cache): Change argument to a void *.
15532 (registers_to_string, registers_from_string): Call get_regcache
15533 with fetch flag set.
15534 (register_data): Make static. Pass fetch flag to get_regcache.
15535 (supply_register): Call get_regcache with fetch flag clear.
15536 (collect_register): Call get_regcache with fetch flag set.
15537 (collect_register_as_string): New function.
15538 * regcache.h: Update.
15539 * remote-utils.c (putpkt): Flush after debug output and use
15540 stderr.
15541 Handle input interrupts while waiting for an ACK.
15542 (input_interrupt): Use signal_pid method.
15543 (getpkt): Flush after debug output and use stderr.
15544 (outreg): Use collect_register_as_string.
15545 (new_thread_notify, dead_thread_notify): New functions.
15546 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15547 and general_thread.
15548 (look_up_one_symbol): Flush after debug output.
15549 * server.c (step_thread, server_waiting): New variables.
15550 (start_inferior): Don't use signal_pid. Update call to mywait.
15551 (attach_inferior): Update call to mywait.
15552 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15553 (main): Don't fetch/store registers explicitly. Use
15554 set_desired_inferior. Support proposed ``Hs'' packet. Update
15555 calls to mywait.
15556 * server.h: Update.
15557 (struct inferior_list, struct_inferior_list_entry): New.
15558 * target.c (set_desired_inferior): New.
15559 (write_inferior_memory): Constify.
15560 (mywait): New function.
15561 * target.h: Update.
15562 (struct target_ops): New signal_pid method.
15563 (mywait): Removed macro, added prototype.
15564
15565 * linux-low.h (regset_func): Removed.
15566 (regset_fill_func, regset_store_func): New.
15567 (enum regset_type): New.
15568 (struct regset_info): Add type field. Use new operation types.
15569 (struct linux_target_ops): stop_pc renamed to get_pc.
15570 Add decr_pc_after_break and breakpoint_at.
15571 (get_process, get_thread_proess, get_process_thread)
15572 (strut process_info, all_processes, linux_attach_lwp)
15573 (thread_db_init): New.
15574
15575 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15576 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15577 (the_low_target): Add new members.
15578 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15579 (i386_store_fpxregset): Constify.
15580 (target_regsets): Add new kind identifier.
15581 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15582 (i386_set_pc): Add debugging.
15583 (i386_breakpoint_at): New function.
15584 (the_low_target): Add new members.
15585 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15586 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15587 (mips_breakpoint_at): New.
15588 (the_low_target): Add new members.
15589 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15590 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15591 (the_low_target): Add new members.
15592 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15593 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15594 (the_low_target): Add new members.
15595 * linux-x86-64-low.c (target_regsets): Add new kind
15596 identifier.
15597
15598 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
15599
15600 From Martin Pool <mbp@samba.org>:
15601 * server.c (gdbserver_usage): New function.
15602 (main): Call it.
15603
15604 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
15605
15606 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15607 stop_at -> stop_pc.
15608
15609 2002-05-04 Andrew Cagney <ac131313@redhat.com>
15610
15611 * Makefile.in: Remove obsolete code.
15612
15613 2002-04-24 Michal Ludvig <mludvig@suse.cz>
15614
15615 * linux-low.c (regsets_fetch_inferior_registers),
15616 (regsets_store_inferior_registers): Removed cast to int from
15617 ptrace() calls.
15618 * regcache.h: Added declaration of struct inferior_info.
15619
15620 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15621
15622 * inferiors.c (struct inferior_info): Add regcache_data.
15623 (add_inferior): Call create_register_cache.
15624 (clear_inferiors): Call free_register_cache.
15625 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15626 * regcache.c (struct inferior_regcache_data): New.
15627 (registers): Remove.
15628 (get_regcache): New function.
15629 (create_register_cache, free_register_cache): New functions.
15630 (set_register_cache): Don't initialize the register cache here.
15631 (registers_to_string, registers_from_string, register_data): Call
15632 get_regcache.
15633 * regcache.h: Add prototypes.
15634 * server.h: Likewise.
15635
15636 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
15637
15638 * mem-break.c: New file.
15639 * mem-break.h: New file.
15640 * Makefile.in: Add mem-break.o rule; update server.h
15641 dependencies.
15642 * inferiors.c (struct inferior_info): Add target_data
15643 member.
15644 (clear_inferiors): Free target_data member if set.
15645 (inferior_target_data, set_inferior_target_data): New functions.
15646 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15647 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15648 * linux-low.c (linux_bp_reinsert): New variable.
15649 (struct inferior_linux_data): New.
15650 (linux_create_inferior): Use set_inferior_target_data.
15651 (linux_attach): Likewise. Call add_inferior.
15652 (linux_wait_for_one_inferior): New function.
15653 (linux_wait): Call it.
15654 (linux_write_memory): Add const.
15655 (initialize_low): Call set_breakpoint_data.
15656 * linux-low.h (struct linux_target_ops): Add breakpoint
15657 handling members.
15658 * server.c (attach_inferior): Remove extra add_inferior
15659 call.
15660 * server.h: Include mem-break.h. Update inferior.c
15661 prototypes.
15662 * target.c (read_inferior_memory)
15663 (write_inferior_memory): New functions.
15664 * target.h (read_inferior_memory)
15665 (write_inferior_memory): Change macros to prototypes.
15666 (struct target_ops): Update comments. Add const to write_memory
15667 definition.
15668
15669 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
15670
15671 * linux-low.c (usr_store_inferior_registers): Support
15672 registers which are allowed to fail to store.
15673 * linux-low.h (linux_target_ops): Likewise.
15674 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15675 (ppc_cannot_store_register): FPSCR may not be storable.
15676
15677 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15678
15679 * server.h: Include <string.h> if HAVE_STRING_H.
15680 * ChangeLog: Correct paths in last ChangeLog entry.
15681
15682 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15683
15684 * linux-low.h: Remove obsolete prototypes.
15685 (struct linux_target_ops): New.
15686 (extern the_low_target): New.
15687 * linux-low.c (num_regs, regmap): Remove declarations.
15688 (register_addr): Use the_low_target explicitly.
15689 (fetch_register): Likewise.
15690 (usr_fetch_inferior_registers): Likewise.
15691 (usr_store_inferior_registers): Likewise.
15692 * linux-arm-low.c (num_regs): Remove.
15693 (arm_num_regs): Define.
15694 (arm_regmap): Renamed from regmap, made static.
15695 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15696 made static.
15697 (arm_cannot_store_register): Renamed from cannot_store_register,
15698 made static.
15699 (the_low_target): New.
15700 * linux-i386-low.c (num_regs): Remove.
15701 (i386_num_regs): Define.
15702 (i386_regmap): Renamed from regmap, made static.
15703 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15704 made static.
15705 (i386_cannot_store_register): Renamed from cannot_store_register,
15706 made static.
15707 (the_low_target): New.
15708 * linux-ia64-low.c (num_regs): Remove.
15709 (ia64_num_regs): Define.
15710 (ia64_regmap): Renamed from regmap, made static.
15711 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15712 made static.
15713 (ia64_cannot_store_register): Renamed from cannot_store_register,
15714 made static.
15715 (the_low_target): New.
15716 * linux-m68k-low.c (num_regs): Remove.
15717 (m68k_num_regs): Define.
15718 (m68k_regmap): Renamed from regmap, made static.
15719 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15720 made static.
15721 (m68k_cannot_store_register): Renamed from cannot_store_register,
15722 made static.
15723 (the_low_target): New.
15724 * linux-mips-low.c (num_regs): Remove.
15725 (mips_num_regs): Define.
15726 (mips_regmap): Renamed from regmap, made static.
15727 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15728 made static.
15729 (mips_cannot_store_register): Renamed from cannot_store_register,
15730 made static.
15731 (the_low_target): New.
15732 * linux-ppc-low.c (num_regs): Remove.
15733 (ppc_num_regs): Define.
15734 (ppc_regmap): Renamed from regmap, made static.
15735 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15736 made static.
15737 (ppc_cannot_store_register): Renamed from cannot_store_register,
15738 made static.
15739 (the_low_target): New.
15740 * linux-s390-low.c (num_regs): Remove.
15741 (s390_num_regs): Define.
15742 (s390_regmap): Renamed from regmap, made static.
15743 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15744 made static.
15745 (s390_cannot_store_register): Renamed from cannot_store_register,
15746 made static.
15747 (the_low_target): New.
15748 * linux-sh-low.c (num_regs): Remove.
15749 (sh_num_regs): Define.
15750 (sh_regmap): Renamed from regmap, made static.
15751 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15752 made static.
15753 (sh_cannot_store_register): Renamed from cannot_store_register,
15754 made static.
15755 (the_low_target): New.
15756 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15757 (the_low_target): New.
15758
15759 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15760
15761 * Makefile.in: Add stamp-h target.
15762 * configure.in: Create stamp-h.
15763 * configure: Regenerated.
15764
15765 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15766
15767 * inferiors.c: New file.
15768 * target.c: New file.
15769 * target.h: New file.
15770 * Makefile.in: Add target.o and inferiors.o. Update
15771 dependencies.
15772 * linux-low.c (inferior_pid): New static variable,
15773 moved from server.c.
15774 (linux_create_inferior): Renamed from create_inferior.
15775 Call add_inferior. Return 0 on success instead of a PID.
15776 (linux_attach): Renamed from myattach.
15777 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15778 (linux_thread_alive): Renamed from mythread_alive.
15779 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15780 child dies.
15781 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15782 (regsets_store_inferior_registers): Correct error message.
15783 Add missing ``return 0''.
15784 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15785 (linux_store_registers): Renamed from store_inferior_registers.
15786 (linux_read_memory): Renamed from read_inferior_memory.
15787 (linux_write_memory): Renamed from write_inferior_memory.
15788 (linux_target_ops): New structure.
15789 (initialize_low): Call set_target_ops ().
15790 * remote-utils.c (unhexify): New function.
15791 (hexify): New function.
15792 (input_interrupt): Send signals to ``signal_pid''.
15793 * server.c (inferior_pid): Remove.
15794 (start_inferior): Update create_inferior call.
15795 (attach_inferior): Call add_inferior.
15796 (handle_query): New function.
15797 (main): Call handle_query for `q' packets.
15798 * server.h: Include "target.h". Remove obsolete prototypes.
15799 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15800
15801 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
15802
15803 * Makefile.in: Add WARN_CFLAGS. Update configury
15804 dependencies.
15805 * configure.in: Check for <string.h>
15806 * configure: Regenerate.
15807 * config.in: Regenerate.
15808 * gdbreplay.c: Include needed system headers.
15809 (remote_open): Remove strchr prototype.
15810 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15811 * regcache.c (supply_register): Change buf argument to const void *.
15812 (supply_register_by_name): Likewise.
15813 (collect_register): Change buf argument to void *.
15814 (collect_register_by_name): Likewise.
15815 * regcache.h: Add missing prototypes.
15816 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15817 * server.c (handle_query): New function.
15818 (attached): New static variable, moved out of main.
15819 (main): Quiet longjmp clobber warnings.
15820 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15821 * utils.c (error): Remove NORETURN.
15822 (fatal): Likewise.
This page took 0.365367 seconds and 4 git commands to generate.