Move aarch64_relocate_instruction to arch/aarch64-insn.c
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-10-12 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5 (aarch64_relocate_instruction): Likewise.
6 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7 (struct aarch64_insn_visitor): Likewise.
8
9 2015-10-12 Yao Qi <yao.qi@linaro.org>
10
11 * linux-aarch64-low.c (struct aarch64_insn_data): New.
12 (struct aarch64_insn_visitor): New.
13 (struct aarch64_insn_relocation_data): New.
14 (aarch64_ftrace_insn_reloc_b): New function.
15 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
16 (aarch64_ftrace_insn_reloc_cb): Likewise.
17 (aarch64_ftrace_insn_reloc_tb): Likewise.
18 (aarch64_ftrace_insn_reloc_adr): Likewise.
19 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
20 (aarch64_ftrace_insn_reloc_others): Likewise.
21 (visitor): New.
22 (aarch64_relocate_instruction): Use visitor.
23
24 2015-10-12 Yao Qi <yao.qi@linaro.org>
25
26 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
27 int. Add argument buf.
28 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
29 aarch64_relocate_instruction.
30
31 2015-10-12 Yao Qi <yao.qi@linaro.org>
32
33 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
34 argument insn. Remove local variable insn. Don't call
35 target_read_uint32.
36 (aarch64_install_fast_tracepoint_jump_pad): Call
37 target_read_uint32.
38
39 2015-09-30 Yao Qi <yao.qi@linaro.org>
40
41 * linux-aarch64-low.c (emit_movk): Shorten a long line.
42 (emit_load_store_pair): Likewise.
43
44 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
45
46 * dll.c (match_dll): Add cast(s).
47 (unloaded_dll): Likewise.
48 * linux-low.c (second_thread_of_pid_p): Likewise.
49 (delete_lwp_callback): Likewise.
50 (count_events_callback): Likewise.
51 (select_event_lwp_callback): Likewise.
52 (linux_set_resume_request): Likewise.
53 * server.c (accumulate_file_name_length): Likewise.
54 (emit_dll_description): Likewise.
55 (handle_qxfer_threads_worker): Likewise.
56 (visit_actioned_threads): Likewise.
57 * thread-db.c (any_thread_of): Likewise.
58 * tracepoint.c (same_process_p): Likewise.
59 (match_blocktype): Likewise.
60 (build_traceframe_info_xml): Likewise.
61
62 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
63
64 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
65 assignment.
66 (gdb_unparse_agent_expr): Likewise.
67 * hostio.c (require_data): Likewise.
68 (handle_pread): Likewise.
69 * linux-low.c (disable_regset): Likewise.
70 (fetch_register): Likewise.
71 (store_register): Likewise.
72 (get_dynamic): Likewise.
73 (linux_qxfer_libraries_svr4): Likewise.
74 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
75 (set_fast_tracepoint_jump): Likewise.
76 (uninsert_fast_tracepoint_jumps_at): Likewise.
77 (reinsert_fast_tracepoint_jumps_at): Likewise.
78 (validate_inserted_breakpoint): Likewise.
79 (clone_agent_expr): Likewise.
80 * regcache.c (init_register_cache): Likewise.
81 * remote-utils.c (putpkt_binary_1): Likewise.
82 (decode_M_packet): Likewise.
83 (decode_X_packet): Likewise.
84 (look_up_one_symbol): Likewise.
85 (relocate_instruction): Likewise.
86 (monitor_output): Likewise.
87 * server.c (handle_search_memory): Likewise.
88 (handle_qxfer_exec_file): Likewise.
89 (handle_qxfer_libraries): Likewise.
90 (handle_qxfer): Likewise.
91 (handle_query): Likewise.
92 (handle_v_cont): Likewise.
93 (handle_v_run): Likewise.
94 (captured_main): Likewise.
95 * target.c (write_inferior_memory): Likewise.
96 * thread-db.c (try_thread_db_load_from_dir): Likewise.
97 * tracepoint.c (init_trace_buffer): Likewise.
98 (add_tracepoint_action): Likewise.
99 (add_traceframe): Likewise.
100 (add_traceframe_block): Likewise.
101 (cmd_qtdpsrc): Likewise.
102 (cmd_qtdv): Likewise.
103 (cmd_qtstatus): Likewise.
104 (response_source): Likewise.
105 (response_tsv): Likewise.
106 (cmd_qtnotes): Likewise.
107 (gdb_collect): Likewise.
108 (initialize_tracepoint): Likewise.
109
110 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
111
112 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
113 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
114 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
115 <NOP>: New.
116 (enum aarch64_condition_codes): New enum.
117 (w0): New static global.
118 (fp): Likewise.
119 (lr): Likewise.
120 (struct aarch64_memory_operand) <type>: New
121 MEMORY_OPERAND_POSTINDEX type.
122 (postindex_memory_operand): New helper function.
123 (emit_ret): New function.
124 (emit_load_store_pair): New function, factored out of emit_stp
125 with support for MEMORY_OPERAND_POSTINDEX.
126 (emit_stp): Rewrite using emit_load_store_pair.
127 (emit_ldp): New function.
128 (emit_load_store): Likewise.
129 (emit_ldr): Mention post-index instruction in comment.
130 (emit_ldrh): New function.
131 (emit_ldrb): New function.
132 (emit_ldrsw): Mention post-index instruction in comment.
133 (emit_str): Likewise.
134 (emit_subs): New function.
135 (emit_cmp): Likewise.
136 (emit_and): Likewise.
137 (emit_orr): Likewise.
138 (emit_orn): Likewise.
139 (emit_eor): Likewise.
140 (emit_mvn): Likewise.
141 (emit_lslv): Likewise.
142 (emit_lsrv): Likewise.
143 (emit_asrv): Likewise.
144 (emit_mul): Likewise.
145 (emit_sbfm): Likewise.
146 (emit_sbfx): Likewise.
147 (emit_ubfm): Likewise.
148 (emit_ubfx): Likewise.
149 (emit_csinc): Likewise.
150 (emit_cset): Likewise.
151 (emit_nop): Likewise.
152 (emit_ops_insns): New helper function.
153 (emit_pop): Likewise.
154 (emit_push): Likewise.
155 (aarch64_emit_prologue): New function.
156 (aarch64_emit_epilogue): Likewise.
157 (aarch64_emit_add): Likewise.
158 (aarch64_emit_sub): Likewise.
159 (aarch64_emit_mul): Likewise.
160 (aarch64_emit_lsh): Likewise.
161 (aarch64_emit_rsh_signed): Likewise.
162 (aarch64_emit_rsh_unsigned): Likewise.
163 (aarch64_emit_ext): Likewise.
164 (aarch64_emit_log_not): Likewise.
165 (aarch64_emit_bit_and): Likewise.
166 (aarch64_emit_bit_or): Likewise.
167 (aarch64_emit_bit_xor): Likewise.
168 (aarch64_emit_bit_not): Likewise.
169 (aarch64_emit_equal): Likewise.
170 (aarch64_emit_less_signed): Likewise.
171 (aarch64_emit_less_unsigned): Likewise.
172 (aarch64_emit_ref): Likewise.
173 (aarch64_emit_if_goto): Likewise.
174 (aarch64_emit_goto): Likewise.
175 (aarch64_write_goto_address): Likewise.
176 (aarch64_emit_const): Likewise.
177 (aarch64_emit_call): Likewise.
178 (aarch64_emit_reg): Likewise.
179 (aarch64_emit_pop): Likewise.
180 (aarch64_emit_stack_flush): Likewise.
181 (aarch64_emit_zero_ext): Likewise.
182 (aarch64_emit_swap): Likewise.
183 (aarch64_emit_stack_adjust): Likewise.
184 (aarch64_emit_int_call_1): Likewise.
185 (aarch64_emit_void_call_2): Likewise.
186 (aarch64_emit_eq_goto): Likewise.
187 (aarch64_emit_ne_goto): Likewise.
188 (aarch64_emit_lt_goto): Likewise.
189 (aarch64_emit_le_goto): Likewise.
190 (aarch64_emit_gt_goto): Likewise.
191 (aarch64_emit_ge_got): Likewise.
192 (aarch64_emit_ops_impl): New static global variable.
193 (aarch64_emit_ops): New target function, return
194 &aarch64_emit_ops_impl.
195 (struct linux_target_ops): Install it.
196
197 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
198
199 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
200 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
201 aarch64-ipa.o.
202 * linux-aarch64-ipa.c: New file.
203 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
204 and endian.h.
205 (aarch64_get_thread_area): New target method.
206 (extract_signed_bitfield): New helper function.
207 (aarch64_decode_ldr_literal): New function.
208 (enum aarch64_opcodes): New enum.
209 (struct aarch64_register): New struct.
210 (struct aarch64_operand): New struct.
211 (x0): New static global.
212 (x1): Likewise.
213 (x2): Likewise.
214 (x3): Likewise.
215 (x4): Likewise.
216 (w2): Likewise.
217 (ip0): Likewise.
218 (sp): Likewise.
219 (xzr): Likewise.
220 (aarch64_register): New helper function.
221 (register_operand): Likewise.
222 (immediate_operand): Likewise.
223 (struct aarch64_memory_operand): New struct.
224 (offset_memory_operand): New helper function.
225 (preindex_memory_operand): Likewise.
226 (enum aarch64_system_control_registers): New enum.
227 (ENCODE): New macro.
228 (emit_insn): New helper function.
229 (emit_b): New function.
230 (emit_bcond): Likewise.
231 (emit_cb): Likewise.
232 (emit_tb): Likewise.
233 (emit_blr): Likewise.
234 (emit_stp): Likewise.
235 (emit_ldp_q_offset): Likewise.
236 (emit_stp_q_offset): Likewise.
237 (emit_load_store): Likewise.
238 (emit_ldr): Likewise.
239 (emit_ldrsw): Likewise.
240 (emit_str): Likewise.
241 (emit_ldaxr): Likewise.
242 (emit_stxr): Likewise.
243 (emit_stlr): Likewise.
244 (emit_data_processing_reg): Likewise.
245 (emit_data_processing): Likewise.
246 (emit_add): Likewise.
247 (emit_sub): Likewise.
248 (emit_mov): Likewise.
249 (emit_movk): Likewise.
250 (emit_mov_addr): Likewise.
251 (emit_mrs): Likewise.
252 (emit_msr): Likewise.
253 (emit_sevl): Likewise.
254 (emit_wfe): Likewise.
255 (append_insns): Likewise.
256 (can_encode_int32_in): New helper function.
257 (aarch64_relocate_instruction): New function.
258 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
259 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
260 (struct linux_target_ops): Install aarch64_get_thread_area,
261 aarch64_install_fast_tracepoint_jump_pad and
262 aarch64_get_min_fast_tracepoint_insn_len.
263
264 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
265
266 * Makefile.in (aarch64-insn.o): New rule.
267 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
268
269 2015-09-21 Yao Qi <yao.qi@linaro.org>
270
271 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
272
273 2015-09-21 Yao Qi <yao.qi@linaro.org>
274
275 * tracepoint.c (max_jump_pad_size): Remove.
276
277 2015-09-18 Yao Qi <yao.qi@linaro.org>
278
279 * linux-aarch64-low.c: Don't include sys/uio.h.
280 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
281
282 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
283
284 * tracepoint.c (eval_result_type): Change prototype.
285 (condition_true_at_tracepoint): Fix argument to compiled_cond.
286
287 2015-09-15 Pedro Alves <palves@redhat.com>
288
289 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
290 Check whether to report exec events instead of checking whether
291 multiprocess is enabled.
292
293 2015-09-15 Pedro Alves <palves@redhat.com>
294
295 PR remote/18965
296 * remote-utils.c (prepare_resume_reply): Merge
297 TARGET_WAITKIND_VFORK_DONE switch case with the
298 TARGET_WAITKIND_FORKED case.
299
300 2015-09-15 Yao Qi <yao.qi@linaro.org>
301
302 * server.c (handle_query): Check string comparison using
303 "else if" instead of "if".
304
305 2015-09-15 Yao Qi <yao.qi@linaro.org>
306
307 * server.c (vCont_supported): New global variable.
308 (handle_query): Set vCont_supported to 1 if "vContSupported+"
309 matches. Append ";vContSupported+" to own_buf.
310 (handle_v_requests): Append ";s;S" to own_buf if target supports
311 hardware single step or vCont_supported is false.
312 (capture_main): Set vCont_supported to zero.
313
314 2015-09-15 Yao Qi <yao.qi@linaro.org>
315
316 * linux-low.c (linux_supports_conditional_breakpoints): Rename
317 it to ...
318 (linux_supports_hardware_single_step): ... New function.
319 (linux_target_ops): Update.
320 * lynx-low.c (lynx_target_ops): Set field
321 supports_hardware_single_step to target_can_do_hardware_single_step.
322 * nto-low.c (nto_target_ops): Likewise.
323 * spu-low.c (spu_target_ops): Likewise.
324 * win32-low.c (win32_target_ops): Likewise.
325 * target.c (target_can_do_hardware_single_step): New function.
326 * target.h (struct target_ops) <supports_conditional_breakpoints>:
327 Remove. <supports_hardware_single_step>: New field.
328 (target_supports_conditional_breakpoints): Remove.
329 (target_supports_hardware_single_step): New macro.
330 (target_can_do_hardware_single_step): Declare.
331 * server.c (handle_query): Use target_supports_hardware_single_step
332 instead of target_supports_conditional_breakpoints.
333
334 2015-09-15 Yao Qi <yao.qi@linaro.org>
335
336 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
337 function.
338 (struct linux_target_ops the_low_target): Install
339 aarch64_linux_siginfo_fixup.
340
341 2015-09-11 Don Breazeal <donb@codesourcery.com>
342 Luis Machado <lgustavo@codesourcery.com>
343
344 * linux-low.c (linux_mourn): Static declaration.
345 (linux_arch_setup): Move in front of
346 handle_extended_wait.
347 (linux_arch_setup_thread): New function.
348 (handle_extended_wait): Handle exec events. Call
349 linux_arch_setup_thread. Make event_lwp argument a
350 pointer-to-a-pointer.
351 (check_zombie_leaders): Do not check stopped threads.
352 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
353 (linux_low_filter_event): Add lwp and thread for exec'ing
354 non-leader thread if leader thread has been deleted.
355 Refactor code into linux_arch_setup_thread and call it.
356 Pass child lwp pointer by reference to handle_extended_wait.
357 (linux_wait_for_event_filtered): Update comment.
358 (linux_wait_1): Prevent clobbering exec event status.
359 (linux_supports_exec_events): New function.
360 (linux_target_ops) <supports_exec_events>: Initialize new member.
361 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
362 new member.
363 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
364 * server.c (report_exec_events): New global variable.
365 (handle_query): Handle qSupported query for exec-events feature.
366 (captured_main): Initialize report_exec_events.
367 * server.h (report_exec_events): Declare new global variable.
368 * target.h (struct target_ops) <supports_exec_events>: New
369 member.
370 (target_supports_exec_events): New macro.
371 * win32-low.c (win32_target_ops) <supports_exec_events>:
372 Initialize new member.
373
374 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
375
376 * linux-low.c (linux_low_enable_btrace): Remove.
377 (linux_target_ops): Replace linux_low_enable_btrace with
378 linux_enable_btrace.
379
380 2015-09-03 Yao Qi <yao.qi@linaro.org>
381
382 * linux-aarch64-low.c (aarch64_insert_point): Call
383 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
384 returns true.
385
386 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
387
388 * linux-low.c (check_stopped_by_breakpoint): Use
389 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
390
391 2015-08-27 Pedro Alves <palves@redhat.com>
392
393 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
394
395 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
396
397 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
398 the XNEW-family equivalent.
399 (compile_bytecodes): Likewise.
400 * dll.c (loaded_dll): Likewise.
401 * event-loop.c (append_callback_event): Likewise.
402 (create_file_handler): Likewise.
403 (create_file_event): Likewise.
404 * hostio.c (handle_open): Likewise.
405 * inferiors.c (add_thread): Likewise.
406 (add_process): Likewise.
407 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
408 * linux-arm-low.c (arm_new_process): Likewise.
409 (arm_new_thread): Likewise.
410 * linux-low.c (add_to_pid_list): Likewise.
411 (linux_add_process): Likewise.
412 (handle_extended_wait): Likewise.
413 (add_lwp): Likewise.
414 (enqueue_one_deferred_signal): Likewise.
415 (enqueue_pending_signal): Likewise.
416 (linux_resume_one_lwp_throw): Likewise.
417 (linux_resume_one_thread): Likewise.
418 (linux_read_memory): Likewise.
419 (linux_write_memory): Likewise.
420 * linux-mips-low.c (mips_linux_new_process): Likewise.
421 (mips_linux_new_thread): Likewise.
422 (mips_add_watchpoint): Likewise.
423 * linux-x86-low.c (initialize_low_arch): Likewise.
424 * lynx-low.c (lynx_add_process): Likewise.
425 * mem-break.c (set_raw_breakpoint_at): Likewise.
426 (set_breakpoint): Likewise.
427 (add_condition_to_breakpoint): Likewise.
428 (add_commands_to_breakpoint): Likewise.
429 (clone_agent_expr): Likewise.
430 (clone_one_breakpoint): Likewise.
431 * regcache.c (new_register_cache): Likewise.
432 * remote-utils.c (look_up_one_symbol): Likewise.
433 * server.c (queue_stop_reply): Likewise.
434 (start_inferior): Likewise.
435 (queue_stop_reply_callback): Likewise.
436 (handle_target_event): Likewise.
437 * spu-low.c (fetch_ppc_memory): Likewise.
438 (store_ppc_memory): Likewise.
439 * target.c (set_target_ops): Likewise.
440 * thread-db.c (thread_db_load_search): Likewise.
441 (try_thread_db_load_1): Likewise.
442 * tracepoint.c (add_tracepoint): Likewise.
443 (add_tracepoint_action): Likewise.
444 (create_trace_state_variable): Likewise.
445 (cmd_qtdpsrc): Likewise.
446 (cmd_qtro): Likewise.
447 (add_while_stepping_state): Likewise.
448 * win32-low.c (child_add_thread): Likewise.
449 (get_image_name): Likewise.
450
451 2015-08-25 Yao Qi <yao.qi@linaro.org>
452
453 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
454
455 2015-08-25 Yao Qi <yao.qi@linaro.org>
456
457 * Makefile.in (aarch64-linux.o): New rule.
458 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
459 srv_tgtobj.
460 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
461 (aarch64_init_debug_reg_state): Make it extern.
462 (aarch64_linux_prepare_to_resume): Remove.
463
464 2015-08-25 Yao Qi <yao.qi@linaro.org>
465
466 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
467 lwp_arch_private_info and ptid_of_lwp.
468
469 2015-08-25 Yao Qi <yao.qi@linaro.org>
470
471 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
472 Find proc_info by find_process_pid. All callers updated.
473
474 2015-08-25 Yao Qi <yao.qi@linaro.org>
475
476 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
477 Remove.
478 (debug_reg_change_callback): Remove.
479 (aarch64_notify_debug_reg_change): Remove.
480
481 2015-08-25 Yao Qi <yao.qi@linaro.org>
482
483 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
484 Call current_lwp_ptid.
485
486 2015-08-25 Yao Qi <yao.qi@linaro.org>
487
488 * linux-aarch64-low.c (debug_reg_change_callback): Use
489 debug_printf.
490
491 2015-08-25 Yao Qi <yao.qi@linaro.org>
492
493 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
494
495 2015-08-25 Yao Qi <yao.qi@linaro.org>
496
497 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
498
499 2015-08-25 Yao Qi <yao.qi@linaro.org>
500
501 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
502 the code.
503
504 2015-08-25 Yao Qi <yao.qi@linaro.org>
505
506 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
507 Remove.
508 (debug_reg_change_callback): Remove argument entry and add argument
509 lwp. Remove local variable thread. Don't print thread id in the
510 debugging output. Don't check whether pid of thread equals to pid.
511 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
512 iterate_over_lwps instead find_inferior.
513
514 2015-08-24 Pedro Alves <palves@redhat.com>
515
516 * inferiors.c (get_first_process): New function.
517 * inferiors.h (get_first_process): New declaration.
518 * remote-utils.c (read_ptid): Default to the first process in the
519 list, instead of to the current thread's process.
520
521 2015-08-24 Pedro Alves <palves@redhat.com>
522
523 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
524 * event-loop.c: Likewise.
525 * remote-utils.c: Likewise.
526 * tracepoint.c: Likewise.
527
528 2015-08-24 Pedro Alves <palves@redhat.com>
529
530 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
531 ptid_get_lwp.
532
533 2015-08-21 Pedro Alves <palves@redhat.com>
534
535 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
536 instead of literal 1.
537
538 2015-08-21 Pedro Alves <palves@redhat.com>
539
540 * tdesc.c (default_description): Explicitly zero-initialize.
541
542 2015-08-21 Pedro Alves <palves@redhat.com>
543
544 PR gdb/18749
545 * inferiors.c (remove_thread): Discard any pending stop reply for
546 this thread.
547 * server.c (remove_all_on_match_pid): Rename to ...
548 (remove_all_on_match_ptid): ... this. Work with a filter ptid
549 instead of a pid.
550 (discard_queued_stop_replies): Change parameter to a ptid. Now
551 extern.
552 (handle_v_kill, kill_inferior_callback, captured_main)
553 (process_serial_event): Adjust.
554 * server.h (discard_queued_stop_replies): Declare.
555
556 2015-08-21 Pedro Alves <palves@redhat.com>
557
558 * linux-low.c (wait_for_sigstop): Always switch to no thread
559 selected if the previously current thread dies.
560 * lynx-low.c (lynx_request_interrupt): Use the first thread's
561 process instead of the current thread's.
562 * remote-utils.c (input_interrupt): Don't check if there's no
563 current thread.
564 * server.c (gdb_read_memory, gdb_write_memory): If setting the
565 current thread to the general thread fails, error out.
566 (handle_qxfer_auxv, handle_qxfer_libraries)
567 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
568 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
569 (handle_query): Check if there's a thread selected instead of
570 checking whether there's any thread in the thread list.
571 (handle_qxfer_threads, handle_qxfer_btrace)
572 (handle_qxfer_btrace_conf): Don't error out early if there's no
573 thread in the thread list.
574 (handle_v_cont, myresume): Don't set the current thread to the
575 continue thread.
576 (process_serial_event) <Hg handling>: Also set thread_id if the
577 previous general thread is still alive.
578 (process_serial_event) <g/G handling>: If setting the current
579 thread to the general thread fails, error out.
580 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
581 thread's lwp instead of the current thread's.
582 * target.c (set_desired_thread): If the desired thread was not
583 found, leave the current thread pointing to NULL. Return an int
584 (boolean) indicating success.
585 * target.h (set_desired_thread): Change return type to int.
586
587 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
588
589 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
590 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
591 #includes.
592 (ps_get_thread_area): New function.
593
594 2015-08-19 Gary Benson <gbenson@redhat.com>
595
596 * hostio.c (handle_pread): Do not attempt to read more data
597 than hostio_reply_with_data can fit in a packet.
598
599 2015-08-18 Joel Brobecker <brobecker@adacore.com>
600
601 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
602
603 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
604
605 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
606
607 2015-08-06 Pedro Alves <palves@redhat.com>
608
609 * tracepoint.c (expr_eval_result): Now an int.
610
611 2015-08-06 Pedro Alves <palves@redhat.com>
612
613 * gdbthread.h (struct regcache): Forward declare.
614 (struct thread_info) <regcache_data>: Now a struct regcache
615 pointer.
616 * inferiors.c (inferior_regcache_data)
617 (set_inferior_regcache_data): Now work with struct regcache
618 pointers.
619 * inferiors.h (struct regcache): Forward declare.
620 (inferior_regcache_data, set_inferior_regcache_data): Now work
621 with struct regcache pointers.
622 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
623 (free_register_cache_thread): Remove struct regcache pointer
624 casts.
625
626 2015-08-06 Pedro Alves <palves@redhat.com>
627
628 * server.c (captured_main): On error, print the exception message
629 to stderr, and if run_once is set, throw a quit.
630
631 2015-08-06 Pedro Alves <palves@redhat.com>
632
633 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
634 the current thread.
635
636 2015-08-06 Pedro Alves <palves@redhat.com>
637
638 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
639 reading beyond the passed in buffer length.
640
641 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
642
643 * tracepoint.c (symbol_list) <required>: Remove.
644
645 2015-08-06 Pedro Alves <palves@redhat.com>
646
647 * linux-low.c (handle_extended_wait): Set the fork child's suspend
648 count if stopping and suspending threads.
649 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
650 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
651 (linux_detach): Complete an ongoing step-over.
652 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
653 throughout.
654 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
655 (linux_wait_1): If passing a signal to the inferior after
656 finishing a step-over, unsuspend and re-resume all lwps. If we
657 see a single-step event but the thread should be continuing, don't
658 pass the trap to gdb.
659 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
660 internal_error instead of gdb_assert.
661 (enqueue_pending_signal): New function.
662 (check_ptrace_stopped_lwp_gone): Add debug output.
663 (start_step_over): Use internal_error instead of gdb_assert.
664 (complete_ongoing_step_over): New function.
665 (linux_resume_one_thread): Don't resume a suspended thread.
666 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
667 it stepping.
668
669 2015-08-06 Pedro Alves <palves@redhat.com>
670
671 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
672 (linux_thread_alive): Use lwp_is_marked_dead.
673 (extended_event_reported): Delete.
674 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
675 instead of extended_event_reported.
676 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
677 as well.
678 (lwp_is_marked_dead): New function.
679 (lwp_running): Use lwp_is_marked_dead.
680 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
681 comment.
682
683 2015-08-06 Pedro Alves <palves@redhat.com>
684
685 * linux-low.c (linux_wait_1): Move fork event output out of the
686 !report_to_gdb check. Pass event_child->waitstatus to
687 target_waitstatus_to_string instead of ourstatus.
688
689 2015-08-04 Yao Qi <yao.qi@linaro.org>
690
691 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
692 if current_thread is 32 bit.
693
694 2015-08-04 Yao Qi <yao.qi@linaro.org>
695
696 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
697 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
698 * server.c (extended_protocol): Remove "static".
699 * server.h (extended_protocol): Declare it.
700
701 2015-08-04 Yao Qi <yao.qi@linaro.org>
702
703 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
704 both aarch64 and aarch32.
705 (aarch64_set_pc): Likewise.
706
707 2015-08-04 Yao Qi <yao.qi@linaro.org>
708
709 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
710 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
711 arm-with-neon.xml to srv_xmlfiles.
712 * linux-aarch64-low.c: Include linux-aarch32-low.h.
713 (is_64bit_tdesc): New function.
714 (aarch64_linux_read_description): New function.
715 (aarch64_arch_setup): Call aarch64_linux_read_description.
716 (regs_info): Rename to regs_info_aarch64.
717 (aarch64_regs_info): Return right regs_info.
718 (initialize_low_arch): Call initialize_low_arch_aarch32.
719
720 2015-08-04 Yao Qi <yao.qi@linaro.org>
721
722 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
723 * linux-aarch32-low.c: New file.
724 * linux-aarch32-low.h: New file.
725 * linux-arm-low.c (arm_fill_gregset): Move it to
726 linux-aarch32-low.c.
727 (arm_store_gregset): Likewise.
728 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
729 (arm_store_vfpregset): Call arm_store_vfpregset_num.
730 (arm_arch_setup): Check if PTRACE_GETREGSET works.
731 (regs_info): Rename to regs_info_arm.
732 (arm_regs_info): Return regs_info_aarch32 if
733 have_ptrace_getregset is 1 and target description is
734 arm_with_neon or arm_with_vfpv3.
735 (initialize_low_arch): Don't call init_registers_arm_with_neon.
736 Call initialize_low_arch_aarch32 instead.
737
738 2015-08-04 Yao Qi <yao.qi@linaro.org>
739
740 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
741 * linux-low.c: ... here.
742 * linux-low.h (have_ptrace_getregset): Declare it.
743
744 2015-08-04 Pedro Alves <palves@redhat.com>
745
746 * thread-db.c (struct thread_db): Use new typedefs.
747 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
748 CHK calls.
749 (disable_thread_event_reporting): Cast result of dlsym to
750 destination function pointer type.
751 (thread_db_mourn): Use td_ta_delete_ftype.
752
753 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
754
755 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
756 arch variant.
757 (CDX_BREAKPOINT): Define for R2.
758 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
759 (the_low_target): Add comments.
760
761 2015-07-30 Yao Qi <yao.qi@linaro.org>
762
763 * linux-arm-low.c (arm_hwcap): Remove it.
764 (arm_read_description): New local variable arm_hwcap. Don't
765 set arm_hwcap to zero.
766
767 2015-07-30 Yao Qi <yao.qi@linaro.org>
768
769 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
770 Use regcache->tdesc instead.
771 (arm_store_wmmxregset): Likewise.
772 (arm_fill_vfpregset): Likewise.
773 (arm_store_vfpregset): Likewise.
774
775 2015-07-30 Yao Qi <yao.qi@linaro.org>
776
777 * linux-arm-low.c: Include arch/arm.h.
778 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
779 (arm_store_gregset): Likewise.
780
781 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
782
783 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
784 ptrace's 4th parameter.
785
786 2015-07-27 Yao Qi <yao.qi@linaro.org>
787
788 * configure.srv (case aarch64*-*-linux*): Don't set
789 srv_linux_usrregs.
790
791 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
792
793 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
794 sys/ptrace.h.
795 * linux-arm-low.c: Likewise.
796 * linux-cris-low.c: Likewise.
797 * linux-crisv32-low.c: Likewise.
798 * linux-low.c: Likewise.
799 * linux-m68k-low.c: Likewise.
800 * linux-mips-low.c: Likewise.
801 * linux-nios2-low.c: Likewise.
802 * linux-s390-low.c: Likewise.
803 * linux-sparc-low.c: Likewise.
804 * linux-tic6x-low.c: Likewise.
805 * linux-tile-low.c: Likewise.
806 * linux-x86-low.c: Likewise.
807
808 2015-07-24 Pedro Alves <palves@redhat.com>
809
810 * config.in: Regenerate.
811 * configure: Regenerate.
812
813 2015-07-24 Pedro Alves <palves@redhat.com>
814
815 * acinclude.m4: Include ../ptrace.m4.
816 * configure.ac: Call GDB_AC_PTRACE.
817 * config.in, configure: Regenerate.
818
819 2015-07-24 Yao Qi <yao.qi@linaro.org>
820
821 * linux-low.c (linux_create_inferior): Remove setting to
822 proc->priv->new_inferior.
823 (linux_attach): Likewise.
824 (linux_low_filter_event): Likewise.
825 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
826
827 2015-07-24 Yao Qi <yao.qi@linaro.org>
828
829 * linux-low.c (linux_arch_setup): New function.
830 (linux_low_filter_event): If proc->tdesc is NULL and
831 proc->attached is true, call the_low_target.arch_setup.
832 Otherwise, keep status pending, and return.
833 (linux_resume_one_lwp_throw): Don't call get_pc if
834 thread->while_stepping isn't NULL. Don't call
835 get_thread_regcache if proc->tdesc is NULL.
836 (need_step_over_p): Return 0 if proc->tdesc is NULL.
837 (linux_target_ops): Install arch_setup.
838 * server.c (start_inferior): Call the_target->arch_setup.
839 * target.h (struct target_ops) <arch_setup>: New field.
840 (target_arch_setup): New marco.
841 * lynx-low.c (lynx_target_ops): Update.
842 * nto-low.c (nto_target_ops): Update.
843 * spu-low.c (spu_target_ops): Update.
844 * win32-low.c (win32_target_ops): Update.
845
846 2015-07-24 Yao Qi <yao.qi@linaro.org>
847
848 * linux-low.c (linux_add_process): Don't set
849 proc->priv->new_inferior.
850 (linux_create_inferior): Set proc->priv->new_inferior to 1.
851 (linux_attach): Likewise.
852
853 2015-07-24 Yao Qi <yao.qi@linaro.org>
854
855 * server.c (start_inferior): Code refactor.
856
857 2015-07-24 Yao Qi <yao.qi@linaro.org>
858
859 * server.c (process_serial_event): Set general_thread.
860
861 2015-07-21 Yao Qi <yao.qi@linaro.org>
862
863 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
864 aarch64_linux_get_debug_reg_capacity.
865
866 2015-07-17 Yao Qi <yao.qi@linaro.org>
867
868 * Makefile.in (aarch64-linux-hw-point.o): New rule.
869 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
870 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
871 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
872 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
873 (AARCH64_HWP_ALIGNMENT): Likewise.
874 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
875 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
876 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
877 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
878 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
879 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
880 (struct aarch64_debug_reg_state): Likewise.
881 (struct arch_lwp_info): Likewise.
882 (aarch64_align_watchpoint): Likewise.
883 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
884 (aarch64_watchpoint_length): Likewise.
885 (aarch64_point_encode_ctrl_reg): Likewise
886 (aarch64_point_is_aligned): Likewise.
887 (aarch64_align_watchpoint): Likewise.
888 (aarch64_linux_set_debug_regs):
889 (aarch64_dr_state_insert_one_point): Likewise.
890 (aarch64_dr_state_remove_one_point): Likewise.
891 (aarch64_handle_breakpoint): Likewise.
892 (aarch64_handle_aligned_watchpoint): Likewise.
893 (aarch64_handle_unaligned_watchpoint): Likewise.
894 (aarch64_handle_watchpoint): Likewise.
895
896 2015-07-17 Yao Qi <yao.qi@linaro.org>
897
898 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
899 and don't aarch64_get_debug_reg_state. All callers update.
900 (aarch64_handle_aligned_watchpoint): Likewise.
901 (aarch64_handle_unaligned_watchpoint): Likewise.
902 (aarch64_handle_watchpoint): Likewise.
903 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
904 (aarch64_remove_point): Likewise.
905
906 2015-07-17 Yao Qi <yao.qi@linaro.org>
907
908 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
909 debug_printf.
910 (aarch64_handle_unaligned_watchpoint): Likewise.
911
912 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
913
914 Revert the previous 3 commits:
915 Move gdb_regex* to common/
916 Move linux_find_memory_regions_full & co.
917 gdbserver build-id attribute generator
918
919 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
920 Jan Kratochvil <jan.kratochvil@redhat.com>
921
922 gdbserver build-id attribute generator.
923 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
924 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
925 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
926 (find_phdr): New.
927 (get_dynamic): Use find_pdhr to traverse program headers.
928 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
929 (compare_mapping_entry_range, struct find_memory_region_callback_data)
930 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
931 (get_hex_build_id): New.
932 (linux_qxfer_libraries_svr4): Add optional build-id attribute
933 to reply XML document.
934
935 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
936 Jan Kratochvil <jan.kratochvil@redhat.com>
937
938 * target.c: Include target/target-utils.h and fcntl.h.
939 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
940 (target_fileio_read_stralloc): New functions.
941
942 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
943
944 * Makefile.in (OBS): Add gdb_regex.o.
945 (gdb_regex.o): New.
946 * config.in: Rebuilt.
947 * configure: Rebuilt.
948
949 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
950 Jan Kratochvil <jan.kratochvil@redhat.com>
951
952 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
953 * Makefile.in (OBS): Add target-utils.o.
954 (linux-maps.o, target-utils.o): New.
955 * configure.srv (srv_linux_obj): Add linux-maps.o.
956
957 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
958
959 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
960 function, return 1.
961 (the_low_target): Install it.
962
963 2015-07-14 Pedro Alves <palves@redhat.com>
964
965 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
966 Instead, ignore ECHILD, and throw an error for other errnos.
967
968 2015-07-10 Pedro Alves <palves@redhat.com>
969
970 * event-loop.c (struct callback_event) <data>: Change type to
971 gdb_client_data instance instead of gdb_client_data pointer.
972 (append_callback_event): Adjust.
973
974 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
975
976 * linux-aarch64-low.c: Add comments for each linux_target_ops
977 method. Remove comments already covered in target_ops and
978 linux_target_ops definitions.
979 (the_low_target): Add comments for each unimplemented method.
980
981 2015-07-09 Yao Qi <yao.qi@linaro.org>
982
983 * linux-aarch64-low.c (aarch64_regmap): Remove.
984 (aarch64_usrregs_info): Remove.
985 (regs_info): Set field usrregs to NULL.
986
987 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
988
989 * linux-low.c: Include "rsp-low.h"
990 (linux_low_encode_pt_config, linux_low_encode_raw): New.
991 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
992 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
993 (handle_btrace_enable_pt): New.
994 (handle_btrace_general_set): Support "pt".
995 (handle_btrace_conf_general_set): Support "pt:size".
996
997 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
998
999 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1000 Z_PACKET_SW_BP.
1001
1002 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1003
1004 * linux-aarch64-low.c: Remove comment about endianness.
1005 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1006 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1007 memcmp.
1008
1009 2015-06-24 Gary Benson <gbenson@redhat.com>
1010
1011 * linux-i386-ipa.c (stdint.h): Do not include.
1012 * lynx-i386-low.c (stdint.h): Likewise.
1013 * lynx-ppc-low.c (stdint.h): Likewise.
1014 * mem-break.c (stdint.h): Likewise.
1015 * thread-db.c (stdint.h): Likewise.
1016 * tracepoint.c (stdint.h): Likewise.
1017 * win32-low.c (stdint.h): Likewise.
1018
1019 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1020
1021 * server.c (write_qxfer_response): Update call to
1022 remote_escape_output.
1023
1024 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1025 Jan Kratochvil <jan.kratochvil@redhat.com>
1026
1027 Merge multiple hex conversions.
1028 * gdbreplay.c (tohex): Rename to 'fromhex'.
1029 (logchar): Use fromhex.
1030
1031 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1032
1033 * server.c (handle_qxfer_libraries): Set `version' attribute for
1034 <library-list>.
1035
1036 2015-06-10 Gary Benson <gbenson@redhat.com>
1037
1038 * target.h (struct target_ops) <multifs_open>: New field.
1039 <multifs_unlink>: Likewise.
1040 <multifs_readlink>: Likewise.
1041 * linux-low.c (nat/linux-namespaces.h): New include.
1042 (linux_target_ops): Initialize the_target->multifs_open,
1043 the_target->multifs_unlink and the_target->multifs_readlink.
1044 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1045 * hostio.c (hostio_fs_pid): New static variable.
1046 (hostio_handle_new_gdb_connection): New function.
1047 (handle_setfs): Likewise.
1048 (handle_open): Use the_target->multifs_open as appropriate.
1049 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1050 (handle_readlink): Use the_target->multifs_readlink as
1051 appropriate.
1052 (handle_vFile): Handle vFile:setfs packets.
1053 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1054 after target_handle_new_gdb_connection.
1055
1056 2015-06-10 Gary Benson <gbenson@redhat.com>
1057
1058 * configure.ac (AC_CHECK_FUNCS): Add setns.
1059 * config.in: Regenerate.
1060 * configure: Likewise.
1061 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1062 (linux-namespaces.o): New rule.
1063 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1064
1065 2015-06-09 Gary Benson <gbenson@redhat.com>
1066
1067 * hostio.c (handle_open): Process mode argument with
1068 fileio_to_host_mode.
1069
1070 2015-06-01 Yao Qi <yao.qi@linaro.org>
1071
1072 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1073 * linux-x86-low.c: Likewise.
1074
1075 2015-05-28 Don Breazeal <donb@codesourcery.com>
1076
1077 * linux-low.c (handle_extended_wait): Initialize
1078 thread_info.last_resume_kind for new fork children.
1079
1080 2015-05-15 Pedro Alves <palves@redhat.com>
1081
1082 * target.h (target_handle_new_gdb_connection): Rewrite using if
1083 wrapped in do/while.
1084
1085 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1086
1087 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1088 * configure, config.in: Regenerate.
1089 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1090 Declare typedef.
1091
1092 2015-05-12 Don Breazeal <donb@codesourcery.com>
1093
1094 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1095 PTRACE_EVENT_VFORK_DONE.
1096 (linux_low_ptrace_options, extended_event_reported): Add vfork
1097 events.
1098 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1099 and "vforkdone" for RSP 'T' Stop Reply Packet.
1100 * server.h (report_vfork_events): Declare
1101 global variable.
1102
1103 2015-05-12 Don Breazeal <donb@codesourcery.com>
1104
1105 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1106 (the_low_target) <new_fork>: Initialize new member.
1107 * linux-arm-low.c (arm_new_fork): New function.
1108 (the_low_target) <new_fork>: Initialize new member.
1109 * linux-low.c (handle_extended_wait): Call new target function
1110 new_fork.
1111 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1112 * linux-mips-low.c (mips_add_watchpoint): New function
1113 extracted from mips_insert_point.
1114 (the_low_target) <new_fork>: Initialize new member.
1115 (mips_linux_new_fork): New function.
1116 (mips_insert_point): Call mips_add_watchpoint.
1117 * linux-x86-low.c (x86_linux_new_fork): New function.
1118 (the_low_target) <new_fork>: Initialize new member.
1119
1120 2015-05-12 Don Breazeal <donb@codesourcery.com>
1121
1122 * linux-low.c (handle_extended_wait): Implement return value,
1123 rename argument 'event_child' to 'event_lwp', handle
1124 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1125 (linux_low_ptrace_options): New function.
1126 (linux_low_filter_event): Call linux_low_ptrace_options,
1127 use different argument fo linux_enable_event_reporting,
1128 use return value from handle_extended_wait.
1129 (extended_event_reported): New function.
1130 (linux_wait_1): Call extended_event_reported and set
1131 status to report fork events.
1132 (linux_write_memory): Add pid to debug message.
1133 (reset_lwp_ptrace_options_callback): New function.
1134 (linux_handle_new_gdb_connection): New function.
1135 (linux_target_ops): Initialize new structure member.
1136 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1137 * lynx-low.c: Initialize new structure member.
1138 * remote-utils.c (prepare_resume_reply): Implement stop reason
1139 "fork" for "T" stop message.
1140 * server.c (handle_query): Call handle_new_gdb_connection.
1141 * server.h (report_fork_events): Declare global flag.
1142 * target.h (struct target_ops) <handle_new_gdb_connection>:
1143 New member.
1144 (target_handle_new_gdb_connection): New macro.
1145 * win32-low.c: Initialize new structure member.
1146
1147 2015-05-12 Don Breazeal <donb@codesourcery.com>
1148
1149 * mem-break.c (APPEND_TO_LIST): Define macro.
1150 (clone_agent_expr): New function.
1151 (clone_one_breakpoint): New function.
1152 (clone_all_breakpoints): New function.
1153 * mem-break.h: Declare new functions.
1154
1155 2015-05-12 Don Breazeal <donb@codesourcery.com>
1156
1157 * linux-low.c (linux_supports_fork_events): New function.
1158 (linux_supports_vfork_events): New function.
1159 (linux_target_ops): Initialize new structure members.
1160 (initialize_low): Call linux_check_ptrace_features.
1161 * lynx-low.c (lynx_target_ops): Initialize new structure
1162 members.
1163 * server.c (report_fork_events, report_vfork_events):
1164 New global flags.
1165 (handle_query): Add new features to qSupported packet and
1166 response.
1167 (captured_main): Initialize new global variables.
1168 * target.h (struct target_ops) <supports_fork_events>:
1169 New member.
1170 <supports_vfork_events>: New member.
1171 (target_supports_fork_events): New macro.
1172 (target_supports_vfork_events): New macro.
1173 * win32-low.c (win32_target_ops): Initialize new structure
1174 members.
1175
1176 2015-05-12 Gary Benson <gbenson@redhat.com>
1177
1178 * server.c (handle_qxfer_exec_file): Use current process
1179 if annex is empty.
1180
1181 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1182
1183 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1184 Remove HAVE_PTRACE_GETREGS conditionals.
1185 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1186 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1187
1188 2015-05-08 Yao Qi <yao.qi@linaro.org>
1189
1190 * linux-low.c (linux_supports_conditional_breakpoints): New
1191 function.
1192 (linux_target_ops): Install new target method.
1193 * lynx-low.c (lynx_target_ops): Install NULL hook for
1194 supports_conditional_breakpoints.
1195 * nto-low.c (nto_target_ops): Likewise.
1196 * spu-low.c (spu_target_ops): Likewise.
1197 * win32-low.c (win32_target_ops): Likewise.
1198 * server.c (handle_query): Check
1199 target_supports_conditional_breakpoints.
1200 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1201 New field.
1202 (target_supports_conditional_breakpoints): New macro.
1203
1204 2015-05-06 Pedro Alves <palves@redhat.com>
1205
1206 PR server/18081
1207 * server.c (start_inferior): If the process exits, mourn it.
1208
1209 2015-04-21 Gary Benson <gbenson@redhat.com>
1210
1211 * hostio.c (fileio_open_flags_to_host): Factored out to
1212 fileio_to_host_openflags in common/fileio.c. Single use
1213 updated.
1214
1215 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1216
1217 * linux-xtensa-low.c (xtensa_fill_gregset)
1218 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1219 XCHAL_HAVE_LOOP.
1220
1221 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1222
1223 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1224 (regs_info): Replace usrregs pointer with NULL.
1225
1226 2015-04-17 Gary Benson <gbenson@redhat.com>
1227
1228 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1229 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1230 * server.c (handle_qxfer_exec_file): New function.
1231 (qxfer_packets): Add exec-file entry.
1232 (handle_query): Report qXfer:exec-file:read as supported packet.
1233
1234 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1235
1236 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1237
1238 2015-04-09 Gary Benson <gbenson@redhat.com>
1239
1240 * hostio-errno.c (errno_to_fileio_error): Remove function.
1241 Update caller to use remote_fileio_to_fio_error.
1242
1243 2015-04-09 Yao Qi <yao.qi@linaro.org>
1244
1245 * linux-low.c (linux_insert_point): Call
1246 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1247 (linux_remove_point): Call remove_memory_breakpoint if type is
1248 raw_bkpt_type_sw.
1249 * linux-x86-low.c (x86_insert_point): Don't call
1250 insert_memory_breakpoint.
1251 (x86_remove_point): Don't call remove_memory_breakpoint.
1252
1253 2015-04-01 Pedro Alves <palves@redhat.com>
1254 Cleber Rosa <crosa@redhat.com>
1255
1256 * server.c (gdbserver_usage): Reorganize and extend the usage
1257 message.
1258
1259 2015-03-24 Pedro Alves <palves@redhat.com>
1260
1261 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1262 output. Also dump TRAP_TRACE.
1263 (linux_low_filter_event): In debug output, distinguish a
1264 resume_stop SIGSTOP from a delayed SIGSTOP.
1265
1266 2015-03-24 Gary Benson <gbenson@redhat.com>
1267
1268 * linux-x86-low.c (x86_linux_new_thread): Moved to
1269 nat/x86-linux.c.
1270 (x86_linux_prepare_to_resume): Likewise.
1271
1272 2015-03-24 Gary Benson <gbenson@redhat.com>
1273
1274 * Makefile.in (x86-linux-dregs.o): New rule.
1275 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1276 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1277 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1278 (x86_linux_dr_get): Likewise.
1279 (x86_linux_dr_set): Likewise.
1280 (update_debug_registers_callback): Likewise.
1281 (x86_linux_dr_set_addr): Likewise.
1282 (x86_linux_dr_get_addr): Likewise.
1283 (x86_linux_dr_set_control): Likewise.
1284 (x86_linux_dr_get_control): Likewise.
1285 (x86_linux_dr_get_status): Likewise.
1286 (x86_linux_update_debug_registers): Likewise.
1287
1288 2015-03-24 Gary Benson <gbenson@redhat.com>
1289
1290 * linux-x86-low.c (x86_linux_update_debug_registers):
1291 New function, factored out from...
1292 (x86_linux_prepare_to_resume): ...this.
1293
1294 2015-03-24 Gary Benson <gbenson@redhat.com>
1295
1296 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1297 (x86_linux_dr_set): Likewise.
1298 (update_debug_registers_callback): Likewise.
1299 (x86_linux_dr_set_addr): Likewise.
1300 (x86_linux_dr_get_addr): Likewise.
1301 (x86_linux_dr_set_control): Likewise.
1302 (x86_linux_dr_get_control): Likewise.
1303 (x86_linux_dr_get_status): Likewise.
1304 (x86_linux_prepare_to_resume): Likewise.
1305
1306 2015-03-24 Gary Benson <gbenson@redhat.com>
1307
1308 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1309 Use perror_with_name. Pass string through gettext.
1310 (x86_linux_dr_set): Likewise.
1311
1312 2015-03-24 Gary Benson <gbenson@redhat.com>
1313
1314 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1315 (x86_linux_dr_set_addr): ...this.
1316 (x86_dr_low_get_addr): Rename to...
1317 (x86_linux_dr_get_addr): ...this.
1318 (x86_dr_low_set_control): Rename to...
1319 (x86_linux_dr_set_control): ...this.
1320 (x86_dr_low_get_control): Rename to...
1321 (x86_linux_dr_get_control): ...this.
1322 (x86_dr_low_get_status): Rename to...
1323 (x86_linux_dr_get_status): ...this.
1324 (x86_dr_low): Update with new function names.
1325
1326 2015-03-24 Gary Benson <gbenson@redhat.com>
1327
1328 * Makefile.in (x86-linux.o): New rule.
1329 * configure.srv: Add x86-linux.o to relevant targets.
1330 * linux-low.c (lwp_set_arch_private_info): New function.
1331 (lwp_arch_private_info): Likewise.
1332 * linux-x86-low.c: Include nat/x86-linux.h.
1333 (arch_lwp_info): Removed structure.
1334 (update_debug_registers_callback):
1335 Use lwp_set_debug_registers_changed.
1336 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1337 and lwp_set_debug_registers_changed.
1338 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1339
1340 2015-03-24 Gary Benson <gbenson@redhat.com>
1341
1342 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1343 * linux-arm-low.c (arm_new_thread): Likewise.
1344 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1345 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1346 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1347 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1348
1349 2015-03-24 Gary Benson <gbenson@redhat.com>
1350
1351 * linux-low.c (ptid_of_lwp): New function.
1352 (lwp_is_stopped): Likewise.
1353 (lwp_stop_reason): Likewise.
1354 * linux-x86-low.c (update_debug_registers_callback):
1355 Use lwp_is_stopped.
1356 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1357 lwp_stop_reason.
1358
1359 2015-03-24 Gary Benson <gbenson@redhat.com>
1360
1361 * linux-low.h (linux_stop_lwp): Remove declaration.
1362
1363 2015-03-24 Gary Benson <gbenson@redhat.com>
1364
1365 * linux-low.h: Include nat/linux-nat.h.
1366 * linux-low.c (iterate_over_lwps_args): New structure.
1367 (iterate_over_lwps_filter): New function.
1368 (iterate_over_lwps): Likewise.
1369 * linux-x86-low.c (update_debug_registers_callback):
1370 Update signature to what iterate_over_lwps expects.
1371 Remove PID check that iterate_over_lwps now performs.
1372 (x86_dr_low_set_addr): Use iterate_over_lwps.
1373 (x86_dr_low_set_control): Likewise.
1374
1375 2015-03-24 Gary Benson <gbenson@redhat.com>
1376
1377 * linux-x86-low.c (x86_debug_reg_state): New function.
1378 (x86_linux_prepare_to_resume): Use the above.
1379
1380 2015-03-24 Gary Benson <gbenson@redhat.com>
1381
1382 * linux-low.c (current_lwp_ptid): New function.
1383 * linux-x86-low.c: Include nat/linux-nat.h.
1384 (x86_dr_low_get_addr): Use current_lwp_ptid.
1385 (x86_dr_low_get_control): Likewise.
1386 (x86_dr_low_get_status): Likewise.
1387
1388 2015-03-20 Pedro Alves <palves@redhat.com>
1389
1390 * tracepoint.c (cmd_qtstatus): Make "str" const.
1391
1392 2015-03-20 Pedro Alves <palves@redhat.com>
1393
1394 * server.c (handle_general_set): Make "req_str" const.
1395
1396 2015-03-19 Pedro Alves <palves@redhat.com>
1397
1398 * linux-low.c (linux_resume_one_lwp): Rename to ...
1399 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1400 instead call perror_with_name.
1401 (check_ptrace_stopped_lwp_gone): New function.
1402 (linux_resume_one_lwp): Reimplement as wrapper around
1403 linux_resume_one_lwp_throw that swallows errors if the LWP is
1404 gone.
1405
1406 2015-03-19 Pedro Alves <palves@redhat.com>
1407
1408 * linux-low.c (count_events_callback, select_event_lwp_callback):
1409 No longer check whether the thread has resume_stop as last resume
1410 kind.
1411
1412 2015-03-19 Pedro Alves <palves@redhat.com>
1413
1414 * linux-low.c (count_events_callback, select_event_lwp_callback):
1415 Use the lwp's status_pending_p field, not the thread's.
1416
1417 2015-03-19 Pedro Alves <palves@redhat.com>
1418
1419 * linux-low.c (select_event_lwp_callback): Update comments to
1420 no longer mention SIGTRAP.
1421
1422 2015-03-18 Gary Benson <gbenson@redhat.com>
1423
1424 * server.c (handle_query): Do not report vFile:fstat as supported.
1425
1426 2015-03-11 Gary Benson <gbenson@redhat.com>
1427
1428 * hostio.c (sys/types.h): New include.
1429 (sys/stat.h): Likewise.
1430 (common-remote-fileio.h): Likewise.
1431 (handle_fstat): New function.
1432 (handle_vFile): Handle vFile:fstat packets.
1433
1434 2015-03-11 Gary Benson <gbenson@redhat.com>
1435
1436 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1437 struct stat.st_blocks and struct stat.st_blksize.
1438 * configure: Regenerate.
1439 * config.in: Likewise.
1440 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1441 (OBS): Add common-remote-fileio.o.
1442 (common-remote-fileio.o): New rule.
1443
1444 2015-03-09 Pedro Alves <palves@redhat.com>
1445
1446 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1447 'struct sockaddr' pointer in 'accept' call.
1448
1449 2015-03-09 Pedro Alves <palves@redhat.com>
1450
1451 Revert:
1452 2015-03-07 Pedro Alves <palves@redhat.com>
1453 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1454 or <winsock2.h> here. Instead include "gdb_socket.h".
1455 (remote_open): Use union gdb_sockaddr_u.
1456 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1457 or <winsock2.h> here. Instead include "gdb_socket.h".
1458 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1459 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1460 or <sys/un.h>.
1461 (init_named_socket, gdb_agent_helper_thread): Use union
1462 gdb_sockaddr_u.
1463
1464 2015-03-07 Pedro Alves <palves@redhat.com>
1465
1466 * configure.ac (build_warnings): Move
1467 -Wdeclaration-after-statement to the C-specific set.
1468 * configure: Regenerate.
1469
1470 2015-03-07 Pedro Alves <palves@redhat.com>
1471
1472 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1473 or <winsock2.h> here. Instead include "gdb_socket.h".
1474 (remote_open): Use union gdb_sockaddr_u.
1475 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1476 or <winsock2.h> here. Instead include "gdb_socket.h".
1477 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1478 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1479 or <sys/un.h>.
1480 (init_named_socket, gdb_agent_helper_thread): Use union
1481 gdb_sockaddr_u.
1482
1483 2015-03-07 Pedro Alves <palves@redhat.com>
1484
1485 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1486 instead.
1487
1488 2015-03-06 Yao Qi <yao.qi@linaro.org>
1489
1490 * linux-aarch64-low.c (aarch64_insert_point): Use
1491 show_debug_regs as a boolean.
1492 (aarch64_remove_point): Likewise.
1493
1494 2015-03-05 Pedro Alves <palves@redhat.com>
1495
1496 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1497 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1498 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1499 * nto-low.c (nto_target_ops): Likewise.
1500 * spu-low.c (spu_target_ops): Likewise.
1501 * win32-low.c (win32_target_ops): Likewise.
1502
1503 2015-03-04 Pedro Alves <palves@redhat.com>
1504
1505 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1506 Decide whether a breakpoint triggered based on the SIGTRAP's
1507 siginfo.si_code.
1508 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1509 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1510 (linux_low_filter_event): Check for breakpoints before checking
1511 watchpoints.
1512 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1513 siginfo.si_code.
1514 (linux_stopped_by_sw_breakpoint)
1515 (linux_supports_stopped_by_sw_breakpoint)
1516 (linux_stopped_by_hw_breakpoint)
1517 (linux_supports_stopped_by_hw_breakpoint): New functions.
1518 (linux_target_ops): Install new target methods.
1519
1520 2015-03-04 Pedro Alves <palves@redhat.com>
1521
1522 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1523 * server.c (swbreak_feature, hwbreak_feature): New globals.
1524 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1525 (captured_main): Clear swbreak_feature and hwbreak_feature.
1526 * server.h (swbreak_feature, hwbreak_feature): Declare.
1527 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1528 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1529 supports_stopped_by_hw_breakpoint>: New fields.
1530 (target_supports_stopped_by_sw_breakpoint)
1531 (target_stopped_by_sw_breakpoint)
1532 (target_supports_stopped_by_hw_breakpoint)
1533 (target_stopped_by_hw_breakpoint): Declare.
1534
1535 2015-03-04 Pedro Alves <palves@redhat.com>
1536
1537 enum lwp_stop_reason -> enum target_stop_reason
1538 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1539 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1540 (linux_wait_1, stuck_in_jump_pad_callback)
1541 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1542 (linux_stopped_by_watchpoint):
1543 * linux-low.h (enum lwp_stop_reason): Delete.
1544 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1545 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1546
1547 2015-03-04 Yao Qi <yao.qi@linaro.org>
1548
1549 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1550
1551 2015-03-03 Gary Benson <gbenson@redhat.com>
1552
1553 * hostio.c (handle_vFile): Fix prefix lengths.
1554
1555 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1556
1557 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1558 ptr_bits.
1559
1560 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1561
1562 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1563 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1564 (clean): Add "rm -f" for above C files.
1565 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1566 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1567 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1568 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1569 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1570 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1571 (init_registers_s390x_vx_linux64)
1572 (init_registers_s390x_tevx_linux64)
1573 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1574 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1575 declarations.
1576 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1577 (s390_store_vxrs_high): New functions.
1578 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1579 NT_S390_VXRS_HIGH.
1580 (s390_arch_setup): Add logic for selecting one of the new target
1581 descriptions. Activate the new vector regsets if applicable.
1582 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1583 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1584 and init_registers_s390x_tevx_linux64.
1585
1586 2015-03-01 Pedro Alves <palves@redhat.com>
1587
1588 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1589 parameter.
1590
1591 2015-02-27 Pedro Alves <palves@redhat.com>
1592
1593 * linux-x86-low.c (u_debugreg_offset): New function.
1594 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1595
1596 2015-02-27 Pedro Alves <palves@redhat.com>
1597
1598 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1599 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1600 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1601 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1602 (ps_lsetfpregs, ps_getpid)
1603 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1604 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1605 (ps_lsetxregs, ps_plog): Declare.
1606
1607 2015-02-27 Pedro Alves <palves@redhat.com>
1608
1609 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1610 IP_AGENT_EXPORT_FUNC.
1611 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1612 IP_AGENT_EXPORT_FUNC.
1613 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1614 (IP_AGENT_EXPORT): Delete.
1615 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1616 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1617 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1618 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1619 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1620 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1621 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1622 (traceframe_read_count, traceframe_write_count)
1623 (traceframes_created, trace_state_variables, get_raw_reg)
1624 (get_trace_state_variable_value, set_trace_state_variable_value)
1625 (ust_loaded, helper_thread_id, cmd_buf): Use
1626 IPA_SYM_EXPORTED_NAME.
1627 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1628 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1629 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1630 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1631 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1632 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1633 EXTERN_C_PUSH/EXTERN_C_POP.
1634 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1635 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1636 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1637 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1638 (traceframe_write_count, traceframe_read_count)
1639 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1640 (about_to_request_buffer_space, get_trace_state_variable_value)
1641 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1642 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1643 EXTERN_C_PUSH/EXTERN_C_POP.
1644 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1645 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1646 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1647 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1648 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1649 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1650 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1651 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1652 Define.
1653 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1654 (IP_AGENT_EXPORT_VAR_DECL): Define.
1655 (tracing): Declare.
1656 (gdb_agent_get_raw_reg): Declare.
1657
1658 2015-02-27 Tom Tromey <tromey@redhat.com>
1659 Pedro Alves <palves@redhat.com>
1660
1661 Rename symbols whose names are reserved C++ keywords throughout.
1662
1663 2015-02-27 Pedro Alves <palves@redhat.com>
1664
1665 * Makefile.in (COMPILER): New, get it from autoconf.
1666 (CXX): Get from autoconf instead.
1667 (COMPILE.pre): Use COMPILER.
1668 (CC-LD): Rename to ...
1669 (CC_LD): ... this. Use COMPILER.
1670 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1671 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1672 * acinclude.m4: Include build-with-cxx.m4.
1673 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1674 Disable -Werror by default if building in C++ mode.
1675 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1676 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1677 the C++ compiler. Save/restore CXXFLAGS too.
1678 * configure: Regenerate.
1679
1680 2015-02-27 Pedro Alves <palves@redhat.com>
1681
1682 * acinclude.m4: Include libiberty.m4.
1683 * configure.ac: Call libiberty_INIT.
1684 * config.in, configure: Regenerate.
1685
1686 2015-02-26 Pedro Alves <palves@redhat.com>
1687
1688 * linux-low.c (linux_wait_1): When incrementing the PC past a
1689 program breakpoint always use the_low_target.breakpoint_len as
1690 increment, rather than the maximum between that and
1691 the_low_target.decr_pc_after_break.
1692
1693 2015-02-23 Pedro Alves <palves@redhat.com>
1694
1695 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1696 thread was doing a step-over; always adjust the PC if
1697 we stepped over a permanent breakpoint.
1698 (linux_wait_1): If we stepped over breakpoint that was on top of a
1699 permanent breakpoint, manually advance the PC past it.
1700
1701 2015-02-23 Pedro Alves <palves@redhat.com>
1702
1703 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1704 modes.
1705 (x86_fill_gregset, x86_store_gregset): Use it when handling
1706 $orig_eax.
1707
1708 2015-02-20 Pedro Alves <palves@redhat.com>
1709
1710 * thread-db.c: Include "nat/linux-procfs.h".
1711 (thread_db_init): Skip listing new threads if the kernel supports
1712 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1713
1714 2015-02-20 Pedro Alves <palves@redhat.com>
1715
1716 * linux-low.c (status_pending_p_callback): Use ptid_match.
1717
1718 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1719
1720 PR breakpoints/16812
1721 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1722 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1723 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1724
1725 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1726
1727 PR breakpoints/15956
1728 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1729
1730 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1731
1732 * linux-low.c (linux_low_btrace_conf): Print size.
1733 * server.c (handle_btrace_conf_general_set): New.
1734 (hanle_general_set): Call handle_btrace_conf_general_set.
1735 (handle_query): Report Qbtrace-conf:bts:size as supported.
1736
1737 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1738
1739 * linux-low.c (linux_low_enable_btrace): Update parameters.
1740 (linux_low_btrace_conf): New.
1741 (linux_target_ops)<to_btrace_conf>: Initialize.
1742 * server.c (current_btrace_conf): New.
1743 (handle_btrace_enable): Rename to ...
1744 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1745 to target_enable_btrace. Update comment. Update users.
1746 (handle_qxfer_btrace_conf): New.
1747 (qxfer_packets): Add btrace-conf entry.
1748 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1749 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1750 (target_ops)<read_btrace_conf>: New.
1751 (target_enable_btrace): Update parameters.
1752 (target_read_btrace_conf): New.
1753
1754 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1755
1756 * server.c (handle_btrace_general_set): Remove call to
1757 target_supports_btrace.
1758 (supported_btrace_packets): New.
1759 (handle_query): Call supported_btrace_packets.
1760 * target.h: include btrace-common.h.
1761 (btrace_target_info): Removed.
1762 (supports_btrace, target_supports_btrace): Update parameters.
1763
1764 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1765
1766 * Makefile.in (SFILES): Add common/btrace-common.c.
1767 (OBS): Add common/btrace-common.o.
1768 (btrace-common.o): Add build rules.
1769 * linux-low: Include btrace-common.h.
1770 (linux_low_read_btrace): Use struct btrace_data. Call
1771 btrace_data_init and btrace_data_fini.
1772
1773 2015-02-06 Pedro Alves <palves@redhat.com>
1774
1775 * thread-db.c (find_new_threads_callback): Add debug output.
1776
1777 2015-02-04 Pedro Alves <palves@redhat.com>
1778
1779 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1780 (resume_stopped_resumed_lwps): New function.
1781 (linux_wait_for_event_filtered): Use it.
1782
1783 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1784
1785 * Makefile.in (SFILES): Add linux-personality.c.
1786 (linux-personality.o): New rule.
1787 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1788 list of objects to be built.
1789 * linux-low.c: Include nat/linux-personality.h.
1790 (linux_create_inferior): Remove code to disable address space
1791 randomization (moved to ../nat/linux-personality.c). Create
1792 cleanup to disable address space randomization.
1793
1794 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1795
1796 * Makefile.in (posix-strerror.o): New rule.
1797 (mingw-strerror.o): Likewise.
1798 * configure: Regenerated.
1799 * configure.ac: Source file ../common/common.host. Initialize new
1800 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1801
1802 2015-01-14 Yao Qi <yao@codesourcery.com>
1803
1804 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1805 (ppc-linux.o): New rule.
1806 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1807 * configure.ac: AC_CHECK_FUNCS(getauxval).
1808 * config.in: Re-generated.
1809 * configure: Re-generated.
1810 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1811 ppc64_64bit_inferior_p
1812
1813 2015-01-14 Yao Qi <yao@codesourcery.com>
1814
1815 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1816 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1817 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1818 (PT_ORIG_R3, PT_TRAP): Likewise.
1819 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1820 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1821 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1822
1823 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1824
1825 * i387-fp.c (i387_cache_to_xsave): In look over
1826 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1827 zmmh_low_space field by use of zmmh_high_space.
1828
1829 2015-01-09 Pedro Alves <palves@redhat.com>
1830
1831 * linux-low.c (step_over_bkpt): Move higher up in the file.
1832 (handle_extended_wait): Don't store the stop_pc here.
1833 (get_stop_pc): Adjust comments and rename to ...
1834 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1835 stopped for a software breakpoint or hardware breakpoint.
1836 (thread_still_has_status_pending_p): New function.
1837 (status_pending_p_callback): Use
1838 thread_still_has_status_pending_p. If the event is no longer
1839 interesting, resume the LWP.
1840 (handle_tracepoints): Add assert.
1841 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1842 (wstatus_maybe_breakpoint): New function.
1843 (cancel_breakpoint): Delete function.
1844 (check_stopped_by_watchpoint): New function, factored out from
1845 linux_low_filter_event.
1846 (lp_status_maybe_breakpoint): Delete function.
1847 (linux_low_filter_event): Remove filter_ptid argument.
1848 Leave thread group exits pending here. Store the LWP's stop PC.
1849 Always leave events pending.
1850 (linux_wait_for_event_filtered): Pull all events out of the
1851 kernel, and leave them all pending.
1852 (count_events_callback, select_event_lwp_callback): Consider all
1853 events.
1854 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1855 (select_event_lwp): Only give preference to the stepping LWP in
1856 all-stop mode. Adjust comments.
1857 (ignore_event): New function.
1858 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1859 references to cancel_breakpoints. Adjust to renames. Also give
1860 equal priority to all LWPs that have had events in non-stop mode.
1861 If reporting a software breakpoint event, unadjust the LWP's PC.
1862 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1863 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1864 Adjust.
1865 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1866 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1867 (linux_stopped_by_watchpoint): Adjust.
1868 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1869 * linux-low.h (enum lwp_stop_reason): New.
1870 (struct lwp_info) <stop_pc>: Adjust comment.
1871 <stopped_by_watchpoint>: Delete field.
1872 <stop_reason>: New field.
1873 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1874 * mem-break.c (software_breakpoint_inserted_here)
1875 (hardware_breakpoint_inserted_here): New function.
1876 * mem-break.h (software_breakpoint_inserted_here)
1877 (hardware_breakpoint_inserted_here): Declare.
1878 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1879 (cancel_breakpoints): Delete.
1880 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1881 (upload_fast_traceframes): Remove references to
1882 cancel_breakpoints.
1883
1884 2015-01-09 Pedro Alves <palves@redhat.com>
1885
1886 * thread-db.c (find_new_threads_callback): Ignore thread if the
1887 kernel thread ID is -1.
1888
1889 2015-01-09 Pedro Alves <palves@redhat.com>
1890
1891 * linux-low.c (linux_attach_fail_reason_string): Move to
1892 nat/linux-ptrace.c, and rename.
1893 (linux_attach_lwp): Update comment.
1894 (attach_proc_task_lwp_callback): New function.
1895 (linux_attach): Adjust to rename and use
1896 linux_proc_attach_tgid_threads.
1897 (linux_attach_fail_reason_string): Delete declaration.
1898
1899 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1900
1901 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1902 * server.c (gdbserver_version): Likewise.
1903
1904 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1905
1906 * remote-utils.c: Include ctype.h.
1907 (input_interrupt): Explicitly handle the case when the char
1908 received is the NUL byte. Improve the printing of non-ASCII
1909 characters.
1910
1911 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1912
1913 * linux-low.c (linux_low_filter_event): Update call to
1914 linux_enable_event_reporting following the addition of
1915 a new parameter to that function.
1916
1917 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1918
1919 PR server/17457
1920 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1921 (AARCH64_FPCR_REGNO): Likewise.
1922 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1923 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1924 (aarch64_store_fpregset): Likewise.
1925
1926 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1927
1928 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1929 Remove FIXME comment about assumption about N.
1930
1931 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1932
1933 * configure.ac: If large-file support is disabled in GDBserver,
1934 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1935 * configure: Regenerate.
1936
1937 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1938
1939 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1940 warning upon ENODATA from ptrace.
1941 * linux-s390-low.c (s390_store_tdb): New.
1942 (s390_regsets): Add regset for NT_S390_TDB.
1943
1944 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1945
1946 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1947 without a fill_function.
1948 * linux-s390-low.c (s390_fill_last_break): Remove.
1949 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1950 (s390_arch_setup): Use regset's size instead of fill_function for
1951 loop end condition.
1952
1953 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1954
1955 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1956 the regset's store function when ptrace returned an error.
1957 * regcache.c (get_thread_regcache): Invalidate register cache
1958 before fetching inferior's registers.
1959
1960 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1961
1962 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1963 while-loop as for-loop.
1964 (regsets_store_inferior_registers): Likewise.
1965
1966 2014-11-28 Yao Qi <yao@codesourcery.com>
1967
1968 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1969 * config.in, configure: Re-generate.
1970 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1971 is defined.
1972
1973 2014-11-21 Yao Qi <yao@codesourcery.com>
1974
1975 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1976 (AC_CHECK_HEADERS): Remove malloc.h.
1977 * configure: Re-generated.
1978 * config.in: Re-generated.
1979 * server.h: Don't include alloca.h and malloc.h.
1980 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1981 Don't include malloc.h.
1982
1983 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1984
1985 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1986 corresponding ERRNO check in same block.
1987
1988 2014-11-12 Pedro Alves <palves@redhat.com>
1989
1990 * server.c (cont_thread): Update comment.
1991 (start_inferior, attach_inferior): No longer clear cont_thread.
1992 (handle_v_cont): No longer set cont_thread.
1993 (captured_main): Clear cont_thread each time a GDB connects.
1994
1995 2014-11-12 Pedro Alves <palves@redhat.com>
1996
1997 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1998 thread, and don't resume all threads if the Hc thread has exited.
1999
2000 2014-11-12 Pedro Alves <palves@redhat.com>
2001
2002 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2003 the process group instead of to a specific LWP.
2004
2005 2014-10-15 Pedro Alves <palves@redhat.com>
2006
2007 PR server/17487
2008 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2009 parameter.
2010 (arm_set_thread_context): Delete.
2011 (the_low_target): Adjust.
2012 * win32-i386-low.c (debug_registers_changed)
2013 (debug_registers_used): Delete.
2014 (update_debug_registers_callback): New function.
2015 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2016 needing to update their debug registers.
2017 (win32_get_current_dr): New function.
2018 (x86_dr_low_get_addr, x86_dr_low_get_control)
2019 (x86_dr_low_get_status): Fetch the debug register from the thread
2020 record's context.
2021 (i386_initial_stuff): Adjust.
2022 (i386_get_thread_context): Remove current_event parameter. Don't
2023 clear debug_registers_changed nor copy DR values to
2024 debug_reg_state.
2025 (i386_set_thread_context): Delete.
2026 (i386_prepare_to_resume): New function.
2027 (i386_thread_added): Mark the thread as needing to update irs
2028 debug registers.
2029 (the_low_target): Remove i386_set_thread_context and install
2030 i386_prepare_to_resume.
2031 * win32-low.c (win32_get_thread_context): Adjust.
2032 (win32_set_thread_context): Use SetThreadContext
2033 directly.
2034 (win32_prepare_to_resume): New function.
2035 (win32_require_context): New function, factored out from ...
2036 (thread_rec): ... this.
2037 (continue_one_thread): Call win32_prepare_to_resume on each thread
2038 we're about to continue.
2039 (win32_resume): Call win32_prepare_to_resume on the event thread.
2040 * win32-low.h (struct win32_thread_info)
2041 <debug_registers_changed>: New field.
2042 (struct win32_target_ops): Change prototype of set_thread_context,
2043 delete set_thread_context and add prepare_to_resume.
2044 (win32_require_context): New declaration.
2045
2046 2014-10-08 Gary Benson <gbenson@redhat.com>
2047
2048 * server.h: Do not include common-exceptions.h.
2049
2050 2014-10-08 Gary Benson <gbenson@redhat.com>
2051
2052 * server.h: Do not include cleanups.h.
2053
2054 2014-09-30 James Hogan <james.hogan@imgtec.com>
2055
2056 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2057 mips64-dsp-linux.c.
2058
2059 2014-09-23 Yao Qi <yao@codesourcery.com>
2060
2061 * linux-low.c (lp_status_maybe_breakpoint): New function.
2062 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2063 (count_events_callback): Likewise.
2064 (select_event_lwp_callback): Likewise.
2065 (cancel_breakpoints_callback): Likewise.
2066
2067 2014-09-19 Don Breazeal <donb@codesourcery.com>
2068
2069 * linux-low.c (handle_extended_wait): Call
2070 linux_ptrace_get_extended_event.
2071 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2072 linux_is_extended_waitstatus.
2073
2074 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2075
2076 * Makefile.in (CPPFLAGS): Define.
2077 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2078 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2079
2080 2014-09-16 Gary Benson <gbenson@redhat.com>
2081
2082 * inferiors.h (current_inferior): Renamed as...
2083 (current_thread): New variable. All uses updated.
2084 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2085 (maybe_move_out_of_jump_pad): Likewise.
2086 (cancel_breakpoint): Likewise.
2087 (linux_low_filter_event): Likewise.
2088 (wait_for_sigstop): Likewise.
2089 (linux_resume_one_lwp): Likewise.
2090 (need_step_over_p): Likewise.
2091 (start_step_over): Likewise.
2092 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2093 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2094 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2095 and save_inferior as saved_thread.
2096 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2097 saved_thread.
2098 (regcache_invalidate_thread): Likewise.
2099 * remote-utils.c (prepare_resume_reply): Likewise.
2100 * thread-db.c (thread_db_get_tls_address): Likewise.
2101 (disable_thread_event_reporting): Likewise.
2102 (remove_thread_event_breakpoints): Likewise.
2103 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2104 as saved_thread.
2105 * target.h (set_desired_inferior): Renamed as...
2106 (set_desired_thread): New declaration. All uses updated.
2107 * server.c (myresume): Updated comment to reference thread instead
2108 of inferior.
2109 (handle_serial_event): Likewise.
2110 (handle_target_event): Likewise.
2111
2112 2014-09-12 Tom Tromey <tromey@redhat.com>
2113 Gary Benson <gbenson@redhat.com>
2114
2115 * regcache.h: Include common-regcache.h.
2116 (regcache_read_pc): Don't declare.
2117 * regcache.c (get_thread_regcache_for_ptid): New function.
2118
2119 2014-09-11 Tom Tromey <tromey@redhat.com>
2120 Gary Benson <gbenson@redhat.com>
2121
2122 * symbol.c: New file.
2123 * Makefile.in (SFILES): Add symbol.c.
2124 (OBS): Add symbol.o.
2125
2126 2014-09-11 Gary Benson <gbenson@redhat.com>
2127
2128 * target.c (target_stop_ptid, target_continue_ptid): New
2129 functions.
2130
2131 2014-09-11 Tom Tromey <tromey@redhat.com>
2132 Gary Benson <gbenson@redhat.com>
2133
2134 * target.h: Include target/target.h.
2135 * target.c (target_read_memory, target_read_uint32)
2136 (target_write_memory): New functions.
2137
2138 2014-09-11 Gary Benson <gbenson@redhat.com>
2139
2140 * server.h (debug_hw_points): Don't declare.
2141 * server.c (debug_hw_points): Don't define. Replace all uses
2142 with show_debug_regs.
2143 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2144 all uses with show_debug_regs.
2145
2146 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2147
2148 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2149 endianness into account.
2150 (ppc_supply_ptrace_register): Likewise.
2151
2152 2014-09-03 James Hogan <james.hogan@imgtec.com>
2153
2154 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2155 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2156
2157 2014-09-03 Gary Benson <gbenson@redhat.com>
2158
2159 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2160 ALL_DEBUG_ADDRESS_REGISTERS.
2161
2162 2014-09-02 Gary Benson <gbenson@redhat.com>
2163
2164 * i386-low.h: Renamed as...
2165 * x86-low.h: New file. All type, function and variable name
2166 prefixes changed from "i386_" to "x86_". All references updated.
2167 * i386-low.c: Renamed as...
2168 * x86-low.c: New file. All type, function and variable name
2169 prefixes changed from "i386_" to "x86_". All references updated.
2170
2171 2014-09-02 Gary Benson <gbenson@redhat.com>
2172
2173 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2174 (x86_linux_new_thread): Likewise.
2175
2176 2014-08-29 Gary Benson <gbenson@redhat.com>
2177
2178 * server.h (setjmp.h): Do not include.
2179 (toplevel): Do not declare.
2180 (common-exceptions.h): Include.
2181 (cleanups.h): Likewise.
2182 * server.c (toplevel): Do not define.
2183 (exit_code): New static global.
2184 (detach_or_kill_for_exit_cleanup): New function.
2185 (main): New function. Original main renamed to...
2186 (captured_main): New function.
2187 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2188
2189 2014-08-29 Gary Benson <gbenson@redhat.com>
2190
2191 * Makefile.in (SFILES): Add common/common-exceptions.c.
2192 (OBS): Add common-exceptions.o.
2193 (common-exceptions.o): New rule.
2194 * utils.c (prepare_to_throw_exception): New function.
2195
2196 2014-08-29 Gary Benson <gbenson@redhat.com>
2197
2198 * config.in: Regenerate.
2199 * configure: Likewise.
2200
2201 2014-08-29 Gary Benson <gbenson@redhat.com>
2202
2203 * Makefile.in (SFILES): Add common/cleanups.c.
2204 (OBS): cleanups.o.
2205 (cleanups.o): New rule.
2206
2207 2014-08-29 Gary Benson <gbenson@redhat.com>
2208
2209 * utils.c (internal_vwarning): New function.
2210
2211 2014-08-28 Gary Benson <gbenson@redhat.com>
2212
2213 * utils.h (fatal): Remove declaration.
2214 * utils.c (fatal): Remove function.
2215
2216 2014-08-28 Gary Benson <gbenson@redhat.com>
2217
2218 * tracepoint.c (gdb_agent_init): Replace fatal with
2219 perror_with_name.
2220 (initialize_tracepoint): Likewise.
2221
2222 2014-08-28 Gary Benson <gbenson@redhat.com>
2223
2224 * remote-utils.c (remote_prepare): Replace fatal with error.
2225
2226 2014-08-28 Gary Benson <gbenson@redhat.com>
2227
2228 * linux-low.c (linux_async): Replace fatal with warning.
2229 Tidy up and return.
2230 (linux_start_non_stop): Return -1 if linux_async failed.
2231
2232 2014-08-28 Gary Benson <gbenson@redhat.com>
2233
2234 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2235 gdb_assert.
2236 (i386_dr_low_get_addr): Remove vague comment.
2237 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2238 gdb_assert.
2239
2240 2014-08-28 Gary Benson <gbenson@redhat.com>
2241
2242 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2243 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2244 internal_error.
2245 (linux_resume_one_lwp): Likewise.
2246 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2247 gdb_assert.
2248 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2249 with internal_error.
2250 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2251 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2252 (find_register_by_name): Replace fatal with internal_error.
2253 (find_regno): Likewise.
2254 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2255 * thread-db.c (thread_db_create_event): Likewise.
2256 (thread_db_load_search): Likewise.
2257 (try_thread_db_load_1): Likewise.
2258 * tracepoint.c (get_jump_space_head): Replace fatal with
2259 internal_error.
2260 (claim_trampoline_space): Likewise.
2261 (have_fast_tracepoint_trampoline_buffer): Likewise.
2262 (cmd_qtstart): Likewise.
2263 (stop_tracing): Likewise.
2264 (fast_tracepoint_collecting): Likewise.
2265 (target_malloc): Likewise.
2266 (download_tracepoint): Likewise.
2267 (download_trace_state_variables): Replace check with gdb_assert.
2268 (upload_fast_traceframes): Replace fatal with internal_error.
2269
2270 2014-08-19 Tom Tromey <tromey@redhat.com>
2271 Gary Benson <gbenson@redhat.com>
2272
2273 * Makefile.in (SFILES): Add common/common-debug.c.
2274 (OBS): Add common-debug.o.
2275 (common-debug.o): New rule.
2276 * debug.h (debug_printf): Don't declare.
2277 * debug.c (debug_printf): Renamed and rewritten as...
2278 (debug_vprintf): New function.
2279
2280 2014-08-19 Gary Benson <gbenson@redhat.com>
2281
2282 * utils.h: Do not include print-utils.h.
2283
2284 2014-08-19 Tom Tromey <tromey@redhat.com>
2285 Gary Benson <gbenson@redhat.com>
2286
2287 * server.h: Add static assertion.
2288 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2289
2290 2014-08-19 Tom Tromey <tromey@redhat.com>
2291 Gary Benson <gbenson@redhat.com>
2292
2293 * Makefile.in (SFILES): Add common/errors.c.
2294 (OBS): Add errors.o.
2295 (IPA_OBS): Add errors-ipa.o.
2296 (errors.o): New rule.
2297 (errors-ipa.o): Likewise.
2298 * utils.h (perror_with_name, error, warning): Don't declare.
2299 * utils.c (warning): Renamed and rewritten as...
2300 (vwarning): New function.
2301 (error): Renamed and rewritten as...
2302 (verror): New function.
2303 (internal_error): Renamed and rewritten as...
2304 (internal_verror): New function.
2305
2306 2014-08-07 Gary Benson <gbenson@redhat.com>
2307
2308 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2309 * configure: Regenerate.
2310 * config.in: Likewise.
2311 * server.h: Do not include errno.h.
2312 * event-loop.c: Likewise.
2313 * hostio-errno.c: Likewise.
2314 * linux-low.c: Likewise.
2315 * remote-utils.c: Likewise.
2316 * spu-low.c: Likewise.
2317 * utils.c: Likewise.
2318 * gdbreplay.c: Unconditionally include errno.h.
2319
2320 2014-08-07 Gary Benson <gbenson@redhat.com>
2321
2322 * server.h: Do not include string.h.
2323 * event-loop.c: Likewise.
2324 * linux-low.c: Likewise.
2325 * regcache.c: Likewise.
2326 * remote-utils.c: Likewise.
2327 * spu-low.c: Likewise.
2328 * utils.c: Likewise.
2329
2330 2014-08-07 Gary Benson <gbenson@redhat.com>
2331
2332 * server.h: Do not include gdb_assert.h.
2333
2334 2014-08-07 Gary Benson <gbenson@redhat.com>
2335
2336 * server.h: Do not include common-utils.h.
2337
2338 2014-08-07 Gary Benson <gbenson@redhat.com>
2339
2340 * server.h: Do not include ptid.h.
2341 * notif.h: Likewise.
2342
2343 2014-08-07 Gary Benson <gbenson@redhat.com>
2344
2345 * server.h: Do not include gdb_locale.h.
2346
2347 2014-08-07 Gary Benson <gbenson@redhat.com>
2348
2349 * server.h: Do not include gdb/signals.h.
2350 * win32-low.c: Likewise.
2351
2352 2014-08-07 Gary Benson <gbenson@redhat.com>
2353
2354 * server.h: Do not include pathmax.h.
2355
2356 2014-08-07 Gary Benson <gbenson@redhat.com>
2357
2358 * server.h: Do not include libiberty.h.
2359 * linux-bfin-low.c: Likewise.
2360
2361 2014-08-07 Gary Benson <gbenson@redhat.com>
2362
2363 * server.h: Do not include ansidecl.h.
2364
2365 2014-08-07 Gary Benson <gbenson@redhat.com>
2366
2367 * linux-x86-low.c: Do not include stddef.h.
2368 * lynx-ppc-low.c: Likewise.
2369 * tracepoint.c: Likewise.
2370
2371 2014-08-07 Gary Benson <gbenson@redhat.com>
2372
2373 * server.h: Do not include stdarg.h.
2374 * nto-low.c: Likewise.
2375
2376 2014-08-07 Gary Benson <gbenson@redhat.com>
2377
2378 * server.h: Do not include stdlib.h.
2379 * inferiors.c: Likewise.
2380 * linux-low.c: Likewise.
2381 * regcache.c: Likewise.
2382 * spu-low.c: Likewise.
2383 * tracepoint.c: Likewise.
2384 * utils.c: Likewise.
2385
2386 2014-08-07 Gary Benson <gbenson@redhat.com>
2387
2388 * server.h: Do not include stdio.h.
2389 * linux-low.c: Likewise.
2390 * remote-utils.c: Likewise.
2391 * spu-low.c: Likewise.
2392 * utils.c: Likewise.
2393 * wincecompat.c: Likewise.
2394
2395 2014-08-06 Gary Benson <gbenson@redhat.com>
2396
2397 * regcache.c (init_register_cache): Move conditionals inside if.
2398
2399 2014-08-06 Gary Benson <gbenson@redhat.com>
2400
2401 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2402
2403 2014-07-31 Gary Benson <gbenson@redhat.com>
2404
2405 * ax.h: Do not include server.h.
2406 * gdbthread.h: Likewise.
2407 * lynx-low.h: Likewise.
2408 * notif.h: Likewise.
2409
2410 2014-07-30 Gary Benson <gbenson@redhat.com>
2411
2412 * server.h: Include common-defs.h.
2413 Do not include config.h or build-gnulib-gdbserver/config.h.
2414
2415 2014-07-30 Gary Benson <gbenson@redhat.com>
2416
2417 * hostio-errno.c: Move server.h to top of includes list.
2418 * inferiors.c: Likewise.
2419 * linux-x86-low.c: Likewise.
2420 * notif.c: Include server.h.
2421
2422 2014-07-24 Tom Tromey <tromey@redhat.com>
2423 Gary Benson <gbenson@redhat.com>
2424
2425 * server.h (CORE_ADDR): Now unsigned.
2426
2427 2014-07-16 Pedro Alves <palves@redhat.com>
2428
2429 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2430
2431 2014-07-15 Pedro Alves <palves@redhat.com>
2432
2433 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2434 copy.
2435
2436 2014-07-11 Pedro Alves <palves@redhat.com>
2437
2438 * linux-low.c (kill_wait_lwp): New function, based on
2439 kill_one_lwp_callback, but use my_waitpid directly.
2440 (kill_one_lwp_callback, linux_kill): Use it.
2441
2442 2014-06-23 Pedro Alves <palves@redhat.com>
2443
2444 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2445 before setting DR0..DR3.
2446
2447 2014-06-20 Gary Benson <gbenson@redhat.com>
2448
2449 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2450 * configure: Regenerated.
2451 * config.in: Likewise.
2452
2453 2014-06-20 Gary Benson <gbenson@redhat.com>
2454
2455 * Makefile.in (SFILES): Update locations for files moved
2456 from common to nat.
2457 (object file files): Reordered.
2458
2459 2014-06-20 Gary Benson <gbenson@redhat.com>
2460
2461 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2462 (i386_dr_low_set_addr): Likewise.
2463 (i386_dr_low_get_addr): Likewise.
2464 (i386_dr_low_can_set_control): Likewise.
2465 (i386_dr_low_set_control): Likewise.
2466 (i386_dr_low_get_control): Likewise.
2467 (i386_dr_low_get_status): Likewise.
2468 (i386_get_debug_register_length): Likewise.
2469 * linux-x86-low.c (i386_dr_low_set_addr):
2470 Changed signature. Made static.
2471 (i386_dr_low_get_addr): Likewise.
2472 (i386_dr_low_set_control): Likewise.
2473 (i386_dr_low_get_control): Likewise.
2474 (i386_dr_low_get_status): Likewise.
2475 (i386_dr_low): New global variable.
2476 * win32-i386-low.c (i386_dr_low_set_addr):
2477 Changed signature. Made static.
2478 (i386_dr_low_get_addr): Likewise.
2479 (i386_dr_low_set_control): Likewise.
2480 (i386_dr_low_get_control): Likewise.
2481 (i386_dr_low_get_status): Likewise.
2482 (i386_dr_low): New global variable.
2483
2484 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2485
2486 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2487 * Makefile.in (AR, AR_FLAGS): Define.
2488 * configure: Regenerate.
2489
2490 2014-06-19 Gary Benson <gbenson@redhat.com>
2491
2492 * Makefile.in (i386-dregs.o): New rule.
2493 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2494 * i386-low.c (target.h): Remove include.
2495 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2496 (DR_CONTROL_SHIFT): Likewise.
2497 (DR_CONTROL_SIZE): Likewise.
2498 (DR_RW_EXECUTE): Likewise.
2499 (DR_RW_WRITE): Likewise.
2500 (DR_RW_READ): Likewise.
2501 (DR_RW_IORW): Likewise.
2502 (DR_LEN_1): Likewise.
2503 (DR_LEN_2): Likewise.
2504 (DR_LEN_4): Likewise.
2505 (DR_LEN_8): Likewise.
2506 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2507 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2508 (DR_ENABLE_SIZE): Likewise.
2509 (DR_LOCAL_SLOWDOWN): Likewise.
2510 (DR_GLOBAL_SLOWDOWN): Likewise.
2511 (DR_CONTROL_RESERVED): Likewise.
2512 (I386_DR_CONTROL_MASK): Likewise.
2513 (I386_DR_VACANT): Likewise.
2514 (I386_DR_LOCAL_ENABLE): Likewise.
2515 (I386_DR_GLOBAL_ENABLE): Likewise.
2516 (I386_DR_DISABLE): Likewise.
2517 (I386_DR_SET_RW_LEN): Likewise.
2518 (I386_DR_GET_RW_LEN): Likewise.
2519 (I386_DR_WATCH_HIT): Likewise.
2520 (i386_wp_op_t): Likewise.
2521 (i386_show_dr): Likewise.
2522 (i386_length_and_rw_bits): Likewise.
2523 (i386_insert_aligned_watchpoint): Likewise.
2524 (i386_remove_aligned_watchpoint): Likewise.
2525 (i386_handle_nonaligned_watchpoint): Likewise.
2526 i386_update_inferior_debug_regs(): Likewise.
2527 (i386_dr_insert_watchpoint): Likewise.
2528 (i386_dr_remove_watchpoint): Likewise.
2529 (i386_dr_region_ok_for_watchpoint): Likewise.
2530 (i386_dr_stopped_data_address): Likewise.
2531 (i386_dr_stopped_by_watchpoint): Likewise.
2532
2533 2014-06-19 Gary Benson <gbenson@redhat.com>
2534
2535 * i386-low.c (i386_dr_show): Renamed to
2536 i386_show_dr and made static. All uses updated.
2537 (i386_dr_length_and_rw_bits): Renamed to
2538 i386_length_and_rw_bits and made static.
2539 All uses updated.
2540 (i386_dr_insert_aligned_watchpoint): Renamed to
2541 i386_insert_aligned_watchpoint and made static.
2542 All uses updated.
2543 (i386_dr_remove_aligned_watchpoint): Renamed to
2544 i386_remove_aligned_watchpoint and made static.
2545 All uses updated.
2546 (i386_dr_update_inferior_debug_regs): Renamed to
2547 i386_update_inferior_debug_regs and made static.
2548 All uses updated.
2549
2550 2014-06-18 Gary Benson <gbenson@redhat.com>
2551
2552 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2553 (i386_dr_low_can_set_control): Likewise.
2554 (i386_get_debug_register_length): Likewise.
2555 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2556 (i386_dr_low_can_set_control): Likewise.
2557 (i386_get_debug_register_length): Likewise.
2558
2559 2014-06-17 Gary Benson <gbenson@redhat.com>
2560
2561 * i386-low.h (i386-dregs.h): New include.
2562 (DR_FIRSTADDR): Now in i386-dregs.h.
2563 (DR_LASTADDR): Likewise.
2564 (DR_NADDR): Likewise.
2565 (DR_STATUS): Likewise.
2566 (DR_CONTROL): Likewise.
2567 (i386_debug_reg_state): Likewise.
2568 (i386_dr_insert_watchpoint): Likewise.
2569 (i386_dr_remove_watchpoint): Likewise.
2570 (i386_dr_region_ok_for_watchpoint): Likewise.
2571 (i386_dr_stopped_data_address): Likewise.
2572 (i386_dr_stopped_by_watchpoint): Likewise.
2573 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2574
2575 2014-06-18 Gary Benson <gbenson@redhat.com>
2576
2577 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2578 i386_dr_insert_watchpoint.
2579 (i386_low_remove_watchpoint): Renamed to
2580 i386_dr_remove_watchpoint.
2581 (i386_low_region_ok_for_watchpoint): Renamed to
2582 i386_dr_region_ok_for_watchpoint.
2583 (i386_low_stopped_data_address): Renamed to
2584 i386_dr_stopped_data_address.
2585 (i386_low_stopped_by_watchpoint): Renamed to
2586 i386_dr_stopped_by_watchpoint.
2587 * i386-low.c (i386_show_dr): Renamed to
2588 i386_dr_show and made nonstatic. All uses updated.
2589 (i386_length_and_rw_bits): Renamed to
2590 i386_dr_length_and_rw_bits and made nonstatic.
2591 All uses updated.
2592 (i386_insert_aligned_watchpoint): Renamed to
2593 i386_dr_insert_aligned_watchpoint and made nonstatic.
2594 All uses updated.
2595 (i386_remove_aligned_watchpoint): Renamed to
2596 i386_dr_remove_aligned_watchpoint and made nonstatic.
2597 All uses updated.
2598 (i386_update_inferior_debug_regs): Renamed to
2599 i386_dr_update_inferior_debug_regs and made nonstatic.
2600 All uses updated.
2601 (i386_low_insert_watchpoint): Renamed to
2602 i386_dr_insert_watchpoint. All uses updated.
2603 (i386_low_remove_watchpoint): Renamed to
2604 i386_dr_remove_watchpoint. All uses updated.
2605 (i386_low_region_ok_for_watchpoint): Renamed to
2606 i386_dr_region_ok_for_watchpoint. All uses updated.
2607 (i386_low_stopped_data_address): Renamed to
2608 i386_dr_stopped_data_address. All uses updated.
2609 (i386_low_stopped_by_watchpoint): Renamed to
2610 i386_dr_stopped_by_watchpoint. All uses updated.
2611
2612 2014-06-18 Gary Benson <gbenson@redhat.com>
2613
2614 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2615 (i386_dr_low_can_set_control): Likewise.
2616 (i386_insert_aligned_watchpoint): New check.
2617
2618 2014-06-18 Gary Benson <gbenson@redhat.com>
2619
2620 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2621 Renamed to state.
2622
2623 2014-06-18 Gary Benson <gbenson@redhat.com>
2624
2625 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2626 instead of fatal and error.
2627 (i386_handle_nonaligned_watchpoint): Likewise.
2628
2629 2014-06-18 Gary Benson <gbenson@redhat.com>
2630
2631 * i386-low.c (i386_get_debug_register_length): New macro.
2632 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2633 (i386_show_dr): Use debug_printf instead of fprintf. Use
2634 phex to format values.
2635
2636 2014-06-18 Gary Benson <gbenson@redhat.com>
2637
2638 * i386-low.h: Comment changes.
2639 * i386-low.c: Likewise.
2640
2641 2014-06-18 Gary Benson <gbenson@redhat.com>
2642
2643 * i386-low.c: Whitespace changes.
2644
2645 2014-06-12 Tom Tromey <tromey@redhat.com>
2646
2647 * utils.c (freeargv): Remove.
2648
2649 2014-06-12 Tom Tromey <tromey@redhat.com>
2650
2651 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2652 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2653 (parse_debug_format_options): Likewise.
2654 (gdbserver_usage): Likewise.
2655 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2656 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2657 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2658 against libiberty.
2659 ($(LIBGNU)): Depend on libiberty.
2660 (all-lib): Recurse into all subdirs.
2661 (install-only): Invoke "install" target in subdirs.
2662 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2663 targets.
2664 * configure: Rebuild.
2665 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2666 for vasprintf, vsnprintf, or gettimeofday.
2667 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2668 srv_tgtobj.
2669
2670 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2671
2672 * development.sh: Delete.
2673 * Makefile.in (config.status): Adjust dependency on development.sh.
2674 * configure.ac: Adjust development.sh source call.
2675 * configure: Regenerate.
2676
2677 2014-06-02 Pedro Alves <palves@redhat.com>
2678
2679 * ax.c (gdb_free_agent_expr): New function.
2680 * ax.h (gdb_free_agent_expr): New declaration.
2681 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2682 list.
2683 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2684 static.
2685 (clear_breakpoint_conditions_and_commands): New function.
2686 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2687 (clear_breakpoint_conditions_and_commands): New declaration.
2688
2689 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2690
2691 * linux-aarch64-low.c (asm/ptrace.h): Include.
2692
2693 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2694
2695 Fix TLS access for -static -pthread.
2696 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2697 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2698 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2699
2700 2014-05-20 Pedro Alves <palves@redhat.com>
2701
2702 * linux-aarch64-low.c (aarch64_insert_point)
2703 (aarch64_remove_point): No longer check whether the type is
2704 supported here. Adjust to new interface.
2705 (the_low_target): Install aarch64_supports_z_point_type as
2706 supports_z_point_type method.
2707 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2708 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2709 instead of a Z packet char. Adjust.
2710 (arm_supports_z_point_type): New function.
2711 (arm_insert_point, arm_remove_point): Adjust to new interface.
2712 (the_low_target): Install arm_supports_z_point_type.
2713 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2714 (cris_insert_point, cris_remove_point): Adjust to new interface.
2715 Don't check whether the type is supported here.
2716 (the_low_target): Install cris_supports_z_point_type.
2717 * linux-low.c (linux_supports_z_point_type): New function.
2718 (linux_insert_point, linux_remove_point): Adjust to new interface.
2719 * linux-low.h (struct linux_target_ops) <insert_point,
2720 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2721 raw_breakpoint pointer parameter.
2722 <supports_z_point_type>: New method.
2723 * linux-mips-low.c (mips_supports_z_point_type): New function.
2724 (mips_insert_point, mips_remove_point): Adjust to new interface.
2725 Use mips_supports_z_point_type.
2726 (the_low_target): Install mips_supports_z_point_type.
2727 * linux-ppc-low.c (the_low_target): Install NULL as
2728 supports_z_point_type method.
2729 * linux-s390-low.c (the_low_target): Install NULL as
2730 supports_z_point_type method.
2731 * linux-sparc-low.c (the_low_target): Install NULL as
2732 supports_z_point_type method.
2733 * linux-x86-low.c (x86_supports_z_point_type): New function.
2734 (x86_insert_point): Adjust to new insert_point interface. Use
2735 insert_memory_breakpoint. Adjust to new
2736 i386_low_insert_watchpoint interface.
2737 (x86_remove_point): Adjust to remove_point interface. Use
2738 remove_memory_breakpoint. Adjust to new
2739 i386_low_remove_watchpoint interface.
2740 (the_low_target): Install x86_supports_z_point_type.
2741 * lynx-low.c (lynx_target_ops): Install NULL as
2742 supports_z_point_type callback.
2743 * nto-low.c (nto_supports_z_point_type): New.
2744 (nto_insert_point, nto_remove_point): Adjust to new interface.
2745 (nto_target_ops): Install nto_supports_z_point_type.
2746 * mem-break.c: Adjust intro comment.
2747 (struct raw_breakpoint) <raw_type, size>: New fields.
2748 <inserted>: Update comment.
2749 <shlib_disabled>: Delete field.
2750 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2751 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2752 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2753 (raw_bkpt_type_to_target_hw_bp_type): New function.
2754 (find_enabled_raw_code_breakpoint_at): New function.
2755 (find_raw_breakpoint_at): New type and size parameters. Use them.
2756 (insert_memory_breakpoint): New function, based off
2757 set_raw_breakpoint_at.
2758 (remove_memory_breakpoint): New function.
2759 (set_raw_breakpoint_at): Reimplement.
2760 (set_breakpoint): New, based on set_breakpoint_at.
2761 (set_breakpoint_at): Reimplement.
2762 (delete_raw_breakpoint): Go through the_target->remove_point
2763 instead of assuming memory breakpoints.
2764 (find_gdb_breakpoint_at): Delete.
2765 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2766 (find_gdb_breakpoint): New function.
2767 (set_gdb_breakpoint_at): Delete.
2768 (z_type_supported): New function.
2769 (set_gdb_breakpoint_1): New function, loosely based off
2770 set_gdb_breakpoint_at.
2771 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2772 (delete_gdb_breakpoint_at): Delete.
2773 (delete_gdb_breakpoint_1): New function, loosely based off
2774 delete_gdb_breakpoint_at.
2775 (delete_gdb_breakpoint): New function.
2776 (clear_gdb_breakpoint_conditions): Rename to ...
2777 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2778 breakpoint.
2779 (add_condition_to_breakpoint): Make static.
2780 (add_breakpoint_condition): Take a struct breakpoint pointer
2781 instead of an address. Adjust.
2782 (gdb_condition_true_at_breakpoint): Rename to ...
2783 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2784 z_type parameter.
2785 (gdb_condition_true_at_breakpoint): Reimplement.
2786 (add_breakpoint_commands): Take a struct breakpoint pointer
2787 instead of an address. Adjust.
2788 (gdb_no_commands_at_breakpoint): Rename to ...
2789 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2790 parameter. Return true if no breakpoint was found. Change debug
2791 output.
2792 (gdb_no_commands_at_breakpoint): Reimplement.
2793 (run_breakpoint_commands): Rename to ...
2794 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2795 and change return type to boolean.
2796 (run_breakpoint_commands): New function.
2797 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2798 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2799 breakpoint. Go through the_target->remove_point instead of
2800 assuming memory breakpoint.
2801 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2802 software and hardware breakpoints.
2803 (reinsert_raw_breakpoint): Go through the_target->insert_point
2804 instead of assuming memory breakpoint.
2805 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2806 software and hardware breakpoints.
2807 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2808 Check both software and hardware breakpoints.
2809 (validate_inserted_breakpoint): Assert the breakpoint is a
2810 software breakpoint. Set the inserted flag to -1 instead of
2811 setting shlib_disabled.
2812 (delete_disabled_breakpoints): Adjust.
2813 (validate_breakpoints): Only validate software breakpoints.
2814 Adjust to inserted flag change.
2815 (check_mem_read, check_mem_write): Skip breakpoint types other
2816 than software breakpoints. Adjust to inserted flag change.
2817 * mem-break.h (enum raw_bkpt_type): New enum.
2818 (raw_breakpoint, struct process_info): Forward declare.
2819 (Z_packet_to_target_hw_bp_type): Delete declaration.
2820 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2821 (set_gdb_breakpoint, delete_gdb_breakpoint)
2822 (clear_breakpoint_conditions): New declarations.
2823 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2824 (breakpoint_inserted_here): Update comment.
2825 (add_breakpoint_condition, add_breakpoint_commands): Replace
2826 address parameter with a breakpoint pointer parameter.
2827 (gdb_breakpoint_here): Update comment.
2828 (delete_gdb_breakpoint_at): Delete.
2829 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2830 * server.c (process_point_options): Take a struct breakpoint
2831 pointer instead of an address. Adjust.
2832 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2833 delete_gdb_breakpoint.
2834 * spu-low.c (spu_target_ops): Install NULL as
2835 supports_z_point_type method.
2836 * target.h: Include mem-break.h.
2837 (struct target_ops) <prepare_to_access_memory>: Update comment.
2838 <supports_z_point_type>: New field.
2839 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2840 instead of a char. Also take a raw breakpoint pointer.
2841 * win32-arm-low.c (the_low_target): Install NULL as
2842 supports_z_point_type.
2843 * win32-i386-low.c (i386_supports_z_point_type): New function.
2844 (i386_insert_point, i386_remove_point): Adjust to new interface.
2845 (the_low_target): Install i386_supports_z_point_type.
2846 * win32-low.c (win32_supports_z_point_type): New function.
2847 (win32_insert_point, win32_remove_point): Adjust to new interface.
2848 (win32_target_ops): Install win32_supports_z_point_type.
2849 * win32-low.h (struct win32_target_ops):
2850 <supports_z_point_type>: New method.
2851 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2852 instead of a char. Also take a raw breakpoint pointer.
2853
2854 2014-05-20 Pedro Alves <palves@redhat.com>
2855
2856 * mem-break.h: Include break-common.h.
2857 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2858 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2859 (Z_packet_to_target_hw_bp_type): New declaration.
2860 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2861 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2862 (Z_PACKET_ACCESS_WP): Delete macros.
2863 (Z_packet_to_hw_type): Delete function.
2864 * i386-low.h: Don't include break-common.h here.
2865 (Z_packet_to_hw_type): Delete declaration.
2866 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2867 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2868 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2869 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2870 * linux-aarch64-low.c: Don't include break-common.h here.
2871 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2872 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2873 (Z_packet_to_target_hw_bp_type): Delete function.
2874 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2875 function.
2876 (mips_insert_point, mips_remove_point): Use
2877 Z_packet_to_target_hw_bp_type.
2878
2879 2014-05-20 Pedro Alves <palves@redhat.com>
2880
2881 * linux-aarch64-low.c: Include break-common.h.
2882 (enum target_point_type): Delete.
2883 (Z_packet_to_point_type): Rename to ...
2884 (Z_packet_to_target_hw_bp_type): ... this, and return a
2885 target_hw_bp_type instead.
2886 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2887 instead of an enum target_point_type.
2888 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2889 breakpoint type.
2890 (aarch64_dr_state_insert_one_point)
2891 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2892 (aarch64_handle_aligned_watchpoint)
2893 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2894 Take an enum target_hw_bp_type instead of an enum
2895 target_point_type.
2896 (aarch64_supports_z_point_type): New function.
2897 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2898 use Z_packet_to_target_hw_bp_type.
2899
2900 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2901
2902 * configure.ac: Only use -Werror by default when DEVELOPMENT
2903 is true.
2904 * configure: Regenerate.
2905
2906 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2907
2908 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2909 * linux-x86-low.c (X86_64_USER_REGS): New.
2910 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2911
2912 2014-04-28 Yao Qi <yao@codesourcery.com>
2913
2914 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2915 name.
2916
2917 2014-04-25 Pedro Alves <palves@redhat.com>
2918
2919 PR server/16255
2920 * linux-low.c (linux_attach_fail_reason_string): New function.
2921 (linux_attach_lwp): Delete.
2922 (linux_attach_lwp_1): Rename to ...
2923 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2924 argument. Remove "initial" parameter. Return int instead of
2925 void. Don't error or warn here.
2926 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2927 failure to attach to the tgid. Call warning when failing to
2928 attach to an lwp.
2929 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2930 argument. Remove "initial" parameter. Return int instead of
2931 void. Don't error or warn here.
2932 (linux_attach_fail_reason_string): New declaration.
2933 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2934 interface change. Use linux_attach_fail_reason_string.
2935
2936 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2937 Walfred Tedeschi <walfred.tedeschi@intel.com>
2938
2939 * Makefile.in: Added rules to handle new files
2940 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2941 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2942 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2943 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2944 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2945 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2946 x32-avx512-linux.o.
2947 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2948 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2949 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2950 i386/x32-avx512.xml.
2951 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2952 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2953 i386/x32-avx512-linux.xml.
2954 * i387-fp.c (num_avx512_k_registers): New constant for number
2955 of K registers.
2956 (num_avx512_zmmh_low_registers): New constant for number of
2957 lower ZMM registers (0-15).
2958 (num_avx512_zmmh_high_registers): New constant for number of
2959 higher ZMM registers (16-31).
2960 (num_avx512_ymmh_registers): New contant for number of higher
2961 YMM registers (ymm16-31 added by avx521 on x86_64).
2962 (num_avx512_xmm_registers): New constant for number of higher
2963 XMM registers (xmm16-31 added by AVX512 on x86_64).
2964 (struct i387_xsave): Add space for AVX512 registers.
2965 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2966 Add code to handle AVX512 registers.
2967 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2968 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2969 prototypei from generated file.
2970 (tdesc_amd64_avx512_linux): Likewise.
2971 (init_registers_x32_avx512_linux): Likewise.
2972 (tdesc_x32_avx512_linux): Likewise.
2973 (init_registers_i386_avx512_linux): Likewise.
2974 (tdesc_i386_avx512_linux): Likewise.
2975 (x86_64_regmap): Add AVX512 registers.
2976 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2977 mask.
2978 (initialize_low_arch): Add code to initialize AVX512 registers.
2979
2980 2014-04-23 Pedro Alves <palves@redhat.com>
2981
2982 * mem-break.c (find_gdb_breakpoint_at): Make static.
2983 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2984
2985 2014-04-23 Pedro Alves <palves@redhat.com>
2986
2987 * i386-low.c: Don't include break-common.h here.
2988 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2989 prototype to take target_hw_bp_type as argument instead of a Z
2990 packet char.
2991 * i386-low.h: Include break-common.h here.
2992 (Z_packet_to_hw_type): Declare.
2993 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2994 prototypes.
2995 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2996 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2997 (x86_remove_point): Convert the packet number to a
2998 target_hw_bp_type before calling i386_low_remove_watchpoint.
2999 * win32-i386-low.c (i386_insert_point): Convert the packet number
3000 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3001 (i386_remove_point): Convert the packet number to a
3002 target_hw_bp_type before calling i386_low_remove_watchpoint.
3003
3004 2014-04-23 Pedro Alves <palves@redhat.com>
3005
3006 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3007
3008 2014-04-10 Pedro Alves <palves@redhat.com>
3009
3010 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3011 Check if the condition or command is NULL before checking if the
3012 breakpoint is known. On success, return true.
3013 * mem-break.h (add_breakpoint_condition): Document return.
3014 (add_breakpoint_commands): Add describing comment.
3015 * server.c (skip_to_semicolon): New function.
3016 (process_point_options): Use it.
3017
3018 2014-04-09 Pedro Alves <palves@redhat.com>
3019
3020 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3021 to lwpid_of.
3022
3023 2014-02-27 Pedro Alves <palves@redhat.com>
3024
3025 PR 12702
3026 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3027 macros.
3028 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3029 output.
3030 (last_thread_of_process_p): Take a PID argument instead of a
3031 thread pointer.
3032 (linux_wait_for_lwp): Delete.
3033 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3034 functions.
3035 (linux_low_filter_event): New function, party factored out from
3036 linux_wait_for_event.
3037 (linux_wait_for_event): Rename to ...
3038 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3039 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3040 sigsuspend. Check for zombie leaders.
3041 (linux_wait_for_event): Reimplement as wrapper around
3042 linux_wait_for_event_filtered.
3043 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3044 a normal or signal exit is seen, it's the whole process exiting.
3045 (wait_for_sigstop): No longer a for_each_inferior callback.
3046 Rewrite on top of linux_wait_for_event_filtered.
3047 (stop_all_lwps): Call wait_for_sigstop directly.
3048 * server.c (resume, handle_target_event): Handle
3049 TARGET_WAITKIND_NO_RESUMED.
3050
3051 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3052
3053 * win32-low.c (psapi_get_dll_name,
3054 * win32_CreateToolhelp32Snapshot): Delete.
3055 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3056 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3057 Delete.
3058 (handle_load_dll): Add function description.
3059 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3060
3061 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3062
3063 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3064 Add comment.
3065 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3066 base address when calling win32_add_one_solib.
3067 (handle_load_dll): Delete local variable load_addr.
3068 Remove 0x1000 offset applied to DLL base address when calling
3069 win32_add_one_solib.
3070 (handle_unload_dll): Add comment.
3071
3072 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3073
3074 * win32-low.c (win32_add_all_dlls): Renames
3075 win32_ensure_ntdll_loaded. Rewrite function documentation.
3076 Adjust implementation to always load all DLLs.
3077 Add 0x1000 offset to DLL base address when calling
3078 win32_add_one_solib.
3079 (child_initialization_done): New static global.
3080 (do_initial_child_stuff): Set child_initialization_done to
3081 zero during child initialization, and 1 after. Replace call
3082 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3083 Add comment.
3084 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3085 (handle_unload_dll): Add function documentation.
3086 (get_child_debug_event): Ignore load and unload DLL events
3087 during child initialization.
3088
3089 2014-02-20 Doug Evans <dje@google.com>
3090
3091 Remove global all_lwps.
3092 * inferiors.h (ptid_of): Move here from linux-low.h.
3093 (pid_of, lwpid_of): Ditto.
3094 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3095 parameter is a struct thread_info * now.
3096 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3097 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3098 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3099 directly.
3100 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3101 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3102 * linux-arm-low.c (update_registers_callback): Update, "entry"
3103 parameter is a struct thread_info * now.
3104 Fetch lwpid from current_inferior directly.
3105 (arm_insert_point): Pass &all_threads to find_inferior instead of
3106 &all_lwps.
3107 (arm_remove_point): Ditto.
3108 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3109 (arm_prepare_to_resume): Fetch pid from thread.
3110 (arm_read_description): Fetch lwpid from current_inferior directly.
3111 * linux-low.c (all_lwps): Delete.
3112 (delete_lwp): Delete call to remove_inferior.
3113 (handle_extended_wait): Fetch lwpid from thread.
3114 (add_lwp): Don't set lwp->entry.id. Remove call to
3115 add_inferior_to_list.
3116 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3117 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3118 (kill_one_lwp_callback): Ditto.
3119 (linux_kill): Don't dereference NULL pointer.
3120 Fetch ptid,lwpid from thread.
3121 (get_detach_signal): Fetch ptid from thread.
3122 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3123 Simplify call to regcache_invalidate_thread.
3124 (delete_lwp_callback): Update, "entry" parameter is a
3125 struct thread_info * now. Fetch pid from thread.
3126 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3127 (status_pending_p_callback): Update, "entry" parameter is a
3128 struct thread_info * now. Fetch ptid from thread.
3129 (find_lwp_pid): Update, "entry" parameter is a
3130 struct thread_info * now.
3131 (linux_wait_for_lwp): Fetch pid from thread.
3132 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3133 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3134 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3135 (dequeue_one_deferred_signal): Ditto.
3136 (cancel_breakpoint): Fetch ptid from current_inferior.
3137 (linux_wait_for_event): Pass &all_threads to find_inferior,
3138 not &all_lwps. Fetch ptid, lwpid from thread.
3139 (count_events_callback): Update, "entry" parameter is a
3140 struct thread_info * now.
3141 (select_singlestep_lwp_callback): Ditto.
3142 (select_event_lwp_callback): Ditto.
3143 (cancel_breakpoints_callback): Ditto.
3144 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3145 not &all_lwps.
3146 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3147 (unsuspend_one_lwp): Update, "entry" parameter is a
3148 struct thread_info * now.
3149 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3150 not &all_lwps.
3151 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3152 Fetch lwpid from thread, not lwp.
3153 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3154 Pass &all_threads to find_inferior, not &all_lwps.
3155 (send_sigstop): Fetch lwpid from thread, not lwp.
3156 (send_sigstop_callback): Update, "entry" parameter is a
3157 struct thread_info * now.
3158 (suspend_and_send_sigstop_callback): Ditto.
3159 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3160 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3161 struct thread_info * now.
3162 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3163 from thread, lwp.
3164 (lwp_running): Update, "entry" parameter is a
3165 struct thread_info * now.
3166 (stop_all_lwps): Fetch ptid from thread.
3167 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3168 (linux_resume_one_lwp): Fetch lwpid from thread.
3169 (linux_set_resume_request): Update, "entry" parameter is a
3170 struct thread_info * now. Fetch pid, lwpid from thread.
3171 (resume_status_pending_p): Update, "entry" parameter is a
3172 struct thread_info * now.
3173 (need_step_over_p): Ditto. Fetch lwpid from thread.
3174 (start_step_over): Fetch lwpid from thread.
3175 (linux_resume_one_thread): Update, "entry" parameter is a
3176 struct thread_info * now. Fetch lwpid from thread.
3177 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3178 (proceed_one_lwp): Update, "entry" parameter is a
3179 struct thread_info * now. Fetch lwpid from thread.
3180 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3181 struct thread_info * now.
3182 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3183 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3184 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3185 directly.
3186 (regsets_store_inferior_registers): Ditto.
3187 (fetch_register, store_register): Ditto.
3188 (linux_read_memory, linux_write_memory): Ditto.
3189 (linux_request_interrupt): Ditto.
3190 (linux_read_auxv): Ditto.
3191 (linux_xfer_siginfo): Ditto.
3192 (linux_qxfer_spu): Ditto.
3193 (linux_qxfer_libraries_svr4): Ditto.
3194 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3195 moved to inferiors.h.
3196 (get_lwp): Delete.
3197 (get_thread_lwp): Update.
3198 (struct lwp_info): Delete member "entry". Simplify comment for
3199 member "thread".
3200 (all_lwps): Delete.
3201 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3202 current_inferior directly.
3203 (update_watch_registers_callback): Update, "entry" parameter is a
3204 struct thread_info * now. Fetch pid from thread.
3205 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3206 (mips_insert_point): Fetch lwpid from current_inferior.
3207 Pass &all_threads to find_inferior, not &all_lwps.
3208 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3209 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3210 directly.
3211 (mips_stopped_data_address): Ditto.
3212 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3213 directly.
3214 * linux-tile-low.c (tile_arch_setup): Ditto.
3215 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3216 (update_debug_registers_callback): Update, "entry" parameter is a
3217 struct thread_info * now. Fetch pid from thread.
3218 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3219 Pass &all_threads to find_inferior, not &all_lwps.
3220 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3221 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3222 Pass &all_threads to find_inferior, not &all_lwps.
3223 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3224 (i386_dr_low_get_status): Ditto.
3225 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3226 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3227 (x86_linux_read_description): Ditto.
3228 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3229
3230 2014-02-20 Doug Evans <dje@google.com>
3231
3232 * inferiors.c (get_first_inferior): Fix buglet.
3233
3234 2014-02-19 Doug Evans <dje@google.com>
3235
3236 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3237 * inferiors.c (add_thread): Change result type to struct thread_info *.
3238 All callers updated.
3239 (add_lwp): Call add_thread here instead of in callers.
3240 All callers updated.
3241 * linux-low.h (get_lwp_thread): Rewrite.
3242 (struct lwp_info): New member "thread".
3243
3244 2014-02-19 Doug Evans <dje@google.com>
3245
3246 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3247 All callers updated.
3248
3249 2014-02-19 Doug Evans <dje@google.com>
3250
3251 * inferiors.c (add_thread): Fix whitespace.
3252
3253 2014-02-19 Doug Evans <dje@google.com>
3254
3255 * dll.c (clear_dlls): Replace accessing list implemention details
3256 with API function.
3257 * gdbthread.h (get_first_thread): Declare.
3258 * inferiors.c (for_each_inferior_with_data): New function.
3259 (get_first_thread): New function.
3260 (find_thread_ptid): Simplify.
3261 (get_first_inferior): New function.
3262 (clear_list): Delete.
3263 (one_inferior_p): New function.
3264 (clear_inferior_list): New function.
3265 (clear_inferiors): Update.
3266 * inferiors.h (for_each_inferior_with_data): Declare.
3267 (clear_inferior_list): Declare.
3268 (one_inferior_p): Declare.
3269 (get_first_inferior): Declare.
3270 * linux-low.c (linux_wait_for_event): Replace accessing list
3271 implemention details with API function.
3272 * server.c (target_running): Ditto.
3273 (accumulate_file_name_length): New function.
3274 (emit_dll_description): New function.
3275 (handle_qxfer_libraries): Replace accessing list implemention
3276 details with API function.
3277 (handle_qxfer_threads_worker): New function.
3278 (handle_qxfer_threads_proper): Replace accessing list implemention
3279 details with API function.
3280 (handle_query): Ditto.
3281 (visit_actioned_threads_callback_ftype): New typedef.
3282 (visit_actioned_threads_data): New struct.
3283 (visit_actioned_threads): Rewrite to be find_inferior callback.
3284 (resume): Call find_inferior.
3285 (handle_status): Replace accessing list implemention
3286 details with API function.
3287 (process_serial_event): Replace accessing list implemention details
3288 with API function.
3289 * target.c (set_desired_inferior): Replace accessing list implemention
3290 details with API function.
3291 * tracepoint.c (same_process_p): New function.
3292 (gdb_agent_about_to_close): Replace accessing list implemention
3293 details with API function.
3294 * win32-low.c (child_delete_thread): Replace accessing list
3295 implemention details with API function.
3296 (match_dll_by_basename): New function.
3297 (dll_is_loaded_by_basename): New function.
3298 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3299 details call to dll_is_loaded_by_basename.
3300
3301 2014-02-19 Doug Evans <dje@google.com>
3302
3303 * dll.h (struct dll_info): Add comment.
3304 * gdbthread.h (struct thread_info): Add comment.
3305 (current_ptid): Simplify.
3306 * inferiors.c (add_process): Update.
3307 (remove_process): Update.
3308 * inferiors.h (struct process_info): Rename member "head" to "entry".
3309 * linux-low.c (delete_lwp): Update.
3310 (add_lwp): Update.
3311 (last_thread_of_process_p): Update.
3312 (kill_one_lwp_callback, linux_kill): Update.
3313 (status_pending_p_callback): Update.
3314 (wait_for_sigstop): Update. Simplify read of ptid.
3315 (start_step_over): Update.
3316 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3317 (get_lwp_thread): Update.
3318 (struct lwp_info): Rename member "head" to "entry".
3319 * regcache.h (inferior_list_entry): Delete.
3320 * server.c (kill_inferior_callback): Update.
3321 (detach_or_kill_inferior_callback): Update.
3322 (print_started_pid): Update.
3323 (print_attached_pid): Update.
3324 (process_serial_event): Simplify read of ptid.
3325 * thread-db.c (thread_db_create_event): Update.
3326 (thread_db_get_tls_address): Update.
3327 * win32-low.c (current_inferior_ptid): Simplify.
3328
3329 2014-02-19 Tom Tromey <tromey@redhat.com>
3330
3331 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3332 argument.
3333 (target_supports_btrace): Update.
3334
3335 2014-02-14 Yao Qi <yao@codesourcery.com>
3336
3337 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3338 (rsp-low-ipa.o): New target.
3339
3340 2014-02-12 Tom Tromey <tromey@redhat.com>
3341
3342 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3343 convert_ascii_to_int.
3344 * regcache.c (registers_to_string): Likewise.
3345 * remote-utils.c (decode_M_packet): Likewise.
3346 * server.c (process_serial_event): Likewise.
3347
3348 2014-02-12 Tom Tromey <tromey@redhat.com>
3349
3350 * server.c (handle_query, handle_v_run): Use hex2bin, not
3351 unhexify.
3352 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3353
3354 2014-02-12 Tom Tromey <tromey@redhat.com>
3355
3356 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3357 convert_int_to_ascii.
3358 * regcache.c (registers_to_string, collect_register_as_string):
3359 Likewise.
3360 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3361 Likewise.
3362 * server.c (process_serial_event): Likewise.
3363 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3364 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3365
3366 2014-02-12 Tom Tromey <tromey@redhat.com>
3367
3368 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3369 bin2hex, not hexify.
3370 * tracepoint.c (cmd_qtstatus): Likewise.
3371
3372 2014-02-12 Tom Tromey <tromey@redhat.com>
3373
3374 * remote-utils.c (monitor_output): Pass explicit length to
3375 hexify.
3376
3377 2014-02-12 Tom Tromey <tromey@redhat.com>
3378
3379 * tracepoint.c: Include rsp-low.h.
3380 * server.c: Include rsp-low.h.
3381 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3382 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3383 declare.
3384 * remote-utils.c: Include rsp-low.h.
3385 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3386 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3387 (convert_int_to_ascii, convert_ascii_to_int): Move to
3388 common/rsp-low.c.
3389 * regcache.c: Include rsp-low.h.
3390 * ax.c: Include rsp-low.h.
3391 * Makefile.in (SFILES): Add common/rsp-low.c.
3392 (OBS): Add rsp-low.o.
3393 (rsp-low.o): New target.
3394
3395 2014-02-12 Tom Tromey <tromey@redhat.com>
3396
3397 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3398 Include print-utils.h.
3399 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3400 (plongest, thirty_two, phex_nz): Remove.
3401 * Makefile.in (SFILES): Add common/print-utils.c.
3402 (OBS): Add print-utils.o.
3403 (print-utils-ipa.o): New target.
3404 (print-utils.o): New target.
3405 (IPA_OBJS): Add print-utils-ipa.o.
3406
3407 2014-02-06 Tom Tromey <tromey@redhat.com>
3408
3409 * Makefile.in (SFILES): Fix indentation.
3410
3411 2014-02-05 Doug Evans <dje@google.com>
3412
3413 * linux-low.c (linux_wait_for_event): Improve comment.
3414 (linux_wait_1): Keep current_inferior in sync with event_child.
3415
3416 2014-01-22 Doug Evans <dje@google.com>
3417
3418 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3419
3420 2014-01-22 Doug Evans <dje@google.com>
3421
3422 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3423 * configure: Regenerate.
3424 * config.in: Regenerate.
3425 * Makefile.in (SFILES): Add debug.c.
3426 (OBS): Add debug.o.
3427 * debug.c: New file.
3428 * debug.h: New file.
3429 * linux-aarch64-low.c (*): Update all debugging printfs to use
3430 debug_printf instead of fprintf.
3431 * linux-arm-low.c (*): Ditto.
3432 * linux-cris-low.c (*): Ditto.
3433 * linux-crisv32-low.c (*): Ditto.
3434 * linux-m32r-low.c (*): Ditto.
3435 * linux-sparc-low.c (*): Ditto.
3436 * linux-x86.c (*): Ditto.
3437 * linux-low.c (*): Ditto.
3438 (linux_wait_1): Add calls to debug_enter, debug_exit.
3439 (linux_wait): Remove redundant debugging printf.
3440 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3441 (linux_resume, unstop_all_lwps): Ditto.
3442 * mem-break.c (*): Update all debugging printfs to use
3443 debug_printf instead of fprintf.
3444 * remote-utils.c (*): Ditto.
3445 * thread-db.c (*): Ditto.
3446 * server.c #include <ctype.h>, "gdb_vecs.h".
3447 (debug_threads): Moved to debug.c.
3448 (*): Update all debugging printfs to use debug_printf instead of
3449 fprintf.
3450 (start_inferior): Replace call to fflush with call to debug_flush.
3451 (monitor_show_help): Mention set debug-format.
3452 (parse_debug_format_options): New function.
3453 (handle_monitor_command): Handle "monitor set debug-format".
3454 (gdbserver_usage): Mention --debug-format.
3455 (main): Parse --debug-format.
3456 * server.h (debug_threads): Declaration moved to debug.h.
3457 #include "debug.h".
3458 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3459 trace_debug_1 that uses debug_printf.
3460 (tracepoint_look_up_symbols): Update all debugging printfs to use
3461 debug_printf instead of fprintf.
3462
3463 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3464
3465 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3466 sys/ptrace.h.
3467
3468 2014-01-17 Pedro Alves <palves@redhat.com>
3469
3470 PR build/16445
3471 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3472 defined after including gdb_proc_service.h.
3473
3474 2014-01-16 Doug Evans <dje@google.com>
3475
3476 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3477 (match_dll): Use it.
3478
3479 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3480
3481 * target.h (target_ops) <read_btrace>: Change parameters and
3482 return type to allow error reporting.
3483 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3484 trace reading errors on.
3485 * linux-low.c (linux_low_read_btrace): Pass trace reading
3486 errors on.
3487 (linux_low_disable_btrace): New.
3488
3489 2014-01-15 Doug Evans <dje@google.com>
3490
3491 * inferiors.c (thread_id_to_gdb_id): Delete.
3492 * inferiors.h (thread_id_to_gdb_id): Delete.
3493
3494 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3495
3496 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3497 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3498 versions.
3499
3500 2014-01-08 Pedro Alves <palves@redhat.com>
3501
3502 * server.c (handle_status): Don't discard previous queued stop
3503 replies or thread's pending status here.
3504 (main) <disconnection>: Do it here instead.
3505
3506 2014-01-08 Pedro Alves <palves@redhat.com>
3507
3508 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3509 * server.c (visit_actioned_threads, handle_pending_status): New
3510 function.
3511 (handle_v_cont): Factor out parts to ...
3512 (resume): ... this new function. If in all-stop, and a thread
3513 being resumed has a pending status, report it without actually
3514 resuming.
3515 (myresume): Adjust to use the new 'resume' function.
3516 (clear_pending_status_callback, set_pending_status_callback)
3517 (find_status_pending_thread_callback): New functions.
3518 (handle_status): Handle the case of multiple threads having
3519 interesting statuses to report. Report threads' real last signal
3520 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3521 with an interesting thread to report the status for, instead of
3522 always reporting the status of the first thread.
3523
3524 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3525
3526 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3527 * gdbreplay.c (gdbreplay_version): Likewise.
3528
3529 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3530
3531 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3532 iov.iov_len with the real length in use.
3533
3534 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3535
3536 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3537 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3538 for all targets that use win32-low.c.
3539 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3540 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3541
3542 2013-12-13 Pedro Alves <palves@redhat.com>
3543
3544 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3545 if equal to TARGET_WAITKIND_LOADED.
3546 * win32-low.c (cached_status): New static global.
3547 (win32_wait): Add declaration.
3548 (do_initial_child_stuff): Flush all initial pending debug events
3549 up to the initial breakpoint.
3550 (win32_wait): If CACHED_STATUS was set, return that instead
3551 of doing a real wait. Remove the code resuming the execution
3552 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3553 during the initial phase. Also remove the code changing
3554 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3555 TARGET_WAITKIND_STOPPED.
3556
3557 2013-12-11 Yao Qi <yao@codesourcery.com>
3558
3559 * notif.c (handle_notif_ack): Return 0 if no notification
3560 matches.
3561
3562 2013-11-20 Doug Evans <dje@google.com>
3563
3564 * linux-low.c (linux_set_resume_request): Fix comment.
3565
3566 2013-11-20 Doug Evans <dje@google.com>
3567
3568 * linux-low.c (resume_status_pending_p): Tweak comment.
3569
3570 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3571
3572 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3573 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3574 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3575 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3576 (srv_amd64_regobj): Add amd64-mpx.o.
3577 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3578 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3579 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3580 * i387-fp.c (num_pl_bnd_register) Added constant.
3581 (num_pl_bnd_cfg_registers) Added constant.
3582 (struct i387_xsave) Added reserved area and MPX fields.
3583 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3584 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3585 function.
3586 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3587 (init_registers_amd64_mpx_linux): Declare new function.
3588 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3589 (x86_64_regmap): Add MPX registers.
3590 (x86_linux_read_description): Add MPX case.
3591 (initialize_low_arch): Initialize MPX targets.
3592
3593 2013-11-18 Tom Tromey <tromey@redhat.com>
3594
3595 * configure: Rebuild.
3596 * configure.ac: Don't check for stdlib.h.
3597 * gdbreplay.c: Unconditionally include stdlib.h.
3598
3599 2013-11-18 Tom Tromey <tromey@redhat.com>
3600
3601 * config.in: Rebuild.
3602 * configure: Rebuild.
3603 * configure.ac: Don't use AC_HEADER_DIRENT.
3604
3605 2013-11-18 Tom Tromey <tromey@redhat.com>
3606
3607 * server.h: Don't check HAVE_STRING_H.
3608 * gdbreplay.c: Don't check HAVE_STRING_H.
3609 * configure: Rebuild.
3610
3611 2013-11-18 Tom Tromey <tromey@redhat.com>
3612
3613 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3614 LIBGNU.
3615
3616 2013-11-08 Tom Tromey <tromey@redhat.com>
3617
3618 * configure, config.in: Rebuild.
3619 * configure.ac: Remove unused configury.
3620
3621 2013-11-08 Tom Tromey <tromey@redhat.com>
3622
3623 * acinclude.m4: Include common.m4, codeset.m4.
3624 * configure, config.in: Rebuild.
3625 * configure.ac: Use GDB_AC_COMMON.
3626
3627 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3628
3629 * linux-s390-low.c (HWCAP_S390_TE): New define.
3630 (s390_arch_setup): Consider the TE field in the HWCAP for
3631 determining 'have_regset_tdb'.
3632
3633 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3634
3635 PR gdb/16014
3636 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3637 call to sizeof.
3638
3639 2013-10-02 Pedro Alves <palves@redhat.com>
3640
3641 * server.c (process_serial_event): Don't output "GDBserver
3642 exiting" if GDB is connected through stdio.
3643 * target.c (mywait): Likewise, be silent if GDB is connected
3644 through stdio.
3645
3646 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3647
3648 * lynx-low.c (lynx_add_threads_after_attach): New function.
3649 (lynx_attach): Remove call to add_thread. Add call to
3650 lynx_add_threads_after_attach instead.
3651
3652 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3653
3654 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3655 * config.in, configure: Regenerated.
3656
3657 2013-09-18 Yao Qi <yao@codesourcery.com>
3658
3659 PR server/15959
3660 * server.c (start_inferior): Clear 'resume_info'.
3661
3662 2013-09-16 Jiong Wang <jiwang@tilera.com>
3663
3664 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3665 for each register.
3666
3667 2013-09-16 Jiong Wang <jiwang@tilera.com>
3668
3669 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3670 linux-tile-low.o to srv_tgtobj.
3671
3672 2013-09-16 Will Newton <will.newton@linaro.org>
3673
3674 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3675 out regs.
3676
3677 2013-09-06 Pedro Alves <palves@redhat.com>
3678
3679 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3680 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3681 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3682 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3683 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3684 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3685
3686 2013-09-06 Pedro Alves <palves@redhat.com>
3687
3688 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3689 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3690
3691 2013-09-06 Pedro Alves <palves@redhat.com>
3692
3693 * linux-amd64-ipa.c: Include tracepoint.h.
3694 * linux-i386-ipa.c: Include tracepoint.h.
3695
3696 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3697
3698 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3699 (ps_get_thread_area): New function.
3700
3701 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3702
3703 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3704 (initialize_low_arch): Call init_registers_crisv32 rather than
3705 init_register_crisv32.
3706
3707 2013-09-05 Pedro Alves <palves@redhat.com>
3708
3709 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3710 to ...
3711 * hostio.h: ... this new file.
3712 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3713 win32-low.c: Include hostio.h.
3714
3715 2013-09-05 Pedro Alves <palves@redhat.com>
3716
3717 * server.h (gdb_client_data, handler_func, callback_handler_func)
3718 (delete_file_handler, add_file_handler, append_callback_event)
3719 (delete_callback_event, start_event_loop, initialize_event_loop):
3720 Move to event-loop.h and include it.
3721 * event-loop.h: New file.
3722
3723 2013-09-05 Pedro Alves <palves@redhat.com>
3724
3725 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3726 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3727 (loaded_dll, unloaded_dll): Move to ...
3728 * dll.h: ... this new file.
3729 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3730
3731 2013-09-05 Pedro Alves <palves@redhat.com>
3732
3733 * server.h (current_process, get_thread_process, all_processes)
3734 (add_inferior_to_list, for_each_inferior, current_inferior)
3735 (remove_inferior, add_process, remove_process, find_process_pid)
3736 (have_started_inferiors_p, have_attached_inferiors_p)
3737 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3738 (clear_inferiors, find_inferior, find_inferior_id)
3739 (inferior_target_data, set_inferior_target_data)
3740 (inferior_regcache_data, set_inferior_regcache_data): Move to
3741 inferiors.h, and include it.
3742 * inferiors.h: New file.
3743
3744 2013-09-05 Pedro Alves <palves@redhat.com>
3745
3746 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3747 Move ...
3748 * ax.h: ... here.
3749
3750 2013-09-05 Pedro Alves <palves@redhat.com>
3751
3752 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3753 tracepoint.h.
3754 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3755 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3756 (handle_tracepoint_general_set, handle_tracepoint_query)
3757 (tracepoint_finished_step, tracepoint_was_hit)
3758 (release_while_stepping_state_list, current_traceframe)
3759 (in_readonly_region, traceframe_read_mem)
3760 (fetch_traceframe_registers, traceframe_read_sdata)
3761 (traceframe_read_info, struct fast_tpoint_collect_status)
3762 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3763 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3764 (supply_fast_tracepoint_registers)
3765 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3766 (ipa_tdesc, claim_trampoline_space)
3767 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3768 (agent_mem_read, agent_get_trace_state_variable_value)
3769 (agent_set_trace_state_variable_value, agent_tsv_read)
3770 (agent_mem_read_string, get_raw_reg_func_addr)
3771 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3772 * tracepoint.h: ... this new file.
3773
3774 2013-09-05 Pedro Alves <palves@redhat.com>
3775
3776 * server.h (perror_with_name, error, fatal, warning, paddress)
3777 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3778 include it.
3779 * utils.h: New file.
3780
3781 2013-09-05 Pedro Alves <palves@redhat.com>
3782
3783 * server.h (remote_debug, noack_mode, transport_is_reliable)
3784 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3785 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3786 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3787 (write_enn, initialize_async_io, enable_async_io)
3788 (disable_async_io, check_remote_input_interrupt_request)
3789 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3790 (dead_thread_notify, prepare_resume_reply)
3791 (decode_address_to_semicolon, decode_address, decode_m_packet)
3792 (decode_M_packet, decode_X_packet, decode_xfer_write)
3793 (decode_search_memory_packet, unhexify, hexify)
3794 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3795 (look_up_one_symbol, relocate_instruction)
3796 (monitor_output): Move to remote-utils.h, and include it.
3797 * remote-utils.h: New file.
3798
3799 2013-09-05 Pedro Alves <palves@redhat.com>
3800
3801 * server.h (_): Delete.
3802
3803 2013-09-02 Pedro Alves <palves@redhat.com>
3804
3805 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3806 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3807 allocated.
3808 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3809
3810 2013-09-02 Pierre Muller <muller@sourceware.org>
3811
3812 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3813 or WriteProcessMemory complete successfully and handle
3814 ERROR_PARTIAL_COPY error.
3815
3816 2013-09-02 Pedro Alves <palves@redhat.com>
3817
3818 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3819 error instead of EIO.
3820
3821 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3822
3823 PR server/15604
3824 * linux-low.c: Include filestuff.h.
3825 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3826 * lynx-low.c: Include filestuff.h.
3827 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3828 * server.c: Include filestuff.h.
3829 (main): Call notice_open_fds.
3830 * spu-low.c: Include filestuff.h.
3831 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3832
3833 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3834
3835 * Makefile.in: Explain why ../target and ../nat are not
3836 listed as include file search paths.
3837 (linux-waitpid.o): New object file rule.
3838 * configure.srv (srv_native_linux_obj): New variable.
3839 Replace all occurrences of linux native object files with
3840 $srv_native_linux_obj.
3841 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3842 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3843 (linux_enable_event_reporting): Remove declaration.
3844 (my_waitpid): Moved to common/linux-waitpid.c.
3845 (linux_wait_for_event): Pass ptid when calling
3846 linux_enable_event_reporting.
3847 (linux_supports_tracefork_flag): Remove.
3848 (linux_enable_event_reporting): Likewise.
3849 (linux_tracefork_grandchild): Remove.
3850 (STACK_SIZE): Moved to common/linux-ptrace.c.
3851 (linux_tracefork_child): Remove.
3852 (linux_test_for_tracefork): Remove.
3853 (linux_look_up_symbols): Call linux_supports_traceclone.
3854 (initialize_low): Remove call to linux_test_for_tracefork.
3855 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3856 common/linux-ptrace.h.
3857 (PTRACE_TYPE_ARG4): Likewise.
3858 Include linux-ptrace.h.
3859
3860 2013-08-21 Pedro Alves <palves@redhat.com>
3861
3862 * config.in: Renegerate.
3863
3864 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3865
3866 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3867 (SFILES): Remove $(srcdir)/common/target-common.c and
3868 add $(srcdir)/target/waitstatus.c.
3869 (OBS): Remove target-common.o and add waitstatus.o.
3870 (server_h): Remove $(srcdir)/../common/target-common.h and
3871 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3872 and $(srcdir)/../target/waitstatus.h.
3873 (target-common.o): Remove.
3874 (waitstatus.o): New target object file.
3875 * target.h: Do not include target-common.h and
3876 include target/resume.h, target/wait.h and
3877 target/waitstatus.h.
3878
3879 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3880
3881 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3882 to PTRACE_TYPE_ARG3.
3883 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3884 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3885 PTRACE_TYPE_ARG4.
3886 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3887 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3888
3889 2013-07-27 Jie Zhang <jie@codesourcery.com>
3890 Daniel Jacobowitz <dan@codesourcery.com>
3891 Yao Qi <yao@codesourcery.com>
3892
3893 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3894 (mips-linux-watch.o): New rule.
3895 (mips_linux_watch_h): New variable.
3896 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3897 srv_tgtobj.
3898 * linux-mips-low.c: Include mips-linux-watch.h.
3899 (struct arch_process_info, struct arch_lwp_info): New.
3900 (update_watch_registers_callback): New function.
3901 (mips_linux_new_process, mips_linux_new_thread) New functions.
3902 (mips_linux_prepare_to_resume, mips_insert_point): New
3903 functions.
3904 (mips_remove_point, mips_stopped_by_watchpoint): New
3905 functions.
3906 (rsp_bp_type_to_target_hw_bp_type): New function.
3907 (mips_stopped_data_address): New function.
3908 (the_low_target): Add watchpoint support functions.
3909
3910 2013-07-27 Yao Qi <yao@codesourcery.com>
3911
3912 * i386-low.c: Include break-common.h.
3913 (enum target_hw_bp_type): Remove.
3914
3915 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3916
3917 * Makefile.in (SFILES): /common/target-common.c.
3918 (OBS): Add target-common.o.
3919 (server_h): Add $(srcdir)/../common/target-common.h.
3920 (target-common.o): New target.
3921 * server.c (queue_stop_reply_callback): Free
3922 status string after use.
3923 * target.c (target_waitstatus_to_string): Remove.
3924 * target.h: Include target-common.h.
3925 (resume_kind): Likewise.
3926 (target_waitkind): Likewise.
3927 (target_waitstatus): Likewise.
3928 (TARGET_WNOHANG): Likewise.
3929
3930 2013-07-04 Yao Qi <yao@codesourcery.com>
3931
3932 * Makefile.in (host_alias): Use @host_noncanonical@.
3933 (target_alias): Use @target_noncanonical@.
3934 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3935 ACX_NONCANONICAL_HOST.
3936 * configure: Regenerated.
3937
3938 Revert:
3939 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3940
3941 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3942 * configure: Rebuild.
3943 * Makefile.in (version_host, version_target): Get from configure.
3944 (version.c): Use $(version_host) and $(version_target).
3945
3946 2013-07-03 Pedro Alves <palves@redhat.com>
3947
3948 * Makefile.in (config.status): Depend on development.sh.
3949 * acinclude.m4: Include libmcheck.m4.
3950 * configure: Regenerate.
3951
3952 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3953
3954 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3955 attribute inside the parentheses.
3956 (winapi_DebugSetProcessKillOnExit): Ditto.
3957 (winapi_DebugBreakProcess): Ditto.
3958 (winapi_GenerateConsoleCtrlEvent): Ditto.
3959
3960 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3961
3962 * notif.h (notif_event): Add a dummy member to avoid compiler
3963 errors.
3964
3965 2013-07-01 Pedro Alves <palves@redhat.com>
3966
3967 * hostio.c (HOSTIO_PATH_MAX): Define.
3968 (require_filename, handle_open, handle_unlink, handle_readlink):
3969 Use it.
3970
3971 2013-07-01 Pedro Alves <palves@redhat.com>
3972
3973 * server.h: Include "pathmax.h".
3974 * linux-low.c: Don't include sys/param.h.
3975 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3976 MAXPATHLEN.
3977 * win32-low.c: Don't include sys/param.h.
3978 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3979
3980 2013-07-01 Pedro Alves <palves@redhat.com>
3981
3982 * event-loop.c: Don't check HAVE_UNISTD_H before including
3983 <unistd.h>.
3984 * gdbreplay.c: Likewise.
3985 * remote-utils.c: Likewise.
3986 * server.c: Likewise.
3987 * configure.ac: Don't check for unistd.h.
3988 * configure: Regenerate.
3989
3990 2013-06-28 Tom Tromey <tromey@redhat.com>
3991
3992 * Makefile.in (version.c): Use version.in, not
3993 common/version.in.
3994
3995 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3996
3997 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3998 * configure: Rebuild.
3999 * Makefile.in (version_host, version_target): Get from configure.
4000 (version.c): Use $(version_host) and $(version_target).
4001
4002 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4003
4004 Fix trace-status to output user name without trailing colon.
4005 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4006
4007 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4008
4009 Fix trace-status to output proper start-time and stop-time.
4010 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4011 output start time and stop time in hex as gdb expects.
4012
4013 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4014
4015 * tracepoint.c (build_traceframe_info_xml): Output trace state
4016 variables present in the trace buffer.
4017
4018 2013-06-24 Tom Tromey <tromey@redhat.com>
4019
4020 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4021 create-version.sh.
4022 (version.o): Remove.
4023 * gdbreplay.c: Include version.h.
4024 (version, host_name): Don't declare.
4025 * server.h: Include version.h.
4026 (version, host_name): Don't declare.
4027
4028 2013-06-12 Pedro Alves <palves@redhat.com>
4029
4030 * linux-x86-low.c (linux_is_elf64): Delete global.
4031 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4032 with local linux_pid_exe_is_elf_64_file use.
4033
4034 2013-06-11 Pedro Alves <palves@redhat.com>
4035
4036 * linux-low.c (regset_disabled, disable_regset): New functions.
4037 (regsets_fetch_inferior_registers)
4038 (regsets_store_inferior_registers): Use them.
4039 (initialize_regsets_info); Don't allocate the disabled_regsets
4040 array here.
4041 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4042 comment.
4043
4044 2013-06-11 Pedro Alves <palves@redhat.com>
4045
4046 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4047 xmalloc.
4048
4049 2013-06-11 Pedro Alves <palves@redhat.com>
4050
4051 * linux-x86-low.c (initialize_low_arch): Call
4052 init_registers_x32_avx_linux.
4053
4054 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4055
4056 Fix compatibility with Android Bionic.
4057 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4058 it is not empty.
4059
4060 2013-06-07 Pedro Alves <palves@redhat.com>
4061
4062 PR server/14823
4063 * Makefile.in (OBS): Add tdesc.o.
4064 (IPA_OBJS): Add tdesc-ipa.o.
4065 (tdesc-ipa.o): New rule.
4066 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4067 interface.
4068 * linux-low.c (new_inferior): Delete.
4069 (disabled_regsets, num_regsets): Delete.
4070 (linux_add_process): Adjust to set the new per-process
4071 new_inferior flag.
4072 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4073 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4074 was a stop. When calling arch_setup, switch the current inferior
4075 to the thread that got an event.
4076 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4077 (regsets_fetch_inferior_registers)
4078 (regsets_store_inferior_registers): New regsets_info parameter.
4079 Adjust to use it.
4080 (linux_register_in_regsets): New regs_info parameter. Adjust to
4081 use it.
4082 (register_addr, fetch_register, store_register): New usrregs_info
4083 parameter. Adjust to use it.
4084 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4085 parameter regs_info. Adjust to use it.
4086 (linux_fetch_registers): Get the current inferior's regs_info, and
4087 adjust to use it.
4088 (linux_store_registers): Ditto.
4089 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4090 (initialize_low): Don't initialize the target_regsets here. Call
4091 initialize_low_arch.
4092 * linux-low.h (target_regsets): Delete declaration.
4093 (struct regsets_info): New.
4094 (struct usrregs_info): New.
4095 (struct regs_info): New.
4096 (struct process_info_private) <new_inferior>: New field.
4097 (struct linux_target_ops): Delete the num_regs, regmap, and
4098 regset_bitmap fields. New field regs_info.
4099 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4100 * i387-fp.c (num_xmm_registers): Delete.
4101 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4102 calls to new interface.
4103 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4104 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4105 Infer the number of xmm registers from the regcache's target
4106 description.
4107 * i387-fp.h (num_xmm_registers): Delete.
4108 * inferiors.c (add_thread): Don't install the thread's regcache
4109 here.
4110 * proc-service.c (gregset_info): Fetch the current inferior's
4111 regs_info. Adjust to use it.
4112 * regcache.c: Include tdesc.h.
4113 (register_bytes, reg_defs, num_registers)
4114 (gdbserver_expedite_regs): Delete.
4115 (get_thread_regcache): If the thread doesn't have a regcache yet,
4116 create one, instead of aborting gdbserver.
4117 (regcache_invalidate_one): Rename to ...
4118 (regcache_invalidate_thread): ... this.
4119 (regcache_invalidate_one): New.
4120 (regcache_invalidate): Only invalidate registers of the current
4121 process.
4122 (init_register_cache): Add target_desc parameter, and use it.
4123 (new_register_cache): Ditto. Assert the target description has a
4124 non zero registers_size.
4125 (regcache_cpy): Add assertions. Adjust.
4126 (realloc_register_cache, set_register_cache): Delete.
4127 (registers_to_string, registers_from_string): Adjust.
4128 (find_register_by_name, find_regno, find_register_by_number)
4129 (register_cache_size): Add target_desc parameter, and use it.
4130 (free_register_cache_thread, free_register_cache_thread_one)
4131 (regcache_release, register_cache_size): New.
4132 (register_size): Add target_desc parameter, and use it.
4133 (register_data, supply_register, supply_register_zeroed)
4134 (supply_regblock, supply_register_by_name, collect_register)
4135 (collect_register_as_string, collect_register_by_name): Adjust.
4136 * regcache.h (struct target_desc): Forward declare.
4137 (struct regcache) <tdesc>: New field.
4138 (init_register_cache, new_register_cache): Add target_desc
4139 parameter.
4140 (regcache_invalidate_thread): Declare.
4141 (regcache_invalidate_one): Delete declaration.
4142 (regcache_release): Declare.
4143 (find_register_by_number, register_cache_size, register_size)
4144 (find_regno): Add target_desc parameter.
4145 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4146 declarations.
4147 * remote-utils.c: Include tdesc.h.
4148 (outreg, prepare_resume_reply): Adjust.
4149 * server.c: Include tdesc.h.
4150 (gdbserver_xmltarget): Delete declaration.
4151 (get_features_xml, process_serial_event): Adjust.
4152 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4153 declare.
4154 (struct process_info) <tdesc>: New field.
4155 (ipa_tdesc): Declare.
4156 * tdesc.c: New file.
4157 * tdesc.h: New file.
4158 * tracepoint.c: Include tdesc.h.
4159 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4160 (get_context_regcache): Adjust to pass ipa_tdesc down.
4161 (do_action_at_tracepoint): Adjust to get the register cache size
4162 from the context regcache's description.
4163 (traceframe_walk_blocks): Adjust to get the register cache size
4164 from the current trace frame's description.
4165 (traceframe_get_pc): Adjust to get current trace frame's
4166 description and pass it down.
4167 (gdb_collect): Adjust to get the register cache size from the
4168 IPA's description.
4169 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4170 (gdbserver_xmltarget): Delete.
4171 (initialize_low_tracepoint): Set the ipa's target description.
4172 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4173 (initialize_low_tracepoint): Set the ipa's target description.
4174 * linux-x86-low.c: Include tdesc.h.
4175 [__x86_64__] (is_64bit_tdesc): New.
4176 (ps_get_thread_area, x86_get_thread_area): Use it.
4177 (i386_cannot_store_register): Rename to ...
4178 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4179 (i386_cannot_fetch_register): Rename to ...
4180 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4181 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4182 to new interface.
4183 (target_regsets): Rename to ...
4184 (x86_regsets): ... this.
4185 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4186 interface.
4187 (x86_siginfo_fixup): Use is_64bit_tdesc.
4188 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4189 (tdesc_x32_avx_linux, tdesc_x32_linux)
4190 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4191 Declare.
4192 (x86_linux_update_xmltarget): Delete.
4193 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4194 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4195 (AMD64_LINUX_USER64_CS): New.
4196 (x86_linux_read_description): New, based on
4197 x86_linux_update_xmltarget.
4198 (same_process_callback): New.
4199 (x86_arch_setup_process_callback): New.
4200 (x86_linux_update_xmltarget): New.
4201 (x86_regsets_info): New.
4202 (amd64_linux_regs_info): New.
4203 (i386_linux_usrregs_info): New.
4204 (i386_linux_regs_info): New.
4205 (x86_linux_regs_info): New.
4206 (x86_arch_setup): Reimplement.
4207 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4208 (x86_emit_ops): Ditto.
4209 (the_low_target): Adjust. Install x86_linux_regs_info,
4210 x86_cannot_fetch_register, and x86_cannot_store_register.
4211 (initialize_low_arch): New.
4212 * linux-ia64-low.c (tdesc_ia64): Declare.
4213 (ia64_fetch_register): Adjust.
4214 (ia64_usrregs_info, regs_info): New globals.
4215 (ia64_regs_info): New function.
4216 (the_low_target): Adjust.
4217 (initialize_low_arch): New function.
4218 * linux-sparc-low.c (tdesc_sparc64): Declare.
4219 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4220 Adjust.
4221 (sparc_arch_setup): New function.
4222 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4223 (the_low_target): Adjust.
4224 (initialize_low_arch): New function.
4225 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4226 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4227 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4228 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4229 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4230 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4231 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4232 (tdesc_powerpc_isa205_vsx64l): Declare.
4233 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4234 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4235 (ppc_set_pc, ppc_get_hwcap): Adjust.
4236 (ppc_usrregs_info): Forward declare.
4237 (!__powerpc64__) ppc_regmap_adjusted: New global.
4238 (ppc_arch_setup): Adjust to the current process'es target
4239 description.
4240 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4241 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4242 (ppc_store_evrregset): Adjust.
4243 (target_regsets): Rename to ...
4244 (ppc_regsets): ... this, and make static.
4245 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4246 (ppc_regs_info): New function.
4247 (the_low_target): Adjust.
4248 (initialize_low_arch): New function.
4249 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4250 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4251 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4252 (tdesc_s390x_linux64v2): Declare.
4253 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4254 (s390_fill_gregset, s390_store_last_break): Adjust.
4255 (target_regsets): Rename to ...
4256 (s390_regsets): ... this, and make static.
4257 (s390_get_pc, s390_set_pc): Adjust.
4258 (s390_get_hwcap): New target_desc parameter, and use it.
4259 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4260 (s390_arch_setup): Adjust to set the current process'es target
4261 description. Don't adjust the regmap.
4262 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4263 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4264 (regs_info_3264): New globals.
4265 (s390_regs_info): New function.
4266 (the_low_target): Adjust.
4267 (initialize_low_arch): New function.
4268 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4269 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4270 [__mips64] (init_registers_mips_linux)
4271 (init_registers_mips_dsp_linux): Delete defines.
4272 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4273 (have_dsp): New global.
4274 (mips_read_description): New, based on mips_arch_setup.
4275 (mips_arch_setup): Reimplement.
4276 (get_usrregs_info): New function.
4277 (mips_cannot_fetch_register, mips_cannot_store_register)
4278 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4279 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4280 (target_regsets): Rename to ...
4281 (mips_regsets): ... this, and make static.
4282 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4283 (dsp_regs_info, regs_info): New globals.
4284 (mips_regs_info): New function.
4285 (the_low_target): Adjust.
4286 (initialize_low_arch): New function.
4287 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4288 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4289 Declare.
4290 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4291 (arm_read_description): New, with bits factored from
4292 arm_arch_setup.
4293 (arm_arch_setup): Reimplement.
4294 (target_regsets): Rename to ...
4295 (arm_regsets): ... this, and make static.
4296 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4297 (arm_regs_info): New function.
4298 (the_low_target): Adjust.
4299 (initialize_low_arch): New function.
4300 * linux-m68k-low.c (tdesc_m68k): Declare.
4301 (target_regsets): Rename to ...
4302 (m68k_regsets): ... this, and make static.
4303 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4304 (m68k_regs_info): New function.
4305 (m68k_arch_setup): New function.
4306 (the_low_target): Adjust.
4307 (initialize_low_arch): New function.
4308 * linux-sh-low.c (tdesc_sharch): Declare.
4309 (target_regsets): Rename to ...
4310 (sh_regsets): ... this, and make static.
4311 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4312 (sh_regs_info, sh_arch_setup): New functions.
4313 (the_low_target): Adjust.
4314 (initialize_low_arch): New function.
4315 * linux-bfin-low.c (tdesc_bfin): Declare.
4316 (bfin_arch_setup): New function.
4317 (bfin_usrregs_info, regs_info): New globals.
4318 (bfin_regs_info): New function.
4319 (the_low_target): Adjust.
4320 (initialize_low_arch): New function.
4321 * linux-cris-low.c (tdesc_cris): Declare.
4322 (cris_arch_setup): New function.
4323 (cris_usrregs_info, regs_info): New globals.
4324 (cris_regs_info): New function.
4325 (the_low_target): Adjust.
4326 (initialize_low_arch): New function.
4327 * linux-cris-low.c (tdesc_crisv32): Declare.
4328 (cris_arch_setup): New function.
4329 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4330 (cris_regs_info): New function.
4331 (the_low_target): Adjust.
4332 (initialize_low_arch): New function.
4333 * linux-m32r-low.c (tdesc_m32r): Declare.
4334 (m32r_arch_setup): New function.
4335 (m32r_usrregs_info, regs_info): New globals.
4336 (m32r_regs_info): Adjust.
4337 (initialize_low_arch): New function.
4338 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4339 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4340 (tic6x_usrregs_info): Forward declare.
4341 (tic6x_read_description): New function, based on ...
4342 (tic6x_arch_setup): ... this. Reimplement.
4343 (target_regsets): Rename to ...
4344 (tic6x_regsets): ... this, and make static.
4345 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4346 (tic6x_regs_info): New function.
4347 (the_low_target): Adjust.
4348 (initialize_low_arch): New function.
4349 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4350 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4351 (target_regsets): Rename to ...
4352 (xtensa_regsets): ... this, and make static.
4353 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4354 globals.
4355 (xtensa_arch_setup, xtensa_regs_info): New functions.
4356 (the_low_target): Adjust.
4357 (initialize_low_arch): New function.
4358 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4359 (nios2_arch_setup): Set the current process'es tdesc.
4360 (target_regsets): Rename to ...
4361 (nios2_regsets): ... this.
4362 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4363 (nios2_regs_info): New function.
4364 (the_low_target): Adjust.
4365 (initialize_low_arch): New function.
4366 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4367 (aarch64_arch_setup): Set the current process'es tdesc.
4368 (target_regsets): Rename to ...
4369 (aarch64_regsets): ... this.
4370 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4371 (aarch64_regs_info): New function.
4372 (the_low_target): Adjust.
4373 (initialize_low_arch): New function.
4374 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4375 globals.
4376 (target_regsets): Rename to ...
4377 (tile_regsets): ... this.
4378 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4379 (tile_regs_info): New function.
4380 (tile_arch_setup): Set the current process'es tdesc.
4381 (the_low_target): Adjust.
4382 (initialize_low_arch): New function.
4383 * spu-low.c (tdesc_spu): Declare.
4384 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4385 * win32-arm-low.c (tdesc_arm): Declare.
4386 (arm_arch_setup): New function.
4387 (the_low_target): Install arm_arch_setup instead of
4388 init_registers_arm.
4389 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4390 (init_windows_x86): Rename to ...
4391 (i386_arch_setup): ... this. Set `win32_tdesc'.
4392 (the_low_target): Adjust.
4393 * win32-low.c (win32_tdesc): New global.
4394 (child_add_thread): Don't create the thread cache here.
4395 (do_initial_child_stuff): Set the new process'es tdesc.
4396 * win32-low.h (struct target_desc): Forward declare.
4397 (win32_tdesc): Declare.
4398 * lynx-i386-low.c (tdesc_i386): Declare global.
4399 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4400 * lynx-low.c (lynx_tdesc): New global.
4401 (lynx_add_process): Set the new process'es tdesc.
4402 * lynx-low.h (struct target_desc): Forward declare.
4403 (lynx_tdesc): Declare global.
4404 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4405 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4406 * nto-low.c (nto_tdesc): New global.
4407 (do_attach): Set the new process'es tdesc.
4408 * nto-low.h (struct target_desc): Forward declare.
4409 (nto_tdesc): Declare.
4410 * nto-x86-low.c (tdesc_i386): Declare.
4411 (nto_x86_arch_setup): Set `nto_tdesc'.
4412
4413 2013-06-04 Gary Benson <gbenson@redhat.com>
4414
4415 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4416 to qSupported response when appropriate.
4417 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4418 with nonzero-length annex.
4419 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4420 arguments supplied in annex.
4421
4422 2013-05-31 Doug Evans <dje@google.com>
4423
4424 PR server/15594
4425 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4426 64 bits in 64-cross-32 environment.
4427
4428 2013-05-28 Pedro Alves <palves@redhat.com>
4429
4430 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4431 (aarch64-without-fpu.c): Delete rule.
4432 * configure.srv (aarch64*-*-linux*): Remove references to
4433 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4434 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4435 declaration.
4436
4437 2013-05-24 Pedro Alves <palves@redhat.com>
4438
4439 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4440 instead of strchr/decode_address. Error if the range isn't split
4441 with a ','. Don't assume there's be a ':' in the action.
4442
4443 2013-05-23 Yao Qi <yao@codesourcery.com>
4444 Pedro Alves <palves@redhat.com>
4445
4446 * linux-low.c (lwp_in_step_range): New function.
4447 (linux_wait_1): If the thread was range stepping and stopped
4448 outside the stepping range, report the stop to GDB. Otherwise,
4449 continue stepping. Add range stepping debug output.
4450 (linux_set_resume_request): Copy the step range from the resume
4451 request to the lwp.
4452 (linux_supports_range_stepping): New.
4453 (linux_target_ops) <supports_range_stepping>: Set to
4454 linux_supports_range_stepping.
4455 * linux-low.h (struct linux_target_ops)
4456 <supports_range_stepping>: New field.
4457 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4458 * linux-x86-low.c (x86_supports_range_stepping): New.
4459 (the_low_target) <supports_range_stepping>: Set to
4460 x86_supports_range_stepping.
4461 * server.c (handle_v_cont): Handle 'r' action.
4462 (handle_v_requests): Append ";r" if the target supports range
4463 stepping.
4464 * target.h (struct thread_resume) <step_range_start,
4465 step_range_end>: New fields.
4466 (struct target_ops) <supports_range_stepping>:
4467 New field.
4468 (target_supports_range_stepping): New macro.
4469
4470 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4471
4472 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4473 confusion in comment.
4474
4475 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4476
4477 * lynx-low.c (struct process_info_private): New type.
4478 (lynx_add_process): New function.
4479 (lynx_create_inferior, lynx_attach): Replace calls to
4480 add_process by calls to lynx_add_process.
4481 (lynx_resume): If PTID is null, then try using
4482 current_process()->private->last_wait_event_ptid.
4483 Add comments.
4484 (lynx_clear_inferiors): Delete. The contents of that function
4485 has been inlined in lynx_mourn;
4486 (lynx_wait_1): Save the ptid in the process's private data.
4487 (lynx_mourn): Free the process' private data. Replace call
4488 to lynx_clear_inferiors by call to clear_inferiors.
4489
4490 2013-05-17 Yao Qi <yao@codesourcery.com>
4491
4492 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4493 the right place.
4494
4495 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4496
4497 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4498 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4499 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4500 PT_TEXT_END_ADDR guards. Update comments.
4501 (linux_target_op) <read_offsets>: Conditionally define to
4502 linux_read_offsets if the target is UCLIBC and if it defines
4503 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4504
4505 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4506 Andrew Jenner <andrew@codesourcery.com>
4507
4508 * Makefile.in (SFILES): Add linux-nios2-low.c.
4509 (clean): Add action to delete nios2-linux.c.
4510 (nios2-linux.c): New rule.
4511 * configure.srv: Add nios2*-*-linux*.
4512 * linux-nios2-low.c: New.
4513
4514 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4515
4516 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4517
4518 2013-04-25 Hui Zhu <hui@codesourcery.com>
4519
4520 PR gdb/15186
4521 * ax.c (ax_printf): Add fflush.
4522
4523 2013-04-22 Tom Tromey <tromey@redhat.com>
4524
4525 * Makefile.in (SFILES): Add filestuff.c.
4526 (OBS): Add filestuff.o.
4527 (filestuff.o): New target.
4528 * config.in, configure: Rebuild.
4529 * configure.ac: Check for fdwalk, pipe2.
4530
4531 2013-04-17 Pedro Alves <palves@redhat.com>
4532
4533 * configure.ac (USE_THREAD_DB): Delete variable.
4534 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4535 Don't AC_SUBST USE_THREAD_DB.
4536 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4537 * config.in, configure: Regenerate.
4538
4539 2013-04-16 Pedro Alves <palves@redhat.com>
4540
4541 * linux-low.h (struct lwp_info) <thread_known>: Move under
4542 the USE_THREAD_DB #ifdef.
4543
4544 2013-04-16 Pedro Alves <palves@redhat.com>
4545
4546 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4547 (linux-low.o): Delete rule.
4548 * linux-low.h: Always include "gdb_thread_db.h" instead of
4549 conditionally including thread_db.h.
4550 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4551 HAVE_THREAD_DB_H.
4552
4553 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4554
4555 * Makefile.in (install-only): Fix make install regression.
4556
4557 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4558
4559 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4560 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4561 installation.
4562 * gdbserver.1: Remove.
4563
4564 2013-03-22 Pedro Alves <palves@redhat.com>
4565
4566 * linux-low.c (handle_extended_wait): Don't call
4567 linux_enable_event_reporting.
4568
4569 2013-03-15 Tony Theodore <tonyt@logyst.com>
4570
4571 PR build/9098:
4572 * Makefile.in (SHELL): Use @SHELL@.
4573
4574 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4575
4576 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4577 compiler warning.
4578
4579 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4580
4581 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4582 Remove extraneous NULL element.
4583
4584 2013-03-13 Yao Qi <yao@codesourcery.com>
4585
4586 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4587 'V' block in trace frame.
4588
4589 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4590
4591 * target.h (struct target_ops): Add btrace ops.
4592 (target_supports_btrace): New macro.
4593 (target_enable_btrace): New macro.
4594 (target_disable_btrace): New macro.
4595 (target_read_btrace): New macro.
4596 * gdbthread.h (struct thread_info): Add btrace field.
4597 * server.c: Include btrace-common.h.
4598 (handle_btrace_general_set): New function.
4599 (handle_btrace_enable): New function.
4600 (handle_btrace_disable): New function.
4601 (handle_general_set): Call handle_btrace_general_set.
4602 (handle_qxfer_btrace): New function.
4603 (struct qxfer qxfer_packets[]): Add btrace entry.
4604 * inferiors.c (remove_thread): Disable btrace.
4605 * linux-low: Include linux-btrace.h.
4606 (linux_low_enable_btrace): New function.
4607 (linux_low_read_btrace): New function.
4608 (linux_target_ops): Add btrace ops.
4609 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4610 Add srv_linux_btrace=yes.
4611 (x86_64-*-linux*): Add linux-btrace.o.
4612 Add srv_linux_btrace=yes.
4613 * configure.ac: Define HAVE_LINUX_BTRACE.
4614 * config.in: Regenerated.
4615 * configure: Regenerated.
4616
4617 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4618
4619 * server.c (handle_qxfer): Preserve error message if -3 is
4620 returned.
4621 (qxfer): Document the -3 return value.
4622
4623 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4624
4625 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4626 (linux_btrace_h): New variable.
4627 (linux-btrace.o): New rule.
4628
4629 2013-03-08 Stan Shebs <stan@codesourcery.com>
4630 Hafiz Abid Qadeer <abidh@codesourcery.com>
4631
4632 * tracepoint.c (trace_buffer_size): New global.
4633 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4634 (init_trace_buffer): Change to one-argument function. Allocate
4635 trace buffer memory.
4636 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4637 handle QTBuffer:size packet.
4638 (cmd_bigqtbuffer_size): New function.
4639 (initialize_tracepoint): Call init_trace_buffer with
4640 DEFAULT_TRACE_BUFFER_SIZE.
4641 * server.c (handle_query): Add QTBuffer:size in the
4642 supported packets.
4643
4644 2013-03-07 Yao Qi <yao@codesourcery.com>
4645
4646 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4647 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4648 of -1.
4649 (cmd_qtsp): Adjust condition. Do post increment.
4650 Set cur_action and cur_step_action back to 0.
4651
4652 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4653
4654 PR server/15236
4655 * linux-low.c (linux_write_memory): Return early success if LEN is
4656 zero.
4657
4658 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4659
4660 * configure.srv: Add x86_64-*-cygwin* as target.
4661
4662 2013-02-28 Tom Tromey <tromey@redhat.com>
4663
4664 * configure.ac: Invoke AC_SYS_LARGEFILE.
4665 * configure, config.in: Rebuild.
4666
4667 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4668
4669 * win32-low.c: Throughout, fix format strings and casts of
4670 printf-like functions to avoid type related warnings on all
4671 platforms.
4672 (get_child_debug_event): Print dwDebugEventCode as hex since
4673 that's how it's usually documented.
4674
4675 2013-02-28 Yao Qi <yao@codesourcery.com>
4676
4677 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4678 pulongest.
4679
4680 2013-02-27 Jiong Wang <jiwang@tilera.com>
4681
4682 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4683 (reg-tilegx32.c): New rule.
4684 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4685 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4686 different register info initializer according to elf class.
4687 (init_registers_tilgx32): New function. The tilegx32 register info
4688 initializer.
4689 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4690 (tile_store_gregset): Likewise.
4691
4692 2013-02-27 Yao Qi <yao@codesourcery.com>
4693
4694 * server.c (process_point_options): Print debug message when
4695 debug_threads is true.
4696
4697 2013-02-26 Yao Qi <yao@codesourcery.com>
4698
4699 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4700
4701 2013-02-19 Pedro Alves <palves@redhat.com>
4702 Kai Tietz <ktietz@redhat.com>
4703
4704 PR gdb/15161
4705
4706 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4707 instead of strtoul to extract address from packet.
4708 (process_serial_event) <'z'>: Likewise.
4709
4710 2013-02-18 Yao Qi <yao@codesourcery.com>
4711
4712 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4713
4714 2013-02-14 Pedro Alves <palves@redhat.com>
4715
4716 Plug memory leak.
4717
4718 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4719 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4720
4721 2013-02-14 Pedro Alves <palves@redhat.com>
4722
4723 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4724
4725 2013-02-14 Pedro Alves <palves@redhat.com>
4726
4727 * tracepoint.c (save_string): Delete.
4728 (add_tracepoint_action): Use savestring instead of save_string.
4729
4730 2013-02-12 Pedro Alves <palves@redhat.com>
4731
4732 * linux-xtensa-low.c: Ditto.
4733 * xtensa-xtregs.c: Ditto.
4734
4735 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4736
4737 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4738 thread_db.
4739
4740 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4741
4742 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4743 aarch64_num_wp_regs and aarch64_num_bp_regs to
4744 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4745
4746 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4747
4748 * linux-aarch64-low.c (ps_get_thread_area): Replace
4749 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4750
4751 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4752 Marcus Shawcroft <marcus.shawcroft@arm.com>
4753 Nigel Stephens <nigel.stephens@arm.com>
4754 Yufeng Zhang <yufeng.zhang@arm.com>
4755
4756 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4757 (aarch64.c, aarch64-without-fpu.c): New targets.
4758 * configure.srv (aarch64*-*-linux*): New.
4759 * linux-aarch64-low.c: New file.
4760
4761 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4762
4763 * linux-low.c (handle_extended_wait, linux_create_inferior)
4764 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4765 (dequeue_one_deferred_signal, linux_resume_one_thread)
4766 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4767 (linux_tracefork_grandchild, linux_test_for_tracefork)
4768 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4769 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4770 where the argument is 0.
4771
4772 2013-01-25 Yao Qi <yao@codesourcery.com>
4773
4774 * event-loop.c: Include "queue.h".
4775 (gdb_event_p): New typedef.
4776 (struct gdb_event) <next_event>: Remove.
4777 (event_queue): Change to QUEUE(gdb_event_p).
4778 (async_queue_event): Remove.
4779 (gdb_event_xfree): New.
4780 (initialize_event_loop): New.
4781 (process_event): Use API from QUEUE.
4782 (wait_for_event): Likewise.
4783 * server.c (main): Call initialize_event_loop.
4784 * server.h (initialize_event_loop): Declare.
4785
4786 2013-01-18 Yao Qi <yao@codesourcery.com>
4787
4788 * ax.h (struct eval_agent_expr_context): New.
4789 (gdb_eval_agent_expr): Update declaration.
4790 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4791 TFRAME. Add new argument CTX.
4792 * server.h (struct eval_agent_expr_context): Declare.
4793 (agent_mem_read, agent_tsv_read): Update declaration.
4794 (agent_mem_read_string): Likewise.
4795 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4796 (add_traceframe_block): Add new argument TPOINT.
4797 Increase TPOINT->traceframe_usage.
4798 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4799 eval_tracepoint_agent_expr.
4800 (condition_true_at_tracepoint): Likewise.
4801 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4802 (agent_mem_read_string, agent_tsv_read): Likewise.
4803
4804 2013-01-16 Yao Qi <yao@codesourcery.com>
4805
4806 * linux-low.c (linux_resume_one_lwp): Don't check
4807 'lwp->bp_reinsert != 0'.
4808
4809 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4810 Pedro Alves <palves@redhat.com>
4811
4812 * lynx-low.c (ptrace_request_to_str): Define a temporary
4813 macro and use it to simplify this function's implementation.
4814
4815 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4816
4817 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4818 sets errno.
4819
4820 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4821
4822 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4823
4824 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4825
4826 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4827
4828 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4829
4830 * lynx-low.c (lynx_resume): Use the resume_info parameter
4831 to determine the ptid for the lynx_ptrace call, unless
4832 it is equal to minus_one_ptid, in which case we use the
4833 ptid of the current_inferior.
4834 (lynx_wait_1): After having received a thread create/exit
4835 event, resume the inferior's execution using the signaling
4836 thread's ptid, rather than the old ptid.
4837
4838 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4839
4840 * lynx-low.c (lynx_resume): Delete variable ret.
4841
4842 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4843
4844 * gdbreplay.c (gdbreplay_version): Update copyright year.
4845 * server.c (gdbserver_version): Likewise.
4846
4847 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4848
4849 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4850 new thread.
4851
4852 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4853
4854 * lynx-low.c (ptrace_request_to_str): Add handling for
4855 PTRACE_GETTRACESIG.
4856
4857 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4858
4859 * lynx-low.c (lynx_attach): Delete variable new_process.
4860
4861 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4862
4863 * lynx-low.c (lynx_create_inferior): Delete variable
4864 new_process.
4865
4866 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4867
4868 * lynx-low.c (ptrace_request_to_str): Do not handle
4869 PTRACE_GETTHREADLIST if this macro does not exist.
4870
4871 2012-12-15 Yao Qi <yao@codesourcery.com>
4872
4873 * Makefile.in (OBS): Add notif.o.
4874 * notif.c, notif.h: New.
4875 * server.c: Include "notif.h".
4876 (struct vstop_notif) <next>: Remove.
4877 <base>: New field.
4878 (queue_stop_reply): Update.
4879 (push_event, send_next_stop_reply): Remove.
4880 (discard_queued_stop_replies): Update.
4881 (notif_stop): New variable.
4882 (handle_v_stopped): Remove.
4883 (handle_v_requests): Don't call handle_v_stopped. Call
4884 handle_ack_notif instead.
4885 (queue_stop_reply_callback): Call notif_event_enque instead
4886 of queue_stop_reply.
4887 (handle_status): Don't call send_next_stop_reply, call
4888 notif_write_event instead.
4889 (kill_inferior_callback): Likewise.
4890 (detach_or_kill_inferior_callback): Likewise.
4891 (main): Call initialize_notif.
4892 (process_serial_event): Call QUEUE_is_empty.
4893 (handle_target_event): Call notif_push instead of push event.
4894 * server.h (push_event): Remove declaration.
4895
4896 2012-12-10 Tom Tromey <tromey@redhat.com>
4897
4898 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4899 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4900 macros.
4901 (.c.o): Rewrite.
4902 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4903 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4904 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4905 (amd64-linux-ipa.o, ax.o): Rewrite.
4906 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4907 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4908 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4909 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4910 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4911 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4912 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4913 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4914 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4915 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4916 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4917 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4918 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4919 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4920 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4921 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4922 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4923 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4924 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4925 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4926 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4927 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4928 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4929 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4930 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4931 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4932 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4933 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4934 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4935 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4936 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4937 (reg-tilegx.o): Remove.
4938 (all_object_files): New macro.
4939 Include .deps files.
4940 * aclocal.m4, configure: Rebuild.
4941 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4942 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4943 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4944
4945 2012-12-05 Tom Tromey <tromey@redhat.com>
4946
4947 PR gdb/14917:
4948 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4949
4950 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4951
4952 * configure.ac: Check for linux/perf_event.h.
4953 * config.in: Regenerated.
4954 * configure: Regenerated.
4955
4956 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4957
4958 * hostio.c (handle_readlink): Decrease buffer size
4959 parameter passed to readlink by one byte.
4960
4961 2012-11-26 Yao Qi <yao@codesourcery.com>
4962
4963 * configure.ac (build_warnings): Append '-Wempty-body'.
4964 * configure: Regenerated.
4965 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4966 body.
4967
4968 2012-11-15 Pierre Muller <muller@sourceware.org>
4969
4970 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4971 * config.in: Regenerate.
4972 * configure: Regenerate.
4973 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4974 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4975 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4976 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4977 header.
4978 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4979 instead of <sys/wait.h> header.
4980 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4981
4982 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4983
4984 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4985 (various make rules): Remove -DGDBSERVER
4986
4987 2012-11-09 Yao Qi <yao@codesourcery.com>
4988
4989 * spu-low.c (current_ptid): Move it to ..
4990 * gdbthread.h: ... here. New.
4991 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4992 * server.c (myresume, process_serial_event): Likewise.
4993 * thread-db.c (thread_db_find_new_threads): Likewise.
4994 * tracepoint.c (run_inferior_command): Likewise.
4995
4996 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4997
4998 * server.c (handle_search_memory_1): Include access length in
4999 warning message.
5000
5001 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5002
5003 * linux-crisv32-low.c: Fix compile errors.
5004
5005 2012-09-04 Yao Qi <yao@codesourcery.com>
5006
5007 * tracepoint.c (cmd_qtsv): Adjust debug message.
5008 Don't check CUR_TPOINT.
5009
5010 2012-08-28 Yao Qi <yao@codesourcery.com>
5011
5012 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5013 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5014 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5015 Remove declarations of xmalloc, xreallloc, xstrdup and
5016 freeargv.
5017 * Makefile.in (libiberty_h): New.
5018 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5019 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5020
5021 2012-08-23 Yao Qi <yao@codesourcery.com>
5022
5023 * server.h: Remove declaration of 'xsnprintf'.
5024
5025 2012-08-22 Keith Seitz <keiths@redhat.com>
5026
5027 * server.h: Include build-gnulib-gbserver/config.h.
5028 * gdbreplay.c: Likewise.
5029
5030 2012-08-08 Doug Evans <dje@google.com>
5031
5032 * Makefile.in (SFILES): Add gdb_vecs.c.
5033 (OBS): Add gdb_vecs.o.
5034 (gdb_vecs_h, host_defs_h): New variables.
5035 (thread-db.o): Add $(gdb_vecs_h) dependency.
5036 (gdb_vecs.o): New rule.
5037 * thread-db.c: #include "gdb_vecs.h".
5038 (thread_db_load_search): Use a vector to iterate over path elements.
5039 Handle text appearing after "$pdir".
5040
5041 * configure.ac: Add check for strstr.
5042 * config.in: Regenerate.
5043 * configure: Regenerate.
5044
5045 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5046
5047 * hostio.c (handle_pread): If pread fails, fall back to attempting
5048 lseek/read.
5049 (handle_pwrite): Likewise for pwrite.
5050
5051 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5052
5053 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5054 between unsupported TYPE and unimplementable ADDR/LEN combination.
5055 (arm_insert_point): Act on new return value.
5056
5057 2012-07-31 Pedro Alves <palves@redhat.com>
5058
5059 * server.c (process_point_options): Only skip tokens if we find
5060 one that is unrecognized. Don't treat 'X' specially while
5061 skipping unrecognized tokens.
5062
5063 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5064
5065 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5066 to 4-byte-align HW breakpoint addresses for Thumb.
5067
5068 2012-07-27 Yao Qi <yao@codesourcery.com>
5069
5070 PR remote/14161.
5071
5072 * server.h: Declare gdb_agent_about_to_close.
5073 * target.c (kill_inferior): Include "agent.h".
5074 New. Send command 'kill'.
5075 * target.h (kill_inferior): Removed macro.
5076 * tracepoint.c (gdb_agent_about_to_close): New.
5077 (gdb_agent_helper_thread): Handle command 'close'.
5078 Wait endlessly until the inferior stops.
5079 Install gdb_agent_remove_socket to atexit hook.
5080 (agent_socket_name): New static variable.
5081 (gdb_agent_socket_init): Replace local variable 'name' with
5082 'agent_socket_name'.
5083 (gdb_agent_remove_socket): New.
5084
5085 2012-07-27 Yao Qi <yao@codesourcery.com>
5086
5087 * server.c (process_point_options): Stop at 'X' when parsing.
5088
5089 2012-07-19 Michael Eager <eager@eagercon.com>
5090
5091 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5092 to hw_execute.
5093 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5094 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5095 hardware breakpoint.
5096
5097 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5098
5099 * gdbserver/linux-low.c (initialize_low): Call
5100 linux_ptrace_init_warnings.
5101
5102 2012-07-02 Doug Evans <dje@google.com>
5103
5104 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5105 pointer to int.
5106
5107 2012-07-02 Stan Shebs <stan@codesourcery.com>
5108
5109 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5110 (ax.o): Add it to build rule.
5111 (ax-ipa.o): Ditto.
5112 (OBS): Add format.o.
5113 (IPA_OBS): Add format.o.
5114 * server.c (handle_query): Claim support for breakpoint commands.
5115 (process_point_options): Add command case.
5116 (process_serial_event): Leave running if there are printfs in
5117 effect.
5118 * mem-break.h (any_persistent_commands): Declare.
5119 (add_breakpoint_commands): Declare.
5120 (gdb_no_commands_at_breakpoint): Declare.
5121 (run_breakpoint_commands): Declare.
5122 * mem-break.c (struct point_command_list): New struct.
5123 (struct breakpoint): New field command_list.
5124 (any_persistent_commands): New function.
5125 (add_commands_to_breakpoint): New function.
5126 (add_breakpoint_commands): New function.
5127 (gdb_no_commands_at_breakpoint): New function.
5128 (run_breakpoint_commands): New function.
5129 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5130 locally.
5131 * ax.c: Include format.h.
5132 (ax_printf): New function.
5133 (gdb_eval_agent_expr): Add printf opcode.
5134
5135 2012-06-13 Yao Qi <yao@codesourcery.com>
5136
5137 * server.c (start_inferior): Remove duplicated writes to fields
5138 'last_resume_kind' and 'last_status' of 'current_inferior'.
5139
5140 2012-06-12 Yao Qi <yao@codesourcery.com>
5141 Pedro Alves <palves@redhat.com>
5142
5143 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5144 comment.
5145 * server.c (handle_v_cont): Extend comment.
5146
5147 2012-06-11 Yao Qi <yao@codesourcery.com>
5148
5149 * linux-low.c (linux_attach): Add 'static'.
5150
5151 2012-06-06 Yao Qi <yao@codesourcery.com>
5152
5153 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5154
5155 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5156
5157 Fix gcc -flto compilation warning.
5158 * server.c (main): Make variable multi_mode and attach volatile.
5159
5160 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5161
5162 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5163 if the platform doesn't know about it.
5164
5165 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5166
5167 * Makefile.in (SFILES): Add linux-tile-low.c.
5168 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5169 * configure.srv: Handle tilegx-*-linux*.
5170 * linux-tile-low.c: New file.
5171
5172 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5173
5174 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5175
5176 2012-05-24 Pedro Alves <palves@redhat.com>
5177
5178 PR gdb/7205
5179
5180 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5181
5182 2012-05-24 Pedro Alves <palves@redhat.com>
5183
5184 PR gdb/7205
5185
5186 Replace target_signal with gdb_signal throughout.
5187
5188 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5189
5190 * linux-low.c (linux_store_registers): Avoid the copying sequence
5191 when no data has been retrieved by ptrace.
5192
5193 2012-05-22 Will Deacon <will.deacon@arm.com>
5194
5195 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5196 Include asm/ptrace.h.
5197 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5198 already defined.
5199
5200 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5201
5202 * linux-low.c (linux_store_registers): Don't re-retrieve data
5203 with ptrace that has already been obtained from /proc. Always
5204 copy any data retrieved with ptrace to the buffer supplied.
5205
5206 2012-05-11 Yao Qi <yao@codesourcery.com>
5207 Pedro Alves <palves@redhat.com>
5208
5209 * linux-low.c (enum stopping_threads_kind): New.
5210 (stopping_threads): Change type to `enum stopping_threads_kind'.
5211 (handle_extended_wait): If stopping and suspending threads, leave
5212 the new_lwp suspended too.
5213 (linux_wait_for_event): Adjust.
5214 (stop_all_lwps): Set `stopping_threads' to
5215 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5216 whether we're suspending threads or just stopping them. Assert no
5217 recursion happens.
5218
5219 2012-04-29 Yao Qi <yao@codesourcery.com>
5220
5221 * server.h: Move some code to ...
5222 * gdbthread.h: ... here. New.
5223 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5224 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5225 (nto-low.o, win32-low.o): Likewise.
5226 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5227 * regcache.c, remote-utils.c, server.c: Likewise.
5228 * target.c, tracepoint.c, win32-low.c: Likewise.
5229
5230 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5231
5232 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5233 (PTRACE_ARG4_TYPE): Likewise.
5234 (PTRACE_XFER_TYPE): Likewise.
5235 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5236 ptrace to PTRACE_ARG3_TYPE.
5237 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5238 (PTRACE_ARG4_TYPE): Likewise.
5239 (PTRACE_XFER_TYPE): Likewise.
5240 (linux_detach_one_lwp): Cast fourth argument of
5241 ptrace to long then PTRACE_ARG4_TYPE.
5242 (regsets_fetch_inferior_registers): Cast third argument of
5243 ptrace to long then PTRACE_ARG3_TYPE.
5244 (regsets_store_inferior_registers): Likewise.
5245
5246 2012-04-20 Pedro Alves <palves@redhat.com>
5247
5248 * configure: Regenerate.
5249
5250 2012-04-19 Pedro Alves <palves@redhat.com>
5251
5252 * Makefile.in (GNULIB_BUILDDIR): New.
5253 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5254 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5255 (all, install-only, uninstall, clean-info, all-lib, clean): No
5256 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5257 (maintainer-clean realclean distclean): Use subdir_do.
5258 (subdir_do): New.
5259 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5260 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5261 * acinclude.m4: Include acx_configure_dir.m4.
5262 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5263 calls. Call AC_PROG_RANLIB. Configure gnulib using
5264 ACX_CONFIGURE_DIR.
5265 (GNULIB): New.
5266 (GNULIB_STDINT_H): Adjust.
5267 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5268 * gdbreplay.c: Include build-gnulib/config.h.
5269 * server.h: Likewise.
5270 * aclocal.m4: Regenerate.
5271 * config.in: Regenerate.
5272 * configure: Regenerate.
5273
5274 2012-04-19 Pedro Alves <palves@redhat.com>
5275
5276 * Makefile.in (LIBGNU, INCGNU): Adjust.
5277 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5278 (all, install-only, uninstall, clean-info, all-lib, clean)
5279 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5280 * configure.ac: Adjust AC_OUTPUT output.
5281 * aclocal.m4: Regenerate.
5282 * configure: Regenerate.
5283
5284 2012-04-19 Pedro Alves <palves@redhat.com>
5285
5286 * Makefile.in (generated_files): New.
5287 (server_h): Remove the explicit dependency on config.h, and depend
5288 on $generated_files.
5289
5290 2012-04-19 Pedro Alves <palves@redhat.com>
5291
5292 * Makefile.in (INCGNU): Add -Ignulib.
5293
5294 2012-04-19 Pedro Alves <palves@redhat.com>
5295
5296 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5297 (INCGNU): ... this, and spell out -I here.
5298 (GNULIB_LIB): Rename to ...
5299 (LIBGNU): ... this.
5300 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5301
5302 2012-04-19 Pedro Alves <palves@redhat.com>
5303
5304 * config.in: Regenerate.
5305
5306 2012-04-19 Pedro Alves <palves@redhat.com>
5307
5308 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5309 * server.h (memmem): Remove declaration.
5310 * config.in: Regenerate.
5311 * configure: Regenerate.
5312
5313 2012-04-19 Yao Qi <yao@codesourcery.com>
5314
5315 * Makefile.in (SFILES): Add common/vec.c.
5316 (OBS): Add vec.o.
5317 (vec.o): New rule.
5318
5319 2012-04-19 Yao Qi <yao@codesourcery.com>
5320
5321 * remote-utils.c (prepare_resume_reply): Replace with macro
5322 target_core_of_thread.
5323 * server.c (handle_qxfer_threads_proper): Likewise.
5324 * target.h (traget_core_of_thread): New macro.
5325
5326 2012-04-18 Pedro Alves <palves@redhat.com>
5327
5328 * aclocal.m4: Regenerate.
5329 * configure: Regenerate.
5330
5331 2012-04-16 Yao Qi <yao@codesourcery.com>
5332
5333 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5334 duplicated on address.
5335
5336 2012-04-16 Yao Qi <yao@codesourcery.com>
5337
5338 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5339 (struct tracepoint_action_ops) <send>: New field.
5340 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5341 (agent_expr_send, x_tracepoint_action_send): New.
5342 (l_tracepoint_action_send): New.
5343 (cmd_qtdp): Download and install tracepoint
5344 according to `use_agent'.
5345 (run_inferior_command): Add one more parameter `len'.
5346 Update callers.
5347 (tracepoint_send_agent): New.
5348 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5349
5350 2012-04-16 Yao Qi <yao@codesourcery.com>
5351
5352 * tracepoint.c (download_tracepoints): Moved to ...
5353 (cmd_qtstart): ... here.
5354
5355 2012-04-14 Yao Qi <yao@codesourcery.com>
5356
5357 * tracepoint.c: Include inttypes.h.
5358 (struct collect_memory_action): Use sized types.
5359 (struct tracepoint): Likewise.
5360 (cmd_qtdp, stop_tracing): Update print specifiers.
5361 (cmd_qtp, response_tracepoint): Likewise.
5362 (collect_data_at_tracepoint): Likewise.
5363 (collect_data_at_step): Likewise.
5364
5365 2012-04-14 Yao Qi <yao@codesourcery.com>
5366
5367 Import gnulib module inttypes.
5368 * aclocal.m4, config.in, configure: Regenerated.
5369
5370 2012-04-14 Yao Qi <yao@codesourcery.com>
5371
5372 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5373 Makefile and config.status at last.
5374
5375 2012-04-13 Yao Qi <yao@codesourcery.com>
5376
5377 * tracepoint.c: Include stdint.h unconditionally.
5378
5379 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5380
5381 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5382 on BFD_HAVE_SYS_PROCFS_TYPE.
5383 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5384 * configure: Regenerate.
5385 * config.in: Likewise.
5386
5387 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5388
5389 * Makefile.in (clean): Also remove x32.c x32-linux.c
5390 x32-avx.c x32-avx-linux.c.
5391 (x32.o): New target.
5392 (x32.c): Likewise.
5393 (x32-linux.o): Likewise.
5394 (x32-linux.c): Likewise.
5395 (x32-avx.o): Likewise.
5396 (x32-avx.c): Likewise.
5397 (x32-avx-linux.o): Likewise.
5398 (x32-avx-linux.c): Likewise.
5399
5400 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5401 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5402 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5403 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5404 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5405 i386/x32-avx-linux.xml.
5406
5407 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5408 (init_registers_x32_avx_linux): Likwise.
5409 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5410 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5411
5412 2012-04-13 Pedro Alves <palves@redhat.com>
5413
5414 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5415 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5416 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5417 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5418 the sub-make.
5419
5420 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5421
5422 * linux-x86-low.c (compat_x32_clock_t): New.
5423 (compat_x32_siginfo_t): Likewise.
5424 (compat_x32_siginfo_from_siginfo): Likewise.
5425 (siginfo_from_compat_x32_siginfo): Likewise.
5426 (linux_is_elf64): Likewise.
5427 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5428 and siginfo_from_compat_x32_siginfo for x32.
5429 (x86_arch_setup): Set linux_is_elf64.
5430
5431 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5432
5433 PR gdb/13969
5434 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5435 e_machine field.
5436 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5437 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5438 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5439 compatible with process.
5440
5441 2012-04-12 Yao Qi <yao@codesourcery.com>
5442
5443 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5444 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5445 (install-only, install-info, clean): Handle sub dir gnulib.
5446 (all-lib, am--refresh): New targets.
5447 (memmem.o): Remove target.
5448 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5449 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5450 (AC_REPLACE_FUNCS): Remove memmem.
5451 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5452 (AC_OUTPUT): Generate Makefile in gnulib/.
5453 * aclocal.m4, config.in, configure: Regenerated.
5454
5455 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5456
5457 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5458
5459 2012-04-05 Pedro Alves <palves@redhat.com>
5460
5461 -Werror=strict-aliasing
5462
5463 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5464 pointer.
5465
5466 2012-04-04 Pedro Alves <palves@redhat.com>
5467
5468 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5469 (sparc_store_gregset_from_stack, sparc_store_gregset)
5470 (sparc_breakpoint_at): Fix formatting.
5471
5472 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5473
5474 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5475 are available.
5476 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5477 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5478 * config.in: Regenerate.
5479 * configure: Likewise.
5480
5481 2012-03-29 Pedro Alves <palves@redhat.com>
5482
5483 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5484 Correct ptrace arguments.
5485
5486 2012-03-28 Pedro Alves <palves@redhat.com>
5487
5488 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5489 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5490 (IA64_FR1_REGNUM): New defines.
5491 (ia64_fetch_register): New.
5492 (the_low_target): Install it.
5493 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5494 field.
5495 * linux-low.c (linux_fetch_registers): Try the
5496 the_low_target.fetch_register hook first.
5497
5498 * linux-arm-low.c (the_low_target): Adjust.
5499 * linux-bfin-low.c (the_low_target): Adjust.
5500 * linux-cris-low.c (the_low_target): Adjust.
5501 * linux-crisv32-low.c (the_low_target): Adjust.
5502 * linux-m32r-low.c (the_low_target): Adjust.
5503 * linux-m68k-low.c (the_low_target): Adjust.
5504 * linux-mips-low.c (the_low_target): Adjust.
5505 * linux-ppc-low.c (the_low_target): Adjust.
5506 * linux-s390-low.c (the_low_target): Adjust.
5507 * linux-sh-low.c (the_low_target): Adjust.
5508 * linux-sparc-low.c (the_low_target): Adjust.
5509 * linux-tic6x-low.c (the_low_target): Adjust.
5510 * linux-x86-low.c (the_low_target): Adjust.
5511 * linux-xtensa-low.c (the_low_target): Adjust.
5512
5513 2012-03-26 Pedro Alves <palves@redhat.com>
5514
5515 * server.c (handle_qxfer_libraries): Don't bail early if
5516 the_target->qxfer_libraries_svr4 is not NULL.
5517
5518 2012-03-26 Pedro Alves <palves@redhat.com>
5519
5520 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5521
5522 2012-03-23 Pedro Alves <palves@redhat.com>
5523
5524 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5525 "library-list-svr4" element's start tag when the the DSO list is
5526 empty.
5527
5528 2012-03-23 Pedro Alves <palves@redhat.com>
5529
5530 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5531 a variable whose type size is the same as the inferior's pointer
5532 size.
5533
5534 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5535
5536 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5537 struct siginfo.
5538 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5539 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5540 * linux-low.h: Include <signal.h>.
5541 (struct siginfo): Remove forward declaration.
5542 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5543 struct siginfo.
5544
5545 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5546
5547 * .gitignore: Ignore more files.
5548
5549 2012-03-19 Pedro Alves <palves@redhat.com>
5550 Jan Kratochvil <jan.kratochvil@redhat.com>
5551
5552 * server.c (cont_thread, general_thread): Add describing comments.
5553 (start_inferior): Clear `cont_thread'.
5554 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5555 of a process.
5556
5557 2012-03-15 Yao Qi <yao@codesourcery.com>
5558
5559 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5560 handling to ...
5561 (cmd_qtdp): ... here.
5562
5563 2012-03-15 Yao Qi <yao@codesourcery.com>
5564
5565 * tracepoint.c (struct tracepoint_action_ops): New.
5566 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5567 (m_tracepoint_action_download): New.
5568 (r_tracepoint_action_download): New.
5569 (x_tracepoint_action_download): New.
5570 (l_tracepoint_action_download): New.
5571 (add_tracepoint_action): Install `action->ops' according type.
5572 (download_tracepoint_1): Move code `download' function pointer
5573 of various tracepoint_action_ops.
5574
5575 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5576
5577 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5578 linux_ptrace_attach_warnings.
5579
5580 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5581
5582 * Makefile.in (linux-ptrace.o): New.
5583 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5584 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5585 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5586 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5587 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5588 of these targets.
5589 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5590
5591 2012-03-08 Yao Qi <yao@codesourcery.com>
5592 Pedro Alves <palves@redhat.com>
5593
5594 Fix PR server/13392.
5595 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5596 offset of JMP insn.
5597 * tracepoint.c (remove_tracepoint): New.
5598 (cmd_qtdp): Call remove_tracepoint when failed to install.
5599
5600 2012-03-07 Pedro Alves <palves@redhat.com>
5601
5602 * linux-low.c (get_detach_signal): New.
5603 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5604 Pass on pending signals to PTRACE_DETACH. Check the result of the
5605 ptrace call.
5606 * server.c (program_signals, program_signals_p): New.
5607 (handle_general_set): Handle QProgramSignals.
5608 * server.h (program_signals, program_signals_p): Declare.
5609
5610 2012-03-05 Pedro Alves <palves@redhat.com>
5611 Jan Kratochvil <jan.kratochvil@redhat.com>
5612
5613 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5614 New comment why.
5615
5616 2012-03-03 Yao Qi <yao@codesourcery.com>
5617
5618 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5619 agent_look_up_symbols.
5620
5621 2012-03-03 Yao Qi <yao@codesourcery.com>
5622
5623 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5624 (linux-x86-low.o): Likewise.
5625 * server.h: Remove in_process_agent_loaded.
5626 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5627 common/agent.c.
5628 Update callers.
5629
5630 2012-03-03 Yao Qi <yao@codesourcery.com>
5631
5632 * tracepoint.c (gdb_agent_capability): New global.
5633 (in_process_agent_loaded_ust): Renamed to
5634 `in_process_agent_supports_ust'.
5635 Update callers.
5636 (in_process_agent_supports_ust): Call agent_capability_check.
5637 (clear_installed_tracepoints): Assert that agent supports
5638 agent.
5639
5640 2012-03-03 Yao Qi <yao@codesourcery.com>
5641
5642 * linux-low.c (linux_supports_agent): New.
5643 (linux_target_ops): Initialize field `supports_agent' with
5644 linux_supports_agent.
5645 * target.h (struct target_ops) <supports_agent>: New.
5646 (target_supports_agent): New macro.
5647 * server.c (handle_general_set): Handle packet 'QAgent'.
5648 (handle_query): Send `QAgent+'.
5649 * Makefile.in (server.o): Depends on agent.h.
5650
5651 2012-03-03 Yao Qi <yao@codesourcery.com>
5652
5653 * Makefile.in (OBS): Add agent.o.
5654 Add new rule for agent.o.
5655 Track dependence of tracepoint.c on agent.h.
5656 * tracepoint.c (run_inferior_command_1):
5657 (run_inferior_command): Call agent_run_command.
5658 (gdb_ust_connect_sync_socket): Deleted. Move it to
5659 common/agent.c.
5660 (resume_thread, stop_thread): Likewise.
5661 (gdb_ust_socket_init): Renamed to ...
5662 (gdb_agent_socket_init): ... New.
5663 (gdb_ust_thread): Renamed to ...
5664 (gdb_agent_helper_thread): ... New.
5665 (gdb_ust_init): Move some code to ...
5666 (gdb_agent_init): ... here. New.
5667 [HAVE_UST]: Call gdb_ust_init.
5668 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5669 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5670 * config.in, configure: Regenerated.
5671
5672 2012-03-02 Pedro Alves <palves@redhat.com>
5673
5674 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5675 * linux-low.c (struct simple_pid_list): New.
5676 (stopped_pids): New a struct simple_pid_list pointer.
5677 (add_to_pid_list, pull_pid_from_list): New.
5678 (handle_extended_wait): Don't assume the first signal new children
5679 report is SIGSTOP. Adjust call to pull_pid_from_list.
5680 (linux_wait_for_lwp): Adjust.
5681
5682 2012-03-02 Yao Qi <yao@codesourcery.com>
5683
5684 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5685 debug log.
5686
5687 2012-03-02 Yao Qi <yao@codesourcery.com>
5688
5689 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5690 `stop_pc' and `tpoint'. Update caller.
5691
5692 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5693
5694 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5695 * linux-low.c (use_linux_regsets): New macro.
5696 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5697 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5698 (linux_register_in_regsets): New function.
5699 (usr_fetch_inferior_registers): Skip registers covered by
5700 regsets.
5701 (usr_store_inferior_registers): Likewise.
5702 (usr_fetch_inferior_registers): New macro.
5703 (usr_store_inferior_registers): Likewise.
5704 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5705 (linux_store_registers): Likewise.
5706 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5707 prototype.
5708 (init_registers_mips64_dsp_linux): Likewise.
5709 (init_registers_mips_linux): New macro.
5710 (init_registers_mips_dsp_linux): Likewise.
5711 (mips_dsp_num_regs): Likewise.
5712 (DSP_BASE, DSP_CONTROL): New fallback macros.
5713 (mips_base_regs): New macro.
5714 (mips_regmap): Use it. Fix the size.
5715 (mips_dsp_regmap): New variable.
5716 (mips_dsp_regset_bitmap): Likewise.
5717 (mips_arch_setup): New function.
5718 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5719 than mips_regmap.
5720 (mips_cannot_store_register): Likewise.
5721 (the_low_target): Update .arch_setup, .num_regs and .regmap
5722 initializers. Add .regset_bitmap initializer.
5723 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5724 initializer.
5725 * linux-bfin-low.c (the_low_target): Likewise.
5726 * linux-cris-low.c (the_low_target): Likewise.
5727 * linux-crisv32-low.c (the_low_target): Likewise.
5728 * linux-ia64-low.c (the_low_target): Likewise.
5729 * linux-m32r-low.c (the_low_target): Likewise.
5730 * linux-m68k-low.c (the_low_target): Likewise.
5731 * linux-ppc-low.c (the_low_target): Likewise.
5732 * linux-s390-low.c (the_low_target): Likewise.
5733 * linux-sh-low.c (the_low_target): Likewise.
5734 * linux-sparc-low.c (the_low_target): Likewise.
5735 * linux-tic6x-low.c (the_low_target): Likewise.
5736 * linux-x86-low.c (the_low_target): Likewise.
5737 * linux-xtensa-low.c (the_low_target): Likewise.
5738 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5739 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5740 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5741 srv_xmlfiles.
5742 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5743 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5744
5745 2012-02-29 Yao Qi <yao@codesourcery.com>
5746 Pedro Alves <palves@redhat.com>
5747
5748 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5749 `step_over_finished' is true.
5750
5751 2012-02-27 Pedro Alves <palves@redhat.com>
5752
5753 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5754 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5755
5756 2012-02-27 Pedro Alves <palves@redhat.com>
5757
5758 PR server/9684
5759 * linux-low.c (pid_is_stopped): New.
5760 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5761
5762 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5763
5764 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5765 of conditions.
5766
5767 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5768
5769 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5770
5771 2012-02-24 Luis Machado <lgustavo@codesourcery>
5772
5773 * server.c (handle_query): Advertise support for target-side
5774 breakpoint condition evaluation.
5775 (process_point_options): New function.
5776 (process_serial_event): When inserting a breakpoint, check for
5777 a target-side condition that should be evaluated.
5778
5779 * mem-break.c: Include regcache.h and ax.h.
5780 (point_cond_list_t): New data structure.
5781 (breakpoint) <cond_list>: New field.
5782 (find_gdb_breakpoint_at): Make non-static.
5783 (delete_gdb_breakpoint_at): Clear any target-side
5784 conditions.
5785 (clear_gdb_breakpoint_conditions): New function.
5786 (add_condition_to_breakpoint): Likewise.
5787 (add_breakpoint_condition): Likewise.
5788 (gdb_condition_true_at_breakpoint): Likewise.
5789 (gdb_breakpoint_here): Return result directly instead
5790 of going through a local variable.
5791
5792 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5793 (clear_gdb_breakpoint_conditions): Likewise.
5794 (add_breakpoint_condition): Likewise.
5795 (gdb_condition_true_at_breakpoint): Likewise.
5796
5797 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5798 (need_step_over_p): Take target-side breakpoint condition into
5799 consideration.
5800
5801 2012-02-24 Luis Machado <lgustavo@codesourcery>
5802
5803 * server.h: Include tracepoint.h.
5804 (agent_mem_read, agent_get_trace_state_variable_value,
5805 agent_set_trace_state_variable_value,
5806 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5807 get_set_tsv_func_addr): New prototypes.
5808
5809 * ax.h: New include file.
5810 * ax.c: New source file.
5811
5812 * tracepoint.c: Include ax.h.
5813 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5814 agent_expr, eval_result_type): Move to ax.h.
5815 (parse_agent_expr): Rename to ...
5816 (gdb_parse_agent_expr): ... this, make it non-static and move
5817 to ax.h.
5818 (unparse_agent_expr) Rename to ...
5819 (gdb_unparse_agent_expr): ... this, make it non-static and move
5820 to ax.h.
5821 (eval_agent_expr): Rename to ...
5822 (eval_tracepoint_agent_expr): ... this.
5823 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5824 forward declarations.
5825 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5826 (agent_get_trace_state_variable_value): New function.
5827 (agent_set_trace_state_variable_value): New function.
5828 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5829 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5830 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5831 (condition_true_at_tracepoint): Likewise.
5832 (parse_agent_expr): Rename to ...
5833 (gdb_parse_agent_expr): ... this and move to ax.c.
5834 (unparse_agent_expr): Rename to ...
5835 (gdb_unparse_agent_expr): ... this and move to ax.c.
5836 (gdb_agent_op_name): Move to ax.c.
5837 (eval_agent_expr): Rename to ...
5838 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5839 and move to ax.c.
5840 (eval_tracepoint_agent_expr): New function.
5841 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5842 non-static.
5843 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5844 ax.c.
5845 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5846 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5847 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5848 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5849 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5850 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5851 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5852 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5853 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5854 (compile_bytecodes): Remove forward declaration.
5855 (is_goto_target): Move to ax.c.
5856 (compile_bytecodes): Move to ax.c and call
5857 agent_get_trace_state_variable_value (...) and
5858 agent_set_trace_state_variable_value (...).
5859
5860 * Makefile.in: Update ax.c and IPA dependencies.
5861
5862 2012-02-24 Pedro Alves <palves@redhat.com>
5863
5864 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5865 (cmd_bigqtbuffer_circular): ... this. Only handle
5866 'QTBuffer:circular:'.
5867 (handle_tracepoint_general_set): Adjust.
5868
5869 2012-02-16 Yao Qi <yao@codesourcery.com>
5870
5871 * inferiors.c: Move code to ...
5872 * dll.c: .... here. New.
5873 * server.h: Declare clear_dlls.
5874 * Makefile.in (SFILES): Add dll.c.
5875 (OBS): Add dll.o
5876 (dll.o): New rule.
5877
5878 2012-02-11 Yao Qi <yao@codesourcery.com>
5879
5880 * server.c: (handle_monitor_command): Add a new parameter
5881 `own_buf'.
5882 (handle_query): Update caller.
5883
5884 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5885
5886 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5887 * configure, config.in: Regenerate.
5888 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5889 is not defined.
5890
5891 2012-02-02 Pedro Alves <palves@redhat.com>
5892
5893 Try SIGKILL first, then PTRACE_KILL.
5894 * linux-low.c (linux_kill_one_lwp): New.
5895 (linux_kill_one_lwp): Rename to ...
5896 (kill_one_lwp_callback): ... this. Use the new
5897 linux_kill_one_lwp.
5898
5899 2012-02-02 Pedro Alves <palves@redhat.com>
5900
5901 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5902 inferior.
5903
5904 2012-01-27 Pedro Alves <palves@redhat.com>
5905
5906 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5907 (elf_64_file_p): Make static.
5908 (linux_pid_exe_is_elf_64_file): New.
5909 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5910 Delete declarations.
5911 (linux_pid_exe_is_elf_64_file): Declare.
5912 * linux-x86-low.c (x86_arch_setup): Use
5913 linux_pid_exe_is_elf_64_file.
5914
5915 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5916
5917 * linux-low.c (linux_wait_for_event_1): Rename to ...
5918 (linux_wait_for_event): ... here and merge it with former
5919 linux_wait_for_event - new variable wait_ptid, use it.
5920 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5921
5922 2012-01-23 Pedro Alves <palves@redhat.com>
5923
5924 * server.c (main): Avoid yet another case of infinite loop while
5925 detaching/killing after a longjmp.
5926
5927 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5928
5929 Code cleanup.
5930 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5931
5932 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5933
5934 * hostio.c (handle_readlink): New function.
5935 (handle_vFile): Call it to handle "vFile:readlink" packets.
5936
5937 2012-01-20 Pedro Alves <palves@redhat.com>
5938 Ulrich Weigand <ulrich.weigand@linaro.org>
5939
5940 * server.c (handle_v_requests): Only support vAttach and vRun to
5941 start multiple processes when in extended protocol mode.
5942
5943 2012-01-17 Pedro Alves <palves@redhat.com>
5944
5945 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5946 memalign plus mprotect to allocate the scratch buffer.
5947
5948 2012-01-13 Pedro Alves <palves@redhat.com>
5949
5950 * server.c (attach_inferior): Clear `cont_thread'.
5951
5952 2012-01-13 Pedro Alves <palves@redhat.com>
5953
5954 * server.c (main): Avoid infinite loop while detaching/killing
5955 after a longjmp.
5956
5957 2012-01-09 Doug Evans <dje@google.com>
5958
5959 * server.c (start_inferior): Set last_ptid in --wrapper case.
5960
5961 2012-01-06 Yao Qi <yao@codesourcery.com>
5962
5963 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5964 defined.
5965 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5966
5967 2012-01-04 Yao Qi <yao@codesourcery.com>
5968
5969 * tracepoint.c (cmd_qtdp): Print debug message
5970 for static tracepoint.
5971
5972 2012-01-04 Yao Qi <yao@codesourcery.com>
5973
5974 * tracepoint.c (trace_vdebug): Differentiate debug message
5975 between gdbserver and IPA.
5976
5977 2012-01-03 Yao Qi <yao@codesourcery.com>
5978
5979 * tracepoint.c (tracepoint_was_hit): Don't collect for
5980 static tracepoint.
5981
5982 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5983
5984 * terminal.h: Reformat copyright header.
5985
5986 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5987
5988 * server.c (gdbserver_version): Update copyright year.
5989 * gdbreplay.c (gdbreplay_version): Likewise.
5990
5991 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5992
5993 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5994
5995 Revert:
5996 2011-12-18 Hui Zhu <teawater@gmail.com>
5997 * linux-low.c (linux_create_inferior): Save return value to ret.
5998
5999 2011-12-18 Hui Zhu <teawater@gmail.com>
6000
6001 * linux-low.c (linux_create_inferior): Save return value to ret.
6002
6003 2011-12-16 Doug Evans <dje@google.com>
6004
6005 * linux-low.c (linux_create_inferior): If stdio connection,
6006 redirect stdin from /dev/null, stdout to stderr.
6007 * remote-utils.c (remote_is_stdio): New static global.
6008 (remote_connection_is_stdio): New function.
6009 (remote_prepare): Handle stdio connection.
6010 (remote_open): Ditto.
6011 (remote_close): Don't close stdin for stdio connections.
6012 (read_prim,write_prim): New functions. Replace all calls to
6013 read/write to these.
6014 * server.c (main): Watch for "-" argument. Move call to
6015 remote_prepare before start_inferior.
6016 * server.h (STDIO_CONNECTION_NAME): New macro.
6017 (remote_connection_is_stdio): Declare.
6018
6019 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6020 in debugging output.
6021
6022 2011-12-15 Yao Qi <yao@codesourcery.com>
6023
6024 * tracepoint.c: Include sys/syscall.h.
6025 (gdb_ust_thread): Remove preprocessor conditional.
6026
6027 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6028
6029 * linux-low.c (linux_detach_one_lwp): Call
6030 the_low_target.prepare_to_resume before detaching.
6031
6032 2011-12-14 Yao Qi <yao@codesourcery.com>
6033
6034 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6035 of write.
6036
6037 2011-12-14 Yao Qi <yao@codesourcery.com>
6038
6039 * i386-low.c (i386_low_stopped_data_address): Initialize local
6040 variable `control'.
6041
6042 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6043
6044 PR remote/13492
6045
6046 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6047 DR_CONTROL unless necessary. Extend comments.
6048 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6049 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6050
6051 2011-12-13 Yao Qi <yao@codesourcery.com>
6052
6053 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6054 macros.
6055 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6056
6057 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6058
6059 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6060 Print new debug message for such case.
6061
6062 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6063
6064 Fix overlapping memcpy.
6065 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6066 the read_inferior_memory transfer.
6067 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6068 write_inferior_memory transfer.
6069 (set_fast_tracepoint_jump): New variable buf. Use it for the
6070 read_inferior_memory and write_inferior_memory transfers.
6071 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6072 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6073 Use it for the write_inferior_memory transfer.
6074 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6075 buffers.
6076
6077 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6078
6079 * linux-low.c (fetch_register, store_register): Make code
6080 consistent, fix formatting.
6081
6082 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6083
6084 * linux-low.c (usr_store_inferior_registers): Factor out code
6085 to handle individual registers into...
6086 (store_register): ... this new function.
6087
6088 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6089
6090 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6091 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6092 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6093 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6094 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6095 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6096 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6097 (srv_xmlfiles): Add new XML files.
6098
6099 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6100 and <sys/uio.h>.
6101 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6102 (init_registers_s390_linux32v1): Add prototype.
6103 (init_registers_s390_linux32v2): Likewise.
6104 (init_registers_s390_linux64v1): Likewise.
6105 (init_registers_s390_linux64v2): Likewise.
6106 (init_registers_s390x_linux64v1): Likewise.
6107 (init_registers_s390x_linux64v2): Likewise.
6108 (s390_num_regs): Increment to 52.
6109 (s390_regmap): Add orig_r2 register.
6110 (s390_num_regs_3264): Increment to 68.
6111 (s390_regmap_3264): Add orig_r2 register.
6112 (s390_collect_ptrace_register): Handle orig_r2 register.
6113 (s390_supply_ptrace_register): Likewise.
6114 (s390_fill_last_break): New function.
6115 (s390_store_last_break): Likewise.
6116 (s390_fill_system_call): New function.
6117 (s390_store_system_call): Likewise.
6118 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6119 register sets.
6120 (s390_check_regset): New function.
6121 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6122 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6123 Update target_regsets for available register sets.
6124
6125 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6126 Jan Kratochvil <jan.kratochvil@redhat.com>
6127
6128 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6129 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6130 New.
6131 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6132 * linux-low.h (struct process_info_private): New member r_debug.
6133 * server.c (handle_qxfer_libraries): Call
6134 the_target->qxfer_libraries_svr4.
6135 (handle_qxfer_libraries_svr4): New function.
6136 (qxfer_packets): New entry "libraries-svr4".
6137 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6138 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6139 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6140 PACKET_qXfer_libraries_svr4.
6141
6142 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6143
6144 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6145 PSW address/mask between 8-byte and 16-byte formats.
6146 (s390_supply_ptrace_register): Likewise.
6147 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6148 basic addressing mode bit.
6149
6150 2011-11-24 Stan Shebs <stan@codesourcery.com>
6151
6152 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6153
6154 2011-11-17 Stan Shebs <stan@codesourcery.com>
6155
6156 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6157 (tracing_start_time): New global.
6158 (tracing_stop_time): New global.
6159 (tracing_user_name): New global.
6160 (tracing_notes): New global.
6161 (tracing_stop_note): New global.
6162 (cmd_qtstart): Set traceframe_usage, start_time.
6163 (stop_tracing): Set stop_time.
6164 (cmd_qtstatus): Report additional status.
6165 (cmd_qtp): New function.
6166 (handle_tracepoint_query): Call it.
6167 (cmd_qtnotes): New function.
6168 (handle_tracepoint_general_set): Call it.
6169 (get_timestamp): Rename from tsv_get_timestamp.
6170
6171 2011-11-14 Stan Shebs <stan@codesourcery.com>
6172 Kwok Cheung Yeung <kcy@codesourcery.com>
6173
6174 * linux-x86-low.c (small_jump_insn): New.
6175 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6176 trampoline and error message, build a trampoline and issue a small
6177 jump instruction to it.
6178 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6179 trampoline and error message.
6180 (x86_get_min_fast_tracepoint_insn_len): New.
6181 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6182 * linux-low.h (struct linux_target_ops): Add arguments to
6183 install_fast_tracepoint_jump_pad operation, add new operation.
6184 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6185 arguments.
6186 (linux_get_min_fast_tracepoint_insn_len): New function.
6187 (linux_target_op): Add new operation.
6188 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6189 (gdb_trampoline_buffer_end): Ditto.
6190 (gdb_trampoline_buffer_error): Ditto.
6191 (struct ipa_sym_addresses): Add fields for new IPA variables.
6192 (symbol_list): Add entries for new IPA variables.
6193 (struct tracepoint): Add fields to hold the address range of the
6194 trampoline used by the tracepoint.
6195 (trampoline_buffer_head): New static variable.
6196 (trampoline_buffer_tail): Ditto.
6197 (claim_trampoline_space): New function.
6198 (have_fast_tracepoint_trampoline_buffer): New function.
6199 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6200 structure.
6201 (install_fast_tracepoint): Ditto, also add error buffer argument.
6202 (cmd_qtminftpilen): New function.
6203 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6204 (fast_tracepoint_from_trampoline_address): New function.
6205 (fast_tracepoint_collecting): Handle trampoline as part of jump
6206 pad space.
6207 (set_trampoline_buffer_space): New function.
6208 (initialize_tracepoint): Initialize new IPA variables.
6209 * target.h (struct target_ops): Add arguments to
6210 install_fast_tracepoint_jump_pad operation, add new
6211 get_min_fast_tracepoint_insn_len operation.
6212 (target_get_min_fast_tracepoint_insn_len): New.
6213 (install_fast_tracepoint_jump_pad): Add arguments.
6214 * server.h (IPA_BUFSIZ): Define.
6215 * linux-i386-ipa.c: Include extra header files.
6216 (initialize_fast_tracepoint_trampoline_buffer): New function.
6217 (initialize_low_tracepoint): Call it.
6218 * server.h (set_trampoline_buffer_space): Declare.
6219 (claim_trampoline_space): Ditto.
6220 (have_fast_tracepoint_trampoline_buffer): Ditto.
6221
6222 2011-11-14 Yao Qi <yao@codesourcery.com>
6223
6224 * server.c (handle_query): Handle InstallInTrace for qSupported.
6225 * tracepoint.c (add_tracepoint): Sort list.
6226 (install_tracepoint, download_tracepoint): New.
6227 (cmd_qtdp): Call them to install and download tracepoints.
6228 (sort_tracepoints): Removed.
6229 (cmd_qtstart): Update.
6230
6231 2011-11-14 Yao Qi <yao@codesourcery.com>
6232
6233 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6234 * mem-break.h: Declare.
6235 * tracepoint.c (cmd_qtstart): Move some code to ...
6236 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6237 New.
6238 (download_tracepoints): Move some code to ...
6239 (download_tracepoint_1): ... here. New.
6240
6241 2011-11-08 Yao Qi <yao@codesourcery.com>
6242
6243 * remote-utils.c (relocate_instruction): A comment fix.
6244
6245 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6246
6247 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6248 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6249 dr_status_mirror and dr_control_mirror from debug_reg_state.
6250 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6251 (i386_initial_stuff): Remove use of deleted globals.
6252 (i386_get_thread_context, i386_set_thread_context,
6253 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6254 from debug_reg_state.
6255
6256 2011-11-05 Yao Qi <yao@codesourcery.com>
6257
6258 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6259 address as TPOINT's.
6260
6261 2011-11-02 Stan Shebs <stan@codesourcery.com>
6262
6263 * tracepoint.c (agent_mem_read_string): New function.
6264 (eval_agent_expr): Call it for tracenz.
6265 * server.c (handle_query): Report support for tracenz.
6266
6267 2011-11-02 Yao Qi <yao@codesourcery.com>
6268
6269 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6270
6271 2011-11-02 Yao Qi <yao@codesourcery.com>
6272
6273 * target.h: Fix a typo in comment.
6274
6275 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6276
6277 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6278 clobber the breakpoints' shadows with fast tracepoint jumps.
6279 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6280 * target.c (write_inferior_memory): Also pass MYADDR down to
6281 check_mem_write.
6282
6283 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6284
6285 * configure.ac: Check support for personality routine.
6286 * configure: Regenerate.
6287 * config.in: Likewise.
6288 * linux-low.c: Include <sys/personality.h>.
6289 Define ADDR_NO_RANDOMIZE if necessary.
6290 (linux_create_inferior): Disable address space randomization when
6291 forking inferior, if requested.
6292 (linux_supports_disable_randomization): New function.
6293 (linux_target_ops): Install it.
6294 * server.h (disable_randomization): Declare.
6295 * server.c (disable_randomization): New global variable.
6296 (handle_general_set): Handle QDisableRandomization.
6297 (handle_query): Likewise for qSupported.
6298 (main): Support --disable-randomization and --no-disable-randomization
6299 command line arguments.
6300 * target.h (struct target_ops): Add supports_disable_randomization.
6301 (target_supports_disable_randomization): New macro.
6302
6303 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6304
6305 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6306 ifdef check.
6307 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6308 [!PT_GETDSBT] (target_loadmap): New definition.
6309 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6310 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6311 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6312 and PT_GETDSBT to LINUX_LOADMAP.
6313 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6314 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6315
6316 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6317
6318 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6319 (arm_linux_hwbp_cap): New static variable.
6320 (arm_linux_get_hwbp_cap): Replace by ...
6321 (arm_linux_init_hwbp_cap): ... this new function.
6322 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6323 (arm_linux_get_hw_watchpoint_count): Likewise.
6324 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6325 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6326 (arm_prepare_to_resume): Use perror_with_name instead of error.
6327
6328 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6329
6330 * linux-arm-low.c: Include <signal.h>.
6331 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6332 (struct arm_linux_hwbp_cap): New data type.
6333 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6334 (struct arm_linux_hw_breakpoint): New data type.
6335 (MAX_BPTS, MAX_WPTS): Define.
6336 (struct arch_process_info, struct arch_lwp_info): New data types.
6337 (arm_linux_get_hwbp_cap): New function.
6338 (arm_linux_get_hw_breakpoint_count): Likewise.
6339 (arm_linux_get_hw_watchpoint_count): Likewise.
6340 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6341 (arm_hwbp_control_initialize): Likewise.
6342 (arm_hwbp_control_is_enabled): Likewise.
6343 (arm_hwbp_control_is_initialized): Likewise.
6344 (arm_hwbp_control_disable): Likewise.
6345 (arm_linux_hw_breakpoint_equal): Likewise.
6346 (arm_linux_hw_point_initialize): Likewise.
6347 (struct update_registers_data): New data structure.
6348 (update_registers_callback: New function.
6349 (arm_insert_point): Likewise.
6350 (arm_remove_point): Likewise.
6351 (arm_stopped_by_watchpoint): Likewise.
6352 (arm_stopped_data_address): Likewise.
6353 (arm_new_process): Likewise.
6354 (arm_new_thread): Likewise.
6355 (arm_prepare_to_resume): Likewise.
6356 (the_low_target): Register arm_insert_point, arm_remove_point,
6357 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6358 arm_new_thread, and arm_prepare_to_resume.
6359
6360 2011-09-15 Stan Shebs <stan@codesourcery.com>
6361
6362 * server.h (struct emit_ops): Add compare-goto fields.
6363 * tracepoint.c (gdb_agent_op_sizes): New table.
6364 (emit_eq_goto): New function.
6365 (emit_ne_goto): New function.
6366 (emit_lt_goto): New function.
6367 (emit_le_goto): New function.
6368 (emit_gt_goto): New function.
6369 (emit_ge_goto): New function.
6370 (is_goto_target): New function.
6371 (compile_bytecodes): Recognize special cases of compare-goto
6372 combinations and call specialized emitters for them.
6373 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6374 (amd64_emit_ne_goto): New function.
6375 (amd64_emit_lt_goto): New function.
6376 (amd64_emit_le_goto): New function.
6377 (amd64_emit_gt_goto): New function.
6378 (amd64_emit_ge_goto): New function.
6379 (amd64_emit_ops): Add the new functions.
6380 (i386_emit_eq_goto): New function.
6381 (i386_emit_ne_goto): New function.
6382 (i386_emit_lt_goto): New function.
6383 (i386_emit_le_goto): New function.
6384 (i386_emit_gt_goto): New function.
6385 (i386_emit_ge_goto): New function.
6386 (i386_emit_ops): Add the new functions.
6387
6388 2011-09-08 Stan Shebs <stan@codesourcery.com>
6389
6390 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6391 (i386_emit_epilogue): Restore %ebx.
6392
6393 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6394
6395 * server.c (step_thread): Remove definition.
6396 (process_serial_event): Don't handle Hs.
6397 * server.h (step_thread): Remove declaration.
6398 * target.c (set_desired_inferior): Remove use of step_thread.
6399
6400 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6401
6402 * linux-low.c: Include linux-procfs.h.
6403 (linux_attach_lwp_1): Update comments.
6404 (linux_attach): Scan for existing threads when attaching to a
6405 process that is the tgid.
6406 * Makefile.in: Update dependencies.
6407
6408 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6409
6410 * configure.srv: Add linux-procfs.o dependencies.
6411
6412 2011-08-14 Yao Qi <yao@codesourcery.com>
6413
6414 * target.h (struct target_ops): Fix indent.
6415 * win32-low.c (win32_target_ops): Fix comment.
6416
6417 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6418 Yao Qi <yao@codesourcery.com>
6419
6420 * Makefile.in (clean): Remove tic6x-*.c files.
6421 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6422 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6423 (tic6x-c64xp-linux.c): Likewise.
6424 * configure.srv: Add support for tic6x-*-uclinux.
6425 * linux-tic6x-low.c: New.
6426 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6427
6428 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6429 Yao Qi <yao@codesourcery.com>
6430
6431 * target.h (struct target_ops): Add read_loadmap.
6432 * linux-low.c (struct target_loadseg): New type.
6433 (struct target_loadmap): New type.
6434 (linux_read_loadmap): New function.
6435 (linux_target_ops): Add linux_read_loadmap.
6436 * server.c (handle_query): Support qXfer:fdpic:read packet.
6437 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6438 to NULL.
6439
6440 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6441
6442 * win32-low.c: Include <stdint.h>.
6443
6444 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6445
6446 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6447 to the inferior here.
6448 (i386_remove_aligned_watchpoint): Ditto.
6449 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6450 fit part of the watchpoint in the debug registers.
6451 (i386_update_inferior_debug_regs): New.
6452 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6453 registers, and only update the inferior on success.
6454 (i386_low_remove_watchpoint): Ditto.
6455
6456 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6457
6458 * linux-low.c (compare_ints, unique, list_threads, show_process,
6459 linux_core_of_thread): Delete.
6460 (linux_target_ops): Change linux_core_of_thread to
6461 linux_common_core_of_thread.
6462 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6463 * utils.c (malloc_failure): Change type of argument.
6464 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6465 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6466 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6467 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6468 (IPA_OBJS): Add common-utils-ipa.o.
6469 (ptid_h, linux_osdata_h): New macros.
6470 (server_h): Add common/common-utils.h, common/xml-utils.h,
6471 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6472 common/ptid.h.
6473 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6474 ptid.o, buffer.o): New rules.
6475 (linux-low.o): Add common/linux-osdata.h as a dependency.
6476 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6477 * configure.ac: Add AC_HEADER_DIRENT check.
6478 * config.in: Regenerate.
6479 * configure: Regenerate.
6480 * remote-utils.c (xml_escape_text): Delete.
6481 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6482 buffer_xml_printf): Move to common/buffer.c.
6483 * server.c (main): Remove call to initialize_inferiors.
6484 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6485 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6486 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6487 internal_error, gdb_assert, gdb_assert_fail): Delete.
6488 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6489 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6490 common/buffer.h.
6491 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6492 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6493 initialize_inferiors): Delete.
6494
6495 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6496
6497 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6498 symbol error.
6499
6500 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6501
6502 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6503 assertion.
6504 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6505
6506 2011-05-26 Yao Qi <yao@codesourcery.com>
6507
6508 * Makefile.in (thread-db.o): Track dependence to
6509 common/gdb_thread_db.h.
6510 * thread-db.c: include gdb_thread_db.h from right place.
6511
6512 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6513
6514 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6515 __FILE__ and __LINE__ to internal_error.
6516
6517 2011-05-13 Doug Evans <dje@google.com>
6518
6519 * thread-db.c (try_thread_db_load_from_sdir): New function.
6520 (try_thread_db_load_from_dir): New function.
6521 (thread_db_load_search): Handle $sdir, ignore $pdir.
6522 Remove trying of system directories if search of
6523 libthread-db-search-path fails, that is now done via $sdir.
6524
6525 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6526
6527 * server.c (handle_query): Add EnableDisableTracepoints to the list
6528 of supported features.
6529 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6530 tracepoints.
6531 (cmd_qtenable_disable): New.
6532 (cmd_qtstart): Install tracepoints even if disabled.
6533 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6534 receiving a QTEnable or QTDisable packet.
6535 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6536 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6537 tracepoints.
6538 (gdb_probe): Skip data collection if static tracepoint is disabled.
6539
6540 2011-05-10 Doug Evans <dje@google.com>
6541
6542 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6543
6544 2011-05-04 Doug Evans <dje@google.com>
6545
6546 * linux-low.c (linux_join): Skip process lookup.
6547 * spu-low.c (spu_join): Ditto.
6548 * server.c (join_inferiors_callback): Delete.
6549 (process_serial_event): For 'D' packet (detach) call join_inferior
6550 directly.
6551
6552 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6553
6554 * README: Don't mention xscale*-*-linux*.
6555 * configure.srv (xscale*-*-linux*): Don't handle target.
6556
6557 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6558
6559 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6560 casting pointers.
6561 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6562 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6563 (i386_emit_void_call_2): Likewise.
6564
6565 2011-04-26 Yao Qi <yao@codesourcery.com>
6566
6567 * linux-low.c: Move common macros to linux-ptrace.h.
6568 Include linux-ptrace.h.
6569 * Makefile.in (linux_ptrace_h): New.
6570 (linux-low.o): Depends on linux-ptrace.h.
6571
6572 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6573
6574 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6575 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6576 (remote_prepare): New function with most of the TCP code from ...
6577 (remote_open): ... here. Detect PORT here unconditionally. Move also
6578 setting transport_is_reliable.
6579 * server.c (run_once): New variable.
6580 (gdbserver_usage): Document it.
6581 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6582 the first run if RUN_ONCE.
6583 * server.h (run_once, remote_prepare): New declarations.
6584
6585 2011-04-19 Tom Tromey <tromey@redhat.com>
6586
6587 * win32-low.c (handle_load_dll): Remove duplicate "the".
6588
6589 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6590
6591 Remove support for old Cygwin 1.5 versions.
6592 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6593 function to avoid warning.
6594 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6595 warning.
6596
6597 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6598
6599 * gdbserver/server.h (Macro _): Define it if not available.
6600
6601 2011-03-14 Michael Snyder <msnyder@vmware.com>
6602
6603 * hostio.c (handle_close): Remove unnecessary null test.
6604
6605 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6606
6607 * Makefile.in (maintainer-clean realclean distclean): Remove
6608 "make ... subdir_do" command.
6609
6610 2011-03-10 Michael Snyder <msnyder@vmware.com>
6611
6612 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6613
6614 * server.c (handle_v_run): Free alloced buffer on early return.
6615
6616 2011-03-09 Yao Qi <yao@codesourcery.com>
6617
6618 Revert:
6619 2011-03-04 Yao Qi <yao@codesourcery.com>
6620
6621 * Makefile.in: Remove GNU make feature --directory.
6622
6623 2011-03-05 Yao Qi <yao@codesourcery.com>
6624
6625 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6626 (subdir_do): New make target. Copied from gdb/Makefile.
6627 (maintainer-clean, realclean, distclean, clean): Call corresponding
6628 make targets in common/Makefile.
6629
6630 2011-02-11 Yao Qi <yao@codesourcery.com>
6631
6632 * configure.ac: Call AC_PROG_RANLIB.
6633 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6634 * configure: Regenerate.
6635
6636 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6637
6638 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6639
6640 2011-03-06 Yao Qi <yao@codesourcery.com>
6641
6642 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6643
6644 2011-03-05 Yao Qi <yao@codesourcery.com>
6645
6646 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6647 (subdir_do): New make target. Copied from gdb/Makefile.
6648 (maintainer-clean, realclean, distclean, clean): Call corresponding
6649 make targets in common/Makefile.
6650
6651 2011-03-04 Yao Qi <yao@codesourcery.com>
6652
6653 * Makefile.in: Remove GNU make feature --directory.
6654
6655 2011-03-04 Michael Snyder <msnyder@vmware.com>
6656
6657 * server.c (queue_stop_reply): Call xmalloc not malloc.
6658
6659 2011-03-02 Michael Snyder <msnyder@vmware.com>
6660
6661 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6662
6663 2011-02-28 Michael Snyder <msnyder@vmware.com>
6664
6665 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6666 (cmd_qtframe): Ditto.
6667 (cmd_qtbuffer): Ditto.
6668 (cmd_bigqtbuffer): Ditto.
6669
6670 * utils.c (decimal2str): Initialize 'width' to nine, then
6671 don't mess with it.
6672
6673 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6674
6675 * hostio.c (require_data): Free *data, not data.
6676
6677 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6678
6679 * hostio.c (require_data): Use free, not xfree.
6680
6681 2011-02-27 Michael Snyder <msnyder@vmware.com>
6682
6683 * server.c (handle_query): Discard unused value.
6684
6685 * hostio.c (require_data): Free malloc memory before returning
6686 error.
6687
6688 2011-02-26 Michael Snyder <msnyder@vmware.com>
6689
6690 * linux-low.c (list_threads): Call closedir for dirent.
6691
6692 2011-02-27 Michael Snyder <msnyder@vmware.com>
6693
6694 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6695 a case statement falls through.
6696
6697 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6698
6699 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6700 in comparison.
6701
6702 2011-02-26 Michael Snyder <msnyder@vmware.com>
6703
6704 * utils.c (decimal2str): Eliminate dead code and dead param.
6705 (pulongest): Drop dead param from call to decimal2str.
6706 (plongest): Ditto.
6707
6708 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6709
6710 Revert the following patch (not approved yet):
6711 2011-02-21 Hui Zhu <teawater@gmail.com>
6712 * tracepoint.c (tp_printf): New function.
6713 (eval_agent_expr): Handle gdb_agent_op_printf.
6714
6715 2011-02-21 Hui Zhu <teawater@gmail.com>
6716
6717 * tracepoint.c (tp_printf): New function.
6718 (eval_agent_expr): Handle gdb_agent_op_printf.
6719
6720 2011-02-18 Tom Tromey <tromey@redhat.com>
6721
6722 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6723 (tracepoint.o): Likewise.
6724 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6725 (gdb_agent_op_names): Likewise.
6726
6727 2011-02-18 Tom Tromey <tromey@redhat.com>
6728
6729 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6730 gdb_agent_op_rot>: New constants.
6731 (gdb_agent_op_names): Add pick and roll.
6732 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6733 cases.
6734
6735 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6736
6737 * aclocal.m4: Regenerated with aclocal-1.11.1.
6738
6739 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6740
6741 * server.c (handle_qxfer_traceframe_info): New.
6742 (qxfer_packets): Register "traceframe-info".
6743 (handle_query): Report support for qXfer:traceframe-info:read+.
6744 * tracepoint.c (match_blocktype): New.
6745 (traceframe_find_block_type): Rename to ...
6746 (traceframe_walk_blocks): ... this. Add callback filter argument,
6747 and use it.
6748 (traceframe_find_block_type): New, reimplemented on top of
6749 traceframe_walk_blocks.
6750 (build_traceframe_info_xml): New.
6751 (traceframe_read_info): New.
6752 * server.h (traceframe_read_info): Declare.
6753
6754 2011-02-11 Yao Qi <yao@codesourcery.com>
6755
6756 * configure.ac: Call AC_PROG_RANLIB.
6757 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6758 * configure: Regenerate.
6759
6760 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6761
6762 * server.c (gdb_read_memory): Change return semantics to allow
6763 partial transfers.
6764 (handle_search_memory_1): Adjust.
6765 (process_serial_event) <'m' packet>: Handle partial transfers.
6766 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6767
6768 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6769
6770 * regcache.c (init_register_cache): Initialize
6771 regcache->register_status.
6772 (free_register_cache): Release regcache->register_status.
6773 (regcache_cpy): Copy register_status.
6774 (registers_to_string): Print 'x's for unavailable registers.
6775 (supply_register): Mark the register's status valid or
6776 unavailable, depending on whether a buffer was passed in or not.
6777 (supply_register_zeroed): New.
6778 (supply_regblock): Mark the registers' status valid or
6779 unavailable, depending on whether a buffer was passed in or not.
6780 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6781 (struct regcache): New `register_status' field.
6782 (supply_register_zeroed): Declare.
6783 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6784 supply_register_zeroed, rather than passing a NULL buffer to
6785 supply_register.
6786 * tracepoint.c (fetch_traceframe_registers): Update comment.
6787
6788 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6789
6790 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6791 buffer explicit.
6792
6793 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6794
6795 * server.h (decode_xfer_write): Change prototype.
6796 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6797 and don't extract the annex here.
6798 * server.c (decode_xfer_read): Remove `annex' parameter,
6799 and don't extract the annex here.
6800 (decode_xfer): New.
6801 (struct qxfer): New.
6802 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6803 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6804 (handle_qxfer_statictrace): New functions, abstracted out from
6805 handle_query, and made to use the struct qxfer interface.
6806 (handle_threads_qxfer_proper): Rename to ...
6807 (handle_qxfer_threads_proper): ... this.
6808 (handle_threads_qxfer): Rename to ...
6809 (handle_qxfer_threads): ... this. Adjust.
6810 (qxfer_packets): New array.
6811 (handle_qxfer): New function.
6812 (handle_query): Use handle_qxfer.
6813
6814 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6815
6816 * gdbreplay.c: Shorten lines of >= 80 columns.
6817 * linux-low.c: Ditto.
6818 * linux-ppc-low.c: Ditto.
6819 * linux-s390-low.c: Ditto.
6820 * linux-sparc-low.c: Ditto.
6821 * linux-x86-low.c: Ditto.
6822 * linux-xtensa-low.c: Ditto.
6823 * mem-break.c: Ditto.
6824 * nto-low.c: Ditto.
6825 * regcache.h: Ditto.
6826 * remote-utils.c: Ditto.
6827 * server.c: Ditto.
6828 * server.h: Ditto.
6829 * thread-db.c: Ditto.
6830 * tracepoint.c: Ditto.
6831 * utils.c: Ditto.
6832 * win32-low.h: Ditto.
6833
6834 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6835
6836 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6837 update.
6838
6839 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6840
6841 * server.c (gdbserver_version): Update copyright year in version
6842 output.
6843 * gdbreplay.c (gdbreplay_version): Ditto.
6844
6845 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6846
6847 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6848 * linux-bfin-low.c: New file.
6849 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6850 PT_DATA_ADDR for BFIN targets.
6851 * Makefile.in (SFILES): Add linux-bfin-low.c.
6852 (clean): Remove reg-bfin.c.
6853 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6854 * README: Mention supported Blackfin targets.
6855
6856 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6857
6858 * .gitignore: New file.
6859
6860 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6861
6862 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6863
6864 2010-10-22 Jie Zhang <jie@codesourcery.com>
6865
6866 * Makefile.in: Add FLAGS_TO_PASS variable.
6867 (install): Remove dependency of install-only and recursively
6868 invoke make for install-only.
6869
6870 2010-10-04 Doug Evans <dje@google.com>
6871
6872 * Makefile.in (uninstall): Use $(DESTDIR).
6873
6874 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6875
6876 PR gdb/11842
6877
6878 * linux-x86-low.c (compat_siginfo_from_siginfo)
6879 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6880 si_code is < 0. Check for si_code == SI_TIMER before checking for
6881 si_code < 0.
6882
6883 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6884
6885 * lynx-i386-low.c: New file.
6886 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6887
6888 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6889
6890 * lynx-low.c (ptrace_request_to_str): Remove handling for
6891 request values that have been removed in LynxOS 5.x.
6892
6893 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6894
6895 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6896 <ptrace.h>
6897
6898 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6899
6900 * configure.ac: Add --enable-inprocess-agent option.
6901 * configure: Rebuilt.
6902
6903 2010-09-06 Yao Qi <yao@codesourcery.com>
6904
6905 * linux-low.c (linux_kill): Remove unused variable.
6906 (linux_stabilize_threads): Likewise.
6907 * server.c (start_inferior): Likewise.
6908 (queue_stop_reply_callback): Likewise.
6909 * tracepoint.c (do_action_at_tracepoint): Likewise.
6910
6911 2010-09-06 Yao Qi <yao@codesourcery.com>
6912
6913 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6914 on return.
6915
6916 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6917
6918 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6919
6920 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6921
6922 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6923 "$(IPA_DEPFILES)".
6924
6925 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6926
6927 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6928 gdbserver/lynx-ppc-low.c: New files.
6929 * Makefile.in (lynx_low_h): New variable.
6930 (lynx-low.o, lynx-ppc-low.o): New rules.
6931 * configure.ac: On LynxOS, link with -lnetinet.
6932 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6933 * configure: regenerate.
6934
6935 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6936
6937 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6938 * configure.ac: Add check for vasprintf and vsnprintf.
6939 * configure, config.in: Regenerate.
6940 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6941
6942 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6943
6944 * gdbreplay.c: Move include of alloca.h up, next to include of
6945 malloc.h.
6946 * server.h: Add include of malloc.h.
6947 * mem-break.c: Remove include of malloc.h.
6948 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6949
6950 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6951
6952 * Makefile.in (memmem.o): Build with -Wno-error.
6953
6954 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6955
6956 * utils.c (xsnprintf): Make non-static.
6957 * server.h: Add xsnprintf declaration.
6958 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6959 replace calls to snprintf by calls to xsnprintf throughout.
6960
6961 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6962
6963 * configure.ac: Add configure check for alloca.
6964 * configure, config.in: Regenerate.
6965 * server.h: Include alloca.h if it exists.
6966 * gdbreplay.c: Include alloca.h if it exists.
6967
6968 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6969
6970 * linux-low.c (__SIGRTMIN): Define if not already defined.
6971 (linux_create_inferior): Check for __ANDROID__ rather than
6972 __SIGRTMIN.
6973 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6974 are already deferred.
6975 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6976 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6977 stopped and already has a pending signal to report.
6978 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6979 a pending signal to report or is moving out of a jump pad.
6980 (linux_init_signals): Check for __ANDROID__ rather than
6981 __SIGRTMIN.
6982
6983 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6984
6985 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6986 debug_threads check. Avoid a linear search when not doing debug
6987 output.
6988
6989 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6990
6991 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6992 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6993 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6994 (process_event): Change local fd's type to gdb_fildes_t.
6995 (create_file_handler): Adjust prototype.
6996 (delete_file_handler): Adjust prototype.
6997 (handle_file_event): Adjust prototype. Use pfildes.
6998 (create_file_event): Adjsut prototype.
6999 * remote-utils.c (remote_desc, listen_desc): Change type to
7000 gdb_fildes_t.
7001 * server.h: New gdb_fildes_t typedef.
7002 [USE_WIN32API]: Include winsock2.h.
7003 (delete_file_handler, add_file_handler): Adjust prototypes.
7004 (pfildes): Declare.
7005 * utils.c (pfildes): New.
7006
7007 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7008
7009 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7010 * configure: Regenerate.
7011
7012 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7013
7014 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7015 (linux_done_accessing_memory): ... this.
7016 (linux_target_ops): Adjust.
7017 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7018 * nto-low.c (nto_target_ops): Adjust comment.
7019 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7020 * spu-low.c (spu_target_ops): Adjust comment.
7021 * target.h (target_ops): Rename unprepare_to_access_memory field
7022 to done_accessing_memory.
7023 (unprepare_to_access_memory): Rename to ...
7024 (done_accessing_memory): ... this.
7025
7026 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7027
7028 * linux-low.c (linux_prepare_to_access_memory): New.
7029 (linux_unprepare_to_access_memory): New.
7030 (linux_target_ops): Install them.
7031 * server.c (read_memory): Rename to ...
7032 (gdb_read_memory): ... this. Use
7033 prepare_to_access_memory/prepare_to_access_memory.
7034 (write_memory): Rename to ...
7035 (gdb_write_memory): ... this. Use
7036 prepare_to_access_memory/prepare_to_access_memory.
7037 (handle_search_memory_1): Adjust.
7038 (process_serial_event): Adjust.
7039 * target.h (struct target_ops): New fields
7040 prepare_to_access_memory and unprepare_to_access_memory.
7041 (prepare_to_access_memory, unprepare_to_access_memory): New.
7042 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7043 prepare_to_access_memory/prepare_to_access_memory.
7044 * nto-low.c (nto_target_ops): Adjust.
7045 * spu-low.c (spu_target_ops): Adjust.
7046 * win32-low.c (win32_target_ops): Adjust.
7047
7048 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7049
7050 * Makefile.in (WARN_CFLAGS): Get it from configure.
7051 (WERROR_CFLAGS): New.
7052 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7053 * configure.ac: Introduce --enable-werror, which adds -Werror to
7054 the compiler command line. Enabled by default. Disable with
7055 --disable-werror. Add -Wdeclaration-after-statement
7056 Wpointer-arith and -Wformat-nonliteral to warning flags.
7057 * configure: Regenerate.
7058
7059 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7060
7061 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7062
7063 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7064
7065 * gdbreplay.c (remote_error): New.
7066 (gdbchar): New.
7067 (expect): Use gdbchar. Check for error reading from GDB.
7068 Clarify sync error output.
7069 (play): Check for errors writing to GDB.
7070 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7071 * remote-utils.c (getpkt): Check for errors writing to the remote
7072 descriptor.
7073
7074 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7075
7076 * linux-low.c (linux_wait_1): Move non-debugging code out of
7077 `debug_threads' control.
7078
7079 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7080
7081 * linux-low.c (linux_wait_1): Don't set last_status here.
7082 * server.c (push_event, queue_stop_reply_callback): Assert we're
7083 not pushing a TARGET_WAITKIND_IGNORE event.
7084 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7085 (myresume, handle_target_event): Set the thread's last_resume_kind
7086 and last_status from the target returned status.
7087
7088 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7089
7090 PR threads/10729
7091
7092 * linux-x86-low.c (update_debug_registers_callback): New.
7093 (i386_dr_low_set_addr): Use it.
7094 (i386_dr_low_get_addr): New.
7095 (i386_dr_low_set_control): Use update_debug_registers_callback.
7096 (i386_dr_low_get_control): New.
7097 (i386_dr_low_get_status): Adjust.
7098 * linux-low.c (linux_stop_lwp): New.
7099 * linux-low.h (linux_stop_lwp): Declare.
7100
7101 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7102 argument instead of a i386_debug_reg_state.
7103 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7104 a i386_debug_reg_state.
7105 (i386_insert_aligned_watchpoint): Adjust.
7106 (i386_remove_aligned_watchpoint): Adjust.
7107 (i386_low_stopped_data_address): Read the debug registers from the
7108 inferior instead of from the mirrors.
7109 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7110 (i386_dr_low_get_addr): Declare.
7111 (i386_dr_low_get_control): Declare.
7112 (i386_dr_low_get_status): Change prototype.
7113
7114 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7115 (i386_dr_low_get_addr): New.
7116 (i386_dr_low_get_control): New.
7117 (i386_dr_low_get_status): Adjust prototype. Return
7118 dr_status_mirror.
7119 (i386_initial_stuff): Clear dr_status_mirror and
7120 dr_control_mirror.
7121 (i386_get_thread_context): Adjust.
7122 (i386_set_thread_context): Adjust.
7123 (i386_thread_added): Adjust.
7124
7125 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7126
7127 * linux-low.h (linux_thread_area): Delete declaration.
7128
7129 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7130
7131 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7132 after its termination.
7133
7134 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7135
7136 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7137 (gdb_wants_all_stopped): Delete.
7138 (linux_wait_1): Don't call them.
7139 * server.c (handle_v_cont): Tag all threads as want-stopped.
7140 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7141 stopped as "client-wants-stopped".
7142
7143 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7144
7145 * Makefile.in (signals_h): New.
7146 (server_h): Depend on it.
7147 (server.o): Don't depend on $(signals_def).
7148 (signals.o): Depend on $(signals_def).
7149
7150 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7151
7152 * Makefile.in (signals_def): New.
7153 (server_h): Append include/gdb/signals.h and signals_def.
7154 (server.o): Append signals_def.
7155
7156 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7157
7158 * server.c (handle_target_event): Use target_signal_to_host for
7159 resume_info.sig initialization.
7160 * target.h (struct thread_resume) <sig>: New comment.
7161
7162 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7163
7164 * server.c (handle_query): strcpy() the returned string from paddress()
7165 instead of sprintf().
7166 * utils.c (paddress): Return phex_nz().
7167
7168 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7169
7170 * server.c (handle_v_cont): Call mourn_inferior if process
7171 just exited.
7172 (myresume): Likewise.
7173
7174 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7175
7176 Static tracepoints, and integration with UST.
7177
7178 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7179 * mem-break.c (uninsert_all_breakpoints)
7180 (reinsert_all_breakpoints): New.
7181 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7182 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7183 (gdb_agent_ust_loaded, helper_thread_id)
7184 (gdb_agent_helper_thread_id): New macros.
7185 (struct ipa_sym_addresses): Add addr_ust_loaded,
7186 addr_helper_thread_id, addr_cmd_buf.
7187 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7188 (in_process_agent_loaded_ust): New.
7189 (write_e_ust_not_loaded): New.
7190 (maybe_write_ipa_ust_not_loaded): New.
7191 (struct collect_static_trace_data_action): New.
7192 (enum tracepoint_type) <static_tracepoint>: New.
7193 (struct tracepoint) <handle>: Mention static tracepoints.
7194 (struct static_tracepoint_ctx): New.
7195 (CMD_BUF_SIZE): New.
7196 (add_tracepoint_action): Handle static tracepoint actions.
7197 (unprobe_marker_at): New.
7198 (clear_installed_tracepoints): Handle static tracepoints.
7199 (cmd_qtdp): Handle static tracepoints.
7200 (probe_marker_at): New.
7201 (cmd_qtstart): Handle static tracepoints.
7202 (response_tracepoint): Handle static tracepoints.
7203 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7204 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7205 (get_context_regcache): Handle static tracepoints.
7206 (do_action_at_tracepoint): Handle static tracepoint actions.
7207 (traceframe_find_block_type): Handle static trace data blocks.
7208 (traceframe_read_sdata): New.
7209 (download_tracepoints): Download static tracepoint actions.
7210 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7211 (GDB_PROBE_NAME): New.
7212 (ust_ops): New.
7213 (GET_UST_SYM): New.
7214 (USTF): New.
7215 (dlsym_ust): New.
7216 (ust_marker_to_static_tracepoint): New.
7217 (gdb_probe): New.
7218 (collect_ust_data_at_tracepoint): New.
7219 (gdb_ust_probe): New.
7220 (UNIX_PATH_MAX, SOCK_DIR): New.
7221 (gdb_ust_connect_sync_socket): New.
7222 (resume_thread, stop_thread): New.
7223 (run_inferior_command): New.
7224 (init_named_socket): New.
7225 (gdb_ust_socket_init): New.
7226 (cstr_to_hexstr): New.
7227 (next_st): New.
7228 (first_marker, next_marker): New.
7229 (response_ust_marker): New.
7230 (cmd_qtfstm, cmd_qtsstm): New.
7231 (unprobe_marker_at, probe_marker_at): New.
7232 (cmd_qtstmat, gdb_ust_thread): New.
7233 (gdb_ust_init): New.
7234 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7235 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7236 (ST_REGENTRY): New.
7237 (x86_64_st_collect_regmap): New.
7238 (X86_64_NUM_ST_COLLECT_GREGS): New.
7239 (AMD64_RIP_REGNUM): New.
7240 (supply_static_tracepoint_registers): New.
7241 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7242 (ST_REGENTRY): New.
7243 (i386_st_collect_regmap): New.
7244 (i386_NUM_ST_COLLECT_GREGS): New.
7245 (supply_static_tracepoint_registers): New.
7246 * server.c (handle_query): Handle qXfer:statictrace:read.
7247 <qSupported>: Report support for StaticTracepoints, and
7248 qXfer:statictrace:read features.
7249 * server.h (traceframe_read_sdata)
7250 (supply_static_tracepoint_registers): Declare.
7251 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7252 (unpack_varlen_hex): Include in IPA build.
7253 * Makefile.in (ustlibs, ustinc): New.
7254 (IPA_OBJS): Add remote-utils-ipa.o.
7255 ($(IPA_LIB)): Link -ldl and -lpthread.
7256 (UST_CFLAGS): New.
7257 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7258 * config.in, configure: Regenerate.
7259
7260 2010-06-20 Ian Lance Taylor <iant@google.com>
7261 Pedro Alves <pedro@codesourcery.com>
7262
7263 * linux-x86-low.c (always_true): Delete.
7264 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7265 trying to fool the compiler with always_true.
7266
7267 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7268
7269 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7270 conditions in gdbserver.
7271
7272 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7273
7274 * spu-low.c (spu_read_memory): Wrap around local store limit.
7275 (spu_write_memory): Likewise.
7276
7277 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7278
7279 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7280 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7281 LONGEST uses.
7282 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7283 uses.
7284 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7285 uses with LONGEST uses.
7286
7287 2010-06-14 Stan Shebs <stan@codesourcery.com>
7288 Pedro Alves <pedro@codesourcery.com>
7289
7290 Bytecode compiler.
7291
7292 * linux-x86-low.c: Include limits.h.
7293 (add_insns): New.
7294 (always_true): New.
7295 (EMIT_ASM): New.
7296 (EMIT_ASM32): New.
7297 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7298 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7299 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7300 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7301 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7302 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7303 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7304 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7305 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7306 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7307 (amd64_emit_void_call_2): New.
7308 (amd64_emit_ops): New.
7309 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7310 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7311 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7312 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7313 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7314 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7315 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7316 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7317 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7318 (i386_emit_stack_adjust, i386_emit_int_call_1)
7319 (i386_emit_void_call_2): New.
7320 (i386_emit_ops): New.
7321 (x86_emit_ops): New.
7322 (the_low_target): Install x86_emit_ops.
7323 * server.h (struct emit_ops): New.
7324 (get_raw_reg_func_addr): Declare.
7325 (current_insn_ptr, emit_error): Declare.
7326 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7327 (set_trace_state_variable_value): New defines.
7328 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7329 addr_get_trace_state_variable_value and
7330 addr_set_trace_state_variable_value.
7331 (symbol_list): New fields for get_raw_reg,
7332 get_trace_state_variable_value and set_trace_state_variable_value.
7333 (condfn): New typedef.
7334 (struct tracepoint): New field `compiled_cond'.
7335 (do_action_at_tracepoint): Clear compiled_cond.
7336 (get_trace_state_variable_value, set_trace_state_variable_value):
7337 Export in the IPA.
7338 (condition_true_at_tracepoint): If there's a compiled condition,
7339 run that.
7340 (current_insn_ptr, emit_error): New globals.
7341 (struct bytecode_address): New.
7342 (get_raw_reg_func_addr): New.
7343 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7344 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7345 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7346 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7347 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7348 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7349 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7350 (compile_tracepoint_condition, compile_bytecodes): New.
7351 * target.h (emit_ops): Forward declare.
7352 (struct target_ops): New field emit_ops.
7353 (target_emit_ops): New.
7354 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7355 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7356 * linux-low.c (linux_emit_ops): New.
7357 (linux_target_ops): Install it.
7358 * linux-low.h (struct linux_target_ops): New field emit_ops.
7359
7360 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7361
7362 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7363 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7364
7365 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7366 Stan Shebs <stan@codesourcery.com>
7367
7368 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7369 (all): Depend on $(extra_libraries).
7370 (install-only): Install the IPA.
7371 (IPA_OBJS, IPA_LIB): New.
7372 (clean): Remove the IPA lib.
7373 (IPAGENT_CFLAGS): New.
7374 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7375 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7376 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7377 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7378 * configure.ac: Check for atomic builtins support in the compiler.
7379 (IPA_DEPFILES, extra_libraries): Define.
7380 * configure.srv (ipa_obj): Add description.
7381 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7382 (i[34567]86-*-linux*): Set ipa_obj.
7383 (x86_64-*-linux*): Set ipa_obj.
7384 * linux-low.c (stabilizing_threads): New.
7385 (supports_fast_tracepoints): New.
7386 (linux_detach): Stabilize threads before detaching.
7387 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7388 the lwp is either not stabilizing, or is moving out of a jump pad.
7389 (linux_fast_tracepoint_collecting): New.
7390 (maybe_move_out_of_jump_pad): New.
7391 (enqueue_one_deferred_signal): New.
7392 (dequeue_one_deferred_signal): New.
7393 (linux_wait_for_event_1): If moving out of a jump pad, defer
7394 pending signals to later.
7395 (linux_stabilize_threads): New.
7396 (linux_wait_1): Check if threads need moving out of jump pads, and
7397 do it if so.
7398 (stuck_in_jump_pad_callback): New.
7399 (move_out_of_jump_pad_callback): New.
7400 (lwp_running): New.
7401 (linux_resume_one_lwp): Handle moving out of jump pads.
7402 (linux_set_resume_request): Dequeue deferred signals.
7403 (need_step_over_p): Also step over fast tracepoint jumps.
7404 (start_step_over): Also uninsert fast tracepoint jumps.
7405 (finish_step_over): Also reinsert fast tracepoint jumps.
7406 (linux_install_fast_tracepoint_jump): New.
7407 (linux_target_ops): Install linux_stabilize_threads and
7408 linux_install_fast_tracepoint_jump_pad.
7409 * linux-low.h (linux_target_ops) <get_thread_area,
7410 install_fast_tracepoint_jump_pad>: New fields.
7411 (struct lwp_info) <collecting_fast_tracepoint,
7412 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7413 (linux_get_thread_area): Declare.
7414 * linux-x86-low.c (jump_insn): New.
7415 (x86_get_thread_area): New.
7416 (append_insns): New.
7417 (push_opcode): New.
7418 (amd64_install_fast_tracepoint_jump_pad): New.
7419 (i386_install_fast_tracepoint_jump_pad): New.
7420 (x86_install_fast_tracepoint_jump_pad): New.
7421 (the_low_target): Install x86_get_thread_area and
7422 x86_install_fast_tracepoint_jump_pad.
7423 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7424 (struct fast_tracepoint_jump): New.
7425 (fast_tracepoint_jump_insn): New.
7426 (fast_tracepoint_jump_shadow): New.
7427 (find_fast_tracepoint_jump_at): New.
7428 (fast_tracepoint_jump_here): New.
7429 (delete_fast_tracepoint_jump): New.
7430 (set_fast_tracepoint_jump): New.
7431 (uninsert_fast_tracepoint_jumps_at): New.
7432 (reinsert_fast_tracepoint_jumps_at): New.
7433 (set_breakpoint_at): Use write_inferior_memory.
7434 (uninsert_raw_breakpoint): Use write_inferior_memory.
7435 (check_mem_read): Mask out fast tracepoint jumps.
7436 (check_mem_write): Mask out fast tracepoint jumps.
7437 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7438 (set_fast_tracepoint_jump): Declare.
7439 (delete_fast_tracepoint_jump)
7440 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7441 (reinsert_fast_tracepoint_jumps_at): Declare.
7442 * regcache.c: Don't compile many functions when building the
7443 in-process agent library.
7444 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7445 the register buffer in the heap.
7446 (free_register_cache): If the register buffer isn't owned by the
7447 regcache, don't free it.
7448 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7449 pre-existing register caches.
7450 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7451 type.
7452 (convert_ascii_to_int): : Constify `from' parameter type.
7453 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7454 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7455 the needed buffer in-place.
7456 (relocate_instruction): New.
7457 * server.c (handle_query) <qSymbols>: If the target supports
7458 tracepoints, give it a chance of looking up symbols. Report
7459 support for fast tracepoints.
7460 (handle_status): Stabilize threads.
7461 (process_serial_event): Adjust.
7462 * server.h (struct fast_tracepoint_jump): Forward declare.
7463 (struct process_info) <fast_tracepoint_jumps>: New field.
7464 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7465 (decode_X_packet, decode_M_packet): Adjust.
7466 (relocate_instruction): Declare.
7467 (in_process_agent_loaded): Declare.
7468 (tracepoint_look_up_symbols): Declare.
7469 (struct fast_tpoint_collect_status): Declare.
7470 (fast_tracepoint_collecting): Declare.
7471 (force_unlock_trace_buffer): Declare.
7472 (handle_tracepoint_bkpts): Declare.
7473 (initialize_low_tracepoint)
7474 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7475 * target.h (struct target_ops) <stabilize_threads,
7476 install_fast_tracepoint_jump_pad>: New fields.
7477 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7478 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7479 [HAVE_STDINT_H]: Include stdint.h.
7480 (trace_debug_1): Rename to ...
7481 (trace_vdebug): ... this.
7482 (trace_debug): Rename to ...
7483 (trace_debug_1): ... this. Add `level' parameter.
7484 (trace_debug): New.
7485 (ATTR_USED, ATTR_NOINLINE): New.
7486 (IP_AGENT_EXPORT): New.
7487 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7488 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7489 (about_to_request_buffer_space, trace_buffer_is_full)
7490 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7491 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7492 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7493 (traceframe_write_count, traceframes_created)
7494 (trace_state_variables)
7495 New renaming defines.
7496 (struct ipa_sym_addresses): New.
7497 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7498 (symbol_list): New.
7499 (ipa_sym_addrs): New.
7500 (all_tracepoint_symbols_looked_up): New.
7501 (in_process_agent_loaded): New.
7502 (write_e_ipa_not_loaded): New.
7503 (maybe_write_ipa_not_loaded): New.
7504 (tracepoint_look_up_symbols): New.
7505 (debug_threads) [IN_PROCESS_AGENT]: New.
7506 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7507 (UNKNOWN_SIDE_EFFECTS): New.
7508 (stop_tracing): New.
7509 (flush_trace_buffer): New.
7510 (stop_tracing_bkpt): New.
7511 (flush_trace_buffer_bkpt): New.
7512 (read_inferior_integer): New.
7513 (read_inferior_uinteger): New.
7514 (read_inferior_data_pointer): New.
7515 (write_inferior_data_pointer): New.
7516 (write_inferior_integer): New.
7517 (write_inferior_uinteger): New.
7518 (struct collect_static_trace_data_action): Delete.
7519 (enum tracepoint_type): New.
7520 (struct tracepoint) <type>: New field `type'.
7521 <actions_str, step_actions, step_actions_str>: Only include in
7522 GDBserver.
7523 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7524 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7525 (tracepoints): Use IP_AGENT_EXPORT.
7526 (last_tracepoint): Don't include in the IPA.
7527 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7528 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7529 (alloced_trace_state_variables): New.
7530 (trace_state_variables): Use IP_AGENT_EXPORT.
7531 (traceframe_t): Delete unused variable.
7532 (circular_trace_buffer): Don't include in the IPA.
7533 (trace_buffer_start): Delete.
7534 (struct trace_buffer_control): New.
7535 (trace_buffer_free): Delete.
7536 (struct ipa_trace_buffer_control): New.
7537 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7538 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7539 New.
7540 (trace_buffer_ctrl): New.
7541 (TRACE_BUFFER_CTRL_CURR): New.
7542 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7543 Reimplement as macros.
7544 (trace_buffer_wrap): Delete.
7545 (traceframe_write_count, traceframe_read_count)
7546 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7547 (struct tracepoint_hit_ctx) <type>: New field.
7548 (struct fast_tracepoint_ctx): New.
7549 (memory_barrier): New.
7550 (cmpxchg): New.
7551 (record_tracepoint_error): Update atomically in the IPA.
7552 (clear_inferior_trace_buffer): New.
7553 (about_to_request_buffer_space): New.
7554 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7555 updating the same buffer.
7556 (add_tracepoint): Default the tracepoint's type to trap
7557 tracepoint, and orig_size to -1.
7558 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7559 internal variables.
7560 (create_trace_state_variable): New parameter `gdb'. Handle it.
7561 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7562 (cmd_qtdp): Handle fast tracepoints.
7563 (cmd_qtdv): Adjust.
7564 (max_jump_pad_size): New.
7565 (gdb_jump_pad_head): New.
7566 (get_jump_space_head): New.
7567 (claim_jump_space): New.
7568 (sort_tracepoints): New.
7569 (MAX_JUMP_SIZE): New.
7570 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7571 IPA.
7572 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7573 support. Upload fast traceframes, and delete internal IPA
7574 breakpoints.
7575 (stop_tracing_handler): New.
7576 (flush_trace_buffer_handler): New.
7577 (cmd_qtstop): Upload fast tracepoints.
7578 (response_tracepoint): Handle fast tracepoints.
7579 (tracepoint_finished_step): Upload fast traceframes. Set the
7580 tracepoint hit context's tracepoint type.
7581 (handle_tracepoint_bkpts): New.
7582 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7583 type. Add comment about fast tracepoints.
7584 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7585 non-existing action_str field.
7586 (get_context_regcache): Handle fast tracepoints.
7587 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7588 to the regcache.
7589 (fast_tracepoint_from_jump_pad_address): New.
7590 (fast_tracepoint_from_ipa_tpoint_address): New.
7591 (collecting_t): New.
7592 (force_unlock_trace_buffer): New.
7593 (fast_tracepoint_collecting): New.
7594 (collecting): New.
7595 (gdb_collect): New.
7596 (write_inferior_data_ptr): New.
7597 (target_tp_heap): New.
7598 (target_malloc): New.
7599 (download_agent_expr): New.
7600 (UALIGN): New.
7601 (download_tracepoints): New.
7602 (download_trace_state_variables): New.
7603 (upload_fast_traceframes): New.
7604 (IPA_FIRST_TRACEFRAME): New.
7605 (IPA_NEXT_TRACEFRAME_1): New.
7606 (IPA_NEXT_TRACEFRAME): New.
7607 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7608 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7609 (gdb_jump_pad_buffer_end): New.
7610 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7611 (initialize_tracepoint): Adjust.
7612 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7613 buffer. Initialize the low module.
7614 * utils.c (PREFIX, TOOLNAME): New.
7615 (malloc_failure): Use PREFIX.
7616 (error): In the IPA, an error causes an exit.
7617 (fatal, warning): Use PREFIX.
7618 (internal_error): Use TOOLNAME.
7619 (NUMCELLS): Increase to 10.
7620 * configure, config.in: Regenerate.
7621
7622 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7623
7624 * server.c (handle_query) <qSupported>: Do two passes over the
7625 qSupported string to avoid nesting strtok.
7626
7627 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7628
7629 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7630 (CDEPS): New.
7631 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7632 -Wl,--dynamic-list.
7633 * configure: Regenerate.
7634 * proc-service.list: New.
7635
7636 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7637
7638 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7639 New comment.
7640
7641 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7642
7643 * gdbreplay.c (remote_open): Check error return from socket() call by
7644 its equality to -1 not by it being negative.
7645 * remote-utils.c (remote_open): Likewise.
7646
7647 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7648
7649 * config.h: Regenerate.
7650
7651 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7652
7653 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7654 doesn't provide PTRACE_GET_THREAD_AREA.
7655
7656 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7657
7658 * linux-m68k-low.c: Include <asm/ptrace.h>
7659 (ps_get_thread_area): Implement.
7660
7661 2010-05-03 Doug Evans <dje@google.com>
7662
7663 * event-loop.c (struct callback_event): New struct.
7664 (callback_list): New global.
7665 (append_callback_event, delete_callback_event): New functions.
7666 (process_callback): New function.
7667 (start_event_loop): Call it.
7668 * remote-utils.c (NOT_SCHEDULED): Define.
7669 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7670 moved out of readchar.
7671 (readchar): Rewrite. Call reschedule before returning.
7672 (reset_readchar): New function.
7673 (remote_close): Call it.
7674 (process_remaining, reschedule): New functions.
7675 * server.h (callback_handler_func): New typedef.
7676 (append_callback_event, delete_callback_event): Declare.
7677
7678 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7679
7680 * proc-service.c (ps_pglobal_lookup): Use
7681 thread_db_look_up_one_symbol.
7682 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7683 parameter. Use it instead of all_symbols_looked_up.
7684 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7685 field.
7686 (all_symbols_looked_up): Don't declare.
7687 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7688 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7689 field.
7690 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7691 Set all_symbols_looked_up here.
7692 (thread_db_look_up_one_symbol): New.
7693 (thread_db_get_tls_address): Adjust.
7694 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7695 thread_db object on the heap, and tentatively set it in the
7696 process structure.
7697 (thread_db_init): Don't set all_symbols_looked_up here.
7698 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7699
7700 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7701
7702 * linux-low.c (linux_kill, linux_detach): Adjust.
7703 (status_pending_p_callback): Remove redundant statement. Check
7704 for !TARGET_WAITIKIND_IGNORE, instead of
7705 TARGET_WAITKIND_STOPPED.
7706 (handle_tracepoints): Make sure LWP is locked. Adjust.
7707 (linux_wait_for_event_1): Adjust.
7708 (linux_cancel_breakpoints): New.
7709 (unsuspend_one_lwp): New.
7710 (unsuspend_all_lwps): New.
7711 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7712 (send_sigstop_callback): Change return type to int, add new
7713 `except' parameter and handle it.
7714 (suspend_and_send_sigstop_callback): New.
7715 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7716 pass them down. If SUSPEND, also increment the lwp's suspend
7717 count.
7718 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7719 (need_step_over_p): Don't consider suspended LWPs.
7720 (start_step_over): Adjust.
7721 (proceed_one_lwp): Change return type to int, add new `except'
7722 parameter and handle it.
7723 (unsuspend_and_proceed_one_lwp): New.
7724 (proceed_all_lwps): Use find_inferior instead of
7725 for_each_inferior.
7726 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7727 also decrement the suspend count of LWPs. Pass `except' down,
7728 instead of hacking its suspend count.
7729 (linux_pause_all): Add `freeze' parameter. Adjust.
7730 (linux_unpause_all): New.
7731 (linux_target_ops): Install linux_unpause_all.
7732 * server.c (handle_status): Adjust.
7733 * target.h (struct target_ops): New fields `unpause_all' and
7734 `cancel_breakpoints'. Add new parameter to `pause_all'.
7735 (pause_all): Add new `freeze' parameter.
7736 (unpause_all): New.
7737 (cancel_breakpoints): New.
7738 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7739 cancel breakpoints.
7740 (cmd_qtstart): Pause threads.
7741 (stop_tracing): Pause threads, and cancel breakpoints.
7742 * win32-low.c (win32_target_ops): Adjust.
7743
7744 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7745
7746 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7747 the inferior right away from here...
7748 (linux_wait_1): ... to here, and adjust to check the thread's
7749 last_resume_kind instead of the lwp's step or stop_expected flags.
7750
7751 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7752
7753 * README: Use consistent `GDB' and `GDBserver' spellings.
7754
7755 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7756
7757 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7758 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7759 (linux_detach_one_lwp): Assume the lwp is stopped.
7760 (any_thread_of): Delete.
7761 (linux_detach): Stop all lwps here. Don't blindly delete all
7762 breakpoints.
7763 (delete_lwp_callback): New.
7764 (linux_mourn): Delete all lwps of the process that is gone.
7765 (linux_wait_1): Don't delete the last lwp of the process here.
7766 * mem-break.h (mark_breakpoints_out): Declare.
7767 * mem-break.c (mark_breakpoints_out): New.
7768 (free_all_breakpoints): Use it.
7769 * server.c (handle_target_event): If the process is gone, mark
7770 breakpoints out.
7771 * thread-db.c (struct thread_db) <create_bp>: New field.
7772 (thread_db_enable_reporting): Fix prototype. Store a thread event
7773 breakpoint reference in the thread_db struct.
7774 (thread_db_load_search): Clear the thread_db object.
7775 (try_thread_db_load_1): Ditto.
7776 (switch_to_process): New.
7777 (disable_thread_event_reporting): Use it.
7778 (remove_thread_event_breakpoints): New.
7779 (thread_db_detach, thread_db_mourn): Use it.
7780
7781 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7782
7783 * linux-low.c (linux_enable_event_reporting): New.
7784 (linux_wait_for_event_1, handle_extended_wait): Use it.
7785
7786 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7787
7788 * linux-low.c (linux_kill_one_lwp, linux_kill)
7789 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7790 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7791 SIGSTOP even if the LWP is stopped.
7792 (send_sigstop_callback): New.
7793 (stop_all_lwps): Use send_sigstop_callback instead.
7794 (linux_resume_one_thread): Adjust.
7795 (proceed_one_lwp): Still proceed an LWP that the client has
7796 requested to stop, if we haven't reported it as stopped yet. Make
7797 sure that LWPs the client want stopped, have a pending SIGSTOP.
7798
7799 2010-04-26 Doug Evans <dje@google.com>
7800
7801 * server.c (handle_general_set): Make static.
7802
7803 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7804 Print received char after testing for error/eof instead of before.
7805 (input_interrupt): Tweak comment.
7806
7807 2010-04-23 Doug Evans <dje@google.com>
7808
7809 * server.c (start_inferior): Print inferior argv if --debug.
7810
7811 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7812
7813 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7814 * nto-x86-low.c: Include server.h
7815
7816 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7817
7818 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7819 be consistent with other sources of this directory.
7820 (init_registers_amd64): Correct name of source file of this function
7821 in the comment.
7822
7823 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7824
7825 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7826 64-bit executables.
7827
7828 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7829
7830 * win32-i386-low.c: Add 64-bit support.
7831 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7832 (init_registers_amd64): Declare.
7833 (mappings): Add 64-bit version of array.
7834 (init_windows_x86): New function.
7835 (the_low_target): Change init_arch field to init_windows_x86.
7836
7837 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7838
7839 * win32-low.c: Adapt to support also 64-bit architecture.
7840 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7841 (get_image_name): Use SIZE_T type for local variable `done'.
7842 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7843 (toolhelp_get_dll_name): Idem.
7844 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7845 Use uintptr_t typecast to avoid warning.
7846 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7847 (handle_exception): Use phex_nz to avoid warning.
7848 (win32_wait): Remove unused local variable `process'.
7849
7850 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7851
7852 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7853 `amd64-avx.o'.
7854
7855 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7856
7857 * configure.ac: Use `ws2_32' library for srv_mingw.
7858 * configure: Regenerate.
7859 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7860 * remote-utils.c: Likewise.
7861
7862 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7863
7864 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7865 if __x86_64__ is defined.
7866
7867 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7868
7869 * configure: Regenerate.
7870
7871 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7872
7873 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7874 * target.h (target_ops): New get_tib_address field.
7875 * win32-low.h (win32_thread_info): Add thread_local_base field.
7876 * win32-low.c (child_add_thread): Add tlb argument.
7877 Set thread_local_base field to TLB.
7878 (get_child_debug_event): Adapt to child_add_thread change.
7879 (win32_get_tib_address): New function.
7880 (win32_target_ops): Set get_tib_address field to
7881 win32_get_tib_address.
7882 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7883
7884 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7885
7886 * linux-low.c (linux_mourn): Also remove the process.
7887 * server.c (handle_target_event): Don't remove the process here.
7888 * nto-low.c (nto_mourn): New.
7889 (nto_target_ops): Install it.
7890 * spu-low.c (spu_mourn): New.
7891 (spu_target_ops): Install it.
7892 * win32-low.c (win32_mourn): New.
7893 (win32_target_ops): Install it.
7894
7895 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7896
7897 * server.h (buffer_xml_printf): Remove redundant `;'.
7898
7899 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7900
7901 * regcache.c (set_register_cache): Invalidate regcaches before
7902 changing the register cache layout.
7903 (regcache_invalidate_one): Allow a NULL regcache.
7904 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7905 regcaches before changing the register cache layout or the target
7906 regsets.
7907
7908 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7909
7910 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7911 variable warning on Linux/x86-64.
7912
7913 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7914
7915 GDBserver disconnected tracing support.
7916
7917 * linux-low.c (linux_remove_process): Delete.
7918 (add_lwp): Don't set last_resume_kind here.
7919 (linux_kill): Use `mourn'.
7920 (linux_detach): Use `thread_db_detach', and `mourn'.
7921 (linux_mourn): New.
7922 (linux_attach_lwp_1): Adjust comment.
7923 (linux_attach): last_resume_kind moved the thread_info; adjust.
7924 (status_pending_p_callback): Adjust.
7925 (linux_wait_for_event_1): Adjust.
7926 (count_events_callback, select_singlestep_lwp_callback)
7927 (select_event_lwp_callback, cancel_breakpoints_callback)
7928 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7929 (proceed_one_lwp): Adjust.
7930 (linux_async): Add debug output.
7931 (linux_thread_stopped): New.
7932 (linux_pause_all): New.
7933 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7934 linux_pause_all.
7935 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7936 (thread_db_free): Delete declaration.
7937 (thread_db_detach, thread_db_mourn): Declare.
7938 * thread-db.c (thread_db_init): Use thread_db_mourn.
7939 (thread_db_free): Delete, split in two.
7940 (disable_thread_event_reporting): New.
7941 (thread_db_detach): New.
7942 (thread_db_mourn): New.
7943
7944 * server.h (struct thread_info) <last_resume_kind>: New field.
7945 <attached>: Add comment.
7946 <gdb_detached>: New field.
7947 (handler_func): Change return type to int.
7948 (handle_serial_event, handle_target_event): Ditto.
7949 (gdb_connected): Declare.
7950 (tracing): Delete.
7951 (disconnected_tracing): Declare.
7952 (stop_tracing): Declare.
7953
7954 * server.c (handle_query) <qSupported>: Report support for
7955 disconnected tracing.
7956 (queue_stop_reply_callback): Account for running threads.
7957 (gdb_wants_thread_stopped): New.
7958 (gdb_wants_all_threads_stopped): New.
7959 (gdb_reattached_process): New.
7960 (handle_status): Clear the `gdb_detached' flag of all processes.
7961 In all-stop, stop all threads.
7962 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7963 (process_serial_event): If the remote connection breaks, or if an
7964 exit was forced with "monitor exit", force an event loop exit.
7965 Handle disconnected tracing on detach.
7966 (handle_serial_event): Adjust.
7967 (handle_target_event): If GDB isn't connected, forward events back
7968 to the inferior, unless the last process exited, in which case,
7969 exit gdbserver. Adjust interface.
7970
7971 * remote-utils.c (remote_open): Don't block in accept. Instead
7972 register an event loop source on the listen socket file
7973 descriptor. Refactor bits into ...
7974 (listen_desc): ... this new global.
7975 (gdb_connected): ... this new function.
7976 (enable_async_notification): ... this new function.
7977 (handle_accept_event): ... this new function.
7978 (remote_close): Clear remote_desc.
7979
7980 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7981
7982 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7983 New fields.
7984 (mourn_inferior): Define.
7985 (target_process_qsupported): Avoid the dangling else problem.
7986 (thread_stopped): Define.
7987 (pause_all): Define.
7988 (target_waitstatus_to_string): Declare.
7989 * target.c (target_waitstatus_to_string): New.
7990
7991 * tracepoint.c (tracing): Make extern.
7992 (disconnected_tracing): New.
7993 (stop_tracing): Make extern. Handle tracing stops due to GDB
7994 disconnecting.
7995 (cmd_qtdisconnected): New.
7996 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7997 (handle_tracepoint_general_set): Handle QTDisconnected.
7998
7999 * event-loop.c (event_handler_func): Change return type to int.
8000 (process_event): Bail out if the event handler wants the event
8001 loop to stop.
8002 (handle_file_event): Ditto.
8003 (start_event_loop): Bail out if the event handler wants the event
8004 loop to stop.
8005
8006 * nto-low.c (nto_target_ops): Adjust.
8007 * spu-low.c (spu_wait): Don't remove the process here.
8008 (spu_target_ops): Adjust.
8009 * win32-low.c (win32_wait): Don't remove the process here.
8010 (win32_target_ops): Adjust.
8011
8012 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8013
8014 * regcache.c (realloc_register_cache): Invalidate inferior's
8015 regcache before recreating it.
8016
8017 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8018
8019 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8020
8021 2010-04-09 Stan Shebs <stan@codesourcery.com>
8022 Pedro Alves <pedro@codesourcery.com>
8023
8024 * server.h (LONGEST): New.
8025 (struct thread_info) <while_stepping>: New field.
8026 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8027 Declare.
8028 (initialize_tracepoint, handle_tracepoint_general_set)
8029 (handle_tracepoint_query, tracepoint_finished_step)
8030 (tracepoint_was_hit, release_while_stepping_state_list):
8031 (current_traceframe): Declare.
8032 * server.c (handle_general_set): Handle tracepoint packets.
8033 (read_memory): New.
8034 (write_memory): New.
8035 (handle_search_memory_1): Use read_memory.
8036 (handle_query): Report support for conditional tracepoints, trace
8037 state variables, and tracepoint sources. Handle tracepoint
8038 queries.
8039 (main): Initialize the tracepoints module.
8040 (process_serial_event): Handle traceframe reads/writes.
8041
8042 * linux-low.c (handle_tracepoints): New.
8043 (linux_wait_1): Call it.
8044 (linux_resume_one_lwp): Handle while-stepping.
8045 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8046 (linux_target_ops): Install them.
8047 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8048 New field.
8049 * linux-x86-low.c (x86_supports_tracepoints): New.
8050 (the_low_target). Install it.
8051
8052 * mem-break.h (delete_breakpoint): Declare.
8053 * mem-break.c (delete_breakpoint): Make external.
8054
8055 * target.h (struct target_ops): Add `supports_tracepoints',
8056 `read_pc', and `write_pc' fields.
8057 (target_supports_tracepoints): Define.
8058 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8059 (phex_nz): New.
8060
8061 * regcache.h (struct regcache) <registers_owned>: New field.
8062 (init_register_cache, regcache_cpy): Declare.
8063 (regcache_read_pc, regcache_write_pc): Declare.
8064 (register_cache_size): Declare.
8065 (supply_regblock): Declare.
8066 * regcache.c (init_register_cache): New.
8067 (new_register_cache): Use it.
8068 (regcache_cpy): New.
8069 (register_cache_size): New.
8070 (supply_regblock): New.
8071 (regcache_read_pc, regcache_write_pc): New.
8072
8073 * tracepoint.c: New.
8074
8075 * Makefile.in (OBS): Add tracepoint.o.
8076 (tracepoint.o): New rule.
8077
8078 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8079
8080 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8081 (i386-mmx.o): New.
8082 (i386-mmx.c): Likewise.
8083 (i386-mmx-linux.o): Likewise.
8084 (i386-mmx-linux.c): Likewise.
8085
8086 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8087 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8088 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8089 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8090
8091 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8092 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8093 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8094
8095 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8096
8097 * Makefile.in (clean): Updated.
8098 (i386-avx.o): New.
8099 (i386-avx.c): Likewise.
8100 (i386-avx-linux.o): Likewise.
8101 (i386-avx-linux.c): Likewise.
8102 (amd64-avx.o): Likewise.
8103 (amd64-avx.c): Likewise.
8104 (amd64-avx-linux.o): Likewise.
8105 (amd64-avx-linux.c): Likewise.
8106
8107 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8108 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8109 (srv_amd64_regobj): Add amd64-avx.o.
8110 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8111 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8112 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8113 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8114 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8115 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8116 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8117
8118 * i387-fp.c: Include "i386-xstate.h".
8119 (i387_xsave): New.
8120 (i387_cache_to_xsave): Likewise.
8121 (i387_xsave_to_cache): Likewise.
8122 (x86_xcr0): Likewise.
8123
8124 * i387-fp.h (i387_cache_to_xsave): Likewise.
8125 (i387_xsave_to_cache): Likewise.
8126 (x86_xcr0): Likewise.
8127
8128 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8129 * linux-crisv32-low.c (target_regsets): Likewise.
8130 * linux-m68k-low.c (target_regsets): Likewise.
8131 * linux-mips-low.c (target_regsets): Likewise.
8132 * linux-ppc-low.c (target_regsets): Likewise.
8133 * linux-s390-low.c (target_regsets): Likewise.
8134 * linux-sh-low.c (target_regsets): Likewise.
8135 * linux-sparc-low.c (target_regsets): Likewise.
8136 * linux-xtensa-low.c (target_regsets): Likewise.
8137
8138 * linux-low.c: Include <sys/uio.h>.
8139 (regsets_fetch_inferior_registers): Support nt_type.
8140 (regsets_store_inferior_registers): Likewise.
8141 (linux_process_qsupported): New.
8142 (linux_target_ops): Add linux_process_qsupported.
8143
8144 * linux-low.h (regset_info): Add nt_type.
8145 (linux_target_ops): Add process_qsupported.
8146
8147 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8148 and <sys/uio.h>.
8149 (init_registers_i386_avx_linux): New.
8150 (init_registers_amd64_avx_linux): Likewise.
8151 (xmltarget_i386_linux_no_xml): Likewise.
8152 (xmltarget_amd64_linux_no_xml): Likewise.
8153 (PTRACE_GETREGSET): Likewise.
8154 (PTRACE_SETREGSET): Likewise.
8155 (x86_fill_xstateregset): Likewise.
8156 (x86_store_xstateregset): Likewise.
8157 (use_xml): Likewise.
8158 (x86_linux_update_xmltarget): Likewise.
8159 (x86_linux_process_qsupported): Likewise.
8160 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8161 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8162 init_registers_i386_linux here. Call
8163 x86_linux_update_xmltarget.
8164 (the_low_target): Add x86_linux_process_qsupported.
8165
8166 * server.c (handle_query): Call target_process_qsupported.
8167
8168 * target.h (target_ops): Add process_qsupported.
8169 (target_process_qsupported): New.
8170
8171 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8172
8173 * inferiors.c (add_thread): Set last_status kind to
8174 TARGET_WAITKIND_IGNORE.
8175 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8176 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8177 (linux_wait_1): Move `thread' local definition to block that uses
8178 it. Don't NULL initialize `event_child'.
8179 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8180 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8181 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8182
8183 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8184
8185 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8186 an extended waitstatus, or by a watchpoint.
8187 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8188 thread was stepping or has been stopped by a watchpoint.
8189
8190 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8191
8192 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8193 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8194 of another, then delete the previous, and validate all
8195 breakpoints.
8196 (validate_inserted_breakpoint): New.
8197 (delete_disabled_breakpoints): New.
8198 (validate_breakpoints): New.
8199 (check_mem_read): Validate breakpoints before trusting their
8200 shadow. Delete disabled breakpoints.
8201 (check_mem_write): Validate breakpoints before trusting they
8202 should be inserted. Delete disabled breakpoints.
8203 * mem-break.h (validate_breakpoints):
8204 * server.c (handle_query): Validate breakpoints when we see a
8205 qSymbol query.
8206
8207 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8208
8209 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8210 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8211 if we could tell there's a GDB breakpoint at stop_pc.
8212 (need_step_over_p): Don't do a step over if we find a GDB
8213 breakpoint at the resume PC.
8214
8215 * mem-break.c (struct raw_breakpoint): New.
8216 (enum bkpt_type): New type `gdb_breakpoint'.
8217 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8218 fields. New field `raw'.
8219 (find_raw_breakpoint_at): New.
8220 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8221 breakpoint instead.
8222 (set_breakpoint_at): Adjust.
8223 (delete_raw_breakpoint): New.
8224 (release_breakpoint): New.
8225 (delete_breakpoint): Rename to...
8226 (delete_breakpoint_1): ... this. Add proc parameter. Use
8227 release_breakpoint. Return ENOENT.
8228 (delete_breakpoint): Reimplement.
8229 (find_breakpoint_at): Delete.
8230 (find_gdb_breakpoint_at): New.
8231 (delete_breakpoint_at): Delete.
8232 (set_gdb_breakpoint_at): New.
8233 (delete_gdb_breakpoint_at): New.
8234 (gdb_breakpoint_here): New.
8235 (set_reinsert_breakpoint): Use release_breakpoint.
8236 (uninsert_breakpoint): Rename to ...
8237 (uninsert_raw_breakpoint): ... this.
8238 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8239 (reinsert_raw_breakpoint): Change parameter type to
8240 raw_breakpoint.
8241 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8242 instead.
8243 (check_breakpoints): Adjust. Use release_breakpoint.
8244 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8245 (breakpoint_inserted_here): Ditto.
8246 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8247 Don't trust the breakpoint's shadow if it is not inserted.
8248 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8249 (delete_all_breakpoints): Adjust.
8250 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8251 use delete_breakpoint_1.
8252
8253 * mem-break.h (breakpoints_supported): Delete declaration.
8254 (set_gdb_breakpoint_at): Declare.
8255 (gdb_breakpoint_here): Declare.
8256 (delete_breakpoint_at): Delete.
8257 (delete_gdb_breakpoint_at): Declare.
8258
8259 * server.h (struct raw_breakpoint): Forward declare.
8260 (struct process_info): New field `raw_breakpoints'.
8261
8262 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8263 breakpoints.
8264
8265 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8266
8267 * linux-low.c (status_pending_p_callback): Fix comment.
8268 (linux_wait_for_event_1): Move most of the internal breakpoint
8269 handling from here...
8270 (linux_wait_1): ... to here.
8271 (count_events_callback): New.
8272 (select_singlestep_lwp_callback): New.
8273 (select_event_lwp_callback): New.
8274 (cancel_breakpoints_callback): New.
8275 (select_event_lwp): New.
8276 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8277 priority to all LWPs that have had events that should be reported
8278 to the client. Cancel breakpoints when about to reporting the
8279 event to the client, not while stopping lwps. No longer cancel
8280 finished single-steps here.
8281 (cancel_finished_single_step): Delete.
8282 (cancel_finished_single_steps): Delete.
8283
8284 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8285
8286 * mem-break.c (enum bkpt_type): New.
8287 (struct breakpoint): New field `type'.
8288 (set_breakpoint_at): Change return type to struct breakpoint
8289 pointer. Set type to `other_breakpoint' by default.
8290 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8291 in the breakpoint list.
8292 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8293 (reinsert_breakpoint): Rename to ...
8294 (reinsert_raw_breakpoint): ... this.
8295 (reinsert_breakpoints_at): Adjust.
8296 * mem-break.h (struct breakpoint): Declare.
8297 (set_breakpoint_at): Change return type to struct breakpoint
8298 pointer.
8299
8300 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8301
8302 * server.c (handle_query): Assign, not compare.
8303
8304 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8305
8306 Teach linux gdbserver to step-over-breakpoints.
8307
8308 * linux-low.c (can_hardware_single_step): New.
8309 (supports_breakpoints): New.
8310 (handle_extended_wait): If stopping threads, read the stop pc of
8311 the new cloned LWP.
8312 (get_pc): New.
8313 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8314 low target doesn't support retrieving the PC.
8315 (add_lwp): Set last_resume_kind to resume_continue.
8316 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8317 (linux_attach): Don't clear stop_expected. Set the lwp's
8318 last_resume_kind to resume_stop.
8319 (linux_detach_one_lwp): Don't check for removed breakpoints.
8320 (check_removed_breakpoint): Delete.
8321 (status_pending_p): Rename to ...
8322 (status_pending_p_callback): ... this. Don't check for removed
8323 breakpoints. Don't consider threads that are stopped from GDB's
8324 perspective.
8325 (linux_wait_for_lwp): Always read the stop_pc here.
8326 (cancel_breakpoint): New.
8327 (step_over_bkpt): New global.
8328 (linux_wait_for_event_1): Implement stepping over breakpoints.
8329 (gdb_wants_lwp_stopped): New.
8330 (gdb_wants_all_stopped): New.
8331 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8332 single-step traps here. Store the thread's last reported target
8333 wait status.
8334 (send_sigstop): Don't clear stop_expected. Always set it,
8335 instead.
8336 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8337 (cancel_finished_single_step): New.
8338 (cancel_finished_single_steps): New.
8339 (wait_for_sigstop): Don't cancel finished single-step traps here.
8340 (linux_resume_one_lwp): Don't check for removed breakpoints.
8341 Don't set `step' on non-hardware step archs.
8342 (linux_set_resume_request): Ignore resume_stop requests if already
8343 stopping or stopped. Set the lwp's last_resume_kind.
8344 (resume_status_pending_p): Don't check for removed breakpoints.
8345 (need_step_over_p): New.
8346 (start_step_over): New.
8347 (finish_step_over): New.
8348 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8349 requests. Clear the thread's last reported target waitstatus.
8350 Don't use the `suspended' flag. Don't consider pending breakpoints.
8351 (linux_resume): Start a step-over if necessary.
8352 (proceed_one_lwp): New.
8353 (proceed_all_lwps): New.
8354 (unstop_all_lwps): New.
8355 * linux-low.h (struct lwp_info): Rewrite comment for the
8356 `suspended' flag. Add the `stop_pc' field. Delete the
8357 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8358 Add `'last_resume_kind' and `need_step_over' fields.
8359 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8360 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8361 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8362 (set_raw_breakpoint_at): New.
8363 (set_breakpoint_at): Rewrite to use it.
8364 (reinsert_breakpoint_handler): Delete.
8365 (set_reinsert_breakpoint): New.
8366 (reinsert_breakpoint_by_bp): Delete.
8367 (delete_reinsert_breakpoints): New.
8368 (uninsert_breakpoint): Rewrite.
8369 (uninsert_breakpoints_at): New.
8370 (reinsert_breakpoint): Rewrite.
8371 (reinsert_breakpoints_at): New.
8372 (check_breakpoints): Rewrite.
8373 (breakpoint_here): New.
8374 (breakpoint_inserted_here): New.
8375 (check_mem_read): Adjust.
8376 * mem-break.h (breakpoints_supported, breakpoint_here)
8377 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8378 (reinsert_breakpoint_by_bp): Delete declaration.
8379 (delete_reinsert_breakpoints): Declare.
8380 (reinsert_breakpoint): Delete declaration.
8381 (reinsert_breakpoints_at): Declare.
8382 (uninsert_breakpoint): Delete declaration.
8383 (uninsert_breakpoints_at): Declare.
8384 (check_breakpoints): Adjust prototype.
8385 * server.h: Adjust include order.
8386 (struct thread_info): Declare here. Add a `last_status' field.
8387
8388 2010-03-23 Michael Snyder <msnyder@vmware.com>
8389
8390 * server.c (crc32): New function.
8391 (handle_query): Add handling for 'qCRC:' request.
8392
8393 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8394
8395 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8396 lwp had been stopped by a watchpoint.
8397
8398 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8399
8400 * server.h (internal_error): Declare.
8401 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8402 * utils.c (internal_error): New function.
8403
8404 2010-03-15 Andreas Schwab <schwab@redhat.com>
8405
8406 * configure.srv: Fix typo setting srv_regobj.
8407
8408 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8409
8410 * linux-low.c (fetch_register): Avoid passing a non string literal
8411 format to `error'.
8412 (usr_store_inferior_registers): Ditto.
8413
8414 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8415
8416 * linux-low.c (linux_write_memory): Bail out early if peeking
8417 memory failed.
8418
8419 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8420
8421 * linux-low.h (struct lwp_info): New fields
8422 `stopped_by_watchpoint' and `stopped_data_address'.
8423 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8424 here, and cache them in the lwp object.
8425 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8426 directly.
8427 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8428 field.
8429 (linux_stopped_by_watchpoint): Rewrite.
8430 (linux_stopped_data_address): Rewrite.
8431
8432 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8433
8434 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8435 switching the current inferior, not before.
8436
8437 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8438
8439 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8440 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8441 i386-linux.c and amd64-linux.c.
8442 (reg-i386.o): Removed.
8443 (reg-i386.c): Likewise.
8444 (reg-i386-linux.o): Likewise.
8445 (reg-i386-linux.c): Likewise.
8446 (reg-x86-64.o): Likewise.
8447 (reg-x86-64.c): Likewise.
8448 (reg-x86-64-linux.o): Likewise.
8449 (reg-x86-64-linux.c): Likewise.
8450 (i386.o): New.
8451 (i386.c): Likewise.
8452 (i386-linux.o): Likewise.
8453 (i386-linux.c): Likewise.
8454 (amd64.o): Likewise.
8455 (amd64.c): Likewise.
8456 (amd64-linux.o): Likewise.
8457 (amd64-linux.c): Likewise.
8458
8459 * configure.srv (srv_i386_regobj): New.
8460 (srv_i386_linux_regobj): Likewise.
8461 (srv_amd64_regobj): Likewise.
8462 (srv_amd64_linux_regobj): Likewise.
8463 (srv_i386_32bit_xmlfiles): Likewise.
8464 (srv_i386_64bit_xmlfiles): Likewise.
8465 (srv_i386_xmlfiles): Likewise.
8466 (srv_amd64_xmlfiles): Likewise.
8467 (srv_i386_linux_xmlfiles): Likewise.
8468 (srv_amd64_linux_xmlfiles): Likewise.
8469 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8470 srv_xmlfiles to $srv_i386_xmlfiles.
8471 (i[34567]86-*-mingw32ce*): Likewise.
8472 (i[34567]86-*-mingw*): Likewise.
8473 (i[34567]86-*-nto*): Likewise.
8474 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8475 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8476 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8477 (x86_64-*-linux*): Likewise.
8478
8479 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8480 (init_registers_amd64_linux): New.
8481 (x86_arch_setup): Replace init_registers_x86_64_linux with
8482 init_registers_amd64_linux.
8483
8484 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8485
8486 * configure.ac: Check for libdl. If it is not available link against
8487 static libthread_db.
8488 * configure: Regenerate.
8489
8490 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8491
8492 PR9605
8493
8494 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8495 handing a read watchpoint.
8496 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8497
8498 2010-02-12 Doug Evans <dje@google.com>
8499
8500 * linux-low.c (linux_supports_tracefork_flag): Document.
8501 (linux_look_up_symbols): Add comment.
8502
8503 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8504
8505 * regcache.c (supply_register): Clear regcache if buf is NULL.
8506
8507 2010-02-02 Nicolas Roche <roche@sourceware.org>
8508 Joel Brobecker <brobecker@adacore.com>
8509
8510 * inferiors.c (find_inferior): Add function documentation.
8511 (unloaded_dll): Handle the case where the unloaded dll has not
8512 been previously registered in the dll list.
8513
8514 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8515
8516 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8517 (thumb2_breakpoint): New.
8518 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8519
8520 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8521
8522 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8523 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8524 breakpoints.
8525
8526 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8527
8528 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8529
8530 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8531
8532 * linux-s390-low.c (s390_collect_ptrace_register)
8533 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8534
8535 2010-01-21 Doug Evans <dje@google.com>
8536
8537 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8538 (PTRACE_ARG4_TYPE): New macro.
8539 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8540 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8541 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8542 (usr_store_inferior_registers): Ditto.
8543 (linux_read_memory, linux_write_memory): Ditto.
8544 (linux_test_for_tracefork): Ditto.
8545
8546 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8547 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8548
8549 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8550
8551 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8552 target.
8553
8554 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8555
8556 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8557 prototype to take a regcache. Adjust.
8558
8559 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8560
8561 * regcache.h (struct thread_info): Forward declare.
8562 (struct regcache): New.
8563 (new_register_cache): Adjust prototype.
8564 (get_thread_regcache): Declare.
8565 (free_register_cache): Adjust prototype.
8566 (registers_to_string, registers_from_string): Ditto.
8567 (supply_register, supply_register_by_name, collect_register)
8568 (collect_register_as_string, collect_register_by_name): Ditto.
8569 * regcache.c (struct inferior_regcache_data): Delete.
8570 (get_regcache): Rename to ...
8571 (get_thread_regcache): ... this. Adjust. Switch inferior before
8572 fetching registers.
8573 (regcache_invalidate_one): Adjust.
8574 (regcache_invalidate): Fix prototype.
8575 (new_register_cache): Return the new register cache.
8576 (free_register_cache): Change prototype.
8577 (realloc_register_cache): Adjust.
8578 (registers_to_string): Change prototype to take a regcache. Adjust.
8579 (registers_from_string): Ditto.
8580 (register_data): Ditto.
8581 (supply_register): Ditto.
8582 (supply_register_by_name): Ditto.
8583 (collect_register): Ditto.
8584 (collect_register_as_string): Ditto.
8585 (collect_register_by_name): Ditto.
8586 * server.c (process_serial_event): Adjust.
8587 * linux-low.h (regset_fill_func, regset_store_func): Change
8588 prototype.
8589 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8590 Change prototype.
8591 * linux-low.c (get_stop_pc): Adjust.
8592 (check_removed_breakpoint): Adjust.
8593 (linux_wait_for_event): Adjust.
8594 (linux_resume_one_lwp): Adjust.
8595 (fetch_register): Add regcache parameter. Adjust.
8596 (usr_store_inferior_registers): Ditto.
8597 (regsets_fetch_inferior_registers): Ditto.
8598 (regsets_store_inferior_registers): Ditto.
8599 (linux_fetch_registers, linux_store_registers): Ditto.
8600 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8601 regcache. Adjust.
8602 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8603 Ditto.
8604 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8605 prototype to take a regcache.
8606 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8607 * remote-utils.c (convert_ascii_to_int, outreg)
8608 (prepare_resume_reply): Change prototype to take a regcache.
8609 Adjust.
8610 * target.h (struct target_ops) <fetch_registers, store_registers>:
8611 Change prototype to take a regcache.
8612 (fetch_inferior_registers, store_inferior_registers): Change
8613 prototype to take a regcache. Adjust.
8614 * proc-service.c (ps_lgetregs): Adjust.
8615 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8616 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8617 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8618 take a regcache. Adjust.
8619 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8620 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8621 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8622 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8623 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8624 (cris_cannot_fetch_register):
8625 (cris_breakpoint_at): Change prototype to take a regcache.
8626 Adjust.
8627 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8628 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8629 to take a regcache. Adjust.
8630 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8631 Adjust.
8632 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8633 take a regcache. Adjust.
8634 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8635 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8636 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8637 * linux-mips-low.c (mips_get_pc):
8638 (mips_set_pc): Change prototype to take a regcache. Adjust.
8639 (mips_reinsert_addr): Adjust.
8640 (mips_collect_register): Change prototype to take a regcache.
8641 Adjust.
8642 (mips_supply_register):
8643 (mips_collect_register_32bit, mips_supply_register_32bit)
8644 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8645 (mips_store_fpregset): Ditto.
8646 * linux-ppc-low.c (ppc_supply_ptrace_register)
8647 (ppc_supply_ptrace_register): Ditto.
8648 (parse_spufs_run): Adjust.
8649 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8650 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8651 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8652 take a regcache. Adjust.
8653 * linux-s390-low.c (s390_collect_ptrace_register)
8654 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8655 (s390_set_pc): Change prototype to take a regcache. Adjust.
8656 (s390_arch_setup): Adjust.
8657 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8658 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8659 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8660 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8661 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8662 regcache. Adjust.
8663 (sparc_breakpoint_at): Adjust.
8664 * linux-xtensa-low.c (xtensa_fill_gregset):
8665 (xtensa_store_gregset):
8666 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8667 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8668 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8669 prototype to take a regcache. Adjust.
8670 * win32-arm-low.c (arm_fetch_inferior_register)
8671 (arm_store_inferior_register): Change prototype to take a
8672 regcache. Adjust.
8673 * win32-i386-low.c (i386_fetch_inferior_register)
8674 (i386_store_inferior_register): Change prototype to take a
8675 regcache. Adjust.
8676 * win32-low.c (child_fetch_inferior_registers)
8677 (child_store_inferior_registers): Change prototype to take a
8678 regcache. Adjust.
8679 (win32_wait): Adjust.
8680 (win32_fetch_inferior_registers): Change prototype to take a
8681 regcache. Adjust.
8682 (win32_store_inferior_registers): Adjust.
8683 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8684 store_inferior_register>: Change prototype to take a regcache.
8685
8686 2010-01-20 Doug Evans <dje@google.com>
8687
8688 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8689 #ifdef.
8690 (linux_wait_for_event1, linux_init_signals): Ditto.
8691 (W_STOPCODE): Provide definition if missing.
8692
8693 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8694
8695 * linux-low.c (linux_core_of_thread): New.
8696 (compare_ints, show_process, list_threads): New.
8697 (linux_qxfer_osdata): Report threads and cores.
8698 (linux_target_op): Register linux_core_of_thread.
8699 * remote-utils.c (prepare_resume_reply): Report the core.
8700 (buffer_xml_printf): Support %d specifier.
8701 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8702 New.
8703 (handle_query): Handle qXfer:threads. Announce availability
8704 thereof.
8705 * target.h (struct target_ops): New field core_of_thread.
8706
8707 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8708
8709 * Makefile.in (clean): Remove new generated files.
8710 (reg-s390.o, reg-s390.c): Remove rules.
8711 (reg-s390x.o, reg-s390x.c): Likewise.
8712 (s390-linux32.o, s390-linux32.c): Add rules.
8713 (s390-linux64.o, s390-linux64.c): Likewise.
8714 (s390x-linux64.o, s390x-linux64.c): Likewise.
8715 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8716 * linux-s390-low.c: Include <elf.h>.
8717 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8718 (init_registers_s390): Remove prototype.
8719 (init_registers_s390x): Likewise.
8720 (init_registers_s390_linux32): Add prototype.
8721 (init_registers_s390_linux64): Likewise.
8722 (init_registers_s390x_linux64): Likewise.
8723 (s390_num_regs_3264): New define.
8724 (s390_regmap_3264): New global variable.
8725 (s390_cannot_fetch_register): Remove obsolete check.
8726 (s390_cannot_store_register): Likewise.
8727 (s390_collect_ptrace_register): Handle upper/lower register halves.
8728 (s390_supply_ptrace_register): Likewise.
8729 (s390_fill_gregset): Update to register number changes.
8730 (s390_get_hwcap): New routine.
8731 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8732 Install appropriate regmap and register set.
8733
8734 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8735
8736 * server.c (gdbserver_version): Update copyright year to 2010.
8737 * gdbreplay.c (gdbreplay_version): Likewise.
8738
8739 2009-12-28 Doug Evans <dje@google.com>
8740
8741 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8742 elf/external.h. Include <elf.h> instead but only if necessary.
8743
8744 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8745
8746 * linux-low.c (linux_remove_process): Remove `detaching'
8747 parameter. Don't release/detach from thread_db here.
8748 (linux_kill): Release/detach from thread_db here, ...
8749 (linux_detach): ... and here, before actually detaching.
8750 (linux_wait_1): ... and here, when a process exits.
8751 * thread-db.c (any_thread_of): New.
8752 (thread_db_free): Switch the current inferior to a thread of the
8753 passed in process.
8754
8755 2009-12-21 Doug Evans <dje@google.com>
8756
8757 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8758
8759 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8760 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8761 warning ifndef __NR_tkill. Move setting of errno there too.
8762 Delete unnecessary resetting of errno after syscall.
8763 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8764
8765 * configure.ac: Check for dladdr.
8766 * config.in: Regenerate.
8767 * configure: Regenerate.
8768 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8769 (try_thread_db_load): Update.
8770
8771 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8772
8773 2009-12-18 Doug Evans <dje@google.com>
8774
8775 * event-loop.c: Include unistd.h if it exists.
8776
8777 * linux-low.c (my_waitpid): Move definition away from being in
8778 between linux_tracefork_child/linux_test_for_tracefork.
8779
8780 * gdb_proc_service.h (psaddr_t): Fix type.
8781 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8782 signature to match glibc.
8783
8784 2009-12-16 Doug Evans <dje@google.com>
8785
8786 * linux-low.c (linux_read_memory): Fix argument to read.
8787
8788 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8789
8790 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8791 events, don't leave current_inferior pointing at null.
8792
8793 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8794
8795 * win32-low.c (LOG): Delete.
8796 (OUTMSG): Output to stderr.
8797 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8798 on compile time LOG macro.
8799 (win32_wait): Fix debug output.
8800
8801 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8802
8803 * win32-low.c (win32_add_one_solib): If the dll name is
8804 "ntdll.dll", prepend the system directory to the dll path.
8805
8806 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8807
8808 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8809
8810 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8811 Vladimir Prus <vladimir@codesourcery.com>
8812
8813 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8814 * configure.ac: Check for __mcoldfire__ and set
8815 gdb_cv_m68k_is_coldfire.
8816 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8817 reg-cf.o and reg-m68k.o.
8818 * configure: Regenerated.
8819
8820 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8821
8822 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8823 Pass it to thread_db_free.
8824 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8825 proper `detaching' argument to linux_remove_process.
8826 * linux-low.h (thread_db_free): Add `detaching' parameter.
8827 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8828 to thread_db_free.
8829 (thread_db_free): Add `detaching' parameter. Only
8830 call td_ta_clear_event if detaching from process.
8831
8832 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8833
8834 * thread-db.c (thread_db_free): Fix typo.
8835
8836 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8837
8838 PR gdb/10838
8839 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8840
8841 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8842
8843 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8844 with an i686 compiler.
8845 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8846 needed.
8847 * configure: Rebuilt.
8848
8849 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8850
8851 PR gdb/10783
8852
8853 * server.c (handle_search_memory_1): Correct read_addr initialization
8854 in loop for searching subsequent chunks.
8855
8856 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8857
8858 * configure.ac: New --with-libthread-db option.
8859 * thread-db.c: Allow direct dependence on libthread_db.
8860 (thread_db_free): Adjust.
8861 * config.in: Regenerate.
8862 * configure: Likewise.
8863
8864 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8865
8866 PR gdb/10757
8867 * thread-db.c (attach_thread): New function.
8868 (maybe_attach_thread): Return success/failure.
8869 (find_new_threads_callback): Adjust.
8870 (thread_db_find_new_threads): Loop until no new threads.
8871
8872 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8873
8874 * proc-service.c (ps_lgetregs): Formatting.
8875
8876 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8877
8878 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8879 * configure.ac: Adjust.
8880 * linux-low.h (struct process_info_private): Move members to struct
8881 thread_db.
8882 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8883 * linux-low.c (linux_remove_process): Adjust.
8884 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8885 * server.c (handle_query): Move code ...
8886 (handle_monitor_command): ... here. New function.
8887 * target.h (struct target_ops): New member.
8888 * thread-db.c (struct thread_db): New.
8889 (libthread_db_search_path): New variable.
8890 (thread_db_create_event, thread_db_enable_reporting)
8891 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8892 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8893 (try_thread_db_load_1, dladdr_to_soname): New functions.
8894 (try_thread_db_load, thread_db_load_search): New functions.
8895 (thread_db_init): Search for libthread_db.
8896 (thread_db_free): New function.
8897 (thread_db_handle_monitor_command): Likewise.
8898 * config.in: Regenerate.
8899 * configure: Regenerate.
8900
8901 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8902
8903 * spu-low.c (spu_kill): Wait for inferior to terminate.
8904 Call clear_inferiors.
8905 (spu_detach): Call clear_inferiors.
8906
8907 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8908
8909 * aclocal.m4: Regenerate.
8910 * config.in: Likewise.
8911 * configure: Likewise.
8912
8913 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8914
8915 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8916 (parse_spufs_run): New function.
8917 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8918 (ppc_breakpoint_at): Handle SPU breakpoints.
8919
8920 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8921
8922 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8923 (SPUFS_MAGIC): Define.
8924 (spu_enumerate_spu_ids): New function.
8925 (linux_qxfer_spu): New function.
8926 (linux_target_ops): Install linux_qxfer_spu.
8927
8928 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8929
8930 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8931 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8932 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8933 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8934 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8935 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8936 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8937 (init_registers_powerpc_cell32l): Add prototype.
8938 (init_registers_powerpc_cell64l): Likewise.
8939 (ppc_arch_setup): Detect Cell/B.E. architecture.
8940
8941 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8942
8943 * Makefile.in (datarootdir): New variable.
8944
8945 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8946
8947 * linux-low.c (linux_write_memory): Update debugging output.
8948 * Makefile.in (clean): Add new descriptions.
8949 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8950 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8951 * configure.srv: Add new files for arm*-*-linux*.
8952 * linux-arm-low.c: Add new declarations.
8953 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8954 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8955 (HWCAP_VFPv3D16): New.
8956 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8957 instead of __IWMMXT__.
8958 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8959 (arm_arch_setup): New.
8960 (target_regsets): Remove #ifdef. Add VFP regset.
8961 (the_low_target): Use arm_arch_setup.
8962
8963 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8964
8965 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8966 the main thread again.
8967
8968 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8969
8970 Adding Neutrino gdbserver.
8971 * configure: Regenerated.
8972 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8973 * configure.srv (i[34567]86-*-nto*): New target.
8974 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8975 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8976 (nto_comctrl) [__QNX__]: New function.
8977 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8978
8979 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8980
8981 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8982 srv_tgtobj.
8983
8984 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8985 Pedro Alves <pedro@codesourcery.com>
8986
8987 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8988 don't support CONTEXT_EXTENDED_REGISTERS.
8989 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8990 (the_low_target): Install them.
8991 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8992 failing with ERROR_PIPE_NOT_CONNECTED.
8993
8994 2009-06-30 Doug Evans <dje@google.com>
8995 Pierre Muller <muller@ics.u-strasbg.fr>
8996
8997 Add h/w watchpoint support to x86-linux, win32-i386.
8998 * Makefile.in (SFILES): Add i386-low.c
8999 (i386_low_h): Define.
9000 (i386-low.o): Add dependencies.
9001 (linux-x86-low.o): Add i386-low.h dependency.
9002 (win32-i386-low.o): Ditto.
9003 * i386-low.c: New file.
9004 * i386-low.h: New file.
9005 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9006 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9007 * linux-low.c (linux_add_process): Initialize arch_private.
9008 (linux_remove_process): Free arch_private.
9009 (add_lwp): Initialize arch_private.
9010 (delete_lwp): Free arch_private.
9011 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9012 provided.
9013 * linux-low.h (process_info_private): New member arch_private.
9014 (lwp_info): New member arch_private.
9015 (linux_target_ops): New members new_process, new_thread,
9016 prepare_to_resume.
9017 (ptid_of): New macro.
9018 * linux-x86-low.c: Include stddef.h, i386-low.h.
9019 (arch_process_info): New struct.
9020 (arch_lwp_info): New struct.
9021 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9022 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9023 (i386_dr_low_get_status): New function.
9024 (x86_insert_point, x86_remove_point): New functions.
9025 (x86_stopped_by_watchpoint): New function.
9026 (x86_stopped_data_address): New function.
9027 (x86_linux_new_process, x86_linux_new_thread): New functions.
9028 (x86_linux_prepare_to_resume): New function.
9029 (the_low_target): Add entries for insert_point, remove_point,
9030 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9031 prepare_to_resume.
9032 * server.c (debug_hw_points): New global.
9033 (monitor_show_help): Document set debug-hw-points.
9034 (handle_query): Process "set debug-hw-points".
9035 * server.h (debug_hw_points): Declare.
9036 (paddress): Declare.
9037 * utils.c (NUMCELLS, CELLSIZE): New macros.
9038 (get_sell, xsnprintf, paddress): New functions.
9039 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9040 remove_point, stopped_by_watchpoint, stopped_data_address.
9041 * win32-i386-low.c: Include i386-low.h.
9042 (debug_reg_state): Replaces dr.
9043 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9044 (i386_dr_low_get_status): New function.
9045 (i386_insert_point, i386_remove_point): New functions.
9046 (i386_stopped_by_watchpoint): New function.
9047 (i386_stopped_data_address): New function.
9048 (i386_initial_stuff): Update.
9049 (get_thread_context,set_thread_context,i386_thread_added): Update.
9050 (the_low_target): Add entries for insert_point,
9051 remove_point, stopped_by_watchpoint, stopped_data_address.
9052 * win32-low.c (win32_insert_watchpoint): New function.
9053 (win32_remove_watchpoint): New function.
9054 (win32_stopped_by_watchpoint): New function.
9055 (win32_stopped_data_address): New function.
9056 (win32_target_ops): Add entries for insert_watchpoint,
9057 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9058 * win32-low.h (win32_target_ops): New members insert_point,
9059 remove_point, stopped_by_watchpoint, stopped_data_address.
9060
9061 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9062
9063 * server.c (process_serial_event): Re-return unsupported, not
9064 error, if the type isn't recognized. Re-allow supporting only
9065 insert or remove packets. Also call require_running for
9066 breakpoints. Add missing break statement to default case. Tidy.
9067 * target.h (struct target_ops): Rename insert_watchpoint to
9068 insert_point, and remove_watchpoint to remove_point.
9069
9070 * linux-low.h (struct linux_target_ops): Likewise.
9071 * linux-low.c (linux_insert_watchpoint): Rename to ...
9072 (linux_insert_point): ... this. Adjust.
9073 (linux_remove_watchpoint): Rename to ...
9074 (linux_remove_point): ... this. Adjust.
9075 (linux_target_ops): Adjust.
9076 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9077 (cris_insert_point): ... this.
9078 (cris_remove_watchpoint): Rename to ...
9079 (cris_remove_point): ... this.
9080 (the_low_target): Adjust.
9081
9082 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9083
9084 * server.c (handle_v_kill): Pass signal_pid to
9085 kill_inferior if multi_process is zero.
9086
9087 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9088
9089 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9090 * target.h (target_ops): Comment for *_watchpoint to make it clear
9091 the functions can get types '0' and '1'.
9092
9093 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9094
9095 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9096 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9097 * regcache.c (get_regcache): Likewise.
9098 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9099 * win32-low.c (child_fetch_inferior_registers): Remove check for
9100 regno 0.
9101
9102 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9103 Pedro Alves <pedro@codesourcery.com>
9104
9105 * target.h (struct target_ops) <supports_multi_process>: New
9106 callback.
9107 (target_supports_multi_process): New.
9108 * server.c (handle_query): Even if GDB reports support, only
9109 enable multi-process if the target also supports it. Report
9110 multi-process support only if the target backend supports it.
9111 * linux-low.c (linux_supports_multi_process): New function.
9112 (linux_target_ops): Install it as target_supports_multi_process
9113 callback.
9114
9115 2009-05-24 Doug Evans <dje@google.com>
9116
9117 Global renaming of find_thread_pid to find_thread_ptid.
9118 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9119 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9120 All callers updated.
9121
9122 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9123 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9124 directly.
9125
9126 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9127 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9128 (linux_resume_one_lwp): Ditto.
9129
9130 2009-05-23 Doug Evans <dje@google.com>
9131
9132 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9133 from struct inferior_list_entry * to struct lwp_info *.
9134 All callers updated.
9135
9136 2009-05-13 Doug Evans <dje@google.com>
9137
9138 * linux-x86-low.c: Don't include assert.h.
9139 (x86_siginfo_fixup): Use fatal, not assert.
9140 (x86_arch_setup): Fix comment.
9141
9142 2009-05-12 Doug Evans <dje@google.com>
9143
9144 Biarch support for i386/amd64 gdbserver.
9145 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9146 Add linux-x86-low.c.
9147 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9148 (linux-x86-low.o): Add.
9149 * linux-x86-64-low.c: Delete.
9150 * linux-i386-low.c: Delete.
9151 * linux-x86-low.c: New file.
9152 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9153 linux-x86-low.o.
9154 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9155 linux-x86-low.o.
9156 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9157 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9158 (linux_child_pid_to_exec_file): New function.
9159 (elf_64_header_p, elf_64_file_p): New functions.
9160 (siginfo_fixup): New function.
9161 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9162 give target a chance to convert layout.
9163 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9164 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9165
9166 2009-05-07 Doug Evans <dje@google.com>
9167
9168 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9169 (regsets_store_inferior_registers): Ditto.
9170
9171 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9172
9173 PR server/10048
9174
9175 * linux-low.c (must_set_ptrace_flags): Delete.
9176 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9177 of the global.
9178 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9179 `lwp->must_set_ptrace_flags' instead.
9180 (linux_wait_for_event_1): Set ptrace options here.
9181 (linux_wait_1): ... not here.
9182
9183 2009-04-30 Doug Evans <dje@google.com>
9184
9185 * inferiors.c (started_inferior_callback): New function.
9186 (attached_inferior_callback): New function.
9187 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9188 * server.c (print_started_pid, print_attached_pid): New functions.
9189 (detach_or_kill_for_exit): New function.
9190 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9191 * server.h (have_started_inferiors_p): Declare.
9192 (have_attached_inferiors_p): Declare.
9193
9194 * inferiors.c (remove_process): Fix memory leak, free process.
9195 * linux-low.c (linux_remove_process): New function.
9196 (linux_kill): Call it instead of remove_process.
9197 (linux_detach, linux_wait_1): Ditto.
9198
9199 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9200
9201 * configure.srv: Add x86 Windows CE target.
9202
9203 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9204
9205 * inferiors.c (get_thread_process): Make global.
9206 * server.h (get_thread_process): Add prototype.
9207 * thread-db.c (find_one_thread): Use get_thread_process
9208 instead of current_process.
9209 (thread_db_get_tls_address): Do not crash if called when
9210 thread layer is not yet initialized.
9211
9212 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9213
9214 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9215 * spu-low.c (current_tid): Rename to ...
9216 (current_ptid): ... this.
9217 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9218 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9219 ptid_get_lwp (current_ptid) instead of current_tid.
9220 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9221 instead of current_tid. Use find_process_pid to verify pid
9222 argument is valid. Pass proper argument to remove_process.
9223 (spu_thread_alive): Compare current_ptid instead of current_tid.
9224 (spu_resume): Likewise.
9225
9226 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9227
9228 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9229 variable.
9230
9231 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9232
9233 Implement the multiprocess extensions, and add linux multiprocess
9234 support.
9235
9236 * server.h (ULONGEST): Declare.
9237 (struct ptid, ptid_t): New.
9238 (minus_one_ptid, null_ptid): Declare.
9239 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9240 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9241 (struct inferior_list_entry): Change `id' type from unsigned from
9242 to ptid_t.
9243 (struct sym_cache, struct breakpoint, struct
9244 process_info_private): Forward declare.
9245 (struct process_info): Declare.
9246 (current_process): Declare.
9247 (all_processes): Declare.
9248 (initialize_inferiors): Declare.
9249 (add_thread): Adjust to use ptid_t.
9250 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9251 (add_process, remove_process, find_thread_pid): Declare.
9252 (find_inferior_id): Adjust to use ptid_t.
9253 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9254 (multi_process): Declare.
9255 (push_event): Adjust to use ptid_t.
9256 (read_ptid, write_ptid): Declare.
9257 (prepare_resume_reply): Adjust to use ptid_t.
9258 (clear_symbol_cache): Declare.
9259 * inferiors.c (all_processes): New.
9260 (null_ptid, minus_one_ptid): New.
9261 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9262 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9263 (add_thread): Change unsigned long to ptid. Remove gdb_id
9264 parameter. Adjust.
9265 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9266 (gdb_id_to_thread): Rename to ...
9267 (find_thread_pid): ... this. Change unsigned long to ptid.
9268 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9269 (loaded_dll, pull_pid_from_list): Adjust.
9270 (add_process, remove_process, find_process_pid)
9271 (get_thread_process, current_process, initialize_inferiors): New.
9272 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9273 (struct target_waitstatus) <related_pid>: Ditto.
9274 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9275 return type to int.
9276 (struct target_ops) <join>: Add `pid' argument.
9277 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9278 (struct target_ops) <wait>: Add `ptid' field. Change return type
9279 to ptid.
9280 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9281 (mywait): Add `ptid' argument. Change return type to ptid_t.
9282 (target_pid_to_str): Declare.
9283 * target.c (set_desired_inferior): Adjust to use ptids.
9284 (mywait): Add new `ptid' argument. Adjust.
9285 (target_pid_to_str): New.
9286 * mem-break.h (free_all_breakpoints): Declare.
9287 * mem-break.c (breakpoints): Delelete.
9288 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9289 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9290 to use per-process breakpoint list.
9291 (free_all_breakpoints): New.
9292 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9293 (symbol_cache, all_symbols_looked_up): Delete.
9294 (hexchars): New.
9295 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9296 read_ptid): New.
9297 (prepare_resume_reply): Change ptid argument's type from unsigned
9298 long to ptid_t. Adjust. Implement W;process and X;process.
9299 (free_sym_cache, clear_symbol_cache): New.
9300 (look_up_one_symbol): Adjust to per-process symbol cache. *
9301 * server.c (cont_thread, general_thread, step_thread): Change type
9302 to ptid_t.
9303 (attached): Delete.
9304 (multi_process): New.
9305 (last_ptid): Change type to ptid_t.
9306 (struct vstop_notif) <ptid>: Change type to ptid_t.
9307 (queue_stop_reply, push_event): Change `ptid' argument's type to
9308 ptid_t.
9309 (discard_queued_stop_replies): Add `pid' argument.
9310 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9311 changes. Don't reference the `attached' global.
9312 (attach_inferior): Adjust to mywait interface changes.
9313 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9314 features. Handle and report "multiprocess+". Handle
9315 "qAttached:PID".
9316 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9317 changes.
9318 (handle_v_kill): New.
9319 (handle_v_stopped): Adjust to use target_pid_to_str.
9320 (handle_v_requests): Allow multiple attaches and runs when
9321 multiprocess extensions are in effect. Handle "vKill".
9322 (myresume): Adjust to use ptids.
9323 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9324 (handle_status): Adjust to discard_queued_stop_replies interface
9325 change.
9326 (first_thread_of, kill_inferior_callback)
9327 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9328 (main): Call initialize_inferiors. Adjust to use ptids, killing
9329 and detaching from all inferiors. Handle multiprocess packet
9330 variants.
9331 * linux-low.h: Include gdb_proc_service.h.
9332 (struct process_info_private): New.
9333 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9334 <lwpid_of>: Use ptid_get_lwp.
9335 (get_lwp_thread): Adjust.
9336 (struct lwp_info): Add `dead' member.
9337 (find_lwp_pid): Declare.
9338 * linux-low.c (thread_db_active): Delete.
9339 (new_inferior): Adjust comment.
9340 (inferior_pid): Delete.
9341 (linux_add_process): New.
9342 (handle_extended_wait): Adjust.
9343 (add_lwp): Change unsigned long to ptid.
9344 (linux_create_inferior): Add process to processes table. Adjust
9345 to use ptids. Don't set new_inferior here.
9346 (linux_attach_lwp): Rename to ...
9347 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9348 it. Adjust to use ptids.
9349 (linux_attach_lwp): New.
9350 (linux_attach): Add process to processes table. Don't set
9351 new_inferior here.
9352 (struct counter): New.
9353 (second_thread_of_pid_p, last_thread_of_process_p): New.
9354 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9355 multiple processes.
9356 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9357 processes. Remove process from process table.
9358 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9359 to multiple processes.
9360 (any_thread_of): New.
9361 (linux_detach): Add `pid' argument, and handle it. Remove process
9362 from processes table.
9363 (linux_join): Add `pid' argument. Handle it.
9364 (linux_thread_alive): Change unsighed long argument to ptid_t.
9365 Consider dead lwps as not being alive.
9366 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9367 threads we're not interested in.
9368 (same_lwp, find_lwp_pid): New.
9369 (linux_wait_for_lwp): Change `pid' argument's type from int to
9370 ptid_t. Adjust.
9371 (linux_wait_for_event): Rename to ...
9372 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9373 from int to ptid_t. Adjust.
9374 (linux_wait_for_event): New.
9375 (linux_wait_1): Add `ptid' argument. Change return type to
9376 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9377 that exit from the process table.
9378 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9379 Adjust.
9380 (mark_lwp_dead): New.
9381 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9382 stopping all threads, mark its main lwp as dead.
9383 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9384 ptids.
9385 (fetch_register, usr_store_inferior_registers)
9386 (regsets_fetch_inferior_registers)
9387 (regsets_store_inferior_registers, linux_read_memory)
9388 (linux_write_memory): Inline `inferior_pid'.
9389 (linux_look_up_symbols): Adjust to use per-process
9390 `thread_db_active'.
9391 (linux_request_interrupt): Adjust to use ptids.
9392 (linux_read_auxv): Inline `inferior_pid'.
9393 (initialize_low): Don't reference thread_db_active.
9394 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9395 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9396 (ps_getpid): Return the pid of the current inferior.
9397 * thread-db.c (proc_handle, thread_agent): Delete.
9398 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9399 per-process data.
9400 (find_one_thread): Change argument type to ptid_t. Adjust to
9401 per-process data.
9402 (maybe_attach_thread): Adjust to per-process data and ptids.
9403 (thread_db_find_new_threads): Ditto.
9404 (thread_db_init): Ditto.
9405 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9406 processes table. Adjust to use ptids.
9407 (spu_kill, spu_detach): Adjust interface. Remove process from
9408 processes table.
9409 (spu_join, spu_thread_alive): Adjust interface.
9410 (spu_wait): Adjust interface. Remove process from processes
9411 table. Adjust to use ptids.
9412 * win32-low.c (current_inferior_tid): Delete.
9413 (current_inferior_ptid): New.
9414 (debug_event_ptid): New.
9415 (thread_rec): Take a ptid. Adjust.
9416 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9417 (child_delete_thread): Ditto.
9418 (do_initial_child_stuff): Add `attached' argument. Add process to
9419 processes table.
9420 (child_fetch_inferior_registers, child_store_inferior_registers):
9421 Adjust.
9422 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9423 (win32_attach): Pass 1 to do_initial_child_stuff.
9424 (win32_kill): Adjust interface. Remove process from processes
9425 table.
9426 (win32_detach): Ditto.
9427 (win32_join): Adjust interface.
9428 (win32_thread_alive): Take a ptid.
9429 (win32_resume): Adjust to use ptids.
9430 (get_child_debug_event): Ditto.
9431 (win32_wait): Adjust interface. Remove exiting process from
9432 processes table.
9433
9434 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9435
9436 Non-stop mode support.
9437
9438 * server.h (non_stop): Declare.
9439 (gdb_client_data, handler_func): Declare.
9440 (delete_file_handler, add_file_handler, start_event_loop):
9441 Declare.
9442 (handle_serial_event, handle_target_event, push_event)
9443 (putpkt_notif): Declare.
9444 * target.h (enum resume_kind): New.
9445 (struct thread_resume): Replace `step' field by `kind' field.
9446 (TARGET_WNOHANG): Define.
9447 (struct target_ops) <wait>: Add `options' argument.
9448 <supports_non_stop, async, start_non_stop>: New fields.
9449 (target_supports_non_stop, target_async): New.
9450 (start_non_stop): Declare.
9451 (mywait): Add `options' argument.
9452 * target.c (mywait): Add `options' argument. Print child exit
9453 notifications here.
9454 (start_non_stop): New.
9455 * server.c (non_stop, own_buf, mem_buf): New globals.
9456 (struct vstop_notif): New.
9457 (notif_queue): New global.
9458 (queue_stop_reply, push_event, discard_queued_stop_replies)
9459 (send_next_stop_reply): New.
9460 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9461 interface changes.
9462 (attach_inferior): In non-stop mode, don't wait for the target
9463 here.
9464 (handle_general_set): Handle QNonStop.
9465 (handle_query): When handling qC, return the current general
9466 thread, instead of the first thread of the list.
9467 (handle_query): If the backend supports non-stop mode, include
9468 QNonStop+ in the qSupported query response.
9469 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9470 and non-stop mode.
9471 (handle_v_attach, handle_v_run): Handle non-stop mode.
9472 (handle_v_stopped): New.
9473 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9474 (myresume): Adjust to use resume_kind. Handle non-stop.
9475 (queue_stop_reply_callback): New.
9476 (handle_status): Handle non-stop mode.
9477 (main): Clear non_stop flag on reconnection. Use the event-loop.
9478 Refactor serial protocol handling from here ...
9479 (process_serial_event): ... to this new function. When GDB
9480 selects any thread, select one here. In non-stop mode, wait until
9481 GDB acks all pending events before exiting.
9482 (handle_serial_event, handle_target_event): New.
9483 * remote-utils.c (remote_open): Install remote_desc in the event
9484 loop.
9485 (remote_close): Remove remote_desc from the event loop.
9486 (putpkt_binary): Rename to...
9487 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9488 (putpkt_binary): New as wrapper around putpkt_binary_1.
9489 (putpkt_notif): New.
9490 (prepare_resume_reply): In non-stop mode, don't change the
9491 general_thread.
9492 * event-loop.c: New.
9493 * Makefile.in (OBJ): Add event-loop.o.
9494 (event-loop.o): New rule.
9495
9496 * linux-low.h (pid_of): Moved here.
9497 (lwpid_of): New.
9498 (get_lwp_thread): Use lwpid_of.
9499 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9500 * linux-low.c (pid_of): Delete.
9501 (inferior_pid): Use lwpid_of.
9502 (linux_event_pipe): New.
9503 (target_is_async_p): New.
9504 (delete_lwp): New.
9505 (handle_extended_wait): Use lwpid_of.
9506 (add_lwp): Don't set lwpid field.
9507 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9508 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9509 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9510 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9511 first. Adjust to linux_wait_for_event interface changes. Use
9512 lwpid_of.
9513 (linux_detach): Don't delete the main lwp here.
9514 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9515 (status_pending_p): Don't consider explicitly suspended lwps.
9516 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9517 pointer. Add OPTIONS argument. Change return type to int. Use
9518 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9519 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9520 pointer. Add status pointer argument. Return a pid instead of a
9521 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9522 changes. In non-stop mode, don't switch to a random thread.
9523 (linux_wait): Rename to...
9524 (linux_wait_1): ... this. Add target_options argument, and handle
9525 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9526 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9527 clean exit and signal exit code. Don't stop all threads in
9528 non-stop mode. In all-stop mode, only stop all threads when
9529 reporting a stop to GDB. Handle explicit thread stop requests.
9530 (async_file_flush, async_file_mark): New.
9531 (linux_wait): New.
9532 (send_sigstop): Use lwpid_of.
9533 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9534 interface changes. In non-stop mode, don't switch to a random
9535 thread.
9536 (linux_resume_one_lwp): Use lwpid_of.
9537 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9538 (linux_resume_one_thread): ... this. Handle resume_stop. In
9539 non-stop mode, don't look for pending flag in all threads.
9540 (resume_status_pending_p): Don't consider explicitly suspended
9541 threads.
9542 (my_waitpid): Reimplement. Emulate __WALL.
9543 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9544 Use lwpid_of.
9545 (sigchld_handler, linux_supports_non_stop, linux_async)
9546 (linux_start_non_stop): New.
9547 (linux_target_ops): Register linux_supports_non_stop, linux_async
9548 and linux_start_non_stop.
9549 (initialize_low): Install SIGCHLD handler.
9550 * thread-db.c (thread_db_create_event, find_one_thread)
9551 (thread_db_get_tls_address): Use lwpid_of.
9552 * win32-low.c (win32_detach): Adjust to use resume_kind.
9553 (win32_wait): Add `options' argument.
9554 * spu-low.c (spu_resume): Adjust to use resume_kind.
9555 (spu_wait): Add `options' argument.
9556
9557 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9558
9559 Decouple target code from remote protocol.
9560
9561 * target.h (enum target_waitkind): New.
9562 (struct target_waitstatus): New.
9563 (struct target_ops) <wait>: Return an unsigned long. Take a
9564 target_waitstatus pointer instead of a char pointer.
9565 (mywait): Likewise.
9566 * target.c (mywait): Change prototype to return an unsigned long.
9567 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9568 * server.h (thread_from_wait, old_thread_from_wait): Delete
9569 declarations.
9570 (prepare_resume_reply): Change prototype to take a
9571 target_waitstatus.
9572 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9573 (last_status, last_ptid): New.
9574 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9575 pid instead of a signal.
9576 (attach_inferior): Remove "status" and "signal" parameters.
9577 Adjust.
9578 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9579 not as an address.
9580 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9581 (handle_v_requests, myresume): Remove "status" and "signal"
9582 parameters. Adjust.
9583 (handle_status): New.
9584 (main): Delete local `status'. Adjust.
9585 * remote-utils.c: Include target.h.
9586 (prepare_resume_reply): Change prototype to take a
9587 target_waitstatus. Adjust.
9588
9589 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9590 interface.
9591 * spu-low.c (spu_wait): Adjust.
9592 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9593 Delete.
9594 (win32_wait): Adjust.
9595
9596 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9597
9598 * target.h (struct thread_resume): Delete leave_stopped member.
9599 (struct target_ops): Add a `n' argument to the `resume' callback.
9600 * server.c (start_inferior): Adjust.
9601 (handle_v_cont, myresume): Adjust.
9602 * linux-low.c (check_removed_breakpoint): Adjust to resume
9603 interface change, and to removed leave_stopped field.
9604 (resume_ptr): Delete.
9605 (struct thread_resume_array): New.
9606 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9607 resume interface change.
9608 (linux_continue_one_thread, linux_queue_one_thread)
9609 (resume_status_pending_p): Check if the resume field is NULL
9610 instead of checking the leave_stopped member.
9611 (linux_resume): Adjust to the target resume interface change.
9612 * spu-low.c (spu_resume): Adjust to the target resume interface
9613 change.
9614 * win32-low.c (win32_detach, win32_resume): Ditto.
9615
9616 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9617
9618 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9619 flag.
9620 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9621 pending.
9622 (linux_continue_one_thread): Only preserve the stepping flag if
9623 there's a pending breakpoint.
9624
9625 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9626
9627 * server.c (main): After the inferior having exited, call
9628 remote_close before exiting gdbserver.
9629
9630 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9631
9632 Fix size of FPSCR in Power 7 processors.
9633 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9634 (PPC_FEATURE_HAS_DFP): New #define.
9635 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9636 size of the FPSCR.
9637
9638 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9639
9640 * server.c (handle_query) Whitespace and formatting.
9641
9642 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9643
9644 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9645 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9646 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9647 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9648 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9649 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9650 Makefile.in, configure.ac: Fix whitespace throughout.
9651 * configure: Regenerate.
9652
9653 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9654
9655 * inferiors.c (find_inferior): Make it safe for the callback
9656 function to delete the currently iterated inferior.
9657
9658 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9659
9660 * Makefile.in (linuw_low_h): Move higher.
9661 (thread-db.o): Depend on $(linux_low_h).
9662
9663 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9664
9665 Rename "process" to "lwp" throughout.
9666
9667 * linux-low.c (all_processes): Rename to...
9668 (all_lwps): ... this.
9669 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9670 (add_process): Rename to ...
9671 (add_lwp): ... this. Adjust.
9672 (linux_create_inferior): Adjust.
9673 (linux_attach_lwp): Adjust.
9674 (linux_attach): Adjust.
9675 (linux_kill_one_process): Rename to ...
9676 (linux_kill_one_lwp): ... this. Adjust.
9677 (linux_kill): Adjust.
9678 (linux_detach_one_process): Rename to ...
9679 (linux_detach_one_lwp): ... this. Adjust.
9680 (linux_detach): Adjust.
9681 (check_removed_breakpoint): Adjust.
9682 (status_pending_p): Adjust.
9683 (linux_wait_for_process): Rename to ...
9684 (linux_wait_for_lwp): ... this. Adjust.
9685 (linux_wait_for_event): Adjust.
9686 (send_sigstop): Adjust.
9687 (wait_for_sigstop): Adjust.
9688 (stop_all_processes): Rename to ...
9689 (stop_all_lwps): ... this.
9690 (linux_resume_one_process): Rename to ...
9691 (linux_resume_one_lwp): ... this. Adjust.
9692 (linux_set_resume_request, linux_continue_one_thread)
9693 (linux_queue_one_thread, resume_status_pending_p)
9694 (usr_store_inferior_registers, regsets_store_inferior_registers)
9695 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9696 Adjust.
9697 * linux-low.h (get_process): Rename to ...
9698 (get_lwp): ... this. Adjust.
9699 (get_thread_process): Rename to ...
9700 (get_thread_lwp): ... this. Adjust.
9701 (get_process_thread): Rename to ...
9702 (get_lwp_thread): ... this. Adjust.
9703 (struct process_info): Rename to ...
9704 (struct lwp_info): ... this.
9705 (all_processes): Rename to ...
9706 (all_lwps): ... this.
9707 * proc-service.c (ps_lgetregs): Adjust.
9708 * thread-db.c (thread_db_create_event, find_one_thread)
9709 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9710
9711 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9712
9713 * server.c (handle_query): Handle "qAttached".
9714
9715 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9716
9717 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9718 GPLv3, update license URL.
9719
9720 2009-03-01 Doug Evans <dje@google.com>
9721
9722 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9723 (server_h): Add gdb_signals.h.
9724 (signals.o): Update.
9725 * server.h (target_signal_from_host,target_signal_to_host_p)
9726 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9727
9728 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9729
9730 * remote-utils.c (getpkt): Also generate remote-debug
9731 information if noack_mode is set.
9732
9733 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9734
9735 * server.c (handle_query): Report qXfer:siginfo:read and
9736 qXfer:siginfo:write as supported and handle them.
9737 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9738 * linux-low.c (linux_xfer_siginfo): New.
9739 (linux_target_ops): Set it.
9740
9741 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9742
9743 * server.c (gdbserver_usage): Mention --remote-debug.
9744 (main): Accept '--remote-debug' switch.
9745
9746 2009-01-18 Doug Evans <dje@google.com>
9747
9748 * regcache.c (new_register_cache): No need to check result of xcalloc.
9749 * server.c (handle_search_memory): Back out calls to xmalloc,
9750 result is checked and error is returned to user upon failure.
9751 (handle_query): Ditto. Add more checks for result of malloc.
9752 (handle_v_cont): Check result of malloc, report error back to
9753 user upon failure.
9754 (handle_v_run): Ditto. Call freeargv.
9755 * server.h (freeargv): Declare.
9756 * utils.c (freeargv): New fn.
9757
9758 2009-01-15 Doug Evans <dje@google.com>
9759
9760 * gdbreplay.c (perror_with_name): Make arg const char *.
9761 * server.h (target_signal_to_name): Make return type const char *.
9762 * thread-db.c (thread_db_err_str): Make return type const char *.
9763 * utils.c (perror_with_name): Make arg const char *.
9764
9765 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9766
9767 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9768 when handling a EXIT_PROCESS_DEBUG_EVENT.
9769
9770 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9771
9772 * gdbreplay.c (gdbreplay_version): Update copyright year.
9773 * server.c (gdbserver_version): Likewise.
9774
9775 2009-01-05 Doug Evans <dje@google.com>
9776
9777 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9778 (handle_extended_wait): Improve comment.
9779
9780 2008-12-13 Doug Evans <dje@google.com>
9781
9782 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9783 * server.h (ATTR_MALLOC): New macro.
9784 (xmalloc,xcalloc,xstrdup): Declare.
9785 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9786 * inferiors.c: Ditto.
9787 * linux-low.c: Ditto.
9788 * mem-break.c: Ditto.
9789 * regcache.c: Ditto.
9790 * remote-utils.c: Ditto.
9791 * server.c: Ditto.
9792 * target.c: Ditto.
9793 * win32-low.c: Ditto.
9794
9795 2008-12-12 Doug Evans <dje@google.com>
9796
9797 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9798 in debugging printf.
9799
9800 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9801
9802 2008-12-09 Doug Evans <dje@google.com>
9803
9804 * linux-low.h (struct process_info): Delete member tid, unused.
9805 * thread-db.c (find_one_thread): Update.
9806 (maybe_attach_thread): Update.
9807
9808 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9809
9810 * target.h (struct target_ops): Add qxfer_osdata member.
9811 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9812 and dirent.h.
9813 (linux_qxfer_osdata): New functions.
9814 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9815 callback.
9816 * server.c (handle_query): Handle "qXfer:osdata:read:".
9817 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9818 (buffer_xml_printf): New functions.
9819 * server.h (struct buffer): New.
9820 (buffer_grow_str, buffer_grow_str0): New macros.
9821 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9822 (buffer_xml_printf): Declare.
9823
9824 2008-11-24 Doug Evans <dje@google.com>
9825
9826 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9827
9828 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9829
9830 * server.c (handle_v_run): Always use the supplied argument list.
9831
9832 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9833
9834 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9835 (xtensa_regmap_table): Add entry for scompare1.
9836
9837 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9838
9839 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9840 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9841 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9842 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9843 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9844 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9845 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9846 XML target descriptions.
9847 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9848 when inferior is running on an ISA 2.05 or later processor. Add
9849 special case to return offset for full 64-bit slot of FPSCR when
9850 in 32-bits.
9851
9852 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9853
9854 * Makefile.in (SFILES, clean): Added sparc64 files.
9855 (reg-sparc64.o, reg-sparc64.c): New.
9856 * configure.srv (sparc*-*-linux*): New configuration.
9857 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9858 syscall arguments for SPARC.
9859 (regsets_store_inferior_registers): Likewise.
9860 * linux-sparc-low.c: New file.
9861
9862 2008-10-21 Doug Evans <dje@google.com>
9863
9864 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9865 (READLINE_DIR,READLINE_DEP): Delete.
9866 (INTERNAL_CFLAGS): Update.
9867 (LINTFLAGS): Update.
9868
9869 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9870
9871 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9872 whole argv from the last run, not just argv[0].
9873
9874 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9875
9876 * regcache.c (new_register_cache): Return NULL if the register
9877 cache size isn't known yet.
9878 (free_register_cache): Avoid dereferencing a NULL regcache.
9879
9880 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9881
9882 * configure.srv: Merge MIPS and MIPS64.
9883
9884 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9885
9886 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9887
9888 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9889
9890 * Makefile.in: Add required vsx dependencies.
9891
9892 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9893 Declare init_registers_powerpc_vsx32l.
9894 Declare init_registers_powerpc_vsx64l.
9895 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9896 (ppc_arch_setup): Check for VSX in hwcap.
9897 (ppc_fill_vsxregset): New function.
9898 (ppc_store_vsxregset): New function.
9899 Add new VSX entry in regset_info target_regsets.
9900
9901 * configure.srv: Add new VSX dependencies.
9902
9903 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9904
9905 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9906 (remote_open): Set or clear transport_is_reliable.
9907 (putpkt_binary): Don't expect acks in noack mode.
9908 (getpkt): Don't send ack/nac in noack mode.
9909 * server.c (handle_general_set): Handle QStartNoAckMode.
9910 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9911 qSupported.
9912 (main): Reset noack_mode on every connection.
9913 * server.h (noack_mode): Declare.
9914
9915 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9916
9917 * Makefile.in (GDBREPLAY_OBS): New variable.
9918 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9919
9920 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9921 Daniel Jacobowitz <dan@codesourcery.com>
9922
9923 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9924 (usr_store_inferior_registers): Likewise.
9925 (regsets_store_inferior_registers): Likewise.
9926
9927 2008-07-31 Rolf Jansen <rj@surtec.com>
9928 Pedro Alves <pedro@codesourcery.com>
9929
9930 * configure.ac: Check for memmem declaration.
9931 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9932 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9933 (disable_packet_qfThreadInfo): Unconditionally compile.
9934 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9935 * configure, config.in: Regenerate.
9936
9937 2008-07-28 Doug Kwan <dougkwan@google.com>
9938
9939 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9940 (linux_write_memory): Remove declaration of errno.
9941
9942 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9943
9944 * linux-low.c (handle_extended_wait): Do not use "status"
9945 variable uninitialized.
9946
9947 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9948
9949 * server.c (handle_v_attach): Inhibit reporting dll changes.
9950
9951 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9952
9953 * remote-utils.c (prepare_resume_reply): If requested, don't
9954 output "thread:TID" in the T stop reply.
9955
9956 * server.c (disable_packet_vCont, disable_packet_Tthread)
9957 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9958 (handle_query): If requested, disable support for qC, qfThreadInfo
9959 and qsThreadInfo.
9960 (handle_v_requests): If requested, disable support for vCont.
9961 (gdbserver_show_disableable): New.
9962 (main): Handle --disable-packet and --disable-packet=LIST.
9963
9964 * server.h (disable_packet_vCont, disable_packet_Tthread)
9965 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9966
9967 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9968
9969 * server.c (gdbserver_usage): Mention --version.
9970
9971 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9972
9973 * Makefile.in (gdbreplay.o): New rule.
9974
9975 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9976
9977 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9978 message, not gdbserver.
9979
9980 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9981 Nathan Sidwell <nathan@codesourcery.com>
9982 Joseph Myers <joseph@codesourcery.com>
9983
9984 * acinclude.m4: Include ../../config/acx.m4.
9985 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9986 * configure, config.in: Regenerate.
9987 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9988 * server.c (gdbserver_version): Print PKGVERSION.
9989 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9990 (main): Adjust gdbserver_usage calls.
9991 * gdbreplay.c (version, host_name): Add declarations.
9992 (gdbreplay_version, gdbreplay_usage): New.
9993 (main): Accept --version and --help options.
9994
9995 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9996
9997 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9998 (arm_breakpoint_at): Handle Thumb.
9999 (the_low_target): Add comment.
10000
10001 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10002
10003 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10004
10005 2008-05-09 Doug Evans <dje@google.com>
10006
10007 * server.h (decode_search_memory_packet): Declare.
10008 * remote-utils.c (decode_search_memory_packet): New fn.
10009 * server.c (handle_search_memory_1): New fn.
10010 (handle_search_memory): New fn.
10011 (handle_query): Process qSearch:memory packets.
10012
10013 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10014
10015 * regcache.c (registers_length): Remove.
10016 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10017 full register packet.
10018 * regcache.h (registers_length): Remove prototype.
10019 * server.h (PBUFSIZ): Define to 16384.
10020
10021 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10022
10023 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10024 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10025 powerpc-64l.o, and powerpc-altivec64l.o.
10026 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10027 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10028 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10029 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10030 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10031 to srv_xmlfiles.
10032
10033 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10034 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10035 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10036 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10037 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10038 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10039 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10040 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10041 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10042 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10043 (clean): Update.
10044
10045 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10046 (init_registers_powerpc_32l): ... this new prototype.
10047 (init_registers_powerpc_32): Remove, replace by ...
10048 (init_registers_powerpc_altivec32l): ... this new prototype.
10049 (init_registers_powerpc_e500): Remove, replace by ...
10050 (init_registers_powerpc_e500l): ... this new prototype.
10051 (init_registers_ppc64): Remove, replace by ...
10052 (init_registers_powerpc_64l): ... this new prototype.
10053 (init_registers_powerpc_64): Remove, replace by ...
10054 (init_registers_powerpc_altivec64l): ... this new prototype.
10055 (ppc_num_regs): Set to 73.
10056 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10057 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10058 (ppc_cannot_store_register): Handle orig_r3 and trap.
10059 (ppc_arch_setup): Update init_registers_... calls.
10060 (ppc_fill_gregset): Handle orig_r3 and trap.
10061
10062 * inferiors.c (clear_inferiors): Reset current_inferior.
10063
10064 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10065
10066 * acinclude.m4: Add override.m4.
10067 * configure: Regenerate.
10068
10069 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10070
10071 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10072 initial call to init_register_ppc64.
10073
10074 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10075
10076 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10077 single powerpc*-*-linux* case.
10078 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10079
10080 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10081
10082 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10083 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10084 from reg_xmlfiles.
10085 * linux-ppc-low.c: Include <elf.h>.
10086 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10087 (ppc_hwcap): New global variable.
10088 (ppc_regmap): Remove __SPE__ #ifdef sections.
10089 (ppc_regmap_e500): New global variable.
10090 (ppc_cannot_store_register): Update __SPE__ special case.
10091 (ppc_get_hwcap): New function.
10092 (ppc_arch_setup): Use it to determine whether inferior supports
10093 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10094 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10095 Do not access registers if target does not support AltiVec.
10096 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10097 Do not access registers if target does not support SPE.
10098 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10099
10100 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10101
10102 * linux-low.c (disabled_regsets, num_regsets): New.
10103 (use_regsets_p): Delete.
10104 (linux_wait_for_process): Clear disabled_regsets.
10105 (regsets_fetch_inferior_registers): Check and set it.
10106 (regsets_store_inferior_registers): Likewise.
10107 (linux_fetch_registers, linux_store_registers): Do not use
10108 use_regsets_p.
10109 (initialize_low): Allocate disabled_regsets.
10110
10111 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10112
10113 * Makefile.in (LIBOBJS): New.
10114 (OBS): Use LIBOBJS.
10115 (memmem.o): New rule.
10116 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10117 * configure: Regenerated.
10118
10119 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10120
10121 * server.c (handle_query): Never return "unsupported" for
10122 qXfer:features:read queries.
10123
10124 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10125
10126 * server.c (get_features_xml): Fix inverted condition.
10127 (handle_query): Always support qXfer:feature:read.
10128
10129 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10130
10131 * server.c (wrapper_argv): New.
10132 (start_inferior): Handle wrapper_argv. If set, expect an extra
10133 trap.
10134 (gdbserver_usage): Document --wrapper.
10135 (main): Parse --wrapper.
10136
10137 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10138
10139 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10140 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10141 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10142 (ppc_set_pc): Likewise.
10143 (ppc_arch_setup): New function.
10144 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10145 of collect_register.
10146 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10147
10148 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10149
10150 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10151 instead of linux-ppc64-low.o.
10152 * linux-ppc64-low.c: Remove file.
10153 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10154 (linux-ppc64-low.o): Remove rule.
10155
10156 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10157 (init_registers_powerpc_64): Likewise.
10158 (ppc_regmap): Conditionally define depending on __powerpc64__.
10159 (ppc_cannot_store_register): Do not special-case "fpscr" when
10160 compiled on __powerpc64__.
10161 (ppc_collect_ptrace_register): New function.
10162 (ppc_supply_ptrace_register): New function.
10163 (ppc_breakpoint): Change type to "unsigned int".
10164 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10165 (the_low_target): Conditionally provide initializers for the
10166 arch_setup member depending on __powerpc64__. Install
10167 collect_ptrace_register and supply_ptrace_register members.
10168
10169 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10170
10171 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10172 * server.c (gdbserver_xmltarget): Define.
10173 (get_features_xml): Use it to replace "target.xml" and arch_string.
10174
10175 * configure.srv: Remove srv_xmltarget. Add XML files that were
10176 mentioned there to srv_xmlfiles instead. Remove conditional tests
10177 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10178 srv_xmlfiles and srv_regobj to include all possible choices.
10179 * configure.ac (srv_xmltarget): Remove.
10180 (srv_xmlfiles): Do not add "target.xml".
10181 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10182 checks for supplementary target information.
10183 * configure: Regenerate.
10184 * Makefile.in (XML_TARGET): Remove.
10185 (target.xml): Remove rule.
10186 (clean): Do not clean up target.xml.
10187 (.PRECIOUS): Do not mention target.xml.
10188
10189 * target.h (struct target_ops): Remove arch_string member.
10190 * linux-low.c (linux_arch_string): Remove.
10191 (linux_target_ops): Remove arch_string initializer.
10192 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10193 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10194 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10195 * spu-low.c (spu_arch_string): Remove.
10196 (spu_target_ops): Remove arch_string initializer.
10197 * win32-low.c (win32_arch_string): Remove.
10198 (win32_target_ops): Remove arch_string initializer.
10199 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10200 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10201 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10202
10203 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10204
10205 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10206 by collect_ptrace_register and supply_ptrace_register hooks.
10207 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10208 instead of checking for the_low_target.left_pad_xfer.
10209 (usr_store_inferior_registers): Use collect_ptrace_register callback
10210 instead of checking for the_low_target.left_pad_xfer.
10211
10212 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10213 (s390_supply_ptrace_register): Likewise.
10214 (s390_fill_gregset): Call s390_collect_ptrace_register.
10215 (the_low_target): Update.
10216
10217 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10218 (ppc_supply_ptrace_register): Likewise.
10219 (the_low_target): Update.
10220
10221 * linux-i386-low.c (the_low_target): Update.
10222 * linux-x86-64-low.c (the_low_target): Update.
10223
10224 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10225
10226 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10227 reg-s390.o and reg-s390x.o.
10228
10229 * linux-low.c (new_inferior): New global variable.
10230 (linux_create_inferior, linux_attach): Set it.
10231 (linux_wait_for_process): Call the_low_target.arch_setup after the
10232 target has stopped for the first time.
10233 (initialize_low): Do not call the_low_target.arch_setup.
10234
10235 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10236 (s390_set_pc): Likewise.
10237 (s390_arch_setup): New function.
10238 (the_low_target): Use s390_arch_setup as arch_setup routine.
10239
10240 * regcache.c (realloc_register_cache): New function.
10241 (set_register_cache): Call it for each existing regcache.
10242
10243 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10244
10245 * server.h (init_registers): Remove prototype.
10246
10247 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10248 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10249 instead of init_registers ().
10250 * linux-arm-low.c (init_registers_arm): Add prototype.
10251 (init_registers_arm_with_iwmmxt): Likewise.
10252 (the_low_target): Add initializer for arch_setup field.
10253 * linux-cris-low.c (init_registers_cris): Add prototype.
10254 (the_low_target): Add initializer for arch_setup field.
10255 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10256 (the_low_target): Add initializer for arch_setup field.
10257 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10258 (the_low_target): Add initializer for arch_setup field.
10259 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10260 (the_low_target): Add initializer for arch_setup field.
10261 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10262 (the_low_target): Add initializer for arch_setup field.
10263 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10264 (the_low_target): Add initializer for arch_setup field.
10265 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10266 (init_registers_mips64_linux): Likewise.
10267 (the_low_target): Add initializer for arch_setup field.
10268 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10269 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10270 (the_low_target): Add initializer for arch_setup field.
10271 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10272 (init_registers_powerpc_64): Likewise.
10273 (the_low_target): Add initializer for arch_setup field.
10274 * linux-s390-low.c (init_registers_s390): Add prototype.
10275 (init_registers_s390x): Likewise.
10276 (the_low_target): Add initializer for arch_setup field.
10277 * linux-sh-low.c (init_registers_sh): Add prototype.
10278 (the_low_target): Add initializer for arch_setup field.
10279 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10280 (the_low_target): Add initializer for arch_setup field.
10281 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10282 (the_low_target): Add initializer for arch_setup field.
10283
10284 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10285 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10286 instead of init_registers ().
10287 * win32-arm-low.c (init_registers_arm): Add prototype.
10288 (the_low_target): Add initializer for arch_setup field.
10289 * win32-i386-low.c (init_registers_i386): Add prototype.
10290 (the_low_target): Add initializer for arch_setup field.
10291
10292 * spu-low.c (init_registers_spu): Add prototype.
10293 (initialize_low): Call initialie_registers_spu () instead of
10294 initialize_registers ().
10295
10296 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10297
10298 * server.c (handle_v_requests): When handling the vRun and vAttach
10299 packets, if already debugging a process, don't kill it. Return an
10300 error instead.
10301
10302 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10303
10304 * server.c (handle_query): Correct length check.
10305
10306 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10307
10308 * win32-low.c (do_initial_child_stuff): Add process handle
10309 parameter. Set current_process_handle and current_process_id from the
10310 parameters. Clear globals.
10311 (win32_create_inferior): Don't set current_process_handle and
10312 current_process_id here. Instead pass them on the call to
10313 do_initial_child_stuff.
10314 (win32_attach): Likewise.
10315 (win32_clear_inferiors): New.
10316 (win32_kill): Don't close the current process handle or the
10317 current thread handle here. Instead call win32_clear_inferiors.
10318 (win32_detach): Don't open a new handle to the process. Call
10319 win32_clear_inferiors.
10320 (win32_join): Don't rely on current_process_handle; open a new
10321 handle using the process id.
10322 (win32_wait): Call win32_clear_inferiors when the inferior process
10323 has exited.
10324
10325 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10326
10327 * server.c (monitor_show_help): Add "exit".
10328
10329 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10330
10331 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10332 (clean): Add reg-xtensa.c.
10333 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10334 * configure.srv (xtensa*-*-linux*) New target.
10335 * linux-xtensa-low.c: New.
10336 * xtensa-xtregs.c: New.
10337
10338 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10339
10340 * hostio.c: Don't include errno.h.
10341 (errno_to_fileio_errno): Move to hostio-errno.
10342 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10343 error number outputting to the target->hostio_last_error callback.
10344 (hostio_packet_error): Use FILEIO_EINVAL directly.
10345 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10346 calls to hostio_error.
10347 * hostio-errno.c: New.
10348 * server.h (hostio_last_error_from_errno): Declare.
10349 * target.h (target_ops): Add hostio_last_error member.
10350 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10351 as hostio_last_error handler.
10352 * spu-low.c (spu_target_ops): Likewise.
10353 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10354 (wince_hostio_last_error): New functions.
10355 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10356 as hostio_last_error handler.
10357 (win32_target_ops) [!_WIN32_WCE]: Register
10358 hostio_last_error_from_errno as hostio_last_error handler.
10359 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10360 (hostio-errno.o): New rule.
10361 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10362 * configure.srv (srv_hostio_err_objs): New variable. Default to
10363 hostio-errno.o.
10364 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10365 * configure: Regenerate.
10366
10367 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10368
10369 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10370 (linux_kill, linux_detach): Clean up the process list.
10371 * remote-utils.c (remote_open): Improve port number parsing.
10372 (putpkt_binary, input_interrupt): Only send interrupts if the target
10373 is running.
10374 * server.c (extended_protocol): Make static.
10375 (attached): Define earlier.
10376 (exit_requested, response_needed, program_argv): New variables.
10377 (target_running): New.
10378 (start_inferior): Clear attached here.
10379 (attach_inferior): Set attached here.
10380 (require_running): Define.
10381 (handle_query): Use require_running and target_running. Implement
10382 "monitor exit".
10383 (handle_v_attach, handle_v_run): New.
10384 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10385 (gdbserver_usage): Update.
10386 (main): Redo argument parsing. Handle --debug and --multi. Handle
10387 --attach along with other options or after the port. Save
10388 program_argv. Support no initial program. Resynchronize
10389 communication with GDB after an error. Handle "monitor exit".
10390 Use require_running and target_running. Always allow the extended
10391 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10392 restart in extended mode.
10393 * README: Refer to the GDB manual. Update --attach usage.
10394
10395 2007-12-20 Andreas Schwab <schwab@suse.de>
10396
10397 * linux-low.c (STACK_SIZE): Define.
10398 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10399 (linux_test_for_tracefork): Likewise.
10400
10401 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10402
10403 * linux-low.c (linux_wait_for_event): Update messages. Do not
10404 reinsert auto-delete breakpoints.
10405 * mem-break.c (struct breakpoint): Change return type of handler to
10406 int.
10407 (set_breakpoint_at): Update handler type.
10408 (reinsert_breakpoint_handler): Return 1 instead of calling
10409 delete_breakpoint.
10410 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10411 setting a new one.
10412 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10413 * mem-break.h (set_breakpoint_at): Update handler type.
10414 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10415 * win32-low.c (auto_delete_breakpoint): New.
10416 (get_child_debug_event): Use it.
10417
10418 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10419
10420 * configure.ac: Check for pread and pwrite.
10421 * hostio.c (handle_pread): Fall back to lseek and read.
10422 (handle_pwrite): Fall back to lseek and write.
10423 * config.in, configure: Regenerated.
10424
10425 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10426
10427 * server.c (myresume): Add own_buf argument.
10428 (main): Update calls.
10429
10430 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10431
10432 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10433 * remote-utils.c (remote_open): Do not call disable_async_io.
10434 (block_async_io): Delete.
10435 (unblock_async_io): Make static.
10436 (initialize_async_io): New.
10437 * server.c (handle_v_cont): Handle async I/O here.
10438 (myresume): Likewise. Move other common resume tasks here...
10439 (main): ... from here. Call initialize_async_io. Disable async
10440 I/O before the main loop.
10441 * server.h (initialize_async_io): Declare.
10442 (block_async_io, unblock_async_io): Delete prototypes.
10443 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10444
10445 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10446
10447 * remote-utils.c (readchar): Allow binary data in received messages.
10448
10449 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10450
10451 * win32-low.c (attaching): New global.
10452 (win32_create_inferior): Clear the `attaching' global.
10453 (win32_attach): Set the `attaching' global.
10454 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10455 attaching. Only set a breakpoint at the entry point if not
10456 attaching.
10457
10458 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10459
10460 * server.c (main): Don't report dll events on the initial
10461 connection on attaches.
10462
10463 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10464
10465 * server.c (main): Relax numerical bases supported for the pid of
10466 the --attach command line argument.
10467
10468 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10469
10470 * win32-low.c (win32_attach): Call OpenProcess before
10471 DebugActiveProcess, not after. Add last error output to error
10472 call.
10473
10474 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10475
10476 * win32-low.c (win32_get_thread_context)
10477 (win32_set_thread_context): New functions.
10478 (thread_rec): Use win32_get_thread_context.
10479 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10480 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10481 field.
10482
10483 2007-12-03 Leo Zayas
10484 Pedro Alves <pedro_alves@portugalmail.pt>
10485
10486 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10487 global variables.
10488 (child_add_thread): Minor cleanup.
10489 (child_continue): Resume artificially suspended threads before
10490 calling ContinueDebugEvent.
10491 (suspend_one_thread): New.
10492 (fake_breakpoint_event): New.
10493 (get_child_debug_event): Change return type to int. Check here if
10494 gdb sent an interrupt request. If a soft interrupt was requested,
10495 fake a breakpoint event. Return 0 if there is no event to handle,
10496 and 1 otherwise.
10497 (win32_wait): Don't check here if gdb sent an interrupt request.
10498 Ensure there is a valid event to handle.
10499 (win32_request_interrupt): Add soft interruption method as last
10500 resort.
10501
10502 2007-12-03 Leo Zayas
10503 Pedro Alves <pedro_alves@portugalmail.pt>
10504
10505 * win32-low.h (win32_thread_info): Add descriptions to the
10506 structure members. Replace `suspend_count' counter by a
10507 `suspended' flag.
10508 * win32-low.c (thread_rec): Update condition of when to get the
10509 context from the inferior. Rely on ContextFlags being set if it
10510 has already been retrieved. Only suspend the inferior thread if
10511 we haven't already. Warn if that fails.
10512 (continue_one_thread): s/suspend_count/suspended/. Only call
10513 ResumeThread once. Warn if that fails.
10514
10515 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10516
10517 * win32-low.c (win32_wait): Don't read from the inferior when it
10518 has already exited.
10519
10520 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10521
10522 * Makefile.in (win32_low_h): New variable.
10523 (win32-low.o): Add dependency on $(win32_low_h).
10524 (win32-arm-low.o, win32-i386-low.o): New rules.
10525
10526 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10527
10528 * hostio.c: Correct copyright year.
10529
10530 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10531
10532 * Makefile.in (OBS): Add hostio.o.
10533 (hostio.o): New rule.
10534 * server.h (handle_vFile): Declare.
10535 * hostio.c: New file.
10536 * server.c (handle_v_requests): Take packet_len and new_packet_len
10537 for binary packets. Call handle_vFile.
10538 (main): Update call to handle_v_requests.
10539
10540 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10541
10542 * linux-low.c: Include <sched.h>.
10543
10544 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10545
10546 * linux-low.c (linux_tracefork_grandchild): New.
10547 (linux_tracefork_child): Use clone.
10548 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10549
10550 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10551
10552 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10553
10554 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10555
10556 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10557
10558 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10559
10560 * inferiors.c (change_inferior_id): Delete.
10561 (add_pid_to_list, pull_pid_from_list): New.
10562 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10563 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10564 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10565 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10566 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10567 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10568 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10569 (using_threads): Always set to 1.
10570 (handle_extended_wait): New.
10571 (add_process): Do not set TID.
10572 (linux_create_inferior): Set must_set_ptrace_flags.
10573 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10574 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10575 (linux_thread_alive): Rename TID argument to LWPID.
10576 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10577 (linux_wait_for_event): Do not use TID or check using_threads. Update
10578 call to dead_thread_notify. Call handle_extended_wait.
10579 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10580 (send_sigstop): Delete sigstop_sent.
10581 (wait_for_sigstop): Avoid TID.
10582 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10583 (linux_test_for_tracefork): New.
10584 (linux_lookup_signals): Use thread_db_active and
10585 linux_supports_tracefork_flag.
10586 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10587 * linux-low.h (get_process_thread): Avoid TID.
10588 (struct process_ifo): Move thread_known and tid to the end. Remove
10589 sigstop_sent.
10590 (linux_attach_lwp, thread_db_init): Update prototypes.
10591 * server.h (change_inferior_id): Delete prototype.
10592 (add_pid_to_list, pull_pid_from_list): New prototypes.
10593 * thread-db.c (thread_db_use_events): New.
10594 (find_first_thread): Rename to...
10595 (find_one_thread): ...this. Update callers and messages. Do not
10596 call fatal. Check thread_db_use_events. Do not call
10597 change_inferior_id or new_thread_notify.
10598 (maybe_attach_thread): Update. Do not call new_thread_notify.
10599 (thread_db_init): Set thread_db_use_events. Check use_events.
10600 * utils.c (fatal, warning): Correct message prefix.
10601
10602 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10603
10604 * Makefile.in (clean): Remove new files.
10605 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10606 (powerpc-64.o, powerpc-64.c): New rules.
10607 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10608 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10609 with SPE.
10610 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10611 SPE targets.
10612 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10613 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10614 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10615 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10616 (target_regsets): Add AltiVec and SPE register sets.
10617 * configure.ac: Check for AltiVec and SPE.
10618 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10619 (ppc_fill_vrregset, ppc_store_vrregset): New.
10620 (target_regsets): Add AltiVec register set.
10621 * configure: Regenerated.
10622
10623 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10624
10625 * linux-low.c (O_LARGEFILE): Define.
10626 (linux_read_memory): Use /proc/PID/mem.
10627 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10628 * configure, config.in: Regenerated.
10629
10630 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10631
10632 * linux-low.c (linux_wait_for_event): Do not pass signals while
10633 single-stepping.
10634
10635 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10636
10637 * win32-low.c (create_process): New.
10638 (win32_create_inferior): Use create_process instead of
10639 CreateProcess. If create_process failed retry appending an ".exe"
10640 suffix. Store the GetLastError result immediatelly after
10641 create_process calls and use it on the call to error.
10642
10643 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10644
10645 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10646
10647 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10648
10649 * configure.ac: Switch license to GPLv3.
10650
10651 2007-08-01 Michael Snyder <msnyder@access-company.com>
10652
10653 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10654
10655 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10656
10657 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10658 typedef.
10659 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10660 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10661 CloseToolhelp32Snapshot.
10662 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10663 CloseToolhelp32Snapshot.
10664
10665 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10666
10667 * server.c (main): Check for inferior exit before main loop.
10668
10669 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10670
10671 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10672 instead of on tmp_desc.
10673
10674 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10675 Daniel Jacobowitz <dan@codesourcery.com>
10676
10677 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10678 (add_thread): Minor cleanups.
10679 (clear_inferiors): Move lower in the file. Clear the DLL
10680 list.
10681 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10682 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10683 (xml_escape_text): New.
10684 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10685 for qSupported.
10686 (handle_v_cont): Report errors.
10687 (gdbserver_version): Update.
10688 (main): Correct size of own_buf. Do not report initial DLL events.
10689 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10690 (unloaded_dll, xml_escape_text): New.
10691 * win32-low.c (enum target_waitkind): Update comments.
10692 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10693 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10694 (win32_EnumProcessModules, win32_GetModuleInformation)
10695 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10696 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10697 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10698 (win32_Module32First, win32_Module32Next, load_toolhelp)
10699 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10700 (get_child_debug_event): Handle DLL events.
10701 (win32_wait): Likewise.
10702
10703 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10704
10705 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10706 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10707
10708 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10709
10710 * win32-low.c (handle_output_debug_string): Ignore event if not
10711 waiting.
10712
10713 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10714
10715 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10716
10717 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10718
10719 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10720
10721 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10722
10723 * inferiors.c (change_inferior_id): Add comment.
10724 * linux-low.c (check_removed_breakpoint): Add an early
10725 prototype. Improve debug output.
10726 (linux_attach): Doc update.
10727 (linux_detach_one_process, linux_detach): Clean up before releasing
10728 each process.
10729 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10730 * linux-low.h (struct process_info): Doc improvement.
10731 * mem-break.c (delete_all_breakpoints): New.
10732 * mem-break.h (delete_all_breakpoints): New prototype.
10733 * thread-db.c (find_first_thread): New.
10734 (thread_db_create_event): Call it instead of
10735 thread_db_find_new_threads. Clean up unused variables.
10736 (maybe_attach_thread): Remove first thread handling.
10737 (thread_db_find_new_threads): Use find_first_thread.
10738 (thread_db_get_tls_address): Likewise.
10739
10740 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10741
10742 * thread-db.c (thread_db_find_new_threads): Add prototype.
10743 (thread_db_create_event): Check for the main thread before adding
10744 a new thread.
10745 (maybe_attach_thread): Only enable event reporting if TID == 0.
10746 (thread_db_get_tls_address): Check for new threads.
10747
10748 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10749
10750 * linux-low.c (linux_create_inferior): Try execv before execvp.
10751 * spu-low.c (spu_create_inferior): Likewise.
10752
10753 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10754
10755 * linux-low.c (linux_create_inferior): Change execv to execvp.
10756 * spu-low.c (spu_create_inferior): Likewies.
10757
10758 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10759
10760 * Makefile.in (clean): Clean new files instead of deleted ones.
10761 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10762 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10763 rules.
10764 * configure.srv: Specify XML files and new regformats for MIPS and
10765 MIPS64 GNU/Linux.
10766 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10767 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10768 an entry for the restart register.
10769 (mips_cannot_fetch_register, mips_cannot_store_register)
10770 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10771 register names to match the XML descriptions.
10772 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10773 restart register instead of $0.
10774
10775 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10776 Markus Deuling <deuling@de.ibm.com>
10777
10778 * remote-utils.c (decode_xfer_write): New function.
10779 * server.h (decode_xfer_write): Add prototype.
10780 * server.c (handle_query): Add PACKET_LEN argument. Support
10781 qXfer:spu:read and qXfer:spu:write packets.
10782 (main): Pass packet_len to handle_query.
10783 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10784 * target.h (target_ops): Add qxfer_spu.
10785
10786 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10787
10788 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10789 accessing non-seekable spufs files.
10790
10791 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10792
10793 * server.c (handle_query): Add reply for qC packet.
10794
10795 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10796 Leo Zayas <lerele@champenstudios@com>
10797
10798 * server.h (check_remote_input_interrupt_request): New function.
10799 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10800 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10801 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10802 (check_remote_input_interrupt_request): New function.
10803 * server.h (check_remote_input_interrupt_request): Declare.
10804 * win32-low.c (winapi_DebugBreakProcess,
10805 winapi_GenerateConsoleCtrlEvent): New typedefs.
10806 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10807 to 250 ms.
10808 (win32_wait): Check for remote interrupt request
10809 with check_remote_input_interrupt_request.
10810 (win32_request_interrupt): New function.
10811 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10812
10813 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10814
10815 * win32-low.c (debug_registers_changed,
10816 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10817 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10818 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10819 (thread_rec): Get context using the low target.
10820 (child_add_thread): Call thread_added on the low target,
10821 which does the same thing.
10822 (regptr): Delete.
10823 (do_initial_child_stuff): Remove debug registers references.
10824 Set context using the low target. Resume threads after
10825 setting the contexts.
10826 (child_continue): Remove dead variable. Remove debug
10827 registers references.
10828 (child_fetch_inferior_registers): Go through the low target.
10829 (do_child_store_inferior_registers): Remove.
10830 (child_store_inferior_registers): Go through the low target.
10831 (win32_resume): Remove debug registers references.
10832 Set context using the low target.
10833 (handle_exception): Change return type to void. Don't record
10834 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10835 first chance exception.
10836 (get_child_debug_event): Change return type to void. Remove
10837 goto loop. Always return after waiting for debug event.
10838 (win32_wait): Convert to switch statement. Handle spurious
10839 events.
10840
10841 * win32-i386-low.c (debug_registers_changed,
10842 debug_registers_used): New.
10843 (initial_stuff): Rename to ...
10844 (i386_initial_stuff): ... this. Clear debug registers
10845 state variables.
10846 (store_debug_registers): Delete.
10847 (i386_get_thread_context): New.
10848 (load_debug_registers): Delete.
10849 (i386_set_thread_context): New.
10850 (i386_thread_added): New.
10851 (single_step): Rename to ...
10852 (i386_single_step): ... this.
10853 (do_fetch_inferior_registers): Rename to ...
10854 (i386_fetch_inferior_register): ... this.
10855 (i386_store_inferior_register): New.
10856 (the_low_target): Adapt to new interface.
10857
10858 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10859 (arm_get_thread_context): New.
10860 (arm_set_thread_context): New.
10861 (regptr): New.
10862 (do_fetch_inferior_registers): Rename to ...
10863 (arm_fetch_inferior_register): ... this.
10864 (arm_store_inferior_register): New.
10865 (arm_wince_breakpoint): Reimplement as unsigned long.
10866 (arm_wince_breakpoint_len): Define.
10867 (the_low_target): Adapt to new interface.
10868
10869 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10870 load_debug_registers. Add get_thread_context, set_thread_context,
10871 thread_added and store_inferior_register. Rename
10872 fetch_inferior_registers to fetch_inferior_register.
10873 (regptr): Remove declaration.
10874
10875 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10876
10877 * linux-low.c (linux_detach): Change return type to int. Return 0.
10878 * spu-low.c (spu_detach): Likewise.
10879
10880 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10881
10882 * target.h (target_ops): Change return type of detach to int.
10883 Add join.
10884 (join_inferior): New.
10885 * server.c (main): Don't skip detach support on mingw32.
10886 If the inferior doesn't support detaching return error.
10887 Call join_inferior instead of using waitpid.
10888 * linux-low.c (linux_join): New.
10889 (linux_target_op): Add linux_join.
10890 * spu-low.c (spu_join): New.
10891 (spu_target_ops): Add spu_join.
10892 * win32-low.c (win32_detach): Adapt to new interface.
10893 Reopen current_process_handle before detaching. Issue a child
10894 resume before detaching.
10895 (win32_join): New.
10896 (win32_target_op): Add win32_join.
10897
10898 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10899
10900 * win32-low.c (win32-attach): Fix return value.
10901 * target.h (target_ops): Describe ATTACH return values.
10902
10903 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10904
10905 * win32-low.c (GETPROCADDRESS): Define.
10906 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10907 (winapi_DebugSetProcessKillOnExit): Likewise.
10908 (win32_create_inferior): Force usage of ansi CreateProcessA.
10909 (win32_attach): Use GETPROCADDRESS.
10910 (win32_detach): Likewise.
10911
10912 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10913
10914 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10915
10916 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10917
10918 * win32-low.c: Commit leftover changes from 2007-03-29.
10919
10920 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10921
10922 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10923 fields short instead of int. Add explicit padding.
10924 (i387_cache_to_fsave): Remove unnecessary casts.
10925 (i387_fsave_to_cache): Doc fix.
10926 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10927
10928 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10929
10930 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10931 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10932
10933 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10934
10935 * configure.srv (arm*-*-mingw32ce*): Move near the other
10936 arm targets.
10937
10938 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10939
10940 * configure.ac: Add errno checking.
10941 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10942 sys/file.h and malloc.h.
10943 (AC_CHECK_DECLS): Add perror.
10944 (srv_mingwce): Handle.
10945 * configure.srv (i[34567]86-*-cygwin*): Add
10946 win32-i386-low.o to srv_tgtobj.
10947 (i[34567]86-*-mingw*): Likewise.
10948 (arm*-*-mingw32ce*): Add case.
10949 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10950 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10951 [__MINGW32CE__] (strerror): New function.
10952 [__MINGW32CE__] (errno): Define to GetLastError.
10953 [__MINGW32CE__] (COUNTOF): New macro.
10954 (remote_open): Remove extra close call.
10955 * mem-break.c (delete_breakpoint_at): New function.
10956 * mem-break.h (delete_breakpoint_at): Declare.
10957 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10958 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10959 [USE_WIN32API] (read, write): Add char* casts.
10960 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10961 * server.h: Include wincecompat.h on Windows CE.
10962 [HAVE_ERRNO_H]: Check.
10963 (perror): Declare if not declared.
10964 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10965 (perror_with_name): Remove errno declaration.
10966 * wincecompat.h: New.
10967 * wincecompat.c: New.
10968 * win32-low.h: New.
10969 * win32-arm-low.c: New.
10970 * win32-i386-low.c: New.
10971 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10972 (OUTMSG2): Make it safe.
10973 (_T): New macro.
10974 (COUNTOF): New macro.
10975 (NUM_REGS): Get it from the low target.
10976 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10977 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10978 (thread_rec): Let low target handle debug registers.
10979 (child_add_thread): Likewise.
10980 (child_init_thread_list): Likewise.
10981 (continue_one_thread): Likewise.
10982 (regptr): New.
10983 (do_child_fetch_inferior_registers): Move to ...
10984 * win32-i386-low.c: ... here, and rename to ...
10985 (do_fetch_inferior_registers): ... this.
10986 * win32-low.c (child_fetch_inferior_registers):
10987 Go through the low target.
10988 (do_child_store_inferior_registers): Use regptr.
10989 (strwinerror): New function.
10990 (win32_create_inferior): Handle Windows CE.
10991 Use strwinerror instead of strerror on Windows error
10992 codes. Add program to the error output.
10993 Don't close the main thread handle on Windows CE.
10994 (win32_attach): Use coredll.dll on Windows CE.
10995 (win32_kill): Close current process and current
10996 thread handles.
10997 (win32_detach): Use coredll.dll on Windows CE.
10998 (win32_resume): Let low target handle debug registers, and
10999 step request.
11000 (handle_exception): Add/Remove initial breakpoint. Avoid
11001 non-existant WSTOPSIG on Windows CE.
11002 (win32_read_inferior_memory): Cast to remove warning.
11003 (win32_arch_string): Go through the low target.
11004 (initialize_low): Call set_breakpoint_data with the low
11005 target's breakpoint.
11006 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11007 FOP_REGNUM, mappings): Move to ...
11008 * win32-i386-low.c: ... here.
11009 * win32-low.c (win32_thread_info): Move to ...
11010 * win32-low.h: ... here.
11011 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11012 win32-arm-low.c and wincecompat.c.
11013 (all:): Add $EXEEXT.
11014 (install-only:): Likewise.
11015 (gdbserver:): Likewise.
11016 (gdbreplay:): Likewise.
11017 * config.in: Regenerate.
11018 * configure: Regenerate.
11019
11020 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11021
11022 * win32-low.c: Rename typedef thread_info to
11023 win32_thread_info throughout.
11024
11025 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11026
11027 * win32-i386-low.c: Rename to ...
11028 * win32-low.c: ... this.
11029 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11030 * Makefile.in: Likewise.
11031
11032 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11033
11034 * remote-utils.c (monitor_output): Constify msg parameter.
11035 * server.h (monitor_output): Likewise.
11036 * win32-i386-low.c (handle_output_debug_string): New.
11037 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11038 handle_output_debug_string.
11039 (get_child_debug_event): Likewise.
11040
11041 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11042
11043 * server.c (main): Correct strtoul check.
11044
11045 2007-03-27 Jon Ringle <jon@ringle.org>
11046
11047 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11048
11049 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11050
11051 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11052
11053 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11054
11055 * terminal.h: Check HAVE_SGTTY_H.
11056
11057 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11058
11059 * remote-utils.c (remote_open): Print out the assigned port number.
11060
11061 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11062
11063 * remote-utils.c (monitor_output): New function.
11064 * server.c (debug_threads): Define here.
11065 (monitor_show_help): New function.
11066 (handle_query): Handle qRcmd.
11067 (main): Do not handle 'd' packet.
11068 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11069 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11070 of debug_threads.
11071
11072 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11073
11074 * Makefile.in (EXEEXT): New.
11075 (clean): Use $(EXEEXT).
11076
11077 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11078
11079 * target.h (target_ops): Rename send_signal to request_interrupt,
11080 and remove enum target_signal parameter.
11081 * linux-low.c (linux_request_interrupt): Rename from
11082 linux_send_signal, and always send SIGINT.
11083 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11084 and always send SIGINT.
11085 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11086 of send_signal.
11087 (input_interrupt): Likewise.
11088
11089 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11090
11091 * server.c (get_features_xml): Check if target implemented
11092 arch_string.
11093 * win32-i386-low.c (win32_arch_string): New.
11094 (win32_target_ops): Add win32_arch_string as arch_string member.
11095
11096 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11097
11098 * spu-low.c (spu_arch_string): New.
11099 (spu_target_ops): Add spu_arch_string.
11100
11101 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11102
11103 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11104 * configure.ac: Do not check for terminal.h.
11105 * configure, config.in: Regenerated.
11106
11107 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11108
11109 * Makefile.in (OBS): Add $(XML_BUILTIN).
11110 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11111 (clean): Update.
11112 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11113 (arm-with-iwmmxt.c): New.
11114 * config.in, configure: Regenerate.
11115 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11116 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11117 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11118 (arm*-*-linux*): Add iWMMXt and regset support.
11119 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11120 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11121 (arm_store_wmmxregset, target_regsets): New.
11122 * server.c (get_features_xml): Take annex argument. Check builtin
11123 XML documents.
11124 (handle_query): Handle multiple annexes.
11125
11126 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11127
11128 * remote-utils.c [USE_WIN32API] (read, write): Define.
11129 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11130 write.
11131
11132 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11133
11134 * linux-i386-low.c (the_low_target): Set arch_string.
11135 * linux-x86-64-low.c (the_low_target): Likewise.
11136 * linux-low.c (linux_arch_string): New.
11137 (linux_target_ops): Add it.
11138 * linux-low.h (struct linux_target_ops): Add arch_string.
11139 * server.c (write_qxfer_response): Use const void * for DATA.
11140 (get_features_xml): New.
11141 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11142 * target.h (struct target_ops): Add arch_string method.
11143
11144 2007-01-03 Denis Pilat <denis.pilat@st.com>
11145 Daniel Jacobowitz <dan@codesourcery.com>
11146
11147 * linux-low.c (linux_kill): Handle being called with no threads.
11148 * win32-i386-low.c (win32_kill): Likewise.
11149 (get_child_debug_event): Clear current_process_handle.
11150
11151 2006-12-30 Denis PILAT <denis.pilat@st.com>
11152 Daniel Jacobowitz <dan@codesourcery.com>
11153
11154 * remote-utils.c (remote_open): Check the type of specified
11155 serial port devices before opening them.
11156 * server.c (main): Kill the inferior if an error occurs during
11157 the first remote_open.
11158
11159 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11160
11161 * README: Update supported targets.
11162
11163 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11164
11165 * Makefile.in (clean): Remove reg-mips64.c.
11166 (reg-mips64.c, reg-mips64.o): New rules.
11167 * configure.srv: Handle mips64. Include regset support for mips.
11168 * linux-mips-low.c (union mips_register): New.
11169 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11170 (mips_breakpoint, mips_breakpoint_at): Use int.
11171 (mips_collect_register, mips_supply_register)
11172 (mips_collect_register_32bit, mips_supply_register_32bit)
11173 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11174 (mips_store_fpregset, target_regsets): New.
11175 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11176
11177 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11178
11179 * configure.srv: Add target "spu*-*-*".
11180 * Makefile.in (clean): Remove reg-spu.c.
11181 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11182 * spu-low.c: New file.
11183
11184 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11185
11186 * configure.ac: Correct td_thr_tls_get_addr test.
11187 * configure: Regenerated.
11188
11189 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11190
11191 * linux-low.c (linux_wait_for_event): Reformat. Use the
11192 pass_signals array.
11193 * remote-utils.c (decode_address_to_semicolon): New.
11194 * server.c (pass_signals, handle_general_set): New.
11195 (handle_query): Mention QPassSignals for qSupported.
11196 (main): Call handle_general_set.
11197 * server.h (pass_signals, decode_address_to_semicolon): New.
11198
11199 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11200
11201 * server.c (handle_query): Correct error handling for read_auxv.
11202
11203 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11204
11205 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11206 and srv_linux_thread_db to yes.
11207 * linux-s390-low.c (s390_fill_gregset): New function.
11208 (target_regsets): Define data structure.
11209
11210 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11211
11212 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11213 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11214 * config.in, configure: Regenerated.
11215 * inferiors.c (gdb_id_to_thread): New function.
11216 (gdb_id_to_thread_id): Use it.
11217 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11218 * linux-low.h (struct process_info): Add th member.
11219 (thread_db_get_tls_address): New prototype.
11220 * remote-utils.c (decode_address): Make non-static.
11221 * server.c (handle_query): Handle qGetTLSAddr.
11222 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11223 * target.h (struct target_ops): Add get_tls_address.
11224 * thread-db.c (maybe_attach_thread): Save the thread handle.
11225 (thread_db_get_tls_address): New.
11226
11227 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11228
11229 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11230 (linux_resume_one_process): Take a siginfo_t *. Update all
11231 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11232 (struct pending_signals): Add a siginfo_t.
11233 (linux_wait_for_process): Always set last_status.
11234 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11235 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11236 * linux-low.h (struct process_info): Add last_status.
11237
11238 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11239
11240 * remote-utils.c (try_rle): New function.
11241 (putpkt_binary): Use it.
11242
11243 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11244
11245 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11246 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11247 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11248 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11249 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11250 point registers.
11251
11252 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11253
11254 * server.c (terminal_fd): New variable.
11255 (old_foreground_pgrp): Likewise.
11256 (restore_old_foreground_pgrp): New function.
11257 (start_inferior): Record the terminal file descriptor in terminal_fd
11258 and its original foreground group in old_foreground_pgrp. Register
11259 restore_old_foreground_pgrp with atexit().
11260
11261 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11262
11263 * server.c (handle_query): Correct qPart to qXfer.
11264
11265 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11266
11267 * configure.ac: Check for more headers which are missing on
11268 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11269 * configure.srv: Add Cygwin and mingw32.
11270 * remote-utils.c: Don't include headers unconditionally which
11271 are missing on mingw32. Include <winsock.h> for mingw32.
11272 (remote_open): Adjust for mingw32 support. Flush
11273 standard error after writing to it.
11274 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11275 (unblock_async_io, enable_async_io, disable_async_io)
11276 (readchar, getpkt): Update for Winsock support.
11277 (prepare_resume_reply): Expect a protocol signal number.
11278 * server.c: Disable <sys/wait.h> on mingw32.
11279 (start_inferior): Adjust for mingw32 support. Flush
11280 standard error after writing to it.
11281 (attach_inferior): Likewise. Use protocol signal
11282 numbers.
11283 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11284 and names.
11285 * win32-i386-low.c: New file.
11286 * Makefile.in (XM_CLIBS): Set.
11287 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11288 (win32-i386-low.o): New dependency rule.
11289 * linux-low.c (linux_wait): Use target signal numbers.
11290 * target.h (struct target_ops): Doc fix.
11291 * server.h (target_signal_to_name): New prototype.
11292 * gdbreplay.c: Don't include headers unconditionally which
11293 are missing on mingw32. Include <winsock.h> for mingw32.
11294 (remote_close, remote_open): Adjust for Winsock support.
11295 * configure, config.in: Regenerated.
11296
11297 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11298
11299 * server.c (decode_xfer_read, write_qxfer_response): New.
11300 (handle_query): Take a packet length argument. Handle
11301 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11302 the qSupported response.
11303 (main): Update call to handle_query.
11304
11305 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11306
11307 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11308 (putpkt_binary): Renamed from putpkt and adjusted for binary
11309 data.
11310 (putpkt): New wrapper for putpkt_binary.
11311 (readchar): Don't mask off the high bit.
11312 (decode_X_packet): New function.
11313 * server.c (main): Call putpkt_binary if a handler sets the packet
11314 length. Save the length of the incoming packet. Handle 'X'.
11315 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11316
11317 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11318
11319 * server.c (handle_query): Handle qSupported.
11320
11321 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11322
11323 * remote-utils.c (all_symbols_looked_up): New variable.
11324 (look_up_one_symbol): Check it.
11325 * server.h (look_up_one_symbol): New declaration.
11326 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11327
11328 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11329
11330 * Makefile.in (linux-arm-low.o): Update dependencies.
11331 * linux-arm-low.c: Include "gdb_proc_service.h".
11332 (PTRACE_GET_THREAD_AREA): Define.
11333 (ps_get_thread_area): New function.
11334
11335 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11336
11337 * configure.srv (m68k*-*-uclinux*): New target.
11338 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11339 (linux_resume_one_process): Remove extraneous cast.
11340 (linux_read_offsets): New.
11341 (linux_target_op): Add linux_read_offsets on mmuless systems.
11342 * server.c (handle_query): Add qOffsets logic.
11343 * target.h (struct target_ops): Add read_offsets.
11344
11345 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11346
11347 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11348 (PTRACE_GET_THREAD_AREA): Define.
11349 (ps_get_thread_area): New function.
11350 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11351 (linux-x86-64-low.o): Update.
11352
11353 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11354
11355 * configure.ac: Remove checks for prfpregset_t.
11356 * gdb_proc_service.h: New file.
11357 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11358 new "gdb_proc_service.h".
11359 * proc-service.c: Likewise.
11360 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11361 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11362 * Makefile.in (gdb_proc_service_h): Updated.
11363 * configure, config.in: Regenerated.
11364
11365 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11366
11367 * remote-utils.c (prepare_resume_reply): Move declaration
11368 of gdb_id_from_wait to the top of the block.
11369
11370 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11371
11372 * linux-low.c (regsets_store_inferior_registers): Read the regset
11373 from the target before filling it.
11374
11375 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11376
11377 * server.c (attach_inferior): Return SIGTRAP for a successful
11378 attach.
11379
11380 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11381
11382 * Makefile.in (OBS): Add version.o.
11383 (STAGESTUFF): Delete.
11384 (version.o): Add dependencies.
11385 (version.c): Replace rule.
11386 (clean): Remove version.c.
11387 * server.c (gdbserver_version): New.
11388 (gdbserver_usage): Use printf.
11389 (main): Handle --version and --help.
11390 * server.h (version, host_name): Add declarations.
11391
11392 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11393
11394 * linux-arm-low.c:
11395 * linux-arm-low.c:
11396 * inferiors.c:
11397 * i387-fp.h:
11398 * i387-fp.c:
11399 * gdbreplay.c:
11400 * regcache.c:
11401 * proc-service.c:
11402 * mem-break.h:
11403 * mem-break.c:
11404 * linux-x86-64-low.c:
11405 * linux-sh-low.c:
11406 * linux-s390-low.c:
11407 * linux-ppc64-low.c:
11408 * linux-ppc-low.c:
11409 * linux-mips-low.c:
11410 * linux-m68k-low.c:
11411 * linux-m32r-low.c:
11412 * linux-low.h:
11413 * linux-low.c:
11414 * linux-ia64-low.c:
11415 * linux-i386-low.c:
11416 * linux-crisv32-low.c:
11417 * thread-db.c:
11418 * terminal.h:
11419 * target.h:
11420 * target.c:
11421 * server.h:
11422 * server.c:
11423 * remote-utils.c:
11424 * regcache.h:
11425 * utils.c:
11426 * Makefile.in:
11427 * configure.ac:
11428 * gdbserver.1: Add (C) after Copyright. Update the FSF
11429 address.
11430
11431 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11432
11433 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11434 (arm_breakpoint_at): Recognize both breakpoints.
11435 (the_low_target): Use the correct breakpoint instruction.
11436
11437 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11438
11439 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11440 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11441 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11442 (the_low_target): Update.
11443
11444 2005-10-25 Andreas Schwab <schwab@suse.de>
11445
11446 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11447
11448 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11449 (ia64_num_regs): Reduce to 462.
11450
11451 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11452
11453 * acinclude.m4: Correct quoting.
11454 * aclocal.m4: Regenerated.
11455
11456 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11457 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11458 (thread_db_init): Call thread_db_err_str.
11459 * configure.ac: Check for TD_VERSION.
11460 * config.in, configure: Regenerated.
11461
11462 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11463
11464 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11465
11466 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11467
11468 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11469 is not available. Define HAVE_PTRACE_GETREGS if it is.
11470 * config.in, configure: Regenerated.
11471 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11472 * linux-i386-low.c, linux-m68k-low.c: Update to use
11473 HAVE_PTRACE_GETREGS.
11474 * linux-low.c (regsets_fetch_inferior_registers)
11475 (regsets_store_inferior_registers): Only return 0 if we processed
11476 GENERAL_REGS.
11477 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11478 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11479
11480 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11481
11482 * inferiors.c (struct thread_info): Add gdb_id.
11483 (add_thread): Add gdb_id argument.
11484 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11485 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11486 calls to add_thread.
11487 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11488 * server.c (handle_query): Use thread_to_gdb_id.
11489 (handle_v_cont, main): Use gdb_id_to_thread_id.
11490 * server.h (add_thread): Update prototype.
11491 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11492 prototypes.
11493
11494 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11495
11496 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11497 left-padded registers.
11498 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11499 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11500
11501 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11502
11503 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11504 * configure: Regenerate.
11505 * config.in: Regenerate.
11506 * server.h (NEED_DECLARATION_STRERROR):
11507 Replace with !HAVE_DECL_STRERROR.
11508
11509 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11510
11511 * linux-low.c (linux_wait, linux_send_signal): Don't test
11512 an unsigned long variable for > 0 if it could be MAX_ULONG.
11513 * server.c (myresume): Likewise.
11514 * target.c (set_desired_inferior): Likewise.
11515
11516 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11517
11518 * configure.ac: Simplify and improve check for socklen_t.
11519 * configure, config.in: Regenerate.
11520
11521 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11522
11523 * acconfig.h: Remove.
11524 * configure.ac: Add a test for socklen_t. Use three-argument
11525 AC_DEFINE throughout.
11526 * config.in: Regenerated using autoheader 2.59.
11527 * configure: Regenerated.
11528
11529 * gdbreplay.c (socklen_t): Provide a default.
11530 (remote_open): Use socklen_t.
11531 * remote-utils.c (socklen_t): Provide a default.
11532 (remote_open): Use socklen_t.
11533 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11534 unsigned char.
11535
11536 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11537 char for buffers.
11538 * linux-low.c (linux_read_memory, linux_write_memory)
11539 (linux_read_auxv): Likewise.
11540 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11541 (check_mem_write): Likewise.
11542 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11543 Likewise.
11544 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11545 (registers_from_string, register_data): Likewise.
11546 * server.c (handle_query, main): Likewise.
11547 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11548 (decode_M_packet): Likewise.
11549 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11550 * target.h (struct target_ops): Update read_memory, write_memory,
11551 and read_auxv.
11552 (read_inferior_memory, write_inferior_memory): Update.
11553 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11554 to unsigned char *.
11555 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11556 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11557 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11558 linux-s390-low.c, linux-sh-low.c: Update for changes in
11559 read_inferior_memory and the_low_target->breakpoint.
11560
11561 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11562
11563 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11564 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11565 * configure.srv: Add powerpc64-*-linux*.
11566 * linux-ppc64-low.c: New file.
11567
11568 2005-05-23 Orjan Friberg <orjanf@axis.com>
11569
11570 * linux-cris-low.c: New file with support for CRIS.
11571 * linux-crisv32-low.c: Ditto for CRISv32.
11572 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11573 (clean): Add reg-cris.c and reg-crisv32.c.
11574 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11575 reg-crisv32.o, and reg-crisv32.c to make rules.
11576 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11577 recognized targets.
11578
11579 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11580
11581 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11582 of sizeof (PTRACE_XFER_TYPE).
11583 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11584
11585 2005-05-12 Orjan Friberg <orjanf@axis.com>
11586
11587 * target.h (struct target_ops): Add insert_watchpoint,
11588 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11589 pointers for hardware watchpoint support.
11590 * linux-low.h (struct linux_target_ops): Ditto.
11591 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11592 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11593 to linux_target_ops.
11594 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11595 reply packet.
11596 * server.c (main): Recognize 'Z' and 'z' packets.
11597
11598 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11599
11600 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11601 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11602 (the_low_target): Add new members.
11603
11604 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11605
11606 * proc-service.c (ps_lgetregs): Search all_processes instead of
11607 all_threads.
11608
11609 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11610
11611 * server.c (start_inferior): Change return type to int.
11612 (attach_inferior): Change sigptr to int *.
11613 (handle_v_cont, handle_v_requests): Change signal to int *.
11614 (main): Change signal to int.
11615
11616 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11617
11618 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11619 * configure.srv: Add m32r*-*-linux*.
11620 * linux-m32r-low.c: New file.
11621
11622 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11623
11624 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11625
11626 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11627
11628 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11629 Take unsigned long arguments for PIDs.
11630 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11631 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11632 (wait_for_sigstop, linux_resume_one_process)
11633 (regsets_fetch_inferior_registers, linux_send_signal)
11634 (linux_read_auxv): Likewise. Update the types of variables holding
11635 PIDs. Update format string specifiers.
11636 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11637 * remote-utils.c (prepare_resume_reply): Likewise.
11638 * server.c (cont_thread, general_thread, step_thread)
11639 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11640 unsigned long.
11641 (handle_query): Update format specifiers.
11642 (handle_v_cont, main): Use strtoul for thread IDs.
11643 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11644 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11645 (general_thread, step_thread, thread_from_wait)
11646 (old_thread_from_wait): Update.
11647 * target.h (struct thread_resume): Use unsigned long for THREAD.
11648 (struct target_ops): Use unsigned long for arguments to attach and
11649 thread_alive.
11650
11651 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11652
11653 * acinclude.m4: Include bfd/bfd.m4 directly.
11654 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11655 <agriffis@toolchain.org>.
11656 * aclocal.m4, configure: Regenerated.
11657
11658 2005-01-07 Andrew Cagney <cagney@gnu.org>
11659
11660 * configure.ac: Rename configure.in, require autoconf 2.59.
11661 * configure: Re-generate.
11662
11663 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11664
11665 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11666 LIBS when finished.
11667 * aclocal.m4: Regenerated.
11668 * configure: Regenerated.
11669
11670 2004-11-21 Andreas Schwab <schwab@suse.de>
11671
11672 * linux-m68k-low.c (m68k_num_gregs): Define.
11673 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11674 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11675 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11676 (m68k_breakpoint_at): New. Add to the_low_target.
11677
11678 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11679 srv_linux_thread_db to yes.
11680
11681 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11682
11683 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11684 (ARCH_SET_FS): Likewise.
11685 (ARCH_GET_FS): Likewise.
11686 (ARCH_GET_GS): Likewise.
11687
11688 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11689
11690 * linux-i386-low.c (ps_get_thread_area): New.
11691 * linux-x86-64-low.c (ps_get_thread_area): New.
11692 * linux-low.c: Include <sys/syscall.h>.
11693 (linux_kill_one_process): Don't kill the first thread here.
11694 (linux_kill): Kill the first thread here.
11695 (kill_lwp): New function.
11696 (send_sigstop, linux_send_signal): Use it.
11697 * proc-service.c: Clean up #ifdefs.
11698 (fpregset_info): Delete.
11699 (ps_lgetregs): Update and enable implementation.
11700 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11701 implementations.
11702 * remote-utils.c (struct sym_cache, symbol_cache): New.
11703 (input_interrupt): Print a clearer message.
11704 (async_io_enabled): New variable.
11705 (enable_async_io, disable_async_io): Use it. Update comments.
11706 (look_up_one_symbol): Use the symbol cache.
11707 * thread-db.c (thread_db_look_up_symbols): New function.
11708 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11709
11710 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11711
11712 * configure.in: Test for -rdynamic.
11713 * configure: Regenerated.
11714 * Makefile (INTERNAL_LDFLAGS): New.
11715 (gdbserver, gdbreplay): Use it.
11716
11717 2004-09-02 Andrew Cagney <cagney@gnu.org>
11718
11719 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11720
11721 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11722
11723 * linux-low.c (linux_wait): Clear all_processes list also.
11724
11725 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11726
11727 * linux-low.c: Include <errno.h>. Remove extern declaration of
11728 errno.
11729
11730 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11731
11732 * gdbreplay.c, server.h, utils.c: Update copyright years.
11733
11734 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11735
11736 * server.c (main): Print child status or termination signal from
11737 variable 'signal', not 'sig'.
11738
11739 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11740
11741 * linux-low.c (linux_read_memory): Change return type to
11742 int. Check for and return error from ptrace().
11743 * target.c (read_inferior_memory): Change return type to int. Pass
11744 back return status from the_target->read_memory().
11745 * target.h (struct target_ops): Adapt *read_memory() prototype.
11746 Update comment.
11747 (read_inferior_memory): Adapt prototype.
11748 * server.c (main): Return an error packet if
11749 read_inferior_memory() returns an error.
11750
11751 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11752
11753 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11754 Unify with other clean targets.
11755
11756 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11757
11758 * server.c (handle_v_cont): Call set_desired_inferior.
11759
11760 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11761
11762 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11763
11764 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11765
11766 * linux-low.c (linux_wait): Unblock async I/O.
11767 (linux_resume): Block and enable async I/O.
11768 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11769 * server.h (block_async_io, unblock_async_io): Add prototypes.
11770
11771 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11772
11773 * remote-utils.c (remote_open): Print a status notice after
11774 opening a TCP port.
11775 * server.c (attach_inferior): Print a status notice after
11776 attaching.
11777
11778 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11779
11780 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11781
11782 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11783
11784 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11785 error packet.
11786 * server.c, target.h: Update copyright years.
11787
11788 2004-02-25 Roland McGrath <roland@redhat.com>
11789
11790 * target.h (struct target_ops): New member `read_auxv'.
11791 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11792 * linux-low.c (linux_read_auxv): New function.
11793 (linux_target_ops): Initialize `read_auxv' member to that.
11794
11795 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11796
11797 Committed by Jim Blandy <jimb@redhat.com>.
11798
11799 * linux-s390-low.c (s390_num_regs): Update.
11800 (s390_regmap): Remove control registers. Use __s390x__ predefine
11801 instead of GPR_SIZE to distiguish s390 and s390x targets.
11802
11803 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11804
11805 * linux-low.c: Update copyright year.
11806 (check_removed_breakpoint): Clear pending_is_breakpoint.
11807 (linux_set_resume_request, linux_queue_one_thread)
11808 (resume_status_pending_p): New functions.
11809 (linux_continue_one_thread): Use process->resume.
11810 (linux_resume): Only resume threads if there are no pending events.
11811 * linux-low.h (struct process_info): Add resume request
11812 pointer.
11813
11814 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11815
11816 * regcache.c (new_register_cache): Clear the allocated register
11817 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11818
11819 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11820
11821 * linux-low.c (linux_resume): Take a struct thread_resume *
11822 argument.
11823 (linux_wait): Update call.
11824 (resume_ptr): New static variable.
11825 (linux_continue_one_thread): Renamed from
11826 linux_continue_one_process. Use resume_ptr.
11827 (linux_resume): Use linux_continue_one_thread.
11828 * server.c (handle_v_cont, handle_v_requests): New functions.
11829 (myresume): New function.
11830 (main): Handle 'v' case.
11831 * target.h (struct thread_resume): New type.
11832 (struct target_ops): Change argument of "resume" to struct
11833 thread_resume *.
11834 (myresume): Delete macro.
11835
11836 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11837
11838 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11839 (uninstall): Support DESTDIR.
11840
11841 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11842
11843 * configure.srv: Add xscale*linux copy of arm*linux entry.
11844
11845 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11846
11847 * linux-arm-low.c (arm_reinsert_addr): New function.
11848 (the_low_target): Add arm_reinsert_addr.
11849
11850 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11851
11852 * mem-break.c: Remove whitespace at end of file.
11853
11854 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11855
11856 * configure.in: Check whether we need to prototype strerror.
11857 * server.h: Optionally prototype strerror.
11858 * gdbreplay.c (perror_with_name): Use strerror.
11859 * linux-low.c (linux_attach_lwp): Use strerror.
11860 * utils.c (perror_with_name): Use strerror.
11861 * config.in, configure: Regenerated.
11862
11863 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11864
11865 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11866 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11867
11868 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11869
11870 * Makefile.in (SFILES): Update.
11871 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11872 low-sun3.c: Remove files.
11873
11874 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11875
11876 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11877 (linux_detach_one_process, linux_detach): New functions.
11878 (linux_target_ops): Add linux_detach.
11879 * server.c (main): Handle 'D' packet.
11880 * target.h (struct target_ops): Add "detach" member.
11881 (detach_inferior): Define.
11882
11883 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11884
11885 From Kelley Cook <kelleycook@wideopenwest.com>:
11886 * configure.srv: Accept i[34567]86 variants.
11887
11888 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11889
11890 * linux-low.c (linux_wait_for_event): Correct comment typos.
11891 (linux_resume_one_process): Call check_removed_breakpoint.
11892 (linux_send_signal): New function.
11893 (linux_target_ops): Add linux_send_signal.
11894 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11895 of kill.
11896 * target.h (struct target_ops): Add send_signal.
11897
11898 2003-05-29 Jim Blandy <jimb@redhat.com>
11899
11900 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11901 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11902 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11903 away part of the register's value.
11904
11905 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11906
11907 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11908 (linux_wait_for_event, linux_init_signals): Likewise.
11909
11910 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11911
11912 * configure.in: Check for stdlib.h.
11913 * configure: Regenerated.
11914 * config.in: Regenerated.
11915
11916 2003-01-04 Andreas Schwab <schwab@suse.de>
11917
11918 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11919
11920 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11921
11922 * Makefile.in: Remove obsolete code.
11923
11924 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11925
11926 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11927 defined(PT_FPR0_HI).
11928
11929 2002-11-17 Stuart Hughes <seh@zee2.com>
11930
11931 * linux-arm-low.c (arm_num_regs): Increase.
11932 (arm_regmap): Include status register.
11933
11934 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11935
11936 * linux-low.c (register_addr): Remove incorrect -1 check.
11937
11938 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11939
11940 * linux-low.c (linux_create_inferior): Call setpgid. Return
11941 the new PID.
11942 (unstopped_p, linux_signal_pid): Remove.
11943 (linux_target_ops): Remove linux_signal_pid.
11944 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11945 global instead of target method.
11946 * target.h (struct target_ops): Remove signal_pid. Update comment
11947 for create_inferior.
11948 * server.c (signal_pid): New variable.
11949 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11950 gdbserver. Set the child to be the foreground process group.
11951 (attach_inferior): Set signal_pid.
11952
11953 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11954
11955 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11956
11957 2002-08-20 Jim Blandy <jimb@redhat.com>
11958
11959 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11960 default for this.
11961
11962 2002-08-01 Andrew Cagney <cagney@redhat.com>
11963
11964 * Makefile.in: Make chill references obsolete.
11965
11966 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11967
11968 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11969 * configure: Regenerate.
11970 * config.in: Regenerate.
11971
11972 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11973
11974 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11975 (perror_with_name, remote_close, remote_open, expect, play): Static.
11976
11977 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11978
11979 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11980 byte offsets instead of an array of indexes.
11981 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11982
11983 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11984
11985 * regcache.c: Add comment.
11986
11987 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11988
11989 * thread-db.c: New file.
11990 * proc-service.c: New file.
11991 * acinclude.m4: New file.
11992 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11993 proc-service.o, and thread-db.o.
11994 (linux-low.o): Add USE_THREAD_DB.
11995 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11996 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11997 * aclocal.m4: Regenerated.
11998 * config.in: Regenerated.
11999 * configure: Regenerated.
12000 * configure.in: Check for proc_service.h, sys/procfs.h,
12001 thread_db.h, and linux/elf.h headrs.
12002 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12003 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12004 Check for -lthread_db and thread support.
12005 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12006 PowerPC, and SuperH.
12007 * i387-fp.c: Constify arguments.
12008 * i387-fp.h: Likewise.
12009 * inferiors.c: (struct thread_info): Renamed from
12010 `struct inferior_info'. Remove PID member. Use generic inferior
12011 list header. All uses updated.
12012 (inferiors, signal_pid): Removed.
12013 (all_threads): New variable.
12014 (get_thread): Define.
12015 (add_inferior_to_list): New function.
12016 (for_each_inferior): New function.
12017 (change_inferior_id): New function.
12018 (add_inferior): Removed.
12019 (remove_inferior): New function.
12020 (add_thread): New function.
12021 (free_one_thread): New function.
12022 (remove_thread): New function.
12023 (clear_inferiors): Use for_each_inferior and free_one_thread.
12024 (find_inferior): New function.
12025 (find_inferior_id): New function.
12026 (inferior_target_data): Update argument type.
12027 (set_inferior_target_data): Likewise.
12028 (inferior_regcache_data): Likewise.
12029 (set_inferior_regcache_data): Likewise.
12030 * linux-low.c (linux_bp_reinsert): Remove.
12031 (all_processes, stopping_threads, using_thrads)
12032 (struct pending_signals, debug_threads, pid_of): New.
12033 (inferior_pid): Replace with macro.
12034 (struct inferior_linux_data): Remove.
12035 (get_stop_pc, add_process): New functions.
12036 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12037 Use add_process and add_thread.
12038 (linux_attach_lwp): New function, based on old linux_attach. Use
12039 add_process and add_thread. Set stop_expected for new threads.
12040 (linux_attach): New function.
12041 (linux_kill_one_process): New function.
12042 (linux_kill): Kill all LWPs.
12043 (linux_thread_alive): Use find_inferior_id.
12044 (check_removed_breakpoints, status_pending_p): New functions.
12045 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12046 Update. Use WNOHANG. Wait for cloned processes also. Update process
12047 struct for the found process.
12048 (linux_wait_for_event): New function.
12049 (linux_wait): Use it. Support LWPs.
12050 (send_sigstop, wait_for_sigstop, stop_all_processes)
12051 (linux_resume_one_process, linux_continue_one_process): New functions.
12052 (linux_resume): Support LWPs.
12053 (REGISTER_RAW_SIZE): Remove.
12054 (fetch_register): Use register_size instead. Call supply_register.
12055 (usr_store_inferior_registers): Likewise. Call collect_register.
12056 Fix recursive case.
12057 (regsets_fetch_inferior_registers): Improve error message.
12058 (regsets_store_inferior_registers): Add debugging.
12059 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12060 (unstopped_p, linux_signal_pid): New functions.
12061 (linux_target_ops): Add linux_signal_pid.
12062 (linux_init_signals): New function.
12063 (initialize_low): Call it. Initialize using_threads.
12064 * regcache.c (inferior_regcache_data): Add valid
12065 flag.
12066 (get_regcache): Fetch registers lazily. Add fetch argument
12067 and update all callers.
12068 (regcache_invalidate_one, regcache_invalidate): New
12069 functions.
12070 (new_register_cache): Renamed from create_register_cache.
12071 Return the new regcache.
12072 (free_register_cache): Change argument to a void *.
12073 (registers_to_string, registers_from_string): Call get_regcache
12074 with fetch flag set.
12075 (register_data): Make static. Pass fetch flag to get_regcache.
12076 (supply_register): Call get_regcache with fetch flag clear.
12077 (collect_register): Call get_regcache with fetch flag set.
12078 (collect_register_as_string): New function.
12079 * regcache.h: Update.
12080 * remote-utils.c (putpkt): Flush after debug output and use
12081 stderr.
12082 Handle input interrupts while waiting for an ACK.
12083 (input_interrupt): Use signal_pid method.
12084 (getpkt): Flush after debug output and use stderr.
12085 (outreg): Use collect_register_as_string.
12086 (new_thread_notify, dead_thread_notify): New functions.
12087 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12088 and general_thread.
12089 (look_up_one_symbol): Flush after debug output.
12090 * server.c (step_thread, server_waiting): New variables.
12091 (start_inferior): Don't use signal_pid. Update call to mywait.
12092 (attach_inferior): Update call to mywait.
12093 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12094 (main): Don't fetch/store registers explicitly. Use
12095 set_desired_inferior. Support proposed ``Hs'' packet. Update
12096 calls to mywait.
12097 * server.h: Update.
12098 (struct inferior_list, struct_inferior_list_entry): New.
12099 * target.c (set_desired_inferior): New.
12100 (write_inferior_memory): Constify.
12101 (mywait): New function.
12102 * target.h: Update.
12103 (struct target_ops): New signal_pid method.
12104 (mywait): Removed macro, added prototype.
12105
12106 * linux-low.h (regset_func): Removed.
12107 (regset_fill_func, regset_store_func): New.
12108 (enum regset_type): New.
12109 (struct regset_info): Add type field. Use new operation types.
12110 (struct linux_target_ops): stop_pc renamed to get_pc.
12111 Add decr_pc_after_break and breakpoint_at.
12112 (get_process, get_thread_proess, get_process_thread)
12113 (strut process_info, all_processes, linux_attach_lwp)
12114 (thread_db_init): New.
12115
12116 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12117 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12118 (the_low_target): Add new members.
12119 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12120 (i386_store_fpxregset): Constify.
12121 (target_regsets): Add new kind identifier.
12122 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12123 (i386_set_pc): Add debugging.
12124 (i386_breakpoint_at): New function.
12125 (the_low_target): Add new members.
12126 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12127 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12128 (mips_breakpoint_at): New.
12129 (the_low_target): Add new members.
12130 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12131 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12132 (the_low_target): Add new members.
12133 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12134 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12135 (the_low_target): Add new members.
12136 * linux-x86-64-low.c (target_regsets): Add new kind
12137 identifier.
12138
12139 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12140
12141 From Martin Pool <mbp@samba.org>:
12142 * server.c (gdbserver_usage): New function.
12143 (main): Call it.
12144
12145 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12146
12147 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12148 stop_at -> stop_pc.
12149
12150 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12151
12152 * Makefile.in: Remove obsolete code.
12153
12154 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12155
12156 * linux-low.c (regsets_fetch_inferior_registers),
12157 (regsets_store_inferior_registers): Removed cast to int from
12158 ptrace() calls.
12159 * regcache.h: Added declaration of struct inferior_info.
12160
12161 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12162
12163 * inferiors.c (struct inferior_info): Add regcache_data.
12164 (add_inferior): Call create_register_cache.
12165 (clear_inferiors): Call free_register_cache.
12166 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12167 * regcache.c (struct inferior_regcache_data): New.
12168 (registers): Remove.
12169 (get_regcache): New function.
12170 (create_register_cache, free_register_cache): New functions.
12171 (set_register_cache): Don't initialize the register cache here.
12172 (registers_to_string, registers_from_string, register_data): Call
12173 get_regcache.
12174 * regcache.h: Add prototypes.
12175 * server.h: Likewise.
12176
12177 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12178
12179 * mem-break.c: New file.
12180 * mem-break.h: New file.
12181 * Makefile.in: Add mem-break.o rule; update server.h
12182 dependencies.
12183 * inferiors.c (struct inferior_info): Add target_data
12184 member.
12185 (clear_inferiors): Free target_data member if set.
12186 (inferior_target_data, set_inferior_target_data): New functions.
12187 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12188 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12189 * linux-low.c (linux_bp_reinsert): New variable.
12190 (struct inferior_linux_data): New.
12191 (linux_create_inferior): Use set_inferior_target_data.
12192 (linux_attach): Likewise. Call add_inferior.
12193 (linux_wait_for_one_inferior): New function.
12194 (linux_wait): Call it.
12195 (linux_write_memory): Add const.
12196 (initialize_low): Call set_breakpoint_data.
12197 * linux-low.h (struct linux_target_ops): Add breakpoint
12198 handling members.
12199 * server.c (attach_inferior): Remove extra add_inferior
12200 call.
12201 * server.h: Include mem-break.h. Update inferior.c
12202 prototypes.
12203 * target.c (read_inferior_memory)
12204 (write_inferior_memory): New functions.
12205 * target.h (read_inferior_memory)
12206 (write_inferior_memory): Change macros to prototypes.
12207 (struct target_ops): Update comments. Add const to write_memory
12208 definition.
12209
12210 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12211
12212 * linux-low.c (usr_store_inferior_registers): Support
12213 registers which are allowed to fail to store.
12214 * linux-low.h (linux_target_ops): Likewise.
12215 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12216 (ppc_cannot_store_register): FPSCR may not be storable.
12217
12218 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12219
12220 * server.h: Include <string.h> if HAVE_STRING_H.
12221 * ChangeLog: Correct paths in last ChangeLog entry.
12222
12223 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12224
12225 * linux-low.h: Remove obsolete prototypes.
12226 (struct linux_target_ops): New.
12227 (extern the_low_target): New.
12228 * linux-low.c (num_regs, regmap): Remove declarations.
12229 (register_addr): Use the_low_target explicitly.
12230 (fetch_register): Likewise.
12231 (usr_fetch_inferior_registers): Likewise.
12232 (usr_store_inferior_registers): Likewise.
12233 * linux-arm-low.c (num_regs): Remove.
12234 (arm_num_regs): Define.
12235 (arm_regmap): Renamed from regmap, made static.
12236 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12237 made static.
12238 (arm_cannot_store_register): Renamed from cannot_store_register,
12239 made static.
12240 (the_low_target): New.
12241 * linux-i386-low.c (num_regs): Remove.
12242 (i386_num_regs): Define.
12243 (i386_regmap): Renamed from regmap, made static.
12244 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12245 made static.
12246 (i386_cannot_store_register): Renamed from cannot_store_register,
12247 made static.
12248 (the_low_target): New.
12249 * linux-ia64-low.c (num_regs): Remove.
12250 (ia64_num_regs): Define.
12251 (ia64_regmap): Renamed from regmap, made static.
12252 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12253 made static.
12254 (ia64_cannot_store_register): Renamed from cannot_store_register,
12255 made static.
12256 (the_low_target): New.
12257 * linux-m68k-low.c (num_regs): Remove.
12258 (m68k_num_regs): Define.
12259 (m68k_regmap): Renamed from regmap, made static.
12260 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12261 made static.
12262 (m68k_cannot_store_register): Renamed from cannot_store_register,
12263 made static.
12264 (the_low_target): New.
12265 * linux-mips-low.c (num_regs): Remove.
12266 (mips_num_regs): Define.
12267 (mips_regmap): Renamed from regmap, made static.
12268 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12269 made static.
12270 (mips_cannot_store_register): Renamed from cannot_store_register,
12271 made static.
12272 (the_low_target): New.
12273 * linux-ppc-low.c (num_regs): Remove.
12274 (ppc_num_regs): Define.
12275 (ppc_regmap): Renamed from regmap, made static.
12276 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12277 made static.
12278 (ppc_cannot_store_register): Renamed from cannot_store_register,
12279 made static.
12280 (the_low_target): New.
12281 * linux-s390-low.c (num_regs): Remove.
12282 (s390_num_regs): Define.
12283 (s390_regmap): Renamed from regmap, made static.
12284 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12285 made static.
12286 (s390_cannot_store_register): Renamed from cannot_store_register,
12287 made static.
12288 (the_low_target): New.
12289 * linux-sh-low.c (num_regs): Remove.
12290 (sh_num_regs): Define.
12291 (sh_regmap): Renamed from regmap, made static.
12292 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12293 made static.
12294 (sh_cannot_store_register): Renamed from cannot_store_register,
12295 made static.
12296 (the_low_target): New.
12297 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12298 (the_low_target): New.
12299
12300 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12301
12302 * Makefile.in: Add stamp-h target.
12303 * configure.in: Create stamp-h.
12304 * configure: Regenerated.
12305
12306 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12307
12308 * inferiors.c: New file.
12309 * target.c: New file.
12310 * target.h: New file.
12311 * Makefile.in: Add target.o and inferiors.o. Update
12312 dependencies.
12313 * linux-low.c (inferior_pid): New static variable,
12314 moved from server.c.
12315 (linux_create_inferior): Renamed from create_inferior.
12316 Call add_inferior. Return 0 on success instead of a PID.
12317 (linux_attach): Renamed from myattach.
12318 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12319 (linux_thread_alive): Renamed from mythread_alive.
12320 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12321 child dies.
12322 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12323 (regsets_store_inferior_registers): Correct error message.
12324 Add missing ``return 0''.
12325 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12326 (linux_store_registers): Renamed from store_inferior_registers.
12327 (linux_read_memory): Renamed from read_inferior_memory.
12328 (linux_write_memory): Renamed from write_inferior_memory.
12329 (linux_target_ops): New structure.
12330 (initialize_low): Call set_target_ops ().
12331 * remote-utils.c (unhexify): New function.
12332 (hexify): New function.
12333 (input_interrupt): Send signals to ``signal_pid''.
12334 * server.c (inferior_pid): Remove.
12335 (start_inferior): Update create_inferior call.
12336 (attach_inferior): Call add_inferior.
12337 (handle_query): New function.
12338 (main): Call handle_query for `q' packets.
12339 * server.h: Include "target.h". Remove obsolete prototypes.
12340 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12341
12342 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12343
12344 * Makefile.in: Add WARN_CFLAGS. Update configury
12345 dependencies.
12346 * configure.in: Check for <string.h>
12347 * configure: Regenerate.
12348 * config.in: Regenerate.
12349 * gdbreplay.c: Include needed system headers.
12350 (remote_open): Remove strchr prototype.
12351 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12352 * regcache.c (supply_register): Change buf argument to const void *.
12353 (supply_register_by_name): Likewise.
12354 (collect_register): Change buf argument to void *.
12355 (collect_register_by_name): Likewise.
12356 * regcache.h: Add missing prototypes.
12357 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12358 * server.c (handle_query): New function.
12359 (attached): New static variable, moved out of main.
12360 (main): Quiet longjmp clobber warnings.
12361 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12362 * utils.c (error): Remove NORETURN.
12363 (fatal): Likewise.
This page took 0.27208 seconds and 5 git commands to generate.