[nto] Fix nto build.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2
3 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4 variable name.
5
6 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7
8 * inferiors.c (thread_pid_matches_callback): New function.
9 (find_thread_process): New function.
10 (remove_thread): Reset current_thread.
11 (remove_process): Assert threads have been removed first.
12
13 2015-10-15 Yao Qi <yao.qi@linaro.org>
14
15 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
16 if it is 3.
17 (aarch64_remove_point): Likewise.
18 * regcache.c (regcache_register_size): New function.
19
20 2015-10-12 Yao Qi <yao.qi@linaro.org>
21
22 * linux-aarch64-low.c: Update all callers as emit_load_store
23 is renamed to aarch64_emit_load_store.
24
25 2015-10-12 Yao Qi <yao.qi@linaro.org>
26
27 * linux-aarch64-low.c: Update all callers of function renaming
28 from emit_insn to aarch64_emit_insn.
29
30 2015-10-12 Yao Qi <yao.qi@linaro.org>
31
32 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
33 arch/aarch64-insn.h.
34 (struct aarch64_memory_operand): Likewise.
35 (ENCODE): Likewise.
36 (emit_insn): Move to arch/aarch64-insn.c.
37 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
38 (emit_load_store): Move to arch/aarch64-insn.c.
39 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
40 (can_encode_int32): Remove.
41
42 2015-10-12 Yao Qi <yao.qi@linaro.org>
43
44 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
45 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
46 (aarch64_relocate_instruction): Likewise.
47 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
48 (struct aarch64_insn_visitor): Likewise.
49
50 2015-10-12 Yao Qi <yao.qi@linaro.org>
51
52 * linux-aarch64-low.c (struct aarch64_insn_data): New.
53 (struct aarch64_insn_visitor): New.
54 (struct aarch64_insn_relocation_data): New.
55 (aarch64_ftrace_insn_reloc_b): New function.
56 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
57 (aarch64_ftrace_insn_reloc_cb): Likewise.
58 (aarch64_ftrace_insn_reloc_tb): Likewise.
59 (aarch64_ftrace_insn_reloc_adr): Likewise.
60 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
61 (aarch64_ftrace_insn_reloc_others): Likewise.
62 (visitor): New.
63 (aarch64_relocate_instruction): Use visitor.
64
65 2015-10-12 Yao Qi <yao.qi@linaro.org>
66
67 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
68 int. Add argument buf.
69 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
70 aarch64_relocate_instruction.
71
72 2015-10-12 Yao Qi <yao.qi@linaro.org>
73
74 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
75 argument insn. Remove local variable insn. Don't call
76 target_read_uint32.
77 (aarch64_install_fast_tracepoint_jump_pad): Call
78 target_read_uint32.
79
80 2015-09-30 Yao Qi <yao.qi@linaro.org>
81
82 * linux-aarch64-low.c (emit_movk): Shorten a long line.
83 (emit_load_store_pair): Likewise.
84
85 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
86
87 * dll.c (match_dll): Add cast(s).
88 (unloaded_dll): Likewise.
89 * linux-low.c (second_thread_of_pid_p): Likewise.
90 (delete_lwp_callback): Likewise.
91 (count_events_callback): Likewise.
92 (select_event_lwp_callback): Likewise.
93 (linux_set_resume_request): Likewise.
94 * server.c (accumulate_file_name_length): Likewise.
95 (emit_dll_description): Likewise.
96 (handle_qxfer_threads_worker): Likewise.
97 (visit_actioned_threads): Likewise.
98 * thread-db.c (any_thread_of): Likewise.
99 * tracepoint.c (same_process_p): Likewise.
100 (match_blocktype): Likewise.
101 (build_traceframe_info_xml): Likewise.
102
103 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
104
105 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
106 assignment.
107 (gdb_unparse_agent_expr): Likewise.
108 * hostio.c (require_data): Likewise.
109 (handle_pread): Likewise.
110 * linux-low.c (disable_regset): Likewise.
111 (fetch_register): Likewise.
112 (store_register): Likewise.
113 (get_dynamic): Likewise.
114 (linux_qxfer_libraries_svr4): Likewise.
115 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
116 (set_fast_tracepoint_jump): Likewise.
117 (uninsert_fast_tracepoint_jumps_at): Likewise.
118 (reinsert_fast_tracepoint_jumps_at): Likewise.
119 (validate_inserted_breakpoint): Likewise.
120 (clone_agent_expr): Likewise.
121 * regcache.c (init_register_cache): Likewise.
122 * remote-utils.c (putpkt_binary_1): Likewise.
123 (decode_M_packet): Likewise.
124 (decode_X_packet): Likewise.
125 (look_up_one_symbol): Likewise.
126 (relocate_instruction): Likewise.
127 (monitor_output): Likewise.
128 * server.c (handle_search_memory): Likewise.
129 (handle_qxfer_exec_file): Likewise.
130 (handle_qxfer_libraries): Likewise.
131 (handle_qxfer): Likewise.
132 (handle_query): Likewise.
133 (handle_v_cont): Likewise.
134 (handle_v_run): Likewise.
135 (captured_main): Likewise.
136 * target.c (write_inferior_memory): Likewise.
137 * thread-db.c (try_thread_db_load_from_dir): Likewise.
138 * tracepoint.c (init_trace_buffer): Likewise.
139 (add_tracepoint_action): Likewise.
140 (add_traceframe): Likewise.
141 (add_traceframe_block): Likewise.
142 (cmd_qtdpsrc): Likewise.
143 (cmd_qtdv): Likewise.
144 (cmd_qtstatus): Likewise.
145 (response_source): Likewise.
146 (response_tsv): Likewise.
147 (cmd_qtnotes): Likewise.
148 (gdb_collect): Likewise.
149 (initialize_tracepoint): Likewise.
150
151 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
152
153 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
154 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
155 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
156 <NOP>: New.
157 (enum aarch64_condition_codes): New enum.
158 (w0): New static global.
159 (fp): Likewise.
160 (lr): Likewise.
161 (struct aarch64_memory_operand) <type>: New
162 MEMORY_OPERAND_POSTINDEX type.
163 (postindex_memory_operand): New helper function.
164 (emit_ret): New function.
165 (emit_load_store_pair): New function, factored out of emit_stp
166 with support for MEMORY_OPERAND_POSTINDEX.
167 (emit_stp): Rewrite using emit_load_store_pair.
168 (emit_ldp): New function.
169 (emit_load_store): Likewise.
170 (emit_ldr): Mention post-index instruction in comment.
171 (emit_ldrh): New function.
172 (emit_ldrb): New function.
173 (emit_ldrsw): Mention post-index instruction in comment.
174 (emit_str): Likewise.
175 (emit_subs): New function.
176 (emit_cmp): Likewise.
177 (emit_and): Likewise.
178 (emit_orr): Likewise.
179 (emit_orn): Likewise.
180 (emit_eor): Likewise.
181 (emit_mvn): Likewise.
182 (emit_lslv): Likewise.
183 (emit_lsrv): Likewise.
184 (emit_asrv): Likewise.
185 (emit_mul): Likewise.
186 (emit_sbfm): Likewise.
187 (emit_sbfx): Likewise.
188 (emit_ubfm): Likewise.
189 (emit_ubfx): Likewise.
190 (emit_csinc): Likewise.
191 (emit_cset): Likewise.
192 (emit_nop): Likewise.
193 (emit_ops_insns): New helper function.
194 (emit_pop): Likewise.
195 (emit_push): Likewise.
196 (aarch64_emit_prologue): New function.
197 (aarch64_emit_epilogue): Likewise.
198 (aarch64_emit_add): Likewise.
199 (aarch64_emit_sub): Likewise.
200 (aarch64_emit_mul): Likewise.
201 (aarch64_emit_lsh): Likewise.
202 (aarch64_emit_rsh_signed): Likewise.
203 (aarch64_emit_rsh_unsigned): Likewise.
204 (aarch64_emit_ext): Likewise.
205 (aarch64_emit_log_not): Likewise.
206 (aarch64_emit_bit_and): Likewise.
207 (aarch64_emit_bit_or): Likewise.
208 (aarch64_emit_bit_xor): Likewise.
209 (aarch64_emit_bit_not): Likewise.
210 (aarch64_emit_equal): Likewise.
211 (aarch64_emit_less_signed): Likewise.
212 (aarch64_emit_less_unsigned): Likewise.
213 (aarch64_emit_ref): Likewise.
214 (aarch64_emit_if_goto): Likewise.
215 (aarch64_emit_goto): Likewise.
216 (aarch64_write_goto_address): Likewise.
217 (aarch64_emit_const): Likewise.
218 (aarch64_emit_call): Likewise.
219 (aarch64_emit_reg): Likewise.
220 (aarch64_emit_pop): Likewise.
221 (aarch64_emit_stack_flush): Likewise.
222 (aarch64_emit_zero_ext): Likewise.
223 (aarch64_emit_swap): Likewise.
224 (aarch64_emit_stack_adjust): Likewise.
225 (aarch64_emit_int_call_1): Likewise.
226 (aarch64_emit_void_call_2): Likewise.
227 (aarch64_emit_eq_goto): Likewise.
228 (aarch64_emit_ne_goto): Likewise.
229 (aarch64_emit_lt_goto): Likewise.
230 (aarch64_emit_le_goto): Likewise.
231 (aarch64_emit_gt_goto): Likewise.
232 (aarch64_emit_ge_got): Likewise.
233 (aarch64_emit_ops_impl): New static global variable.
234 (aarch64_emit_ops): New target function, return
235 &aarch64_emit_ops_impl.
236 (struct linux_target_ops): Install it.
237
238 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
239
240 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
241 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
242 aarch64-ipa.o.
243 * linux-aarch64-ipa.c: New file.
244 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
245 and endian.h.
246 (aarch64_get_thread_area): New target method.
247 (extract_signed_bitfield): New helper function.
248 (aarch64_decode_ldr_literal): New function.
249 (enum aarch64_opcodes): New enum.
250 (struct aarch64_register): New struct.
251 (struct aarch64_operand): New struct.
252 (x0): New static global.
253 (x1): Likewise.
254 (x2): Likewise.
255 (x3): Likewise.
256 (x4): Likewise.
257 (w2): Likewise.
258 (ip0): Likewise.
259 (sp): Likewise.
260 (xzr): Likewise.
261 (aarch64_register): New helper function.
262 (register_operand): Likewise.
263 (immediate_operand): Likewise.
264 (struct aarch64_memory_operand): New struct.
265 (offset_memory_operand): New helper function.
266 (preindex_memory_operand): Likewise.
267 (enum aarch64_system_control_registers): New enum.
268 (ENCODE): New macro.
269 (emit_insn): New helper function.
270 (emit_b): New function.
271 (emit_bcond): Likewise.
272 (emit_cb): Likewise.
273 (emit_tb): Likewise.
274 (emit_blr): Likewise.
275 (emit_stp): Likewise.
276 (emit_ldp_q_offset): Likewise.
277 (emit_stp_q_offset): Likewise.
278 (emit_load_store): Likewise.
279 (emit_ldr): Likewise.
280 (emit_ldrsw): Likewise.
281 (emit_str): Likewise.
282 (emit_ldaxr): Likewise.
283 (emit_stxr): Likewise.
284 (emit_stlr): Likewise.
285 (emit_data_processing_reg): Likewise.
286 (emit_data_processing): Likewise.
287 (emit_add): Likewise.
288 (emit_sub): Likewise.
289 (emit_mov): Likewise.
290 (emit_movk): Likewise.
291 (emit_mov_addr): Likewise.
292 (emit_mrs): Likewise.
293 (emit_msr): Likewise.
294 (emit_sevl): Likewise.
295 (emit_wfe): Likewise.
296 (append_insns): Likewise.
297 (can_encode_int32_in): New helper function.
298 (aarch64_relocate_instruction): New function.
299 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
300 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
301 (struct linux_target_ops): Install aarch64_get_thread_area,
302 aarch64_install_fast_tracepoint_jump_pad and
303 aarch64_get_min_fast_tracepoint_insn_len.
304
305 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
306
307 * Makefile.in (aarch64-insn.o): New rule.
308 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
309
310 2015-09-21 Yao Qi <yao.qi@linaro.org>
311
312 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
313
314 2015-09-21 Yao Qi <yao.qi@linaro.org>
315
316 * tracepoint.c (max_jump_pad_size): Remove.
317
318 2015-09-18 Yao Qi <yao.qi@linaro.org>
319
320 * linux-aarch64-low.c: Don't include sys/uio.h.
321 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
322
323 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
324
325 * tracepoint.c (eval_result_type): Change prototype.
326 (condition_true_at_tracepoint): Fix argument to compiled_cond.
327
328 2015-09-15 Pedro Alves <palves@redhat.com>
329
330 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
331 Check whether to report exec events instead of checking whether
332 multiprocess is enabled.
333
334 2015-09-15 Pedro Alves <palves@redhat.com>
335
336 PR remote/18965
337 * remote-utils.c (prepare_resume_reply): Merge
338 TARGET_WAITKIND_VFORK_DONE switch case with the
339 TARGET_WAITKIND_FORKED case.
340
341 2015-09-15 Yao Qi <yao.qi@linaro.org>
342
343 * server.c (handle_query): Check string comparison using
344 "else if" instead of "if".
345
346 2015-09-15 Yao Qi <yao.qi@linaro.org>
347
348 * server.c (vCont_supported): New global variable.
349 (handle_query): Set vCont_supported to 1 if "vContSupported+"
350 matches. Append ";vContSupported+" to own_buf.
351 (handle_v_requests): Append ";s;S" to own_buf if target supports
352 hardware single step or vCont_supported is false.
353 (capture_main): Set vCont_supported to zero.
354
355 2015-09-15 Yao Qi <yao.qi@linaro.org>
356
357 * linux-low.c (linux_supports_conditional_breakpoints): Rename
358 it to ...
359 (linux_supports_hardware_single_step): ... New function.
360 (linux_target_ops): Update.
361 * lynx-low.c (lynx_target_ops): Set field
362 supports_hardware_single_step to target_can_do_hardware_single_step.
363 * nto-low.c (nto_target_ops): Likewise.
364 * spu-low.c (spu_target_ops): Likewise.
365 * win32-low.c (win32_target_ops): Likewise.
366 * target.c (target_can_do_hardware_single_step): New function.
367 * target.h (struct target_ops) <supports_conditional_breakpoints>:
368 Remove. <supports_hardware_single_step>: New field.
369 (target_supports_conditional_breakpoints): Remove.
370 (target_supports_hardware_single_step): New macro.
371 (target_can_do_hardware_single_step): Declare.
372 * server.c (handle_query): Use target_supports_hardware_single_step
373 instead of target_supports_conditional_breakpoints.
374
375 2015-09-15 Yao Qi <yao.qi@linaro.org>
376
377 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
378 function.
379 (struct linux_target_ops the_low_target): Install
380 aarch64_linux_siginfo_fixup.
381
382 2015-09-11 Don Breazeal <donb@codesourcery.com>
383 Luis Machado <lgustavo@codesourcery.com>
384
385 * linux-low.c (linux_mourn): Static declaration.
386 (linux_arch_setup): Move in front of
387 handle_extended_wait.
388 (linux_arch_setup_thread): New function.
389 (handle_extended_wait): Handle exec events. Call
390 linux_arch_setup_thread. Make event_lwp argument a
391 pointer-to-a-pointer.
392 (check_zombie_leaders): Do not check stopped threads.
393 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
394 (linux_low_filter_event): Add lwp and thread for exec'ing
395 non-leader thread if leader thread has been deleted.
396 Refactor code into linux_arch_setup_thread and call it.
397 Pass child lwp pointer by reference to handle_extended_wait.
398 (linux_wait_for_event_filtered): Update comment.
399 (linux_wait_1): Prevent clobbering exec event status.
400 (linux_supports_exec_events): New function.
401 (linux_target_ops) <supports_exec_events>: Initialize new member.
402 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
403 new member.
404 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
405 * server.c (report_exec_events): New global variable.
406 (handle_query): Handle qSupported query for exec-events feature.
407 (captured_main): Initialize report_exec_events.
408 * server.h (report_exec_events): Declare new global variable.
409 * target.h (struct target_ops) <supports_exec_events>: New
410 member.
411 (target_supports_exec_events): New macro.
412 * win32-low.c (win32_target_ops) <supports_exec_events>:
413 Initialize new member.
414
415 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
416
417 * linux-low.c (linux_low_enable_btrace): Remove.
418 (linux_target_ops): Replace linux_low_enable_btrace with
419 linux_enable_btrace.
420
421 2015-09-03 Yao Qi <yao.qi@linaro.org>
422
423 * linux-aarch64-low.c (aarch64_insert_point): Call
424 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
425 returns true.
426
427 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
428
429 * linux-low.c (check_stopped_by_breakpoint): Use
430 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
431
432 2015-08-27 Pedro Alves <palves@redhat.com>
433
434 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
435
436 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
437
438 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
439 the XNEW-family equivalent.
440 (compile_bytecodes): Likewise.
441 * dll.c (loaded_dll): Likewise.
442 * event-loop.c (append_callback_event): Likewise.
443 (create_file_handler): Likewise.
444 (create_file_event): Likewise.
445 * hostio.c (handle_open): Likewise.
446 * inferiors.c (add_thread): Likewise.
447 (add_process): Likewise.
448 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
449 * linux-arm-low.c (arm_new_process): Likewise.
450 (arm_new_thread): Likewise.
451 * linux-low.c (add_to_pid_list): Likewise.
452 (linux_add_process): Likewise.
453 (handle_extended_wait): Likewise.
454 (add_lwp): Likewise.
455 (enqueue_one_deferred_signal): Likewise.
456 (enqueue_pending_signal): Likewise.
457 (linux_resume_one_lwp_throw): Likewise.
458 (linux_resume_one_thread): Likewise.
459 (linux_read_memory): Likewise.
460 (linux_write_memory): Likewise.
461 * linux-mips-low.c (mips_linux_new_process): Likewise.
462 (mips_linux_new_thread): Likewise.
463 (mips_add_watchpoint): Likewise.
464 * linux-x86-low.c (initialize_low_arch): Likewise.
465 * lynx-low.c (lynx_add_process): Likewise.
466 * mem-break.c (set_raw_breakpoint_at): Likewise.
467 (set_breakpoint): Likewise.
468 (add_condition_to_breakpoint): Likewise.
469 (add_commands_to_breakpoint): Likewise.
470 (clone_agent_expr): Likewise.
471 (clone_one_breakpoint): Likewise.
472 * regcache.c (new_register_cache): Likewise.
473 * remote-utils.c (look_up_one_symbol): Likewise.
474 * server.c (queue_stop_reply): Likewise.
475 (start_inferior): Likewise.
476 (queue_stop_reply_callback): Likewise.
477 (handle_target_event): Likewise.
478 * spu-low.c (fetch_ppc_memory): Likewise.
479 (store_ppc_memory): Likewise.
480 * target.c (set_target_ops): Likewise.
481 * thread-db.c (thread_db_load_search): Likewise.
482 (try_thread_db_load_1): Likewise.
483 * tracepoint.c (add_tracepoint): Likewise.
484 (add_tracepoint_action): Likewise.
485 (create_trace_state_variable): Likewise.
486 (cmd_qtdpsrc): Likewise.
487 (cmd_qtro): Likewise.
488 (add_while_stepping_state): Likewise.
489 * win32-low.c (child_add_thread): Likewise.
490 (get_image_name): Likewise.
491
492 2015-08-25 Yao Qi <yao.qi@linaro.org>
493
494 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
495
496 2015-08-25 Yao Qi <yao.qi@linaro.org>
497
498 * Makefile.in (aarch64-linux.o): New rule.
499 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
500 srv_tgtobj.
501 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
502 (aarch64_init_debug_reg_state): Make it extern.
503 (aarch64_linux_prepare_to_resume): Remove.
504
505 2015-08-25 Yao Qi <yao.qi@linaro.org>
506
507 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
508 lwp_arch_private_info and ptid_of_lwp.
509
510 2015-08-25 Yao Qi <yao.qi@linaro.org>
511
512 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
513 Find proc_info by find_process_pid. All callers updated.
514
515 2015-08-25 Yao Qi <yao.qi@linaro.org>
516
517 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
518 Remove.
519 (debug_reg_change_callback): Remove.
520 (aarch64_notify_debug_reg_change): Remove.
521
522 2015-08-25 Yao Qi <yao.qi@linaro.org>
523
524 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
525 Call current_lwp_ptid.
526
527 2015-08-25 Yao Qi <yao.qi@linaro.org>
528
529 * linux-aarch64-low.c (debug_reg_change_callback): Use
530 debug_printf.
531
532 2015-08-25 Yao Qi <yao.qi@linaro.org>
533
534 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
535
536 2015-08-25 Yao Qi <yao.qi@linaro.org>
537
538 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
539
540 2015-08-25 Yao Qi <yao.qi@linaro.org>
541
542 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
543 the code.
544
545 2015-08-25 Yao Qi <yao.qi@linaro.org>
546
547 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
548 Remove.
549 (debug_reg_change_callback): Remove argument entry and add argument
550 lwp. Remove local variable thread. Don't print thread id in the
551 debugging output. Don't check whether pid of thread equals to pid.
552 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
553 iterate_over_lwps instead find_inferior.
554
555 2015-08-24 Pedro Alves <palves@redhat.com>
556
557 * inferiors.c (get_first_process): New function.
558 * inferiors.h (get_first_process): New declaration.
559 * remote-utils.c (read_ptid): Default to the first process in the
560 list, instead of to the current thread's process.
561
562 2015-08-24 Pedro Alves <palves@redhat.com>
563
564 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
565 * event-loop.c: Likewise.
566 * remote-utils.c: Likewise.
567 * tracepoint.c: Likewise.
568
569 2015-08-24 Pedro Alves <palves@redhat.com>
570
571 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
572 ptid_get_lwp.
573
574 2015-08-21 Pedro Alves <palves@redhat.com>
575
576 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
577 instead of literal 1.
578
579 2015-08-21 Pedro Alves <palves@redhat.com>
580
581 * tdesc.c (default_description): Explicitly zero-initialize.
582
583 2015-08-21 Pedro Alves <palves@redhat.com>
584
585 PR gdb/18749
586 * inferiors.c (remove_thread): Discard any pending stop reply for
587 this thread.
588 * server.c (remove_all_on_match_pid): Rename to ...
589 (remove_all_on_match_ptid): ... this. Work with a filter ptid
590 instead of a pid.
591 (discard_queued_stop_replies): Change parameter to a ptid. Now
592 extern.
593 (handle_v_kill, kill_inferior_callback, captured_main)
594 (process_serial_event): Adjust.
595 * server.h (discard_queued_stop_replies): Declare.
596
597 2015-08-21 Pedro Alves <palves@redhat.com>
598
599 * linux-low.c (wait_for_sigstop): Always switch to no thread
600 selected if the previously current thread dies.
601 * lynx-low.c (lynx_request_interrupt): Use the first thread's
602 process instead of the current thread's.
603 * remote-utils.c (input_interrupt): Don't check if there's no
604 current thread.
605 * server.c (gdb_read_memory, gdb_write_memory): If setting the
606 current thread to the general thread fails, error out.
607 (handle_qxfer_auxv, handle_qxfer_libraries)
608 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
609 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
610 (handle_query): Check if there's a thread selected instead of
611 checking whether there's any thread in the thread list.
612 (handle_qxfer_threads, handle_qxfer_btrace)
613 (handle_qxfer_btrace_conf): Don't error out early if there's no
614 thread in the thread list.
615 (handle_v_cont, myresume): Don't set the current thread to the
616 continue thread.
617 (process_serial_event) <Hg handling>: Also set thread_id if the
618 previous general thread is still alive.
619 (process_serial_event) <g/G handling>: If setting the current
620 thread to the general thread fails, error out.
621 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
622 thread's lwp instead of the current thread's.
623 * target.c (set_desired_thread): If the desired thread was not
624 found, leave the current thread pointing to NULL. Return an int
625 (boolean) indicating success.
626 * target.h (set_desired_thread): Change return type to int.
627
628 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
629
630 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
631 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
632 #includes.
633 (ps_get_thread_area): New function.
634
635 2015-08-19 Gary Benson <gbenson@redhat.com>
636
637 * hostio.c (handle_pread): Do not attempt to read more data
638 than hostio_reply_with_data can fit in a packet.
639
640 2015-08-18 Joel Brobecker <brobecker@adacore.com>
641
642 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
643
644 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
645
646 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
647
648 2015-08-06 Pedro Alves <palves@redhat.com>
649
650 * tracepoint.c (expr_eval_result): Now an int.
651
652 2015-08-06 Pedro Alves <palves@redhat.com>
653
654 * gdbthread.h (struct regcache): Forward declare.
655 (struct thread_info) <regcache_data>: Now a struct regcache
656 pointer.
657 * inferiors.c (inferior_regcache_data)
658 (set_inferior_regcache_data): Now work with struct regcache
659 pointers.
660 * inferiors.h (struct regcache): Forward declare.
661 (inferior_regcache_data, set_inferior_regcache_data): Now work
662 with struct regcache pointers.
663 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
664 (free_register_cache_thread): Remove struct regcache pointer
665 casts.
666
667 2015-08-06 Pedro Alves <palves@redhat.com>
668
669 * server.c (captured_main): On error, print the exception message
670 to stderr, and if run_once is set, throw a quit.
671
672 2015-08-06 Pedro Alves <palves@redhat.com>
673
674 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
675 the current thread.
676
677 2015-08-06 Pedro Alves <palves@redhat.com>
678
679 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
680 reading beyond the passed in buffer length.
681
682 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
683
684 * tracepoint.c (symbol_list) <required>: Remove.
685
686 2015-08-06 Pedro Alves <palves@redhat.com>
687
688 * linux-low.c (handle_extended_wait): Set the fork child's suspend
689 count if stopping and suspending threads.
690 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
691 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
692 (linux_detach): Complete an ongoing step-over.
693 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
694 throughout.
695 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
696 (linux_wait_1): If passing a signal to the inferior after
697 finishing a step-over, unsuspend and re-resume all lwps. If we
698 see a single-step event but the thread should be continuing, don't
699 pass the trap to gdb.
700 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
701 internal_error instead of gdb_assert.
702 (enqueue_pending_signal): New function.
703 (check_ptrace_stopped_lwp_gone): Add debug output.
704 (start_step_over): Use internal_error instead of gdb_assert.
705 (complete_ongoing_step_over): New function.
706 (linux_resume_one_thread): Don't resume a suspended thread.
707 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
708 it stepping.
709
710 2015-08-06 Pedro Alves <palves@redhat.com>
711
712 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
713 (linux_thread_alive): Use lwp_is_marked_dead.
714 (extended_event_reported): Delete.
715 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
716 instead of extended_event_reported.
717 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
718 as well.
719 (lwp_is_marked_dead): New function.
720 (lwp_running): Use lwp_is_marked_dead.
721 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
722 comment.
723
724 2015-08-06 Pedro Alves <palves@redhat.com>
725
726 * linux-low.c (linux_wait_1): Move fork event output out of the
727 !report_to_gdb check. Pass event_child->waitstatus to
728 target_waitstatus_to_string instead of ourstatus.
729
730 2015-08-04 Yao Qi <yao.qi@linaro.org>
731
732 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
733 if current_thread is 32 bit.
734
735 2015-08-04 Yao Qi <yao.qi@linaro.org>
736
737 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
738 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
739 * server.c (extended_protocol): Remove "static".
740 * server.h (extended_protocol): Declare it.
741
742 2015-08-04 Yao Qi <yao.qi@linaro.org>
743
744 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
745 both aarch64 and aarch32.
746 (aarch64_set_pc): Likewise.
747
748 2015-08-04 Yao Qi <yao.qi@linaro.org>
749
750 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
751 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
752 arm-with-neon.xml to srv_xmlfiles.
753 * linux-aarch64-low.c: Include linux-aarch32-low.h.
754 (is_64bit_tdesc): New function.
755 (aarch64_linux_read_description): New function.
756 (aarch64_arch_setup): Call aarch64_linux_read_description.
757 (regs_info): Rename to regs_info_aarch64.
758 (aarch64_regs_info): Return right regs_info.
759 (initialize_low_arch): Call initialize_low_arch_aarch32.
760
761 2015-08-04 Yao Qi <yao.qi@linaro.org>
762
763 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
764 * linux-aarch32-low.c: New file.
765 * linux-aarch32-low.h: New file.
766 * linux-arm-low.c (arm_fill_gregset): Move it to
767 linux-aarch32-low.c.
768 (arm_store_gregset): Likewise.
769 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
770 (arm_store_vfpregset): Call arm_store_vfpregset_num.
771 (arm_arch_setup): Check if PTRACE_GETREGSET works.
772 (regs_info): Rename to regs_info_arm.
773 (arm_regs_info): Return regs_info_aarch32 if
774 have_ptrace_getregset is 1 and target description is
775 arm_with_neon or arm_with_vfpv3.
776 (initialize_low_arch): Don't call init_registers_arm_with_neon.
777 Call initialize_low_arch_aarch32 instead.
778
779 2015-08-04 Yao Qi <yao.qi@linaro.org>
780
781 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
782 * linux-low.c: ... here.
783 * linux-low.h (have_ptrace_getregset): Declare it.
784
785 2015-08-04 Pedro Alves <palves@redhat.com>
786
787 * thread-db.c (struct thread_db): Use new typedefs.
788 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
789 CHK calls.
790 (disable_thread_event_reporting): Cast result of dlsym to
791 destination function pointer type.
792 (thread_db_mourn): Use td_ta_delete_ftype.
793
794 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
795
796 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
797 arch variant.
798 (CDX_BREAKPOINT): Define for R2.
799 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
800 (the_low_target): Add comments.
801
802 2015-07-30 Yao Qi <yao.qi@linaro.org>
803
804 * linux-arm-low.c (arm_hwcap): Remove it.
805 (arm_read_description): New local variable arm_hwcap. Don't
806 set arm_hwcap to zero.
807
808 2015-07-30 Yao Qi <yao.qi@linaro.org>
809
810 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
811 Use regcache->tdesc instead.
812 (arm_store_wmmxregset): Likewise.
813 (arm_fill_vfpregset): Likewise.
814 (arm_store_vfpregset): Likewise.
815
816 2015-07-30 Yao Qi <yao.qi@linaro.org>
817
818 * linux-arm-low.c: Include arch/arm.h.
819 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
820 (arm_store_gregset): Likewise.
821
822 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
823
824 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
825 ptrace's 4th parameter.
826
827 2015-07-27 Yao Qi <yao.qi@linaro.org>
828
829 * configure.srv (case aarch64*-*-linux*): Don't set
830 srv_linux_usrregs.
831
832 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
833
834 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
835 sys/ptrace.h.
836 * linux-arm-low.c: Likewise.
837 * linux-cris-low.c: Likewise.
838 * linux-crisv32-low.c: Likewise.
839 * linux-low.c: Likewise.
840 * linux-m68k-low.c: Likewise.
841 * linux-mips-low.c: Likewise.
842 * linux-nios2-low.c: Likewise.
843 * linux-s390-low.c: Likewise.
844 * linux-sparc-low.c: Likewise.
845 * linux-tic6x-low.c: Likewise.
846 * linux-tile-low.c: Likewise.
847 * linux-x86-low.c: Likewise.
848
849 2015-07-24 Pedro Alves <palves@redhat.com>
850
851 * config.in: Regenerate.
852 * configure: Regenerate.
853
854 2015-07-24 Pedro Alves <palves@redhat.com>
855
856 * acinclude.m4: Include ../ptrace.m4.
857 * configure.ac: Call GDB_AC_PTRACE.
858 * config.in, configure: Regenerate.
859
860 2015-07-24 Yao Qi <yao.qi@linaro.org>
861
862 * linux-low.c (linux_create_inferior): Remove setting to
863 proc->priv->new_inferior.
864 (linux_attach): Likewise.
865 (linux_low_filter_event): Likewise.
866 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
867
868 2015-07-24 Yao Qi <yao.qi@linaro.org>
869
870 * linux-low.c (linux_arch_setup): New function.
871 (linux_low_filter_event): If proc->tdesc is NULL and
872 proc->attached is true, call the_low_target.arch_setup.
873 Otherwise, keep status pending, and return.
874 (linux_resume_one_lwp_throw): Don't call get_pc if
875 thread->while_stepping isn't NULL. Don't call
876 get_thread_regcache if proc->tdesc is NULL.
877 (need_step_over_p): Return 0 if proc->tdesc is NULL.
878 (linux_target_ops): Install arch_setup.
879 * server.c (start_inferior): Call the_target->arch_setup.
880 * target.h (struct target_ops) <arch_setup>: New field.
881 (target_arch_setup): New marco.
882 * lynx-low.c (lynx_target_ops): Update.
883 * nto-low.c (nto_target_ops): Update.
884 * spu-low.c (spu_target_ops): Update.
885 * win32-low.c (win32_target_ops): Update.
886
887 2015-07-24 Yao Qi <yao.qi@linaro.org>
888
889 * linux-low.c (linux_add_process): Don't set
890 proc->priv->new_inferior.
891 (linux_create_inferior): Set proc->priv->new_inferior to 1.
892 (linux_attach): Likewise.
893
894 2015-07-24 Yao Qi <yao.qi@linaro.org>
895
896 * server.c (start_inferior): Code refactor.
897
898 2015-07-24 Yao Qi <yao.qi@linaro.org>
899
900 * server.c (process_serial_event): Set general_thread.
901
902 2015-07-21 Yao Qi <yao.qi@linaro.org>
903
904 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
905 aarch64_linux_get_debug_reg_capacity.
906
907 2015-07-17 Yao Qi <yao.qi@linaro.org>
908
909 * Makefile.in (aarch64-linux-hw-point.o): New rule.
910 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
911 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
912 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
913 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
914 (AARCH64_HWP_ALIGNMENT): Likewise.
915 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
916 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
917 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
918 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
919 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
920 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
921 (struct aarch64_debug_reg_state): Likewise.
922 (struct arch_lwp_info): Likewise.
923 (aarch64_align_watchpoint): Likewise.
924 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
925 (aarch64_watchpoint_length): Likewise.
926 (aarch64_point_encode_ctrl_reg): Likewise
927 (aarch64_point_is_aligned): Likewise.
928 (aarch64_align_watchpoint): Likewise.
929 (aarch64_linux_set_debug_regs):
930 (aarch64_dr_state_insert_one_point): Likewise.
931 (aarch64_dr_state_remove_one_point): Likewise.
932 (aarch64_handle_breakpoint): Likewise.
933 (aarch64_handle_aligned_watchpoint): Likewise.
934 (aarch64_handle_unaligned_watchpoint): Likewise.
935 (aarch64_handle_watchpoint): Likewise.
936
937 2015-07-17 Yao Qi <yao.qi@linaro.org>
938
939 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
940 and don't aarch64_get_debug_reg_state. All callers update.
941 (aarch64_handle_aligned_watchpoint): Likewise.
942 (aarch64_handle_unaligned_watchpoint): Likewise.
943 (aarch64_handle_watchpoint): Likewise.
944 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
945 (aarch64_remove_point): Likewise.
946
947 2015-07-17 Yao Qi <yao.qi@linaro.org>
948
949 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
950 debug_printf.
951 (aarch64_handle_unaligned_watchpoint): Likewise.
952
953 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
954
955 Revert the previous 3 commits:
956 Move gdb_regex* to common/
957 Move linux_find_memory_regions_full & co.
958 gdbserver build-id attribute generator
959
960 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
961 Jan Kratochvil <jan.kratochvil@redhat.com>
962
963 gdbserver build-id attribute generator.
964 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
965 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
966 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
967 (find_phdr): New.
968 (get_dynamic): Use find_pdhr to traverse program headers.
969 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
970 (compare_mapping_entry_range, struct find_memory_region_callback_data)
971 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
972 (get_hex_build_id): New.
973 (linux_qxfer_libraries_svr4): Add optional build-id attribute
974 to reply XML document.
975
976 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
977 Jan Kratochvil <jan.kratochvil@redhat.com>
978
979 * target.c: Include target/target-utils.h and fcntl.h.
980 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
981 (target_fileio_read_stralloc): New functions.
982
983 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
984
985 * Makefile.in (OBS): Add gdb_regex.o.
986 (gdb_regex.o): New.
987 * config.in: Rebuilt.
988 * configure: Rebuilt.
989
990 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
991 Jan Kratochvil <jan.kratochvil@redhat.com>
992
993 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
994 * Makefile.in (OBS): Add target-utils.o.
995 (linux-maps.o, target-utils.o): New.
996 * configure.srv (srv_linux_obj): Add linux-maps.o.
997
998 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
999
1000 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1001 function, return 1.
1002 (the_low_target): Install it.
1003
1004 2015-07-14 Pedro Alves <palves@redhat.com>
1005
1006 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1007 Instead, ignore ECHILD, and throw an error for other errnos.
1008
1009 2015-07-10 Pedro Alves <palves@redhat.com>
1010
1011 * event-loop.c (struct callback_event) <data>: Change type to
1012 gdb_client_data instance instead of gdb_client_data pointer.
1013 (append_callback_event): Adjust.
1014
1015 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1016
1017 * linux-aarch64-low.c: Add comments for each linux_target_ops
1018 method. Remove comments already covered in target_ops and
1019 linux_target_ops definitions.
1020 (the_low_target): Add comments for each unimplemented method.
1021
1022 2015-07-09 Yao Qi <yao.qi@linaro.org>
1023
1024 * linux-aarch64-low.c (aarch64_regmap): Remove.
1025 (aarch64_usrregs_info): Remove.
1026 (regs_info): Set field usrregs to NULL.
1027
1028 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1029
1030 * linux-low.c: Include "rsp-low.h"
1031 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1032 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1033 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1034 (handle_btrace_enable_pt): New.
1035 (handle_btrace_general_set): Support "pt".
1036 (handle_btrace_conf_general_set): Support "pt:size".
1037
1038 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1039
1040 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1041 Z_PACKET_SW_BP.
1042
1043 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1044
1045 * linux-aarch64-low.c: Remove comment about endianness.
1046 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1047 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1048 memcmp.
1049
1050 2015-06-24 Gary Benson <gbenson@redhat.com>
1051
1052 * linux-i386-ipa.c (stdint.h): Do not include.
1053 * lynx-i386-low.c (stdint.h): Likewise.
1054 * lynx-ppc-low.c (stdint.h): Likewise.
1055 * mem-break.c (stdint.h): Likewise.
1056 * thread-db.c (stdint.h): Likewise.
1057 * tracepoint.c (stdint.h): Likewise.
1058 * win32-low.c (stdint.h): Likewise.
1059
1060 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1061
1062 * server.c (write_qxfer_response): Update call to
1063 remote_escape_output.
1064
1065 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1066 Jan Kratochvil <jan.kratochvil@redhat.com>
1067
1068 Merge multiple hex conversions.
1069 * gdbreplay.c (tohex): Rename to 'fromhex'.
1070 (logchar): Use fromhex.
1071
1072 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1073
1074 * server.c (handle_qxfer_libraries): Set `version' attribute for
1075 <library-list>.
1076
1077 2015-06-10 Gary Benson <gbenson@redhat.com>
1078
1079 * target.h (struct target_ops) <multifs_open>: New field.
1080 <multifs_unlink>: Likewise.
1081 <multifs_readlink>: Likewise.
1082 * linux-low.c (nat/linux-namespaces.h): New include.
1083 (linux_target_ops): Initialize the_target->multifs_open,
1084 the_target->multifs_unlink and the_target->multifs_readlink.
1085 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1086 * hostio.c (hostio_fs_pid): New static variable.
1087 (hostio_handle_new_gdb_connection): New function.
1088 (handle_setfs): Likewise.
1089 (handle_open): Use the_target->multifs_open as appropriate.
1090 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1091 (handle_readlink): Use the_target->multifs_readlink as
1092 appropriate.
1093 (handle_vFile): Handle vFile:setfs packets.
1094 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1095 after target_handle_new_gdb_connection.
1096
1097 2015-06-10 Gary Benson <gbenson@redhat.com>
1098
1099 * configure.ac (AC_CHECK_FUNCS): Add setns.
1100 * config.in: Regenerate.
1101 * configure: Likewise.
1102 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1103 (linux-namespaces.o): New rule.
1104 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1105
1106 2015-06-09 Gary Benson <gbenson@redhat.com>
1107
1108 * hostio.c (handle_open): Process mode argument with
1109 fileio_to_host_mode.
1110
1111 2015-06-01 Yao Qi <yao.qi@linaro.org>
1112
1113 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1114 * linux-x86-low.c: Likewise.
1115
1116 2015-05-28 Don Breazeal <donb@codesourcery.com>
1117
1118 * linux-low.c (handle_extended_wait): Initialize
1119 thread_info.last_resume_kind for new fork children.
1120
1121 2015-05-15 Pedro Alves <palves@redhat.com>
1122
1123 * target.h (target_handle_new_gdb_connection): Rewrite using if
1124 wrapped in do/while.
1125
1126 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1127
1128 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1129 * configure, config.in: Regenerate.
1130 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1131 Declare typedef.
1132
1133 2015-05-12 Don Breazeal <donb@codesourcery.com>
1134
1135 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1136 PTRACE_EVENT_VFORK_DONE.
1137 (linux_low_ptrace_options, extended_event_reported): Add vfork
1138 events.
1139 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1140 and "vforkdone" for RSP 'T' Stop Reply Packet.
1141 * server.h (report_vfork_events): Declare
1142 global variable.
1143
1144 2015-05-12 Don Breazeal <donb@codesourcery.com>
1145
1146 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1147 (the_low_target) <new_fork>: Initialize new member.
1148 * linux-arm-low.c (arm_new_fork): New function.
1149 (the_low_target) <new_fork>: Initialize new member.
1150 * linux-low.c (handle_extended_wait): Call new target function
1151 new_fork.
1152 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1153 * linux-mips-low.c (mips_add_watchpoint): New function
1154 extracted from mips_insert_point.
1155 (the_low_target) <new_fork>: Initialize new member.
1156 (mips_linux_new_fork): New function.
1157 (mips_insert_point): Call mips_add_watchpoint.
1158 * linux-x86-low.c (x86_linux_new_fork): New function.
1159 (the_low_target) <new_fork>: Initialize new member.
1160
1161 2015-05-12 Don Breazeal <donb@codesourcery.com>
1162
1163 * linux-low.c (handle_extended_wait): Implement return value,
1164 rename argument 'event_child' to 'event_lwp', handle
1165 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1166 (linux_low_ptrace_options): New function.
1167 (linux_low_filter_event): Call linux_low_ptrace_options,
1168 use different argument fo linux_enable_event_reporting,
1169 use return value from handle_extended_wait.
1170 (extended_event_reported): New function.
1171 (linux_wait_1): Call extended_event_reported and set
1172 status to report fork events.
1173 (linux_write_memory): Add pid to debug message.
1174 (reset_lwp_ptrace_options_callback): New function.
1175 (linux_handle_new_gdb_connection): New function.
1176 (linux_target_ops): Initialize new structure member.
1177 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1178 * lynx-low.c: Initialize new structure member.
1179 * remote-utils.c (prepare_resume_reply): Implement stop reason
1180 "fork" for "T" stop message.
1181 * server.c (handle_query): Call handle_new_gdb_connection.
1182 * server.h (report_fork_events): Declare global flag.
1183 * target.h (struct target_ops) <handle_new_gdb_connection>:
1184 New member.
1185 (target_handle_new_gdb_connection): New macro.
1186 * win32-low.c: Initialize new structure member.
1187
1188 2015-05-12 Don Breazeal <donb@codesourcery.com>
1189
1190 * mem-break.c (APPEND_TO_LIST): Define macro.
1191 (clone_agent_expr): New function.
1192 (clone_one_breakpoint): New function.
1193 (clone_all_breakpoints): New function.
1194 * mem-break.h: Declare new functions.
1195
1196 2015-05-12 Don Breazeal <donb@codesourcery.com>
1197
1198 * linux-low.c (linux_supports_fork_events): New function.
1199 (linux_supports_vfork_events): New function.
1200 (linux_target_ops): Initialize new structure members.
1201 (initialize_low): Call linux_check_ptrace_features.
1202 * lynx-low.c (lynx_target_ops): Initialize new structure
1203 members.
1204 * server.c (report_fork_events, report_vfork_events):
1205 New global flags.
1206 (handle_query): Add new features to qSupported packet and
1207 response.
1208 (captured_main): Initialize new global variables.
1209 * target.h (struct target_ops) <supports_fork_events>:
1210 New member.
1211 <supports_vfork_events>: New member.
1212 (target_supports_fork_events): New macro.
1213 (target_supports_vfork_events): New macro.
1214 * win32-low.c (win32_target_ops): Initialize new structure
1215 members.
1216
1217 2015-05-12 Gary Benson <gbenson@redhat.com>
1218
1219 * server.c (handle_qxfer_exec_file): Use current process
1220 if annex is empty.
1221
1222 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1223
1224 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1225 Remove HAVE_PTRACE_GETREGS conditionals.
1226 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1227 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1228
1229 2015-05-08 Yao Qi <yao.qi@linaro.org>
1230
1231 * linux-low.c (linux_supports_conditional_breakpoints): New
1232 function.
1233 (linux_target_ops): Install new target method.
1234 * lynx-low.c (lynx_target_ops): Install NULL hook for
1235 supports_conditional_breakpoints.
1236 * nto-low.c (nto_target_ops): Likewise.
1237 * spu-low.c (spu_target_ops): Likewise.
1238 * win32-low.c (win32_target_ops): Likewise.
1239 * server.c (handle_query): Check
1240 target_supports_conditional_breakpoints.
1241 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1242 New field.
1243 (target_supports_conditional_breakpoints): New macro.
1244
1245 2015-05-06 Pedro Alves <palves@redhat.com>
1246
1247 PR server/18081
1248 * server.c (start_inferior): If the process exits, mourn it.
1249
1250 2015-04-21 Gary Benson <gbenson@redhat.com>
1251
1252 * hostio.c (fileio_open_flags_to_host): Factored out to
1253 fileio_to_host_openflags in common/fileio.c. Single use
1254 updated.
1255
1256 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1257
1258 * linux-xtensa-low.c (xtensa_fill_gregset)
1259 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1260 XCHAL_HAVE_LOOP.
1261
1262 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1263
1264 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1265 (regs_info): Replace usrregs pointer with NULL.
1266
1267 2015-04-17 Gary Benson <gbenson@redhat.com>
1268
1269 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1270 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1271 * server.c (handle_qxfer_exec_file): New function.
1272 (qxfer_packets): Add exec-file entry.
1273 (handle_query): Report qXfer:exec-file:read as supported packet.
1274
1275 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1276
1277 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1278
1279 2015-04-09 Gary Benson <gbenson@redhat.com>
1280
1281 * hostio-errno.c (errno_to_fileio_error): Remove function.
1282 Update caller to use remote_fileio_to_fio_error.
1283
1284 2015-04-09 Yao Qi <yao.qi@linaro.org>
1285
1286 * linux-low.c (linux_insert_point): Call
1287 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1288 (linux_remove_point): Call remove_memory_breakpoint if type is
1289 raw_bkpt_type_sw.
1290 * linux-x86-low.c (x86_insert_point): Don't call
1291 insert_memory_breakpoint.
1292 (x86_remove_point): Don't call remove_memory_breakpoint.
1293
1294 2015-04-01 Pedro Alves <palves@redhat.com>
1295 Cleber Rosa <crosa@redhat.com>
1296
1297 * server.c (gdbserver_usage): Reorganize and extend the usage
1298 message.
1299
1300 2015-03-24 Pedro Alves <palves@redhat.com>
1301
1302 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1303 output. Also dump TRAP_TRACE.
1304 (linux_low_filter_event): In debug output, distinguish a
1305 resume_stop SIGSTOP from a delayed SIGSTOP.
1306
1307 2015-03-24 Gary Benson <gbenson@redhat.com>
1308
1309 * linux-x86-low.c (x86_linux_new_thread): Moved to
1310 nat/x86-linux.c.
1311 (x86_linux_prepare_to_resume): Likewise.
1312
1313 2015-03-24 Gary Benson <gbenson@redhat.com>
1314
1315 * Makefile.in (x86-linux-dregs.o): New rule.
1316 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1317 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1318 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1319 (x86_linux_dr_get): Likewise.
1320 (x86_linux_dr_set): Likewise.
1321 (update_debug_registers_callback): Likewise.
1322 (x86_linux_dr_set_addr): Likewise.
1323 (x86_linux_dr_get_addr): Likewise.
1324 (x86_linux_dr_set_control): Likewise.
1325 (x86_linux_dr_get_control): Likewise.
1326 (x86_linux_dr_get_status): Likewise.
1327 (x86_linux_update_debug_registers): Likewise.
1328
1329 2015-03-24 Gary Benson <gbenson@redhat.com>
1330
1331 * linux-x86-low.c (x86_linux_update_debug_registers):
1332 New function, factored out from...
1333 (x86_linux_prepare_to_resume): ...this.
1334
1335 2015-03-24 Gary Benson <gbenson@redhat.com>
1336
1337 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1338 (x86_linux_dr_set): Likewise.
1339 (update_debug_registers_callback): Likewise.
1340 (x86_linux_dr_set_addr): Likewise.
1341 (x86_linux_dr_get_addr): Likewise.
1342 (x86_linux_dr_set_control): Likewise.
1343 (x86_linux_dr_get_control): Likewise.
1344 (x86_linux_dr_get_status): Likewise.
1345 (x86_linux_prepare_to_resume): Likewise.
1346
1347 2015-03-24 Gary Benson <gbenson@redhat.com>
1348
1349 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1350 Use perror_with_name. Pass string through gettext.
1351 (x86_linux_dr_set): Likewise.
1352
1353 2015-03-24 Gary Benson <gbenson@redhat.com>
1354
1355 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1356 (x86_linux_dr_set_addr): ...this.
1357 (x86_dr_low_get_addr): Rename to...
1358 (x86_linux_dr_get_addr): ...this.
1359 (x86_dr_low_set_control): Rename to...
1360 (x86_linux_dr_set_control): ...this.
1361 (x86_dr_low_get_control): Rename to...
1362 (x86_linux_dr_get_control): ...this.
1363 (x86_dr_low_get_status): Rename to...
1364 (x86_linux_dr_get_status): ...this.
1365 (x86_dr_low): Update with new function names.
1366
1367 2015-03-24 Gary Benson <gbenson@redhat.com>
1368
1369 * Makefile.in (x86-linux.o): New rule.
1370 * configure.srv: Add x86-linux.o to relevant targets.
1371 * linux-low.c (lwp_set_arch_private_info): New function.
1372 (lwp_arch_private_info): Likewise.
1373 * linux-x86-low.c: Include nat/x86-linux.h.
1374 (arch_lwp_info): Removed structure.
1375 (update_debug_registers_callback):
1376 Use lwp_set_debug_registers_changed.
1377 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1378 and lwp_set_debug_registers_changed.
1379 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1380
1381 2015-03-24 Gary Benson <gbenson@redhat.com>
1382
1383 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1384 * linux-arm-low.c (arm_new_thread): Likewise.
1385 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1386 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1387 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1388 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1389
1390 2015-03-24 Gary Benson <gbenson@redhat.com>
1391
1392 * linux-low.c (ptid_of_lwp): New function.
1393 (lwp_is_stopped): Likewise.
1394 (lwp_stop_reason): Likewise.
1395 * linux-x86-low.c (update_debug_registers_callback):
1396 Use lwp_is_stopped.
1397 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1398 lwp_stop_reason.
1399
1400 2015-03-24 Gary Benson <gbenson@redhat.com>
1401
1402 * linux-low.h (linux_stop_lwp): Remove declaration.
1403
1404 2015-03-24 Gary Benson <gbenson@redhat.com>
1405
1406 * linux-low.h: Include nat/linux-nat.h.
1407 * linux-low.c (iterate_over_lwps_args): New structure.
1408 (iterate_over_lwps_filter): New function.
1409 (iterate_over_lwps): Likewise.
1410 * linux-x86-low.c (update_debug_registers_callback):
1411 Update signature to what iterate_over_lwps expects.
1412 Remove PID check that iterate_over_lwps now performs.
1413 (x86_dr_low_set_addr): Use iterate_over_lwps.
1414 (x86_dr_low_set_control): Likewise.
1415
1416 2015-03-24 Gary Benson <gbenson@redhat.com>
1417
1418 * linux-x86-low.c (x86_debug_reg_state): New function.
1419 (x86_linux_prepare_to_resume): Use the above.
1420
1421 2015-03-24 Gary Benson <gbenson@redhat.com>
1422
1423 * linux-low.c (current_lwp_ptid): New function.
1424 * linux-x86-low.c: Include nat/linux-nat.h.
1425 (x86_dr_low_get_addr): Use current_lwp_ptid.
1426 (x86_dr_low_get_control): Likewise.
1427 (x86_dr_low_get_status): Likewise.
1428
1429 2015-03-20 Pedro Alves <palves@redhat.com>
1430
1431 * tracepoint.c (cmd_qtstatus): Make "str" const.
1432
1433 2015-03-20 Pedro Alves <palves@redhat.com>
1434
1435 * server.c (handle_general_set): Make "req_str" const.
1436
1437 2015-03-19 Pedro Alves <palves@redhat.com>
1438
1439 * linux-low.c (linux_resume_one_lwp): Rename to ...
1440 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1441 instead call perror_with_name.
1442 (check_ptrace_stopped_lwp_gone): New function.
1443 (linux_resume_one_lwp): Reimplement as wrapper around
1444 linux_resume_one_lwp_throw that swallows errors if the LWP is
1445 gone.
1446
1447 2015-03-19 Pedro Alves <palves@redhat.com>
1448
1449 * linux-low.c (count_events_callback, select_event_lwp_callback):
1450 No longer check whether the thread has resume_stop as last resume
1451 kind.
1452
1453 2015-03-19 Pedro Alves <palves@redhat.com>
1454
1455 * linux-low.c (count_events_callback, select_event_lwp_callback):
1456 Use the lwp's status_pending_p field, not the thread's.
1457
1458 2015-03-19 Pedro Alves <palves@redhat.com>
1459
1460 * linux-low.c (select_event_lwp_callback): Update comments to
1461 no longer mention SIGTRAP.
1462
1463 2015-03-18 Gary Benson <gbenson@redhat.com>
1464
1465 * server.c (handle_query): Do not report vFile:fstat as supported.
1466
1467 2015-03-11 Gary Benson <gbenson@redhat.com>
1468
1469 * hostio.c (sys/types.h): New include.
1470 (sys/stat.h): Likewise.
1471 (common-remote-fileio.h): Likewise.
1472 (handle_fstat): New function.
1473 (handle_vFile): Handle vFile:fstat packets.
1474
1475 2015-03-11 Gary Benson <gbenson@redhat.com>
1476
1477 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1478 struct stat.st_blocks and struct stat.st_blksize.
1479 * configure: Regenerate.
1480 * config.in: Likewise.
1481 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1482 (OBS): Add common-remote-fileio.o.
1483 (common-remote-fileio.o): New rule.
1484
1485 2015-03-09 Pedro Alves <palves@redhat.com>
1486
1487 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1488 'struct sockaddr' pointer in 'accept' call.
1489
1490 2015-03-09 Pedro Alves <palves@redhat.com>
1491
1492 Revert:
1493 2015-03-07 Pedro Alves <palves@redhat.com>
1494 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1495 or <winsock2.h> here. Instead include "gdb_socket.h".
1496 (remote_open): Use union gdb_sockaddr_u.
1497 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1498 or <winsock2.h> here. Instead include "gdb_socket.h".
1499 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1500 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1501 or <sys/un.h>.
1502 (init_named_socket, gdb_agent_helper_thread): Use union
1503 gdb_sockaddr_u.
1504
1505 2015-03-07 Pedro Alves <palves@redhat.com>
1506
1507 * configure.ac (build_warnings): Move
1508 -Wdeclaration-after-statement to the C-specific set.
1509 * configure: Regenerate.
1510
1511 2015-03-07 Pedro Alves <palves@redhat.com>
1512
1513 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1514 or <winsock2.h> here. Instead include "gdb_socket.h".
1515 (remote_open): Use union gdb_sockaddr_u.
1516 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1517 or <winsock2.h> here. Instead include "gdb_socket.h".
1518 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1519 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1520 or <sys/un.h>.
1521 (init_named_socket, gdb_agent_helper_thread): Use union
1522 gdb_sockaddr_u.
1523
1524 2015-03-07 Pedro Alves <palves@redhat.com>
1525
1526 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1527 instead.
1528
1529 2015-03-06 Yao Qi <yao.qi@linaro.org>
1530
1531 * linux-aarch64-low.c (aarch64_insert_point): Use
1532 show_debug_regs as a boolean.
1533 (aarch64_remove_point): Likewise.
1534
1535 2015-03-05 Pedro Alves <palves@redhat.com>
1536
1537 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1538 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1539 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1540 * nto-low.c (nto_target_ops): Likewise.
1541 * spu-low.c (spu_target_ops): Likewise.
1542 * win32-low.c (win32_target_ops): Likewise.
1543
1544 2015-03-04 Pedro Alves <palves@redhat.com>
1545
1546 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1547 Decide whether a breakpoint triggered based on the SIGTRAP's
1548 siginfo.si_code.
1549 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1550 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1551 (linux_low_filter_event): Check for breakpoints before checking
1552 watchpoints.
1553 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1554 siginfo.si_code.
1555 (linux_stopped_by_sw_breakpoint)
1556 (linux_supports_stopped_by_sw_breakpoint)
1557 (linux_stopped_by_hw_breakpoint)
1558 (linux_supports_stopped_by_hw_breakpoint): New functions.
1559 (linux_target_ops): Install new target methods.
1560
1561 2015-03-04 Pedro Alves <palves@redhat.com>
1562
1563 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1564 * server.c (swbreak_feature, hwbreak_feature): New globals.
1565 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1566 (captured_main): Clear swbreak_feature and hwbreak_feature.
1567 * server.h (swbreak_feature, hwbreak_feature): Declare.
1568 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1569 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1570 supports_stopped_by_hw_breakpoint>: New fields.
1571 (target_supports_stopped_by_sw_breakpoint)
1572 (target_stopped_by_sw_breakpoint)
1573 (target_supports_stopped_by_hw_breakpoint)
1574 (target_stopped_by_hw_breakpoint): Declare.
1575
1576 2015-03-04 Pedro Alves <palves@redhat.com>
1577
1578 enum lwp_stop_reason -> enum target_stop_reason
1579 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1580 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1581 (linux_wait_1, stuck_in_jump_pad_callback)
1582 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1583 (linux_stopped_by_watchpoint):
1584 * linux-low.h (enum lwp_stop_reason): Delete.
1585 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1586 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1587
1588 2015-03-04 Yao Qi <yao.qi@linaro.org>
1589
1590 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1591
1592 2015-03-03 Gary Benson <gbenson@redhat.com>
1593
1594 * hostio.c (handle_vFile): Fix prefix lengths.
1595
1596 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1597
1598 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1599 ptr_bits.
1600
1601 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1602
1603 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1604 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1605 (clean): Add "rm -f" for above C files.
1606 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1607 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1608 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1609 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1610 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1611 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1612 (init_registers_s390x_vx_linux64)
1613 (init_registers_s390x_tevx_linux64)
1614 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1615 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1616 declarations.
1617 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1618 (s390_store_vxrs_high): New functions.
1619 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1620 NT_S390_VXRS_HIGH.
1621 (s390_arch_setup): Add logic for selecting one of the new target
1622 descriptions. Activate the new vector regsets if applicable.
1623 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1624 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1625 and init_registers_s390x_tevx_linux64.
1626
1627 2015-03-01 Pedro Alves <palves@redhat.com>
1628
1629 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1630 parameter.
1631
1632 2015-02-27 Pedro Alves <palves@redhat.com>
1633
1634 * linux-x86-low.c (u_debugreg_offset): New function.
1635 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1636
1637 2015-02-27 Pedro Alves <palves@redhat.com>
1638
1639 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1640 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1641 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1642 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1643 (ps_lsetfpregs, ps_getpid)
1644 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1645 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1646 (ps_lsetxregs, ps_plog): Declare.
1647
1648 2015-02-27 Pedro Alves <palves@redhat.com>
1649
1650 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1651 IP_AGENT_EXPORT_FUNC.
1652 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1653 IP_AGENT_EXPORT_FUNC.
1654 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1655 (IP_AGENT_EXPORT): Delete.
1656 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1657 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1658 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1659 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1660 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1661 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1662 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1663 (traceframe_read_count, traceframe_write_count)
1664 (traceframes_created, trace_state_variables, get_raw_reg)
1665 (get_trace_state_variable_value, set_trace_state_variable_value)
1666 (ust_loaded, helper_thread_id, cmd_buf): Use
1667 IPA_SYM_EXPORTED_NAME.
1668 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1669 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1670 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1671 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1672 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1673 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1674 EXTERN_C_PUSH/EXTERN_C_POP.
1675 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1676 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1677 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1678 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1679 (traceframe_write_count, traceframe_read_count)
1680 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1681 (about_to_request_buffer_space, get_trace_state_variable_value)
1682 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1683 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1684 EXTERN_C_PUSH/EXTERN_C_POP.
1685 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1686 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1687 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1688 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1689 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1690 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1691 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1692 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1693 Define.
1694 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1695 (IP_AGENT_EXPORT_VAR_DECL): Define.
1696 (tracing): Declare.
1697 (gdb_agent_get_raw_reg): Declare.
1698
1699 2015-02-27 Tom Tromey <tromey@redhat.com>
1700 Pedro Alves <palves@redhat.com>
1701
1702 Rename symbols whose names are reserved C++ keywords throughout.
1703
1704 2015-02-27 Pedro Alves <palves@redhat.com>
1705
1706 * Makefile.in (COMPILER): New, get it from autoconf.
1707 (CXX): Get from autoconf instead.
1708 (COMPILE.pre): Use COMPILER.
1709 (CC-LD): Rename to ...
1710 (CC_LD): ... this. Use COMPILER.
1711 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1712 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1713 * acinclude.m4: Include build-with-cxx.m4.
1714 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1715 Disable -Werror by default if building in C++ mode.
1716 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1717 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1718 the C++ compiler. Save/restore CXXFLAGS too.
1719 * configure: Regenerate.
1720
1721 2015-02-27 Pedro Alves <palves@redhat.com>
1722
1723 * acinclude.m4: Include libiberty.m4.
1724 * configure.ac: Call libiberty_INIT.
1725 * config.in, configure: Regenerate.
1726
1727 2015-02-26 Pedro Alves <palves@redhat.com>
1728
1729 * linux-low.c (linux_wait_1): When incrementing the PC past a
1730 program breakpoint always use the_low_target.breakpoint_len as
1731 increment, rather than the maximum between that and
1732 the_low_target.decr_pc_after_break.
1733
1734 2015-02-23 Pedro Alves <palves@redhat.com>
1735
1736 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1737 thread was doing a step-over; always adjust the PC if
1738 we stepped over a permanent breakpoint.
1739 (linux_wait_1): If we stepped over breakpoint that was on top of a
1740 permanent breakpoint, manually advance the PC past it.
1741
1742 2015-02-23 Pedro Alves <palves@redhat.com>
1743
1744 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1745 modes.
1746 (x86_fill_gregset, x86_store_gregset): Use it when handling
1747 $orig_eax.
1748
1749 2015-02-20 Pedro Alves <palves@redhat.com>
1750
1751 * thread-db.c: Include "nat/linux-procfs.h".
1752 (thread_db_init): Skip listing new threads if the kernel supports
1753 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1754
1755 2015-02-20 Pedro Alves <palves@redhat.com>
1756
1757 * linux-low.c (status_pending_p_callback): Use ptid_match.
1758
1759 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1760
1761 PR breakpoints/16812
1762 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1763 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1764 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1765
1766 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1767
1768 PR breakpoints/15956
1769 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1770
1771 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1772
1773 * linux-low.c (linux_low_btrace_conf): Print size.
1774 * server.c (handle_btrace_conf_general_set): New.
1775 (hanle_general_set): Call handle_btrace_conf_general_set.
1776 (handle_query): Report Qbtrace-conf:bts:size as supported.
1777
1778 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1779
1780 * linux-low.c (linux_low_enable_btrace): Update parameters.
1781 (linux_low_btrace_conf): New.
1782 (linux_target_ops)<to_btrace_conf>: Initialize.
1783 * server.c (current_btrace_conf): New.
1784 (handle_btrace_enable): Rename to ...
1785 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1786 to target_enable_btrace. Update comment. Update users.
1787 (handle_qxfer_btrace_conf): New.
1788 (qxfer_packets): Add btrace-conf entry.
1789 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1790 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1791 (target_ops)<read_btrace_conf>: New.
1792 (target_enable_btrace): Update parameters.
1793 (target_read_btrace_conf): New.
1794
1795 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1796
1797 * server.c (handle_btrace_general_set): Remove call to
1798 target_supports_btrace.
1799 (supported_btrace_packets): New.
1800 (handle_query): Call supported_btrace_packets.
1801 * target.h: include btrace-common.h.
1802 (btrace_target_info): Removed.
1803 (supports_btrace, target_supports_btrace): Update parameters.
1804
1805 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1806
1807 * Makefile.in (SFILES): Add common/btrace-common.c.
1808 (OBS): Add common/btrace-common.o.
1809 (btrace-common.o): Add build rules.
1810 * linux-low: Include btrace-common.h.
1811 (linux_low_read_btrace): Use struct btrace_data. Call
1812 btrace_data_init and btrace_data_fini.
1813
1814 2015-02-06 Pedro Alves <palves@redhat.com>
1815
1816 * thread-db.c (find_new_threads_callback): Add debug output.
1817
1818 2015-02-04 Pedro Alves <palves@redhat.com>
1819
1820 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1821 (resume_stopped_resumed_lwps): New function.
1822 (linux_wait_for_event_filtered): Use it.
1823
1824 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1825
1826 * Makefile.in (SFILES): Add linux-personality.c.
1827 (linux-personality.o): New rule.
1828 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1829 list of objects to be built.
1830 * linux-low.c: Include nat/linux-personality.h.
1831 (linux_create_inferior): Remove code to disable address space
1832 randomization (moved to ../nat/linux-personality.c). Create
1833 cleanup to disable address space randomization.
1834
1835 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1836
1837 * Makefile.in (posix-strerror.o): New rule.
1838 (mingw-strerror.o): Likewise.
1839 * configure: Regenerated.
1840 * configure.ac: Source file ../common/common.host. Initialize new
1841 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1842
1843 2015-01-14 Yao Qi <yao@codesourcery.com>
1844
1845 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1846 (ppc-linux.o): New rule.
1847 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1848 * configure.ac: AC_CHECK_FUNCS(getauxval).
1849 * config.in: Re-generated.
1850 * configure: Re-generated.
1851 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1852 ppc64_64bit_inferior_p
1853
1854 2015-01-14 Yao Qi <yao@codesourcery.com>
1855
1856 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1857 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1858 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1859 (PT_ORIG_R3, PT_TRAP): Likewise.
1860 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1861 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1862 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1863
1864 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1865
1866 * i387-fp.c (i387_cache_to_xsave): In look over
1867 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1868 zmmh_low_space field by use of zmmh_high_space.
1869
1870 2015-01-09 Pedro Alves <palves@redhat.com>
1871
1872 * linux-low.c (step_over_bkpt): Move higher up in the file.
1873 (handle_extended_wait): Don't store the stop_pc here.
1874 (get_stop_pc): Adjust comments and rename to ...
1875 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1876 stopped for a software breakpoint or hardware breakpoint.
1877 (thread_still_has_status_pending_p): New function.
1878 (status_pending_p_callback): Use
1879 thread_still_has_status_pending_p. If the event is no longer
1880 interesting, resume the LWP.
1881 (handle_tracepoints): Add assert.
1882 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1883 (wstatus_maybe_breakpoint): New function.
1884 (cancel_breakpoint): Delete function.
1885 (check_stopped_by_watchpoint): New function, factored out from
1886 linux_low_filter_event.
1887 (lp_status_maybe_breakpoint): Delete function.
1888 (linux_low_filter_event): Remove filter_ptid argument.
1889 Leave thread group exits pending here. Store the LWP's stop PC.
1890 Always leave events pending.
1891 (linux_wait_for_event_filtered): Pull all events out of the
1892 kernel, and leave them all pending.
1893 (count_events_callback, select_event_lwp_callback): Consider all
1894 events.
1895 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1896 (select_event_lwp): Only give preference to the stepping LWP in
1897 all-stop mode. Adjust comments.
1898 (ignore_event): New function.
1899 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1900 references to cancel_breakpoints. Adjust to renames. Also give
1901 equal priority to all LWPs that have had events in non-stop mode.
1902 If reporting a software breakpoint event, unadjust the LWP's PC.
1903 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1904 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1905 Adjust.
1906 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1907 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1908 (linux_stopped_by_watchpoint): Adjust.
1909 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1910 * linux-low.h (enum lwp_stop_reason): New.
1911 (struct lwp_info) <stop_pc>: Adjust comment.
1912 <stopped_by_watchpoint>: Delete field.
1913 <stop_reason>: New field.
1914 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1915 * mem-break.c (software_breakpoint_inserted_here)
1916 (hardware_breakpoint_inserted_here): New function.
1917 * mem-break.h (software_breakpoint_inserted_here)
1918 (hardware_breakpoint_inserted_here): Declare.
1919 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1920 (cancel_breakpoints): Delete.
1921 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1922 (upload_fast_traceframes): Remove references to
1923 cancel_breakpoints.
1924
1925 2015-01-09 Pedro Alves <palves@redhat.com>
1926
1927 * thread-db.c (find_new_threads_callback): Ignore thread if the
1928 kernel thread ID is -1.
1929
1930 2015-01-09 Pedro Alves <palves@redhat.com>
1931
1932 * linux-low.c (linux_attach_fail_reason_string): Move to
1933 nat/linux-ptrace.c, and rename.
1934 (linux_attach_lwp): Update comment.
1935 (attach_proc_task_lwp_callback): New function.
1936 (linux_attach): Adjust to rename and use
1937 linux_proc_attach_tgid_threads.
1938 (linux_attach_fail_reason_string): Delete declaration.
1939
1940 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1941
1942 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1943 * server.c (gdbserver_version): Likewise.
1944
1945 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1946
1947 * remote-utils.c: Include ctype.h.
1948 (input_interrupt): Explicitly handle the case when the char
1949 received is the NUL byte. Improve the printing of non-ASCII
1950 characters.
1951
1952 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1953
1954 * linux-low.c (linux_low_filter_event): Update call to
1955 linux_enable_event_reporting following the addition of
1956 a new parameter to that function.
1957
1958 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1959
1960 PR server/17457
1961 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1962 (AARCH64_FPCR_REGNO): Likewise.
1963 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1964 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1965 (aarch64_store_fpregset): Likewise.
1966
1967 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1968
1969 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1970 Remove FIXME comment about assumption about N.
1971
1972 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1973
1974 * configure.ac: If large-file support is disabled in GDBserver,
1975 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1976 * configure: Regenerate.
1977
1978 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1979
1980 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1981 warning upon ENODATA from ptrace.
1982 * linux-s390-low.c (s390_store_tdb): New.
1983 (s390_regsets): Add regset for NT_S390_TDB.
1984
1985 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1986
1987 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1988 without a fill_function.
1989 * linux-s390-low.c (s390_fill_last_break): Remove.
1990 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1991 (s390_arch_setup): Use regset's size instead of fill_function for
1992 loop end condition.
1993
1994 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1995
1996 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1997 the regset's store function when ptrace returned an error.
1998 * regcache.c (get_thread_regcache): Invalidate register cache
1999 before fetching inferior's registers.
2000
2001 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2002
2003 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2004 while-loop as for-loop.
2005 (regsets_store_inferior_registers): Likewise.
2006
2007 2014-11-28 Yao Qi <yao@codesourcery.com>
2008
2009 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2010 * config.in, configure: Re-generate.
2011 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2012 is defined.
2013
2014 2014-11-21 Yao Qi <yao@codesourcery.com>
2015
2016 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2017 (AC_CHECK_HEADERS): Remove malloc.h.
2018 * configure: Re-generated.
2019 * config.in: Re-generated.
2020 * server.h: Don't include alloca.h and malloc.h.
2021 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2022 Don't include malloc.h.
2023
2024 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2025
2026 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2027 corresponding ERRNO check in same block.
2028
2029 2014-11-12 Pedro Alves <palves@redhat.com>
2030
2031 * server.c (cont_thread): Update comment.
2032 (start_inferior, attach_inferior): No longer clear cont_thread.
2033 (handle_v_cont): No longer set cont_thread.
2034 (captured_main): Clear cont_thread each time a GDB connects.
2035
2036 2014-11-12 Pedro Alves <palves@redhat.com>
2037
2038 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2039 thread, and don't resume all threads if the Hc thread has exited.
2040
2041 2014-11-12 Pedro Alves <palves@redhat.com>
2042
2043 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2044 the process group instead of to a specific LWP.
2045
2046 2014-10-15 Pedro Alves <palves@redhat.com>
2047
2048 PR server/17487
2049 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2050 parameter.
2051 (arm_set_thread_context): Delete.
2052 (the_low_target): Adjust.
2053 * win32-i386-low.c (debug_registers_changed)
2054 (debug_registers_used): Delete.
2055 (update_debug_registers_callback): New function.
2056 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2057 needing to update their debug registers.
2058 (win32_get_current_dr): New function.
2059 (x86_dr_low_get_addr, x86_dr_low_get_control)
2060 (x86_dr_low_get_status): Fetch the debug register from the thread
2061 record's context.
2062 (i386_initial_stuff): Adjust.
2063 (i386_get_thread_context): Remove current_event parameter. Don't
2064 clear debug_registers_changed nor copy DR values to
2065 debug_reg_state.
2066 (i386_set_thread_context): Delete.
2067 (i386_prepare_to_resume): New function.
2068 (i386_thread_added): Mark the thread as needing to update irs
2069 debug registers.
2070 (the_low_target): Remove i386_set_thread_context and install
2071 i386_prepare_to_resume.
2072 * win32-low.c (win32_get_thread_context): Adjust.
2073 (win32_set_thread_context): Use SetThreadContext
2074 directly.
2075 (win32_prepare_to_resume): New function.
2076 (win32_require_context): New function, factored out from ...
2077 (thread_rec): ... this.
2078 (continue_one_thread): Call win32_prepare_to_resume on each thread
2079 we're about to continue.
2080 (win32_resume): Call win32_prepare_to_resume on the event thread.
2081 * win32-low.h (struct win32_thread_info)
2082 <debug_registers_changed>: New field.
2083 (struct win32_target_ops): Change prototype of set_thread_context,
2084 delete set_thread_context and add prepare_to_resume.
2085 (win32_require_context): New declaration.
2086
2087 2014-10-08 Gary Benson <gbenson@redhat.com>
2088
2089 * server.h: Do not include common-exceptions.h.
2090
2091 2014-10-08 Gary Benson <gbenson@redhat.com>
2092
2093 * server.h: Do not include cleanups.h.
2094
2095 2014-09-30 James Hogan <james.hogan@imgtec.com>
2096
2097 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2098 mips64-dsp-linux.c.
2099
2100 2014-09-23 Yao Qi <yao@codesourcery.com>
2101
2102 * linux-low.c (lp_status_maybe_breakpoint): New function.
2103 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2104 (count_events_callback): Likewise.
2105 (select_event_lwp_callback): Likewise.
2106 (cancel_breakpoints_callback): Likewise.
2107
2108 2014-09-19 Don Breazeal <donb@codesourcery.com>
2109
2110 * linux-low.c (handle_extended_wait): Call
2111 linux_ptrace_get_extended_event.
2112 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2113 linux_is_extended_waitstatus.
2114
2115 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2116
2117 * Makefile.in (CPPFLAGS): Define.
2118 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2119 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2120
2121 2014-09-16 Gary Benson <gbenson@redhat.com>
2122
2123 * inferiors.h (current_inferior): Renamed as...
2124 (current_thread): New variable. All uses updated.
2125 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2126 (maybe_move_out_of_jump_pad): Likewise.
2127 (cancel_breakpoint): Likewise.
2128 (linux_low_filter_event): Likewise.
2129 (wait_for_sigstop): Likewise.
2130 (linux_resume_one_lwp): Likewise.
2131 (need_step_over_p): Likewise.
2132 (start_step_over): Likewise.
2133 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2134 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2135 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2136 and save_inferior as saved_thread.
2137 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2138 saved_thread.
2139 (regcache_invalidate_thread): Likewise.
2140 * remote-utils.c (prepare_resume_reply): Likewise.
2141 * thread-db.c (thread_db_get_tls_address): Likewise.
2142 (disable_thread_event_reporting): Likewise.
2143 (remove_thread_event_breakpoints): Likewise.
2144 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2145 as saved_thread.
2146 * target.h (set_desired_inferior): Renamed as...
2147 (set_desired_thread): New declaration. All uses updated.
2148 * server.c (myresume): Updated comment to reference thread instead
2149 of inferior.
2150 (handle_serial_event): Likewise.
2151 (handle_target_event): Likewise.
2152
2153 2014-09-12 Tom Tromey <tromey@redhat.com>
2154 Gary Benson <gbenson@redhat.com>
2155
2156 * regcache.h: Include common-regcache.h.
2157 (regcache_read_pc): Don't declare.
2158 * regcache.c (get_thread_regcache_for_ptid): New function.
2159
2160 2014-09-11 Tom Tromey <tromey@redhat.com>
2161 Gary Benson <gbenson@redhat.com>
2162
2163 * symbol.c: New file.
2164 * Makefile.in (SFILES): Add symbol.c.
2165 (OBS): Add symbol.o.
2166
2167 2014-09-11 Gary Benson <gbenson@redhat.com>
2168
2169 * target.c (target_stop_ptid, target_continue_ptid): New
2170 functions.
2171
2172 2014-09-11 Tom Tromey <tromey@redhat.com>
2173 Gary Benson <gbenson@redhat.com>
2174
2175 * target.h: Include target/target.h.
2176 * target.c (target_read_memory, target_read_uint32)
2177 (target_write_memory): New functions.
2178
2179 2014-09-11 Gary Benson <gbenson@redhat.com>
2180
2181 * server.h (debug_hw_points): Don't declare.
2182 * server.c (debug_hw_points): Don't define. Replace all uses
2183 with show_debug_regs.
2184 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2185 all uses with show_debug_regs.
2186
2187 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2188
2189 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2190 endianness into account.
2191 (ppc_supply_ptrace_register): Likewise.
2192
2193 2014-09-03 James Hogan <james.hogan@imgtec.com>
2194
2195 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2196 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2197
2198 2014-09-03 Gary Benson <gbenson@redhat.com>
2199
2200 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2201 ALL_DEBUG_ADDRESS_REGISTERS.
2202
2203 2014-09-02 Gary Benson <gbenson@redhat.com>
2204
2205 * i386-low.h: Renamed as...
2206 * x86-low.h: New file. All type, function and variable name
2207 prefixes changed from "i386_" to "x86_". All references updated.
2208 * i386-low.c: Renamed as...
2209 * x86-low.c: New file. All type, function and variable name
2210 prefixes changed from "i386_" to "x86_". All references updated.
2211
2212 2014-09-02 Gary Benson <gbenson@redhat.com>
2213
2214 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2215 (x86_linux_new_thread): Likewise.
2216
2217 2014-08-29 Gary Benson <gbenson@redhat.com>
2218
2219 * server.h (setjmp.h): Do not include.
2220 (toplevel): Do not declare.
2221 (common-exceptions.h): Include.
2222 (cleanups.h): Likewise.
2223 * server.c (toplevel): Do not define.
2224 (exit_code): New static global.
2225 (detach_or_kill_for_exit_cleanup): New function.
2226 (main): New function. Original main renamed to...
2227 (captured_main): New function.
2228 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2229
2230 2014-08-29 Gary Benson <gbenson@redhat.com>
2231
2232 * Makefile.in (SFILES): Add common/common-exceptions.c.
2233 (OBS): Add common-exceptions.o.
2234 (common-exceptions.o): New rule.
2235 * utils.c (prepare_to_throw_exception): New function.
2236
2237 2014-08-29 Gary Benson <gbenson@redhat.com>
2238
2239 * config.in: Regenerate.
2240 * configure: Likewise.
2241
2242 2014-08-29 Gary Benson <gbenson@redhat.com>
2243
2244 * Makefile.in (SFILES): Add common/cleanups.c.
2245 (OBS): cleanups.o.
2246 (cleanups.o): New rule.
2247
2248 2014-08-29 Gary Benson <gbenson@redhat.com>
2249
2250 * utils.c (internal_vwarning): New function.
2251
2252 2014-08-28 Gary Benson <gbenson@redhat.com>
2253
2254 * utils.h (fatal): Remove declaration.
2255 * utils.c (fatal): Remove function.
2256
2257 2014-08-28 Gary Benson <gbenson@redhat.com>
2258
2259 * tracepoint.c (gdb_agent_init): Replace fatal with
2260 perror_with_name.
2261 (initialize_tracepoint): Likewise.
2262
2263 2014-08-28 Gary Benson <gbenson@redhat.com>
2264
2265 * remote-utils.c (remote_prepare): Replace fatal with error.
2266
2267 2014-08-28 Gary Benson <gbenson@redhat.com>
2268
2269 * linux-low.c (linux_async): Replace fatal with warning.
2270 Tidy up and return.
2271 (linux_start_non_stop): Return -1 if linux_async failed.
2272
2273 2014-08-28 Gary Benson <gbenson@redhat.com>
2274
2275 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2276 gdb_assert.
2277 (i386_dr_low_get_addr): Remove vague comment.
2278 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2279 gdb_assert.
2280
2281 2014-08-28 Gary Benson <gbenson@redhat.com>
2282
2283 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2284 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2285 internal_error.
2286 (linux_resume_one_lwp): Likewise.
2287 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2288 gdb_assert.
2289 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2290 with internal_error.
2291 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2292 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2293 (find_register_by_name): Replace fatal with internal_error.
2294 (find_regno): Likewise.
2295 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2296 * thread-db.c (thread_db_create_event): Likewise.
2297 (thread_db_load_search): Likewise.
2298 (try_thread_db_load_1): Likewise.
2299 * tracepoint.c (get_jump_space_head): Replace fatal with
2300 internal_error.
2301 (claim_trampoline_space): Likewise.
2302 (have_fast_tracepoint_trampoline_buffer): Likewise.
2303 (cmd_qtstart): Likewise.
2304 (stop_tracing): Likewise.
2305 (fast_tracepoint_collecting): Likewise.
2306 (target_malloc): Likewise.
2307 (download_tracepoint): Likewise.
2308 (download_trace_state_variables): Replace check with gdb_assert.
2309 (upload_fast_traceframes): Replace fatal with internal_error.
2310
2311 2014-08-19 Tom Tromey <tromey@redhat.com>
2312 Gary Benson <gbenson@redhat.com>
2313
2314 * Makefile.in (SFILES): Add common/common-debug.c.
2315 (OBS): Add common-debug.o.
2316 (common-debug.o): New rule.
2317 * debug.h (debug_printf): Don't declare.
2318 * debug.c (debug_printf): Renamed and rewritten as...
2319 (debug_vprintf): New function.
2320
2321 2014-08-19 Gary Benson <gbenson@redhat.com>
2322
2323 * utils.h: Do not include print-utils.h.
2324
2325 2014-08-19 Tom Tromey <tromey@redhat.com>
2326 Gary Benson <gbenson@redhat.com>
2327
2328 * server.h: Add static assertion.
2329 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2330
2331 2014-08-19 Tom Tromey <tromey@redhat.com>
2332 Gary Benson <gbenson@redhat.com>
2333
2334 * Makefile.in (SFILES): Add common/errors.c.
2335 (OBS): Add errors.o.
2336 (IPA_OBS): Add errors-ipa.o.
2337 (errors.o): New rule.
2338 (errors-ipa.o): Likewise.
2339 * utils.h (perror_with_name, error, warning): Don't declare.
2340 * utils.c (warning): Renamed and rewritten as...
2341 (vwarning): New function.
2342 (error): Renamed and rewritten as...
2343 (verror): New function.
2344 (internal_error): Renamed and rewritten as...
2345 (internal_verror): New function.
2346
2347 2014-08-07 Gary Benson <gbenson@redhat.com>
2348
2349 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2350 * configure: Regenerate.
2351 * config.in: Likewise.
2352 * server.h: Do not include errno.h.
2353 * event-loop.c: Likewise.
2354 * hostio-errno.c: Likewise.
2355 * linux-low.c: Likewise.
2356 * remote-utils.c: Likewise.
2357 * spu-low.c: Likewise.
2358 * utils.c: Likewise.
2359 * gdbreplay.c: Unconditionally include errno.h.
2360
2361 2014-08-07 Gary Benson <gbenson@redhat.com>
2362
2363 * server.h: Do not include string.h.
2364 * event-loop.c: Likewise.
2365 * linux-low.c: Likewise.
2366 * regcache.c: Likewise.
2367 * remote-utils.c: Likewise.
2368 * spu-low.c: Likewise.
2369 * utils.c: Likewise.
2370
2371 2014-08-07 Gary Benson <gbenson@redhat.com>
2372
2373 * server.h: Do not include gdb_assert.h.
2374
2375 2014-08-07 Gary Benson <gbenson@redhat.com>
2376
2377 * server.h: Do not include common-utils.h.
2378
2379 2014-08-07 Gary Benson <gbenson@redhat.com>
2380
2381 * server.h: Do not include ptid.h.
2382 * notif.h: Likewise.
2383
2384 2014-08-07 Gary Benson <gbenson@redhat.com>
2385
2386 * server.h: Do not include gdb_locale.h.
2387
2388 2014-08-07 Gary Benson <gbenson@redhat.com>
2389
2390 * server.h: Do not include gdb/signals.h.
2391 * win32-low.c: Likewise.
2392
2393 2014-08-07 Gary Benson <gbenson@redhat.com>
2394
2395 * server.h: Do not include pathmax.h.
2396
2397 2014-08-07 Gary Benson <gbenson@redhat.com>
2398
2399 * server.h: Do not include libiberty.h.
2400 * linux-bfin-low.c: Likewise.
2401
2402 2014-08-07 Gary Benson <gbenson@redhat.com>
2403
2404 * server.h: Do not include ansidecl.h.
2405
2406 2014-08-07 Gary Benson <gbenson@redhat.com>
2407
2408 * linux-x86-low.c: Do not include stddef.h.
2409 * lynx-ppc-low.c: Likewise.
2410 * tracepoint.c: Likewise.
2411
2412 2014-08-07 Gary Benson <gbenson@redhat.com>
2413
2414 * server.h: Do not include stdarg.h.
2415 * nto-low.c: Likewise.
2416
2417 2014-08-07 Gary Benson <gbenson@redhat.com>
2418
2419 * server.h: Do not include stdlib.h.
2420 * inferiors.c: Likewise.
2421 * linux-low.c: Likewise.
2422 * regcache.c: Likewise.
2423 * spu-low.c: Likewise.
2424 * tracepoint.c: Likewise.
2425 * utils.c: Likewise.
2426
2427 2014-08-07 Gary Benson <gbenson@redhat.com>
2428
2429 * server.h: Do not include stdio.h.
2430 * linux-low.c: Likewise.
2431 * remote-utils.c: Likewise.
2432 * spu-low.c: Likewise.
2433 * utils.c: Likewise.
2434 * wincecompat.c: Likewise.
2435
2436 2014-08-06 Gary Benson <gbenson@redhat.com>
2437
2438 * regcache.c (init_register_cache): Move conditionals inside if.
2439
2440 2014-08-06 Gary Benson <gbenson@redhat.com>
2441
2442 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2443
2444 2014-07-31 Gary Benson <gbenson@redhat.com>
2445
2446 * ax.h: Do not include server.h.
2447 * gdbthread.h: Likewise.
2448 * lynx-low.h: Likewise.
2449 * notif.h: Likewise.
2450
2451 2014-07-30 Gary Benson <gbenson@redhat.com>
2452
2453 * server.h: Include common-defs.h.
2454 Do not include config.h or build-gnulib-gdbserver/config.h.
2455
2456 2014-07-30 Gary Benson <gbenson@redhat.com>
2457
2458 * hostio-errno.c: Move server.h to top of includes list.
2459 * inferiors.c: Likewise.
2460 * linux-x86-low.c: Likewise.
2461 * notif.c: Include server.h.
2462
2463 2014-07-24 Tom Tromey <tromey@redhat.com>
2464 Gary Benson <gbenson@redhat.com>
2465
2466 * server.h (CORE_ADDR): Now unsigned.
2467
2468 2014-07-16 Pedro Alves <palves@redhat.com>
2469
2470 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2471
2472 2014-07-15 Pedro Alves <palves@redhat.com>
2473
2474 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2475 copy.
2476
2477 2014-07-11 Pedro Alves <palves@redhat.com>
2478
2479 * linux-low.c (kill_wait_lwp): New function, based on
2480 kill_one_lwp_callback, but use my_waitpid directly.
2481 (kill_one_lwp_callback, linux_kill): Use it.
2482
2483 2014-06-23 Pedro Alves <palves@redhat.com>
2484
2485 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2486 before setting DR0..DR3.
2487
2488 2014-06-20 Gary Benson <gbenson@redhat.com>
2489
2490 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2491 * configure: Regenerated.
2492 * config.in: Likewise.
2493
2494 2014-06-20 Gary Benson <gbenson@redhat.com>
2495
2496 * Makefile.in (SFILES): Update locations for files moved
2497 from common to nat.
2498 (object file files): Reordered.
2499
2500 2014-06-20 Gary Benson <gbenson@redhat.com>
2501
2502 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2503 (i386_dr_low_set_addr): Likewise.
2504 (i386_dr_low_get_addr): Likewise.
2505 (i386_dr_low_can_set_control): Likewise.
2506 (i386_dr_low_set_control): Likewise.
2507 (i386_dr_low_get_control): Likewise.
2508 (i386_dr_low_get_status): Likewise.
2509 (i386_get_debug_register_length): Likewise.
2510 * linux-x86-low.c (i386_dr_low_set_addr):
2511 Changed signature. Made static.
2512 (i386_dr_low_get_addr): Likewise.
2513 (i386_dr_low_set_control): Likewise.
2514 (i386_dr_low_get_control): Likewise.
2515 (i386_dr_low_get_status): Likewise.
2516 (i386_dr_low): New global variable.
2517 * win32-i386-low.c (i386_dr_low_set_addr):
2518 Changed signature. Made static.
2519 (i386_dr_low_get_addr): Likewise.
2520 (i386_dr_low_set_control): Likewise.
2521 (i386_dr_low_get_control): Likewise.
2522 (i386_dr_low_get_status): Likewise.
2523 (i386_dr_low): New global variable.
2524
2525 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2526
2527 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2528 * Makefile.in (AR, AR_FLAGS): Define.
2529 * configure: Regenerate.
2530
2531 2014-06-19 Gary Benson <gbenson@redhat.com>
2532
2533 * Makefile.in (i386-dregs.o): New rule.
2534 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2535 * i386-low.c (target.h): Remove include.
2536 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2537 (DR_CONTROL_SHIFT): Likewise.
2538 (DR_CONTROL_SIZE): Likewise.
2539 (DR_RW_EXECUTE): Likewise.
2540 (DR_RW_WRITE): Likewise.
2541 (DR_RW_READ): Likewise.
2542 (DR_RW_IORW): Likewise.
2543 (DR_LEN_1): Likewise.
2544 (DR_LEN_2): Likewise.
2545 (DR_LEN_4): Likewise.
2546 (DR_LEN_8): Likewise.
2547 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2548 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2549 (DR_ENABLE_SIZE): Likewise.
2550 (DR_LOCAL_SLOWDOWN): Likewise.
2551 (DR_GLOBAL_SLOWDOWN): Likewise.
2552 (DR_CONTROL_RESERVED): Likewise.
2553 (I386_DR_CONTROL_MASK): Likewise.
2554 (I386_DR_VACANT): Likewise.
2555 (I386_DR_LOCAL_ENABLE): Likewise.
2556 (I386_DR_GLOBAL_ENABLE): Likewise.
2557 (I386_DR_DISABLE): Likewise.
2558 (I386_DR_SET_RW_LEN): Likewise.
2559 (I386_DR_GET_RW_LEN): Likewise.
2560 (I386_DR_WATCH_HIT): Likewise.
2561 (i386_wp_op_t): Likewise.
2562 (i386_show_dr): Likewise.
2563 (i386_length_and_rw_bits): Likewise.
2564 (i386_insert_aligned_watchpoint): Likewise.
2565 (i386_remove_aligned_watchpoint): Likewise.
2566 (i386_handle_nonaligned_watchpoint): Likewise.
2567 i386_update_inferior_debug_regs(): Likewise.
2568 (i386_dr_insert_watchpoint): Likewise.
2569 (i386_dr_remove_watchpoint): Likewise.
2570 (i386_dr_region_ok_for_watchpoint): Likewise.
2571 (i386_dr_stopped_data_address): Likewise.
2572 (i386_dr_stopped_by_watchpoint): Likewise.
2573
2574 2014-06-19 Gary Benson <gbenson@redhat.com>
2575
2576 * i386-low.c (i386_dr_show): Renamed to
2577 i386_show_dr and made static. All uses updated.
2578 (i386_dr_length_and_rw_bits): Renamed to
2579 i386_length_and_rw_bits and made static.
2580 All uses updated.
2581 (i386_dr_insert_aligned_watchpoint): Renamed to
2582 i386_insert_aligned_watchpoint and made static.
2583 All uses updated.
2584 (i386_dr_remove_aligned_watchpoint): Renamed to
2585 i386_remove_aligned_watchpoint and made static.
2586 All uses updated.
2587 (i386_dr_update_inferior_debug_regs): Renamed to
2588 i386_update_inferior_debug_regs and made static.
2589 All uses updated.
2590
2591 2014-06-18 Gary Benson <gbenson@redhat.com>
2592
2593 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2594 (i386_dr_low_can_set_control): Likewise.
2595 (i386_get_debug_register_length): Likewise.
2596 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2597 (i386_dr_low_can_set_control): Likewise.
2598 (i386_get_debug_register_length): Likewise.
2599
2600 2014-06-17 Gary Benson <gbenson@redhat.com>
2601
2602 * i386-low.h (i386-dregs.h): New include.
2603 (DR_FIRSTADDR): Now in i386-dregs.h.
2604 (DR_LASTADDR): Likewise.
2605 (DR_NADDR): Likewise.
2606 (DR_STATUS): Likewise.
2607 (DR_CONTROL): Likewise.
2608 (i386_debug_reg_state): Likewise.
2609 (i386_dr_insert_watchpoint): Likewise.
2610 (i386_dr_remove_watchpoint): Likewise.
2611 (i386_dr_region_ok_for_watchpoint): Likewise.
2612 (i386_dr_stopped_data_address): Likewise.
2613 (i386_dr_stopped_by_watchpoint): Likewise.
2614 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2615
2616 2014-06-18 Gary Benson <gbenson@redhat.com>
2617
2618 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2619 i386_dr_insert_watchpoint.
2620 (i386_low_remove_watchpoint): Renamed to
2621 i386_dr_remove_watchpoint.
2622 (i386_low_region_ok_for_watchpoint): Renamed to
2623 i386_dr_region_ok_for_watchpoint.
2624 (i386_low_stopped_data_address): Renamed to
2625 i386_dr_stopped_data_address.
2626 (i386_low_stopped_by_watchpoint): Renamed to
2627 i386_dr_stopped_by_watchpoint.
2628 * i386-low.c (i386_show_dr): Renamed to
2629 i386_dr_show and made nonstatic. All uses updated.
2630 (i386_length_and_rw_bits): Renamed to
2631 i386_dr_length_and_rw_bits and made nonstatic.
2632 All uses updated.
2633 (i386_insert_aligned_watchpoint): Renamed to
2634 i386_dr_insert_aligned_watchpoint and made nonstatic.
2635 All uses updated.
2636 (i386_remove_aligned_watchpoint): Renamed to
2637 i386_dr_remove_aligned_watchpoint and made nonstatic.
2638 All uses updated.
2639 (i386_update_inferior_debug_regs): Renamed to
2640 i386_dr_update_inferior_debug_regs and made nonstatic.
2641 All uses updated.
2642 (i386_low_insert_watchpoint): Renamed to
2643 i386_dr_insert_watchpoint. All uses updated.
2644 (i386_low_remove_watchpoint): Renamed to
2645 i386_dr_remove_watchpoint. All uses updated.
2646 (i386_low_region_ok_for_watchpoint): Renamed to
2647 i386_dr_region_ok_for_watchpoint. All uses updated.
2648 (i386_low_stopped_data_address): Renamed to
2649 i386_dr_stopped_data_address. All uses updated.
2650 (i386_low_stopped_by_watchpoint): Renamed to
2651 i386_dr_stopped_by_watchpoint. All uses updated.
2652
2653 2014-06-18 Gary Benson <gbenson@redhat.com>
2654
2655 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2656 (i386_dr_low_can_set_control): Likewise.
2657 (i386_insert_aligned_watchpoint): New check.
2658
2659 2014-06-18 Gary Benson <gbenson@redhat.com>
2660
2661 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2662 Renamed to state.
2663
2664 2014-06-18 Gary Benson <gbenson@redhat.com>
2665
2666 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2667 instead of fatal and error.
2668 (i386_handle_nonaligned_watchpoint): Likewise.
2669
2670 2014-06-18 Gary Benson <gbenson@redhat.com>
2671
2672 * i386-low.c (i386_get_debug_register_length): New macro.
2673 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2674 (i386_show_dr): Use debug_printf instead of fprintf. Use
2675 phex to format values.
2676
2677 2014-06-18 Gary Benson <gbenson@redhat.com>
2678
2679 * i386-low.h: Comment changes.
2680 * i386-low.c: Likewise.
2681
2682 2014-06-18 Gary Benson <gbenson@redhat.com>
2683
2684 * i386-low.c: Whitespace changes.
2685
2686 2014-06-12 Tom Tromey <tromey@redhat.com>
2687
2688 * utils.c (freeargv): Remove.
2689
2690 2014-06-12 Tom Tromey <tromey@redhat.com>
2691
2692 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2693 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2694 (parse_debug_format_options): Likewise.
2695 (gdbserver_usage): Likewise.
2696 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2697 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2698 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2699 against libiberty.
2700 ($(LIBGNU)): Depend on libiberty.
2701 (all-lib): Recurse into all subdirs.
2702 (install-only): Invoke "install" target in subdirs.
2703 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2704 targets.
2705 * configure: Rebuild.
2706 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2707 for vasprintf, vsnprintf, or gettimeofday.
2708 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2709 srv_tgtobj.
2710
2711 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2712
2713 * development.sh: Delete.
2714 * Makefile.in (config.status): Adjust dependency on development.sh.
2715 * configure.ac: Adjust development.sh source call.
2716 * configure: Regenerate.
2717
2718 2014-06-02 Pedro Alves <palves@redhat.com>
2719
2720 * ax.c (gdb_free_agent_expr): New function.
2721 * ax.h (gdb_free_agent_expr): New declaration.
2722 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2723 list.
2724 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2725 static.
2726 (clear_breakpoint_conditions_and_commands): New function.
2727 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2728 (clear_breakpoint_conditions_and_commands): New declaration.
2729
2730 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2731
2732 * linux-aarch64-low.c (asm/ptrace.h): Include.
2733
2734 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2735
2736 Fix TLS access for -static -pthread.
2737 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2738 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2739 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2740
2741 2014-05-20 Pedro Alves <palves@redhat.com>
2742
2743 * linux-aarch64-low.c (aarch64_insert_point)
2744 (aarch64_remove_point): No longer check whether the type is
2745 supported here. Adjust to new interface.
2746 (the_low_target): Install aarch64_supports_z_point_type as
2747 supports_z_point_type method.
2748 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2749 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2750 instead of a Z packet char. Adjust.
2751 (arm_supports_z_point_type): New function.
2752 (arm_insert_point, arm_remove_point): Adjust to new interface.
2753 (the_low_target): Install arm_supports_z_point_type.
2754 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2755 (cris_insert_point, cris_remove_point): Adjust to new interface.
2756 Don't check whether the type is supported here.
2757 (the_low_target): Install cris_supports_z_point_type.
2758 * linux-low.c (linux_supports_z_point_type): New function.
2759 (linux_insert_point, linux_remove_point): Adjust to new interface.
2760 * linux-low.h (struct linux_target_ops) <insert_point,
2761 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2762 raw_breakpoint pointer parameter.
2763 <supports_z_point_type>: New method.
2764 * linux-mips-low.c (mips_supports_z_point_type): New function.
2765 (mips_insert_point, mips_remove_point): Adjust to new interface.
2766 Use mips_supports_z_point_type.
2767 (the_low_target): Install mips_supports_z_point_type.
2768 * linux-ppc-low.c (the_low_target): Install NULL as
2769 supports_z_point_type method.
2770 * linux-s390-low.c (the_low_target): Install NULL as
2771 supports_z_point_type method.
2772 * linux-sparc-low.c (the_low_target): Install NULL as
2773 supports_z_point_type method.
2774 * linux-x86-low.c (x86_supports_z_point_type): New function.
2775 (x86_insert_point): Adjust to new insert_point interface. Use
2776 insert_memory_breakpoint. Adjust to new
2777 i386_low_insert_watchpoint interface.
2778 (x86_remove_point): Adjust to remove_point interface. Use
2779 remove_memory_breakpoint. Adjust to new
2780 i386_low_remove_watchpoint interface.
2781 (the_low_target): Install x86_supports_z_point_type.
2782 * lynx-low.c (lynx_target_ops): Install NULL as
2783 supports_z_point_type callback.
2784 * nto-low.c (nto_supports_z_point_type): New.
2785 (nto_insert_point, nto_remove_point): Adjust to new interface.
2786 (nto_target_ops): Install nto_supports_z_point_type.
2787 * mem-break.c: Adjust intro comment.
2788 (struct raw_breakpoint) <raw_type, size>: New fields.
2789 <inserted>: Update comment.
2790 <shlib_disabled>: Delete field.
2791 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2792 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2793 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2794 (raw_bkpt_type_to_target_hw_bp_type): New function.
2795 (find_enabled_raw_code_breakpoint_at): New function.
2796 (find_raw_breakpoint_at): New type and size parameters. Use them.
2797 (insert_memory_breakpoint): New function, based off
2798 set_raw_breakpoint_at.
2799 (remove_memory_breakpoint): New function.
2800 (set_raw_breakpoint_at): Reimplement.
2801 (set_breakpoint): New, based on set_breakpoint_at.
2802 (set_breakpoint_at): Reimplement.
2803 (delete_raw_breakpoint): Go through the_target->remove_point
2804 instead of assuming memory breakpoints.
2805 (find_gdb_breakpoint_at): Delete.
2806 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2807 (find_gdb_breakpoint): New function.
2808 (set_gdb_breakpoint_at): Delete.
2809 (z_type_supported): New function.
2810 (set_gdb_breakpoint_1): New function, loosely based off
2811 set_gdb_breakpoint_at.
2812 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2813 (delete_gdb_breakpoint_at): Delete.
2814 (delete_gdb_breakpoint_1): New function, loosely based off
2815 delete_gdb_breakpoint_at.
2816 (delete_gdb_breakpoint): New function.
2817 (clear_gdb_breakpoint_conditions): Rename to ...
2818 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2819 breakpoint.
2820 (add_condition_to_breakpoint): Make static.
2821 (add_breakpoint_condition): Take a struct breakpoint pointer
2822 instead of an address. Adjust.
2823 (gdb_condition_true_at_breakpoint): Rename to ...
2824 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2825 z_type parameter.
2826 (gdb_condition_true_at_breakpoint): Reimplement.
2827 (add_breakpoint_commands): Take a struct breakpoint pointer
2828 instead of an address. Adjust.
2829 (gdb_no_commands_at_breakpoint): Rename to ...
2830 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2831 parameter. Return true if no breakpoint was found. Change debug
2832 output.
2833 (gdb_no_commands_at_breakpoint): Reimplement.
2834 (run_breakpoint_commands): Rename to ...
2835 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2836 and change return type to boolean.
2837 (run_breakpoint_commands): New function.
2838 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2839 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2840 breakpoint. Go through the_target->remove_point instead of
2841 assuming memory breakpoint.
2842 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2843 software and hardware breakpoints.
2844 (reinsert_raw_breakpoint): Go through the_target->insert_point
2845 instead of assuming memory breakpoint.
2846 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2847 software and hardware breakpoints.
2848 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2849 Check both software and hardware breakpoints.
2850 (validate_inserted_breakpoint): Assert the breakpoint is a
2851 software breakpoint. Set the inserted flag to -1 instead of
2852 setting shlib_disabled.
2853 (delete_disabled_breakpoints): Adjust.
2854 (validate_breakpoints): Only validate software breakpoints.
2855 Adjust to inserted flag change.
2856 (check_mem_read, check_mem_write): Skip breakpoint types other
2857 than software breakpoints. Adjust to inserted flag change.
2858 * mem-break.h (enum raw_bkpt_type): New enum.
2859 (raw_breakpoint, struct process_info): Forward declare.
2860 (Z_packet_to_target_hw_bp_type): Delete declaration.
2861 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2862 (set_gdb_breakpoint, delete_gdb_breakpoint)
2863 (clear_breakpoint_conditions): New declarations.
2864 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2865 (breakpoint_inserted_here): Update comment.
2866 (add_breakpoint_condition, add_breakpoint_commands): Replace
2867 address parameter with a breakpoint pointer parameter.
2868 (gdb_breakpoint_here): Update comment.
2869 (delete_gdb_breakpoint_at): Delete.
2870 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2871 * server.c (process_point_options): Take a struct breakpoint
2872 pointer instead of an address. Adjust.
2873 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2874 delete_gdb_breakpoint.
2875 * spu-low.c (spu_target_ops): Install NULL as
2876 supports_z_point_type method.
2877 * target.h: Include mem-break.h.
2878 (struct target_ops) <prepare_to_access_memory>: Update comment.
2879 <supports_z_point_type>: New field.
2880 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2881 instead of a char. Also take a raw breakpoint pointer.
2882 * win32-arm-low.c (the_low_target): Install NULL as
2883 supports_z_point_type.
2884 * win32-i386-low.c (i386_supports_z_point_type): New function.
2885 (i386_insert_point, i386_remove_point): Adjust to new interface.
2886 (the_low_target): Install i386_supports_z_point_type.
2887 * win32-low.c (win32_supports_z_point_type): New function.
2888 (win32_insert_point, win32_remove_point): Adjust to new interface.
2889 (win32_target_ops): Install win32_supports_z_point_type.
2890 * win32-low.h (struct win32_target_ops):
2891 <supports_z_point_type>: New method.
2892 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2893 instead of a char. Also take a raw breakpoint pointer.
2894
2895 2014-05-20 Pedro Alves <palves@redhat.com>
2896
2897 * mem-break.h: Include break-common.h.
2898 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2899 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2900 (Z_packet_to_target_hw_bp_type): New declaration.
2901 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2902 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2903 (Z_PACKET_ACCESS_WP): Delete macros.
2904 (Z_packet_to_hw_type): Delete function.
2905 * i386-low.h: Don't include break-common.h here.
2906 (Z_packet_to_hw_type): Delete declaration.
2907 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2908 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2909 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2910 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2911 * linux-aarch64-low.c: Don't include break-common.h here.
2912 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2913 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2914 (Z_packet_to_target_hw_bp_type): Delete function.
2915 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2916 function.
2917 (mips_insert_point, mips_remove_point): Use
2918 Z_packet_to_target_hw_bp_type.
2919
2920 2014-05-20 Pedro Alves <palves@redhat.com>
2921
2922 * linux-aarch64-low.c: Include break-common.h.
2923 (enum target_point_type): Delete.
2924 (Z_packet_to_point_type): Rename to ...
2925 (Z_packet_to_target_hw_bp_type): ... this, and return a
2926 target_hw_bp_type instead.
2927 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2928 instead of an enum target_point_type.
2929 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2930 breakpoint type.
2931 (aarch64_dr_state_insert_one_point)
2932 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2933 (aarch64_handle_aligned_watchpoint)
2934 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2935 Take an enum target_hw_bp_type instead of an enum
2936 target_point_type.
2937 (aarch64_supports_z_point_type): New function.
2938 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2939 use Z_packet_to_target_hw_bp_type.
2940
2941 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2942
2943 * configure.ac: Only use -Werror by default when DEVELOPMENT
2944 is true.
2945 * configure: Regenerate.
2946
2947 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2948
2949 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2950 * linux-x86-low.c (X86_64_USER_REGS): New.
2951 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2952
2953 2014-04-28 Yao Qi <yao@codesourcery.com>
2954
2955 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2956 name.
2957
2958 2014-04-25 Pedro Alves <palves@redhat.com>
2959
2960 PR server/16255
2961 * linux-low.c (linux_attach_fail_reason_string): New function.
2962 (linux_attach_lwp): Delete.
2963 (linux_attach_lwp_1): Rename to ...
2964 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2965 argument. Remove "initial" parameter. Return int instead of
2966 void. Don't error or warn here.
2967 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2968 failure to attach to the tgid. Call warning when failing to
2969 attach to an lwp.
2970 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2971 argument. Remove "initial" parameter. Return int instead of
2972 void. Don't error or warn here.
2973 (linux_attach_fail_reason_string): New declaration.
2974 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2975 interface change. Use linux_attach_fail_reason_string.
2976
2977 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2978 Walfred Tedeschi <walfred.tedeschi@intel.com>
2979
2980 * Makefile.in: Added rules to handle new files
2981 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2982 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2983 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2984 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2985 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2986 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2987 x32-avx512-linux.o.
2988 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2989 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2990 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2991 i386/x32-avx512.xml.
2992 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2993 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2994 i386/x32-avx512-linux.xml.
2995 * i387-fp.c (num_avx512_k_registers): New constant for number
2996 of K registers.
2997 (num_avx512_zmmh_low_registers): New constant for number of
2998 lower ZMM registers (0-15).
2999 (num_avx512_zmmh_high_registers): New constant for number of
3000 higher ZMM registers (16-31).
3001 (num_avx512_ymmh_registers): New contant for number of higher
3002 YMM registers (ymm16-31 added by avx521 on x86_64).
3003 (num_avx512_xmm_registers): New constant for number of higher
3004 XMM registers (xmm16-31 added by AVX512 on x86_64).
3005 (struct i387_xsave): Add space for AVX512 registers.
3006 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3007 Add code to handle AVX512 registers.
3008 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3009 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3010 prototypei from generated file.
3011 (tdesc_amd64_avx512_linux): Likewise.
3012 (init_registers_x32_avx512_linux): Likewise.
3013 (tdesc_x32_avx512_linux): Likewise.
3014 (init_registers_i386_avx512_linux): Likewise.
3015 (tdesc_i386_avx512_linux): Likewise.
3016 (x86_64_regmap): Add AVX512 registers.
3017 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3018 mask.
3019 (initialize_low_arch): Add code to initialize AVX512 registers.
3020
3021 2014-04-23 Pedro Alves <palves@redhat.com>
3022
3023 * mem-break.c (find_gdb_breakpoint_at): Make static.
3024 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3025
3026 2014-04-23 Pedro Alves <palves@redhat.com>
3027
3028 * i386-low.c: Don't include break-common.h here.
3029 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3030 prototype to take target_hw_bp_type as argument instead of a Z
3031 packet char.
3032 * i386-low.h: Include break-common.h here.
3033 (Z_packet_to_hw_type): Declare.
3034 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3035 prototypes.
3036 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3037 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3038 (x86_remove_point): Convert the packet number to a
3039 target_hw_bp_type before calling i386_low_remove_watchpoint.
3040 * win32-i386-low.c (i386_insert_point): Convert the packet number
3041 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3042 (i386_remove_point): Convert the packet number to a
3043 target_hw_bp_type before calling i386_low_remove_watchpoint.
3044
3045 2014-04-23 Pedro Alves <palves@redhat.com>
3046
3047 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3048
3049 2014-04-10 Pedro Alves <palves@redhat.com>
3050
3051 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3052 Check if the condition or command is NULL before checking if the
3053 breakpoint is known. On success, return true.
3054 * mem-break.h (add_breakpoint_condition): Document return.
3055 (add_breakpoint_commands): Add describing comment.
3056 * server.c (skip_to_semicolon): New function.
3057 (process_point_options): Use it.
3058
3059 2014-04-09 Pedro Alves <palves@redhat.com>
3060
3061 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3062 to lwpid_of.
3063
3064 2014-02-27 Pedro Alves <palves@redhat.com>
3065
3066 PR 12702
3067 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3068 macros.
3069 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3070 output.
3071 (last_thread_of_process_p): Take a PID argument instead of a
3072 thread pointer.
3073 (linux_wait_for_lwp): Delete.
3074 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3075 functions.
3076 (linux_low_filter_event): New function, party factored out from
3077 linux_wait_for_event.
3078 (linux_wait_for_event): Rename to ...
3079 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3080 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3081 sigsuspend. Check for zombie leaders.
3082 (linux_wait_for_event): Reimplement as wrapper around
3083 linux_wait_for_event_filtered.
3084 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3085 a normal or signal exit is seen, it's the whole process exiting.
3086 (wait_for_sigstop): No longer a for_each_inferior callback.
3087 Rewrite on top of linux_wait_for_event_filtered.
3088 (stop_all_lwps): Call wait_for_sigstop directly.
3089 * server.c (resume, handle_target_event): Handle
3090 TARGET_WAITKIND_NO_RESUMED.
3091
3092 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3093
3094 * win32-low.c (psapi_get_dll_name,
3095 * win32_CreateToolhelp32Snapshot): Delete.
3096 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3097 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3098 Delete.
3099 (handle_load_dll): Add function description.
3100 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3101
3102 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3103
3104 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3105 Add comment.
3106 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3107 base address when calling win32_add_one_solib.
3108 (handle_load_dll): Delete local variable load_addr.
3109 Remove 0x1000 offset applied to DLL base address when calling
3110 win32_add_one_solib.
3111 (handle_unload_dll): Add comment.
3112
3113 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3114
3115 * win32-low.c (win32_add_all_dlls): Renames
3116 win32_ensure_ntdll_loaded. Rewrite function documentation.
3117 Adjust implementation to always load all DLLs.
3118 Add 0x1000 offset to DLL base address when calling
3119 win32_add_one_solib.
3120 (child_initialization_done): New static global.
3121 (do_initial_child_stuff): Set child_initialization_done to
3122 zero during child initialization, and 1 after. Replace call
3123 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3124 Add comment.
3125 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3126 (handle_unload_dll): Add function documentation.
3127 (get_child_debug_event): Ignore load and unload DLL events
3128 during child initialization.
3129
3130 2014-02-20 Doug Evans <dje@google.com>
3131
3132 Remove global all_lwps.
3133 * inferiors.h (ptid_of): Move here from linux-low.h.
3134 (pid_of, lwpid_of): Ditto.
3135 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3136 parameter is a struct thread_info * now.
3137 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3138 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3139 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3140 directly.
3141 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3142 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3143 * linux-arm-low.c (update_registers_callback): Update, "entry"
3144 parameter is a struct thread_info * now.
3145 Fetch lwpid from current_inferior directly.
3146 (arm_insert_point): Pass &all_threads to find_inferior instead of
3147 &all_lwps.
3148 (arm_remove_point): Ditto.
3149 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3150 (arm_prepare_to_resume): Fetch pid from thread.
3151 (arm_read_description): Fetch lwpid from current_inferior directly.
3152 * linux-low.c (all_lwps): Delete.
3153 (delete_lwp): Delete call to remove_inferior.
3154 (handle_extended_wait): Fetch lwpid from thread.
3155 (add_lwp): Don't set lwp->entry.id. Remove call to
3156 add_inferior_to_list.
3157 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3158 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3159 (kill_one_lwp_callback): Ditto.
3160 (linux_kill): Don't dereference NULL pointer.
3161 Fetch ptid,lwpid from thread.
3162 (get_detach_signal): Fetch ptid from thread.
3163 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3164 Simplify call to regcache_invalidate_thread.
3165 (delete_lwp_callback): Update, "entry" parameter is a
3166 struct thread_info * now. Fetch pid from thread.
3167 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3168 (status_pending_p_callback): Update, "entry" parameter is a
3169 struct thread_info * now. Fetch ptid from thread.
3170 (find_lwp_pid): Update, "entry" parameter is a
3171 struct thread_info * now.
3172 (linux_wait_for_lwp): Fetch pid from thread.
3173 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3174 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3175 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3176 (dequeue_one_deferred_signal): Ditto.
3177 (cancel_breakpoint): Fetch ptid from current_inferior.
3178 (linux_wait_for_event): Pass &all_threads to find_inferior,
3179 not &all_lwps. Fetch ptid, lwpid from thread.
3180 (count_events_callback): Update, "entry" parameter is a
3181 struct thread_info * now.
3182 (select_singlestep_lwp_callback): Ditto.
3183 (select_event_lwp_callback): Ditto.
3184 (cancel_breakpoints_callback): Ditto.
3185 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3186 not &all_lwps.
3187 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3188 (unsuspend_one_lwp): Update, "entry" parameter is a
3189 struct thread_info * now.
3190 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3191 not &all_lwps.
3192 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3193 Fetch lwpid from thread, not lwp.
3194 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3195 Pass &all_threads to find_inferior, not &all_lwps.
3196 (send_sigstop): Fetch lwpid from thread, not lwp.
3197 (send_sigstop_callback): Update, "entry" parameter is a
3198 struct thread_info * now.
3199 (suspend_and_send_sigstop_callback): Ditto.
3200 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3201 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3202 struct thread_info * now.
3203 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3204 from thread, lwp.
3205 (lwp_running): Update, "entry" parameter is a
3206 struct thread_info * now.
3207 (stop_all_lwps): Fetch ptid from thread.
3208 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3209 (linux_resume_one_lwp): Fetch lwpid from thread.
3210 (linux_set_resume_request): Update, "entry" parameter is a
3211 struct thread_info * now. Fetch pid, lwpid from thread.
3212 (resume_status_pending_p): Update, "entry" parameter is a
3213 struct thread_info * now.
3214 (need_step_over_p): Ditto. Fetch lwpid from thread.
3215 (start_step_over): Fetch lwpid from thread.
3216 (linux_resume_one_thread): Update, "entry" parameter is a
3217 struct thread_info * now. Fetch lwpid from thread.
3218 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3219 (proceed_one_lwp): Update, "entry" parameter is a
3220 struct thread_info * now. Fetch lwpid from thread.
3221 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3222 struct thread_info * now.
3223 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3224 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3225 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3226 directly.
3227 (regsets_store_inferior_registers): Ditto.
3228 (fetch_register, store_register): Ditto.
3229 (linux_read_memory, linux_write_memory): Ditto.
3230 (linux_request_interrupt): Ditto.
3231 (linux_read_auxv): Ditto.
3232 (linux_xfer_siginfo): Ditto.
3233 (linux_qxfer_spu): Ditto.
3234 (linux_qxfer_libraries_svr4): Ditto.
3235 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3236 moved to inferiors.h.
3237 (get_lwp): Delete.
3238 (get_thread_lwp): Update.
3239 (struct lwp_info): Delete member "entry". Simplify comment for
3240 member "thread".
3241 (all_lwps): Delete.
3242 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3243 current_inferior directly.
3244 (update_watch_registers_callback): Update, "entry" parameter is a
3245 struct thread_info * now. Fetch pid from thread.
3246 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3247 (mips_insert_point): Fetch lwpid from current_inferior.
3248 Pass &all_threads to find_inferior, not &all_lwps.
3249 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3250 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3251 directly.
3252 (mips_stopped_data_address): Ditto.
3253 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3254 directly.
3255 * linux-tile-low.c (tile_arch_setup): Ditto.
3256 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3257 (update_debug_registers_callback): Update, "entry" parameter is a
3258 struct thread_info * now. Fetch pid from thread.
3259 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3260 Pass &all_threads to find_inferior, not &all_lwps.
3261 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3262 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3263 Pass &all_threads to find_inferior, not &all_lwps.
3264 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3265 (i386_dr_low_get_status): Ditto.
3266 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3267 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3268 (x86_linux_read_description): Ditto.
3269 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3270
3271 2014-02-20 Doug Evans <dje@google.com>
3272
3273 * inferiors.c (get_first_inferior): Fix buglet.
3274
3275 2014-02-19 Doug Evans <dje@google.com>
3276
3277 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3278 * inferiors.c (add_thread): Change result type to struct thread_info *.
3279 All callers updated.
3280 (add_lwp): Call add_thread here instead of in callers.
3281 All callers updated.
3282 * linux-low.h (get_lwp_thread): Rewrite.
3283 (struct lwp_info): New member "thread".
3284
3285 2014-02-19 Doug Evans <dje@google.com>
3286
3287 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3288 All callers updated.
3289
3290 2014-02-19 Doug Evans <dje@google.com>
3291
3292 * inferiors.c (add_thread): Fix whitespace.
3293
3294 2014-02-19 Doug Evans <dje@google.com>
3295
3296 * dll.c (clear_dlls): Replace accessing list implemention details
3297 with API function.
3298 * gdbthread.h (get_first_thread): Declare.
3299 * inferiors.c (for_each_inferior_with_data): New function.
3300 (get_first_thread): New function.
3301 (find_thread_ptid): Simplify.
3302 (get_first_inferior): New function.
3303 (clear_list): Delete.
3304 (one_inferior_p): New function.
3305 (clear_inferior_list): New function.
3306 (clear_inferiors): Update.
3307 * inferiors.h (for_each_inferior_with_data): Declare.
3308 (clear_inferior_list): Declare.
3309 (one_inferior_p): Declare.
3310 (get_first_inferior): Declare.
3311 * linux-low.c (linux_wait_for_event): Replace accessing list
3312 implemention details with API function.
3313 * server.c (target_running): Ditto.
3314 (accumulate_file_name_length): New function.
3315 (emit_dll_description): New function.
3316 (handle_qxfer_libraries): Replace accessing list implemention
3317 details with API function.
3318 (handle_qxfer_threads_worker): New function.
3319 (handle_qxfer_threads_proper): Replace accessing list implemention
3320 details with API function.
3321 (handle_query): Ditto.
3322 (visit_actioned_threads_callback_ftype): New typedef.
3323 (visit_actioned_threads_data): New struct.
3324 (visit_actioned_threads): Rewrite to be find_inferior callback.
3325 (resume): Call find_inferior.
3326 (handle_status): Replace accessing list implemention
3327 details with API function.
3328 (process_serial_event): Replace accessing list implemention details
3329 with API function.
3330 * target.c (set_desired_inferior): Replace accessing list implemention
3331 details with API function.
3332 * tracepoint.c (same_process_p): New function.
3333 (gdb_agent_about_to_close): Replace accessing list implemention
3334 details with API function.
3335 * win32-low.c (child_delete_thread): Replace accessing list
3336 implemention details with API function.
3337 (match_dll_by_basename): New function.
3338 (dll_is_loaded_by_basename): New function.
3339 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3340 details call to dll_is_loaded_by_basename.
3341
3342 2014-02-19 Doug Evans <dje@google.com>
3343
3344 * dll.h (struct dll_info): Add comment.
3345 * gdbthread.h (struct thread_info): Add comment.
3346 (current_ptid): Simplify.
3347 * inferiors.c (add_process): Update.
3348 (remove_process): Update.
3349 * inferiors.h (struct process_info): Rename member "head" to "entry".
3350 * linux-low.c (delete_lwp): Update.
3351 (add_lwp): Update.
3352 (last_thread_of_process_p): Update.
3353 (kill_one_lwp_callback, linux_kill): Update.
3354 (status_pending_p_callback): Update.
3355 (wait_for_sigstop): Update. Simplify read of ptid.
3356 (start_step_over): Update.
3357 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3358 (get_lwp_thread): Update.
3359 (struct lwp_info): Rename member "head" to "entry".
3360 * regcache.h (inferior_list_entry): Delete.
3361 * server.c (kill_inferior_callback): Update.
3362 (detach_or_kill_inferior_callback): Update.
3363 (print_started_pid): Update.
3364 (print_attached_pid): Update.
3365 (process_serial_event): Simplify read of ptid.
3366 * thread-db.c (thread_db_create_event): Update.
3367 (thread_db_get_tls_address): Update.
3368 * win32-low.c (current_inferior_ptid): Simplify.
3369
3370 2014-02-19 Tom Tromey <tromey@redhat.com>
3371
3372 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3373 argument.
3374 (target_supports_btrace): Update.
3375
3376 2014-02-14 Yao Qi <yao@codesourcery.com>
3377
3378 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3379 (rsp-low-ipa.o): New target.
3380
3381 2014-02-12 Tom Tromey <tromey@redhat.com>
3382
3383 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3384 convert_ascii_to_int.
3385 * regcache.c (registers_to_string): Likewise.
3386 * remote-utils.c (decode_M_packet): Likewise.
3387 * server.c (process_serial_event): Likewise.
3388
3389 2014-02-12 Tom Tromey <tromey@redhat.com>
3390
3391 * server.c (handle_query, handle_v_run): Use hex2bin, not
3392 unhexify.
3393 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3394
3395 2014-02-12 Tom Tromey <tromey@redhat.com>
3396
3397 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3398 convert_int_to_ascii.
3399 * regcache.c (registers_to_string, collect_register_as_string):
3400 Likewise.
3401 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3402 Likewise.
3403 * server.c (process_serial_event): Likewise.
3404 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3405 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3406
3407 2014-02-12 Tom Tromey <tromey@redhat.com>
3408
3409 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3410 bin2hex, not hexify.
3411 * tracepoint.c (cmd_qtstatus): Likewise.
3412
3413 2014-02-12 Tom Tromey <tromey@redhat.com>
3414
3415 * remote-utils.c (monitor_output): Pass explicit length to
3416 hexify.
3417
3418 2014-02-12 Tom Tromey <tromey@redhat.com>
3419
3420 * tracepoint.c: Include rsp-low.h.
3421 * server.c: Include rsp-low.h.
3422 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3423 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3424 declare.
3425 * remote-utils.c: Include rsp-low.h.
3426 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3427 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3428 (convert_int_to_ascii, convert_ascii_to_int): Move to
3429 common/rsp-low.c.
3430 * regcache.c: Include rsp-low.h.
3431 * ax.c: Include rsp-low.h.
3432 * Makefile.in (SFILES): Add common/rsp-low.c.
3433 (OBS): Add rsp-low.o.
3434 (rsp-low.o): New target.
3435
3436 2014-02-12 Tom Tromey <tromey@redhat.com>
3437
3438 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3439 Include print-utils.h.
3440 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3441 (plongest, thirty_two, phex_nz): Remove.
3442 * Makefile.in (SFILES): Add common/print-utils.c.
3443 (OBS): Add print-utils.o.
3444 (print-utils-ipa.o): New target.
3445 (print-utils.o): New target.
3446 (IPA_OBJS): Add print-utils-ipa.o.
3447
3448 2014-02-06 Tom Tromey <tromey@redhat.com>
3449
3450 * Makefile.in (SFILES): Fix indentation.
3451
3452 2014-02-05 Doug Evans <dje@google.com>
3453
3454 * linux-low.c (linux_wait_for_event): Improve comment.
3455 (linux_wait_1): Keep current_inferior in sync with event_child.
3456
3457 2014-01-22 Doug Evans <dje@google.com>
3458
3459 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3460
3461 2014-01-22 Doug Evans <dje@google.com>
3462
3463 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3464 * configure: Regenerate.
3465 * config.in: Regenerate.
3466 * Makefile.in (SFILES): Add debug.c.
3467 (OBS): Add debug.o.
3468 * debug.c: New file.
3469 * debug.h: New file.
3470 * linux-aarch64-low.c (*): Update all debugging printfs to use
3471 debug_printf instead of fprintf.
3472 * linux-arm-low.c (*): Ditto.
3473 * linux-cris-low.c (*): Ditto.
3474 * linux-crisv32-low.c (*): Ditto.
3475 * linux-m32r-low.c (*): Ditto.
3476 * linux-sparc-low.c (*): Ditto.
3477 * linux-x86.c (*): Ditto.
3478 * linux-low.c (*): Ditto.
3479 (linux_wait_1): Add calls to debug_enter, debug_exit.
3480 (linux_wait): Remove redundant debugging printf.
3481 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3482 (linux_resume, unstop_all_lwps): Ditto.
3483 * mem-break.c (*): Update all debugging printfs to use
3484 debug_printf instead of fprintf.
3485 * remote-utils.c (*): Ditto.
3486 * thread-db.c (*): Ditto.
3487 * server.c #include <ctype.h>, "gdb_vecs.h".
3488 (debug_threads): Moved to debug.c.
3489 (*): Update all debugging printfs to use debug_printf instead of
3490 fprintf.
3491 (start_inferior): Replace call to fflush with call to debug_flush.
3492 (monitor_show_help): Mention set debug-format.
3493 (parse_debug_format_options): New function.
3494 (handle_monitor_command): Handle "monitor set debug-format".
3495 (gdbserver_usage): Mention --debug-format.
3496 (main): Parse --debug-format.
3497 * server.h (debug_threads): Declaration moved to debug.h.
3498 #include "debug.h".
3499 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3500 trace_debug_1 that uses debug_printf.
3501 (tracepoint_look_up_symbols): Update all debugging printfs to use
3502 debug_printf instead of fprintf.
3503
3504 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3505
3506 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3507 sys/ptrace.h.
3508
3509 2014-01-17 Pedro Alves <palves@redhat.com>
3510
3511 PR build/16445
3512 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3513 defined after including gdb_proc_service.h.
3514
3515 2014-01-16 Doug Evans <dje@google.com>
3516
3517 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3518 (match_dll): Use it.
3519
3520 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3521
3522 * target.h (target_ops) <read_btrace>: Change parameters and
3523 return type to allow error reporting.
3524 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3525 trace reading errors on.
3526 * linux-low.c (linux_low_read_btrace): Pass trace reading
3527 errors on.
3528 (linux_low_disable_btrace): New.
3529
3530 2014-01-15 Doug Evans <dje@google.com>
3531
3532 * inferiors.c (thread_id_to_gdb_id): Delete.
3533 * inferiors.h (thread_id_to_gdb_id): Delete.
3534
3535 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3536
3537 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3538 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3539 versions.
3540
3541 2014-01-08 Pedro Alves <palves@redhat.com>
3542
3543 * server.c (handle_status): Don't discard previous queued stop
3544 replies or thread's pending status here.
3545 (main) <disconnection>: Do it here instead.
3546
3547 2014-01-08 Pedro Alves <palves@redhat.com>
3548
3549 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3550 * server.c (visit_actioned_threads, handle_pending_status): New
3551 function.
3552 (handle_v_cont): Factor out parts to ...
3553 (resume): ... this new function. If in all-stop, and a thread
3554 being resumed has a pending status, report it without actually
3555 resuming.
3556 (myresume): Adjust to use the new 'resume' function.
3557 (clear_pending_status_callback, set_pending_status_callback)
3558 (find_status_pending_thread_callback): New functions.
3559 (handle_status): Handle the case of multiple threads having
3560 interesting statuses to report. Report threads' real last signal
3561 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3562 with an interesting thread to report the status for, instead of
3563 always reporting the status of the first thread.
3564
3565 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3566
3567 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3568 * gdbreplay.c (gdbreplay_version): Likewise.
3569
3570 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3571
3572 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3573 iov.iov_len with the real length in use.
3574
3575 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3576
3577 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3578 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3579 for all targets that use win32-low.c.
3580 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3581 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3582
3583 2013-12-13 Pedro Alves <palves@redhat.com>
3584
3585 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3586 if equal to TARGET_WAITKIND_LOADED.
3587 * win32-low.c (cached_status): New static global.
3588 (win32_wait): Add declaration.
3589 (do_initial_child_stuff): Flush all initial pending debug events
3590 up to the initial breakpoint.
3591 (win32_wait): If CACHED_STATUS was set, return that instead
3592 of doing a real wait. Remove the code resuming the execution
3593 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3594 during the initial phase. Also remove the code changing
3595 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3596 TARGET_WAITKIND_STOPPED.
3597
3598 2013-12-11 Yao Qi <yao@codesourcery.com>
3599
3600 * notif.c (handle_notif_ack): Return 0 if no notification
3601 matches.
3602
3603 2013-11-20 Doug Evans <dje@google.com>
3604
3605 * linux-low.c (linux_set_resume_request): Fix comment.
3606
3607 2013-11-20 Doug Evans <dje@google.com>
3608
3609 * linux-low.c (resume_status_pending_p): Tweak comment.
3610
3611 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3612
3613 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3614 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3615 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3616 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3617 (srv_amd64_regobj): Add amd64-mpx.o.
3618 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3619 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3620 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3621 * i387-fp.c (num_pl_bnd_register) Added constant.
3622 (num_pl_bnd_cfg_registers) Added constant.
3623 (struct i387_xsave) Added reserved area and MPX fields.
3624 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3625 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3626 function.
3627 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3628 (init_registers_amd64_mpx_linux): Declare new function.
3629 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3630 (x86_64_regmap): Add MPX registers.
3631 (x86_linux_read_description): Add MPX case.
3632 (initialize_low_arch): Initialize MPX targets.
3633
3634 2013-11-18 Tom Tromey <tromey@redhat.com>
3635
3636 * configure: Rebuild.
3637 * configure.ac: Don't check for stdlib.h.
3638 * gdbreplay.c: Unconditionally include stdlib.h.
3639
3640 2013-11-18 Tom Tromey <tromey@redhat.com>
3641
3642 * config.in: Rebuild.
3643 * configure: Rebuild.
3644 * configure.ac: Don't use AC_HEADER_DIRENT.
3645
3646 2013-11-18 Tom Tromey <tromey@redhat.com>
3647
3648 * server.h: Don't check HAVE_STRING_H.
3649 * gdbreplay.c: Don't check HAVE_STRING_H.
3650 * configure: Rebuild.
3651
3652 2013-11-18 Tom Tromey <tromey@redhat.com>
3653
3654 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3655 LIBGNU.
3656
3657 2013-11-08 Tom Tromey <tromey@redhat.com>
3658
3659 * configure, config.in: Rebuild.
3660 * configure.ac: Remove unused configury.
3661
3662 2013-11-08 Tom Tromey <tromey@redhat.com>
3663
3664 * acinclude.m4: Include common.m4, codeset.m4.
3665 * configure, config.in: Rebuild.
3666 * configure.ac: Use GDB_AC_COMMON.
3667
3668 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3669
3670 * linux-s390-low.c (HWCAP_S390_TE): New define.
3671 (s390_arch_setup): Consider the TE field in the HWCAP for
3672 determining 'have_regset_tdb'.
3673
3674 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3675
3676 PR gdb/16014
3677 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3678 call to sizeof.
3679
3680 2013-10-02 Pedro Alves <palves@redhat.com>
3681
3682 * server.c (process_serial_event): Don't output "GDBserver
3683 exiting" if GDB is connected through stdio.
3684 * target.c (mywait): Likewise, be silent if GDB is connected
3685 through stdio.
3686
3687 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3688
3689 * lynx-low.c (lynx_add_threads_after_attach): New function.
3690 (lynx_attach): Remove call to add_thread. Add call to
3691 lynx_add_threads_after_attach instead.
3692
3693 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3694
3695 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3696 * config.in, configure: Regenerated.
3697
3698 2013-09-18 Yao Qi <yao@codesourcery.com>
3699
3700 PR server/15959
3701 * server.c (start_inferior): Clear 'resume_info'.
3702
3703 2013-09-16 Jiong Wang <jiwang@tilera.com>
3704
3705 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3706 for each register.
3707
3708 2013-09-16 Jiong Wang <jiwang@tilera.com>
3709
3710 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3711 linux-tile-low.o to srv_tgtobj.
3712
3713 2013-09-16 Will Newton <will.newton@linaro.org>
3714
3715 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3716 out regs.
3717
3718 2013-09-06 Pedro Alves <palves@redhat.com>
3719
3720 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3721 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3722 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3723 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3724 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3725 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3726
3727 2013-09-06 Pedro Alves <palves@redhat.com>
3728
3729 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3730 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3731
3732 2013-09-06 Pedro Alves <palves@redhat.com>
3733
3734 * linux-amd64-ipa.c: Include tracepoint.h.
3735 * linux-i386-ipa.c: Include tracepoint.h.
3736
3737 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3738
3739 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3740 (ps_get_thread_area): New function.
3741
3742 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3743
3744 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3745 (initialize_low_arch): Call init_registers_crisv32 rather than
3746 init_register_crisv32.
3747
3748 2013-09-05 Pedro Alves <palves@redhat.com>
3749
3750 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3751 to ...
3752 * hostio.h: ... this new file.
3753 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3754 win32-low.c: Include hostio.h.
3755
3756 2013-09-05 Pedro Alves <palves@redhat.com>
3757
3758 * server.h (gdb_client_data, handler_func, callback_handler_func)
3759 (delete_file_handler, add_file_handler, append_callback_event)
3760 (delete_callback_event, start_event_loop, initialize_event_loop):
3761 Move to event-loop.h and include it.
3762 * event-loop.h: New file.
3763
3764 2013-09-05 Pedro Alves <palves@redhat.com>
3765
3766 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3767 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3768 (loaded_dll, unloaded_dll): Move to ...
3769 * dll.h: ... this new file.
3770 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3771
3772 2013-09-05 Pedro Alves <palves@redhat.com>
3773
3774 * server.h (current_process, get_thread_process, all_processes)
3775 (add_inferior_to_list, for_each_inferior, current_inferior)
3776 (remove_inferior, add_process, remove_process, find_process_pid)
3777 (have_started_inferiors_p, have_attached_inferiors_p)
3778 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3779 (clear_inferiors, find_inferior, find_inferior_id)
3780 (inferior_target_data, set_inferior_target_data)
3781 (inferior_regcache_data, set_inferior_regcache_data): Move to
3782 inferiors.h, and include it.
3783 * inferiors.h: New file.
3784
3785 2013-09-05 Pedro Alves <palves@redhat.com>
3786
3787 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3788 Move ...
3789 * ax.h: ... here.
3790
3791 2013-09-05 Pedro Alves <palves@redhat.com>
3792
3793 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3794 tracepoint.h.
3795 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3796 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3797 (handle_tracepoint_general_set, handle_tracepoint_query)
3798 (tracepoint_finished_step, tracepoint_was_hit)
3799 (release_while_stepping_state_list, current_traceframe)
3800 (in_readonly_region, traceframe_read_mem)
3801 (fetch_traceframe_registers, traceframe_read_sdata)
3802 (traceframe_read_info, struct fast_tpoint_collect_status)
3803 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3804 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3805 (supply_fast_tracepoint_registers)
3806 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3807 (ipa_tdesc, claim_trampoline_space)
3808 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3809 (agent_mem_read, agent_get_trace_state_variable_value)
3810 (agent_set_trace_state_variable_value, agent_tsv_read)
3811 (agent_mem_read_string, get_raw_reg_func_addr)
3812 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3813 * tracepoint.h: ... this new file.
3814
3815 2013-09-05 Pedro Alves <palves@redhat.com>
3816
3817 * server.h (perror_with_name, error, fatal, warning, paddress)
3818 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3819 include it.
3820 * utils.h: New file.
3821
3822 2013-09-05 Pedro Alves <palves@redhat.com>
3823
3824 * server.h (remote_debug, noack_mode, transport_is_reliable)
3825 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3826 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3827 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3828 (write_enn, initialize_async_io, enable_async_io)
3829 (disable_async_io, check_remote_input_interrupt_request)
3830 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3831 (dead_thread_notify, prepare_resume_reply)
3832 (decode_address_to_semicolon, decode_address, decode_m_packet)
3833 (decode_M_packet, decode_X_packet, decode_xfer_write)
3834 (decode_search_memory_packet, unhexify, hexify)
3835 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3836 (look_up_one_symbol, relocate_instruction)
3837 (monitor_output): Move to remote-utils.h, and include it.
3838 * remote-utils.h: New file.
3839
3840 2013-09-05 Pedro Alves <palves@redhat.com>
3841
3842 * server.h (_): Delete.
3843
3844 2013-09-02 Pedro Alves <palves@redhat.com>
3845
3846 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3847 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3848 allocated.
3849 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3850
3851 2013-09-02 Pierre Muller <muller@sourceware.org>
3852
3853 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3854 or WriteProcessMemory complete successfully and handle
3855 ERROR_PARTIAL_COPY error.
3856
3857 2013-09-02 Pedro Alves <palves@redhat.com>
3858
3859 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3860 error instead of EIO.
3861
3862 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3863
3864 PR server/15604
3865 * linux-low.c: Include filestuff.h.
3866 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3867 * lynx-low.c: Include filestuff.h.
3868 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3869 * server.c: Include filestuff.h.
3870 (main): Call notice_open_fds.
3871 * spu-low.c: Include filestuff.h.
3872 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3873
3874 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3875
3876 * Makefile.in: Explain why ../target and ../nat are not
3877 listed as include file search paths.
3878 (linux-waitpid.o): New object file rule.
3879 * configure.srv (srv_native_linux_obj): New variable.
3880 Replace all occurrences of linux native object files with
3881 $srv_native_linux_obj.
3882 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3883 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3884 (linux_enable_event_reporting): Remove declaration.
3885 (my_waitpid): Moved to common/linux-waitpid.c.
3886 (linux_wait_for_event): Pass ptid when calling
3887 linux_enable_event_reporting.
3888 (linux_supports_tracefork_flag): Remove.
3889 (linux_enable_event_reporting): Likewise.
3890 (linux_tracefork_grandchild): Remove.
3891 (STACK_SIZE): Moved to common/linux-ptrace.c.
3892 (linux_tracefork_child): Remove.
3893 (linux_test_for_tracefork): Remove.
3894 (linux_look_up_symbols): Call linux_supports_traceclone.
3895 (initialize_low): Remove call to linux_test_for_tracefork.
3896 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3897 common/linux-ptrace.h.
3898 (PTRACE_TYPE_ARG4): Likewise.
3899 Include linux-ptrace.h.
3900
3901 2013-08-21 Pedro Alves <palves@redhat.com>
3902
3903 * config.in: Renegerate.
3904
3905 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3906
3907 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3908 (SFILES): Remove $(srcdir)/common/target-common.c and
3909 add $(srcdir)/target/waitstatus.c.
3910 (OBS): Remove target-common.o and add waitstatus.o.
3911 (server_h): Remove $(srcdir)/../common/target-common.h and
3912 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3913 and $(srcdir)/../target/waitstatus.h.
3914 (target-common.o): Remove.
3915 (waitstatus.o): New target object file.
3916 * target.h: Do not include target-common.h and
3917 include target/resume.h, target/wait.h and
3918 target/waitstatus.h.
3919
3920 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3921
3922 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3923 to PTRACE_TYPE_ARG3.
3924 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3925 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3926 PTRACE_TYPE_ARG4.
3927 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3928 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3929
3930 2013-07-27 Jie Zhang <jie@codesourcery.com>
3931 Daniel Jacobowitz <dan@codesourcery.com>
3932 Yao Qi <yao@codesourcery.com>
3933
3934 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3935 (mips-linux-watch.o): New rule.
3936 (mips_linux_watch_h): New variable.
3937 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3938 srv_tgtobj.
3939 * linux-mips-low.c: Include mips-linux-watch.h.
3940 (struct arch_process_info, struct arch_lwp_info): New.
3941 (update_watch_registers_callback): New function.
3942 (mips_linux_new_process, mips_linux_new_thread) New functions.
3943 (mips_linux_prepare_to_resume, mips_insert_point): New
3944 functions.
3945 (mips_remove_point, mips_stopped_by_watchpoint): New
3946 functions.
3947 (rsp_bp_type_to_target_hw_bp_type): New function.
3948 (mips_stopped_data_address): New function.
3949 (the_low_target): Add watchpoint support functions.
3950
3951 2013-07-27 Yao Qi <yao@codesourcery.com>
3952
3953 * i386-low.c: Include break-common.h.
3954 (enum target_hw_bp_type): Remove.
3955
3956 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3957
3958 * Makefile.in (SFILES): /common/target-common.c.
3959 (OBS): Add target-common.o.
3960 (server_h): Add $(srcdir)/../common/target-common.h.
3961 (target-common.o): New target.
3962 * server.c (queue_stop_reply_callback): Free
3963 status string after use.
3964 * target.c (target_waitstatus_to_string): Remove.
3965 * target.h: Include target-common.h.
3966 (resume_kind): Likewise.
3967 (target_waitkind): Likewise.
3968 (target_waitstatus): Likewise.
3969 (TARGET_WNOHANG): Likewise.
3970
3971 2013-07-04 Yao Qi <yao@codesourcery.com>
3972
3973 * Makefile.in (host_alias): Use @host_noncanonical@.
3974 (target_alias): Use @target_noncanonical@.
3975 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3976 ACX_NONCANONICAL_HOST.
3977 * configure: Regenerated.
3978
3979 Revert:
3980 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3981
3982 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3983 * configure: Rebuild.
3984 * Makefile.in (version_host, version_target): Get from configure.
3985 (version.c): Use $(version_host) and $(version_target).
3986
3987 2013-07-03 Pedro Alves <palves@redhat.com>
3988
3989 * Makefile.in (config.status): Depend on development.sh.
3990 * acinclude.m4: Include libmcheck.m4.
3991 * configure: Regenerate.
3992
3993 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3994
3995 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3996 attribute inside the parentheses.
3997 (winapi_DebugSetProcessKillOnExit): Ditto.
3998 (winapi_DebugBreakProcess): Ditto.
3999 (winapi_GenerateConsoleCtrlEvent): Ditto.
4000
4001 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4002
4003 * notif.h (notif_event): Add a dummy member to avoid compiler
4004 errors.
4005
4006 2013-07-01 Pedro Alves <palves@redhat.com>
4007
4008 * hostio.c (HOSTIO_PATH_MAX): Define.
4009 (require_filename, handle_open, handle_unlink, handle_readlink):
4010 Use it.
4011
4012 2013-07-01 Pedro Alves <palves@redhat.com>
4013
4014 * server.h: Include "pathmax.h".
4015 * linux-low.c: Don't include sys/param.h.
4016 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4017 MAXPATHLEN.
4018 * win32-low.c: Don't include sys/param.h.
4019 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4020
4021 2013-07-01 Pedro Alves <palves@redhat.com>
4022
4023 * event-loop.c: Don't check HAVE_UNISTD_H before including
4024 <unistd.h>.
4025 * gdbreplay.c: Likewise.
4026 * remote-utils.c: Likewise.
4027 * server.c: Likewise.
4028 * configure.ac: Don't check for unistd.h.
4029 * configure: Regenerate.
4030
4031 2013-06-28 Tom Tromey <tromey@redhat.com>
4032
4033 * Makefile.in (version.c): Use version.in, not
4034 common/version.in.
4035
4036 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4037
4038 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4039 * configure: Rebuild.
4040 * Makefile.in (version_host, version_target): Get from configure.
4041 (version.c): Use $(version_host) and $(version_target).
4042
4043 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4044
4045 Fix trace-status to output user name without trailing colon.
4046 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4047
4048 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4049
4050 Fix trace-status to output proper start-time and stop-time.
4051 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4052 output start time and stop time in hex as gdb expects.
4053
4054 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4055
4056 * tracepoint.c (build_traceframe_info_xml): Output trace state
4057 variables present in the trace buffer.
4058
4059 2013-06-24 Tom Tromey <tromey@redhat.com>
4060
4061 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4062 create-version.sh.
4063 (version.o): Remove.
4064 * gdbreplay.c: Include version.h.
4065 (version, host_name): Don't declare.
4066 * server.h: Include version.h.
4067 (version, host_name): Don't declare.
4068
4069 2013-06-12 Pedro Alves <palves@redhat.com>
4070
4071 * linux-x86-low.c (linux_is_elf64): Delete global.
4072 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4073 with local linux_pid_exe_is_elf_64_file use.
4074
4075 2013-06-11 Pedro Alves <palves@redhat.com>
4076
4077 * linux-low.c (regset_disabled, disable_regset): New functions.
4078 (regsets_fetch_inferior_registers)
4079 (regsets_store_inferior_registers): Use them.
4080 (initialize_regsets_info); Don't allocate the disabled_regsets
4081 array here.
4082 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4083 comment.
4084
4085 2013-06-11 Pedro Alves <palves@redhat.com>
4086
4087 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4088 xmalloc.
4089
4090 2013-06-11 Pedro Alves <palves@redhat.com>
4091
4092 * linux-x86-low.c (initialize_low_arch): Call
4093 init_registers_x32_avx_linux.
4094
4095 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4096
4097 Fix compatibility with Android Bionic.
4098 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4099 it is not empty.
4100
4101 2013-06-07 Pedro Alves <palves@redhat.com>
4102
4103 PR server/14823
4104 * Makefile.in (OBS): Add tdesc.o.
4105 (IPA_OBJS): Add tdesc-ipa.o.
4106 (tdesc-ipa.o): New rule.
4107 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4108 interface.
4109 * linux-low.c (new_inferior): Delete.
4110 (disabled_regsets, num_regsets): Delete.
4111 (linux_add_process): Adjust to set the new per-process
4112 new_inferior flag.
4113 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4114 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4115 was a stop. When calling arch_setup, switch the current inferior
4116 to the thread that got an event.
4117 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4118 (regsets_fetch_inferior_registers)
4119 (regsets_store_inferior_registers): New regsets_info parameter.
4120 Adjust to use it.
4121 (linux_register_in_regsets): New regs_info parameter. Adjust to
4122 use it.
4123 (register_addr, fetch_register, store_register): New usrregs_info
4124 parameter. Adjust to use it.
4125 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4126 parameter regs_info. Adjust to use it.
4127 (linux_fetch_registers): Get the current inferior's regs_info, and
4128 adjust to use it.
4129 (linux_store_registers): Ditto.
4130 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4131 (initialize_low): Don't initialize the target_regsets here. Call
4132 initialize_low_arch.
4133 * linux-low.h (target_regsets): Delete declaration.
4134 (struct regsets_info): New.
4135 (struct usrregs_info): New.
4136 (struct regs_info): New.
4137 (struct process_info_private) <new_inferior>: New field.
4138 (struct linux_target_ops): Delete the num_regs, regmap, and
4139 regset_bitmap fields. New field regs_info.
4140 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4141 * i387-fp.c (num_xmm_registers): Delete.
4142 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4143 calls to new interface.
4144 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4145 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4146 Infer the number of xmm registers from the regcache's target
4147 description.
4148 * i387-fp.h (num_xmm_registers): Delete.
4149 * inferiors.c (add_thread): Don't install the thread's regcache
4150 here.
4151 * proc-service.c (gregset_info): Fetch the current inferior's
4152 regs_info. Adjust to use it.
4153 * regcache.c: Include tdesc.h.
4154 (register_bytes, reg_defs, num_registers)
4155 (gdbserver_expedite_regs): Delete.
4156 (get_thread_regcache): If the thread doesn't have a regcache yet,
4157 create one, instead of aborting gdbserver.
4158 (regcache_invalidate_one): Rename to ...
4159 (regcache_invalidate_thread): ... this.
4160 (regcache_invalidate_one): New.
4161 (regcache_invalidate): Only invalidate registers of the current
4162 process.
4163 (init_register_cache): Add target_desc parameter, and use it.
4164 (new_register_cache): Ditto. Assert the target description has a
4165 non zero registers_size.
4166 (regcache_cpy): Add assertions. Adjust.
4167 (realloc_register_cache, set_register_cache): Delete.
4168 (registers_to_string, registers_from_string): Adjust.
4169 (find_register_by_name, find_regno, find_register_by_number)
4170 (register_cache_size): Add target_desc parameter, and use it.
4171 (free_register_cache_thread, free_register_cache_thread_one)
4172 (regcache_release, register_cache_size): New.
4173 (register_size): Add target_desc parameter, and use it.
4174 (register_data, supply_register, supply_register_zeroed)
4175 (supply_regblock, supply_register_by_name, collect_register)
4176 (collect_register_as_string, collect_register_by_name): Adjust.
4177 * regcache.h (struct target_desc): Forward declare.
4178 (struct regcache) <tdesc>: New field.
4179 (init_register_cache, new_register_cache): Add target_desc
4180 parameter.
4181 (regcache_invalidate_thread): Declare.
4182 (regcache_invalidate_one): Delete declaration.
4183 (regcache_release): Declare.
4184 (find_register_by_number, register_cache_size, register_size)
4185 (find_regno): Add target_desc parameter.
4186 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4187 declarations.
4188 * remote-utils.c: Include tdesc.h.
4189 (outreg, prepare_resume_reply): Adjust.
4190 * server.c: Include tdesc.h.
4191 (gdbserver_xmltarget): Delete declaration.
4192 (get_features_xml, process_serial_event): Adjust.
4193 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4194 declare.
4195 (struct process_info) <tdesc>: New field.
4196 (ipa_tdesc): Declare.
4197 * tdesc.c: New file.
4198 * tdesc.h: New file.
4199 * tracepoint.c: Include tdesc.h.
4200 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4201 (get_context_regcache): Adjust to pass ipa_tdesc down.
4202 (do_action_at_tracepoint): Adjust to get the register cache size
4203 from the context regcache's description.
4204 (traceframe_walk_blocks): Adjust to get the register cache size
4205 from the current trace frame's description.
4206 (traceframe_get_pc): Adjust to get current trace frame's
4207 description and pass it down.
4208 (gdb_collect): Adjust to get the register cache size from the
4209 IPA's description.
4210 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4211 (gdbserver_xmltarget): Delete.
4212 (initialize_low_tracepoint): Set the ipa's target description.
4213 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4214 (initialize_low_tracepoint): Set the ipa's target description.
4215 * linux-x86-low.c: Include tdesc.h.
4216 [__x86_64__] (is_64bit_tdesc): New.
4217 (ps_get_thread_area, x86_get_thread_area): Use it.
4218 (i386_cannot_store_register): Rename to ...
4219 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4220 (i386_cannot_fetch_register): Rename to ...
4221 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4222 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4223 to new interface.
4224 (target_regsets): Rename to ...
4225 (x86_regsets): ... this.
4226 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4227 interface.
4228 (x86_siginfo_fixup): Use is_64bit_tdesc.
4229 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4230 (tdesc_x32_avx_linux, tdesc_x32_linux)
4231 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4232 Declare.
4233 (x86_linux_update_xmltarget): Delete.
4234 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4235 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4236 (AMD64_LINUX_USER64_CS): New.
4237 (x86_linux_read_description): New, based on
4238 x86_linux_update_xmltarget.
4239 (same_process_callback): New.
4240 (x86_arch_setup_process_callback): New.
4241 (x86_linux_update_xmltarget): New.
4242 (x86_regsets_info): New.
4243 (amd64_linux_regs_info): New.
4244 (i386_linux_usrregs_info): New.
4245 (i386_linux_regs_info): New.
4246 (x86_linux_regs_info): New.
4247 (x86_arch_setup): Reimplement.
4248 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4249 (x86_emit_ops): Ditto.
4250 (the_low_target): Adjust. Install x86_linux_regs_info,
4251 x86_cannot_fetch_register, and x86_cannot_store_register.
4252 (initialize_low_arch): New.
4253 * linux-ia64-low.c (tdesc_ia64): Declare.
4254 (ia64_fetch_register): Adjust.
4255 (ia64_usrregs_info, regs_info): New globals.
4256 (ia64_regs_info): New function.
4257 (the_low_target): Adjust.
4258 (initialize_low_arch): New function.
4259 * linux-sparc-low.c (tdesc_sparc64): Declare.
4260 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4261 Adjust.
4262 (sparc_arch_setup): New function.
4263 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4264 (the_low_target): Adjust.
4265 (initialize_low_arch): New function.
4266 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4267 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4268 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4269 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4270 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4271 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4272 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4273 (tdesc_powerpc_isa205_vsx64l): Declare.
4274 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4275 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4276 (ppc_set_pc, ppc_get_hwcap): Adjust.
4277 (ppc_usrregs_info): Forward declare.
4278 (!__powerpc64__) ppc_regmap_adjusted: New global.
4279 (ppc_arch_setup): Adjust to the current process'es target
4280 description.
4281 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4282 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4283 (ppc_store_evrregset): Adjust.
4284 (target_regsets): Rename to ...
4285 (ppc_regsets): ... this, and make static.
4286 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4287 (ppc_regs_info): New function.
4288 (the_low_target): Adjust.
4289 (initialize_low_arch): New function.
4290 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4291 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4292 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4293 (tdesc_s390x_linux64v2): Declare.
4294 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4295 (s390_fill_gregset, s390_store_last_break): Adjust.
4296 (target_regsets): Rename to ...
4297 (s390_regsets): ... this, and make static.
4298 (s390_get_pc, s390_set_pc): Adjust.
4299 (s390_get_hwcap): New target_desc parameter, and use it.
4300 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4301 (s390_arch_setup): Adjust to set the current process'es target
4302 description. Don't adjust the regmap.
4303 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4304 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4305 (regs_info_3264): New globals.
4306 (s390_regs_info): New function.
4307 (the_low_target): Adjust.
4308 (initialize_low_arch): New function.
4309 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4310 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4311 [__mips64] (init_registers_mips_linux)
4312 (init_registers_mips_dsp_linux): Delete defines.
4313 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4314 (have_dsp): New global.
4315 (mips_read_description): New, based on mips_arch_setup.
4316 (mips_arch_setup): Reimplement.
4317 (get_usrregs_info): New function.
4318 (mips_cannot_fetch_register, mips_cannot_store_register)
4319 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4320 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4321 (target_regsets): Rename to ...
4322 (mips_regsets): ... this, and make static.
4323 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4324 (dsp_regs_info, regs_info): New globals.
4325 (mips_regs_info): New function.
4326 (the_low_target): Adjust.
4327 (initialize_low_arch): New function.
4328 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4329 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4330 Declare.
4331 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4332 (arm_read_description): New, with bits factored from
4333 arm_arch_setup.
4334 (arm_arch_setup): Reimplement.
4335 (target_regsets): Rename to ...
4336 (arm_regsets): ... this, and make static.
4337 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4338 (arm_regs_info): New function.
4339 (the_low_target): Adjust.
4340 (initialize_low_arch): New function.
4341 * linux-m68k-low.c (tdesc_m68k): Declare.
4342 (target_regsets): Rename to ...
4343 (m68k_regsets): ... this, and make static.
4344 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4345 (m68k_regs_info): New function.
4346 (m68k_arch_setup): New function.
4347 (the_low_target): Adjust.
4348 (initialize_low_arch): New function.
4349 * linux-sh-low.c (tdesc_sharch): Declare.
4350 (target_regsets): Rename to ...
4351 (sh_regsets): ... this, and make static.
4352 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4353 (sh_regs_info, sh_arch_setup): New functions.
4354 (the_low_target): Adjust.
4355 (initialize_low_arch): New function.
4356 * linux-bfin-low.c (tdesc_bfin): Declare.
4357 (bfin_arch_setup): New function.
4358 (bfin_usrregs_info, regs_info): New globals.
4359 (bfin_regs_info): New function.
4360 (the_low_target): Adjust.
4361 (initialize_low_arch): New function.
4362 * linux-cris-low.c (tdesc_cris): Declare.
4363 (cris_arch_setup): New function.
4364 (cris_usrregs_info, regs_info): New globals.
4365 (cris_regs_info): New function.
4366 (the_low_target): Adjust.
4367 (initialize_low_arch): New function.
4368 * linux-cris-low.c (tdesc_crisv32): Declare.
4369 (cris_arch_setup): New function.
4370 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4371 (cris_regs_info): New function.
4372 (the_low_target): Adjust.
4373 (initialize_low_arch): New function.
4374 * linux-m32r-low.c (tdesc_m32r): Declare.
4375 (m32r_arch_setup): New function.
4376 (m32r_usrregs_info, regs_info): New globals.
4377 (m32r_regs_info): Adjust.
4378 (initialize_low_arch): New function.
4379 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4380 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4381 (tic6x_usrregs_info): Forward declare.
4382 (tic6x_read_description): New function, based on ...
4383 (tic6x_arch_setup): ... this. Reimplement.
4384 (target_regsets): Rename to ...
4385 (tic6x_regsets): ... this, and make static.
4386 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4387 (tic6x_regs_info): New function.
4388 (the_low_target): Adjust.
4389 (initialize_low_arch): New function.
4390 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4391 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4392 (target_regsets): Rename to ...
4393 (xtensa_regsets): ... this, and make static.
4394 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4395 globals.
4396 (xtensa_arch_setup, xtensa_regs_info): New functions.
4397 (the_low_target): Adjust.
4398 (initialize_low_arch): New function.
4399 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4400 (nios2_arch_setup): Set the current process'es tdesc.
4401 (target_regsets): Rename to ...
4402 (nios2_regsets): ... this.
4403 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4404 (nios2_regs_info): New function.
4405 (the_low_target): Adjust.
4406 (initialize_low_arch): New function.
4407 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4408 (aarch64_arch_setup): Set the current process'es tdesc.
4409 (target_regsets): Rename to ...
4410 (aarch64_regsets): ... this.
4411 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4412 (aarch64_regs_info): New function.
4413 (the_low_target): Adjust.
4414 (initialize_low_arch): New function.
4415 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4416 globals.
4417 (target_regsets): Rename to ...
4418 (tile_regsets): ... this.
4419 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4420 (tile_regs_info): New function.
4421 (tile_arch_setup): Set the current process'es tdesc.
4422 (the_low_target): Adjust.
4423 (initialize_low_arch): New function.
4424 * spu-low.c (tdesc_spu): Declare.
4425 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4426 * win32-arm-low.c (tdesc_arm): Declare.
4427 (arm_arch_setup): New function.
4428 (the_low_target): Install arm_arch_setup instead of
4429 init_registers_arm.
4430 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4431 (init_windows_x86): Rename to ...
4432 (i386_arch_setup): ... this. Set `win32_tdesc'.
4433 (the_low_target): Adjust.
4434 * win32-low.c (win32_tdesc): New global.
4435 (child_add_thread): Don't create the thread cache here.
4436 (do_initial_child_stuff): Set the new process'es tdesc.
4437 * win32-low.h (struct target_desc): Forward declare.
4438 (win32_tdesc): Declare.
4439 * lynx-i386-low.c (tdesc_i386): Declare global.
4440 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4441 * lynx-low.c (lynx_tdesc): New global.
4442 (lynx_add_process): Set the new process'es tdesc.
4443 * lynx-low.h (struct target_desc): Forward declare.
4444 (lynx_tdesc): Declare global.
4445 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4446 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4447 * nto-low.c (nto_tdesc): New global.
4448 (do_attach): Set the new process'es tdesc.
4449 * nto-low.h (struct target_desc): Forward declare.
4450 (nto_tdesc): Declare.
4451 * nto-x86-low.c (tdesc_i386): Declare.
4452 (nto_x86_arch_setup): Set `nto_tdesc'.
4453
4454 2013-06-04 Gary Benson <gbenson@redhat.com>
4455
4456 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4457 to qSupported response when appropriate.
4458 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4459 with nonzero-length annex.
4460 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4461 arguments supplied in annex.
4462
4463 2013-05-31 Doug Evans <dje@google.com>
4464
4465 PR server/15594
4466 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4467 64 bits in 64-cross-32 environment.
4468
4469 2013-05-28 Pedro Alves <palves@redhat.com>
4470
4471 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4472 (aarch64-without-fpu.c): Delete rule.
4473 * configure.srv (aarch64*-*-linux*): Remove references to
4474 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4475 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4476 declaration.
4477
4478 2013-05-24 Pedro Alves <palves@redhat.com>
4479
4480 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4481 instead of strchr/decode_address. Error if the range isn't split
4482 with a ','. Don't assume there's be a ':' in the action.
4483
4484 2013-05-23 Yao Qi <yao@codesourcery.com>
4485 Pedro Alves <palves@redhat.com>
4486
4487 * linux-low.c (lwp_in_step_range): New function.
4488 (linux_wait_1): If the thread was range stepping and stopped
4489 outside the stepping range, report the stop to GDB. Otherwise,
4490 continue stepping. Add range stepping debug output.
4491 (linux_set_resume_request): Copy the step range from the resume
4492 request to the lwp.
4493 (linux_supports_range_stepping): New.
4494 (linux_target_ops) <supports_range_stepping>: Set to
4495 linux_supports_range_stepping.
4496 * linux-low.h (struct linux_target_ops)
4497 <supports_range_stepping>: New field.
4498 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4499 * linux-x86-low.c (x86_supports_range_stepping): New.
4500 (the_low_target) <supports_range_stepping>: Set to
4501 x86_supports_range_stepping.
4502 * server.c (handle_v_cont): Handle 'r' action.
4503 (handle_v_requests): Append ";r" if the target supports range
4504 stepping.
4505 * target.h (struct thread_resume) <step_range_start,
4506 step_range_end>: New fields.
4507 (struct target_ops) <supports_range_stepping>:
4508 New field.
4509 (target_supports_range_stepping): New macro.
4510
4511 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4512
4513 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4514 confusion in comment.
4515
4516 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4517
4518 * lynx-low.c (struct process_info_private): New type.
4519 (lynx_add_process): New function.
4520 (lynx_create_inferior, lynx_attach): Replace calls to
4521 add_process by calls to lynx_add_process.
4522 (lynx_resume): If PTID is null, then try using
4523 current_process()->private->last_wait_event_ptid.
4524 Add comments.
4525 (lynx_clear_inferiors): Delete. The contents of that function
4526 has been inlined in lynx_mourn;
4527 (lynx_wait_1): Save the ptid in the process's private data.
4528 (lynx_mourn): Free the process' private data. Replace call
4529 to lynx_clear_inferiors by call to clear_inferiors.
4530
4531 2013-05-17 Yao Qi <yao@codesourcery.com>
4532
4533 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4534 the right place.
4535
4536 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4537
4538 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4539 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4540 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4541 PT_TEXT_END_ADDR guards. Update comments.
4542 (linux_target_op) <read_offsets>: Conditionally define to
4543 linux_read_offsets if the target is UCLIBC and if it defines
4544 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4545
4546 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4547 Andrew Jenner <andrew@codesourcery.com>
4548
4549 * Makefile.in (SFILES): Add linux-nios2-low.c.
4550 (clean): Add action to delete nios2-linux.c.
4551 (nios2-linux.c): New rule.
4552 * configure.srv: Add nios2*-*-linux*.
4553 * linux-nios2-low.c: New.
4554
4555 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4556
4557 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4558
4559 2013-04-25 Hui Zhu <hui@codesourcery.com>
4560
4561 PR gdb/15186
4562 * ax.c (ax_printf): Add fflush.
4563
4564 2013-04-22 Tom Tromey <tromey@redhat.com>
4565
4566 * Makefile.in (SFILES): Add filestuff.c.
4567 (OBS): Add filestuff.o.
4568 (filestuff.o): New target.
4569 * config.in, configure: Rebuild.
4570 * configure.ac: Check for fdwalk, pipe2.
4571
4572 2013-04-17 Pedro Alves <palves@redhat.com>
4573
4574 * configure.ac (USE_THREAD_DB): Delete variable.
4575 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4576 Don't AC_SUBST USE_THREAD_DB.
4577 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4578 * config.in, configure: Regenerate.
4579
4580 2013-04-16 Pedro Alves <palves@redhat.com>
4581
4582 * linux-low.h (struct lwp_info) <thread_known>: Move under
4583 the USE_THREAD_DB #ifdef.
4584
4585 2013-04-16 Pedro Alves <palves@redhat.com>
4586
4587 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4588 (linux-low.o): Delete rule.
4589 * linux-low.h: Always include "gdb_thread_db.h" instead of
4590 conditionally including thread_db.h.
4591 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4592 HAVE_THREAD_DB_H.
4593
4594 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4595
4596 * Makefile.in (install-only): Fix make install regression.
4597
4598 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4599
4600 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4601 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4602 installation.
4603 * gdbserver.1: Remove.
4604
4605 2013-03-22 Pedro Alves <palves@redhat.com>
4606
4607 * linux-low.c (handle_extended_wait): Don't call
4608 linux_enable_event_reporting.
4609
4610 2013-03-15 Tony Theodore <tonyt@logyst.com>
4611
4612 PR build/9098:
4613 * Makefile.in (SHELL): Use @SHELL@.
4614
4615 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4616
4617 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4618 compiler warning.
4619
4620 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4621
4622 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4623 Remove extraneous NULL element.
4624
4625 2013-03-13 Yao Qi <yao@codesourcery.com>
4626
4627 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4628 'V' block in trace frame.
4629
4630 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4631
4632 * target.h (struct target_ops): Add btrace ops.
4633 (target_supports_btrace): New macro.
4634 (target_enable_btrace): New macro.
4635 (target_disable_btrace): New macro.
4636 (target_read_btrace): New macro.
4637 * gdbthread.h (struct thread_info): Add btrace field.
4638 * server.c: Include btrace-common.h.
4639 (handle_btrace_general_set): New function.
4640 (handle_btrace_enable): New function.
4641 (handle_btrace_disable): New function.
4642 (handle_general_set): Call handle_btrace_general_set.
4643 (handle_qxfer_btrace): New function.
4644 (struct qxfer qxfer_packets[]): Add btrace entry.
4645 * inferiors.c (remove_thread): Disable btrace.
4646 * linux-low: Include linux-btrace.h.
4647 (linux_low_enable_btrace): New function.
4648 (linux_low_read_btrace): New function.
4649 (linux_target_ops): Add btrace ops.
4650 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4651 Add srv_linux_btrace=yes.
4652 (x86_64-*-linux*): Add linux-btrace.o.
4653 Add srv_linux_btrace=yes.
4654 * configure.ac: Define HAVE_LINUX_BTRACE.
4655 * config.in: Regenerated.
4656 * configure: Regenerated.
4657
4658 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4659
4660 * server.c (handle_qxfer): Preserve error message if -3 is
4661 returned.
4662 (qxfer): Document the -3 return value.
4663
4664 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4665
4666 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4667 (linux_btrace_h): New variable.
4668 (linux-btrace.o): New rule.
4669
4670 2013-03-08 Stan Shebs <stan@codesourcery.com>
4671 Hafiz Abid Qadeer <abidh@codesourcery.com>
4672
4673 * tracepoint.c (trace_buffer_size): New global.
4674 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4675 (init_trace_buffer): Change to one-argument function. Allocate
4676 trace buffer memory.
4677 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4678 handle QTBuffer:size packet.
4679 (cmd_bigqtbuffer_size): New function.
4680 (initialize_tracepoint): Call init_trace_buffer with
4681 DEFAULT_TRACE_BUFFER_SIZE.
4682 * server.c (handle_query): Add QTBuffer:size in the
4683 supported packets.
4684
4685 2013-03-07 Yao Qi <yao@codesourcery.com>
4686
4687 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4688 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4689 of -1.
4690 (cmd_qtsp): Adjust condition. Do post increment.
4691 Set cur_action and cur_step_action back to 0.
4692
4693 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4694
4695 PR server/15236
4696 * linux-low.c (linux_write_memory): Return early success if LEN is
4697 zero.
4698
4699 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4700
4701 * configure.srv: Add x86_64-*-cygwin* as target.
4702
4703 2013-02-28 Tom Tromey <tromey@redhat.com>
4704
4705 * configure.ac: Invoke AC_SYS_LARGEFILE.
4706 * configure, config.in: Rebuild.
4707
4708 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4709
4710 * win32-low.c: Throughout, fix format strings and casts of
4711 printf-like functions to avoid type related warnings on all
4712 platforms.
4713 (get_child_debug_event): Print dwDebugEventCode as hex since
4714 that's how it's usually documented.
4715
4716 2013-02-28 Yao Qi <yao@codesourcery.com>
4717
4718 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4719 pulongest.
4720
4721 2013-02-27 Jiong Wang <jiwang@tilera.com>
4722
4723 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4724 (reg-tilegx32.c): New rule.
4725 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4726 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4727 different register info initializer according to elf class.
4728 (init_registers_tilgx32): New function. The tilegx32 register info
4729 initializer.
4730 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4731 (tile_store_gregset): Likewise.
4732
4733 2013-02-27 Yao Qi <yao@codesourcery.com>
4734
4735 * server.c (process_point_options): Print debug message when
4736 debug_threads is true.
4737
4738 2013-02-26 Yao Qi <yao@codesourcery.com>
4739
4740 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4741
4742 2013-02-19 Pedro Alves <palves@redhat.com>
4743 Kai Tietz <ktietz@redhat.com>
4744
4745 PR gdb/15161
4746
4747 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4748 instead of strtoul to extract address from packet.
4749 (process_serial_event) <'z'>: Likewise.
4750
4751 2013-02-18 Yao Qi <yao@codesourcery.com>
4752
4753 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4754
4755 2013-02-14 Pedro Alves <palves@redhat.com>
4756
4757 Plug memory leak.
4758
4759 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4760 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4761
4762 2013-02-14 Pedro Alves <palves@redhat.com>
4763
4764 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4765
4766 2013-02-14 Pedro Alves <palves@redhat.com>
4767
4768 * tracepoint.c (save_string): Delete.
4769 (add_tracepoint_action): Use savestring instead of save_string.
4770
4771 2013-02-12 Pedro Alves <palves@redhat.com>
4772
4773 * linux-xtensa-low.c: Ditto.
4774 * xtensa-xtregs.c: Ditto.
4775
4776 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4777
4778 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4779 thread_db.
4780
4781 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4782
4783 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4784 aarch64_num_wp_regs and aarch64_num_bp_regs to
4785 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4786
4787 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4788
4789 * linux-aarch64-low.c (ps_get_thread_area): Replace
4790 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4791
4792 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4793 Marcus Shawcroft <marcus.shawcroft@arm.com>
4794 Nigel Stephens <nigel.stephens@arm.com>
4795 Yufeng Zhang <yufeng.zhang@arm.com>
4796
4797 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4798 (aarch64.c, aarch64-without-fpu.c): New targets.
4799 * configure.srv (aarch64*-*-linux*): New.
4800 * linux-aarch64-low.c: New file.
4801
4802 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4803
4804 * linux-low.c (handle_extended_wait, linux_create_inferior)
4805 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4806 (dequeue_one_deferred_signal, linux_resume_one_thread)
4807 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4808 (linux_tracefork_grandchild, linux_test_for_tracefork)
4809 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4810 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4811 where the argument is 0.
4812
4813 2013-01-25 Yao Qi <yao@codesourcery.com>
4814
4815 * event-loop.c: Include "queue.h".
4816 (gdb_event_p): New typedef.
4817 (struct gdb_event) <next_event>: Remove.
4818 (event_queue): Change to QUEUE(gdb_event_p).
4819 (async_queue_event): Remove.
4820 (gdb_event_xfree): New.
4821 (initialize_event_loop): New.
4822 (process_event): Use API from QUEUE.
4823 (wait_for_event): Likewise.
4824 * server.c (main): Call initialize_event_loop.
4825 * server.h (initialize_event_loop): Declare.
4826
4827 2013-01-18 Yao Qi <yao@codesourcery.com>
4828
4829 * ax.h (struct eval_agent_expr_context): New.
4830 (gdb_eval_agent_expr): Update declaration.
4831 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4832 TFRAME. Add new argument CTX.
4833 * server.h (struct eval_agent_expr_context): Declare.
4834 (agent_mem_read, agent_tsv_read): Update declaration.
4835 (agent_mem_read_string): Likewise.
4836 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4837 (add_traceframe_block): Add new argument TPOINT.
4838 Increase TPOINT->traceframe_usage.
4839 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4840 eval_tracepoint_agent_expr.
4841 (condition_true_at_tracepoint): Likewise.
4842 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4843 (agent_mem_read_string, agent_tsv_read): Likewise.
4844
4845 2013-01-16 Yao Qi <yao@codesourcery.com>
4846
4847 * linux-low.c (linux_resume_one_lwp): Don't check
4848 'lwp->bp_reinsert != 0'.
4849
4850 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4851 Pedro Alves <palves@redhat.com>
4852
4853 * lynx-low.c (ptrace_request_to_str): Define a temporary
4854 macro and use it to simplify this function's implementation.
4855
4856 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4857
4858 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4859 sets errno.
4860
4861 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4862
4863 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4864
4865 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4866
4867 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4868
4869 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4870
4871 * lynx-low.c (lynx_resume): Use the resume_info parameter
4872 to determine the ptid for the lynx_ptrace call, unless
4873 it is equal to minus_one_ptid, in which case we use the
4874 ptid of the current_inferior.
4875 (lynx_wait_1): After having received a thread create/exit
4876 event, resume the inferior's execution using the signaling
4877 thread's ptid, rather than the old ptid.
4878
4879 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4880
4881 * lynx-low.c (lynx_resume): Delete variable ret.
4882
4883 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4884
4885 * gdbreplay.c (gdbreplay_version): Update copyright year.
4886 * server.c (gdbserver_version): Likewise.
4887
4888 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4889
4890 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4891 new thread.
4892
4893 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4894
4895 * lynx-low.c (ptrace_request_to_str): Add handling for
4896 PTRACE_GETTRACESIG.
4897
4898 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4899
4900 * lynx-low.c (lynx_attach): Delete variable new_process.
4901
4902 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4903
4904 * lynx-low.c (lynx_create_inferior): Delete variable
4905 new_process.
4906
4907 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4908
4909 * lynx-low.c (ptrace_request_to_str): Do not handle
4910 PTRACE_GETTHREADLIST if this macro does not exist.
4911
4912 2012-12-15 Yao Qi <yao@codesourcery.com>
4913
4914 * Makefile.in (OBS): Add notif.o.
4915 * notif.c, notif.h: New.
4916 * server.c: Include "notif.h".
4917 (struct vstop_notif) <next>: Remove.
4918 <base>: New field.
4919 (queue_stop_reply): Update.
4920 (push_event, send_next_stop_reply): Remove.
4921 (discard_queued_stop_replies): Update.
4922 (notif_stop): New variable.
4923 (handle_v_stopped): Remove.
4924 (handle_v_requests): Don't call handle_v_stopped. Call
4925 handle_ack_notif instead.
4926 (queue_stop_reply_callback): Call notif_event_enque instead
4927 of queue_stop_reply.
4928 (handle_status): Don't call send_next_stop_reply, call
4929 notif_write_event instead.
4930 (kill_inferior_callback): Likewise.
4931 (detach_or_kill_inferior_callback): Likewise.
4932 (main): Call initialize_notif.
4933 (process_serial_event): Call QUEUE_is_empty.
4934 (handle_target_event): Call notif_push instead of push event.
4935 * server.h (push_event): Remove declaration.
4936
4937 2012-12-10 Tom Tromey <tromey@redhat.com>
4938
4939 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4940 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4941 macros.
4942 (.c.o): Rewrite.
4943 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4944 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4945 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4946 (amd64-linux-ipa.o, ax.o): Rewrite.
4947 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4948 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4949 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4950 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4951 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4952 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4953 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4954 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4955 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4956 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4957 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4958 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4959 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4960 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4961 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4962 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4963 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4964 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4965 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4966 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4967 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4968 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4969 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4970 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4971 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4972 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4973 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4974 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4975 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4976 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4977 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4978 (reg-tilegx.o): Remove.
4979 (all_object_files): New macro.
4980 Include .deps files.
4981 * aclocal.m4, configure: Rebuild.
4982 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4983 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4984 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4985
4986 2012-12-05 Tom Tromey <tromey@redhat.com>
4987
4988 PR gdb/14917:
4989 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4990
4991 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4992
4993 * configure.ac: Check for linux/perf_event.h.
4994 * config.in: Regenerated.
4995 * configure: Regenerated.
4996
4997 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4998
4999 * hostio.c (handle_readlink): Decrease buffer size
5000 parameter passed to readlink by one byte.
5001
5002 2012-11-26 Yao Qi <yao@codesourcery.com>
5003
5004 * configure.ac (build_warnings): Append '-Wempty-body'.
5005 * configure: Regenerated.
5006 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5007 body.
5008
5009 2012-11-15 Pierre Muller <muller@sourceware.org>
5010
5011 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5012 * config.in: Regenerate.
5013 * configure: Regenerate.
5014 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5015 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5016 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5017 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5018 header.
5019 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5020 instead of <sys/wait.h> header.
5021 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5022
5023 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5024
5025 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5026 (various make rules): Remove -DGDBSERVER
5027
5028 2012-11-09 Yao Qi <yao@codesourcery.com>
5029
5030 * spu-low.c (current_ptid): Move it to ..
5031 * gdbthread.h: ... here. New.
5032 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5033 * server.c (myresume, process_serial_event): Likewise.
5034 * thread-db.c (thread_db_find_new_threads): Likewise.
5035 * tracepoint.c (run_inferior_command): Likewise.
5036
5037 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5038
5039 * server.c (handle_search_memory_1): Include access length in
5040 warning message.
5041
5042 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5043
5044 * linux-crisv32-low.c: Fix compile errors.
5045
5046 2012-09-04 Yao Qi <yao@codesourcery.com>
5047
5048 * tracepoint.c (cmd_qtsv): Adjust debug message.
5049 Don't check CUR_TPOINT.
5050
5051 2012-08-28 Yao Qi <yao@codesourcery.com>
5052
5053 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5054 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5055 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5056 Remove declarations of xmalloc, xreallloc, xstrdup and
5057 freeargv.
5058 * Makefile.in (libiberty_h): New.
5059 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5060 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5061
5062 2012-08-23 Yao Qi <yao@codesourcery.com>
5063
5064 * server.h: Remove declaration of 'xsnprintf'.
5065
5066 2012-08-22 Keith Seitz <keiths@redhat.com>
5067
5068 * server.h: Include build-gnulib-gbserver/config.h.
5069 * gdbreplay.c: Likewise.
5070
5071 2012-08-08 Doug Evans <dje@google.com>
5072
5073 * Makefile.in (SFILES): Add gdb_vecs.c.
5074 (OBS): Add gdb_vecs.o.
5075 (gdb_vecs_h, host_defs_h): New variables.
5076 (thread-db.o): Add $(gdb_vecs_h) dependency.
5077 (gdb_vecs.o): New rule.
5078 * thread-db.c: #include "gdb_vecs.h".
5079 (thread_db_load_search): Use a vector to iterate over path elements.
5080 Handle text appearing after "$pdir".
5081
5082 * configure.ac: Add check for strstr.
5083 * config.in: Regenerate.
5084 * configure: Regenerate.
5085
5086 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5087
5088 * hostio.c (handle_pread): If pread fails, fall back to attempting
5089 lseek/read.
5090 (handle_pwrite): Likewise for pwrite.
5091
5092 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5093
5094 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5095 between unsupported TYPE and unimplementable ADDR/LEN combination.
5096 (arm_insert_point): Act on new return value.
5097
5098 2012-07-31 Pedro Alves <palves@redhat.com>
5099
5100 * server.c (process_point_options): Only skip tokens if we find
5101 one that is unrecognized. Don't treat 'X' specially while
5102 skipping unrecognized tokens.
5103
5104 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5105
5106 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5107 to 4-byte-align HW breakpoint addresses for Thumb.
5108
5109 2012-07-27 Yao Qi <yao@codesourcery.com>
5110
5111 PR remote/14161.
5112
5113 * server.h: Declare gdb_agent_about_to_close.
5114 * target.c (kill_inferior): Include "agent.h".
5115 New. Send command 'kill'.
5116 * target.h (kill_inferior): Removed macro.
5117 * tracepoint.c (gdb_agent_about_to_close): New.
5118 (gdb_agent_helper_thread): Handle command 'close'.
5119 Wait endlessly until the inferior stops.
5120 Install gdb_agent_remove_socket to atexit hook.
5121 (agent_socket_name): New static variable.
5122 (gdb_agent_socket_init): Replace local variable 'name' with
5123 'agent_socket_name'.
5124 (gdb_agent_remove_socket): New.
5125
5126 2012-07-27 Yao Qi <yao@codesourcery.com>
5127
5128 * server.c (process_point_options): Stop at 'X' when parsing.
5129
5130 2012-07-19 Michael Eager <eager@eagercon.com>
5131
5132 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5133 to hw_execute.
5134 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5135 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5136 hardware breakpoint.
5137
5138 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5139
5140 * gdbserver/linux-low.c (initialize_low): Call
5141 linux_ptrace_init_warnings.
5142
5143 2012-07-02 Doug Evans <dje@google.com>
5144
5145 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5146 pointer to int.
5147
5148 2012-07-02 Stan Shebs <stan@codesourcery.com>
5149
5150 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5151 (ax.o): Add it to build rule.
5152 (ax-ipa.o): Ditto.
5153 (OBS): Add format.o.
5154 (IPA_OBS): Add format.o.
5155 * server.c (handle_query): Claim support for breakpoint commands.
5156 (process_point_options): Add command case.
5157 (process_serial_event): Leave running if there are printfs in
5158 effect.
5159 * mem-break.h (any_persistent_commands): Declare.
5160 (add_breakpoint_commands): Declare.
5161 (gdb_no_commands_at_breakpoint): Declare.
5162 (run_breakpoint_commands): Declare.
5163 * mem-break.c (struct point_command_list): New struct.
5164 (struct breakpoint): New field command_list.
5165 (any_persistent_commands): New function.
5166 (add_commands_to_breakpoint): New function.
5167 (add_breakpoint_commands): New function.
5168 (gdb_no_commands_at_breakpoint): New function.
5169 (run_breakpoint_commands): New function.
5170 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5171 locally.
5172 * ax.c: Include format.h.
5173 (ax_printf): New function.
5174 (gdb_eval_agent_expr): Add printf opcode.
5175
5176 2012-06-13 Yao Qi <yao@codesourcery.com>
5177
5178 * server.c (start_inferior): Remove duplicated writes to fields
5179 'last_resume_kind' and 'last_status' of 'current_inferior'.
5180
5181 2012-06-12 Yao Qi <yao@codesourcery.com>
5182 Pedro Alves <palves@redhat.com>
5183
5184 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5185 comment.
5186 * server.c (handle_v_cont): Extend comment.
5187
5188 2012-06-11 Yao Qi <yao@codesourcery.com>
5189
5190 * linux-low.c (linux_attach): Add 'static'.
5191
5192 2012-06-06 Yao Qi <yao@codesourcery.com>
5193
5194 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5195
5196 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5197
5198 Fix gcc -flto compilation warning.
5199 * server.c (main): Make variable multi_mode and attach volatile.
5200
5201 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5202
5203 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5204 if the platform doesn't know about it.
5205
5206 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5207
5208 * Makefile.in (SFILES): Add linux-tile-low.c.
5209 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5210 * configure.srv: Handle tilegx-*-linux*.
5211 * linux-tile-low.c: New file.
5212
5213 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5214
5215 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5216
5217 2012-05-24 Pedro Alves <palves@redhat.com>
5218
5219 PR gdb/7205
5220
5221 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5222
5223 2012-05-24 Pedro Alves <palves@redhat.com>
5224
5225 PR gdb/7205
5226
5227 Replace target_signal with gdb_signal throughout.
5228
5229 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5230
5231 * linux-low.c (linux_store_registers): Avoid the copying sequence
5232 when no data has been retrieved by ptrace.
5233
5234 2012-05-22 Will Deacon <will.deacon@arm.com>
5235
5236 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5237 Include asm/ptrace.h.
5238 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5239 already defined.
5240
5241 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5242
5243 * linux-low.c (linux_store_registers): Don't re-retrieve data
5244 with ptrace that has already been obtained from /proc. Always
5245 copy any data retrieved with ptrace to the buffer supplied.
5246
5247 2012-05-11 Yao Qi <yao@codesourcery.com>
5248 Pedro Alves <palves@redhat.com>
5249
5250 * linux-low.c (enum stopping_threads_kind): New.
5251 (stopping_threads): Change type to `enum stopping_threads_kind'.
5252 (handle_extended_wait): If stopping and suspending threads, leave
5253 the new_lwp suspended too.
5254 (linux_wait_for_event): Adjust.
5255 (stop_all_lwps): Set `stopping_threads' to
5256 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5257 whether we're suspending threads or just stopping them. Assert no
5258 recursion happens.
5259
5260 2012-04-29 Yao Qi <yao@codesourcery.com>
5261
5262 * server.h: Move some code to ...
5263 * gdbthread.h: ... here. New.
5264 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5265 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5266 (nto-low.o, win32-low.o): Likewise.
5267 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5268 * regcache.c, remote-utils.c, server.c: Likewise.
5269 * target.c, tracepoint.c, win32-low.c: Likewise.
5270
5271 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5272
5273 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5274 (PTRACE_ARG4_TYPE): Likewise.
5275 (PTRACE_XFER_TYPE): Likewise.
5276 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5277 ptrace to PTRACE_ARG3_TYPE.
5278 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5279 (PTRACE_ARG4_TYPE): Likewise.
5280 (PTRACE_XFER_TYPE): Likewise.
5281 (linux_detach_one_lwp): Cast fourth argument of
5282 ptrace to long then PTRACE_ARG4_TYPE.
5283 (regsets_fetch_inferior_registers): Cast third argument of
5284 ptrace to long then PTRACE_ARG3_TYPE.
5285 (regsets_store_inferior_registers): Likewise.
5286
5287 2012-04-20 Pedro Alves <palves@redhat.com>
5288
5289 * configure: Regenerate.
5290
5291 2012-04-19 Pedro Alves <palves@redhat.com>
5292
5293 * Makefile.in (GNULIB_BUILDDIR): New.
5294 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5295 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5296 (all, install-only, uninstall, clean-info, all-lib, clean): No
5297 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5298 (maintainer-clean realclean distclean): Use subdir_do.
5299 (subdir_do): New.
5300 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5301 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5302 * acinclude.m4: Include acx_configure_dir.m4.
5303 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5304 calls. Call AC_PROG_RANLIB. Configure gnulib using
5305 ACX_CONFIGURE_DIR.
5306 (GNULIB): New.
5307 (GNULIB_STDINT_H): Adjust.
5308 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5309 * gdbreplay.c: Include build-gnulib/config.h.
5310 * server.h: Likewise.
5311 * aclocal.m4: Regenerate.
5312 * config.in: Regenerate.
5313 * configure: Regenerate.
5314
5315 2012-04-19 Pedro Alves <palves@redhat.com>
5316
5317 * Makefile.in (LIBGNU, INCGNU): Adjust.
5318 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5319 (all, install-only, uninstall, clean-info, all-lib, clean)
5320 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5321 * configure.ac: Adjust AC_OUTPUT output.
5322 * aclocal.m4: Regenerate.
5323 * configure: Regenerate.
5324
5325 2012-04-19 Pedro Alves <palves@redhat.com>
5326
5327 * Makefile.in (generated_files): New.
5328 (server_h): Remove the explicit dependency on config.h, and depend
5329 on $generated_files.
5330
5331 2012-04-19 Pedro Alves <palves@redhat.com>
5332
5333 * Makefile.in (INCGNU): Add -Ignulib.
5334
5335 2012-04-19 Pedro Alves <palves@redhat.com>
5336
5337 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5338 (INCGNU): ... this, and spell out -I here.
5339 (GNULIB_LIB): Rename to ...
5340 (LIBGNU): ... this.
5341 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5342
5343 2012-04-19 Pedro Alves <palves@redhat.com>
5344
5345 * config.in: Regenerate.
5346
5347 2012-04-19 Pedro Alves <palves@redhat.com>
5348
5349 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5350 * server.h (memmem): Remove declaration.
5351 * config.in: Regenerate.
5352 * configure: Regenerate.
5353
5354 2012-04-19 Yao Qi <yao@codesourcery.com>
5355
5356 * Makefile.in (SFILES): Add common/vec.c.
5357 (OBS): Add vec.o.
5358 (vec.o): New rule.
5359
5360 2012-04-19 Yao Qi <yao@codesourcery.com>
5361
5362 * remote-utils.c (prepare_resume_reply): Replace with macro
5363 target_core_of_thread.
5364 * server.c (handle_qxfer_threads_proper): Likewise.
5365 * target.h (traget_core_of_thread): New macro.
5366
5367 2012-04-18 Pedro Alves <palves@redhat.com>
5368
5369 * aclocal.m4: Regenerate.
5370 * configure: Regenerate.
5371
5372 2012-04-16 Yao Qi <yao@codesourcery.com>
5373
5374 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5375 duplicated on address.
5376
5377 2012-04-16 Yao Qi <yao@codesourcery.com>
5378
5379 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5380 (struct tracepoint_action_ops) <send>: New field.
5381 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5382 (agent_expr_send, x_tracepoint_action_send): New.
5383 (l_tracepoint_action_send): New.
5384 (cmd_qtdp): Download and install tracepoint
5385 according to `use_agent'.
5386 (run_inferior_command): Add one more parameter `len'.
5387 Update callers.
5388 (tracepoint_send_agent): New.
5389 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5390
5391 2012-04-16 Yao Qi <yao@codesourcery.com>
5392
5393 * tracepoint.c (download_tracepoints): Moved to ...
5394 (cmd_qtstart): ... here.
5395
5396 2012-04-14 Yao Qi <yao@codesourcery.com>
5397
5398 * tracepoint.c: Include inttypes.h.
5399 (struct collect_memory_action): Use sized types.
5400 (struct tracepoint): Likewise.
5401 (cmd_qtdp, stop_tracing): Update print specifiers.
5402 (cmd_qtp, response_tracepoint): Likewise.
5403 (collect_data_at_tracepoint): Likewise.
5404 (collect_data_at_step): Likewise.
5405
5406 2012-04-14 Yao Qi <yao@codesourcery.com>
5407
5408 Import gnulib module inttypes.
5409 * aclocal.m4, config.in, configure: Regenerated.
5410
5411 2012-04-14 Yao Qi <yao@codesourcery.com>
5412
5413 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5414 Makefile and config.status at last.
5415
5416 2012-04-13 Yao Qi <yao@codesourcery.com>
5417
5418 * tracepoint.c: Include stdint.h unconditionally.
5419
5420 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5421
5422 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5423 on BFD_HAVE_SYS_PROCFS_TYPE.
5424 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5425 * configure: Regenerate.
5426 * config.in: Likewise.
5427
5428 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5429
5430 * Makefile.in (clean): Also remove x32.c x32-linux.c
5431 x32-avx.c x32-avx-linux.c.
5432 (x32.o): New target.
5433 (x32.c): Likewise.
5434 (x32-linux.o): Likewise.
5435 (x32-linux.c): Likewise.
5436 (x32-avx.o): Likewise.
5437 (x32-avx.c): Likewise.
5438 (x32-avx-linux.o): Likewise.
5439 (x32-avx-linux.c): Likewise.
5440
5441 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5442 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5443 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5444 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5445 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5446 i386/x32-avx-linux.xml.
5447
5448 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5449 (init_registers_x32_avx_linux): Likwise.
5450 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5451 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5452
5453 2012-04-13 Pedro Alves <palves@redhat.com>
5454
5455 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5456 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5457 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5458 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5459 the sub-make.
5460
5461 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5462
5463 * linux-x86-low.c (compat_x32_clock_t): New.
5464 (compat_x32_siginfo_t): Likewise.
5465 (compat_x32_siginfo_from_siginfo): Likewise.
5466 (siginfo_from_compat_x32_siginfo): Likewise.
5467 (linux_is_elf64): Likewise.
5468 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5469 and siginfo_from_compat_x32_siginfo for x32.
5470 (x86_arch_setup): Set linux_is_elf64.
5471
5472 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5473
5474 PR gdb/13969
5475 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5476 e_machine field.
5477 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5478 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5479 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5480 compatible with process.
5481
5482 2012-04-12 Yao Qi <yao@codesourcery.com>
5483
5484 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5485 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5486 (install-only, install-info, clean): Handle sub dir gnulib.
5487 (all-lib, am--refresh): New targets.
5488 (memmem.o): Remove target.
5489 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5490 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5491 (AC_REPLACE_FUNCS): Remove memmem.
5492 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5493 (AC_OUTPUT): Generate Makefile in gnulib/.
5494 * aclocal.m4, config.in, configure: Regenerated.
5495
5496 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5497
5498 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5499
5500 2012-04-05 Pedro Alves <palves@redhat.com>
5501
5502 -Werror=strict-aliasing
5503
5504 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5505 pointer.
5506
5507 2012-04-04 Pedro Alves <palves@redhat.com>
5508
5509 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5510 (sparc_store_gregset_from_stack, sparc_store_gregset)
5511 (sparc_breakpoint_at): Fix formatting.
5512
5513 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5514
5515 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5516 are available.
5517 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5518 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5519 * config.in: Regenerate.
5520 * configure: Likewise.
5521
5522 2012-03-29 Pedro Alves <palves@redhat.com>
5523
5524 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5525 Correct ptrace arguments.
5526
5527 2012-03-28 Pedro Alves <palves@redhat.com>
5528
5529 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5530 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5531 (IA64_FR1_REGNUM): New defines.
5532 (ia64_fetch_register): New.
5533 (the_low_target): Install it.
5534 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5535 field.
5536 * linux-low.c (linux_fetch_registers): Try the
5537 the_low_target.fetch_register hook first.
5538
5539 * linux-arm-low.c (the_low_target): Adjust.
5540 * linux-bfin-low.c (the_low_target): Adjust.
5541 * linux-cris-low.c (the_low_target): Adjust.
5542 * linux-crisv32-low.c (the_low_target): Adjust.
5543 * linux-m32r-low.c (the_low_target): Adjust.
5544 * linux-m68k-low.c (the_low_target): Adjust.
5545 * linux-mips-low.c (the_low_target): Adjust.
5546 * linux-ppc-low.c (the_low_target): Adjust.
5547 * linux-s390-low.c (the_low_target): Adjust.
5548 * linux-sh-low.c (the_low_target): Adjust.
5549 * linux-sparc-low.c (the_low_target): Adjust.
5550 * linux-tic6x-low.c (the_low_target): Adjust.
5551 * linux-x86-low.c (the_low_target): Adjust.
5552 * linux-xtensa-low.c (the_low_target): Adjust.
5553
5554 2012-03-26 Pedro Alves <palves@redhat.com>
5555
5556 * server.c (handle_qxfer_libraries): Don't bail early if
5557 the_target->qxfer_libraries_svr4 is not NULL.
5558
5559 2012-03-26 Pedro Alves <palves@redhat.com>
5560
5561 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5562
5563 2012-03-23 Pedro Alves <palves@redhat.com>
5564
5565 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5566 "library-list-svr4" element's start tag when the the DSO list is
5567 empty.
5568
5569 2012-03-23 Pedro Alves <palves@redhat.com>
5570
5571 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5572 a variable whose type size is the same as the inferior's pointer
5573 size.
5574
5575 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5576
5577 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5578 struct siginfo.
5579 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5580 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5581 * linux-low.h: Include <signal.h>.
5582 (struct siginfo): Remove forward declaration.
5583 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5584 struct siginfo.
5585
5586 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5587
5588 * .gitignore: Ignore more files.
5589
5590 2012-03-19 Pedro Alves <palves@redhat.com>
5591 Jan Kratochvil <jan.kratochvil@redhat.com>
5592
5593 * server.c (cont_thread, general_thread): Add describing comments.
5594 (start_inferior): Clear `cont_thread'.
5595 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5596 of a process.
5597
5598 2012-03-15 Yao Qi <yao@codesourcery.com>
5599
5600 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5601 handling to ...
5602 (cmd_qtdp): ... here.
5603
5604 2012-03-15 Yao Qi <yao@codesourcery.com>
5605
5606 * tracepoint.c (struct tracepoint_action_ops): New.
5607 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5608 (m_tracepoint_action_download): New.
5609 (r_tracepoint_action_download): New.
5610 (x_tracepoint_action_download): New.
5611 (l_tracepoint_action_download): New.
5612 (add_tracepoint_action): Install `action->ops' according type.
5613 (download_tracepoint_1): Move code `download' function pointer
5614 of various tracepoint_action_ops.
5615
5616 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5617
5618 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5619 linux_ptrace_attach_warnings.
5620
5621 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5622
5623 * Makefile.in (linux-ptrace.o): New.
5624 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5625 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5626 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5627 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5628 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5629 of these targets.
5630 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5631
5632 2012-03-08 Yao Qi <yao@codesourcery.com>
5633 Pedro Alves <palves@redhat.com>
5634
5635 Fix PR server/13392.
5636 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5637 offset of JMP insn.
5638 * tracepoint.c (remove_tracepoint): New.
5639 (cmd_qtdp): Call remove_tracepoint when failed to install.
5640
5641 2012-03-07 Pedro Alves <palves@redhat.com>
5642
5643 * linux-low.c (get_detach_signal): New.
5644 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5645 Pass on pending signals to PTRACE_DETACH. Check the result of the
5646 ptrace call.
5647 * server.c (program_signals, program_signals_p): New.
5648 (handle_general_set): Handle QProgramSignals.
5649 * server.h (program_signals, program_signals_p): Declare.
5650
5651 2012-03-05 Pedro Alves <palves@redhat.com>
5652 Jan Kratochvil <jan.kratochvil@redhat.com>
5653
5654 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5655 New comment why.
5656
5657 2012-03-03 Yao Qi <yao@codesourcery.com>
5658
5659 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5660 agent_look_up_symbols.
5661
5662 2012-03-03 Yao Qi <yao@codesourcery.com>
5663
5664 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5665 (linux-x86-low.o): Likewise.
5666 * server.h: Remove in_process_agent_loaded.
5667 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5668 common/agent.c.
5669 Update callers.
5670
5671 2012-03-03 Yao Qi <yao@codesourcery.com>
5672
5673 * tracepoint.c (gdb_agent_capability): New global.
5674 (in_process_agent_loaded_ust): Renamed to
5675 `in_process_agent_supports_ust'.
5676 Update callers.
5677 (in_process_agent_supports_ust): Call agent_capability_check.
5678 (clear_installed_tracepoints): Assert that agent supports
5679 agent.
5680
5681 2012-03-03 Yao Qi <yao@codesourcery.com>
5682
5683 * linux-low.c (linux_supports_agent): New.
5684 (linux_target_ops): Initialize field `supports_agent' with
5685 linux_supports_agent.
5686 * target.h (struct target_ops) <supports_agent>: New.
5687 (target_supports_agent): New macro.
5688 * server.c (handle_general_set): Handle packet 'QAgent'.
5689 (handle_query): Send `QAgent+'.
5690 * Makefile.in (server.o): Depends on agent.h.
5691
5692 2012-03-03 Yao Qi <yao@codesourcery.com>
5693
5694 * Makefile.in (OBS): Add agent.o.
5695 Add new rule for agent.o.
5696 Track dependence of tracepoint.c on agent.h.
5697 * tracepoint.c (run_inferior_command_1):
5698 (run_inferior_command): Call agent_run_command.
5699 (gdb_ust_connect_sync_socket): Deleted. Move it to
5700 common/agent.c.
5701 (resume_thread, stop_thread): Likewise.
5702 (gdb_ust_socket_init): Renamed to ...
5703 (gdb_agent_socket_init): ... New.
5704 (gdb_ust_thread): Renamed to ...
5705 (gdb_agent_helper_thread): ... New.
5706 (gdb_ust_init): Move some code to ...
5707 (gdb_agent_init): ... here. New.
5708 [HAVE_UST]: Call gdb_ust_init.
5709 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5710 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5711 * config.in, configure: Regenerated.
5712
5713 2012-03-02 Pedro Alves <palves@redhat.com>
5714
5715 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5716 * linux-low.c (struct simple_pid_list): New.
5717 (stopped_pids): New a struct simple_pid_list pointer.
5718 (add_to_pid_list, pull_pid_from_list): New.
5719 (handle_extended_wait): Don't assume the first signal new children
5720 report is SIGSTOP. Adjust call to pull_pid_from_list.
5721 (linux_wait_for_lwp): Adjust.
5722
5723 2012-03-02 Yao Qi <yao@codesourcery.com>
5724
5725 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5726 debug log.
5727
5728 2012-03-02 Yao Qi <yao@codesourcery.com>
5729
5730 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5731 `stop_pc' and `tpoint'. Update caller.
5732
5733 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5734
5735 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5736 * linux-low.c (use_linux_regsets): New macro.
5737 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5738 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5739 (linux_register_in_regsets): New function.
5740 (usr_fetch_inferior_registers): Skip registers covered by
5741 regsets.
5742 (usr_store_inferior_registers): Likewise.
5743 (usr_fetch_inferior_registers): New macro.
5744 (usr_store_inferior_registers): Likewise.
5745 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5746 (linux_store_registers): Likewise.
5747 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5748 prototype.
5749 (init_registers_mips64_dsp_linux): Likewise.
5750 (init_registers_mips_linux): New macro.
5751 (init_registers_mips_dsp_linux): Likewise.
5752 (mips_dsp_num_regs): Likewise.
5753 (DSP_BASE, DSP_CONTROL): New fallback macros.
5754 (mips_base_regs): New macro.
5755 (mips_regmap): Use it. Fix the size.
5756 (mips_dsp_regmap): New variable.
5757 (mips_dsp_regset_bitmap): Likewise.
5758 (mips_arch_setup): New function.
5759 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5760 than mips_regmap.
5761 (mips_cannot_store_register): Likewise.
5762 (the_low_target): Update .arch_setup, .num_regs and .regmap
5763 initializers. Add .regset_bitmap initializer.
5764 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5765 initializer.
5766 * linux-bfin-low.c (the_low_target): Likewise.
5767 * linux-cris-low.c (the_low_target): Likewise.
5768 * linux-crisv32-low.c (the_low_target): Likewise.
5769 * linux-ia64-low.c (the_low_target): Likewise.
5770 * linux-m32r-low.c (the_low_target): Likewise.
5771 * linux-m68k-low.c (the_low_target): Likewise.
5772 * linux-ppc-low.c (the_low_target): Likewise.
5773 * linux-s390-low.c (the_low_target): Likewise.
5774 * linux-sh-low.c (the_low_target): Likewise.
5775 * linux-sparc-low.c (the_low_target): Likewise.
5776 * linux-tic6x-low.c (the_low_target): Likewise.
5777 * linux-x86-low.c (the_low_target): Likewise.
5778 * linux-xtensa-low.c (the_low_target): Likewise.
5779 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5780 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5781 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5782 srv_xmlfiles.
5783 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5784 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5785
5786 2012-02-29 Yao Qi <yao@codesourcery.com>
5787 Pedro Alves <palves@redhat.com>
5788
5789 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5790 `step_over_finished' is true.
5791
5792 2012-02-27 Pedro Alves <palves@redhat.com>
5793
5794 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5795 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5796
5797 2012-02-27 Pedro Alves <palves@redhat.com>
5798
5799 PR server/9684
5800 * linux-low.c (pid_is_stopped): New.
5801 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5802
5803 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5804
5805 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5806 of conditions.
5807
5808 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5809
5810 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5811
5812 2012-02-24 Luis Machado <lgustavo@codesourcery>
5813
5814 * server.c (handle_query): Advertise support for target-side
5815 breakpoint condition evaluation.
5816 (process_point_options): New function.
5817 (process_serial_event): When inserting a breakpoint, check for
5818 a target-side condition that should be evaluated.
5819
5820 * mem-break.c: Include regcache.h and ax.h.
5821 (point_cond_list_t): New data structure.
5822 (breakpoint) <cond_list>: New field.
5823 (find_gdb_breakpoint_at): Make non-static.
5824 (delete_gdb_breakpoint_at): Clear any target-side
5825 conditions.
5826 (clear_gdb_breakpoint_conditions): New function.
5827 (add_condition_to_breakpoint): Likewise.
5828 (add_breakpoint_condition): Likewise.
5829 (gdb_condition_true_at_breakpoint): Likewise.
5830 (gdb_breakpoint_here): Return result directly instead
5831 of going through a local variable.
5832
5833 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5834 (clear_gdb_breakpoint_conditions): Likewise.
5835 (add_breakpoint_condition): Likewise.
5836 (gdb_condition_true_at_breakpoint): Likewise.
5837
5838 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5839 (need_step_over_p): Take target-side breakpoint condition into
5840 consideration.
5841
5842 2012-02-24 Luis Machado <lgustavo@codesourcery>
5843
5844 * server.h: Include tracepoint.h.
5845 (agent_mem_read, agent_get_trace_state_variable_value,
5846 agent_set_trace_state_variable_value,
5847 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5848 get_set_tsv_func_addr): New prototypes.
5849
5850 * ax.h: New include file.
5851 * ax.c: New source file.
5852
5853 * tracepoint.c: Include ax.h.
5854 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5855 agent_expr, eval_result_type): Move to ax.h.
5856 (parse_agent_expr): Rename to ...
5857 (gdb_parse_agent_expr): ... this, make it non-static and move
5858 to ax.h.
5859 (unparse_agent_expr) Rename to ...
5860 (gdb_unparse_agent_expr): ... this, make it non-static and move
5861 to ax.h.
5862 (eval_agent_expr): Rename to ...
5863 (eval_tracepoint_agent_expr): ... this.
5864 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5865 forward declarations.
5866 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5867 (agent_get_trace_state_variable_value): New function.
5868 (agent_set_trace_state_variable_value): New function.
5869 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5870 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5871 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5872 (condition_true_at_tracepoint): Likewise.
5873 (parse_agent_expr): Rename to ...
5874 (gdb_parse_agent_expr): ... this and move to ax.c.
5875 (unparse_agent_expr): Rename to ...
5876 (gdb_unparse_agent_expr): ... this and move to ax.c.
5877 (gdb_agent_op_name): Move to ax.c.
5878 (eval_agent_expr): Rename to ...
5879 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5880 and move to ax.c.
5881 (eval_tracepoint_agent_expr): New function.
5882 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5883 non-static.
5884 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5885 ax.c.
5886 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5887 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5888 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5889 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5890 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5891 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5892 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5893 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5894 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5895 (compile_bytecodes): Remove forward declaration.
5896 (is_goto_target): Move to ax.c.
5897 (compile_bytecodes): Move to ax.c and call
5898 agent_get_trace_state_variable_value (...) and
5899 agent_set_trace_state_variable_value (...).
5900
5901 * Makefile.in: Update ax.c and IPA dependencies.
5902
5903 2012-02-24 Pedro Alves <palves@redhat.com>
5904
5905 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5906 (cmd_bigqtbuffer_circular): ... this. Only handle
5907 'QTBuffer:circular:'.
5908 (handle_tracepoint_general_set): Adjust.
5909
5910 2012-02-16 Yao Qi <yao@codesourcery.com>
5911
5912 * inferiors.c: Move code to ...
5913 * dll.c: .... here. New.
5914 * server.h: Declare clear_dlls.
5915 * Makefile.in (SFILES): Add dll.c.
5916 (OBS): Add dll.o
5917 (dll.o): New rule.
5918
5919 2012-02-11 Yao Qi <yao@codesourcery.com>
5920
5921 * server.c: (handle_monitor_command): Add a new parameter
5922 `own_buf'.
5923 (handle_query): Update caller.
5924
5925 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5926
5927 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5928 * configure, config.in: Regenerate.
5929 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5930 is not defined.
5931
5932 2012-02-02 Pedro Alves <palves@redhat.com>
5933
5934 Try SIGKILL first, then PTRACE_KILL.
5935 * linux-low.c (linux_kill_one_lwp): New.
5936 (linux_kill_one_lwp): Rename to ...
5937 (kill_one_lwp_callback): ... this. Use the new
5938 linux_kill_one_lwp.
5939
5940 2012-02-02 Pedro Alves <palves@redhat.com>
5941
5942 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5943 inferior.
5944
5945 2012-01-27 Pedro Alves <palves@redhat.com>
5946
5947 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5948 (elf_64_file_p): Make static.
5949 (linux_pid_exe_is_elf_64_file): New.
5950 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5951 Delete declarations.
5952 (linux_pid_exe_is_elf_64_file): Declare.
5953 * linux-x86-low.c (x86_arch_setup): Use
5954 linux_pid_exe_is_elf_64_file.
5955
5956 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5957
5958 * linux-low.c (linux_wait_for_event_1): Rename to ...
5959 (linux_wait_for_event): ... here and merge it with former
5960 linux_wait_for_event - new variable wait_ptid, use it.
5961 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5962
5963 2012-01-23 Pedro Alves <palves@redhat.com>
5964
5965 * server.c (main): Avoid yet another case of infinite loop while
5966 detaching/killing after a longjmp.
5967
5968 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5969
5970 Code cleanup.
5971 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5972
5973 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5974
5975 * hostio.c (handle_readlink): New function.
5976 (handle_vFile): Call it to handle "vFile:readlink" packets.
5977
5978 2012-01-20 Pedro Alves <palves@redhat.com>
5979 Ulrich Weigand <ulrich.weigand@linaro.org>
5980
5981 * server.c (handle_v_requests): Only support vAttach and vRun to
5982 start multiple processes when in extended protocol mode.
5983
5984 2012-01-17 Pedro Alves <palves@redhat.com>
5985
5986 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5987 memalign plus mprotect to allocate the scratch buffer.
5988
5989 2012-01-13 Pedro Alves <palves@redhat.com>
5990
5991 * server.c (attach_inferior): Clear `cont_thread'.
5992
5993 2012-01-13 Pedro Alves <palves@redhat.com>
5994
5995 * server.c (main): Avoid infinite loop while detaching/killing
5996 after a longjmp.
5997
5998 2012-01-09 Doug Evans <dje@google.com>
5999
6000 * server.c (start_inferior): Set last_ptid in --wrapper case.
6001
6002 2012-01-06 Yao Qi <yao@codesourcery.com>
6003
6004 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6005 defined.
6006 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6007
6008 2012-01-04 Yao Qi <yao@codesourcery.com>
6009
6010 * tracepoint.c (cmd_qtdp): Print debug message
6011 for static tracepoint.
6012
6013 2012-01-04 Yao Qi <yao@codesourcery.com>
6014
6015 * tracepoint.c (trace_vdebug): Differentiate debug message
6016 between gdbserver and IPA.
6017
6018 2012-01-03 Yao Qi <yao@codesourcery.com>
6019
6020 * tracepoint.c (tracepoint_was_hit): Don't collect for
6021 static tracepoint.
6022
6023 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6024
6025 * terminal.h: Reformat copyright header.
6026
6027 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6028
6029 * server.c (gdbserver_version): Update copyright year.
6030 * gdbreplay.c (gdbreplay_version): Likewise.
6031
6032 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6033
6034 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6035
6036 Revert:
6037 2011-12-18 Hui Zhu <teawater@gmail.com>
6038 * linux-low.c (linux_create_inferior): Save return value to ret.
6039
6040 2011-12-18 Hui Zhu <teawater@gmail.com>
6041
6042 * linux-low.c (linux_create_inferior): Save return value to ret.
6043
6044 2011-12-16 Doug Evans <dje@google.com>
6045
6046 * linux-low.c (linux_create_inferior): If stdio connection,
6047 redirect stdin from /dev/null, stdout to stderr.
6048 * remote-utils.c (remote_is_stdio): New static global.
6049 (remote_connection_is_stdio): New function.
6050 (remote_prepare): Handle stdio connection.
6051 (remote_open): Ditto.
6052 (remote_close): Don't close stdin for stdio connections.
6053 (read_prim,write_prim): New functions. Replace all calls to
6054 read/write to these.
6055 * server.c (main): Watch for "-" argument. Move call to
6056 remote_prepare before start_inferior.
6057 * server.h (STDIO_CONNECTION_NAME): New macro.
6058 (remote_connection_is_stdio): Declare.
6059
6060 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6061 in debugging output.
6062
6063 2011-12-15 Yao Qi <yao@codesourcery.com>
6064
6065 * tracepoint.c: Include sys/syscall.h.
6066 (gdb_ust_thread): Remove preprocessor conditional.
6067
6068 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6069
6070 * linux-low.c (linux_detach_one_lwp): Call
6071 the_low_target.prepare_to_resume before detaching.
6072
6073 2011-12-14 Yao Qi <yao@codesourcery.com>
6074
6075 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6076 of write.
6077
6078 2011-12-14 Yao Qi <yao@codesourcery.com>
6079
6080 * i386-low.c (i386_low_stopped_data_address): Initialize local
6081 variable `control'.
6082
6083 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6084
6085 PR remote/13492
6086
6087 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6088 DR_CONTROL unless necessary. Extend comments.
6089 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6090 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6091
6092 2011-12-13 Yao Qi <yao@codesourcery.com>
6093
6094 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6095 macros.
6096 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6097
6098 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6099
6100 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6101 Print new debug message for such case.
6102
6103 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6104
6105 Fix overlapping memcpy.
6106 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6107 the read_inferior_memory transfer.
6108 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6109 write_inferior_memory transfer.
6110 (set_fast_tracepoint_jump): New variable buf. Use it for the
6111 read_inferior_memory and write_inferior_memory transfers.
6112 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6113 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6114 Use it for the write_inferior_memory transfer.
6115 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6116 buffers.
6117
6118 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6119
6120 * linux-low.c (fetch_register, store_register): Make code
6121 consistent, fix formatting.
6122
6123 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6124
6125 * linux-low.c (usr_store_inferior_registers): Factor out code
6126 to handle individual registers into...
6127 (store_register): ... this new function.
6128
6129 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6130
6131 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6132 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6133 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6134 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6135 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6136 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6137 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6138 (srv_xmlfiles): Add new XML files.
6139
6140 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6141 and <sys/uio.h>.
6142 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6143 (init_registers_s390_linux32v1): Add prototype.
6144 (init_registers_s390_linux32v2): Likewise.
6145 (init_registers_s390_linux64v1): Likewise.
6146 (init_registers_s390_linux64v2): Likewise.
6147 (init_registers_s390x_linux64v1): Likewise.
6148 (init_registers_s390x_linux64v2): Likewise.
6149 (s390_num_regs): Increment to 52.
6150 (s390_regmap): Add orig_r2 register.
6151 (s390_num_regs_3264): Increment to 68.
6152 (s390_regmap_3264): Add orig_r2 register.
6153 (s390_collect_ptrace_register): Handle orig_r2 register.
6154 (s390_supply_ptrace_register): Likewise.
6155 (s390_fill_last_break): New function.
6156 (s390_store_last_break): Likewise.
6157 (s390_fill_system_call): New function.
6158 (s390_store_system_call): Likewise.
6159 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6160 register sets.
6161 (s390_check_regset): New function.
6162 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6163 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6164 Update target_regsets for available register sets.
6165
6166 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6167 Jan Kratochvil <jan.kratochvil@redhat.com>
6168
6169 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6170 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6171 New.
6172 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6173 * linux-low.h (struct process_info_private): New member r_debug.
6174 * server.c (handle_qxfer_libraries): Call
6175 the_target->qxfer_libraries_svr4.
6176 (handle_qxfer_libraries_svr4): New function.
6177 (qxfer_packets): New entry "libraries-svr4".
6178 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6179 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6180 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6181 PACKET_qXfer_libraries_svr4.
6182
6183 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6184
6185 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6186 PSW address/mask between 8-byte and 16-byte formats.
6187 (s390_supply_ptrace_register): Likewise.
6188 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6189 basic addressing mode bit.
6190
6191 2011-11-24 Stan Shebs <stan@codesourcery.com>
6192
6193 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6194
6195 2011-11-17 Stan Shebs <stan@codesourcery.com>
6196
6197 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6198 (tracing_start_time): New global.
6199 (tracing_stop_time): New global.
6200 (tracing_user_name): New global.
6201 (tracing_notes): New global.
6202 (tracing_stop_note): New global.
6203 (cmd_qtstart): Set traceframe_usage, start_time.
6204 (stop_tracing): Set stop_time.
6205 (cmd_qtstatus): Report additional status.
6206 (cmd_qtp): New function.
6207 (handle_tracepoint_query): Call it.
6208 (cmd_qtnotes): New function.
6209 (handle_tracepoint_general_set): Call it.
6210 (get_timestamp): Rename from tsv_get_timestamp.
6211
6212 2011-11-14 Stan Shebs <stan@codesourcery.com>
6213 Kwok Cheung Yeung <kcy@codesourcery.com>
6214
6215 * linux-x86-low.c (small_jump_insn): New.
6216 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6217 trampoline and error message, build a trampoline and issue a small
6218 jump instruction to it.
6219 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6220 trampoline and error message.
6221 (x86_get_min_fast_tracepoint_insn_len): New.
6222 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6223 * linux-low.h (struct linux_target_ops): Add arguments to
6224 install_fast_tracepoint_jump_pad operation, add new operation.
6225 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6226 arguments.
6227 (linux_get_min_fast_tracepoint_insn_len): New function.
6228 (linux_target_op): Add new operation.
6229 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6230 (gdb_trampoline_buffer_end): Ditto.
6231 (gdb_trampoline_buffer_error): Ditto.
6232 (struct ipa_sym_addresses): Add fields for new IPA variables.
6233 (symbol_list): Add entries for new IPA variables.
6234 (struct tracepoint): Add fields to hold the address range of the
6235 trampoline used by the tracepoint.
6236 (trampoline_buffer_head): New static variable.
6237 (trampoline_buffer_tail): Ditto.
6238 (claim_trampoline_space): New function.
6239 (have_fast_tracepoint_trampoline_buffer): New function.
6240 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6241 structure.
6242 (install_fast_tracepoint): Ditto, also add error buffer argument.
6243 (cmd_qtminftpilen): New function.
6244 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6245 (fast_tracepoint_from_trampoline_address): New function.
6246 (fast_tracepoint_collecting): Handle trampoline as part of jump
6247 pad space.
6248 (set_trampoline_buffer_space): New function.
6249 (initialize_tracepoint): Initialize new IPA variables.
6250 * target.h (struct target_ops): Add arguments to
6251 install_fast_tracepoint_jump_pad operation, add new
6252 get_min_fast_tracepoint_insn_len operation.
6253 (target_get_min_fast_tracepoint_insn_len): New.
6254 (install_fast_tracepoint_jump_pad): Add arguments.
6255 * server.h (IPA_BUFSIZ): Define.
6256 * linux-i386-ipa.c: Include extra header files.
6257 (initialize_fast_tracepoint_trampoline_buffer): New function.
6258 (initialize_low_tracepoint): Call it.
6259 * server.h (set_trampoline_buffer_space): Declare.
6260 (claim_trampoline_space): Ditto.
6261 (have_fast_tracepoint_trampoline_buffer): Ditto.
6262
6263 2011-11-14 Yao Qi <yao@codesourcery.com>
6264
6265 * server.c (handle_query): Handle InstallInTrace for qSupported.
6266 * tracepoint.c (add_tracepoint): Sort list.
6267 (install_tracepoint, download_tracepoint): New.
6268 (cmd_qtdp): Call them to install and download tracepoints.
6269 (sort_tracepoints): Removed.
6270 (cmd_qtstart): Update.
6271
6272 2011-11-14 Yao Qi <yao@codesourcery.com>
6273
6274 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6275 * mem-break.h: Declare.
6276 * tracepoint.c (cmd_qtstart): Move some code to ...
6277 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6278 New.
6279 (download_tracepoints): Move some code to ...
6280 (download_tracepoint_1): ... here. New.
6281
6282 2011-11-08 Yao Qi <yao@codesourcery.com>
6283
6284 * remote-utils.c (relocate_instruction): A comment fix.
6285
6286 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6287
6288 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6289 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6290 dr_status_mirror and dr_control_mirror from debug_reg_state.
6291 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6292 (i386_initial_stuff): Remove use of deleted globals.
6293 (i386_get_thread_context, i386_set_thread_context,
6294 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6295 from debug_reg_state.
6296
6297 2011-11-05 Yao Qi <yao@codesourcery.com>
6298
6299 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6300 address as TPOINT's.
6301
6302 2011-11-02 Stan Shebs <stan@codesourcery.com>
6303
6304 * tracepoint.c (agent_mem_read_string): New function.
6305 (eval_agent_expr): Call it for tracenz.
6306 * server.c (handle_query): Report support for tracenz.
6307
6308 2011-11-02 Yao Qi <yao@codesourcery.com>
6309
6310 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6311
6312 2011-11-02 Yao Qi <yao@codesourcery.com>
6313
6314 * target.h: Fix a typo in comment.
6315
6316 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6317
6318 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6319 clobber the breakpoints' shadows with fast tracepoint jumps.
6320 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6321 * target.c (write_inferior_memory): Also pass MYADDR down to
6322 check_mem_write.
6323
6324 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6325
6326 * configure.ac: Check support for personality routine.
6327 * configure: Regenerate.
6328 * config.in: Likewise.
6329 * linux-low.c: Include <sys/personality.h>.
6330 Define ADDR_NO_RANDOMIZE if necessary.
6331 (linux_create_inferior): Disable address space randomization when
6332 forking inferior, if requested.
6333 (linux_supports_disable_randomization): New function.
6334 (linux_target_ops): Install it.
6335 * server.h (disable_randomization): Declare.
6336 * server.c (disable_randomization): New global variable.
6337 (handle_general_set): Handle QDisableRandomization.
6338 (handle_query): Likewise for qSupported.
6339 (main): Support --disable-randomization and --no-disable-randomization
6340 command line arguments.
6341 * target.h (struct target_ops): Add supports_disable_randomization.
6342 (target_supports_disable_randomization): New macro.
6343
6344 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6345
6346 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6347 ifdef check.
6348 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6349 [!PT_GETDSBT] (target_loadmap): New definition.
6350 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6351 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6352 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6353 and PT_GETDSBT to LINUX_LOADMAP.
6354 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6355 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6356
6357 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6358
6359 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6360 (arm_linux_hwbp_cap): New static variable.
6361 (arm_linux_get_hwbp_cap): Replace by ...
6362 (arm_linux_init_hwbp_cap): ... this new function.
6363 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6364 (arm_linux_get_hw_watchpoint_count): Likewise.
6365 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6366 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6367 (arm_prepare_to_resume): Use perror_with_name instead of error.
6368
6369 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6370
6371 * linux-arm-low.c: Include <signal.h>.
6372 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6373 (struct arm_linux_hwbp_cap): New data type.
6374 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6375 (struct arm_linux_hw_breakpoint): New data type.
6376 (MAX_BPTS, MAX_WPTS): Define.
6377 (struct arch_process_info, struct arch_lwp_info): New data types.
6378 (arm_linux_get_hwbp_cap): New function.
6379 (arm_linux_get_hw_breakpoint_count): Likewise.
6380 (arm_linux_get_hw_watchpoint_count): Likewise.
6381 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6382 (arm_hwbp_control_initialize): Likewise.
6383 (arm_hwbp_control_is_enabled): Likewise.
6384 (arm_hwbp_control_is_initialized): Likewise.
6385 (arm_hwbp_control_disable): Likewise.
6386 (arm_linux_hw_breakpoint_equal): Likewise.
6387 (arm_linux_hw_point_initialize): Likewise.
6388 (struct update_registers_data): New data structure.
6389 (update_registers_callback: New function.
6390 (arm_insert_point): Likewise.
6391 (arm_remove_point): Likewise.
6392 (arm_stopped_by_watchpoint): Likewise.
6393 (arm_stopped_data_address): Likewise.
6394 (arm_new_process): Likewise.
6395 (arm_new_thread): Likewise.
6396 (arm_prepare_to_resume): Likewise.
6397 (the_low_target): Register arm_insert_point, arm_remove_point,
6398 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6399 arm_new_thread, and arm_prepare_to_resume.
6400
6401 2011-09-15 Stan Shebs <stan@codesourcery.com>
6402
6403 * server.h (struct emit_ops): Add compare-goto fields.
6404 * tracepoint.c (gdb_agent_op_sizes): New table.
6405 (emit_eq_goto): New function.
6406 (emit_ne_goto): New function.
6407 (emit_lt_goto): New function.
6408 (emit_le_goto): New function.
6409 (emit_gt_goto): New function.
6410 (emit_ge_goto): New function.
6411 (is_goto_target): New function.
6412 (compile_bytecodes): Recognize special cases of compare-goto
6413 combinations and call specialized emitters for them.
6414 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6415 (amd64_emit_ne_goto): New function.
6416 (amd64_emit_lt_goto): New function.
6417 (amd64_emit_le_goto): New function.
6418 (amd64_emit_gt_goto): New function.
6419 (amd64_emit_ge_goto): New function.
6420 (amd64_emit_ops): Add the new functions.
6421 (i386_emit_eq_goto): New function.
6422 (i386_emit_ne_goto): New function.
6423 (i386_emit_lt_goto): New function.
6424 (i386_emit_le_goto): New function.
6425 (i386_emit_gt_goto): New function.
6426 (i386_emit_ge_goto): New function.
6427 (i386_emit_ops): Add the new functions.
6428
6429 2011-09-08 Stan Shebs <stan@codesourcery.com>
6430
6431 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6432 (i386_emit_epilogue): Restore %ebx.
6433
6434 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6435
6436 * server.c (step_thread): Remove definition.
6437 (process_serial_event): Don't handle Hs.
6438 * server.h (step_thread): Remove declaration.
6439 * target.c (set_desired_inferior): Remove use of step_thread.
6440
6441 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6442
6443 * linux-low.c: Include linux-procfs.h.
6444 (linux_attach_lwp_1): Update comments.
6445 (linux_attach): Scan for existing threads when attaching to a
6446 process that is the tgid.
6447 * Makefile.in: Update dependencies.
6448
6449 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6450
6451 * configure.srv: Add linux-procfs.o dependencies.
6452
6453 2011-08-14 Yao Qi <yao@codesourcery.com>
6454
6455 * target.h (struct target_ops): Fix indent.
6456 * win32-low.c (win32_target_ops): Fix comment.
6457
6458 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6459 Yao Qi <yao@codesourcery.com>
6460
6461 * Makefile.in (clean): Remove tic6x-*.c files.
6462 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6463 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6464 (tic6x-c64xp-linux.c): Likewise.
6465 * configure.srv: Add support for tic6x-*-uclinux.
6466 * linux-tic6x-low.c: New.
6467 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6468
6469 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6470 Yao Qi <yao@codesourcery.com>
6471
6472 * target.h (struct target_ops): Add read_loadmap.
6473 * linux-low.c (struct target_loadseg): New type.
6474 (struct target_loadmap): New type.
6475 (linux_read_loadmap): New function.
6476 (linux_target_ops): Add linux_read_loadmap.
6477 * server.c (handle_query): Support qXfer:fdpic:read packet.
6478 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6479 to NULL.
6480
6481 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6482
6483 * win32-low.c: Include <stdint.h>.
6484
6485 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6486
6487 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6488 to the inferior here.
6489 (i386_remove_aligned_watchpoint): Ditto.
6490 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6491 fit part of the watchpoint in the debug registers.
6492 (i386_update_inferior_debug_regs): New.
6493 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6494 registers, and only update the inferior on success.
6495 (i386_low_remove_watchpoint): Ditto.
6496
6497 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6498
6499 * linux-low.c (compare_ints, unique, list_threads, show_process,
6500 linux_core_of_thread): Delete.
6501 (linux_target_ops): Change linux_core_of_thread to
6502 linux_common_core_of_thread.
6503 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6504 * utils.c (malloc_failure): Change type of argument.
6505 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6506 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6507 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6508 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6509 (IPA_OBJS): Add common-utils-ipa.o.
6510 (ptid_h, linux_osdata_h): New macros.
6511 (server_h): Add common/common-utils.h, common/xml-utils.h,
6512 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6513 common/ptid.h.
6514 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6515 ptid.o, buffer.o): New rules.
6516 (linux-low.o): Add common/linux-osdata.h as a dependency.
6517 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6518 * configure.ac: Add AC_HEADER_DIRENT check.
6519 * config.in: Regenerate.
6520 * configure: Regenerate.
6521 * remote-utils.c (xml_escape_text): Delete.
6522 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6523 buffer_xml_printf): Move to common/buffer.c.
6524 * server.c (main): Remove call to initialize_inferiors.
6525 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6526 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6527 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6528 internal_error, gdb_assert, gdb_assert_fail): Delete.
6529 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6530 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6531 common/buffer.h.
6532 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6533 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6534 initialize_inferiors): Delete.
6535
6536 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6537
6538 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6539 symbol error.
6540
6541 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6542
6543 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6544 assertion.
6545 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6546
6547 2011-05-26 Yao Qi <yao@codesourcery.com>
6548
6549 * Makefile.in (thread-db.o): Track dependence to
6550 common/gdb_thread_db.h.
6551 * thread-db.c: include gdb_thread_db.h from right place.
6552
6553 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6554
6555 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6556 __FILE__ and __LINE__ to internal_error.
6557
6558 2011-05-13 Doug Evans <dje@google.com>
6559
6560 * thread-db.c (try_thread_db_load_from_sdir): New function.
6561 (try_thread_db_load_from_dir): New function.
6562 (thread_db_load_search): Handle $sdir, ignore $pdir.
6563 Remove trying of system directories if search of
6564 libthread-db-search-path fails, that is now done via $sdir.
6565
6566 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6567
6568 * server.c (handle_query): Add EnableDisableTracepoints to the list
6569 of supported features.
6570 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6571 tracepoints.
6572 (cmd_qtenable_disable): New.
6573 (cmd_qtstart): Install tracepoints even if disabled.
6574 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6575 receiving a QTEnable or QTDisable packet.
6576 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6577 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6578 tracepoints.
6579 (gdb_probe): Skip data collection if static tracepoint is disabled.
6580
6581 2011-05-10 Doug Evans <dje@google.com>
6582
6583 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6584
6585 2011-05-04 Doug Evans <dje@google.com>
6586
6587 * linux-low.c (linux_join): Skip process lookup.
6588 * spu-low.c (spu_join): Ditto.
6589 * server.c (join_inferiors_callback): Delete.
6590 (process_serial_event): For 'D' packet (detach) call join_inferior
6591 directly.
6592
6593 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6594
6595 * README: Don't mention xscale*-*-linux*.
6596 * configure.srv (xscale*-*-linux*): Don't handle target.
6597
6598 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6599
6600 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6601 casting pointers.
6602 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6603 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6604 (i386_emit_void_call_2): Likewise.
6605
6606 2011-04-26 Yao Qi <yao@codesourcery.com>
6607
6608 * linux-low.c: Move common macros to linux-ptrace.h.
6609 Include linux-ptrace.h.
6610 * Makefile.in (linux_ptrace_h): New.
6611 (linux-low.o): Depends on linux-ptrace.h.
6612
6613 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6614
6615 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6616 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6617 (remote_prepare): New function with most of the TCP code from ...
6618 (remote_open): ... here. Detect PORT here unconditionally. Move also
6619 setting transport_is_reliable.
6620 * server.c (run_once): New variable.
6621 (gdbserver_usage): Document it.
6622 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6623 the first run if RUN_ONCE.
6624 * server.h (run_once, remote_prepare): New declarations.
6625
6626 2011-04-19 Tom Tromey <tromey@redhat.com>
6627
6628 * win32-low.c (handle_load_dll): Remove duplicate "the".
6629
6630 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6631
6632 Remove support for old Cygwin 1.5 versions.
6633 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6634 function to avoid warning.
6635 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6636 warning.
6637
6638 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6639
6640 * gdbserver/server.h (Macro _): Define it if not available.
6641
6642 2011-03-14 Michael Snyder <msnyder@vmware.com>
6643
6644 * hostio.c (handle_close): Remove unnecessary null test.
6645
6646 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6647
6648 * Makefile.in (maintainer-clean realclean distclean): Remove
6649 "make ... subdir_do" command.
6650
6651 2011-03-10 Michael Snyder <msnyder@vmware.com>
6652
6653 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6654
6655 * server.c (handle_v_run): Free alloced buffer on early return.
6656
6657 2011-03-09 Yao Qi <yao@codesourcery.com>
6658
6659 Revert:
6660 2011-03-04 Yao Qi <yao@codesourcery.com>
6661
6662 * Makefile.in: Remove GNU make feature --directory.
6663
6664 2011-03-05 Yao Qi <yao@codesourcery.com>
6665
6666 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6667 (subdir_do): New make target. Copied from gdb/Makefile.
6668 (maintainer-clean, realclean, distclean, clean): Call corresponding
6669 make targets in common/Makefile.
6670
6671 2011-02-11 Yao Qi <yao@codesourcery.com>
6672
6673 * configure.ac: Call AC_PROG_RANLIB.
6674 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6675 * configure: Regenerate.
6676
6677 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6678
6679 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6680
6681 2011-03-06 Yao Qi <yao@codesourcery.com>
6682
6683 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6684
6685 2011-03-05 Yao Qi <yao@codesourcery.com>
6686
6687 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6688 (subdir_do): New make target. Copied from gdb/Makefile.
6689 (maintainer-clean, realclean, distclean, clean): Call corresponding
6690 make targets in common/Makefile.
6691
6692 2011-03-04 Yao Qi <yao@codesourcery.com>
6693
6694 * Makefile.in: Remove GNU make feature --directory.
6695
6696 2011-03-04 Michael Snyder <msnyder@vmware.com>
6697
6698 * server.c (queue_stop_reply): Call xmalloc not malloc.
6699
6700 2011-03-02 Michael Snyder <msnyder@vmware.com>
6701
6702 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6703
6704 2011-02-28 Michael Snyder <msnyder@vmware.com>
6705
6706 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6707 (cmd_qtframe): Ditto.
6708 (cmd_qtbuffer): Ditto.
6709 (cmd_bigqtbuffer): Ditto.
6710
6711 * utils.c (decimal2str): Initialize 'width' to nine, then
6712 don't mess with it.
6713
6714 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6715
6716 * hostio.c (require_data): Free *data, not data.
6717
6718 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6719
6720 * hostio.c (require_data): Use free, not xfree.
6721
6722 2011-02-27 Michael Snyder <msnyder@vmware.com>
6723
6724 * server.c (handle_query): Discard unused value.
6725
6726 * hostio.c (require_data): Free malloc memory before returning
6727 error.
6728
6729 2011-02-26 Michael Snyder <msnyder@vmware.com>
6730
6731 * linux-low.c (list_threads): Call closedir for dirent.
6732
6733 2011-02-27 Michael Snyder <msnyder@vmware.com>
6734
6735 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6736 a case statement falls through.
6737
6738 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6739
6740 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6741 in comparison.
6742
6743 2011-02-26 Michael Snyder <msnyder@vmware.com>
6744
6745 * utils.c (decimal2str): Eliminate dead code and dead param.
6746 (pulongest): Drop dead param from call to decimal2str.
6747 (plongest): Ditto.
6748
6749 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6750
6751 Revert the following patch (not approved yet):
6752 2011-02-21 Hui Zhu <teawater@gmail.com>
6753 * tracepoint.c (tp_printf): New function.
6754 (eval_agent_expr): Handle gdb_agent_op_printf.
6755
6756 2011-02-21 Hui Zhu <teawater@gmail.com>
6757
6758 * tracepoint.c (tp_printf): New function.
6759 (eval_agent_expr): Handle gdb_agent_op_printf.
6760
6761 2011-02-18 Tom Tromey <tromey@redhat.com>
6762
6763 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6764 (tracepoint.o): Likewise.
6765 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6766 (gdb_agent_op_names): Likewise.
6767
6768 2011-02-18 Tom Tromey <tromey@redhat.com>
6769
6770 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6771 gdb_agent_op_rot>: New constants.
6772 (gdb_agent_op_names): Add pick and roll.
6773 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6774 cases.
6775
6776 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6777
6778 * aclocal.m4: Regenerated with aclocal-1.11.1.
6779
6780 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6781
6782 * server.c (handle_qxfer_traceframe_info): New.
6783 (qxfer_packets): Register "traceframe-info".
6784 (handle_query): Report support for qXfer:traceframe-info:read+.
6785 * tracepoint.c (match_blocktype): New.
6786 (traceframe_find_block_type): Rename to ...
6787 (traceframe_walk_blocks): ... this. Add callback filter argument,
6788 and use it.
6789 (traceframe_find_block_type): New, reimplemented on top of
6790 traceframe_walk_blocks.
6791 (build_traceframe_info_xml): New.
6792 (traceframe_read_info): New.
6793 * server.h (traceframe_read_info): Declare.
6794
6795 2011-02-11 Yao Qi <yao@codesourcery.com>
6796
6797 * configure.ac: Call AC_PROG_RANLIB.
6798 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6799 * configure: Regenerate.
6800
6801 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6802
6803 * server.c (gdb_read_memory): Change return semantics to allow
6804 partial transfers.
6805 (handle_search_memory_1): Adjust.
6806 (process_serial_event) <'m' packet>: Handle partial transfers.
6807 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6808
6809 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6810
6811 * regcache.c (init_register_cache): Initialize
6812 regcache->register_status.
6813 (free_register_cache): Release regcache->register_status.
6814 (regcache_cpy): Copy register_status.
6815 (registers_to_string): Print 'x's for unavailable registers.
6816 (supply_register): Mark the register's status valid or
6817 unavailable, depending on whether a buffer was passed in or not.
6818 (supply_register_zeroed): New.
6819 (supply_regblock): Mark the registers' status valid or
6820 unavailable, depending on whether a buffer was passed in or not.
6821 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6822 (struct regcache): New `register_status' field.
6823 (supply_register_zeroed): Declare.
6824 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6825 supply_register_zeroed, rather than passing a NULL buffer to
6826 supply_register.
6827 * tracepoint.c (fetch_traceframe_registers): Update comment.
6828
6829 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6830
6831 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6832 buffer explicit.
6833
6834 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6835
6836 * server.h (decode_xfer_write): Change prototype.
6837 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6838 and don't extract the annex here.
6839 * server.c (decode_xfer_read): Remove `annex' parameter,
6840 and don't extract the annex here.
6841 (decode_xfer): New.
6842 (struct qxfer): New.
6843 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6844 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6845 (handle_qxfer_statictrace): New functions, abstracted out from
6846 handle_query, and made to use the struct qxfer interface.
6847 (handle_threads_qxfer_proper): Rename to ...
6848 (handle_qxfer_threads_proper): ... this.
6849 (handle_threads_qxfer): Rename to ...
6850 (handle_qxfer_threads): ... this. Adjust.
6851 (qxfer_packets): New array.
6852 (handle_qxfer): New function.
6853 (handle_query): Use handle_qxfer.
6854
6855 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6856
6857 * gdbreplay.c: Shorten lines of >= 80 columns.
6858 * linux-low.c: Ditto.
6859 * linux-ppc-low.c: Ditto.
6860 * linux-s390-low.c: Ditto.
6861 * linux-sparc-low.c: Ditto.
6862 * linux-x86-low.c: Ditto.
6863 * linux-xtensa-low.c: Ditto.
6864 * mem-break.c: Ditto.
6865 * nto-low.c: Ditto.
6866 * regcache.h: Ditto.
6867 * remote-utils.c: Ditto.
6868 * server.c: Ditto.
6869 * server.h: Ditto.
6870 * thread-db.c: Ditto.
6871 * tracepoint.c: Ditto.
6872 * utils.c: Ditto.
6873 * win32-low.h: Ditto.
6874
6875 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6876
6877 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6878 update.
6879
6880 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6881
6882 * server.c (gdbserver_version): Update copyright year in version
6883 output.
6884 * gdbreplay.c (gdbreplay_version): Ditto.
6885
6886 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6887
6888 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6889 * linux-bfin-low.c: New file.
6890 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6891 PT_DATA_ADDR for BFIN targets.
6892 * Makefile.in (SFILES): Add linux-bfin-low.c.
6893 (clean): Remove reg-bfin.c.
6894 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6895 * README: Mention supported Blackfin targets.
6896
6897 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6898
6899 * .gitignore: New file.
6900
6901 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6902
6903 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6904
6905 2010-10-22 Jie Zhang <jie@codesourcery.com>
6906
6907 * Makefile.in: Add FLAGS_TO_PASS variable.
6908 (install): Remove dependency of install-only and recursively
6909 invoke make for install-only.
6910
6911 2010-10-04 Doug Evans <dje@google.com>
6912
6913 * Makefile.in (uninstall): Use $(DESTDIR).
6914
6915 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6916
6917 PR gdb/11842
6918
6919 * linux-x86-low.c (compat_siginfo_from_siginfo)
6920 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6921 si_code is < 0. Check for si_code == SI_TIMER before checking for
6922 si_code < 0.
6923
6924 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6925
6926 * lynx-i386-low.c: New file.
6927 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6928
6929 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6930
6931 * lynx-low.c (ptrace_request_to_str): Remove handling for
6932 request values that have been removed in LynxOS 5.x.
6933
6934 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6935
6936 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6937 <ptrace.h>
6938
6939 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6940
6941 * configure.ac: Add --enable-inprocess-agent option.
6942 * configure: Rebuilt.
6943
6944 2010-09-06 Yao Qi <yao@codesourcery.com>
6945
6946 * linux-low.c (linux_kill): Remove unused variable.
6947 (linux_stabilize_threads): Likewise.
6948 * server.c (start_inferior): Likewise.
6949 (queue_stop_reply_callback): Likewise.
6950 * tracepoint.c (do_action_at_tracepoint): Likewise.
6951
6952 2010-09-06 Yao Qi <yao@codesourcery.com>
6953
6954 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6955 on return.
6956
6957 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6958
6959 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6960
6961 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6962
6963 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6964 "$(IPA_DEPFILES)".
6965
6966 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6967
6968 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6969 gdbserver/lynx-ppc-low.c: New files.
6970 * Makefile.in (lynx_low_h): New variable.
6971 (lynx-low.o, lynx-ppc-low.o): New rules.
6972 * configure.ac: On LynxOS, link with -lnetinet.
6973 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6974 * configure: regenerate.
6975
6976 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6977
6978 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6979 * configure.ac: Add check for vasprintf and vsnprintf.
6980 * configure, config.in: Regenerate.
6981 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6982
6983 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6984
6985 * gdbreplay.c: Move include of alloca.h up, next to include of
6986 malloc.h.
6987 * server.h: Add include of malloc.h.
6988 * mem-break.c: Remove include of malloc.h.
6989 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6990
6991 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6992
6993 * Makefile.in (memmem.o): Build with -Wno-error.
6994
6995 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6996
6997 * utils.c (xsnprintf): Make non-static.
6998 * server.h: Add xsnprintf declaration.
6999 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7000 replace calls to snprintf by calls to xsnprintf throughout.
7001
7002 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7003
7004 * configure.ac: Add configure check for alloca.
7005 * configure, config.in: Regenerate.
7006 * server.h: Include alloca.h if it exists.
7007 * gdbreplay.c: Include alloca.h if it exists.
7008
7009 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7010
7011 * linux-low.c (__SIGRTMIN): Define if not already defined.
7012 (linux_create_inferior): Check for __ANDROID__ rather than
7013 __SIGRTMIN.
7014 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7015 are already deferred.
7016 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7017 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7018 stopped and already has a pending signal to report.
7019 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7020 a pending signal to report or is moving out of a jump pad.
7021 (linux_init_signals): Check for __ANDROID__ rather than
7022 __SIGRTMIN.
7023
7024 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7025
7026 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7027 debug_threads check. Avoid a linear search when not doing debug
7028 output.
7029
7030 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7031
7032 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7033 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7034 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7035 (process_event): Change local fd's type to gdb_fildes_t.
7036 (create_file_handler): Adjust prototype.
7037 (delete_file_handler): Adjust prototype.
7038 (handle_file_event): Adjust prototype. Use pfildes.
7039 (create_file_event): Adjsut prototype.
7040 * remote-utils.c (remote_desc, listen_desc): Change type to
7041 gdb_fildes_t.
7042 * server.h: New gdb_fildes_t typedef.
7043 [USE_WIN32API]: Include winsock2.h.
7044 (delete_file_handler, add_file_handler): Adjust prototypes.
7045 (pfildes): Declare.
7046 * utils.c (pfildes): New.
7047
7048 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7049
7050 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7051 * configure: Regenerate.
7052
7053 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7054
7055 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7056 (linux_done_accessing_memory): ... this.
7057 (linux_target_ops): Adjust.
7058 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7059 * nto-low.c (nto_target_ops): Adjust comment.
7060 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7061 * spu-low.c (spu_target_ops): Adjust comment.
7062 * target.h (target_ops): Rename unprepare_to_access_memory field
7063 to done_accessing_memory.
7064 (unprepare_to_access_memory): Rename to ...
7065 (done_accessing_memory): ... this.
7066
7067 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7068
7069 * linux-low.c (linux_prepare_to_access_memory): New.
7070 (linux_unprepare_to_access_memory): New.
7071 (linux_target_ops): Install them.
7072 * server.c (read_memory): Rename to ...
7073 (gdb_read_memory): ... this. Use
7074 prepare_to_access_memory/prepare_to_access_memory.
7075 (write_memory): Rename to ...
7076 (gdb_write_memory): ... this. Use
7077 prepare_to_access_memory/prepare_to_access_memory.
7078 (handle_search_memory_1): Adjust.
7079 (process_serial_event): Adjust.
7080 * target.h (struct target_ops): New fields
7081 prepare_to_access_memory and unprepare_to_access_memory.
7082 (prepare_to_access_memory, unprepare_to_access_memory): New.
7083 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7084 prepare_to_access_memory/prepare_to_access_memory.
7085 * nto-low.c (nto_target_ops): Adjust.
7086 * spu-low.c (spu_target_ops): Adjust.
7087 * win32-low.c (win32_target_ops): Adjust.
7088
7089 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7090
7091 * Makefile.in (WARN_CFLAGS): Get it from configure.
7092 (WERROR_CFLAGS): New.
7093 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7094 * configure.ac: Introduce --enable-werror, which adds -Werror to
7095 the compiler command line. Enabled by default. Disable with
7096 --disable-werror. Add -Wdeclaration-after-statement
7097 Wpointer-arith and -Wformat-nonliteral to warning flags.
7098 * configure: Regenerate.
7099
7100 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7101
7102 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7103
7104 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7105
7106 * gdbreplay.c (remote_error): New.
7107 (gdbchar): New.
7108 (expect): Use gdbchar. Check for error reading from GDB.
7109 Clarify sync error output.
7110 (play): Check for errors writing to GDB.
7111 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7112 * remote-utils.c (getpkt): Check for errors writing to the remote
7113 descriptor.
7114
7115 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7116
7117 * linux-low.c (linux_wait_1): Move non-debugging code out of
7118 `debug_threads' control.
7119
7120 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7121
7122 * linux-low.c (linux_wait_1): Don't set last_status here.
7123 * server.c (push_event, queue_stop_reply_callback): Assert we're
7124 not pushing a TARGET_WAITKIND_IGNORE event.
7125 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7126 (myresume, handle_target_event): Set the thread's last_resume_kind
7127 and last_status from the target returned status.
7128
7129 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7130
7131 PR threads/10729
7132
7133 * linux-x86-low.c (update_debug_registers_callback): New.
7134 (i386_dr_low_set_addr): Use it.
7135 (i386_dr_low_get_addr): New.
7136 (i386_dr_low_set_control): Use update_debug_registers_callback.
7137 (i386_dr_low_get_control): New.
7138 (i386_dr_low_get_status): Adjust.
7139 * linux-low.c (linux_stop_lwp): New.
7140 * linux-low.h (linux_stop_lwp): Declare.
7141
7142 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7143 argument instead of a i386_debug_reg_state.
7144 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7145 a i386_debug_reg_state.
7146 (i386_insert_aligned_watchpoint): Adjust.
7147 (i386_remove_aligned_watchpoint): Adjust.
7148 (i386_low_stopped_data_address): Read the debug registers from the
7149 inferior instead of from the mirrors.
7150 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7151 (i386_dr_low_get_addr): Declare.
7152 (i386_dr_low_get_control): Declare.
7153 (i386_dr_low_get_status): Change prototype.
7154
7155 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7156 (i386_dr_low_get_addr): New.
7157 (i386_dr_low_get_control): New.
7158 (i386_dr_low_get_status): Adjust prototype. Return
7159 dr_status_mirror.
7160 (i386_initial_stuff): Clear dr_status_mirror and
7161 dr_control_mirror.
7162 (i386_get_thread_context): Adjust.
7163 (i386_set_thread_context): Adjust.
7164 (i386_thread_added): Adjust.
7165
7166 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7167
7168 * linux-low.h (linux_thread_area): Delete declaration.
7169
7170 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7171
7172 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7173 after its termination.
7174
7175 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7176
7177 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7178 (gdb_wants_all_stopped): Delete.
7179 (linux_wait_1): Don't call them.
7180 * server.c (handle_v_cont): Tag all threads as want-stopped.
7181 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7182 stopped as "client-wants-stopped".
7183
7184 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7185
7186 * Makefile.in (signals_h): New.
7187 (server_h): Depend on it.
7188 (server.o): Don't depend on $(signals_def).
7189 (signals.o): Depend on $(signals_def).
7190
7191 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7192
7193 * Makefile.in (signals_def): New.
7194 (server_h): Append include/gdb/signals.h and signals_def.
7195 (server.o): Append signals_def.
7196
7197 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7198
7199 * server.c (handle_target_event): Use target_signal_to_host for
7200 resume_info.sig initialization.
7201 * target.h (struct thread_resume) <sig>: New comment.
7202
7203 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7204
7205 * server.c (handle_query): strcpy() the returned string from paddress()
7206 instead of sprintf().
7207 * utils.c (paddress): Return phex_nz().
7208
7209 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7210
7211 * server.c (handle_v_cont): Call mourn_inferior if process
7212 just exited.
7213 (myresume): Likewise.
7214
7215 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7216
7217 Static tracepoints, and integration with UST.
7218
7219 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7220 * mem-break.c (uninsert_all_breakpoints)
7221 (reinsert_all_breakpoints): New.
7222 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7223 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7224 (gdb_agent_ust_loaded, helper_thread_id)
7225 (gdb_agent_helper_thread_id): New macros.
7226 (struct ipa_sym_addresses): Add addr_ust_loaded,
7227 addr_helper_thread_id, addr_cmd_buf.
7228 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7229 (in_process_agent_loaded_ust): New.
7230 (write_e_ust_not_loaded): New.
7231 (maybe_write_ipa_ust_not_loaded): New.
7232 (struct collect_static_trace_data_action): New.
7233 (enum tracepoint_type) <static_tracepoint>: New.
7234 (struct tracepoint) <handle>: Mention static tracepoints.
7235 (struct static_tracepoint_ctx): New.
7236 (CMD_BUF_SIZE): New.
7237 (add_tracepoint_action): Handle static tracepoint actions.
7238 (unprobe_marker_at): New.
7239 (clear_installed_tracepoints): Handle static tracepoints.
7240 (cmd_qtdp): Handle static tracepoints.
7241 (probe_marker_at): New.
7242 (cmd_qtstart): Handle static tracepoints.
7243 (response_tracepoint): Handle static tracepoints.
7244 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7245 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7246 (get_context_regcache): Handle static tracepoints.
7247 (do_action_at_tracepoint): Handle static tracepoint actions.
7248 (traceframe_find_block_type): Handle static trace data blocks.
7249 (traceframe_read_sdata): New.
7250 (download_tracepoints): Download static tracepoint actions.
7251 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7252 (GDB_PROBE_NAME): New.
7253 (ust_ops): New.
7254 (GET_UST_SYM): New.
7255 (USTF): New.
7256 (dlsym_ust): New.
7257 (ust_marker_to_static_tracepoint): New.
7258 (gdb_probe): New.
7259 (collect_ust_data_at_tracepoint): New.
7260 (gdb_ust_probe): New.
7261 (UNIX_PATH_MAX, SOCK_DIR): New.
7262 (gdb_ust_connect_sync_socket): New.
7263 (resume_thread, stop_thread): New.
7264 (run_inferior_command): New.
7265 (init_named_socket): New.
7266 (gdb_ust_socket_init): New.
7267 (cstr_to_hexstr): New.
7268 (next_st): New.
7269 (first_marker, next_marker): New.
7270 (response_ust_marker): New.
7271 (cmd_qtfstm, cmd_qtsstm): New.
7272 (unprobe_marker_at, probe_marker_at): New.
7273 (cmd_qtstmat, gdb_ust_thread): New.
7274 (gdb_ust_init): New.
7275 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7276 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7277 (ST_REGENTRY): New.
7278 (x86_64_st_collect_regmap): New.
7279 (X86_64_NUM_ST_COLLECT_GREGS): New.
7280 (AMD64_RIP_REGNUM): New.
7281 (supply_static_tracepoint_registers): New.
7282 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7283 (ST_REGENTRY): New.
7284 (i386_st_collect_regmap): New.
7285 (i386_NUM_ST_COLLECT_GREGS): New.
7286 (supply_static_tracepoint_registers): New.
7287 * server.c (handle_query): Handle qXfer:statictrace:read.
7288 <qSupported>: Report support for StaticTracepoints, and
7289 qXfer:statictrace:read features.
7290 * server.h (traceframe_read_sdata)
7291 (supply_static_tracepoint_registers): Declare.
7292 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7293 (unpack_varlen_hex): Include in IPA build.
7294 * Makefile.in (ustlibs, ustinc): New.
7295 (IPA_OBJS): Add remote-utils-ipa.o.
7296 ($(IPA_LIB)): Link -ldl and -lpthread.
7297 (UST_CFLAGS): New.
7298 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7299 * config.in, configure: Regenerate.
7300
7301 2010-06-20 Ian Lance Taylor <iant@google.com>
7302 Pedro Alves <pedro@codesourcery.com>
7303
7304 * linux-x86-low.c (always_true): Delete.
7305 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7306 trying to fool the compiler with always_true.
7307
7308 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7309
7310 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7311 conditions in gdbserver.
7312
7313 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7314
7315 * spu-low.c (spu_read_memory): Wrap around local store limit.
7316 (spu_write_memory): Likewise.
7317
7318 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7319
7320 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7321 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7322 LONGEST uses.
7323 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7324 uses.
7325 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7326 uses with LONGEST uses.
7327
7328 2010-06-14 Stan Shebs <stan@codesourcery.com>
7329 Pedro Alves <pedro@codesourcery.com>
7330
7331 Bytecode compiler.
7332
7333 * linux-x86-low.c: Include limits.h.
7334 (add_insns): New.
7335 (always_true): New.
7336 (EMIT_ASM): New.
7337 (EMIT_ASM32): New.
7338 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7339 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7340 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7341 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7342 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7343 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7344 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7345 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7346 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7347 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7348 (amd64_emit_void_call_2): New.
7349 (amd64_emit_ops): New.
7350 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7351 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7352 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7353 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7354 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7355 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7356 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7357 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7358 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7359 (i386_emit_stack_adjust, i386_emit_int_call_1)
7360 (i386_emit_void_call_2): New.
7361 (i386_emit_ops): New.
7362 (x86_emit_ops): New.
7363 (the_low_target): Install x86_emit_ops.
7364 * server.h (struct emit_ops): New.
7365 (get_raw_reg_func_addr): Declare.
7366 (current_insn_ptr, emit_error): Declare.
7367 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7368 (set_trace_state_variable_value): New defines.
7369 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7370 addr_get_trace_state_variable_value and
7371 addr_set_trace_state_variable_value.
7372 (symbol_list): New fields for get_raw_reg,
7373 get_trace_state_variable_value and set_trace_state_variable_value.
7374 (condfn): New typedef.
7375 (struct tracepoint): New field `compiled_cond'.
7376 (do_action_at_tracepoint): Clear compiled_cond.
7377 (get_trace_state_variable_value, set_trace_state_variable_value):
7378 Export in the IPA.
7379 (condition_true_at_tracepoint): If there's a compiled condition,
7380 run that.
7381 (current_insn_ptr, emit_error): New globals.
7382 (struct bytecode_address): New.
7383 (get_raw_reg_func_addr): New.
7384 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7385 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7386 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7387 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7388 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7389 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7390 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7391 (compile_tracepoint_condition, compile_bytecodes): New.
7392 * target.h (emit_ops): Forward declare.
7393 (struct target_ops): New field emit_ops.
7394 (target_emit_ops): New.
7395 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7396 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7397 * linux-low.c (linux_emit_ops): New.
7398 (linux_target_ops): Install it.
7399 * linux-low.h (struct linux_target_ops): New field emit_ops.
7400
7401 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7402
7403 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7404 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7405
7406 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7407 Stan Shebs <stan@codesourcery.com>
7408
7409 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7410 (all): Depend on $(extra_libraries).
7411 (install-only): Install the IPA.
7412 (IPA_OBJS, IPA_LIB): New.
7413 (clean): Remove the IPA lib.
7414 (IPAGENT_CFLAGS): New.
7415 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7416 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7417 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7418 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7419 * configure.ac: Check for atomic builtins support in the compiler.
7420 (IPA_DEPFILES, extra_libraries): Define.
7421 * configure.srv (ipa_obj): Add description.
7422 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7423 (i[34567]86-*-linux*): Set ipa_obj.
7424 (x86_64-*-linux*): Set ipa_obj.
7425 * linux-low.c (stabilizing_threads): New.
7426 (supports_fast_tracepoints): New.
7427 (linux_detach): Stabilize threads before detaching.
7428 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7429 the lwp is either not stabilizing, or is moving out of a jump pad.
7430 (linux_fast_tracepoint_collecting): New.
7431 (maybe_move_out_of_jump_pad): New.
7432 (enqueue_one_deferred_signal): New.
7433 (dequeue_one_deferred_signal): New.
7434 (linux_wait_for_event_1): If moving out of a jump pad, defer
7435 pending signals to later.
7436 (linux_stabilize_threads): New.
7437 (linux_wait_1): Check if threads need moving out of jump pads, and
7438 do it if so.
7439 (stuck_in_jump_pad_callback): New.
7440 (move_out_of_jump_pad_callback): New.
7441 (lwp_running): New.
7442 (linux_resume_one_lwp): Handle moving out of jump pads.
7443 (linux_set_resume_request): Dequeue deferred signals.
7444 (need_step_over_p): Also step over fast tracepoint jumps.
7445 (start_step_over): Also uninsert fast tracepoint jumps.
7446 (finish_step_over): Also reinsert fast tracepoint jumps.
7447 (linux_install_fast_tracepoint_jump): New.
7448 (linux_target_ops): Install linux_stabilize_threads and
7449 linux_install_fast_tracepoint_jump_pad.
7450 * linux-low.h (linux_target_ops) <get_thread_area,
7451 install_fast_tracepoint_jump_pad>: New fields.
7452 (struct lwp_info) <collecting_fast_tracepoint,
7453 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7454 (linux_get_thread_area): Declare.
7455 * linux-x86-low.c (jump_insn): New.
7456 (x86_get_thread_area): New.
7457 (append_insns): New.
7458 (push_opcode): New.
7459 (amd64_install_fast_tracepoint_jump_pad): New.
7460 (i386_install_fast_tracepoint_jump_pad): New.
7461 (x86_install_fast_tracepoint_jump_pad): New.
7462 (the_low_target): Install x86_get_thread_area and
7463 x86_install_fast_tracepoint_jump_pad.
7464 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7465 (struct fast_tracepoint_jump): New.
7466 (fast_tracepoint_jump_insn): New.
7467 (fast_tracepoint_jump_shadow): New.
7468 (find_fast_tracepoint_jump_at): New.
7469 (fast_tracepoint_jump_here): New.
7470 (delete_fast_tracepoint_jump): New.
7471 (set_fast_tracepoint_jump): New.
7472 (uninsert_fast_tracepoint_jumps_at): New.
7473 (reinsert_fast_tracepoint_jumps_at): New.
7474 (set_breakpoint_at): Use write_inferior_memory.
7475 (uninsert_raw_breakpoint): Use write_inferior_memory.
7476 (check_mem_read): Mask out fast tracepoint jumps.
7477 (check_mem_write): Mask out fast tracepoint jumps.
7478 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7479 (set_fast_tracepoint_jump): Declare.
7480 (delete_fast_tracepoint_jump)
7481 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7482 (reinsert_fast_tracepoint_jumps_at): Declare.
7483 * regcache.c: Don't compile many functions when building the
7484 in-process agent library.
7485 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7486 the register buffer in the heap.
7487 (free_register_cache): If the register buffer isn't owned by the
7488 regcache, don't free it.
7489 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7490 pre-existing register caches.
7491 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7492 type.
7493 (convert_ascii_to_int): : Constify `from' parameter type.
7494 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7495 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7496 the needed buffer in-place.
7497 (relocate_instruction): New.
7498 * server.c (handle_query) <qSymbols>: If the target supports
7499 tracepoints, give it a chance of looking up symbols. Report
7500 support for fast tracepoints.
7501 (handle_status): Stabilize threads.
7502 (process_serial_event): Adjust.
7503 * server.h (struct fast_tracepoint_jump): Forward declare.
7504 (struct process_info) <fast_tracepoint_jumps>: New field.
7505 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7506 (decode_X_packet, decode_M_packet): Adjust.
7507 (relocate_instruction): Declare.
7508 (in_process_agent_loaded): Declare.
7509 (tracepoint_look_up_symbols): Declare.
7510 (struct fast_tpoint_collect_status): Declare.
7511 (fast_tracepoint_collecting): Declare.
7512 (force_unlock_trace_buffer): Declare.
7513 (handle_tracepoint_bkpts): Declare.
7514 (initialize_low_tracepoint)
7515 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7516 * target.h (struct target_ops) <stabilize_threads,
7517 install_fast_tracepoint_jump_pad>: New fields.
7518 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7519 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7520 [HAVE_STDINT_H]: Include stdint.h.
7521 (trace_debug_1): Rename to ...
7522 (trace_vdebug): ... this.
7523 (trace_debug): Rename to ...
7524 (trace_debug_1): ... this. Add `level' parameter.
7525 (trace_debug): New.
7526 (ATTR_USED, ATTR_NOINLINE): New.
7527 (IP_AGENT_EXPORT): New.
7528 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7529 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7530 (about_to_request_buffer_space, trace_buffer_is_full)
7531 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7532 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7533 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7534 (traceframe_write_count, traceframes_created)
7535 (trace_state_variables)
7536 New renaming defines.
7537 (struct ipa_sym_addresses): New.
7538 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7539 (symbol_list): New.
7540 (ipa_sym_addrs): New.
7541 (all_tracepoint_symbols_looked_up): New.
7542 (in_process_agent_loaded): New.
7543 (write_e_ipa_not_loaded): New.
7544 (maybe_write_ipa_not_loaded): New.
7545 (tracepoint_look_up_symbols): New.
7546 (debug_threads) [IN_PROCESS_AGENT]: New.
7547 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7548 (UNKNOWN_SIDE_EFFECTS): New.
7549 (stop_tracing): New.
7550 (flush_trace_buffer): New.
7551 (stop_tracing_bkpt): New.
7552 (flush_trace_buffer_bkpt): New.
7553 (read_inferior_integer): New.
7554 (read_inferior_uinteger): New.
7555 (read_inferior_data_pointer): New.
7556 (write_inferior_data_pointer): New.
7557 (write_inferior_integer): New.
7558 (write_inferior_uinteger): New.
7559 (struct collect_static_trace_data_action): Delete.
7560 (enum tracepoint_type): New.
7561 (struct tracepoint) <type>: New field `type'.
7562 <actions_str, step_actions, step_actions_str>: Only include in
7563 GDBserver.
7564 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7565 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7566 (tracepoints): Use IP_AGENT_EXPORT.
7567 (last_tracepoint): Don't include in the IPA.
7568 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7569 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7570 (alloced_trace_state_variables): New.
7571 (trace_state_variables): Use IP_AGENT_EXPORT.
7572 (traceframe_t): Delete unused variable.
7573 (circular_trace_buffer): Don't include in the IPA.
7574 (trace_buffer_start): Delete.
7575 (struct trace_buffer_control): New.
7576 (trace_buffer_free): Delete.
7577 (struct ipa_trace_buffer_control): New.
7578 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7579 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7580 New.
7581 (trace_buffer_ctrl): New.
7582 (TRACE_BUFFER_CTRL_CURR): New.
7583 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7584 Reimplement as macros.
7585 (trace_buffer_wrap): Delete.
7586 (traceframe_write_count, traceframe_read_count)
7587 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7588 (struct tracepoint_hit_ctx) <type>: New field.
7589 (struct fast_tracepoint_ctx): New.
7590 (memory_barrier): New.
7591 (cmpxchg): New.
7592 (record_tracepoint_error): Update atomically in the IPA.
7593 (clear_inferior_trace_buffer): New.
7594 (about_to_request_buffer_space): New.
7595 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7596 updating the same buffer.
7597 (add_tracepoint): Default the tracepoint's type to trap
7598 tracepoint, and orig_size to -1.
7599 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7600 internal variables.
7601 (create_trace_state_variable): New parameter `gdb'. Handle it.
7602 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7603 (cmd_qtdp): Handle fast tracepoints.
7604 (cmd_qtdv): Adjust.
7605 (max_jump_pad_size): New.
7606 (gdb_jump_pad_head): New.
7607 (get_jump_space_head): New.
7608 (claim_jump_space): New.
7609 (sort_tracepoints): New.
7610 (MAX_JUMP_SIZE): New.
7611 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7612 IPA.
7613 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7614 support. Upload fast traceframes, and delete internal IPA
7615 breakpoints.
7616 (stop_tracing_handler): New.
7617 (flush_trace_buffer_handler): New.
7618 (cmd_qtstop): Upload fast tracepoints.
7619 (response_tracepoint): Handle fast tracepoints.
7620 (tracepoint_finished_step): Upload fast traceframes. Set the
7621 tracepoint hit context's tracepoint type.
7622 (handle_tracepoint_bkpts): New.
7623 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7624 type. Add comment about fast tracepoints.
7625 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7626 non-existing action_str field.
7627 (get_context_regcache): Handle fast tracepoints.
7628 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7629 to the regcache.
7630 (fast_tracepoint_from_jump_pad_address): New.
7631 (fast_tracepoint_from_ipa_tpoint_address): New.
7632 (collecting_t): New.
7633 (force_unlock_trace_buffer): New.
7634 (fast_tracepoint_collecting): New.
7635 (collecting): New.
7636 (gdb_collect): New.
7637 (write_inferior_data_ptr): New.
7638 (target_tp_heap): New.
7639 (target_malloc): New.
7640 (download_agent_expr): New.
7641 (UALIGN): New.
7642 (download_tracepoints): New.
7643 (download_trace_state_variables): New.
7644 (upload_fast_traceframes): New.
7645 (IPA_FIRST_TRACEFRAME): New.
7646 (IPA_NEXT_TRACEFRAME_1): New.
7647 (IPA_NEXT_TRACEFRAME): New.
7648 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7649 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7650 (gdb_jump_pad_buffer_end): New.
7651 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7652 (initialize_tracepoint): Adjust.
7653 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7654 buffer. Initialize the low module.
7655 * utils.c (PREFIX, TOOLNAME): New.
7656 (malloc_failure): Use PREFIX.
7657 (error): In the IPA, an error causes an exit.
7658 (fatal, warning): Use PREFIX.
7659 (internal_error): Use TOOLNAME.
7660 (NUMCELLS): Increase to 10.
7661 * configure, config.in: Regenerate.
7662
7663 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7664
7665 * server.c (handle_query) <qSupported>: Do two passes over the
7666 qSupported string to avoid nesting strtok.
7667
7668 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7669
7670 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7671 (CDEPS): New.
7672 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7673 -Wl,--dynamic-list.
7674 * configure: Regenerate.
7675 * proc-service.list: New.
7676
7677 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7678
7679 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7680 New comment.
7681
7682 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7683
7684 * gdbreplay.c (remote_open): Check error return from socket() call by
7685 its equality to -1 not by it being negative.
7686 * remote-utils.c (remote_open): Likewise.
7687
7688 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7689
7690 * config.h: Regenerate.
7691
7692 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7693
7694 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7695 doesn't provide PTRACE_GET_THREAD_AREA.
7696
7697 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7698
7699 * linux-m68k-low.c: Include <asm/ptrace.h>
7700 (ps_get_thread_area): Implement.
7701
7702 2010-05-03 Doug Evans <dje@google.com>
7703
7704 * event-loop.c (struct callback_event): New struct.
7705 (callback_list): New global.
7706 (append_callback_event, delete_callback_event): New functions.
7707 (process_callback): New function.
7708 (start_event_loop): Call it.
7709 * remote-utils.c (NOT_SCHEDULED): Define.
7710 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7711 moved out of readchar.
7712 (readchar): Rewrite. Call reschedule before returning.
7713 (reset_readchar): New function.
7714 (remote_close): Call it.
7715 (process_remaining, reschedule): New functions.
7716 * server.h (callback_handler_func): New typedef.
7717 (append_callback_event, delete_callback_event): Declare.
7718
7719 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7720
7721 * proc-service.c (ps_pglobal_lookup): Use
7722 thread_db_look_up_one_symbol.
7723 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7724 parameter. Use it instead of all_symbols_looked_up.
7725 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7726 field.
7727 (all_symbols_looked_up): Don't declare.
7728 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7729 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7730 field.
7731 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7732 Set all_symbols_looked_up here.
7733 (thread_db_look_up_one_symbol): New.
7734 (thread_db_get_tls_address): Adjust.
7735 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7736 thread_db object on the heap, and tentatively set it in the
7737 process structure.
7738 (thread_db_init): Don't set all_symbols_looked_up here.
7739 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7740
7741 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7742
7743 * linux-low.c (linux_kill, linux_detach): Adjust.
7744 (status_pending_p_callback): Remove redundant statement. Check
7745 for !TARGET_WAITIKIND_IGNORE, instead of
7746 TARGET_WAITKIND_STOPPED.
7747 (handle_tracepoints): Make sure LWP is locked. Adjust.
7748 (linux_wait_for_event_1): Adjust.
7749 (linux_cancel_breakpoints): New.
7750 (unsuspend_one_lwp): New.
7751 (unsuspend_all_lwps): New.
7752 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7753 (send_sigstop_callback): Change return type to int, add new
7754 `except' parameter and handle it.
7755 (suspend_and_send_sigstop_callback): New.
7756 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7757 pass them down. If SUSPEND, also increment the lwp's suspend
7758 count.
7759 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7760 (need_step_over_p): Don't consider suspended LWPs.
7761 (start_step_over): Adjust.
7762 (proceed_one_lwp): Change return type to int, add new `except'
7763 parameter and handle it.
7764 (unsuspend_and_proceed_one_lwp): New.
7765 (proceed_all_lwps): Use find_inferior instead of
7766 for_each_inferior.
7767 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7768 also decrement the suspend count of LWPs. Pass `except' down,
7769 instead of hacking its suspend count.
7770 (linux_pause_all): Add `freeze' parameter. Adjust.
7771 (linux_unpause_all): New.
7772 (linux_target_ops): Install linux_unpause_all.
7773 * server.c (handle_status): Adjust.
7774 * target.h (struct target_ops): New fields `unpause_all' and
7775 `cancel_breakpoints'. Add new parameter to `pause_all'.
7776 (pause_all): Add new `freeze' parameter.
7777 (unpause_all): New.
7778 (cancel_breakpoints): New.
7779 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7780 cancel breakpoints.
7781 (cmd_qtstart): Pause threads.
7782 (stop_tracing): Pause threads, and cancel breakpoints.
7783 * win32-low.c (win32_target_ops): Adjust.
7784
7785 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7786
7787 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7788 the inferior right away from here...
7789 (linux_wait_1): ... to here, and adjust to check the thread's
7790 last_resume_kind instead of the lwp's step or stop_expected flags.
7791
7792 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7793
7794 * README: Use consistent `GDB' and `GDBserver' spellings.
7795
7796 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7797
7798 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7799 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7800 (linux_detach_one_lwp): Assume the lwp is stopped.
7801 (any_thread_of): Delete.
7802 (linux_detach): Stop all lwps here. Don't blindly delete all
7803 breakpoints.
7804 (delete_lwp_callback): New.
7805 (linux_mourn): Delete all lwps of the process that is gone.
7806 (linux_wait_1): Don't delete the last lwp of the process here.
7807 * mem-break.h (mark_breakpoints_out): Declare.
7808 * mem-break.c (mark_breakpoints_out): New.
7809 (free_all_breakpoints): Use it.
7810 * server.c (handle_target_event): If the process is gone, mark
7811 breakpoints out.
7812 * thread-db.c (struct thread_db) <create_bp>: New field.
7813 (thread_db_enable_reporting): Fix prototype. Store a thread event
7814 breakpoint reference in the thread_db struct.
7815 (thread_db_load_search): Clear the thread_db object.
7816 (try_thread_db_load_1): Ditto.
7817 (switch_to_process): New.
7818 (disable_thread_event_reporting): Use it.
7819 (remove_thread_event_breakpoints): New.
7820 (thread_db_detach, thread_db_mourn): Use it.
7821
7822 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7823
7824 * linux-low.c (linux_enable_event_reporting): New.
7825 (linux_wait_for_event_1, handle_extended_wait): Use it.
7826
7827 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7828
7829 * linux-low.c (linux_kill_one_lwp, linux_kill)
7830 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7831 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7832 SIGSTOP even if the LWP is stopped.
7833 (send_sigstop_callback): New.
7834 (stop_all_lwps): Use send_sigstop_callback instead.
7835 (linux_resume_one_thread): Adjust.
7836 (proceed_one_lwp): Still proceed an LWP that the client has
7837 requested to stop, if we haven't reported it as stopped yet. Make
7838 sure that LWPs the client want stopped, have a pending SIGSTOP.
7839
7840 2010-04-26 Doug Evans <dje@google.com>
7841
7842 * server.c (handle_general_set): Make static.
7843
7844 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7845 Print received char after testing for error/eof instead of before.
7846 (input_interrupt): Tweak comment.
7847
7848 2010-04-23 Doug Evans <dje@google.com>
7849
7850 * server.c (start_inferior): Print inferior argv if --debug.
7851
7852 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7853
7854 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7855 * nto-x86-low.c: Include server.h
7856
7857 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7858
7859 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7860 be consistent with other sources of this directory.
7861 (init_registers_amd64): Correct name of source file of this function
7862 in the comment.
7863
7864 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7865
7866 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7867 64-bit executables.
7868
7869 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7870
7871 * win32-i386-low.c: Add 64-bit support.
7872 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7873 (init_registers_amd64): Declare.
7874 (mappings): Add 64-bit version of array.
7875 (init_windows_x86): New function.
7876 (the_low_target): Change init_arch field to init_windows_x86.
7877
7878 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7879
7880 * win32-low.c: Adapt to support also 64-bit architecture.
7881 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7882 (get_image_name): Use SIZE_T type for local variable `done'.
7883 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7884 (toolhelp_get_dll_name): Idem.
7885 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7886 Use uintptr_t typecast to avoid warning.
7887 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7888 (handle_exception): Use phex_nz to avoid warning.
7889 (win32_wait): Remove unused local variable `process'.
7890
7891 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7892
7893 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7894 `amd64-avx.o'.
7895
7896 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7897
7898 * configure.ac: Use `ws2_32' library for srv_mingw.
7899 * configure: Regenerate.
7900 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7901 * remote-utils.c: Likewise.
7902
7903 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7904
7905 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7906 if __x86_64__ is defined.
7907
7908 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7909
7910 * configure: Regenerate.
7911
7912 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7913
7914 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7915 * target.h (target_ops): New get_tib_address field.
7916 * win32-low.h (win32_thread_info): Add thread_local_base field.
7917 * win32-low.c (child_add_thread): Add tlb argument.
7918 Set thread_local_base field to TLB.
7919 (get_child_debug_event): Adapt to child_add_thread change.
7920 (win32_get_tib_address): New function.
7921 (win32_target_ops): Set get_tib_address field to
7922 win32_get_tib_address.
7923 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7924
7925 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7926
7927 * linux-low.c (linux_mourn): Also remove the process.
7928 * server.c (handle_target_event): Don't remove the process here.
7929 * nto-low.c (nto_mourn): New.
7930 (nto_target_ops): Install it.
7931 * spu-low.c (spu_mourn): New.
7932 (spu_target_ops): Install it.
7933 * win32-low.c (win32_mourn): New.
7934 (win32_target_ops): Install it.
7935
7936 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7937
7938 * server.h (buffer_xml_printf): Remove redundant `;'.
7939
7940 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7941
7942 * regcache.c (set_register_cache): Invalidate regcaches before
7943 changing the register cache layout.
7944 (regcache_invalidate_one): Allow a NULL regcache.
7945 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7946 regcaches before changing the register cache layout or the target
7947 regsets.
7948
7949 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7950
7951 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7952 variable warning on Linux/x86-64.
7953
7954 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7955
7956 GDBserver disconnected tracing support.
7957
7958 * linux-low.c (linux_remove_process): Delete.
7959 (add_lwp): Don't set last_resume_kind here.
7960 (linux_kill): Use `mourn'.
7961 (linux_detach): Use `thread_db_detach', and `mourn'.
7962 (linux_mourn): New.
7963 (linux_attach_lwp_1): Adjust comment.
7964 (linux_attach): last_resume_kind moved the thread_info; adjust.
7965 (status_pending_p_callback): Adjust.
7966 (linux_wait_for_event_1): Adjust.
7967 (count_events_callback, select_singlestep_lwp_callback)
7968 (select_event_lwp_callback, cancel_breakpoints_callback)
7969 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7970 (proceed_one_lwp): Adjust.
7971 (linux_async): Add debug output.
7972 (linux_thread_stopped): New.
7973 (linux_pause_all): New.
7974 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7975 linux_pause_all.
7976 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7977 (thread_db_free): Delete declaration.
7978 (thread_db_detach, thread_db_mourn): Declare.
7979 * thread-db.c (thread_db_init): Use thread_db_mourn.
7980 (thread_db_free): Delete, split in two.
7981 (disable_thread_event_reporting): New.
7982 (thread_db_detach): New.
7983 (thread_db_mourn): New.
7984
7985 * server.h (struct thread_info) <last_resume_kind>: New field.
7986 <attached>: Add comment.
7987 <gdb_detached>: New field.
7988 (handler_func): Change return type to int.
7989 (handle_serial_event, handle_target_event): Ditto.
7990 (gdb_connected): Declare.
7991 (tracing): Delete.
7992 (disconnected_tracing): Declare.
7993 (stop_tracing): Declare.
7994
7995 * server.c (handle_query) <qSupported>: Report support for
7996 disconnected tracing.
7997 (queue_stop_reply_callback): Account for running threads.
7998 (gdb_wants_thread_stopped): New.
7999 (gdb_wants_all_threads_stopped): New.
8000 (gdb_reattached_process): New.
8001 (handle_status): Clear the `gdb_detached' flag of all processes.
8002 In all-stop, stop all threads.
8003 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8004 (process_serial_event): If the remote connection breaks, or if an
8005 exit was forced with "monitor exit", force an event loop exit.
8006 Handle disconnected tracing on detach.
8007 (handle_serial_event): Adjust.
8008 (handle_target_event): If GDB isn't connected, forward events back
8009 to the inferior, unless the last process exited, in which case,
8010 exit gdbserver. Adjust interface.
8011
8012 * remote-utils.c (remote_open): Don't block in accept. Instead
8013 register an event loop source on the listen socket file
8014 descriptor. Refactor bits into ...
8015 (listen_desc): ... this new global.
8016 (gdb_connected): ... this new function.
8017 (enable_async_notification): ... this new function.
8018 (handle_accept_event): ... this new function.
8019 (remote_close): Clear remote_desc.
8020
8021 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8022
8023 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8024 New fields.
8025 (mourn_inferior): Define.
8026 (target_process_qsupported): Avoid the dangling else problem.
8027 (thread_stopped): Define.
8028 (pause_all): Define.
8029 (target_waitstatus_to_string): Declare.
8030 * target.c (target_waitstatus_to_string): New.
8031
8032 * tracepoint.c (tracing): Make extern.
8033 (disconnected_tracing): New.
8034 (stop_tracing): Make extern. Handle tracing stops due to GDB
8035 disconnecting.
8036 (cmd_qtdisconnected): New.
8037 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8038 (handle_tracepoint_general_set): Handle QTDisconnected.
8039
8040 * event-loop.c (event_handler_func): Change return type to int.
8041 (process_event): Bail out if the event handler wants the event
8042 loop to stop.
8043 (handle_file_event): Ditto.
8044 (start_event_loop): Bail out if the event handler wants the event
8045 loop to stop.
8046
8047 * nto-low.c (nto_target_ops): Adjust.
8048 * spu-low.c (spu_wait): Don't remove the process here.
8049 (spu_target_ops): Adjust.
8050 * win32-low.c (win32_wait): Don't remove the process here.
8051 (win32_target_ops): Adjust.
8052
8053 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8054
8055 * regcache.c (realloc_register_cache): Invalidate inferior's
8056 regcache before recreating it.
8057
8058 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8059
8060 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8061
8062 2010-04-09 Stan Shebs <stan@codesourcery.com>
8063 Pedro Alves <pedro@codesourcery.com>
8064
8065 * server.h (LONGEST): New.
8066 (struct thread_info) <while_stepping>: New field.
8067 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8068 Declare.
8069 (initialize_tracepoint, handle_tracepoint_general_set)
8070 (handle_tracepoint_query, tracepoint_finished_step)
8071 (tracepoint_was_hit, release_while_stepping_state_list):
8072 (current_traceframe): Declare.
8073 * server.c (handle_general_set): Handle tracepoint packets.
8074 (read_memory): New.
8075 (write_memory): New.
8076 (handle_search_memory_1): Use read_memory.
8077 (handle_query): Report support for conditional tracepoints, trace
8078 state variables, and tracepoint sources. Handle tracepoint
8079 queries.
8080 (main): Initialize the tracepoints module.
8081 (process_serial_event): Handle traceframe reads/writes.
8082
8083 * linux-low.c (handle_tracepoints): New.
8084 (linux_wait_1): Call it.
8085 (linux_resume_one_lwp): Handle while-stepping.
8086 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8087 (linux_target_ops): Install them.
8088 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8089 New field.
8090 * linux-x86-low.c (x86_supports_tracepoints): New.
8091 (the_low_target). Install it.
8092
8093 * mem-break.h (delete_breakpoint): Declare.
8094 * mem-break.c (delete_breakpoint): Make external.
8095
8096 * target.h (struct target_ops): Add `supports_tracepoints',
8097 `read_pc', and `write_pc' fields.
8098 (target_supports_tracepoints): Define.
8099 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8100 (phex_nz): New.
8101
8102 * regcache.h (struct regcache) <registers_owned>: New field.
8103 (init_register_cache, regcache_cpy): Declare.
8104 (regcache_read_pc, regcache_write_pc): Declare.
8105 (register_cache_size): Declare.
8106 (supply_regblock): Declare.
8107 * regcache.c (init_register_cache): New.
8108 (new_register_cache): Use it.
8109 (regcache_cpy): New.
8110 (register_cache_size): New.
8111 (supply_regblock): New.
8112 (regcache_read_pc, regcache_write_pc): New.
8113
8114 * tracepoint.c: New.
8115
8116 * Makefile.in (OBS): Add tracepoint.o.
8117 (tracepoint.o): New rule.
8118
8119 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8120
8121 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8122 (i386-mmx.o): New.
8123 (i386-mmx.c): Likewise.
8124 (i386-mmx-linux.o): Likewise.
8125 (i386-mmx-linux.c): Likewise.
8126
8127 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8128 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8129 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8130 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8131
8132 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8133 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8134 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8135
8136 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8137
8138 * Makefile.in (clean): Updated.
8139 (i386-avx.o): New.
8140 (i386-avx.c): Likewise.
8141 (i386-avx-linux.o): Likewise.
8142 (i386-avx-linux.c): Likewise.
8143 (amd64-avx.o): Likewise.
8144 (amd64-avx.c): Likewise.
8145 (amd64-avx-linux.o): Likewise.
8146 (amd64-avx-linux.c): Likewise.
8147
8148 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8149 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8150 (srv_amd64_regobj): Add amd64-avx.o.
8151 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8152 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8153 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8154 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8155 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8156 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8157 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8158
8159 * i387-fp.c: Include "i386-xstate.h".
8160 (i387_xsave): New.
8161 (i387_cache_to_xsave): Likewise.
8162 (i387_xsave_to_cache): Likewise.
8163 (x86_xcr0): Likewise.
8164
8165 * i387-fp.h (i387_cache_to_xsave): Likewise.
8166 (i387_xsave_to_cache): Likewise.
8167 (x86_xcr0): Likewise.
8168
8169 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8170 * linux-crisv32-low.c (target_regsets): Likewise.
8171 * linux-m68k-low.c (target_regsets): Likewise.
8172 * linux-mips-low.c (target_regsets): Likewise.
8173 * linux-ppc-low.c (target_regsets): Likewise.
8174 * linux-s390-low.c (target_regsets): Likewise.
8175 * linux-sh-low.c (target_regsets): Likewise.
8176 * linux-sparc-low.c (target_regsets): Likewise.
8177 * linux-xtensa-low.c (target_regsets): Likewise.
8178
8179 * linux-low.c: Include <sys/uio.h>.
8180 (regsets_fetch_inferior_registers): Support nt_type.
8181 (regsets_store_inferior_registers): Likewise.
8182 (linux_process_qsupported): New.
8183 (linux_target_ops): Add linux_process_qsupported.
8184
8185 * linux-low.h (regset_info): Add nt_type.
8186 (linux_target_ops): Add process_qsupported.
8187
8188 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8189 and <sys/uio.h>.
8190 (init_registers_i386_avx_linux): New.
8191 (init_registers_amd64_avx_linux): Likewise.
8192 (xmltarget_i386_linux_no_xml): Likewise.
8193 (xmltarget_amd64_linux_no_xml): Likewise.
8194 (PTRACE_GETREGSET): Likewise.
8195 (PTRACE_SETREGSET): Likewise.
8196 (x86_fill_xstateregset): Likewise.
8197 (x86_store_xstateregset): Likewise.
8198 (use_xml): Likewise.
8199 (x86_linux_update_xmltarget): Likewise.
8200 (x86_linux_process_qsupported): Likewise.
8201 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8202 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8203 init_registers_i386_linux here. Call
8204 x86_linux_update_xmltarget.
8205 (the_low_target): Add x86_linux_process_qsupported.
8206
8207 * server.c (handle_query): Call target_process_qsupported.
8208
8209 * target.h (target_ops): Add process_qsupported.
8210 (target_process_qsupported): New.
8211
8212 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8213
8214 * inferiors.c (add_thread): Set last_status kind to
8215 TARGET_WAITKIND_IGNORE.
8216 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8217 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8218 (linux_wait_1): Move `thread' local definition to block that uses
8219 it. Don't NULL initialize `event_child'.
8220 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8221 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8222 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8223
8224 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8225
8226 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8227 an extended waitstatus, or by a watchpoint.
8228 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8229 thread was stepping or has been stopped by a watchpoint.
8230
8231 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8232
8233 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8234 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8235 of another, then delete the previous, and validate all
8236 breakpoints.
8237 (validate_inserted_breakpoint): New.
8238 (delete_disabled_breakpoints): New.
8239 (validate_breakpoints): New.
8240 (check_mem_read): Validate breakpoints before trusting their
8241 shadow. Delete disabled breakpoints.
8242 (check_mem_write): Validate breakpoints before trusting they
8243 should be inserted. Delete disabled breakpoints.
8244 * mem-break.h (validate_breakpoints):
8245 * server.c (handle_query): Validate breakpoints when we see a
8246 qSymbol query.
8247
8248 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8249
8250 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8251 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8252 if we could tell there's a GDB breakpoint at stop_pc.
8253 (need_step_over_p): Don't do a step over if we find a GDB
8254 breakpoint at the resume PC.
8255
8256 * mem-break.c (struct raw_breakpoint): New.
8257 (enum bkpt_type): New type `gdb_breakpoint'.
8258 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8259 fields. New field `raw'.
8260 (find_raw_breakpoint_at): New.
8261 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8262 breakpoint instead.
8263 (set_breakpoint_at): Adjust.
8264 (delete_raw_breakpoint): New.
8265 (release_breakpoint): New.
8266 (delete_breakpoint): Rename to...
8267 (delete_breakpoint_1): ... this. Add proc parameter. Use
8268 release_breakpoint. Return ENOENT.
8269 (delete_breakpoint): Reimplement.
8270 (find_breakpoint_at): Delete.
8271 (find_gdb_breakpoint_at): New.
8272 (delete_breakpoint_at): Delete.
8273 (set_gdb_breakpoint_at): New.
8274 (delete_gdb_breakpoint_at): New.
8275 (gdb_breakpoint_here): New.
8276 (set_reinsert_breakpoint): Use release_breakpoint.
8277 (uninsert_breakpoint): Rename to ...
8278 (uninsert_raw_breakpoint): ... this.
8279 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8280 (reinsert_raw_breakpoint): Change parameter type to
8281 raw_breakpoint.
8282 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8283 instead.
8284 (check_breakpoints): Adjust. Use release_breakpoint.
8285 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8286 (breakpoint_inserted_here): Ditto.
8287 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8288 Don't trust the breakpoint's shadow if it is not inserted.
8289 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8290 (delete_all_breakpoints): Adjust.
8291 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8292 use delete_breakpoint_1.
8293
8294 * mem-break.h (breakpoints_supported): Delete declaration.
8295 (set_gdb_breakpoint_at): Declare.
8296 (gdb_breakpoint_here): Declare.
8297 (delete_breakpoint_at): Delete.
8298 (delete_gdb_breakpoint_at): Declare.
8299
8300 * server.h (struct raw_breakpoint): Forward declare.
8301 (struct process_info): New field `raw_breakpoints'.
8302
8303 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8304 breakpoints.
8305
8306 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8307
8308 * linux-low.c (status_pending_p_callback): Fix comment.
8309 (linux_wait_for_event_1): Move most of the internal breakpoint
8310 handling from here...
8311 (linux_wait_1): ... to here.
8312 (count_events_callback): New.
8313 (select_singlestep_lwp_callback): New.
8314 (select_event_lwp_callback): New.
8315 (cancel_breakpoints_callback): New.
8316 (select_event_lwp): New.
8317 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8318 priority to all LWPs that have had events that should be reported
8319 to the client. Cancel breakpoints when about to reporting the
8320 event to the client, not while stopping lwps. No longer cancel
8321 finished single-steps here.
8322 (cancel_finished_single_step): Delete.
8323 (cancel_finished_single_steps): Delete.
8324
8325 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8326
8327 * mem-break.c (enum bkpt_type): New.
8328 (struct breakpoint): New field `type'.
8329 (set_breakpoint_at): Change return type to struct breakpoint
8330 pointer. Set type to `other_breakpoint' by default.
8331 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8332 in the breakpoint list.
8333 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8334 (reinsert_breakpoint): Rename to ...
8335 (reinsert_raw_breakpoint): ... this.
8336 (reinsert_breakpoints_at): Adjust.
8337 * mem-break.h (struct breakpoint): Declare.
8338 (set_breakpoint_at): Change return type to struct breakpoint
8339 pointer.
8340
8341 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8342
8343 * server.c (handle_query): Assign, not compare.
8344
8345 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8346
8347 Teach linux gdbserver to step-over-breakpoints.
8348
8349 * linux-low.c (can_hardware_single_step): New.
8350 (supports_breakpoints): New.
8351 (handle_extended_wait): If stopping threads, read the stop pc of
8352 the new cloned LWP.
8353 (get_pc): New.
8354 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8355 low target doesn't support retrieving the PC.
8356 (add_lwp): Set last_resume_kind to resume_continue.
8357 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8358 (linux_attach): Don't clear stop_expected. Set the lwp's
8359 last_resume_kind to resume_stop.
8360 (linux_detach_one_lwp): Don't check for removed breakpoints.
8361 (check_removed_breakpoint): Delete.
8362 (status_pending_p): Rename to ...
8363 (status_pending_p_callback): ... this. Don't check for removed
8364 breakpoints. Don't consider threads that are stopped from GDB's
8365 perspective.
8366 (linux_wait_for_lwp): Always read the stop_pc here.
8367 (cancel_breakpoint): New.
8368 (step_over_bkpt): New global.
8369 (linux_wait_for_event_1): Implement stepping over breakpoints.
8370 (gdb_wants_lwp_stopped): New.
8371 (gdb_wants_all_stopped): New.
8372 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8373 single-step traps here. Store the thread's last reported target
8374 wait status.
8375 (send_sigstop): Don't clear stop_expected. Always set it,
8376 instead.
8377 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8378 (cancel_finished_single_step): New.
8379 (cancel_finished_single_steps): New.
8380 (wait_for_sigstop): Don't cancel finished single-step traps here.
8381 (linux_resume_one_lwp): Don't check for removed breakpoints.
8382 Don't set `step' on non-hardware step archs.
8383 (linux_set_resume_request): Ignore resume_stop requests if already
8384 stopping or stopped. Set the lwp's last_resume_kind.
8385 (resume_status_pending_p): Don't check for removed breakpoints.
8386 (need_step_over_p): New.
8387 (start_step_over): New.
8388 (finish_step_over): New.
8389 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8390 requests. Clear the thread's last reported target waitstatus.
8391 Don't use the `suspended' flag. Don't consider pending breakpoints.
8392 (linux_resume): Start a step-over if necessary.
8393 (proceed_one_lwp): New.
8394 (proceed_all_lwps): New.
8395 (unstop_all_lwps): New.
8396 * linux-low.h (struct lwp_info): Rewrite comment for the
8397 `suspended' flag. Add the `stop_pc' field. Delete the
8398 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8399 Add `'last_resume_kind' and `need_step_over' fields.
8400 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8401 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8402 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8403 (set_raw_breakpoint_at): New.
8404 (set_breakpoint_at): Rewrite to use it.
8405 (reinsert_breakpoint_handler): Delete.
8406 (set_reinsert_breakpoint): New.
8407 (reinsert_breakpoint_by_bp): Delete.
8408 (delete_reinsert_breakpoints): New.
8409 (uninsert_breakpoint): Rewrite.
8410 (uninsert_breakpoints_at): New.
8411 (reinsert_breakpoint): Rewrite.
8412 (reinsert_breakpoints_at): New.
8413 (check_breakpoints): Rewrite.
8414 (breakpoint_here): New.
8415 (breakpoint_inserted_here): New.
8416 (check_mem_read): Adjust.
8417 * mem-break.h (breakpoints_supported, breakpoint_here)
8418 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8419 (reinsert_breakpoint_by_bp): Delete declaration.
8420 (delete_reinsert_breakpoints): Declare.
8421 (reinsert_breakpoint): Delete declaration.
8422 (reinsert_breakpoints_at): Declare.
8423 (uninsert_breakpoint): Delete declaration.
8424 (uninsert_breakpoints_at): Declare.
8425 (check_breakpoints): Adjust prototype.
8426 * server.h: Adjust include order.
8427 (struct thread_info): Declare here. Add a `last_status' field.
8428
8429 2010-03-23 Michael Snyder <msnyder@vmware.com>
8430
8431 * server.c (crc32): New function.
8432 (handle_query): Add handling for 'qCRC:' request.
8433
8434 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8435
8436 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8437 lwp had been stopped by a watchpoint.
8438
8439 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8440
8441 * server.h (internal_error): Declare.
8442 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8443 * utils.c (internal_error): New function.
8444
8445 2010-03-15 Andreas Schwab <schwab@redhat.com>
8446
8447 * configure.srv: Fix typo setting srv_regobj.
8448
8449 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8450
8451 * linux-low.c (fetch_register): Avoid passing a non string literal
8452 format to `error'.
8453 (usr_store_inferior_registers): Ditto.
8454
8455 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8456
8457 * linux-low.c (linux_write_memory): Bail out early if peeking
8458 memory failed.
8459
8460 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8461
8462 * linux-low.h (struct lwp_info): New fields
8463 `stopped_by_watchpoint' and `stopped_data_address'.
8464 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8465 here, and cache them in the lwp object.
8466 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8467 directly.
8468 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8469 field.
8470 (linux_stopped_by_watchpoint): Rewrite.
8471 (linux_stopped_data_address): Rewrite.
8472
8473 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8474
8475 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8476 switching the current inferior, not before.
8477
8478 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8479
8480 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8481 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8482 i386-linux.c and amd64-linux.c.
8483 (reg-i386.o): Removed.
8484 (reg-i386.c): Likewise.
8485 (reg-i386-linux.o): Likewise.
8486 (reg-i386-linux.c): Likewise.
8487 (reg-x86-64.o): Likewise.
8488 (reg-x86-64.c): Likewise.
8489 (reg-x86-64-linux.o): Likewise.
8490 (reg-x86-64-linux.c): Likewise.
8491 (i386.o): New.
8492 (i386.c): Likewise.
8493 (i386-linux.o): Likewise.
8494 (i386-linux.c): Likewise.
8495 (amd64.o): Likewise.
8496 (amd64.c): Likewise.
8497 (amd64-linux.o): Likewise.
8498 (amd64-linux.c): Likewise.
8499
8500 * configure.srv (srv_i386_regobj): New.
8501 (srv_i386_linux_regobj): Likewise.
8502 (srv_amd64_regobj): Likewise.
8503 (srv_amd64_linux_regobj): Likewise.
8504 (srv_i386_32bit_xmlfiles): Likewise.
8505 (srv_i386_64bit_xmlfiles): Likewise.
8506 (srv_i386_xmlfiles): Likewise.
8507 (srv_amd64_xmlfiles): Likewise.
8508 (srv_i386_linux_xmlfiles): Likewise.
8509 (srv_amd64_linux_xmlfiles): Likewise.
8510 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8511 srv_xmlfiles to $srv_i386_xmlfiles.
8512 (i[34567]86-*-mingw32ce*): Likewise.
8513 (i[34567]86-*-mingw*): Likewise.
8514 (i[34567]86-*-nto*): Likewise.
8515 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8516 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8517 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8518 (x86_64-*-linux*): Likewise.
8519
8520 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8521 (init_registers_amd64_linux): New.
8522 (x86_arch_setup): Replace init_registers_x86_64_linux with
8523 init_registers_amd64_linux.
8524
8525 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8526
8527 * configure.ac: Check for libdl. If it is not available link against
8528 static libthread_db.
8529 * configure: Regenerate.
8530
8531 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8532
8533 PR9605
8534
8535 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8536 handing a read watchpoint.
8537 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8538
8539 2010-02-12 Doug Evans <dje@google.com>
8540
8541 * linux-low.c (linux_supports_tracefork_flag): Document.
8542 (linux_look_up_symbols): Add comment.
8543
8544 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8545
8546 * regcache.c (supply_register): Clear regcache if buf is NULL.
8547
8548 2010-02-02 Nicolas Roche <roche@sourceware.org>
8549 Joel Brobecker <brobecker@adacore.com>
8550
8551 * inferiors.c (find_inferior): Add function documentation.
8552 (unloaded_dll): Handle the case where the unloaded dll has not
8553 been previously registered in the dll list.
8554
8555 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8556
8557 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8558 (thumb2_breakpoint): New.
8559 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8560
8561 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8562
8563 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8564 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8565 breakpoints.
8566
8567 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8568
8569 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8570
8571 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8572
8573 * linux-s390-low.c (s390_collect_ptrace_register)
8574 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8575
8576 2010-01-21 Doug Evans <dje@google.com>
8577
8578 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8579 (PTRACE_ARG4_TYPE): New macro.
8580 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8581 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8582 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8583 (usr_store_inferior_registers): Ditto.
8584 (linux_read_memory, linux_write_memory): Ditto.
8585 (linux_test_for_tracefork): Ditto.
8586
8587 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8588 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8589
8590 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8591
8592 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8593 target.
8594
8595 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8596
8597 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8598 prototype to take a regcache. Adjust.
8599
8600 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8601
8602 * regcache.h (struct thread_info): Forward declare.
8603 (struct regcache): New.
8604 (new_register_cache): Adjust prototype.
8605 (get_thread_regcache): Declare.
8606 (free_register_cache): Adjust prototype.
8607 (registers_to_string, registers_from_string): Ditto.
8608 (supply_register, supply_register_by_name, collect_register)
8609 (collect_register_as_string, collect_register_by_name): Ditto.
8610 * regcache.c (struct inferior_regcache_data): Delete.
8611 (get_regcache): Rename to ...
8612 (get_thread_regcache): ... this. Adjust. Switch inferior before
8613 fetching registers.
8614 (regcache_invalidate_one): Adjust.
8615 (regcache_invalidate): Fix prototype.
8616 (new_register_cache): Return the new register cache.
8617 (free_register_cache): Change prototype.
8618 (realloc_register_cache): Adjust.
8619 (registers_to_string): Change prototype to take a regcache. Adjust.
8620 (registers_from_string): Ditto.
8621 (register_data): Ditto.
8622 (supply_register): Ditto.
8623 (supply_register_by_name): Ditto.
8624 (collect_register): Ditto.
8625 (collect_register_as_string): Ditto.
8626 (collect_register_by_name): Ditto.
8627 * server.c (process_serial_event): Adjust.
8628 * linux-low.h (regset_fill_func, regset_store_func): Change
8629 prototype.
8630 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8631 Change prototype.
8632 * linux-low.c (get_stop_pc): Adjust.
8633 (check_removed_breakpoint): Adjust.
8634 (linux_wait_for_event): Adjust.
8635 (linux_resume_one_lwp): Adjust.
8636 (fetch_register): Add regcache parameter. Adjust.
8637 (usr_store_inferior_registers): Ditto.
8638 (regsets_fetch_inferior_registers): Ditto.
8639 (regsets_store_inferior_registers): Ditto.
8640 (linux_fetch_registers, linux_store_registers): Ditto.
8641 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8642 regcache. Adjust.
8643 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8644 Ditto.
8645 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8646 prototype to take a regcache.
8647 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8648 * remote-utils.c (convert_ascii_to_int, outreg)
8649 (prepare_resume_reply): Change prototype to take a regcache.
8650 Adjust.
8651 * target.h (struct target_ops) <fetch_registers, store_registers>:
8652 Change prototype to take a regcache.
8653 (fetch_inferior_registers, store_inferior_registers): Change
8654 prototype to take a regcache. Adjust.
8655 * proc-service.c (ps_lgetregs): Adjust.
8656 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8657 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8658 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8659 take a regcache. Adjust.
8660 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8661 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8662 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8663 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8664 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8665 (cris_cannot_fetch_register):
8666 (cris_breakpoint_at): Change prototype to take a regcache.
8667 Adjust.
8668 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8669 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8670 to take a regcache. Adjust.
8671 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8672 Adjust.
8673 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8674 take a regcache. Adjust.
8675 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8676 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8677 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8678 * linux-mips-low.c (mips_get_pc):
8679 (mips_set_pc): Change prototype to take a regcache. Adjust.
8680 (mips_reinsert_addr): Adjust.
8681 (mips_collect_register): Change prototype to take a regcache.
8682 Adjust.
8683 (mips_supply_register):
8684 (mips_collect_register_32bit, mips_supply_register_32bit)
8685 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8686 (mips_store_fpregset): Ditto.
8687 * linux-ppc-low.c (ppc_supply_ptrace_register)
8688 (ppc_supply_ptrace_register): Ditto.
8689 (parse_spufs_run): Adjust.
8690 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8691 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8692 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8693 take a regcache. Adjust.
8694 * linux-s390-low.c (s390_collect_ptrace_register)
8695 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8696 (s390_set_pc): Change prototype to take a regcache. Adjust.
8697 (s390_arch_setup): Adjust.
8698 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8699 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8700 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8701 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8702 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8703 regcache. Adjust.
8704 (sparc_breakpoint_at): Adjust.
8705 * linux-xtensa-low.c (xtensa_fill_gregset):
8706 (xtensa_store_gregset):
8707 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8708 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8709 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8710 prototype to take a regcache. Adjust.
8711 * win32-arm-low.c (arm_fetch_inferior_register)
8712 (arm_store_inferior_register): Change prototype to take a
8713 regcache. Adjust.
8714 * win32-i386-low.c (i386_fetch_inferior_register)
8715 (i386_store_inferior_register): Change prototype to take a
8716 regcache. Adjust.
8717 * win32-low.c (child_fetch_inferior_registers)
8718 (child_store_inferior_registers): Change prototype to take a
8719 regcache. Adjust.
8720 (win32_wait): Adjust.
8721 (win32_fetch_inferior_registers): Change prototype to take a
8722 regcache. Adjust.
8723 (win32_store_inferior_registers): Adjust.
8724 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8725 store_inferior_register>: Change prototype to take a regcache.
8726
8727 2010-01-20 Doug Evans <dje@google.com>
8728
8729 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8730 #ifdef.
8731 (linux_wait_for_event1, linux_init_signals): Ditto.
8732 (W_STOPCODE): Provide definition if missing.
8733
8734 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8735
8736 * linux-low.c (linux_core_of_thread): New.
8737 (compare_ints, show_process, list_threads): New.
8738 (linux_qxfer_osdata): Report threads and cores.
8739 (linux_target_op): Register linux_core_of_thread.
8740 * remote-utils.c (prepare_resume_reply): Report the core.
8741 (buffer_xml_printf): Support %d specifier.
8742 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8743 New.
8744 (handle_query): Handle qXfer:threads. Announce availability
8745 thereof.
8746 * target.h (struct target_ops): New field core_of_thread.
8747
8748 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8749
8750 * Makefile.in (clean): Remove new generated files.
8751 (reg-s390.o, reg-s390.c): Remove rules.
8752 (reg-s390x.o, reg-s390x.c): Likewise.
8753 (s390-linux32.o, s390-linux32.c): Add rules.
8754 (s390-linux64.o, s390-linux64.c): Likewise.
8755 (s390x-linux64.o, s390x-linux64.c): Likewise.
8756 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8757 * linux-s390-low.c: Include <elf.h>.
8758 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8759 (init_registers_s390): Remove prototype.
8760 (init_registers_s390x): Likewise.
8761 (init_registers_s390_linux32): Add prototype.
8762 (init_registers_s390_linux64): Likewise.
8763 (init_registers_s390x_linux64): Likewise.
8764 (s390_num_regs_3264): New define.
8765 (s390_regmap_3264): New global variable.
8766 (s390_cannot_fetch_register): Remove obsolete check.
8767 (s390_cannot_store_register): Likewise.
8768 (s390_collect_ptrace_register): Handle upper/lower register halves.
8769 (s390_supply_ptrace_register): Likewise.
8770 (s390_fill_gregset): Update to register number changes.
8771 (s390_get_hwcap): New routine.
8772 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8773 Install appropriate regmap and register set.
8774
8775 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8776
8777 * server.c (gdbserver_version): Update copyright year to 2010.
8778 * gdbreplay.c (gdbreplay_version): Likewise.
8779
8780 2009-12-28 Doug Evans <dje@google.com>
8781
8782 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8783 elf/external.h. Include <elf.h> instead but only if necessary.
8784
8785 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8786
8787 * linux-low.c (linux_remove_process): Remove `detaching'
8788 parameter. Don't release/detach from thread_db here.
8789 (linux_kill): Release/detach from thread_db here, ...
8790 (linux_detach): ... and here, before actually detaching.
8791 (linux_wait_1): ... and here, when a process exits.
8792 * thread-db.c (any_thread_of): New.
8793 (thread_db_free): Switch the current inferior to a thread of the
8794 passed in process.
8795
8796 2009-12-21 Doug Evans <dje@google.com>
8797
8798 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8799
8800 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8801 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8802 warning ifndef __NR_tkill. Move setting of errno there too.
8803 Delete unnecessary resetting of errno after syscall.
8804 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8805
8806 * configure.ac: Check for dladdr.
8807 * config.in: Regenerate.
8808 * configure: Regenerate.
8809 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8810 (try_thread_db_load): Update.
8811
8812 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8813
8814 2009-12-18 Doug Evans <dje@google.com>
8815
8816 * event-loop.c: Include unistd.h if it exists.
8817
8818 * linux-low.c (my_waitpid): Move definition away from being in
8819 between linux_tracefork_child/linux_test_for_tracefork.
8820
8821 * gdb_proc_service.h (psaddr_t): Fix type.
8822 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8823 signature to match glibc.
8824
8825 2009-12-16 Doug Evans <dje@google.com>
8826
8827 * linux-low.c (linux_read_memory): Fix argument to read.
8828
8829 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8830
8831 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8832 events, don't leave current_inferior pointing at null.
8833
8834 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8835
8836 * win32-low.c (LOG): Delete.
8837 (OUTMSG): Output to stderr.
8838 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8839 on compile time LOG macro.
8840 (win32_wait): Fix debug output.
8841
8842 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8843
8844 * win32-low.c (win32_add_one_solib): If the dll name is
8845 "ntdll.dll", prepend the system directory to the dll path.
8846
8847 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8848
8849 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8850
8851 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8852 Vladimir Prus <vladimir@codesourcery.com>
8853
8854 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8855 * configure.ac: Check for __mcoldfire__ and set
8856 gdb_cv_m68k_is_coldfire.
8857 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8858 reg-cf.o and reg-m68k.o.
8859 * configure: Regenerated.
8860
8861 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8862
8863 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8864 Pass it to thread_db_free.
8865 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8866 proper `detaching' argument to linux_remove_process.
8867 * linux-low.h (thread_db_free): Add `detaching' parameter.
8868 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8869 to thread_db_free.
8870 (thread_db_free): Add `detaching' parameter. Only
8871 call td_ta_clear_event if detaching from process.
8872
8873 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8874
8875 * thread-db.c (thread_db_free): Fix typo.
8876
8877 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8878
8879 PR gdb/10838
8880 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8881
8882 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8883
8884 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8885 with an i686 compiler.
8886 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8887 needed.
8888 * configure: Rebuilt.
8889
8890 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8891
8892 PR gdb/10783
8893
8894 * server.c (handle_search_memory_1): Correct read_addr initialization
8895 in loop for searching subsequent chunks.
8896
8897 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8898
8899 * configure.ac: New --with-libthread-db option.
8900 * thread-db.c: Allow direct dependence on libthread_db.
8901 (thread_db_free): Adjust.
8902 * config.in: Regenerate.
8903 * configure: Likewise.
8904
8905 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8906
8907 PR gdb/10757
8908 * thread-db.c (attach_thread): New function.
8909 (maybe_attach_thread): Return success/failure.
8910 (find_new_threads_callback): Adjust.
8911 (thread_db_find_new_threads): Loop until no new threads.
8912
8913 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8914
8915 * proc-service.c (ps_lgetregs): Formatting.
8916
8917 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8918
8919 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8920 * configure.ac: Adjust.
8921 * linux-low.h (struct process_info_private): Move members to struct
8922 thread_db.
8923 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8924 * linux-low.c (linux_remove_process): Adjust.
8925 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8926 * server.c (handle_query): Move code ...
8927 (handle_monitor_command): ... here. New function.
8928 * target.h (struct target_ops): New member.
8929 * thread-db.c (struct thread_db): New.
8930 (libthread_db_search_path): New variable.
8931 (thread_db_create_event, thread_db_enable_reporting)
8932 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8933 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8934 (try_thread_db_load_1, dladdr_to_soname): New functions.
8935 (try_thread_db_load, thread_db_load_search): New functions.
8936 (thread_db_init): Search for libthread_db.
8937 (thread_db_free): New function.
8938 (thread_db_handle_monitor_command): Likewise.
8939 * config.in: Regenerate.
8940 * configure: Regenerate.
8941
8942 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8943
8944 * spu-low.c (spu_kill): Wait for inferior to terminate.
8945 Call clear_inferiors.
8946 (spu_detach): Call clear_inferiors.
8947
8948 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8949
8950 * aclocal.m4: Regenerate.
8951 * config.in: Likewise.
8952 * configure: Likewise.
8953
8954 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8955
8956 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8957 (parse_spufs_run): New function.
8958 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8959 (ppc_breakpoint_at): Handle SPU breakpoints.
8960
8961 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8962
8963 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8964 (SPUFS_MAGIC): Define.
8965 (spu_enumerate_spu_ids): New function.
8966 (linux_qxfer_spu): New function.
8967 (linux_target_ops): Install linux_qxfer_spu.
8968
8969 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8970
8971 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8972 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8973 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8974 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8975 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8976 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8977 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8978 (init_registers_powerpc_cell32l): Add prototype.
8979 (init_registers_powerpc_cell64l): Likewise.
8980 (ppc_arch_setup): Detect Cell/B.E. architecture.
8981
8982 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8983
8984 * Makefile.in (datarootdir): New variable.
8985
8986 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8987
8988 * linux-low.c (linux_write_memory): Update debugging output.
8989 * Makefile.in (clean): Add new descriptions.
8990 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8991 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8992 * configure.srv: Add new files for arm*-*-linux*.
8993 * linux-arm-low.c: Add new declarations.
8994 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8995 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8996 (HWCAP_VFPv3D16): New.
8997 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8998 instead of __IWMMXT__.
8999 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9000 (arm_arch_setup): New.
9001 (target_regsets): Remove #ifdef. Add VFP regset.
9002 (the_low_target): Use arm_arch_setup.
9003
9004 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9005
9006 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9007 the main thread again.
9008
9009 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9010
9011 Adding Neutrino gdbserver.
9012 * configure: Regenerated.
9013 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9014 * configure.srv (i[34567]86-*-nto*): New target.
9015 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9016 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9017 (nto_comctrl) [__QNX__]: New function.
9018 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9019
9020 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9021
9022 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9023 srv_tgtobj.
9024
9025 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9026 Pedro Alves <pedro@codesourcery.com>
9027
9028 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9029 don't support CONTEXT_EXTENDED_REGISTERS.
9030 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9031 (the_low_target): Install them.
9032 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9033 failing with ERROR_PIPE_NOT_CONNECTED.
9034
9035 2009-06-30 Doug Evans <dje@google.com>
9036 Pierre Muller <muller@ics.u-strasbg.fr>
9037
9038 Add h/w watchpoint support to x86-linux, win32-i386.
9039 * Makefile.in (SFILES): Add i386-low.c
9040 (i386_low_h): Define.
9041 (i386-low.o): Add dependencies.
9042 (linux-x86-low.o): Add i386-low.h dependency.
9043 (win32-i386-low.o): Ditto.
9044 * i386-low.c: New file.
9045 * i386-low.h: New file.
9046 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9047 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9048 * linux-low.c (linux_add_process): Initialize arch_private.
9049 (linux_remove_process): Free arch_private.
9050 (add_lwp): Initialize arch_private.
9051 (delete_lwp): Free arch_private.
9052 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9053 provided.
9054 * linux-low.h (process_info_private): New member arch_private.
9055 (lwp_info): New member arch_private.
9056 (linux_target_ops): New members new_process, new_thread,
9057 prepare_to_resume.
9058 (ptid_of): New macro.
9059 * linux-x86-low.c: Include stddef.h, i386-low.h.
9060 (arch_process_info): New struct.
9061 (arch_lwp_info): New struct.
9062 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9063 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9064 (i386_dr_low_get_status): New function.
9065 (x86_insert_point, x86_remove_point): New functions.
9066 (x86_stopped_by_watchpoint): New function.
9067 (x86_stopped_data_address): New function.
9068 (x86_linux_new_process, x86_linux_new_thread): New functions.
9069 (x86_linux_prepare_to_resume): New function.
9070 (the_low_target): Add entries for insert_point, remove_point,
9071 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9072 prepare_to_resume.
9073 * server.c (debug_hw_points): New global.
9074 (monitor_show_help): Document set debug-hw-points.
9075 (handle_query): Process "set debug-hw-points".
9076 * server.h (debug_hw_points): Declare.
9077 (paddress): Declare.
9078 * utils.c (NUMCELLS, CELLSIZE): New macros.
9079 (get_sell, xsnprintf, paddress): New functions.
9080 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9081 remove_point, stopped_by_watchpoint, stopped_data_address.
9082 * win32-i386-low.c: Include i386-low.h.
9083 (debug_reg_state): Replaces dr.
9084 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9085 (i386_dr_low_get_status): New function.
9086 (i386_insert_point, i386_remove_point): New functions.
9087 (i386_stopped_by_watchpoint): New function.
9088 (i386_stopped_data_address): New function.
9089 (i386_initial_stuff): Update.
9090 (get_thread_context,set_thread_context,i386_thread_added): Update.
9091 (the_low_target): Add entries for insert_point,
9092 remove_point, stopped_by_watchpoint, stopped_data_address.
9093 * win32-low.c (win32_insert_watchpoint): New function.
9094 (win32_remove_watchpoint): New function.
9095 (win32_stopped_by_watchpoint): New function.
9096 (win32_stopped_data_address): New function.
9097 (win32_target_ops): Add entries for insert_watchpoint,
9098 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9099 * win32-low.h (win32_target_ops): New members insert_point,
9100 remove_point, stopped_by_watchpoint, stopped_data_address.
9101
9102 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9103
9104 * server.c (process_serial_event): Re-return unsupported, not
9105 error, if the type isn't recognized. Re-allow supporting only
9106 insert or remove packets. Also call require_running for
9107 breakpoints. Add missing break statement to default case. Tidy.
9108 * target.h (struct target_ops): Rename insert_watchpoint to
9109 insert_point, and remove_watchpoint to remove_point.
9110
9111 * linux-low.h (struct linux_target_ops): Likewise.
9112 * linux-low.c (linux_insert_watchpoint): Rename to ...
9113 (linux_insert_point): ... this. Adjust.
9114 (linux_remove_watchpoint): Rename to ...
9115 (linux_remove_point): ... this. Adjust.
9116 (linux_target_ops): Adjust.
9117 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9118 (cris_insert_point): ... this.
9119 (cris_remove_watchpoint): Rename to ...
9120 (cris_remove_point): ... this.
9121 (the_low_target): Adjust.
9122
9123 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9124
9125 * server.c (handle_v_kill): Pass signal_pid to
9126 kill_inferior if multi_process is zero.
9127
9128 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9129
9130 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9131 * target.h (target_ops): Comment for *_watchpoint to make it clear
9132 the functions can get types '0' and '1'.
9133
9134 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9135
9136 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9137 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9138 * regcache.c (get_regcache): Likewise.
9139 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9140 * win32-low.c (child_fetch_inferior_registers): Remove check for
9141 regno 0.
9142
9143 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9144 Pedro Alves <pedro@codesourcery.com>
9145
9146 * target.h (struct target_ops) <supports_multi_process>: New
9147 callback.
9148 (target_supports_multi_process): New.
9149 * server.c (handle_query): Even if GDB reports support, only
9150 enable multi-process if the target also supports it. Report
9151 multi-process support only if the target backend supports it.
9152 * linux-low.c (linux_supports_multi_process): New function.
9153 (linux_target_ops): Install it as target_supports_multi_process
9154 callback.
9155
9156 2009-05-24 Doug Evans <dje@google.com>
9157
9158 Global renaming of find_thread_pid to find_thread_ptid.
9159 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9160 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9161 All callers updated.
9162
9163 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9164 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9165 directly.
9166
9167 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9168 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9169 (linux_resume_one_lwp): Ditto.
9170
9171 2009-05-23 Doug Evans <dje@google.com>
9172
9173 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9174 from struct inferior_list_entry * to struct lwp_info *.
9175 All callers updated.
9176
9177 2009-05-13 Doug Evans <dje@google.com>
9178
9179 * linux-x86-low.c: Don't include assert.h.
9180 (x86_siginfo_fixup): Use fatal, not assert.
9181 (x86_arch_setup): Fix comment.
9182
9183 2009-05-12 Doug Evans <dje@google.com>
9184
9185 Biarch support for i386/amd64 gdbserver.
9186 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9187 Add linux-x86-low.c.
9188 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9189 (linux-x86-low.o): Add.
9190 * linux-x86-64-low.c: Delete.
9191 * linux-i386-low.c: Delete.
9192 * linux-x86-low.c: New file.
9193 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9194 linux-x86-low.o.
9195 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9196 linux-x86-low.o.
9197 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9198 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9199 (linux_child_pid_to_exec_file): New function.
9200 (elf_64_header_p, elf_64_file_p): New functions.
9201 (siginfo_fixup): New function.
9202 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9203 give target a chance to convert layout.
9204 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9205 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9206
9207 2009-05-07 Doug Evans <dje@google.com>
9208
9209 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9210 (regsets_store_inferior_registers): Ditto.
9211
9212 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9213
9214 PR server/10048
9215
9216 * linux-low.c (must_set_ptrace_flags): Delete.
9217 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9218 of the global.
9219 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9220 `lwp->must_set_ptrace_flags' instead.
9221 (linux_wait_for_event_1): Set ptrace options here.
9222 (linux_wait_1): ... not here.
9223
9224 2009-04-30 Doug Evans <dje@google.com>
9225
9226 * inferiors.c (started_inferior_callback): New function.
9227 (attached_inferior_callback): New function.
9228 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9229 * server.c (print_started_pid, print_attached_pid): New functions.
9230 (detach_or_kill_for_exit): New function.
9231 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9232 * server.h (have_started_inferiors_p): Declare.
9233 (have_attached_inferiors_p): Declare.
9234
9235 * inferiors.c (remove_process): Fix memory leak, free process.
9236 * linux-low.c (linux_remove_process): New function.
9237 (linux_kill): Call it instead of remove_process.
9238 (linux_detach, linux_wait_1): Ditto.
9239
9240 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9241
9242 * configure.srv: Add x86 Windows CE target.
9243
9244 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9245
9246 * inferiors.c (get_thread_process): Make global.
9247 * server.h (get_thread_process): Add prototype.
9248 * thread-db.c (find_one_thread): Use get_thread_process
9249 instead of current_process.
9250 (thread_db_get_tls_address): Do not crash if called when
9251 thread layer is not yet initialized.
9252
9253 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9254
9255 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9256 * spu-low.c (current_tid): Rename to ...
9257 (current_ptid): ... this.
9258 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9259 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9260 ptid_get_lwp (current_ptid) instead of current_tid.
9261 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9262 instead of current_tid. Use find_process_pid to verify pid
9263 argument is valid. Pass proper argument to remove_process.
9264 (spu_thread_alive): Compare current_ptid instead of current_tid.
9265 (spu_resume): Likewise.
9266
9267 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9268
9269 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9270 variable.
9271
9272 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9273
9274 Implement the multiprocess extensions, and add linux multiprocess
9275 support.
9276
9277 * server.h (ULONGEST): Declare.
9278 (struct ptid, ptid_t): New.
9279 (minus_one_ptid, null_ptid): Declare.
9280 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9281 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9282 (struct inferior_list_entry): Change `id' type from unsigned from
9283 to ptid_t.
9284 (struct sym_cache, struct breakpoint, struct
9285 process_info_private): Forward declare.
9286 (struct process_info): Declare.
9287 (current_process): Declare.
9288 (all_processes): Declare.
9289 (initialize_inferiors): Declare.
9290 (add_thread): Adjust to use ptid_t.
9291 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9292 (add_process, remove_process, find_thread_pid): Declare.
9293 (find_inferior_id): Adjust to use ptid_t.
9294 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9295 (multi_process): Declare.
9296 (push_event): Adjust to use ptid_t.
9297 (read_ptid, write_ptid): Declare.
9298 (prepare_resume_reply): Adjust to use ptid_t.
9299 (clear_symbol_cache): Declare.
9300 * inferiors.c (all_processes): New.
9301 (null_ptid, minus_one_ptid): New.
9302 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9303 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9304 (add_thread): Change unsigned long to ptid. Remove gdb_id
9305 parameter. Adjust.
9306 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9307 (gdb_id_to_thread): Rename to ...
9308 (find_thread_pid): ... this. Change unsigned long to ptid.
9309 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9310 (loaded_dll, pull_pid_from_list): Adjust.
9311 (add_process, remove_process, find_process_pid)
9312 (get_thread_process, current_process, initialize_inferiors): New.
9313 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9314 (struct target_waitstatus) <related_pid>: Ditto.
9315 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9316 return type to int.
9317 (struct target_ops) <join>: Add `pid' argument.
9318 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9319 (struct target_ops) <wait>: Add `ptid' field. Change return type
9320 to ptid.
9321 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9322 (mywait): Add `ptid' argument. Change return type to ptid_t.
9323 (target_pid_to_str): Declare.
9324 * target.c (set_desired_inferior): Adjust to use ptids.
9325 (mywait): Add new `ptid' argument. Adjust.
9326 (target_pid_to_str): New.
9327 * mem-break.h (free_all_breakpoints): Declare.
9328 * mem-break.c (breakpoints): Delelete.
9329 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9330 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9331 to use per-process breakpoint list.
9332 (free_all_breakpoints): New.
9333 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9334 (symbol_cache, all_symbols_looked_up): Delete.
9335 (hexchars): New.
9336 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9337 read_ptid): New.
9338 (prepare_resume_reply): Change ptid argument's type from unsigned
9339 long to ptid_t. Adjust. Implement W;process and X;process.
9340 (free_sym_cache, clear_symbol_cache): New.
9341 (look_up_one_symbol): Adjust to per-process symbol cache. *
9342 * server.c (cont_thread, general_thread, step_thread): Change type
9343 to ptid_t.
9344 (attached): Delete.
9345 (multi_process): New.
9346 (last_ptid): Change type to ptid_t.
9347 (struct vstop_notif) <ptid>: Change type to ptid_t.
9348 (queue_stop_reply, push_event): Change `ptid' argument's type to
9349 ptid_t.
9350 (discard_queued_stop_replies): Add `pid' argument.
9351 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9352 changes. Don't reference the `attached' global.
9353 (attach_inferior): Adjust to mywait interface changes.
9354 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9355 features. Handle and report "multiprocess+". Handle
9356 "qAttached:PID".
9357 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9358 changes.
9359 (handle_v_kill): New.
9360 (handle_v_stopped): Adjust to use target_pid_to_str.
9361 (handle_v_requests): Allow multiple attaches and runs when
9362 multiprocess extensions are in effect. Handle "vKill".
9363 (myresume): Adjust to use ptids.
9364 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9365 (handle_status): Adjust to discard_queued_stop_replies interface
9366 change.
9367 (first_thread_of, kill_inferior_callback)
9368 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9369 (main): Call initialize_inferiors. Adjust to use ptids, killing
9370 and detaching from all inferiors. Handle multiprocess packet
9371 variants.
9372 * linux-low.h: Include gdb_proc_service.h.
9373 (struct process_info_private): New.
9374 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9375 <lwpid_of>: Use ptid_get_lwp.
9376 (get_lwp_thread): Adjust.
9377 (struct lwp_info): Add `dead' member.
9378 (find_lwp_pid): Declare.
9379 * linux-low.c (thread_db_active): Delete.
9380 (new_inferior): Adjust comment.
9381 (inferior_pid): Delete.
9382 (linux_add_process): New.
9383 (handle_extended_wait): Adjust.
9384 (add_lwp): Change unsigned long to ptid.
9385 (linux_create_inferior): Add process to processes table. Adjust
9386 to use ptids. Don't set new_inferior here.
9387 (linux_attach_lwp): Rename to ...
9388 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9389 it. Adjust to use ptids.
9390 (linux_attach_lwp): New.
9391 (linux_attach): Add process to processes table. Don't set
9392 new_inferior here.
9393 (struct counter): New.
9394 (second_thread_of_pid_p, last_thread_of_process_p): New.
9395 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9396 multiple processes.
9397 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9398 processes. Remove process from process table.
9399 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9400 to multiple processes.
9401 (any_thread_of): New.
9402 (linux_detach): Add `pid' argument, and handle it. Remove process
9403 from processes table.
9404 (linux_join): Add `pid' argument. Handle it.
9405 (linux_thread_alive): Change unsighed long argument to ptid_t.
9406 Consider dead lwps as not being alive.
9407 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9408 threads we're not interested in.
9409 (same_lwp, find_lwp_pid): New.
9410 (linux_wait_for_lwp): Change `pid' argument's type from int to
9411 ptid_t. Adjust.
9412 (linux_wait_for_event): Rename to ...
9413 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9414 from int to ptid_t. Adjust.
9415 (linux_wait_for_event): New.
9416 (linux_wait_1): Add `ptid' argument. Change return type to
9417 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9418 that exit from the process table.
9419 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9420 Adjust.
9421 (mark_lwp_dead): New.
9422 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9423 stopping all threads, mark its main lwp as dead.
9424 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9425 ptids.
9426 (fetch_register, usr_store_inferior_registers)
9427 (regsets_fetch_inferior_registers)
9428 (regsets_store_inferior_registers, linux_read_memory)
9429 (linux_write_memory): Inline `inferior_pid'.
9430 (linux_look_up_symbols): Adjust to use per-process
9431 `thread_db_active'.
9432 (linux_request_interrupt): Adjust to use ptids.
9433 (linux_read_auxv): Inline `inferior_pid'.
9434 (initialize_low): Don't reference thread_db_active.
9435 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9436 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9437 (ps_getpid): Return the pid of the current inferior.
9438 * thread-db.c (proc_handle, thread_agent): Delete.
9439 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9440 per-process data.
9441 (find_one_thread): Change argument type to ptid_t. Adjust to
9442 per-process data.
9443 (maybe_attach_thread): Adjust to per-process data and ptids.
9444 (thread_db_find_new_threads): Ditto.
9445 (thread_db_init): Ditto.
9446 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9447 processes table. Adjust to use ptids.
9448 (spu_kill, spu_detach): Adjust interface. Remove process from
9449 processes table.
9450 (spu_join, spu_thread_alive): Adjust interface.
9451 (spu_wait): Adjust interface. Remove process from processes
9452 table. Adjust to use ptids.
9453 * win32-low.c (current_inferior_tid): Delete.
9454 (current_inferior_ptid): New.
9455 (debug_event_ptid): New.
9456 (thread_rec): Take a ptid. Adjust.
9457 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9458 (child_delete_thread): Ditto.
9459 (do_initial_child_stuff): Add `attached' argument. Add process to
9460 processes table.
9461 (child_fetch_inferior_registers, child_store_inferior_registers):
9462 Adjust.
9463 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9464 (win32_attach): Pass 1 to do_initial_child_stuff.
9465 (win32_kill): Adjust interface. Remove process from processes
9466 table.
9467 (win32_detach): Ditto.
9468 (win32_join): Adjust interface.
9469 (win32_thread_alive): Take a ptid.
9470 (win32_resume): Adjust to use ptids.
9471 (get_child_debug_event): Ditto.
9472 (win32_wait): Adjust interface. Remove exiting process from
9473 processes table.
9474
9475 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9476
9477 Non-stop mode support.
9478
9479 * server.h (non_stop): Declare.
9480 (gdb_client_data, handler_func): Declare.
9481 (delete_file_handler, add_file_handler, start_event_loop):
9482 Declare.
9483 (handle_serial_event, handle_target_event, push_event)
9484 (putpkt_notif): Declare.
9485 * target.h (enum resume_kind): New.
9486 (struct thread_resume): Replace `step' field by `kind' field.
9487 (TARGET_WNOHANG): Define.
9488 (struct target_ops) <wait>: Add `options' argument.
9489 <supports_non_stop, async, start_non_stop>: New fields.
9490 (target_supports_non_stop, target_async): New.
9491 (start_non_stop): Declare.
9492 (mywait): Add `options' argument.
9493 * target.c (mywait): Add `options' argument. Print child exit
9494 notifications here.
9495 (start_non_stop): New.
9496 * server.c (non_stop, own_buf, mem_buf): New globals.
9497 (struct vstop_notif): New.
9498 (notif_queue): New global.
9499 (queue_stop_reply, push_event, discard_queued_stop_replies)
9500 (send_next_stop_reply): New.
9501 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9502 interface changes.
9503 (attach_inferior): In non-stop mode, don't wait for the target
9504 here.
9505 (handle_general_set): Handle QNonStop.
9506 (handle_query): When handling qC, return the current general
9507 thread, instead of the first thread of the list.
9508 (handle_query): If the backend supports non-stop mode, include
9509 QNonStop+ in the qSupported query response.
9510 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9511 and non-stop mode.
9512 (handle_v_attach, handle_v_run): Handle non-stop mode.
9513 (handle_v_stopped): New.
9514 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9515 (myresume): Adjust to use resume_kind. Handle non-stop.
9516 (queue_stop_reply_callback): New.
9517 (handle_status): Handle non-stop mode.
9518 (main): Clear non_stop flag on reconnection. Use the event-loop.
9519 Refactor serial protocol handling from here ...
9520 (process_serial_event): ... to this new function. When GDB
9521 selects any thread, select one here. In non-stop mode, wait until
9522 GDB acks all pending events before exiting.
9523 (handle_serial_event, handle_target_event): New.
9524 * remote-utils.c (remote_open): Install remote_desc in the event
9525 loop.
9526 (remote_close): Remove remote_desc from the event loop.
9527 (putpkt_binary): Rename to...
9528 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9529 (putpkt_binary): New as wrapper around putpkt_binary_1.
9530 (putpkt_notif): New.
9531 (prepare_resume_reply): In non-stop mode, don't change the
9532 general_thread.
9533 * event-loop.c: New.
9534 * Makefile.in (OBJ): Add event-loop.o.
9535 (event-loop.o): New rule.
9536
9537 * linux-low.h (pid_of): Moved here.
9538 (lwpid_of): New.
9539 (get_lwp_thread): Use lwpid_of.
9540 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9541 * linux-low.c (pid_of): Delete.
9542 (inferior_pid): Use lwpid_of.
9543 (linux_event_pipe): New.
9544 (target_is_async_p): New.
9545 (delete_lwp): New.
9546 (handle_extended_wait): Use lwpid_of.
9547 (add_lwp): Don't set lwpid field.
9548 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9549 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9550 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9551 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9552 first. Adjust to linux_wait_for_event interface changes. Use
9553 lwpid_of.
9554 (linux_detach): Don't delete the main lwp here.
9555 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9556 (status_pending_p): Don't consider explicitly suspended lwps.
9557 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9558 pointer. Add OPTIONS argument. Change return type to int. Use
9559 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9560 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9561 pointer. Add status pointer argument. Return a pid instead of a
9562 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9563 changes. In non-stop mode, don't switch to a random thread.
9564 (linux_wait): Rename to...
9565 (linux_wait_1): ... this. Add target_options argument, and handle
9566 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9567 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9568 clean exit and signal exit code. Don't stop all threads in
9569 non-stop mode. In all-stop mode, only stop all threads when
9570 reporting a stop to GDB. Handle explicit thread stop requests.
9571 (async_file_flush, async_file_mark): New.
9572 (linux_wait): New.
9573 (send_sigstop): Use lwpid_of.
9574 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9575 interface changes. In non-stop mode, don't switch to a random
9576 thread.
9577 (linux_resume_one_lwp): Use lwpid_of.
9578 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9579 (linux_resume_one_thread): ... this. Handle resume_stop. In
9580 non-stop mode, don't look for pending flag in all threads.
9581 (resume_status_pending_p): Don't consider explicitly suspended
9582 threads.
9583 (my_waitpid): Reimplement. Emulate __WALL.
9584 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9585 Use lwpid_of.
9586 (sigchld_handler, linux_supports_non_stop, linux_async)
9587 (linux_start_non_stop): New.
9588 (linux_target_ops): Register linux_supports_non_stop, linux_async
9589 and linux_start_non_stop.
9590 (initialize_low): Install SIGCHLD handler.
9591 * thread-db.c (thread_db_create_event, find_one_thread)
9592 (thread_db_get_tls_address): Use lwpid_of.
9593 * win32-low.c (win32_detach): Adjust to use resume_kind.
9594 (win32_wait): Add `options' argument.
9595 * spu-low.c (spu_resume): Adjust to use resume_kind.
9596 (spu_wait): Add `options' argument.
9597
9598 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9599
9600 Decouple target code from remote protocol.
9601
9602 * target.h (enum target_waitkind): New.
9603 (struct target_waitstatus): New.
9604 (struct target_ops) <wait>: Return an unsigned long. Take a
9605 target_waitstatus pointer instead of a char pointer.
9606 (mywait): Likewise.
9607 * target.c (mywait): Change prototype to return an unsigned long.
9608 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9609 * server.h (thread_from_wait, old_thread_from_wait): Delete
9610 declarations.
9611 (prepare_resume_reply): Change prototype to take a
9612 target_waitstatus.
9613 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9614 (last_status, last_ptid): New.
9615 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9616 pid instead of a signal.
9617 (attach_inferior): Remove "status" and "signal" parameters.
9618 Adjust.
9619 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9620 not as an address.
9621 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9622 (handle_v_requests, myresume): Remove "status" and "signal"
9623 parameters. Adjust.
9624 (handle_status): New.
9625 (main): Delete local `status'. Adjust.
9626 * remote-utils.c: Include target.h.
9627 (prepare_resume_reply): Change prototype to take a
9628 target_waitstatus. Adjust.
9629
9630 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9631 interface.
9632 * spu-low.c (spu_wait): Adjust.
9633 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9634 Delete.
9635 (win32_wait): Adjust.
9636
9637 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9638
9639 * target.h (struct thread_resume): Delete leave_stopped member.
9640 (struct target_ops): Add a `n' argument to the `resume' callback.
9641 * server.c (start_inferior): Adjust.
9642 (handle_v_cont, myresume): Adjust.
9643 * linux-low.c (check_removed_breakpoint): Adjust to resume
9644 interface change, and to removed leave_stopped field.
9645 (resume_ptr): Delete.
9646 (struct thread_resume_array): New.
9647 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9648 resume interface change.
9649 (linux_continue_one_thread, linux_queue_one_thread)
9650 (resume_status_pending_p): Check if the resume field is NULL
9651 instead of checking the leave_stopped member.
9652 (linux_resume): Adjust to the target resume interface change.
9653 * spu-low.c (spu_resume): Adjust to the target resume interface
9654 change.
9655 * win32-low.c (win32_detach, win32_resume): Ditto.
9656
9657 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9658
9659 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9660 flag.
9661 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9662 pending.
9663 (linux_continue_one_thread): Only preserve the stepping flag if
9664 there's a pending breakpoint.
9665
9666 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9667
9668 * server.c (main): After the inferior having exited, call
9669 remote_close before exiting gdbserver.
9670
9671 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9672
9673 Fix size of FPSCR in Power 7 processors.
9674 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9675 (PPC_FEATURE_HAS_DFP): New #define.
9676 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9677 size of the FPSCR.
9678
9679 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9680
9681 * server.c (handle_query) Whitespace and formatting.
9682
9683 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9684
9685 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9686 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9687 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9688 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9689 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9690 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9691 Makefile.in, configure.ac: Fix whitespace throughout.
9692 * configure: Regenerate.
9693
9694 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9695
9696 * inferiors.c (find_inferior): Make it safe for the callback
9697 function to delete the currently iterated inferior.
9698
9699 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9700
9701 * Makefile.in (linuw_low_h): Move higher.
9702 (thread-db.o): Depend on $(linux_low_h).
9703
9704 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9705
9706 Rename "process" to "lwp" throughout.
9707
9708 * linux-low.c (all_processes): Rename to...
9709 (all_lwps): ... this.
9710 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9711 (add_process): Rename to ...
9712 (add_lwp): ... this. Adjust.
9713 (linux_create_inferior): Adjust.
9714 (linux_attach_lwp): Adjust.
9715 (linux_attach): Adjust.
9716 (linux_kill_one_process): Rename to ...
9717 (linux_kill_one_lwp): ... this. Adjust.
9718 (linux_kill): Adjust.
9719 (linux_detach_one_process): Rename to ...
9720 (linux_detach_one_lwp): ... this. Adjust.
9721 (linux_detach): Adjust.
9722 (check_removed_breakpoint): Adjust.
9723 (status_pending_p): Adjust.
9724 (linux_wait_for_process): Rename to ...
9725 (linux_wait_for_lwp): ... this. Adjust.
9726 (linux_wait_for_event): Adjust.
9727 (send_sigstop): Adjust.
9728 (wait_for_sigstop): Adjust.
9729 (stop_all_processes): Rename to ...
9730 (stop_all_lwps): ... this.
9731 (linux_resume_one_process): Rename to ...
9732 (linux_resume_one_lwp): ... this. Adjust.
9733 (linux_set_resume_request, linux_continue_one_thread)
9734 (linux_queue_one_thread, resume_status_pending_p)
9735 (usr_store_inferior_registers, regsets_store_inferior_registers)
9736 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9737 Adjust.
9738 * linux-low.h (get_process): Rename to ...
9739 (get_lwp): ... this. Adjust.
9740 (get_thread_process): Rename to ...
9741 (get_thread_lwp): ... this. Adjust.
9742 (get_process_thread): Rename to ...
9743 (get_lwp_thread): ... this. Adjust.
9744 (struct process_info): Rename to ...
9745 (struct lwp_info): ... this.
9746 (all_processes): Rename to ...
9747 (all_lwps): ... this.
9748 * proc-service.c (ps_lgetregs): Adjust.
9749 * thread-db.c (thread_db_create_event, find_one_thread)
9750 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9751
9752 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9753
9754 * server.c (handle_query): Handle "qAttached".
9755
9756 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9757
9758 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9759 GPLv3, update license URL.
9760
9761 2009-03-01 Doug Evans <dje@google.com>
9762
9763 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9764 (server_h): Add gdb_signals.h.
9765 (signals.o): Update.
9766 * server.h (target_signal_from_host,target_signal_to_host_p)
9767 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9768
9769 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9770
9771 * remote-utils.c (getpkt): Also generate remote-debug
9772 information if noack_mode is set.
9773
9774 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9775
9776 * server.c (handle_query): Report qXfer:siginfo:read and
9777 qXfer:siginfo:write as supported and handle them.
9778 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9779 * linux-low.c (linux_xfer_siginfo): New.
9780 (linux_target_ops): Set it.
9781
9782 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9783
9784 * server.c (gdbserver_usage): Mention --remote-debug.
9785 (main): Accept '--remote-debug' switch.
9786
9787 2009-01-18 Doug Evans <dje@google.com>
9788
9789 * regcache.c (new_register_cache): No need to check result of xcalloc.
9790 * server.c (handle_search_memory): Back out calls to xmalloc,
9791 result is checked and error is returned to user upon failure.
9792 (handle_query): Ditto. Add more checks for result of malloc.
9793 (handle_v_cont): Check result of malloc, report error back to
9794 user upon failure.
9795 (handle_v_run): Ditto. Call freeargv.
9796 * server.h (freeargv): Declare.
9797 * utils.c (freeargv): New fn.
9798
9799 2009-01-15 Doug Evans <dje@google.com>
9800
9801 * gdbreplay.c (perror_with_name): Make arg const char *.
9802 * server.h (target_signal_to_name): Make return type const char *.
9803 * thread-db.c (thread_db_err_str): Make return type const char *.
9804 * utils.c (perror_with_name): Make arg const char *.
9805
9806 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9807
9808 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9809 when handling a EXIT_PROCESS_DEBUG_EVENT.
9810
9811 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9812
9813 * gdbreplay.c (gdbreplay_version): Update copyright year.
9814 * server.c (gdbserver_version): Likewise.
9815
9816 2009-01-05 Doug Evans <dje@google.com>
9817
9818 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9819 (handle_extended_wait): Improve comment.
9820
9821 2008-12-13 Doug Evans <dje@google.com>
9822
9823 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9824 * server.h (ATTR_MALLOC): New macro.
9825 (xmalloc,xcalloc,xstrdup): Declare.
9826 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9827 * inferiors.c: Ditto.
9828 * linux-low.c: Ditto.
9829 * mem-break.c: Ditto.
9830 * regcache.c: Ditto.
9831 * remote-utils.c: Ditto.
9832 * server.c: Ditto.
9833 * target.c: Ditto.
9834 * win32-low.c: Ditto.
9835
9836 2008-12-12 Doug Evans <dje@google.com>
9837
9838 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9839 in debugging printf.
9840
9841 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9842
9843 2008-12-09 Doug Evans <dje@google.com>
9844
9845 * linux-low.h (struct process_info): Delete member tid, unused.
9846 * thread-db.c (find_one_thread): Update.
9847 (maybe_attach_thread): Update.
9848
9849 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9850
9851 * target.h (struct target_ops): Add qxfer_osdata member.
9852 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9853 and dirent.h.
9854 (linux_qxfer_osdata): New functions.
9855 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9856 callback.
9857 * server.c (handle_query): Handle "qXfer:osdata:read:".
9858 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9859 (buffer_xml_printf): New functions.
9860 * server.h (struct buffer): New.
9861 (buffer_grow_str, buffer_grow_str0): New macros.
9862 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9863 (buffer_xml_printf): Declare.
9864
9865 2008-11-24 Doug Evans <dje@google.com>
9866
9867 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9868
9869 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9870
9871 * server.c (handle_v_run): Always use the supplied argument list.
9872
9873 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9874
9875 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9876 (xtensa_regmap_table): Add entry for scompare1.
9877
9878 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9879
9880 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9881 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9882 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9883 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9884 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9885 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9886 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9887 XML target descriptions.
9888 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9889 when inferior is running on an ISA 2.05 or later processor. Add
9890 special case to return offset for full 64-bit slot of FPSCR when
9891 in 32-bits.
9892
9893 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9894
9895 * Makefile.in (SFILES, clean): Added sparc64 files.
9896 (reg-sparc64.o, reg-sparc64.c): New.
9897 * configure.srv (sparc*-*-linux*): New configuration.
9898 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9899 syscall arguments for SPARC.
9900 (regsets_store_inferior_registers): Likewise.
9901 * linux-sparc-low.c: New file.
9902
9903 2008-10-21 Doug Evans <dje@google.com>
9904
9905 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9906 (READLINE_DIR,READLINE_DEP): Delete.
9907 (INTERNAL_CFLAGS): Update.
9908 (LINTFLAGS): Update.
9909
9910 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9911
9912 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9913 whole argv from the last run, not just argv[0].
9914
9915 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9916
9917 * regcache.c (new_register_cache): Return NULL if the register
9918 cache size isn't known yet.
9919 (free_register_cache): Avoid dereferencing a NULL regcache.
9920
9921 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9922
9923 * configure.srv: Merge MIPS and MIPS64.
9924
9925 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9926
9927 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9928
9929 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9930
9931 * Makefile.in: Add required vsx dependencies.
9932
9933 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9934 Declare init_registers_powerpc_vsx32l.
9935 Declare init_registers_powerpc_vsx64l.
9936 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9937 (ppc_arch_setup): Check for VSX in hwcap.
9938 (ppc_fill_vsxregset): New function.
9939 (ppc_store_vsxregset): New function.
9940 Add new VSX entry in regset_info target_regsets.
9941
9942 * configure.srv: Add new VSX dependencies.
9943
9944 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9945
9946 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9947 (remote_open): Set or clear transport_is_reliable.
9948 (putpkt_binary): Don't expect acks in noack mode.
9949 (getpkt): Don't send ack/nac in noack mode.
9950 * server.c (handle_general_set): Handle QStartNoAckMode.
9951 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9952 qSupported.
9953 (main): Reset noack_mode on every connection.
9954 * server.h (noack_mode): Declare.
9955
9956 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9957
9958 * Makefile.in (GDBREPLAY_OBS): New variable.
9959 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9960
9961 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9962 Daniel Jacobowitz <dan@codesourcery.com>
9963
9964 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9965 (usr_store_inferior_registers): Likewise.
9966 (regsets_store_inferior_registers): Likewise.
9967
9968 2008-07-31 Rolf Jansen <rj@surtec.com>
9969 Pedro Alves <pedro@codesourcery.com>
9970
9971 * configure.ac: Check for memmem declaration.
9972 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9973 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9974 (disable_packet_qfThreadInfo): Unconditionally compile.
9975 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9976 * configure, config.in: Regenerate.
9977
9978 2008-07-28 Doug Kwan <dougkwan@google.com>
9979
9980 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9981 (linux_write_memory): Remove declaration of errno.
9982
9983 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9984
9985 * linux-low.c (handle_extended_wait): Do not use "status"
9986 variable uninitialized.
9987
9988 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9989
9990 * server.c (handle_v_attach): Inhibit reporting dll changes.
9991
9992 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9993
9994 * remote-utils.c (prepare_resume_reply): If requested, don't
9995 output "thread:TID" in the T stop reply.
9996
9997 * server.c (disable_packet_vCont, disable_packet_Tthread)
9998 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9999 (handle_query): If requested, disable support for qC, qfThreadInfo
10000 and qsThreadInfo.
10001 (handle_v_requests): If requested, disable support for vCont.
10002 (gdbserver_show_disableable): New.
10003 (main): Handle --disable-packet and --disable-packet=LIST.
10004
10005 * server.h (disable_packet_vCont, disable_packet_Tthread)
10006 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10007
10008 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10009
10010 * server.c (gdbserver_usage): Mention --version.
10011
10012 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10013
10014 * Makefile.in (gdbreplay.o): New rule.
10015
10016 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10017
10018 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10019 message, not gdbserver.
10020
10021 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10022 Nathan Sidwell <nathan@codesourcery.com>
10023 Joseph Myers <joseph@codesourcery.com>
10024
10025 * acinclude.m4: Include ../../config/acx.m4.
10026 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10027 * configure, config.in: Regenerate.
10028 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10029 * server.c (gdbserver_version): Print PKGVERSION.
10030 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10031 (main): Adjust gdbserver_usage calls.
10032 * gdbreplay.c (version, host_name): Add declarations.
10033 (gdbreplay_version, gdbreplay_usage): New.
10034 (main): Accept --version and --help options.
10035
10036 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10037
10038 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10039 (arm_breakpoint_at): Handle Thumb.
10040 (the_low_target): Add comment.
10041
10042 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10043
10044 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10045
10046 2008-05-09 Doug Evans <dje@google.com>
10047
10048 * server.h (decode_search_memory_packet): Declare.
10049 * remote-utils.c (decode_search_memory_packet): New fn.
10050 * server.c (handle_search_memory_1): New fn.
10051 (handle_search_memory): New fn.
10052 (handle_query): Process qSearch:memory packets.
10053
10054 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10055
10056 * regcache.c (registers_length): Remove.
10057 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10058 full register packet.
10059 * regcache.h (registers_length): Remove prototype.
10060 * server.h (PBUFSIZ): Define to 16384.
10061
10062 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10063
10064 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10065 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10066 powerpc-64l.o, and powerpc-altivec64l.o.
10067 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10068 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10069 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10070 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10071 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10072 to srv_xmlfiles.
10073
10074 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10075 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10076 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10077 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10078 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10079 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10080 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10081 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10082 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10083 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10084 (clean): Update.
10085
10086 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10087 (init_registers_powerpc_32l): ... this new prototype.
10088 (init_registers_powerpc_32): Remove, replace by ...
10089 (init_registers_powerpc_altivec32l): ... this new prototype.
10090 (init_registers_powerpc_e500): Remove, replace by ...
10091 (init_registers_powerpc_e500l): ... this new prototype.
10092 (init_registers_ppc64): Remove, replace by ...
10093 (init_registers_powerpc_64l): ... this new prototype.
10094 (init_registers_powerpc_64): Remove, replace by ...
10095 (init_registers_powerpc_altivec64l): ... this new prototype.
10096 (ppc_num_regs): Set to 73.
10097 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10098 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10099 (ppc_cannot_store_register): Handle orig_r3 and trap.
10100 (ppc_arch_setup): Update init_registers_... calls.
10101 (ppc_fill_gregset): Handle orig_r3 and trap.
10102
10103 * inferiors.c (clear_inferiors): Reset current_inferior.
10104
10105 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10106
10107 * acinclude.m4: Add override.m4.
10108 * configure: Regenerate.
10109
10110 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10111
10112 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10113 initial call to init_register_ppc64.
10114
10115 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10116
10117 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10118 single powerpc*-*-linux* case.
10119 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10120
10121 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10122
10123 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10124 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10125 from reg_xmlfiles.
10126 * linux-ppc-low.c: Include <elf.h>.
10127 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10128 (ppc_hwcap): New global variable.
10129 (ppc_regmap): Remove __SPE__ #ifdef sections.
10130 (ppc_regmap_e500): New global variable.
10131 (ppc_cannot_store_register): Update __SPE__ special case.
10132 (ppc_get_hwcap): New function.
10133 (ppc_arch_setup): Use it to determine whether inferior supports
10134 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10135 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10136 Do not access registers if target does not support AltiVec.
10137 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10138 Do not access registers if target does not support SPE.
10139 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10140
10141 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10142
10143 * linux-low.c (disabled_regsets, num_regsets): New.
10144 (use_regsets_p): Delete.
10145 (linux_wait_for_process): Clear disabled_regsets.
10146 (regsets_fetch_inferior_registers): Check and set it.
10147 (regsets_store_inferior_registers): Likewise.
10148 (linux_fetch_registers, linux_store_registers): Do not use
10149 use_regsets_p.
10150 (initialize_low): Allocate disabled_regsets.
10151
10152 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10153
10154 * Makefile.in (LIBOBJS): New.
10155 (OBS): Use LIBOBJS.
10156 (memmem.o): New rule.
10157 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10158 * configure: Regenerated.
10159
10160 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10161
10162 * server.c (handle_query): Never return "unsupported" for
10163 qXfer:features:read queries.
10164
10165 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10166
10167 * server.c (get_features_xml): Fix inverted condition.
10168 (handle_query): Always support qXfer:feature:read.
10169
10170 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10171
10172 * server.c (wrapper_argv): New.
10173 (start_inferior): Handle wrapper_argv. If set, expect an extra
10174 trap.
10175 (gdbserver_usage): Document --wrapper.
10176 (main): Parse --wrapper.
10177
10178 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10179
10180 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10181 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10182 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10183 (ppc_set_pc): Likewise.
10184 (ppc_arch_setup): New function.
10185 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10186 of collect_register.
10187 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10188
10189 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10190
10191 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10192 instead of linux-ppc64-low.o.
10193 * linux-ppc64-low.c: Remove file.
10194 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10195 (linux-ppc64-low.o): Remove rule.
10196
10197 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10198 (init_registers_powerpc_64): Likewise.
10199 (ppc_regmap): Conditionally define depending on __powerpc64__.
10200 (ppc_cannot_store_register): Do not special-case "fpscr" when
10201 compiled on __powerpc64__.
10202 (ppc_collect_ptrace_register): New function.
10203 (ppc_supply_ptrace_register): New function.
10204 (ppc_breakpoint): Change type to "unsigned int".
10205 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10206 (the_low_target): Conditionally provide initializers for the
10207 arch_setup member depending on __powerpc64__. Install
10208 collect_ptrace_register and supply_ptrace_register members.
10209
10210 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10211
10212 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10213 * server.c (gdbserver_xmltarget): Define.
10214 (get_features_xml): Use it to replace "target.xml" and arch_string.
10215
10216 * configure.srv: Remove srv_xmltarget. Add XML files that were
10217 mentioned there to srv_xmlfiles instead. Remove conditional tests
10218 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10219 srv_xmlfiles and srv_regobj to include all possible choices.
10220 * configure.ac (srv_xmltarget): Remove.
10221 (srv_xmlfiles): Do not add "target.xml".
10222 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10223 checks for supplementary target information.
10224 * configure: Regenerate.
10225 * Makefile.in (XML_TARGET): Remove.
10226 (target.xml): Remove rule.
10227 (clean): Do not clean up target.xml.
10228 (.PRECIOUS): Do not mention target.xml.
10229
10230 * target.h (struct target_ops): Remove arch_string member.
10231 * linux-low.c (linux_arch_string): Remove.
10232 (linux_target_ops): Remove arch_string initializer.
10233 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10234 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10235 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10236 * spu-low.c (spu_arch_string): Remove.
10237 (spu_target_ops): Remove arch_string initializer.
10238 * win32-low.c (win32_arch_string): Remove.
10239 (win32_target_ops): Remove arch_string initializer.
10240 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10241 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10242 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10243
10244 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10245
10246 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10247 by collect_ptrace_register and supply_ptrace_register hooks.
10248 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10249 instead of checking for the_low_target.left_pad_xfer.
10250 (usr_store_inferior_registers): Use collect_ptrace_register callback
10251 instead of checking for the_low_target.left_pad_xfer.
10252
10253 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10254 (s390_supply_ptrace_register): Likewise.
10255 (s390_fill_gregset): Call s390_collect_ptrace_register.
10256 (the_low_target): Update.
10257
10258 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10259 (ppc_supply_ptrace_register): Likewise.
10260 (the_low_target): Update.
10261
10262 * linux-i386-low.c (the_low_target): Update.
10263 * linux-x86-64-low.c (the_low_target): Update.
10264
10265 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10266
10267 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10268 reg-s390.o and reg-s390x.o.
10269
10270 * linux-low.c (new_inferior): New global variable.
10271 (linux_create_inferior, linux_attach): Set it.
10272 (linux_wait_for_process): Call the_low_target.arch_setup after the
10273 target has stopped for the first time.
10274 (initialize_low): Do not call the_low_target.arch_setup.
10275
10276 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10277 (s390_set_pc): Likewise.
10278 (s390_arch_setup): New function.
10279 (the_low_target): Use s390_arch_setup as arch_setup routine.
10280
10281 * regcache.c (realloc_register_cache): New function.
10282 (set_register_cache): Call it for each existing regcache.
10283
10284 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10285
10286 * server.h (init_registers): Remove prototype.
10287
10288 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10289 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10290 instead of init_registers ().
10291 * linux-arm-low.c (init_registers_arm): Add prototype.
10292 (init_registers_arm_with_iwmmxt): Likewise.
10293 (the_low_target): Add initializer for arch_setup field.
10294 * linux-cris-low.c (init_registers_cris): Add prototype.
10295 (the_low_target): Add initializer for arch_setup field.
10296 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10297 (the_low_target): Add initializer for arch_setup field.
10298 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10299 (the_low_target): Add initializer for arch_setup field.
10300 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10301 (the_low_target): Add initializer for arch_setup field.
10302 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10303 (the_low_target): Add initializer for arch_setup field.
10304 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10305 (the_low_target): Add initializer for arch_setup field.
10306 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10307 (init_registers_mips64_linux): Likewise.
10308 (the_low_target): Add initializer for arch_setup field.
10309 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10310 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10311 (the_low_target): Add initializer for arch_setup field.
10312 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10313 (init_registers_powerpc_64): Likewise.
10314 (the_low_target): Add initializer for arch_setup field.
10315 * linux-s390-low.c (init_registers_s390): Add prototype.
10316 (init_registers_s390x): Likewise.
10317 (the_low_target): Add initializer for arch_setup field.
10318 * linux-sh-low.c (init_registers_sh): Add prototype.
10319 (the_low_target): Add initializer for arch_setup field.
10320 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10321 (the_low_target): Add initializer for arch_setup field.
10322 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10323 (the_low_target): Add initializer for arch_setup field.
10324
10325 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10326 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10327 instead of init_registers ().
10328 * win32-arm-low.c (init_registers_arm): Add prototype.
10329 (the_low_target): Add initializer for arch_setup field.
10330 * win32-i386-low.c (init_registers_i386): Add prototype.
10331 (the_low_target): Add initializer for arch_setup field.
10332
10333 * spu-low.c (init_registers_spu): Add prototype.
10334 (initialize_low): Call initialie_registers_spu () instead of
10335 initialize_registers ().
10336
10337 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10338
10339 * server.c (handle_v_requests): When handling the vRun and vAttach
10340 packets, if already debugging a process, don't kill it. Return an
10341 error instead.
10342
10343 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10344
10345 * server.c (handle_query): Correct length check.
10346
10347 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10348
10349 * win32-low.c (do_initial_child_stuff): Add process handle
10350 parameter. Set current_process_handle and current_process_id from the
10351 parameters. Clear globals.
10352 (win32_create_inferior): Don't set current_process_handle and
10353 current_process_id here. Instead pass them on the call to
10354 do_initial_child_stuff.
10355 (win32_attach): Likewise.
10356 (win32_clear_inferiors): New.
10357 (win32_kill): Don't close the current process handle or the
10358 current thread handle here. Instead call win32_clear_inferiors.
10359 (win32_detach): Don't open a new handle to the process. Call
10360 win32_clear_inferiors.
10361 (win32_join): Don't rely on current_process_handle; open a new
10362 handle using the process id.
10363 (win32_wait): Call win32_clear_inferiors when the inferior process
10364 has exited.
10365
10366 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10367
10368 * server.c (monitor_show_help): Add "exit".
10369
10370 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10371
10372 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10373 (clean): Add reg-xtensa.c.
10374 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10375 * configure.srv (xtensa*-*-linux*) New target.
10376 * linux-xtensa-low.c: New.
10377 * xtensa-xtregs.c: New.
10378
10379 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10380
10381 * hostio.c: Don't include errno.h.
10382 (errno_to_fileio_errno): Move to hostio-errno.
10383 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10384 error number outputting to the target->hostio_last_error callback.
10385 (hostio_packet_error): Use FILEIO_EINVAL directly.
10386 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10387 calls to hostio_error.
10388 * hostio-errno.c: New.
10389 * server.h (hostio_last_error_from_errno): Declare.
10390 * target.h (target_ops): Add hostio_last_error member.
10391 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10392 as hostio_last_error handler.
10393 * spu-low.c (spu_target_ops): Likewise.
10394 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10395 (wince_hostio_last_error): New functions.
10396 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10397 as hostio_last_error handler.
10398 (win32_target_ops) [!_WIN32_WCE]: Register
10399 hostio_last_error_from_errno as hostio_last_error handler.
10400 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10401 (hostio-errno.o): New rule.
10402 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10403 * configure.srv (srv_hostio_err_objs): New variable. Default to
10404 hostio-errno.o.
10405 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10406 * configure: Regenerate.
10407
10408 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10409
10410 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10411 (linux_kill, linux_detach): Clean up the process list.
10412 * remote-utils.c (remote_open): Improve port number parsing.
10413 (putpkt_binary, input_interrupt): Only send interrupts if the target
10414 is running.
10415 * server.c (extended_protocol): Make static.
10416 (attached): Define earlier.
10417 (exit_requested, response_needed, program_argv): New variables.
10418 (target_running): New.
10419 (start_inferior): Clear attached here.
10420 (attach_inferior): Set attached here.
10421 (require_running): Define.
10422 (handle_query): Use require_running and target_running. Implement
10423 "monitor exit".
10424 (handle_v_attach, handle_v_run): New.
10425 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10426 (gdbserver_usage): Update.
10427 (main): Redo argument parsing. Handle --debug and --multi. Handle
10428 --attach along with other options or after the port. Save
10429 program_argv. Support no initial program. Resynchronize
10430 communication with GDB after an error. Handle "monitor exit".
10431 Use require_running and target_running. Always allow the extended
10432 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10433 restart in extended mode.
10434 * README: Refer to the GDB manual. Update --attach usage.
10435
10436 2007-12-20 Andreas Schwab <schwab@suse.de>
10437
10438 * linux-low.c (STACK_SIZE): Define.
10439 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10440 (linux_test_for_tracefork): Likewise.
10441
10442 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10443
10444 * linux-low.c (linux_wait_for_event): Update messages. Do not
10445 reinsert auto-delete breakpoints.
10446 * mem-break.c (struct breakpoint): Change return type of handler to
10447 int.
10448 (set_breakpoint_at): Update handler type.
10449 (reinsert_breakpoint_handler): Return 1 instead of calling
10450 delete_breakpoint.
10451 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10452 setting a new one.
10453 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10454 * mem-break.h (set_breakpoint_at): Update handler type.
10455 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10456 * win32-low.c (auto_delete_breakpoint): New.
10457 (get_child_debug_event): Use it.
10458
10459 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10460
10461 * configure.ac: Check for pread and pwrite.
10462 * hostio.c (handle_pread): Fall back to lseek and read.
10463 (handle_pwrite): Fall back to lseek and write.
10464 * config.in, configure: Regenerated.
10465
10466 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10467
10468 * server.c (myresume): Add own_buf argument.
10469 (main): Update calls.
10470
10471 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10472
10473 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10474 * remote-utils.c (remote_open): Do not call disable_async_io.
10475 (block_async_io): Delete.
10476 (unblock_async_io): Make static.
10477 (initialize_async_io): New.
10478 * server.c (handle_v_cont): Handle async I/O here.
10479 (myresume): Likewise. Move other common resume tasks here...
10480 (main): ... from here. Call initialize_async_io. Disable async
10481 I/O before the main loop.
10482 * server.h (initialize_async_io): Declare.
10483 (block_async_io, unblock_async_io): Delete prototypes.
10484 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10485
10486 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10487
10488 * remote-utils.c (readchar): Allow binary data in received messages.
10489
10490 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10491
10492 * win32-low.c (attaching): New global.
10493 (win32_create_inferior): Clear the `attaching' global.
10494 (win32_attach): Set the `attaching' global.
10495 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10496 attaching. Only set a breakpoint at the entry point if not
10497 attaching.
10498
10499 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10500
10501 * server.c (main): Don't report dll events on the initial
10502 connection on attaches.
10503
10504 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10505
10506 * server.c (main): Relax numerical bases supported for the pid of
10507 the --attach command line argument.
10508
10509 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10510
10511 * win32-low.c (win32_attach): Call OpenProcess before
10512 DebugActiveProcess, not after. Add last error output to error
10513 call.
10514
10515 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10516
10517 * win32-low.c (win32_get_thread_context)
10518 (win32_set_thread_context): New functions.
10519 (thread_rec): Use win32_get_thread_context.
10520 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10521 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10522 field.
10523
10524 2007-12-03 Leo Zayas
10525 Pedro Alves <pedro_alves@portugalmail.pt>
10526
10527 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10528 global variables.
10529 (child_add_thread): Minor cleanup.
10530 (child_continue): Resume artificially suspended threads before
10531 calling ContinueDebugEvent.
10532 (suspend_one_thread): New.
10533 (fake_breakpoint_event): New.
10534 (get_child_debug_event): Change return type to int. Check here if
10535 gdb sent an interrupt request. If a soft interrupt was requested,
10536 fake a breakpoint event. Return 0 if there is no event to handle,
10537 and 1 otherwise.
10538 (win32_wait): Don't check here if gdb sent an interrupt request.
10539 Ensure there is a valid event to handle.
10540 (win32_request_interrupt): Add soft interruption method as last
10541 resort.
10542
10543 2007-12-03 Leo Zayas
10544 Pedro Alves <pedro_alves@portugalmail.pt>
10545
10546 * win32-low.h (win32_thread_info): Add descriptions to the
10547 structure members. Replace `suspend_count' counter by a
10548 `suspended' flag.
10549 * win32-low.c (thread_rec): Update condition of when to get the
10550 context from the inferior. Rely on ContextFlags being set if it
10551 has already been retrieved. Only suspend the inferior thread if
10552 we haven't already. Warn if that fails.
10553 (continue_one_thread): s/suspend_count/suspended/. Only call
10554 ResumeThread once. Warn if that fails.
10555
10556 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10557
10558 * win32-low.c (win32_wait): Don't read from the inferior when it
10559 has already exited.
10560
10561 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10562
10563 * Makefile.in (win32_low_h): New variable.
10564 (win32-low.o): Add dependency on $(win32_low_h).
10565 (win32-arm-low.o, win32-i386-low.o): New rules.
10566
10567 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10568
10569 * hostio.c: Correct copyright year.
10570
10571 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10572
10573 * Makefile.in (OBS): Add hostio.o.
10574 (hostio.o): New rule.
10575 * server.h (handle_vFile): Declare.
10576 * hostio.c: New file.
10577 * server.c (handle_v_requests): Take packet_len and new_packet_len
10578 for binary packets. Call handle_vFile.
10579 (main): Update call to handle_v_requests.
10580
10581 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10582
10583 * linux-low.c: Include <sched.h>.
10584
10585 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10586
10587 * linux-low.c (linux_tracefork_grandchild): New.
10588 (linux_tracefork_child): Use clone.
10589 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10590
10591 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10592
10593 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10594
10595 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10596
10597 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10598
10599 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10600
10601 * inferiors.c (change_inferior_id): Delete.
10602 (add_pid_to_list, pull_pid_from_list): New.
10603 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10604 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10605 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10606 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10607 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10608 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10609 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10610 (using_threads): Always set to 1.
10611 (handle_extended_wait): New.
10612 (add_process): Do not set TID.
10613 (linux_create_inferior): Set must_set_ptrace_flags.
10614 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10615 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10616 (linux_thread_alive): Rename TID argument to LWPID.
10617 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10618 (linux_wait_for_event): Do not use TID or check using_threads. Update
10619 call to dead_thread_notify. Call handle_extended_wait.
10620 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10621 (send_sigstop): Delete sigstop_sent.
10622 (wait_for_sigstop): Avoid TID.
10623 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10624 (linux_test_for_tracefork): New.
10625 (linux_lookup_signals): Use thread_db_active and
10626 linux_supports_tracefork_flag.
10627 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10628 * linux-low.h (get_process_thread): Avoid TID.
10629 (struct process_ifo): Move thread_known and tid to the end. Remove
10630 sigstop_sent.
10631 (linux_attach_lwp, thread_db_init): Update prototypes.
10632 * server.h (change_inferior_id): Delete prototype.
10633 (add_pid_to_list, pull_pid_from_list): New prototypes.
10634 * thread-db.c (thread_db_use_events): New.
10635 (find_first_thread): Rename to...
10636 (find_one_thread): ...this. Update callers and messages. Do not
10637 call fatal. Check thread_db_use_events. Do not call
10638 change_inferior_id or new_thread_notify.
10639 (maybe_attach_thread): Update. Do not call new_thread_notify.
10640 (thread_db_init): Set thread_db_use_events. Check use_events.
10641 * utils.c (fatal, warning): Correct message prefix.
10642
10643 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10644
10645 * Makefile.in (clean): Remove new files.
10646 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10647 (powerpc-64.o, powerpc-64.c): New rules.
10648 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10649 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10650 with SPE.
10651 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10652 SPE targets.
10653 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10654 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10655 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10656 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10657 (target_regsets): Add AltiVec and SPE register sets.
10658 * configure.ac: Check for AltiVec and SPE.
10659 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10660 (ppc_fill_vrregset, ppc_store_vrregset): New.
10661 (target_regsets): Add AltiVec register set.
10662 * configure: Regenerated.
10663
10664 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10665
10666 * linux-low.c (O_LARGEFILE): Define.
10667 (linux_read_memory): Use /proc/PID/mem.
10668 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10669 * configure, config.in: Regenerated.
10670
10671 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10672
10673 * linux-low.c (linux_wait_for_event): Do not pass signals while
10674 single-stepping.
10675
10676 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10677
10678 * win32-low.c (create_process): New.
10679 (win32_create_inferior): Use create_process instead of
10680 CreateProcess. If create_process failed retry appending an ".exe"
10681 suffix. Store the GetLastError result immediatelly after
10682 create_process calls and use it on the call to error.
10683
10684 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10685
10686 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10687
10688 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10689
10690 * configure.ac: Switch license to GPLv3.
10691
10692 2007-08-01 Michael Snyder <msnyder@access-company.com>
10693
10694 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10695
10696 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10697
10698 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10699 typedef.
10700 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10701 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10702 CloseToolhelp32Snapshot.
10703 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10704 CloseToolhelp32Snapshot.
10705
10706 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10707
10708 * server.c (main): Check for inferior exit before main loop.
10709
10710 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10711
10712 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10713 instead of on tmp_desc.
10714
10715 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10716 Daniel Jacobowitz <dan@codesourcery.com>
10717
10718 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10719 (add_thread): Minor cleanups.
10720 (clear_inferiors): Move lower in the file. Clear the DLL
10721 list.
10722 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10723 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10724 (xml_escape_text): New.
10725 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10726 for qSupported.
10727 (handle_v_cont): Report errors.
10728 (gdbserver_version): Update.
10729 (main): Correct size of own_buf. Do not report initial DLL events.
10730 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10731 (unloaded_dll, xml_escape_text): New.
10732 * win32-low.c (enum target_waitkind): Update comments.
10733 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10734 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10735 (win32_EnumProcessModules, win32_GetModuleInformation)
10736 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10737 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10738 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10739 (win32_Module32First, win32_Module32Next, load_toolhelp)
10740 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10741 (get_child_debug_event): Handle DLL events.
10742 (win32_wait): Likewise.
10743
10744 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10745
10746 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10747 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10748
10749 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10750
10751 * win32-low.c (handle_output_debug_string): Ignore event if not
10752 waiting.
10753
10754 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10755
10756 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10757
10758 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10759
10760 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10761
10762 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10763
10764 * inferiors.c (change_inferior_id): Add comment.
10765 * linux-low.c (check_removed_breakpoint): Add an early
10766 prototype. Improve debug output.
10767 (linux_attach): Doc update.
10768 (linux_detach_one_process, linux_detach): Clean up before releasing
10769 each process.
10770 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10771 * linux-low.h (struct process_info): Doc improvement.
10772 * mem-break.c (delete_all_breakpoints): New.
10773 * mem-break.h (delete_all_breakpoints): New prototype.
10774 * thread-db.c (find_first_thread): New.
10775 (thread_db_create_event): Call it instead of
10776 thread_db_find_new_threads. Clean up unused variables.
10777 (maybe_attach_thread): Remove first thread handling.
10778 (thread_db_find_new_threads): Use find_first_thread.
10779 (thread_db_get_tls_address): Likewise.
10780
10781 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10782
10783 * thread-db.c (thread_db_find_new_threads): Add prototype.
10784 (thread_db_create_event): Check for the main thread before adding
10785 a new thread.
10786 (maybe_attach_thread): Only enable event reporting if TID == 0.
10787 (thread_db_get_tls_address): Check for new threads.
10788
10789 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10790
10791 * linux-low.c (linux_create_inferior): Try execv before execvp.
10792 * spu-low.c (spu_create_inferior): Likewise.
10793
10794 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10795
10796 * linux-low.c (linux_create_inferior): Change execv to execvp.
10797 * spu-low.c (spu_create_inferior): Likewies.
10798
10799 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10800
10801 * Makefile.in (clean): Clean new files instead of deleted ones.
10802 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10803 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10804 rules.
10805 * configure.srv: Specify XML files and new regformats for MIPS and
10806 MIPS64 GNU/Linux.
10807 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10808 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10809 an entry for the restart register.
10810 (mips_cannot_fetch_register, mips_cannot_store_register)
10811 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10812 register names to match the XML descriptions.
10813 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10814 restart register instead of $0.
10815
10816 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10817 Markus Deuling <deuling@de.ibm.com>
10818
10819 * remote-utils.c (decode_xfer_write): New function.
10820 * server.h (decode_xfer_write): Add prototype.
10821 * server.c (handle_query): Add PACKET_LEN argument. Support
10822 qXfer:spu:read and qXfer:spu:write packets.
10823 (main): Pass packet_len to handle_query.
10824 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10825 * target.h (target_ops): Add qxfer_spu.
10826
10827 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10828
10829 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10830 accessing non-seekable spufs files.
10831
10832 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10833
10834 * server.c (handle_query): Add reply for qC packet.
10835
10836 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10837 Leo Zayas <lerele@champenstudios@com>
10838
10839 * server.h (check_remote_input_interrupt_request): New function.
10840 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10841 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10842 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10843 (check_remote_input_interrupt_request): New function.
10844 * server.h (check_remote_input_interrupt_request): Declare.
10845 * win32-low.c (winapi_DebugBreakProcess,
10846 winapi_GenerateConsoleCtrlEvent): New typedefs.
10847 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10848 to 250 ms.
10849 (win32_wait): Check for remote interrupt request
10850 with check_remote_input_interrupt_request.
10851 (win32_request_interrupt): New function.
10852 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10853
10854 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10855
10856 * win32-low.c (debug_registers_changed,
10857 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10858 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10859 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10860 (thread_rec): Get context using the low target.
10861 (child_add_thread): Call thread_added on the low target,
10862 which does the same thing.
10863 (regptr): Delete.
10864 (do_initial_child_stuff): Remove debug registers references.
10865 Set context using the low target. Resume threads after
10866 setting the contexts.
10867 (child_continue): Remove dead variable. Remove debug
10868 registers references.
10869 (child_fetch_inferior_registers): Go through the low target.
10870 (do_child_store_inferior_registers): Remove.
10871 (child_store_inferior_registers): Go through the low target.
10872 (win32_resume): Remove debug registers references.
10873 Set context using the low target.
10874 (handle_exception): Change return type to void. Don't record
10875 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10876 first chance exception.
10877 (get_child_debug_event): Change return type to void. Remove
10878 goto loop. Always return after waiting for debug event.
10879 (win32_wait): Convert to switch statement. Handle spurious
10880 events.
10881
10882 * win32-i386-low.c (debug_registers_changed,
10883 debug_registers_used): New.
10884 (initial_stuff): Rename to ...
10885 (i386_initial_stuff): ... this. Clear debug registers
10886 state variables.
10887 (store_debug_registers): Delete.
10888 (i386_get_thread_context): New.
10889 (load_debug_registers): Delete.
10890 (i386_set_thread_context): New.
10891 (i386_thread_added): New.
10892 (single_step): Rename to ...
10893 (i386_single_step): ... this.
10894 (do_fetch_inferior_registers): Rename to ...
10895 (i386_fetch_inferior_register): ... this.
10896 (i386_store_inferior_register): New.
10897 (the_low_target): Adapt to new interface.
10898
10899 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10900 (arm_get_thread_context): New.
10901 (arm_set_thread_context): New.
10902 (regptr): New.
10903 (do_fetch_inferior_registers): Rename to ...
10904 (arm_fetch_inferior_register): ... this.
10905 (arm_store_inferior_register): New.
10906 (arm_wince_breakpoint): Reimplement as unsigned long.
10907 (arm_wince_breakpoint_len): Define.
10908 (the_low_target): Adapt to new interface.
10909
10910 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10911 load_debug_registers. Add get_thread_context, set_thread_context,
10912 thread_added and store_inferior_register. Rename
10913 fetch_inferior_registers to fetch_inferior_register.
10914 (regptr): Remove declaration.
10915
10916 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10917
10918 * linux-low.c (linux_detach): Change return type to int. Return 0.
10919 * spu-low.c (spu_detach): Likewise.
10920
10921 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10922
10923 * target.h (target_ops): Change return type of detach to int.
10924 Add join.
10925 (join_inferior): New.
10926 * server.c (main): Don't skip detach support on mingw32.
10927 If the inferior doesn't support detaching return error.
10928 Call join_inferior instead of using waitpid.
10929 * linux-low.c (linux_join): New.
10930 (linux_target_op): Add linux_join.
10931 * spu-low.c (spu_join): New.
10932 (spu_target_ops): Add spu_join.
10933 * win32-low.c (win32_detach): Adapt to new interface.
10934 Reopen current_process_handle before detaching. Issue a child
10935 resume before detaching.
10936 (win32_join): New.
10937 (win32_target_op): Add win32_join.
10938
10939 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10940
10941 * win32-low.c (win32-attach): Fix return value.
10942 * target.h (target_ops): Describe ATTACH return values.
10943
10944 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10945
10946 * win32-low.c (GETPROCADDRESS): Define.
10947 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10948 (winapi_DebugSetProcessKillOnExit): Likewise.
10949 (win32_create_inferior): Force usage of ansi CreateProcessA.
10950 (win32_attach): Use GETPROCADDRESS.
10951 (win32_detach): Likewise.
10952
10953 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10954
10955 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10956
10957 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10958
10959 * win32-low.c: Commit leftover changes from 2007-03-29.
10960
10961 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10962
10963 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10964 fields short instead of int. Add explicit padding.
10965 (i387_cache_to_fsave): Remove unnecessary casts.
10966 (i387_fsave_to_cache): Doc fix.
10967 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10968
10969 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10970
10971 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10972 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10973
10974 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10975
10976 * configure.srv (arm*-*-mingw32ce*): Move near the other
10977 arm targets.
10978
10979 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10980
10981 * configure.ac: Add errno checking.
10982 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10983 sys/file.h and malloc.h.
10984 (AC_CHECK_DECLS): Add perror.
10985 (srv_mingwce): Handle.
10986 * configure.srv (i[34567]86-*-cygwin*): Add
10987 win32-i386-low.o to srv_tgtobj.
10988 (i[34567]86-*-mingw*): Likewise.
10989 (arm*-*-mingw32ce*): Add case.
10990 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10991 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10992 [__MINGW32CE__] (strerror): New function.
10993 [__MINGW32CE__] (errno): Define to GetLastError.
10994 [__MINGW32CE__] (COUNTOF): New macro.
10995 (remote_open): Remove extra close call.
10996 * mem-break.c (delete_breakpoint_at): New function.
10997 * mem-break.h (delete_breakpoint_at): Declare.
10998 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10999 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11000 [USE_WIN32API] (read, write): Add char* casts.
11001 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11002 * server.h: Include wincecompat.h on Windows CE.
11003 [HAVE_ERRNO_H]: Check.
11004 (perror): Declare if not declared.
11005 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11006 (perror_with_name): Remove errno declaration.
11007 * wincecompat.h: New.
11008 * wincecompat.c: New.
11009 * win32-low.h: New.
11010 * win32-arm-low.c: New.
11011 * win32-i386-low.c: New.
11012 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11013 (OUTMSG2): Make it safe.
11014 (_T): New macro.
11015 (COUNTOF): New macro.
11016 (NUM_REGS): Get it from the low target.
11017 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11018 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11019 (thread_rec): Let low target handle debug registers.
11020 (child_add_thread): Likewise.
11021 (child_init_thread_list): Likewise.
11022 (continue_one_thread): Likewise.
11023 (regptr): New.
11024 (do_child_fetch_inferior_registers): Move to ...
11025 * win32-i386-low.c: ... here, and rename to ...
11026 (do_fetch_inferior_registers): ... this.
11027 * win32-low.c (child_fetch_inferior_registers):
11028 Go through the low target.
11029 (do_child_store_inferior_registers): Use regptr.
11030 (strwinerror): New function.
11031 (win32_create_inferior): Handle Windows CE.
11032 Use strwinerror instead of strerror on Windows error
11033 codes. Add program to the error output.
11034 Don't close the main thread handle on Windows CE.
11035 (win32_attach): Use coredll.dll on Windows CE.
11036 (win32_kill): Close current process and current
11037 thread handles.
11038 (win32_detach): Use coredll.dll on Windows CE.
11039 (win32_resume): Let low target handle debug registers, and
11040 step request.
11041 (handle_exception): Add/Remove initial breakpoint. Avoid
11042 non-existant WSTOPSIG on Windows CE.
11043 (win32_read_inferior_memory): Cast to remove warning.
11044 (win32_arch_string): Go through the low target.
11045 (initialize_low): Call set_breakpoint_data with the low
11046 target's breakpoint.
11047 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11048 FOP_REGNUM, mappings): Move to ...
11049 * win32-i386-low.c: ... here.
11050 * win32-low.c (win32_thread_info): Move to ...
11051 * win32-low.h: ... here.
11052 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11053 win32-arm-low.c and wincecompat.c.
11054 (all:): Add $EXEEXT.
11055 (install-only:): Likewise.
11056 (gdbserver:): Likewise.
11057 (gdbreplay:): Likewise.
11058 * config.in: Regenerate.
11059 * configure: Regenerate.
11060
11061 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11062
11063 * win32-low.c: Rename typedef thread_info to
11064 win32_thread_info throughout.
11065
11066 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11067
11068 * win32-i386-low.c: Rename to ...
11069 * win32-low.c: ... this.
11070 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11071 * Makefile.in: Likewise.
11072
11073 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11074
11075 * remote-utils.c (monitor_output): Constify msg parameter.
11076 * server.h (monitor_output): Likewise.
11077 * win32-i386-low.c (handle_output_debug_string): New.
11078 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11079 handle_output_debug_string.
11080 (get_child_debug_event): Likewise.
11081
11082 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11083
11084 * server.c (main): Correct strtoul check.
11085
11086 2007-03-27 Jon Ringle <jon@ringle.org>
11087
11088 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11089
11090 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11091
11092 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11093
11094 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11095
11096 * terminal.h: Check HAVE_SGTTY_H.
11097
11098 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11099
11100 * remote-utils.c (remote_open): Print out the assigned port number.
11101
11102 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11103
11104 * remote-utils.c (monitor_output): New function.
11105 * server.c (debug_threads): Define here.
11106 (monitor_show_help): New function.
11107 (handle_query): Handle qRcmd.
11108 (main): Do not handle 'd' packet.
11109 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11110 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11111 of debug_threads.
11112
11113 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11114
11115 * Makefile.in (EXEEXT): New.
11116 (clean): Use $(EXEEXT).
11117
11118 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11119
11120 * target.h (target_ops): Rename send_signal to request_interrupt,
11121 and remove enum target_signal parameter.
11122 * linux-low.c (linux_request_interrupt): Rename from
11123 linux_send_signal, and always send SIGINT.
11124 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11125 and always send SIGINT.
11126 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11127 of send_signal.
11128 (input_interrupt): Likewise.
11129
11130 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11131
11132 * server.c (get_features_xml): Check if target implemented
11133 arch_string.
11134 * win32-i386-low.c (win32_arch_string): New.
11135 (win32_target_ops): Add win32_arch_string as arch_string member.
11136
11137 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11138
11139 * spu-low.c (spu_arch_string): New.
11140 (spu_target_ops): Add spu_arch_string.
11141
11142 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11143
11144 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11145 * configure.ac: Do not check for terminal.h.
11146 * configure, config.in: Regenerated.
11147
11148 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11149
11150 * Makefile.in (OBS): Add $(XML_BUILTIN).
11151 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11152 (clean): Update.
11153 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11154 (arm-with-iwmmxt.c): New.
11155 * config.in, configure: Regenerate.
11156 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11157 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11158 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11159 (arm*-*-linux*): Add iWMMXt and regset support.
11160 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11161 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11162 (arm_store_wmmxregset, target_regsets): New.
11163 * server.c (get_features_xml): Take annex argument. Check builtin
11164 XML documents.
11165 (handle_query): Handle multiple annexes.
11166
11167 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11168
11169 * remote-utils.c [USE_WIN32API] (read, write): Define.
11170 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11171 write.
11172
11173 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11174
11175 * linux-i386-low.c (the_low_target): Set arch_string.
11176 * linux-x86-64-low.c (the_low_target): Likewise.
11177 * linux-low.c (linux_arch_string): New.
11178 (linux_target_ops): Add it.
11179 * linux-low.h (struct linux_target_ops): Add arch_string.
11180 * server.c (write_qxfer_response): Use const void * for DATA.
11181 (get_features_xml): New.
11182 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11183 * target.h (struct target_ops): Add arch_string method.
11184
11185 2007-01-03 Denis Pilat <denis.pilat@st.com>
11186 Daniel Jacobowitz <dan@codesourcery.com>
11187
11188 * linux-low.c (linux_kill): Handle being called with no threads.
11189 * win32-i386-low.c (win32_kill): Likewise.
11190 (get_child_debug_event): Clear current_process_handle.
11191
11192 2006-12-30 Denis PILAT <denis.pilat@st.com>
11193 Daniel Jacobowitz <dan@codesourcery.com>
11194
11195 * remote-utils.c (remote_open): Check the type of specified
11196 serial port devices before opening them.
11197 * server.c (main): Kill the inferior if an error occurs during
11198 the first remote_open.
11199
11200 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11201
11202 * README: Update supported targets.
11203
11204 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11205
11206 * Makefile.in (clean): Remove reg-mips64.c.
11207 (reg-mips64.c, reg-mips64.o): New rules.
11208 * configure.srv: Handle mips64. Include regset support for mips.
11209 * linux-mips-low.c (union mips_register): New.
11210 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11211 (mips_breakpoint, mips_breakpoint_at): Use int.
11212 (mips_collect_register, mips_supply_register)
11213 (mips_collect_register_32bit, mips_supply_register_32bit)
11214 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11215 (mips_store_fpregset, target_regsets): New.
11216 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11217
11218 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11219
11220 * configure.srv: Add target "spu*-*-*".
11221 * Makefile.in (clean): Remove reg-spu.c.
11222 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11223 * spu-low.c: New file.
11224
11225 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11226
11227 * configure.ac: Correct td_thr_tls_get_addr test.
11228 * configure: Regenerated.
11229
11230 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11231
11232 * linux-low.c (linux_wait_for_event): Reformat. Use the
11233 pass_signals array.
11234 * remote-utils.c (decode_address_to_semicolon): New.
11235 * server.c (pass_signals, handle_general_set): New.
11236 (handle_query): Mention QPassSignals for qSupported.
11237 (main): Call handle_general_set.
11238 * server.h (pass_signals, decode_address_to_semicolon): New.
11239
11240 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11241
11242 * server.c (handle_query): Correct error handling for read_auxv.
11243
11244 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11245
11246 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11247 and srv_linux_thread_db to yes.
11248 * linux-s390-low.c (s390_fill_gregset): New function.
11249 (target_regsets): Define data structure.
11250
11251 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11252
11253 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11254 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11255 * config.in, configure: Regenerated.
11256 * inferiors.c (gdb_id_to_thread): New function.
11257 (gdb_id_to_thread_id): Use it.
11258 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11259 * linux-low.h (struct process_info): Add th member.
11260 (thread_db_get_tls_address): New prototype.
11261 * remote-utils.c (decode_address): Make non-static.
11262 * server.c (handle_query): Handle qGetTLSAddr.
11263 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11264 * target.h (struct target_ops): Add get_tls_address.
11265 * thread-db.c (maybe_attach_thread): Save the thread handle.
11266 (thread_db_get_tls_address): New.
11267
11268 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11269
11270 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11271 (linux_resume_one_process): Take a siginfo_t *. Update all
11272 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11273 (struct pending_signals): Add a siginfo_t.
11274 (linux_wait_for_process): Always set last_status.
11275 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11276 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11277 * linux-low.h (struct process_info): Add last_status.
11278
11279 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11280
11281 * remote-utils.c (try_rle): New function.
11282 (putpkt_binary): Use it.
11283
11284 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11285
11286 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11287 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11288 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11289 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11290 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11291 point registers.
11292
11293 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11294
11295 * server.c (terminal_fd): New variable.
11296 (old_foreground_pgrp): Likewise.
11297 (restore_old_foreground_pgrp): New function.
11298 (start_inferior): Record the terminal file descriptor in terminal_fd
11299 and its original foreground group in old_foreground_pgrp. Register
11300 restore_old_foreground_pgrp with atexit().
11301
11302 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11303
11304 * server.c (handle_query): Correct qPart to qXfer.
11305
11306 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11307
11308 * configure.ac: Check for more headers which are missing on
11309 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11310 * configure.srv: Add Cygwin and mingw32.
11311 * remote-utils.c: Don't include headers unconditionally which
11312 are missing on mingw32. Include <winsock.h> for mingw32.
11313 (remote_open): Adjust for mingw32 support. Flush
11314 standard error after writing to it.
11315 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11316 (unblock_async_io, enable_async_io, disable_async_io)
11317 (readchar, getpkt): Update for Winsock support.
11318 (prepare_resume_reply): Expect a protocol signal number.
11319 * server.c: Disable <sys/wait.h> on mingw32.
11320 (start_inferior): Adjust for mingw32 support. Flush
11321 standard error after writing to it.
11322 (attach_inferior): Likewise. Use protocol signal
11323 numbers.
11324 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11325 and names.
11326 * win32-i386-low.c: New file.
11327 * Makefile.in (XM_CLIBS): Set.
11328 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11329 (win32-i386-low.o): New dependency rule.
11330 * linux-low.c (linux_wait): Use target signal numbers.
11331 * target.h (struct target_ops): Doc fix.
11332 * server.h (target_signal_to_name): New prototype.
11333 * gdbreplay.c: Don't include headers unconditionally which
11334 are missing on mingw32. Include <winsock.h> for mingw32.
11335 (remote_close, remote_open): Adjust for Winsock support.
11336 * configure, config.in: Regenerated.
11337
11338 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11339
11340 * server.c (decode_xfer_read, write_qxfer_response): New.
11341 (handle_query): Take a packet length argument. Handle
11342 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11343 the qSupported response.
11344 (main): Update call to handle_query.
11345
11346 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11347
11348 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11349 (putpkt_binary): Renamed from putpkt and adjusted for binary
11350 data.
11351 (putpkt): New wrapper for putpkt_binary.
11352 (readchar): Don't mask off the high bit.
11353 (decode_X_packet): New function.
11354 * server.c (main): Call putpkt_binary if a handler sets the packet
11355 length. Save the length of the incoming packet. Handle 'X'.
11356 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11357
11358 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11359
11360 * server.c (handle_query): Handle qSupported.
11361
11362 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11363
11364 * remote-utils.c (all_symbols_looked_up): New variable.
11365 (look_up_one_symbol): Check it.
11366 * server.h (look_up_one_symbol): New declaration.
11367 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11368
11369 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11370
11371 * Makefile.in (linux-arm-low.o): Update dependencies.
11372 * linux-arm-low.c: Include "gdb_proc_service.h".
11373 (PTRACE_GET_THREAD_AREA): Define.
11374 (ps_get_thread_area): New function.
11375
11376 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11377
11378 * configure.srv (m68k*-*-uclinux*): New target.
11379 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11380 (linux_resume_one_process): Remove extraneous cast.
11381 (linux_read_offsets): New.
11382 (linux_target_op): Add linux_read_offsets on mmuless systems.
11383 * server.c (handle_query): Add qOffsets logic.
11384 * target.h (struct target_ops): Add read_offsets.
11385
11386 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11387
11388 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11389 (PTRACE_GET_THREAD_AREA): Define.
11390 (ps_get_thread_area): New function.
11391 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11392 (linux-x86-64-low.o): Update.
11393
11394 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11395
11396 * configure.ac: Remove checks for prfpregset_t.
11397 * gdb_proc_service.h: New file.
11398 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11399 new "gdb_proc_service.h".
11400 * proc-service.c: Likewise.
11401 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11402 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11403 * Makefile.in (gdb_proc_service_h): Updated.
11404 * configure, config.in: Regenerated.
11405
11406 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11407
11408 * remote-utils.c (prepare_resume_reply): Move declaration
11409 of gdb_id_from_wait to the top of the block.
11410
11411 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11412
11413 * linux-low.c (regsets_store_inferior_registers): Read the regset
11414 from the target before filling it.
11415
11416 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11417
11418 * server.c (attach_inferior): Return SIGTRAP for a successful
11419 attach.
11420
11421 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11422
11423 * Makefile.in (OBS): Add version.o.
11424 (STAGESTUFF): Delete.
11425 (version.o): Add dependencies.
11426 (version.c): Replace rule.
11427 (clean): Remove version.c.
11428 * server.c (gdbserver_version): New.
11429 (gdbserver_usage): Use printf.
11430 (main): Handle --version and --help.
11431 * server.h (version, host_name): Add declarations.
11432
11433 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11434
11435 * linux-arm-low.c:
11436 * linux-arm-low.c:
11437 * inferiors.c:
11438 * i387-fp.h:
11439 * i387-fp.c:
11440 * gdbreplay.c:
11441 * regcache.c:
11442 * proc-service.c:
11443 * mem-break.h:
11444 * mem-break.c:
11445 * linux-x86-64-low.c:
11446 * linux-sh-low.c:
11447 * linux-s390-low.c:
11448 * linux-ppc64-low.c:
11449 * linux-ppc-low.c:
11450 * linux-mips-low.c:
11451 * linux-m68k-low.c:
11452 * linux-m32r-low.c:
11453 * linux-low.h:
11454 * linux-low.c:
11455 * linux-ia64-low.c:
11456 * linux-i386-low.c:
11457 * linux-crisv32-low.c:
11458 * thread-db.c:
11459 * terminal.h:
11460 * target.h:
11461 * target.c:
11462 * server.h:
11463 * server.c:
11464 * remote-utils.c:
11465 * regcache.h:
11466 * utils.c:
11467 * Makefile.in:
11468 * configure.ac:
11469 * gdbserver.1: Add (C) after Copyright. Update the FSF
11470 address.
11471
11472 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11473
11474 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11475 (arm_breakpoint_at): Recognize both breakpoints.
11476 (the_low_target): Use the correct breakpoint instruction.
11477
11478 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11479
11480 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11481 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11482 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11483 (the_low_target): Update.
11484
11485 2005-10-25 Andreas Schwab <schwab@suse.de>
11486
11487 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11488
11489 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11490 (ia64_num_regs): Reduce to 462.
11491
11492 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11493
11494 * acinclude.m4: Correct quoting.
11495 * aclocal.m4: Regenerated.
11496
11497 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11498 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11499 (thread_db_init): Call thread_db_err_str.
11500 * configure.ac: Check for TD_VERSION.
11501 * config.in, configure: Regenerated.
11502
11503 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11504
11505 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11506
11507 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11508
11509 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11510 is not available. Define HAVE_PTRACE_GETREGS if it is.
11511 * config.in, configure: Regenerated.
11512 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11513 * linux-i386-low.c, linux-m68k-low.c: Update to use
11514 HAVE_PTRACE_GETREGS.
11515 * linux-low.c (regsets_fetch_inferior_registers)
11516 (regsets_store_inferior_registers): Only return 0 if we processed
11517 GENERAL_REGS.
11518 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11519 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11520
11521 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11522
11523 * inferiors.c (struct thread_info): Add gdb_id.
11524 (add_thread): Add gdb_id argument.
11525 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11526 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11527 calls to add_thread.
11528 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11529 * server.c (handle_query): Use thread_to_gdb_id.
11530 (handle_v_cont, main): Use gdb_id_to_thread_id.
11531 * server.h (add_thread): Update prototype.
11532 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11533 prototypes.
11534
11535 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11536
11537 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11538 left-padded registers.
11539 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11540 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11541
11542 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11543
11544 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11545 * configure: Regenerate.
11546 * config.in: Regenerate.
11547 * server.h (NEED_DECLARATION_STRERROR):
11548 Replace with !HAVE_DECL_STRERROR.
11549
11550 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11551
11552 * linux-low.c (linux_wait, linux_send_signal): Don't test
11553 an unsigned long variable for > 0 if it could be MAX_ULONG.
11554 * server.c (myresume): Likewise.
11555 * target.c (set_desired_inferior): Likewise.
11556
11557 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11558
11559 * configure.ac: Simplify and improve check for socklen_t.
11560 * configure, config.in: Regenerate.
11561
11562 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11563
11564 * acconfig.h: Remove.
11565 * configure.ac: Add a test for socklen_t. Use three-argument
11566 AC_DEFINE throughout.
11567 * config.in: Regenerated using autoheader 2.59.
11568 * configure: Regenerated.
11569
11570 * gdbreplay.c (socklen_t): Provide a default.
11571 (remote_open): Use socklen_t.
11572 * remote-utils.c (socklen_t): Provide a default.
11573 (remote_open): Use socklen_t.
11574 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11575 unsigned char.
11576
11577 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11578 char for buffers.
11579 * linux-low.c (linux_read_memory, linux_write_memory)
11580 (linux_read_auxv): Likewise.
11581 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11582 (check_mem_write): Likewise.
11583 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11584 Likewise.
11585 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11586 (registers_from_string, register_data): Likewise.
11587 * server.c (handle_query, main): Likewise.
11588 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11589 (decode_M_packet): Likewise.
11590 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11591 * target.h (struct target_ops): Update read_memory, write_memory,
11592 and read_auxv.
11593 (read_inferior_memory, write_inferior_memory): Update.
11594 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11595 to unsigned char *.
11596 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11597 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11598 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11599 linux-s390-low.c, linux-sh-low.c: Update for changes in
11600 read_inferior_memory and the_low_target->breakpoint.
11601
11602 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11603
11604 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11605 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11606 * configure.srv: Add powerpc64-*-linux*.
11607 * linux-ppc64-low.c: New file.
11608
11609 2005-05-23 Orjan Friberg <orjanf@axis.com>
11610
11611 * linux-cris-low.c: New file with support for CRIS.
11612 * linux-crisv32-low.c: Ditto for CRISv32.
11613 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11614 (clean): Add reg-cris.c and reg-crisv32.c.
11615 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11616 reg-crisv32.o, and reg-crisv32.c to make rules.
11617 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11618 recognized targets.
11619
11620 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11621
11622 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11623 of sizeof (PTRACE_XFER_TYPE).
11624 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11625
11626 2005-05-12 Orjan Friberg <orjanf@axis.com>
11627
11628 * target.h (struct target_ops): Add insert_watchpoint,
11629 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11630 pointers for hardware watchpoint support.
11631 * linux-low.h (struct linux_target_ops): Ditto.
11632 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11633 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11634 to linux_target_ops.
11635 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11636 reply packet.
11637 * server.c (main): Recognize 'Z' and 'z' packets.
11638
11639 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11640
11641 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11642 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11643 (the_low_target): Add new members.
11644
11645 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11646
11647 * proc-service.c (ps_lgetregs): Search all_processes instead of
11648 all_threads.
11649
11650 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11651
11652 * server.c (start_inferior): Change return type to int.
11653 (attach_inferior): Change sigptr to int *.
11654 (handle_v_cont, handle_v_requests): Change signal to int *.
11655 (main): Change signal to int.
11656
11657 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11658
11659 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11660 * configure.srv: Add m32r*-*-linux*.
11661 * linux-m32r-low.c: New file.
11662
11663 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11664
11665 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11666
11667 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11668
11669 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11670 Take unsigned long arguments for PIDs.
11671 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11672 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11673 (wait_for_sigstop, linux_resume_one_process)
11674 (regsets_fetch_inferior_registers, linux_send_signal)
11675 (linux_read_auxv): Likewise. Update the types of variables holding
11676 PIDs. Update format string specifiers.
11677 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11678 * remote-utils.c (prepare_resume_reply): Likewise.
11679 * server.c (cont_thread, general_thread, step_thread)
11680 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11681 unsigned long.
11682 (handle_query): Update format specifiers.
11683 (handle_v_cont, main): Use strtoul for thread IDs.
11684 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11685 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11686 (general_thread, step_thread, thread_from_wait)
11687 (old_thread_from_wait): Update.
11688 * target.h (struct thread_resume): Use unsigned long for THREAD.
11689 (struct target_ops): Use unsigned long for arguments to attach and
11690 thread_alive.
11691
11692 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11693
11694 * acinclude.m4: Include bfd/bfd.m4 directly.
11695 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11696 <agriffis@toolchain.org>.
11697 * aclocal.m4, configure: Regenerated.
11698
11699 2005-01-07 Andrew Cagney <cagney@gnu.org>
11700
11701 * configure.ac: Rename configure.in, require autoconf 2.59.
11702 * configure: Re-generate.
11703
11704 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11705
11706 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11707 LIBS when finished.
11708 * aclocal.m4: Regenerated.
11709 * configure: Regenerated.
11710
11711 2004-11-21 Andreas Schwab <schwab@suse.de>
11712
11713 * linux-m68k-low.c (m68k_num_gregs): Define.
11714 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11715 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11716 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11717 (m68k_breakpoint_at): New. Add to the_low_target.
11718
11719 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11720 srv_linux_thread_db to yes.
11721
11722 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11723
11724 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11725 (ARCH_SET_FS): Likewise.
11726 (ARCH_GET_FS): Likewise.
11727 (ARCH_GET_GS): Likewise.
11728
11729 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11730
11731 * linux-i386-low.c (ps_get_thread_area): New.
11732 * linux-x86-64-low.c (ps_get_thread_area): New.
11733 * linux-low.c: Include <sys/syscall.h>.
11734 (linux_kill_one_process): Don't kill the first thread here.
11735 (linux_kill): Kill the first thread here.
11736 (kill_lwp): New function.
11737 (send_sigstop, linux_send_signal): Use it.
11738 * proc-service.c: Clean up #ifdefs.
11739 (fpregset_info): Delete.
11740 (ps_lgetregs): Update and enable implementation.
11741 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11742 implementations.
11743 * remote-utils.c (struct sym_cache, symbol_cache): New.
11744 (input_interrupt): Print a clearer message.
11745 (async_io_enabled): New variable.
11746 (enable_async_io, disable_async_io): Use it. Update comments.
11747 (look_up_one_symbol): Use the symbol cache.
11748 * thread-db.c (thread_db_look_up_symbols): New function.
11749 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11750
11751 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11752
11753 * configure.in: Test for -rdynamic.
11754 * configure: Regenerated.
11755 * Makefile (INTERNAL_LDFLAGS): New.
11756 (gdbserver, gdbreplay): Use it.
11757
11758 2004-09-02 Andrew Cagney <cagney@gnu.org>
11759
11760 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11761
11762 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11763
11764 * linux-low.c (linux_wait): Clear all_processes list also.
11765
11766 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11767
11768 * linux-low.c: Include <errno.h>. Remove extern declaration of
11769 errno.
11770
11771 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11772
11773 * gdbreplay.c, server.h, utils.c: Update copyright years.
11774
11775 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11776
11777 * server.c (main): Print child status or termination signal from
11778 variable 'signal', not 'sig'.
11779
11780 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11781
11782 * linux-low.c (linux_read_memory): Change return type to
11783 int. Check for and return error from ptrace().
11784 * target.c (read_inferior_memory): Change return type to int. Pass
11785 back return status from the_target->read_memory().
11786 * target.h (struct target_ops): Adapt *read_memory() prototype.
11787 Update comment.
11788 (read_inferior_memory): Adapt prototype.
11789 * server.c (main): Return an error packet if
11790 read_inferior_memory() returns an error.
11791
11792 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11793
11794 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11795 Unify with other clean targets.
11796
11797 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11798
11799 * server.c (handle_v_cont): Call set_desired_inferior.
11800
11801 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11802
11803 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11804
11805 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11806
11807 * linux-low.c (linux_wait): Unblock async I/O.
11808 (linux_resume): Block and enable async I/O.
11809 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11810 * server.h (block_async_io, unblock_async_io): Add prototypes.
11811
11812 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11813
11814 * remote-utils.c (remote_open): Print a status notice after
11815 opening a TCP port.
11816 * server.c (attach_inferior): Print a status notice after
11817 attaching.
11818
11819 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11820
11821 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11822
11823 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11824
11825 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11826 error packet.
11827 * server.c, target.h: Update copyright years.
11828
11829 2004-02-25 Roland McGrath <roland@redhat.com>
11830
11831 * target.h (struct target_ops): New member `read_auxv'.
11832 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11833 * linux-low.c (linux_read_auxv): New function.
11834 (linux_target_ops): Initialize `read_auxv' member to that.
11835
11836 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11837
11838 Committed by Jim Blandy <jimb@redhat.com>.
11839
11840 * linux-s390-low.c (s390_num_regs): Update.
11841 (s390_regmap): Remove control registers. Use __s390x__ predefine
11842 instead of GPR_SIZE to distiguish s390 and s390x targets.
11843
11844 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11845
11846 * linux-low.c: Update copyright year.
11847 (check_removed_breakpoint): Clear pending_is_breakpoint.
11848 (linux_set_resume_request, linux_queue_one_thread)
11849 (resume_status_pending_p): New functions.
11850 (linux_continue_one_thread): Use process->resume.
11851 (linux_resume): Only resume threads if there are no pending events.
11852 * linux-low.h (struct process_info): Add resume request
11853 pointer.
11854
11855 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11856
11857 * regcache.c (new_register_cache): Clear the allocated register
11858 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11859
11860 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11861
11862 * linux-low.c (linux_resume): Take a struct thread_resume *
11863 argument.
11864 (linux_wait): Update call.
11865 (resume_ptr): New static variable.
11866 (linux_continue_one_thread): Renamed from
11867 linux_continue_one_process. Use resume_ptr.
11868 (linux_resume): Use linux_continue_one_thread.
11869 * server.c (handle_v_cont, handle_v_requests): New functions.
11870 (myresume): New function.
11871 (main): Handle 'v' case.
11872 * target.h (struct thread_resume): New type.
11873 (struct target_ops): Change argument of "resume" to struct
11874 thread_resume *.
11875 (myresume): Delete macro.
11876
11877 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11878
11879 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11880 (uninstall): Support DESTDIR.
11881
11882 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11883
11884 * configure.srv: Add xscale*linux copy of arm*linux entry.
11885
11886 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11887
11888 * linux-arm-low.c (arm_reinsert_addr): New function.
11889 (the_low_target): Add arm_reinsert_addr.
11890
11891 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11892
11893 * mem-break.c: Remove whitespace at end of file.
11894
11895 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11896
11897 * configure.in: Check whether we need to prototype strerror.
11898 * server.h: Optionally prototype strerror.
11899 * gdbreplay.c (perror_with_name): Use strerror.
11900 * linux-low.c (linux_attach_lwp): Use strerror.
11901 * utils.c (perror_with_name): Use strerror.
11902 * config.in, configure: Regenerated.
11903
11904 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11905
11906 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11907 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11908
11909 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11910
11911 * Makefile.in (SFILES): Update.
11912 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11913 low-sun3.c: Remove files.
11914
11915 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11916
11917 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11918 (linux_detach_one_process, linux_detach): New functions.
11919 (linux_target_ops): Add linux_detach.
11920 * server.c (main): Handle 'D' packet.
11921 * target.h (struct target_ops): Add "detach" member.
11922 (detach_inferior): Define.
11923
11924 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11925
11926 From Kelley Cook <kelleycook@wideopenwest.com>:
11927 * configure.srv: Accept i[34567]86 variants.
11928
11929 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11930
11931 * linux-low.c (linux_wait_for_event): Correct comment typos.
11932 (linux_resume_one_process): Call check_removed_breakpoint.
11933 (linux_send_signal): New function.
11934 (linux_target_ops): Add linux_send_signal.
11935 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11936 of kill.
11937 * target.h (struct target_ops): Add send_signal.
11938
11939 2003-05-29 Jim Blandy <jimb@redhat.com>
11940
11941 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11942 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11943 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11944 away part of the register's value.
11945
11946 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11947
11948 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11949 (linux_wait_for_event, linux_init_signals): Likewise.
11950
11951 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11952
11953 * configure.in: Check for stdlib.h.
11954 * configure: Regenerated.
11955 * config.in: Regenerated.
11956
11957 2003-01-04 Andreas Schwab <schwab@suse.de>
11958
11959 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11960
11961 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11962
11963 * Makefile.in: Remove obsolete code.
11964
11965 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11966
11967 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11968 defined(PT_FPR0_HI).
11969
11970 2002-11-17 Stuart Hughes <seh@zee2.com>
11971
11972 * linux-arm-low.c (arm_num_regs): Increase.
11973 (arm_regmap): Include status register.
11974
11975 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11976
11977 * linux-low.c (register_addr): Remove incorrect -1 check.
11978
11979 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11980
11981 * linux-low.c (linux_create_inferior): Call setpgid. Return
11982 the new PID.
11983 (unstopped_p, linux_signal_pid): Remove.
11984 (linux_target_ops): Remove linux_signal_pid.
11985 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11986 global instead of target method.
11987 * target.h (struct target_ops): Remove signal_pid. Update comment
11988 for create_inferior.
11989 * server.c (signal_pid): New variable.
11990 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11991 gdbserver. Set the child to be the foreground process group.
11992 (attach_inferior): Set signal_pid.
11993
11994 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11995
11996 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11997
11998 2002-08-20 Jim Blandy <jimb@redhat.com>
11999
12000 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12001 default for this.
12002
12003 2002-08-01 Andrew Cagney <cagney@redhat.com>
12004
12005 * Makefile.in: Make chill references obsolete.
12006
12007 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12008
12009 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12010 * configure: Regenerate.
12011 * config.in: Regenerate.
12012
12013 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12014
12015 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12016 (perror_with_name, remote_close, remote_open, expect, play): Static.
12017
12018 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12019
12020 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12021 byte offsets instead of an array of indexes.
12022 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12023
12024 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12025
12026 * regcache.c: Add comment.
12027
12028 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12029
12030 * thread-db.c: New file.
12031 * proc-service.c: New file.
12032 * acinclude.m4: New file.
12033 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12034 proc-service.o, and thread-db.o.
12035 (linux-low.o): Add USE_THREAD_DB.
12036 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12037 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12038 * aclocal.m4: Regenerated.
12039 * config.in: Regenerated.
12040 * configure: Regenerated.
12041 * configure.in: Check for proc_service.h, sys/procfs.h,
12042 thread_db.h, and linux/elf.h headrs.
12043 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12044 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12045 Check for -lthread_db and thread support.
12046 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12047 PowerPC, and SuperH.
12048 * i387-fp.c: Constify arguments.
12049 * i387-fp.h: Likewise.
12050 * inferiors.c: (struct thread_info): Renamed from
12051 `struct inferior_info'. Remove PID member. Use generic inferior
12052 list header. All uses updated.
12053 (inferiors, signal_pid): Removed.
12054 (all_threads): New variable.
12055 (get_thread): Define.
12056 (add_inferior_to_list): New function.
12057 (for_each_inferior): New function.
12058 (change_inferior_id): New function.
12059 (add_inferior): Removed.
12060 (remove_inferior): New function.
12061 (add_thread): New function.
12062 (free_one_thread): New function.
12063 (remove_thread): New function.
12064 (clear_inferiors): Use for_each_inferior and free_one_thread.
12065 (find_inferior): New function.
12066 (find_inferior_id): New function.
12067 (inferior_target_data): Update argument type.
12068 (set_inferior_target_data): Likewise.
12069 (inferior_regcache_data): Likewise.
12070 (set_inferior_regcache_data): Likewise.
12071 * linux-low.c (linux_bp_reinsert): Remove.
12072 (all_processes, stopping_threads, using_thrads)
12073 (struct pending_signals, debug_threads, pid_of): New.
12074 (inferior_pid): Replace with macro.
12075 (struct inferior_linux_data): Remove.
12076 (get_stop_pc, add_process): New functions.
12077 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12078 Use add_process and add_thread.
12079 (linux_attach_lwp): New function, based on old linux_attach. Use
12080 add_process and add_thread. Set stop_expected for new threads.
12081 (linux_attach): New function.
12082 (linux_kill_one_process): New function.
12083 (linux_kill): Kill all LWPs.
12084 (linux_thread_alive): Use find_inferior_id.
12085 (check_removed_breakpoints, status_pending_p): New functions.
12086 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12087 Update. Use WNOHANG. Wait for cloned processes also. Update process
12088 struct for the found process.
12089 (linux_wait_for_event): New function.
12090 (linux_wait): Use it. Support LWPs.
12091 (send_sigstop, wait_for_sigstop, stop_all_processes)
12092 (linux_resume_one_process, linux_continue_one_process): New functions.
12093 (linux_resume): Support LWPs.
12094 (REGISTER_RAW_SIZE): Remove.
12095 (fetch_register): Use register_size instead. Call supply_register.
12096 (usr_store_inferior_registers): Likewise. Call collect_register.
12097 Fix recursive case.
12098 (regsets_fetch_inferior_registers): Improve error message.
12099 (regsets_store_inferior_registers): Add debugging.
12100 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12101 (unstopped_p, linux_signal_pid): New functions.
12102 (linux_target_ops): Add linux_signal_pid.
12103 (linux_init_signals): New function.
12104 (initialize_low): Call it. Initialize using_threads.
12105 * regcache.c (inferior_regcache_data): Add valid
12106 flag.
12107 (get_regcache): Fetch registers lazily. Add fetch argument
12108 and update all callers.
12109 (regcache_invalidate_one, regcache_invalidate): New
12110 functions.
12111 (new_register_cache): Renamed from create_register_cache.
12112 Return the new regcache.
12113 (free_register_cache): Change argument to a void *.
12114 (registers_to_string, registers_from_string): Call get_regcache
12115 with fetch flag set.
12116 (register_data): Make static. Pass fetch flag to get_regcache.
12117 (supply_register): Call get_regcache with fetch flag clear.
12118 (collect_register): Call get_regcache with fetch flag set.
12119 (collect_register_as_string): New function.
12120 * regcache.h: Update.
12121 * remote-utils.c (putpkt): Flush after debug output and use
12122 stderr.
12123 Handle input interrupts while waiting for an ACK.
12124 (input_interrupt): Use signal_pid method.
12125 (getpkt): Flush after debug output and use stderr.
12126 (outreg): Use collect_register_as_string.
12127 (new_thread_notify, dead_thread_notify): New functions.
12128 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12129 and general_thread.
12130 (look_up_one_symbol): Flush after debug output.
12131 * server.c (step_thread, server_waiting): New variables.
12132 (start_inferior): Don't use signal_pid. Update call to mywait.
12133 (attach_inferior): Update call to mywait.
12134 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12135 (main): Don't fetch/store registers explicitly. Use
12136 set_desired_inferior. Support proposed ``Hs'' packet. Update
12137 calls to mywait.
12138 * server.h: Update.
12139 (struct inferior_list, struct_inferior_list_entry): New.
12140 * target.c (set_desired_inferior): New.
12141 (write_inferior_memory): Constify.
12142 (mywait): New function.
12143 * target.h: Update.
12144 (struct target_ops): New signal_pid method.
12145 (mywait): Removed macro, added prototype.
12146
12147 * linux-low.h (regset_func): Removed.
12148 (regset_fill_func, regset_store_func): New.
12149 (enum regset_type): New.
12150 (struct regset_info): Add type field. Use new operation types.
12151 (struct linux_target_ops): stop_pc renamed to get_pc.
12152 Add decr_pc_after_break and breakpoint_at.
12153 (get_process, get_thread_proess, get_process_thread)
12154 (strut process_info, all_processes, linux_attach_lwp)
12155 (thread_db_init): New.
12156
12157 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12158 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12159 (the_low_target): Add new members.
12160 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12161 (i386_store_fpxregset): Constify.
12162 (target_regsets): Add new kind identifier.
12163 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12164 (i386_set_pc): Add debugging.
12165 (i386_breakpoint_at): New function.
12166 (the_low_target): Add new members.
12167 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12168 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12169 (mips_breakpoint_at): New.
12170 (the_low_target): Add new members.
12171 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12172 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12173 (the_low_target): Add new members.
12174 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12175 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12176 (the_low_target): Add new members.
12177 * linux-x86-64-low.c (target_regsets): Add new kind
12178 identifier.
12179
12180 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12181
12182 From Martin Pool <mbp@samba.org>:
12183 * server.c (gdbserver_usage): New function.
12184 (main): Call it.
12185
12186 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12187
12188 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12189 stop_at -> stop_pc.
12190
12191 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12192
12193 * Makefile.in: Remove obsolete code.
12194
12195 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12196
12197 * linux-low.c (regsets_fetch_inferior_registers),
12198 (regsets_store_inferior_registers): Removed cast to int from
12199 ptrace() calls.
12200 * regcache.h: Added declaration of struct inferior_info.
12201
12202 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12203
12204 * inferiors.c (struct inferior_info): Add regcache_data.
12205 (add_inferior): Call create_register_cache.
12206 (clear_inferiors): Call free_register_cache.
12207 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12208 * regcache.c (struct inferior_regcache_data): New.
12209 (registers): Remove.
12210 (get_regcache): New function.
12211 (create_register_cache, free_register_cache): New functions.
12212 (set_register_cache): Don't initialize the register cache here.
12213 (registers_to_string, registers_from_string, register_data): Call
12214 get_regcache.
12215 * regcache.h: Add prototypes.
12216 * server.h: Likewise.
12217
12218 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12219
12220 * mem-break.c: New file.
12221 * mem-break.h: New file.
12222 * Makefile.in: Add mem-break.o rule; update server.h
12223 dependencies.
12224 * inferiors.c (struct inferior_info): Add target_data
12225 member.
12226 (clear_inferiors): Free target_data member if set.
12227 (inferior_target_data, set_inferior_target_data): New functions.
12228 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12229 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12230 * linux-low.c (linux_bp_reinsert): New variable.
12231 (struct inferior_linux_data): New.
12232 (linux_create_inferior): Use set_inferior_target_data.
12233 (linux_attach): Likewise. Call add_inferior.
12234 (linux_wait_for_one_inferior): New function.
12235 (linux_wait): Call it.
12236 (linux_write_memory): Add const.
12237 (initialize_low): Call set_breakpoint_data.
12238 * linux-low.h (struct linux_target_ops): Add breakpoint
12239 handling members.
12240 * server.c (attach_inferior): Remove extra add_inferior
12241 call.
12242 * server.h: Include mem-break.h. Update inferior.c
12243 prototypes.
12244 * target.c (read_inferior_memory)
12245 (write_inferior_memory): New functions.
12246 * target.h (read_inferior_memory)
12247 (write_inferior_memory): Change macros to prototypes.
12248 (struct target_ops): Update comments. Add const to write_memory
12249 definition.
12250
12251 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12252
12253 * linux-low.c (usr_store_inferior_registers): Support
12254 registers which are allowed to fail to store.
12255 * linux-low.h (linux_target_ops): Likewise.
12256 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12257 (ppc_cannot_store_register): FPSCR may not be storable.
12258
12259 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12260
12261 * server.h: Include <string.h> if HAVE_STRING_H.
12262 * ChangeLog: Correct paths in last ChangeLog entry.
12263
12264 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12265
12266 * linux-low.h: Remove obsolete prototypes.
12267 (struct linux_target_ops): New.
12268 (extern the_low_target): New.
12269 * linux-low.c (num_regs, regmap): Remove declarations.
12270 (register_addr): Use the_low_target explicitly.
12271 (fetch_register): Likewise.
12272 (usr_fetch_inferior_registers): Likewise.
12273 (usr_store_inferior_registers): Likewise.
12274 * linux-arm-low.c (num_regs): Remove.
12275 (arm_num_regs): Define.
12276 (arm_regmap): Renamed from regmap, made static.
12277 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12278 made static.
12279 (arm_cannot_store_register): Renamed from cannot_store_register,
12280 made static.
12281 (the_low_target): New.
12282 * linux-i386-low.c (num_regs): Remove.
12283 (i386_num_regs): Define.
12284 (i386_regmap): Renamed from regmap, made static.
12285 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12286 made static.
12287 (i386_cannot_store_register): Renamed from cannot_store_register,
12288 made static.
12289 (the_low_target): New.
12290 * linux-ia64-low.c (num_regs): Remove.
12291 (ia64_num_regs): Define.
12292 (ia64_regmap): Renamed from regmap, made static.
12293 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12294 made static.
12295 (ia64_cannot_store_register): Renamed from cannot_store_register,
12296 made static.
12297 (the_low_target): New.
12298 * linux-m68k-low.c (num_regs): Remove.
12299 (m68k_num_regs): Define.
12300 (m68k_regmap): Renamed from regmap, made static.
12301 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12302 made static.
12303 (m68k_cannot_store_register): Renamed from cannot_store_register,
12304 made static.
12305 (the_low_target): New.
12306 * linux-mips-low.c (num_regs): Remove.
12307 (mips_num_regs): Define.
12308 (mips_regmap): Renamed from regmap, made static.
12309 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12310 made static.
12311 (mips_cannot_store_register): Renamed from cannot_store_register,
12312 made static.
12313 (the_low_target): New.
12314 * linux-ppc-low.c (num_regs): Remove.
12315 (ppc_num_regs): Define.
12316 (ppc_regmap): Renamed from regmap, made static.
12317 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12318 made static.
12319 (ppc_cannot_store_register): Renamed from cannot_store_register,
12320 made static.
12321 (the_low_target): New.
12322 * linux-s390-low.c (num_regs): Remove.
12323 (s390_num_regs): Define.
12324 (s390_regmap): Renamed from regmap, made static.
12325 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12326 made static.
12327 (s390_cannot_store_register): Renamed from cannot_store_register,
12328 made static.
12329 (the_low_target): New.
12330 * linux-sh-low.c (num_regs): Remove.
12331 (sh_num_regs): Define.
12332 (sh_regmap): Renamed from regmap, made static.
12333 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12334 made static.
12335 (sh_cannot_store_register): Renamed from cannot_store_register,
12336 made static.
12337 (the_low_target): New.
12338 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12339 (the_low_target): New.
12340
12341 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12342
12343 * Makefile.in: Add stamp-h target.
12344 * configure.in: Create stamp-h.
12345 * configure: Regenerated.
12346
12347 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12348
12349 * inferiors.c: New file.
12350 * target.c: New file.
12351 * target.h: New file.
12352 * Makefile.in: Add target.o and inferiors.o. Update
12353 dependencies.
12354 * linux-low.c (inferior_pid): New static variable,
12355 moved from server.c.
12356 (linux_create_inferior): Renamed from create_inferior.
12357 Call add_inferior. Return 0 on success instead of a PID.
12358 (linux_attach): Renamed from myattach.
12359 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12360 (linux_thread_alive): Renamed from mythread_alive.
12361 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12362 child dies.
12363 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12364 (regsets_store_inferior_registers): Correct error message.
12365 Add missing ``return 0''.
12366 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12367 (linux_store_registers): Renamed from store_inferior_registers.
12368 (linux_read_memory): Renamed from read_inferior_memory.
12369 (linux_write_memory): Renamed from write_inferior_memory.
12370 (linux_target_ops): New structure.
12371 (initialize_low): Call set_target_ops ().
12372 * remote-utils.c (unhexify): New function.
12373 (hexify): New function.
12374 (input_interrupt): Send signals to ``signal_pid''.
12375 * server.c (inferior_pid): Remove.
12376 (start_inferior): Update create_inferior call.
12377 (attach_inferior): Call add_inferior.
12378 (handle_query): New function.
12379 (main): Call handle_query for `q' packets.
12380 * server.h: Include "target.h". Remove obsolete prototypes.
12381 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12382
12383 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12384
12385 * Makefile.in: Add WARN_CFLAGS. Update configury
12386 dependencies.
12387 * configure.in: Check for <string.h>
12388 * configure: Regenerate.
12389 * config.in: Regenerate.
12390 * gdbreplay.c: Include needed system headers.
12391 (remote_open): Remove strchr prototype.
12392 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12393 * regcache.c (supply_register): Change buf argument to const void *.
12394 (supply_register_by_name): Likewise.
12395 (collect_register): Change buf argument to void *.
12396 (collect_register_by_name): Likewise.
12397 * regcache.h: Add missing prototypes.
12398 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12399 * server.c (handle_query): New function.
12400 (attached): New static variable, moved out of main.
12401 (main): Quiet longjmp clobber warnings.
12402 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12403 * utils.c (error): Remove NORETURN.
12404 (fatal): Likewise.
This page took 0.314569 seconds and 4 git commands to generate.