Rename emit_load_store to aarch64_emit_load_store
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-10-12 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c: Update all callers as emit_load_store
4 is renamed to aarch64_emit_load_store.
5
6 2015-10-12 Yao Qi <yao.qi@linaro.org>
7
8 * linux-aarch64-low.c: Update all callers of function renaming
9 from emit_insn to aarch64_emit_insn.
10
11 2015-10-12 Yao Qi <yao.qi@linaro.org>
12
13 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
14 arch/aarch64-insn.h.
15 (struct aarch64_memory_operand): Likewise.
16 (ENCODE): Likewise.
17 (emit_insn): Move to arch/aarch64-insn.c.
18 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
19 (emit_load_store): Move to arch/aarch64-insn.c.
20 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
21 (can_encode_int32): Remove.
22
23 2015-10-12 Yao Qi <yao.qi@linaro.org>
24
25 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
26 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
27 (aarch64_relocate_instruction): Likewise.
28 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
29 (struct aarch64_insn_visitor): Likewise.
30
31 2015-10-12 Yao Qi <yao.qi@linaro.org>
32
33 * linux-aarch64-low.c (struct aarch64_insn_data): New.
34 (struct aarch64_insn_visitor): New.
35 (struct aarch64_insn_relocation_data): New.
36 (aarch64_ftrace_insn_reloc_b): New function.
37 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
38 (aarch64_ftrace_insn_reloc_cb): Likewise.
39 (aarch64_ftrace_insn_reloc_tb): Likewise.
40 (aarch64_ftrace_insn_reloc_adr): Likewise.
41 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
42 (aarch64_ftrace_insn_reloc_others): Likewise.
43 (visitor): New.
44 (aarch64_relocate_instruction): Use visitor.
45
46 2015-10-12 Yao Qi <yao.qi@linaro.org>
47
48 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
49 int. Add argument buf.
50 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
51 aarch64_relocate_instruction.
52
53 2015-10-12 Yao Qi <yao.qi@linaro.org>
54
55 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
56 argument insn. Remove local variable insn. Don't call
57 target_read_uint32.
58 (aarch64_install_fast_tracepoint_jump_pad): Call
59 target_read_uint32.
60
61 2015-09-30 Yao Qi <yao.qi@linaro.org>
62
63 * linux-aarch64-low.c (emit_movk): Shorten a long line.
64 (emit_load_store_pair): Likewise.
65
66 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
67
68 * dll.c (match_dll): Add cast(s).
69 (unloaded_dll): Likewise.
70 * linux-low.c (second_thread_of_pid_p): Likewise.
71 (delete_lwp_callback): Likewise.
72 (count_events_callback): Likewise.
73 (select_event_lwp_callback): Likewise.
74 (linux_set_resume_request): Likewise.
75 * server.c (accumulate_file_name_length): Likewise.
76 (emit_dll_description): Likewise.
77 (handle_qxfer_threads_worker): Likewise.
78 (visit_actioned_threads): Likewise.
79 * thread-db.c (any_thread_of): Likewise.
80 * tracepoint.c (same_process_p): Likewise.
81 (match_blocktype): Likewise.
82 (build_traceframe_info_xml): Likewise.
83
84 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
85
86 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
87 assignment.
88 (gdb_unparse_agent_expr): Likewise.
89 * hostio.c (require_data): Likewise.
90 (handle_pread): Likewise.
91 * linux-low.c (disable_regset): Likewise.
92 (fetch_register): Likewise.
93 (store_register): Likewise.
94 (get_dynamic): Likewise.
95 (linux_qxfer_libraries_svr4): Likewise.
96 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
97 (set_fast_tracepoint_jump): Likewise.
98 (uninsert_fast_tracepoint_jumps_at): Likewise.
99 (reinsert_fast_tracepoint_jumps_at): Likewise.
100 (validate_inserted_breakpoint): Likewise.
101 (clone_agent_expr): Likewise.
102 * regcache.c (init_register_cache): Likewise.
103 * remote-utils.c (putpkt_binary_1): Likewise.
104 (decode_M_packet): Likewise.
105 (decode_X_packet): Likewise.
106 (look_up_one_symbol): Likewise.
107 (relocate_instruction): Likewise.
108 (monitor_output): Likewise.
109 * server.c (handle_search_memory): Likewise.
110 (handle_qxfer_exec_file): Likewise.
111 (handle_qxfer_libraries): Likewise.
112 (handle_qxfer): Likewise.
113 (handle_query): Likewise.
114 (handle_v_cont): Likewise.
115 (handle_v_run): Likewise.
116 (captured_main): Likewise.
117 * target.c (write_inferior_memory): Likewise.
118 * thread-db.c (try_thread_db_load_from_dir): Likewise.
119 * tracepoint.c (init_trace_buffer): Likewise.
120 (add_tracepoint_action): Likewise.
121 (add_traceframe): Likewise.
122 (add_traceframe_block): Likewise.
123 (cmd_qtdpsrc): Likewise.
124 (cmd_qtdv): Likewise.
125 (cmd_qtstatus): Likewise.
126 (response_source): Likewise.
127 (response_tsv): Likewise.
128 (cmd_qtnotes): Likewise.
129 (gdb_collect): Likewise.
130 (initialize_tracepoint): Likewise.
131
132 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
133
134 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
135 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
136 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
137 <NOP>: New.
138 (enum aarch64_condition_codes): New enum.
139 (w0): New static global.
140 (fp): Likewise.
141 (lr): Likewise.
142 (struct aarch64_memory_operand) <type>: New
143 MEMORY_OPERAND_POSTINDEX type.
144 (postindex_memory_operand): New helper function.
145 (emit_ret): New function.
146 (emit_load_store_pair): New function, factored out of emit_stp
147 with support for MEMORY_OPERAND_POSTINDEX.
148 (emit_stp): Rewrite using emit_load_store_pair.
149 (emit_ldp): New function.
150 (emit_load_store): Likewise.
151 (emit_ldr): Mention post-index instruction in comment.
152 (emit_ldrh): New function.
153 (emit_ldrb): New function.
154 (emit_ldrsw): Mention post-index instruction in comment.
155 (emit_str): Likewise.
156 (emit_subs): New function.
157 (emit_cmp): Likewise.
158 (emit_and): Likewise.
159 (emit_orr): Likewise.
160 (emit_orn): Likewise.
161 (emit_eor): Likewise.
162 (emit_mvn): Likewise.
163 (emit_lslv): Likewise.
164 (emit_lsrv): Likewise.
165 (emit_asrv): Likewise.
166 (emit_mul): Likewise.
167 (emit_sbfm): Likewise.
168 (emit_sbfx): Likewise.
169 (emit_ubfm): Likewise.
170 (emit_ubfx): Likewise.
171 (emit_csinc): Likewise.
172 (emit_cset): Likewise.
173 (emit_nop): Likewise.
174 (emit_ops_insns): New helper function.
175 (emit_pop): Likewise.
176 (emit_push): Likewise.
177 (aarch64_emit_prologue): New function.
178 (aarch64_emit_epilogue): Likewise.
179 (aarch64_emit_add): Likewise.
180 (aarch64_emit_sub): Likewise.
181 (aarch64_emit_mul): Likewise.
182 (aarch64_emit_lsh): Likewise.
183 (aarch64_emit_rsh_signed): Likewise.
184 (aarch64_emit_rsh_unsigned): Likewise.
185 (aarch64_emit_ext): Likewise.
186 (aarch64_emit_log_not): Likewise.
187 (aarch64_emit_bit_and): Likewise.
188 (aarch64_emit_bit_or): Likewise.
189 (aarch64_emit_bit_xor): Likewise.
190 (aarch64_emit_bit_not): Likewise.
191 (aarch64_emit_equal): Likewise.
192 (aarch64_emit_less_signed): Likewise.
193 (aarch64_emit_less_unsigned): Likewise.
194 (aarch64_emit_ref): Likewise.
195 (aarch64_emit_if_goto): Likewise.
196 (aarch64_emit_goto): Likewise.
197 (aarch64_write_goto_address): Likewise.
198 (aarch64_emit_const): Likewise.
199 (aarch64_emit_call): Likewise.
200 (aarch64_emit_reg): Likewise.
201 (aarch64_emit_pop): Likewise.
202 (aarch64_emit_stack_flush): Likewise.
203 (aarch64_emit_zero_ext): Likewise.
204 (aarch64_emit_swap): Likewise.
205 (aarch64_emit_stack_adjust): Likewise.
206 (aarch64_emit_int_call_1): Likewise.
207 (aarch64_emit_void_call_2): Likewise.
208 (aarch64_emit_eq_goto): Likewise.
209 (aarch64_emit_ne_goto): Likewise.
210 (aarch64_emit_lt_goto): Likewise.
211 (aarch64_emit_le_goto): Likewise.
212 (aarch64_emit_gt_goto): Likewise.
213 (aarch64_emit_ge_got): Likewise.
214 (aarch64_emit_ops_impl): New static global variable.
215 (aarch64_emit_ops): New target function, return
216 &aarch64_emit_ops_impl.
217 (struct linux_target_ops): Install it.
218
219 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
220
221 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
222 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
223 aarch64-ipa.o.
224 * linux-aarch64-ipa.c: New file.
225 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
226 and endian.h.
227 (aarch64_get_thread_area): New target method.
228 (extract_signed_bitfield): New helper function.
229 (aarch64_decode_ldr_literal): New function.
230 (enum aarch64_opcodes): New enum.
231 (struct aarch64_register): New struct.
232 (struct aarch64_operand): New struct.
233 (x0): New static global.
234 (x1): Likewise.
235 (x2): Likewise.
236 (x3): Likewise.
237 (x4): Likewise.
238 (w2): Likewise.
239 (ip0): Likewise.
240 (sp): Likewise.
241 (xzr): Likewise.
242 (aarch64_register): New helper function.
243 (register_operand): Likewise.
244 (immediate_operand): Likewise.
245 (struct aarch64_memory_operand): New struct.
246 (offset_memory_operand): New helper function.
247 (preindex_memory_operand): Likewise.
248 (enum aarch64_system_control_registers): New enum.
249 (ENCODE): New macro.
250 (emit_insn): New helper function.
251 (emit_b): New function.
252 (emit_bcond): Likewise.
253 (emit_cb): Likewise.
254 (emit_tb): Likewise.
255 (emit_blr): Likewise.
256 (emit_stp): Likewise.
257 (emit_ldp_q_offset): Likewise.
258 (emit_stp_q_offset): Likewise.
259 (emit_load_store): Likewise.
260 (emit_ldr): Likewise.
261 (emit_ldrsw): Likewise.
262 (emit_str): Likewise.
263 (emit_ldaxr): Likewise.
264 (emit_stxr): Likewise.
265 (emit_stlr): Likewise.
266 (emit_data_processing_reg): Likewise.
267 (emit_data_processing): Likewise.
268 (emit_add): Likewise.
269 (emit_sub): Likewise.
270 (emit_mov): Likewise.
271 (emit_movk): Likewise.
272 (emit_mov_addr): Likewise.
273 (emit_mrs): Likewise.
274 (emit_msr): Likewise.
275 (emit_sevl): Likewise.
276 (emit_wfe): Likewise.
277 (append_insns): Likewise.
278 (can_encode_int32_in): New helper function.
279 (aarch64_relocate_instruction): New function.
280 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
281 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
282 (struct linux_target_ops): Install aarch64_get_thread_area,
283 aarch64_install_fast_tracepoint_jump_pad and
284 aarch64_get_min_fast_tracepoint_insn_len.
285
286 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
287
288 * Makefile.in (aarch64-insn.o): New rule.
289 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
290
291 2015-09-21 Yao Qi <yao.qi@linaro.org>
292
293 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
294
295 2015-09-21 Yao Qi <yao.qi@linaro.org>
296
297 * tracepoint.c (max_jump_pad_size): Remove.
298
299 2015-09-18 Yao Qi <yao.qi@linaro.org>
300
301 * linux-aarch64-low.c: Don't include sys/uio.h.
302 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
303
304 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
305
306 * tracepoint.c (eval_result_type): Change prototype.
307 (condition_true_at_tracepoint): Fix argument to compiled_cond.
308
309 2015-09-15 Pedro Alves <palves@redhat.com>
310
311 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
312 Check whether to report exec events instead of checking whether
313 multiprocess is enabled.
314
315 2015-09-15 Pedro Alves <palves@redhat.com>
316
317 PR remote/18965
318 * remote-utils.c (prepare_resume_reply): Merge
319 TARGET_WAITKIND_VFORK_DONE switch case with the
320 TARGET_WAITKIND_FORKED case.
321
322 2015-09-15 Yao Qi <yao.qi@linaro.org>
323
324 * server.c (handle_query): Check string comparison using
325 "else if" instead of "if".
326
327 2015-09-15 Yao Qi <yao.qi@linaro.org>
328
329 * server.c (vCont_supported): New global variable.
330 (handle_query): Set vCont_supported to 1 if "vContSupported+"
331 matches. Append ";vContSupported+" to own_buf.
332 (handle_v_requests): Append ";s;S" to own_buf if target supports
333 hardware single step or vCont_supported is false.
334 (capture_main): Set vCont_supported to zero.
335
336 2015-09-15 Yao Qi <yao.qi@linaro.org>
337
338 * linux-low.c (linux_supports_conditional_breakpoints): Rename
339 it to ...
340 (linux_supports_hardware_single_step): ... New function.
341 (linux_target_ops): Update.
342 * lynx-low.c (lynx_target_ops): Set field
343 supports_hardware_single_step to target_can_do_hardware_single_step.
344 * nto-low.c (nto_target_ops): Likewise.
345 * spu-low.c (spu_target_ops): Likewise.
346 * win32-low.c (win32_target_ops): Likewise.
347 * target.c (target_can_do_hardware_single_step): New function.
348 * target.h (struct target_ops) <supports_conditional_breakpoints>:
349 Remove. <supports_hardware_single_step>: New field.
350 (target_supports_conditional_breakpoints): Remove.
351 (target_supports_hardware_single_step): New macro.
352 (target_can_do_hardware_single_step): Declare.
353 * server.c (handle_query): Use target_supports_hardware_single_step
354 instead of target_supports_conditional_breakpoints.
355
356 2015-09-15 Yao Qi <yao.qi@linaro.org>
357
358 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
359 function.
360 (struct linux_target_ops the_low_target): Install
361 aarch64_linux_siginfo_fixup.
362
363 2015-09-11 Don Breazeal <donb@codesourcery.com>
364 Luis Machado <lgustavo@codesourcery.com>
365
366 * linux-low.c (linux_mourn): Static declaration.
367 (linux_arch_setup): Move in front of
368 handle_extended_wait.
369 (linux_arch_setup_thread): New function.
370 (handle_extended_wait): Handle exec events. Call
371 linux_arch_setup_thread. Make event_lwp argument a
372 pointer-to-a-pointer.
373 (check_zombie_leaders): Do not check stopped threads.
374 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
375 (linux_low_filter_event): Add lwp and thread for exec'ing
376 non-leader thread if leader thread has been deleted.
377 Refactor code into linux_arch_setup_thread and call it.
378 Pass child lwp pointer by reference to handle_extended_wait.
379 (linux_wait_for_event_filtered): Update comment.
380 (linux_wait_1): Prevent clobbering exec event status.
381 (linux_supports_exec_events): New function.
382 (linux_target_ops) <supports_exec_events>: Initialize new member.
383 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
384 new member.
385 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
386 * server.c (report_exec_events): New global variable.
387 (handle_query): Handle qSupported query for exec-events feature.
388 (captured_main): Initialize report_exec_events.
389 * server.h (report_exec_events): Declare new global variable.
390 * target.h (struct target_ops) <supports_exec_events>: New
391 member.
392 (target_supports_exec_events): New macro.
393 * win32-low.c (win32_target_ops) <supports_exec_events>:
394 Initialize new member.
395
396 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
397
398 * linux-low.c (linux_low_enable_btrace): Remove.
399 (linux_target_ops): Replace linux_low_enable_btrace with
400 linux_enable_btrace.
401
402 2015-09-03 Yao Qi <yao.qi@linaro.org>
403
404 * linux-aarch64-low.c (aarch64_insert_point): Call
405 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
406 returns true.
407
408 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
409
410 * linux-low.c (check_stopped_by_breakpoint): Use
411 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
412
413 2015-08-27 Pedro Alves <palves@redhat.com>
414
415 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
416
417 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
418
419 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
420 the XNEW-family equivalent.
421 (compile_bytecodes): Likewise.
422 * dll.c (loaded_dll): Likewise.
423 * event-loop.c (append_callback_event): Likewise.
424 (create_file_handler): Likewise.
425 (create_file_event): Likewise.
426 * hostio.c (handle_open): Likewise.
427 * inferiors.c (add_thread): Likewise.
428 (add_process): Likewise.
429 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
430 * linux-arm-low.c (arm_new_process): Likewise.
431 (arm_new_thread): Likewise.
432 * linux-low.c (add_to_pid_list): Likewise.
433 (linux_add_process): Likewise.
434 (handle_extended_wait): Likewise.
435 (add_lwp): Likewise.
436 (enqueue_one_deferred_signal): Likewise.
437 (enqueue_pending_signal): Likewise.
438 (linux_resume_one_lwp_throw): Likewise.
439 (linux_resume_one_thread): Likewise.
440 (linux_read_memory): Likewise.
441 (linux_write_memory): Likewise.
442 * linux-mips-low.c (mips_linux_new_process): Likewise.
443 (mips_linux_new_thread): Likewise.
444 (mips_add_watchpoint): Likewise.
445 * linux-x86-low.c (initialize_low_arch): Likewise.
446 * lynx-low.c (lynx_add_process): Likewise.
447 * mem-break.c (set_raw_breakpoint_at): Likewise.
448 (set_breakpoint): Likewise.
449 (add_condition_to_breakpoint): Likewise.
450 (add_commands_to_breakpoint): Likewise.
451 (clone_agent_expr): Likewise.
452 (clone_one_breakpoint): Likewise.
453 * regcache.c (new_register_cache): Likewise.
454 * remote-utils.c (look_up_one_symbol): Likewise.
455 * server.c (queue_stop_reply): Likewise.
456 (start_inferior): Likewise.
457 (queue_stop_reply_callback): Likewise.
458 (handle_target_event): Likewise.
459 * spu-low.c (fetch_ppc_memory): Likewise.
460 (store_ppc_memory): Likewise.
461 * target.c (set_target_ops): Likewise.
462 * thread-db.c (thread_db_load_search): Likewise.
463 (try_thread_db_load_1): Likewise.
464 * tracepoint.c (add_tracepoint): Likewise.
465 (add_tracepoint_action): Likewise.
466 (create_trace_state_variable): Likewise.
467 (cmd_qtdpsrc): Likewise.
468 (cmd_qtro): Likewise.
469 (add_while_stepping_state): Likewise.
470 * win32-low.c (child_add_thread): Likewise.
471 (get_image_name): Likewise.
472
473 2015-08-25 Yao Qi <yao.qi@linaro.org>
474
475 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
476
477 2015-08-25 Yao Qi <yao.qi@linaro.org>
478
479 * Makefile.in (aarch64-linux.o): New rule.
480 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
481 srv_tgtobj.
482 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
483 (aarch64_init_debug_reg_state): Make it extern.
484 (aarch64_linux_prepare_to_resume): Remove.
485
486 2015-08-25 Yao Qi <yao.qi@linaro.org>
487
488 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
489 lwp_arch_private_info and ptid_of_lwp.
490
491 2015-08-25 Yao Qi <yao.qi@linaro.org>
492
493 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
494 Find proc_info by find_process_pid. All callers updated.
495
496 2015-08-25 Yao Qi <yao.qi@linaro.org>
497
498 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
499 Remove.
500 (debug_reg_change_callback): Remove.
501 (aarch64_notify_debug_reg_change): Remove.
502
503 2015-08-25 Yao Qi <yao.qi@linaro.org>
504
505 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
506 Call current_lwp_ptid.
507
508 2015-08-25 Yao Qi <yao.qi@linaro.org>
509
510 * linux-aarch64-low.c (debug_reg_change_callback): Use
511 debug_printf.
512
513 2015-08-25 Yao Qi <yao.qi@linaro.org>
514
515 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
516
517 2015-08-25 Yao Qi <yao.qi@linaro.org>
518
519 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
520
521 2015-08-25 Yao Qi <yao.qi@linaro.org>
522
523 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
524 the code.
525
526 2015-08-25 Yao Qi <yao.qi@linaro.org>
527
528 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
529 Remove.
530 (debug_reg_change_callback): Remove argument entry and add argument
531 lwp. Remove local variable thread. Don't print thread id in the
532 debugging output. Don't check whether pid of thread equals to pid.
533 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
534 iterate_over_lwps instead find_inferior.
535
536 2015-08-24 Pedro Alves <palves@redhat.com>
537
538 * inferiors.c (get_first_process): New function.
539 * inferiors.h (get_first_process): New declaration.
540 * remote-utils.c (read_ptid): Default to the first process in the
541 list, instead of to the current thread's process.
542
543 2015-08-24 Pedro Alves <palves@redhat.com>
544
545 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
546 * event-loop.c: Likewise.
547 * remote-utils.c: Likewise.
548 * tracepoint.c: Likewise.
549
550 2015-08-24 Pedro Alves <palves@redhat.com>
551
552 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
553 ptid_get_lwp.
554
555 2015-08-21 Pedro Alves <palves@redhat.com>
556
557 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
558 instead of literal 1.
559
560 2015-08-21 Pedro Alves <palves@redhat.com>
561
562 * tdesc.c (default_description): Explicitly zero-initialize.
563
564 2015-08-21 Pedro Alves <palves@redhat.com>
565
566 PR gdb/18749
567 * inferiors.c (remove_thread): Discard any pending stop reply for
568 this thread.
569 * server.c (remove_all_on_match_pid): Rename to ...
570 (remove_all_on_match_ptid): ... this. Work with a filter ptid
571 instead of a pid.
572 (discard_queued_stop_replies): Change parameter to a ptid. Now
573 extern.
574 (handle_v_kill, kill_inferior_callback, captured_main)
575 (process_serial_event): Adjust.
576 * server.h (discard_queued_stop_replies): Declare.
577
578 2015-08-21 Pedro Alves <palves@redhat.com>
579
580 * linux-low.c (wait_for_sigstop): Always switch to no thread
581 selected if the previously current thread dies.
582 * lynx-low.c (lynx_request_interrupt): Use the first thread's
583 process instead of the current thread's.
584 * remote-utils.c (input_interrupt): Don't check if there's no
585 current thread.
586 * server.c (gdb_read_memory, gdb_write_memory): If setting the
587 current thread to the general thread fails, error out.
588 (handle_qxfer_auxv, handle_qxfer_libraries)
589 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
590 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
591 (handle_query): Check if there's a thread selected instead of
592 checking whether there's any thread in the thread list.
593 (handle_qxfer_threads, handle_qxfer_btrace)
594 (handle_qxfer_btrace_conf): Don't error out early if there's no
595 thread in the thread list.
596 (handle_v_cont, myresume): Don't set the current thread to the
597 continue thread.
598 (process_serial_event) <Hg handling>: Also set thread_id if the
599 previous general thread is still alive.
600 (process_serial_event) <g/G handling>: If setting the current
601 thread to the general thread fails, error out.
602 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
603 thread's lwp instead of the current thread's.
604 * target.c (set_desired_thread): If the desired thread was not
605 found, leave the current thread pointing to NULL. Return an int
606 (boolean) indicating success.
607 * target.h (set_desired_thread): Change return type to int.
608
609 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
610
611 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
612 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
613 #includes.
614 (ps_get_thread_area): New function.
615
616 2015-08-19 Gary Benson <gbenson@redhat.com>
617
618 * hostio.c (handle_pread): Do not attempt to read more data
619 than hostio_reply_with_data can fit in a packet.
620
621 2015-08-18 Joel Brobecker <brobecker@adacore.com>
622
623 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
624
625 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
626
627 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
628
629 2015-08-06 Pedro Alves <palves@redhat.com>
630
631 * tracepoint.c (expr_eval_result): Now an int.
632
633 2015-08-06 Pedro Alves <palves@redhat.com>
634
635 * gdbthread.h (struct regcache): Forward declare.
636 (struct thread_info) <regcache_data>: Now a struct regcache
637 pointer.
638 * inferiors.c (inferior_regcache_data)
639 (set_inferior_regcache_data): Now work with struct regcache
640 pointers.
641 * inferiors.h (struct regcache): Forward declare.
642 (inferior_regcache_data, set_inferior_regcache_data): Now work
643 with struct regcache pointers.
644 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
645 (free_register_cache_thread): Remove struct regcache pointer
646 casts.
647
648 2015-08-06 Pedro Alves <palves@redhat.com>
649
650 * server.c (captured_main): On error, print the exception message
651 to stderr, and if run_once is set, throw a quit.
652
653 2015-08-06 Pedro Alves <palves@redhat.com>
654
655 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
656 the current thread.
657
658 2015-08-06 Pedro Alves <palves@redhat.com>
659
660 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
661 reading beyond the passed in buffer length.
662
663 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
664
665 * tracepoint.c (symbol_list) <required>: Remove.
666
667 2015-08-06 Pedro Alves <palves@redhat.com>
668
669 * linux-low.c (handle_extended_wait): Set the fork child's suspend
670 count if stopping and suspending threads.
671 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
672 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
673 (linux_detach): Complete an ongoing step-over.
674 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
675 throughout.
676 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
677 (linux_wait_1): If passing a signal to the inferior after
678 finishing a step-over, unsuspend and re-resume all lwps. If we
679 see a single-step event but the thread should be continuing, don't
680 pass the trap to gdb.
681 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
682 internal_error instead of gdb_assert.
683 (enqueue_pending_signal): New function.
684 (check_ptrace_stopped_lwp_gone): Add debug output.
685 (start_step_over): Use internal_error instead of gdb_assert.
686 (complete_ongoing_step_over): New function.
687 (linux_resume_one_thread): Don't resume a suspended thread.
688 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
689 it stepping.
690
691 2015-08-06 Pedro Alves <palves@redhat.com>
692
693 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
694 (linux_thread_alive): Use lwp_is_marked_dead.
695 (extended_event_reported): Delete.
696 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
697 instead of extended_event_reported.
698 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
699 as well.
700 (lwp_is_marked_dead): New function.
701 (lwp_running): Use lwp_is_marked_dead.
702 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
703 comment.
704
705 2015-08-06 Pedro Alves <palves@redhat.com>
706
707 * linux-low.c (linux_wait_1): Move fork event output out of the
708 !report_to_gdb check. Pass event_child->waitstatus to
709 target_waitstatus_to_string instead of ourstatus.
710
711 2015-08-04 Yao Qi <yao.qi@linaro.org>
712
713 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
714 if current_thread is 32 bit.
715
716 2015-08-04 Yao Qi <yao.qi@linaro.org>
717
718 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
719 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
720 * server.c (extended_protocol): Remove "static".
721 * server.h (extended_protocol): Declare it.
722
723 2015-08-04 Yao Qi <yao.qi@linaro.org>
724
725 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
726 both aarch64 and aarch32.
727 (aarch64_set_pc): Likewise.
728
729 2015-08-04 Yao Qi <yao.qi@linaro.org>
730
731 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
732 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
733 arm-with-neon.xml to srv_xmlfiles.
734 * linux-aarch64-low.c: Include linux-aarch32-low.h.
735 (is_64bit_tdesc): New function.
736 (aarch64_linux_read_description): New function.
737 (aarch64_arch_setup): Call aarch64_linux_read_description.
738 (regs_info): Rename to regs_info_aarch64.
739 (aarch64_regs_info): Return right regs_info.
740 (initialize_low_arch): Call initialize_low_arch_aarch32.
741
742 2015-08-04 Yao Qi <yao.qi@linaro.org>
743
744 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
745 * linux-aarch32-low.c: New file.
746 * linux-aarch32-low.h: New file.
747 * linux-arm-low.c (arm_fill_gregset): Move it to
748 linux-aarch32-low.c.
749 (arm_store_gregset): Likewise.
750 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
751 (arm_store_vfpregset): Call arm_store_vfpregset_num.
752 (arm_arch_setup): Check if PTRACE_GETREGSET works.
753 (regs_info): Rename to regs_info_arm.
754 (arm_regs_info): Return regs_info_aarch32 if
755 have_ptrace_getregset is 1 and target description is
756 arm_with_neon or arm_with_vfpv3.
757 (initialize_low_arch): Don't call init_registers_arm_with_neon.
758 Call initialize_low_arch_aarch32 instead.
759
760 2015-08-04 Yao Qi <yao.qi@linaro.org>
761
762 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
763 * linux-low.c: ... here.
764 * linux-low.h (have_ptrace_getregset): Declare it.
765
766 2015-08-04 Pedro Alves <palves@redhat.com>
767
768 * thread-db.c (struct thread_db): Use new typedefs.
769 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
770 CHK calls.
771 (disable_thread_event_reporting): Cast result of dlsym to
772 destination function pointer type.
773 (thread_db_mourn): Use td_ta_delete_ftype.
774
775 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
776
777 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
778 arch variant.
779 (CDX_BREAKPOINT): Define for R2.
780 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
781 (the_low_target): Add comments.
782
783 2015-07-30 Yao Qi <yao.qi@linaro.org>
784
785 * linux-arm-low.c (arm_hwcap): Remove it.
786 (arm_read_description): New local variable arm_hwcap. Don't
787 set arm_hwcap to zero.
788
789 2015-07-30 Yao Qi <yao.qi@linaro.org>
790
791 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
792 Use regcache->tdesc instead.
793 (arm_store_wmmxregset): Likewise.
794 (arm_fill_vfpregset): Likewise.
795 (arm_store_vfpregset): Likewise.
796
797 2015-07-30 Yao Qi <yao.qi@linaro.org>
798
799 * linux-arm-low.c: Include arch/arm.h.
800 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
801 (arm_store_gregset): Likewise.
802
803 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
804
805 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
806 ptrace's 4th parameter.
807
808 2015-07-27 Yao Qi <yao.qi@linaro.org>
809
810 * configure.srv (case aarch64*-*-linux*): Don't set
811 srv_linux_usrregs.
812
813 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
814
815 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
816 sys/ptrace.h.
817 * linux-arm-low.c: Likewise.
818 * linux-cris-low.c: Likewise.
819 * linux-crisv32-low.c: Likewise.
820 * linux-low.c: Likewise.
821 * linux-m68k-low.c: Likewise.
822 * linux-mips-low.c: Likewise.
823 * linux-nios2-low.c: Likewise.
824 * linux-s390-low.c: Likewise.
825 * linux-sparc-low.c: Likewise.
826 * linux-tic6x-low.c: Likewise.
827 * linux-tile-low.c: Likewise.
828 * linux-x86-low.c: Likewise.
829
830 2015-07-24 Pedro Alves <palves@redhat.com>
831
832 * config.in: Regenerate.
833 * configure: Regenerate.
834
835 2015-07-24 Pedro Alves <palves@redhat.com>
836
837 * acinclude.m4: Include ../ptrace.m4.
838 * configure.ac: Call GDB_AC_PTRACE.
839 * config.in, configure: Regenerate.
840
841 2015-07-24 Yao Qi <yao.qi@linaro.org>
842
843 * linux-low.c (linux_create_inferior): Remove setting to
844 proc->priv->new_inferior.
845 (linux_attach): Likewise.
846 (linux_low_filter_event): Likewise.
847 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
848
849 2015-07-24 Yao Qi <yao.qi@linaro.org>
850
851 * linux-low.c (linux_arch_setup): New function.
852 (linux_low_filter_event): If proc->tdesc is NULL and
853 proc->attached is true, call the_low_target.arch_setup.
854 Otherwise, keep status pending, and return.
855 (linux_resume_one_lwp_throw): Don't call get_pc if
856 thread->while_stepping isn't NULL. Don't call
857 get_thread_regcache if proc->tdesc is NULL.
858 (need_step_over_p): Return 0 if proc->tdesc is NULL.
859 (linux_target_ops): Install arch_setup.
860 * server.c (start_inferior): Call the_target->arch_setup.
861 * target.h (struct target_ops) <arch_setup>: New field.
862 (target_arch_setup): New marco.
863 * lynx-low.c (lynx_target_ops): Update.
864 * nto-low.c (nto_target_ops): Update.
865 * spu-low.c (spu_target_ops): Update.
866 * win32-low.c (win32_target_ops): Update.
867
868 2015-07-24 Yao Qi <yao.qi@linaro.org>
869
870 * linux-low.c (linux_add_process): Don't set
871 proc->priv->new_inferior.
872 (linux_create_inferior): Set proc->priv->new_inferior to 1.
873 (linux_attach): Likewise.
874
875 2015-07-24 Yao Qi <yao.qi@linaro.org>
876
877 * server.c (start_inferior): Code refactor.
878
879 2015-07-24 Yao Qi <yao.qi@linaro.org>
880
881 * server.c (process_serial_event): Set general_thread.
882
883 2015-07-21 Yao Qi <yao.qi@linaro.org>
884
885 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
886 aarch64_linux_get_debug_reg_capacity.
887
888 2015-07-17 Yao Qi <yao.qi@linaro.org>
889
890 * Makefile.in (aarch64-linux-hw-point.o): New rule.
891 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
892 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
893 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
894 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
895 (AARCH64_HWP_ALIGNMENT): Likewise.
896 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
897 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
898 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
899 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
900 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
901 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
902 (struct aarch64_debug_reg_state): Likewise.
903 (struct arch_lwp_info): Likewise.
904 (aarch64_align_watchpoint): Likewise.
905 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
906 (aarch64_watchpoint_length): Likewise.
907 (aarch64_point_encode_ctrl_reg): Likewise
908 (aarch64_point_is_aligned): Likewise.
909 (aarch64_align_watchpoint): Likewise.
910 (aarch64_linux_set_debug_regs):
911 (aarch64_dr_state_insert_one_point): Likewise.
912 (aarch64_dr_state_remove_one_point): Likewise.
913 (aarch64_handle_breakpoint): Likewise.
914 (aarch64_handle_aligned_watchpoint): Likewise.
915 (aarch64_handle_unaligned_watchpoint): Likewise.
916 (aarch64_handle_watchpoint): Likewise.
917
918 2015-07-17 Yao Qi <yao.qi@linaro.org>
919
920 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
921 and don't aarch64_get_debug_reg_state. All callers update.
922 (aarch64_handle_aligned_watchpoint): Likewise.
923 (aarch64_handle_unaligned_watchpoint): Likewise.
924 (aarch64_handle_watchpoint): Likewise.
925 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
926 (aarch64_remove_point): Likewise.
927
928 2015-07-17 Yao Qi <yao.qi@linaro.org>
929
930 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
931 debug_printf.
932 (aarch64_handle_unaligned_watchpoint): Likewise.
933
934 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
935
936 Revert the previous 3 commits:
937 Move gdb_regex* to common/
938 Move linux_find_memory_regions_full & co.
939 gdbserver build-id attribute generator
940
941 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
942 Jan Kratochvil <jan.kratochvil@redhat.com>
943
944 gdbserver build-id attribute generator.
945 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
946 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
947 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
948 (find_phdr): New.
949 (get_dynamic): Use find_pdhr to traverse program headers.
950 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
951 (compare_mapping_entry_range, struct find_memory_region_callback_data)
952 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
953 (get_hex_build_id): New.
954 (linux_qxfer_libraries_svr4): Add optional build-id attribute
955 to reply XML document.
956
957 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
958 Jan Kratochvil <jan.kratochvil@redhat.com>
959
960 * target.c: Include target/target-utils.h and fcntl.h.
961 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
962 (target_fileio_read_stralloc): New functions.
963
964 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
965
966 * Makefile.in (OBS): Add gdb_regex.o.
967 (gdb_regex.o): New.
968 * config.in: Rebuilt.
969 * configure: Rebuilt.
970
971 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
972 Jan Kratochvil <jan.kratochvil@redhat.com>
973
974 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
975 * Makefile.in (OBS): Add target-utils.o.
976 (linux-maps.o, target-utils.o): New.
977 * configure.srv (srv_linux_obj): Add linux-maps.o.
978
979 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
980
981 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
982 function, return 1.
983 (the_low_target): Install it.
984
985 2015-07-14 Pedro Alves <palves@redhat.com>
986
987 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
988 Instead, ignore ECHILD, and throw an error for other errnos.
989
990 2015-07-10 Pedro Alves <palves@redhat.com>
991
992 * event-loop.c (struct callback_event) <data>: Change type to
993 gdb_client_data instance instead of gdb_client_data pointer.
994 (append_callback_event): Adjust.
995
996 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
997
998 * linux-aarch64-low.c: Add comments for each linux_target_ops
999 method. Remove comments already covered in target_ops and
1000 linux_target_ops definitions.
1001 (the_low_target): Add comments for each unimplemented method.
1002
1003 2015-07-09 Yao Qi <yao.qi@linaro.org>
1004
1005 * linux-aarch64-low.c (aarch64_regmap): Remove.
1006 (aarch64_usrregs_info): Remove.
1007 (regs_info): Set field usrregs to NULL.
1008
1009 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1010
1011 * linux-low.c: Include "rsp-low.h"
1012 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1013 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1014 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1015 (handle_btrace_enable_pt): New.
1016 (handle_btrace_general_set): Support "pt".
1017 (handle_btrace_conf_general_set): Support "pt:size".
1018
1019 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1020
1021 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1022 Z_PACKET_SW_BP.
1023
1024 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1025
1026 * linux-aarch64-low.c: Remove comment about endianness.
1027 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1028 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1029 memcmp.
1030
1031 2015-06-24 Gary Benson <gbenson@redhat.com>
1032
1033 * linux-i386-ipa.c (stdint.h): Do not include.
1034 * lynx-i386-low.c (stdint.h): Likewise.
1035 * lynx-ppc-low.c (stdint.h): Likewise.
1036 * mem-break.c (stdint.h): Likewise.
1037 * thread-db.c (stdint.h): Likewise.
1038 * tracepoint.c (stdint.h): Likewise.
1039 * win32-low.c (stdint.h): Likewise.
1040
1041 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1042
1043 * server.c (write_qxfer_response): Update call to
1044 remote_escape_output.
1045
1046 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1047 Jan Kratochvil <jan.kratochvil@redhat.com>
1048
1049 Merge multiple hex conversions.
1050 * gdbreplay.c (tohex): Rename to 'fromhex'.
1051 (logchar): Use fromhex.
1052
1053 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1054
1055 * server.c (handle_qxfer_libraries): Set `version' attribute for
1056 <library-list>.
1057
1058 2015-06-10 Gary Benson <gbenson@redhat.com>
1059
1060 * target.h (struct target_ops) <multifs_open>: New field.
1061 <multifs_unlink>: Likewise.
1062 <multifs_readlink>: Likewise.
1063 * linux-low.c (nat/linux-namespaces.h): New include.
1064 (linux_target_ops): Initialize the_target->multifs_open,
1065 the_target->multifs_unlink and the_target->multifs_readlink.
1066 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1067 * hostio.c (hostio_fs_pid): New static variable.
1068 (hostio_handle_new_gdb_connection): New function.
1069 (handle_setfs): Likewise.
1070 (handle_open): Use the_target->multifs_open as appropriate.
1071 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1072 (handle_readlink): Use the_target->multifs_readlink as
1073 appropriate.
1074 (handle_vFile): Handle vFile:setfs packets.
1075 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1076 after target_handle_new_gdb_connection.
1077
1078 2015-06-10 Gary Benson <gbenson@redhat.com>
1079
1080 * configure.ac (AC_CHECK_FUNCS): Add setns.
1081 * config.in: Regenerate.
1082 * configure: Likewise.
1083 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1084 (linux-namespaces.o): New rule.
1085 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1086
1087 2015-06-09 Gary Benson <gbenson@redhat.com>
1088
1089 * hostio.c (handle_open): Process mode argument with
1090 fileio_to_host_mode.
1091
1092 2015-06-01 Yao Qi <yao.qi@linaro.org>
1093
1094 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1095 * linux-x86-low.c: Likewise.
1096
1097 2015-05-28 Don Breazeal <donb@codesourcery.com>
1098
1099 * linux-low.c (handle_extended_wait): Initialize
1100 thread_info.last_resume_kind for new fork children.
1101
1102 2015-05-15 Pedro Alves <palves@redhat.com>
1103
1104 * target.h (target_handle_new_gdb_connection): Rewrite using if
1105 wrapped in do/while.
1106
1107 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1108
1109 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1110 * configure, config.in: Regenerate.
1111 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1112 Declare typedef.
1113
1114 2015-05-12 Don Breazeal <donb@codesourcery.com>
1115
1116 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1117 PTRACE_EVENT_VFORK_DONE.
1118 (linux_low_ptrace_options, extended_event_reported): Add vfork
1119 events.
1120 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1121 and "vforkdone" for RSP 'T' Stop Reply Packet.
1122 * server.h (report_vfork_events): Declare
1123 global variable.
1124
1125 2015-05-12 Don Breazeal <donb@codesourcery.com>
1126
1127 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1128 (the_low_target) <new_fork>: Initialize new member.
1129 * linux-arm-low.c (arm_new_fork): New function.
1130 (the_low_target) <new_fork>: Initialize new member.
1131 * linux-low.c (handle_extended_wait): Call new target function
1132 new_fork.
1133 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1134 * linux-mips-low.c (mips_add_watchpoint): New function
1135 extracted from mips_insert_point.
1136 (the_low_target) <new_fork>: Initialize new member.
1137 (mips_linux_new_fork): New function.
1138 (mips_insert_point): Call mips_add_watchpoint.
1139 * linux-x86-low.c (x86_linux_new_fork): New function.
1140 (the_low_target) <new_fork>: Initialize new member.
1141
1142 2015-05-12 Don Breazeal <donb@codesourcery.com>
1143
1144 * linux-low.c (handle_extended_wait): Implement return value,
1145 rename argument 'event_child' to 'event_lwp', handle
1146 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1147 (linux_low_ptrace_options): New function.
1148 (linux_low_filter_event): Call linux_low_ptrace_options,
1149 use different argument fo linux_enable_event_reporting,
1150 use return value from handle_extended_wait.
1151 (extended_event_reported): New function.
1152 (linux_wait_1): Call extended_event_reported and set
1153 status to report fork events.
1154 (linux_write_memory): Add pid to debug message.
1155 (reset_lwp_ptrace_options_callback): New function.
1156 (linux_handle_new_gdb_connection): New function.
1157 (linux_target_ops): Initialize new structure member.
1158 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1159 * lynx-low.c: Initialize new structure member.
1160 * remote-utils.c (prepare_resume_reply): Implement stop reason
1161 "fork" for "T" stop message.
1162 * server.c (handle_query): Call handle_new_gdb_connection.
1163 * server.h (report_fork_events): Declare global flag.
1164 * target.h (struct target_ops) <handle_new_gdb_connection>:
1165 New member.
1166 (target_handle_new_gdb_connection): New macro.
1167 * win32-low.c: Initialize new structure member.
1168
1169 2015-05-12 Don Breazeal <donb@codesourcery.com>
1170
1171 * mem-break.c (APPEND_TO_LIST): Define macro.
1172 (clone_agent_expr): New function.
1173 (clone_one_breakpoint): New function.
1174 (clone_all_breakpoints): New function.
1175 * mem-break.h: Declare new functions.
1176
1177 2015-05-12 Don Breazeal <donb@codesourcery.com>
1178
1179 * linux-low.c (linux_supports_fork_events): New function.
1180 (linux_supports_vfork_events): New function.
1181 (linux_target_ops): Initialize new structure members.
1182 (initialize_low): Call linux_check_ptrace_features.
1183 * lynx-low.c (lynx_target_ops): Initialize new structure
1184 members.
1185 * server.c (report_fork_events, report_vfork_events):
1186 New global flags.
1187 (handle_query): Add new features to qSupported packet and
1188 response.
1189 (captured_main): Initialize new global variables.
1190 * target.h (struct target_ops) <supports_fork_events>:
1191 New member.
1192 <supports_vfork_events>: New member.
1193 (target_supports_fork_events): New macro.
1194 (target_supports_vfork_events): New macro.
1195 * win32-low.c (win32_target_ops): Initialize new structure
1196 members.
1197
1198 2015-05-12 Gary Benson <gbenson@redhat.com>
1199
1200 * server.c (handle_qxfer_exec_file): Use current process
1201 if annex is empty.
1202
1203 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1204
1205 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1206 Remove HAVE_PTRACE_GETREGS conditionals.
1207 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1208 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1209
1210 2015-05-08 Yao Qi <yao.qi@linaro.org>
1211
1212 * linux-low.c (linux_supports_conditional_breakpoints): New
1213 function.
1214 (linux_target_ops): Install new target method.
1215 * lynx-low.c (lynx_target_ops): Install NULL hook for
1216 supports_conditional_breakpoints.
1217 * nto-low.c (nto_target_ops): Likewise.
1218 * spu-low.c (spu_target_ops): Likewise.
1219 * win32-low.c (win32_target_ops): Likewise.
1220 * server.c (handle_query): Check
1221 target_supports_conditional_breakpoints.
1222 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1223 New field.
1224 (target_supports_conditional_breakpoints): New macro.
1225
1226 2015-05-06 Pedro Alves <palves@redhat.com>
1227
1228 PR server/18081
1229 * server.c (start_inferior): If the process exits, mourn it.
1230
1231 2015-04-21 Gary Benson <gbenson@redhat.com>
1232
1233 * hostio.c (fileio_open_flags_to_host): Factored out to
1234 fileio_to_host_openflags in common/fileio.c. Single use
1235 updated.
1236
1237 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1238
1239 * linux-xtensa-low.c (xtensa_fill_gregset)
1240 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1241 XCHAL_HAVE_LOOP.
1242
1243 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1244
1245 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1246 (regs_info): Replace usrregs pointer with NULL.
1247
1248 2015-04-17 Gary Benson <gbenson@redhat.com>
1249
1250 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1251 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1252 * server.c (handle_qxfer_exec_file): New function.
1253 (qxfer_packets): Add exec-file entry.
1254 (handle_query): Report qXfer:exec-file:read as supported packet.
1255
1256 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1257
1258 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1259
1260 2015-04-09 Gary Benson <gbenson@redhat.com>
1261
1262 * hostio-errno.c (errno_to_fileio_error): Remove function.
1263 Update caller to use remote_fileio_to_fio_error.
1264
1265 2015-04-09 Yao Qi <yao.qi@linaro.org>
1266
1267 * linux-low.c (linux_insert_point): Call
1268 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1269 (linux_remove_point): Call remove_memory_breakpoint if type is
1270 raw_bkpt_type_sw.
1271 * linux-x86-low.c (x86_insert_point): Don't call
1272 insert_memory_breakpoint.
1273 (x86_remove_point): Don't call remove_memory_breakpoint.
1274
1275 2015-04-01 Pedro Alves <palves@redhat.com>
1276 Cleber Rosa <crosa@redhat.com>
1277
1278 * server.c (gdbserver_usage): Reorganize and extend the usage
1279 message.
1280
1281 2015-03-24 Pedro Alves <palves@redhat.com>
1282
1283 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1284 output. Also dump TRAP_TRACE.
1285 (linux_low_filter_event): In debug output, distinguish a
1286 resume_stop SIGSTOP from a delayed SIGSTOP.
1287
1288 2015-03-24 Gary Benson <gbenson@redhat.com>
1289
1290 * linux-x86-low.c (x86_linux_new_thread): Moved to
1291 nat/x86-linux.c.
1292 (x86_linux_prepare_to_resume): Likewise.
1293
1294 2015-03-24 Gary Benson <gbenson@redhat.com>
1295
1296 * Makefile.in (x86-linux-dregs.o): New rule.
1297 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1298 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1299 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1300 (x86_linux_dr_get): Likewise.
1301 (x86_linux_dr_set): Likewise.
1302 (update_debug_registers_callback): Likewise.
1303 (x86_linux_dr_set_addr): Likewise.
1304 (x86_linux_dr_get_addr): Likewise.
1305 (x86_linux_dr_set_control): Likewise.
1306 (x86_linux_dr_get_control): Likewise.
1307 (x86_linux_dr_get_status): Likewise.
1308 (x86_linux_update_debug_registers): Likewise.
1309
1310 2015-03-24 Gary Benson <gbenson@redhat.com>
1311
1312 * linux-x86-low.c (x86_linux_update_debug_registers):
1313 New function, factored out from...
1314 (x86_linux_prepare_to_resume): ...this.
1315
1316 2015-03-24 Gary Benson <gbenson@redhat.com>
1317
1318 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1319 (x86_linux_dr_set): Likewise.
1320 (update_debug_registers_callback): Likewise.
1321 (x86_linux_dr_set_addr): Likewise.
1322 (x86_linux_dr_get_addr): Likewise.
1323 (x86_linux_dr_set_control): Likewise.
1324 (x86_linux_dr_get_control): Likewise.
1325 (x86_linux_dr_get_status): Likewise.
1326 (x86_linux_prepare_to_resume): Likewise.
1327
1328 2015-03-24 Gary Benson <gbenson@redhat.com>
1329
1330 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1331 Use perror_with_name. Pass string through gettext.
1332 (x86_linux_dr_set): Likewise.
1333
1334 2015-03-24 Gary Benson <gbenson@redhat.com>
1335
1336 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1337 (x86_linux_dr_set_addr): ...this.
1338 (x86_dr_low_get_addr): Rename to...
1339 (x86_linux_dr_get_addr): ...this.
1340 (x86_dr_low_set_control): Rename to...
1341 (x86_linux_dr_set_control): ...this.
1342 (x86_dr_low_get_control): Rename to...
1343 (x86_linux_dr_get_control): ...this.
1344 (x86_dr_low_get_status): Rename to...
1345 (x86_linux_dr_get_status): ...this.
1346 (x86_dr_low): Update with new function names.
1347
1348 2015-03-24 Gary Benson <gbenson@redhat.com>
1349
1350 * Makefile.in (x86-linux.o): New rule.
1351 * configure.srv: Add x86-linux.o to relevant targets.
1352 * linux-low.c (lwp_set_arch_private_info): New function.
1353 (lwp_arch_private_info): Likewise.
1354 * linux-x86-low.c: Include nat/x86-linux.h.
1355 (arch_lwp_info): Removed structure.
1356 (update_debug_registers_callback):
1357 Use lwp_set_debug_registers_changed.
1358 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1359 and lwp_set_debug_registers_changed.
1360 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1361
1362 2015-03-24 Gary Benson <gbenson@redhat.com>
1363
1364 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1365 * linux-arm-low.c (arm_new_thread): Likewise.
1366 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1367 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1368 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1369 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1370
1371 2015-03-24 Gary Benson <gbenson@redhat.com>
1372
1373 * linux-low.c (ptid_of_lwp): New function.
1374 (lwp_is_stopped): Likewise.
1375 (lwp_stop_reason): Likewise.
1376 * linux-x86-low.c (update_debug_registers_callback):
1377 Use lwp_is_stopped.
1378 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1379 lwp_stop_reason.
1380
1381 2015-03-24 Gary Benson <gbenson@redhat.com>
1382
1383 * linux-low.h (linux_stop_lwp): Remove declaration.
1384
1385 2015-03-24 Gary Benson <gbenson@redhat.com>
1386
1387 * linux-low.h: Include nat/linux-nat.h.
1388 * linux-low.c (iterate_over_lwps_args): New structure.
1389 (iterate_over_lwps_filter): New function.
1390 (iterate_over_lwps): Likewise.
1391 * linux-x86-low.c (update_debug_registers_callback):
1392 Update signature to what iterate_over_lwps expects.
1393 Remove PID check that iterate_over_lwps now performs.
1394 (x86_dr_low_set_addr): Use iterate_over_lwps.
1395 (x86_dr_low_set_control): Likewise.
1396
1397 2015-03-24 Gary Benson <gbenson@redhat.com>
1398
1399 * linux-x86-low.c (x86_debug_reg_state): New function.
1400 (x86_linux_prepare_to_resume): Use the above.
1401
1402 2015-03-24 Gary Benson <gbenson@redhat.com>
1403
1404 * linux-low.c (current_lwp_ptid): New function.
1405 * linux-x86-low.c: Include nat/linux-nat.h.
1406 (x86_dr_low_get_addr): Use current_lwp_ptid.
1407 (x86_dr_low_get_control): Likewise.
1408 (x86_dr_low_get_status): Likewise.
1409
1410 2015-03-20 Pedro Alves <palves@redhat.com>
1411
1412 * tracepoint.c (cmd_qtstatus): Make "str" const.
1413
1414 2015-03-20 Pedro Alves <palves@redhat.com>
1415
1416 * server.c (handle_general_set): Make "req_str" const.
1417
1418 2015-03-19 Pedro Alves <palves@redhat.com>
1419
1420 * linux-low.c (linux_resume_one_lwp): Rename to ...
1421 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1422 instead call perror_with_name.
1423 (check_ptrace_stopped_lwp_gone): New function.
1424 (linux_resume_one_lwp): Reimplement as wrapper around
1425 linux_resume_one_lwp_throw that swallows errors if the LWP is
1426 gone.
1427
1428 2015-03-19 Pedro Alves <palves@redhat.com>
1429
1430 * linux-low.c (count_events_callback, select_event_lwp_callback):
1431 No longer check whether the thread has resume_stop as last resume
1432 kind.
1433
1434 2015-03-19 Pedro Alves <palves@redhat.com>
1435
1436 * linux-low.c (count_events_callback, select_event_lwp_callback):
1437 Use the lwp's status_pending_p field, not the thread's.
1438
1439 2015-03-19 Pedro Alves <palves@redhat.com>
1440
1441 * linux-low.c (select_event_lwp_callback): Update comments to
1442 no longer mention SIGTRAP.
1443
1444 2015-03-18 Gary Benson <gbenson@redhat.com>
1445
1446 * server.c (handle_query): Do not report vFile:fstat as supported.
1447
1448 2015-03-11 Gary Benson <gbenson@redhat.com>
1449
1450 * hostio.c (sys/types.h): New include.
1451 (sys/stat.h): Likewise.
1452 (common-remote-fileio.h): Likewise.
1453 (handle_fstat): New function.
1454 (handle_vFile): Handle vFile:fstat packets.
1455
1456 2015-03-11 Gary Benson <gbenson@redhat.com>
1457
1458 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1459 struct stat.st_blocks and struct stat.st_blksize.
1460 * configure: Regenerate.
1461 * config.in: Likewise.
1462 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1463 (OBS): Add common-remote-fileio.o.
1464 (common-remote-fileio.o): New rule.
1465
1466 2015-03-09 Pedro Alves <palves@redhat.com>
1467
1468 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1469 'struct sockaddr' pointer in 'accept' call.
1470
1471 2015-03-09 Pedro Alves <palves@redhat.com>
1472
1473 Revert:
1474 2015-03-07 Pedro Alves <palves@redhat.com>
1475 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1476 or <winsock2.h> here. Instead include "gdb_socket.h".
1477 (remote_open): Use union gdb_sockaddr_u.
1478 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1479 or <winsock2.h> here. Instead include "gdb_socket.h".
1480 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1481 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1482 or <sys/un.h>.
1483 (init_named_socket, gdb_agent_helper_thread): Use union
1484 gdb_sockaddr_u.
1485
1486 2015-03-07 Pedro Alves <palves@redhat.com>
1487
1488 * configure.ac (build_warnings): Move
1489 -Wdeclaration-after-statement to the C-specific set.
1490 * configure: Regenerate.
1491
1492 2015-03-07 Pedro Alves <palves@redhat.com>
1493
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 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1508 instead.
1509
1510 2015-03-06 Yao Qi <yao.qi@linaro.org>
1511
1512 * linux-aarch64-low.c (aarch64_insert_point): Use
1513 show_debug_regs as a boolean.
1514 (aarch64_remove_point): Likewise.
1515
1516 2015-03-05 Pedro Alves <palves@redhat.com>
1517
1518 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1519 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1520 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1521 * nto-low.c (nto_target_ops): Likewise.
1522 * spu-low.c (spu_target_ops): Likewise.
1523 * win32-low.c (win32_target_ops): Likewise.
1524
1525 2015-03-04 Pedro Alves <palves@redhat.com>
1526
1527 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1528 Decide whether a breakpoint triggered based on the SIGTRAP's
1529 siginfo.si_code.
1530 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1531 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1532 (linux_low_filter_event): Check for breakpoints before checking
1533 watchpoints.
1534 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1535 siginfo.si_code.
1536 (linux_stopped_by_sw_breakpoint)
1537 (linux_supports_stopped_by_sw_breakpoint)
1538 (linux_stopped_by_hw_breakpoint)
1539 (linux_supports_stopped_by_hw_breakpoint): New functions.
1540 (linux_target_ops): Install new target methods.
1541
1542 2015-03-04 Pedro Alves <palves@redhat.com>
1543
1544 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1545 * server.c (swbreak_feature, hwbreak_feature): New globals.
1546 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1547 (captured_main): Clear swbreak_feature and hwbreak_feature.
1548 * server.h (swbreak_feature, hwbreak_feature): Declare.
1549 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1550 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1551 supports_stopped_by_hw_breakpoint>: New fields.
1552 (target_supports_stopped_by_sw_breakpoint)
1553 (target_stopped_by_sw_breakpoint)
1554 (target_supports_stopped_by_hw_breakpoint)
1555 (target_stopped_by_hw_breakpoint): Declare.
1556
1557 2015-03-04 Pedro Alves <palves@redhat.com>
1558
1559 enum lwp_stop_reason -> enum target_stop_reason
1560 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1561 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1562 (linux_wait_1, stuck_in_jump_pad_callback)
1563 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1564 (linux_stopped_by_watchpoint):
1565 * linux-low.h (enum lwp_stop_reason): Delete.
1566 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1567 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1568
1569 2015-03-04 Yao Qi <yao.qi@linaro.org>
1570
1571 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1572
1573 2015-03-03 Gary Benson <gbenson@redhat.com>
1574
1575 * hostio.c (handle_vFile): Fix prefix lengths.
1576
1577 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1578
1579 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1580 ptr_bits.
1581
1582 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1583
1584 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1585 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1586 (clean): Add "rm -f" for above C files.
1587 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1588 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1589 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1590 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1591 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1592 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1593 (init_registers_s390x_vx_linux64)
1594 (init_registers_s390x_tevx_linux64)
1595 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1596 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1597 declarations.
1598 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1599 (s390_store_vxrs_high): New functions.
1600 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1601 NT_S390_VXRS_HIGH.
1602 (s390_arch_setup): Add logic for selecting one of the new target
1603 descriptions. Activate the new vector regsets if applicable.
1604 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1605 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1606 and init_registers_s390x_tevx_linux64.
1607
1608 2015-03-01 Pedro Alves <palves@redhat.com>
1609
1610 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1611 parameter.
1612
1613 2015-02-27 Pedro Alves <palves@redhat.com>
1614
1615 * linux-x86-low.c (u_debugreg_offset): New function.
1616 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1617
1618 2015-02-27 Pedro Alves <palves@redhat.com>
1619
1620 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1621 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1622 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1623 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1624 (ps_lsetfpregs, ps_getpid)
1625 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1626 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1627 (ps_lsetxregs, ps_plog): Declare.
1628
1629 2015-02-27 Pedro Alves <palves@redhat.com>
1630
1631 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1632 IP_AGENT_EXPORT_FUNC.
1633 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1634 IP_AGENT_EXPORT_FUNC.
1635 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1636 (IP_AGENT_EXPORT): Delete.
1637 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1638 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1639 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1640 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1641 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1642 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1643 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1644 (traceframe_read_count, traceframe_write_count)
1645 (traceframes_created, trace_state_variables, get_raw_reg)
1646 (get_trace_state_variable_value, set_trace_state_variable_value)
1647 (ust_loaded, helper_thread_id, cmd_buf): Use
1648 IPA_SYM_EXPORTED_NAME.
1649 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1650 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1651 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1652 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1653 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1654 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1655 EXTERN_C_PUSH/EXTERN_C_POP.
1656 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1657 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1658 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1659 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1660 (traceframe_write_count, traceframe_read_count)
1661 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1662 (about_to_request_buffer_space, get_trace_state_variable_value)
1663 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1664 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1665 EXTERN_C_PUSH/EXTERN_C_POP.
1666 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1667 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1668 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1669 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1670 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1671 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1672 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1673 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1674 Define.
1675 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1676 (IP_AGENT_EXPORT_VAR_DECL): Define.
1677 (tracing): Declare.
1678 (gdb_agent_get_raw_reg): Declare.
1679
1680 2015-02-27 Tom Tromey <tromey@redhat.com>
1681 Pedro Alves <palves@redhat.com>
1682
1683 Rename symbols whose names are reserved C++ keywords throughout.
1684
1685 2015-02-27 Pedro Alves <palves@redhat.com>
1686
1687 * Makefile.in (COMPILER): New, get it from autoconf.
1688 (CXX): Get from autoconf instead.
1689 (COMPILE.pre): Use COMPILER.
1690 (CC-LD): Rename to ...
1691 (CC_LD): ... this. Use COMPILER.
1692 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1693 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1694 * acinclude.m4: Include build-with-cxx.m4.
1695 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1696 Disable -Werror by default if building in C++ mode.
1697 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1698 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1699 the C++ compiler. Save/restore CXXFLAGS too.
1700 * configure: Regenerate.
1701
1702 2015-02-27 Pedro Alves <palves@redhat.com>
1703
1704 * acinclude.m4: Include libiberty.m4.
1705 * configure.ac: Call libiberty_INIT.
1706 * config.in, configure: Regenerate.
1707
1708 2015-02-26 Pedro Alves <palves@redhat.com>
1709
1710 * linux-low.c (linux_wait_1): When incrementing the PC past a
1711 program breakpoint always use the_low_target.breakpoint_len as
1712 increment, rather than the maximum between that and
1713 the_low_target.decr_pc_after_break.
1714
1715 2015-02-23 Pedro Alves <palves@redhat.com>
1716
1717 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1718 thread was doing a step-over; always adjust the PC if
1719 we stepped over a permanent breakpoint.
1720 (linux_wait_1): If we stepped over breakpoint that was on top of a
1721 permanent breakpoint, manually advance the PC past it.
1722
1723 2015-02-23 Pedro Alves <palves@redhat.com>
1724
1725 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1726 modes.
1727 (x86_fill_gregset, x86_store_gregset): Use it when handling
1728 $orig_eax.
1729
1730 2015-02-20 Pedro Alves <palves@redhat.com>
1731
1732 * thread-db.c: Include "nat/linux-procfs.h".
1733 (thread_db_init): Skip listing new threads if the kernel supports
1734 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1735
1736 2015-02-20 Pedro Alves <palves@redhat.com>
1737
1738 * linux-low.c (status_pending_p_callback): Use ptid_match.
1739
1740 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1741
1742 PR breakpoints/16812
1743 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1744 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1745 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1746
1747 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1748
1749 PR breakpoints/15956
1750 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1751
1752 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1753
1754 * linux-low.c (linux_low_btrace_conf): Print size.
1755 * server.c (handle_btrace_conf_general_set): New.
1756 (hanle_general_set): Call handle_btrace_conf_general_set.
1757 (handle_query): Report Qbtrace-conf:bts:size as supported.
1758
1759 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1760
1761 * linux-low.c (linux_low_enable_btrace): Update parameters.
1762 (linux_low_btrace_conf): New.
1763 (linux_target_ops)<to_btrace_conf>: Initialize.
1764 * server.c (current_btrace_conf): New.
1765 (handle_btrace_enable): Rename to ...
1766 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1767 to target_enable_btrace. Update comment. Update users.
1768 (handle_qxfer_btrace_conf): New.
1769 (qxfer_packets): Add btrace-conf entry.
1770 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1771 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1772 (target_ops)<read_btrace_conf>: New.
1773 (target_enable_btrace): Update parameters.
1774 (target_read_btrace_conf): New.
1775
1776 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1777
1778 * server.c (handle_btrace_general_set): Remove call to
1779 target_supports_btrace.
1780 (supported_btrace_packets): New.
1781 (handle_query): Call supported_btrace_packets.
1782 * target.h: include btrace-common.h.
1783 (btrace_target_info): Removed.
1784 (supports_btrace, target_supports_btrace): Update parameters.
1785
1786 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1787
1788 * Makefile.in (SFILES): Add common/btrace-common.c.
1789 (OBS): Add common/btrace-common.o.
1790 (btrace-common.o): Add build rules.
1791 * linux-low: Include btrace-common.h.
1792 (linux_low_read_btrace): Use struct btrace_data. Call
1793 btrace_data_init and btrace_data_fini.
1794
1795 2015-02-06 Pedro Alves <palves@redhat.com>
1796
1797 * thread-db.c (find_new_threads_callback): Add debug output.
1798
1799 2015-02-04 Pedro Alves <palves@redhat.com>
1800
1801 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1802 (resume_stopped_resumed_lwps): New function.
1803 (linux_wait_for_event_filtered): Use it.
1804
1805 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1806
1807 * Makefile.in (SFILES): Add linux-personality.c.
1808 (linux-personality.o): New rule.
1809 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1810 list of objects to be built.
1811 * linux-low.c: Include nat/linux-personality.h.
1812 (linux_create_inferior): Remove code to disable address space
1813 randomization (moved to ../nat/linux-personality.c). Create
1814 cleanup to disable address space randomization.
1815
1816 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1817
1818 * Makefile.in (posix-strerror.o): New rule.
1819 (mingw-strerror.o): Likewise.
1820 * configure: Regenerated.
1821 * configure.ac: Source file ../common/common.host. Initialize new
1822 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1823
1824 2015-01-14 Yao Qi <yao@codesourcery.com>
1825
1826 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1827 (ppc-linux.o): New rule.
1828 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1829 * configure.ac: AC_CHECK_FUNCS(getauxval).
1830 * config.in: Re-generated.
1831 * configure: Re-generated.
1832 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1833 ppc64_64bit_inferior_p
1834
1835 2015-01-14 Yao Qi <yao@codesourcery.com>
1836
1837 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1838 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1839 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1840 (PT_ORIG_R3, PT_TRAP): Likewise.
1841 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1842 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1843 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1844
1845 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1846
1847 * i387-fp.c (i387_cache_to_xsave): In look over
1848 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1849 zmmh_low_space field by use of zmmh_high_space.
1850
1851 2015-01-09 Pedro Alves <palves@redhat.com>
1852
1853 * linux-low.c (step_over_bkpt): Move higher up in the file.
1854 (handle_extended_wait): Don't store the stop_pc here.
1855 (get_stop_pc): Adjust comments and rename to ...
1856 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1857 stopped for a software breakpoint or hardware breakpoint.
1858 (thread_still_has_status_pending_p): New function.
1859 (status_pending_p_callback): Use
1860 thread_still_has_status_pending_p. If the event is no longer
1861 interesting, resume the LWP.
1862 (handle_tracepoints): Add assert.
1863 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1864 (wstatus_maybe_breakpoint): New function.
1865 (cancel_breakpoint): Delete function.
1866 (check_stopped_by_watchpoint): New function, factored out from
1867 linux_low_filter_event.
1868 (lp_status_maybe_breakpoint): Delete function.
1869 (linux_low_filter_event): Remove filter_ptid argument.
1870 Leave thread group exits pending here. Store the LWP's stop PC.
1871 Always leave events pending.
1872 (linux_wait_for_event_filtered): Pull all events out of the
1873 kernel, and leave them all pending.
1874 (count_events_callback, select_event_lwp_callback): Consider all
1875 events.
1876 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1877 (select_event_lwp): Only give preference to the stepping LWP in
1878 all-stop mode. Adjust comments.
1879 (ignore_event): New function.
1880 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1881 references to cancel_breakpoints. Adjust to renames. Also give
1882 equal priority to all LWPs that have had events in non-stop mode.
1883 If reporting a software breakpoint event, unadjust the LWP's PC.
1884 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1885 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1886 Adjust.
1887 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1888 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1889 (linux_stopped_by_watchpoint): Adjust.
1890 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1891 * linux-low.h (enum lwp_stop_reason): New.
1892 (struct lwp_info) <stop_pc>: Adjust comment.
1893 <stopped_by_watchpoint>: Delete field.
1894 <stop_reason>: New field.
1895 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1896 * mem-break.c (software_breakpoint_inserted_here)
1897 (hardware_breakpoint_inserted_here): New function.
1898 * mem-break.h (software_breakpoint_inserted_here)
1899 (hardware_breakpoint_inserted_here): Declare.
1900 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1901 (cancel_breakpoints): Delete.
1902 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1903 (upload_fast_traceframes): Remove references to
1904 cancel_breakpoints.
1905
1906 2015-01-09 Pedro Alves <palves@redhat.com>
1907
1908 * thread-db.c (find_new_threads_callback): Ignore thread if the
1909 kernel thread ID is -1.
1910
1911 2015-01-09 Pedro Alves <palves@redhat.com>
1912
1913 * linux-low.c (linux_attach_fail_reason_string): Move to
1914 nat/linux-ptrace.c, and rename.
1915 (linux_attach_lwp): Update comment.
1916 (attach_proc_task_lwp_callback): New function.
1917 (linux_attach): Adjust to rename and use
1918 linux_proc_attach_tgid_threads.
1919 (linux_attach_fail_reason_string): Delete declaration.
1920
1921 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1922
1923 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1924 * server.c (gdbserver_version): Likewise.
1925
1926 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1927
1928 * remote-utils.c: Include ctype.h.
1929 (input_interrupt): Explicitly handle the case when the char
1930 received is the NUL byte. Improve the printing of non-ASCII
1931 characters.
1932
1933 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1934
1935 * linux-low.c (linux_low_filter_event): Update call to
1936 linux_enable_event_reporting following the addition of
1937 a new parameter to that function.
1938
1939 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1940
1941 PR server/17457
1942 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1943 (AARCH64_FPCR_REGNO): Likewise.
1944 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1945 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1946 (aarch64_store_fpregset): Likewise.
1947
1948 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1949
1950 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1951 Remove FIXME comment about assumption about N.
1952
1953 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1954
1955 * configure.ac: If large-file support is disabled in GDBserver,
1956 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1957 * configure: Regenerate.
1958
1959 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1960
1961 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1962 warning upon ENODATA from ptrace.
1963 * linux-s390-low.c (s390_store_tdb): New.
1964 (s390_regsets): Add regset for NT_S390_TDB.
1965
1966 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1967
1968 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1969 without a fill_function.
1970 * linux-s390-low.c (s390_fill_last_break): Remove.
1971 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1972 (s390_arch_setup): Use regset's size instead of fill_function for
1973 loop end condition.
1974
1975 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1976
1977 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1978 the regset's store function when ptrace returned an error.
1979 * regcache.c (get_thread_regcache): Invalidate register cache
1980 before fetching inferior's registers.
1981
1982 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1983
1984 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1985 while-loop as for-loop.
1986 (regsets_store_inferior_registers): Likewise.
1987
1988 2014-11-28 Yao Qi <yao@codesourcery.com>
1989
1990 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1991 * config.in, configure: Re-generate.
1992 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1993 is defined.
1994
1995 2014-11-21 Yao Qi <yao@codesourcery.com>
1996
1997 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1998 (AC_CHECK_HEADERS): Remove malloc.h.
1999 * configure: Re-generated.
2000 * config.in: Re-generated.
2001 * server.h: Don't include alloca.h and malloc.h.
2002 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2003 Don't include malloc.h.
2004
2005 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2006
2007 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2008 corresponding ERRNO check in same block.
2009
2010 2014-11-12 Pedro Alves <palves@redhat.com>
2011
2012 * server.c (cont_thread): Update comment.
2013 (start_inferior, attach_inferior): No longer clear cont_thread.
2014 (handle_v_cont): No longer set cont_thread.
2015 (captured_main): Clear cont_thread each time a GDB connects.
2016
2017 2014-11-12 Pedro Alves <palves@redhat.com>
2018
2019 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2020 thread, and don't resume all threads if the Hc thread has exited.
2021
2022 2014-11-12 Pedro Alves <palves@redhat.com>
2023
2024 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2025 the process group instead of to a specific LWP.
2026
2027 2014-10-15 Pedro Alves <palves@redhat.com>
2028
2029 PR server/17487
2030 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2031 parameter.
2032 (arm_set_thread_context): Delete.
2033 (the_low_target): Adjust.
2034 * win32-i386-low.c (debug_registers_changed)
2035 (debug_registers_used): Delete.
2036 (update_debug_registers_callback): New function.
2037 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2038 needing to update their debug registers.
2039 (win32_get_current_dr): New function.
2040 (x86_dr_low_get_addr, x86_dr_low_get_control)
2041 (x86_dr_low_get_status): Fetch the debug register from the thread
2042 record's context.
2043 (i386_initial_stuff): Adjust.
2044 (i386_get_thread_context): Remove current_event parameter. Don't
2045 clear debug_registers_changed nor copy DR values to
2046 debug_reg_state.
2047 (i386_set_thread_context): Delete.
2048 (i386_prepare_to_resume): New function.
2049 (i386_thread_added): Mark the thread as needing to update irs
2050 debug registers.
2051 (the_low_target): Remove i386_set_thread_context and install
2052 i386_prepare_to_resume.
2053 * win32-low.c (win32_get_thread_context): Adjust.
2054 (win32_set_thread_context): Use SetThreadContext
2055 directly.
2056 (win32_prepare_to_resume): New function.
2057 (win32_require_context): New function, factored out from ...
2058 (thread_rec): ... this.
2059 (continue_one_thread): Call win32_prepare_to_resume on each thread
2060 we're about to continue.
2061 (win32_resume): Call win32_prepare_to_resume on the event thread.
2062 * win32-low.h (struct win32_thread_info)
2063 <debug_registers_changed>: New field.
2064 (struct win32_target_ops): Change prototype of set_thread_context,
2065 delete set_thread_context and add prepare_to_resume.
2066 (win32_require_context): New declaration.
2067
2068 2014-10-08 Gary Benson <gbenson@redhat.com>
2069
2070 * server.h: Do not include common-exceptions.h.
2071
2072 2014-10-08 Gary Benson <gbenson@redhat.com>
2073
2074 * server.h: Do not include cleanups.h.
2075
2076 2014-09-30 James Hogan <james.hogan@imgtec.com>
2077
2078 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2079 mips64-dsp-linux.c.
2080
2081 2014-09-23 Yao Qi <yao@codesourcery.com>
2082
2083 * linux-low.c (lp_status_maybe_breakpoint): New function.
2084 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2085 (count_events_callback): Likewise.
2086 (select_event_lwp_callback): Likewise.
2087 (cancel_breakpoints_callback): Likewise.
2088
2089 2014-09-19 Don Breazeal <donb@codesourcery.com>
2090
2091 * linux-low.c (handle_extended_wait): Call
2092 linux_ptrace_get_extended_event.
2093 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2094 linux_is_extended_waitstatus.
2095
2096 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2097
2098 * Makefile.in (CPPFLAGS): Define.
2099 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2100 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2101
2102 2014-09-16 Gary Benson <gbenson@redhat.com>
2103
2104 * inferiors.h (current_inferior): Renamed as...
2105 (current_thread): New variable. All uses updated.
2106 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2107 (maybe_move_out_of_jump_pad): Likewise.
2108 (cancel_breakpoint): Likewise.
2109 (linux_low_filter_event): Likewise.
2110 (wait_for_sigstop): Likewise.
2111 (linux_resume_one_lwp): Likewise.
2112 (need_step_over_p): Likewise.
2113 (start_step_over): Likewise.
2114 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2115 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2116 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2117 and save_inferior as saved_thread.
2118 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2119 saved_thread.
2120 (regcache_invalidate_thread): Likewise.
2121 * remote-utils.c (prepare_resume_reply): Likewise.
2122 * thread-db.c (thread_db_get_tls_address): Likewise.
2123 (disable_thread_event_reporting): Likewise.
2124 (remove_thread_event_breakpoints): Likewise.
2125 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2126 as saved_thread.
2127 * target.h (set_desired_inferior): Renamed as...
2128 (set_desired_thread): New declaration. All uses updated.
2129 * server.c (myresume): Updated comment to reference thread instead
2130 of inferior.
2131 (handle_serial_event): Likewise.
2132 (handle_target_event): Likewise.
2133
2134 2014-09-12 Tom Tromey <tromey@redhat.com>
2135 Gary Benson <gbenson@redhat.com>
2136
2137 * regcache.h: Include common-regcache.h.
2138 (regcache_read_pc): Don't declare.
2139 * regcache.c (get_thread_regcache_for_ptid): New function.
2140
2141 2014-09-11 Tom Tromey <tromey@redhat.com>
2142 Gary Benson <gbenson@redhat.com>
2143
2144 * symbol.c: New file.
2145 * Makefile.in (SFILES): Add symbol.c.
2146 (OBS): Add symbol.o.
2147
2148 2014-09-11 Gary Benson <gbenson@redhat.com>
2149
2150 * target.c (target_stop_ptid, target_continue_ptid): New
2151 functions.
2152
2153 2014-09-11 Tom Tromey <tromey@redhat.com>
2154 Gary Benson <gbenson@redhat.com>
2155
2156 * target.h: Include target/target.h.
2157 * target.c (target_read_memory, target_read_uint32)
2158 (target_write_memory): New functions.
2159
2160 2014-09-11 Gary Benson <gbenson@redhat.com>
2161
2162 * server.h (debug_hw_points): Don't declare.
2163 * server.c (debug_hw_points): Don't define. Replace all uses
2164 with show_debug_regs.
2165 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2166 all uses with show_debug_regs.
2167
2168 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2169
2170 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2171 endianness into account.
2172 (ppc_supply_ptrace_register): Likewise.
2173
2174 2014-09-03 James Hogan <james.hogan@imgtec.com>
2175
2176 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2177 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2178
2179 2014-09-03 Gary Benson <gbenson@redhat.com>
2180
2181 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2182 ALL_DEBUG_ADDRESS_REGISTERS.
2183
2184 2014-09-02 Gary Benson <gbenson@redhat.com>
2185
2186 * i386-low.h: Renamed as...
2187 * x86-low.h: New file. All type, function and variable name
2188 prefixes changed from "i386_" to "x86_". All references updated.
2189 * i386-low.c: Renamed as...
2190 * x86-low.c: New file. All type, function and variable name
2191 prefixes changed from "i386_" to "x86_". All references updated.
2192
2193 2014-09-02 Gary Benson <gbenson@redhat.com>
2194
2195 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2196 (x86_linux_new_thread): Likewise.
2197
2198 2014-08-29 Gary Benson <gbenson@redhat.com>
2199
2200 * server.h (setjmp.h): Do not include.
2201 (toplevel): Do not declare.
2202 (common-exceptions.h): Include.
2203 (cleanups.h): Likewise.
2204 * server.c (toplevel): Do not define.
2205 (exit_code): New static global.
2206 (detach_or_kill_for_exit_cleanup): New function.
2207 (main): New function. Original main renamed to...
2208 (captured_main): New function.
2209 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2210
2211 2014-08-29 Gary Benson <gbenson@redhat.com>
2212
2213 * Makefile.in (SFILES): Add common/common-exceptions.c.
2214 (OBS): Add common-exceptions.o.
2215 (common-exceptions.o): New rule.
2216 * utils.c (prepare_to_throw_exception): New function.
2217
2218 2014-08-29 Gary Benson <gbenson@redhat.com>
2219
2220 * config.in: Regenerate.
2221 * configure: Likewise.
2222
2223 2014-08-29 Gary Benson <gbenson@redhat.com>
2224
2225 * Makefile.in (SFILES): Add common/cleanups.c.
2226 (OBS): cleanups.o.
2227 (cleanups.o): New rule.
2228
2229 2014-08-29 Gary Benson <gbenson@redhat.com>
2230
2231 * utils.c (internal_vwarning): New function.
2232
2233 2014-08-28 Gary Benson <gbenson@redhat.com>
2234
2235 * utils.h (fatal): Remove declaration.
2236 * utils.c (fatal): Remove function.
2237
2238 2014-08-28 Gary Benson <gbenson@redhat.com>
2239
2240 * tracepoint.c (gdb_agent_init): Replace fatal with
2241 perror_with_name.
2242 (initialize_tracepoint): Likewise.
2243
2244 2014-08-28 Gary Benson <gbenson@redhat.com>
2245
2246 * remote-utils.c (remote_prepare): Replace fatal with error.
2247
2248 2014-08-28 Gary Benson <gbenson@redhat.com>
2249
2250 * linux-low.c (linux_async): Replace fatal with warning.
2251 Tidy up and return.
2252 (linux_start_non_stop): Return -1 if linux_async failed.
2253
2254 2014-08-28 Gary Benson <gbenson@redhat.com>
2255
2256 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2257 gdb_assert.
2258 (i386_dr_low_get_addr): Remove vague comment.
2259 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2260 gdb_assert.
2261
2262 2014-08-28 Gary Benson <gbenson@redhat.com>
2263
2264 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2265 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2266 internal_error.
2267 (linux_resume_one_lwp): Likewise.
2268 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2269 gdb_assert.
2270 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2271 with internal_error.
2272 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2273 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2274 (find_register_by_name): Replace fatal with internal_error.
2275 (find_regno): Likewise.
2276 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2277 * thread-db.c (thread_db_create_event): Likewise.
2278 (thread_db_load_search): Likewise.
2279 (try_thread_db_load_1): Likewise.
2280 * tracepoint.c (get_jump_space_head): Replace fatal with
2281 internal_error.
2282 (claim_trampoline_space): Likewise.
2283 (have_fast_tracepoint_trampoline_buffer): Likewise.
2284 (cmd_qtstart): Likewise.
2285 (stop_tracing): Likewise.
2286 (fast_tracepoint_collecting): Likewise.
2287 (target_malloc): Likewise.
2288 (download_tracepoint): Likewise.
2289 (download_trace_state_variables): Replace check with gdb_assert.
2290 (upload_fast_traceframes): Replace fatal with internal_error.
2291
2292 2014-08-19 Tom Tromey <tromey@redhat.com>
2293 Gary Benson <gbenson@redhat.com>
2294
2295 * Makefile.in (SFILES): Add common/common-debug.c.
2296 (OBS): Add common-debug.o.
2297 (common-debug.o): New rule.
2298 * debug.h (debug_printf): Don't declare.
2299 * debug.c (debug_printf): Renamed and rewritten as...
2300 (debug_vprintf): New function.
2301
2302 2014-08-19 Gary Benson <gbenson@redhat.com>
2303
2304 * utils.h: Do not include print-utils.h.
2305
2306 2014-08-19 Tom Tromey <tromey@redhat.com>
2307 Gary Benson <gbenson@redhat.com>
2308
2309 * server.h: Add static assertion.
2310 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2311
2312 2014-08-19 Tom Tromey <tromey@redhat.com>
2313 Gary Benson <gbenson@redhat.com>
2314
2315 * Makefile.in (SFILES): Add common/errors.c.
2316 (OBS): Add errors.o.
2317 (IPA_OBS): Add errors-ipa.o.
2318 (errors.o): New rule.
2319 (errors-ipa.o): Likewise.
2320 * utils.h (perror_with_name, error, warning): Don't declare.
2321 * utils.c (warning): Renamed and rewritten as...
2322 (vwarning): New function.
2323 (error): Renamed and rewritten as...
2324 (verror): New function.
2325 (internal_error): Renamed and rewritten as...
2326 (internal_verror): New function.
2327
2328 2014-08-07 Gary Benson <gbenson@redhat.com>
2329
2330 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2331 * configure: Regenerate.
2332 * config.in: Likewise.
2333 * server.h: Do not include errno.h.
2334 * event-loop.c: Likewise.
2335 * hostio-errno.c: Likewise.
2336 * linux-low.c: Likewise.
2337 * remote-utils.c: Likewise.
2338 * spu-low.c: Likewise.
2339 * utils.c: Likewise.
2340 * gdbreplay.c: Unconditionally include errno.h.
2341
2342 2014-08-07 Gary Benson <gbenson@redhat.com>
2343
2344 * server.h: Do not include string.h.
2345 * event-loop.c: Likewise.
2346 * linux-low.c: Likewise.
2347 * regcache.c: Likewise.
2348 * remote-utils.c: Likewise.
2349 * spu-low.c: Likewise.
2350 * utils.c: Likewise.
2351
2352 2014-08-07 Gary Benson <gbenson@redhat.com>
2353
2354 * server.h: Do not include gdb_assert.h.
2355
2356 2014-08-07 Gary Benson <gbenson@redhat.com>
2357
2358 * server.h: Do not include common-utils.h.
2359
2360 2014-08-07 Gary Benson <gbenson@redhat.com>
2361
2362 * server.h: Do not include ptid.h.
2363 * notif.h: Likewise.
2364
2365 2014-08-07 Gary Benson <gbenson@redhat.com>
2366
2367 * server.h: Do not include gdb_locale.h.
2368
2369 2014-08-07 Gary Benson <gbenson@redhat.com>
2370
2371 * server.h: Do not include gdb/signals.h.
2372 * win32-low.c: Likewise.
2373
2374 2014-08-07 Gary Benson <gbenson@redhat.com>
2375
2376 * server.h: Do not include pathmax.h.
2377
2378 2014-08-07 Gary Benson <gbenson@redhat.com>
2379
2380 * server.h: Do not include libiberty.h.
2381 * linux-bfin-low.c: Likewise.
2382
2383 2014-08-07 Gary Benson <gbenson@redhat.com>
2384
2385 * server.h: Do not include ansidecl.h.
2386
2387 2014-08-07 Gary Benson <gbenson@redhat.com>
2388
2389 * linux-x86-low.c: Do not include stddef.h.
2390 * lynx-ppc-low.c: Likewise.
2391 * tracepoint.c: Likewise.
2392
2393 2014-08-07 Gary Benson <gbenson@redhat.com>
2394
2395 * server.h: Do not include stdarg.h.
2396 * nto-low.c: Likewise.
2397
2398 2014-08-07 Gary Benson <gbenson@redhat.com>
2399
2400 * server.h: Do not include stdlib.h.
2401 * inferiors.c: Likewise.
2402 * linux-low.c: Likewise.
2403 * regcache.c: Likewise.
2404 * spu-low.c: Likewise.
2405 * tracepoint.c: Likewise.
2406 * utils.c: Likewise.
2407
2408 2014-08-07 Gary Benson <gbenson@redhat.com>
2409
2410 * server.h: Do not include stdio.h.
2411 * linux-low.c: Likewise.
2412 * remote-utils.c: Likewise.
2413 * spu-low.c: Likewise.
2414 * utils.c: Likewise.
2415 * wincecompat.c: Likewise.
2416
2417 2014-08-06 Gary Benson <gbenson@redhat.com>
2418
2419 * regcache.c (init_register_cache): Move conditionals inside if.
2420
2421 2014-08-06 Gary Benson <gbenson@redhat.com>
2422
2423 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2424
2425 2014-07-31 Gary Benson <gbenson@redhat.com>
2426
2427 * ax.h: Do not include server.h.
2428 * gdbthread.h: Likewise.
2429 * lynx-low.h: Likewise.
2430 * notif.h: Likewise.
2431
2432 2014-07-30 Gary Benson <gbenson@redhat.com>
2433
2434 * server.h: Include common-defs.h.
2435 Do not include config.h or build-gnulib-gdbserver/config.h.
2436
2437 2014-07-30 Gary Benson <gbenson@redhat.com>
2438
2439 * hostio-errno.c: Move server.h to top of includes list.
2440 * inferiors.c: Likewise.
2441 * linux-x86-low.c: Likewise.
2442 * notif.c: Include server.h.
2443
2444 2014-07-24 Tom Tromey <tromey@redhat.com>
2445 Gary Benson <gbenson@redhat.com>
2446
2447 * server.h (CORE_ADDR): Now unsigned.
2448
2449 2014-07-16 Pedro Alves <palves@redhat.com>
2450
2451 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2452
2453 2014-07-15 Pedro Alves <palves@redhat.com>
2454
2455 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2456 copy.
2457
2458 2014-07-11 Pedro Alves <palves@redhat.com>
2459
2460 * linux-low.c (kill_wait_lwp): New function, based on
2461 kill_one_lwp_callback, but use my_waitpid directly.
2462 (kill_one_lwp_callback, linux_kill): Use it.
2463
2464 2014-06-23 Pedro Alves <palves@redhat.com>
2465
2466 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2467 before setting DR0..DR3.
2468
2469 2014-06-20 Gary Benson <gbenson@redhat.com>
2470
2471 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2472 * configure: Regenerated.
2473 * config.in: Likewise.
2474
2475 2014-06-20 Gary Benson <gbenson@redhat.com>
2476
2477 * Makefile.in (SFILES): Update locations for files moved
2478 from common to nat.
2479 (object file files): Reordered.
2480
2481 2014-06-20 Gary Benson <gbenson@redhat.com>
2482
2483 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2484 (i386_dr_low_set_addr): Likewise.
2485 (i386_dr_low_get_addr): Likewise.
2486 (i386_dr_low_can_set_control): Likewise.
2487 (i386_dr_low_set_control): Likewise.
2488 (i386_dr_low_get_control): Likewise.
2489 (i386_dr_low_get_status): Likewise.
2490 (i386_get_debug_register_length): Likewise.
2491 * linux-x86-low.c (i386_dr_low_set_addr):
2492 Changed signature. Made static.
2493 (i386_dr_low_get_addr): Likewise.
2494 (i386_dr_low_set_control): Likewise.
2495 (i386_dr_low_get_control): Likewise.
2496 (i386_dr_low_get_status): Likewise.
2497 (i386_dr_low): New global variable.
2498 * win32-i386-low.c (i386_dr_low_set_addr):
2499 Changed signature. Made static.
2500 (i386_dr_low_get_addr): Likewise.
2501 (i386_dr_low_set_control): Likewise.
2502 (i386_dr_low_get_control): Likewise.
2503 (i386_dr_low_get_status): Likewise.
2504 (i386_dr_low): New global variable.
2505
2506 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2507
2508 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2509 * Makefile.in (AR, AR_FLAGS): Define.
2510 * configure: Regenerate.
2511
2512 2014-06-19 Gary Benson <gbenson@redhat.com>
2513
2514 * Makefile.in (i386-dregs.o): New rule.
2515 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2516 * i386-low.c (target.h): Remove include.
2517 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2518 (DR_CONTROL_SHIFT): Likewise.
2519 (DR_CONTROL_SIZE): Likewise.
2520 (DR_RW_EXECUTE): Likewise.
2521 (DR_RW_WRITE): Likewise.
2522 (DR_RW_READ): Likewise.
2523 (DR_RW_IORW): Likewise.
2524 (DR_LEN_1): Likewise.
2525 (DR_LEN_2): Likewise.
2526 (DR_LEN_4): Likewise.
2527 (DR_LEN_8): Likewise.
2528 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2529 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2530 (DR_ENABLE_SIZE): Likewise.
2531 (DR_LOCAL_SLOWDOWN): Likewise.
2532 (DR_GLOBAL_SLOWDOWN): Likewise.
2533 (DR_CONTROL_RESERVED): Likewise.
2534 (I386_DR_CONTROL_MASK): Likewise.
2535 (I386_DR_VACANT): Likewise.
2536 (I386_DR_LOCAL_ENABLE): Likewise.
2537 (I386_DR_GLOBAL_ENABLE): Likewise.
2538 (I386_DR_DISABLE): Likewise.
2539 (I386_DR_SET_RW_LEN): Likewise.
2540 (I386_DR_GET_RW_LEN): Likewise.
2541 (I386_DR_WATCH_HIT): Likewise.
2542 (i386_wp_op_t): Likewise.
2543 (i386_show_dr): Likewise.
2544 (i386_length_and_rw_bits): Likewise.
2545 (i386_insert_aligned_watchpoint): Likewise.
2546 (i386_remove_aligned_watchpoint): Likewise.
2547 (i386_handle_nonaligned_watchpoint): Likewise.
2548 i386_update_inferior_debug_regs(): Likewise.
2549 (i386_dr_insert_watchpoint): Likewise.
2550 (i386_dr_remove_watchpoint): Likewise.
2551 (i386_dr_region_ok_for_watchpoint): Likewise.
2552 (i386_dr_stopped_data_address): Likewise.
2553 (i386_dr_stopped_by_watchpoint): Likewise.
2554
2555 2014-06-19 Gary Benson <gbenson@redhat.com>
2556
2557 * i386-low.c (i386_dr_show): Renamed to
2558 i386_show_dr and made static. All uses updated.
2559 (i386_dr_length_and_rw_bits): Renamed to
2560 i386_length_and_rw_bits and made static.
2561 All uses updated.
2562 (i386_dr_insert_aligned_watchpoint): Renamed to
2563 i386_insert_aligned_watchpoint and made static.
2564 All uses updated.
2565 (i386_dr_remove_aligned_watchpoint): Renamed to
2566 i386_remove_aligned_watchpoint and made static.
2567 All uses updated.
2568 (i386_dr_update_inferior_debug_regs): Renamed to
2569 i386_update_inferior_debug_regs and made static.
2570 All uses updated.
2571
2572 2014-06-18 Gary Benson <gbenson@redhat.com>
2573
2574 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2575 (i386_dr_low_can_set_control): Likewise.
2576 (i386_get_debug_register_length): Likewise.
2577 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2578 (i386_dr_low_can_set_control): Likewise.
2579 (i386_get_debug_register_length): Likewise.
2580
2581 2014-06-17 Gary Benson <gbenson@redhat.com>
2582
2583 * i386-low.h (i386-dregs.h): New include.
2584 (DR_FIRSTADDR): Now in i386-dregs.h.
2585 (DR_LASTADDR): Likewise.
2586 (DR_NADDR): Likewise.
2587 (DR_STATUS): Likewise.
2588 (DR_CONTROL): Likewise.
2589 (i386_debug_reg_state): Likewise.
2590 (i386_dr_insert_watchpoint): Likewise.
2591 (i386_dr_remove_watchpoint): Likewise.
2592 (i386_dr_region_ok_for_watchpoint): Likewise.
2593 (i386_dr_stopped_data_address): Likewise.
2594 (i386_dr_stopped_by_watchpoint): Likewise.
2595 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2596
2597 2014-06-18 Gary Benson <gbenson@redhat.com>
2598
2599 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2600 i386_dr_insert_watchpoint.
2601 (i386_low_remove_watchpoint): Renamed to
2602 i386_dr_remove_watchpoint.
2603 (i386_low_region_ok_for_watchpoint): Renamed to
2604 i386_dr_region_ok_for_watchpoint.
2605 (i386_low_stopped_data_address): Renamed to
2606 i386_dr_stopped_data_address.
2607 (i386_low_stopped_by_watchpoint): Renamed to
2608 i386_dr_stopped_by_watchpoint.
2609 * i386-low.c (i386_show_dr): Renamed to
2610 i386_dr_show and made nonstatic. All uses updated.
2611 (i386_length_and_rw_bits): Renamed to
2612 i386_dr_length_and_rw_bits and made nonstatic.
2613 All uses updated.
2614 (i386_insert_aligned_watchpoint): Renamed to
2615 i386_dr_insert_aligned_watchpoint and made nonstatic.
2616 All uses updated.
2617 (i386_remove_aligned_watchpoint): Renamed to
2618 i386_dr_remove_aligned_watchpoint and made nonstatic.
2619 All uses updated.
2620 (i386_update_inferior_debug_regs): Renamed to
2621 i386_dr_update_inferior_debug_regs and made nonstatic.
2622 All uses updated.
2623 (i386_low_insert_watchpoint): Renamed to
2624 i386_dr_insert_watchpoint. All uses updated.
2625 (i386_low_remove_watchpoint): Renamed to
2626 i386_dr_remove_watchpoint. All uses updated.
2627 (i386_low_region_ok_for_watchpoint): Renamed to
2628 i386_dr_region_ok_for_watchpoint. All uses updated.
2629 (i386_low_stopped_data_address): Renamed to
2630 i386_dr_stopped_data_address. All uses updated.
2631 (i386_low_stopped_by_watchpoint): Renamed to
2632 i386_dr_stopped_by_watchpoint. All uses updated.
2633
2634 2014-06-18 Gary Benson <gbenson@redhat.com>
2635
2636 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2637 (i386_dr_low_can_set_control): Likewise.
2638 (i386_insert_aligned_watchpoint): New check.
2639
2640 2014-06-18 Gary Benson <gbenson@redhat.com>
2641
2642 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2643 Renamed to state.
2644
2645 2014-06-18 Gary Benson <gbenson@redhat.com>
2646
2647 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2648 instead of fatal and error.
2649 (i386_handle_nonaligned_watchpoint): Likewise.
2650
2651 2014-06-18 Gary Benson <gbenson@redhat.com>
2652
2653 * i386-low.c (i386_get_debug_register_length): New macro.
2654 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2655 (i386_show_dr): Use debug_printf instead of fprintf. Use
2656 phex to format values.
2657
2658 2014-06-18 Gary Benson <gbenson@redhat.com>
2659
2660 * i386-low.h: Comment changes.
2661 * i386-low.c: Likewise.
2662
2663 2014-06-18 Gary Benson <gbenson@redhat.com>
2664
2665 * i386-low.c: Whitespace changes.
2666
2667 2014-06-12 Tom Tromey <tromey@redhat.com>
2668
2669 * utils.c (freeargv): Remove.
2670
2671 2014-06-12 Tom Tromey <tromey@redhat.com>
2672
2673 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2674 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2675 (parse_debug_format_options): Likewise.
2676 (gdbserver_usage): Likewise.
2677 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2678 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2679 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2680 against libiberty.
2681 ($(LIBGNU)): Depend on libiberty.
2682 (all-lib): Recurse into all subdirs.
2683 (install-only): Invoke "install" target in subdirs.
2684 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2685 targets.
2686 * configure: Rebuild.
2687 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2688 for vasprintf, vsnprintf, or gettimeofday.
2689 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2690 srv_tgtobj.
2691
2692 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2693
2694 * development.sh: Delete.
2695 * Makefile.in (config.status): Adjust dependency on development.sh.
2696 * configure.ac: Adjust development.sh source call.
2697 * configure: Regenerate.
2698
2699 2014-06-02 Pedro Alves <palves@redhat.com>
2700
2701 * ax.c (gdb_free_agent_expr): New function.
2702 * ax.h (gdb_free_agent_expr): New declaration.
2703 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2704 list.
2705 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2706 static.
2707 (clear_breakpoint_conditions_and_commands): New function.
2708 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2709 (clear_breakpoint_conditions_and_commands): New declaration.
2710
2711 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2712
2713 * linux-aarch64-low.c (asm/ptrace.h): Include.
2714
2715 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2716
2717 Fix TLS access for -static -pthread.
2718 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2719 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2720 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2721
2722 2014-05-20 Pedro Alves <palves@redhat.com>
2723
2724 * linux-aarch64-low.c (aarch64_insert_point)
2725 (aarch64_remove_point): No longer check whether the type is
2726 supported here. Adjust to new interface.
2727 (the_low_target): Install aarch64_supports_z_point_type as
2728 supports_z_point_type method.
2729 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2730 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2731 instead of a Z packet char. Adjust.
2732 (arm_supports_z_point_type): New function.
2733 (arm_insert_point, arm_remove_point): Adjust to new interface.
2734 (the_low_target): Install arm_supports_z_point_type.
2735 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2736 (cris_insert_point, cris_remove_point): Adjust to new interface.
2737 Don't check whether the type is supported here.
2738 (the_low_target): Install cris_supports_z_point_type.
2739 * linux-low.c (linux_supports_z_point_type): New function.
2740 (linux_insert_point, linux_remove_point): Adjust to new interface.
2741 * linux-low.h (struct linux_target_ops) <insert_point,
2742 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2743 raw_breakpoint pointer parameter.
2744 <supports_z_point_type>: New method.
2745 * linux-mips-low.c (mips_supports_z_point_type): New function.
2746 (mips_insert_point, mips_remove_point): Adjust to new interface.
2747 Use mips_supports_z_point_type.
2748 (the_low_target): Install mips_supports_z_point_type.
2749 * linux-ppc-low.c (the_low_target): Install NULL as
2750 supports_z_point_type method.
2751 * linux-s390-low.c (the_low_target): Install NULL as
2752 supports_z_point_type method.
2753 * linux-sparc-low.c (the_low_target): Install NULL as
2754 supports_z_point_type method.
2755 * linux-x86-low.c (x86_supports_z_point_type): New function.
2756 (x86_insert_point): Adjust to new insert_point interface. Use
2757 insert_memory_breakpoint. Adjust to new
2758 i386_low_insert_watchpoint interface.
2759 (x86_remove_point): Adjust to remove_point interface. Use
2760 remove_memory_breakpoint. Adjust to new
2761 i386_low_remove_watchpoint interface.
2762 (the_low_target): Install x86_supports_z_point_type.
2763 * lynx-low.c (lynx_target_ops): Install NULL as
2764 supports_z_point_type callback.
2765 * nto-low.c (nto_supports_z_point_type): New.
2766 (nto_insert_point, nto_remove_point): Adjust to new interface.
2767 (nto_target_ops): Install nto_supports_z_point_type.
2768 * mem-break.c: Adjust intro comment.
2769 (struct raw_breakpoint) <raw_type, size>: New fields.
2770 <inserted>: Update comment.
2771 <shlib_disabled>: Delete field.
2772 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2773 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2774 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2775 (raw_bkpt_type_to_target_hw_bp_type): New function.
2776 (find_enabled_raw_code_breakpoint_at): New function.
2777 (find_raw_breakpoint_at): New type and size parameters. Use them.
2778 (insert_memory_breakpoint): New function, based off
2779 set_raw_breakpoint_at.
2780 (remove_memory_breakpoint): New function.
2781 (set_raw_breakpoint_at): Reimplement.
2782 (set_breakpoint): New, based on set_breakpoint_at.
2783 (set_breakpoint_at): Reimplement.
2784 (delete_raw_breakpoint): Go through the_target->remove_point
2785 instead of assuming memory breakpoints.
2786 (find_gdb_breakpoint_at): Delete.
2787 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2788 (find_gdb_breakpoint): New function.
2789 (set_gdb_breakpoint_at): Delete.
2790 (z_type_supported): New function.
2791 (set_gdb_breakpoint_1): New function, loosely based off
2792 set_gdb_breakpoint_at.
2793 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2794 (delete_gdb_breakpoint_at): Delete.
2795 (delete_gdb_breakpoint_1): New function, loosely based off
2796 delete_gdb_breakpoint_at.
2797 (delete_gdb_breakpoint): New function.
2798 (clear_gdb_breakpoint_conditions): Rename to ...
2799 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2800 breakpoint.
2801 (add_condition_to_breakpoint): Make static.
2802 (add_breakpoint_condition): Take a struct breakpoint pointer
2803 instead of an address. Adjust.
2804 (gdb_condition_true_at_breakpoint): Rename to ...
2805 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2806 z_type parameter.
2807 (gdb_condition_true_at_breakpoint): Reimplement.
2808 (add_breakpoint_commands): Take a struct breakpoint pointer
2809 instead of an address. Adjust.
2810 (gdb_no_commands_at_breakpoint): Rename to ...
2811 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2812 parameter. Return true if no breakpoint was found. Change debug
2813 output.
2814 (gdb_no_commands_at_breakpoint): Reimplement.
2815 (run_breakpoint_commands): Rename to ...
2816 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2817 and change return type to boolean.
2818 (run_breakpoint_commands): New function.
2819 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2820 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2821 breakpoint. Go through the_target->remove_point instead of
2822 assuming memory breakpoint.
2823 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2824 software and hardware breakpoints.
2825 (reinsert_raw_breakpoint): Go through the_target->insert_point
2826 instead of assuming memory breakpoint.
2827 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2828 software and hardware breakpoints.
2829 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2830 Check both software and hardware breakpoints.
2831 (validate_inserted_breakpoint): Assert the breakpoint is a
2832 software breakpoint. Set the inserted flag to -1 instead of
2833 setting shlib_disabled.
2834 (delete_disabled_breakpoints): Adjust.
2835 (validate_breakpoints): Only validate software breakpoints.
2836 Adjust to inserted flag change.
2837 (check_mem_read, check_mem_write): Skip breakpoint types other
2838 than software breakpoints. Adjust to inserted flag change.
2839 * mem-break.h (enum raw_bkpt_type): New enum.
2840 (raw_breakpoint, struct process_info): Forward declare.
2841 (Z_packet_to_target_hw_bp_type): Delete declaration.
2842 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2843 (set_gdb_breakpoint, delete_gdb_breakpoint)
2844 (clear_breakpoint_conditions): New declarations.
2845 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2846 (breakpoint_inserted_here): Update comment.
2847 (add_breakpoint_condition, add_breakpoint_commands): Replace
2848 address parameter with a breakpoint pointer parameter.
2849 (gdb_breakpoint_here): Update comment.
2850 (delete_gdb_breakpoint_at): Delete.
2851 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2852 * server.c (process_point_options): Take a struct breakpoint
2853 pointer instead of an address. Adjust.
2854 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2855 delete_gdb_breakpoint.
2856 * spu-low.c (spu_target_ops): Install NULL as
2857 supports_z_point_type method.
2858 * target.h: Include mem-break.h.
2859 (struct target_ops) <prepare_to_access_memory>: Update comment.
2860 <supports_z_point_type>: New field.
2861 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2862 instead of a char. Also take a raw breakpoint pointer.
2863 * win32-arm-low.c (the_low_target): Install NULL as
2864 supports_z_point_type.
2865 * win32-i386-low.c (i386_supports_z_point_type): New function.
2866 (i386_insert_point, i386_remove_point): Adjust to new interface.
2867 (the_low_target): Install i386_supports_z_point_type.
2868 * win32-low.c (win32_supports_z_point_type): New function.
2869 (win32_insert_point, win32_remove_point): Adjust to new interface.
2870 (win32_target_ops): Install win32_supports_z_point_type.
2871 * win32-low.h (struct win32_target_ops):
2872 <supports_z_point_type>: New method.
2873 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2874 instead of a char. Also take a raw breakpoint pointer.
2875
2876 2014-05-20 Pedro Alves <palves@redhat.com>
2877
2878 * mem-break.h: Include break-common.h.
2879 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2880 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2881 (Z_packet_to_target_hw_bp_type): New declaration.
2882 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2883 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2884 (Z_PACKET_ACCESS_WP): Delete macros.
2885 (Z_packet_to_hw_type): Delete function.
2886 * i386-low.h: Don't include break-common.h here.
2887 (Z_packet_to_hw_type): Delete declaration.
2888 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2889 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2890 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2891 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2892 * linux-aarch64-low.c: Don't include break-common.h here.
2893 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2894 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2895 (Z_packet_to_target_hw_bp_type): Delete function.
2896 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2897 function.
2898 (mips_insert_point, mips_remove_point): Use
2899 Z_packet_to_target_hw_bp_type.
2900
2901 2014-05-20 Pedro Alves <palves@redhat.com>
2902
2903 * linux-aarch64-low.c: Include break-common.h.
2904 (enum target_point_type): Delete.
2905 (Z_packet_to_point_type): Rename to ...
2906 (Z_packet_to_target_hw_bp_type): ... this, and return a
2907 target_hw_bp_type instead.
2908 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2909 instead of an enum target_point_type.
2910 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2911 breakpoint type.
2912 (aarch64_dr_state_insert_one_point)
2913 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2914 (aarch64_handle_aligned_watchpoint)
2915 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2916 Take an enum target_hw_bp_type instead of an enum
2917 target_point_type.
2918 (aarch64_supports_z_point_type): New function.
2919 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2920 use Z_packet_to_target_hw_bp_type.
2921
2922 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2923
2924 * configure.ac: Only use -Werror by default when DEVELOPMENT
2925 is true.
2926 * configure: Regenerate.
2927
2928 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2929
2930 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2931 * linux-x86-low.c (X86_64_USER_REGS): New.
2932 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2933
2934 2014-04-28 Yao Qi <yao@codesourcery.com>
2935
2936 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2937 name.
2938
2939 2014-04-25 Pedro Alves <palves@redhat.com>
2940
2941 PR server/16255
2942 * linux-low.c (linux_attach_fail_reason_string): New function.
2943 (linux_attach_lwp): Delete.
2944 (linux_attach_lwp_1): Rename to ...
2945 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2946 argument. Remove "initial" parameter. Return int instead of
2947 void. Don't error or warn here.
2948 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2949 failure to attach to the tgid. Call warning when failing to
2950 attach to an lwp.
2951 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2952 argument. Remove "initial" parameter. Return int instead of
2953 void. Don't error or warn here.
2954 (linux_attach_fail_reason_string): New declaration.
2955 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2956 interface change. Use linux_attach_fail_reason_string.
2957
2958 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2959 Walfred Tedeschi <walfred.tedeschi@intel.com>
2960
2961 * Makefile.in: Added rules to handle new files
2962 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2963 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2964 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2965 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2966 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2967 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2968 x32-avx512-linux.o.
2969 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2970 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2971 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2972 i386/x32-avx512.xml.
2973 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2974 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2975 i386/x32-avx512-linux.xml.
2976 * i387-fp.c (num_avx512_k_registers): New constant for number
2977 of K registers.
2978 (num_avx512_zmmh_low_registers): New constant for number of
2979 lower ZMM registers (0-15).
2980 (num_avx512_zmmh_high_registers): New constant for number of
2981 higher ZMM registers (16-31).
2982 (num_avx512_ymmh_registers): New contant for number of higher
2983 YMM registers (ymm16-31 added by avx521 on x86_64).
2984 (num_avx512_xmm_registers): New constant for number of higher
2985 XMM registers (xmm16-31 added by AVX512 on x86_64).
2986 (struct i387_xsave): Add space for AVX512 registers.
2987 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2988 Add code to handle AVX512 registers.
2989 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2990 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2991 prototypei from generated file.
2992 (tdesc_amd64_avx512_linux): Likewise.
2993 (init_registers_x32_avx512_linux): Likewise.
2994 (tdesc_x32_avx512_linux): Likewise.
2995 (init_registers_i386_avx512_linux): Likewise.
2996 (tdesc_i386_avx512_linux): Likewise.
2997 (x86_64_regmap): Add AVX512 registers.
2998 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2999 mask.
3000 (initialize_low_arch): Add code to initialize AVX512 registers.
3001
3002 2014-04-23 Pedro Alves <palves@redhat.com>
3003
3004 * mem-break.c (find_gdb_breakpoint_at): Make static.
3005 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3006
3007 2014-04-23 Pedro Alves <palves@redhat.com>
3008
3009 * i386-low.c: Don't include break-common.h here.
3010 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3011 prototype to take target_hw_bp_type as argument instead of a Z
3012 packet char.
3013 * i386-low.h: Include break-common.h here.
3014 (Z_packet_to_hw_type): Declare.
3015 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3016 prototypes.
3017 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3018 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3019 (x86_remove_point): Convert the packet number to a
3020 target_hw_bp_type before calling i386_low_remove_watchpoint.
3021 * win32-i386-low.c (i386_insert_point): Convert the packet number
3022 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3023 (i386_remove_point): Convert the packet number to a
3024 target_hw_bp_type before calling i386_low_remove_watchpoint.
3025
3026 2014-04-23 Pedro Alves <palves@redhat.com>
3027
3028 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3029
3030 2014-04-10 Pedro Alves <palves@redhat.com>
3031
3032 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3033 Check if the condition or command is NULL before checking if the
3034 breakpoint is known. On success, return true.
3035 * mem-break.h (add_breakpoint_condition): Document return.
3036 (add_breakpoint_commands): Add describing comment.
3037 * server.c (skip_to_semicolon): New function.
3038 (process_point_options): Use it.
3039
3040 2014-04-09 Pedro Alves <palves@redhat.com>
3041
3042 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3043 to lwpid_of.
3044
3045 2014-02-27 Pedro Alves <palves@redhat.com>
3046
3047 PR 12702
3048 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3049 macros.
3050 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3051 output.
3052 (last_thread_of_process_p): Take a PID argument instead of a
3053 thread pointer.
3054 (linux_wait_for_lwp): Delete.
3055 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3056 functions.
3057 (linux_low_filter_event): New function, party factored out from
3058 linux_wait_for_event.
3059 (linux_wait_for_event): Rename to ...
3060 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3061 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3062 sigsuspend. Check for zombie leaders.
3063 (linux_wait_for_event): Reimplement as wrapper around
3064 linux_wait_for_event_filtered.
3065 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3066 a normal or signal exit is seen, it's the whole process exiting.
3067 (wait_for_sigstop): No longer a for_each_inferior callback.
3068 Rewrite on top of linux_wait_for_event_filtered.
3069 (stop_all_lwps): Call wait_for_sigstop directly.
3070 * server.c (resume, handle_target_event): Handle
3071 TARGET_WAITKIND_NO_RESUMED.
3072
3073 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3074
3075 * win32-low.c (psapi_get_dll_name,
3076 * win32_CreateToolhelp32Snapshot): Delete.
3077 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3078 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3079 Delete.
3080 (handle_load_dll): Add function description.
3081 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3082
3083 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3084
3085 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3086 Add comment.
3087 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3088 base address when calling win32_add_one_solib.
3089 (handle_load_dll): Delete local variable load_addr.
3090 Remove 0x1000 offset applied to DLL base address when calling
3091 win32_add_one_solib.
3092 (handle_unload_dll): Add comment.
3093
3094 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3095
3096 * win32-low.c (win32_add_all_dlls): Renames
3097 win32_ensure_ntdll_loaded. Rewrite function documentation.
3098 Adjust implementation to always load all DLLs.
3099 Add 0x1000 offset to DLL base address when calling
3100 win32_add_one_solib.
3101 (child_initialization_done): New static global.
3102 (do_initial_child_stuff): Set child_initialization_done to
3103 zero during child initialization, and 1 after. Replace call
3104 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3105 Add comment.
3106 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3107 (handle_unload_dll): Add function documentation.
3108 (get_child_debug_event): Ignore load and unload DLL events
3109 during child initialization.
3110
3111 2014-02-20 Doug Evans <dje@google.com>
3112
3113 Remove global all_lwps.
3114 * inferiors.h (ptid_of): Move here from linux-low.h.
3115 (pid_of, lwpid_of): Ditto.
3116 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3117 parameter is a struct thread_info * now.
3118 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3119 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3120 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3121 directly.
3122 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3123 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3124 * linux-arm-low.c (update_registers_callback): Update, "entry"
3125 parameter is a struct thread_info * now.
3126 Fetch lwpid from current_inferior directly.
3127 (arm_insert_point): Pass &all_threads to find_inferior instead of
3128 &all_lwps.
3129 (arm_remove_point): Ditto.
3130 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3131 (arm_prepare_to_resume): Fetch pid from thread.
3132 (arm_read_description): Fetch lwpid from current_inferior directly.
3133 * linux-low.c (all_lwps): Delete.
3134 (delete_lwp): Delete call to remove_inferior.
3135 (handle_extended_wait): Fetch lwpid from thread.
3136 (add_lwp): Don't set lwp->entry.id. Remove call to
3137 add_inferior_to_list.
3138 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3139 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3140 (kill_one_lwp_callback): Ditto.
3141 (linux_kill): Don't dereference NULL pointer.
3142 Fetch ptid,lwpid from thread.
3143 (get_detach_signal): Fetch ptid from thread.
3144 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3145 Simplify call to regcache_invalidate_thread.
3146 (delete_lwp_callback): Update, "entry" parameter is a
3147 struct thread_info * now. Fetch pid from thread.
3148 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3149 (status_pending_p_callback): Update, "entry" parameter is a
3150 struct thread_info * now. Fetch ptid from thread.
3151 (find_lwp_pid): Update, "entry" parameter is a
3152 struct thread_info * now.
3153 (linux_wait_for_lwp): Fetch pid from thread.
3154 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3155 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3156 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3157 (dequeue_one_deferred_signal): Ditto.
3158 (cancel_breakpoint): Fetch ptid from current_inferior.
3159 (linux_wait_for_event): Pass &all_threads to find_inferior,
3160 not &all_lwps. Fetch ptid, lwpid from thread.
3161 (count_events_callback): Update, "entry" parameter is a
3162 struct thread_info * now.
3163 (select_singlestep_lwp_callback): Ditto.
3164 (select_event_lwp_callback): Ditto.
3165 (cancel_breakpoints_callback): Ditto.
3166 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3167 not &all_lwps.
3168 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3169 (unsuspend_one_lwp): Update, "entry" parameter is a
3170 struct thread_info * now.
3171 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3172 not &all_lwps.
3173 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3174 Fetch lwpid from thread, not lwp.
3175 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3176 Pass &all_threads to find_inferior, not &all_lwps.
3177 (send_sigstop): Fetch lwpid from thread, not lwp.
3178 (send_sigstop_callback): Update, "entry" parameter is a
3179 struct thread_info * now.
3180 (suspend_and_send_sigstop_callback): Ditto.
3181 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3182 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3183 struct thread_info * now.
3184 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3185 from thread, lwp.
3186 (lwp_running): Update, "entry" parameter is a
3187 struct thread_info * now.
3188 (stop_all_lwps): Fetch ptid from thread.
3189 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3190 (linux_resume_one_lwp): Fetch lwpid from thread.
3191 (linux_set_resume_request): Update, "entry" parameter is a
3192 struct thread_info * now. Fetch pid, lwpid from thread.
3193 (resume_status_pending_p): Update, "entry" parameter is a
3194 struct thread_info * now.
3195 (need_step_over_p): Ditto. Fetch lwpid from thread.
3196 (start_step_over): Fetch lwpid from thread.
3197 (linux_resume_one_thread): Update, "entry" parameter is a
3198 struct thread_info * now. Fetch lwpid from thread.
3199 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3200 (proceed_one_lwp): Update, "entry" parameter is a
3201 struct thread_info * now. Fetch lwpid from thread.
3202 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3203 struct thread_info * now.
3204 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3205 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3206 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3207 directly.
3208 (regsets_store_inferior_registers): Ditto.
3209 (fetch_register, store_register): Ditto.
3210 (linux_read_memory, linux_write_memory): Ditto.
3211 (linux_request_interrupt): Ditto.
3212 (linux_read_auxv): Ditto.
3213 (linux_xfer_siginfo): Ditto.
3214 (linux_qxfer_spu): Ditto.
3215 (linux_qxfer_libraries_svr4): Ditto.
3216 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3217 moved to inferiors.h.
3218 (get_lwp): Delete.
3219 (get_thread_lwp): Update.
3220 (struct lwp_info): Delete member "entry". Simplify comment for
3221 member "thread".
3222 (all_lwps): Delete.
3223 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3224 current_inferior directly.
3225 (update_watch_registers_callback): Update, "entry" parameter is a
3226 struct thread_info * now. Fetch pid from thread.
3227 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3228 (mips_insert_point): Fetch lwpid from current_inferior.
3229 Pass &all_threads to find_inferior, not &all_lwps.
3230 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3231 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3232 directly.
3233 (mips_stopped_data_address): Ditto.
3234 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3235 directly.
3236 * linux-tile-low.c (tile_arch_setup): Ditto.
3237 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3238 (update_debug_registers_callback): Update, "entry" parameter is a
3239 struct thread_info * now. Fetch pid from thread.
3240 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3241 Pass &all_threads to find_inferior, not &all_lwps.
3242 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3243 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3244 Pass &all_threads to find_inferior, not &all_lwps.
3245 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3246 (i386_dr_low_get_status): Ditto.
3247 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3248 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3249 (x86_linux_read_description): Ditto.
3250 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3251
3252 2014-02-20 Doug Evans <dje@google.com>
3253
3254 * inferiors.c (get_first_inferior): Fix buglet.
3255
3256 2014-02-19 Doug Evans <dje@google.com>
3257
3258 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3259 * inferiors.c (add_thread): Change result type to struct thread_info *.
3260 All callers updated.
3261 (add_lwp): Call add_thread here instead of in callers.
3262 All callers updated.
3263 * linux-low.h (get_lwp_thread): Rewrite.
3264 (struct lwp_info): New member "thread".
3265
3266 2014-02-19 Doug Evans <dje@google.com>
3267
3268 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3269 All callers updated.
3270
3271 2014-02-19 Doug Evans <dje@google.com>
3272
3273 * inferiors.c (add_thread): Fix whitespace.
3274
3275 2014-02-19 Doug Evans <dje@google.com>
3276
3277 * dll.c (clear_dlls): Replace accessing list implemention details
3278 with API function.
3279 * gdbthread.h (get_first_thread): Declare.
3280 * inferiors.c (for_each_inferior_with_data): New function.
3281 (get_first_thread): New function.
3282 (find_thread_ptid): Simplify.
3283 (get_first_inferior): New function.
3284 (clear_list): Delete.
3285 (one_inferior_p): New function.
3286 (clear_inferior_list): New function.
3287 (clear_inferiors): Update.
3288 * inferiors.h (for_each_inferior_with_data): Declare.
3289 (clear_inferior_list): Declare.
3290 (one_inferior_p): Declare.
3291 (get_first_inferior): Declare.
3292 * linux-low.c (linux_wait_for_event): Replace accessing list
3293 implemention details with API function.
3294 * server.c (target_running): Ditto.
3295 (accumulate_file_name_length): New function.
3296 (emit_dll_description): New function.
3297 (handle_qxfer_libraries): Replace accessing list implemention
3298 details with API function.
3299 (handle_qxfer_threads_worker): New function.
3300 (handle_qxfer_threads_proper): Replace accessing list implemention
3301 details with API function.
3302 (handle_query): Ditto.
3303 (visit_actioned_threads_callback_ftype): New typedef.
3304 (visit_actioned_threads_data): New struct.
3305 (visit_actioned_threads): Rewrite to be find_inferior callback.
3306 (resume): Call find_inferior.
3307 (handle_status): Replace accessing list implemention
3308 details with API function.
3309 (process_serial_event): Replace accessing list implemention details
3310 with API function.
3311 * target.c (set_desired_inferior): Replace accessing list implemention
3312 details with API function.
3313 * tracepoint.c (same_process_p): New function.
3314 (gdb_agent_about_to_close): Replace accessing list implemention
3315 details with API function.
3316 * win32-low.c (child_delete_thread): Replace accessing list
3317 implemention details with API function.
3318 (match_dll_by_basename): New function.
3319 (dll_is_loaded_by_basename): New function.
3320 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3321 details call to dll_is_loaded_by_basename.
3322
3323 2014-02-19 Doug Evans <dje@google.com>
3324
3325 * dll.h (struct dll_info): Add comment.
3326 * gdbthread.h (struct thread_info): Add comment.
3327 (current_ptid): Simplify.
3328 * inferiors.c (add_process): Update.
3329 (remove_process): Update.
3330 * inferiors.h (struct process_info): Rename member "head" to "entry".
3331 * linux-low.c (delete_lwp): Update.
3332 (add_lwp): Update.
3333 (last_thread_of_process_p): Update.
3334 (kill_one_lwp_callback, linux_kill): Update.
3335 (status_pending_p_callback): Update.
3336 (wait_for_sigstop): Update. Simplify read of ptid.
3337 (start_step_over): Update.
3338 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3339 (get_lwp_thread): Update.
3340 (struct lwp_info): Rename member "head" to "entry".
3341 * regcache.h (inferior_list_entry): Delete.
3342 * server.c (kill_inferior_callback): Update.
3343 (detach_or_kill_inferior_callback): Update.
3344 (print_started_pid): Update.
3345 (print_attached_pid): Update.
3346 (process_serial_event): Simplify read of ptid.
3347 * thread-db.c (thread_db_create_event): Update.
3348 (thread_db_get_tls_address): Update.
3349 * win32-low.c (current_inferior_ptid): Simplify.
3350
3351 2014-02-19 Tom Tromey <tromey@redhat.com>
3352
3353 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3354 argument.
3355 (target_supports_btrace): Update.
3356
3357 2014-02-14 Yao Qi <yao@codesourcery.com>
3358
3359 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3360 (rsp-low-ipa.o): New target.
3361
3362 2014-02-12 Tom Tromey <tromey@redhat.com>
3363
3364 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3365 convert_ascii_to_int.
3366 * regcache.c (registers_to_string): Likewise.
3367 * remote-utils.c (decode_M_packet): Likewise.
3368 * server.c (process_serial_event): Likewise.
3369
3370 2014-02-12 Tom Tromey <tromey@redhat.com>
3371
3372 * server.c (handle_query, handle_v_run): Use hex2bin, not
3373 unhexify.
3374 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3375
3376 2014-02-12 Tom Tromey <tromey@redhat.com>
3377
3378 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3379 convert_int_to_ascii.
3380 * regcache.c (registers_to_string, collect_register_as_string):
3381 Likewise.
3382 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3383 Likewise.
3384 * server.c (process_serial_event): Likewise.
3385 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3386 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3387
3388 2014-02-12 Tom Tromey <tromey@redhat.com>
3389
3390 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3391 bin2hex, not hexify.
3392 * tracepoint.c (cmd_qtstatus): Likewise.
3393
3394 2014-02-12 Tom Tromey <tromey@redhat.com>
3395
3396 * remote-utils.c (monitor_output): Pass explicit length to
3397 hexify.
3398
3399 2014-02-12 Tom Tromey <tromey@redhat.com>
3400
3401 * tracepoint.c: Include rsp-low.h.
3402 * server.c: Include rsp-low.h.
3403 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3404 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3405 declare.
3406 * remote-utils.c: Include rsp-low.h.
3407 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3408 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3409 (convert_int_to_ascii, convert_ascii_to_int): Move to
3410 common/rsp-low.c.
3411 * regcache.c: Include rsp-low.h.
3412 * ax.c: Include rsp-low.h.
3413 * Makefile.in (SFILES): Add common/rsp-low.c.
3414 (OBS): Add rsp-low.o.
3415 (rsp-low.o): New target.
3416
3417 2014-02-12 Tom Tromey <tromey@redhat.com>
3418
3419 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3420 Include print-utils.h.
3421 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3422 (plongest, thirty_two, phex_nz): Remove.
3423 * Makefile.in (SFILES): Add common/print-utils.c.
3424 (OBS): Add print-utils.o.
3425 (print-utils-ipa.o): New target.
3426 (print-utils.o): New target.
3427 (IPA_OBJS): Add print-utils-ipa.o.
3428
3429 2014-02-06 Tom Tromey <tromey@redhat.com>
3430
3431 * Makefile.in (SFILES): Fix indentation.
3432
3433 2014-02-05 Doug Evans <dje@google.com>
3434
3435 * linux-low.c (linux_wait_for_event): Improve comment.
3436 (linux_wait_1): Keep current_inferior in sync with event_child.
3437
3438 2014-01-22 Doug Evans <dje@google.com>
3439
3440 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3441
3442 2014-01-22 Doug Evans <dje@google.com>
3443
3444 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3445 * configure: Regenerate.
3446 * config.in: Regenerate.
3447 * Makefile.in (SFILES): Add debug.c.
3448 (OBS): Add debug.o.
3449 * debug.c: New file.
3450 * debug.h: New file.
3451 * linux-aarch64-low.c (*): Update all debugging printfs to use
3452 debug_printf instead of fprintf.
3453 * linux-arm-low.c (*): Ditto.
3454 * linux-cris-low.c (*): Ditto.
3455 * linux-crisv32-low.c (*): Ditto.
3456 * linux-m32r-low.c (*): Ditto.
3457 * linux-sparc-low.c (*): Ditto.
3458 * linux-x86.c (*): Ditto.
3459 * linux-low.c (*): Ditto.
3460 (linux_wait_1): Add calls to debug_enter, debug_exit.
3461 (linux_wait): Remove redundant debugging printf.
3462 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3463 (linux_resume, unstop_all_lwps): Ditto.
3464 * mem-break.c (*): Update all debugging printfs to use
3465 debug_printf instead of fprintf.
3466 * remote-utils.c (*): Ditto.
3467 * thread-db.c (*): Ditto.
3468 * server.c #include <ctype.h>, "gdb_vecs.h".
3469 (debug_threads): Moved to debug.c.
3470 (*): Update all debugging printfs to use debug_printf instead of
3471 fprintf.
3472 (start_inferior): Replace call to fflush with call to debug_flush.
3473 (monitor_show_help): Mention set debug-format.
3474 (parse_debug_format_options): New function.
3475 (handle_monitor_command): Handle "monitor set debug-format".
3476 (gdbserver_usage): Mention --debug-format.
3477 (main): Parse --debug-format.
3478 * server.h (debug_threads): Declaration moved to debug.h.
3479 #include "debug.h".
3480 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3481 trace_debug_1 that uses debug_printf.
3482 (tracepoint_look_up_symbols): Update all debugging printfs to use
3483 debug_printf instead of fprintf.
3484
3485 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3486
3487 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3488 sys/ptrace.h.
3489
3490 2014-01-17 Pedro Alves <palves@redhat.com>
3491
3492 PR build/16445
3493 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3494 defined after including gdb_proc_service.h.
3495
3496 2014-01-16 Doug Evans <dje@google.com>
3497
3498 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3499 (match_dll): Use it.
3500
3501 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3502
3503 * target.h (target_ops) <read_btrace>: Change parameters and
3504 return type to allow error reporting.
3505 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3506 trace reading errors on.
3507 * linux-low.c (linux_low_read_btrace): Pass trace reading
3508 errors on.
3509 (linux_low_disable_btrace): New.
3510
3511 2014-01-15 Doug Evans <dje@google.com>
3512
3513 * inferiors.c (thread_id_to_gdb_id): Delete.
3514 * inferiors.h (thread_id_to_gdb_id): Delete.
3515
3516 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3517
3518 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3519 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3520 versions.
3521
3522 2014-01-08 Pedro Alves <palves@redhat.com>
3523
3524 * server.c (handle_status): Don't discard previous queued stop
3525 replies or thread's pending status here.
3526 (main) <disconnection>: Do it here instead.
3527
3528 2014-01-08 Pedro Alves <palves@redhat.com>
3529
3530 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3531 * server.c (visit_actioned_threads, handle_pending_status): New
3532 function.
3533 (handle_v_cont): Factor out parts to ...
3534 (resume): ... this new function. If in all-stop, and a thread
3535 being resumed has a pending status, report it without actually
3536 resuming.
3537 (myresume): Adjust to use the new 'resume' function.
3538 (clear_pending_status_callback, set_pending_status_callback)
3539 (find_status_pending_thread_callback): New functions.
3540 (handle_status): Handle the case of multiple threads having
3541 interesting statuses to report. Report threads' real last signal
3542 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3543 with an interesting thread to report the status for, instead of
3544 always reporting the status of the first thread.
3545
3546 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3547
3548 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3549 * gdbreplay.c (gdbreplay_version): Likewise.
3550
3551 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3552
3553 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3554 iov.iov_len with the real length in use.
3555
3556 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3557
3558 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3559 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3560 for all targets that use win32-low.c.
3561 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3562 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3563
3564 2013-12-13 Pedro Alves <palves@redhat.com>
3565
3566 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3567 if equal to TARGET_WAITKIND_LOADED.
3568 * win32-low.c (cached_status): New static global.
3569 (win32_wait): Add declaration.
3570 (do_initial_child_stuff): Flush all initial pending debug events
3571 up to the initial breakpoint.
3572 (win32_wait): If CACHED_STATUS was set, return that instead
3573 of doing a real wait. Remove the code resuming the execution
3574 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3575 during the initial phase. Also remove the code changing
3576 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3577 TARGET_WAITKIND_STOPPED.
3578
3579 2013-12-11 Yao Qi <yao@codesourcery.com>
3580
3581 * notif.c (handle_notif_ack): Return 0 if no notification
3582 matches.
3583
3584 2013-11-20 Doug Evans <dje@google.com>
3585
3586 * linux-low.c (linux_set_resume_request): Fix comment.
3587
3588 2013-11-20 Doug Evans <dje@google.com>
3589
3590 * linux-low.c (resume_status_pending_p): Tweak comment.
3591
3592 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3593
3594 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3595 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3596 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3597 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3598 (srv_amd64_regobj): Add amd64-mpx.o.
3599 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3600 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3601 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3602 * i387-fp.c (num_pl_bnd_register) Added constant.
3603 (num_pl_bnd_cfg_registers) Added constant.
3604 (struct i387_xsave) Added reserved area and MPX fields.
3605 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3606 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3607 function.
3608 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3609 (init_registers_amd64_mpx_linux): Declare new function.
3610 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3611 (x86_64_regmap): Add MPX registers.
3612 (x86_linux_read_description): Add MPX case.
3613 (initialize_low_arch): Initialize MPX targets.
3614
3615 2013-11-18 Tom Tromey <tromey@redhat.com>
3616
3617 * configure: Rebuild.
3618 * configure.ac: Don't check for stdlib.h.
3619 * gdbreplay.c: Unconditionally include stdlib.h.
3620
3621 2013-11-18 Tom Tromey <tromey@redhat.com>
3622
3623 * config.in: Rebuild.
3624 * configure: Rebuild.
3625 * configure.ac: Don't use AC_HEADER_DIRENT.
3626
3627 2013-11-18 Tom Tromey <tromey@redhat.com>
3628
3629 * server.h: Don't check HAVE_STRING_H.
3630 * gdbreplay.c: Don't check HAVE_STRING_H.
3631 * configure: Rebuild.
3632
3633 2013-11-18 Tom Tromey <tromey@redhat.com>
3634
3635 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3636 LIBGNU.
3637
3638 2013-11-08 Tom Tromey <tromey@redhat.com>
3639
3640 * configure, config.in: Rebuild.
3641 * configure.ac: Remove unused configury.
3642
3643 2013-11-08 Tom Tromey <tromey@redhat.com>
3644
3645 * acinclude.m4: Include common.m4, codeset.m4.
3646 * configure, config.in: Rebuild.
3647 * configure.ac: Use GDB_AC_COMMON.
3648
3649 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3650
3651 * linux-s390-low.c (HWCAP_S390_TE): New define.
3652 (s390_arch_setup): Consider the TE field in the HWCAP for
3653 determining 'have_regset_tdb'.
3654
3655 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3656
3657 PR gdb/16014
3658 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3659 call to sizeof.
3660
3661 2013-10-02 Pedro Alves <palves@redhat.com>
3662
3663 * server.c (process_serial_event): Don't output "GDBserver
3664 exiting" if GDB is connected through stdio.
3665 * target.c (mywait): Likewise, be silent if GDB is connected
3666 through stdio.
3667
3668 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3669
3670 * lynx-low.c (lynx_add_threads_after_attach): New function.
3671 (lynx_attach): Remove call to add_thread. Add call to
3672 lynx_add_threads_after_attach instead.
3673
3674 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3675
3676 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3677 * config.in, configure: Regenerated.
3678
3679 2013-09-18 Yao Qi <yao@codesourcery.com>
3680
3681 PR server/15959
3682 * server.c (start_inferior): Clear 'resume_info'.
3683
3684 2013-09-16 Jiong Wang <jiwang@tilera.com>
3685
3686 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3687 for each register.
3688
3689 2013-09-16 Jiong Wang <jiwang@tilera.com>
3690
3691 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3692 linux-tile-low.o to srv_tgtobj.
3693
3694 2013-09-16 Will Newton <will.newton@linaro.org>
3695
3696 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3697 out regs.
3698
3699 2013-09-06 Pedro Alves <palves@redhat.com>
3700
3701 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3702 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3703 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3704 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3705 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3706 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3707
3708 2013-09-06 Pedro Alves <palves@redhat.com>
3709
3710 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3711 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3712
3713 2013-09-06 Pedro Alves <palves@redhat.com>
3714
3715 * linux-amd64-ipa.c: Include tracepoint.h.
3716 * linux-i386-ipa.c: Include tracepoint.h.
3717
3718 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3719
3720 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3721 (ps_get_thread_area): New function.
3722
3723 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3724
3725 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3726 (initialize_low_arch): Call init_registers_crisv32 rather than
3727 init_register_crisv32.
3728
3729 2013-09-05 Pedro Alves <palves@redhat.com>
3730
3731 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3732 to ...
3733 * hostio.h: ... this new file.
3734 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3735 win32-low.c: Include hostio.h.
3736
3737 2013-09-05 Pedro Alves <palves@redhat.com>
3738
3739 * server.h (gdb_client_data, handler_func, callback_handler_func)
3740 (delete_file_handler, add_file_handler, append_callback_event)
3741 (delete_callback_event, start_event_loop, initialize_event_loop):
3742 Move to event-loop.h and include it.
3743 * event-loop.h: New file.
3744
3745 2013-09-05 Pedro Alves <palves@redhat.com>
3746
3747 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3748 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3749 (loaded_dll, unloaded_dll): Move to ...
3750 * dll.h: ... this new file.
3751 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3752
3753 2013-09-05 Pedro Alves <palves@redhat.com>
3754
3755 * server.h (current_process, get_thread_process, all_processes)
3756 (add_inferior_to_list, for_each_inferior, current_inferior)
3757 (remove_inferior, add_process, remove_process, find_process_pid)
3758 (have_started_inferiors_p, have_attached_inferiors_p)
3759 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3760 (clear_inferiors, find_inferior, find_inferior_id)
3761 (inferior_target_data, set_inferior_target_data)
3762 (inferior_regcache_data, set_inferior_regcache_data): Move to
3763 inferiors.h, and include it.
3764 * inferiors.h: New file.
3765
3766 2013-09-05 Pedro Alves <palves@redhat.com>
3767
3768 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3769 Move ...
3770 * ax.h: ... here.
3771
3772 2013-09-05 Pedro Alves <palves@redhat.com>
3773
3774 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3775 tracepoint.h.
3776 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3777 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3778 (handle_tracepoint_general_set, handle_tracepoint_query)
3779 (tracepoint_finished_step, tracepoint_was_hit)
3780 (release_while_stepping_state_list, current_traceframe)
3781 (in_readonly_region, traceframe_read_mem)
3782 (fetch_traceframe_registers, traceframe_read_sdata)
3783 (traceframe_read_info, struct fast_tpoint_collect_status)
3784 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3785 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3786 (supply_fast_tracepoint_registers)
3787 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3788 (ipa_tdesc, claim_trampoline_space)
3789 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3790 (agent_mem_read, agent_get_trace_state_variable_value)
3791 (agent_set_trace_state_variable_value, agent_tsv_read)
3792 (agent_mem_read_string, get_raw_reg_func_addr)
3793 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3794 * tracepoint.h: ... this new file.
3795
3796 2013-09-05 Pedro Alves <palves@redhat.com>
3797
3798 * server.h (perror_with_name, error, fatal, warning, paddress)
3799 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3800 include it.
3801 * utils.h: New file.
3802
3803 2013-09-05 Pedro Alves <palves@redhat.com>
3804
3805 * server.h (remote_debug, noack_mode, transport_is_reliable)
3806 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3807 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3808 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3809 (write_enn, initialize_async_io, enable_async_io)
3810 (disable_async_io, check_remote_input_interrupt_request)
3811 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3812 (dead_thread_notify, prepare_resume_reply)
3813 (decode_address_to_semicolon, decode_address, decode_m_packet)
3814 (decode_M_packet, decode_X_packet, decode_xfer_write)
3815 (decode_search_memory_packet, unhexify, hexify)
3816 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3817 (look_up_one_symbol, relocate_instruction)
3818 (monitor_output): Move to remote-utils.h, and include it.
3819 * remote-utils.h: New file.
3820
3821 2013-09-05 Pedro Alves <palves@redhat.com>
3822
3823 * server.h (_): Delete.
3824
3825 2013-09-02 Pedro Alves <palves@redhat.com>
3826
3827 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3828 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3829 allocated.
3830 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3831
3832 2013-09-02 Pierre Muller <muller@sourceware.org>
3833
3834 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3835 or WriteProcessMemory complete successfully and handle
3836 ERROR_PARTIAL_COPY error.
3837
3838 2013-09-02 Pedro Alves <palves@redhat.com>
3839
3840 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3841 error instead of EIO.
3842
3843 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3844
3845 PR server/15604
3846 * linux-low.c: Include filestuff.h.
3847 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3848 * lynx-low.c: Include filestuff.h.
3849 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3850 * server.c: Include filestuff.h.
3851 (main): Call notice_open_fds.
3852 * spu-low.c: Include filestuff.h.
3853 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3854
3855 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3856
3857 * Makefile.in: Explain why ../target and ../nat are not
3858 listed as include file search paths.
3859 (linux-waitpid.o): New object file rule.
3860 * configure.srv (srv_native_linux_obj): New variable.
3861 Replace all occurrences of linux native object files with
3862 $srv_native_linux_obj.
3863 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3864 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3865 (linux_enable_event_reporting): Remove declaration.
3866 (my_waitpid): Moved to common/linux-waitpid.c.
3867 (linux_wait_for_event): Pass ptid when calling
3868 linux_enable_event_reporting.
3869 (linux_supports_tracefork_flag): Remove.
3870 (linux_enable_event_reporting): Likewise.
3871 (linux_tracefork_grandchild): Remove.
3872 (STACK_SIZE): Moved to common/linux-ptrace.c.
3873 (linux_tracefork_child): Remove.
3874 (linux_test_for_tracefork): Remove.
3875 (linux_look_up_symbols): Call linux_supports_traceclone.
3876 (initialize_low): Remove call to linux_test_for_tracefork.
3877 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3878 common/linux-ptrace.h.
3879 (PTRACE_TYPE_ARG4): Likewise.
3880 Include linux-ptrace.h.
3881
3882 2013-08-21 Pedro Alves <palves@redhat.com>
3883
3884 * config.in: Renegerate.
3885
3886 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3887
3888 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3889 (SFILES): Remove $(srcdir)/common/target-common.c and
3890 add $(srcdir)/target/waitstatus.c.
3891 (OBS): Remove target-common.o and add waitstatus.o.
3892 (server_h): Remove $(srcdir)/../common/target-common.h and
3893 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3894 and $(srcdir)/../target/waitstatus.h.
3895 (target-common.o): Remove.
3896 (waitstatus.o): New target object file.
3897 * target.h: Do not include target-common.h and
3898 include target/resume.h, target/wait.h and
3899 target/waitstatus.h.
3900
3901 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3902
3903 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3904 to PTRACE_TYPE_ARG3.
3905 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3906 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3907 PTRACE_TYPE_ARG4.
3908 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3909 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3910
3911 2013-07-27 Jie Zhang <jie@codesourcery.com>
3912 Daniel Jacobowitz <dan@codesourcery.com>
3913 Yao Qi <yao@codesourcery.com>
3914
3915 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3916 (mips-linux-watch.o): New rule.
3917 (mips_linux_watch_h): New variable.
3918 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3919 srv_tgtobj.
3920 * linux-mips-low.c: Include mips-linux-watch.h.
3921 (struct arch_process_info, struct arch_lwp_info): New.
3922 (update_watch_registers_callback): New function.
3923 (mips_linux_new_process, mips_linux_new_thread) New functions.
3924 (mips_linux_prepare_to_resume, mips_insert_point): New
3925 functions.
3926 (mips_remove_point, mips_stopped_by_watchpoint): New
3927 functions.
3928 (rsp_bp_type_to_target_hw_bp_type): New function.
3929 (mips_stopped_data_address): New function.
3930 (the_low_target): Add watchpoint support functions.
3931
3932 2013-07-27 Yao Qi <yao@codesourcery.com>
3933
3934 * i386-low.c: Include break-common.h.
3935 (enum target_hw_bp_type): Remove.
3936
3937 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3938
3939 * Makefile.in (SFILES): /common/target-common.c.
3940 (OBS): Add target-common.o.
3941 (server_h): Add $(srcdir)/../common/target-common.h.
3942 (target-common.o): New target.
3943 * server.c (queue_stop_reply_callback): Free
3944 status string after use.
3945 * target.c (target_waitstatus_to_string): Remove.
3946 * target.h: Include target-common.h.
3947 (resume_kind): Likewise.
3948 (target_waitkind): Likewise.
3949 (target_waitstatus): Likewise.
3950 (TARGET_WNOHANG): Likewise.
3951
3952 2013-07-04 Yao Qi <yao@codesourcery.com>
3953
3954 * Makefile.in (host_alias): Use @host_noncanonical@.
3955 (target_alias): Use @target_noncanonical@.
3956 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3957 ACX_NONCANONICAL_HOST.
3958 * configure: Regenerated.
3959
3960 Revert:
3961 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3962
3963 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3964 * configure: Rebuild.
3965 * Makefile.in (version_host, version_target): Get from configure.
3966 (version.c): Use $(version_host) and $(version_target).
3967
3968 2013-07-03 Pedro Alves <palves@redhat.com>
3969
3970 * Makefile.in (config.status): Depend on development.sh.
3971 * acinclude.m4: Include libmcheck.m4.
3972 * configure: Regenerate.
3973
3974 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3975
3976 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3977 attribute inside the parentheses.
3978 (winapi_DebugSetProcessKillOnExit): Ditto.
3979 (winapi_DebugBreakProcess): Ditto.
3980 (winapi_GenerateConsoleCtrlEvent): Ditto.
3981
3982 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3983
3984 * notif.h (notif_event): Add a dummy member to avoid compiler
3985 errors.
3986
3987 2013-07-01 Pedro Alves <palves@redhat.com>
3988
3989 * hostio.c (HOSTIO_PATH_MAX): Define.
3990 (require_filename, handle_open, handle_unlink, handle_readlink):
3991 Use it.
3992
3993 2013-07-01 Pedro Alves <palves@redhat.com>
3994
3995 * server.h: Include "pathmax.h".
3996 * linux-low.c: Don't include sys/param.h.
3997 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3998 MAXPATHLEN.
3999 * win32-low.c: Don't include sys/param.h.
4000 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4001
4002 2013-07-01 Pedro Alves <palves@redhat.com>
4003
4004 * event-loop.c: Don't check HAVE_UNISTD_H before including
4005 <unistd.h>.
4006 * gdbreplay.c: Likewise.
4007 * remote-utils.c: Likewise.
4008 * server.c: Likewise.
4009 * configure.ac: Don't check for unistd.h.
4010 * configure: Regenerate.
4011
4012 2013-06-28 Tom Tromey <tromey@redhat.com>
4013
4014 * Makefile.in (version.c): Use version.in, not
4015 common/version.in.
4016
4017 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4018
4019 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4020 * configure: Rebuild.
4021 * Makefile.in (version_host, version_target): Get from configure.
4022 (version.c): Use $(version_host) and $(version_target).
4023
4024 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4025
4026 Fix trace-status to output user name without trailing colon.
4027 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4028
4029 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4030
4031 Fix trace-status to output proper start-time and stop-time.
4032 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4033 output start time and stop time in hex as gdb expects.
4034
4035 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4036
4037 * tracepoint.c (build_traceframe_info_xml): Output trace state
4038 variables present in the trace buffer.
4039
4040 2013-06-24 Tom Tromey <tromey@redhat.com>
4041
4042 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4043 create-version.sh.
4044 (version.o): Remove.
4045 * gdbreplay.c: Include version.h.
4046 (version, host_name): Don't declare.
4047 * server.h: Include version.h.
4048 (version, host_name): Don't declare.
4049
4050 2013-06-12 Pedro Alves <palves@redhat.com>
4051
4052 * linux-x86-low.c (linux_is_elf64): Delete global.
4053 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4054 with local linux_pid_exe_is_elf_64_file use.
4055
4056 2013-06-11 Pedro Alves <palves@redhat.com>
4057
4058 * linux-low.c (regset_disabled, disable_regset): New functions.
4059 (regsets_fetch_inferior_registers)
4060 (regsets_store_inferior_registers): Use them.
4061 (initialize_regsets_info); Don't allocate the disabled_regsets
4062 array here.
4063 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4064 comment.
4065
4066 2013-06-11 Pedro Alves <palves@redhat.com>
4067
4068 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4069 xmalloc.
4070
4071 2013-06-11 Pedro Alves <palves@redhat.com>
4072
4073 * linux-x86-low.c (initialize_low_arch): Call
4074 init_registers_x32_avx_linux.
4075
4076 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4077
4078 Fix compatibility with Android Bionic.
4079 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4080 it is not empty.
4081
4082 2013-06-07 Pedro Alves <palves@redhat.com>
4083
4084 PR server/14823
4085 * Makefile.in (OBS): Add tdesc.o.
4086 (IPA_OBJS): Add tdesc-ipa.o.
4087 (tdesc-ipa.o): New rule.
4088 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4089 interface.
4090 * linux-low.c (new_inferior): Delete.
4091 (disabled_regsets, num_regsets): Delete.
4092 (linux_add_process): Adjust to set the new per-process
4093 new_inferior flag.
4094 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4095 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4096 was a stop. When calling arch_setup, switch the current inferior
4097 to the thread that got an event.
4098 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4099 (regsets_fetch_inferior_registers)
4100 (regsets_store_inferior_registers): New regsets_info parameter.
4101 Adjust to use it.
4102 (linux_register_in_regsets): New regs_info parameter. Adjust to
4103 use it.
4104 (register_addr, fetch_register, store_register): New usrregs_info
4105 parameter. Adjust to use it.
4106 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4107 parameter regs_info. Adjust to use it.
4108 (linux_fetch_registers): Get the current inferior's regs_info, and
4109 adjust to use it.
4110 (linux_store_registers): Ditto.
4111 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4112 (initialize_low): Don't initialize the target_regsets here. Call
4113 initialize_low_arch.
4114 * linux-low.h (target_regsets): Delete declaration.
4115 (struct regsets_info): New.
4116 (struct usrregs_info): New.
4117 (struct regs_info): New.
4118 (struct process_info_private) <new_inferior>: New field.
4119 (struct linux_target_ops): Delete the num_regs, regmap, and
4120 regset_bitmap fields. New field regs_info.
4121 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4122 * i387-fp.c (num_xmm_registers): Delete.
4123 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4124 calls to new interface.
4125 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4126 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4127 Infer the number of xmm registers from the regcache's target
4128 description.
4129 * i387-fp.h (num_xmm_registers): Delete.
4130 * inferiors.c (add_thread): Don't install the thread's regcache
4131 here.
4132 * proc-service.c (gregset_info): Fetch the current inferior's
4133 regs_info. Adjust to use it.
4134 * regcache.c: Include tdesc.h.
4135 (register_bytes, reg_defs, num_registers)
4136 (gdbserver_expedite_regs): Delete.
4137 (get_thread_regcache): If the thread doesn't have a regcache yet,
4138 create one, instead of aborting gdbserver.
4139 (regcache_invalidate_one): Rename to ...
4140 (regcache_invalidate_thread): ... this.
4141 (regcache_invalidate_one): New.
4142 (regcache_invalidate): Only invalidate registers of the current
4143 process.
4144 (init_register_cache): Add target_desc parameter, and use it.
4145 (new_register_cache): Ditto. Assert the target description has a
4146 non zero registers_size.
4147 (regcache_cpy): Add assertions. Adjust.
4148 (realloc_register_cache, set_register_cache): Delete.
4149 (registers_to_string, registers_from_string): Adjust.
4150 (find_register_by_name, find_regno, find_register_by_number)
4151 (register_cache_size): Add target_desc parameter, and use it.
4152 (free_register_cache_thread, free_register_cache_thread_one)
4153 (regcache_release, register_cache_size): New.
4154 (register_size): Add target_desc parameter, and use it.
4155 (register_data, supply_register, supply_register_zeroed)
4156 (supply_regblock, supply_register_by_name, collect_register)
4157 (collect_register_as_string, collect_register_by_name): Adjust.
4158 * regcache.h (struct target_desc): Forward declare.
4159 (struct regcache) <tdesc>: New field.
4160 (init_register_cache, new_register_cache): Add target_desc
4161 parameter.
4162 (regcache_invalidate_thread): Declare.
4163 (regcache_invalidate_one): Delete declaration.
4164 (regcache_release): Declare.
4165 (find_register_by_number, register_cache_size, register_size)
4166 (find_regno): Add target_desc parameter.
4167 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4168 declarations.
4169 * remote-utils.c: Include tdesc.h.
4170 (outreg, prepare_resume_reply): Adjust.
4171 * server.c: Include tdesc.h.
4172 (gdbserver_xmltarget): Delete declaration.
4173 (get_features_xml, process_serial_event): Adjust.
4174 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4175 declare.
4176 (struct process_info) <tdesc>: New field.
4177 (ipa_tdesc): Declare.
4178 * tdesc.c: New file.
4179 * tdesc.h: New file.
4180 * tracepoint.c: Include tdesc.h.
4181 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4182 (get_context_regcache): Adjust to pass ipa_tdesc down.
4183 (do_action_at_tracepoint): Adjust to get the register cache size
4184 from the context regcache's description.
4185 (traceframe_walk_blocks): Adjust to get the register cache size
4186 from the current trace frame's description.
4187 (traceframe_get_pc): Adjust to get current trace frame's
4188 description and pass it down.
4189 (gdb_collect): Adjust to get the register cache size from the
4190 IPA's description.
4191 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4192 (gdbserver_xmltarget): Delete.
4193 (initialize_low_tracepoint): Set the ipa's target description.
4194 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4195 (initialize_low_tracepoint): Set the ipa's target description.
4196 * linux-x86-low.c: Include tdesc.h.
4197 [__x86_64__] (is_64bit_tdesc): New.
4198 (ps_get_thread_area, x86_get_thread_area): Use it.
4199 (i386_cannot_store_register): Rename to ...
4200 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4201 (i386_cannot_fetch_register): Rename to ...
4202 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4203 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4204 to new interface.
4205 (target_regsets): Rename to ...
4206 (x86_regsets): ... this.
4207 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4208 interface.
4209 (x86_siginfo_fixup): Use is_64bit_tdesc.
4210 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4211 (tdesc_x32_avx_linux, tdesc_x32_linux)
4212 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4213 Declare.
4214 (x86_linux_update_xmltarget): Delete.
4215 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4216 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4217 (AMD64_LINUX_USER64_CS): New.
4218 (x86_linux_read_description): New, based on
4219 x86_linux_update_xmltarget.
4220 (same_process_callback): New.
4221 (x86_arch_setup_process_callback): New.
4222 (x86_linux_update_xmltarget): New.
4223 (x86_regsets_info): New.
4224 (amd64_linux_regs_info): New.
4225 (i386_linux_usrregs_info): New.
4226 (i386_linux_regs_info): New.
4227 (x86_linux_regs_info): New.
4228 (x86_arch_setup): Reimplement.
4229 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4230 (x86_emit_ops): Ditto.
4231 (the_low_target): Adjust. Install x86_linux_regs_info,
4232 x86_cannot_fetch_register, and x86_cannot_store_register.
4233 (initialize_low_arch): New.
4234 * linux-ia64-low.c (tdesc_ia64): Declare.
4235 (ia64_fetch_register): Adjust.
4236 (ia64_usrregs_info, regs_info): New globals.
4237 (ia64_regs_info): New function.
4238 (the_low_target): Adjust.
4239 (initialize_low_arch): New function.
4240 * linux-sparc-low.c (tdesc_sparc64): Declare.
4241 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4242 Adjust.
4243 (sparc_arch_setup): New function.
4244 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4245 (the_low_target): Adjust.
4246 (initialize_low_arch): New function.
4247 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4248 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4249 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4250 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4251 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4252 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4253 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4254 (tdesc_powerpc_isa205_vsx64l): Declare.
4255 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4256 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4257 (ppc_set_pc, ppc_get_hwcap): Adjust.
4258 (ppc_usrregs_info): Forward declare.
4259 (!__powerpc64__) ppc_regmap_adjusted: New global.
4260 (ppc_arch_setup): Adjust to the current process'es target
4261 description.
4262 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4263 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4264 (ppc_store_evrregset): Adjust.
4265 (target_regsets): Rename to ...
4266 (ppc_regsets): ... this, and make static.
4267 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4268 (ppc_regs_info): New function.
4269 (the_low_target): Adjust.
4270 (initialize_low_arch): New function.
4271 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4272 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4273 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4274 (tdesc_s390x_linux64v2): Declare.
4275 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4276 (s390_fill_gregset, s390_store_last_break): Adjust.
4277 (target_regsets): Rename to ...
4278 (s390_regsets): ... this, and make static.
4279 (s390_get_pc, s390_set_pc): Adjust.
4280 (s390_get_hwcap): New target_desc parameter, and use it.
4281 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4282 (s390_arch_setup): Adjust to set the current process'es target
4283 description. Don't adjust the regmap.
4284 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4285 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4286 (regs_info_3264): New globals.
4287 (s390_regs_info): New function.
4288 (the_low_target): Adjust.
4289 (initialize_low_arch): New function.
4290 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4291 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4292 [__mips64] (init_registers_mips_linux)
4293 (init_registers_mips_dsp_linux): Delete defines.
4294 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4295 (have_dsp): New global.
4296 (mips_read_description): New, based on mips_arch_setup.
4297 (mips_arch_setup): Reimplement.
4298 (get_usrregs_info): New function.
4299 (mips_cannot_fetch_register, mips_cannot_store_register)
4300 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4301 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4302 (target_regsets): Rename to ...
4303 (mips_regsets): ... this, and make static.
4304 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4305 (dsp_regs_info, regs_info): New globals.
4306 (mips_regs_info): New function.
4307 (the_low_target): Adjust.
4308 (initialize_low_arch): New function.
4309 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4310 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4311 Declare.
4312 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4313 (arm_read_description): New, with bits factored from
4314 arm_arch_setup.
4315 (arm_arch_setup): Reimplement.
4316 (target_regsets): Rename to ...
4317 (arm_regsets): ... this, and make static.
4318 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4319 (arm_regs_info): New function.
4320 (the_low_target): Adjust.
4321 (initialize_low_arch): New function.
4322 * linux-m68k-low.c (tdesc_m68k): Declare.
4323 (target_regsets): Rename to ...
4324 (m68k_regsets): ... this, and make static.
4325 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4326 (m68k_regs_info): New function.
4327 (m68k_arch_setup): New function.
4328 (the_low_target): Adjust.
4329 (initialize_low_arch): New function.
4330 * linux-sh-low.c (tdesc_sharch): Declare.
4331 (target_regsets): Rename to ...
4332 (sh_regsets): ... this, and make static.
4333 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4334 (sh_regs_info, sh_arch_setup): New functions.
4335 (the_low_target): Adjust.
4336 (initialize_low_arch): New function.
4337 * linux-bfin-low.c (tdesc_bfin): Declare.
4338 (bfin_arch_setup): New function.
4339 (bfin_usrregs_info, regs_info): New globals.
4340 (bfin_regs_info): New function.
4341 (the_low_target): Adjust.
4342 (initialize_low_arch): New function.
4343 * linux-cris-low.c (tdesc_cris): Declare.
4344 (cris_arch_setup): New function.
4345 (cris_usrregs_info, regs_info): New globals.
4346 (cris_regs_info): New function.
4347 (the_low_target): Adjust.
4348 (initialize_low_arch): New function.
4349 * linux-cris-low.c (tdesc_crisv32): Declare.
4350 (cris_arch_setup): New function.
4351 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4352 (cris_regs_info): New function.
4353 (the_low_target): Adjust.
4354 (initialize_low_arch): New function.
4355 * linux-m32r-low.c (tdesc_m32r): Declare.
4356 (m32r_arch_setup): New function.
4357 (m32r_usrregs_info, regs_info): New globals.
4358 (m32r_regs_info): Adjust.
4359 (initialize_low_arch): New function.
4360 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4361 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4362 (tic6x_usrregs_info): Forward declare.
4363 (tic6x_read_description): New function, based on ...
4364 (tic6x_arch_setup): ... this. Reimplement.
4365 (target_regsets): Rename to ...
4366 (tic6x_regsets): ... this, and make static.
4367 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4368 (tic6x_regs_info): New function.
4369 (the_low_target): Adjust.
4370 (initialize_low_arch): New function.
4371 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4372 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4373 (target_regsets): Rename to ...
4374 (xtensa_regsets): ... this, and make static.
4375 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4376 globals.
4377 (xtensa_arch_setup, xtensa_regs_info): New functions.
4378 (the_low_target): Adjust.
4379 (initialize_low_arch): New function.
4380 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4381 (nios2_arch_setup): Set the current process'es tdesc.
4382 (target_regsets): Rename to ...
4383 (nios2_regsets): ... this.
4384 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4385 (nios2_regs_info): New function.
4386 (the_low_target): Adjust.
4387 (initialize_low_arch): New function.
4388 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4389 (aarch64_arch_setup): Set the current process'es tdesc.
4390 (target_regsets): Rename to ...
4391 (aarch64_regsets): ... this.
4392 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4393 (aarch64_regs_info): New function.
4394 (the_low_target): Adjust.
4395 (initialize_low_arch): New function.
4396 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4397 globals.
4398 (target_regsets): Rename to ...
4399 (tile_regsets): ... this.
4400 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4401 (tile_regs_info): New function.
4402 (tile_arch_setup): Set the current process'es tdesc.
4403 (the_low_target): Adjust.
4404 (initialize_low_arch): New function.
4405 * spu-low.c (tdesc_spu): Declare.
4406 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4407 * win32-arm-low.c (tdesc_arm): Declare.
4408 (arm_arch_setup): New function.
4409 (the_low_target): Install arm_arch_setup instead of
4410 init_registers_arm.
4411 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4412 (init_windows_x86): Rename to ...
4413 (i386_arch_setup): ... this. Set `win32_tdesc'.
4414 (the_low_target): Adjust.
4415 * win32-low.c (win32_tdesc): New global.
4416 (child_add_thread): Don't create the thread cache here.
4417 (do_initial_child_stuff): Set the new process'es tdesc.
4418 * win32-low.h (struct target_desc): Forward declare.
4419 (win32_tdesc): Declare.
4420 * lynx-i386-low.c (tdesc_i386): Declare global.
4421 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4422 * lynx-low.c (lynx_tdesc): New global.
4423 (lynx_add_process): Set the new process'es tdesc.
4424 * lynx-low.h (struct target_desc): Forward declare.
4425 (lynx_tdesc): Declare global.
4426 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4427 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4428 * nto-low.c (nto_tdesc): New global.
4429 (do_attach): Set the new process'es tdesc.
4430 * nto-low.h (struct target_desc): Forward declare.
4431 (nto_tdesc): Declare.
4432 * nto-x86-low.c (tdesc_i386): Declare.
4433 (nto_x86_arch_setup): Set `nto_tdesc'.
4434
4435 2013-06-04 Gary Benson <gbenson@redhat.com>
4436
4437 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4438 to qSupported response when appropriate.
4439 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4440 with nonzero-length annex.
4441 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4442 arguments supplied in annex.
4443
4444 2013-05-31 Doug Evans <dje@google.com>
4445
4446 PR server/15594
4447 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4448 64 bits in 64-cross-32 environment.
4449
4450 2013-05-28 Pedro Alves <palves@redhat.com>
4451
4452 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4453 (aarch64-without-fpu.c): Delete rule.
4454 * configure.srv (aarch64*-*-linux*): Remove references to
4455 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4456 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4457 declaration.
4458
4459 2013-05-24 Pedro Alves <palves@redhat.com>
4460
4461 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4462 instead of strchr/decode_address. Error if the range isn't split
4463 with a ','. Don't assume there's be a ':' in the action.
4464
4465 2013-05-23 Yao Qi <yao@codesourcery.com>
4466 Pedro Alves <palves@redhat.com>
4467
4468 * linux-low.c (lwp_in_step_range): New function.
4469 (linux_wait_1): If the thread was range stepping and stopped
4470 outside the stepping range, report the stop to GDB. Otherwise,
4471 continue stepping. Add range stepping debug output.
4472 (linux_set_resume_request): Copy the step range from the resume
4473 request to the lwp.
4474 (linux_supports_range_stepping): New.
4475 (linux_target_ops) <supports_range_stepping>: Set to
4476 linux_supports_range_stepping.
4477 * linux-low.h (struct linux_target_ops)
4478 <supports_range_stepping>: New field.
4479 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4480 * linux-x86-low.c (x86_supports_range_stepping): New.
4481 (the_low_target) <supports_range_stepping>: Set to
4482 x86_supports_range_stepping.
4483 * server.c (handle_v_cont): Handle 'r' action.
4484 (handle_v_requests): Append ";r" if the target supports range
4485 stepping.
4486 * target.h (struct thread_resume) <step_range_start,
4487 step_range_end>: New fields.
4488 (struct target_ops) <supports_range_stepping>:
4489 New field.
4490 (target_supports_range_stepping): New macro.
4491
4492 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4493
4494 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4495 confusion in comment.
4496
4497 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4498
4499 * lynx-low.c (struct process_info_private): New type.
4500 (lynx_add_process): New function.
4501 (lynx_create_inferior, lynx_attach): Replace calls to
4502 add_process by calls to lynx_add_process.
4503 (lynx_resume): If PTID is null, then try using
4504 current_process()->private->last_wait_event_ptid.
4505 Add comments.
4506 (lynx_clear_inferiors): Delete. The contents of that function
4507 has been inlined in lynx_mourn;
4508 (lynx_wait_1): Save the ptid in the process's private data.
4509 (lynx_mourn): Free the process' private data. Replace call
4510 to lynx_clear_inferiors by call to clear_inferiors.
4511
4512 2013-05-17 Yao Qi <yao@codesourcery.com>
4513
4514 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4515 the right place.
4516
4517 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4518
4519 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4520 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4521 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4522 PT_TEXT_END_ADDR guards. Update comments.
4523 (linux_target_op) <read_offsets>: Conditionally define to
4524 linux_read_offsets if the target is UCLIBC and if it defines
4525 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4526
4527 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4528 Andrew Jenner <andrew@codesourcery.com>
4529
4530 * Makefile.in (SFILES): Add linux-nios2-low.c.
4531 (clean): Add action to delete nios2-linux.c.
4532 (nios2-linux.c): New rule.
4533 * configure.srv: Add nios2*-*-linux*.
4534 * linux-nios2-low.c: New.
4535
4536 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4537
4538 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4539
4540 2013-04-25 Hui Zhu <hui@codesourcery.com>
4541
4542 PR gdb/15186
4543 * ax.c (ax_printf): Add fflush.
4544
4545 2013-04-22 Tom Tromey <tromey@redhat.com>
4546
4547 * Makefile.in (SFILES): Add filestuff.c.
4548 (OBS): Add filestuff.o.
4549 (filestuff.o): New target.
4550 * config.in, configure: Rebuild.
4551 * configure.ac: Check for fdwalk, pipe2.
4552
4553 2013-04-17 Pedro Alves <palves@redhat.com>
4554
4555 * configure.ac (USE_THREAD_DB): Delete variable.
4556 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4557 Don't AC_SUBST USE_THREAD_DB.
4558 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4559 * config.in, configure: Regenerate.
4560
4561 2013-04-16 Pedro Alves <palves@redhat.com>
4562
4563 * linux-low.h (struct lwp_info) <thread_known>: Move under
4564 the USE_THREAD_DB #ifdef.
4565
4566 2013-04-16 Pedro Alves <palves@redhat.com>
4567
4568 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4569 (linux-low.o): Delete rule.
4570 * linux-low.h: Always include "gdb_thread_db.h" instead of
4571 conditionally including thread_db.h.
4572 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4573 HAVE_THREAD_DB_H.
4574
4575 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4576
4577 * Makefile.in (install-only): Fix make install regression.
4578
4579 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4580
4581 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4582 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4583 installation.
4584 * gdbserver.1: Remove.
4585
4586 2013-03-22 Pedro Alves <palves@redhat.com>
4587
4588 * linux-low.c (handle_extended_wait): Don't call
4589 linux_enable_event_reporting.
4590
4591 2013-03-15 Tony Theodore <tonyt@logyst.com>
4592
4593 PR build/9098:
4594 * Makefile.in (SHELL): Use @SHELL@.
4595
4596 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4597
4598 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4599 compiler warning.
4600
4601 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4602
4603 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4604 Remove extraneous NULL element.
4605
4606 2013-03-13 Yao Qi <yao@codesourcery.com>
4607
4608 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4609 'V' block in trace frame.
4610
4611 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4612
4613 * target.h (struct target_ops): Add btrace ops.
4614 (target_supports_btrace): New macro.
4615 (target_enable_btrace): New macro.
4616 (target_disable_btrace): New macro.
4617 (target_read_btrace): New macro.
4618 * gdbthread.h (struct thread_info): Add btrace field.
4619 * server.c: Include btrace-common.h.
4620 (handle_btrace_general_set): New function.
4621 (handle_btrace_enable): New function.
4622 (handle_btrace_disable): New function.
4623 (handle_general_set): Call handle_btrace_general_set.
4624 (handle_qxfer_btrace): New function.
4625 (struct qxfer qxfer_packets[]): Add btrace entry.
4626 * inferiors.c (remove_thread): Disable btrace.
4627 * linux-low: Include linux-btrace.h.
4628 (linux_low_enable_btrace): New function.
4629 (linux_low_read_btrace): New function.
4630 (linux_target_ops): Add btrace ops.
4631 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4632 Add srv_linux_btrace=yes.
4633 (x86_64-*-linux*): Add linux-btrace.o.
4634 Add srv_linux_btrace=yes.
4635 * configure.ac: Define HAVE_LINUX_BTRACE.
4636 * config.in: Regenerated.
4637 * configure: Regenerated.
4638
4639 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4640
4641 * server.c (handle_qxfer): Preserve error message if -3 is
4642 returned.
4643 (qxfer): Document the -3 return value.
4644
4645 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4646
4647 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4648 (linux_btrace_h): New variable.
4649 (linux-btrace.o): New rule.
4650
4651 2013-03-08 Stan Shebs <stan@codesourcery.com>
4652 Hafiz Abid Qadeer <abidh@codesourcery.com>
4653
4654 * tracepoint.c (trace_buffer_size): New global.
4655 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4656 (init_trace_buffer): Change to one-argument function. Allocate
4657 trace buffer memory.
4658 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4659 handle QTBuffer:size packet.
4660 (cmd_bigqtbuffer_size): New function.
4661 (initialize_tracepoint): Call init_trace_buffer with
4662 DEFAULT_TRACE_BUFFER_SIZE.
4663 * server.c (handle_query): Add QTBuffer:size in the
4664 supported packets.
4665
4666 2013-03-07 Yao Qi <yao@codesourcery.com>
4667
4668 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4669 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4670 of -1.
4671 (cmd_qtsp): Adjust condition. Do post increment.
4672 Set cur_action and cur_step_action back to 0.
4673
4674 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4675
4676 PR server/15236
4677 * linux-low.c (linux_write_memory): Return early success if LEN is
4678 zero.
4679
4680 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4681
4682 * configure.srv: Add x86_64-*-cygwin* as target.
4683
4684 2013-02-28 Tom Tromey <tromey@redhat.com>
4685
4686 * configure.ac: Invoke AC_SYS_LARGEFILE.
4687 * configure, config.in: Rebuild.
4688
4689 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4690
4691 * win32-low.c: Throughout, fix format strings and casts of
4692 printf-like functions to avoid type related warnings on all
4693 platforms.
4694 (get_child_debug_event): Print dwDebugEventCode as hex since
4695 that's how it's usually documented.
4696
4697 2013-02-28 Yao Qi <yao@codesourcery.com>
4698
4699 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4700 pulongest.
4701
4702 2013-02-27 Jiong Wang <jiwang@tilera.com>
4703
4704 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4705 (reg-tilegx32.c): New rule.
4706 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4707 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4708 different register info initializer according to elf class.
4709 (init_registers_tilgx32): New function. The tilegx32 register info
4710 initializer.
4711 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4712 (tile_store_gregset): Likewise.
4713
4714 2013-02-27 Yao Qi <yao@codesourcery.com>
4715
4716 * server.c (process_point_options): Print debug message when
4717 debug_threads is true.
4718
4719 2013-02-26 Yao Qi <yao@codesourcery.com>
4720
4721 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4722
4723 2013-02-19 Pedro Alves <palves@redhat.com>
4724 Kai Tietz <ktietz@redhat.com>
4725
4726 PR gdb/15161
4727
4728 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4729 instead of strtoul to extract address from packet.
4730 (process_serial_event) <'z'>: Likewise.
4731
4732 2013-02-18 Yao Qi <yao@codesourcery.com>
4733
4734 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4735
4736 2013-02-14 Pedro Alves <palves@redhat.com>
4737
4738 Plug memory leak.
4739
4740 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4741 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4742
4743 2013-02-14 Pedro Alves <palves@redhat.com>
4744
4745 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4746
4747 2013-02-14 Pedro Alves <palves@redhat.com>
4748
4749 * tracepoint.c (save_string): Delete.
4750 (add_tracepoint_action): Use savestring instead of save_string.
4751
4752 2013-02-12 Pedro Alves <palves@redhat.com>
4753
4754 * linux-xtensa-low.c: Ditto.
4755 * xtensa-xtregs.c: Ditto.
4756
4757 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4758
4759 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4760 thread_db.
4761
4762 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4763
4764 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4765 aarch64_num_wp_regs and aarch64_num_bp_regs to
4766 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4767
4768 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4769
4770 * linux-aarch64-low.c (ps_get_thread_area): Replace
4771 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4772
4773 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4774 Marcus Shawcroft <marcus.shawcroft@arm.com>
4775 Nigel Stephens <nigel.stephens@arm.com>
4776 Yufeng Zhang <yufeng.zhang@arm.com>
4777
4778 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4779 (aarch64.c, aarch64-without-fpu.c): New targets.
4780 * configure.srv (aarch64*-*-linux*): New.
4781 * linux-aarch64-low.c: New file.
4782
4783 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4784
4785 * linux-low.c (handle_extended_wait, linux_create_inferior)
4786 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4787 (dequeue_one_deferred_signal, linux_resume_one_thread)
4788 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4789 (linux_tracefork_grandchild, linux_test_for_tracefork)
4790 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4791 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4792 where the argument is 0.
4793
4794 2013-01-25 Yao Qi <yao@codesourcery.com>
4795
4796 * event-loop.c: Include "queue.h".
4797 (gdb_event_p): New typedef.
4798 (struct gdb_event) <next_event>: Remove.
4799 (event_queue): Change to QUEUE(gdb_event_p).
4800 (async_queue_event): Remove.
4801 (gdb_event_xfree): New.
4802 (initialize_event_loop): New.
4803 (process_event): Use API from QUEUE.
4804 (wait_for_event): Likewise.
4805 * server.c (main): Call initialize_event_loop.
4806 * server.h (initialize_event_loop): Declare.
4807
4808 2013-01-18 Yao Qi <yao@codesourcery.com>
4809
4810 * ax.h (struct eval_agent_expr_context): New.
4811 (gdb_eval_agent_expr): Update declaration.
4812 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4813 TFRAME. Add new argument CTX.
4814 * server.h (struct eval_agent_expr_context): Declare.
4815 (agent_mem_read, agent_tsv_read): Update declaration.
4816 (agent_mem_read_string): Likewise.
4817 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4818 (add_traceframe_block): Add new argument TPOINT.
4819 Increase TPOINT->traceframe_usage.
4820 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4821 eval_tracepoint_agent_expr.
4822 (condition_true_at_tracepoint): Likewise.
4823 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4824 (agent_mem_read_string, agent_tsv_read): Likewise.
4825
4826 2013-01-16 Yao Qi <yao@codesourcery.com>
4827
4828 * linux-low.c (linux_resume_one_lwp): Don't check
4829 'lwp->bp_reinsert != 0'.
4830
4831 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4832 Pedro Alves <palves@redhat.com>
4833
4834 * lynx-low.c (ptrace_request_to_str): Define a temporary
4835 macro and use it to simplify this function's implementation.
4836
4837 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4838
4839 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4840 sets errno.
4841
4842 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4843
4844 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4845
4846 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4847
4848 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4849
4850 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4851
4852 * lynx-low.c (lynx_resume): Use the resume_info parameter
4853 to determine the ptid for the lynx_ptrace call, unless
4854 it is equal to minus_one_ptid, in which case we use the
4855 ptid of the current_inferior.
4856 (lynx_wait_1): After having received a thread create/exit
4857 event, resume the inferior's execution using the signaling
4858 thread's ptid, rather than the old ptid.
4859
4860 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4861
4862 * lynx-low.c (lynx_resume): Delete variable ret.
4863
4864 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4865
4866 * gdbreplay.c (gdbreplay_version): Update copyright year.
4867 * server.c (gdbserver_version): Likewise.
4868
4869 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4870
4871 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4872 new thread.
4873
4874 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4875
4876 * lynx-low.c (ptrace_request_to_str): Add handling for
4877 PTRACE_GETTRACESIG.
4878
4879 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4880
4881 * lynx-low.c (lynx_attach): Delete variable new_process.
4882
4883 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4884
4885 * lynx-low.c (lynx_create_inferior): Delete variable
4886 new_process.
4887
4888 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4889
4890 * lynx-low.c (ptrace_request_to_str): Do not handle
4891 PTRACE_GETTHREADLIST if this macro does not exist.
4892
4893 2012-12-15 Yao Qi <yao@codesourcery.com>
4894
4895 * Makefile.in (OBS): Add notif.o.
4896 * notif.c, notif.h: New.
4897 * server.c: Include "notif.h".
4898 (struct vstop_notif) <next>: Remove.
4899 <base>: New field.
4900 (queue_stop_reply): Update.
4901 (push_event, send_next_stop_reply): Remove.
4902 (discard_queued_stop_replies): Update.
4903 (notif_stop): New variable.
4904 (handle_v_stopped): Remove.
4905 (handle_v_requests): Don't call handle_v_stopped. Call
4906 handle_ack_notif instead.
4907 (queue_stop_reply_callback): Call notif_event_enque instead
4908 of queue_stop_reply.
4909 (handle_status): Don't call send_next_stop_reply, call
4910 notif_write_event instead.
4911 (kill_inferior_callback): Likewise.
4912 (detach_or_kill_inferior_callback): Likewise.
4913 (main): Call initialize_notif.
4914 (process_serial_event): Call QUEUE_is_empty.
4915 (handle_target_event): Call notif_push instead of push event.
4916 * server.h (push_event): Remove declaration.
4917
4918 2012-12-10 Tom Tromey <tromey@redhat.com>
4919
4920 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4921 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4922 macros.
4923 (.c.o): Rewrite.
4924 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4925 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4926 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4927 (amd64-linux-ipa.o, ax.o): Rewrite.
4928 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4929 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4930 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4931 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4932 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4933 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4934 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4935 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4936 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4937 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4938 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4939 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4940 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4941 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4942 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4943 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4944 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4945 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4946 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4947 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4948 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4949 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4950 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4951 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4952 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4953 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4954 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4955 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4956 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4957 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4958 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4959 (reg-tilegx.o): Remove.
4960 (all_object_files): New macro.
4961 Include .deps files.
4962 * aclocal.m4, configure: Rebuild.
4963 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4964 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4965 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4966
4967 2012-12-05 Tom Tromey <tromey@redhat.com>
4968
4969 PR gdb/14917:
4970 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4971
4972 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4973
4974 * configure.ac: Check for linux/perf_event.h.
4975 * config.in: Regenerated.
4976 * configure: Regenerated.
4977
4978 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4979
4980 * hostio.c (handle_readlink): Decrease buffer size
4981 parameter passed to readlink by one byte.
4982
4983 2012-11-26 Yao Qi <yao@codesourcery.com>
4984
4985 * configure.ac (build_warnings): Append '-Wempty-body'.
4986 * configure: Regenerated.
4987 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4988 body.
4989
4990 2012-11-15 Pierre Muller <muller@sourceware.org>
4991
4992 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4993 * config.in: Regenerate.
4994 * configure: Regenerate.
4995 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4996 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4997 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4998 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4999 header.
5000 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5001 instead of <sys/wait.h> header.
5002 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5003
5004 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5005
5006 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5007 (various make rules): Remove -DGDBSERVER
5008
5009 2012-11-09 Yao Qi <yao@codesourcery.com>
5010
5011 * spu-low.c (current_ptid): Move it to ..
5012 * gdbthread.h: ... here. New.
5013 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5014 * server.c (myresume, process_serial_event): Likewise.
5015 * thread-db.c (thread_db_find_new_threads): Likewise.
5016 * tracepoint.c (run_inferior_command): Likewise.
5017
5018 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5019
5020 * server.c (handle_search_memory_1): Include access length in
5021 warning message.
5022
5023 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5024
5025 * linux-crisv32-low.c: Fix compile errors.
5026
5027 2012-09-04 Yao Qi <yao@codesourcery.com>
5028
5029 * tracepoint.c (cmd_qtsv): Adjust debug message.
5030 Don't check CUR_TPOINT.
5031
5032 2012-08-28 Yao Qi <yao@codesourcery.com>
5033
5034 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5035 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5036 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5037 Remove declarations of xmalloc, xreallloc, xstrdup and
5038 freeargv.
5039 * Makefile.in (libiberty_h): New.
5040 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5041 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5042
5043 2012-08-23 Yao Qi <yao@codesourcery.com>
5044
5045 * server.h: Remove declaration of 'xsnprintf'.
5046
5047 2012-08-22 Keith Seitz <keiths@redhat.com>
5048
5049 * server.h: Include build-gnulib-gbserver/config.h.
5050 * gdbreplay.c: Likewise.
5051
5052 2012-08-08 Doug Evans <dje@google.com>
5053
5054 * Makefile.in (SFILES): Add gdb_vecs.c.
5055 (OBS): Add gdb_vecs.o.
5056 (gdb_vecs_h, host_defs_h): New variables.
5057 (thread-db.o): Add $(gdb_vecs_h) dependency.
5058 (gdb_vecs.o): New rule.
5059 * thread-db.c: #include "gdb_vecs.h".
5060 (thread_db_load_search): Use a vector to iterate over path elements.
5061 Handle text appearing after "$pdir".
5062
5063 * configure.ac: Add check for strstr.
5064 * config.in: Regenerate.
5065 * configure: Regenerate.
5066
5067 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5068
5069 * hostio.c (handle_pread): If pread fails, fall back to attempting
5070 lseek/read.
5071 (handle_pwrite): Likewise for pwrite.
5072
5073 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5074
5075 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5076 between unsupported TYPE and unimplementable ADDR/LEN combination.
5077 (arm_insert_point): Act on new return value.
5078
5079 2012-07-31 Pedro Alves <palves@redhat.com>
5080
5081 * server.c (process_point_options): Only skip tokens if we find
5082 one that is unrecognized. Don't treat 'X' specially while
5083 skipping unrecognized tokens.
5084
5085 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5086
5087 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5088 to 4-byte-align HW breakpoint addresses for Thumb.
5089
5090 2012-07-27 Yao Qi <yao@codesourcery.com>
5091
5092 PR remote/14161.
5093
5094 * server.h: Declare gdb_agent_about_to_close.
5095 * target.c (kill_inferior): Include "agent.h".
5096 New. Send command 'kill'.
5097 * target.h (kill_inferior): Removed macro.
5098 * tracepoint.c (gdb_agent_about_to_close): New.
5099 (gdb_agent_helper_thread): Handle command 'close'.
5100 Wait endlessly until the inferior stops.
5101 Install gdb_agent_remove_socket to atexit hook.
5102 (agent_socket_name): New static variable.
5103 (gdb_agent_socket_init): Replace local variable 'name' with
5104 'agent_socket_name'.
5105 (gdb_agent_remove_socket): New.
5106
5107 2012-07-27 Yao Qi <yao@codesourcery.com>
5108
5109 * server.c (process_point_options): Stop at 'X' when parsing.
5110
5111 2012-07-19 Michael Eager <eager@eagercon.com>
5112
5113 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5114 to hw_execute.
5115 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5116 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5117 hardware breakpoint.
5118
5119 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5120
5121 * gdbserver/linux-low.c (initialize_low): Call
5122 linux_ptrace_init_warnings.
5123
5124 2012-07-02 Doug Evans <dje@google.com>
5125
5126 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5127 pointer to int.
5128
5129 2012-07-02 Stan Shebs <stan@codesourcery.com>
5130
5131 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5132 (ax.o): Add it to build rule.
5133 (ax-ipa.o): Ditto.
5134 (OBS): Add format.o.
5135 (IPA_OBS): Add format.o.
5136 * server.c (handle_query): Claim support for breakpoint commands.
5137 (process_point_options): Add command case.
5138 (process_serial_event): Leave running if there are printfs in
5139 effect.
5140 * mem-break.h (any_persistent_commands): Declare.
5141 (add_breakpoint_commands): Declare.
5142 (gdb_no_commands_at_breakpoint): Declare.
5143 (run_breakpoint_commands): Declare.
5144 * mem-break.c (struct point_command_list): New struct.
5145 (struct breakpoint): New field command_list.
5146 (any_persistent_commands): New function.
5147 (add_commands_to_breakpoint): New function.
5148 (add_breakpoint_commands): New function.
5149 (gdb_no_commands_at_breakpoint): New function.
5150 (run_breakpoint_commands): New function.
5151 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5152 locally.
5153 * ax.c: Include format.h.
5154 (ax_printf): New function.
5155 (gdb_eval_agent_expr): Add printf opcode.
5156
5157 2012-06-13 Yao Qi <yao@codesourcery.com>
5158
5159 * server.c (start_inferior): Remove duplicated writes to fields
5160 'last_resume_kind' and 'last_status' of 'current_inferior'.
5161
5162 2012-06-12 Yao Qi <yao@codesourcery.com>
5163 Pedro Alves <palves@redhat.com>
5164
5165 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5166 comment.
5167 * server.c (handle_v_cont): Extend comment.
5168
5169 2012-06-11 Yao Qi <yao@codesourcery.com>
5170
5171 * linux-low.c (linux_attach): Add 'static'.
5172
5173 2012-06-06 Yao Qi <yao@codesourcery.com>
5174
5175 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5176
5177 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5178
5179 Fix gcc -flto compilation warning.
5180 * server.c (main): Make variable multi_mode and attach volatile.
5181
5182 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5183
5184 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5185 if the platform doesn't know about it.
5186
5187 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5188
5189 * Makefile.in (SFILES): Add linux-tile-low.c.
5190 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5191 * configure.srv: Handle tilegx-*-linux*.
5192 * linux-tile-low.c: New file.
5193
5194 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5195
5196 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5197
5198 2012-05-24 Pedro Alves <palves@redhat.com>
5199
5200 PR gdb/7205
5201
5202 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5203
5204 2012-05-24 Pedro Alves <palves@redhat.com>
5205
5206 PR gdb/7205
5207
5208 Replace target_signal with gdb_signal throughout.
5209
5210 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5211
5212 * linux-low.c (linux_store_registers): Avoid the copying sequence
5213 when no data has been retrieved by ptrace.
5214
5215 2012-05-22 Will Deacon <will.deacon@arm.com>
5216
5217 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5218 Include asm/ptrace.h.
5219 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5220 already defined.
5221
5222 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5223
5224 * linux-low.c (linux_store_registers): Don't re-retrieve data
5225 with ptrace that has already been obtained from /proc. Always
5226 copy any data retrieved with ptrace to the buffer supplied.
5227
5228 2012-05-11 Yao Qi <yao@codesourcery.com>
5229 Pedro Alves <palves@redhat.com>
5230
5231 * linux-low.c (enum stopping_threads_kind): New.
5232 (stopping_threads): Change type to `enum stopping_threads_kind'.
5233 (handle_extended_wait): If stopping and suspending threads, leave
5234 the new_lwp suspended too.
5235 (linux_wait_for_event): Adjust.
5236 (stop_all_lwps): Set `stopping_threads' to
5237 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5238 whether we're suspending threads or just stopping them. Assert no
5239 recursion happens.
5240
5241 2012-04-29 Yao Qi <yao@codesourcery.com>
5242
5243 * server.h: Move some code to ...
5244 * gdbthread.h: ... here. New.
5245 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5246 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5247 (nto-low.o, win32-low.o): Likewise.
5248 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5249 * regcache.c, remote-utils.c, server.c: Likewise.
5250 * target.c, tracepoint.c, win32-low.c: Likewise.
5251
5252 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5253
5254 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5255 (PTRACE_ARG4_TYPE): Likewise.
5256 (PTRACE_XFER_TYPE): Likewise.
5257 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5258 ptrace to PTRACE_ARG3_TYPE.
5259 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5260 (PTRACE_ARG4_TYPE): Likewise.
5261 (PTRACE_XFER_TYPE): Likewise.
5262 (linux_detach_one_lwp): Cast fourth argument of
5263 ptrace to long then PTRACE_ARG4_TYPE.
5264 (regsets_fetch_inferior_registers): Cast third argument of
5265 ptrace to long then PTRACE_ARG3_TYPE.
5266 (regsets_store_inferior_registers): Likewise.
5267
5268 2012-04-20 Pedro Alves <palves@redhat.com>
5269
5270 * configure: Regenerate.
5271
5272 2012-04-19 Pedro Alves <palves@redhat.com>
5273
5274 * Makefile.in (GNULIB_BUILDDIR): New.
5275 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5276 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5277 (all, install-only, uninstall, clean-info, all-lib, clean): No
5278 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5279 (maintainer-clean realclean distclean): Use subdir_do.
5280 (subdir_do): New.
5281 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5282 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5283 * acinclude.m4: Include acx_configure_dir.m4.
5284 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5285 calls. Call AC_PROG_RANLIB. Configure gnulib using
5286 ACX_CONFIGURE_DIR.
5287 (GNULIB): New.
5288 (GNULIB_STDINT_H): Adjust.
5289 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5290 * gdbreplay.c: Include build-gnulib/config.h.
5291 * server.h: Likewise.
5292 * aclocal.m4: Regenerate.
5293 * config.in: Regenerate.
5294 * configure: Regenerate.
5295
5296 2012-04-19 Pedro Alves <palves@redhat.com>
5297
5298 * Makefile.in (LIBGNU, INCGNU): Adjust.
5299 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5300 (all, install-only, uninstall, clean-info, all-lib, clean)
5301 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5302 * configure.ac: Adjust AC_OUTPUT output.
5303 * aclocal.m4: Regenerate.
5304 * configure: Regenerate.
5305
5306 2012-04-19 Pedro Alves <palves@redhat.com>
5307
5308 * Makefile.in (generated_files): New.
5309 (server_h): Remove the explicit dependency on config.h, and depend
5310 on $generated_files.
5311
5312 2012-04-19 Pedro Alves <palves@redhat.com>
5313
5314 * Makefile.in (INCGNU): Add -Ignulib.
5315
5316 2012-04-19 Pedro Alves <palves@redhat.com>
5317
5318 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5319 (INCGNU): ... this, and spell out -I here.
5320 (GNULIB_LIB): Rename to ...
5321 (LIBGNU): ... this.
5322 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5323
5324 2012-04-19 Pedro Alves <palves@redhat.com>
5325
5326 * config.in: Regenerate.
5327
5328 2012-04-19 Pedro Alves <palves@redhat.com>
5329
5330 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5331 * server.h (memmem): Remove declaration.
5332 * config.in: Regenerate.
5333 * configure: Regenerate.
5334
5335 2012-04-19 Yao Qi <yao@codesourcery.com>
5336
5337 * Makefile.in (SFILES): Add common/vec.c.
5338 (OBS): Add vec.o.
5339 (vec.o): New rule.
5340
5341 2012-04-19 Yao Qi <yao@codesourcery.com>
5342
5343 * remote-utils.c (prepare_resume_reply): Replace with macro
5344 target_core_of_thread.
5345 * server.c (handle_qxfer_threads_proper): Likewise.
5346 * target.h (traget_core_of_thread): New macro.
5347
5348 2012-04-18 Pedro Alves <palves@redhat.com>
5349
5350 * aclocal.m4: Regenerate.
5351 * configure: Regenerate.
5352
5353 2012-04-16 Yao Qi <yao@codesourcery.com>
5354
5355 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5356 duplicated on address.
5357
5358 2012-04-16 Yao Qi <yao@codesourcery.com>
5359
5360 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5361 (struct tracepoint_action_ops) <send>: New field.
5362 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5363 (agent_expr_send, x_tracepoint_action_send): New.
5364 (l_tracepoint_action_send): New.
5365 (cmd_qtdp): Download and install tracepoint
5366 according to `use_agent'.
5367 (run_inferior_command): Add one more parameter `len'.
5368 Update callers.
5369 (tracepoint_send_agent): New.
5370 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5371
5372 2012-04-16 Yao Qi <yao@codesourcery.com>
5373
5374 * tracepoint.c (download_tracepoints): Moved to ...
5375 (cmd_qtstart): ... here.
5376
5377 2012-04-14 Yao Qi <yao@codesourcery.com>
5378
5379 * tracepoint.c: Include inttypes.h.
5380 (struct collect_memory_action): Use sized types.
5381 (struct tracepoint): Likewise.
5382 (cmd_qtdp, stop_tracing): Update print specifiers.
5383 (cmd_qtp, response_tracepoint): Likewise.
5384 (collect_data_at_tracepoint): Likewise.
5385 (collect_data_at_step): Likewise.
5386
5387 2012-04-14 Yao Qi <yao@codesourcery.com>
5388
5389 Import gnulib module inttypes.
5390 * aclocal.m4, config.in, configure: Regenerated.
5391
5392 2012-04-14 Yao Qi <yao@codesourcery.com>
5393
5394 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5395 Makefile and config.status at last.
5396
5397 2012-04-13 Yao Qi <yao@codesourcery.com>
5398
5399 * tracepoint.c: Include stdint.h unconditionally.
5400
5401 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5402
5403 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5404 on BFD_HAVE_SYS_PROCFS_TYPE.
5405 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5406 * configure: Regenerate.
5407 * config.in: Likewise.
5408
5409 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5410
5411 * Makefile.in (clean): Also remove x32.c x32-linux.c
5412 x32-avx.c x32-avx-linux.c.
5413 (x32.o): New target.
5414 (x32.c): Likewise.
5415 (x32-linux.o): Likewise.
5416 (x32-linux.c): Likewise.
5417 (x32-avx.o): Likewise.
5418 (x32-avx.c): Likewise.
5419 (x32-avx-linux.o): Likewise.
5420 (x32-avx-linux.c): Likewise.
5421
5422 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5423 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5424 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5425 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5426 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5427 i386/x32-avx-linux.xml.
5428
5429 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5430 (init_registers_x32_avx_linux): Likwise.
5431 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5432 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5433
5434 2012-04-13 Pedro Alves <palves@redhat.com>
5435
5436 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5437 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5438 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5439 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5440 the sub-make.
5441
5442 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5443
5444 * linux-x86-low.c (compat_x32_clock_t): New.
5445 (compat_x32_siginfo_t): Likewise.
5446 (compat_x32_siginfo_from_siginfo): Likewise.
5447 (siginfo_from_compat_x32_siginfo): Likewise.
5448 (linux_is_elf64): Likewise.
5449 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5450 and siginfo_from_compat_x32_siginfo for x32.
5451 (x86_arch_setup): Set linux_is_elf64.
5452
5453 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5454
5455 PR gdb/13969
5456 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5457 e_machine field.
5458 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5459 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5460 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5461 compatible with process.
5462
5463 2012-04-12 Yao Qi <yao@codesourcery.com>
5464
5465 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5466 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5467 (install-only, install-info, clean): Handle sub dir gnulib.
5468 (all-lib, am--refresh): New targets.
5469 (memmem.o): Remove target.
5470 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5471 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5472 (AC_REPLACE_FUNCS): Remove memmem.
5473 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5474 (AC_OUTPUT): Generate Makefile in gnulib/.
5475 * aclocal.m4, config.in, configure: Regenerated.
5476
5477 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5478
5479 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5480
5481 2012-04-05 Pedro Alves <palves@redhat.com>
5482
5483 -Werror=strict-aliasing
5484
5485 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5486 pointer.
5487
5488 2012-04-04 Pedro Alves <palves@redhat.com>
5489
5490 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5491 (sparc_store_gregset_from_stack, sparc_store_gregset)
5492 (sparc_breakpoint_at): Fix formatting.
5493
5494 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5495
5496 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5497 are available.
5498 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5499 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5500 * config.in: Regenerate.
5501 * configure: Likewise.
5502
5503 2012-03-29 Pedro Alves <palves@redhat.com>
5504
5505 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5506 Correct ptrace arguments.
5507
5508 2012-03-28 Pedro Alves <palves@redhat.com>
5509
5510 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5511 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5512 (IA64_FR1_REGNUM): New defines.
5513 (ia64_fetch_register): New.
5514 (the_low_target): Install it.
5515 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5516 field.
5517 * linux-low.c (linux_fetch_registers): Try the
5518 the_low_target.fetch_register hook first.
5519
5520 * linux-arm-low.c (the_low_target): Adjust.
5521 * linux-bfin-low.c (the_low_target): Adjust.
5522 * linux-cris-low.c (the_low_target): Adjust.
5523 * linux-crisv32-low.c (the_low_target): Adjust.
5524 * linux-m32r-low.c (the_low_target): Adjust.
5525 * linux-m68k-low.c (the_low_target): Adjust.
5526 * linux-mips-low.c (the_low_target): Adjust.
5527 * linux-ppc-low.c (the_low_target): Adjust.
5528 * linux-s390-low.c (the_low_target): Adjust.
5529 * linux-sh-low.c (the_low_target): Adjust.
5530 * linux-sparc-low.c (the_low_target): Adjust.
5531 * linux-tic6x-low.c (the_low_target): Adjust.
5532 * linux-x86-low.c (the_low_target): Adjust.
5533 * linux-xtensa-low.c (the_low_target): Adjust.
5534
5535 2012-03-26 Pedro Alves <palves@redhat.com>
5536
5537 * server.c (handle_qxfer_libraries): Don't bail early if
5538 the_target->qxfer_libraries_svr4 is not NULL.
5539
5540 2012-03-26 Pedro Alves <palves@redhat.com>
5541
5542 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5543
5544 2012-03-23 Pedro Alves <palves@redhat.com>
5545
5546 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5547 "library-list-svr4" element's start tag when the the DSO list is
5548 empty.
5549
5550 2012-03-23 Pedro Alves <palves@redhat.com>
5551
5552 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5553 a variable whose type size is the same as the inferior's pointer
5554 size.
5555
5556 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5557
5558 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5559 struct siginfo.
5560 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5561 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5562 * linux-low.h: Include <signal.h>.
5563 (struct siginfo): Remove forward declaration.
5564 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5565 struct siginfo.
5566
5567 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5568
5569 * .gitignore: Ignore more files.
5570
5571 2012-03-19 Pedro Alves <palves@redhat.com>
5572 Jan Kratochvil <jan.kratochvil@redhat.com>
5573
5574 * server.c (cont_thread, general_thread): Add describing comments.
5575 (start_inferior): Clear `cont_thread'.
5576 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5577 of a process.
5578
5579 2012-03-15 Yao Qi <yao@codesourcery.com>
5580
5581 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5582 handling to ...
5583 (cmd_qtdp): ... here.
5584
5585 2012-03-15 Yao Qi <yao@codesourcery.com>
5586
5587 * tracepoint.c (struct tracepoint_action_ops): New.
5588 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5589 (m_tracepoint_action_download): New.
5590 (r_tracepoint_action_download): New.
5591 (x_tracepoint_action_download): New.
5592 (l_tracepoint_action_download): New.
5593 (add_tracepoint_action): Install `action->ops' according type.
5594 (download_tracepoint_1): Move code `download' function pointer
5595 of various tracepoint_action_ops.
5596
5597 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5598
5599 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5600 linux_ptrace_attach_warnings.
5601
5602 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5603
5604 * Makefile.in (linux-ptrace.o): New.
5605 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5606 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5607 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5608 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5609 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5610 of these targets.
5611 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5612
5613 2012-03-08 Yao Qi <yao@codesourcery.com>
5614 Pedro Alves <palves@redhat.com>
5615
5616 Fix PR server/13392.
5617 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5618 offset of JMP insn.
5619 * tracepoint.c (remove_tracepoint): New.
5620 (cmd_qtdp): Call remove_tracepoint when failed to install.
5621
5622 2012-03-07 Pedro Alves <palves@redhat.com>
5623
5624 * linux-low.c (get_detach_signal): New.
5625 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5626 Pass on pending signals to PTRACE_DETACH. Check the result of the
5627 ptrace call.
5628 * server.c (program_signals, program_signals_p): New.
5629 (handle_general_set): Handle QProgramSignals.
5630 * server.h (program_signals, program_signals_p): Declare.
5631
5632 2012-03-05 Pedro Alves <palves@redhat.com>
5633 Jan Kratochvil <jan.kratochvil@redhat.com>
5634
5635 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5636 New comment why.
5637
5638 2012-03-03 Yao Qi <yao@codesourcery.com>
5639
5640 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5641 agent_look_up_symbols.
5642
5643 2012-03-03 Yao Qi <yao@codesourcery.com>
5644
5645 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5646 (linux-x86-low.o): Likewise.
5647 * server.h: Remove in_process_agent_loaded.
5648 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5649 common/agent.c.
5650 Update callers.
5651
5652 2012-03-03 Yao Qi <yao@codesourcery.com>
5653
5654 * tracepoint.c (gdb_agent_capability): New global.
5655 (in_process_agent_loaded_ust): Renamed to
5656 `in_process_agent_supports_ust'.
5657 Update callers.
5658 (in_process_agent_supports_ust): Call agent_capability_check.
5659 (clear_installed_tracepoints): Assert that agent supports
5660 agent.
5661
5662 2012-03-03 Yao Qi <yao@codesourcery.com>
5663
5664 * linux-low.c (linux_supports_agent): New.
5665 (linux_target_ops): Initialize field `supports_agent' with
5666 linux_supports_agent.
5667 * target.h (struct target_ops) <supports_agent>: New.
5668 (target_supports_agent): New macro.
5669 * server.c (handle_general_set): Handle packet 'QAgent'.
5670 (handle_query): Send `QAgent+'.
5671 * Makefile.in (server.o): Depends on agent.h.
5672
5673 2012-03-03 Yao Qi <yao@codesourcery.com>
5674
5675 * Makefile.in (OBS): Add agent.o.
5676 Add new rule for agent.o.
5677 Track dependence of tracepoint.c on agent.h.
5678 * tracepoint.c (run_inferior_command_1):
5679 (run_inferior_command): Call agent_run_command.
5680 (gdb_ust_connect_sync_socket): Deleted. Move it to
5681 common/agent.c.
5682 (resume_thread, stop_thread): Likewise.
5683 (gdb_ust_socket_init): Renamed to ...
5684 (gdb_agent_socket_init): ... New.
5685 (gdb_ust_thread): Renamed to ...
5686 (gdb_agent_helper_thread): ... New.
5687 (gdb_ust_init): Move some code to ...
5688 (gdb_agent_init): ... here. New.
5689 [HAVE_UST]: Call gdb_ust_init.
5690 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5691 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5692 * config.in, configure: Regenerated.
5693
5694 2012-03-02 Pedro Alves <palves@redhat.com>
5695
5696 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5697 * linux-low.c (struct simple_pid_list): New.
5698 (stopped_pids): New a struct simple_pid_list pointer.
5699 (add_to_pid_list, pull_pid_from_list): New.
5700 (handle_extended_wait): Don't assume the first signal new children
5701 report is SIGSTOP. Adjust call to pull_pid_from_list.
5702 (linux_wait_for_lwp): Adjust.
5703
5704 2012-03-02 Yao Qi <yao@codesourcery.com>
5705
5706 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5707 debug log.
5708
5709 2012-03-02 Yao Qi <yao@codesourcery.com>
5710
5711 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5712 `stop_pc' and `tpoint'. Update caller.
5713
5714 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5715
5716 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5717 * linux-low.c (use_linux_regsets): New macro.
5718 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5719 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5720 (linux_register_in_regsets): New function.
5721 (usr_fetch_inferior_registers): Skip registers covered by
5722 regsets.
5723 (usr_store_inferior_registers): Likewise.
5724 (usr_fetch_inferior_registers): New macro.
5725 (usr_store_inferior_registers): Likewise.
5726 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5727 (linux_store_registers): Likewise.
5728 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5729 prototype.
5730 (init_registers_mips64_dsp_linux): Likewise.
5731 (init_registers_mips_linux): New macro.
5732 (init_registers_mips_dsp_linux): Likewise.
5733 (mips_dsp_num_regs): Likewise.
5734 (DSP_BASE, DSP_CONTROL): New fallback macros.
5735 (mips_base_regs): New macro.
5736 (mips_regmap): Use it. Fix the size.
5737 (mips_dsp_regmap): New variable.
5738 (mips_dsp_regset_bitmap): Likewise.
5739 (mips_arch_setup): New function.
5740 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5741 than mips_regmap.
5742 (mips_cannot_store_register): Likewise.
5743 (the_low_target): Update .arch_setup, .num_regs and .regmap
5744 initializers. Add .regset_bitmap initializer.
5745 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5746 initializer.
5747 * linux-bfin-low.c (the_low_target): Likewise.
5748 * linux-cris-low.c (the_low_target): Likewise.
5749 * linux-crisv32-low.c (the_low_target): Likewise.
5750 * linux-ia64-low.c (the_low_target): Likewise.
5751 * linux-m32r-low.c (the_low_target): Likewise.
5752 * linux-m68k-low.c (the_low_target): Likewise.
5753 * linux-ppc-low.c (the_low_target): Likewise.
5754 * linux-s390-low.c (the_low_target): Likewise.
5755 * linux-sh-low.c (the_low_target): Likewise.
5756 * linux-sparc-low.c (the_low_target): Likewise.
5757 * linux-tic6x-low.c (the_low_target): Likewise.
5758 * linux-x86-low.c (the_low_target): Likewise.
5759 * linux-xtensa-low.c (the_low_target): Likewise.
5760 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5761 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5762 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5763 srv_xmlfiles.
5764 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5765 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5766
5767 2012-02-29 Yao Qi <yao@codesourcery.com>
5768 Pedro Alves <palves@redhat.com>
5769
5770 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5771 `step_over_finished' is true.
5772
5773 2012-02-27 Pedro Alves <palves@redhat.com>
5774
5775 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5776 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5777
5778 2012-02-27 Pedro Alves <palves@redhat.com>
5779
5780 PR server/9684
5781 * linux-low.c (pid_is_stopped): New.
5782 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5783
5784 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5785
5786 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5787 of conditions.
5788
5789 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5790
5791 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5792
5793 2012-02-24 Luis Machado <lgustavo@codesourcery>
5794
5795 * server.c (handle_query): Advertise support for target-side
5796 breakpoint condition evaluation.
5797 (process_point_options): New function.
5798 (process_serial_event): When inserting a breakpoint, check for
5799 a target-side condition that should be evaluated.
5800
5801 * mem-break.c: Include regcache.h and ax.h.
5802 (point_cond_list_t): New data structure.
5803 (breakpoint) <cond_list>: New field.
5804 (find_gdb_breakpoint_at): Make non-static.
5805 (delete_gdb_breakpoint_at): Clear any target-side
5806 conditions.
5807 (clear_gdb_breakpoint_conditions): New function.
5808 (add_condition_to_breakpoint): Likewise.
5809 (add_breakpoint_condition): Likewise.
5810 (gdb_condition_true_at_breakpoint): Likewise.
5811 (gdb_breakpoint_here): Return result directly instead
5812 of going through a local variable.
5813
5814 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5815 (clear_gdb_breakpoint_conditions): Likewise.
5816 (add_breakpoint_condition): Likewise.
5817 (gdb_condition_true_at_breakpoint): Likewise.
5818
5819 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5820 (need_step_over_p): Take target-side breakpoint condition into
5821 consideration.
5822
5823 2012-02-24 Luis Machado <lgustavo@codesourcery>
5824
5825 * server.h: Include tracepoint.h.
5826 (agent_mem_read, agent_get_trace_state_variable_value,
5827 agent_set_trace_state_variable_value,
5828 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5829 get_set_tsv_func_addr): New prototypes.
5830
5831 * ax.h: New include file.
5832 * ax.c: New source file.
5833
5834 * tracepoint.c: Include ax.h.
5835 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5836 agent_expr, eval_result_type): Move to ax.h.
5837 (parse_agent_expr): Rename to ...
5838 (gdb_parse_agent_expr): ... this, make it non-static and move
5839 to ax.h.
5840 (unparse_agent_expr) Rename to ...
5841 (gdb_unparse_agent_expr): ... this, make it non-static and move
5842 to ax.h.
5843 (eval_agent_expr): Rename to ...
5844 (eval_tracepoint_agent_expr): ... this.
5845 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5846 forward declarations.
5847 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5848 (agent_get_trace_state_variable_value): New function.
5849 (agent_set_trace_state_variable_value): New function.
5850 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5851 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5852 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5853 (condition_true_at_tracepoint): Likewise.
5854 (parse_agent_expr): Rename to ...
5855 (gdb_parse_agent_expr): ... this and move to ax.c.
5856 (unparse_agent_expr): Rename to ...
5857 (gdb_unparse_agent_expr): ... this and move to ax.c.
5858 (gdb_agent_op_name): Move to ax.c.
5859 (eval_agent_expr): Rename to ...
5860 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5861 and move to ax.c.
5862 (eval_tracepoint_agent_expr): New function.
5863 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5864 non-static.
5865 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5866 ax.c.
5867 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5868 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5869 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5870 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5871 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5872 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5873 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5874 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5875 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5876 (compile_bytecodes): Remove forward declaration.
5877 (is_goto_target): Move to ax.c.
5878 (compile_bytecodes): Move to ax.c and call
5879 agent_get_trace_state_variable_value (...) and
5880 agent_set_trace_state_variable_value (...).
5881
5882 * Makefile.in: Update ax.c and IPA dependencies.
5883
5884 2012-02-24 Pedro Alves <palves@redhat.com>
5885
5886 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5887 (cmd_bigqtbuffer_circular): ... this. Only handle
5888 'QTBuffer:circular:'.
5889 (handle_tracepoint_general_set): Adjust.
5890
5891 2012-02-16 Yao Qi <yao@codesourcery.com>
5892
5893 * inferiors.c: Move code to ...
5894 * dll.c: .... here. New.
5895 * server.h: Declare clear_dlls.
5896 * Makefile.in (SFILES): Add dll.c.
5897 (OBS): Add dll.o
5898 (dll.o): New rule.
5899
5900 2012-02-11 Yao Qi <yao@codesourcery.com>
5901
5902 * server.c: (handle_monitor_command): Add a new parameter
5903 `own_buf'.
5904 (handle_query): Update caller.
5905
5906 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5907
5908 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5909 * configure, config.in: Regenerate.
5910 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5911 is not defined.
5912
5913 2012-02-02 Pedro Alves <palves@redhat.com>
5914
5915 Try SIGKILL first, then PTRACE_KILL.
5916 * linux-low.c (linux_kill_one_lwp): New.
5917 (linux_kill_one_lwp): Rename to ...
5918 (kill_one_lwp_callback): ... this. Use the new
5919 linux_kill_one_lwp.
5920
5921 2012-02-02 Pedro Alves <palves@redhat.com>
5922
5923 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5924 inferior.
5925
5926 2012-01-27 Pedro Alves <palves@redhat.com>
5927
5928 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5929 (elf_64_file_p): Make static.
5930 (linux_pid_exe_is_elf_64_file): New.
5931 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5932 Delete declarations.
5933 (linux_pid_exe_is_elf_64_file): Declare.
5934 * linux-x86-low.c (x86_arch_setup): Use
5935 linux_pid_exe_is_elf_64_file.
5936
5937 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5938
5939 * linux-low.c (linux_wait_for_event_1): Rename to ...
5940 (linux_wait_for_event): ... here and merge it with former
5941 linux_wait_for_event - new variable wait_ptid, use it.
5942 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5943
5944 2012-01-23 Pedro Alves <palves@redhat.com>
5945
5946 * server.c (main): Avoid yet another case of infinite loop while
5947 detaching/killing after a longjmp.
5948
5949 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5950
5951 Code cleanup.
5952 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5953
5954 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5955
5956 * hostio.c (handle_readlink): New function.
5957 (handle_vFile): Call it to handle "vFile:readlink" packets.
5958
5959 2012-01-20 Pedro Alves <palves@redhat.com>
5960 Ulrich Weigand <ulrich.weigand@linaro.org>
5961
5962 * server.c (handle_v_requests): Only support vAttach and vRun to
5963 start multiple processes when in extended protocol mode.
5964
5965 2012-01-17 Pedro Alves <palves@redhat.com>
5966
5967 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5968 memalign plus mprotect to allocate the scratch buffer.
5969
5970 2012-01-13 Pedro Alves <palves@redhat.com>
5971
5972 * server.c (attach_inferior): Clear `cont_thread'.
5973
5974 2012-01-13 Pedro Alves <palves@redhat.com>
5975
5976 * server.c (main): Avoid infinite loop while detaching/killing
5977 after a longjmp.
5978
5979 2012-01-09 Doug Evans <dje@google.com>
5980
5981 * server.c (start_inferior): Set last_ptid in --wrapper case.
5982
5983 2012-01-06 Yao Qi <yao@codesourcery.com>
5984
5985 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5986 defined.
5987 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5988
5989 2012-01-04 Yao Qi <yao@codesourcery.com>
5990
5991 * tracepoint.c (cmd_qtdp): Print debug message
5992 for static tracepoint.
5993
5994 2012-01-04 Yao Qi <yao@codesourcery.com>
5995
5996 * tracepoint.c (trace_vdebug): Differentiate debug message
5997 between gdbserver and IPA.
5998
5999 2012-01-03 Yao Qi <yao@codesourcery.com>
6000
6001 * tracepoint.c (tracepoint_was_hit): Don't collect for
6002 static tracepoint.
6003
6004 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6005
6006 * terminal.h: Reformat copyright header.
6007
6008 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6009
6010 * server.c (gdbserver_version): Update copyright year.
6011 * gdbreplay.c (gdbreplay_version): Likewise.
6012
6013 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6014
6015 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6016
6017 Revert:
6018 2011-12-18 Hui Zhu <teawater@gmail.com>
6019 * linux-low.c (linux_create_inferior): Save return value to ret.
6020
6021 2011-12-18 Hui Zhu <teawater@gmail.com>
6022
6023 * linux-low.c (linux_create_inferior): Save return value to ret.
6024
6025 2011-12-16 Doug Evans <dje@google.com>
6026
6027 * linux-low.c (linux_create_inferior): If stdio connection,
6028 redirect stdin from /dev/null, stdout to stderr.
6029 * remote-utils.c (remote_is_stdio): New static global.
6030 (remote_connection_is_stdio): New function.
6031 (remote_prepare): Handle stdio connection.
6032 (remote_open): Ditto.
6033 (remote_close): Don't close stdin for stdio connections.
6034 (read_prim,write_prim): New functions. Replace all calls to
6035 read/write to these.
6036 * server.c (main): Watch for "-" argument. Move call to
6037 remote_prepare before start_inferior.
6038 * server.h (STDIO_CONNECTION_NAME): New macro.
6039 (remote_connection_is_stdio): Declare.
6040
6041 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6042 in debugging output.
6043
6044 2011-12-15 Yao Qi <yao@codesourcery.com>
6045
6046 * tracepoint.c: Include sys/syscall.h.
6047 (gdb_ust_thread): Remove preprocessor conditional.
6048
6049 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6050
6051 * linux-low.c (linux_detach_one_lwp): Call
6052 the_low_target.prepare_to_resume before detaching.
6053
6054 2011-12-14 Yao Qi <yao@codesourcery.com>
6055
6056 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6057 of write.
6058
6059 2011-12-14 Yao Qi <yao@codesourcery.com>
6060
6061 * i386-low.c (i386_low_stopped_data_address): Initialize local
6062 variable `control'.
6063
6064 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6065
6066 PR remote/13492
6067
6068 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6069 DR_CONTROL unless necessary. Extend comments.
6070 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6071 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6072
6073 2011-12-13 Yao Qi <yao@codesourcery.com>
6074
6075 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6076 macros.
6077 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6078
6079 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6080
6081 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6082 Print new debug message for such case.
6083
6084 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6085
6086 Fix overlapping memcpy.
6087 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6088 the read_inferior_memory transfer.
6089 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6090 write_inferior_memory transfer.
6091 (set_fast_tracepoint_jump): New variable buf. Use it for the
6092 read_inferior_memory and write_inferior_memory transfers.
6093 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6094 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6095 Use it for the write_inferior_memory transfer.
6096 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6097 buffers.
6098
6099 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6100
6101 * linux-low.c (fetch_register, store_register): Make code
6102 consistent, fix formatting.
6103
6104 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6105
6106 * linux-low.c (usr_store_inferior_registers): Factor out code
6107 to handle individual registers into...
6108 (store_register): ... this new function.
6109
6110 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6111
6112 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6113 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6114 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6115 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6116 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6117 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6118 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6119 (srv_xmlfiles): Add new XML files.
6120
6121 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6122 and <sys/uio.h>.
6123 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6124 (init_registers_s390_linux32v1): Add prototype.
6125 (init_registers_s390_linux32v2): Likewise.
6126 (init_registers_s390_linux64v1): Likewise.
6127 (init_registers_s390_linux64v2): Likewise.
6128 (init_registers_s390x_linux64v1): Likewise.
6129 (init_registers_s390x_linux64v2): Likewise.
6130 (s390_num_regs): Increment to 52.
6131 (s390_regmap): Add orig_r2 register.
6132 (s390_num_regs_3264): Increment to 68.
6133 (s390_regmap_3264): Add orig_r2 register.
6134 (s390_collect_ptrace_register): Handle orig_r2 register.
6135 (s390_supply_ptrace_register): Likewise.
6136 (s390_fill_last_break): New function.
6137 (s390_store_last_break): Likewise.
6138 (s390_fill_system_call): New function.
6139 (s390_store_system_call): Likewise.
6140 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6141 register sets.
6142 (s390_check_regset): New function.
6143 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6144 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6145 Update target_regsets for available register sets.
6146
6147 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6148 Jan Kratochvil <jan.kratochvil@redhat.com>
6149
6150 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6151 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6152 New.
6153 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6154 * linux-low.h (struct process_info_private): New member r_debug.
6155 * server.c (handle_qxfer_libraries): Call
6156 the_target->qxfer_libraries_svr4.
6157 (handle_qxfer_libraries_svr4): New function.
6158 (qxfer_packets): New entry "libraries-svr4".
6159 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6160 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6161 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6162 PACKET_qXfer_libraries_svr4.
6163
6164 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6165
6166 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6167 PSW address/mask between 8-byte and 16-byte formats.
6168 (s390_supply_ptrace_register): Likewise.
6169 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6170 basic addressing mode bit.
6171
6172 2011-11-24 Stan Shebs <stan@codesourcery.com>
6173
6174 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6175
6176 2011-11-17 Stan Shebs <stan@codesourcery.com>
6177
6178 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6179 (tracing_start_time): New global.
6180 (tracing_stop_time): New global.
6181 (tracing_user_name): New global.
6182 (tracing_notes): New global.
6183 (tracing_stop_note): New global.
6184 (cmd_qtstart): Set traceframe_usage, start_time.
6185 (stop_tracing): Set stop_time.
6186 (cmd_qtstatus): Report additional status.
6187 (cmd_qtp): New function.
6188 (handle_tracepoint_query): Call it.
6189 (cmd_qtnotes): New function.
6190 (handle_tracepoint_general_set): Call it.
6191 (get_timestamp): Rename from tsv_get_timestamp.
6192
6193 2011-11-14 Stan Shebs <stan@codesourcery.com>
6194 Kwok Cheung Yeung <kcy@codesourcery.com>
6195
6196 * linux-x86-low.c (small_jump_insn): New.
6197 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6198 trampoline and error message, build a trampoline and issue a small
6199 jump instruction to it.
6200 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6201 trampoline and error message.
6202 (x86_get_min_fast_tracepoint_insn_len): New.
6203 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6204 * linux-low.h (struct linux_target_ops): Add arguments to
6205 install_fast_tracepoint_jump_pad operation, add new operation.
6206 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6207 arguments.
6208 (linux_get_min_fast_tracepoint_insn_len): New function.
6209 (linux_target_op): Add new operation.
6210 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6211 (gdb_trampoline_buffer_end): Ditto.
6212 (gdb_trampoline_buffer_error): Ditto.
6213 (struct ipa_sym_addresses): Add fields for new IPA variables.
6214 (symbol_list): Add entries for new IPA variables.
6215 (struct tracepoint): Add fields to hold the address range of the
6216 trampoline used by the tracepoint.
6217 (trampoline_buffer_head): New static variable.
6218 (trampoline_buffer_tail): Ditto.
6219 (claim_trampoline_space): New function.
6220 (have_fast_tracepoint_trampoline_buffer): New function.
6221 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6222 structure.
6223 (install_fast_tracepoint): Ditto, also add error buffer argument.
6224 (cmd_qtminftpilen): New function.
6225 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6226 (fast_tracepoint_from_trampoline_address): New function.
6227 (fast_tracepoint_collecting): Handle trampoline as part of jump
6228 pad space.
6229 (set_trampoline_buffer_space): New function.
6230 (initialize_tracepoint): Initialize new IPA variables.
6231 * target.h (struct target_ops): Add arguments to
6232 install_fast_tracepoint_jump_pad operation, add new
6233 get_min_fast_tracepoint_insn_len operation.
6234 (target_get_min_fast_tracepoint_insn_len): New.
6235 (install_fast_tracepoint_jump_pad): Add arguments.
6236 * server.h (IPA_BUFSIZ): Define.
6237 * linux-i386-ipa.c: Include extra header files.
6238 (initialize_fast_tracepoint_trampoline_buffer): New function.
6239 (initialize_low_tracepoint): Call it.
6240 * server.h (set_trampoline_buffer_space): Declare.
6241 (claim_trampoline_space): Ditto.
6242 (have_fast_tracepoint_trampoline_buffer): Ditto.
6243
6244 2011-11-14 Yao Qi <yao@codesourcery.com>
6245
6246 * server.c (handle_query): Handle InstallInTrace for qSupported.
6247 * tracepoint.c (add_tracepoint): Sort list.
6248 (install_tracepoint, download_tracepoint): New.
6249 (cmd_qtdp): Call them to install and download tracepoints.
6250 (sort_tracepoints): Removed.
6251 (cmd_qtstart): Update.
6252
6253 2011-11-14 Yao Qi <yao@codesourcery.com>
6254
6255 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6256 * mem-break.h: Declare.
6257 * tracepoint.c (cmd_qtstart): Move some code to ...
6258 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6259 New.
6260 (download_tracepoints): Move some code to ...
6261 (download_tracepoint_1): ... here. New.
6262
6263 2011-11-08 Yao Qi <yao@codesourcery.com>
6264
6265 * remote-utils.c (relocate_instruction): A comment fix.
6266
6267 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6268
6269 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6270 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6271 dr_status_mirror and dr_control_mirror from debug_reg_state.
6272 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6273 (i386_initial_stuff): Remove use of deleted globals.
6274 (i386_get_thread_context, i386_set_thread_context,
6275 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6276 from debug_reg_state.
6277
6278 2011-11-05 Yao Qi <yao@codesourcery.com>
6279
6280 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6281 address as TPOINT's.
6282
6283 2011-11-02 Stan Shebs <stan@codesourcery.com>
6284
6285 * tracepoint.c (agent_mem_read_string): New function.
6286 (eval_agent_expr): Call it for tracenz.
6287 * server.c (handle_query): Report support for tracenz.
6288
6289 2011-11-02 Yao Qi <yao@codesourcery.com>
6290
6291 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6292
6293 2011-11-02 Yao Qi <yao@codesourcery.com>
6294
6295 * target.h: Fix a typo in comment.
6296
6297 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6298
6299 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6300 clobber the breakpoints' shadows with fast tracepoint jumps.
6301 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6302 * target.c (write_inferior_memory): Also pass MYADDR down to
6303 check_mem_write.
6304
6305 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6306
6307 * configure.ac: Check support for personality routine.
6308 * configure: Regenerate.
6309 * config.in: Likewise.
6310 * linux-low.c: Include <sys/personality.h>.
6311 Define ADDR_NO_RANDOMIZE if necessary.
6312 (linux_create_inferior): Disable address space randomization when
6313 forking inferior, if requested.
6314 (linux_supports_disable_randomization): New function.
6315 (linux_target_ops): Install it.
6316 * server.h (disable_randomization): Declare.
6317 * server.c (disable_randomization): New global variable.
6318 (handle_general_set): Handle QDisableRandomization.
6319 (handle_query): Likewise for qSupported.
6320 (main): Support --disable-randomization and --no-disable-randomization
6321 command line arguments.
6322 * target.h (struct target_ops): Add supports_disable_randomization.
6323 (target_supports_disable_randomization): New macro.
6324
6325 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6326
6327 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6328 ifdef check.
6329 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6330 [!PT_GETDSBT] (target_loadmap): New definition.
6331 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6332 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6333 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6334 and PT_GETDSBT to LINUX_LOADMAP.
6335 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6336 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6337
6338 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6339
6340 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6341 (arm_linux_hwbp_cap): New static variable.
6342 (arm_linux_get_hwbp_cap): Replace by ...
6343 (arm_linux_init_hwbp_cap): ... this new function.
6344 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6345 (arm_linux_get_hw_watchpoint_count): Likewise.
6346 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6347 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6348 (arm_prepare_to_resume): Use perror_with_name instead of error.
6349
6350 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6351
6352 * linux-arm-low.c: Include <signal.h>.
6353 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6354 (struct arm_linux_hwbp_cap): New data type.
6355 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6356 (struct arm_linux_hw_breakpoint): New data type.
6357 (MAX_BPTS, MAX_WPTS): Define.
6358 (struct arch_process_info, struct arch_lwp_info): New data types.
6359 (arm_linux_get_hwbp_cap): New function.
6360 (arm_linux_get_hw_breakpoint_count): Likewise.
6361 (arm_linux_get_hw_watchpoint_count): Likewise.
6362 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6363 (arm_hwbp_control_initialize): Likewise.
6364 (arm_hwbp_control_is_enabled): Likewise.
6365 (arm_hwbp_control_is_initialized): Likewise.
6366 (arm_hwbp_control_disable): Likewise.
6367 (arm_linux_hw_breakpoint_equal): Likewise.
6368 (arm_linux_hw_point_initialize): Likewise.
6369 (struct update_registers_data): New data structure.
6370 (update_registers_callback: New function.
6371 (arm_insert_point): Likewise.
6372 (arm_remove_point): Likewise.
6373 (arm_stopped_by_watchpoint): Likewise.
6374 (arm_stopped_data_address): Likewise.
6375 (arm_new_process): Likewise.
6376 (arm_new_thread): Likewise.
6377 (arm_prepare_to_resume): Likewise.
6378 (the_low_target): Register arm_insert_point, arm_remove_point,
6379 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6380 arm_new_thread, and arm_prepare_to_resume.
6381
6382 2011-09-15 Stan Shebs <stan@codesourcery.com>
6383
6384 * server.h (struct emit_ops): Add compare-goto fields.
6385 * tracepoint.c (gdb_agent_op_sizes): New table.
6386 (emit_eq_goto): New function.
6387 (emit_ne_goto): New function.
6388 (emit_lt_goto): New function.
6389 (emit_le_goto): New function.
6390 (emit_gt_goto): New function.
6391 (emit_ge_goto): New function.
6392 (is_goto_target): New function.
6393 (compile_bytecodes): Recognize special cases of compare-goto
6394 combinations and call specialized emitters for them.
6395 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6396 (amd64_emit_ne_goto): New function.
6397 (amd64_emit_lt_goto): New function.
6398 (amd64_emit_le_goto): New function.
6399 (amd64_emit_gt_goto): New function.
6400 (amd64_emit_ge_goto): New function.
6401 (amd64_emit_ops): Add the new functions.
6402 (i386_emit_eq_goto): New function.
6403 (i386_emit_ne_goto): New function.
6404 (i386_emit_lt_goto): New function.
6405 (i386_emit_le_goto): New function.
6406 (i386_emit_gt_goto): New function.
6407 (i386_emit_ge_goto): New function.
6408 (i386_emit_ops): Add the new functions.
6409
6410 2011-09-08 Stan Shebs <stan@codesourcery.com>
6411
6412 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6413 (i386_emit_epilogue): Restore %ebx.
6414
6415 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6416
6417 * server.c (step_thread): Remove definition.
6418 (process_serial_event): Don't handle Hs.
6419 * server.h (step_thread): Remove declaration.
6420 * target.c (set_desired_inferior): Remove use of step_thread.
6421
6422 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6423
6424 * linux-low.c: Include linux-procfs.h.
6425 (linux_attach_lwp_1): Update comments.
6426 (linux_attach): Scan for existing threads when attaching to a
6427 process that is the tgid.
6428 * Makefile.in: Update dependencies.
6429
6430 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6431
6432 * configure.srv: Add linux-procfs.o dependencies.
6433
6434 2011-08-14 Yao Qi <yao@codesourcery.com>
6435
6436 * target.h (struct target_ops): Fix indent.
6437 * win32-low.c (win32_target_ops): Fix comment.
6438
6439 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6440 Yao Qi <yao@codesourcery.com>
6441
6442 * Makefile.in (clean): Remove tic6x-*.c files.
6443 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6444 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6445 (tic6x-c64xp-linux.c): Likewise.
6446 * configure.srv: Add support for tic6x-*-uclinux.
6447 * linux-tic6x-low.c: New.
6448 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6449
6450 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6451 Yao Qi <yao@codesourcery.com>
6452
6453 * target.h (struct target_ops): Add read_loadmap.
6454 * linux-low.c (struct target_loadseg): New type.
6455 (struct target_loadmap): New type.
6456 (linux_read_loadmap): New function.
6457 (linux_target_ops): Add linux_read_loadmap.
6458 * server.c (handle_query): Support qXfer:fdpic:read packet.
6459 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6460 to NULL.
6461
6462 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6463
6464 * win32-low.c: Include <stdint.h>.
6465
6466 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6467
6468 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6469 to the inferior here.
6470 (i386_remove_aligned_watchpoint): Ditto.
6471 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6472 fit part of the watchpoint in the debug registers.
6473 (i386_update_inferior_debug_regs): New.
6474 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6475 registers, and only update the inferior on success.
6476 (i386_low_remove_watchpoint): Ditto.
6477
6478 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6479
6480 * linux-low.c (compare_ints, unique, list_threads, show_process,
6481 linux_core_of_thread): Delete.
6482 (linux_target_ops): Change linux_core_of_thread to
6483 linux_common_core_of_thread.
6484 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6485 * utils.c (malloc_failure): Change type of argument.
6486 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6487 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6488 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6489 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6490 (IPA_OBJS): Add common-utils-ipa.o.
6491 (ptid_h, linux_osdata_h): New macros.
6492 (server_h): Add common/common-utils.h, common/xml-utils.h,
6493 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6494 common/ptid.h.
6495 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6496 ptid.o, buffer.o): New rules.
6497 (linux-low.o): Add common/linux-osdata.h as a dependency.
6498 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6499 * configure.ac: Add AC_HEADER_DIRENT check.
6500 * config.in: Regenerate.
6501 * configure: Regenerate.
6502 * remote-utils.c (xml_escape_text): Delete.
6503 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6504 buffer_xml_printf): Move to common/buffer.c.
6505 * server.c (main): Remove call to initialize_inferiors.
6506 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6507 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6508 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6509 internal_error, gdb_assert, gdb_assert_fail): Delete.
6510 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6511 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6512 common/buffer.h.
6513 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6514 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6515 initialize_inferiors): Delete.
6516
6517 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6518
6519 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6520 symbol error.
6521
6522 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6523
6524 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6525 assertion.
6526 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6527
6528 2011-05-26 Yao Qi <yao@codesourcery.com>
6529
6530 * Makefile.in (thread-db.o): Track dependence to
6531 common/gdb_thread_db.h.
6532 * thread-db.c: include gdb_thread_db.h from right place.
6533
6534 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6535
6536 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6537 __FILE__ and __LINE__ to internal_error.
6538
6539 2011-05-13 Doug Evans <dje@google.com>
6540
6541 * thread-db.c (try_thread_db_load_from_sdir): New function.
6542 (try_thread_db_load_from_dir): New function.
6543 (thread_db_load_search): Handle $sdir, ignore $pdir.
6544 Remove trying of system directories if search of
6545 libthread-db-search-path fails, that is now done via $sdir.
6546
6547 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6548
6549 * server.c (handle_query): Add EnableDisableTracepoints to the list
6550 of supported features.
6551 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6552 tracepoints.
6553 (cmd_qtenable_disable): New.
6554 (cmd_qtstart): Install tracepoints even if disabled.
6555 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6556 receiving a QTEnable or QTDisable packet.
6557 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6558 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6559 tracepoints.
6560 (gdb_probe): Skip data collection if static tracepoint is disabled.
6561
6562 2011-05-10 Doug Evans <dje@google.com>
6563
6564 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6565
6566 2011-05-04 Doug Evans <dje@google.com>
6567
6568 * linux-low.c (linux_join): Skip process lookup.
6569 * spu-low.c (spu_join): Ditto.
6570 * server.c (join_inferiors_callback): Delete.
6571 (process_serial_event): For 'D' packet (detach) call join_inferior
6572 directly.
6573
6574 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6575
6576 * README: Don't mention xscale*-*-linux*.
6577 * configure.srv (xscale*-*-linux*): Don't handle target.
6578
6579 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6580
6581 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6582 casting pointers.
6583 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6584 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6585 (i386_emit_void_call_2): Likewise.
6586
6587 2011-04-26 Yao Qi <yao@codesourcery.com>
6588
6589 * linux-low.c: Move common macros to linux-ptrace.h.
6590 Include linux-ptrace.h.
6591 * Makefile.in (linux_ptrace_h): New.
6592 (linux-low.o): Depends on linux-ptrace.h.
6593
6594 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6595
6596 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6597 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6598 (remote_prepare): New function with most of the TCP code from ...
6599 (remote_open): ... here. Detect PORT here unconditionally. Move also
6600 setting transport_is_reliable.
6601 * server.c (run_once): New variable.
6602 (gdbserver_usage): Document it.
6603 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6604 the first run if RUN_ONCE.
6605 * server.h (run_once, remote_prepare): New declarations.
6606
6607 2011-04-19 Tom Tromey <tromey@redhat.com>
6608
6609 * win32-low.c (handle_load_dll): Remove duplicate "the".
6610
6611 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6612
6613 Remove support for old Cygwin 1.5 versions.
6614 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6615 function to avoid warning.
6616 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6617 warning.
6618
6619 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6620
6621 * gdbserver/server.h (Macro _): Define it if not available.
6622
6623 2011-03-14 Michael Snyder <msnyder@vmware.com>
6624
6625 * hostio.c (handle_close): Remove unnecessary null test.
6626
6627 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6628
6629 * Makefile.in (maintainer-clean realclean distclean): Remove
6630 "make ... subdir_do" command.
6631
6632 2011-03-10 Michael Snyder <msnyder@vmware.com>
6633
6634 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6635
6636 * server.c (handle_v_run): Free alloced buffer on early return.
6637
6638 2011-03-09 Yao Qi <yao@codesourcery.com>
6639
6640 Revert:
6641 2011-03-04 Yao Qi <yao@codesourcery.com>
6642
6643 * Makefile.in: Remove GNU make feature --directory.
6644
6645 2011-03-05 Yao Qi <yao@codesourcery.com>
6646
6647 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6648 (subdir_do): New make target. Copied from gdb/Makefile.
6649 (maintainer-clean, realclean, distclean, clean): Call corresponding
6650 make targets in common/Makefile.
6651
6652 2011-02-11 Yao Qi <yao@codesourcery.com>
6653
6654 * configure.ac: Call AC_PROG_RANLIB.
6655 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6656 * configure: Regenerate.
6657
6658 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6659
6660 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6661
6662 2011-03-06 Yao Qi <yao@codesourcery.com>
6663
6664 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6665
6666 2011-03-05 Yao Qi <yao@codesourcery.com>
6667
6668 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6669 (subdir_do): New make target. Copied from gdb/Makefile.
6670 (maintainer-clean, realclean, distclean, clean): Call corresponding
6671 make targets in common/Makefile.
6672
6673 2011-03-04 Yao Qi <yao@codesourcery.com>
6674
6675 * Makefile.in: Remove GNU make feature --directory.
6676
6677 2011-03-04 Michael Snyder <msnyder@vmware.com>
6678
6679 * server.c (queue_stop_reply): Call xmalloc not malloc.
6680
6681 2011-03-02 Michael Snyder <msnyder@vmware.com>
6682
6683 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6684
6685 2011-02-28 Michael Snyder <msnyder@vmware.com>
6686
6687 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6688 (cmd_qtframe): Ditto.
6689 (cmd_qtbuffer): Ditto.
6690 (cmd_bigqtbuffer): Ditto.
6691
6692 * utils.c (decimal2str): Initialize 'width' to nine, then
6693 don't mess with it.
6694
6695 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6696
6697 * hostio.c (require_data): Free *data, not data.
6698
6699 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6700
6701 * hostio.c (require_data): Use free, not xfree.
6702
6703 2011-02-27 Michael Snyder <msnyder@vmware.com>
6704
6705 * server.c (handle_query): Discard unused value.
6706
6707 * hostio.c (require_data): Free malloc memory before returning
6708 error.
6709
6710 2011-02-26 Michael Snyder <msnyder@vmware.com>
6711
6712 * linux-low.c (list_threads): Call closedir for dirent.
6713
6714 2011-02-27 Michael Snyder <msnyder@vmware.com>
6715
6716 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6717 a case statement falls through.
6718
6719 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6720
6721 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6722 in comparison.
6723
6724 2011-02-26 Michael Snyder <msnyder@vmware.com>
6725
6726 * utils.c (decimal2str): Eliminate dead code and dead param.
6727 (pulongest): Drop dead param from call to decimal2str.
6728 (plongest): Ditto.
6729
6730 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6731
6732 Revert the following patch (not approved yet):
6733 2011-02-21 Hui Zhu <teawater@gmail.com>
6734 * tracepoint.c (tp_printf): New function.
6735 (eval_agent_expr): Handle gdb_agent_op_printf.
6736
6737 2011-02-21 Hui Zhu <teawater@gmail.com>
6738
6739 * tracepoint.c (tp_printf): New function.
6740 (eval_agent_expr): Handle gdb_agent_op_printf.
6741
6742 2011-02-18 Tom Tromey <tromey@redhat.com>
6743
6744 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6745 (tracepoint.o): Likewise.
6746 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6747 (gdb_agent_op_names): Likewise.
6748
6749 2011-02-18 Tom Tromey <tromey@redhat.com>
6750
6751 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6752 gdb_agent_op_rot>: New constants.
6753 (gdb_agent_op_names): Add pick and roll.
6754 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6755 cases.
6756
6757 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6758
6759 * aclocal.m4: Regenerated with aclocal-1.11.1.
6760
6761 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6762
6763 * server.c (handle_qxfer_traceframe_info): New.
6764 (qxfer_packets): Register "traceframe-info".
6765 (handle_query): Report support for qXfer:traceframe-info:read+.
6766 * tracepoint.c (match_blocktype): New.
6767 (traceframe_find_block_type): Rename to ...
6768 (traceframe_walk_blocks): ... this. Add callback filter argument,
6769 and use it.
6770 (traceframe_find_block_type): New, reimplemented on top of
6771 traceframe_walk_blocks.
6772 (build_traceframe_info_xml): New.
6773 (traceframe_read_info): New.
6774 * server.h (traceframe_read_info): Declare.
6775
6776 2011-02-11 Yao Qi <yao@codesourcery.com>
6777
6778 * configure.ac: Call AC_PROG_RANLIB.
6779 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6780 * configure: Regenerate.
6781
6782 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6783
6784 * server.c (gdb_read_memory): Change return semantics to allow
6785 partial transfers.
6786 (handle_search_memory_1): Adjust.
6787 (process_serial_event) <'m' packet>: Handle partial transfers.
6788 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6789
6790 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6791
6792 * regcache.c (init_register_cache): Initialize
6793 regcache->register_status.
6794 (free_register_cache): Release regcache->register_status.
6795 (regcache_cpy): Copy register_status.
6796 (registers_to_string): Print 'x's for unavailable registers.
6797 (supply_register): Mark the register's status valid or
6798 unavailable, depending on whether a buffer was passed in or not.
6799 (supply_register_zeroed): New.
6800 (supply_regblock): Mark the registers' status valid or
6801 unavailable, depending on whether a buffer was passed in or not.
6802 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6803 (struct regcache): New `register_status' field.
6804 (supply_register_zeroed): Declare.
6805 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6806 supply_register_zeroed, rather than passing a NULL buffer to
6807 supply_register.
6808 * tracepoint.c (fetch_traceframe_registers): Update comment.
6809
6810 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6811
6812 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6813 buffer explicit.
6814
6815 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6816
6817 * server.h (decode_xfer_write): Change prototype.
6818 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6819 and don't extract the annex here.
6820 * server.c (decode_xfer_read): Remove `annex' parameter,
6821 and don't extract the annex here.
6822 (decode_xfer): New.
6823 (struct qxfer): New.
6824 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6825 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6826 (handle_qxfer_statictrace): New functions, abstracted out from
6827 handle_query, and made to use the struct qxfer interface.
6828 (handle_threads_qxfer_proper): Rename to ...
6829 (handle_qxfer_threads_proper): ... this.
6830 (handle_threads_qxfer): Rename to ...
6831 (handle_qxfer_threads): ... this. Adjust.
6832 (qxfer_packets): New array.
6833 (handle_qxfer): New function.
6834 (handle_query): Use handle_qxfer.
6835
6836 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6837
6838 * gdbreplay.c: Shorten lines of >= 80 columns.
6839 * linux-low.c: Ditto.
6840 * linux-ppc-low.c: Ditto.
6841 * linux-s390-low.c: Ditto.
6842 * linux-sparc-low.c: Ditto.
6843 * linux-x86-low.c: Ditto.
6844 * linux-xtensa-low.c: Ditto.
6845 * mem-break.c: Ditto.
6846 * nto-low.c: Ditto.
6847 * regcache.h: Ditto.
6848 * remote-utils.c: Ditto.
6849 * server.c: Ditto.
6850 * server.h: Ditto.
6851 * thread-db.c: Ditto.
6852 * tracepoint.c: Ditto.
6853 * utils.c: Ditto.
6854 * win32-low.h: Ditto.
6855
6856 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6857
6858 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6859 update.
6860
6861 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6862
6863 * server.c (gdbserver_version): Update copyright year in version
6864 output.
6865 * gdbreplay.c (gdbreplay_version): Ditto.
6866
6867 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6868
6869 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6870 * linux-bfin-low.c: New file.
6871 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6872 PT_DATA_ADDR for BFIN targets.
6873 * Makefile.in (SFILES): Add linux-bfin-low.c.
6874 (clean): Remove reg-bfin.c.
6875 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6876 * README: Mention supported Blackfin targets.
6877
6878 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6879
6880 * .gitignore: New file.
6881
6882 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6883
6884 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6885
6886 2010-10-22 Jie Zhang <jie@codesourcery.com>
6887
6888 * Makefile.in: Add FLAGS_TO_PASS variable.
6889 (install): Remove dependency of install-only and recursively
6890 invoke make for install-only.
6891
6892 2010-10-04 Doug Evans <dje@google.com>
6893
6894 * Makefile.in (uninstall): Use $(DESTDIR).
6895
6896 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6897
6898 PR gdb/11842
6899
6900 * linux-x86-low.c (compat_siginfo_from_siginfo)
6901 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6902 si_code is < 0. Check for si_code == SI_TIMER before checking for
6903 si_code < 0.
6904
6905 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6906
6907 * lynx-i386-low.c: New file.
6908 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6909
6910 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6911
6912 * lynx-low.c (ptrace_request_to_str): Remove handling for
6913 request values that have been removed in LynxOS 5.x.
6914
6915 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6916
6917 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6918 <ptrace.h>
6919
6920 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6921
6922 * configure.ac: Add --enable-inprocess-agent option.
6923 * configure: Rebuilt.
6924
6925 2010-09-06 Yao Qi <yao@codesourcery.com>
6926
6927 * linux-low.c (linux_kill): Remove unused variable.
6928 (linux_stabilize_threads): Likewise.
6929 * server.c (start_inferior): Likewise.
6930 (queue_stop_reply_callback): Likewise.
6931 * tracepoint.c (do_action_at_tracepoint): Likewise.
6932
6933 2010-09-06 Yao Qi <yao@codesourcery.com>
6934
6935 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6936 on return.
6937
6938 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6939
6940 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6941
6942 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6943
6944 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6945 "$(IPA_DEPFILES)".
6946
6947 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6948
6949 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6950 gdbserver/lynx-ppc-low.c: New files.
6951 * Makefile.in (lynx_low_h): New variable.
6952 (lynx-low.o, lynx-ppc-low.o): New rules.
6953 * configure.ac: On LynxOS, link with -lnetinet.
6954 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6955 * configure: regenerate.
6956
6957 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6958
6959 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6960 * configure.ac: Add check for vasprintf and vsnprintf.
6961 * configure, config.in: Regenerate.
6962 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6963
6964 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6965
6966 * gdbreplay.c: Move include of alloca.h up, next to include of
6967 malloc.h.
6968 * server.h: Add include of malloc.h.
6969 * mem-break.c: Remove include of malloc.h.
6970 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6971
6972 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6973
6974 * Makefile.in (memmem.o): Build with -Wno-error.
6975
6976 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6977
6978 * utils.c (xsnprintf): Make non-static.
6979 * server.h: Add xsnprintf declaration.
6980 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6981 replace calls to snprintf by calls to xsnprintf throughout.
6982
6983 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6984
6985 * configure.ac: Add configure check for alloca.
6986 * configure, config.in: Regenerate.
6987 * server.h: Include alloca.h if it exists.
6988 * gdbreplay.c: Include alloca.h if it exists.
6989
6990 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6991
6992 * linux-low.c (__SIGRTMIN): Define if not already defined.
6993 (linux_create_inferior): Check for __ANDROID__ rather than
6994 __SIGRTMIN.
6995 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6996 are already deferred.
6997 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6998 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6999 stopped and already has a pending signal to report.
7000 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7001 a pending signal to report or is moving out of a jump pad.
7002 (linux_init_signals): Check for __ANDROID__ rather than
7003 __SIGRTMIN.
7004
7005 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7006
7007 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7008 debug_threads check. Avoid a linear search when not doing debug
7009 output.
7010
7011 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7012
7013 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7014 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7015 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7016 (process_event): Change local fd's type to gdb_fildes_t.
7017 (create_file_handler): Adjust prototype.
7018 (delete_file_handler): Adjust prototype.
7019 (handle_file_event): Adjust prototype. Use pfildes.
7020 (create_file_event): Adjsut prototype.
7021 * remote-utils.c (remote_desc, listen_desc): Change type to
7022 gdb_fildes_t.
7023 * server.h: New gdb_fildes_t typedef.
7024 [USE_WIN32API]: Include winsock2.h.
7025 (delete_file_handler, add_file_handler): Adjust prototypes.
7026 (pfildes): Declare.
7027 * utils.c (pfildes): New.
7028
7029 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7030
7031 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7032 * configure: Regenerate.
7033
7034 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7035
7036 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7037 (linux_done_accessing_memory): ... this.
7038 (linux_target_ops): Adjust.
7039 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7040 * nto-low.c (nto_target_ops): Adjust comment.
7041 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7042 * spu-low.c (spu_target_ops): Adjust comment.
7043 * target.h (target_ops): Rename unprepare_to_access_memory field
7044 to done_accessing_memory.
7045 (unprepare_to_access_memory): Rename to ...
7046 (done_accessing_memory): ... this.
7047
7048 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7049
7050 * linux-low.c (linux_prepare_to_access_memory): New.
7051 (linux_unprepare_to_access_memory): New.
7052 (linux_target_ops): Install them.
7053 * server.c (read_memory): Rename to ...
7054 (gdb_read_memory): ... this. Use
7055 prepare_to_access_memory/prepare_to_access_memory.
7056 (write_memory): Rename to ...
7057 (gdb_write_memory): ... this. Use
7058 prepare_to_access_memory/prepare_to_access_memory.
7059 (handle_search_memory_1): Adjust.
7060 (process_serial_event): Adjust.
7061 * target.h (struct target_ops): New fields
7062 prepare_to_access_memory and unprepare_to_access_memory.
7063 (prepare_to_access_memory, unprepare_to_access_memory): New.
7064 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7065 prepare_to_access_memory/prepare_to_access_memory.
7066 * nto-low.c (nto_target_ops): Adjust.
7067 * spu-low.c (spu_target_ops): Adjust.
7068 * win32-low.c (win32_target_ops): Adjust.
7069
7070 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7071
7072 * Makefile.in (WARN_CFLAGS): Get it from configure.
7073 (WERROR_CFLAGS): New.
7074 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7075 * configure.ac: Introduce --enable-werror, which adds -Werror to
7076 the compiler command line. Enabled by default. Disable with
7077 --disable-werror. Add -Wdeclaration-after-statement
7078 Wpointer-arith and -Wformat-nonliteral to warning flags.
7079 * configure: Regenerate.
7080
7081 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7082
7083 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7084
7085 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7086
7087 * gdbreplay.c (remote_error): New.
7088 (gdbchar): New.
7089 (expect): Use gdbchar. Check for error reading from GDB.
7090 Clarify sync error output.
7091 (play): Check for errors writing to GDB.
7092 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7093 * remote-utils.c (getpkt): Check for errors writing to the remote
7094 descriptor.
7095
7096 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7097
7098 * linux-low.c (linux_wait_1): Move non-debugging code out of
7099 `debug_threads' control.
7100
7101 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7102
7103 * linux-low.c (linux_wait_1): Don't set last_status here.
7104 * server.c (push_event, queue_stop_reply_callback): Assert we're
7105 not pushing a TARGET_WAITKIND_IGNORE event.
7106 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7107 (myresume, handle_target_event): Set the thread's last_resume_kind
7108 and last_status from the target returned status.
7109
7110 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7111
7112 PR threads/10729
7113
7114 * linux-x86-low.c (update_debug_registers_callback): New.
7115 (i386_dr_low_set_addr): Use it.
7116 (i386_dr_low_get_addr): New.
7117 (i386_dr_low_set_control): Use update_debug_registers_callback.
7118 (i386_dr_low_get_control): New.
7119 (i386_dr_low_get_status): Adjust.
7120 * linux-low.c (linux_stop_lwp): New.
7121 * linux-low.h (linux_stop_lwp): Declare.
7122
7123 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7124 argument instead of a i386_debug_reg_state.
7125 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7126 a i386_debug_reg_state.
7127 (i386_insert_aligned_watchpoint): Adjust.
7128 (i386_remove_aligned_watchpoint): Adjust.
7129 (i386_low_stopped_data_address): Read the debug registers from the
7130 inferior instead of from the mirrors.
7131 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7132 (i386_dr_low_get_addr): Declare.
7133 (i386_dr_low_get_control): Declare.
7134 (i386_dr_low_get_status): Change prototype.
7135
7136 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7137 (i386_dr_low_get_addr): New.
7138 (i386_dr_low_get_control): New.
7139 (i386_dr_low_get_status): Adjust prototype. Return
7140 dr_status_mirror.
7141 (i386_initial_stuff): Clear dr_status_mirror and
7142 dr_control_mirror.
7143 (i386_get_thread_context): Adjust.
7144 (i386_set_thread_context): Adjust.
7145 (i386_thread_added): Adjust.
7146
7147 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7148
7149 * linux-low.h (linux_thread_area): Delete declaration.
7150
7151 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7152
7153 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7154 after its termination.
7155
7156 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7157
7158 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7159 (gdb_wants_all_stopped): Delete.
7160 (linux_wait_1): Don't call them.
7161 * server.c (handle_v_cont): Tag all threads as want-stopped.
7162 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7163 stopped as "client-wants-stopped".
7164
7165 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7166
7167 * Makefile.in (signals_h): New.
7168 (server_h): Depend on it.
7169 (server.o): Don't depend on $(signals_def).
7170 (signals.o): Depend on $(signals_def).
7171
7172 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7173
7174 * Makefile.in (signals_def): New.
7175 (server_h): Append include/gdb/signals.h and signals_def.
7176 (server.o): Append signals_def.
7177
7178 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7179
7180 * server.c (handle_target_event): Use target_signal_to_host for
7181 resume_info.sig initialization.
7182 * target.h (struct thread_resume) <sig>: New comment.
7183
7184 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7185
7186 * server.c (handle_query): strcpy() the returned string from paddress()
7187 instead of sprintf().
7188 * utils.c (paddress): Return phex_nz().
7189
7190 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7191
7192 * server.c (handle_v_cont): Call mourn_inferior if process
7193 just exited.
7194 (myresume): Likewise.
7195
7196 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7197
7198 Static tracepoints, and integration with UST.
7199
7200 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7201 * mem-break.c (uninsert_all_breakpoints)
7202 (reinsert_all_breakpoints): New.
7203 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7204 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7205 (gdb_agent_ust_loaded, helper_thread_id)
7206 (gdb_agent_helper_thread_id): New macros.
7207 (struct ipa_sym_addresses): Add addr_ust_loaded,
7208 addr_helper_thread_id, addr_cmd_buf.
7209 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7210 (in_process_agent_loaded_ust): New.
7211 (write_e_ust_not_loaded): New.
7212 (maybe_write_ipa_ust_not_loaded): New.
7213 (struct collect_static_trace_data_action): New.
7214 (enum tracepoint_type) <static_tracepoint>: New.
7215 (struct tracepoint) <handle>: Mention static tracepoints.
7216 (struct static_tracepoint_ctx): New.
7217 (CMD_BUF_SIZE): New.
7218 (add_tracepoint_action): Handle static tracepoint actions.
7219 (unprobe_marker_at): New.
7220 (clear_installed_tracepoints): Handle static tracepoints.
7221 (cmd_qtdp): Handle static tracepoints.
7222 (probe_marker_at): New.
7223 (cmd_qtstart): Handle static tracepoints.
7224 (response_tracepoint): Handle static tracepoints.
7225 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7226 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7227 (get_context_regcache): Handle static tracepoints.
7228 (do_action_at_tracepoint): Handle static tracepoint actions.
7229 (traceframe_find_block_type): Handle static trace data blocks.
7230 (traceframe_read_sdata): New.
7231 (download_tracepoints): Download static tracepoint actions.
7232 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7233 (GDB_PROBE_NAME): New.
7234 (ust_ops): New.
7235 (GET_UST_SYM): New.
7236 (USTF): New.
7237 (dlsym_ust): New.
7238 (ust_marker_to_static_tracepoint): New.
7239 (gdb_probe): New.
7240 (collect_ust_data_at_tracepoint): New.
7241 (gdb_ust_probe): New.
7242 (UNIX_PATH_MAX, SOCK_DIR): New.
7243 (gdb_ust_connect_sync_socket): New.
7244 (resume_thread, stop_thread): New.
7245 (run_inferior_command): New.
7246 (init_named_socket): New.
7247 (gdb_ust_socket_init): New.
7248 (cstr_to_hexstr): New.
7249 (next_st): New.
7250 (first_marker, next_marker): New.
7251 (response_ust_marker): New.
7252 (cmd_qtfstm, cmd_qtsstm): New.
7253 (unprobe_marker_at, probe_marker_at): New.
7254 (cmd_qtstmat, gdb_ust_thread): New.
7255 (gdb_ust_init): New.
7256 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7257 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7258 (ST_REGENTRY): New.
7259 (x86_64_st_collect_regmap): New.
7260 (X86_64_NUM_ST_COLLECT_GREGS): New.
7261 (AMD64_RIP_REGNUM): New.
7262 (supply_static_tracepoint_registers): New.
7263 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7264 (ST_REGENTRY): New.
7265 (i386_st_collect_regmap): New.
7266 (i386_NUM_ST_COLLECT_GREGS): New.
7267 (supply_static_tracepoint_registers): New.
7268 * server.c (handle_query): Handle qXfer:statictrace:read.
7269 <qSupported>: Report support for StaticTracepoints, and
7270 qXfer:statictrace:read features.
7271 * server.h (traceframe_read_sdata)
7272 (supply_static_tracepoint_registers): Declare.
7273 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7274 (unpack_varlen_hex): Include in IPA build.
7275 * Makefile.in (ustlibs, ustinc): New.
7276 (IPA_OBJS): Add remote-utils-ipa.o.
7277 ($(IPA_LIB)): Link -ldl and -lpthread.
7278 (UST_CFLAGS): New.
7279 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7280 * config.in, configure: Regenerate.
7281
7282 2010-06-20 Ian Lance Taylor <iant@google.com>
7283 Pedro Alves <pedro@codesourcery.com>
7284
7285 * linux-x86-low.c (always_true): Delete.
7286 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7287 trying to fool the compiler with always_true.
7288
7289 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7290
7291 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7292 conditions in gdbserver.
7293
7294 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7295
7296 * spu-low.c (spu_read_memory): Wrap around local store limit.
7297 (spu_write_memory): Likewise.
7298
7299 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7300
7301 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7302 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7303 LONGEST uses.
7304 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7305 uses.
7306 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7307 uses with LONGEST uses.
7308
7309 2010-06-14 Stan Shebs <stan@codesourcery.com>
7310 Pedro Alves <pedro@codesourcery.com>
7311
7312 Bytecode compiler.
7313
7314 * linux-x86-low.c: Include limits.h.
7315 (add_insns): New.
7316 (always_true): New.
7317 (EMIT_ASM): New.
7318 (EMIT_ASM32): New.
7319 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7320 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7321 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7322 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7323 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7324 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7325 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7326 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7327 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7328 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7329 (amd64_emit_void_call_2): New.
7330 (amd64_emit_ops): New.
7331 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7332 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7333 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7334 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7335 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7336 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7337 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7338 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7339 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7340 (i386_emit_stack_adjust, i386_emit_int_call_1)
7341 (i386_emit_void_call_2): New.
7342 (i386_emit_ops): New.
7343 (x86_emit_ops): New.
7344 (the_low_target): Install x86_emit_ops.
7345 * server.h (struct emit_ops): New.
7346 (get_raw_reg_func_addr): Declare.
7347 (current_insn_ptr, emit_error): Declare.
7348 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7349 (set_trace_state_variable_value): New defines.
7350 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7351 addr_get_trace_state_variable_value and
7352 addr_set_trace_state_variable_value.
7353 (symbol_list): New fields for get_raw_reg,
7354 get_trace_state_variable_value and set_trace_state_variable_value.
7355 (condfn): New typedef.
7356 (struct tracepoint): New field `compiled_cond'.
7357 (do_action_at_tracepoint): Clear compiled_cond.
7358 (get_trace_state_variable_value, set_trace_state_variable_value):
7359 Export in the IPA.
7360 (condition_true_at_tracepoint): If there's a compiled condition,
7361 run that.
7362 (current_insn_ptr, emit_error): New globals.
7363 (struct bytecode_address): New.
7364 (get_raw_reg_func_addr): New.
7365 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7366 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7367 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7368 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7369 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7370 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7371 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7372 (compile_tracepoint_condition, compile_bytecodes): New.
7373 * target.h (emit_ops): Forward declare.
7374 (struct target_ops): New field emit_ops.
7375 (target_emit_ops): New.
7376 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7377 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7378 * linux-low.c (linux_emit_ops): New.
7379 (linux_target_ops): Install it.
7380 * linux-low.h (struct linux_target_ops): New field emit_ops.
7381
7382 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7383
7384 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7385 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7386
7387 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7388 Stan Shebs <stan@codesourcery.com>
7389
7390 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7391 (all): Depend on $(extra_libraries).
7392 (install-only): Install the IPA.
7393 (IPA_OBJS, IPA_LIB): New.
7394 (clean): Remove the IPA lib.
7395 (IPAGENT_CFLAGS): New.
7396 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7397 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7398 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7399 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7400 * configure.ac: Check for atomic builtins support in the compiler.
7401 (IPA_DEPFILES, extra_libraries): Define.
7402 * configure.srv (ipa_obj): Add description.
7403 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7404 (i[34567]86-*-linux*): Set ipa_obj.
7405 (x86_64-*-linux*): Set ipa_obj.
7406 * linux-low.c (stabilizing_threads): New.
7407 (supports_fast_tracepoints): New.
7408 (linux_detach): Stabilize threads before detaching.
7409 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7410 the lwp is either not stabilizing, or is moving out of a jump pad.
7411 (linux_fast_tracepoint_collecting): New.
7412 (maybe_move_out_of_jump_pad): New.
7413 (enqueue_one_deferred_signal): New.
7414 (dequeue_one_deferred_signal): New.
7415 (linux_wait_for_event_1): If moving out of a jump pad, defer
7416 pending signals to later.
7417 (linux_stabilize_threads): New.
7418 (linux_wait_1): Check if threads need moving out of jump pads, and
7419 do it if so.
7420 (stuck_in_jump_pad_callback): New.
7421 (move_out_of_jump_pad_callback): New.
7422 (lwp_running): New.
7423 (linux_resume_one_lwp): Handle moving out of jump pads.
7424 (linux_set_resume_request): Dequeue deferred signals.
7425 (need_step_over_p): Also step over fast tracepoint jumps.
7426 (start_step_over): Also uninsert fast tracepoint jumps.
7427 (finish_step_over): Also reinsert fast tracepoint jumps.
7428 (linux_install_fast_tracepoint_jump): New.
7429 (linux_target_ops): Install linux_stabilize_threads and
7430 linux_install_fast_tracepoint_jump_pad.
7431 * linux-low.h (linux_target_ops) <get_thread_area,
7432 install_fast_tracepoint_jump_pad>: New fields.
7433 (struct lwp_info) <collecting_fast_tracepoint,
7434 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7435 (linux_get_thread_area): Declare.
7436 * linux-x86-low.c (jump_insn): New.
7437 (x86_get_thread_area): New.
7438 (append_insns): New.
7439 (push_opcode): New.
7440 (amd64_install_fast_tracepoint_jump_pad): New.
7441 (i386_install_fast_tracepoint_jump_pad): New.
7442 (x86_install_fast_tracepoint_jump_pad): New.
7443 (the_low_target): Install x86_get_thread_area and
7444 x86_install_fast_tracepoint_jump_pad.
7445 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7446 (struct fast_tracepoint_jump): New.
7447 (fast_tracepoint_jump_insn): New.
7448 (fast_tracepoint_jump_shadow): New.
7449 (find_fast_tracepoint_jump_at): New.
7450 (fast_tracepoint_jump_here): New.
7451 (delete_fast_tracepoint_jump): New.
7452 (set_fast_tracepoint_jump): New.
7453 (uninsert_fast_tracepoint_jumps_at): New.
7454 (reinsert_fast_tracepoint_jumps_at): New.
7455 (set_breakpoint_at): Use write_inferior_memory.
7456 (uninsert_raw_breakpoint): Use write_inferior_memory.
7457 (check_mem_read): Mask out fast tracepoint jumps.
7458 (check_mem_write): Mask out fast tracepoint jumps.
7459 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7460 (set_fast_tracepoint_jump): Declare.
7461 (delete_fast_tracepoint_jump)
7462 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7463 (reinsert_fast_tracepoint_jumps_at): Declare.
7464 * regcache.c: Don't compile many functions when building the
7465 in-process agent library.
7466 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7467 the register buffer in the heap.
7468 (free_register_cache): If the register buffer isn't owned by the
7469 regcache, don't free it.
7470 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7471 pre-existing register caches.
7472 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7473 type.
7474 (convert_ascii_to_int): : Constify `from' parameter type.
7475 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7476 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7477 the needed buffer in-place.
7478 (relocate_instruction): New.
7479 * server.c (handle_query) <qSymbols>: If the target supports
7480 tracepoints, give it a chance of looking up symbols. Report
7481 support for fast tracepoints.
7482 (handle_status): Stabilize threads.
7483 (process_serial_event): Adjust.
7484 * server.h (struct fast_tracepoint_jump): Forward declare.
7485 (struct process_info) <fast_tracepoint_jumps>: New field.
7486 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7487 (decode_X_packet, decode_M_packet): Adjust.
7488 (relocate_instruction): Declare.
7489 (in_process_agent_loaded): Declare.
7490 (tracepoint_look_up_symbols): Declare.
7491 (struct fast_tpoint_collect_status): Declare.
7492 (fast_tracepoint_collecting): Declare.
7493 (force_unlock_trace_buffer): Declare.
7494 (handle_tracepoint_bkpts): Declare.
7495 (initialize_low_tracepoint)
7496 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7497 * target.h (struct target_ops) <stabilize_threads,
7498 install_fast_tracepoint_jump_pad>: New fields.
7499 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7500 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7501 [HAVE_STDINT_H]: Include stdint.h.
7502 (trace_debug_1): Rename to ...
7503 (trace_vdebug): ... this.
7504 (trace_debug): Rename to ...
7505 (trace_debug_1): ... this. Add `level' parameter.
7506 (trace_debug): New.
7507 (ATTR_USED, ATTR_NOINLINE): New.
7508 (IP_AGENT_EXPORT): New.
7509 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7510 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7511 (about_to_request_buffer_space, trace_buffer_is_full)
7512 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7513 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7514 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7515 (traceframe_write_count, traceframes_created)
7516 (trace_state_variables)
7517 New renaming defines.
7518 (struct ipa_sym_addresses): New.
7519 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7520 (symbol_list): New.
7521 (ipa_sym_addrs): New.
7522 (all_tracepoint_symbols_looked_up): New.
7523 (in_process_agent_loaded): New.
7524 (write_e_ipa_not_loaded): New.
7525 (maybe_write_ipa_not_loaded): New.
7526 (tracepoint_look_up_symbols): New.
7527 (debug_threads) [IN_PROCESS_AGENT]: New.
7528 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7529 (UNKNOWN_SIDE_EFFECTS): New.
7530 (stop_tracing): New.
7531 (flush_trace_buffer): New.
7532 (stop_tracing_bkpt): New.
7533 (flush_trace_buffer_bkpt): New.
7534 (read_inferior_integer): New.
7535 (read_inferior_uinteger): New.
7536 (read_inferior_data_pointer): New.
7537 (write_inferior_data_pointer): New.
7538 (write_inferior_integer): New.
7539 (write_inferior_uinteger): New.
7540 (struct collect_static_trace_data_action): Delete.
7541 (enum tracepoint_type): New.
7542 (struct tracepoint) <type>: New field `type'.
7543 <actions_str, step_actions, step_actions_str>: Only include in
7544 GDBserver.
7545 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7546 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7547 (tracepoints): Use IP_AGENT_EXPORT.
7548 (last_tracepoint): Don't include in the IPA.
7549 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7550 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7551 (alloced_trace_state_variables): New.
7552 (trace_state_variables): Use IP_AGENT_EXPORT.
7553 (traceframe_t): Delete unused variable.
7554 (circular_trace_buffer): Don't include in the IPA.
7555 (trace_buffer_start): Delete.
7556 (struct trace_buffer_control): New.
7557 (trace_buffer_free): Delete.
7558 (struct ipa_trace_buffer_control): New.
7559 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7560 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7561 New.
7562 (trace_buffer_ctrl): New.
7563 (TRACE_BUFFER_CTRL_CURR): New.
7564 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7565 Reimplement as macros.
7566 (trace_buffer_wrap): Delete.
7567 (traceframe_write_count, traceframe_read_count)
7568 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7569 (struct tracepoint_hit_ctx) <type>: New field.
7570 (struct fast_tracepoint_ctx): New.
7571 (memory_barrier): New.
7572 (cmpxchg): New.
7573 (record_tracepoint_error): Update atomically in the IPA.
7574 (clear_inferior_trace_buffer): New.
7575 (about_to_request_buffer_space): New.
7576 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7577 updating the same buffer.
7578 (add_tracepoint): Default the tracepoint's type to trap
7579 tracepoint, and orig_size to -1.
7580 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7581 internal variables.
7582 (create_trace_state_variable): New parameter `gdb'. Handle it.
7583 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7584 (cmd_qtdp): Handle fast tracepoints.
7585 (cmd_qtdv): Adjust.
7586 (max_jump_pad_size): New.
7587 (gdb_jump_pad_head): New.
7588 (get_jump_space_head): New.
7589 (claim_jump_space): New.
7590 (sort_tracepoints): New.
7591 (MAX_JUMP_SIZE): New.
7592 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7593 IPA.
7594 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7595 support. Upload fast traceframes, and delete internal IPA
7596 breakpoints.
7597 (stop_tracing_handler): New.
7598 (flush_trace_buffer_handler): New.
7599 (cmd_qtstop): Upload fast tracepoints.
7600 (response_tracepoint): Handle fast tracepoints.
7601 (tracepoint_finished_step): Upload fast traceframes. Set the
7602 tracepoint hit context's tracepoint type.
7603 (handle_tracepoint_bkpts): New.
7604 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7605 type. Add comment about fast tracepoints.
7606 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7607 non-existing action_str field.
7608 (get_context_regcache): Handle fast tracepoints.
7609 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7610 to the regcache.
7611 (fast_tracepoint_from_jump_pad_address): New.
7612 (fast_tracepoint_from_ipa_tpoint_address): New.
7613 (collecting_t): New.
7614 (force_unlock_trace_buffer): New.
7615 (fast_tracepoint_collecting): New.
7616 (collecting): New.
7617 (gdb_collect): New.
7618 (write_inferior_data_ptr): New.
7619 (target_tp_heap): New.
7620 (target_malloc): New.
7621 (download_agent_expr): New.
7622 (UALIGN): New.
7623 (download_tracepoints): New.
7624 (download_trace_state_variables): New.
7625 (upload_fast_traceframes): New.
7626 (IPA_FIRST_TRACEFRAME): New.
7627 (IPA_NEXT_TRACEFRAME_1): New.
7628 (IPA_NEXT_TRACEFRAME): New.
7629 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7630 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7631 (gdb_jump_pad_buffer_end): New.
7632 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7633 (initialize_tracepoint): Adjust.
7634 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7635 buffer. Initialize the low module.
7636 * utils.c (PREFIX, TOOLNAME): New.
7637 (malloc_failure): Use PREFIX.
7638 (error): In the IPA, an error causes an exit.
7639 (fatal, warning): Use PREFIX.
7640 (internal_error): Use TOOLNAME.
7641 (NUMCELLS): Increase to 10.
7642 * configure, config.in: Regenerate.
7643
7644 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7645
7646 * server.c (handle_query) <qSupported>: Do two passes over the
7647 qSupported string to avoid nesting strtok.
7648
7649 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7650
7651 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7652 (CDEPS): New.
7653 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7654 -Wl,--dynamic-list.
7655 * configure: Regenerate.
7656 * proc-service.list: New.
7657
7658 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7659
7660 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7661 New comment.
7662
7663 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7664
7665 * gdbreplay.c (remote_open): Check error return from socket() call by
7666 its equality to -1 not by it being negative.
7667 * remote-utils.c (remote_open): Likewise.
7668
7669 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7670
7671 * config.h: Regenerate.
7672
7673 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7674
7675 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7676 doesn't provide PTRACE_GET_THREAD_AREA.
7677
7678 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7679
7680 * linux-m68k-low.c: Include <asm/ptrace.h>
7681 (ps_get_thread_area): Implement.
7682
7683 2010-05-03 Doug Evans <dje@google.com>
7684
7685 * event-loop.c (struct callback_event): New struct.
7686 (callback_list): New global.
7687 (append_callback_event, delete_callback_event): New functions.
7688 (process_callback): New function.
7689 (start_event_loop): Call it.
7690 * remote-utils.c (NOT_SCHEDULED): Define.
7691 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7692 moved out of readchar.
7693 (readchar): Rewrite. Call reschedule before returning.
7694 (reset_readchar): New function.
7695 (remote_close): Call it.
7696 (process_remaining, reschedule): New functions.
7697 * server.h (callback_handler_func): New typedef.
7698 (append_callback_event, delete_callback_event): Declare.
7699
7700 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7701
7702 * proc-service.c (ps_pglobal_lookup): Use
7703 thread_db_look_up_one_symbol.
7704 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7705 parameter. Use it instead of all_symbols_looked_up.
7706 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7707 field.
7708 (all_symbols_looked_up): Don't declare.
7709 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7710 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7711 field.
7712 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7713 Set all_symbols_looked_up here.
7714 (thread_db_look_up_one_symbol): New.
7715 (thread_db_get_tls_address): Adjust.
7716 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7717 thread_db object on the heap, and tentatively set it in the
7718 process structure.
7719 (thread_db_init): Don't set all_symbols_looked_up here.
7720 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7721
7722 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7723
7724 * linux-low.c (linux_kill, linux_detach): Adjust.
7725 (status_pending_p_callback): Remove redundant statement. Check
7726 for !TARGET_WAITIKIND_IGNORE, instead of
7727 TARGET_WAITKIND_STOPPED.
7728 (handle_tracepoints): Make sure LWP is locked. Adjust.
7729 (linux_wait_for_event_1): Adjust.
7730 (linux_cancel_breakpoints): New.
7731 (unsuspend_one_lwp): New.
7732 (unsuspend_all_lwps): New.
7733 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7734 (send_sigstop_callback): Change return type to int, add new
7735 `except' parameter and handle it.
7736 (suspend_and_send_sigstop_callback): New.
7737 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7738 pass them down. If SUSPEND, also increment the lwp's suspend
7739 count.
7740 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7741 (need_step_over_p): Don't consider suspended LWPs.
7742 (start_step_over): Adjust.
7743 (proceed_one_lwp): Change return type to int, add new `except'
7744 parameter and handle it.
7745 (unsuspend_and_proceed_one_lwp): New.
7746 (proceed_all_lwps): Use find_inferior instead of
7747 for_each_inferior.
7748 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7749 also decrement the suspend count of LWPs. Pass `except' down,
7750 instead of hacking its suspend count.
7751 (linux_pause_all): Add `freeze' parameter. Adjust.
7752 (linux_unpause_all): New.
7753 (linux_target_ops): Install linux_unpause_all.
7754 * server.c (handle_status): Adjust.
7755 * target.h (struct target_ops): New fields `unpause_all' and
7756 `cancel_breakpoints'. Add new parameter to `pause_all'.
7757 (pause_all): Add new `freeze' parameter.
7758 (unpause_all): New.
7759 (cancel_breakpoints): New.
7760 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7761 cancel breakpoints.
7762 (cmd_qtstart): Pause threads.
7763 (stop_tracing): Pause threads, and cancel breakpoints.
7764 * win32-low.c (win32_target_ops): Adjust.
7765
7766 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7767
7768 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7769 the inferior right away from here...
7770 (linux_wait_1): ... to here, and adjust to check the thread's
7771 last_resume_kind instead of the lwp's step or stop_expected flags.
7772
7773 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7774
7775 * README: Use consistent `GDB' and `GDBserver' spellings.
7776
7777 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7778
7779 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7780 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7781 (linux_detach_one_lwp): Assume the lwp is stopped.
7782 (any_thread_of): Delete.
7783 (linux_detach): Stop all lwps here. Don't blindly delete all
7784 breakpoints.
7785 (delete_lwp_callback): New.
7786 (linux_mourn): Delete all lwps of the process that is gone.
7787 (linux_wait_1): Don't delete the last lwp of the process here.
7788 * mem-break.h (mark_breakpoints_out): Declare.
7789 * mem-break.c (mark_breakpoints_out): New.
7790 (free_all_breakpoints): Use it.
7791 * server.c (handle_target_event): If the process is gone, mark
7792 breakpoints out.
7793 * thread-db.c (struct thread_db) <create_bp>: New field.
7794 (thread_db_enable_reporting): Fix prototype. Store a thread event
7795 breakpoint reference in the thread_db struct.
7796 (thread_db_load_search): Clear the thread_db object.
7797 (try_thread_db_load_1): Ditto.
7798 (switch_to_process): New.
7799 (disable_thread_event_reporting): Use it.
7800 (remove_thread_event_breakpoints): New.
7801 (thread_db_detach, thread_db_mourn): Use it.
7802
7803 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7804
7805 * linux-low.c (linux_enable_event_reporting): New.
7806 (linux_wait_for_event_1, handle_extended_wait): Use it.
7807
7808 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7809
7810 * linux-low.c (linux_kill_one_lwp, linux_kill)
7811 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7812 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7813 SIGSTOP even if the LWP is stopped.
7814 (send_sigstop_callback): New.
7815 (stop_all_lwps): Use send_sigstop_callback instead.
7816 (linux_resume_one_thread): Adjust.
7817 (proceed_one_lwp): Still proceed an LWP that the client has
7818 requested to stop, if we haven't reported it as stopped yet. Make
7819 sure that LWPs the client want stopped, have a pending SIGSTOP.
7820
7821 2010-04-26 Doug Evans <dje@google.com>
7822
7823 * server.c (handle_general_set): Make static.
7824
7825 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7826 Print received char after testing for error/eof instead of before.
7827 (input_interrupt): Tweak comment.
7828
7829 2010-04-23 Doug Evans <dje@google.com>
7830
7831 * server.c (start_inferior): Print inferior argv if --debug.
7832
7833 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7834
7835 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7836 * nto-x86-low.c: Include server.h
7837
7838 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7839
7840 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7841 be consistent with other sources of this directory.
7842 (init_registers_amd64): Correct name of source file of this function
7843 in the comment.
7844
7845 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7846
7847 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7848 64-bit executables.
7849
7850 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7851
7852 * win32-i386-low.c: Add 64-bit support.
7853 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7854 (init_registers_amd64): Declare.
7855 (mappings): Add 64-bit version of array.
7856 (init_windows_x86): New function.
7857 (the_low_target): Change init_arch field to init_windows_x86.
7858
7859 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7860
7861 * win32-low.c: Adapt to support also 64-bit architecture.
7862 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7863 (get_image_name): Use SIZE_T type for local variable `done'.
7864 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7865 (toolhelp_get_dll_name): Idem.
7866 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7867 Use uintptr_t typecast to avoid warning.
7868 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7869 (handle_exception): Use phex_nz to avoid warning.
7870 (win32_wait): Remove unused local variable `process'.
7871
7872 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7873
7874 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7875 `amd64-avx.o'.
7876
7877 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7878
7879 * configure.ac: Use `ws2_32' library for srv_mingw.
7880 * configure: Regenerate.
7881 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7882 * remote-utils.c: Likewise.
7883
7884 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7885
7886 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7887 if __x86_64__ is defined.
7888
7889 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7890
7891 * configure: Regenerate.
7892
7893 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7894
7895 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7896 * target.h (target_ops): New get_tib_address field.
7897 * win32-low.h (win32_thread_info): Add thread_local_base field.
7898 * win32-low.c (child_add_thread): Add tlb argument.
7899 Set thread_local_base field to TLB.
7900 (get_child_debug_event): Adapt to child_add_thread change.
7901 (win32_get_tib_address): New function.
7902 (win32_target_ops): Set get_tib_address field to
7903 win32_get_tib_address.
7904 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7905
7906 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7907
7908 * linux-low.c (linux_mourn): Also remove the process.
7909 * server.c (handle_target_event): Don't remove the process here.
7910 * nto-low.c (nto_mourn): New.
7911 (nto_target_ops): Install it.
7912 * spu-low.c (spu_mourn): New.
7913 (spu_target_ops): Install it.
7914 * win32-low.c (win32_mourn): New.
7915 (win32_target_ops): Install it.
7916
7917 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7918
7919 * server.h (buffer_xml_printf): Remove redundant `;'.
7920
7921 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7922
7923 * regcache.c (set_register_cache): Invalidate regcaches before
7924 changing the register cache layout.
7925 (regcache_invalidate_one): Allow a NULL regcache.
7926 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7927 regcaches before changing the register cache layout or the target
7928 regsets.
7929
7930 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7931
7932 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7933 variable warning on Linux/x86-64.
7934
7935 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7936
7937 GDBserver disconnected tracing support.
7938
7939 * linux-low.c (linux_remove_process): Delete.
7940 (add_lwp): Don't set last_resume_kind here.
7941 (linux_kill): Use `mourn'.
7942 (linux_detach): Use `thread_db_detach', and `mourn'.
7943 (linux_mourn): New.
7944 (linux_attach_lwp_1): Adjust comment.
7945 (linux_attach): last_resume_kind moved the thread_info; adjust.
7946 (status_pending_p_callback): Adjust.
7947 (linux_wait_for_event_1): Adjust.
7948 (count_events_callback, select_singlestep_lwp_callback)
7949 (select_event_lwp_callback, cancel_breakpoints_callback)
7950 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7951 (proceed_one_lwp): Adjust.
7952 (linux_async): Add debug output.
7953 (linux_thread_stopped): New.
7954 (linux_pause_all): New.
7955 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7956 linux_pause_all.
7957 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7958 (thread_db_free): Delete declaration.
7959 (thread_db_detach, thread_db_mourn): Declare.
7960 * thread-db.c (thread_db_init): Use thread_db_mourn.
7961 (thread_db_free): Delete, split in two.
7962 (disable_thread_event_reporting): New.
7963 (thread_db_detach): New.
7964 (thread_db_mourn): New.
7965
7966 * server.h (struct thread_info) <last_resume_kind>: New field.
7967 <attached>: Add comment.
7968 <gdb_detached>: New field.
7969 (handler_func): Change return type to int.
7970 (handle_serial_event, handle_target_event): Ditto.
7971 (gdb_connected): Declare.
7972 (tracing): Delete.
7973 (disconnected_tracing): Declare.
7974 (stop_tracing): Declare.
7975
7976 * server.c (handle_query) <qSupported>: Report support for
7977 disconnected tracing.
7978 (queue_stop_reply_callback): Account for running threads.
7979 (gdb_wants_thread_stopped): New.
7980 (gdb_wants_all_threads_stopped): New.
7981 (gdb_reattached_process): New.
7982 (handle_status): Clear the `gdb_detached' flag of all processes.
7983 In all-stop, stop all threads.
7984 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7985 (process_serial_event): If the remote connection breaks, or if an
7986 exit was forced with "monitor exit", force an event loop exit.
7987 Handle disconnected tracing on detach.
7988 (handle_serial_event): Adjust.
7989 (handle_target_event): If GDB isn't connected, forward events back
7990 to the inferior, unless the last process exited, in which case,
7991 exit gdbserver. Adjust interface.
7992
7993 * remote-utils.c (remote_open): Don't block in accept. Instead
7994 register an event loop source on the listen socket file
7995 descriptor. Refactor bits into ...
7996 (listen_desc): ... this new global.
7997 (gdb_connected): ... this new function.
7998 (enable_async_notification): ... this new function.
7999 (handle_accept_event): ... this new function.
8000 (remote_close): Clear remote_desc.
8001
8002 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8003
8004 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8005 New fields.
8006 (mourn_inferior): Define.
8007 (target_process_qsupported): Avoid the dangling else problem.
8008 (thread_stopped): Define.
8009 (pause_all): Define.
8010 (target_waitstatus_to_string): Declare.
8011 * target.c (target_waitstatus_to_string): New.
8012
8013 * tracepoint.c (tracing): Make extern.
8014 (disconnected_tracing): New.
8015 (stop_tracing): Make extern. Handle tracing stops due to GDB
8016 disconnecting.
8017 (cmd_qtdisconnected): New.
8018 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8019 (handle_tracepoint_general_set): Handle QTDisconnected.
8020
8021 * event-loop.c (event_handler_func): Change return type to int.
8022 (process_event): Bail out if the event handler wants the event
8023 loop to stop.
8024 (handle_file_event): Ditto.
8025 (start_event_loop): Bail out if the event handler wants the event
8026 loop to stop.
8027
8028 * nto-low.c (nto_target_ops): Adjust.
8029 * spu-low.c (spu_wait): Don't remove the process here.
8030 (spu_target_ops): Adjust.
8031 * win32-low.c (win32_wait): Don't remove the process here.
8032 (win32_target_ops): Adjust.
8033
8034 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8035
8036 * regcache.c (realloc_register_cache): Invalidate inferior's
8037 regcache before recreating it.
8038
8039 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8040
8041 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8042
8043 2010-04-09 Stan Shebs <stan@codesourcery.com>
8044 Pedro Alves <pedro@codesourcery.com>
8045
8046 * server.h (LONGEST): New.
8047 (struct thread_info) <while_stepping>: New field.
8048 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8049 Declare.
8050 (initialize_tracepoint, handle_tracepoint_general_set)
8051 (handle_tracepoint_query, tracepoint_finished_step)
8052 (tracepoint_was_hit, release_while_stepping_state_list):
8053 (current_traceframe): Declare.
8054 * server.c (handle_general_set): Handle tracepoint packets.
8055 (read_memory): New.
8056 (write_memory): New.
8057 (handle_search_memory_1): Use read_memory.
8058 (handle_query): Report support for conditional tracepoints, trace
8059 state variables, and tracepoint sources. Handle tracepoint
8060 queries.
8061 (main): Initialize the tracepoints module.
8062 (process_serial_event): Handle traceframe reads/writes.
8063
8064 * linux-low.c (handle_tracepoints): New.
8065 (linux_wait_1): Call it.
8066 (linux_resume_one_lwp): Handle while-stepping.
8067 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8068 (linux_target_ops): Install them.
8069 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8070 New field.
8071 * linux-x86-low.c (x86_supports_tracepoints): New.
8072 (the_low_target). Install it.
8073
8074 * mem-break.h (delete_breakpoint): Declare.
8075 * mem-break.c (delete_breakpoint): Make external.
8076
8077 * target.h (struct target_ops): Add `supports_tracepoints',
8078 `read_pc', and `write_pc' fields.
8079 (target_supports_tracepoints): Define.
8080 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8081 (phex_nz): New.
8082
8083 * regcache.h (struct regcache) <registers_owned>: New field.
8084 (init_register_cache, regcache_cpy): Declare.
8085 (regcache_read_pc, regcache_write_pc): Declare.
8086 (register_cache_size): Declare.
8087 (supply_regblock): Declare.
8088 * regcache.c (init_register_cache): New.
8089 (new_register_cache): Use it.
8090 (regcache_cpy): New.
8091 (register_cache_size): New.
8092 (supply_regblock): New.
8093 (regcache_read_pc, regcache_write_pc): New.
8094
8095 * tracepoint.c: New.
8096
8097 * Makefile.in (OBS): Add tracepoint.o.
8098 (tracepoint.o): New rule.
8099
8100 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8101
8102 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8103 (i386-mmx.o): New.
8104 (i386-mmx.c): Likewise.
8105 (i386-mmx-linux.o): Likewise.
8106 (i386-mmx-linux.c): Likewise.
8107
8108 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8109 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8110 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8111 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8112
8113 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8114 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8115 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8116
8117 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8118
8119 * Makefile.in (clean): Updated.
8120 (i386-avx.o): New.
8121 (i386-avx.c): Likewise.
8122 (i386-avx-linux.o): Likewise.
8123 (i386-avx-linux.c): Likewise.
8124 (amd64-avx.o): Likewise.
8125 (amd64-avx.c): Likewise.
8126 (amd64-avx-linux.o): Likewise.
8127 (amd64-avx-linux.c): Likewise.
8128
8129 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8130 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8131 (srv_amd64_regobj): Add amd64-avx.o.
8132 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8133 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8134 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8135 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8136 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8137 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8138 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8139
8140 * i387-fp.c: Include "i386-xstate.h".
8141 (i387_xsave): New.
8142 (i387_cache_to_xsave): Likewise.
8143 (i387_xsave_to_cache): Likewise.
8144 (x86_xcr0): Likewise.
8145
8146 * i387-fp.h (i387_cache_to_xsave): Likewise.
8147 (i387_xsave_to_cache): Likewise.
8148 (x86_xcr0): Likewise.
8149
8150 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8151 * linux-crisv32-low.c (target_regsets): Likewise.
8152 * linux-m68k-low.c (target_regsets): Likewise.
8153 * linux-mips-low.c (target_regsets): Likewise.
8154 * linux-ppc-low.c (target_regsets): Likewise.
8155 * linux-s390-low.c (target_regsets): Likewise.
8156 * linux-sh-low.c (target_regsets): Likewise.
8157 * linux-sparc-low.c (target_regsets): Likewise.
8158 * linux-xtensa-low.c (target_regsets): Likewise.
8159
8160 * linux-low.c: Include <sys/uio.h>.
8161 (regsets_fetch_inferior_registers): Support nt_type.
8162 (regsets_store_inferior_registers): Likewise.
8163 (linux_process_qsupported): New.
8164 (linux_target_ops): Add linux_process_qsupported.
8165
8166 * linux-low.h (regset_info): Add nt_type.
8167 (linux_target_ops): Add process_qsupported.
8168
8169 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8170 and <sys/uio.h>.
8171 (init_registers_i386_avx_linux): New.
8172 (init_registers_amd64_avx_linux): Likewise.
8173 (xmltarget_i386_linux_no_xml): Likewise.
8174 (xmltarget_amd64_linux_no_xml): Likewise.
8175 (PTRACE_GETREGSET): Likewise.
8176 (PTRACE_SETREGSET): Likewise.
8177 (x86_fill_xstateregset): Likewise.
8178 (x86_store_xstateregset): Likewise.
8179 (use_xml): Likewise.
8180 (x86_linux_update_xmltarget): Likewise.
8181 (x86_linux_process_qsupported): Likewise.
8182 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8183 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8184 init_registers_i386_linux here. Call
8185 x86_linux_update_xmltarget.
8186 (the_low_target): Add x86_linux_process_qsupported.
8187
8188 * server.c (handle_query): Call target_process_qsupported.
8189
8190 * target.h (target_ops): Add process_qsupported.
8191 (target_process_qsupported): New.
8192
8193 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8194
8195 * inferiors.c (add_thread): Set last_status kind to
8196 TARGET_WAITKIND_IGNORE.
8197 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8198 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8199 (linux_wait_1): Move `thread' local definition to block that uses
8200 it. Don't NULL initialize `event_child'.
8201 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8202 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8203 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8204
8205 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8206
8207 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8208 an extended waitstatus, or by a watchpoint.
8209 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8210 thread was stepping or has been stopped by a watchpoint.
8211
8212 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8213
8214 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8215 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8216 of another, then delete the previous, and validate all
8217 breakpoints.
8218 (validate_inserted_breakpoint): New.
8219 (delete_disabled_breakpoints): New.
8220 (validate_breakpoints): New.
8221 (check_mem_read): Validate breakpoints before trusting their
8222 shadow. Delete disabled breakpoints.
8223 (check_mem_write): Validate breakpoints before trusting they
8224 should be inserted. Delete disabled breakpoints.
8225 * mem-break.h (validate_breakpoints):
8226 * server.c (handle_query): Validate breakpoints when we see a
8227 qSymbol query.
8228
8229 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8230
8231 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8232 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8233 if we could tell there's a GDB breakpoint at stop_pc.
8234 (need_step_over_p): Don't do a step over if we find a GDB
8235 breakpoint at the resume PC.
8236
8237 * mem-break.c (struct raw_breakpoint): New.
8238 (enum bkpt_type): New type `gdb_breakpoint'.
8239 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8240 fields. New field `raw'.
8241 (find_raw_breakpoint_at): New.
8242 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8243 breakpoint instead.
8244 (set_breakpoint_at): Adjust.
8245 (delete_raw_breakpoint): New.
8246 (release_breakpoint): New.
8247 (delete_breakpoint): Rename to...
8248 (delete_breakpoint_1): ... this. Add proc parameter. Use
8249 release_breakpoint. Return ENOENT.
8250 (delete_breakpoint): Reimplement.
8251 (find_breakpoint_at): Delete.
8252 (find_gdb_breakpoint_at): New.
8253 (delete_breakpoint_at): Delete.
8254 (set_gdb_breakpoint_at): New.
8255 (delete_gdb_breakpoint_at): New.
8256 (gdb_breakpoint_here): New.
8257 (set_reinsert_breakpoint): Use release_breakpoint.
8258 (uninsert_breakpoint): Rename to ...
8259 (uninsert_raw_breakpoint): ... this.
8260 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8261 (reinsert_raw_breakpoint): Change parameter type to
8262 raw_breakpoint.
8263 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8264 instead.
8265 (check_breakpoints): Adjust. Use release_breakpoint.
8266 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8267 (breakpoint_inserted_here): Ditto.
8268 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8269 Don't trust the breakpoint's shadow if it is not inserted.
8270 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8271 (delete_all_breakpoints): Adjust.
8272 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8273 use delete_breakpoint_1.
8274
8275 * mem-break.h (breakpoints_supported): Delete declaration.
8276 (set_gdb_breakpoint_at): Declare.
8277 (gdb_breakpoint_here): Declare.
8278 (delete_breakpoint_at): Delete.
8279 (delete_gdb_breakpoint_at): Declare.
8280
8281 * server.h (struct raw_breakpoint): Forward declare.
8282 (struct process_info): New field `raw_breakpoints'.
8283
8284 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8285 breakpoints.
8286
8287 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8288
8289 * linux-low.c (status_pending_p_callback): Fix comment.
8290 (linux_wait_for_event_1): Move most of the internal breakpoint
8291 handling from here...
8292 (linux_wait_1): ... to here.
8293 (count_events_callback): New.
8294 (select_singlestep_lwp_callback): New.
8295 (select_event_lwp_callback): New.
8296 (cancel_breakpoints_callback): New.
8297 (select_event_lwp): New.
8298 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8299 priority to all LWPs that have had events that should be reported
8300 to the client. Cancel breakpoints when about to reporting the
8301 event to the client, not while stopping lwps. No longer cancel
8302 finished single-steps here.
8303 (cancel_finished_single_step): Delete.
8304 (cancel_finished_single_steps): Delete.
8305
8306 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8307
8308 * mem-break.c (enum bkpt_type): New.
8309 (struct breakpoint): New field `type'.
8310 (set_breakpoint_at): Change return type to struct breakpoint
8311 pointer. Set type to `other_breakpoint' by default.
8312 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8313 in the breakpoint list.
8314 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8315 (reinsert_breakpoint): Rename to ...
8316 (reinsert_raw_breakpoint): ... this.
8317 (reinsert_breakpoints_at): Adjust.
8318 * mem-break.h (struct breakpoint): Declare.
8319 (set_breakpoint_at): Change return type to struct breakpoint
8320 pointer.
8321
8322 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8323
8324 * server.c (handle_query): Assign, not compare.
8325
8326 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8327
8328 Teach linux gdbserver to step-over-breakpoints.
8329
8330 * linux-low.c (can_hardware_single_step): New.
8331 (supports_breakpoints): New.
8332 (handle_extended_wait): If stopping threads, read the stop pc of
8333 the new cloned LWP.
8334 (get_pc): New.
8335 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8336 low target doesn't support retrieving the PC.
8337 (add_lwp): Set last_resume_kind to resume_continue.
8338 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8339 (linux_attach): Don't clear stop_expected. Set the lwp's
8340 last_resume_kind to resume_stop.
8341 (linux_detach_one_lwp): Don't check for removed breakpoints.
8342 (check_removed_breakpoint): Delete.
8343 (status_pending_p): Rename to ...
8344 (status_pending_p_callback): ... this. Don't check for removed
8345 breakpoints. Don't consider threads that are stopped from GDB's
8346 perspective.
8347 (linux_wait_for_lwp): Always read the stop_pc here.
8348 (cancel_breakpoint): New.
8349 (step_over_bkpt): New global.
8350 (linux_wait_for_event_1): Implement stepping over breakpoints.
8351 (gdb_wants_lwp_stopped): New.
8352 (gdb_wants_all_stopped): New.
8353 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8354 single-step traps here. Store the thread's last reported target
8355 wait status.
8356 (send_sigstop): Don't clear stop_expected. Always set it,
8357 instead.
8358 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8359 (cancel_finished_single_step): New.
8360 (cancel_finished_single_steps): New.
8361 (wait_for_sigstop): Don't cancel finished single-step traps here.
8362 (linux_resume_one_lwp): Don't check for removed breakpoints.
8363 Don't set `step' on non-hardware step archs.
8364 (linux_set_resume_request): Ignore resume_stop requests if already
8365 stopping or stopped. Set the lwp's last_resume_kind.
8366 (resume_status_pending_p): Don't check for removed breakpoints.
8367 (need_step_over_p): New.
8368 (start_step_over): New.
8369 (finish_step_over): New.
8370 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8371 requests. Clear the thread's last reported target waitstatus.
8372 Don't use the `suspended' flag. Don't consider pending breakpoints.
8373 (linux_resume): Start a step-over if necessary.
8374 (proceed_one_lwp): New.
8375 (proceed_all_lwps): New.
8376 (unstop_all_lwps): New.
8377 * linux-low.h (struct lwp_info): Rewrite comment for the
8378 `suspended' flag. Add the `stop_pc' field. Delete the
8379 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8380 Add `'last_resume_kind' and `need_step_over' fields.
8381 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8382 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8383 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8384 (set_raw_breakpoint_at): New.
8385 (set_breakpoint_at): Rewrite to use it.
8386 (reinsert_breakpoint_handler): Delete.
8387 (set_reinsert_breakpoint): New.
8388 (reinsert_breakpoint_by_bp): Delete.
8389 (delete_reinsert_breakpoints): New.
8390 (uninsert_breakpoint): Rewrite.
8391 (uninsert_breakpoints_at): New.
8392 (reinsert_breakpoint): Rewrite.
8393 (reinsert_breakpoints_at): New.
8394 (check_breakpoints): Rewrite.
8395 (breakpoint_here): New.
8396 (breakpoint_inserted_here): New.
8397 (check_mem_read): Adjust.
8398 * mem-break.h (breakpoints_supported, breakpoint_here)
8399 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8400 (reinsert_breakpoint_by_bp): Delete declaration.
8401 (delete_reinsert_breakpoints): Declare.
8402 (reinsert_breakpoint): Delete declaration.
8403 (reinsert_breakpoints_at): Declare.
8404 (uninsert_breakpoint): Delete declaration.
8405 (uninsert_breakpoints_at): Declare.
8406 (check_breakpoints): Adjust prototype.
8407 * server.h: Adjust include order.
8408 (struct thread_info): Declare here. Add a `last_status' field.
8409
8410 2010-03-23 Michael Snyder <msnyder@vmware.com>
8411
8412 * server.c (crc32): New function.
8413 (handle_query): Add handling for 'qCRC:' request.
8414
8415 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8416
8417 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8418 lwp had been stopped by a watchpoint.
8419
8420 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8421
8422 * server.h (internal_error): Declare.
8423 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8424 * utils.c (internal_error): New function.
8425
8426 2010-03-15 Andreas Schwab <schwab@redhat.com>
8427
8428 * configure.srv: Fix typo setting srv_regobj.
8429
8430 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8431
8432 * linux-low.c (fetch_register): Avoid passing a non string literal
8433 format to `error'.
8434 (usr_store_inferior_registers): Ditto.
8435
8436 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8437
8438 * linux-low.c (linux_write_memory): Bail out early if peeking
8439 memory failed.
8440
8441 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8442
8443 * linux-low.h (struct lwp_info): New fields
8444 `stopped_by_watchpoint' and `stopped_data_address'.
8445 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8446 here, and cache them in the lwp object.
8447 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8448 directly.
8449 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8450 field.
8451 (linux_stopped_by_watchpoint): Rewrite.
8452 (linux_stopped_data_address): Rewrite.
8453
8454 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8455
8456 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8457 switching the current inferior, not before.
8458
8459 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8460
8461 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8462 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8463 i386-linux.c and amd64-linux.c.
8464 (reg-i386.o): Removed.
8465 (reg-i386.c): Likewise.
8466 (reg-i386-linux.o): Likewise.
8467 (reg-i386-linux.c): Likewise.
8468 (reg-x86-64.o): Likewise.
8469 (reg-x86-64.c): Likewise.
8470 (reg-x86-64-linux.o): Likewise.
8471 (reg-x86-64-linux.c): Likewise.
8472 (i386.o): New.
8473 (i386.c): Likewise.
8474 (i386-linux.o): Likewise.
8475 (i386-linux.c): Likewise.
8476 (amd64.o): Likewise.
8477 (amd64.c): Likewise.
8478 (amd64-linux.o): Likewise.
8479 (amd64-linux.c): Likewise.
8480
8481 * configure.srv (srv_i386_regobj): New.
8482 (srv_i386_linux_regobj): Likewise.
8483 (srv_amd64_regobj): Likewise.
8484 (srv_amd64_linux_regobj): Likewise.
8485 (srv_i386_32bit_xmlfiles): Likewise.
8486 (srv_i386_64bit_xmlfiles): Likewise.
8487 (srv_i386_xmlfiles): Likewise.
8488 (srv_amd64_xmlfiles): Likewise.
8489 (srv_i386_linux_xmlfiles): Likewise.
8490 (srv_amd64_linux_xmlfiles): Likewise.
8491 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8492 srv_xmlfiles to $srv_i386_xmlfiles.
8493 (i[34567]86-*-mingw32ce*): Likewise.
8494 (i[34567]86-*-mingw*): Likewise.
8495 (i[34567]86-*-nto*): Likewise.
8496 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8497 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8498 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8499 (x86_64-*-linux*): Likewise.
8500
8501 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8502 (init_registers_amd64_linux): New.
8503 (x86_arch_setup): Replace init_registers_x86_64_linux with
8504 init_registers_amd64_linux.
8505
8506 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8507
8508 * configure.ac: Check for libdl. If it is not available link against
8509 static libthread_db.
8510 * configure: Regenerate.
8511
8512 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8513
8514 PR9605
8515
8516 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8517 handing a read watchpoint.
8518 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8519
8520 2010-02-12 Doug Evans <dje@google.com>
8521
8522 * linux-low.c (linux_supports_tracefork_flag): Document.
8523 (linux_look_up_symbols): Add comment.
8524
8525 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8526
8527 * regcache.c (supply_register): Clear regcache if buf is NULL.
8528
8529 2010-02-02 Nicolas Roche <roche@sourceware.org>
8530 Joel Brobecker <brobecker@adacore.com>
8531
8532 * inferiors.c (find_inferior): Add function documentation.
8533 (unloaded_dll): Handle the case where the unloaded dll has not
8534 been previously registered in the dll list.
8535
8536 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8537
8538 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8539 (thumb2_breakpoint): New.
8540 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8541
8542 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8543
8544 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8545 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8546 breakpoints.
8547
8548 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8549
8550 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8551
8552 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8553
8554 * linux-s390-low.c (s390_collect_ptrace_register)
8555 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8556
8557 2010-01-21 Doug Evans <dje@google.com>
8558
8559 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8560 (PTRACE_ARG4_TYPE): New macro.
8561 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8562 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8563 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8564 (usr_store_inferior_registers): Ditto.
8565 (linux_read_memory, linux_write_memory): Ditto.
8566 (linux_test_for_tracefork): Ditto.
8567
8568 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8569 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8570
8571 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8572
8573 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8574 target.
8575
8576 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8577
8578 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8579 prototype to take a regcache. Adjust.
8580
8581 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8582
8583 * regcache.h (struct thread_info): Forward declare.
8584 (struct regcache): New.
8585 (new_register_cache): Adjust prototype.
8586 (get_thread_regcache): Declare.
8587 (free_register_cache): Adjust prototype.
8588 (registers_to_string, registers_from_string): Ditto.
8589 (supply_register, supply_register_by_name, collect_register)
8590 (collect_register_as_string, collect_register_by_name): Ditto.
8591 * regcache.c (struct inferior_regcache_data): Delete.
8592 (get_regcache): Rename to ...
8593 (get_thread_regcache): ... this. Adjust. Switch inferior before
8594 fetching registers.
8595 (regcache_invalidate_one): Adjust.
8596 (regcache_invalidate): Fix prototype.
8597 (new_register_cache): Return the new register cache.
8598 (free_register_cache): Change prototype.
8599 (realloc_register_cache): Adjust.
8600 (registers_to_string): Change prototype to take a regcache. Adjust.
8601 (registers_from_string): Ditto.
8602 (register_data): Ditto.
8603 (supply_register): Ditto.
8604 (supply_register_by_name): Ditto.
8605 (collect_register): Ditto.
8606 (collect_register_as_string): Ditto.
8607 (collect_register_by_name): Ditto.
8608 * server.c (process_serial_event): Adjust.
8609 * linux-low.h (regset_fill_func, regset_store_func): Change
8610 prototype.
8611 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8612 Change prototype.
8613 * linux-low.c (get_stop_pc): Adjust.
8614 (check_removed_breakpoint): Adjust.
8615 (linux_wait_for_event): Adjust.
8616 (linux_resume_one_lwp): Adjust.
8617 (fetch_register): Add regcache parameter. Adjust.
8618 (usr_store_inferior_registers): Ditto.
8619 (regsets_fetch_inferior_registers): Ditto.
8620 (regsets_store_inferior_registers): Ditto.
8621 (linux_fetch_registers, linux_store_registers): Ditto.
8622 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8623 regcache. Adjust.
8624 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8625 Ditto.
8626 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8627 prototype to take a regcache.
8628 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8629 * remote-utils.c (convert_ascii_to_int, outreg)
8630 (prepare_resume_reply): Change prototype to take a regcache.
8631 Adjust.
8632 * target.h (struct target_ops) <fetch_registers, store_registers>:
8633 Change prototype to take a regcache.
8634 (fetch_inferior_registers, store_inferior_registers): Change
8635 prototype to take a regcache. Adjust.
8636 * proc-service.c (ps_lgetregs): Adjust.
8637 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8638 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8639 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8640 take a regcache. Adjust.
8641 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8642 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8643 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8644 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8645 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8646 (cris_cannot_fetch_register):
8647 (cris_breakpoint_at): Change prototype to take a regcache.
8648 Adjust.
8649 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8650 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8651 to take a regcache. Adjust.
8652 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8653 Adjust.
8654 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8655 take a regcache. Adjust.
8656 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8657 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8658 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8659 * linux-mips-low.c (mips_get_pc):
8660 (mips_set_pc): Change prototype to take a regcache. Adjust.
8661 (mips_reinsert_addr): Adjust.
8662 (mips_collect_register): Change prototype to take a regcache.
8663 Adjust.
8664 (mips_supply_register):
8665 (mips_collect_register_32bit, mips_supply_register_32bit)
8666 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8667 (mips_store_fpregset): Ditto.
8668 * linux-ppc-low.c (ppc_supply_ptrace_register)
8669 (ppc_supply_ptrace_register): Ditto.
8670 (parse_spufs_run): Adjust.
8671 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8672 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8673 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8674 take a regcache. Adjust.
8675 * linux-s390-low.c (s390_collect_ptrace_register)
8676 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8677 (s390_set_pc): Change prototype to take a regcache. Adjust.
8678 (s390_arch_setup): Adjust.
8679 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8680 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8681 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8682 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8683 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8684 regcache. Adjust.
8685 (sparc_breakpoint_at): Adjust.
8686 * linux-xtensa-low.c (xtensa_fill_gregset):
8687 (xtensa_store_gregset):
8688 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8689 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8690 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8691 prototype to take a regcache. Adjust.
8692 * win32-arm-low.c (arm_fetch_inferior_register)
8693 (arm_store_inferior_register): Change prototype to take a
8694 regcache. Adjust.
8695 * win32-i386-low.c (i386_fetch_inferior_register)
8696 (i386_store_inferior_register): Change prototype to take a
8697 regcache. Adjust.
8698 * win32-low.c (child_fetch_inferior_registers)
8699 (child_store_inferior_registers): Change prototype to take a
8700 regcache. Adjust.
8701 (win32_wait): Adjust.
8702 (win32_fetch_inferior_registers): Change prototype to take a
8703 regcache. Adjust.
8704 (win32_store_inferior_registers): Adjust.
8705 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8706 store_inferior_register>: Change prototype to take a regcache.
8707
8708 2010-01-20 Doug Evans <dje@google.com>
8709
8710 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8711 #ifdef.
8712 (linux_wait_for_event1, linux_init_signals): Ditto.
8713 (W_STOPCODE): Provide definition if missing.
8714
8715 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8716
8717 * linux-low.c (linux_core_of_thread): New.
8718 (compare_ints, show_process, list_threads): New.
8719 (linux_qxfer_osdata): Report threads and cores.
8720 (linux_target_op): Register linux_core_of_thread.
8721 * remote-utils.c (prepare_resume_reply): Report the core.
8722 (buffer_xml_printf): Support %d specifier.
8723 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8724 New.
8725 (handle_query): Handle qXfer:threads. Announce availability
8726 thereof.
8727 * target.h (struct target_ops): New field core_of_thread.
8728
8729 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8730
8731 * Makefile.in (clean): Remove new generated files.
8732 (reg-s390.o, reg-s390.c): Remove rules.
8733 (reg-s390x.o, reg-s390x.c): Likewise.
8734 (s390-linux32.o, s390-linux32.c): Add rules.
8735 (s390-linux64.o, s390-linux64.c): Likewise.
8736 (s390x-linux64.o, s390x-linux64.c): Likewise.
8737 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8738 * linux-s390-low.c: Include <elf.h>.
8739 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8740 (init_registers_s390): Remove prototype.
8741 (init_registers_s390x): Likewise.
8742 (init_registers_s390_linux32): Add prototype.
8743 (init_registers_s390_linux64): Likewise.
8744 (init_registers_s390x_linux64): Likewise.
8745 (s390_num_regs_3264): New define.
8746 (s390_regmap_3264): New global variable.
8747 (s390_cannot_fetch_register): Remove obsolete check.
8748 (s390_cannot_store_register): Likewise.
8749 (s390_collect_ptrace_register): Handle upper/lower register halves.
8750 (s390_supply_ptrace_register): Likewise.
8751 (s390_fill_gregset): Update to register number changes.
8752 (s390_get_hwcap): New routine.
8753 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8754 Install appropriate regmap and register set.
8755
8756 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8757
8758 * server.c (gdbserver_version): Update copyright year to 2010.
8759 * gdbreplay.c (gdbreplay_version): Likewise.
8760
8761 2009-12-28 Doug Evans <dje@google.com>
8762
8763 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8764 elf/external.h. Include <elf.h> instead but only if necessary.
8765
8766 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8767
8768 * linux-low.c (linux_remove_process): Remove `detaching'
8769 parameter. Don't release/detach from thread_db here.
8770 (linux_kill): Release/detach from thread_db here, ...
8771 (linux_detach): ... and here, before actually detaching.
8772 (linux_wait_1): ... and here, when a process exits.
8773 * thread-db.c (any_thread_of): New.
8774 (thread_db_free): Switch the current inferior to a thread of the
8775 passed in process.
8776
8777 2009-12-21 Doug Evans <dje@google.com>
8778
8779 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8780
8781 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8782 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8783 warning ifndef __NR_tkill. Move setting of errno there too.
8784 Delete unnecessary resetting of errno after syscall.
8785 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8786
8787 * configure.ac: Check for dladdr.
8788 * config.in: Regenerate.
8789 * configure: Regenerate.
8790 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8791 (try_thread_db_load): Update.
8792
8793 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8794
8795 2009-12-18 Doug Evans <dje@google.com>
8796
8797 * event-loop.c: Include unistd.h if it exists.
8798
8799 * linux-low.c (my_waitpid): Move definition away from being in
8800 between linux_tracefork_child/linux_test_for_tracefork.
8801
8802 * gdb_proc_service.h (psaddr_t): Fix type.
8803 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8804 signature to match glibc.
8805
8806 2009-12-16 Doug Evans <dje@google.com>
8807
8808 * linux-low.c (linux_read_memory): Fix argument to read.
8809
8810 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8811
8812 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8813 events, don't leave current_inferior pointing at null.
8814
8815 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8816
8817 * win32-low.c (LOG): Delete.
8818 (OUTMSG): Output to stderr.
8819 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8820 on compile time LOG macro.
8821 (win32_wait): Fix debug output.
8822
8823 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8824
8825 * win32-low.c (win32_add_one_solib): If the dll name is
8826 "ntdll.dll", prepend the system directory to the dll path.
8827
8828 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8829
8830 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8831
8832 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8833 Vladimir Prus <vladimir@codesourcery.com>
8834
8835 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8836 * configure.ac: Check for __mcoldfire__ and set
8837 gdb_cv_m68k_is_coldfire.
8838 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8839 reg-cf.o and reg-m68k.o.
8840 * configure: Regenerated.
8841
8842 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8843
8844 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8845 Pass it to thread_db_free.
8846 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8847 proper `detaching' argument to linux_remove_process.
8848 * linux-low.h (thread_db_free): Add `detaching' parameter.
8849 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8850 to thread_db_free.
8851 (thread_db_free): Add `detaching' parameter. Only
8852 call td_ta_clear_event if detaching from process.
8853
8854 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8855
8856 * thread-db.c (thread_db_free): Fix typo.
8857
8858 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8859
8860 PR gdb/10838
8861 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8862
8863 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8864
8865 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8866 with an i686 compiler.
8867 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8868 needed.
8869 * configure: Rebuilt.
8870
8871 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8872
8873 PR gdb/10783
8874
8875 * server.c (handle_search_memory_1): Correct read_addr initialization
8876 in loop for searching subsequent chunks.
8877
8878 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8879
8880 * configure.ac: New --with-libthread-db option.
8881 * thread-db.c: Allow direct dependence on libthread_db.
8882 (thread_db_free): Adjust.
8883 * config.in: Regenerate.
8884 * configure: Likewise.
8885
8886 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8887
8888 PR gdb/10757
8889 * thread-db.c (attach_thread): New function.
8890 (maybe_attach_thread): Return success/failure.
8891 (find_new_threads_callback): Adjust.
8892 (thread_db_find_new_threads): Loop until no new threads.
8893
8894 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8895
8896 * proc-service.c (ps_lgetregs): Formatting.
8897
8898 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8899
8900 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8901 * configure.ac: Adjust.
8902 * linux-low.h (struct process_info_private): Move members to struct
8903 thread_db.
8904 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8905 * linux-low.c (linux_remove_process): Adjust.
8906 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8907 * server.c (handle_query): Move code ...
8908 (handle_monitor_command): ... here. New function.
8909 * target.h (struct target_ops): New member.
8910 * thread-db.c (struct thread_db): New.
8911 (libthread_db_search_path): New variable.
8912 (thread_db_create_event, thread_db_enable_reporting)
8913 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8914 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8915 (try_thread_db_load_1, dladdr_to_soname): New functions.
8916 (try_thread_db_load, thread_db_load_search): New functions.
8917 (thread_db_init): Search for libthread_db.
8918 (thread_db_free): New function.
8919 (thread_db_handle_monitor_command): Likewise.
8920 * config.in: Regenerate.
8921 * configure: Regenerate.
8922
8923 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8924
8925 * spu-low.c (spu_kill): Wait for inferior to terminate.
8926 Call clear_inferiors.
8927 (spu_detach): Call clear_inferiors.
8928
8929 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8930
8931 * aclocal.m4: Regenerate.
8932 * config.in: Likewise.
8933 * configure: Likewise.
8934
8935 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8936
8937 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8938 (parse_spufs_run): New function.
8939 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8940 (ppc_breakpoint_at): Handle SPU breakpoints.
8941
8942 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8943
8944 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8945 (SPUFS_MAGIC): Define.
8946 (spu_enumerate_spu_ids): New function.
8947 (linux_qxfer_spu): New function.
8948 (linux_target_ops): Install linux_qxfer_spu.
8949
8950 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8951
8952 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8953 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8954 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8955 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8956 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8957 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8958 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8959 (init_registers_powerpc_cell32l): Add prototype.
8960 (init_registers_powerpc_cell64l): Likewise.
8961 (ppc_arch_setup): Detect Cell/B.E. architecture.
8962
8963 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8964
8965 * Makefile.in (datarootdir): New variable.
8966
8967 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8968
8969 * linux-low.c (linux_write_memory): Update debugging output.
8970 * Makefile.in (clean): Add new descriptions.
8971 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8972 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8973 * configure.srv: Add new files for arm*-*-linux*.
8974 * linux-arm-low.c: Add new declarations.
8975 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8976 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8977 (HWCAP_VFPv3D16): New.
8978 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8979 instead of __IWMMXT__.
8980 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8981 (arm_arch_setup): New.
8982 (target_regsets): Remove #ifdef. Add VFP regset.
8983 (the_low_target): Use arm_arch_setup.
8984
8985 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8986
8987 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8988 the main thread again.
8989
8990 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8991
8992 Adding Neutrino gdbserver.
8993 * configure: Regenerated.
8994 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8995 * configure.srv (i[34567]86-*-nto*): New target.
8996 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8997 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8998 (nto_comctrl) [__QNX__]: New function.
8999 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9000
9001 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9002
9003 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9004 srv_tgtobj.
9005
9006 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9007 Pedro Alves <pedro@codesourcery.com>
9008
9009 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9010 don't support CONTEXT_EXTENDED_REGISTERS.
9011 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9012 (the_low_target): Install them.
9013 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9014 failing with ERROR_PIPE_NOT_CONNECTED.
9015
9016 2009-06-30 Doug Evans <dje@google.com>
9017 Pierre Muller <muller@ics.u-strasbg.fr>
9018
9019 Add h/w watchpoint support to x86-linux, win32-i386.
9020 * Makefile.in (SFILES): Add i386-low.c
9021 (i386_low_h): Define.
9022 (i386-low.o): Add dependencies.
9023 (linux-x86-low.o): Add i386-low.h dependency.
9024 (win32-i386-low.o): Ditto.
9025 * i386-low.c: New file.
9026 * i386-low.h: New file.
9027 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9028 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9029 * linux-low.c (linux_add_process): Initialize arch_private.
9030 (linux_remove_process): Free arch_private.
9031 (add_lwp): Initialize arch_private.
9032 (delete_lwp): Free arch_private.
9033 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9034 provided.
9035 * linux-low.h (process_info_private): New member arch_private.
9036 (lwp_info): New member arch_private.
9037 (linux_target_ops): New members new_process, new_thread,
9038 prepare_to_resume.
9039 (ptid_of): New macro.
9040 * linux-x86-low.c: Include stddef.h, i386-low.h.
9041 (arch_process_info): New struct.
9042 (arch_lwp_info): New struct.
9043 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9044 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9045 (i386_dr_low_get_status): New function.
9046 (x86_insert_point, x86_remove_point): New functions.
9047 (x86_stopped_by_watchpoint): New function.
9048 (x86_stopped_data_address): New function.
9049 (x86_linux_new_process, x86_linux_new_thread): New functions.
9050 (x86_linux_prepare_to_resume): New function.
9051 (the_low_target): Add entries for insert_point, remove_point,
9052 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9053 prepare_to_resume.
9054 * server.c (debug_hw_points): New global.
9055 (monitor_show_help): Document set debug-hw-points.
9056 (handle_query): Process "set debug-hw-points".
9057 * server.h (debug_hw_points): Declare.
9058 (paddress): Declare.
9059 * utils.c (NUMCELLS, CELLSIZE): New macros.
9060 (get_sell, xsnprintf, paddress): New functions.
9061 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9062 remove_point, stopped_by_watchpoint, stopped_data_address.
9063 * win32-i386-low.c: Include i386-low.h.
9064 (debug_reg_state): Replaces dr.
9065 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9066 (i386_dr_low_get_status): New function.
9067 (i386_insert_point, i386_remove_point): New functions.
9068 (i386_stopped_by_watchpoint): New function.
9069 (i386_stopped_data_address): New function.
9070 (i386_initial_stuff): Update.
9071 (get_thread_context,set_thread_context,i386_thread_added): Update.
9072 (the_low_target): Add entries for insert_point,
9073 remove_point, stopped_by_watchpoint, stopped_data_address.
9074 * win32-low.c (win32_insert_watchpoint): New function.
9075 (win32_remove_watchpoint): New function.
9076 (win32_stopped_by_watchpoint): New function.
9077 (win32_stopped_data_address): New function.
9078 (win32_target_ops): Add entries for insert_watchpoint,
9079 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9080 * win32-low.h (win32_target_ops): New members insert_point,
9081 remove_point, stopped_by_watchpoint, stopped_data_address.
9082
9083 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9084
9085 * server.c (process_serial_event): Re-return unsupported, not
9086 error, if the type isn't recognized. Re-allow supporting only
9087 insert or remove packets. Also call require_running for
9088 breakpoints. Add missing break statement to default case. Tidy.
9089 * target.h (struct target_ops): Rename insert_watchpoint to
9090 insert_point, and remove_watchpoint to remove_point.
9091
9092 * linux-low.h (struct linux_target_ops): Likewise.
9093 * linux-low.c (linux_insert_watchpoint): Rename to ...
9094 (linux_insert_point): ... this. Adjust.
9095 (linux_remove_watchpoint): Rename to ...
9096 (linux_remove_point): ... this. Adjust.
9097 (linux_target_ops): Adjust.
9098 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9099 (cris_insert_point): ... this.
9100 (cris_remove_watchpoint): Rename to ...
9101 (cris_remove_point): ... this.
9102 (the_low_target): Adjust.
9103
9104 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9105
9106 * server.c (handle_v_kill): Pass signal_pid to
9107 kill_inferior if multi_process is zero.
9108
9109 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9110
9111 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9112 * target.h (target_ops): Comment for *_watchpoint to make it clear
9113 the functions can get types '0' and '1'.
9114
9115 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9116
9117 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9118 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9119 * regcache.c (get_regcache): Likewise.
9120 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9121 * win32-low.c (child_fetch_inferior_registers): Remove check for
9122 regno 0.
9123
9124 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9125 Pedro Alves <pedro@codesourcery.com>
9126
9127 * target.h (struct target_ops) <supports_multi_process>: New
9128 callback.
9129 (target_supports_multi_process): New.
9130 * server.c (handle_query): Even if GDB reports support, only
9131 enable multi-process if the target also supports it. Report
9132 multi-process support only if the target backend supports it.
9133 * linux-low.c (linux_supports_multi_process): New function.
9134 (linux_target_ops): Install it as target_supports_multi_process
9135 callback.
9136
9137 2009-05-24 Doug Evans <dje@google.com>
9138
9139 Global renaming of find_thread_pid to find_thread_ptid.
9140 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9141 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9142 All callers updated.
9143
9144 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9145 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9146 directly.
9147
9148 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9149 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9150 (linux_resume_one_lwp): Ditto.
9151
9152 2009-05-23 Doug Evans <dje@google.com>
9153
9154 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9155 from struct inferior_list_entry * to struct lwp_info *.
9156 All callers updated.
9157
9158 2009-05-13 Doug Evans <dje@google.com>
9159
9160 * linux-x86-low.c: Don't include assert.h.
9161 (x86_siginfo_fixup): Use fatal, not assert.
9162 (x86_arch_setup): Fix comment.
9163
9164 2009-05-12 Doug Evans <dje@google.com>
9165
9166 Biarch support for i386/amd64 gdbserver.
9167 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9168 Add linux-x86-low.c.
9169 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9170 (linux-x86-low.o): Add.
9171 * linux-x86-64-low.c: Delete.
9172 * linux-i386-low.c: Delete.
9173 * linux-x86-low.c: New file.
9174 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9175 linux-x86-low.o.
9176 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9177 linux-x86-low.o.
9178 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9179 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9180 (linux_child_pid_to_exec_file): New function.
9181 (elf_64_header_p, elf_64_file_p): New functions.
9182 (siginfo_fixup): New function.
9183 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9184 give target a chance to convert layout.
9185 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9186 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9187
9188 2009-05-07 Doug Evans <dje@google.com>
9189
9190 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9191 (regsets_store_inferior_registers): Ditto.
9192
9193 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9194
9195 PR server/10048
9196
9197 * linux-low.c (must_set_ptrace_flags): Delete.
9198 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9199 of the global.
9200 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9201 `lwp->must_set_ptrace_flags' instead.
9202 (linux_wait_for_event_1): Set ptrace options here.
9203 (linux_wait_1): ... not here.
9204
9205 2009-04-30 Doug Evans <dje@google.com>
9206
9207 * inferiors.c (started_inferior_callback): New function.
9208 (attached_inferior_callback): New function.
9209 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9210 * server.c (print_started_pid, print_attached_pid): New functions.
9211 (detach_or_kill_for_exit): New function.
9212 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9213 * server.h (have_started_inferiors_p): Declare.
9214 (have_attached_inferiors_p): Declare.
9215
9216 * inferiors.c (remove_process): Fix memory leak, free process.
9217 * linux-low.c (linux_remove_process): New function.
9218 (linux_kill): Call it instead of remove_process.
9219 (linux_detach, linux_wait_1): Ditto.
9220
9221 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9222
9223 * configure.srv: Add x86 Windows CE target.
9224
9225 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9226
9227 * inferiors.c (get_thread_process): Make global.
9228 * server.h (get_thread_process): Add prototype.
9229 * thread-db.c (find_one_thread): Use get_thread_process
9230 instead of current_process.
9231 (thread_db_get_tls_address): Do not crash if called when
9232 thread layer is not yet initialized.
9233
9234 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9235
9236 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9237 * spu-low.c (current_tid): Rename to ...
9238 (current_ptid): ... this.
9239 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9240 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9241 ptid_get_lwp (current_ptid) instead of current_tid.
9242 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9243 instead of current_tid. Use find_process_pid to verify pid
9244 argument is valid. Pass proper argument to remove_process.
9245 (spu_thread_alive): Compare current_ptid instead of current_tid.
9246 (spu_resume): Likewise.
9247
9248 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9249
9250 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9251 variable.
9252
9253 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9254
9255 Implement the multiprocess extensions, and add linux multiprocess
9256 support.
9257
9258 * server.h (ULONGEST): Declare.
9259 (struct ptid, ptid_t): New.
9260 (minus_one_ptid, null_ptid): Declare.
9261 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9262 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9263 (struct inferior_list_entry): Change `id' type from unsigned from
9264 to ptid_t.
9265 (struct sym_cache, struct breakpoint, struct
9266 process_info_private): Forward declare.
9267 (struct process_info): Declare.
9268 (current_process): Declare.
9269 (all_processes): Declare.
9270 (initialize_inferiors): Declare.
9271 (add_thread): Adjust to use ptid_t.
9272 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9273 (add_process, remove_process, find_thread_pid): Declare.
9274 (find_inferior_id): Adjust to use ptid_t.
9275 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9276 (multi_process): Declare.
9277 (push_event): Adjust to use ptid_t.
9278 (read_ptid, write_ptid): Declare.
9279 (prepare_resume_reply): Adjust to use ptid_t.
9280 (clear_symbol_cache): Declare.
9281 * inferiors.c (all_processes): New.
9282 (null_ptid, minus_one_ptid): New.
9283 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9284 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9285 (add_thread): Change unsigned long to ptid. Remove gdb_id
9286 parameter. Adjust.
9287 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9288 (gdb_id_to_thread): Rename to ...
9289 (find_thread_pid): ... this. Change unsigned long to ptid.
9290 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9291 (loaded_dll, pull_pid_from_list): Adjust.
9292 (add_process, remove_process, find_process_pid)
9293 (get_thread_process, current_process, initialize_inferiors): New.
9294 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9295 (struct target_waitstatus) <related_pid>: Ditto.
9296 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9297 return type to int.
9298 (struct target_ops) <join>: Add `pid' argument.
9299 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9300 (struct target_ops) <wait>: Add `ptid' field. Change return type
9301 to ptid.
9302 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9303 (mywait): Add `ptid' argument. Change return type to ptid_t.
9304 (target_pid_to_str): Declare.
9305 * target.c (set_desired_inferior): Adjust to use ptids.
9306 (mywait): Add new `ptid' argument. Adjust.
9307 (target_pid_to_str): New.
9308 * mem-break.h (free_all_breakpoints): Declare.
9309 * mem-break.c (breakpoints): Delelete.
9310 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9311 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9312 to use per-process breakpoint list.
9313 (free_all_breakpoints): New.
9314 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9315 (symbol_cache, all_symbols_looked_up): Delete.
9316 (hexchars): New.
9317 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9318 read_ptid): New.
9319 (prepare_resume_reply): Change ptid argument's type from unsigned
9320 long to ptid_t. Adjust. Implement W;process and X;process.
9321 (free_sym_cache, clear_symbol_cache): New.
9322 (look_up_one_symbol): Adjust to per-process symbol cache. *
9323 * server.c (cont_thread, general_thread, step_thread): Change type
9324 to ptid_t.
9325 (attached): Delete.
9326 (multi_process): New.
9327 (last_ptid): Change type to ptid_t.
9328 (struct vstop_notif) <ptid>: Change type to ptid_t.
9329 (queue_stop_reply, push_event): Change `ptid' argument's type to
9330 ptid_t.
9331 (discard_queued_stop_replies): Add `pid' argument.
9332 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9333 changes. Don't reference the `attached' global.
9334 (attach_inferior): Adjust to mywait interface changes.
9335 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9336 features. Handle and report "multiprocess+". Handle
9337 "qAttached:PID".
9338 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9339 changes.
9340 (handle_v_kill): New.
9341 (handle_v_stopped): Adjust to use target_pid_to_str.
9342 (handle_v_requests): Allow multiple attaches and runs when
9343 multiprocess extensions are in effect. Handle "vKill".
9344 (myresume): Adjust to use ptids.
9345 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9346 (handle_status): Adjust to discard_queued_stop_replies interface
9347 change.
9348 (first_thread_of, kill_inferior_callback)
9349 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9350 (main): Call initialize_inferiors. Adjust to use ptids, killing
9351 and detaching from all inferiors. Handle multiprocess packet
9352 variants.
9353 * linux-low.h: Include gdb_proc_service.h.
9354 (struct process_info_private): New.
9355 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9356 <lwpid_of>: Use ptid_get_lwp.
9357 (get_lwp_thread): Adjust.
9358 (struct lwp_info): Add `dead' member.
9359 (find_lwp_pid): Declare.
9360 * linux-low.c (thread_db_active): Delete.
9361 (new_inferior): Adjust comment.
9362 (inferior_pid): Delete.
9363 (linux_add_process): New.
9364 (handle_extended_wait): Adjust.
9365 (add_lwp): Change unsigned long to ptid.
9366 (linux_create_inferior): Add process to processes table. Adjust
9367 to use ptids. Don't set new_inferior here.
9368 (linux_attach_lwp): Rename to ...
9369 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9370 it. Adjust to use ptids.
9371 (linux_attach_lwp): New.
9372 (linux_attach): Add process to processes table. Don't set
9373 new_inferior here.
9374 (struct counter): New.
9375 (second_thread_of_pid_p, last_thread_of_process_p): New.
9376 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9377 multiple processes.
9378 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9379 processes. Remove process from process table.
9380 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9381 to multiple processes.
9382 (any_thread_of): New.
9383 (linux_detach): Add `pid' argument, and handle it. Remove process
9384 from processes table.
9385 (linux_join): Add `pid' argument. Handle it.
9386 (linux_thread_alive): Change unsighed long argument to ptid_t.
9387 Consider dead lwps as not being alive.
9388 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9389 threads we're not interested in.
9390 (same_lwp, find_lwp_pid): New.
9391 (linux_wait_for_lwp): Change `pid' argument's type from int to
9392 ptid_t. Adjust.
9393 (linux_wait_for_event): Rename to ...
9394 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9395 from int to ptid_t. Adjust.
9396 (linux_wait_for_event): New.
9397 (linux_wait_1): Add `ptid' argument. Change return type to
9398 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9399 that exit from the process table.
9400 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9401 Adjust.
9402 (mark_lwp_dead): New.
9403 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9404 stopping all threads, mark its main lwp as dead.
9405 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9406 ptids.
9407 (fetch_register, usr_store_inferior_registers)
9408 (regsets_fetch_inferior_registers)
9409 (regsets_store_inferior_registers, linux_read_memory)
9410 (linux_write_memory): Inline `inferior_pid'.
9411 (linux_look_up_symbols): Adjust to use per-process
9412 `thread_db_active'.
9413 (linux_request_interrupt): Adjust to use ptids.
9414 (linux_read_auxv): Inline `inferior_pid'.
9415 (initialize_low): Don't reference thread_db_active.
9416 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9417 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9418 (ps_getpid): Return the pid of the current inferior.
9419 * thread-db.c (proc_handle, thread_agent): Delete.
9420 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9421 per-process data.
9422 (find_one_thread): Change argument type to ptid_t. Adjust to
9423 per-process data.
9424 (maybe_attach_thread): Adjust to per-process data and ptids.
9425 (thread_db_find_new_threads): Ditto.
9426 (thread_db_init): Ditto.
9427 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9428 processes table. Adjust to use ptids.
9429 (spu_kill, spu_detach): Adjust interface. Remove process from
9430 processes table.
9431 (spu_join, spu_thread_alive): Adjust interface.
9432 (spu_wait): Adjust interface. Remove process from processes
9433 table. Adjust to use ptids.
9434 * win32-low.c (current_inferior_tid): Delete.
9435 (current_inferior_ptid): New.
9436 (debug_event_ptid): New.
9437 (thread_rec): Take a ptid. Adjust.
9438 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9439 (child_delete_thread): Ditto.
9440 (do_initial_child_stuff): Add `attached' argument. Add process to
9441 processes table.
9442 (child_fetch_inferior_registers, child_store_inferior_registers):
9443 Adjust.
9444 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9445 (win32_attach): Pass 1 to do_initial_child_stuff.
9446 (win32_kill): Adjust interface. Remove process from processes
9447 table.
9448 (win32_detach): Ditto.
9449 (win32_join): Adjust interface.
9450 (win32_thread_alive): Take a ptid.
9451 (win32_resume): Adjust to use ptids.
9452 (get_child_debug_event): Ditto.
9453 (win32_wait): Adjust interface. Remove exiting process from
9454 processes table.
9455
9456 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9457
9458 Non-stop mode support.
9459
9460 * server.h (non_stop): Declare.
9461 (gdb_client_data, handler_func): Declare.
9462 (delete_file_handler, add_file_handler, start_event_loop):
9463 Declare.
9464 (handle_serial_event, handle_target_event, push_event)
9465 (putpkt_notif): Declare.
9466 * target.h (enum resume_kind): New.
9467 (struct thread_resume): Replace `step' field by `kind' field.
9468 (TARGET_WNOHANG): Define.
9469 (struct target_ops) <wait>: Add `options' argument.
9470 <supports_non_stop, async, start_non_stop>: New fields.
9471 (target_supports_non_stop, target_async): New.
9472 (start_non_stop): Declare.
9473 (mywait): Add `options' argument.
9474 * target.c (mywait): Add `options' argument. Print child exit
9475 notifications here.
9476 (start_non_stop): New.
9477 * server.c (non_stop, own_buf, mem_buf): New globals.
9478 (struct vstop_notif): New.
9479 (notif_queue): New global.
9480 (queue_stop_reply, push_event, discard_queued_stop_replies)
9481 (send_next_stop_reply): New.
9482 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9483 interface changes.
9484 (attach_inferior): In non-stop mode, don't wait for the target
9485 here.
9486 (handle_general_set): Handle QNonStop.
9487 (handle_query): When handling qC, return the current general
9488 thread, instead of the first thread of the list.
9489 (handle_query): If the backend supports non-stop mode, include
9490 QNonStop+ in the qSupported query response.
9491 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9492 and non-stop mode.
9493 (handle_v_attach, handle_v_run): Handle non-stop mode.
9494 (handle_v_stopped): New.
9495 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9496 (myresume): Adjust to use resume_kind. Handle non-stop.
9497 (queue_stop_reply_callback): New.
9498 (handle_status): Handle non-stop mode.
9499 (main): Clear non_stop flag on reconnection. Use the event-loop.
9500 Refactor serial protocol handling from here ...
9501 (process_serial_event): ... to this new function. When GDB
9502 selects any thread, select one here. In non-stop mode, wait until
9503 GDB acks all pending events before exiting.
9504 (handle_serial_event, handle_target_event): New.
9505 * remote-utils.c (remote_open): Install remote_desc in the event
9506 loop.
9507 (remote_close): Remove remote_desc from the event loop.
9508 (putpkt_binary): Rename to...
9509 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9510 (putpkt_binary): New as wrapper around putpkt_binary_1.
9511 (putpkt_notif): New.
9512 (prepare_resume_reply): In non-stop mode, don't change the
9513 general_thread.
9514 * event-loop.c: New.
9515 * Makefile.in (OBJ): Add event-loop.o.
9516 (event-loop.o): New rule.
9517
9518 * linux-low.h (pid_of): Moved here.
9519 (lwpid_of): New.
9520 (get_lwp_thread): Use lwpid_of.
9521 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9522 * linux-low.c (pid_of): Delete.
9523 (inferior_pid): Use lwpid_of.
9524 (linux_event_pipe): New.
9525 (target_is_async_p): New.
9526 (delete_lwp): New.
9527 (handle_extended_wait): Use lwpid_of.
9528 (add_lwp): Don't set lwpid field.
9529 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9530 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9531 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9532 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9533 first. Adjust to linux_wait_for_event interface changes. Use
9534 lwpid_of.
9535 (linux_detach): Don't delete the main lwp here.
9536 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9537 (status_pending_p): Don't consider explicitly suspended lwps.
9538 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9539 pointer. Add OPTIONS argument. Change return type to int. Use
9540 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9541 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9542 pointer. Add status pointer argument. Return a pid instead of a
9543 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9544 changes. In non-stop mode, don't switch to a random thread.
9545 (linux_wait): Rename to...
9546 (linux_wait_1): ... this. Add target_options argument, and handle
9547 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9548 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9549 clean exit and signal exit code. Don't stop all threads in
9550 non-stop mode. In all-stop mode, only stop all threads when
9551 reporting a stop to GDB. Handle explicit thread stop requests.
9552 (async_file_flush, async_file_mark): New.
9553 (linux_wait): New.
9554 (send_sigstop): Use lwpid_of.
9555 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9556 interface changes. In non-stop mode, don't switch to a random
9557 thread.
9558 (linux_resume_one_lwp): Use lwpid_of.
9559 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9560 (linux_resume_one_thread): ... this. Handle resume_stop. In
9561 non-stop mode, don't look for pending flag in all threads.
9562 (resume_status_pending_p): Don't consider explicitly suspended
9563 threads.
9564 (my_waitpid): Reimplement. Emulate __WALL.
9565 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9566 Use lwpid_of.
9567 (sigchld_handler, linux_supports_non_stop, linux_async)
9568 (linux_start_non_stop): New.
9569 (linux_target_ops): Register linux_supports_non_stop, linux_async
9570 and linux_start_non_stop.
9571 (initialize_low): Install SIGCHLD handler.
9572 * thread-db.c (thread_db_create_event, find_one_thread)
9573 (thread_db_get_tls_address): Use lwpid_of.
9574 * win32-low.c (win32_detach): Adjust to use resume_kind.
9575 (win32_wait): Add `options' argument.
9576 * spu-low.c (spu_resume): Adjust to use resume_kind.
9577 (spu_wait): Add `options' argument.
9578
9579 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9580
9581 Decouple target code from remote protocol.
9582
9583 * target.h (enum target_waitkind): New.
9584 (struct target_waitstatus): New.
9585 (struct target_ops) <wait>: Return an unsigned long. Take a
9586 target_waitstatus pointer instead of a char pointer.
9587 (mywait): Likewise.
9588 * target.c (mywait): Change prototype to return an unsigned long.
9589 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9590 * server.h (thread_from_wait, old_thread_from_wait): Delete
9591 declarations.
9592 (prepare_resume_reply): Change prototype to take a
9593 target_waitstatus.
9594 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9595 (last_status, last_ptid): New.
9596 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9597 pid instead of a signal.
9598 (attach_inferior): Remove "status" and "signal" parameters.
9599 Adjust.
9600 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9601 not as an address.
9602 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9603 (handle_v_requests, myresume): Remove "status" and "signal"
9604 parameters. Adjust.
9605 (handle_status): New.
9606 (main): Delete local `status'. Adjust.
9607 * remote-utils.c: Include target.h.
9608 (prepare_resume_reply): Change prototype to take a
9609 target_waitstatus. Adjust.
9610
9611 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9612 interface.
9613 * spu-low.c (spu_wait): Adjust.
9614 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9615 Delete.
9616 (win32_wait): Adjust.
9617
9618 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9619
9620 * target.h (struct thread_resume): Delete leave_stopped member.
9621 (struct target_ops): Add a `n' argument to the `resume' callback.
9622 * server.c (start_inferior): Adjust.
9623 (handle_v_cont, myresume): Adjust.
9624 * linux-low.c (check_removed_breakpoint): Adjust to resume
9625 interface change, and to removed leave_stopped field.
9626 (resume_ptr): Delete.
9627 (struct thread_resume_array): New.
9628 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9629 resume interface change.
9630 (linux_continue_one_thread, linux_queue_one_thread)
9631 (resume_status_pending_p): Check if the resume field is NULL
9632 instead of checking the leave_stopped member.
9633 (linux_resume): Adjust to the target resume interface change.
9634 * spu-low.c (spu_resume): Adjust to the target resume interface
9635 change.
9636 * win32-low.c (win32_detach, win32_resume): Ditto.
9637
9638 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9639
9640 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9641 flag.
9642 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9643 pending.
9644 (linux_continue_one_thread): Only preserve the stepping flag if
9645 there's a pending breakpoint.
9646
9647 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9648
9649 * server.c (main): After the inferior having exited, call
9650 remote_close before exiting gdbserver.
9651
9652 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9653
9654 Fix size of FPSCR in Power 7 processors.
9655 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9656 (PPC_FEATURE_HAS_DFP): New #define.
9657 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9658 size of the FPSCR.
9659
9660 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9661
9662 * server.c (handle_query) Whitespace and formatting.
9663
9664 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9665
9666 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9667 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9668 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9669 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9670 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9671 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9672 Makefile.in, configure.ac: Fix whitespace throughout.
9673 * configure: Regenerate.
9674
9675 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9676
9677 * inferiors.c (find_inferior): Make it safe for the callback
9678 function to delete the currently iterated inferior.
9679
9680 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9681
9682 * Makefile.in (linuw_low_h): Move higher.
9683 (thread-db.o): Depend on $(linux_low_h).
9684
9685 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9686
9687 Rename "process" to "lwp" throughout.
9688
9689 * linux-low.c (all_processes): Rename to...
9690 (all_lwps): ... this.
9691 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9692 (add_process): Rename to ...
9693 (add_lwp): ... this. Adjust.
9694 (linux_create_inferior): Adjust.
9695 (linux_attach_lwp): Adjust.
9696 (linux_attach): Adjust.
9697 (linux_kill_one_process): Rename to ...
9698 (linux_kill_one_lwp): ... this. Adjust.
9699 (linux_kill): Adjust.
9700 (linux_detach_one_process): Rename to ...
9701 (linux_detach_one_lwp): ... this. Adjust.
9702 (linux_detach): Adjust.
9703 (check_removed_breakpoint): Adjust.
9704 (status_pending_p): Adjust.
9705 (linux_wait_for_process): Rename to ...
9706 (linux_wait_for_lwp): ... this. Adjust.
9707 (linux_wait_for_event): Adjust.
9708 (send_sigstop): Adjust.
9709 (wait_for_sigstop): Adjust.
9710 (stop_all_processes): Rename to ...
9711 (stop_all_lwps): ... this.
9712 (linux_resume_one_process): Rename to ...
9713 (linux_resume_one_lwp): ... this. Adjust.
9714 (linux_set_resume_request, linux_continue_one_thread)
9715 (linux_queue_one_thread, resume_status_pending_p)
9716 (usr_store_inferior_registers, regsets_store_inferior_registers)
9717 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9718 Adjust.
9719 * linux-low.h (get_process): Rename to ...
9720 (get_lwp): ... this. Adjust.
9721 (get_thread_process): Rename to ...
9722 (get_thread_lwp): ... this. Adjust.
9723 (get_process_thread): Rename to ...
9724 (get_lwp_thread): ... this. Adjust.
9725 (struct process_info): Rename to ...
9726 (struct lwp_info): ... this.
9727 (all_processes): Rename to ...
9728 (all_lwps): ... this.
9729 * proc-service.c (ps_lgetregs): Adjust.
9730 * thread-db.c (thread_db_create_event, find_one_thread)
9731 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9732
9733 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9734
9735 * server.c (handle_query): Handle "qAttached".
9736
9737 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9738
9739 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9740 GPLv3, update license URL.
9741
9742 2009-03-01 Doug Evans <dje@google.com>
9743
9744 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9745 (server_h): Add gdb_signals.h.
9746 (signals.o): Update.
9747 * server.h (target_signal_from_host,target_signal_to_host_p)
9748 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9749
9750 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9751
9752 * remote-utils.c (getpkt): Also generate remote-debug
9753 information if noack_mode is set.
9754
9755 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9756
9757 * server.c (handle_query): Report qXfer:siginfo:read and
9758 qXfer:siginfo:write as supported and handle them.
9759 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9760 * linux-low.c (linux_xfer_siginfo): New.
9761 (linux_target_ops): Set it.
9762
9763 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9764
9765 * server.c (gdbserver_usage): Mention --remote-debug.
9766 (main): Accept '--remote-debug' switch.
9767
9768 2009-01-18 Doug Evans <dje@google.com>
9769
9770 * regcache.c (new_register_cache): No need to check result of xcalloc.
9771 * server.c (handle_search_memory): Back out calls to xmalloc,
9772 result is checked and error is returned to user upon failure.
9773 (handle_query): Ditto. Add more checks for result of malloc.
9774 (handle_v_cont): Check result of malloc, report error back to
9775 user upon failure.
9776 (handle_v_run): Ditto. Call freeargv.
9777 * server.h (freeargv): Declare.
9778 * utils.c (freeargv): New fn.
9779
9780 2009-01-15 Doug Evans <dje@google.com>
9781
9782 * gdbreplay.c (perror_with_name): Make arg const char *.
9783 * server.h (target_signal_to_name): Make return type const char *.
9784 * thread-db.c (thread_db_err_str): Make return type const char *.
9785 * utils.c (perror_with_name): Make arg const char *.
9786
9787 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9788
9789 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9790 when handling a EXIT_PROCESS_DEBUG_EVENT.
9791
9792 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9793
9794 * gdbreplay.c (gdbreplay_version): Update copyright year.
9795 * server.c (gdbserver_version): Likewise.
9796
9797 2009-01-05 Doug Evans <dje@google.com>
9798
9799 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9800 (handle_extended_wait): Improve comment.
9801
9802 2008-12-13 Doug Evans <dje@google.com>
9803
9804 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9805 * server.h (ATTR_MALLOC): New macro.
9806 (xmalloc,xcalloc,xstrdup): Declare.
9807 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9808 * inferiors.c: Ditto.
9809 * linux-low.c: Ditto.
9810 * mem-break.c: Ditto.
9811 * regcache.c: Ditto.
9812 * remote-utils.c: Ditto.
9813 * server.c: Ditto.
9814 * target.c: Ditto.
9815 * win32-low.c: Ditto.
9816
9817 2008-12-12 Doug Evans <dje@google.com>
9818
9819 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9820 in debugging printf.
9821
9822 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9823
9824 2008-12-09 Doug Evans <dje@google.com>
9825
9826 * linux-low.h (struct process_info): Delete member tid, unused.
9827 * thread-db.c (find_one_thread): Update.
9828 (maybe_attach_thread): Update.
9829
9830 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9831
9832 * target.h (struct target_ops): Add qxfer_osdata member.
9833 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9834 and dirent.h.
9835 (linux_qxfer_osdata): New functions.
9836 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9837 callback.
9838 * server.c (handle_query): Handle "qXfer:osdata:read:".
9839 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9840 (buffer_xml_printf): New functions.
9841 * server.h (struct buffer): New.
9842 (buffer_grow_str, buffer_grow_str0): New macros.
9843 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9844 (buffer_xml_printf): Declare.
9845
9846 2008-11-24 Doug Evans <dje@google.com>
9847
9848 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9849
9850 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9851
9852 * server.c (handle_v_run): Always use the supplied argument list.
9853
9854 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9855
9856 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9857 (xtensa_regmap_table): Add entry for scompare1.
9858
9859 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9860
9861 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9862 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9863 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9864 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9865 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9866 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9867 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9868 XML target descriptions.
9869 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9870 when inferior is running on an ISA 2.05 or later processor. Add
9871 special case to return offset for full 64-bit slot of FPSCR when
9872 in 32-bits.
9873
9874 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9875
9876 * Makefile.in (SFILES, clean): Added sparc64 files.
9877 (reg-sparc64.o, reg-sparc64.c): New.
9878 * configure.srv (sparc*-*-linux*): New configuration.
9879 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9880 syscall arguments for SPARC.
9881 (regsets_store_inferior_registers): Likewise.
9882 * linux-sparc-low.c: New file.
9883
9884 2008-10-21 Doug Evans <dje@google.com>
9885
9886 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9887 (READLINE_DIR,READLINE_DEP): Delete.
9888 (INTERNAL_CFLAGS): Update.
9889 (LINTFLAGS): Update.
9890
9891 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9892
9893 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9894 whole argv from the last run, not just argv[0].
9895
9896 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9897
9898 * regcache.c (new_register_cache): Return NULL if the register
9899 cache size isn't known yet.
9900 (free_register_cache): Avoid dereferencing a NULL regcache.
9901
9902 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9903
9904 * configure.srv: Merge MIPS and MIPS64.
9905
9906 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9907
9908 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9909
9910 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9911
9912 * Makefile.in: Add required vsx dependencies.
9913
9914 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9915 Declare init_registers_powerpc_vsx32l.
9916 Declare init_registers_powerpc_vsx64l.
9917 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9918 (ppc_arch_setup): Check for VSX in hwcap.
9919 (ppc_fill_vsxregset): New function.
9920 (ppc_store_vsxregset): New function.
9921 Add new VSX entry in regset_info target_regsets.
9922
9923 * configure.srv: Add new VSX dependencies.
9924
9925 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9926
9927 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9928 (remote_open): Set or clear transport_is_reliable.
9929 (putpkt_binary): Don't expect acks in noack mode.
9930 (getpkt): Don't send ack/nac in noack mode.
9931 * server.c (handle_general_set): Handle QStartNoAckMode.
9932 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9933 qSupported.
9934 (main): Reset noack_mode on every connection.
9935 * server.h (noack_mode): Declare.
9936
9937 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9938
9939 * Makefile.in (GDBREPLAY_OBS): New variable.
9940 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9941
9942 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9943 Daniel Jacobowitz <dan@codesourcery.com>
9944
9945 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9946 (usr_store_inferior_registers): Likewise.
9947 (regsets_store_inferior_registers): Likewise.
9948
9949 2008-07-31 Rolf Jansen <rj@surtec.com>
9950 Pedro Alves <pedro@codesourcery.com>
9951
9952 * configure.ac: Check for memmem declaration.
9953 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9954 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9955 (disable_packet_qfThreadInfo): Unconditionally compile.
9956 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9957 * configure, config.in: Regenerate.
9958
9959 2008-07-28 Doug Kwan <dougkwan@google.com>
9960
9961 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9962 (linux_write_memory): Remove declaration of errno.
9963
9964 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9965
9966 * linux-low.c (handle_extended_wait): Do not use "status"
9967 variable uninitialized.
9968
9969 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9970
9971 * server.c (handle_v_attach): Inhibit reporting dll changes.
9972
9973 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9974
9975 * remote-utils.c (prepare_resume_reply): If requested, don't
9976 output "thread:TID" in the T stop reply.
9977
9978 * server.c (disable_packet_vCont, disable_packet_Tthread)
9979 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9980 (handle_query): If requested, disable support for qC, qfThreadInfo
9981 and qsThreadInfo.
9982 (handle_v_requests): If requested, disable support for vCont.
9983 (gdbserver_show_disableable): New.
9984 (main): Handle --disable-packet and --disable-packet=LIST.
9985
9986 * server.h (disable_packet_vCont, disable_packet_Tthread)
9987 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9988
9989 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9990
9991 * server.c (gdbserver_usage): Mention --version.
9992
9993 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9994
9995 * Makefile.in (gdbreplay.o): New rule.
9996
9997 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9998
9999 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10000 message, not gdbserver.
10001
10002 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10003 Nathan Sidwell <nathan@codesourcery.com>
10004 Joseph Myers <joseph@codesourcery.com>
10005
10006 * acinclude.m4: Include ../../config/acx.m4.
10007 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10008 * configure, config.in: Regenerate.
10009 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10010 * server.c (gdbserver_version): Print PKGVERSION.
10011 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10012 (main): Adjust gdbserver_usage calls.
10013 * gdbreplay.c (version, host_name): Add declarations.
10014 (gdbreplay_version, gdbreplay_usage): New.
10015 (main): Accept --version and --help options.
10016
10017 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10018
10019 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10020 (arm_breakpoint_at): Handle Thumb.
10021 (the_low_target): Add comment.
10022
10023 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10024
10025 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10026
10027 2008-05-09 Doug Evans <dje@google.com>
10028
10029 * server.h (decode_search_memory_packet): Declare.
10030 * remote-utils.c (decode_search_memory_packet): New fn.
10031 * server.c (handle_search_memory_1): New fn.
10032 (handle_search_memory): New fn.
10033 (handle_query): Process qSearch:memory packets.
10034
10035 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10036
10037 * regcache.c (registers_length): Remove.
10038 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10039 full register packet.
10040 * regcache.h (registers_length): Remove prototype.
10041 * server.h (PBUFSIZ): Define to 16384.
10042
10043 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10044
10045 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10046 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10047 powerpc-64l.o, and powerpc-altivec64l.o.
10048 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10049 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10050 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10051 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10052 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10053 to srv_xmlfiles.
10054
10055 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10056 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10057 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10058 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10059 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10060 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10061 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10062 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10063 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10064 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10065 (clean): Update.
10066
10067 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10068 (init_registers_powerpc_32l): ... this new prototype.
10069 (init_registers_powerpc_32): Remove, replace by ...
10070 (init_registers_powerpc_altivec32l): ... this new prototype.
10071 (init_registers_powerpc_e500): Remove, replace by ...
10072 (init_registers_powerpc_e500l): ... this new prototype.
10073 (init_registers_ppc64): Remove, replace by ...
10074 (init_registers_powerpc_64l): ... this new prototype.
10075 (init_registers_powerpc_64): Remove, replace by ...
10076 (init_registers_powerpc_altivec64l): ... this new prototype.
10077 (ppc_num_regs): Set to 73.
10078 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10079 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10080 (ppc_cannot_store_register): Handle orig_r3 and trap.
10081 (ppc_arch_setup): Update init_registers_... calls.
10082 (ppc_fill_gregset): Handle orig_r3 and trap.
10083
10084 * inferiors.c (clear_inferiors): Reset current_inferior.
10085
10086 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10087
10088 * acinclude.m4: Add override.m4.
10089 * configure: Regenerate.
10090
10091 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10092
10093 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10094 initial call to init_register_ppc64.
10095
10096 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10097
10098 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10099 single powerpc*-*-linux* case.
10100 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10101
10102 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10103
10104 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10105 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10106 from reg_xmlfiles.
10107 * linux-ppc-low.c: Include <elf.h>.
10108 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10109 (ppc_hwcap): New global variable.
10110 (ppc_regmap): Remove __SPE__ #ifdef sections.
10111 (ppc_regmap_e500): New global variable.
10112 (ppc_cannot_store_register): Update __SPE__ special case.
10113 (ppc_get_hwcap): New function.
10114 (ppc_arch_setup): Use it to determine whether inferior supports
10115 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10116 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10117 Do not access registers if target does not support AltiVec.
10118 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10119 Do not access registers if target does not support SPE.
10120 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10121
10122 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10123
10124 * linux-low.c (disabled_regsets, num_regsets): New.
10125 (use_regsets_p): Delete.
10126 (linux_wait_for_process): Clear disabled_regsets.
10127 (regsets_fetch_inferior_registers): Check and set it.
10128 (regsets_store_inferior_registers): Likewise.
10129 (linux_fetch_registers, linux_store_registers): Do not use
10130 use_regsets_p.
10131 (initialize_low): Allocate disabled_regsets.
10132
10133 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10134
10135 * Makefile.in (LIBOBJS): New.
10136 (OBS): Use LIBOBJS.
10137 (memmem.o): New rule.
10138 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10139 * configure: Regenerated.
10140
10141 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10142
10143 * server.c (handle_query): Never return "unsupported" for
10144 qXfer:features:read queries.
10145
10146 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10147
10148 * server.c (get_features_xml): Fix inverted condition.
10149 (handle_query): Always support qXfer:feature:read.
10150
10151 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10152
10153 * server.c (wrapper_argv): New.
10154 (start_inferior): Handle wrapper_argv. If set, expect an extra
10155 trap.
10156 (gdbserver_usage): Document --wrapper.
10157 (main): Parse --wrapper.
10158
10159 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10160
10161 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10162 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10163 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10164 (ppc_set_pc): Likewise.
10165 (ppc_arch_setup): New function.
10166 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10167 of collect_register.
10168 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10169
10170 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10171
10172 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10173 instead of linux-ppc64-low.o.
10174 * linux-ppc64-low.c: Remove file.
10175 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10176 (linux-ppc64-low.o): Remove rule.
10177
10178 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10179 (init_registers_powerpc_64): Likewise.
10180 (ppc_regmap): Conditionally define depending on __powerpc64__.
10181 (ppc_cannot_store_register): Do not special-case "fpscr" when
10182 compiled on __powerpc64__.
10183 (ppc_collect_ptrace_register): New function.
10184 (ppc_supply_ptrace_register): New function.
10185 (ppc_breakpoint): Change type to "unsigned int".
10186 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10187 (the_low_target): Conditionally provide initializers for the
10188 arch_setup member depending on __powerpc64__. Install
10189 collect_ptrace_register and supply_ptrace_register members.
10190
10191 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10192
10193 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10194 * server.c (gdbserver_xmltarget): Define.
10195 (get_features_xml): Use it to replace "target.xml" and arch_string.
10196
10197 * configure.srv: Remove srv_xmltarget. Add XML files that were
10198 mentioned there to srv_xmlfiles instead. Remove conditional tests
10199 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10200 srv_xmlfiles and srv_regobj to include all possible choices.
10201 * configure.ac (srv_xmltarget): Remove.
10202 (srv_xmlfiles): Do not add "target.xml".
10203 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10204 checks for supplementary target information.
10205 * configure: Regenerate.
10206 * Makefile.in (XML_TARGET): Remove.
10207 (target.xml): Remove rule.
10208 (clean): Do not clean up target.xml.
10209 (.PRECIOUS): Do not mention target.xml.
10210
10211 * target.h (struct target_ops): Remove arch_string member.
10212 * linux-low.c (linux_arch_string): Remove.
10213 (linux_target_ops): Remove arch_string initializer.
10214 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10215 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10216 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10217 * spu-low.c (spu_arch_string): Remove.
10218 (spu_target_ops): Remove arch_string initializer.
10219 * win32-low.c (win32_arch_string): Remove.
10220 (win32_target_ops): Remove arch_string initializer.
10221 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10222 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10223 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10224
10225 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10226
10227 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10228 by collect_ptrace_register and supply_ptrace_register hooks.
10229 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10230 instead of checking for the_low_target.left_pad_xfer.
10231 (usr_store_inferior_registers): Use collect_ptrace_register callback
10232 instead of checking for the_low_target.left_pad_xfer.
10233
10234 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10235 (s390_supply_ptrace_register): Likewise.
10236 (s390_fill_gregset): Call s390_collect_ptrace_register.
10237 (the_low_target): Update.
10238
10239 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10240 (ppc_supply_ptrace_register): Likewise.
10241 (the_low_target): Update.
10242
10243 * linux-i386-low.c (the_low_target): Update.
10244 * linux-x86-64-low.c (the_low_target): Update.
10245
10246 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10247
10248 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10249 reg-s390.o and reg-s390x.o.
10250
10251 * linux-low.c (new_inferior): New global variable.
10252 (linux_create_inferior, linux_attach): Set it.
10253 (linux_wait_for_process): Call the_low_target.arch_setup after the
10254 target has stopped for the first time.
10255 (initialize_low): Do not call the_low_target.arch_setup.
10256
10257 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10258 (s390_set_pc): Likewise.
10259 (s390_arch_setup): New function.
10260 (the_low_target): Use s390_arch_setup as arch_setup routine.
10261
10262 * regcache.c (realloc_register_cache): New function.
10263 (set_register_cache): Call it for each existing regcache.
10264
10265 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10266
10267 * server.h (init_registers): Remove prototype.
10268
10269 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10270 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10271 instead of init_registers ().
10272 * linux-arm-low.c (init_registers_arm): Add prototype.
10273 (init_registers_arm_with_iwmmxt): Likewise.
10274 (the_low_target): Add initializer for arch_setup field.
10275 * linux-cris-low.c (init_registers_cris): Add prototype.
10276 (the_low_target): Add initializer for arch_setup field.
10277 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10278 (the_low_target): Add initializer for arch_setup field.
10279 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10280 (the_low_target): Add initializer for arch_setup field.
10281 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10282 (the_low_target): Add initializer for arch_setup field.
10283 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10284 (the_low_target): Add initializer for arch_setup field.
10285 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10286 (the_low_target): Add initializer for arch_setup field.
10287 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10288 (init_registers_mips64_linux): Likewise.
10289 (the_low_target): Add initializer for arch_setup field.
10290 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10291 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10292 (the_low_target): Add initializer for arch_setup field.
10293 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10294 (init_registers_powerpc_64): Likewise.
10295 (the_low_target): Add initializer for arch_setup field.
10296 * linux-s390-low.c (init_registers_s390): Add prototype.
10297 (init_registers_s390x): Likewise.
10298 (the_low_target): Add initializer for arch_setup field.
10299 * linux-sh-low.c (init_registers_sh): Add prototype.
10300 (the_low_target): Add initializer for arch_setup field.
10301 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10302 (the_low_target): Add initializer for arch_setup field.
10303 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10304 (the_low_target): Add initializer for arch_setup field.
10305
10306 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10307 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10308 instead of init_registers ().
10309 * win32-arm-low.c (init_registers_arm): Add prototype.
10310 (the_low_target): Add initializer for arch_setup field.
10311 * win32-i386-low.c (init_registers_i386): Add prototype.
10312 (the_low_target): Add initializer for arch_setup field.
10313
10314 * spu-low.c (init_registers_spu): Add prototype.
10315 (initialize_low): Call initialie_registers_spu () instead of
10316 initialize_registers ().
10317
10318 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10319
10320 * server.c (handle_v_requests): When handling the vRun and vAttach
10321 packets, if already debugging a process, don't kill it. Return an
10322 error instead.
10323
10324 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10325
10326 * server.c (handle_query): Correct length check.
10327
10328 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10329
10330 * win32-low.c (do_initial_child_stuff): Add process handle
10331 parameter. Set current_process_handle and current_process_id from the
10332 parameters. Clear globals.
10333 (win32_create_inferior): Don't set current_process_handle and
10334 current_process_id here. Instead pass them on the call to
10335 do_initial_child_stuff.
10336 (win32_attach): Likewise.
10337 (win32_clear_inferiors): New.
10338 (win32_kill): Don't close the current process handle or the
10339 current thread handle here. Instead call win32_clear_inferiors.
10340 (win32_detach): Don't open a new handle to the process. Call
10341 win32_clear_inferiors.
10342 (win32_join): Don't rely on current_process_handle; open a new
10343 handle using the process id.
10344 (win32_wait): Call win32_clear_inferiors when the inferior process
10345 has exited.
10346
10347 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10348
10349 * server.c (monitor_show_help): Add "exit".
10350
10351 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10352
10353 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10354 (clean): Add reg-xtensa.c.
10355 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10356 * configure.srv (xtensa*-*-linux*) New target.
10357 * linux-xtensa-low.c: New.
10358 * xtensa-xtregs.c: New.
10359
10360 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10361
10362 * hostio.c: Don't include errno.h.
10363 (errno_to_fileio_errno): Move to hostio-errno.
10364 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10365 error number outputting to the target->hostio_last_error callback.
10366 (hostio_packet_error): Use FILEIO_EINVAL directly.
10367 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10368 calls to hostio_error.
10369 * hostio-errno.c: New.
10370 * server.h (hostio_last_error_from_errno): Declare.
10371 * target.h (target_ops): Add hostio_last_error member.
10372 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10373 as hostio_last_error handler.
10374 * spu-low.c (spu_target_ops): Likewise.
10375 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10376 (wince_hostio_last_error): New functions.
10377 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10378 as hostio_last_error handler.
10379 (win32_target_ops) [!_WIN32_WCE]: Register
10380 hostio_last_error_from_errno as hostio_last_error handler.
10381 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10382 (hostio-errno.o): New rule.
10383 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10384 * configure.srv (srv_hostio_err_objs): New variable. Default to
10385 hostio-errno.o.
10386 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10387 * configure: Regenerate.
10388
10389 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10390
10391 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10392 (linux_kill, linux_detach): Clean up the process list.
10393 * remote-utils.c (remote_open): Improve port number parsing.
10394 (putpkt_binary, input_interrupt): Only send interrupts if the target
10395 is running.
10396 * server.c (extended_protocol): Make static.
10397 (attached): Define earlier.
10398 (exit_requested, response_needed, program_argv): New variables.
10399 (target_running): New.
10400 (start_inferior): Clear attached here.
10401 (attach_inferior): Set attached here.
10402 (require_running): Define.
10403 (handle_query): Use require_running and target_running. Implement
10404 "monitor exit".
10405 (handle_v_attach, handle_v_run): New.
10406 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10407 (gdbserver_usage): Update.
10408 (main): Redo argument parsing. Handle --debug and --multi. Handle
10409 --attach along with other options or after the port. Save
10410 program_argv. Support no initial program. Resynchronize
10411 communication with GDB after an error. Handle "monitor exit".
10412 Use require_running and target_running. Always allow the extended
10413 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10414 restart in extended mode.
10415 * README: Refer to the GDB manual. Update --attach usage.
10416
10417 2007-12-20 Andreas Schwab <schwab@suse.de>
10418
10419 * linux-low.c (STACK_SIZE): Define.
10420 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10421 (linux_test_for_tracefork): Likewise.
10422
10423 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10424
10425 * linux-low.c (linux_wait_for_event): Update messages. Do not
10426 reinsert auto-delete breakpoints.
10427 * mem-break.c (struct breakpoint): Change return type of handler to
10428 int.
10429 (set_breakpoint_at): Update handler type.
10430 (reinsert_breakpoint_handler): Return 1 instead of calling
10431 delete_breakpoint.
10432 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10433 setting a new one.
10434 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10435 * mem-break.h (set_breakpoint_at): Update handler type.
10436 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10437 * win32-low.c (auto_delete_breakpoint): New.
10438 (get_child_debug_event): Use it.
10439
10440 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10441
10442 * configure.ac: Check for pread and pwrite.
10443 * hostio.c (handle_pread): Fall back to lseek and read.
10444 (handle_pwrite): Fall back to lseek and write.
10445 * config.in, configure: Regenerated.
10446
10447 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10448
10449 * server.c (myresume): Add own_buf argument.
10450 (main): Update calls.
10451
10452 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10453
10454 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10455 * remote-utils.c (remote_open): Do not call disable_async_io.
10456 (block_async_io): Delete.
10457 (unblock_async_io): Make static.
10458 (initialize_async_io): New.
10459 * server.c (handle_v_cont): Handle async I/O here.
10460 (myresume): Likewise. Move other common resume tasks here...
10461 (main): ... from here. Call initialize_async_io. Disable async
10462 I/O before the main loop.
10463 * server.h (initialize_async_io): Declare.
10464 (block_async_io, unblock_async_io): Delete prototypes.
10465 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10466
10467 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10468
10469 * remote-utils.c (readchar): Allow binary data in received messages.
10470
10471 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10472
10473 * win32-low.c (attaching): New global.
10474 (win32_create_inferior): Clear the `attaching' global.
10475 (win32_attach): Set the `attaching' global.
10476 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10477 attaching. Only set a breakpoint at the entry point if not
10478 attaching.
10479
10480 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10481
10482 * server.c (main): Don't report dll events on the initial
10483 connection on attaches.
10484
10485 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10486
10487 * server.c (main): Relax numerical bases supported for the pid of
10488 the --attach command line argument.
10489
10490 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10491
10492 * win32-low.c (win32_attach): Call OpenProcess before
10493 DebugActiveProcess, not after. Add last error output to error
10494 call.
10495
10496 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10497
10498 * win32-low.c (win32_get_thread_context)
10499 (win32_set_thread_context): New functions.
10500 (thread_rec): Use win32_get_thread_context.
10501 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10502 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10503 field.
10504
10505 2007-12-03 Leo Zayas
10506 Pedro Alves <pedro_alves@portugalmail.pt>
10507
10508 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10509 global variables.
10510 (child_add_thread): Minor cleanup.
10511 (child_continue): Resume artificially suspended threads before
10512 calling ContinueDebugEvent.
10513 (suspend_one_thread): New.
10514 (fake_breakpoint_event): New.
10515 (get_child_debug_event): Change return type to int. Check here if
10516 gdb sent an interrupt request. If a soft interrupt was requested,
10517 fake a breakpoint event. Return 0 if there is no event to handle,
10518 and 1 otherwise.
10519 (win32_wait): Don't check here if gdb sent an interrupt request.
10520 Ensure there is a valid event to handle.
10521 (win32_request_interrupt): Add soft interruption method as last
10522 resort.
10523
10524 2007-12-03 Leo Zayas
10525 Pedro Alves <pedro_alves@portugalmail.pt>
10526
10527 * win32-low.h (win32_thread_info): Add descriptions to the
10528 structure members. Replace `suspend_count' counter by a
10529 `suspended' flag.
10530 * win32-low.c (thread_rec): Update condition of when to get the
10531 context from the inferior. Rely on ContextFlags being set if it
10532 has already been retrieved. Only suspend the inferior thread if
10533 we haven't already. Warn if that fails.
10534 (continue_one_thread): s/suspend_count/suspended/. Only call
10535 ResumeThread once. Warn if that fails.
10536
10537 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10538
10539 * win32-low.c (win32_wait): Don't read from the inferior when it
10540 has already exited.
10541
10542 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10543
10544 * Makefile.in (win32_low_h): New variable.
10545 (win32-low.o): Add dependency on $(win32_low_h).
10546 (win32-arm-low.o, win32-i386-low.o): New rules.
10547
10548 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10549
10550 * hostio.c: Correct copyright year.
10551
10552 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10553
10554 * Makefile.in (OBS): Add hostio.o.
10555 (hostio.o): New rule.
10556 * server.h (handle_vFile): Declare.
10557 * hostio.c: New file.
10558 * server.c (handle_v_requests): Take packet_len and new_packet_len
10559 for binary packets. Call handle_vFile.
10560 (main): Update call to handle_v_requests.
10561
10562 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10563
10564 * linux-low.c: Include <sched.h>.
10565
10566 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10567
10568 * linux-low.c (linux_tracefork_grandchild): New.
10569 (linux_tracefork_child): Use clone.
10570 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10571
10572 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10573
10574 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10575
10576 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10577
10578 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10579
10580 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10581
10582 * inferiors.c (change_inferior_id): Delete.
10583 (add_pid_to_list, pull_pid_from_list): New.
10584 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10585 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10586 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10587 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10588 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10589 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10590 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10591 (using_threads): Always set to 1.
10592 (handle_extended_wait): New.
10593 (add_process): Do not set TID.
10594 (linux_create_inferior): Set must_set_ptrace_flags.
10595 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10596 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10597 (linux_thread_alive): Rename TID argument to LWPID.
10598 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10599 (linux_wait_for_event): Do not use TID or check using_threads. Update
10600 call to dead_thread_notify. Call handle_extended_wait.
10601 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10602 (send_sigstop): Delete sigstop_sent.
10603 (wait_for_sigstop): Avoid TID.
10604 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10605 (linux_test_for_tracefork): New.
10606 (linux_lookup_signals): Use thread_db_active and
10607 linux_supports_tracefork_flag.
10608 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10609 * linux-low.h (get_process_thread): Avoid TID.
10610 (struct process_ifo): Move thread_known and tid to the end. Remove
10611 sigstop_sent.
10612 (linux_attach_lwp, thread_db_init): Update prototypes.
10613 * server.h (change_inferior_id): Delete prototype.
10614 (add_pid_to_list, pull_pid_from_list): New prototypes.
10615 * thread-db.c (thread_db_use_events): New.
10616 (find_first_thread): Rename to...
10617 (find_one_thread): ...this. Update callers and messages. Do not
10618 call fatal. Check thread_db_use_events. Do not call
10619 change_inferior_id or new_thread_notify.
10620 (maybe_attach_thread): Update. Do not call new_thread_notify.
10621 (thread_db_init): Set thread_db_use_events. Check use_events.
10622 * utils.c (fatal, warning): Correct message prefix.
10623
10624 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10625
10626 * Makefile.in (clean): Remove new files.
10627 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10628 (powerpc-64.o, powerpc-64.c): New rules.
10629 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10630 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10631 with SPE.
10632 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10633 SPE targets.
10634 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10635 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10636 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10637 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10638 (target_regsets): Add AltiVec and SPE register sets.
10639 * configure.ac: Check for AltiVec and SPE.
10640 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10641 (ppc_fill_vrregset, ppc_store_vrregset): New.
10642 (target_regsets): Add AltiVec register set.
10643 * configure: Regenerated.
10644
10645 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10646
10647 * linux-low.c (O_LARGEFILE): Define.
10648 (linux_read_memory): Use /proc/PID/mem.
10649 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10650 * configure, config.in: Regenerated.
10651
10652 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10653
10654 * linux-low.c (linux_wait_for_event): Do not pass signals while
10655 single-stepping.
10656
10657 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10658
10659 * win32-low.c (create_process): New.
10660 (win32_create_inferior): Use create_process instead of
10661 CreateProcess. If create_process failed retry appending an ".exe"
10662 suffix. Store the GetLastError result immediatelly after
10663 create_process calls and use it on the call to error.
10664
10665 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10666
10667 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10668
10669 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10670
10671 * configure.ac: Switch license to GPLv3.
10672
10673 2007-08-01 Michael Snyder <msnyder@access-company.com>
10674
10675 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10676
10677 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10678
10679 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10680 typedef.
10681 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10682 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10683 CloseToolhelp32Snapshot.
10684 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10685 CloseToolhelp32Snapshot.
10686
10687 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10688
10689 * server.c (main): Check for inferior exit before main loop.
10690
10691 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10692
10693 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10694 instead of on tmp_desc.
10695
10696 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10697 Daniel Jacobowitz <dan@codesourcery.com>
10698
10699 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10700 (add_thread): Minor cleanups.
10701 (clear_inferiors): Move lower in the file. Clear the DLL
10702 list.
10703 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10704 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10705 (xml_escape_text): New.
10706 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10707 for qSupported.
10708 (handle_v_cont): Report errors.
10709 (gdbserver_version): Update.
10710 (main): Correct size of own_buf. Do not report initial DLL events.
10711 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10712 (unloaded_dll, xml_escape_text): New.
10713 * win32-low.c (enum target_waitkind): Update comments.
10714 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10715 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10716 (win32_EnumProcessModules, win32_GetModuleInformation)
10717 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10718 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10719 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10720 (win32_Module32First, win32_Module32Next, load_toolhelp)
10721 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10722 (get_child_debug_event): Handle DLL events.
10723 (win32_wait): Likewise.
10724
10725 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10726
10727 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10728 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10729
10730 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10731
10732 * win32-low.c (handle_output_debug_string): Ignore event if not
10733 waiting.
10734
10735 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10736
10737 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10738
10739 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10740
10741 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10742
10743 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10744
10745 * inferiors.c (change_inferior_id): Add comment.
10746 * linux-low.c (check_removed_breakpoint): Add an early
10747 prototype. Improve debug output.
10748 (linux_attach): Doc update.
10749 (linux_detach_one_process, linux_detach): Clean up before releasing
10750 each process.
10751 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10752 * linux-low.h (struct process_info): Doc improvement.
10753 * mem-break.c (delete_all_breakpoints): New.
10754 * mem-break.h (delete_all_breakpoints): New prototype.
10755 * thread-db.c (find_first_thread): New.
10756 (thread_db_create_event): Call it instead of
10757 thread_db_find_new_threads. Clean up unused variables.
10758 (maybe_attach_thread): Remove first thread handling.
10759 (thread_db_find_new_threads): Use find_first_thread.
10760 (thread_db_get_tls_address): Likewise.
10761
10762 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10763
10764 * thread-db.c (thread_db_find_new_threads): Add prototype.
10765 (thread_db_create_event): Check for the main thread before adding
10766 a new thread.
10767 (maybe_attach_thread): Only enable event reporting if TID == 0.
10768 (thread_db_get_tls_address): Check for new threads.
10769
10770 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10771
10772 * linux-low.c (linux_create_inferior): Try execv before execvp.
10773 * spu-low.c (spu_create_inferior): Likewise.
10774
10775 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10776
10777 * linux-low.c (linux_create_inferior): Change execv to execvp.
10778 * spu-low.c (spu_create_inferior): Likewies.
10779
10780 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10781
10782 * Makefile.in (clean): Clean new files instead of deleted ones.
10783 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10784 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10785 rules.
10786 * configure.srv: Specify XML files and new regformats for MIPS and
10787 MIPS64 GNU/Linux.
10788 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10789 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10790 an entry for the restart register.
10791 (mips_cannot_fetch_register, mips_cannot_store_register)
10792 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10793 register names to match the XML descriptions.
10794 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10795 restart register instead of $0.
10796
10797 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10798 Markus Deuling <deuling@de.ibm.com>
10799
10800 * remote-utils.c (decode_xfer_write): New function.
10801 * server.h (decode_xfer_write): Add prototype.
10802 * server.c (handle_query): Add PACKET_LEN argument. Support
10803 qXfer:spu:read and qXfer:spu:write packets.
10804 (main): Pass packet_len to handle_query.
10805 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10806 * target.h (target_ops): Add qxfer_spu.
10807
10808 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10809
10810 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10811 accessing non-seekable spufs files.
10812
10813 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10814
10815 * server.c (handle_query): Add reply for qC packet.
10816
10817 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10818 Leo Zayas <lerele@champenstudios@com>
10819
10820 * server.h (check_remote_input_interrupt_request): New function.
10821 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10822 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10823 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10824 (check_remote_input_interrupt_request): New function.
10825 * server.h (check_remote_input_interrupt_request): Declare.
10826 * win32-low.c (winapi_DebugBreakProcess,
10827 winapi_GenerateConsoleCtrlEvent): New typedefs.
10828 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10829 to 250 ms.
10830 (win32_wait): Check for remote interrupt request
10831 with check_remote_input_interrupt_request.
10832 (win32_request_interrupt): New function.
10833 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10834
10835 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10836
10837 * win32-low.c (debug_registers_changed,
10838 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10839 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10840 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10841 (thread_rec): Get context using the low target.
10842 (child_add_thread): Call thread_added on the low target,
10843 which does the same thing.
10844 (regptr): Delete.
10845 (do_initial_child_stuff): Remove debug registers references.
10846 Set context using the low target. Resume threads after
10847 setting the contexts.
10848 (child_continue): Remove dead variable. Remove debug
10849 registers references.
10850 (child_fetch_inferior_registers): Go through the low target.
10851 (do_child_store_inferior_registers): Remove.
10852 (child_store_inferior_registers): Go through the low target.
10853 (win32_resume): Remove debug registers references.
10854 Set context using the low target.
10855 (handle_exception): Change return type to void. Don't record
10856 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10857 first chance exception.
10858 (get_child_debug_event): Change return type to void. Remove
10859 goto loop. Always return after waiting for debug event.
10860 (win32_wait): Convert to switch statement. Handle spurious
10861 events.
10862
10863 * win32-i386-low.c (debug_registers_changed,
10864 debug_registers_used): New.
10865 (initial_stuff): Rename to ...
10866 (i386_initial_stuff): ... this. Clear debug registers
10867 state variables.
10868 (store_debug_registers): Delete.
10869 (i386_get_thread_context): New.
10870 (load_debug_registers): Delete.
10871 (i386_set_thread_context): New.
10872 (i386_thread_added): New.
10873 (single_step): Rename to ...
10874 (i386_single_step): ... this.
10875 (do_fetch_inferior_registers): Rename to ...
10876 (i386_fetch_inferior_register): ... this.
10877 (i386_store_inferior_register): New.
10878 (the_low_target): Adapt to new interface.
10879
10880 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10881 (arm_get_thread_context): New.
10882 (arm_set_thread_context): New.
10883 (regptr): New.
10884 (do_fetch_inferior_registers): Rename to ...
10885 (arm_fetch_inferior_register): ... this.
10886 (arm_store_inferior_register): New.
10887 (arm_wince_breakpoint): Reimplement as unsigned long.
10888 (arm_wince_breakpoint_len): Define.
10889 (the_low_target): Adapt to new interface.
10890
10891 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10892 load_debug_registers. Add get_thread_context, set_thread_context,
10893 thread_added and store_inferior_register. Rename
10894 fetch_inferior_registers to fetch_inferior_register.
10895 (regptr): Remove declaration.
10896
10897 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10898
10899 * linux-low.c (linux_detach): Change return type to int. Return 0.
10900 * spu-low.c (spu_detach): Likewise.
10901
10902 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10903
10904 * target.h (target_ops): Change return type of detach to int.
10905 Add join.
10906 (join_inferior): New.
10907 * server.c (main): Don't skip detach support on mingw32.
10908 If the inferior doesn't support detaching return error.
10909 Call join_inferior instead of using waitpid.
10910 * linux-low.c (linux_join): New.
10911 (linux_target_op): Add linux_join.
10912 * spu-low.c (spu_join): New.
10913 (spu_target_ops): Add spu_join.
10914 * win32-low.c (win32_detach): Adapt to new interface.
10915 Reopen current_process_handle before detaching. Issue a child
10916 resume before detaching.
10917 (win32_join): New.
10918 (win32_target_op): Add win32_join.
10919
10920 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10921
10922 * win32-low.c (win32-attach): Fix return value.
10923 * target.h (target_ops): Describe ATTACH return values.
10924
10925 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10926
10927 * win32-low.c (GETPROCADDRESS): Define.
10928 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10929 (winapi_DebugSetProcessKillOnExit): Likewise.
10930 (win32_create_inferior): Force usage of ansi CreateProcessA.
10931 (win32_attach): Use GETPROCADDRESS.
10932 (win32_detach): Likewise.
10933
10934 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10935
10936 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10937
10938 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10939
10940 * win32-low.c: Commit leftover changes from 2007-03-29.
10941
10942 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10943
10944 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10945 fields short instead of int. Add explicit padding.
10946 (i387_cache_to_fsave): Remove unnecessary casts.
10947 (i387_fsave_to_cache): Doc fix.
10948 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10949
10950 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10951
10952 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10953 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10954
10955 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10956
10957 * configure.srv (arm*-*-mingw32ce*): Move near the other
10958 arm targets.
10959
10960 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10961
10962 * configure.ac: Add errno checking.
10963 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10964 sys/file.h and malloc.h.
10965 (AC_CHECK_DECLS): Add perror.
10966 (srv_mingwce): Handle.
10967 * configure.srv (i[34567]86-*-cygwin*): Add
10968 win32-i386-low.o to srv_tgtobj.
10969 (i[34567]86-*-mingw*): Likewise.
10970 (arm*-*-mingw32ce*): Add case.
10971 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10972 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10973 [__MINGW32CE__] (strerror): New function.
10974 [__MINGW32CE__] (errno): Define to GetLastError.
10975 [__MINGW32CE__] (COUNTOF): New macro.
10976 (remote_open): Remove extra close call.
10977 * mem-break.c (delete_breakpoint_at): New function.
10978 * mem-break.h (delete_breakpoint_at): Declare.
10979 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10980 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10981 [USE_WIN32API] (read, write): Add char* casts.
10982 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10983 * server.h: Include wincecompat.h on Windows CE.
10984 [HAVE_ERRNO_H]: Check.
10985 (perror): Declare if not declared.
10986 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10987 (perror_with_name): Remove errno declaration.
10988 * wincecompat.h: New.
10989 * wincecompat.c: New.
10990 * win32-low.h: New.
10991 * win32-arm-low.c: New.
10992 * win32-i386-low.c: New.
10993 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10994 (OUTMSG2): Make it safe.
10995 (_T): New macro.
10996 (COUNTOF): New macro.
10997 (NUM_REGS): Get it from the low target.
10998 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10999 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11000 (thread_rec): Let low target handle debug registers.
11001 (child_add_thread): Likewise.
11002 (child_init_thread_list): Likewise.
11003 (continue_one_thread): Likewise.
11004 (regptr): New.
11005 (do_child_fetch_inferior_registers): Move to ...
11006 * win32-i386-low.c: ... here, and rename to ...
11007 (do_fetch_inferior_registers): ... this.
11008 * win32-low.c (child_fetch_inferior_registers):
11009 Go through the low target.
11010 (do_child_store_inferior_registers): Use regptr.
11011 (strwinerror): New function.
11012 (win32_create_inferior): Handle Windows CE.
11013 Use strwinerror instead of strerror on Windows error
11014 codes. Add program to the error output.
11015 Don't close the main thread handle on Windows CE.
11016 (win32_attach): Use coredll.dll on Windows CE.
11017 (win32_kill): Close current process and current
11018 thread handles.
11019 (win32_detach): Use coredll.dll on Windows CE.
11020 (win32_resume): Let low target handle debug registers, and
11021 step request.
11022 (handle_exception): Add/Remove initial breakpoint. Avoid
11023 non-existant WSTOPSIG on Windows CE.
11024 (win32_read_inferior_memory): Cast to remove warning.
11025 (win32_arch_string): Go through the low target.
11026 (initialize_low): Call set_breakpoint_data with the low
11027 target's breakpoint.
11028 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11029 FOP_REGNUM, mappings): Move to ...
11030 * win32-i386-low.c: ... here.
11031 * win32-low.c (win32_thread_info): Move to ...
11032 * win32-low.h: ... here.
11033 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11034 win32-arm-low.c and wincecompat.c.
11035 (all:): Add $EXEEXT.
11036 (install-only:): Likewise.
11037 (gdbserver:): Likewise.
11038 (gdbreplay:): Likewise.
11039 * config.in: Regenerate.
11040 * configure: Regenerate.
11041
11042 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11043
11044 * win32-low.c: Rename typedef thread_info to
11045 win32_thread_info throughout.
11046
11047 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11048
11049 * win32-i386-low.c: Rename to ...
11050 * win32-low.c: ... this.
11051 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11052 * Makefile.in: Likewise.
11053
11054 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11055
11056 * remote-utils.c (monitor_output): Constify msg parameter.
11057 * server.h (monitor_output): Likewise.
11058 * win32-i386-low.c (handle_output_debug_string): New.
11059 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11060 handle_output_debug_string.
11061 (get_child_debug_event): Likewise.
11062
11063 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11064
11065 * server.c (main): Correct strtoul check.
11066
11067 2007-03-27 Jon Ringle <jon@ringle.org>
11068
11069 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11070
11071 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11072
11073 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11074
11075 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11076
11077 * terminal.h: Check HAVE_SGTTY_H.
11078
11079 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11080
11081 * remote-utils.c (remote_open): Print out the assigned port number.
11082
11083 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11084
11085 * remote-utils.c (monitor_output): New function.
11086 * server.c (debug_threads): Define here.
11087 (monitor_show_help): New function.
11088 (handle_query): Handle qRcmd.
11089 (main): Do not handle 'd' packet.
11090 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11091 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11092 of debug_threads.
11093
11094 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11095
11096 * Makefile.in (EXEEXT): New.
11097 (clean): Use $(EXEEXT).
11098
11099 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11100
11101 * target.h (target_ops): Rename send_signal to request_interrupt,
11102 and remove enum target_signal parameter.
11103 * linux-low.c (linux_request_interrupt): Rename from
11104 linux_send_signal, and always send SIGINT.
11105 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11106 and always send SIGINT.
11107 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11108 of send_signal.
11109 (input_interrupt): Likewise.
11110
11111 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11112
11113 * server.c (get_features_xml): Check if target implemented
11114 arch_string.
11115 * win32-i386-low.c (win32_arch_string): New.
11116 (win32_target_ops): Add win32_arch_string as arch_string member.
11117
11118 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11119
11120 * spu-low.c (spu_arch_string): New.
11121 (spu_target_ops): Add spu_arch_string.
11122
11123 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11124
11125 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11126 * configure.ac: Do not check for terminal.h.
11127 * configure, config.in: Regenerated.
11128
11129 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11130
11131 * Makefile.in (OBS): Add $(XML_BUILTIN).
11132 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11133 (clean): Update.
11134 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11135 (arm-with-iwmmxt.c): New.
11136 * config.in, configure: Regenerate.
11137 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11138 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11139 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11140 (arm*-*-linux*): Add iWMMXt and regset support.
11141 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11142 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11143 (arm_store_wmmxregset, target_regsets): New.
11144 * server.c (get_features_xml): Take annex argument. Check builtin
11145 XML documents.
11146 (handle_query): Handle multiple annexes.
11147
11148 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11149
11150 * remote-utils.c [USE_WIN32API] (read, write): Define.
11151 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11152 write.
11153
11154 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11155
11156 * linux-i386-low.c (the_low_target): Set arch_string.
11157 * linux-x86-64-low.c (the_low_target): Likewise.
11158 * linux-low.c (linux_arch_string): New.
11159 (linux_target_ops): Add it.
11160 * linux-low.h (struct linux_target_ops): Add arch_string.
11161 * server.c (write_qxfer_response): Use const void * for DATA.
11162 (get_features_xml): New.
11163 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11164 * target.h (struct target_ops): Add arch_string method.
11165
11166 2007-01-03 Denis Pilat <denis.pilat@st.com>
11167 Daniel Jacobowitz <dan@codesourcery.com>
11168
11169 * linux-low.c (linux_kill): Handle being called with no threads.
11170 * win32-i386-low.c (win32_kill): Likewise.
11171 (get_child_debug_event): Clear current_process_handle.
11172
11173 2006-12-30 Denis PILAT <denis.pilat@st.com>
11174 Daniel Jacobowitz <dan@codesourcery.com>
11175
11176 * remote-utils.c (remote_open): Check the type of specified
11177 serial port devices before opening them.
11178 * server.c (main): Kill the inferior if an error occurs during
11179 the first remote_open.
11180
11181 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11182
11183 * README: Update supported targets.
11184
11185 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11186
11187 * Makefile.in (clean): Remove reg-mips64.c.
11188 (reg-mips64.c, reg-mips64.o): New rules.
11189 * configure.srv: Handle mips64. Include regset support for mips.
11190 * linux-mips-low.c (union mips_register): New.
11191 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11192 (mips_breakpoint, mips_breakpoint_at): Use int.
11193 (mips_collect_register, mips_supply_register)
11194 (mips_collect_register_32bit, mips_supply_register_32bit)
11195 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11196 (mips_store_fpregset, target_regsets): New.
11197 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11198
11199 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11200
11201 * configure.srv: Add target "spu*-*-*".
11202 * Makefile.in (clean): Remove reg-spu.c.
11203 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11204 * spu-low.c: New file.
11205
11206 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11207
11208 * configure.ac: Correct td_thr_tls_get_addr test.
11209 * configure: Regenerated.
11210
11211 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11212
11213 * linux-low.c (linux_wait_for_event): Reformat. Use the
11214 pass_signals array.
11215 * remote-utils.c (decode_address_to_semicolon): New.
11216 * server.c (pass_signals, handle_general_set): New.
11217 (handle_query): Mention QPassSignals for qSupported.
11218 (main): Call handle_general_set.
11219 * server.h (pass_signals, decode_address_to_semicolon): New.
11220
11221 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11222
11223 * server.c (handle_query): Correct error handling for read_auxv.
11224
11225 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11226
11227 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11228 and srv_linux_thread_db to yes.
11229 * linux-s390-low.c (s390_fill_gregset): New function.
11230 (target_regsets): Define data structure.
11231
11232 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11233
11234 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11235 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11236 * config.in, configure: Regenerated.
11237 * inferiors.c (gdb_id_to_thread): New function.
11238 (gdb_id_to_thread_id): Use it.
11239 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11240 * linux-low.h (struct process_info): Add th member.
11241 (thread_db_get_tls_address): New prototype.
11242 * remote-utils.c (decode_address): Make non-static.
11243 * server.c (handle_query): Handle qGetTLSAddr.
11244 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11245 * target.h (struct target_ops): Add get_tls_address.
11246 * thread-db.c (maybe_attach_thread): Save the thread handle.
11247 (thread_db_get_tls_address): New.
11248
11249 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11250
11251 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11252 (linux_resume_one_process): Take a siginfo_t *. Update all
11253 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11254 (struct pending_signals): Add a siginfo_t.
11255 (linux_wait_for_process): Always set last_status.
11256 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11257 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11258 * linux-low.h (struct process_info): Add last_status.
11259
11260 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11261
11262 * remote-utils.c (try_rle): New function.
11263 (putpkt_binary): Use it.
11264
11265 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11266
11267 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11268 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11269 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11270 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11271 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11272 point registers.
11273
11274 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11275
11276 * server.c (terminal_fd): New variable.
11277 (old_foreground_pgrp): Likewise.
11278 (restore_old_foreground_pgrp): New function.
11279 (start_inferior): Record the terminal file descriptor in terminal_fd
11280 and its original foreground group in old_foreground_pgrp. Register
11281 restore_old_foreground_pgrp with atexit().
11282
11283 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11284
11285 * server.c (handle_query): Correct qPart to qXfer.
11286
11287 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11288
11289 * configure.ac: Check for more headers which are missing on
11290 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11291 * configure.srv: Add Cygwin and mingw32.
11292 * remote-utils.c: Don't include headers unconditionally which
11293 are missing on mingw32. Include <winsock.h> for mingw32.
11294 (remote_open): Adjust for mingw32 support. Flush
11295 standard error after writing to it.
11296 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11297 (unblock_async_io, enable_async_io, disable_async_io)
11298 (readchar, getpkt): Update for Winsock support.
11299 (prepare_resume_reply): Expect a protocol signal number.
11300 * server.c: Disable <sys/wait.h> on mingw32.
11301 (start_inferior): Adjust for mingw32 support. Flush
11302 standard error after writing to it.
11303 (attach_inferior): Likewise. Use protocol signal
11304 numbers.
11305 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11306 and names.
11307 * win32-i386-low.c: New file.
11308 * Makefile.in (XM_CLIBS): Set.
11309 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11310 (win32-i386-low.o): New dependency rule.
11311 * linux-low.c (linux_wait): Use target signal numbers.
11312 * target.h (struct target_ops): Doc fix.
11313 * server.h (target_signal_to_name): New prototype.
11314 * gdbreplay.c: Don't include headers unconditionally which
11315 are missing on mingw32. Include <winsock.h> for mingw32.
11316 (remote_close, remote_open): Adjust for Winsock support.
11317 * configure, config.in: Regenerated.
11318
11319 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11320
11321 * server.c (decode_xfer_read, write_qxfer_response): New.
11322 (handle_query): Take a packet length argument. Handle
11323 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11324 the qSupported response.
11325 (main): Update call to handle_query.
11326
11327 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11328
11329 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11330 (putpkt_binary): Renamed from putpkt and adjusted for binary
11331 data.
11332 (putpkt): New wrapper for putpkt_binary.
11333 (readchar): Don't mask off the high bit.
11334 (decode_X_packet): New function.
11335 * server.c (main): Call putpkt_binary if a handler sets the packet
11336 length. Save the length of the incoming packet. Handle 'X'.
11337 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11338
11339 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11340
11341 * server.c (handle_query): Handle qSupported.
11342
11343 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11344
11345 * remote-utils.c (all_symbols_looked_up): New variable.
11346 (look_up_one_symbol): Check it.
11347 * server.h (look_up_one_symbol): New declaration.
11348 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11349
11350 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11351
11352 * Makefile.in (linux-arm-low.o): Update dependencies.
11353 * linux-arm-low.c: Include "gdb_proc_service.h".
11354 (PTRACE_GET_THREAD_AREA): Define.
11355 (ps_get_thread_area): New function.
11356
11357 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11358
11359 * configure.srv (m68k*-*-uclinux*): New target.
11360 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11361 (linux_resume_one_process): Remove extraneous cast.
11362 (linux_read_offsets): New.
11363 (linux_target_op): Add linux_read_offsets on mmuless systems.
11364 * server.c (handle_query): Add qOffsets logic.
11365 * target.h (struct target_ops): Add read_offsets.
11366
11367 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11368
11369 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11370 (PTRACE_GET_THREAD_AREA): Define.
11371 (ps_get_thread_area): New function.
11372 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11373 (linux-x86-64-low.o): Update.
11374
11375 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11376
11377 * configure.ac: Remove checks for prfpregset_t.
11378 * gdb_proc_service.h: New file.
11379 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11380 new "gdb_proc_service.h".
11381 * proc-service.c: Likewise.
11382 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11383 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11384 * Makefile.in (gdb_proc_service_h): Updated.
11385 * configure, config.in: Regenerated.
11386
11387 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11388
11389 * remote-utils.c (prepare_resume_reply): Move declaration
11390 of gdb_id_from_wait to the top of the block.
11391
11392 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11393
11394 * linux-low.c (regsets_store_inferior_registers): Read the regset
11395 from the target before filling it.
11396
11397 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11398
11399 * server.c (attach_inferior): Return SIGTRAP for a successful
11400 attach.
11401
11402 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11403
11404 * Makefile.in (OBS): Add version.o.
11405 (STAGESTUFF): Delete.
11406 (version.o): Add dependencies.
11407 (version.c): Replace rule.
11408 (clean): Remove version.c.
11409 * server.c (gdbserver_version): New.
11410 (gdbserver_usage): Use printf.
11411 (main): Handle --version and --help.
11412 * server.h (version, host_name): Add declarations.
11413
11414 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11415
11416 * linux-arm-low.c:
11417 * linux-arm-low.c:
11418 * inferiors.c:
11419 * i387-fp.h:
11420 * i387-fp.c:
11421 * gdbreplay.c:
11422 * regcache.c:
11423 * proc-service.c:
11424 * mem-break.h:
11425 * mem-break.c:
11426 * linux-x86-64-low.c:
11427 * linux-sh-low.c:
11428 * linux-s390-low.c:
11429 * linux-ppc64-low.c:
11430 * linux-ppc-low.c:
11431 * linux-mips-low.c:
11432 * linux-m68k-low.c:
11433 * linux-m32r-low.c:
11434 * linux-low.h:
11435 * linux-low.c:
11436 * linux-ia64-low.c:
11437 * linux-i386-low.c:
11438 * linux-crisv32-low.c:
11439 * thread-db.c:
11440 * terminal.h:
11441 * target.h:
11442 * target.c:
11443 * server.h:
11444 * server.c:
11445 * remote-utils.c:
11446 * regcache.h:
11447 * utils.c:
11448 * Makefile.in:
11449 * configure.ac:
11450 * gdbserver.1: Add (C) after Copyright. Update the FSF
11451 address.
11452
11453 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11454
11455 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11456 (arm_breakpoint_at): Recognize both breakpoints.
11457 (the_low_target): Use the correct breakpoint instruction.
11458
11459 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11460
11461 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11462 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11463 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11464 (the_low_target): Update.
11465
11466 2005-10-25 Andreas Schwab <schwab@suse.de>
11467
11468 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11469
11470 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11471 (ia64_num_regs): Reduce to 462.
11472
11473 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11474
11475 * acinclude.m4: Correct quoting.
11476 * aclocal.m4: Regenerated.
11477
11478 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11479 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11480 (thread_db_init): Call thread_db_err_str.
11481 * configure.ac: Check for TD_VERSION.
11482 * config.in, configure: Regenerated.
11483
11484 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11485
11486 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11487
11488 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11489
11490 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11491 is not available. Define HAVE_PTRACE_GETREGS if it is.
11492 * config.in, configure: Regenerated.
11493 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11494 * linux-i386-low.c, linux-m68k-low.c: Update to use
11495 HAVE_PTRACE_GETREGS.
11496 * linux-low.c (regsets_fetch_inferior_registers)
11497 (regsets_store_inferior_registers): Only return 0 if we processed
11498 GENERAL_REGS.
11499 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11500 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11501
11502 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11503
11504 * inferiors.c (struct thread_info): Add gdb_id.
11505 (add_thread): Add gdb_id argument.
11506 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11507 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11508 calls to add_thread.
11509 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11510 * server.c (handle_query): Use thread_to_gdb_id.
11511 (handle_v_cont, main): Use gdb_id_to_thread_id.
11512 * server.h (add_thread): Update prototype.
11513 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11514 prototypes.
11515
11516 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11517
11518 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11519 left-padded registers.
11520 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11521 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11522
11523 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11524
11525 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11526 * configure: Regenerate.
11527 * config.in: Regenerate.
11528 * server.h (NEED_DECLARATION_STRERROR):
11529 Replace with !HAVE_DECL_STRERROR.
11530
11531 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11532
11533 * linux-low.c (linux_wait, linux_send_signal): Don't test
11534 an unsigned long variable for > 0 if it could be MAX_ULONG.
11535 * server.c (myresume): Likewise.
11536 * target.c (set_desired_inferior): Likewise.
11537
11538 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11539
11540 * configure.ac: Simplify and improve check for socklen_t.
11541 * configure, config.in: Regenerate.
11542
11543 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11544
11545 * acconfig.h: Remove.
11546 * configure.ac: Add a test for socklen_t. Use three-argument
11547 AC_DEFINE throughout.
11548 * config.in: Regenerated using autoheader 2.59.
11549 * configure: Regenerated.
11550
11551 * gdbreplay.c (socklen_t): Provide a default.
11552 (remote_open): Use socklen_t.
11553 * remote-utils.c (socklen_t): Provide a default.
11554 (remote_open): Use socklen_t.
11555 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11556 unsigned char.
11557
11558 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11559 char for buffers.
11560 * linux-low.c (linux_read_memory, linux_write_memory)
11561 (linux_read_auxv): Likewise.
11562 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11563 (check_mem_write): Likewise.
11564 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11565 Likewise.
11566 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11567 (registers_from_string, register_data): Likewise.
11568 * server.c (handle_query, main): Likewise.
11569 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11570 (decode_M_packet): Likewise.
11571 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11572 * target.h (struct target_ops): Update read_memory, write_memory,
11573 and read_auxv.
11574 (read_inferior_memory, write_inferior_memory): Update.
11575 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11576 to unsigned char *.
11577 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11578 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11579 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11580 linux-s390-low.c, linux-sh-low.c: Update for changes in
11581 read_inferior_memory and the_low_target->breakpoint.
11582
11583 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11584
11585 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11586 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11587 * configure.srv: Add powerpc64-*-linux*.
11588 * linux-ppc64-low.c: New file.
11589
11590 2005-05-23 Orjan Friberg <orjanf@axis.com>
11591
11592 * linux-cris-low.c: New file with support for CRIS.
11593 * linux-crisv32-low.c: Ditto for CRISv32.
11594 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11595 (clean): Add reg-cris.c and reg-crisv32.c.
11596 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11597 reg-crisv32.o, and reg-crisv32.c to make rules.
11598 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11599 recognized targets.
11600
11601 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11602
11603 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11604 of sizeof (PTRACE_XFER_TYPE).
11605 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11606
11607 2005-05-12 Orjan Friberg <orjanf@axis.com>
11608
11609 * target.h (struct target_ops): Add insert_watchpoint,
11610 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11611 pointers for hardware watchpoint support.
11612 * linux-low.h (struct linux_target_ops): Ditto.
11613 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11614 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11615 to linux_target_ops.
11616 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11617 reply packet.
11618 * server.c (main): Recognize 'Z' and 'z' packets.
11619
11620 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11621
11622 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11623 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11624 (the_low_target): Add new members.
11625
11626 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11627
11628 * proc-service.c (ps_lgetregs): Search all_processes instead of
11629 all_threads.
11630
11631 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11632
11633 * server.c (start_inferior): Change return type to int.
11634 (attach_inferior): Change sigptr to int *.
11635 (handle_v_cont, handle_v_requests): Change signal to int *.
11636 (main): Change signal to int.
11637
11638 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11639
11640 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11641 * configure.srv: Add m32r*-*-linux*.
11642 * linux-m32r-low.c: New file.
11643
11644 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11645
11646 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11647
11648 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11649
11650 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11651 Take unsigned long arguments for PIDs.
11652 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11653 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11654 (wait_for_sigstop, linux_resume_one_process)
11655 (regsets_fetch_inferior_registers, linux_send_signal)
11656 (linux_read_auxv): Likewise. Update the types of variables holding
11657 PIDs. Update format string specifiers.
11658 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11659 * remote-utils.c (prepare_resume_reply): Likewise.
11660 * server.c (cont_thread, general_thread, step_thread)
11661 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11662 unsigned long.
11663 (handle_query): Update format specifiers.
11664 (handle_v_cont, main): Use strtoul for thread IDs.
11665 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11666 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11667 (general_thread, step_thread, thread_from_wait)
11668 (old_thread_from_wait): Update.
11669 * target.h (struct thread_resume): Use unsigned long for THREAD.
11670 (struct target_ops): Use unsigned long for arguments to attach and
11671 thread_alive.
11672
11673 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11674
11675 * acinclude.m4: Include bfd/bfd.m4 directly.
11676 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11677 <agriffis@toolchain.org>.
11678 * aclocal.m4, configure: Regenerated.
11679
11680 2005-01-07 Andrew Cagney <cagney@gnu.org>
11681
11682 * configure.ac: Rename configure.in, require autoconf 2.59.
11683 * configure: Re-generate.
11684
11685 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11686
11687 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11688 LIBS when finished.
11689 * aclocal.m4: Regenerated.
11690 * configure: Regenerated.
11691
11692 2004-11-21 Andreas Schwab <schwab@suse.de>
11693
11694 * linux-m68k-low.c (m68k_num_gregs): Define.
11695 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11696 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11697 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11698 (m68k_breakpoint_at): New. Add to the_low_target.
11699
11700 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11701 srv_linux_thread_db to yes.
11702
11703 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11704
11705 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11706 (ARCH_SET_FS): Likewise.
11707 (ARCH_GET_FS): Likewise.
11708 (ARCH_GET_GS): Likewise.
11709
11710 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11711
11712 * linux-i386-low.c (ps_get_thread_area): New.
11713 * linux-x86-64-low.c (ps_get_thread_area): New.
11714 * linux-low.c: Include <sys/syscall.h>.
11715 (linux_kill_one_process): Don't kill the first thread here.
11716 (linux_kill): Kill the first thread here.
11717 (kill_lwp): New function.
11718 (send_sigstop, linux_send_signal): Use it.
11719 * proc-service.c: Clean up #ifdefs.
11720 (fpregset_info): Delete.
11721 (ps_lgetregs): Update and enable implementation.
11722 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11723 implementations.
11724 * remote-utils.c (struct sym_cache, symbol_cache): New.
11725 (input_interrupt): Print a clearer message.
11726 (async_io_enabled): New variable.
11727 (enable_async_io, disable_async_io): Use it. Update comments.
11728 (look_up_one_symbol): Use the symbol cache.
11729 * thread-db.c (thread_db_look_up_symbols): New function.
11730 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11731
11732 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11733
11734 * configure.in: Test for -rdynamic.
11735 * configure: Regenerated.
11736 * Makefile (INTERNAL_LDFLAGS): New.
11737 (gdbserver, gdbreplay): Use it.
11738
11739 2004-09-02 Andrew Cagney <cagney@gnu.org>
11740
11741 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11742
11743 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11744
11745 * linux-low.c (linux_wait): Clear all_processes list also.
11746
11747 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11748
11749 * linux-low.c: Include <errno.h>. Remove extern declaration of
11750 errno.
11751
11752 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11753
11754 * gdbreplay.c, server.h, utils.c: Update copyright years.
11755
11756 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11757
11758 * server.c (main): Print child status or termination signal from
11759 variable 'signal', not 'sig'.
11760
11761 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11762
11763 * linux-low.c (linux_read_memory): Change return type to
11764 int. Check for and return error from ptrace().
11765 * target.c (read_inferior_memory): Change return type to int. Pass
11766 back return status from the_target->read_memory().
11767 * target.h (struct target_ops): Adapt *read_memory() prototype.
11768 Update comment.
11769 (read_inferior_memory): Adapt prototype.
11770 * server.c (main): Return an error packet if
11771 read_inferior_memory() returns an error.
11772
11773 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11774
11775 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11776 Unify with other clean targets.
11777
11778 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11779
11780 * server.c (handle_v_cont): Call set_desired_inferior.
11781
11782 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11783
11784 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11785
11786 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11787
11788 * linux-low.c (linux_wait): Unblock async I/O.
11789 (linux_resume): Block and enable async I/O.
11790 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11791 * server.h (block_async_io, unblock_async_io): Add prototypes.
11792
11793 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11794
11795 * remote-utils.c (remote_open): Print a status notice after
11796 opening a TCP port.
11797 * server.c (attach_inferior): Print a status notice after
11798 attaching.
11799
11800 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11801
11802 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11803
11804 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11805
11806 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11807 error packet.
11808 * server.c, target.h: Update copyright years.
11809
11810 2004-02-25 Roland McGrath <roland@redhat.com>
11811
11812 * target.h (struct target_ops): New member `read_auxv'.
11813 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11814 * linux-low.c (linux_read_auxv): New function.
11815 (linux_target_ops): Initialize `read_auxv' member to that.
11816
11817 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11818
11819 Committed by Jim Blandy <jimb@redhat.com>.
11820
11821 * linux-s390-low.c (s390_num_regs): Update.
11822 (s390_regmap): Remove control registers. Use __s390x__ predefine
11823 instead of GPR_SIZE to distiguish s390 and s390x targets.
11824
11825 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11826
11827 * linux-low.c: Update copyright year.
11828 (check_removed_breakpoint): Clear pending_is_breakpoint.
11829 (linux_set_resume_request, linux_queue_one_thread)
11830 (resume_status_pending_p): New functions.
11831 (linux_continue_one_thread): Use process->resume.
11832 (linux_resume): Only resume threads if there are no pending events.
11833 * linux-low.h (struct process_info): Add resume request
11834 pointer.
11835
11836 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11837
11838 * regcache.c (new_register_cache): Clear the allocated register
11839 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11840
11841 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11842
11843 * linux-low.c (linux_resume): Take a struct thread_resume *
11844 argument.
11845 (linux_wait): Update call.
11846 (resume_ptr): New static variable.
11847 (linux_continue_one_thread): Renamed from
11848 linux_continue_one_process. Use resume_ptr.
11849 (linux_resume): Use linux_continue_one_thread.
11850 * server.c (handle_v_cont, handle_v_requests): New functions.
11851 (myresume): New function.
11852 (main): Handle 'v' case.
11853 * target.h (struct thread_resume): New type.
11854 (struct target_ops): Change argument of "resume" to struct
11855 thread_resume *.
11856 (myresume): Delete macro.
11857
11858 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11859
11860 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11861 (uninstall): Support DESTDIR.
11862
11863 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11864
11865 * configure.srv: Add xscale*linux copy of arm*linux entry.
11866
11867 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11868
11869 * linux-arm-low.c (arm_reinsert_addr): New function.
11870 (the_low_target): Add arm_reinsert_addr.
11871
11872 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11873
11874 * mem-break.c: Remove whitespace at end of file.
11875
11876 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11877
11878 * configure.in: Check whether we need to prototype strerror.
11879 * server.h: Optionally prototype strerror.
11880 * gdbreplay.c (perror_with_name): Use strerror.
11881 * linux-low.c (linux_attach_lwp): Use strerror.
11882 * utils.c (perror_with_name): Use strerror.
11883 * config.in, configure: Regenerated.
11884
11885 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11886
11887 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11888 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11889
11890 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11891
11892 * Makefile.in (SFILES): Update.
11893 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11894 low-sun3.c: Remove files.
11895
11896 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11897
11898 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11899 (linux_detach_one_process, linux_detach): New functions.
11900 (linux_target_ops): Add linux_detach.
11901 * server.c (main): Handle 'D' packet.
11902 * target.h (struct target_ops): Add "detach" member.
11903 (detach_inferior): Define.
11904
11905 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11906
11907 From Kelley Cook <kelleycook@wideopenwest.com>:
11908 * configure.srv: Accept i[34567]86 variants.
11909
11910 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11911
11912 * linux-low.c (linux_wait_for_event): Correct comment typos.
11913 (linux_resume_one_process): Call check_removed_breakpoint.
11914 (linux_send_signal): New function.
11915 (linux_target_ops): Add linux_send_signal.
11916 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11917 of kill.
11918 * target.h (struct target_ops): Add send_signal.
11919
11920 2003-05-29 Jim Blandy <jimb@redhat.com>
11921
11922 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11923 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11924 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11925 away part of the register's value.
11926
11927 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11928
11929 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11930 (linux_wait_for_event, linux_init_signals): Likewise.
11931
11932 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11933
11934 * configure.in: Check for stdlib.h.
11935 * configure: Regenerated.
11936 * config.in: Regenerated.
11937
11938 2003-01-04 Andreas Schwab <schwab@suse.de>
11939
11940 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11941
11942 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11943
11944 * Makefile.in: Remove obsolete code.
11945
11946 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11947
11948 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11949 defined(PT_FPR0_HI).
11950
11951 2002-11-17 Stuart Hughes <seh@zee2.com>
11952
11953 * linux-arm-low.c (arm_num_regs): Increase.
11954 (arm_regmap): Include status register.
11955
11956 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11957
11958 * linux-low.c (register_addr): Remove incorrect -1 check.
11959
11960 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11961
11962 * linux-low.c (linux_create_inferior): Call setpgid. Return
11963 the new PID.
11964 (unstopped_p, linux_signal_pid): Remove.
11965 (linux_target_ops): Remove linux_signal_pid.
11966 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11967 global instead of target method.
11968 * target.h (struct target_ops): Remove signal_pid. Update comment
11969 for create_inferior.
11970 * server.c (signal_pid): New variable.
11971 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11972 gdbserver. Set the child to be the foreground process group.
11973 (attach_inferior): Set signal_pid.
11974
11975 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11976
11977 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11978
11979 2002-08-20 Jim Blandy <jimb@redhat.com>
11980
11981 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11982 default for this.
11983
11984 2002-08-01 Andrew Cagney <cagney@redhat.com>
11985
11986 * Makefile.in: Make chill references obsolete.
11987
11988 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11989
11990 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11991 * configure: Regenerate.
11992 * config.in: Regenerate.
11993
11994 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11995
11996 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11997 (perror_with_name, remote_close, remote_open, expect, play): Static.
11998
11999 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12000
12001 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12002 byte offsets instead of an array of indexes.
12003 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12004
12005 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12006
12007 * regcache.c: Add comment.
12008
12009 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12010
12011 * thread-db.c: New file.
12012 * proc-service.c: New file.
12013 * acinclude.m4: New file.
12014 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12015 proc-service.o, and thread-db.o.
12016 (linux-low.o): Add USE_THREAD_DB.
12017 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12018 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12019 * aclocal.m4: Regenerated.
12020 * config.in: Regenerated.
12021 * configure: Regenerated.
12022 * configure.in: Check for proc_service.h, sys/procfs.h,
12023 thread_db.h, and linux/elf.h headrs.
12024 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12025 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12026 Check for -lthread_db and thread support.
12027 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12028 PowerPC, and SuperH.
12029 * i387-fp.c: Constify arguments.
12030 * i387-fp.h: Likewise.
12031 * inferiors.c: (struct thread_info): Renamed from
12032 `struct inferior_info'. Remove PID member. Use generic inferior
12033 list header. All uses updated.
12034 (inferiors, signal_pid): Removed.
12035 (all_threads): New variable.
12036 (get_thread): Define.
12037 (add_inferior_to_list): New function.
12038 (for_each_inferior): New function.
12039 (change_inferior_id): New function.
12040 (add_inferior): Removed.
12041 (remove_inferior): New function.
12042 (add_thread): New function.
12043 (free_one_thread): New function.
12044 (remove_thread): New function.
12045 (clear_inferiors): Use for_each_inferior and free_one_thread.
12046 (find_inferior): New function.
12047 (find_inferior_id): New function.
12048 (inferior_target_data): Update argument type.
12049 (set_inferior_target_data): Likewise.
12050 (inferior_regcache_data): Likewise.
12051 (set_inferior_regcache_data): Likewise.
12052 * linux-low.c (linux_bp_reinsert): Remove.
12053 (all_processes, stopping_threads, using_thrads)
12054 (struct pending_signals, debug_threads, pid_of): New.
12055 (inferior_pid): Replace with macro.
12056 (struct inferior_linux_data): Remove.
12057 (get_stop_pc, add_process): New functions.
12058 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12059 Use add_process and add_thread.
12060 (linux_attach_lwp): New function, based on old linux_attach. Use
12061 add_process and add_thread. Set stop_expected for new threads.
12062 (linux_attach): New function.
12063 (linux_kill_one_process): New function.
12064 (linux_kill): Kill all LWPs.
12065 (linux_thread_alive): Use find_inferior_id.
12066 (check_removed_breakpoints, status_pending_p): New functions.
12067 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12068 Update. Use WNOHANG. Wait for cloned processes also. Update process
12069 struct for the found process.
12070 (linux_wait_for_event): New function.
12071 (linux_wait): Use it. Support LWPs.
12072 (send_sigstop, wait_for_sigstop, stop_all_processes)
12073 (linux_resume_one_process, linux_continue_one_process): New functions.
12074 (linux_resume): Support LWPs.
12075 (REGISTER_RAW_SIZE): Remove.
12076 (fetch_register): Use register_size instead. Call supply_register.
12077 (usr_store_inferior_registers): Likewise. Call collect_register.
12078 Fix recursive case.
12079 (regsets_fetch_inferior_registers): Improve error message.
12080 (regsets_store_inferior_registers): Add debugging.
12081 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12082 (unstopped_p, linux_signal_pid): New functions.
12083 (linux_target_ops): Add linux_signal_pid.
12084 (linux_init_signals): New function.
12085 (initialize_low): Call it. Initialize using_threads.
12086 * regcache.c (inferior_regcache_data): Add valid
12087 flag.
12088 (get_regcache): Fetch registers lazily. Add fetch argument
12089 and update all callers.
12090 (regcache_invalidate_one, regcache_invalidate): New
12091 functions.
12092 (new_register_cache): Renamed from create_register_cache.
12093 Return the new regcache.
12094 (free_register_cache): Change argument to a void *.
12095 (registers_to_string, registers_from_string): Call get_regcache
12096 with fetch flag set.
12097 (register_data): Make static. Pass fetch flag to get_regcache.
12098 (supply_register): Call get_regcache with fetch flag clear.
12099 (collect_register): Call get_regcache with fetch flag set.
12100 (collect_register_as_string): New function.
12101 * regcache.h: Update.
12102 * remote-utils.c (putpkt): Flush after debug output and use
12103 stderr.
12104 Handle input interrupts while waiting for an ACK.
12105 (input_interrupt): Use signal_pid method.
12106 (getpkt): Flush after debug output and use stderr.
12107 (outreg): Use collect_register_as_string.
12108 (new_thread_notify, dead_thread_notify): New functions.
12109 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12110 and general_thread.
12111 (look_up_one_symbol): Flush after debug output.
12112 * server.c (step_thread, server_waiting): New variables.
12113 (start_inferior): Don't use signal_pid. Update call to mywait.
12114 (attach_inferior): Update call to mywait.
12115 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12116 (main): Don't fetch/store registers explicitly. Use
12117 set_desired_inferior. Support proposed ``Hs'' packet. Update
12118 calls to mywait.
12119 * server.h: Update.
12120 (struct inferior_list, struct_inferior_list_entry): New.
12121 * target.c (set_desired_inferior): New.
12122 (write_inferior_memory): Constify.
12123 (mywait): New function.
12124 * target.h: Update.
12125 (struct target_ops): New signal_pid method.
12126 (mywait): Removed macro, added prototype.
12127
12128 * linux-low.h (regset_func): Removed.
12129 (regset_fill_func, regset_store_func): New.
12130 (enum regset_type): New.
12131 (struct regset_info): Add type field. Use new operation types.
12132 (struct linux_target_ops): stop_pc renamed to get_pc.
12133 Add decr_pc_after_break and breakpoint_at.
12134 (get_process, get_thread_proess, get_process_thread)
12135 (strut process_info, all_processes, linux_attach_lwp)
12136 (thread_db_init): New.
12137
12138 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12139 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12140 (the_low_target): Add new members.
12141 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12142 (i386_store_fpxregset): Constify.
12143 (target_regsets): Add new kind identifier.
12144 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12145 (i386_set_pc): Add debugging.
12146 (i386_breakpoint_at): New function.
12147 (the_low_target): Add new members.
12148 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12149 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12150 (mips_breakpoint_at): New.
12151 (the_low_target): Add new members.
12152 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12153 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12154 (the_low_target): Add new members.
12155 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12156 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12157 (the_low_target): Add new members.
12158 * linux-x86-64-low.c (target_regsets): Add new kind
12159 identifier.
12160
12161 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12162
12163 From Martin Pool <mbp@samba.org>:
12164 * server.c (gdbserver_usage): New function.
12165 (main): Call it.
12166
12167 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12168
12169 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12170 stop_at -> stop_pc.
12171
12172 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12173
12174 * Makefile.in: Remove obsolete code.
12175
12176 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12177
12178 * linux-low.c (regsets_fetch_inferior_registers),
12179 (regsets_store_inferior_registers): Removed cast to int from
12180 ptrace() calls.
12181 * regcache.h: Added declaration of struct inferior_info.
12182
12183 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12184
12185 * inferiors.c (struct inferior_info): Add regcache_data.
12186 (add_inferior): Call create_register_cache.
12187 (clear_inferiors): Call free_register_cache.
12188 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12189 * regcache.c (struct inferior_regcache_data): New.
12190 (registers): Remove.
12191 (get_regcache): New function.
12192 (create_register_cache, free_register_cache): New functions.
12193 (set_register_cache): Don't initialize the register cache here.
12194 (registers_to_string, registers_from_string, register_data): Call
12195 get_regcache.
12196 * regcache.h: Add prototypes.
12197 * server.h: Likewise.
12198
12199 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12200
12201 * mem-break.c: New file.
12202 * mem-break.h: New file.
12203 * Makefile.in: Add mem-break.o rule; update server.h
12204 dependencies.
12205 * inferiors.c (struct inferior_info): Add target_data
12206 member.
12207 (clear_inferiors): Free target_data member if set.
12208 (inferior_target_data, set_inferior_target_data): New functions.
12209 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12210 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12211 * linux-low.c (linux_bp_reinsert): New variable.
12212 (struct inferior_linux_data): New.
12213 (linux_create_inferior): Use set_inferior_target_data.
12214 (linux_attach): Likewise. Call add_inferior.
12215 (linux_wait_for_one_inferior): New function.
12216 (linux_wait): Call it.
12217 (linux_write_memory): Add const.
12218 (initialize_low): Call set_breakpoint_data.
12219 * linux-low.h (struct linux_target_ops): Add breakpoint
12220 handling members.
12221 * server.c (attach_inferior): Remove extra add_inferior
12222 call.
12223 * server.h: Include mem-break.h. Update inferior.c
12224 prototypes.
12225 * target.c (read_inferior_memory)
12226 (write_inferior_memory): New functions.
12227 * target.h (read_inferior_memory)
12228 (write_inferior_memory): Change macros to prototypes.
12229 (struct target_ops): Update comments. Add const to write_memory
12230 definition.
12231
12232 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12233
12234 * linux-low.c (usr_store_inferior_registers): Support
12235 registers which are allowed to fail to store.
12236 * linux-low.h (linux_target_ops): Likewise.
12237 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12238 (ppc_cannot_store_register): FPSCR may not be storable.
12239
12240 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12241
12242 * server.h: Include <string.h> if HAVE_STRING_H.
12243 * ChangeLog: Correct paths in last ChangeLog entry.
12244
12245 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12246
12247 * linux-low.h: Remove obsolete prototypes.
12248 (struct linux_target_ops): New.
12249 (extern the_low_target): New.
12250 * linux-low.c (num_regs, regmap): Remove declarations.
12251 (register_addr): Use the_low_target explicitly.
12252 (fetch_register): Likewise.
12253 (usr_fetch_inferior_registers): Likewise.
12254 (usr_store_inferior_registers): Likewise.
12255 * linux-arm-low.c (num_regs): Remove.
12256 (arm_num_regs): Define.
12257 (arm_regmap): Renamed from regmap, made static.
12258 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12259 made static.
12260 (arm_cannot_store_register): Renamed from cannot_store_register,
12261 made static.
12262 (the_low_target): New.
12263 * linux-i386-low.c (num_regs): Remove.
12264 (i386_num_regs): Define.
12265 (i386_regmap): Renamed from regmap, made static.
12266 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12267 made static.
12268 (i386_cannot_store_register): Renamed from cannot_store_register,
12269 made static.
12270 (the_low_target): New.
12271 * linux-ia64-low.c (num_regs): Remove.
12272 (ia64_num_regs): Define.
12273 (ia64_regmap): Renamed from regmap, made static.
12274 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12275 made static.
12276 (ia64_cannot_store_register): Renamed from cannot_store_register,
12277 made static.
12278 (the_low_target): New.
12279 * linux-m68k-low.c (num_regs): Remove.
12280 (m68k_num_regs): Define.
12281 (m68k_regmap): Renamed from regmap, made static.
12282 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12283 made static.
12284 (m68k_cannot_store_register): Renamed from cannot_store_register,
12285 made static.
12286 (the_low_target): New.
12287 * linux-mips-low.c (num_regs): Remove.
12288 (mips_num_regs): Define.
12289 (mips_regmap): Renamed from regmap, made static.
12290 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12291 made static.
12292 (mips_cannot_store_register): Renamed from cannot_store_register,
12293 made static.
12294 (the_low_target): New.
12295 * linux-ppc-low.c (num_regs): Remove.
12296 (ppc_num_regs): Define.
12297 (ppc_regmap): Renamed from regmap, made static.
12298 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12299 made static.
12300 (ppc_cannot_store_register): Renamed from cannot_store_register,
12301 made static.
12302 (the_low_target): New.
12303 * linux-s390-low.c (num_regs): Remove.
12304 (s390_num_regs): Define.
12305 (s390_regmap): Renamed from regmap, made static.
12306 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12307 made static.
12308 (s390_cannot_store_register): Renamed from cannot_store_register,
12309 made static.
12310 (the_low_target): New.
12311 * linux-sh-low.c (num_regs): Remove.
12312 (sh_num_regs): Define.
12313 (sh_regmap): Renamed from regmap, made static.
12314 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12315 made static.
12316 (sh_cannot_store_register): Renamed from cannot_store_register,
12317 made static.
12318 (the_low_target): New.
12319 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12320 (the_low_target): New.
12321
12322 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12323
12324 * Makefile.in: Add stamp-h target.
12325 * configure.in: Create stamp-h.
12326 * configure: Regenerated.
12327
12328 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12329
12330 * inferiors.c: New file.
12331 * target.c: New file.
12332 * target.h: New file.
12333 * Makefile.in: Add target.o and inferiors.o. Update
12334 dependencies.
12335 * linux-low.c (inferior_pid): New static variable,
12336 moved from server.c.
12337 (linux_create_inferior): Renamed from create_inferior.
12338 Call add_inferior. Return 0 on success instead of a PID.
12339 (linux_attach): Renamed from myattach.
12340 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12341 (linux_thread_alive): Renamed from mythread_alive.
12342 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12343 child dies.
12344 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12345 (regsets_store_inferior_registers): Correct error message.
12346 Add missing ``return 0''.
12347 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12348 (linux_store_registers): Renamed from store_inferior_registers.
12349 (linux_read_memory): Renamed from read_inferior_memory.
12350 (linux_write_memory): Renamed from write_inferior_memory.
12351 (linux_target_ops): New structure.
12352 (initialize_low): Call set_target_ops ().
12353 * remote-utils.c (unhexify): New function.
12354 (hexify): New function.
12355 (input_interrupt): Send signals to ``signal_pid''.
12356 * server.c (inferior_pid): Remove.
12357 (start_inferior): Update create_inferior call.
12358 (attach_inferior): Call add_inferior.
12359 (handle_query): New function.
12360 (main): Call handle_query for `q' packets.
12361 * server.h: Include "target.h". Remove obsolete prototypes.
12362 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12363
12364 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12365
12366 * Makefile.in: Add WARN_CFLAGS. Update configury
12367 dependencies.
12368 * configure.in: Check for <string.h>
12369 * configure: Regenerate.
12370 * config.in: Regenerate.
12371 * gdbreplay.c: Include needed system headers.
12372 (remote_open): Remove strchr prototype.
12373 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12374 * regcache.c (supply_register): Change buf argument to const void *.
12375 (supply_register_by_name): Likewise.
12376 (collect_register): Change buf argument to void *.
12377 (collect_register_by_name): Likewise.
12378 * regcache.h: Add missing prototypes.
12379 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12380 * server.c (handle_query): New function.
12381 (attached): New static variable, moved out of main.
12382 (main): Quiet longjmp clobber warnings.
12383 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12384 * utils.c (error): Remove NORETURN.
12385 (fatal): Likewise.
This page took 0.328292 seconds and 4 git commands to generate.