Support displaced stepping in aarch64-linux
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2015-10-12  Yao Qi  <yao.qi@linaro.org>
2
3         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4         arch/aarch64-insn.h.
5         (struct aarch64_memory_operand): Likewise.
6         (ENCODE): Likewise.
7         (emit_insn): Move to arch/aarch64-insn.c.
8         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9         (emit_load_store): Move to arch/aarch64-insn.c.
10         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
11         (can_encode_int32): Remove.
12
13 2015-10-12  Yao Qi  <yao.qi@linaro.org>
14
15         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
16         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
17         (aarch64_relocate_instruction): Likewise.
18         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
19         (struct aarch64_insn_visitor): Likewise.
20
21 2015-10-12  Yao Qi  <yao.qi@linaro.org>
22
23         * linux-aarch64-low.c (struct aarch64_insn_data): New.
24         (struct aarch64_insn_visitor): New.
25         (struct aarch64_insn_relocation_data): New.
26         (aarch64_ftrace_insn_reloc_b): New function.
27         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
28         (aarch64_ftrace_insn_reloc_cb): Likewise.
29         (aarch64_ftrace_insn_reloc_tb): Likewise.
30         (aarch64_ftrace_insn_reloc_adr): Likewise.
31         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
32         (aarch64_ftrace_insn_reloc_others): Likewise.
33         (visitor): New.
34         (aarch64_relocate_instruction): Use visitor.
35
36 2015-10-12  Yao Qi  <yao.qi@linaro.org>
37
38         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
39         int.  Add argument buf.
40         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
41         aarch64_relocate_instruction.
42
43 2015-10-12  Yao Qi  <yao.qi@linaro.org>
44
45         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
46         argument insn.  Remove local variable insn.  Don't call
47         target_read_uint32.
48         (aarch64_install_fast_tracepoint_jump_pad): Call
49         target_read_uint32.
50
51 2015-09-30  Yao Qi  <yao.qi@linaro.org>
52
53         * linux-aarch64-low.c (emit_movk): Shorten a long line.
54         (emit_load_store_pair): Likewise.
55
56 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
57
58         * dll.c (match_dll): Add cast(s).
59         (unloaded_dll): Likewise.
60         * linux-low.c (second_thread_of_pid_p): Likewise.
61         (delete_lwp_callback): Likewise.
62         (count_events_callback): Likewise.
63         (select_event_lwp_callback): Likewise.
64         (linux_set_resume_request): Likewise.
65         * server.c (accumulate_file_name_length): Likewise.
66         (emit_dll_description): Likewise.
67         (handle_qxfer_threads_worker): Likewise.
68         (visit_actioned_threads): Likewise.
69         * thread-db.c (any_thread_of): Likewise.
70         * tracepoint.c (same_process_p): Likewise.
71         (match_blocktype): Likewise.
72         (build_traceframe_info_xml): Likewise.
73
74 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
75
76         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
77         assignment.
78         (gdb_unparse_agent_expr): Likewise.
79         * hostio.c (require_data): Likewise.
80         (handle_pread): Likewise.
81         * linux-low.c (disable_regset): Likewise.
82         (fetch_register): Likewise.
83         (store_register): Likewise.
84         (get_dynamic): Likewise.
85         (linux_qxfer_libraries_svr4): Likewise.
86         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
87         (set_fast_tracepoint_jump): Likewise.
88         (uninsert_fast_tracepoint_jumps_at): Likewise.
89         (reinsert_fast_tracepoint_jumps_at): Likewise.
90         (validate_inserted_breakpoint): Likewise.
91         (clone_agent_expr): Likewise.
92         * regcache.c (init_register_cache): Likewise.
93         * remote-utils.c (putpkt_binary_1): Likewise.
94         (decode_M_packet): Likewise.
95         (decode_X_packet): Likewise.
96         (look_up_one_symbol): Likewise.
97         (relocate_instruction): Likewise.
98         (monitor_output): Likewise.
99         * server.c (handle_search_memory): Likewise.
100         (handle_qxfer_exec_file): Likewise.
101         (handle_qxfer_libraries): Likewise.
102         (handle_qxfer): Likewise.
103         (handle_query): Likewise.
104         (handle_v_cont): Likewise.
105         (handle_v_run): Likewise.
106         (captured_main): Likewise.
107         * target.c (write_inferior_memory): Likewise.
108         * thread-db.c (try_thread_db_load_from_dir): Likewise.
109         * tracepoint.c (init_trace_buffer): Likewise.
110         (add_tracepoint_action): Likewise.
111         (add_traceframe): Likewise.
112         (add_traceframe_block): Likewise.
113         (cmd_qtdpsrc): Likewise.
114         (cmd_qtdv): Likewise.
115         (cmd_qtstatus): Likewise.
116         (response_source): Likewise.
117         (response_tsv): Likewise.
118         (cmd_qtnotes): Likewise.
119         (gdb_collect): Likewise.
120         (initialize_tracepoint): Likewise.
121
122 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
123
124         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
125         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
126         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
127         <NOP>: New.
128         (enum aarch64_condition_codes): New enum.
129         (w0): New static global.
130         (fp): Likewise.
131         (lr): Likewise.
132         (struct aarch64_memory_operand) <type>: New
133         MEMORY_OPERAND_POSTINDEX type.
134         (postindex_memory_operand): New helper function.
135         (emit_ret): New function.
136         (emit_load_store_pair): New function, factored out of emit_stp
137         with support for MEMORY_OPERAND_POSTINDEX.
138         (emit_stp): Rewrite using emit_load_store_pair.
139         (emit_ldp): New function.
140         (emit_load_store): Likewise.
141         (emit_ldr): Mention post-index instruction in comment.
142         (emit_ldrh): New function.
143         (emit_ldrb): New function.
144         (emit_ldrsw): Mention post-index instruction in comment.
145         (emit_str): Likewise.
146         (emit_subs): New function.
147         (emit_cmp): Likewise.
148         (emit_and): Likewise.
149         (emit_orr): Likewise.
150         (emit_orn): Likewise.
151         (emit_eor): Likewise.
152         (emit_mvn): Likewise.
153         (emit_lslv): Likewise.
154         (emit_lsrv): Likewise.
155         (emit_asrv): Likewise.
156         (emit_mul): Likewise.
157         (emit_sbfm): Likewise.
158         (emit_sbfx): Likewise.
159         (emit_ubfm): Likewise.
160         (emit_ubfx): Likewise.
161         (emit_csinc): Likewise.
162         (emit_cset): Likewise.
163         (emit_nop): Likewise.
164         (emit_ops_insns): New helper function.
165         (emit_pop): Likewise.
166         (emit_push): Likewise.
167         (aarch64_emit_prologue): New function.
168         (aarch64_emit_epilogue): Likewise.
169         (aarch64_emit_add): Likewise.
170         (aarch64_emit_sub): Likewise.
171         (aarch64_emit_mul): Likewise.
172         (aarch64_emit_lsh): Likewise.
173         (aarch64_emit_rsh_signed): Likewise.
174         (aarch64_emit_rsh_unsigned): Likewise.
175         (aarch64_emit_ext): Likewise.
176         (aarch64_emit_log_not): Likewise.
177         (aarch64_emit_bit_and): Likewise.
178         (aarch64_emit_bit_or): Likewise.
179         (aarch64_emit_bit_xor): Likewise.
180         (aarch64_emit_bit_not): Likewise.
181         (aarch64_emit_equal): Likewise.
182         (aarch64_emit_less_signed): Likewise.
183         (aarch64_emit_less_unsigned): Likewise.
184         (aarch64_emit_ref): Likewise.
185         (aarch64_emit_if_goto): Likewise.
186         (aarch64_emit_goto): Likewise.
187         (aarch64_write_goto_address): Likewise.
188         (aarch64_emit_const): Likewise.
189         (aarch64_emit_call): Likewise.
190         (aarch64_emit_reg): Likewise.
191         (aarch64_emit_pop): Likewise.
192         (aarch64_emit_stack_flush): Likewise.
193         (aarch64_emit_zero_ext): Likewise.
194         (aarch64_emit_swap): Likewise.
195         (aarch64_emit_stack_adjust): Likewise.
196         (aarch64_emit_int_call_1): Likewise.
197         (aarch64_emit_void_call_2): Likewise.
198         (aarch64_emit_eq_goto): Likewise.
199         (aarch64_emit_ne_goto): Likewise.
200         (aarch64_emit_lt_goto): Likewise.
201         (aarch64_emit_le_goto): Likewise.
202         (aarch64_emit_gt_goto): Likewise.
203         (aarch64_emit_ge_got): Likewise.
204         (aarch64_emit_ops_impl): New static global variable.
205         (aarch64_emit_ops): New target function, return
206         &aarch64_emit_ops_impl.
207         (struct linux_target_ops): Install it.
208
209 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
210
211         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
212         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
213         aarch64-ipa.o.
214         * linux-aarch64-ipa.c: New file.
215         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
216         and endian.h.
217         (aarch64_get_thread_area): New target method.
218         (extract_signed_bitfield): New helper function.
219         (aarch64_decode_ldr_literal): New function.
220         (enum aarch64_opcodes): New enum.
221         (struct aarch64_register): New struct.
222         (struct aarch64_operand): New struct.
223         (x0): New static global.
224         (x1): Likewise.
225         (x2): Likewise.
226         (x3): Likewise.
227         (x4): Likewise.
228         (w2): Likewise.
229         (ip0): Likewise.
230         (sp): Likewise.
231         (xzr): Likewise.
232         (aarch64_register): New helper function.
233         (register_operand): Likewise.
234         (immediate_operand): Likewise.
235         (struct aarch64_memory_operand): New struct.
236         (offset_memory_operand): New helper function.
237         (preindex_memory_operand): Likewise.
238         (enum aarch64_system_control_registers): New enum.
239         (ENCODE): New macro.
240         (emit_insn): New helper function.
241         (emit_b): New function.
242         (emit_bcond): Likewise.
243         (emit_cb): Likewise.
244         (emit_tb): Likewise.
245         (emit_blr): Likewise.
246         (emit_stp): Likewise.
247         (emit_ldp_q_offset): Likewise.
248         (emit_stp_q_offset): Likewise.
249         (emit_load_store): Likewise.
250         (emit_ldr): Likewise.
251         (emit_ldrsw): Likewise.
252         (emit_str): Likewise.
253         (emit_ldaxr): Likewise.
254         (emit_stxr): Likewise.
255         (emit_stlr): Likewise.
256         (emit_data_processing_reg): Likewise.
257         (emit_data_processing): Likewise.
258         (emit_add): Likewise.
259         (emit_sub): Likewise.
260         (emit_mov): Likewise.
261         (emit_movk): Likewise.
262         (emit_mov_addr): Likewise.
263         (emit_mrs): Likewise.
264         (emit_msr): Likewise.
265         (emit_sevl): Likewise.
266         (emit_wfe): Likewise.
267         (append_insns): Likewise.
268         (can_encode_int32_in): New helper function.
269         (aarch64_relocate_instruction): New function.
270         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
271         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
272         (struct linux_target_ops): Install aarch64_get_thread_area,
273         aarch64_install_fast_tracepoint_jump_pad and
274         aarch64_get_min_fast_tracepoint_insn_len.
275
276 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
277
278         * Makefile.in (aarch64-insn.o): New rule.
279         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
280
281 2015-09-21  Yao Qi  <yao.qi@linaro.org>
282
283         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
284
285 2015-09-21  Yao Qi  <yao.qi@linaro.org>
286
287         * tracepoint.c (max_jump_pad_size): Remove.
288
289 2015-09-18  Yao Qi  <yao.qi@linaro.org>
290
291         * linux-aarch64-low.c: Don't include sys/uio.h.
292         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
293
294 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
295
296         * tracepoint.c (eval_result_type): Change prototype.
297         (condition_true_at_tracepoint): Fix argument to compiled_cond.
298
299 2015-09-15  Pedro Alves  <palves@redhat.com>
300
301         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
302         Check whether to report exec events instead of checking whether
303         multiprocess is enabled.
304
305 2015-09-15  Pedro Alves  <palves@redhat.com>
306
307         PR remote/18965
308         * remote-utils.c (prepare_resume_reply): Merge
309         TARGET_WAITKIND_VFORK_DONE switch case with the
310         TARGET_WAITKIND_FORKED case.
311
312 2015-09-15  Yao Qi  <yao.qi@linaro.org>
313
314         * server.c (handle_query): Check string comparison using
315         "else if" instead of "if".
316
317 2015-09-15  Yao Qi  <yao.qi@linaro.org>
318
319         * server.c (vCont_supported): New global variable.
320         (handle_query): Set vCont_supported to 1 if "vContSupported+"
321         matches.  Append ";vContSupported+" to own_buf.
322         (handle_v_requests): Append ";s;S" to own_buf if target supports
323         hardware single step or vCont_supported is false.
324         (capture_main): Set vCont_supported to zero.
325
326 2015-09-15  Yao Qi  <yao.qi@linaro.org>
327
328         * linux-low.c (linux_supports_conditional_breakpoints): Rename
329         it to ...
330         (linux_supports_hardware_single_step): ... New function.
331         (linux_target_ops): Update.
332         * lynx-low.c (lynx_target_ops): Set field
333         supports_hardware_single_step to target_can_do_hardware_single_step.
334         * nto-low.c (nto_target_ops): Likewise.
335         * spu-low.c (spu_target_ops): Likewise.
336         * win32-low.c (win32_target_ops): Likewise.
337         * target.c (target_can_do_hardware_single_step): New function.
338         * target.h (struct target_ops) <supports_conditional_breakpoints>:
339         Remove.  <supports_hardware_single_step>: New field.
340         (target_supports_conditional_breakpoints): Remove.
341         (target_supports_hardware_single_step): New macro.
342         (target_can_do_hardware_single_step): Declare.
343         * server.c (handle_query): Use target_supports_hardware_single_step
344         instead of target_supports_conditional_breakpoints.
345
346 2015-09-15  Yao Qi  <yao.qi@linaro.org>
347
348         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
349         function.
350         (struct linux_target_ops the_low_target): Install
351         aarch64_linux_siginfo_fixup.
352
353 2015-09-11  Don Breazeal  <donb@codesourcery.com>
354             Luis Machado  <lgustavo@codesourcery.com>
355
356         * linux-low.c (linux_mourn): Static declaration.
357         (linux_arch_setup): Move in front of
358         handle_extended_wait.
359         (linux_arch_setup_thread): New function.
360         (handle_extended_wait): Handle exec events.  Call
361         linux_arch_setup_thread.  Make event_lwp argument a
362         pointer-to-a-pointer.
363         (check_zombie_leaders): Do not check stopped threads.
364         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
365         (linux_low_filter_event): Add lwp and thread for exec'ing
366         non-leader thread if leader thread has been deleted.
367         Refactor code into linux_arch_setup_thread and call it.
368         Pass child lwp pointer by reference to handle_extended_wait.
369         (linux_wait_for_event_filtered): Update comment.
370         (linux_wait_1): Prevent clobbering exec event status.
371         (linux_supports_exec_events): New function.
372         (linux_target_ops) <supports_exec_events>: Initialize new member.
373         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
374         new member.
375         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
376         * server.c (report_exec_events): New global variable.
377         (handle_query): Handle qSupported query for exec-events feature.
378         (captured_main): Initialize report_exec_events.
379         * server.h (report_exec_events): Declare new global variable.
380         * target.h (struct target_ops) <supports_exec_events>: New
381         member.
382         (target_supports_exec_events): New macro.
383         * win32-low.c (win32_target_ops) <supports_exec_events>:
384         Initialize new member.
385
386 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
387
388         * linux-low.c (linux_low_enable_btrace): Remove.
389         (linux_target_ops): Replace linux_low_enable_btrace with
390         linux_enable_btrace.
391
392 2015-09-03  Yao Qi  <yao.qi@linaro.org>
393
394         * linux-aarch64-low.c (aarch64_insert_point): Call
395         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
396         returns true.
397
398 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
399
400         * linux-low.c (check_stopped_by_breakpoint): Use
401         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
402
403 2015-08-27  Pedro Alves  <palves@redhat.com>
404
405         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
406
407 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
408
409         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
410         the XNEW-family equivalent.
411         (compile_bytecodes): Likewise.
412         * dll.c (loaded_dll): Likewise.
413         * event-loop.c (append_callback_event): Likewise.
414         (create_file_handler): Likewise.
415         (create_file_event): Likewise.
416         * hostio.c (handle_open): Likewise.
417         * inferiors.c (add_thread): Likewise.
418         (add_process): Likewise.
419         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
420         * linux-arm-low.c (arm_new_process): Likewise.
421         (arm_new_thread): Likewise.
422         * linux-low.c (add_to_pid_list): Likewise.
423         (linux_add_process): Likewise.
424         (handle_extended_wait): Likewise.
425         (add_lwp): Likewise.
426         (enqueue_one_deferred_signal): Likewise.
427         (enqueue_pending_signal): Likewise.
428         (linux_resume_one_lwp_throw): Likewise.
429         (linux_resume_one_thread): Likewise.
430         (linux_read_memory): Likewise.
431         (linux_write_memory): Likewise.
432         * linux-mips-low.c (mips_linux_new_process): Likewise.
433         (mips_linux_new_thread): Likewise.
434         (mips_add_watchpoint): Likewise.
435         * linux-x86-low.c (initialize_low_arch): Likewise.
436         * lynx-low.c (lynx_add_process): Likewise.
437         * mem-break.c (set_raw_breakpoint_at): Likewise.
438         (set_breakpoint): Likewise.
439         (add_condition_to_breakpoint): Likewise.
440         (add_commands_to_breakpoint): Likewise.
441         (clone_agent_expr): Likewise.
442         (clone_one_breakpoint): Likewise.
443         * regcache.c (new_register_cache): Likewise.
444         * remote-utils.c (look_up_one_symbol): Likewise.
445         * server.c (queue_stop_reply): Likewise.
446         (start_inferior): Likewise.
447         (queue_stop_reply_callback): Likewise.
448         (handle_target_event): Likewise.
449         * spu-low.c (fetch_ppc_memory): Likewise.
450         (store_ppc_memory): Likewise.
451         * target.c (set_target_ops): Likewise.
452         * thread-db.c (thread_db_load_search): Likewise.
453         (try_thread_db_load_1): Likewise.
454         * tracepoint.c (add_tracepoint): Likewise.
455         (add_tracepoint_action): Likewise.
456         (create_trace_state_variable): Likewise.
457         (cmd_qtdpsrc): Likewise.
458         (cmd_qtro): Likewise.
459         (add_while_stepping_state): Likewise.
460         * win32-low.c (child_add_thread): Likewise.
461         (get_image_name): Likewise.
462
463 2015-08-25  Yao Qi  <yao.qi@linaro.org>
464
465         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
466
467 2015-08-25  Yao Qi  <yao.qi@linaro.org>
468
469         * Makefile.in (aarch64-linux.o): New rule.
470         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
471         srv_tgtobj.
472         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
473         (aarch64_init_debug_reg_state): Make it extern.
474         (aarch64_linux_prepare_to_resume): Remove.
475
476 2015-08-25  Yao Qi  <yao.qi@linaro.org>
477
478         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
479         lwp_arch_private_info and ptid_of_lwp.
480
481 2015-08-25  Yao Qi  <yao.qi@linaro.org>
482
483         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
484         Find proc_info by find_process_pid.  All callers updated.
485
486 2015-08-25  Yao Qi  <yao.qi@linaro.org>
487
488         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
489         Remove.
490         (debug_reg_change_callback): Remove.
491         (aarch64_notify_debug_reg_change): Remove.
492
493 2015-08-25  Yao Qi  <yao.qi@linaro.org>
494
495         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
496         Call current_lwp_ptid.
497
498 2015-08-25  Yao Qi  <yao.qi@linaro.org>
499
500         * linux-aarch64-low.c (debug_reg_change_callback): Use
501         debug_printf.
502
503 2015-08-25  Yao Qi  <yao.qi@linaro.org>
504
505         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
506
507 2015-08-25  Yao Qi  <yao.qi@linaro.org>
508
509         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
510
511 2015-08-25  Yao Qi  <yao.qi@linaro.org>
512
513         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
514         the code.
515
516 2015-08-25  Yao Qi  <yao.qi@linaro.org>
517
518         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
519         Remove.
520         (debug_reg_change_callback): Remove argument entry and add argument
521         lwp.  Remove local variable thread.  Don't print thread id in the
522         debugging output.  Don't check whether pid of thread equals to pid.
523         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
524         iterate_over_lwps instead find_inferior.
525
526 2015-08-24  Pedro Alves  <palves@redhat.com>
527
528         * inferiors.c (get_first_process): New function.
529         * inferiors.h (get_first_process): New declaration.
530         * remote-utils.c (read_ptid): Default to the first process in the
531         list, instead of to the current thread's process.
532
533 2015-08-24  Pedro Alves  <palves@redhat.com>
534
535         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
536         * event-loop.c: Likewise.
537         * remote-utils.c: Likewise.
538         * tracepoint.c: Likewise.
539
540 2015-08-24  Pedro Alves  <palves@redhat.com>
541
542         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
543         ptid_get_lwp.
544
545 2015-08-21  Pedro Alves  <palves@redhat.com>
546
547         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
548         instead of literal 1.
549
550 2015-08-21  Pedro Alves  <palves@redhat.com>
551
552         * tdesc.c (default_description): Explicitly zero-initialize.
553
554 2015-08-21  Pedro Alves  <palves@redhat.com>
555
556         PR gdb/18749
557         * inferiors.c (remove_thread): Discard any pending stop reply for
558         this thread.
559         * server.c (remove_all_on_match_pid): Rename to ...
560         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
561         instead of a pid.
562         (discard_queued_stop_replies): Change parameter to a ptid.  Now
563         extern.
564         (handle_v_kill, kill_inferior_callback, captured_main)
565         (process_serial_event): Adjust.
566         * server.h (discard_queued_stop_replies): Declare.
567
568 2015-08-21  Pedro Alves  <palves@redhat.com>
569
570         * linux-low.c (wait_for_sigstop): Always switch to no thread
571         selected if the previously current thread dies.
572         * lynx-low.c (lynx_request_interrupt): Use the first thread's
573         process instead of the current thread's.
574         * remote-utils.c (input_interrupt): Don't check if there's no
575         current thread.
576         * server.c (gdb_read_memory, gdb_write_memory): If setting the
577         current thread to the general thread fails, error out.
578         (handle_qxfer_auxv, handle_qxfer_libraries)
579         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
580         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
581         (handle_query): Check if there's a thread selected instead of
582         checking whether there's any thread in the thread list.
583         (handle_qxfer_threads, handle_qxfer_btrace)
584         (handle_qxfer_btrace_conf): Don't error out early if there's no
585         thread in the thread list.
586         (handle_v_cont, myresume): Don't set the current thread to the
587         continue thread.
588         (process_serial_event) <Hg handling>: Also set thread_id if the
589         previous general thread is still alive.
590         (process_serial_event) <g/G handling>: If setting the current
591         thread to the general thread fails, error out.
592         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
593         thread's lwp instead of the current thread's.
594         * target.c (set_desired_thread): If the desired thread was not
595         found, leave the current thread pointing to NULL.  Return an int
596         (boolean) indicating success.
597         * target.h (set_desired_thread): Change return type to int.
598
599 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
600
601         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
602         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
603         #includes.
604         (ps_get_thread_area): New function.
605
606 2015-08-19  Gary Benson  <gbenson@redhat.com>
607
608         * hostio.c (handle_pread): Do not attempt to read more data
609         than hostio_reply_with_data can fit in a packet.
610
611 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
612
613         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
614
615 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
616
617         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
618
619 2015-08-06  Pedro Alves  <palves@redhat.com>
620
621         * tracepoint.c (expr_eval_result): Now an int.
622
623 2015-08-06  Pedro Alves  <palves@redhat.com>
624
625         * gdbthread.h (struct regcache): Forward declare.
626         (struct thread_info) <regcache_data>: Now a struct regcache
627         pointer.
628         * inferiors.c (inferior_regcache_data)
629         (set_inferior_regcache_data): Now work with struct regcache
630         pointers.
631         * inferiors.h (struct regcache): Forward declare.
632         (inferior_regcache_data, set_inferior_regcache_data): Now work
633         with struct regcache pointers.
634         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
635         (free_register_cache_thread): Remove struct regcache pointer
636         casts.
637
638 2015-08-06  Pedro Alves  <palves@redhat.com>
639
640         * server.c (captured_main): On error, print the exception message
641         to stderr, and if run_once is set, throw a quit.
642
643 2015-08-06  Pedro Alves  <palves@redhat.com>
644
645         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
646         the current thread.
647
648 2015-08-06  Pedro Alves  <palves@redhat.com>
649
650         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
651         reading beyond the passed in buffer length.
652
653 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
654
655         * tracepoint.c (symbol_list) <required>: Remove.
656
657 2015-08-06  Pedro Alves  <palves@redhat.com>
658
659         * linux-low.c (handle_extended_wait): Set the fork child's suspend
660         count if stopping and suspending threads.
661         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
662         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
663         (linux_detach): Complete an ongoing step-over.
664         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
665         throughout.
666         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
667         (linux_wait_1): If passing a signal to the inferior after
668         finishing a step-over, unsuspend and re-resume all lwps.  If we
669         see a single-step event but the thread should be continuing, don't
670         pass the trap to gdb.
671         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
672         internal_error instead of gdb_assert.
673         (enqueue_pending_signal): New function.
674         (check_ptrace_stopped_lwp_gone): Add debug output.
675         (start_step_over): Use internal_error instead of gdb_assert.
676         (complete_ongoing_step_over): New function.
677         (linux_resume_one_thread): Don't resume a suspended thread.
678         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
679         it stepping.
680
681 2015-08-06  Pedro Alves  <palves@redhat.com>
682
683         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
684         (linux_thread_alive): Use lwp_is_marked_dead.
685         (extended_event_reported): Delete.
686         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
687         instead of extended_event_reported.
688         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
689         as well.
690         (lwp_is_marked_dead): New function.
691         (lwp_running): Use lwp_is_marked_dead.
692         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
693         comment.
694
695 2015-08-06  Pedro Alves  <palves@redhat.com>
696
697         * linux-low.c (linux_wait_1): Move fork event output out of the
698         !report_to_gdb check.  Pass event_child->waitstatus to
699         target_waitstatus_to_string instead of ourstatus.
700
701 2015-08-04  Yao Qi  <yao.qi@linaro.org>
702
703         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
704         if current_thread is 32 bit.
705
706 2015-08-04  Yao Qi  <yao.qi@linaro.org>
707
708         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
709         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
710         * server.c (extended_protocol): Remove "static".
711         * server.h (extended_protocol): Declare it.
712
713 2015-08-04  Yao Qi  <yao.qi@linaro.org>
714
715         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
716         both aarch64 and aarch32.
717         (aarch64_set_pc): Likewise.
718
719 2015-08-04  Yao Qi  <yao.qi@linaro.org>
720
721         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
722         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
723         arm-with-neon.xml to srv_xmlfiles.
724         * linux-aarch64-low.c: Include linux-aarch32-low.h.
725         (is_64bit_tdesc): New function.
726         (aarch64_linux_read_description): New function.
727         (aarch64_arch_setup): Call aarch64_linux_read_description.
728         (regs_info): Rename to regs_info_aarch64.
729         (aarch64_regs_info): Return right regs_info.
730         (initialize_low_arch): Call initialize_low_arch_aarch32.
731
732 2015-08-04  Yao Qi  <yao.qi@linaro.org>
733
734         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
735         * linux-aarch32-low.c: New file.
736         * linux-aarch32-low.h: New file.
737         * linux-arm-low.c (arm_fill_gregset): Move it to
738         linux-aarch32-low.c.
739         (arm_store_gregset): Likewise.
740         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
741         (arm_store_vfpregset): Call arm_store_vfpregset_num.
742         (arm_arch_setup): Check if PTRACE_GETREGSET works.
743         (regs_info): Rename to regs_info_arm.
744         (arm_regs_info): Return regs_info_aarch32 if
745         have_ptrace_getregset is 1 and target description is
746         arm_with_neon or arm_with_vfpv3.
747         (initialize_low_arch): Don't call init_registers_arm_with_neon.
748         Call initialize_low_arch_aarch32 instead.
749
750 2015-08-04  Yao Qi  <yao.qi@linaro.org>
751
752         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
753         * linux-low.c: ... here.
754         * linux-low.h (have_ptrace_getregset): Declare it.
755
756 2015-08-04  Pedro Alves  <palves@redhat.com>
757
758         * thread-db.c (struct thread_db): Use new typedefs.
759         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
760         CHK calls.
761         (disable_thread_event_reporting): Cast result of dlsym to
762         destination function pointer type.
763         (thread_db_mourn): Use td_ta_delete_ftype.
764
765 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
766
767         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
768         arch variant.
769         (CDX_BREAKPOINT): Define for R2.
770         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
771         (the_low_target): Add comments.
772
773 2015-07-30  Yao Qi  <yao.qi@linaro.org>
774
775         * linux-arm-low.c (arm_hwcap): Remove it.
776         (arm_read_description): New local variable arm_hwcap.  Don't
777         set arm_hwcap to zero.
778
779 2015-07-30  Yao Qi  <yao.qi@linaro.org>
780
781         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
782         Use regcache->tdesc instead.
783         (arm_store_wmmxregset): Likewise.
784         (arm_fill_vfpregset): Likewise.
785         (arm_store_vfpregset): Likewise.
786
787 2015-07-30  Yao Qi  <yao.qi@linaro.org>
788
789         * linux-arm-low.c: Include arch/arm.h.
790         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
791         (arm_store_gregset): Likewise.
792
793 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
794
795         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
796         ptrace's 4th parameter.
797
798 2015-07-27  Yao Qi  <yao.qi@linaro.org>
799
800         * configure.srv (case aarch64*-*-linux*): Don't set
801         srv_linux_usrregs.
802
803 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
804
805         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
806         sys/ptrace.h.
807         * linux-arm-low.c: Likewise.
808         * linux-cris-low.c: Likewise.
809         * linux-crisv32-low.c: Likewise.
810         * linux-low.c: Likewise.
811         * linux-m68k-low.c: Likewise.
812         * linux-mips-low.c: Likewise.
813         * linux-nios2-low.c: Likewise.
814         * linux-s390-low.c: Likewise.
815         * linux-sparc-low.c: Likewise.
816         * linux-tic6x-low.c: Likewise.
817         * linux-tile-low.c: Likewise.
818         * linux-x86-low.c: Likewise.
819
820 2015-07-24  Pedro Alves  <palves@redhat.com>
821
822         * config.in: Regenerate.
823         * configure: Regenerate.
824
825 2015-07-24  Pedro Alves  <palves@redhat.com>
826
827         * acinclude.m4: Include ../ptrace.m4.
828         * configure.ac: Call GDB_AC_PTRACE.
829         * config.in, configure: Regenerate.
830
831 2015-07-24  Yao Qi  <yao.qi@linaro.org>
832
833         * linux-low.c (linux_create_inferior): Remove setting to
834         proc->priv->new_inferior.
835         (linux_attach): Likewise.
836         (linux_low_filter_event): Likewise.
837         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
838
839 2015-07-24  Yao Qi  <yao.qi@linaro.org>
840
841         * linux-low.c (linux_arch_setup): New function.
842         (linux_low_filter_event): If proc->tdesc is NULL and
843         proc->attached is true, call the_low_target.arch_setup.
844         Otherwise, keep status pending, and return.
845         (linux_resume_one_lwp_throw): Don't call get_pc if
846         thread->while_stepping isn't NULL.  Don't call
847         get_thread_regcache if proc->tdesc is NULL.
848         (need_step_over_p): Return 0 if proc->tdesc is NULL.
849         (linux_target_ops): Install arch_setup.
850         * server.c (start_inferior): Call the_target->arch_setup.
851         * target.h (struct target_ops) <arch_setup>: New field.
852         (target_arch_setup): New marco.
853         * lynx-low.c (lynx_target_ops): Update.
854         * nto-low.c (nto_target_ops): Update.
855         * spu-low.c (spu_target_ops): Update.
856         * win32-low.c (win32_target_ops): Update.
857
858 2015-07-24  Yao Qi  <yao.qi@linaro.org>
859
860         * linux-low.c (linux_add_process): Don't set
861         proc->priv->new_inferior.
862         (linux_create_inferior): Set proc->priv->new_inferior to 1.
863         (linux_attach): Likewise.
864
865 2015-07-24  Yao Qi  <yao.qi@linaro.org>
866
867         * server.c (start_inferior): Code refactor.
868
869 2015-07-24  Yao Qi  <yao.qi@linaro.org>
870
871         * server.c (process_serial_event): Set general_thread.
872
873 2015-07-21  Yao Qi  <yao.qi@linaro.org>
874
875         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
876         aarch64_linux_get_debug_reg_capacity.
877
878 2015-07-17  Yao Qi  <yao.qi@linaro.org>
879
880         * Makefile.in (aarch64-linux-hw-point.o): New rule.
881         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
882         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
883         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
884         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
885         (AARCH64_HWP_ALIGNMENT): Likewise.
886         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
887         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
888         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
889         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
890         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
891         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
892         (struct aarch64_debug_reg_state): Likewise.
893         (struct arch_lwp_info): Likewise.
894         (aarch64_align_watchpoint): Likewise.
895         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
896         (aarch64_watchpoint_length): Likewise.
897         (aarch64_point_encode_ctrl_reg): Likewise
898         (aarch64_point_is_aligned): Likewise.
899         (aarch64_align_watchpoint): Likewise.
900         (aarch64_linux_set_debug_regs):
901         (aarch64_dr_state_insert_one_point): Likewise.
902         (aarch64_dr_state_remove_one_point): Likewise.
903         (aarch64_handle_breakpoint): Likewise.
904         (aarch64_handle_aligned_watchpoint): Likewise.
905         (aarch64_handle_unaligned_watchpoint): Likewise.
906         (aarch64_handle_watchpoint): Likewise.
907
908 2015-07-17  Yao Qi  <yao.qi@linaro.org>
909
910         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
911         and don't aarch64_get_debug_reg_state.  All callers update.
912         (aarch64_handle_aligned_watchpoint): Likewise.
913         (aarch64_handle_unaligned_watchpoint): Likewise.
914         (aarch64_handle_watchpoint): Likewise.
915         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
916         (aarch64_remove_point): Likewise.
917
918 2015-07-17  Yao Qi  <yao.qi@linaro.org>
919
920         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
921         debug_printf.
922         (aarch64_handle_unaligned_watchpoint): Likewise.
923
924 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
925
926         Revert the previous 3 commits:
927         Move gdb_regex* to common/
928         Move linux_find_memory_regions_full & co.
929         gdbserver build-id attribute generator
930
931 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
932             Jan Kratochvil  <jan.kratochvil@redhat.com>
933
934         gdbserver build-id attribute generator.
935         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
936         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
937         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
938         (find_phdr): New.
939         (get_dynamic): Use find_pdhr to traverse program headers.
940         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
941         (compare_mapping_entry_range, struct find_memory_region_callback_data)
942         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
943         (get_hex_build_id): New.
944         (linux_qxfer_libraries_svr4): Add optional build-id attribute
945         to reply XML document.
946
947 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
948             Jan Kratochvil  <jan.kratochvil@redhat.com>
949
950         * target.c: Include target/target-utils.h and fcntl.h.
951         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
952         (target_fileio_read_stralloc): New functions.
953
954 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
955
956         * Makefile.in (OBS): Add gdb_regex.o.
957         (gdb_regex.o): New.
958         * config.in: Rebuilt.
959         * configure: Rebuilt.
960
961 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
962             Jan Kratochvil  <jan.kratochvil@redhat.com>
963
964         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
965         * Makefile.in (OBS): Add target-utils.o.
966         (linux-maps.o, target-utils.o): New.
967         * configure.srv (srv_linux_obj): Add linux-maps.o.
968
969 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
970
971         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
972         function, return 1.
973         (the_low_target): Install it.
974
975 2015-07-14  Pedro Alves  <palves@redhat.com>
976
977         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
978         Instead, ignore ECHILD, and throw an error for other errnos.
979
980 2015-07-10  Pedro Alves  <palves@redhat.com>
981
982         * event-loop.c (struct callback_event) <data>: Change type to
983         gdb_client_data instance instead of gdb_client_data pointer.
984         (append_callback_event): Adjust.
985
986 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
987
988         * linux-aarch64-low.c: Add comments for each linux_target_ops
989         method.  Remove comments already covered in target_ops and
990         linux_target_ops definitions.
991         (the_low_target): Add comments for each unimplemented method.
992
993 2015-07-09  Yao Qi  <yao.qi@linaro.org>
994
995         * linux-aarch64-low.c (aarch64_regmap): Remove.
996         (aarch64_usrregs_info): Remove.
997         (regs_info): Set field usrregs to NULL.
998
999 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
1000
1001         * linux-low.c: Include "rsp-low.h"
1002         (linux_low_encode_pt_config, linux_low_encode_raw): New.
1003         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1004         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1005         (handle_btrace_enable_pt): New.
1006         (handle_btrace_general_set): Support "pt".
1007         (handle_btrace_conf_general_set): Support "pt:size".
1008
1009 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1010
1011         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1012         Z_PACKET_SW_BP.
1013
1014 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1015
1016         * linux-aarch64-low.c: Remove comment about endianness.
1017         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
1018         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
1019         memcmp.
1020
1021 2015-06-24  Gary Benson  <gbenson@redhat.com>
1022
1023         * linux-i386-ipa.c (stdint.h): Do not include.
1024         * lynx-i386-low.c (stdint.h): Likewise.
1025         * lynx-ppc-low.c (stdint.h): Likewise.
1026         * mem-break.c (stdint.h): Likewise.
1027         * thread-db.c (stdint.h): Likewise.
1028         * tracepoint.c (stdint.h): Likewise.
1029         * win32-low.c (stdint.h): Likewise.
1030
1031 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
1032
1033         * server.c (write_qxfer_response): Update call to
1034         remote_escape_output.
1035
1036 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
1037             Jan Kratochvil  <jan.kratochvil@redhat.com>
1038
1039         Merge multiple hex conversions.
1040         * gdbreplay.c (tohex): Rename to 'fromhex'.
1041         (logchar): Use fromhex.
1042
1043 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1044
1045         * server.c (handle_qxfer_libraries): Set `version' attribute for
1046         <library-list>.
1047
1048 2015-06-10  Gary Benson  <gbenson@redhat.com>
1049
1050         * target.h (struct target_ops) <multifs_open>: New field.
1051         <multifs_unlink>: Likewise.
1052         <multifs_readlink>: Likewise.
1053         * linux-low.c (nat/linux-namespaces.h): New include.
1054         (linux_target_ops): Initialize the_target->multifs_open,
1055         the_target->multifs_unlink and the_target->multifs_readlink.
1056         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1057         * hostio.c (hostio_fs_pid): New static variable.
1058         (hostio_handle_new_gdb_connection): New function.
1059         (handle_setfs): Likewise.
1060         (handle_open): Use the_target->multifs_open as appropriate.
1061         (handle_unlink): Use the_target->multifs_unlink as appropriate.
1062         (handle_readlink): Use the_target->multifs_readlink as
1063         appropriate.
1064         (handle_vFile): Handle vFile:setfs packets.
1065         * server.c (handle_query): Call hostio_handle_new_gdb_connection
1066         after target_handle_new_gdb_connection.
1067
1068 2015-06-10  Gary Benson  <gbenson@redhat.com>
1069
1070         * configure.ac (AC_CHECK_FUNCS): Add setns.
1071         * config.in: Regenerate.
1072         * configure: Likewise.
1073         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1074         (linux-namespaces.o): New rule.
1075         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1076
1077 2015-06-09  Gary Benson <gbenson@redhat.com>
1078
1079         * hostio.c (handle_open): Process mode argument with
1080         fileio_to_host_mode.
1081
1082 2015-06-01  Yao Qi  <yao.qi@linaro.org>
1083
1084         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1085         * linux-x86-low.c: Likewise.
1086
1087 2015-05-28  Don Breazeal  <donb@codesourcery.com>
1088
1089         * linux-low.c (handle_extended_wait): Initialize
1090         thread_info.last_resume_kind for new fork children.
1091
1092 2015-05-15  Pedro Alves  <palves@redhat.com>
1093
1094         * target.h (target_handle_new_gdb_connection): Rewrite using if
1095         wrapped in do/while.
1096
1097 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
1098
1099         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1100         * configure, config.in: Regenerate.
1101         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1102         Declare typedef.
1103
1104 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1105
1106         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1107         PTRACE_EVENT_VFORK_DONE.
1108         (linux_low_ptrace_options, extended_event_reported): Add vfork
1109         events.
1110         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1111         and "vforkdone" for RSP 'T' Stop Reply Packet.
1112         * server.h (report_vfork_events): Declare
1113         global variable.
1114
1115 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1116
1117         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1118         (the_low_target) <new_fork>: Initialize new member.
1119         * linux-arm-low.c (arm_new_fork): New function.
1120         (the_low_target) <new_fork>: Initialize new member.
1121         * linux-low.c (handle_extended_wait): Call new target function
1122         new_fork.
1123         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1124         * linux-mips-low.c (mips_add_watchpoint): New function
1125         extracted from mips_insert_point.
1126         (the_low_target) <new_fork>: Initialize new member.
1127         (mips_linux_new_fork): New function.
1128         (mips_insert_point): Call mips_add_watchpoint.
1129         * linux-x86-low.c (x86_linux_new_fork): New function.
1130         (the_low_target) <new_fork>: Initialize new member.
1131
1132 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1133
1134         * linux-low.c (handle_extended_wait): Implement return value,
1135         rename argument 'event_child' to 'event_lwp', handle
1136         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1137         (linux_low_ptrace_options): New function.
1138         (linux_low_filter_event): Call linux_low_ptrace_options,
1139         use different argument fo linux_enable_event_reporting,
1140         use return value from handle_extended_wait.
1141         (extended_event_reported): New function.
1142         (linux_wait_1): Call extended_event_reported and set
1143         status to report fork events.
1144         (linux_write_memory): Add pid to debug message.
1145         (reset_lwp_ptrace_options_callback): New function.
1146         (linux_handle_new_gdb_connection): New function.
1147         (linux_target_ops): Initialize new structure member.
1148         * linux-low.h (struct lwp_info) <waitstatus>: New member.
1149         * lynx-low.c: Initialize new structure member.
1150         * remote-utils.c (prepare_resume_reply): Implement stop reason
1151         "fork" for "T" stop message.
1152         * server.c (handle_query): Call handle_new_gdb_connection.
1153         * server.h (report_fork_events): Declare global flag.
1154         * target.h (struct target_ops) <handle_new_gdb_connection>:
1155         New member.
1156         (target_handle_new_gdb_connection): New macro.
1157         * win32-low.c: Initialize new structure member.
1158
1159 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1160
1161         * mem-break.c (APPEND_TO_LIST): Define macro.
1162         (clone_agent_expr): New function.
1163         (clone_one_breakpoint): New function.
1164         (clone_all_breakpoints): New function.
1165         * mem-break.h: Declare new functions.
1166
1167 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1168
1169         * linux-low.c (linux_supports_fork_events): New function.
1170         (linux_supports_vfork_events): New function.
1171         (linux_target_ops): Initialize new structure members.
1172         (initialize_low): Call linux_check_ptrace_features.
1173         * lynx-low.c (lynx_target_ops): Initialize new structure
1174         members.
1175         * server.c (report_fork_events, report_vfork_events):
1176         New global flags.
1177         (handle_query): Add new features to qSupported packet and
1178         response.
1179         (captured_main): Initialize new global variables.
1180         * target.h (struct target_ops) <supports_fork_events>:
1181         New member.
1182         <supports_vfork_events>: New member.
1183         (target_supports_fork_events): New macro.
1184         (target_supports_vfork_events): New macro.
1185         * win32-low.c (win32_target_ops): Initialize new structure
1186         members.
1187
1188 2015-05-12  Gary Benson <gbenson@redhat.com>
1189
1190         * server.c (handle_qxfer_exec_file): Use current process
1191         if annex is empty.
1192
1193 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
1194
1195         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
1196         Remove HAVE_PTRACE_GETREGS conditionals.
1197         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1198         instead of PTRACE_GETREGS and PTRACE_SETREGS.
1199
1200 2015-05-08  Yao Qi  <yao.qi@linaro.org>
1201
1202         * linux-low.c (linux_supports_conditional_breakpoints): New
1203         function.
1204         (linux_target_ops): Install new target method.
1205         * lynx-low.c (lynx_target_ops): Install NULL hook for
1206         supports_conditional_breakpoints.
1207         * nto-low.c (nto_target_ops): Likewise.
1208         * spu-low.c (spu_target_ops): Likewise.
1209         * win32-low.c (win32_target_ops): Likewise.
1210         * server.c (handle_query): Check
1211         target_supports_conditional_breakpoints.
1212         * target.h (struct target_ops) <supports_conditional_breakpoints>:
1213         New field.
1214         (target_supports_conditional_breakpoints): New macro.
1215
1216 2015-05-06  Pedro Alves  <palves@redhat.com>
1217
1218         PR server/18081
1219         * server.c (start_inferior): If the process exits, mourn it.
1220
1221 2015-04-21  Gary Benson <gbenson@redhat.com>
1222
1223         * hostio.c (fileio_open_flags_to_host): Factored out to
1224         fileio_to_host_openflags in common/fileio.c.  Single use
1225         updated.
1226
1227 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
1228
1229         * linux-xtensa-low.c (xtensa_fill_gregset)
1230         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1231         XCHAL_HAVE_LOOP.
1232
1233 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
1234
1235         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1236         (regs_info): Replace usrregs pointer with NULL.
1237
1238 2015-04-17  Gary Benson  <gbenson@redhat.com>
1239
1240         * target.h (struct target_ops) <pid_to_exec_file>: New field.
1241         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1242         * server.c (handle_qxfer_exec_file): New function.
1243         (qxfer_packets): Add exec-file entry.
1244         (handle_query): Report qXfer:exec-file:read as supported packet.
1245
1246 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
1247
1248         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1249
1250 2015-04-09  Gary Benson <gbenson@redhat.com>
1251
1252         * hostio-errno.c (errno_to_fileio_error): Remove function.
1253         Update caller to use remote_fileio_to_fio_error.
1254
1255 2015-04-09  Yao Qi  <yao.qi@linaro.org>
1256
1257         * linux-low.c (linux_insert_point): Call
1258         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1259         (linux_remove_point): Call remove_memory_breakpoint if type is
1260         raw_bkpt_type_sw.
1261         * linux-x86-low.c (x86_insert_point): Don't call
1262         insert_memory_breakpoint.
1263         (x86_remove_point): Don't call remove_memory_breakpoint.
1264
1265 2015-04-01  Pedro Alves  <palves@redhat.com>
1266             Cleber Rosa  <crosa@redhat.com>
1267
1268         * server.c (gdbserver_usage): Reorganize and extend the usage
1269         message.
1270
1271 2015-03-24  Pedro Alves  <palves@redhat.com>
1272
1273         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1274         output.  Also dump TRAP_TRACE.
1275         (linux_low_filter_event): In debug output, distinguish a
1276         resume_stop SIGSTOP from a delayed SIGSTOP.
1277
1278 2015-03-24  Gary Benson  <gbenson@redhat.com>
1279
1280         * linux-x86-low.c (x86_linux_new_thread): Moved to
1281         nat/x86-linux.c.
1282         (x86_linux_prepare_to_resume): Likewise.
1283
1284 2015-03-24  Gary Benson  <gbenson@redhat.com>
1285
1286         * Makefile.in (x86-linux-dregs.o): New rule.
1287         * configure.srv: Add x86-linux-dregs.o to relevant targets.
1288         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1289         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1290         (x86_linux_dr_get): Likewise.
1291         (x86_linux_dr_set): Likewise.
1292         (update_debug_registers_callback): Likewise.
1293         (x86_linux_dr_set_addr): Likewise.
1294         (x86_linux_dr_get_addr): Likewise.
1295         (x86_linux_dr_set_control): Likewise.
1296         (x86_linux_dr_get_control): Likewise.
1297         (x86_linux_dr_get_status): Likewise.
1298         (x86_linux_update_debug_registers): Likewise.
1299
1300 2015-03-24  Gary Benson  <gbenson@redhat.com>
1301
1302         * linux-x86-low.c (x86_linux_update_debug_registers):
1303         New function, factored out from...
1304         (x86_linux_prepare_to_resume): ...this.
1305
1306 2015-03-24  Gary Benson  <gbenson@redhat.com>
1307
1308         * linux-x86-low.c (x86_linux_dr_get): Update comments.
1309         (x86_linux_dr_set): Likewise.
1310         (update_debug_registers_callback): Likewise.
1311         (x86_linux_dr_set_addr): Likewise.
1312         (x86_linux_dr_get_addr): Likewise.
1313         (x86_linux_dr_set_control): Likewise.
1314         (x86_linux_dr_get_control): Likewise.
1315         (x86_linux_dr_get_status): Likewise.
1316         (x86_linux_prepare_to_resume): Likewise.
1317
1318 2015-03-24  Gary Benson  <gbenson@redhat.com>
1319
1320         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1321         Use perror_with_name.  Pass string through gettext.
1322         (x86_linux_dr_set): Likewise.
1323
1324 2015-03-24  Gary Benson  <gbenson@redhat.com>
1325
1326         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1327         (x86_linux_dr_set_addr): ...this.
1328         (x86_dr_low_get_addr): Rename to...
1329         (x86_linux_dr_get_addr): ...this.
1330         (x86_dr_low_set_control): Rename to...
1331         (x86_linux_dr_set_control): ...this.
1332         (x86_dr_low_get_control): Rename to...
1333         (x86_linux_dr_get_control): ...this.
1334         (x86_dr_low_get_status): Rename to...
1335         (x86_linux_dr_get_status): ...this.
1336         (x86_dr_low): Update with new function names.
1337
1338 2015-03-24  Gary Benson  <gbenson@redhat.com>
1339
1340         * Makefile.in (x86-linux.o): New rule.
1341         * configure.srv: Add x86-linux.o to relevant targets.
1342         * linux-low.c (lwp_set_arch_private_info): New function.
1343         (lwp_arch_private_info): Likewise.
1344         * linux-x86-low.c: Include nat/x86-linux.h.
1345         (arch_lwp_info): Removed structure.
1346         (update_debug_registers_callback):
1347         Use lwp_set_debug_registers_changed.
1348         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1349         and lwp_set_debug_registers_changed.
1350         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1351
1352 2015-03-24  Gary Benson  <gbenson@redhat.com>
1353
1354         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1355         * linux-arm-low.c (arm_new_thread): Likewise.
1356         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1357         * linux-mips-low.c (mips_linux_new_thread): Likewise.
1358         * linux-x86-low.c (x86_linux_new_thread): Likewise.
1359         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1360
1361 2015-03-24  Gary Benson  <gbenson@redhat.com>
1362
1363         * linux-low.c (ptid_of_lwp): New function.
1364         (lwp_is_stopped): Likewise.
1365         (lwp_stop_reason): Likewise.
1366         * linux-x86-low.c (update_debug_registers_callback):
1367         Use lwp_is_stopped.
1368         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1369         lwp_stop_reason.
1370
1371 2015-03-24  Gary Benson  <gbenson@redhat.com>
1372
1373         * linux-low.h (linux_stop_lwp): Remove declaration.
1374
1375 2015-03-24  Gary Benson  <gbenson@redhat.com>
1376
1377         * linux-low.h: Include nat/linux-nat.h.
1378         * linux-low.c (iterate_over_lwps_args): New structure.
1379         (iterate_over_lwps_filter): New function.
1380         (iterate_over_lwps): Likewise.
1381         * linux-x86-low.c (update_debug_registers_callback):
1382         Update signature to what iterate_over_lwps expects.
1383         Remove PID check that iterate_over_lwps now performs.
1384         (x86_dr_low_set_addr): Use iterate_over_lwps.
1385         (x86_dr_low_set_control): Likewise.
1386
1387 2015-03-24  Gary Benson  <gbenson@redhat.com>
1388
1389         * linux-x86-low.c (x86_debug_reg_state): New function.
1390         (x86_linux_prepare_to_resume): Use the above.
1391
1392 2015-03-24  Gary Benson  <gbenson@redhat.com>
1393
1394         * linux-low.c (current_lwp_ptid): New function.
1395         * linux-x86-low.c: Include nat/linux-nat.h.
1396         (x86_dr_low_get_addr): Use current_lwp_ptid.
1397         (x86_dr_low_get_control): Likewise.
1398         (x86_dr_low_get_status): Likewise.
1399
1400 2015-03-20  Pedro Alves  <palves@redhat.com>
1401
1402         * tracepoint.c (cmd_qtstatus): Make "str" const.
1403
1404 2015-03-20  Pedro Alves  <palves@redhat.com>
1405
1406         * server.c (handle_general_set): Make "req_str" const.
1407
1408 2015-03-19  Pedro Alves  <palves@redhat.com>
1409
1410         * linux-low.c (linux_resume_one_lwp): Rename to ...
1411         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
1412         instead call perror_with_name.
1413         (check_ptrace_stopped_lwp_gone): New function.
1414         (linux_resume_one_lwp): Reimplement as wrapper around
1415         linux_resume_one_lwp_throw that swallows errors if the LWP is
1416         gone.
1417
1418 2015-03-19  Pedro Alves  <palves@redhat.com>
1419
1420         * linux-low.c (count_events_callback, select_event_lwp_callback):
1421         No longer check whether the thread has resume_stop as last resume
1422         kind.
1423
1424 2015-03-19 Pedro Alves  <palves@redhat.com>
1425
1426         * linux-low.c (count_events_callback, select_event_lwp_callback):
1427         Use the lwp's status_pending_p field, not the thread's.
1428
1429 2015-03-19  Pedro Alves  <palves@redhat.com>
1430
1431         * linux-low.c (select_event_lwp_callback): Update comments to
1432         no longer mention SIGTRAP.
1433
1434 2015-03-18  Gary Benson  <gbenson@redhat.com>
1435
1436         * server.c (handle_query): Do not report vFile:fstat as supported.
1437
1438 2015-03-11  Gary Benson  <gbenson@redhat.com>
1439
1440         * hostio.c (sys/types.h): New include.
1441         (sys/stat.h): Likewise.
1442         (common-remote-fileio.h): Likewise.
1443         (handle_fstat): New function.
1444         (handle_vFile): Handle vFile:fstat packets.
1445
1446 2015-03-11  Gary Benson  <gbenson@redhat.com>
1447
1448         * configure.ac (AC_CHECK_MEMBERS): Add checks for
1449         struct stat.st_blocks and struct stat.st_blksize.
1450         * configure: Regenerate.
1451         * config.in: Likewise.
1452         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1453         (OBS): Add common-remote-fileio.o.
1454         (common-remote-fileio.o): New rule.
1455
1456 2015-03-09  Pedro Alves  <palves@redhat.com>
1457
1458         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1459         'struct sockaddr' pointer in 'accept' call.
1460
1461 2015-03-09  Pedro Alves  <palves@redhat.com>
1462
1463         Revert:
1464         2015-03-07  Pedro Alves  <palves@redhat.com>
1465         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1466         or <winsock2.h> here.  Instead include "gdb_socket.h".
1467         (remote_open): Use union gdb_sockaddr_u.
1468         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1469         or <winsock2.h> here.  Instead include "gdb_socket.h".
1470         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1471         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1472         or <sys/un.h>.
1473         (init_named_socket, gdb_agent_helper_thread): Use union
1474         gdb_sockaddr_u.
1475
1476 2015-03-07  Pedro Alves  <palves@redhat.com>
1477
1478         * configure.ac (build_warnings): Move
1479         -Wdeclaration-after-statement to the C-specific set.
1480         * configure: Regenerate.
1481
1482 2015-03-07  Pedro Alves  <palves@redhat.com>
1483
1484         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1485         or <winsock2.h> here.  Instead include "gdb_socket.h".
1486         (remote_open): Use union gdb_sockaddr_u.
1487         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1488         or <winsock2.h> here.  Instead include "gdb_socket.h".
1489         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1490         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1491         or <sys/un.h>.
1492         (init_named_socket, gdb_agent_helper_thread): Use union
1493         gdb_sockaddr_u.
1494
1495 2015-03-07  Pedro Alves  <palves@redhat.com>
1496
1497         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1498         instead.
1499
1500 2015-03-06  Yao Qi  <yao.qi@linaro.org>
1501
1502         * linux-aarch64-low.c (aarch64_insert_point): Use
1503         show_debug_regs as a boolean.
1504         (aarch64_remove_point): Likewise.
1505
1506 2015-03-05  Pedro Alves  <palves@redhat.com>
1507
1508         * lynx-low.c (lynx_target_ops): Install NULL hooks for
1509         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1510         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1511         * nto-low.c (nto_target_ops): Likewise.
1512         * spu-low.c (spu_target_ops): Likewise.
1513         * win32-low.c (win32_target_ops): Likewise.
1514
1515 2015-03-04  Pedro Alves  <palves@redhat.com>
1516
1517         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1518         Decide whether a breakpoint triggered based on the SIGTRAP's
1519         siginfo.si_code.
1520         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1521         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1522         (linux_low_filter_event): Check for breakpoints before checking
1523         watchpoints.
1524         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1525         siginfo.si_code.
1526         (linux_stopped_by_sw_breakpoint)
1527         (linux_supports_stopped_by_sw_breakpoint)
1528         (linux_stopped_by_hw_breakpoint)
1529         (linux_supports_stopped_by_hw_breakpoint): New functions.
1530         (linux_target_ops): Install new target methods.
1531
1532 2015-03-04  Pedro Alves  <palves@redhat.com>
1533
1534         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1535         * server.c (swbreak_feature, hwbreak_feature): New globals.
1536         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1537         (captured_main): Clear swbreak_feature and hwbreak_feature.
1538         * server.h (swbreak_feature, hwbreak_feature): Declare.
1539         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1540         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1541         supports_stopped_by_hw_breakpoint>: New fields.
1542         (target_supports_stopped_by_sw_breakpoint)
1543         (target_stopped_by_sw_breakpoint)
1544         (target_supports_stopped_by_hw_breakpoint)
1545         (target_stopped_by_hw_breakpoint): Declare.
1546
1547 2015-03-04  Pedro Alves  <palves@redhat.com>
1548
1549         enum lwp_stop_reason -> enum target_stop_reason
1550         * linux-low.c (check_stopped_by_breakpoint): Adjust.
1551         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1552         (linux_wait_1, stuck_in_jump_pad_callback)
1553         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1554         (linux_stopped_by_watchpoint):
1555         * linux-low.h (enum lwp_stop_reason): Delete.
1556         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1557         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1558
1559 2015-03-04  Yao Qi  <yao.qi@linaro.org>
1560
1561         * Makefile.in (SFILES): Add linux-aarch64-low.c.
1562
1563 2015-03-03  Gary Benson  <gbenson@redhat.com>
1564
1565         * hostio.c (handle_vFile): Fix prefix lengths.
1566
1567 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
1568
1569         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1570         ptr_bits.
1571
1572 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1573
1574         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1575         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1576         (clean): Add "rm -f" for above C files.
1577         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1578         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1579         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1580         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1581         * linux-s390-low.c (HWCAP_S390_VX): New macro.
1582         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1583         (init_registers_s390x_vx_linux64)
1584         (init_registers_s390x_tevx_linux64)
1585         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1586         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1587         declarations.
1588         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1589         (s390_store_vxrs_high): New functions.
1590         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1591         NT_S390_VXRS_HIGH.
1592         (s390_arch_setup): Add logic for selecting one of the new target
1593         descriptions.  Activate the new vector regsets if applicable.
1594         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1595         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1596         and init_registers_s390x_tevx_linux64.
1597
1598 2015-03-01  Pedro Alves  <palves@redhat.com>
1599
1600         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1601         parameter.
1602
1603 2015-02-27  Pedro Alves  <palves@redhat.com>
1604
1605         * linux-x86-low.c (u_debugreg_offset): New function.
1606         (x86_linux_dr_get, x86_linux_dr_set): Use it.
1607
1608 2015-02-27  Pedro Alves  <palves@redhat.com>
1609
1610         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1611         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1612         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1613         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1614         (ps_lsetfpregs, ps_getpid)
1615         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1616         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1617         (ps_lsetxregs, ps_plog): Declare.
1618
1619 2015-02-27  Pedro Alves  <palves@redhat.com>
1620
1621         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1622         IP_AGENT_EXPORT_FUNC.
1623         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1624         IP_AGENT_EXPORT_FUNC.
1625         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1626         (IP_AGENT_EXPORT): Delete.
1627         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1628         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1629         (gdb_trampoline_buffer_error, collecting, gdb_collect)
1630         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1631         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1632         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1633         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1634         (traceframe_read_count, traceframe_write_count)
1635         (traceframes_created, trace_state_variables, get_raw_reg)
1636         (get_trace_state_variable_value, set_trace_state_variable_value)
1637         (ust_loaded, helper_thread_id, cmd_buf): Use
1638         IPA_SYM_EXPORTED_NAME.
1639         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1640         (tracepoints) Use IP_AGENT_EXPORT_VAR.
1641         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1642         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1643         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1644         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1645         EXTERN_C_PUSH/EXTERN_C_POP.
1646         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1647         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1648         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1649         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1650         (traceframe_write_count, traceframe_read_count)
1651         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1652         (about_to_request_buffer_space, get_trace_state_variable_value)
1653         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1654         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1655         EXTERN_C_PUSH/EXTERN_C_POP.
1656         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1657         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1658         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1659         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1660         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1661         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1662         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1663         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1664         Define.
1665         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1666         (IP_AGENT_EXPORT_VAR_DECL): Define.
1667         (tracing): Declare.
1668         (gdb_agent_get_raw_reg): Declare.
1669
1670 2015-02-27  Tom Tromey  <tromey@redhat.com>
1671             Pedro Alves  <palves@redhat.com>
1672
1673         Rename symbols whose names are reserved C++ keywords throughout.
1674
1675 2015-02-27  Pedro Alves  <palves@redhat.com>
1676
1677         * Makefile.in (COMPILER): New, get it from autoconf.
1678         (CXX): Get from autoconf instead.
1679         (COMPILE.pre): Use COMPILER.
1680         (CC-LD): Rename to ...
1681         (CC_LD): ... this.  Use COMPILER.
1682         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1683         (CXX_FOR_TARGET): Default to g++ instead of gcc.
1684         * acinclude.m4: Include build-with-cxx.m4.
1685         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1686         Disable -Werror by default if building in C++ mode.
1687         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1688         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1689         the C++ compiler.  Save/restore CXXFLAGS too.
1690         * configure: Regenerate.
1691
1692 2015-02-27  Pedro Alves  <palves@redhat.com>
1693
1694         * acinclude.m4: Include libiberty.m4.
1695         * configure.ac: Call libiberty_INIT.
1696         * config.in, configure: Regenerate.
1697
1698 2015-02-26  Pedro Alves  <palves@redhat.com>
1699
1700         * linux-low.c (linux_wait_1): When incrementing the PC past a
1701         program breakpoint always use the_low_target.breakpoint_len as
1702         increment, rather than the maximum between that and
1703         the_low_target.decr_pc_after_break.
1704
1705 2015-02-23  Pedro Alves  <palves@redhat.com>
1706
1707         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1708         thread was doing a step-over; always adjust the PC if
1709         we stepped over a permanent breakpoint.
1710         (linux_wait_1): If we stepped over breakpoint that was on top of a
1711         permanent breakpoint, manually advance the PC past it.
1712
1713 2015-02-23  Pedro Alves  <palves@redhat.com>
1714
1715         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1716         modes.
1717         (x86_fill_gregset, x86_store_gregset): Use it when handling
1718         $orig_eax.
1719
1720 2015-02-20  Pedro Alves  <palves@redhat.com>
1721
1722         * thread-db.c: Include "nat/linux-procfs.h".
1723         (thread_db_init): Skip listing new threads if the kernel supports
1724         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1725
1726 2015-02-20  Pedro Alves  <palves@redhat.com>
1727
1728         * linux-low.c (status_pending_p_callback): Use ptid_match.
1729
1730 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1731
1732         PR breakpoints/16812
1733         * linux-low.c (wstatus_maybe_breakpoint): Remove.
1734         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1735         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1736
1737 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
1738
1739         PR breakpoints/15956
1740         * tracepoint.c (cmd_qtinit): Add check for current_thread.
1741
1742 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1743
1744         * linux-low.c (linux_low_btrace_conf): Print size.
1745         * server.c (handle_btrace_conf_general_set): New.
1746         (hanle_general_set): Call handle_btrace_conf_general_set.
1747         (handle_query): Report Qbtrace-conf:bts:size as supported.
1748
1749 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1750
1751         * linux-low.c (linux_low_enable_btrace): Update parameters.
1752         (linux_low_btrace_conf): New.
1753         (linux_target_ops)<to_btrace_conf>: Initialize.
1754         * server.c (current_btrace_conf): New.
1755         (handle_btrace_enable): Rename to ...
1756         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
1757         to target_enable_btrace.  Update comment.  Update users.
1758         (handle_qxfer_btrace_conf): New.
1759         (qxfer_packets): Add btrace-conf entry.
1760         (handle_query): Report qXfer:btrace-conf:read as supported packet.
1761         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1762         (target_ops)<read_btrace_conf>: New.
1763         (target_enable_btrace): Update parameters.
1764         (target_read_btrace_conf): New.
1765
1766 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1767
1768         * server.c (handle_btrace_general_set): Remove call to
1769         target_supports_btrace.
1770         (supported_btrace_packets): New.
1771         (handle_query): Call supported_btrace_packets.
1772         * target.h: include btrace-common.h.
1773         (btrace_target_info): Removed.
1774         (supports_btrace, target_supports_btrace): Update parameters.
1775
1776 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1777
1778         * Makefile.in (SFILES): Add common/btrace-common.c.
1779         (OBS): Add common/btrace-common.o.
1780         (btrace-common.o): Add build rules.
1781         * linux-low: Include btrace-common.h.
1782         (linux_low_read_btrace): Use struct btrace_data.  Call
1783         btrace_data_init and btrace_data_fini.
1784
1785 2015-02-06  Pedro Alves  <palves@redhat.com>
1786
1787         * thread-db.c (find_new_threads_callback): Add debug output.
1788
1789 2015-02-04  Pedro Alves  <palves@redhat.com>
1790
1791         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1792         (resume_stopped_resumed_lwps): New function.
1793         (linux_wait_for_event_filtered): Use it.
1794
1795 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
1796
1797         * Makefile.in (SFILES): Add linux-personality.c.
1798         (linux-personality.o): New rule.
1799         * configure.srv (srv_linux_obj): Add linux-personality.o to the
1800         list of objects to be built.
1801         * linux-low.c: Include nat/linux-personality.h.
1802         (linux_create_inferior): Remove code to disable address space
1803         randomization (moved to ../nat/linux-personality.c).  Create
1804         cleanup to disable address space randomization.
1805
1806 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
1807
1808         * Makefile.in (posix-strerror.o): New rule.
1809         (mingw-strerror.o): Likewise.
1810         * configure: Regenerated.
1811         * configure.ac: Source file ../common/common.host.  Initialize new
1812         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
1813
1814 2015-01-14  Yao Qi  <yao@codesourcery.com>
1815
1816         * Makefile.in (SFILES): Add nat/ppc-linux.c.
1817         (ppc-linux.o): New rule.
1818         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1819         * configure.ac: AC_CHECK_FUNCS(getauxval).
1820         * config.in: Re-generated.
1821         * configure: Re-generated.
1822         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1823         ppc64_64bit_inferior_p
1824
1825 2015-01-14  Yao Qi  <yao@codesourcery.com>
1826
1827         * linux-ppc-low.c: Include "nat/ppc-linux.h".
1828          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1829         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
1830         (PT_ORIG_R3, PT_TRAP): Likewise.
1831         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1832         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1833         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1834
1835 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
1836
1837         * i387-fp.c (i387_cache_to_xsave): In look over
1838         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1839         zmmh_low_space field by use of zmmh_high_space.
1840
1841 2015-01-09  Pedro Alves  <palves@redhat.com>
1842
1843         * linux-low.c (step_over_bkpt): Move higher up in the file.
1844         (handle_extended_wait): Don't store the stop_pc here.
1845         (get_stop_pc): Adjust comments and rename to ...
1846         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
1847         stopped for a software breakpoint or hardware breakpoint.
1848         (thread_still_has_status_pending_p): New function.
1849         (status_pending_p_callback): Use
1850         thread_still_has_status_pending_p.  If the event is no longer
1851         interesting, resume the LWP.
1852         (handle_tracepoints): Add assert.
1853         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1854         (wstatus_maybe_breakpoint): New function.
1855         (cancel_breakpoint): Delete function.
1856         (check_stopped_by_watchpoint): New function, factored out from
1857         linux_low_filter_event.
1858         (lp_status_maybe_breakpoint): Delete function.
1859         (linux_low_filter_event): Remove filter_ptid argument.
1860         Leave thread group exits pending here.  Store the LWP's stop PC.
1861         Always leave events pending.
1862         (linux_wait_for_event_filtered): Pull all events out of the
1863         kernel, and leave them all pending.
1864         (count_events_callback, select_event_lwp_callback): Consider all
1865         events.
1866         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1867         (select_event_lwp): Only give preference to the stepping LWP in
1868         all-stop mode.  Adjust comments.
1869         (ignore_event): New function.
1870         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
1871         references to cancel_breakpoints.  Adjust to renames.  Also give
1872         equal priority to all LWPs that have had events in non-stop mode.
1873         If reporting a software breakpoint event, unadjust the LWP's PC.
1874         (linux_wait): If linux_wait_1 returned an ignored event, retry.
1875         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1876         Adjust.
1877         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
1878         (resume_status_pending_p): Use thread_still_has_status_pending_p.
1879         (linux_stopped_by_watchpoint): Adjust.
1880         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1881         * linux-low.h (enum lwp_stop_reason): New.
1882         (struct lwp_info) <stop_pc>: Adjust comment.
1883         <stopped_by_watchpoint>: Delete field.
1884         <stop_reason>: New field.
1885         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1886         * mem-break.c (software_breakpoint_inserted_here)
1887         (hardware_breakpoint_inserted_here): New function.
1888         * mem-break.h (software_breakpoint_inserted_here)
1889         (hardware_breakpoint_inserted_here): Declare.
1890         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1891         (cancel_breakpoints): Delete.
1892         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1893         (upload_fast_traceframes): Remove references to
1894         cancel_breakpoints.
1895
1896 2015-01-09  Pedro Alves  <palves@redhat.com>
1897
1898         * thread-db.c (find_new_threads_callback): Ignore thread if the
1899         kernel thread ID is -1.
1900
1901 2015-01-09  Pedro Alves  <palves@redhat.com>
1902
1903         * linux-low.c (linux_attach_fail_reason_string): Move to
1904         nat/linux-ptrace.c, and rename.
1905         (linux_attach_lwp): Update comment.
1906         (attach_proc_task_lwp_callback): New function.
1907         (linux_attach): Adjust to rename and use
1908         linux_proc_attach_tgid_threads.
1909         (linux_attach_fail_reason_string): Delete declaration.
1910
1911 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
1912
1913         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1914         * server.c (gdbserver_version): Likewise.
1915
1916 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1917
1918         * remote-utils.c: Include ctype.h.
1919         (input_interrupt): Explicitly handle the case when the char
1920         received is the NUL byte.  Improve the printing of non-ASCII
1921         characters.
1922
1923 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
1924
1925         * linux-low.c (linux_low_filter_event): Update call to
1926         linux_enable_event_reporting following the addition of
1927         a new parameter to that function.
1928
1929 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
1930
1931         PR server/17457
1932         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1933         (AARCH64_FPCR_REGNO): Likewise.
1934         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1935         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1936         (aarch64_store_fpregset): Likewise.
1937
1938 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
1939
1940         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1941         Remove FIXME comment about assumption about N.
1942
1943 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
1944
1945         * configure.ac: If large-file support is disabled in GDBserver,
1946         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1947         * configure: Regenerate.
1948
1949 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1950
1951         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1952         warning upon ENODATA from ptrace.
1953         * linux-s390-low.c (s390_store_tdb): New.
1954         (s390_regsets): Add regset for NT_S390_TDB.
1955
1956 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1957
1958         * linux-low.c (regsets_store_inferior_registers): Skip regsets
1959         without a fill_function.
1960         * linux-s390-low.c (s390_fill_last_break): Remove.
1961         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1962         (s390_arch_setup): Use regset's size instead of fill_function for
1963         loop end condition.
1964
1965 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1966
1967         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1968         the regset's store function when ptrace returned an error.
1969         * regcache.c (get_thread_regcache): Invalidate register cache
1970         before fetching inferior's registers.
1971
1972 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1973
1974         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1975         while-loop as for-loop.
1976         (regsets_store_inferior_registers): Likewise.
1977
1978 2014-11-28  Yao Qi  <yao@codesourcery.com>
1979
1980         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1981         * config.in, configure: Re-generate.
1982         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1983         is defined.
1984
1985 2014-11-21  Yao Qi  <yao@codesourcery.com>
1986
1987         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1988         (AC_CHECK_HEADERS): Remove malloc.h.
1989         * configure: Re-generated.
1990         * config.in: Re-generated.
1991         * server.h: Don't include alloca.h and malloc.h.
1992         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1993         Don't include malloc.h.
1994
1995 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
1996
1997         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1998         corresponding ERRNO check in same block.
1999
2000 2014-11-12  Pedro Alves  <palves@redhat.com>
2001
2002         * server.c (cont_thread): Update comment.
2003         (start_inferior, attach_inferior): No longer clear cont_thread.
2004         (handle_v_cont): No longer set cont_thread.
2005         (captured_main): Clear cont_thread each time a GDB connects.
2006
2007 2014-11-12  Pedro Alves  <palves@redhat.com>
2008
2009         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2010         thread, and don't resume all threads if the Hc thread has exited.
2011
2012 2014-11-12  Pedro Alves  <palves@redhat.com>
2013
2014         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2015         the process group instead of to a specific LWP.
2016
2017 2014-10-15  Pedro Alves  <palves@redhat.com>
2018
2019         PR server/17487
2020         * win32-arm-low.c (arm_set_thread_context): Remove current_event
2021         parameter.
2022         (arm_set_thread_context): Delete.
2023         (the_low_target): Adjust.
2024         * win32-i386-low.c (debug_registers_changed)
2025         (debug_registers_used): Delete.
2026         (update_debug_registers_callback): New function.
2027         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2028         needing to update their debug registers.
2029         (win32_get_current_dr): New function.
2030         (x86_dr_low_get_addr, x86_dr_low_get_control)
2031         (x86_dr_low_get_status): Fetch the debug register from the thread
2032         record's context.
2033         (i386_initial_stuff): Adjust.
2034         (i386_get_thread_context): Remove current_event parameter.  Don't
2035         clear debug_registers_changed nor copy DR values to
2036         debug_reg_state.
2037         (i386_set_thread_context): Delete.
2038         (i386_prepare_to_resume): New function.
2039         (i386_thread_added): Mark the thread as needing to update irs
2040         debug registers.
2041         (the_low_target): Remove i386_set_thread_context and install
2042         i386_prepare_to_resume.
2043         * win32-low.c (win32_get_thread_context): Adjust.
2044         (win32_set_thread_context): Use SetThreadContext
2045         directly.
2046         (win32_prepare_to_resume): New function.
2047         (win32_require_context): New function, factored out from ...
2048         (thread_rec): ... this.
2049         (continue_one_thread): Call win32_prepare_to_resume on each thread
2050         we're about to continue.
2051         (win32_resume): Call win32_prepare_to_resume on the event thread.
2052         * win32-low.h (struct win32_thread_info)
2053         <debug_registers_changed>: New field.
2054         (struct win32_target_ops): Change prototype of set_thread_context,
2055         delete set_thread_context and add prepare_to_resume.
2056         (win32_require_context): New declaration.
2057
2058 2014-10-08  Gary Benson  <gbenson@redhat.com>
2059
2060         * server.h: Do not include common-exceptions.h.
2061
2062 2014-10-08  Gary Benson  <gbenson@redhat.com>
2063
2064         * server.h: Do not include cleanups.h.
2065
2066 2014-09-30  James Hogan  <james.hogan@imgtec.com>
2067
2068         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2069         mips64-dsp-linux.c.
2070
2071 2014-09-23  Yao Qi  <yao@codesourcery.com>
2072
2073         * linux-low.c (lp_status_maybe_breakpoint): New function.
2074         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2075         (count_events_callback): Likewise.
2076         (select_event_lwp_callback): Likewise.
2077         (cancel_breakpoints_callback): Likewise.
2078
2079 2014-09-19  Don Breazeal  <donb@codesourcery.com>
2080
2081         * linux-low.c (handle_extended_wait): Call
2082         linux_ptrace_get_extended_event.
2083         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2084         linux_is_extended_waitstatus.
2085
2086 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
2087
2088         * Makefile.in (CPPFLAGS): Define.
2089         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2090         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2091
2092 2014-09-16  Gary Benson  <gbenson@redhat.com>
2093
2094         * inferiors.h (current_inferior): Renamed as...
2095         (current_thread): New variable.  All uses updated.
2096         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2097         (maybe_move_out_of_jump_pad): Likewise.
2098         (cancel_breakpoint): Likewise.
2099         (linux_low_filter_event): Likewise.
2100         (wait_for_sigstop): Likewise.
2101         (linux_resume_one_lwp): Likewise.
2102         (need_step_over_p): Likewise.
2103         (start_step_over): Likewise.
2104         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2105         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2106         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2107         and save_inferior as saved_thread.
2108         * regcache.c (get_thread_regcache): Renamed saved_inferior as
2109         saved_thread.
2110         (regcache_invalidate_thread): Likewise.
2111         * remote-utils.c (prepare_resume_reply): Likewise.
2112         * thread-db.c (thread_db_get_tls_address): Likewise.
2113         (disable_thread_event_reporting): Likewise.
2114         (remove_thread_event_breakpoints): Likewise.
2115         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2116         as saved_thread.
2117         * target.h (set_desired_inferior): Renamed as...
2118         (set_desired_thread): New declaration.  All uses updated.
2119         * server.c (myresume): Updated comment to reference thread instead
2120         of inferior.
2121         (handle_serial_event): Likewise.
2122         (handle_target_event): Likewise.
2123
2124 2014-09-12  Tom Tromey  <tromey@redhat.com>
2125             Gary Benson  <gbenson@redhat.com>
2126
2127         * regcache.h: Include common-regcache.h.
2128         (regcache_read_pc): Don't declare.
2129         * regcache.c (get_thread_regcache_for_ptid): New function.
2130
2131 2014-09-11  Tom Tromey  <tromey@redhat.com>
2132             Gary Benson  <gbenson@redhat.com>
2133
2134         * symbol.c: New file.
2135         * Makefile.in (SFILES): Add symbol.c.
2136         (OBS): Add symbol.o.
2137
2138 2014-09-11  Gary Benson  <gbenson@redhat.com>
2139
2140         * target.c (target_stop_ptid, target_continue_ptid): New
2141         functions.
2142
2143 2014-09-11  Tom Tromey  <tromey@redhat.com>
2144             Gary Benson  <gbenson@redhat.com>
2145
2146         * target.h: Include target/target.h.
2147         * target.c (target_read_memory, target_read_uint32)
2148         (target_write_memory): New functions.
2149
2150 2014-09-11  Gary Benson  <gbenson@redhat.com>
2151
2152         * server.h (debug_hw_points): Don't declare.
2153         * server.c (debug_hw_points): Don't define.  Replace all uses
2154         with show_debug_regs.
2155         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
2156         all uses with show_debug_regs.
2157
2158 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2159
2160         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2161         endianness into account.
2162         (ppc_supply_ptrace_register): Likewise.
2163
2164 2014-09-03  James Hogan  <james.hogan@imgtec.com>
2165
2166         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2167         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2168
2169 2014-09-03  Gary Benson  <gbenson@redhat.com>
2170
2171         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2172         ALL_DEBUG_ADDRESS_REGISTERS.
2173
2174 2014-09-02  Gary Benson  <gbenson@redhat.com>
2175
2176         * i386-low.h: Renamed as...
2177         * x86-low.h: New file.  All type, function and variable name
2178         prefixes changed from "i386_" to "x86_".  All references updated.
2179         * i386-low.c: Renamed as...
2180         * x86-low.c: New file.  All type, function and variable name
2181         prefixes changed from "i386_" to "x86_".  All references updated.
2182
2183 2014-09-02  Gary Benson  <gbenson@redhat.com>
2184
2185         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2186         (x86_linux_new_thread): Likewise.
2187
2188 2014-08-29  Gary Benson  <gbenson@redhat.com>
2189
2190         * server.h (setjmp.h): Do not include.
2191         (toplevel): Do not declare.
2192         (common-exceptions.h): Include.
2193         (cleanups.h): Likewise.
2194         * server.c (toplevel): Do not define.
2195         (exit_code): New static global.
2196         (detach_or_kill_for_exit_cleanup): New function.
2197         (main): New function.  Original main renamed to...
2198         (captured_main): New function.
2199         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2200
2201 2014-08-29  Gary Benson  <gbenson@redhat.com>
2202
2203         * Makefile.in (SFILES): Add common/common-exceptions.c.
2204         (OBS): Add common-exceptions.o.
2205         (common-exceptions.o): New rule.
2206         * utils.c (prepare_to_throw_exception): New function.
2207
2208 2014-08-29  Gary Benson  <gbenson@redhat.com>
2209
2210         * config.in: Regenerate.
2211         * configure: Likewise.
2212
2213 2014-08-29  Gary Benson  <gbenson@redhat.com>
2214
2215         * Makefile.in (SFILES): Add common/cleanups.c.
2216         (OBS): cleanups.o.
2217         (cleanups.o): New rule.
2218
2219 2014-08-29  Gary Benson  <gbenson@redhat.com>
2220
2221         * utils.c (internal_vwarning): New function.
2222
2223 2014-08-28  Gary Benson  <gbenson@redhat.com>
2224
2225         * utils.h (fatal): Remove declaration.
2226         * utils.c (fatal): Remove function.
2227
2228 2014-08-28  Gary Benson  <gbenson@redhat.com>
2229
2230         * tracepoint.c (gdb_agent_init): Replace fatal with
2231         perror_with_name.
2232         (initialize_tracepoint): Likewise.
2233
2234 2014-08-28  Gary Benson  <gbenson@redhat.com>
2235
2236         * remote-utils.c (remote_prepare): Replace fatal with error.
2237
2238 2014-08-28  Gary Benson  <gbenson@redhat.com>
2239
2240         * linux-low.c (linux_async): Replace fatal with warning.
2241         Tidy up and return.
2242         (linux_start_non_stop): Return -1 if linux_async failed.
2243
2244 2014-08-28  Gary Benson  <gbenson@redhat.com>
2245
2246         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2247         gdb_assert.
2248         (i386_dr_low_get_addr): Remove vague comment.
2249         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2250         gdb_assert.
2251
2252 2014-08-28  Gary Benson  <gbenson@redhat.com>
2253
2254         * inferiors.c (get_thread_process): Replace check with gdb_assert.
2255         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2256         internal_error.
2257         (linux_resume_one_lwp): Likewise.
2258         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2259         gdb_assert.
2260         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2261         with internal_error.
2262         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2263         (init_register_cache): Replace fatal with gdb_assert_not_reached.
2264         (find_register_by_name): Replace fatal with internal_error.
2265         (find_regno): Likewise.
2266         * tdesc.c (init_target_desc): Replace check with gdb_assert.
2267         * thread-db.c (thread_db_create_event): Likewise.
2268         (thread_db_load_search): Likewise.
2269         (try_thread_db_load_1): Likewise.
2270         * tracepoint.c (get_jump_space_head): Replace fatal with
2271         internal_error.
2272         (claim_trampoline_space): Likewise.
2273         (have_fast_tracepoint_trampoline_buffer): Likewise.
2274         (cmd_qtstart): Likewise.
2275         (stop_tracing): Likewise.
2276         (fast_tracepoint_collecting): Likewise.
2277         (target_malloc): Likewise.
2278         (download_tracepoint): Likewise.
2279         (download_trace_state_variables): Replace check with gdb_assert.
2280         (upload_fast_traceframes): Replace fatal with internal_error.
2281
2282 2014-08-19  Tom Tromey  <tromey@redhat.com>
2283             Gary Benson  <gbenson@redhat.com>
2284
2285         * Makefile.in (SFILES): Add common/common-debug.c.
2286         (OBS): Add common-debug.o.
2287         (common-debug.o): New rule.
2288         * debug.h (debug_printf): Don't declare.
2289         * debug.c (debug_printf): Renamed and rewritten as...
2290         (debug_vprintf): New function.
2291
2292 2014-08-19  Gary Benson  <gbenson@redhat.com>
2293
2294         * utils.h: Do not include print-utils.h.
2295
2296 2014-08-19  Tom Tromey  <tromey@redhat.com>
2297             Gary Benson  <gbenson@redhat.com>
2298
2299         * server.h: Add static assertion.
2300         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2301
2302 2014-08-19  Tom Tromey  <tromey@redhat.com>
2303             Gary Benson  <gbenson@redhat.com>
2304
2305         * Makefile.in (SFILES): Add common/errors.c.
2306         (OBS): Add errors.o.
2307         (IPA_OBS): Add errors-ipa.o.
2308         (errors.o): New rule.
2309         (errors-ipa.o): Likewise.
2310         * utils.h (perror_with_name, error, warning): Don't declare.
2311         * utils.c (warning): Renamed and rewritten as...
2312         (vwarning): New function.
2313         (error): Renamed and rewritten as...
2314         (verror): New function.
2315         (internal_error): Renamed and rewritten as...
2316         (internal_verror): New function.
2317
2318 2014-08-07  Gary Benson  <gbenson@redhat.com>
2319
2320         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2321         * configure: Regenerate.
2322         * config.in: Likewise.
2323         * server.h: Do not include errno.h.
2324         * event-loop.c: Likewise.
2325         * hostio-errno.c: Likewise.
2326         * linux-low.c: Likewise.
2327         * remote-utils.c: Likewise.
2328         * spu-low.c: Likewise.
2329         * utils.c: Likewise.
2330         * gdbreplay.c: Unconditionally include errno.h.
2331
2332 2014-08-07  Gary Benson  <gbenson@redhat.com>
2333
2334         * server.h: Do not include string.h.
2335         * event-loop.c: Likewise.
2336         * linux-low.c: Likewise.
2337         * regcache.c: Likewise.
2338         * remote-utils.c: Likewise.
2339         * spu-low.c: Likewise.
2340         * utils.c: Likewise.
2341
2342 2014-08-07  Gary Benson  <gbenson@redhat.com>
2343
2344         * server.h: Do not include gdb_assert.h.
2345
2346 2014-08-07  Gary Benson  <gbenson@redhat.com>
2347
2348         * server.h: Do not include common-utils.h.
2349
2350 2014-08-07  Gary Benson  <gbenson@redhat.com>
2351
2352         * server.h: Do not include ptid.h.
2353         * notif.h: Likewise.
2354
2355 2014-08-07  Gary Benson  <gbenson@redhat.com>
2356
2357         * server.h: Do not include gdb_locale.h.
2358
2359 2014-08-07  Gary Benson  <gbenson@redhat.com>
2360
2361         * server.h: Do not include gdb/signals.h.
2362         * win32-low.c: Likewise.
2363
2364 2014-08-07  Gary Benson  <gbenson@redhat.com>
2365
2366         * server.h: Do not include pathmax.h.
2367
2368 2014-08-07  Gary Benson  <gbenson@redhat.com>
2369
2370         * server.h: Do not include libiberty.h.
2371         * linux-bfin-low.c: Likewise.
2372
2373 2014-08-07  Gary Benson  <gbenson@redhat.com>
2374
2375         * server.h: Do not include ansidecl.h.
2376
2377 2014-08-07  Gary Benson  <gbenson@redhat.com>
2378
2379         * linux-x86-low.c: Do not include stddef.h.
2380         * lynx-ppc-low.c: Likewise.
2381         * tracepoint.c: Likewise.
2382
2383 2014-08-07  Gary Benson  <gbenson@redhat.com>
2384
2385         * server.h: Do not include stdarg.h.
2386         * nto-low.c: Likewise.
2387
2388 2014-08-07  Gary Benson  <gbenson@redhat.com>
2389
2390         * server.h: Do not include stdlib.h.
2391         * inferiors.c: Likewise.
2392         * linux-low.c: Likewise.
2393         * regcache.c: Likewise.
2394         * spu-low.c: Likewise.
2395         * tracepoint.c: Likewise.
2396         * utils.c: Likewise.
2397
2398 2014-08-07  Gary Benson  <gbenson@redhat.com>
2399
2400         * server.h: Do not include stdio.h.
2401         * linux-low.c: Likewise.
2402         * remote-utils.c: Likewise.
2403         * spu-low.c: Likewise.
2404         * utils.c: Likewise.
2405         * wincecompat.c: Likewise.
2406
2407 2014-08-06  Gary Benson  <gbenson@redhat.com>
2408
2409         * regcache.c (init_register_cache): Move conditionals inside if.
2410
2411 2014-08-06  Gary Benson  <gbenson@redhat.com>
2412
2413         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2414
2415 2014-07-31  Gary Benson  <gbenson@redhat.com>
2416
2417         * ax.h: Do not include server.h.
2418         * gdbthread.h: Likewise.
2419         * lynx-low.h: Likewise.
2420         * notif.h: Likewise.
2421
2422 2014-07-30  Gary Benson  <gbenson@redhat.com>
2423
2424         * server.h: Include common-defs.h.
2425         Do not include config.h or build-gnulib-gdbserver/config.h.
2426
2427 2014-07-30  Gary Benson  <gbenson@redhat.com>
2428
2429         * hostio-errno.c: Move server.h to top of includes list.
2430         * inferiors.c: Likewise.
2431         * linux-x86-low.c: Likewise.
2432         * notif.c: Include server.h.
2433
2434 2014-07-24  Tom Tromey  <tromey@redhat.com>
2435             Gary Benson  <gbenson@redhat.com>
2436
2437         * server.h (CORE_ADDR): Now unsigned.
2438
2439 2014-07-16  Pedro Alves  <palves@redhat.com>
2440
2441         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2442
2443 2014-07-15  Pedro Alves  <palves@redhat.com>
2444
2445         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2446         copy.
2447
2448 2014-07-11  Pedro Alves  <palves@redhat.com>
2449
2450         * linux-low.c (kill_wait_lwp): New function, based on
2451         kill_one_lwp_callback, but use my_waitpid directly.
2452         (kill_one_lwp_callback, linux_kill): Use it.
2453
2454 2014-06-23  Pedro Alves  <palves@redhat.com>
2455
2456         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2457         before setting DR0..DR3.
2458
2459 2014-06-20  Gary Benson  <gbenson@redhat.com>
2460
2461         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2462         * configure: Regenerated.
2463         * config.in: Likewise.
2464
2465 2014-06-20  Gary Benson  <gbenson@redhat.com>
2466
2467         * Makefile.in (SFILES): Update locations for files moved
2468         from common to nat.
2469         (object file files): Reordered.
2470
2471 2014-06-20  Gary Benson  <gbenson@redhat.com>
2472
2473         * i386-low.h (i386_dr_low_can_set_addr): Removed.
2474         (i386_dr_low_set_addr): Likewise.
2475         (i386_dr_low_get_addr): Likewise.
2476         (i386_dr_low_can_set_control): Likewise.
2477         (i386_dr_low_set_control): Likewise.
2478         (i386_dr_low_get_control): Likewise.
2479         (i386_dr_low_get_status): Likewise.
2480         (i386_get_debug_register_length): Likewise.
2481         * linux-x86-low.c (i386_dr_low_set_addr):
2482         Changed signature.  Made static.
2483         (i386_dr_low_get_addr): Likewise.
2484         (i386_dr_low_set_control): Likewise.
2485         (i386_dr_low_get_control): Likewise.
2486         (i386_dr_low_get_status): Likewise.
2487         (i386_dr_low): New global variable.
2488         * win32-i386-low.c (i386_dr_low_set_addr):
2489         Changed signature.  Made static.
2490         (i386_dr_low_get_addr): Likewise.
2491         (i386_dr_low_set_control): Likewise.
2492         (i386_dr_low_get_control): Likewise.
2493         (i386_dr_low_get_status): Likewise.
2494         (i386_dr_low): New global variable.
2495
2496 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
2497
2498         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2499         * Makefile.in (AR, AR_FLAGS): Define.
2500         * configure: Regenerate.
2501
2502 2014-06-19  Gary Benson  <gbenson@redhat.com>
2503
2504         * Makefile.in (i386-dregs.o): New rule.
2505         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2506         * i386-low.c (target.h): Remove include.
2507         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2508         (DR_CONTROL_SHIFT): Likewise.
2509         (DR_CONTROL_SIZE): Likewise.
2510         (DR_RW_EXECUTE): Likewise.
2511         (DR_RW_WRITE): Likewise.
2512         (DR_RW_READ): Likewise.
2513         (DR_RW_IORW): Likewise.
2514         (DR_LEN_1): Likewise.
2515         (DR_LEN_2): Likewise.
2516         (DR_LEN_4): Likewise.
2517         (DR_LEN_8): Likewise.
2518         (DR_LOCAL_ENABLE_SHIFT): Likewise.
2519         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2520         (DR_ENABLE_SIZE): Likewise.
2521         (DR_LOCAL_SLOWDOWN): Likewise.
2522         (DR_GLOBAL_SLOWDOWN): Likewise.
2523         (DR_CONTROL_RESERVED): Likewise.
2524         (I386_DR_CONTROL_MASK): Likewise.
2525         (I386_DR_VACANT): Likewise.
2526         (I386_DR_LOCAL_ENABLE): Likewise.
2527         (I386_DR_GLOBAL_ENABLE): Likewise.
2528         (I386_DR_DISABLE): Likewise.
2529         (I386_DR_SET_RW_LEN): Likewise.
2530         (I386_DR_GET_RW_LEN): Likewise.
2531         (I386_DR_WATCH_HIT): Likewise.
2532         (i386_wp_op_t): Likewise.
2533         (i386_show_dr): Likewise.
2534         (i386_length_and_rw_bits): Likewise.
2535         (i386_insert_aligned_watchpoint): Likewise.
2536         (i386_remove_aligned_watchpoint): Likewise.
2537         (i386_handle_nonaligned_watchpoint): Likewise.
2538         i386_update_inferior_debug_regs(): Likewise.
2539         (i386_dr_insert_watchpoint): Likewise.
2540         (i386_dr_remove_watchpoint): Likewise.
2541         (i386_dr_region_ok_for_watchpoint): Likewise.
2542         (i386_dr_stopped_data_address): Likewise.
2543         (i386_dr_stopped_by_watchpoint): Likewise.
2544
2545 2014-06-19  Gary Benson  <gbenson@redhat.com>
2546
2547         * i386-low.c (i386_dr_show): Renamed to
2548         i386_show_dr and made static.  All uses updated.
2549         (i386_dr_length_and_rw_bits): Renamed to
2550         i386_length_and_rw_bits and made static.
2551         All uses updated.
2552         (i386_dr_insert_aligned_watchpoint): Renamed to
2553         i386_insert_aligned_watchpoint and made static.
2554         All uses updated.
2555         (i386_dr_remove_aligned_watchpoint): Renamed to
2556         i386_remove_aligned_watchpoint and made static.
2557         All uses updated.
2558         (i386_dr_update_inferior_debug_regs): Renamed to
2559         i386_update_inferior_debug_regs and made static.
2560         All uses updated.
2561
2562 2014-06-18  Gary Benson  <gbenson@redhat.com>
2563
2564         * i386-low.h (i386_dr_low_can_set_addr): New macro.
2565         (i386_dr_low_can_set_control): Likewise.
2566         (i386_get_debug_register_length): Likewise.
2567         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2568         (i386_dr_low_can_set_control): Likewise.
2569         (i386_get_debug_register_length): Likewise.
2570
2571 2014-06-17  Gary Benson  <gbenson@redhat.com>
2572
2573         * i386-low.h (i386-dregs.h): New include.
2574         (DR_FIRSTADDR): Now in i386-dregs.h.
2575         (DR_LASTADDR): Likewise.
2576         (DR_NADDR): Likewise.
2577         (DR_STATUS): Likewise.
2578         (DR_CONTROL): Likewise.
2579         (i386_debug_reg_state): Likewise.
2580         (i386_dr_insert_watchpoint): Likewise.
2581         (i386_dr_remove_watchpoint): Likewise.
2582         (i386_dr_region_ok_for_watchpoint): Likewise.
2583         (i386_dr_stopped_data_address): Likewise.
2584         (i386_dr_stopped_by_watchpoint): Likewise.
2585         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2586
2587 2014-06-18  Gary Benson  <gbenson@redhat.com>
2588
2589         * i386-low.h (i386_low_insert_watchpoint): Renamed to
2590         i386_dr_insert_watchpoint.
2591         (i386_low_remove_watchpoint): Renamed to
2592         i386_dr_remove_watchpoint.
2593         (i386_low_region_ok_for_watchpoint): Renamed to
2594         i386_dr_region_ok_for_watchpoint.
2595         (i386_low_stopped_data_address): Renamed to
2596         i386_dr_stopped_data_address.
2597         (i386_low_stopped_by_watchpoint): Renamed to
2598         i386_dr_stopped_by_watchpoint.
2599         * i386-low.c (i386_show_dr): Renamed to
2600         i386_dr_show and made nonstatic.  All uses updated.
2601         (i386_length_and_rw_bits): Renamed to
2602         i386_dr_length_and_rw_bits and made nonstatic.
2603         All uses updated.
2604         (i386_insert_aligned_watchpoint): Renamed to
2605         i386_dr_insert_aligned_watchpoint and made nonstatic.
2606         All uses updated.
2607         (i386_remove_aligned_watchpoint): Renamed to
2608         i386_dr_remove_aligned_watchpoint and made nonstatic.
2609         All uses updated.
2610         (i386_update_inferior_debug_regs): Renamed to
2611         i386_dr_update_inferior_debug_regs and made nonstatic.
2612         All uses updated.
2613         (i386_low_insert_watchpoint): Renamed to
2614         i386_dr_insert_watchpoint.  All uses updated.
2615         (i386_low_remove_watchpoint): Renamed to
2616         i386_dr_remove_watchpoint.  All uses updated.
2617         (i386_low_region_ok_for_watchpoint): Renamed to
2618         i386_dr_region_ok_for_watchpoint.  All uses updated.
2619         (i386_low_stopped_data_address): Renamed to
2620         i386_dr_stopped_data_address.  All uses updated.
2621         (i386_low_stopped_by_watchpoint): Renamed to
2622         i386_dr_stopped_by_watchpoint.  All uses updated.
2623
2624 2014-06-18  Gary Benson  <gbenson@redhat.com>
2625
2626         * i386-low.c (i386_dr_low_can_set_addr): New macro.
2627         (i386_dr_low_can_set_control): Likewise.
2628         (i386_insert_aligned_watchpoint): New check.
2629
2630 2014-06-18  Gary Benson  <gbenson@redhat.com>
2631
2632         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2633         Renamed to state.
2634
2635 2014-06-18  Gary Benson  <gbenson@redhat.com>
2636
2637         * i386-low.c (i386_length_and_rw_bits): Use internal_error
2638         instead of fatal and error.
2639         (i386_handle_nonaligned_watchpoint): Likewise.
2640
2641 2014-06-18  Gary Benson  <gbenson@redhat.com>
2642
2643         * i386-low.c (i386_get_debug_register_length): New macro.
2644         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
2645         (i386_show_dr): Use debug_printf instead of fprintf.  Use
2646         phex to format values.
2647
2648 2014-06-18  Gary Benson  <gbenson@redhat.com>
2649
2650         * i386-low.h: Comment changes.
2651         * i386-low.c: Likewise.
2652
2653 2014-06-18  Gary Benson  <gbenson@redhat.com>
2654
2655         * i386-low.c: Whitespace changes.
2656
2657 2014-06-12  Tom Tromey  <tromey@redhat.com>
2658
2659         * utils.c (freeargv): Remove.
2660
2661 2014-06-12  Tom Tromey  <tromey@redhat.com>
2662
2663         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2664         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2665         (parse_debug_format_options): Likewise.
2666         (gdbserver_usage): Likewise.
2667         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2668         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2669         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2670         against libiberty.
2671         ($(LIBGNU)): Depend on libiberty.
2672         (all-lib): Recurse into all subdirs.
2673         (install-only): Invoke "install" target in subdirs.
2674         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2675         targets.
2676         * configure: Rebuild.
2677         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
2678         for vasprintf, vsnprintf, or gettimeofday.
2679         * configure.srv: Don't add safe-ctype.o or lbasename.o to
2680         srv_tgtobj.
2681
2682 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
2683
2684         * development.sh: Delete.
2685         * Makefile.in (config.status): Adjust dependency on development.sh.
2686         * configure.ac: Adjust development.sh source call.
2687         * configure: Regenerate.
2688
2689 2014-06-02  Pedro Alves  <palves@redhat.com>
2690
2691         * ax.c (gdb_free_agent_expr): New function.
2692         * ax.h (gdb_free_agent_expr): New declaration.
2693         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2694         list.
2695         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2696         static.
2697         (clear_breakpoint_conditions_and_commands): New function.
2698         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2699         (clear_breakpoint_conditions_and_commands): New declaration.
2700
2701 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2702
2703         * linux-aarch64-low.c (asm/ptrace.h): Include.
2704
2705 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
2706
2707         Fix TLS access for -static -pthread.
2708         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2709         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2710         (thread_db_load_search, try_thread_db_load_1): Initialize it.
2711
2712 2014-05-20  Pedro Alves  <palves@redhat.com>
2713
2714         * linux-aarch64-low.c (aarch64_insert_point)
2715         (aarch64_remove_point): No longer check whether the type is
2716         supported here.  Adjust to new interface.
2717         (the_low_target): Install aarch64_supports_z_point_type as
2718         supports_z_point_type method.
2719         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2720         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2721         instead of a Z packet char.  Adjust.
2722         (arm_supports_z_point_type): New function.
2723         (arm_insert_point, arm_remove_point): Adjust to new interface.
2724         (the_low_target): Install arm_supports_z_point_type.
2725         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2726         (cris_insert_point, cris_remove_point): Adjust to new interface.
2727         Don't check whether the type is supported here.
2728         (the_low_target): Install cris_supports_z_point_type.
2729         * linux-low.c (linux_supports_z_point_type): New function.
2730         (linux_insert_point, linux_remove_point): Adjust to new interface.
2731         * linux-low.h (struct linux_target_ops) <insert_point,
2732         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
2733         raw_breakpoint pointer parameter.
2734         <supports_z_point_type>: New method.
2735         * linux-mips-low.c (mips_supports_z_point_type): New function.
2736         (mips_insert_point, mips_remove_point): Adjust to new interface.
2737         Use mips_supports_z_point_type.
2738         (the_low_target): Install mips_supports_z_point_type.
2739         * linux-ppc-low.c (the_low_target): Install NULL as
2740         supports_z_point_type method.
2741         * linux-s390-low.c (the_low_target): Install NULL as
2742         supports_z_point_type method.
2743         * linux-sparc-low.c (the_low_target): Install NULL as
2744         supports_z_point_type method.
2745         * linux-x86-low.c (x86_supports_z_point_type): New function.
2746         (x86_insert_point): Adjust to new insert_point interface.  Use
2747         insert_memory_breakpoint.  Adjust to new
2748         i386_low_insert_watchpoint interface.
2749         (x86_remove_point): Adjust to remove_point interface.  Use
2750         remove_memory_breakpoint.  Adjust to new
2751         i386_low_remove_watchpoint interface.
2752         (the_low_target): Install x86_supports_z_point_type.
2753         * lynx-low.c (lynx_target_ops): Install NULL as
2754         supports_z_point_type callback.
2755         * nto-low.c (nto_supports_z_point_type): New.
2756         (nto_insert_point, nto_remove_point): Adjust to new interface.
2757         (nto_target_ops): Install nto_supports_z_point_type.
2758         * mem-break.c: Adjust intro comment.
2759         (struct raw_breakpoint) <raw_type, size>: New fields.
2760         <inserted>: Update comment.
2761         <shlib_disabled>: Delete field.
2762         (enum bkpt_type) <gdb_breakpoint>: Delete value.
2763         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2764         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2765         (raw_bkpt_type_to_target_hw_bp_type): New function.
2766         (find_enabled_raw_code_breakpoint_at): New function.
2767         (find_raw_breakpoint_at): New type and size parameters.  Use them.
2768         (insert_memory_breakpoint): New function, based off
2769         set_raw_breakpoint_at.
2770         (remove_memory_breakpoint): New function.
2771         (set_raw_breakpoint_at): Reimplement.
2772         (set_breakpoint): New, based on set_breakpoint_at.
2773         (set_breakpoint_at): Reimplement.
2774         (delete_raw_breakpoint): Go through the_target->remove_point
2775         instead of assuming memory breakpoints.
2776         (find_gdb_breakpoint_at): Delete.
2777         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2778         (find_gdb_breakpoint): New function.
2779         (set_gdb_breakpoint_at): Delete.
2780         (z_type_supported): New function.
2781         (set_gdb_breakpoint_1): New function, loosely based off
2782         set_gdb_breakpoint_at.
2783         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2784         (delete_gdb_breakpoint_at): Delete.
2785         (delete_gdb_breakpoint_1): New function, loosely based off
2786         delete_gdb_breakpoint_at.
2787         (delete_gdb_breakpoint): New function.
2788         (clear_gdb_breakpoint_conditions): Rename to ...
2789         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
2790         breakpoint.
2791         (add_condition_to_breakpoint): Make static.
2792         (add_breakpoint_condition): Take a struct breakpoint pointer
2793         instead of an address.  Adjust.
2794         (gdb_condition_true_at_breakpoint): Rename to ...
2795         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2796         z_type parameter.
2797         (gdb_condition_true_at_breakpoint): Reimplement.
2798         (add_breakpoint_commands): Take a struct breakpoint pointer
2799         instead of an address.  Adjust.
2800         (gdb_no_commands_at_breakpoint): Rename to ...
2801         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
2802         parameter.  Return true if no breakpoint was found.  Change debug
2803         output.
2804         (gdb_no_commands_at_breakpoint): Reimplement.
2805         (run_breakpoint_commands): Rename to ...
2806         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
2807         and change return type to boolean.
2808         (run_breakpoint_commands): New function.
2809         (gdb_breakpoint_here): Also check for Z1 breakpoints.
2810         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2811         breakpoint.  Go through the_target->remove_point instead of
2812         assuming memory breakpoint.
2813         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2814         software and hardware breakpoints.
2815         (reinsert_raw_breakpoint): Go through the_target->insert_point
2816         instead of assuming memory breakpoint.
2817         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2818         software and hardware breakpoints.
2819         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2820         Check both software and hardware breakpoints.
2821         (validate_inserted_breakpoint): Assert the breakpoint is a
2822         software breakpoint.  Set the inserted flag to -1 instead of
2823         setting shlib_disabled.
2824         (delete_disabled_breakpoints): Adjust.
2825         (validate_breakpoints): Only validate software breakpoints.
2826         Adjust to inserted flag change.
2827         (check_mem_read, check_mem_write): Skip breakpoint types other
2828         than software breakpoints.  Adjust to inserted flag change.
2829         * mem-break.h (enum raw_bkpt_type): New enum.
2830         (raw_breakpoint, struct process_info): Forward declare.
2831         (Z_packet_to_target_hw_bp_type): Delete declaration.
2832         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2833         (set_gdb_breakpoint, delete_gdb_breakpoint)
2834         (clear_breakpoint_conditions): New declarations.
2835         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2836         (breakpoint_inserted_here): Update comment.
2837         (add_breakpoint_condition, add_breakpoint_commands): Replace
2838         address parameter with a breakpoint pointer parameter.
2839         (gdb_breakpoint_here): Update comment.
2840         (delete_gdb_breakpoint_at): Delete.
2841         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2842         * server.c (process_point_options): Take a struct breakpoint
2843         pointer instead of an address.  Adjust.
2844         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2845         delete_gdb_breakpoint.
2846         * spu-low.c (spu_target_ops): Install NULL as
2847         supports_z_point_type method.
2848         * target.h: Include mem-break.h.
2849         (struct target_ops) <prepare_to_access_memory>: Update comment.
2850         <supports_z_point_type>: New field.
2851         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2852         instead of a char.  Also take a raw breakpoint pointer.
2853         * win32-arm-low.c (the_low_target): Install NULL as
2854         supports_z_point_type.
2855         * win32-i386-low.c (i386_supports_z_point_type): New function.
2856         (i386_insert_point, i386_remove_point): Adjust to new interface.
2857         (the_low_target): Install i386_supports_z_point_type.
2858         * win32-low.c (win32_supports_z_point_type): New function.
2859         (win32_insert_point, win32_remove_point): Adjust to new interface.
2860         (win32_target_ops): Install win32_supports_z_point_type.
2861         * win32-low.h (struct win32_target_ops):
2862         <supports_z_point_type>: New method.
2863         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2864         instead of a char.  Also take a raw breakpoint pointer.
2865
2866 2014-05-20  Pedro Alves  <palves@redhat.com>
2867
2868         * mem-break.h: Include break-common.h.
2869         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2870         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2871         (Z_packet_to_target_hw_bp_type): New declaration.
2872         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2873         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2874         (Z_PACKET_ACCESS_WP): Delete macros.
2875         (Z_packet_to_hw_type): Delete function.
2876         * i386-low.h: Don't include break-common.h here.
2877         (Z_packet_to_hw_type): Delete declaration.
2878         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2879         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2880         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2881         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2882         * linux-aarch64-low.c: Don't include break-common.h here.
2883         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2884         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2885         (Z_packet_to_target_hw_bp_type): Delete function.
2886         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2887         function.
2888         (mips_insert_point, mips_remove_point): Use
2889         Z_packet_to_target_hw_bp_type.
2890
2891 2014-05-20  Pedro Alves  <palves@redhat.com>
2892
2893         * linux-aarch64-low.c: Include break-common.h.
2894         (enum target_point_type): Delete.
2895         (Z_packet_to_point_type): Rename to ...
2896         (Z_packet_to_target_hw_bp_type): ... this, and return a
2897         target_hw_bp_type instead.
2898         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2899         instead of an enum target_point_type.
2900         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
2901         breakpoint type.
2902         (aarch64_dr_state_insert_one_point)
2903         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2904         (aarch64_handle_aligned_watchpoint)
2905         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2906         Take an enum target_hw_bp_type instead of an enum
2907         target_point_type.
2908         (aarch64_supports_z_point_type): New function.
2909         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
2910         use Z_packet_to_target_hw_bp_type.
2911
2912 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
2913
2914         * configure.ac: Only use -Werror by default when DEVELOPMENT
2915         is true.
2916         * configure: Regenerate.
2917
2918 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
2919
2920         Fix gdbserver qGetTLSAddr for x86_64 -m32.
2921         * linux-x86-low.c (X86_64_USER_REGS): New.
2922         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2923
2924 2014-04-28  Yao Qi  <yao@codesourcery.com>
2925
2926         * Makefile.in (i386-avx512.c): Fix the typo of generated file
2927         name.
2928
2929 2014-04-25  Pedro Alves  <palves@redhat.com>
2930
2931         PR server/16255
2932         * linux-low.c (linux_attach_fail_reason_string): New function.
2933         (linux_attach_lwp): Delete.
2934         (linux_attach_lwp_1): Rename to ...
2935         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
2936         argument.  Remove "initial" parameter.  Return int instead of
2937         void.  Don't error or warn here.
2938         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
2939         failure to attach to the tgid.  Call warning when failing to
2940         attach to an lwp.
2941         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2942         argument.  Remove "initial" parameter.  Return int instead of
2943         void.  Don't error or warn here.
2944         (linux_attach_fail_reason_string): New declaration.
2945         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2946         interface change.  Use linux_attach_fail_reason_string.
2947
2948 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
2949             Walfred Tedeschi  <walfred.tedeschi@intel.com>
2950
2951         * Makefile.in: Added rules to handle new files
2952         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2953         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2954         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2955         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2956         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2957         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2958         x32-avx512-linux.o.
2959         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2960         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2961         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2962         i386/x32-avx512.xml.
2963         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2964         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2965         i386/x32-avx512-linux.xml.
2966         * i387-fp.c (num_avx512_k_registers): New constant for number
2967         of K registers.
2968         (num_avx512_zmmh_low_registers): New constant for number of
2969         lower ZMM registers (0-15).
2970         (num_avx512_zmmh_high_registers): New constant for number of
2971         higher ZMM registers (16-31).
2972         (num_avx512_ymmh_registers): New contant for number of higher
2973         YMM registers (ymm16-31 added by avx521 on x86_64).
2974         (num_avx512_xmm_registers): New constant for number of higher
2975         XMM registers (xmm16-31 added by AVX512 on x86_64).
2976         (struct i387_xsave): Add space for AVX512 registers.
2977         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2978         Add code to handle AVX512 registers.
2979         (i387_xsave_to_cache): Add code to handle AVX512 registers.
2980         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2981         prototypei from generated file.
2982         (tdesc_amd64_avx512_linux): Likewise.
2983         (init_registers_x32_avx512_linux): Likewise.
2984         (tdesc_x32_avx512_linux): Likewise.
2985         (init_registers_i386_avx512_linux): Likewise.
2986         (tdesc_i386_avx512_linux): Likewise.
2987         (x86_64_regmap): Add AVX512 registers.
2988         (x86_linux_read_description): Add code to handle AVX512 XSTATE
2989         mask.
2990         (initialize_low_arch): Add code to initialize AVX512 registers.
2991
2992 2014-04-23  Pedro Alves  <palves@redhat.com>
2993
2994         * mem-break.c (find_gdb_breakpoint_at): Make static.
2995         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2996
2997 2014-04-23  Pedro Alves  <palves@redhat.com>
2998
2999         * i386-low.c: Don't include break-common.h here.
3000         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3001         prototype to take target_hw_bp_type as argument instead of a Z
3002         packet char.
3003         * i386-low.h: Include break-common.h here.
3004         (Z_packet_to_hw_type): Declare.
3005         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3006         prototypes.
3007         * linux-x86-low.c (x86_insert_point): Convert the packet number to
3008         a target_hw_bp_type before calling i386_low_insert_watchpoint.
3009         (x86_remove_point): Convert the packet number to a
3010         target_hw_bp_type before calling i386_low_remove_watchpoint.
3011         * win32-i386-low.c (i386_insert_point): Convert the packet number
3012         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3013         (i386_remove_point): Convert the packet number to a
3014         target_hw_bp_type before calling i386_low_remove_watchpoint.
3015
3016 2014-04-23  Pedro Alves  <palves@redhat.com>
3017
3018         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3019
3020 2014-04-10  Pedro Alves  <palves@redhat.com>
3021
3022         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3023         Check if the condition or command is NULL before checking if the
3024         breakpoint is known.  On success, return true.
3025         * mem-break.h (add_breakpoint_condition): Document return.
3026         (add_breakpoint_commands): Add describing comment.
3027         * server.c (skip_to_semicolon): New function.
3028         (process_point_options): Use it.
3029
3030 2014-04-09  Pedro Alves  <palves@redhat.com>
3031
3032         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3033         to lwpid_of.
3034
3035 2014-02-27  Pedro Alves  <palves@redhat.com>
3036
3037         PR 12702
3038         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3039         macros.
3040         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3041         output.
3042         (last_thread_of_process_p): Take a PID argument instead of a
3043         thread pointer.
3044         (linux_wait_for_lwp): Delete.
3045         (num_lwps, check_zombie_leaders, not_stopped_callback): New
3046         functions.
3047         (linux_low_filter_event): New function, party factored out from
3048         linux_wait_for_event.
3049         (linux_wait_for_event): Rename to ...
3050         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
3051         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
3052         sigsuspend.  Check for zombie leaders.
3053         (linux_wait_for_event): Reimplement as wrapper around
3054         linux_wait_for_event_filtered.
3055         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
3056         a normal or signal exit is seen, it's the whole process exiting.
3057         (wait_for_sigstop): No longer a for_each_inferior callback.
3058         Rewrite on top of linux_wait_for_event_filtered.
3059         (stop_all_lwps): Call wait_for_sigstop directly.
3060         * server.c (resume, handle_target_event): Handle
3061         TARGET_WAITKIND_NO_RESUMED.
3062
3063 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3064
3065         * win32-low.c (psapi_get_dll_name,
3066         * win32_CreateToolhelp32Snapshot): Delete.
3067         (win32_CreateToolhelp32Snapshot, win32_Module32First)
3068         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3069         Delete.
3070         (handle_load_dll): Add function description.
3071         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3072
3073 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3074
3075         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3076         Add comment.
3077         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3078         base address when calling win32_add_one_solib.
3079         (handle_load_dll): Delete local variable load_addr.
3080         Remove 0x1000 offset applied to DLL base address when calling
3081         win32_add_one_solib.
3082         (handle_unload_dll): Add comment.
3083
3084 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3085
3086         * win32-low.c (win32_add_all_dlls): Renames
3087         win32_ensure_ntdll_loaded.  Rewrite function documentation.
3088         Adjust implementation to always load all DLLs.
3089         Add 0x1000 offset to DLL base address when calling
3090         win32_add_one_solib.
3091         (child_initialization_done): New static global.
3092         (do_initial_child_stuff): Set child_initialization_done to
3093         zero during child initialization, and 1 after.  Replace call
3094         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3095         Add comment.
3096         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3097         (handle_unload_dll): Add function documentation.
3098         (get_child_debug_event): Ignore load and unload DLL events
3099         during child initialization.
3100
3101 2014-02-20  Doug Evans  <dje@google.com>
3102
3103         Remove global all_lwps.
3104         * inferiors.h (ptid_of): Move here from linux-low.h.
3105         (pid_of, lwpid_of): Ditto.
3106         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3107         parameter is a struct thread_info * now.
3108         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3109         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
3110         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3111         directly.
3112         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3113         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3114         * linux-arm-low.c (update_registers_callback): Update, "entry"
3115         parameter is a struct thread_info * now.
3116         Fetch lwpid from current_inferior directly.
3117         (arm_insert_point): Pass &all_threads to find_inferior instead of
3118         &all_lwps.
3119         (arm_remove_point): Ditto.
3120         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3121         (arm_prepare_to_resume): Fetch pid from thread.
3122         (arm_read_description): Fetch lwpid from current_inferior directly.
3123         * linux-low.c (all_lwps): Delete.
3124         (delete_lwp): Delete call to remove_inferior.
3125         (handle_extended_wait): Fetch lwpid from thread.
3126         (add_lwp): Don't set lwp->entry.id.  Remove call to
3127         add_inferior_to_list.
3128         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3129         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3130         (kill_one_lwp_callback): Ditto.
3131         (linux_kill): Don't dereference NULL pointer.
3132         Fetch ptid,lwpid from thread.
3133         (get_detach_signal): Fetch ptid from thread.
3134         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3135         Simplify call to regcache_invalidate_thread.
3136         (delete_lwp_callback): Update, "entry" parameter is a
3137         struct thread_info * now.  Fetch pid from thread.
3138         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3139         (status_pending_p_callback): Update, "entry" parameter is a
3140         struct thread_info * now.  Fetch ptid from thread.
3141         (find_lwp_pid): Update, "entry" parameter is a
3142         struct thread_info * now.
3143         (linux_wait_for_lwp): Fetch pid from thread.
3144         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3145         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3146         (enqueue_one_deferred_signal): Fetch lwpid from thread.
3147         (dequeue_one_deferred_signal): Ditto.
3148         (cancel_breakpoint): Fetch ptid from current_inferior.
3149         (linux_wait_for_event): Pass &all_threads to find_inferior,
3150         not &all_lwps.  Fetch ptid, lwpid from thread.
3151         (count_events_callback): Update, "entry" parameter is a
3152         struct thread_info * now.
3153         (select_singlestep_lwp_callback): Ditto.
3154         (select_event_lwp_callback): Ditto.
3155         (cancel_breakpoints_callback): Ditto.
3156         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3157         not &all_lwps.
3158         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
3159         (unsuspend_one_lwp): Update, "entry" parameter is a
3160         struct thread_info * now.
3161         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3162         not &all_lwps.
3163         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
3164         Fetch lwpid from thread, not lwp.
3165         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3166         Pass &all_threads to find_inferior, not &all_lwps.
3167         (send_sigstop): Fetch lwpid from thread, not lwp.
3168         (send_sigstop_callback): Update, "entry" parameter is a
3169         struct thread_info * now.
3170         (suspend_and_send_sigstop_callback): Ditto.
3171         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
3172         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3173         struct thread_info * now.
3174         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
3175         from thread, lwp.
3176         (lwp_running): Update, "entry" parameter is a
3177         struct thread_info * now.
3178         (stop_all_lwps): Fetch ptid from thread.
3179         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3180         (linux_resume_one_lwp): Fetch lwpid from thread.
3181         (linux_set_resume_request): Update, "entry" parameter is a
3182         struct thread_info * now.  Fetch pid, lwpid from thread.
3183         (resume_status_pending_p): Update, "entry" parameter is a
3184         struct thread_info * now.
3185         (need_step_over_p): Ditto.  Fetch lwpid from thread.
3186         (start_step_over): Fetch lwpid from thread.
3187         (linux_resume_one_thread): Update, "entry" parameter is a
3188         struct thread_info * now.  Fetch lwpid from thread.
3189         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3190         (proceed_one_lwp): Update, "entry" parameter is a
3191         struct thread_info * now.  Fetch lwpid from thread.
3192         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3193         struct thread_info * now.
3194         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3195         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
3196         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3197         directly.
3198         (regsets_store_inferior_registers): Ditto.
3199         (fetch_register, store_register): Ditto.
3200         (linux_read_memory, linux_write_memory): Ditto.
3201         (linux_request_interrupt): Ditto.
3202         (linux_read_auxv): Ditto.
3203         (linux_xfer_siginfo): Ditto.
3204         (linux_qxfer_spu): Ditto.
3205         (linux_qxfer_libraries_svr4): Ditto.
3206         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3207         moved to inferiors.h.
3208         (get_lwp): Delete.
3209         (get_thread_lwp): Update.
3210         (struct lwp_info): Delete member "entry".  Simplify comment for
3211         member "thread".
3212         (all_lwps): Delete.
3213         * linux-mips-low.c (mips_read_description): Fetch lwpid from
3214         current_inferior directly.
3215         (update_watch_registers_callback): Update, "entry" parameter is a
3216         struct thread_info * now.  Fetch pid from thread.
3217         (mips_linux_prepare_to_resume): Fetch ptid from thread.
3218         (mips_insert_point): Fetch lwpid from current_inferior.
3219         Pass &all_threads to find_inferior, not &all_lwps.
3220         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3221         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3222         directly.
3223         (mips_stopped_data_address): Ditto.
3224         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3225         directly.
3226         * linux-tile-low.c (tile_arch_setup): Ditto.
3227         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3228         (update_debug_registers_callback): Update, "entry" parameter is a
3229         struct thread_info * now.  Fetch pid from thread.
3230         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3231         Pass &all_threads to find_inferior, not &all_lwps.
3232         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3233         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3234         Pass &all_threads to find_inferior, not &all_lwps.
3235         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3236         (i386_dr_low_get_status): Ditto.
3237         (x86_linux_prepare_to_resume): Fetch ptid from thread.
3238         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3239         (x86_linux_read_description): Ditto.
3240         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3241
3242 2014-02-20  Doug Evans  <dje@google.com>
3243
3244         * inferiors.c (get_first_inferior): Fix buglet.
3245
3246 2014-02-19  Doug Evans  <dje@google.com>
3247
3248         * gdbthread.h (add_thread): Change result type to struct thread_info *.
3249         * inferiors.c (add_thread): Change result type to struct thread_info *.
3250         All callers updated.
3251         (add_lwp): Call add_thread here instead of in callers.
3252         All callers updated.
3253         * linux-low.h (get_lwp_thread): Rewrite.
3254         (struct lwp_info): New member "thread".
3255
3256 2014-02-19  Doug Evans  <dje@google.com>
3257
3258         * linux-low.c (add_lwp): Change result to struct lwp_info *.
3259         All callers updated.
3260
3261 2014-02-19  Doug Evans  <dje@google.com>
3262
3263         * inferiors.c (add_thread): Fix whitespace.
3264
3265 2014-02-19  Doug Evans  <dje@google.com>
3266
3267         * dll.c (clear_dlls): Replace accessing list implemention details
3268         with API function.
3269         * gdbthread.h (get_first_thread): Declare.
3270         * inferiors.c (for_each_inferior_with_data): New function.
3271         (get_first_thread): New function.
3272         (find_thread_ptid): Simplify.
3273         (get_first_inferior): New function.
3274         (clear_list): Delete.
3275         (one_inferior_p): New function.
3276         (clear_inferior_list): New function.
3277         (clear_inferiors): Update.
3278         * inferiors.h (for_each_inferior_with_data): Declare.
3279         (clear_inferior_list): Declare.
3280         (one_inferior_p): Declare.
3281         (get_first_inferior): Declare.
3282         * linux-low.c (linux_wait_for_event): Replace accessing list
3283         implemention details with API function.
3284         * server.c (target_running): Ditto.
3285         (accumulate_file_name_length): New function.
3286         (emit_dll_description): New function.
3287         (handle_qxfer_libraries): Replace accessing list implemention
3288         details with API function.
3289         (handle_qxfer_threads_worker): New function.
3290         (handle_qxfer_threads_proper): Replace accessing list implemention
3291         details with API function.
3292         (handle_query): Ditto.
3293         (visit_actioned_threads_callback_ftype): New typedef.
3294         (visit_actioned_threads_data): New struct.
3295         (visit_actioned_threads): Rewrite to be find_inferior callback.
3296         (resume): Call find_inferior.
3297         (handle_status): Replace accessing list implemention
3298         details with API function.
3299         (process_serial_event): Replace accessing list implemention details
3300         with API function.
3301         * target.c (set_desired_inferior): Replace accessing list implemention
3302         details with API function.
3303         * tracepoint.c (same_process_p): New function.
3304         (gdb_agent_about_to_close): Replace accessing list implemention
3305         details with API function.
3306         * win32-low.c (child_delete_thread): Replace accessing list
3307         implemention details with API function.
3308         (match_dll_by_basename): New function.
3309         (dll_is_loaded_by_basename): New function.
3310         (win32_ensure_ntdll_loaded): Replace accessing list implemention
3311         details call to dll_is_loaded_by_basename.
3312
3313 2014-02-19  Doug Evans  <dje@google.com>
3314
3315         * dll.h (struct dll_info): Add comment.
3316         * gdbthread.h (struct thread_info): Add comment.
3317         (current_ptid): Simplify.
3318         * inferiors.c (add_process): Update.
3319         (remove_process): Update.
3320         * inferiors.h (struct process_info): Rename member "head" to "entry".
3321         * linux-low.c (delete_lwp): Update.
3322         (add_lwp): Update.
3323         (last_thread_of_process_p): Update.
3324         (kill_one_lwp_callback, linux_kill): Update.
3325         (status_pending_p_callback): Update.
3326         (wait_for_sigstop): Update.  Simplify read of ptid.
3327         (start_step_over): Update.
3328         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3329         (get_lwp_thread): Update.
3330         (struct lwp_info): Rename member "head" to "entry".
3331         * regcache.h (inferior_list_entry): Delete.
3332         * server.c (kill_inferior_callback): Update.
3333         (detach_or_kill_inferior_callback): Update.
3334         (print_started_pid): Update.
3335         (print_attached_pid): Update.
3336         (process_serial_event): Simplify read of ptid.
3337         * thread-db.c (thread_db_create_event): Update.
3338         (thread_db_get_tls_address): Update.
3339         * win32-low.c (current_inferior_ptid): Simplify.
3340
3341 2014-02-19  Tom Tromey  <tromey@redhat.com>
3342
3343         * target.h (struct target_ops) <supports_btrace>: Add target_ops
3344         argument.
3345         (target_supports_btrace): Update.
3346
3347 2014-02-14  Yao Qi  <yao@codesourcery.com>
3348
3349         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3350         (rsp-low-ipa.o): New target.
3351
3352 2014-02-12  Tom Tromey  <tromey@redhat.com>
3353
3354         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3355         convert_ascii_to_int.
3356         * regcache.c (registers_to_string): Likewise.
3357         * remote-utils.c (decode_M_packet): Likewise.
3358         * server.c (process_serial_event): Likewise.
3359
3360 2014-02-12  Tom Tromey  <tromey@redhat.com>
3361
3362         * server.c (handle_query, handle_v_run): Use hex2bin, not
3363         unhexify.
3364         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3365
3366 2014-02-12  Tom Tromey  <tromey@redhat.com>
3367
3368         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3369         convert_int_to_ascii.
3370         * regcache.c (registers_to_string, collect_register_as_string):
3371         Likewise.
3372         * remote-utils.c (look_up_one_symbol, relocate_instruction):
3373         Likewise.
3374         * server.c (process_serial_event): Likewise.
3375         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3376         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3377
3378 2014-02-12  Tom Tromey  <tromey@redhat.com>
3379
3380         * remote-utils.c (look_up_one_symbol, monitor_output): Use
3381         bin2hex, not hexify.
3382         * tracepoint.c (cmd_qtstatus): Likewise.
3383
3384 2014-02-12  Tom Tromey  <tromey@redhat.com>
3385
3386         * remote-utils.c (monitor_output): Pass explicit length to
3387         hexify.
3388
3389 2014-02-12  Tom Tromey  <tromey@redhat.com>
3390
3391         * tracepoint.c: Include rsp-low.h.
3392         * server.c: Include rsp-low.h.
3393         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3394         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3395         declare.
3396         * remote-utils.c: Include rsp-low.h.
3397         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3398         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3399         (convert_int_to_ascii, convert_ascii_to_int): Move to
3400         common/rsp-low.c.
3401         * regcache.c: Include rsp-low.h.
3402         * ax.c: Include rsp-low.h.
3403         * Makefile.in (SFILES): Add common/rsp-low.c.
3404         (OBS): Add rsp-low.o.
3405         (rsp-low.o): New target.
3406
3407 2014-02-12  Tom Tromey  <tromey@redhat.com>
3408
3409         * utils.h (pulongest, plongest, phex_nz): Don't declare.
3410         Include print-utils.h.
3411         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3412         (plongest, thirty_two, phex_nz): Remove.
3413         * Makefile.in (SFILES): Add common/print-utils.c.
3414         (OBS): Add print-utils.o.
3415         (print-utils-ipa.o): New target.
3416         (print-utils.o): New target.
3417         (IPA_OBJS): Add print-utils-ipa.o.
3418
3419 2014-02-06  Tom Tromey  <tromey@redhat.com>
3420
3421         * Makefile.in (SFILES): Fix indentation.
3422
3423 2014-02-05  Doug Evans  <dje@google.com>
3424
3425         * linux-low.c (linux_wait_for_event): Improve comment.
3426         (linux_wait_1): Keep current_inferior in sync with event_child.
3427
3428 2014-01-22  Doug Evans  <dje@google.com>
3429
3430         * gdbthread.h (gdb_id_to_thread): Delete, unused.
3431
3432 2014-01-22  Doug Evans  <dje@google.com>
3433
3434         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3435         * configure: Regenerate.
3436         * config.in: Regenerate.
3437         * Makefile.in (SFILES): Add debug.c.
3438         (OBS): Add debug.o.
3439         * debug.c: New file.
3440         * debug.h: New file.
3441         * linux-aarch64-low.c (*): Update all debugging printfs to use
3442         debug_printf instead of fprintf.
3443         * linux-arm-low.c (*): Ditto.
3444         * linux-cris-low.c (*): Ditto.
3445         * linux-crisv32-low.c (*): Ditto.
3446         * linux-m32r-low.c (*): Ditto.
3447         * linux-sparc-low.c (*): Ditto.
3448         * linux-x86.c (*): Ditto.
3449         * linux-low.c (*): Ditto.
3450         (linux_wait_1): Add calls to debug_enter, debug_exit.
3451         (linux_wait): Remove redundant debugging printf.
3452         (stop_all_lwps): Add calls to debug_enter, debug_exit.
3453         (linux_resume, unstop_all_lwps): Ditto.
3454         * mem-break.c (*): Update all debugging printfs to use
3455         debug_printf instead of fprintf.
3456         * remote-utils.c (*): Ditto.
3457         * thread-db.c (*): Ditto.
3458         * server.c #include <ctype.h>, "gdb_vecs.h".
3459         (debug_threads): Moved to debug.c.
3460         (*): Update all debugging printfs to use debug_printf instead of
3461         fprintf.
3462         (start_inferior): Replace call to fflush with call to debug_flush.
3463         (monitor_show_help): Mention set debug-format.
3464         (parse_debug_format_options): New function.
3465         (handle_monitor_command): Handle "monitor set debug-format".
3466         (gdbserver_usage): Mention --debug-format.
3467         (main): Parse --debug-format.
3468         * server.h (debug_threads): Declaration moved to debug.h.
3469         #include "debug.h".
3470         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3471         trace_debug_1 that uses debug_printf.
3472         (tracepoint_look_up_symbols): Update all debugging printfs to use
3473         debug_printf instead of fprintf.
3474
3475 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
3476
3477         * linux-xtensa-low.c: Include asm/ptrace.h instead of
3478         sys/ptrace.h.
3479
3480 2014-01-17  Pedro Alves  <palves@redhat.com>
3481
3482         PR build/16445
3483         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3484         defined after including gdb_proc_service.h.
3485
3486 2014-01-16  Doug Evans  <dje@google.com>
3487
3488         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3489         (match_dll): Use it.
3490
3491 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
3492
3493         * target.h (target_ops) <read_btrace>: Change parameters and
3494         return type to allow error reporting.
3495         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
3496         trace reading errors on.
3497         * linux-low.c (linux_low_read_btrace): Pass trace reading
3498         errors on.
3499         (linux_low_disable_btrace): New.
3500
3501 2014-01-15  Doug Evans  <dje@google.com>
3502
3503         * inferiors.c (thread_id_to_gdb_id): Delete.
3504         * inferiors.h (thread_id_to_gdb_id): Delete.
3505
3506 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
3507
3508         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3509         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
3510         versions.
3511
3512 2014-01-08  Pedro Alves  <palves@redhat.com>
3513
3514         * server.c (handle_status): Don't discard previous queued stop
3515         replies or thread's pending status here.
3516         (main) <disconnection>: Do it here instead.
3517
3518 2014-01-08  Pedro Alves  <palves@redhat.com>
3519
3520         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3521         * server.c (visit_actioned_threads, handle_pending_status): New
3522         function.
3523         (handle_v_cont): Factor out parts to ...
3524         (resume): ... this new function.  If in all-stop, and a thread
3525         being resumed has a pending status, report it without actually
3526         resuming.
3527         (myresume): Adjust to use the new 'resume' function.
3528         (clear_pending_status_callback, set_pending_status_callback)
3529         (find_status_pending_thread_callback): New functions.
3530         (handle_status): Handle the case of multiple threads having
3531         interesting statuses to report.  Report threads' real last signal
3532         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
3533         with an interesting thread to report the status for, instead of
3534         always reporting the status of the first thread.
3535
3536 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
3537
3538         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3539         * gdbreplay.c (gdbreplay_version): Likewise.
3540
3541 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
3542
3543         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3544         iov.iov_len with the real length in use.
3545
3546 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
3547
3548         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3549         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3550         for all targets that use win32-low.c.
3551         * win32-low.c (win32_ensure_ntdll_loaded): New function.
3552         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3553
3554 2013-12-13  Pedro Alves  <palves@redhat.com>
3555
3556         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3557         if equal to TARGET_WAITKIND_LOADED.
3558         * win32-low.c (cached_status): New static global.
3559         (win32_wait): Add declaration.
3560         (do_initial_child_stuff): Flush all initial pending debug events
3561         up to the initial breakpoint.
3562         (win32_wait): If CACHED_STATUS was set, return that instead
3563         of doing a real wait.  Remove the code resuming the execution
3564         of the inferior after receiving a TARGET_WAITKIND_LOADED event
3565         during the initial phase.  Also remove the code changing
3566         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3567         TARGET_WAITKIND_STOPPED.
3568
3569 2013-12-11  Yao Qi  <yao@codesourcery.com>
3570
3571         * notif.c (handle_notif_ack): Return 0 if no notification
3572         matches.
3573
3574 2013-11-20  Doug Evans  <dje@google.com>
3575
3576         * linux-low.c (linux_set_resume_request): Fix comment.
3577
3578 2013-11-20  Doug Evans  <dje@google.com>
3579
3580         * linux-low.c (resume_status_pending_p): Tweak comment.
3581
3582 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3583
3584         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3585         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3586         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3587         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3588         (srv_amd64_regobj): Add amd64-mpx.o.
3589         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3590         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3591         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3592         * i387-fp.c (num_pl_bnd_register) Added constant.
3593         (num_pl_bnd_cfg_registers) Added constant.
3594         (struct i387_xsave) Added reserved area and MPX fields.
3595         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3596         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3597         function.
3598         (tdesc_i386_mpx_linux): Add MPX amd64 target.
3599         (init_registers_amd64_mpx_linux): Declare new function.
3600         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3601         (x86_64_regmap): Add MPX registers.
3602         (x86_linux_read_description): Add MPX case.
3603         (initialize_low_arch): Initialize MPX targets.
3604
3605 2013-11-18  Tom Tromey  <tromey@redhat.com>
3606
3607         * configure: Rebuild.
3608         * configure.ac: Don't check for stdlib.h.
3609         * gdbreplay.c: Unconditionally include stdlib.h.
3610
3611 2013-11-18  Tom Tromey  <tromey@redhat.com>
3612
3613         * config.in: Rebuild.
3614         * configure: Rebuild.
3615         * configure.ac: Don't use AC_HEADER_DIRENT.
3616
3617 2013-11-18  Tom Tromey  <tromey@redhat.com>
3618
3619         * server.h: Don't check HAVE_STRING_H.
3620         * gdbreplay.c: Don't check HAVE_STRING_H.
3621         * configure: Rebuild.
3622
3623 2013-11-18  Tom Tromey  <tromey@redhat.com>
3624
3625         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3626         LIBGNU.
3627
3628 2013-11-08  Tom Tromey  <tromey@redhat.com>
3629
3630         * configure, config.in: Rebuild.
3631         * configure.ac: Remove unused configury.
3632
3633 2013-11-08  Tom Tromey  <tromey@redhat.com>
3634
3635         * acinclude.m4: Include common.m4, codeset.m4.
3636         * configure, config.in: Rebuild.
3637         * configure.ac: Use GDB_AC_COMMON.
3638
3639 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3640
3641         * linux-s390-low.c (HWCAP_S390_TE): New define.
3642         (s390_arch_setup): Consider the TE field in the HWCAP for
3643         determining 'have_regset_tdb'.
3644
3645 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
3646
3647         PR gdb/16014
3648         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3649         call to sizeof.
3650
3651 2013-10-02  Pedro Alves  <palves@redhat.com>
3652
3653         * server.c (process_serial_event): Don't output "GDBserver
3654         exiting" if GDB is connected through stdio.
3655         * target.c (mywait): Likewise, be silent if GDB is connected
3656         through stdio.
3657
3658 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
3659
3660         * lynx-low.c (lynx_add_threads_after_attach): New function.
3661         (lynx_attach): Remove call to add_thread.  Add call to
3662         lynx_add_threads_after_attach instead.
3663
3664 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
3665
3666         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3667         * config.in, configure: Regenerated.
3668
3669 2013-09-18  Yao Qi  <yao@codesourcery.com>
3670
3671         PR server/15959
3672         * server.c (start_inferior): Clear 'resume_info'.
3673
3674 2013-09-16  Jiong Wang  <jiwang@tilera.com>
3675
3676         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3677         for each register.
3678
3679 2013-09-16  Jiong Wang  <jiwang@tilera.com>
3680
3681         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3682         linux-tile-low.o to srv_tgtobj.
3683
3684 2013-09-16  Will Newton  <will.newton@linaro.org>
3685
3686         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3687         out regs.
3688
3689 2013-09-06  Pedro Alves  <palves@redhat.com>
3690
3691         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3692         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3693         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3694         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3695         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3696         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3697
3698 2013-09-06  Pedro Alves  <palves@redhat.com>
3699
3700         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3701         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3702
3703 2013-09-06  Pedro Alves  <palves@redhat.com>
3704
3705         * linux-amd64-ipa.c: Include tracepoint.h.
3706         * linux-i386-ipa.c: Include tracepoint.h.
3707
3708 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
3709
3710         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3711         (ps_get_thread_area): New function.
3712
3713 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
3714
3715         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3716         (initialize_low_arch): Call init_registers_crisv32 rather than
3717         init_register_crisv32.
3718
3719 2013-09-05  Pedro Alves  <palves@redhat.com>
3720
3721         * server.h (handle_vFile, hostio_last_error_from_errno): Move
3722         to ...
3723         * hostio.h: ... this new file.
3724         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3725         win32-low.c: Include hostio.h.
3726
3727 2013-09-05  Pedro Alves  <palves@redhat.com>
3728
3729         * server.h (gdb_client_data, handler_func, callback_handler_func)
3730         (delete_file_handler, add_file_handler, append_callback_event)
3731         (delete_callback_event, start_event_loop, initialize_event_loop):
3732         Move to event-loop.h and include it.
3733         * event-loop.h: New file.
3734
3735 2013-09-05  Pedro Alves  <palves@redhat.com>
3736
3737         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3738         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3739         (loaded_dll, unloaded_dll): Move to ...
3740         * dll.h: ... this new file.
3741         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3742
3743 2013-09-05  Pedro Alves  <palves@redhat.com>
3744
3745         * server.h (current_process, get_thread_process, all_processes)
3746         (add_inferior_to_list, for_each_inferior, current_inferior)
3747         (remove_inferior, add_process, remove_process, find_process_pid)
3748         (have_started_inferiors_p, have_attached_inferiors_p)
3749         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3750         (clear_inferiors, find_inferior, find_inferior_id)
3751         (inferior_target_data, set_inferior_target_data)
3752         (inferior_regcache_data, set_inferior_regcache_data): Move to
3753         inferiors.h, and include it.
3754         * inferiors.h: New file.
3755
3756 2013-09-05  Pedro Alves  <palves@redhat.com>
3757
3758         * server.h (struct emit_ops, current_insn_ptr, emit_error):
3759         Move ...
3760         * ax.h: ... here.
3761
3762 2013-09-05  Pedro Alves  <palves@redhat.com>
3763
3764         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3765         tracepoint.h.
3766         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3767         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3768         (handle_tracepoint_general_set, handle_tracepoint_query)
3769         (tracepoint_finished_step, tracepoint_was_hit)
3770         (release_while_stepping_state_list, current_traceframe)
3771         (in_readonly_region, traceframe_read_mem)
3772         (fetch_traceframe_registers, traceframe_read_sdata)
3773         (traceframe_read_info, struct fast_tpoint_collect_status)
3774         (fast_tracepoint_collecting, force_unlock_trace_buffer)
3775         (handle_tracepoit_bkpts, initialize_low_tracepoint)
3776         (supply_fast_tracepoint_registers)
3777         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3778         (ipa_tdesc, claim_trampoline_space)
3779         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3780         (agent_mem_read, agent_get_trace_state_variable_value)
3781         (agent_set_trace_state_variable_value, agent_tsv_read)
3782         (agent_mem_read_string, get_raw_reg_func_addr)
3783         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3784         * tracepoint.h: ... this new file.
3785
3786 2013-09-05  Pedro Alves  <palves@redhat.com>
3787
3788         * server.h (perror_with_name, error, fatal, warning, paddress)
3789         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3790         include it.
3791         * utils.h: New file.
3792
3793 2013-09-05  Pedro Alves  <palves@redhat.com>
3794
3795         * server.h (remote_debug, noack_mode, transport_is_reliable)
3796         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3797         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3798         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3799         (write_enn, initialize_async_io, enable_async_io)
3800         (disable_async_io, check_remote_input_interrupt_request)
3801         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3802         (dead_thread_notify, prepare_resume_reply)
3803         (decode_address_to_semicolon, decode_address, decode_m_packet)
3804         (decode_M_packet, decode_X_packet, decode_xfer_write)
3805         (decode_search_memory_packet, unhexify, hexify)
3806         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3807         (look_up_one_symbol, relocate_instruction)
3808         (monitor_output): Move to remote-utils.h, and include it.
3809         * remote-utils.h: New file.
3810
3811 2013-09-05  Pedro Alves  <palves@redhat.com>
3812
3813         * server.h (_): Delete.
3814
3815 2013-09-02  Pedro Alves  <palves@redhat.com>
3816
3817         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3818         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3819         allocated.
3820         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3821
3822 2013-09-02  Pierre Muller  <muller@sourceware.org>
3823
3824         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3825         or WriteProcessMemory complete successfully and handle
3826         ERROR_PARTIAL_COPY error.
3827
3828 2013-09-02  Pedro Alves  <palves@redhat.com>
3829
3830         * server.c (gdb_read_memory): Return -1 on traceframe memory read
3831         error instead of EIO.
3832
3833 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
3834
3835         PR server/15604
3836         * linux-low.c: Include filestuff.h.
3837         (linux_create_inferior) <pid == 0>: Call close_most_fds.
3838         * lynx-low.c: Include filestuff.h.
3839         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3840         * server.c: Include filestuff.h.
3841         (main): Call notice_open_fds.
3842         * spu-low.c: Include filestuff.h.
3843         (spu_create_inferior) <pid == 0>: Call close_most_fds.
3844
3845 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
3846
3847         * Makefile.in: Explain why ../target and ../nat are not
3848         listed as include file search paths.
3849         (linux-waitpid.o): New object file rule.
3850         * configure.srv (srv_native_linux_obj): New variable.
3851         Replace all occurrences of linux native object files with
3852         $srv_native_linux_obj.
3853         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3854         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3855         (linux_enable_event_reporting): Remove declaration.
3856         (my_waitpid): Moved to common/linux-waitpid.c.
3857         (linux_wait_for_event): Pass ptid when calling
3858         linux_enable_event_reporting.
3859         (linux_supports_tracefork_flag): Remove.
3860         (linux_enable_event_reporting): Likewise.
3861         (linux_tracefork_grandchild): Remove.
3862         (STACK_SIZE): Moved to common/linux-ptrace.c.
3863         (linux_tracefork_child): Remove.
3864         (linux_test_for_tracefork): Remove.
3865         (linux_look_up_symbols): Call linux_supports_traceclone.
3866         (initialize_low): Remove call to linux_test_for_tracefork.
3867         * linux-low.h (PTRACE_TYPE_ARG3): Move to
3868         common/linux-ptrace.h.
3869         (PTRACE_TYPE_ARG4): Likewise.
3870         Include linux-ptrace.h.
3871
3872 2013-08-21  Pedro Alves  <palves@redhat.com>
3873
3874         * config.in: Renegerate.
3875
3876 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
3877
3878         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3879         (SFILES): Remove $(srcdir)/common/target-common.c and
3880         add $(srcdir)/target/waitstatus.c.
3881         (OBS): Remove target-common.o and add waitstatus.o.
3882         (server_h): Remove $(srcdir)/../common/target-common.h and
3883         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3884         and $(srcdir)/../target/waitstatus.h.
3885         (target-common.o): Remove.
3886         (waitstatus.o): New target object file.
3887         * target.h: Do not include target-common.h and
3888         include target/resume.h, target/wait.h and
3889         target/waitstatus.h.
3890
3891 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
3892
3893         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3894         to PTRACE_TYPE_ARG3.
3895         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3896         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3897         PTRACE_TYPE_ARG4.
3898         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3899         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3900
3901 2013-07-27  Jie Zhang  <jie@codesourcery.com>
3902             Daniel Jacobowitz  <dan@codesourcery.com>
3903             Yao Qi  <yao@codesourcery.com>
3904
3905         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3906         (mips-linux-watch.o): New rule.
3907         (mips_linux_watch_h): New variable.
3908         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3909         srv_tgtobj.
3910         * linux-mips-low.c: Include mips-linux-watch.h.
3911         (struct arch_process_info, struct arch_lwp_info): New.
3912         (update_watch_registers_callback): New function.
3913         (mips_linux_new_process, mips_linux_new_thread) New functions.
3914         (mips_linux_prepare_to_resume, mips_insert_point): New
3915         functions.
3916         (mips_remove_point, mips_stopped_by_watchpoint): New
3917         functions.
3918         (rsp_bp_type_to_target_hw_bp_type): New function.
3919         (mips_stopped_data_address): New function.
3920         (the_low_target): Add watchpoint support functions.
3921
3922 2013-07-27  Yao Qi  <yao@codesourcery.com>
3923
3924         * i386-low.c: Include break-common.h.
3925         (enum target_hw_bp_type): Remove.
3926
3927 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
3928
3929         * Makefile.in (SFILES): /common/target-common.c.
3930         (OBS): Add target-common.o.
3931         (server_h): Add $(srcdir)/../common/target-common.h.
3932         (target-common.o): New target.
3933         * server.c (queue_stop_reply_callback): Free
3934         status string after use.
3935         * target.c (target_waitstatus_to_string): Remove.
3936         * target.h: Include target-common.h.
3937         (resume_kind): Likewise.
3938         (target_waitkind): Likewise.
3939         (target_waitstatus): Likewise.
3940         (TARGET_WNOHANG): Likewise.
3941
3942 2013-07-04  Yao Qi  <yao@codesourcery.com>
3943
3944         * Makefile.in (host_alias): Use @host_noncanonical@.
3945         (target_alias): Use @target_noncanonical@.
3946         * configure.ac: Use ACX_NONCANONICAL_TARGET and
3947         ACX_NONCANONICAL_HOST.
3948         * configure: Regenerated.
3949
3950         Revert:
3951         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
3952
3953         * configure.ac (version_host, version_target): Set and AC_SUBST them.
3954         * configure: Rebuild.
3955         * Makefile.in (version_host, version_target): Get from configure.
3956         (version.c): Use $(version_host) and $(version_target).
3957
3958 2013-07-03  Pedro Alves  <palves@redhat.com>
3959
3960         * Makefile.in (config.status): Depend on development.sh.
3961         * acinclude.m4: Include libmcheck.m4.
3962         * configure: Regenerate.
3963
3964 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
3965
3966         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3967         attribute inside the parentheses.
3968         (winapi_DebugSetProcessKillOnExit): Ditto.
3969         (winapi_DebugBreakProcess): Ditto.
3970         (winapi_GenerateConsoleCtrlEvent): Ditto.
3971
3972 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
3973
3974         * notif.h (notif_event): Add a dummy member to avoid compiler
3975         errors.
3976
3977 2013-07-01  Pedro Alves  <palves@redhat.com>
3978
3979         * hostio.c (HOSTIO_PATH_MAX): Define.
3980         (require_filename, handle_open, handle_unlink, handle_readlink):
3981         Use it.
3982
3983 2013-07-01  Pedro Alves  <palves@redhat.com>
3984
3985         * server.h: Include "pathmax.h".
3986         * linux-low.c: Don't include sys/param.h.
3987         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3988         MAXPATHLEN.
3989         * win32-low.c: Don't include sys/param.h.
3990         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3991
3992 2013-07-01  Pedro Alves  <palves@redhat.com>
3993
3994         * event-loop.c: Don't check HAVE_UNISTD_H before including
3995         <unistd.h>.
3996         * gdbreplay.c: Likewise.
3997         * remote-utils.c: Likewise.
3998         * server.c: Likewise.
3999         * configure.ac: Don't check for unistd.h.
4000         * configure: Regenerate.
4001
4002 2013-06-28  Tom Tromey  <tromey@redhat.com>
4003
4004         * Makefile.in (version.c): Use version.in, not
4005         common/version.in.
4006
4007 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4008
4009         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4010         * configure: Rebuild.
4011         * Makefile.in (version_host, version_target): Get from configure.
4012         (version.c): Use $(version_host) and $(version_target).
4013
4014 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4015
4016         Fix trace-status to output user name without trailing colon.
4017         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4018
4019 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4020
4021         Fix trace-status to output proper start-time and stop-time.
4022         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4023         output start time and stop time in hex as gdb expects.
4024
4025 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
4026
4027         * tracepoint.c (build_traceframe_info_xml): Output trace state
4028         variables present in the trace buffer.
4029
4030 2013-06-24  Tom Tromey  <tromey@redhat.com>
4031
4032         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4033         create-version.sh.
4034         (version.o): Remove.
4035         * gdbreplay.c: Include version.h.
4036         (version, host_name): Don't declare.
4037         * server.h: Include version.h.
4038         (version, host_name): Don't declare.
4039
4040 2013-06-12  Pedro Alves  <palves@redhat.com>
4041
4042         * linux-x86-low.c (linux_is_elf64): Delete global.
4043         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4044         with local linux_pid_exe_is_elf_64_file use.
4045
4046 2013-06-11  Pedro Alves  <palves@redhat.com>
4047
4048         * linux-low.c (regset_disabled, disable_regset): New functions.
4049         (regsets_fetch_inferior_registers)
4050         (regsets_store_inferior_registers): Use them.
4051         (initialize_regsets_info); Don't allocate the disabled_regsets
4052         array here.
4053         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4054         comment.
4055
4056 2013-06-11  Pedro Alves  <palves@redhat.com>
4057
4058         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4059         xmalloc.
4060
4061 2013-06-11  Pedro Alves  <palves@redhat.com>
4062
4063         * linux-x86-low.c (initialize_low_arch): Call
4064         init_registers_x32_avx_linux.
4065
4066 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
4067
4068         Fix compatibility with Android Bionic.
4069         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4070         it is not empty.
4071
4072 2013-06-07  Pedro Alves  <palves@redhat.com>
4073
4074         PR server/14823
4075         * Makefile.in (OBS): Add tdesc.o.
4076         (IPA_OBJS): Add tdesc-ipa.o.
4077         (tdesc-ipa.o): New rule.
4078         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4079         interface.
4080         * linux-low.c (new_inferior): Delete.
4081         (disabled_regsets, num_regsets): Delete.
4082         (linux_add_process): Adjust to set the new per-process
4083         new_inferior flag.
4084         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4085         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
4086         was a stop.  When calling arch_setup, switch the current inferior
4087         to the thread that got an event.
4088         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4089         (regsets_fetch_inferior_registers)
4090         (regsets_store_inferior_registers): New regsets_info parameter.
4091         Adjust to use it.
4092         (linux_register_in_regsets): New regs_info parameter.  Adjust to
4093         use it.
4094         (register_addr, fetch_register, store_register): New usrregs_info
4095         parameter.  Adjust to use it.
4096         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4097         parameter regs_info.  Adjust to use it.
4098         (linux_fetch_registers): Get the current inferior's regs_info, and
4099         adjust to use it.
4100         (linux_store_registers): Ditto.
4101         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4102         (initialize_low): Don't initialize the target_regsets here.  Call
4103         initialize_low_arch.
4104         * linux-low.h (target_regsets): Delete declaration.
4105         (struct regsets_info): New.
4106         (struct usrregs_info): New.
4107         (struct regs_info): New.
4108         (struct process_info_private) <new_inferior>: New field.
4109         (struct linux_target_ops): Delete the num_regs, regmap, and
4110         regset_bitmap fields.  New field regs_info.
4111         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4112         * i387-fp.c (num_xmm_registers): Delete.
4113         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4114         calls to new interface.
4115         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4116         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4117         Infer the number of xmm registers from the regcache's target
4118         description.
4119         * i387-fp.h (num_xmm_registers): Delete.
4120         * inferiors.c (add_thread): Don't install the thread's regcache
4121         here.
4122         * proc-service.c (gregset_info): Fetch the current inferior's
4123         regs_info.  Adjust to use it.
4124         * regcache.c: Include tdesc.h.
4125         (register_bytes, reg_defs, num_registers)
4126         (gdbserver_expedite_regs): Delete.
4127         (get_thread_regcache): If the thread doesn't have a regcache yet,
4128         create one, instead of aborting gdbserver.
4129         (regcache_invalidate_one): Rename to ...
4130         (regcache_invalidate_thread): ... this.
4131         (regcache_invalidate_one): New.
4132         (regcache_invalidate): Only invalidate registers of the current
4133         process.
4134         (init_register_cache): Add target_desc parameter, and use it.
4135         (new_register_cache): Ditto.  Assert the target description has a
4136         non zero registers_size.
4137         (regcache_cpy): Add assertions.  Adjust.
4138         (realloc_register_cache, set_register_cache): Delete.
4139         (registers_to_string, registers_from_string): Adjust.
4140         (find_register_by_name, find_regno, find_register_by_number)
4141         (register_cache_size): Add target_desc parameter, and use it.
4142         (free_register_cache_thread, free_register_cache_thread_one)
4143         (regcache_release, register_cache_size): New.
4144         (register_size): Add target_desc parameter, and use it.
4145         (register_data, supply_register, supply_register_zeroed)
4146         (supply_regblock, supply_register_by_name, collect_register)
4147         (collect_register_as_string, collect_register_by_name): Adjust.
4148         * regcache.h (struct target_desc): Forward declare.
4149         (struct regcache) <tdesc>: New field.
4150         (init_register_cache, new_register_cache): Add target_desc
4151         parameter.
4152         (regcache_invalidate_thread): Declare.
4153         (regcache_invalidate_one): Delete declaration.
4154         (regcache_release): Declare.
4155         (find_register_by_number, register_cache_size, register_size)
4156         (find_regno): Add target_desc parameter.
4157         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4158         declarations.
4159         * remote-utils.c: Include tdesc.h.
4160         (outreg, prepare_resume_reply): Adjust.
4161         * server.c: Include tdesc.h.
4162         (gdbserver_xmltarget): Delete declaration.
4163         (get_features_xml, process_serial_event): Adjust.
4164         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4165         declare.
4166         (struct process_info) <tdesc>: New field.
4167         (ipa_tdesc): Declare.
4168         * tdesc.c: New file.
4169         * tdesc.h: New file.
4170         * tracepoint.c: Include tdesc.h.
4171         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4172         (get_context_regcache): Adjust to pass ipa_tdesc down.
4173         (do_action_at_tracepoint): Adjust to get the register cache size
4174         from the context regcache's description.
4175         (traceframe_walk_blocks): Adjust to get the register cache size
4176         from the current trace frame's description.
4177         (traceframe_get_pc): Adjust to get current trace frame's
4178         description and pass it down.
4179         (gdb_collect): Adjust to get the register cache size from the
4180         IPA's description.
4181         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4182         (gdbserver_xmltarget): Delete.
4183         (initialize_low_tracepoint): Set the ipa's target description.
4184         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4185         (initialize_low_tracepoint): Set the ipa's target description.
4186         * linux-x86-low.c: Include tdesc.h.
4187         [__x86_64__] (is_64bit_tdesc): New.
4188         (ps_get_thread_area, x86_get_thread_area): Use it.
4189         (i386_cannot_store_register): Rename to ...
4190         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
4191         (i386_cannot_fetch_register): Rename to ...
4192         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
4193         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4194         to new interface.
4195         (target_regsets): Rename to ...
4196         (x86_regsets): ... this.
4197         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4198         interface.
4199         (x86_siginfo_fixup): Use is_64bit_tdesc.
4200         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4201         (tdesc_x32_avx_linux, tdesc_x32_linux)
4202         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4203         Declare.
4204         (x86_linux_update_xmltarget): Delete.
4205         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4206         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4207         (AMD64_LINUX_USER64_CS): New.
4208         (x86_linux_read_description): New, based on
4209         x86_linux_update_xmltarget.
4210         (same_process_callback): New.
4211         (x86_arch_setup_process_callback): New.
4212         (x86_linux_update_xmltarget): New.
4213         (x86_regsets_info): New.
4214         (amd64_linux_regs_info): New.
4215         (i386_linux_usrregs_info): New.
4216         (i386_linux_regs_info): New.
4217         (x86_linux_regs_info): New.
4218         (x86_arch_setup): Reimplement.
4219         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4220         (x86_emit_ops): Ditto.
4221         (the_low_target): Adjust.  Install x86_linux_regs_info,
4222         x86_cannot_fetch_register, and x86_cannot_store_register.
4223         (initialize_low_arch): New.
4224         * linux-ia64-low.c (tdesc_ia64): Declare.
4225         (ia64_fetch_register): Adjust.
4226         (ia64_usrregs_info, regs_info): New globals.
4227         (ia64_regs_info): New function.
4228         (the_low_target): Adjust.
4229         (initialize_low_arch): New function.
4230         * linux-sparc-low.c (tdesc_sparc64): Declare.
4231         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4232         Adjust.
4233         (sparc_arch_setup): New function.
4234         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4235         (the_low_target): Adjust.
4236         (initialize_low_arch): New function.
4237         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4238         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4239         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4240         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4241         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4242         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4243         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4244         (tdesc_powerpc_isa205_vsx64l): Declare.
4245         (ppc_cannot_store_register, ppc_collect_ptrace_register)
4246         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4247         (ppc_set_pc, ppc_get_hwcap): Adjust.
4248         (ppc_usrregs_info): Forward declare.
4249         (!__powerpc64__) ppc_regmap_adjusted: New global.
4250         (ppc_arch_setup): Adjust to the current process'es target
4251         description.
4252         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4253         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4254         (ppc_store_evrregset): Adjust.
4255         (target_regsets): Rename to ...
4256         (ppc_regsets): ... this, and make static.
4257         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4258         (ppc_regs_info): New function.
4259         (the_low_target): Adjust.
4260         (initialize_low_arch): New function.
4261         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4262         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4263         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4264         (tdesc_s390x_linux64v2): Declare.
4265         (s390_collect_ptrace_register, s390_supply_ptrace_register)
4266         (s390_fill_gregset, s390_store_last_break): Adjust.
4267         (target_regsets): Rename to ...
4268         (s390_regsets): ... this, and make static.
4269         (s390_get_pc, s390_set_pc): Adjust.
4270         (s390_get_hwcap): New target_desc parameter, and use it.
4271         [__s390x__] (have_hwcap_s390_high_gprs): New global.
4272         (s390_arch_setup): Adjust to set the current process'es target
4273         description.  Don't adjust the regmap.
4274         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4275         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4276         (regs_info_3264): New globals.
4277         (s390_regs_info): New function.
4278         (the_low_target): Adjust.
4279         (initialize_low_arch): New function.
4280         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4281         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4282         [__mips64] (init_registers_mips_linux)
4283         (init_registers_mips_dsp_linux): Delete defines.
4284         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4285         (have_dsp): New global.
4286         (mips_read_description): New, based on mips_arch_setup.
4287         (mips_arch_setup): Reimplement.
4288         (get_usrregs_info): New function.
4289         (mips_cannot_fetch_register, mips_cannot_store_register)
4290         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4291         (mips_fill_fpregset, mips_store_fpregset): Adjust.
4292         (target_regsets): Rename to ...
4293         (mips_regsets): ... this, and make static.
4294         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4295         (dsp_regs_info, regs_info): New globals.
4296         (mips_regs_info): New function.
4297         (the_low_target): Adjust.
4298         (initialize_low_arch): New function.
4299         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4300         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4301         Declare.
4302         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4303         (arm_read_description): New, with bits factored from
4304         arm_arch_setup.
4305         (arm_arch_setup): Reimplement.
4306         (target_regsets): Rename to ...
4307         (arm_regsets): ... this, and make static.
4308         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4309         (arm_regs_info): New function.
4310         (the_low_target): Adjust.
4311         (initialize_low_arch): New function.
4312         * linux-m68k-low.c (tdesc_m68k): Declare.
4313         (target_regsets): Rename to ...
4314         (m68k_regsets): ... this, and make static.
4315         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4316         (m68k_regs_info): New function.
4317         (m68k_arch_setup): New function.
4318         (the_low_target): Adjust.
4319         (initialize_low_arch): New function.
4320         * linux-sh-low.c (tdesc_sharch): Declare.
4321         (target_regsets): Rename to ...
4322         (sh_regsets): ... this, and make static.
4323         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4324         (sh_regs_info, sh_arch_setup): New functions.
4325         (the_low_target): Adjust.
4326         (initialize_low_arch): New function.
4327         * linux-bfin-low.c (tdesc_bfin): Declare.
4328         (bfin_arch_setup): New function.
4329         (bfin_usrregs_info, regs_info): New globals.
4330         (bfin_regs_info): New function.
4331         (the_low_target): Adjust.
4332         (initialize_low_arch): New function.
4333         * linux-cris-low.c (tdesc_cris): Declare.
4334         (cris_arch_setup): New function.
4335         (cris_usrregs_info, regs_info): New globals.
4336         (cris_regs_info): New function.
4337         (the_low_target): Adjust.
4338         (initialize_low_arch): New function.
4339         * linux-cris-low.c (tdesc_crisv32): Declare.
4340         (cris_arch_setup): New function.
4341         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4342         (cris_regs_info): New function.
4343         (the_low_target): Adjust.
4344         (initialize_low_arch): New function.
4345         * linux-m32r-low.c (tdesc_m32r): Declare.
4346         (m32r_arch_setup): New function.
4347         (m32r_usrregs_info, regs_info): New globals.
4348         (m32r_regs_info): Adjust.
4349         (initialize_low_arch): New function.
4350         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4351         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4352         (tic6x_usrregs_info): Forward declare.
4353         (tic6x_read_description): New function, based on ...
4354         (tic6x_arch_setup): ... this.  Reimplement.
4355         (target_regsets): Rename to ...
4356         (tic6x_regsets): ... this, and make static.
4357         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4358         (tic6x_regs_info): New function.
4359         (the_low_target): Adjust.
4360         (initialize_low_arch): New function.
4361         * linux-xtensa-low.c (tdesc_xtensa): Declare.
4362         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4363         (target_regsets): Rename to ...
4364         (xtensa_regsets): ... this, and make static.
4365         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4366         globals.
4367         (xtensa_arch_setup, xtensa_regs_info): New functions.
4368         (the_low_target): Adjust.
4369         (initialize_low_arch): New function.
4370         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4371         (nios2_arch_setup): Set the current process'es tdesc.
4372         (target_regsets): Rename to ...
4373         (nios2_regsets): ... this.
4374         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4375         (nios2_regs_info): New function.
4376         (the_low_target): Adjust.
4377         (initialize_low_arch): New function.
4378         * linux-aarch64-low.c (tdesc_aarch64): Declare.
4379         (aarch64_arch_setup): Set the current process'es tdesc.
4380         (target_regsets): Rename to ...
4381         (aarch64_regsets): ... this.
4382         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4383         (aarch64_regs_info): New function.
4384         (the_low_target): Adjust.
4385         (initialize_low_arch): New function.
4386         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4387         globals.
4388         (target_regsets): Rename to ...
4389         (tile_regsets): ... this.
4390         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4391         (tile_regs_info): New function.
4392         (tile_arch_setup): Set the current process'es tdesc.
4393         (the_low_target): Adjust.
4394         (initialize_low_arch): New function.
4395         * spu-low.c (tdesc_spu): Declare.
4396         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4397         * win32-arm-low.c (tdesc_arm): Declare.
4398         (arm_arch_setup): New function.
4399         (the_low_target): Install arm_arch_setup instead of
4400         init_registers_arm.
4401         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4402         (init_windows_x86): Rename to ...
4403         (i386_arch_setup): ... this.  Set `win32_tdesc'.
4404         (the_low_target): Adjust.
4405         * win32-low.c (win32_tdesc): New global.
4406         (child_add_thread): Don't create the thread cache here.
4407         (do_initial_child_stuff): Set the new process'es tdesc.
4408         * win32-low.h (struct target_desc): Forward declare.
4409         (win32_tdesc): Declare.
4410         * lynx-i386-low.c (tdesc_i386): Declare global.
4411         (lynx_i386_arch_setup): Set `lynx_tdesc'.
4412         * lynx-low.c (lynx_tdesc): New global.
4413         (lynx_add_process): Set the new process'es tdesc.
4414         * lynx-low.h (struct target_desc): Forward declare.
4415         (lynx_tdesc): Declare global.
4416         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4417         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4418         * nto-low.c (nto_tdesc): New global.
4419         (do_attach): Set the new process'es tdesc.
4420         * nto-low.h (struct target_desc): Forward declare.
4421         (nto_tdesc): Declare.
4422         * nto-x86-low.c (tdesc_i386): Declare.
4423         (nto_x86_arch_setup): Set `nto_tdesc'.
4424
4425 2013-06-04  Gary Benson  <gbenson@redhat.com>
4426
4427         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4428         to qSupported response when appropriate.
4429         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4430         with nonzero-length annex.
4431         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4432         arguments supplied in annex.
4433
4434 2013-05-31  Doug Evans  <dje@google.com>
4435
4436         PR server/15594
4437         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4438         64 bits in 64-cross-32 environment.
4439
4440 2013-05-28  Pedro Alves  <palves@redhat.com>
4441
4442         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4443         (aarch64-without-fpu.c): Delete rule.
4444         * configure.srv (aarch64*-*-linux*): Remove references to
4445         aarch64-without-fpu.o and aarch64-without-fpu.xml.
4446         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4447         declaration.
4448
4449 2013-05-24  Pedro Alves  <palves@redhat.com>
4450
4451         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4452         instead of strchr/decode_address.  Error if the range isn't split
4453         with a ','.  Don't assume there's be a ':' in the action.
4454
4455 2013-05-23  Yao Qi  <yao@codesourcery.com>
4456             Pedro Alves  <palves@redhat.com>
4457
4458         * linux-low.c (lwp_in_step_range): New function.
4459         (linux_wait_1): If the thread was range stepping and stopped
4460         outside the stepping range, report the stop to GDB.  Otherwise,
4461         continue stepping.  Add range stepping debug output.
4462         (linux_set_resume_request): Copy the step range from the resume
4463         request to the lwp.
4464         (linux_supports_range_stepping): New.
4465         (linux_target_ops) <supports_range_stepping>: Set to
4466         linux_supports_range_stepping.
4467         * linux-low.h (struct linux_target_ops)
4468         <supports_range_stepping>: New field.
4469         (struct lwp_info) <step_range_start, step_range_end>: New fields.
4470         * linux-x86-low.c (x86_supports_range_stepping): New.
4471         (the_low_target) <supports_range_stepping>: Set to
4472         x86_supports_range_stepping.
4473         * server.c (handle_v_cont): Handle 'r' action.
4474         (handle_v_requests): Append ";r" if the target supports range
4475         stepping.
4476         * target.h (struct thread_resume) <step_range_start,
4477         step_range_end>: New fields.
4478         (struct target_ops) <supports_range_stepping>:
4479         New field.
4480         (target_supports_range_stepping): New macro.
4481
4482 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
4483
4484         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4485         confusion in comment.
4486
4487 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
4488
4489         * lynx-low.c (struct process_info_private): New type.
4490         (lynx_add_process): New function.
4491         (lynx_create_inferior, lynx_attach): Replace calls to
4492         add_process by calls to lynx_add_process.
4493         (lynx_resume): If PTID is null, then try using
4494         current_process()->private->last_wait_event_ptid.
4495         Add comments.
4496         (lynx_clear_inferiors): Delete.  The contents of that function
4497         has been inlined in lynx_mourn;
4498         (lynx_wait_1): Save the ptid in the process's private data.
4499         (lynx_mourn): Free the process' private data.  Replace call
4500         to lynx_clear_inferiors by call to clear_inferiors.
4501
4502 2013-05-17  Yao Qi  <yao@codesourcery.com>
4503
4504         * i386-low.c (i386_length_and_rw_bits): Move the comment to
4505         the right place.
4506
4507 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
4508
4509         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4510         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
4511         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4512         PT_TEXT_END_ADDR guards.  Update comments.
4513         (linux_target_op) <read_offsets>: Conditionally define to
4514         linux_read_offsets if the target is UCLIBC and if it defines
4515         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4516
4517 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
4518             Andrew Jenner  <andrew@codesourcery.com>
4519
4520         * Makefile.in (SFILES): Add linux-nios2-low.c.
4521         (clean): Add action to delete nios2-linux.c.
4522         (nios2-linux.c): New rule.
4523         * configure.srv: Add nios2*-*-linux*.
4524         * linux-nios2-low.c: New.
4525
4526 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4527
4528         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4529
4530 2013-04-25  Hui Zhu  <hui@codesourcery.com>
4531
4532         PR gdb/15186
4533         * ax.c (ax_printf): Add fflush.
4534
4535 2013-04-22  Tom Tromey  <tromey@redhat.com>
4536
4537         * Makefile.in (SFILES): Add filestuff.c.
4538         (OBS): Add filestuff.o.
4539         (filestuff.o): New target.
4540         * config.in, configure: Rebuild.
4541         * configure.ac: Check for fdwalk, pipe2.
4542
4543 2013-04-17  Pedro Alves  <palves@redhat.com>
4544
4545         * configure.ac (USE_THREAD_DB): Delete variable.
4546         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4547         Don't AC_SUBST USE_THREAD_DB.
4548         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4549         * config.in, configure: Regenerate.
4550
4551 2013-04-16  Pedro Alves  <palves@redhat.com>
4552
4553         * linux-low.h (struct lwp_info) <thread_known>: Move under
4554         the USE_THREAD_DB #ifdef.
4555
4556 2013-04-16  Pedro Alves  <palves@redhat.com>
4557
4558         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4559         (linux-low.o): Delete rule.
4560         * linux-low.h: Always include "gdb_thread_db.h" instead of
4561         conditionally including thread_db.h.
4562         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4563         HAVE_THREAD_DB_H.
4564
4565 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4566
4567         * Makefile.in (install-only): Fix make install regression.
4568
4569 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
4570
4571         Convert man pages to texinfo, new gdbinit.5 texinfo page.
4572         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4573         installation.
4574         * gdbserver.1: Remove.
4575
4576 2013-03-22  Pedro Alves  <palves@redhat.com>
4577
4578         * linux-low.c (handle_extended_wait): Don't call
4579         linux_enable_event_reporting.
4580
4581 2013-03-15  Tony Theodore  <tonyt@logyst.com>
4582
4583         PR build/9098:
4584         * Makefile.in (SHELL): Use @SHELL@.
4585
4586 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
4587
4588         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4589         compiler warning.
4590
4591 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
4592
4593         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4594         Remove extraneous NULL element.
4595
4596 2013-03-13  Yao Qi  <yao@codesourcery.com>
4597
4598         * tracepoint.c (traceframe_read_tsv): Look for the last matched
4599         'V' block in trace frame.
4600
4601 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
4602
4603         * target.h (struct target_ops): Add btrace ops.
4604         (target_supports_btrace): New macro.
4605         (target_enable_btrace): New macro.
4606         (target_disable_btrace): New macro.
4607         (target_read_btrace): New macro.
4608         * gdbthread.h (struct thread_info): Add btrace field.
4609         * server.c: Include btrace-common.h.
4610         (handle_btrace_general_set): New function.
4611         (handle_btrace_enable): New function.
4612         (handle_btrace_disable): New function.
4613         (handle_general_set): Call handle_btrace_general_set.
4614         (handle_qxfer_btrace): New function.
4615         (struct qxfer qxfer_packets[]): Add btrace entry.
4616         * inferiors.c (remove_thread): Disable btrace.
4617         * linux-low: Include linux-btrace.h.
4618         (linux_low_enable_btrace): New function.
4619         (linux_low_read_btrace): New function.
4620         (linux_target_ops): Add btrace ops.
4621         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4622         Add srv_linux_btrace=yes.
4623         (x86_64-*-linux*): Add linux-btrace.o.
4624         Add srv_linux_btrace=yes.
4625         * configure.ac: Define HAVE_LINUX_BTRACE.
4626         * config.in: Regenerated.
4627         * configure: Regenerated.
4628
4629 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
4630
4631         * server.c (handle_qxfer): Preserve error message if -3 is
4632         returned.
4633         (qxfer): Document the -3 return value.
4634
4635 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
4636
4637         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4638         (linux_btrace_h): New variable.
4639         (linux-btrace.o): New rule.
4640
4641 2013-03-08  Stan Shebs  <stan@codesourcery.com>
4642             Hafiz Abid Qadeer  <abidh@codesourcery.com>
4643
4644         * tracepoint.c (trace_buffer_size): New global.
4645         (DEFAULT_TRACE_BUFFER_SIZE): New define.
4646         (init_trace_buffer): Change to one-argument function. Allocate
4647         trace buffer memory.
4648         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4649         handle QTBuffer:size packet.
4650         (cmd_bigqtbuffer_size): New function.
4651         (initialize_tracepoint): Call init_trace_buffer with
4652         DEFAULT_TRACE_BUFFER_SIZE.
4653         * server.c (handle_query): Add QTBuffer:size in the
4654         supported packets.
4655
4656 2013-03-07  Yao Qi  <yao@codesourcery.com>
4657
4658         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4659         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4660         of -1.
4661         (cmd_qtsp): Adjust condition.  Do post increment.
4662         Set cur_action and cur_step_action back to 0.
4663
4664 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
4665
4666         PR server/15236
4667         * linux-low.c (linux_write_memory): Return early success if LEN is
4668         zero.
4669
4670 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
4671
4672         * configure.srv: Add x86_64-*-cygwin* as target.
4673
4674 2013-02-28  Tom Tromey  <tromey@redhat.com>
4675
4676         * configure.ac: Invoke AC_SYS_LARGEFILE.
4677         * configure, config.in: Rebuild.
4678
4679 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
4680
4681         * win32-low.c: Throughout, fix format strings and casts of
4682         printf-like functions to avoid type related warnings on all
4683         platforms.
4684         (get_child_debug_event): Print dwDebugEventCode as hex since
4685         that's how it's usually documented.
4686
4687 2013-02-28  Yao Qi  <yao@codesourcery.com>
4688
4689         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4690         pulongest.
4691
4692 2013-02-27  Jiong Wang  <jiwang@tilera.com>
4693
4694         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4695         (reg-tilegx32.c): New rule.
4696         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4697         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
4698         different register info initializer according to elf class.
4699         (init_registers_tilgx32): New function.  The tilegx32 register info
4700         initializer.
4701         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4702         (tile_store_gregset): Likewise.
4703
4704 2013-02-27  Yao Qi  <yao@codesourcery.com>
4705
4706         * server.c (process_point_options): Print debug message when
4707         debug_threads is true.
4708
4709 2013-02-26  Yao Qi  <yao@codesourcery.com>
4710
4711         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4712
4713 2013-02-19  Pedro Alves  <palves@redhat.com>
4714             Kai Tietz <ktietz@redhat.com>
4715
4716         PR gdb/15161
4717
4718         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4719         instead of strtoul to extract address from packet.
4720         (process_serial_event) <'z'>: Likewise.
4721
4722 2013-02-18  Yao Qi  <yao@codesourcery.com>
4723
4724         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4725
4726 2013-02-14  Pedro Alves  <palves@redhat.com>
4727
4728         Plug memory leak.
4729
4730         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4731         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4732
4733 2013-02-14  Pedro Alves  <palves@redhat.com>
4734
4735         * tracepoint.c (cmd_qtdpsrc): Use savestring.
4736
4737 2013-02-14  Pedro Alves  <palves@redhat.com>
4738
4739         * tracepoint.c (save_string): Delete.
4740         (add_tracepoint_action): Use savestring instead of save_string.
4741
4742 2013-02-12  Pedro Alves  <palves@redhat.com>
4743
4744         * linux-xtensa-low.c: Ditto.
4745         * xtensa-xtregs.c: Ditto.
4746
4747 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
4748
4749         * thread-db.c (thread_db_get_tls_address): NULL pointer check
4750         thread_db.
4751
4752 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
4753
4754         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4755         aarch64_num_wp_regs and aarch64_num_bp_regs to
4756         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4757
4758 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
4759
4760         * linux-aarch64-low.c (ps_get_thread_area): Replace
4761         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4762
4763 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
4764             Marcus Shawcroft  <marcus.shawcroft@arm.com>
4765             Nigel Stephens  <nigel.stephens@arm.com>
4766             Yufeng Zhang  <yufeng.zhang@arm.com>
4767
4768         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4769         (aarch64.c, aarch64-without-fpu.c): New targets.
4770         * configure.srv (aarch64*-*-linux*): New.
4771         * linux-aarch64-low.c: New file.
4772
4773 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
4774
4775         * linux-low.c (handle_extended_wait, linux_create_inferior)
4776         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4777         (dequeue_one_deferred_signal, linux_resume_one_thread)
4778         (fetch_register, linux_write_memory, linux_enable_event_reporting)
4779         (linux_tracefork_grandchild, linux_test_for_tracefork)
4780         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4781         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4782         where the argument is 0.
4783
4784 2013-01-25  Yao Qi  <yao@codesourcery.com>
4785
4786         * event-loop.c: Include "queue.h".
4787         (gdb_event_p): New typedef.
4788         (struct gdb_event) <next_event>: Remove.
4789         (event_queue): Change to QUEUE(gdb_event_p).
4790         (async_queue_event): Remove.
4791         (gdb_event_xfree): New.
4792         (initialize_event_loop): New.
4793         (process_event): Use API from QUEUE.
4794         (wait_for_event): Likewise.
4795         * server.c (main): Call initialize_event_loop.
4796         * server.h (initialize_event_loop): Declare.
4797
4798 2013-01-18  Yao Qi  <yao@codesourcery.com>
4799
4800         * ax.h (struct eval_agent_expr_context): New.
4801         (gdb_eval_agent_expr): Update declaration.
4802         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4803         TFRAME.  Add new argument CTX.
4804         * server.h (struct eval_agent_expr_context): Declare.
4805         (agent_mem_read, agent_tsv_read): Update declaration.
4806         (agent_mem_read_string): Likewise.
4807         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4808         (add_traceframe_block): Add new argument TPOINT.
4809         Increase TPOINT->traceframe_usage.
4810         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4811         eval_tracepoint_agent_expr.
4812         (condition_true_at_tracepoint): Likewise.
4813         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
4814         (agent_mem_read_string, agent_tsv_read): Likewise.
4815
4816 2013-01-16  Yao Qi  <yao@codesourcery.com>
4817
4818         * linux-low.c (linux_resume_one_lwp): Don't check
4819         'lwp->bp_reinsert != 0'.
4820
4821 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
4822             Pedro Alves  <palves@redhat.com>
4823
4824         * lynx-low.c (ptrace_request_to_str): Define a temporary
4825         macro and use it to simplify this function's implementation.
4826
4827 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
4828
4829         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4830         sets errno.
4831
4832 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
4833
4834         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4835
4836 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
4837
4838         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4839
4840 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
4841
4842         * lynx-low.c (lynx_resume): Use the resume_info parameter
4843         to determine the ptid for the lynx_ptrace call, unless
4844         it is equal to minus_one_ptid, in which case we use the
4845         ptid of the current_inferior.
4846         (lynx_wait_1): After having received a thread create/exit
4847         event, resume the inferior's execution using the signaling
4848         thread's ptid, rather than the old ptid.
4849
4850 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
4851
4852         * lynx-low.c (lynx_resume): Delete variable ret.
4853
4854 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
4855
4856         * gdbreplay.c (gdbreplay_version): Update copyright year.
4857         * server.c (gdbserver_version): Likewise.
4858
4859 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
4860
4861         * lynx-low.c (lynx_wait_1): Add debug trace before adding
4862         new thread.
4863
4864 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
4865
4866         * lynx-low.c (ptrace_request_to_str): Add handling for
4867         PTRACE_GETTRACESIG.
4868
4869 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
4870
4871         * lynx-low.c (lynx_attach): Delete variable new_process.
4872
4873 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
4874
4875         * lynx-low.c (lynx_create_inferior): Delete variable
4876         new_process.
4877
4878 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
4879
4880         * lynx-low.c (ptrace_request_to_str): Do not handle
4881         PTRACE_GETTHREADLIST if this macro does not exist.
4882
4883 2012-12-15  Yao Qi  <yao@codesourcery.com>
4884
4885         * Makefile.in (OBS): Add notif.o.
4886         * notif.c, notif.h: New.
4887         * server.c: Include "notif.h".
4888         (struct vstop_notif) <next>: Remove.
4889         <base>: New field.
4890         (queue_stop_reply): Update.
4891         (push_event, send_next_stop_reply): Remove.
4892         (discard_queued_stop_replies): Update.
4893         (notif_stop): New variable.
4894         (handle_v_stopped): Remove.
4895         (handle_v_requests): Don't call handle_v_stopped.  Call
4896         handle_ack_notif instead.
4897         (queue_stop_reply_callback): Call notif_event_enque instead
4898         of queue_stop_reply.
4899         (handle_status): Don't call send_next_stop_reply, call
4900         notif_write_event instead.
4901         (kill_inferior_callback): Likewise.
4902         (detach_or_kill_inferior_callback): Likewise.
4903         (main): Call initialize_notif.
4904         (process_serial_event): Call QUEUE_is_empty.
4905         (handle_target_event): Call notif_push instead of push event.
4906         * server.h (push_event): Remove declaration.
4907
4908 2012-12-10  Tom Tromey  <tromey@redhat.com>
4909
4910         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4911         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4912         macros.
4913         (.c.o): Rewrite.
4914         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4915         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4916         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4917         (amd64-linux-ipa.o, ax.o): Rewrite.
4918         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4919         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4920         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4921         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4922         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4923         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4924         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4925         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4926         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4927         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4928         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4929         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4930         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4931         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4932         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4933         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4934         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4935         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4936         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4937         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4938         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4939         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4940         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4941         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4942         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4943         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4944         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4945         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4946         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4947         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4948         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4949         (reg-tilegx.o): Remove.
4950         (all_object_files): New macro.
4951         Include .deps files.
4952         * aclocal.m4, configure: Rebuild.
4953         * acinclude.m4: Include depstand.m4, lead-dot.m4.
4954         * configure.ac: Invoke ZW_CREATE_DEPDIR,
4955         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
4956
4957 2012-12-05  Tom Tromey  <tromey@redhat.com>
4958
4959         PR gdb/14917:
4960         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4961
4962 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
4963
4964         * configure.ac: Check for linux/perf_event.h.
4965         * config.in: Regenerated.
4966         * configure: Regenerated.
4967
4968 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
4969
4970         * hostio.c (handle_readlink): Decrease buffer size
4971         parameter passed to readlink by one byte.
4972
4973 2012-11-26  Yao Qi  <yao@codesourcery.com>
4974
4975         * configure.ac (build_warnings): Append '-Wempty-body'.
4976         * configure: Regenerated.
4977         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4978         body.
4979
4980 2012-11-15  Pierre Muller  <muller@sourceware.org>
4981
4982         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4983         * config.in: Regenerate.
4984         * configure: Regenerate.
4985         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4986         Use "gdb_wait.h" header instead of <sys/wait.h> header.
4987         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4988         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4989         header.
4990         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
4991         instead of <sys/wait.h> header.
4992         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4993
4994 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
4995
4996         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4997         (various make rules): Remove -DGDBSERVER
4998
4999 2012-11-09  Yao Qi  <yao@codesourcery.com>
5000
5001         * spu-low.c (current_ptid): Move it to ..
5002         * gdbthread.h: ... here.  New.
5003         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5004         * server.c (myresume, process_serial_event): Likewise.
5005         * thread-db.c (thread_db_find_new_threads): Likewise.
5006         * tracepoint.c (run_inferior_command): Likewise.
5007
5008 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
5009
5010         * server.c (handle_search_memory_1): Include access length in
5011         warning message.
5012
5013 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
5014
5015         * linux-crisv32-low.c: Fix compile errors.
5016
5017 2012-09-04  Yao Qi  <yao@codesourcery.com>
5018
5019         * tracepoint.c (cmd_qtsv): Adjust debug message.
5020         Don't check CUR_TPOINT.
5021
5022 2012-08-28  Yao Qi  <yao@codesourcery.com>
5023
5024         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5025         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5026         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5027         Remove declarations of xmalloc, xreallloc, xstrdup and
5028         freeargv.
5029         * Makefile.in (libiberty_h): New.
5030         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5031         (linux-bfin-low.o): Append dependency 'libiberty.h'.
5032
5033 2012-08-23  Yao Qi  <yao@codesourcery.com>
5034
5035         * server.h: Remove declaration of 'xsnprintf'.
5036
5037 2012-08-22  Keith Seitz  <keiths@redhat.com>
5038
5039         * server.h: Include build-gnulib-gbserver/config.h.
5040         * gdbreplay.c: Likewise.
5041
5042 2012-08-08  Doug Evans  <dje@google.com>
5043
5044         * Makefile.in (SFILES): Add gdb_vecs.c.
5045         (OBS): Add gdb_vecs.o.
5046         (gdb_vecs_h, host_defs_h): New variables.
5047         (thread-db.o): Add $(gdb_vecs_h) dependency.
5048         (gdb_vecs.o): New rule.
5049         * thread-db.c: #include "gdb_vecs.h".
5050         (thread_db_load_search): Use a vector to iterate over path elements.
5051         Handle text appearing after "$pdir".
5052
5053         * configure.ac: Add check for strstr.
5054         * config.in: Regenerate.
5055         * configure: Regenerate.
5056
5057 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
5058
5059         * hostio.c (handle_pread): If pread fails, fall back to attempting
5060         lseek/read.
5061         (handle_pwrite): Likewise for pwrite.
5062
5063 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
5064
5065         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5066         between unsupported TYPE and unimplementable ADDR/LEN combination.
5067         (arm_insert_point): Act on new return value.
5068
5069 2012-07-31  Pedro Alves  <palves@redhat.com>
5070
5071         * server.c (process_point_options): Only skip tokens if we find
5072         one that is unrecognized.  Don't treat 'X' specially while
5073         skipping unrecognized tokens.
5074
5075 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
5076
5077         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5078         to 4-byte-align HW breakpoint addresses for Thumb.
5079
5080 2012-07-27  Yao Qi  <yao@codesourcery.com>
5081
5082         PR remote/14161.
5083
5084         * server.h: Declare gdb_agent_about_to_close.
5085         * target.c (kill_inferior): Include "agent.h".
5086         New.  Send command 'kill'.
5087         * target.h (kill_inferior): Removed macro.
5088         * tracepoint.c (gdb_agent_about_to_close): New.
5089         (gdb_agent_helper_thread): Handle command 'close'.
5090         Wait endlessly until the inferior stops.
5091         Install gdb_agent_remove_socket to atexit hook.
5092         (agent_socket_name): New static variable.
5093         (gdb_agent_socket_init): Replace local variable 'name' with
5094         'agent_socket_name'.
5095         (gdb_agent_remove_socket): New.
5096
5097 2012-07-27  Yao Qi  <yao@codesourcery.com>
5098
5099         * server.c (process_point_options): Stop at 'X' when parsing.
5100
5101 2012-07-19  Michael Eager  <eager@eagercon.com>
5102
5103         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5104         to hw_execute.
5105         * linux-x86-low.c (x86_insert_point, x86_remove_point):
5106         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5107         hardware breakpoint.
5108
5109 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5110
5111         * gdbserver/linux-low.c (initialize_low): Call
5112         linux_ptrace_init_warnings.
5113
5114 2012-07-02  Doug Evans  <dje@google.com>
5115
5116         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5117         pointer to int.
5118
5119 2012-07-02  Stan Shebs  <stan@codesourcery.com>
5120
5121         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5122         (ax.o): Add it to build rule.
5123         (ax-ipa.o): Ditto.
5124         (OBS): Add format.o.
5125         (IPA_OBS): Add format.o.
5126         * server.c (handle_query): Claim support for breakpoint commands.
5127         (process_point_options): Add command case.
5128         (process_serial_event): Leave running if there are printfs in
5129         effect.
5130         * mem-break.h (any_persistent_commands): Declare.
5131         (add_breakpoint_commands): Declare.
5132         (gdb_no_commands_at_breakpoint): Declare.
5133         (run_breakpoint_commands): Declare.
5134         * mem-break.c (struct point_command_list): New struct.
5135         (struct breakpoint): New field command_list.
5136         (any_persistent_commands): New function.
5137         (add_commands_to_breakpoint): New function.
5138         (add_breakpoint_commands): New function.
5139         (gdb_no_commands_at_breakpoint): New function.
5140         (run_breakpoint_commands): New function.
5141         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5142         locally.
5143         * ax.c: Include format.h.
5144         (ax_printf): New function.
5145         (gdb_eval_agent_expr): Add printf opcode.
5146
5147 2012-06-13  Yao Qi  <yao@codesourcery.com>
5148
5149         * server.c (start_inferior): Remove duplicated writes to fields
5150         'last_resume_kind' and 'last_status' of 'current_inferior'.
5151
5152 2012-06-12  Yao Qi  <yao@codesourcery.com>
5153             Pedro Alves  <palves@redhat.com>
5154
5155         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
5156         comment.
5157         * server.c (handle_v_cont): Extend comment.
5158
5159 2012-06-11  Yao Qi  <yao@codesourcery.com>
5160
5161         * linux-low.c (linux_attach): Add 'static'.
5162
5163 2012-06-06  Yao Qi  <yao@codesourcery.com>
5164
5165         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5166
5167 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5168
5169         Fix gcc -flto compilation warning.
5170         * server.c (main): Make variable multi_mode and attach volatile.
5171
5172 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
5173
5174         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5175         if the platform doesn't know about it.
5176
5177 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
5178
5179         * Makefile.in (SFILES): Add linux-tile-low.c.
5180         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5181         * configure.srv: Handle tilegx-*-linux*.
5182         * linux-tile-low.c: New file.
5183
5184 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
5185
5186         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5187
5188 2012-05-24  Pedro Alves  <palves@redhat.com>
5189
5190         PR gdb/7205
5191
5192         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5193
5194 2012-05-24  Pedro Alves  <palves@redhat.com>
5195
5196         PR gdb/7205
5197
5198         Replace target_signal with gdb_signal throughout.
5199
5200 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
5201
5202         * linux-low.c (linux_store_registers): Avoid the copying sequence
5203         when no data has been retrieved by ptrace.
5204
5205 2012-05-22  Will Deacon  <will.deacon@arm.com>
5206
5207         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5208         Include asm/ptrace.h.
5209         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5210         already defined.
5211
5212 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
5213
5214         * linux-low.c (linux_store_registers): Don't re-retrieve data
5215         with ptrace that has already been obtained from /proc.  Always
5216         copy any data retrieved with ptrace to the buffer supplied.
5217
5218 2012-05-11  Yao Qi  <yao@codesourcery.com>
5219             Pedro Alves  <palves@redhat.com>
5220
5221         * linux-low.c (enum stopping_threads_kind): New.
5222         (stopping_threads): Change type to `enum stopping_threads_kind'.
5223         (handle_extended_wait): If stopping and suspending threads, leave
5224         the new_lwp suspended too.
5225         (linux_wait_for_event): Adjust.
5226         (stop_all_lwps): Set `stopping_threads' to
5227         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5228         whether we're suspending threads or just stopping them.  Assert no
5229         recursion happens.
5230
5231 2012-04-29  Yao Qi  <yao@codesourcery.com>
5232
5233         * server.h: Move some code to ...
5234         * gdbthread.h: ... here.  New.
5235         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5236         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5237         (nto-low.o, win32-low.o): Likewise.
5238         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5239         * regcache.c, remote-utils.c, server.c: Likewise.
5240         * target.c, tracepoint.c, win32-low.c: Likewise.
5241
5242 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
5243
5244         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5245         (PTRACE_ARG4_TYPE): Likewise.
5246         (PTRACE_XFER_TYPE): Likewise.
5247         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5248         ptrace to PTRACE_ARG3_TYPE.
5249         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5250         (PTRACE_ARG4_TYPE): Likewise.
5251         (PTRACE_XFER_TYPE): Likewise.
5252         (linux_detach_one_lwp): Cast fourth argument of
5253         ptrace to long then PTRACE_ARG4_TYPE.
5254         (regsets_fetch_inferior_registers): Cast third argument of
5255         ptrace to long then PTRACE_ARG3_TYPE.
5256         (regsets_store_inferior_registers): Likewise.
5257
5258 2012-04-20  Pedro Alves  <palves@redhat.com>
5259
5260         * configure: Regenerate.
5261
5262 2012-04-19  Pedro Alves  <palves@redhat.com>
5263
5264         * Makefile.in (GNULIB_BUILDDIR): New.
5265         (LIBGNU, INCGNU, GNULIB_H): Adjust.
5266         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5267         (all, install-only, uninstall, clean-info, all-lib, clean): No
5268         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
5269         (maintainer-clean realclean distclean): Use subdir_do.
5270         (subdir_do): New.
5271         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
5272         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
5273         * acinclude.m4: Include acx_configure_dir.m4.
5274         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5275         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
5276         ACX_CONFIGURE_DIR.
5277         (GNULIB): New.
5278         (GNULIB_STDINT_H): Adjust.
5279         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5280         * gdbreplay.c: Include build-gnulib/config.h.
5281         * server.h: Likewise.
5282         * aclocal.m4: Regenerate.
5283         * config.in: Regenerate.
5284         * configure: Regenerate.
5285
5286 2012-04-19  Pedro Alves  <palves@redhat.com>
5287
5288         * Makefile.in (LIBGNU, INCGNU): Adjust.
5289         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5290         (all, install-only, uninstall, clean-info, all-lib, clean)
5291         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5292         * configure.ac: Adjust AC_OUTPUT output.
5293         * aclocal.m4: Regenerate.
5294         * configure: Regenerate.
5295
5296 2012-04-19  Pedro Alves  <palves@redhat.com>
5297
5298         * Makefile.in (generated_files): New.
5299         (server_h): Remove the explicit dependency on config.h, and depend
5300         on $generated_files.
5301
5302 2012-04-19  Pedro Alves  <palves@redhat.com>
5303
5304         * Makefile.in (INCGNU): Add -Ignulib.
5305
5306 2012-04-19  Pedro Alves  <palves@redhat.com>
5307
5308         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5309         (INCGNU): ... this, and spell out -I here.
5310         (GNULIB_LIB): Rename to ...
5311         (LIBGNU): ... this.
5312         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5313
5314 2012-04-19  Pedro Alves  <palves@redhat.com>
5315
5316         * config.in: Regenerate.
5317
5318 2012-04-19  Pedro Alves  <palves@redhat.com>
5319
5320         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5321         * server.h (memmem): Remove declaration.
5322         * config.in: Regenerate.
5323         * configure: Regenerate.
5324
5325 2012-04-19  Yao Qi  <yao@codesourcery.com>
5326
5327         * Makefile.in (SFILES): Add common/vec.c.
5328         (OBS): Add vec.o.
5329         (vec.o): New rule.
5330
5331 2012-04-19  Yao Qi  <yao@codesourcery.com>
5332
5333         * remote-utils.c (prepare_resume_reply): Replace with macro
5334         target_core_of_thread.
5335         * server.c (handle_qxfer_threads_proper): Likewise.
5336         * target.h (traget_core_of_thread): New macro.
5337
5338 2012-04-18  Pedro Alves  <palves@redhat.com>
5339
5340         * aclocal.m4: Regenerate.
5341         * configure: Regenerate.
5342
5343 2012-04-16  Yao Qi  <yao@codesourcery.com>
5344
5345         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5346         duplicated on address.
5347
5348 2012-04-16  Yao Qi  <yao@codesourcery.com>
5349
5350         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5351         (struct tracepoint_action_ops) <send>: New field.
5352         (m_tracepoint_action_send, r_tracepoint_action_send): New.
5353         (agent_expr_send, x_tracepoint_action_send): New.
5354         (l_tracepoint_action_send): New.
5355         (cmd_qtdp): Download and install tracepoint
5356         according to `use_agent'.
5357         (run_inferior_command): Add one more parameter `len'.
5358         Update callers.
5359         (tracepoint_send_agent): New.
5360         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5361
5362 2012-04-16  Yao Qi  <yao@codesourcery.com>
5363
5364         * tracepoint.c (download_tracepoints): Moved to ...
5365         (cmd_qtstart): ... here.
5366
5367 2012-04-14  Yao Qi  <yao@codesourcery.com>
5368
5369         * tracepoint.c: Include inttypes.h.
5370         (struct collect_memory_action): Use sized types.
5371         (struct tracepoint): Likewise.
5372         (cmd_qtdp, stop_tracing): Update print specifiers.
5373         (cmd_qtp, response_tracepoint): Likewise.
5374         (collect_data_at_tracepoint): Likewise.
5375         (collect_data_at_step): Likewise.
5376
5377 2012-04-14  Yao Qi  <yao@codesourcery.com>
5378
5379         Import gnulib module inttypes.
5380         * aclocal.m4, config.in, configure: Regenerated.
5381
5382 2012-04-14  Yao Qi  <yao@codesourcery.com>
5383
5384         * Makefile.in (maintainer-clean, realclean, distclean): Remove
5385         Makefile and config.status at last.
5386
5387 2012-04-13  Yao Qi  <yao@codesourcery.com>
5388
5389         * tracepoint.c: Include stdint.h unconditionally.
5390
5391 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
5392
5393         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5394         on BFD_HAVE_SYS_PROCFS_TYPE.
5395         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5396         * configure: Regenerate.
5397         * config.in: Likewise.
5398
5399 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
5400
5401         * Makefile.in (clean): Also remove x32.c x32-linux.c
5402         x32-avx.c x32-avx-linux.c.
5403         (x32.o): New target.
5404         (x32.c): Likewise.
5405         (x32-linux.o): Likewise.
5406         (x32-linux.c): Likewise.
5407         (x32-avx.o): Likewise.
5408         (x32-avx.c): Likewise.
5409         (x32-avx-linux.o): Likewise.
5410         (x32-avx-linux.c): Likewise.
5411
5412         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5413         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5414         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5415         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5416         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5417         i386/x32-avx-linux.xml.
5418
5419         * linux-x86-low.c (init_registers_x32_linux): New prototype.
5420         (init_registers_x32_avx_linux): Likwise.
5421         (x86_linux_update_xmltarget): Call init_registers_x32_linux
5422         or init_registers_x32_avx_linux if linux_is_elf64 is false.
5423
5424 2012-04-13  Pedro Alves  <palves@redhat.com>
5425
5426         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5427         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5428         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5429         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5430         the sub-make.
5431
5432 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
5433
5434         * linux-x86-low.c (compat_x32_clock_t): New.
5435         (compat_x32_siginfo_t): Likewise.
5436         (compat_x32_siginfo_from_siginfo): Likewise.
5437         (siginfo_from_compat_x32_siginfo): Likewise.
5438         (linux_is_elf64): Likewise.
5439         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5440         and siginfo_from_compat_x32_siginfo for x32.
5441         (x86_arch_setup): Set linux_is_elf64.
5442
5443 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
5444
5445         PR gdb/13969
5446         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5447         e_machine field.
5448         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5449         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5450         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5451         compatible with process.
5452
5453 2012-04-12  Yao Qi  <yao@codesourcery.com>
5454
5455         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5456         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5457         (install-only, install-info, clean): Handle sub dir gnulib.
5458         (all-lib, am--refresh): New targets.
5459         (memmem.o): Remove target.
5460         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5461         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
5462         (AC_REPLACE_FUNCS): Remove memmem.
5463         Invoke gl_INIT and AM_INIT_AUTOMAKE.
5464         (AC_OUTPUT): Generate Makefile in gnulib/.
5465         * aclocal.m4, config.in, configure: Regenerated.
5466
5467 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
5468
5469         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5470
5471 2012-04-05  Pedro Alves  <palves@redhat.com>
5472
5473         -Werror=strict-aliasing
5474
5475         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5476         pointer.
5477
5478 2012-04-04  Pedro Alves  <palves@redhat.com>
5479
5480         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5481         (sparc_store_gregset_from_stack, sparc_store_gregset)
5482         (sparc_breakpoint_at): Fix formatting.
5483
5484 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
5485
5486         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5487         are available.
5488         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5489         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5490         * config.in: Regenerate.
5491         * configure: Likewise.
5492
5493 2012-03-29  Pedro Alves  <palves@redhat.com>
5494
5495         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5496         Correct ptrace arguments.
5497
5498 2012-03-28  Pedro Alves  <palves@redhat.com>
5499
5500         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5501         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5502         (IA64_FR1_REGNUM): New defines.
5503         (ia64_fetch_register): New.
5504         (the_low_target): Install it.
5505         * linux-low.h (struct linux_target_ops) <fetch_register>: New
5506         field.
5507         * linux-low.c (linux_fetch_registers): Try the
5508         the_low_target.fetch_register hook first.
5509
5510         * linux-arm-low.c (the_low_target): Adjust.
5511         * linux-bfin-low.c (the_low_target): Adjust.
5512         * linux-cris-low.c (the_low_target): Adjust.
5513         * linux-crisv32-low.c (the_low_target): Adjust.
5514         * linux-m32r-low.c (the_low_target): Adjust.
5515         * linux-m68k-low.c (the_low_target): Adjust.
5516         * linux-mips-low.c (the_low_target): Adjust.
5517         * linux-ppc-low.c (the_low_target): Adjust.
5518         * linux-s390-low.c (the_low_target): Adjust.
5519         * linux-sh-low.c (the_low_target): Adjust.
5520         * linux-sparc-low.c (the_low_target): Adjust.
5521         * linux-tic6x-low.c (the_low_target): Adjust.
5522         * linux-x86-low.c (the_low_target): Adjust.
5523         * linux-xtensa-low.c (the_low_target): Adjust.
5524
5525 2012-03-26  Pedro Alves  <palves@redhat.com>
5526
5527         * server.c (handle_qxfer_libraries): Don't bail early if
5528         the_target->qxfer_libraries_svr4 is not NULL.
5529
5530 2012-03-26  Pedro Alves  <palves@redhat.com>
5531
5532         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5533
5534 2012-03-23  Pedro Alves  <palves@redhat.com>
5535
5536         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5537         "library-list-svr4" element's start tag when the the DSO list is
5538         empty.
5539
5540 2012-03-23  Pedro Alves  <palves@redhat.com>
5541
5542         * linux-low.c (read_one_ptr): Read the inferior's pointer through
5543         a variable whose type size is the same as the inferior's pointer
5544         size.
5545
5546 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
5547
5548         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5549         struct siginfo.
5550         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5551         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5552         * linux-low.h: Include <signal.h>.
5553         (struct siginfo): Remove forward declaration.
5554         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5555         struct siginfo.
5556
5557 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
5558
5559         * .gitignore: Ignore more files.
5560
5561 2012-03-19  Pedro Alves  <palves@redhat.com>
5562             Jan Kratochvil  <jan.kratochvil@redhat.com>
5563
5564         * server.c (cont_thread, general_thread): Add describing comments.
5565         (start_inferior): Clear `cont_thread'.
5566         (handle_v_cont): Don't set `cont_thread' if resuming all threads
5567         of a process.
5568
5569 2012-03-15  Yao Qi  <yao@codesourcery.com>
5570
5571         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5572         handling to ...
5573         (cmd_qtdp): ... here.
5574
5575 2012-03-15  Yao Qi  <yao@codesourcery.com>
5576
5577         * tracepoint.c (struct tracepoint_action_ops): New.
5578         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5579         (m_tracepoint_action_download): New.
5580         (r_tracepoint_action_download): New.
5581         (x_tracepoint_action_download): New.
5582         (l_tracepoint_action_download): New.
5583         (add_tracepoint_action): Install `action->ops' according type.
5584         (download_tracepoint_1): Move code `download' function pointer
5585         of various tracepoint_action_ops.
5586
5587 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
5588
5589         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
5590         linux_ptrace_attach_warnings.
5591
5592 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
5593
5594         * Makefile.in (linux-ptrace.o): New.
5595         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5596         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5597         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5598         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5599         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5600         of these targets.
5601         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5602
5603 2012-03-08  Yao Qi  <yao@codesourcery.com>
5604             Pedro Alves  <palves@redhat.com>
5605
5606         Fix PR server/13392.
5607         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5608         offset of JMP insn.
5609         * tracepoint.c (remove_tracepoint): New.
5610         (cmd_qtdp): Call remove_tracepoint when failed to install.
5611
5612 2012-03-07  Pedro Alves  <palves@redhat.com>
5613
5614         * linux-low.c (get_detach_signal): New.
5615         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5616         Pass on pending signals to PTRACE_DETACH.  Check the result of the
5617         ptrace call.
5618         * server.c (program_signals, program_signals_p): New.
5619         (handle_general_set): Handle QProgramSignals.
5620         * server.h (program_signals, program_signals_p): Declare.
5621
5622 2012-03-05  Pedro Alves  <palves@redhat.com>
5623             Jan Kratochvil  <jan.kratochvil@redhat.com>
5624
5625         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5626         New comment why.
5627
5628 2012-03-03  Yao Qi  <yao@codesourcery.com>
5629
5630         * tracepoint.c (tracepoint_look_up_symbols): Update call to
5631         agent_look_up_symbols.
5632
5633 2012-03-03  Yao Qi  <yao@codesourcery.com>
5634
5635         * Makefile.in (linux-low.o): Keep dependence on agent.h.
5636         (linux-x86-low.o): Likewise.
5637         * server.h: Remove in_process_agent_loaded.
5638         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
5639         common/agent.c.
5640         Update callers.
5641
5642 2012-03-03  Yao Qi  <yao@codesourcery.com>
5643
5644         * tracepoint.c (gdb_agent_capability): New global.
5645         (in_process_agent_loaded_ust): Renamed to
5646         `in_process_agent_supports_ust'.
5647         Update callers.
5648         (in_process_agent_supports_ust): Call agent_capability_check.
5649         (clear_installed_tracepoints): Assert that agent supports
5650         agent.
5651
5652 2012-03-03  Yao Qi  <yao@codesourcery.com>
5653
5654         * linux-low.c (linux_supports_agent): New.
5655         (linux_target_ops): Initialize field `supports_agent' with
5656         linux_supports_agent.
5657         * target.h (struct target_ops) <supports_agent>: New.
5658         (target_supports_agent): New macro.
5659         * server.c (handle_general_set): Handle packet 'QAgent'.
5660         (handle_query): Send `QAgent+'.
5661         * Makefile.in (server.o): Depends on agent.h.
5662
5663 2012-03-03  Yao Qi  <yao@codesourcery.com>
5664
5665         * Makefile.in (OBS): Add agent.o.
5666         Add new rule for agent.o.
5667         Track dependence of tracepoint.c on agent.h.
5668         * tracepoint.c (run_inferior_command_1):
5669         (run_inferior_command): Call agent_run_command.
5670         (gdb_ust_connect_sync_socket): Deleted.  Move it to
5671         common/agent.c.
5672         (resume_thread, stop_thread): Likewise.
5673         (gdb_ust_socket_init): Renamed to ...
5674         (gdb_agent_socket_init): ... New.
5675         (gdb_ust_thread): Renamed to ...
5676         (gdb_agent_helper_thread): ... New.
5677         (gdb_ust_init): Move some code to ...
5678         (gdb_agent_init): ... here.  New.
5679         [HAVE_UST]: Call gdb_ust_init.
5680         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
5681         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5682         * config.in, configure: Regenerated.
5683
5684 2012-03-02  Pedro Alves  <palves@redhat.com>
5685
5686         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5687         * linux-low.c (struct simple_pid_list): New.
5688         (stopped_pids): New a struct simple_pid_list pointer.
5689         (add_to_pid_list, pull_pid_from_list): New.
5690         (handle_extended_wait): Don't assume the first signal new children
5691         report is SIGSTOP.  Adjust call to pull_pid_from_list.
5692         (linux_wait_for_lwp): Adjust.
5693
5694 2012-03-02  Yao Qi  <yao@codesourcery.com>
5695
5696         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5697         debug log.
5698
5699 2012-03-02  Yao Qi  <yao@codesourcery.com>
5700
5701         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5702         `stop_pc' and `tpoint'.  Update caller.
5703
5704 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
5705
5706         * linux-low.h (linux_target_ops): Add regset_bitmap member.
5707         * linux-low.c (use_linux_regsets): New macro.
5708         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5709         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5710         (linux_register_in_regsets): New function.
5711         (usr_fetch_inferior_registers): Skip registers covered by
5712         regsets.
5713         (usr_store_inferior_registers): Likewise.
5714         (usr_fetch_inferior_registers): New macro.
5715         (usr_store_inferior_registers): Likewise.
5716         (linux_fetch_registers): Handle mixed regset/non-regset targets.
5717         (linux_store_registers): Likewise.
5718         * linux-mips-low.c (init_registers_mips_dsp_linux): New
5719         prototype.
5720         (init_registers_mips64_dsp_linux): Likewise.
5721         (init_registers_mips_linux): New macro.
5722         (init_registers_mips_dsp_linux): Likewise.
5723         (mips_dsp_num_regs): Likewise.
5724         (DSP_BASE, DSP_CONTROL): New fallback macros.
5725         (mips_base_regs): New macro.
5726         (mips_regmap): Use it.  Fix the size.
5727         (mips_dsp_regmap): New variable.
5728         (mips_dsp_regset_bitmap): Likewise.
5729         (mips_arch_setup): New function.
5730         (mips_cannot_fetch_register): Use the_low_target.regmap rather
5731         than mips_regmap.
5732         (mips_cannot_store_register): Likewise.
5733         (the_low_target): Update .arch_setup, .num_regs and .regmap
5734         initializers.  Add .regset_bitmap initializer.
5735         * linux-arm-low.c (the_low_target): Add .regset_bitmap
5736         initializer.
5737         * linux-bfin-low.c (the_low_target): Likewise.
5738         * linux-cris-low.c (the_low_target): Likewise.
5739         * linux-crisv32-low.c (the_low_target): Likewise.
5740         * linux-ia64-low.c (the_low_target): Likewise.
5741         * linux-m32r-low.c (the_low_target): Likewise.
5742         * linux-m68k-low.c (the_low_target): Likewise.
5743         * linux-ppc-low.c (the_low_target): Likewise.
5744         * linux-s390-low.c (the_low_target): Likewise.
5745         * linux-sh-low.c (the_low_target): Likewise.
5746         * linux-sparc-low.c (the_low_target): Likewise.
5747         * linux-tic6x-low.c (the_low_target): Likewise.
5748         * linux-x86-low.c (the_low_target): Likewise.
5749         * linux-xtensa-low.c (the_low_target): Likewise.
5750         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5751         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
5752         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5753         srv_xmlfiles.
5754         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5755         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5756
5757 2012-02-29  Yao Qi  <yao@codesourcery.com>
5758             Pedro Alves  <palves@redhat.com>
5759
5760         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5761         `step_over_finished' is true.
5762
5763 2012-02-27  Pedro Alves  <palves@redhat.com>
5764
5765         * linux-low.c (pid_is_stopped): Delete, moved to common/.
5766         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5767
5768 2012-02-27  Pedro Alves  <palves@redhat.com>
5769
5770         PR server/9684
5771         * linux-low.c (pid_is_stopped): New.
5772         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5773
5774 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
5775
5776         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5777         of conditions.
5778
5779 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
5780
5781         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5782
5783 2012-02-24  Luis Machado  <lgustavo@codesourcery>
5784
5785         * server.c (handle_query): Advertise support for target-side
5786         breakpoint condition evaluation.
5787         (process_point_options): New function.
5788         (process_serial_event): When inserting a breakpoint, check for
5789         a target-side condition that should be evaluated.
5790
5791         * mem-break.c: Include regcache.h and ax.h.
5792         (point_cond_list_t): New data structure.
5793         (breakpoint) <cond_list>: New field.
5794         (find_gdb_breakpoint_at): Make non-static.
5795         (delete_gdb_breakpoint_at): Clear any target-side
5796         conditions.
5797         (clear_gdb_breakpoint_conditions): New function.
5798         (add_condition_to_breakpoint): Likewise.
5799         (add_breakpoint_condition): Likewise.
5800         (gdb_condition_true_at_breakpoint): Likewise.
5801         (gdb_breakpoint_here): Return result directly instead
5802         of going through a local variable.
5803
5804         * mem-break.h (find_gdb_breakpoint_at): New prototype.
5805         (clear_gdb_breakpoint_conditions): Likewise.
5806         (add_breakpoint_condition): Likewise.
5807         (gdb_condition_true_at_breakpoint): Likewise.
5808
5809         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5810         (need_step_over_p): Take target-side breakpoint condition into
5811         consideration.
5812
5813 2012-02-24  Luis Machado  <lgustavo@codesourcery>
5814
5815         * server.h: Include tracepoint.h.
5816         (agent_mem_read, agent_get_trace_state_variable_value,
5817         agent_set_trace_state_variable_value,
5818         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5819         get_set_tsv_func_addr): New prototypes.
5820
5821         * ax.h: New include file.
5822         * ax.c: New source file.
5823
5824         * tracepoint.c: Include ax.h.
5825         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5826         agent_expr, eval_result_type): Move to ax.h.
5827         (parse_agent_expr): Rename to ...
5828         (gdb_parse_agent_expr): ... this, make it non-static and move
5829         to ax.h.
5830         (unparse_agent_expr) Rename to ...
5831         (gdb_unparse_agent_expr): ... this, make it non-static and move
5832         to ax.h.
5833         (eval_agent_expr): Rename to ...
5834         (eval_tracepoint_agent_expr): ... this.
5835         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5836         forward declarations.
5837         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5838         (agent_get_trace_state_variable_value): New function.
5839         (agent_set_trace_state_variable_value): New function.
5840         (cmd_qtdp): Call gdb_parse_agent_expr (...).
5841         (response_tracepoint): Call gdb_unparse_agent_expr (...).
5842         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5843         (condition_true_at_tracepoint): Likewise.
5844         (parse_agent_expr): Rename to ...
5845         (gdb_parse_agent_expr): ... this and move to ax.c.
5846         (unparse_agent_expr): Rename to ...
5847         (gdb_unparse_agent_expr): ... this and move to ax.c.
5848         (gdb_agent_op_name): Move to ax.c.
5849         (eval_agent_expr): Rename to ...
5850         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5851         and move to ax.c.
5852         (eval_tracepoint_agent_expr): New function.
5853         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5854         non-static.
5855         (current_insn_ptr, emit_error, struct bytecode_address): Move to
5856         ax.c.
5857         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5858         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5859         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5860         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5861         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5862         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5863         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5864         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5865         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5866         (compile_bytecodes): Remove forward declaration.
5867         (is_goto_target): Move to ax.c.
5868         (compile_bytecodes): Move to ax.c and call
5869         agent_get_trace_state_variable_value (...) and
5870         agent_set_trace_state_variable_value (...).
5871
5872         * Makefile.in: Update ax.c and IPA dependencies.
5873
5874 2012-02-24  Pedro Alves  <palves@redhat.com>
5875
5876         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5877         (cmd_bigqtbuffer_circular): ... this.  Only handle
5878         'QTBuffer:circular:'.
5879         (handle_tracepoint_general_set): Adjust.
5880
5881 2012-02-16  Yao Qi  <yao@codesourcery.com>
5882
5883         * inferiors.c: Move code to ...
5884         * dll.c: .... here.  New.
5885         * server.h: Declare clear_dlls.
5886         * Makefile.in (SFILES): Add dll.c.
5887         (OBS): Add dll.o
5888         (dll.o): New rule.
5889
5890 2012-02-11  Yao Qi  <yao@codesourcery.com>
5891
5892         * server.c: (handle_monitor_command): Add a new parameter
5893         `own_buf'.
5894         (handle_query): Update caller.
5895
5896 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
5897
5898         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5899         * configure, config.in: Regenerate.
5900         * hostio.c: Provide an alternate implementation if HAVE_READLINK
5901         is not defined.
5902
5903 2012-02-02  Pedro Alves  <palves@redhat.com>
5904
5905         Try SIGKILL first, then PTRACE_KILL.
5906         * linux-low.c (linux_kill_one_lwp): New.
5907         (linux_kill_one_lwp): Rename to ...
5908         (kill_one_lwp_callback): ... this.  Use the new
5909         linux_kill_one_lwp.
5910
5911 2012-02-02  Pedro Alves  <palves@redhat.com>
5912
5913         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5914         inferior.
5915
5916 2012-01-27  Pedro Alves  <palves@redhat.com>
5917
5918         * linux-low.c (linux_child_pid_to_exec_file): Delete.
5919         (elf_64_file_p): Make static.
5920         (linux_pid_exe_is_elf_64_file): New.
5921         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5922         Delete declarations.
5923         (linux_pid_exe_is_elf_64_file): Declare.
5924         * linux-x86-low.c (x86_arch_setup): Use
5925         linux_pid_exe_is_elf_64_file.
5926
5927 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
5928
5929         * linux-low.c (linux_wait_for_event_1): Rename to ...
5930         (linux_wait_for_event): ... here and merge it with former
5931         linux_wait_for_event - new variable wait_ptid, use it.
5932         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5933
5934 2012-01-23  Pedro Alves  <palves@redhat.com>
5935
5936         * server.c (main): Avoid yet another case of infinite loop while
5937         detaching/killing after a longjmp.
5938
5939 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
5940
5941         Code cleanup.
5942         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5943
5944 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
5945
5946         * hostio.c (handle_readlink): New function.
5947         (handle_vFile): Call it to handle "vFile:readlink" packets.
5948
5949 2012-01-20  Pedro Alves  <palves@redhat.com>
5950             Ulrich Weigand  <ulrich.weigand@linaro.org>
5951
5952         * server.c (handle_v_requests): Only support vAttach and vRun to
5953         start multiple processes when in extended protocol mode.
5954
5955 2012-01-17  Pedro Alves  <palves@redhat.com>
5956
5957         * tracepoint.c (initialize_tracepoint): Use mmap instead of
5958         memalign plus mprotect to allocate the scratch buffer.
5959
5960 2012-01-13  Pedro Alves  <palves@redhat.com>
5961
5962         * server.c (attach_inferior): Clear `cont_thread'.
5963
5964 2012-01-13  Pedro Alves  <palves@redhat.com>
5965
5966         * server.c (main): Avoid infinite loop while detaching/killing
5967         after a longjmp.
5968
5969 2012-01-09  Doug Evans  <dje@google.com>
5970
5971         * server.c (start_inferior): Set last_ptid in --wrapper case.
5972
5973 2012-01-06  Yao Qi  <yao@codesourcery.com>
5974
5975         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5976         defined.
5977         [IN_PROCESS_AGENT] (debug_agent): New global variable.
5978
5979 2012-01-04  Yao Qi  <yao@codesourcery.com>
5980
5981         * tracepoint.c (cmd_qtdp): Print debug message
5982         for static tracepoint.
5983
5984 2012-01-04  Yao Qi  <yao@codesourcery.com>
5985
5986         * tracepoint.c (trace_vdebug): Differentiate debug message
5987         between gdbserver and IPA.
5988
5989 2012-01-03  Yao Qi  <yao@codesourcery.com>
5990
5991         * tracepoint.c (tracepoint_was_hit): Don't collect for
5992         static tracepoint.
5993
5994 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
5995
5996         * terminal.h: Reformat copyright header.
5997
5998 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
5999
6000         * server.c (gdbserver_version): Update copyright year.
6001         * gdbreplay.c (gdbreplay_version): Likewise.
6002
6003 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
6004
6005         * linux-low.c (linux_create_inferior): Put empty if clause for write.
6006
6007         Revert:
6008         2011-12-18  Hui Zhu  <teawater@gmail.com>
6009         * linux-low.c (linux_create_inferior): Save return value to ret.
6010
6011 2011-12-18  Hui Zhu  <teawater@gmail.com>
6012
6013         * linux-low.c (linux_create_inferior): Save return value to ret.
6014
6015 2011-12-16  Doug Evans  <dje@google.com>
6016
6017         * linux-low.c (linux_create_inferior): If stdio connection,
6018         redirect stdin from /dev/null, stdout to stderr.
6019         * remote-utils.c (remote_is_stdio): New static global.
6020         (remote_connection_is_stdio): New function.
6021         (remote_prepare): Handle stdio connection.
6022         (remote_open): Ditto.
6023         (remote_close): Don't close stdin for stdio connections.
6024         (read_prim,write_prim): New functions.  Replace all calls to
6025         read/write to these.
6026         * server.c (main): Watch for "-" argument.  Move call to
6027         remote_prepare before start_inferior.
6028         * server.h (STDIO_CONNECTION_NAME): New macro.
6029         (remote_connection_is_stdio): Declare.
6030
6031         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6032         in debugging output.
6033
6034 2011-12-15  Yao Qi  <yao@codesourcery.com>
6035
6036         * tracepoint.c: Include sys/syscall.h.
6037         (gdb_ust_thread): Remove preprocessor conditional.
6038
6039 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
6040
6041         * linux-low.c (linux_detach_one_lwp): Call
6042         the_low_target.prepare_to_resume before detaching.
6043
6044 2011-12-14  Yao Qi  <yao@codesourcery.com>
6045
6046         * tracepoint.c (gdb_ust_thread): Don't ignore return value
6047         of write.
6048
6049 2011-12-14  Yao Qi  <yao@codesourcery.com>
6050
6051         * i386-low.c (i386_low_stopped_data_address): Initialize local
6052         variable `control'.
6053
6054 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
6055
6056         PR remote/13492
6057
6058         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6059         DR_CONTROL unless necessary.  Extend comments.
6060         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6061         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
6062
6063 2011-12-13  Yao Qi  <yao@codesourcery.com>
6064
6065         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6066         macros.
6067         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6068
6069 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
6070
6071         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6072         Print new debug message for such case.
6073
6074 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6075
6076         Fix overlapping memcpy.
6077         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
6078         the read_inferior_memory transfer.
6079         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
6080         write_inferior_memory transfer.
6081         (set_fast_tracepoint_jump): New variable buf.  Use it for the
6082         read_inferior_memory and write_inferior_memory transfers.
6083         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6084         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6085         Use it for the write_inferior_memory transfer.
6086         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6087         buffers.
6088
6089 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6090
6091         * linux-low.c (fetch_register, store_register): Make code
6092         consistent, fix formatting.
6093
6094 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6095
6096         * linux-low.c (usr_store_inferior_registers): Factor out code
6097         to handle individual registers into...
6098         (store_register): ... this new function.
6099
6100 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
6101
6102         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6103         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6104         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6105         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6106         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6107         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6108         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6109         (srv_xmlfiles): Add new XML files.
6110
6111         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6112         and <sys/uio.h>.
6113         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6114         (init_registers_s390_linux32v1): Add prototype.
6115         (init_registers_s390_linux32v2): Likewise.
6116         (init_registers_s390_linux64v1): Likewise.
6117         (init_registers_s390_linux64v2): Likewise.
6118         (init_registers_s390x_linux64v1): Likewise.
6119         (init_registers_s390x_linux64v2): Likewise.
6120         (s390_num_regs): Increment to 52.
6121         (s390_regmap): Add orig_r2 register.
6122         (s390_num_regs_3264): Increment to 68.
6123         (s390_regmap_3264): Add orig_r2 register.
6124         (s390_collect_ptrace_register): Handle orig_r2 register.
6125         (s390_supply_ptrace_register): Likewise.
6126         (s390_fill_last_break): New function.
6127         (s390_store_last_break): Likewise.
6128         (s390_fill_system_call): New function.
6129         (s390_store_system_call): Likewise.
6130         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6131         register sets.
6132         (s390_check_regset): New function.
6133         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6134         NT_S390_SYSTEM_CALL regsets and use appropriate description.
6135         Update target_regsets for available register sets.
6136
6137 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
6138             Jan Kratochvil  <jan.kratochvil@redhat.com>
6139
6140         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6141         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6142         New.
6143         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6144         * linux-low.h (struct process_info_private): New member r_debug.
6145         * server.c (handle_qxfer_libraries): Call
6146         the_target->qxfer_libraries_svr4.
6147         (handle_qxfer_libraries_svr4): New function.
6148         (qxfer_packets): New entry "libraries-svr4".
6149         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6150         * target.h (struct target_ops): New member qxfer_libraries_svr4.
6151         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6152         PACKET_qXfer_libraries_svr4.
6153
6154 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
6155
6156         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6157         PSW address/mask between 8-byte and 16-byte formats.
6158         (s390_supply_ptrace_register): Likewise.
6159         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6160         basic addressing mode bit.
6161
6162 2011-11-24  Stan Shebs  <stan@codesourcery.com>
6163
6164         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6165
6166 2011-11-17  Stan Shebs  <stan@codesourcery.com>
6167
6168         * tracepoint.c (struct tracepoint): New field traceframe_usage.
6169         (tracing_start_time): New global.
6170         (tracing_stop_time): New global.
6171         (tracing_user_name): New global.
6172         (tracing_notes): New global.
6173         (tracing_stop_note): New global.
6174         (cmd_qtstart): Set traceframe_usage, start_time.
6175         (stop_tracing): Set stop_time.
6176         (cmd_qtstatus): Report additional status.
6177         (cmd_qtp): New function.
6178         (handle_tracepoint_query): Call it.
6179         (cmd_qtnotes): New function.
6180         (handle_tracepoint_general_set): Call it.
6181         (get_timestamp): Rename from tsv_get_timestamp.
6182
6183 2011-11-14  Stan Shebs  <stan@codesourcery.com>
6184             Kwok Cheung Yeung  <kcy@codesourcery.com>
6185
6186         * linux-x86-low.c (small_jump_insn): New.
6187         (i386_install_fast_tracepoint_jump_pad): Add arguments for
6188         trampoline and error message, build a trampoline and issue a small
6189         jump instruction to it.
6190         (x86_install_fast_tracepoint_jump_pad): Add arguments for
6191         trampoline and error message.
6192         (x86_get_min_fast_tracepoint_insn_len): New.
6193         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6194         * linux-low.h (struct linux_target_ops): Add arguments to
6195         install_fast_tracepoint_jump_pad operation, add new operation.
6196         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6197         arguments.
6198         (linux_get_min_fast_tracepoint_insn_len): New function.
6199         (linux_target_op): Add new operation.
6200         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6201         (gdb_trampoline_buffer_end): Ditto.
6202         (gdb_trampoline_buffer_error): Ditto.
6203         (struct ipa_sym_addresses): Add fields for new IPA variables.
6204         (symbol_list): Add entries for new IPA variables.
6205         (struct tracepoint): Add fields to hold the address range of the
6206         trampoline used by the tracepoint.
6207         (trampoline_buffer_head): New static variable.
6208         (trampoline_buffer_tail): Ditto.
6209         (claim_trampoline_space): New function.
6210         (have_fast_tracepoint_trampoline_buffer): New function.
6211         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6212         structure.
6213         (install_fast_tracepoint): Ditto, also add error buffer argument.
6214         (cmd_qtminftpilen): New function.
6215         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6216         (fast_tracepoint_from_trampoline_address): New function.
6217         (fast_tracepoint_collecting): Handle trampoline as part of jump
6218         pad space.
6219         (set_trampoline_buffer_space): New function.
6220         (initialize_tracepoint): Initialize new IPA variables.
6221         * target.h (struct target_ops): Add arguments to
6222         install_fast_tracepoint_jump_pad operation, add new
6223         get_min_fast_tracepoint_insn_len operation.
6224         (target_get_min_fast_tracepoint_insn_len): New.
6225         (install_fast_tracepoint_jump_pad): Add arguments.
6226         * server.h (IPA_BUFSIZ): Define.
6227         * linux-i386-ipa.c: Include extra header files.
6228         (initialize_fast_tracepoint_trampoline_buffer): New function.
6229         (initialize_low_tracepoint): Call it.
6230         * server.h (set_trampoline_buffer_space): Declare.
6231         (claim_trampoline_space): Ditto.
6232         (have_fast_tracepoint_trampoline_buffer): Ditto.
6233
6234 2011-11-14  Yao Qi  <yao@codesourcery.com>
6235
6236         * server.c (handle_query): Handle InstallInTrace for qSupported.
6237         * tracepoint.c (add_tracepoint): Sort list.
6238         (install_tracepoint, download_tracepoint): New.
6239         (cmd_qtdp): Call them to install and download tracepoints.
6240         (sort_tracepoints): Removed.
6241         (cmd_qtstart): Update.
6242
6243 2011-11-14  Yao Qi  <yao@codesourcery.com>
6244
6245         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6246         * mem-break.h: Declare.
6247         * tracepoint.c (cmd_qtstart): Move some code to ...
6248         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6249         New.
6250         (download_tracepoints): Move some code to ...
6251         (download_tracepoint_1): ... here.  New.
6252
6253 2011-11-08  Yao Qi  <yao@codesourcery.com>
6254
6255         * remote-utils.c (relocate_instruction): A comment fix.
6256
6257 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
6258
6259         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6260         (i386_dr_low_get_control, i386_dr_low_get_status): Use
6261         dr_status_mirror and dr_control_mirror from debug_reg_state.
6262         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6263         (i386_initial_stuff): Remove use of deleted globals.
6264         (i386_get_thread_context, i386_set_thread_context,
6265         i386_thread_added): Use dr_status_mirror and dr_control_mirror
6266         from debug_reg_state.
6267
6268 2011-11-05  Yao Qi  <yao@codesourcery.com>
6269
6270         * tracepoint.c (gdb_collect): Loop over tracepoints of same
6271         address as TPOINT's.
6272
6273 2011-11-02  Stan Shebs  <stan@codesourcery.com>
6274
6275         * tracepoint.c (agent_mem_read_string): New function.
6276         (eval_agent_expr): Call it for tracenz.
6277         * server.c (handle_query): Report support for tracenz.
6278
6279 2011-11-02  Yao Qi  <yao@codesourcery.com>
6280
6281         * tracepoint.c (cmd_qtstart): Remove unused local variables.
6282
6283 2011-11-02  Yao Qi  <yao@codesourcery.com>
6284
6285         * target.h: Fix a typo in comment.
6286
6287 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
6288
6289         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
6290         clobber the breakpoints' shadows with fast tracepoint jumps.
6291         * mem-break.h (check_mem_write): Add `myaddr' parameter.
6292         * target.c (write_inferior_memory): Also pass MYADDR down to
6293         check_mem_write.
6294
6295 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
6296
6297         * configure.ac: Check support for personality routine.
6298         * configure: Regenerate.
6299         * config.in: Likewise.
6300         * linux-low.c: Include <sys/personality.h>.
6301         Define ADDR_NO_RANDOMIZE if necessary.
6302         (linux_create_inferior): Disable address space randomization when
6303         forking inferior, if requested.
6304         (linux_supports_disable_randomization): New function.
6305         (linux_target_ops): Install it.
6306         * server.h (disable_randomization): Declare.
6307         * server.c (disable_randomization): New global variable.
6308         (handle_general_set): Handle QDisableRandomization.
6309         (handle_query): Likewise for qSupported.
6310         (main): Support --disable-randomization and --no-disable-randomization
6311         command line arguments.
6312         * target.h (struct target_ops): Add supports_disable_randomization.
6313         (target_supports_disable_randomization): New macro.
6314
6315 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
6316
6317         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6318         ifdef check.
6319         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6320         [!PT_GETDSBT] (target_loadmap): New definition.
6321         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6322         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6323         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6324         and PT_GETDSBT to LINUX_LOADMAP.
6325         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6326         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6327
6328 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
6329
6330         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6331         (arm_linux_hwbp_cap): New static variable.
6332         (arm_linux_get_hwbp_cap): Replace by ...
6333         (arm_linux_init_hwbp_cap): ... this new function.
6334         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6335         (arm_linux_get_hw_watchpoint_count): Likewise.
6336         (arm_linux_get_hw_watchpoint_max_length): Likewise.
6337         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6338         (arm_prepare_to_resume): Use perror_with_name instead of error.
6339
6340 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
6341
6342         * linux-arm-low.c: Include <signal.h>.
6343         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6344         (struct arm_linux_hwbp_cap): New data type.
6345         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6346         (struct arm_linux_hw_breakpoint): New data type.
6347         (MAX_BPTS, MAX_WPTS): Define.
6348         (struct arch_process_info, struct arch_lwp_info): New data types.
6349         (arm_linux_get_hwbp_cap): New function.
6350         (arm_linux_get_hw_breakpoint_count): Likewise.
6351         (arm_linux_get_hw_watchpoint_count): Likewise.
6352         (arm_linux_get_hw_watchpoint_max_length): Likewise.
6353         (arm_hwbp_control_initialize): Likewise.
6354         (arm_hwbp_control_is_enabled): Likewise.
6355         (arm_hwbp_control_is_initialized): Likewise.
6356         (arm_hwbp_control_disable): Likewise.
6357         (arm_linux_hw_breakpoint_equal): Likewise.
6358         (arm_linux_hw_point_initialize): Likewise.
6359         (struct update_registers_data): New data structure.
6360         (update_registers_callback: New function.
6361         (arm_insert_point): Likewise.
6362         (arm_remove_point): Likewise.
6363         (arm_stopped_by_watchpoint): Likewise.
6364         (arm_stopped_data_address): Likewise.
6365         (arm_new_process): Likewise.
6366         (arm_new_thread): Likewise.
6367         (arm_prepare_to_resume): Likewise.
6368         (the_low_target): Register arm_insert_point, arm_remove_point,
6369         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6370         arm_new_thread, and arm_prepare_to_resume.
6371
6372 2011-09-15  Stan Shebs  <stan@codesourcery.com>
6373
6374         * server.h (struct emit_ops): Add compare-goto fields.
6375         * tracepoint.c (gdb_agent_op_sizes): New table.
6376         (emit_eq_goto): New function.
6377         (emit_ne_goto): New function.
6378         (emit_lt_goto): New function.
6379         (emit_le_goto): New function.
6380         (emit_gt_goto): New function.
6381         (emit_ge_goto): New function.
6382         (is_goto_target): New function.
6383         (compile_bytecodes): Recognize special cases of compare-goto
6384         combinations and call specialized emitters for them.
6385         * linux-x86-low.c (amd64_emit_eq_goto): New function.
6386         (amd64_emit_ne_goto): New function.
6387         (amd64_emit_lt_goto): New function.
6388         (amd64_emit_le_goto): New function.
6389         (amd64_emit_gt_goto): New function.
6390         (amd64_emit_ge_goto): New function.
6391         (amd64_emit_ops): Add the new functions.
6392         (i386_emit_eq_goto): New function.
6393         (i386_emit_ne_goto): New function.
6394         (i386_emit_lt_goto): New function.
6395         (i386_emit_le_goto): New function.
6396         (i386_emit_gt_goto): New function.
6397         (i386_emit_ge_goto): New function.
6398         (i386_emit_ops): Add the new functions.
6399
6400 2011-09-08  Stan Shebs  <stan@codesourcery.com>
6401
6402         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6403         (i386_emit_epilogue): Restore %ebx.
6404
6405 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
6406
6407         * server.c (step_thread): Remove definition.
6408         (process_serial_event): Don't handle Hs.
6409         * server.h (step_thread): Remove declaration.
6410         * target.c (set_desired_inferior): Remove use of step_thread.
6411
6412 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
6413
6414         * linux-low.c: Include linux-procfs.h.
6415         (linux_attach_lwp_1): Update comments.
6416         (linux_attach): Scan for existing threads when attaching to a
6417         process that is the tgid.
6418         * Makefile.in: Update dependencies.
6419
6420 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
6421
6422         * configure.srv: Add linux-procfs.o dependencies.
6423
6424 2011-08-14  Yao Qi  <yao@codesourcery.com>
6425
6426         * target.h (struct target_ops): Fix indent.
6427         * win32-low.c (win32_target_ops): Fix comment.
6428
6429 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
6430             Yao Qi  <yao@codesourcery.com>
6431
6432         * Makefile.in (clean): Remove tic6x-*.c files.
6433         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6434         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6435         (tic6x-c64xp-linux.c): Likewise.
6436         * configure.srv: Add support for tic6x-*-uclinux.
6437         * linux-tic6x-low.c: New.
6438         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6439
6440 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
6441             Yao Qi  <yao@codesourcery.com>
6442
6443         * target.h (struct target_ops): Add read_loadmap.
6444         * linux-low.c (struct target_loadseg): New type.
6445         (struct target_loadmap): New type.
6446         (linux_read_loadmap): New function.
6447         (linux_target_ops): Add linux_read_loadmap.
6448         * server.c (handle_query): Support qXfer:fdpic:read packet.
6449         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6450         to NULL.
6451
6452 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
6453
6454         * win32-low.c: Include <stdint.h>.
6455
6456 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
6457
6458         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6459         to the inferior here.
6460         (i386_remove_aligned_watchpoint): Ditto.
6461         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6462         fit part of the watchpoint in the debug registers.
6463         (i386_update_inferior_debug_regs): New.
6464         (i386_low_insert_watchpoint): Work on a local mirror of the debug
6465         registers, and only update the inferior on success.
6466         (i386_low_remove_watchpoint): Ditto.
6467
6468 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
6469
6470         * linux-low.c (compare_ints, unique, list_threads, show_process,
6471         linux_core_of_thread): Delete.
6472         (linux_target_ops): Change linux_core_of_thread to
6473         linux_common_core_of_thread.
6474         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6475         * utils.c (malloc_failure): Change type of argument.
6476         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6477         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6478         common/linux-osdata.c, common/ptid.c and common/buffer.c.
6479         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6480         (IPA_OBJS): Add common-utils-ipa.o.
6481         (ptid_h, linux_osdata_h): New macros.
6482         (server_h): Add common/common-utils.h, common/xml-utils.h,
6483         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6484         common/ptid.h.
6485         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6486         ptid.o, buffer.o): New rules.
6487         (linux-low.o): Add common/linux-osdata.h as a dependency.
6488         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6489         * configure.ac: Add AC_HEADER_DIRENT check.
6490         * config.in: Regenerate.
6491         * configure: Regenerate.
6492         * remote-utils.c (xml_escape_text): Delete.
6493         (buffer_grow, buffer_free, buffer_init, buffer_finish,
6494         buffer_xml_printf): Move to common/buffer.c.
6495         * server.c (main): Remove call to initialize_inferiors.
6496         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6497         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6498         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6499         internal_error, gdb_assert, gdb_assert_fail): Delete.
6500         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6501         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6502         common/buffer.h.
6503         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6504         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6505         initialize_inferiors): Delete.
6506
6507 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
6508
6509         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6510         symbol error.
6511
6512 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
6513
6514         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6515         assertion.
6516         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6517
6518 2011-05-26  Yao Qi  <yao@codesourcery.com>
6519
6520         * Makefile.in (thread-db.o): Track dependence to
6521         common/gdb_thread_db.h.
6522         * thread-db.c: include gdb_thread_db.h from right place.
6523
6524 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
6525
6526         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6527         __FILE__ and __LINE__ to internal_error.
6528
6529 2011-05-13  Doug Evans  <dje@google.com>
6530
6531         * thread-db.c (try_thread_db_load_from_sdir): New function.
6532         (try_thread_db_load_from_dir): New function.
6533         (thread_db_load_search): Handle $sdir, ignore $pdir.
6534         Remove trying of system directories if search of
6535         libthread-db-search-path fails, that is now done via $sdir.
6536
6537 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
6538
6539         * server.c (handle_query): Add EnableDisableTracepoints to the list
6540         of supported features.
6541         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6542         tracepoints.
6543         (cmd_qtenable_disable): New.
6544         (cmd_qtstart): Install tracepoints even if disabled.
6545         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6546         receiving a QTEnable or QTDisable packet.
6547         (gdb_collect): Skip data collection if fast tracepoint is disabled.
6548         (ust_marker_to_static_tracepoint): Do not ignore disabled static
6549         tracepoints.
6550         (gdb_probe): Skip data collection if static tracepoint is disabled.
6551
6552 2011-05-10  Doug Evans  <dje@google.com>
6553
6554         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6555
6556 2011-05-04  Doug Evans  <dje@google.com>
6557
6558         * linux-low.c (linux_join): Skip process lookup.
6559         * spu-low.c (spu_join): Ditto.
6560         * server.c (join_inferiors_callback): Delete.
6561         (process_serial_event): For 'D' packet (detach) call join_inferior
6562         directly.
6563
6564 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
6565
6566         * README: Don't mention xscale*-*-linux*.
6567         * configure.srv (xscale*-*-linux*): Don't handle target.
6568
6569 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
6570
6571         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6572         casting pointers.
6573         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6574         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6575         (i386_emit_void_call_2): Likewise.
6576
6577 2011-04-26  Yao Qi  <yao@codesourcery.com>
6578
6579         * linux-low.c: Move common macros to linux-ptrace.h.
6580         Include linux-ptrace.h.
6581         * Makefile.in (linux_ptrace_h): New.
6582         (linux-low.o): Depends on linux-ptrace.h.
6583
6584 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6585
6586         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6587         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
6588         (remote_prepare): New function with most of the TCP code from ...
6589         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
6590         setting transport_is_reliable.
6591         * server.c (run_once): New variable.
6592         (gdbserver_usage): Document it.
6593         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
6594         the first run if RUN_ONCE.
6595         * server.h (run_once, remote_prepare): New declarations.
6596
6597 2011-04-19  Tom Tromey  <tromey@redhat.com>
6598
6599         * win32-low.c (handle_load_dll): Remove duplicate "the".
6600
6601 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
6602
6603         Remove support for old Cygwin 1.5 versions.
6604         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6605         function to avoid warning.
6606         (win32_add_one_solib): Use cygwin_conv_path function to avoid
6607         warning.
6608
6609 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
6610
6611         * gdbserver/server.h (Macro _): Define it if not available.
6612
6613 2011-03-14  Michael Snyder  <msnyder@vmware.com>
6614
6615         * hostio.c (handle_close): Remove unnecessary null test.
6616
6617 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
6618
6619         * Makefile.in (maintainer-clean realclean distclean): Remove
6620         "make ...  subdir_do" command.
6621
6622 2011-03-10  Michael Snyder  <msnyder@vmware.com>
6623
6624         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6625
6626         * server.c (handle_v_run): Free alloced buffer on early return.
6627
6628 2011-03-09  Yao Qi  <yao@codesourcery.com>
6629
6630         Revert:
6631         2011-03-04  Yao Qi  <yao@codesourcery.com>
6632
6633         * Makefile.in: Remove GNU make feature --directory.
6634
6635         2011-03-05  Yao Qi  <yao@codesourcery.com>
6636
6637         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6638         (subdir_do): New make target.  Copied from gdb/Makefile.
6639         (maintainer-clean, realclean, distclean, clean): Call corresponding
6640         make targets in common/Makefile.
6641
6642         2011-02-11  Yao Qi  <yao@codesourcery.com>
6643
6644         * configure.ac: Call AC_PROG_RANLIB.
6645         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
6646         * configure: Regenerate.
6647
6648 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6649
6650         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6651
6652 2011-03-06  Yao Qi  <yao@codesourcery.com>
6653
6654         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6655
6656 2011-03-05  Yao Qi  <yao@codesourcery.com>
6657
6658         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6659         (subdir_do): New make target.  Copied from gdb/Makefile.
6660         (maintainer-clean, realclean, distclean, clean): Call corresponding
6661         make targets in common/Makefile.
6662
6663 2011-03-04  Yao Qi  <yao@codesourcery.com>
6664
6665         * Makefile.in: Remove GNU make feature --directory.
6666
6667 2011-03-04  Michael Snyder  <msnyder@vmware.com>
6668
6669         * server.c (queue_stop_reply): Call xmalloc not malloc.
6670
6671 2011-03-02  Michael Snyder  <msnyder@vmware.com>
6672
6673         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6674
6675 2011-02-28  Michael Snyder  <msnyder@vmware.com>
6676
6677         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6678         (cmd_qtframe): Ditto.
6679         (cmd_qtbuffer): Ditto.
6680         (cmd_bigqtbuffer): Ditto.
6681
6682         * utils.c (decimal2str): Initialize 'width' to nine, then
6683         don't mess with it.
6684
6685 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
6686
6687         * hostio.c (require_data): Free *data, not data.
6688
6689 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6690
6691         * hostio.c (require_data): Use free, not xfree.
6692
6693 2011-02-27  Michael Snyder  <msnyder@vmware.com>
6694
6695         * server.c (handle_query): Discard unused value.
6696
6697         * hostio.c (require_data): Free malloc memory before returning
6698         error.
6699
6700 2011-02-26  Michael Snyder  <msnyder@vmware.com>
6701
6702         * linux-low.c (list_threads): Call closedir for dirent.
6703
6704 2011-02-27  Michael Snyder  <msnyder@vmware.com>
6705
6706         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6707         a case statement falls through.
6708
6709         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6710
6711         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6712         in comparison.
6713
6714 2011-02-26  Michael Snyder  <msnyder@vmware.com>
6715
6716         * utils.c (decimal2str): Eliminate dead code and dead param.
6717         (pulongest): Drop dead param from call to decimal2str.
6718         (plongest): Ditto.
6719
6720 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
6721
6722         Revert the following patch (not approved yet):
6723         2011-02-21  Hui Zhu  <teawater@gmail.com>
6724         * tracepoint.c (tp_printf): New function.
6725         (eval_agent_expr): Handle gdb_agent_op_printf.
6726
6727 2011-02-21  Hui Zhu  <teawater@gmail.com>
6728
6729         * tracepoint.c (tp_printf): New function.
6730         (eval_agent_expr): Handle gdb_agent_op_printf.
6731
6732 2011-02-18  Tom Tromey  <tromey@redhat.com>
6733
6734         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6735         (tracepoint.o): Likewise.
6736         * tracepoint.c (enum gdb_agent_op): Use ax.def.
6737         (gdb_agent_op_names): Likewise.
6738
6739 2011-02-18  Tom Tromey  <tromey@redhat.com>
6740
6741         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6742         gdb_agent_op_rot>: New constants.
6743         (gdb_agent_op_names): Add pick and roll.
6744         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6745         cases.
6746
6747 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
6748
6749         * aclocal.m4: Regenerated with aclocal-1.11.1.
6750
6751 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
6752
6753         * server.c (handle_qxfer_traceframe_info): New.
6754         (qxfer_packets): Register "traceframe-info".
6755         (handle_query): Report support for qXfer:traceframe-info:read+.
6756         * tracepoint.c (match_blocktype): New.
6757         (traceframe_find_block_type): Rename to ...
6758         (traceframe_walk_blocks): ... this.  Add callback filter argument,
6759         and use it.
6760         (traceframe_find_block_type): New, reimplemented on top of
6761         traceframe_walk_blocks.
6762         (build_traceframe_info_xml): New.
6763         (traceframe_read_info): New.
6764         * server.h (traceframe_read_info): Declare.
6765
6766 2011-02-11  Yao Qi  <yao@codesourcery.com>
6767
6768         * configure.ac: Call AC_PROG_RANLIB.
6769         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
6770         * configure: Regenerate.
6771
6772 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
6773
6774         * server.c (gdb_read_memory): Change return semantics to allow
6775         partial transfers.
6776         (handle_search_memory_1): Adjust.
6777         (process_serial_event) <'m' packet>: Handle partial transfers.
6778         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6779
6780 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
6781
6782         * regcache.c (init_register_cache): Initialize
6783         regcache->register_status.
6784         (free_register_cache): Release regcache->register_status.
6785         (regcache_cpy): Copy register_status.
6786         (registers_to_string): Print 'x's for unavailable registers.
6787         (supply_register): Mark the register's status valid or
6788         unavailable, depending on whether a buffer was passed in or not.
6789         (supply_register_zeroed): New.
6790         (supply_regblock): Mark the registers' status valid or
6791         unavailable, depending on whether a buffer was passed in or not.
6792         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6793         (struct regcache): New `register_status' field.
6794         (supply_register_zeroed): Declare.
6795         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6796         supply_register_zeroed, rather than passing a NULL buffer to
6797         supply_register.
6798         * tracepoint.c (fetch_traceframe_registers): Update comment.
6799
6800 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
6801
6802         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6803         buffer explicit.
6804
6805 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
6806
6807         * server.h (decode_xfer_write): Change prototype.
6808         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6809         and don't extract the annex here.
6810         * server.c (decode_xfer_read): Remove `annex' parameter,
6811         and don't extract the annex here.
6812         (decode_xfer): New.
6813         (struct qxfer): New.
6814         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6815         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6816         (handle_qxfer_statictrace): New functions, abstracted out from
6817         handle_query, and made to use the struct qxfer interface.
6818         (handle_threads_qxfer_proper): Rename to ...
6819         (handle_qxfer_threads_proper): ... this.
6820         (handle_threads_qxfer): Rename to ...
6821         (handle_qxfer_threads): ... this.  Adjust.
6822         (qxfer_packets): New array.
6823         (handle_qxfer): New function.
6824         (handle_query): Use handle_qxfer.
6825
6826 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
6827
6828         * gdbreplay.c: Shorten lines of >= 80 columns.
6829         * linux-low.c: Ditto.
6830         * linux-ppc-low.c: Ditto.
6831         * linux-s390-low.c: Ditto.
6832         * linux-sparc-low.c: Ditto.
6833         * linux-x86-low.c: Ditto.
6834         * linux-xtensa-low.c: Ditto.
6835         * mem-break.c: Ditto.
6836         * nto-low.c: Ditto.
6837         * regcache.h: Ditto.
6838         * remote-utils.c: Ditto.
6839         * server.c: Ditto.
6840         * server.h: Ditto.
6841         * thread-db.c: Ditto.
6842         * tracepoint.c: Ditto.
6843         * utils.c: Ditto.
6844         * win32-low.h: Ditto.
6845
6846 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
6847
6848         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6849         update.
6850
6851 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
6852
6853         * server.c (gdbserver_version): Update copyright year in version
6854         output.
6855         * gdbreplay.c (gdbreplay_version): Ditto.
6856
6857 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
6858
6859         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6860         * linux-bfin-low.c: New file.
6861         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6862         PT_DATA_ADDR for BFIN targets.
6863         * Makefile.in (SFILES): Add linux-bfin-low.c.
6864         (clean): Remove reg-bfin.c.
6865         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6866         * README: Mention supported Blackfin targets.
6867
6868 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
6869
6870         * .gitignore: New file.
6871
6872 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
6873
6874         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6875
6876 2010-10-22  Jie Zhang  <jie@codesourcery.com>
6877
6878         * Makefile.in: Add FLAGS_TO_PASS variable.
6879         (install): Remove dependency of install-only and recursively
6880         invoke make for install-only.
6881
6882 2010-10-04  Doug Evans  <dje@google.com>
6883
6884         * Makefile.in (uninstall): Use $(DESTDIR).
6885
6886 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
6887
6888         PR gdb/11842
6889
6890         * linux-x86-low.c (compat_siginfo_from_siginfo)
6891         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6892         si_code is < 0.  Check for si_code == SI_TIMER before checking for
6893         si_code < 0.
6894
6895 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
6896
6897         * lynx-i386-low.c: New file.
6898         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6899
6900 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
6901
6902         * lynx-low.c (ptrace_request_to_str): Remove handling for
6903         request values that have been removed in LynxOS 5.x.
6904
6905 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
6906
6907         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6908         <ptrace.h>
6909
6910 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
6911
6912         * configure.ac: Add --enable-inprocess-agent option.
6913         * configure: Rebuilt.
6914
6915 2010-09-06  Yao Qi  <yao@codesourcery.com>
6916
6917         * linux-low.c (linux_kill): Remove unused variable.
6918         (linux_stabilize_threads): Likewise.
6919         * server.c (start_inferior): Likewise.
6920         (queue_stop_reply_callback): Likewise.
6921         * tracepoint.c (do_action_at_tracepoint): Likewise.
6922
6923 2010-09-06  Yao Qi  <yao@codesourcery.com>
6924
6925         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6926         on return.
6927
6928 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6929
6930         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6931
6932 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
6933
6934         * Makefile.in (install-only): Replace $IPA_DEPFILES with
6935         "$(IPA_DEPFILES)".
6936
6937 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
6938
6939         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6940         gdbserver/lynx-ppc-low.c: New files.
6941         * Makefile.in (lynx_low_h): New variable.
6942         (lynx-low.o, lynx-ppc-low.o): New rules.
6943         * configure.ac: On LynxOS, link with -lnetinet.
6944         * configure.srv: Add handling of powerpc-*-lynxos* targets.
6945         * configure: regenerate.
6946
6947 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
6948
6949         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6950         * configure.ac: Add check for vasprintf and vsnprintf.
6951         * configure, config.in: Regenerate.
6952         * server.h (vasprintf, vsnprintf): Add conditional declarations.
6953
6954 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
6955
6956         * gdbreplay.c: Move include of alloca.h up, next to include of
6957         malloc.h.
6958         * server.h: Add include of malloc.h.
6959         * mem-break.c: Remove include of malloc.h.
6960         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6961
6962 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
6963
6964         * Makefile.in (memmem.o): Build with -Wno-error.
6965
6966 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
6967
6968         * utils.c (xsnprintf): Make non-static.
6969         * server.h: Add xsnprintf declaration.
6970         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6971         replace calls to snprintf by calls to xsnprintf throughout.
6972
6973 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
6974
6975         * configure.ac: Add configure check for alloca.
6976         * configure, config.in: Regenerate.
6977         * server.h: Include alloca.h if it exists.
6978         * gdbreplay.c: Include alloca.h if it exists.
6979
6980 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
6981
6982         * linux-low.c (__SIGRTMIN): Define if not already defined.
6983         (linux_create_inferior): Check for __ANDROID__ rather than
6984         __SIGRTMIN.
6985         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6986         are already deferred.
6987         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6988         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6989         stopped and already has a pending signal to report.
6990         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6991         a pending signal to report or is moving out of a jump pad.
6992         (linux_init_signals): Check for __ANDROID__ rather than
6993         __SIGRTMIN.
6994
6995 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
6996
6997         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6998         debug_threads check.  Avoid a linear search when not doing debug
6999         output.
7000
7001 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7002
7003         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7004         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7005         (struct file_handler) <fd>: Change type to gdb_fildes_t.
7006         (process_event): Change local fd's type to gdb_fildes_t.
7007         (create_file_handler): Adjust prototype.
7008         (delete_file_handler): Adjust prototype.
7009         (handle_file_event): Adjust prototype.  Use pfildes.
7010         (create_file_event): Adjsut prototype.
7011         * remote-utils.c (remote_desc, listen_desc): Change type to
7012         gdb_fildes_t.
7013         * server.h: New gdb_fildes_t typedef.
7014         [USE_WIN32API]: Include winsock2.h.
7015         (delete_file_handler, add_file_handler): Adjust prototypes.
7016         (pfildes): Declare.
7017         * utils.c (pfildes): New.
7018
7019 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7020
7021         * configure.ac (build_warnings): Add -Wno-char-subscripts.
7022         * configure: Regenerate.
7023
7024 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7025
7026         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7027         (linux_done_accessing_memory): ... this.
7028         (linux_target_ops): Adjust.
7029         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7030         * nto-low.c (nto_target_ops): Adjust comment.
7031         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7032         * spu-low.c (spu_target_ops): Adjust comment.
7033         * target.h (target_ops): Rename unprepare_to_access_memory field
7034         to done_accessing_memory.
7035         (unprepare_to_access_memory): Rename to ...
7036         (done_accessing_memory): ... this.
7037
7038 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7039
7040         * linux-low.c (linux_prepare_to_access_memory): New.
7041         (linux_unprepare_to_access_memory): New.
7042         (linux_target_ops): Install them.
7043         * server.c (read_memory): Rename to ...
7044         (gdb_read_memory): ... this.  Use
7045         prepare_to_access_memory/prepare_to_access_memory.
7046         (write_memory): Rename to ...
7047         (gdb_write_memory): ... this.  Use
7048         prepare_to_access_memory/prepare_to_access_memory.
7049         (handle_search_memory_1): Adjust.
7050         (process_serial_event): Adjust.
7051         * target.h (struct target_ops): New fields
7052         prepare_to_access_memory and unprepare_to_access_memory.
7053         (prepare_to_access_memory, unprepare_to_access_memory): New.
7054         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7055         prepare_to_access_memory/prepare_to_access_memory.
7056         * nto-low.c (nto_target_ops): Adjust.
7057         * spu-low.c (spu_target_ops): Adjust.
7058         * win32-low.c (win32_target_ops): Adjust.
7059
7060 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7061
7062         * Makefile.in (WARN_CFLAGS): Get it from configure.
7063         (WERROR_CFLAGS): New.
7064         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7065         * configure.ac: Introduce --enable-werror, which adds -Werror to
7066         the compiler command line.  Enabled by default.  Disable with
7067         --disable-werror.  Add -Wdeclaration-after-statement
7068         Wpointer-arith and -Wformat-nonliteral to warning flags.
7069         * configure: Regenerate.
7070
7071 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7072
7073         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7074
7075 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7076
7077         * gdbreplay.c (remote_error): New.
7078         (gdbchar): New.
7079         (expect): Use gdbchar.  Check for error reading from GDB.
7080         Clarify sync error output.
7081         (play): Check for errors writing to GDB.
7082         * linux-low.c (sigchld_handler): Really ignore `write' errors.
7083         * remote-utils.c (getpkt): Check for errors writing to the remote
7084         descriptor.
7085
7086 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7087
7088         * linux-low.c (linux_wait_1): Move non-debugging code out of
7089         `debug_threads' control.
7090
7091 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7092
7093         * linux-low.c (linux_wait_1): Don't set last_status here.
7094         * server.c (push_event, queue_stop_reply_callback): Assert we're
7095         not pushing a TARGET_WAITKIND_IGNORE event.
7096         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7097         (myresume, handle_target_event): Set the thread's last_resume_kind
7098         and last_status from the target returned status.
7099
7100 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7101
7102         PR threads/10729
7103
7104         * linux-x86-low.c (update_debug_registers_callback): New.
7105         (i386_dr_low_set_addr): Use it.
7106         (i386_dr_low_get_addr): New.
7107         (i386_dr_low_set_control): Use update_debug_registers_callback.
7108         (i386_dr_low_get_control): New.
7109         (i386_dr_low_get_status): Adjust.
7110         * linux-low.c (linux_stop_lwp): New.
7111         * linux-low.h (linux_stop_lwp): Declare.
7112
7113         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7114         argument instead of a i386_debug_reg_state.
7115         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7116         a i386_debug_reg_state.
7117         (i386_insert_aligned_watchpoint): Adjust.
7118         (i386_remove_aligned_watchpoint): Adjust.
7119         (i386_low_stopped_data_address): Read the debug registers from the
7120         inferior instead of from the mirrors.
7121         * i386-low.h (struct i386_debug_reg_state): Extend comment.
7122         (i386_dr_low_get_addr): Declare.
7123         (i386_dr_low_get_control): Declare.
7124         (i386_dr_low_get_status): Change prototype.
7125
7126         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7127         (i386_dr_low_get_addr): New.
7128         (i386_dr_low_get_control): New.
7129         (i386_dr_low_get_status): Adjust prototype.  Return
7130         dr_status_mirror.
7131         (i386_initial_stuff): Clear dr_status_mirror and
7132         dr_control_mirror.
7133         (i386_get_thread_context): Adjust.
7134         (i386_set_thread_context): Adjust.
7135         (i386_thread_added): Adjust.
7136
7137 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
7138
7139         * linux-low.h (linux_thread_area): Delete declaration.
7140
7141 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
7142
7143         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7144         after its termination.
7145
7146 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
7147
7148         * linux-low.c (gdb_wants_lwp_stopped): Delete.
7149         (gdb_wants_all_stopped): Delete.
7150         (linux_wait_1): Don't call them.
7151         * server.c (handle_v_cont): Tag all threads as want-stopped.
7152         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
7153         stopped as "client-wants-stopped".
7154
7155 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
7156
7157         * Makefile.in (signals_h): New.
7158         (server_h): Depend on it.
7159         (server.o): Don't depend on $(signals_def).
7160         (signals.o): Depend on $(signals_def).
7161
7162 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
7163
7164         * Makefile.in (signals_def): New.
7165         (server_h): Append include/gdb/signals.h and signals_def.
7166         (server.o): Append signals_def.
7167
7168 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
7169
7170         * server.c (handle_target_event): Use target_signal_to_host for
7171         resume_info.sig initialization.
7172         * target.h (struct thread_resume) <sig>: New comment.
7173
7174 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
7175
7176         * server.c (handle_query): strcpy() the returned string from paddress()
7177         instead of sprintf().
7178         * utils.c (paddress): Return phex_nz().
7179
7180 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
7181
7182         * server.c (handle_v_cont): Call mourn_inferior if process
7183         just exited.
7184         (myresume): Likewise.
7185
7186 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
7187
7188         Static tracepoints, and integration with UST.
7189
7190         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
7191         * mem-break.c (uninsert_all_breakpoints)
7192         (reinsert_all_breakpoints): New.
7193         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7194         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7195         (gdb_agent_ust_loaded, helper_thread_id)
7196         (gdb_agent_helper_thread_id): New macros.
7197         (struct ipa_sym_addresses): Add addr_ust_loaded,
7198         addr_helper_thread_id, addr_cmd_buf.
7199         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7200         (in_process_agent_loaded_ust): New.
7201         (write_e_ust_not_loaded): New.
7202         (maybe_write_ipa_ust_not_loaded): New.
7203         (struct collect_static_trace_data_action): New.
7204         (enum tracepoint_type) <static_tracepoint>: New.
7205         (struct tracepoint) <handle>: Mention static tracepoints.
7206         (struct static_tracepoint_ctx): New.
7207         (CMD_BUF_SIZE): New.
7208         (add_tracepoint_action): Handle static tracepoint actions.
7209         (unprobe_marker_at): New.
7210         (clear_installed_tracepoints): Handle static tracepoints.
7211         (cmd_qtdp): Handle static tracepoints.
7212         (probe_marker_at): New.
7213         (cmd_qtstart): Handle static tracepoints.
7214         (response_tracepoint): Handle static tracepoints.
7215         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7216         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7217         (get_context_regcache): Handle static tracepoints.
7218         (do_action_at_tracepoint): Handle static tracepoint actions.
7219         (traceframe_find_block_type): Handle static trace data blocks.
7220         (traceframe_read_sdata): New.
7221         (download_tracepoints): Download static tracepoint actions.
7222         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7223         (GDB_PROBE_NAME): New.
7224         (ust_ops): New.
7225         (GET_UST_SYM): New.
7226         (USTF): New.
7227         (dlsym_ust): New.
7228         (ust_marker_to_static_tracepoint): New.
7229         (gdb_probe): New.
7230         (collect_ust_data_at_tracepoint): New.
7231         (gdb_ust_probe): New.
7232         (UNIX_PATH_MAX, SOCK_DIR): New.
7233         (gdb_ust_connect_sync_socket): New.
7234         (resume_thread, stop_thread): New.
7235         (run_inferior_command): New.
7236         (init_named_socket): New.
7237         (gdb_ust_socket_init): New.
7238         (cstr_to_hexstr): New.
7239         (next_st): New.
7240         (first_marker, next_marker): New.
7241         (response_ust_marker): New.
7242         (cmd_qtfstm, cmd_qtsstm): New.
7243         (unprobe_marker_at, probe_marker_at): New.
7244         (cmd_qtstmat, gdb_ust_thread): New.
7245         (gdb_ust_init): New.
7246         (initialize_tracepoint_ftlib): Call gdb_ust_init.
7247         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7248         (ST_REGENTRY): New.
7249         (x86_64_st_collect_regmap): New.
7250         (X86_64_NUM_ST_COLLECT_GREGS): New.
7251         (AMD64_RIP_REGNUM): New.
7252         (supply_static_tracepoint_registers): New.
7253         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7254         (ST_REGENTRY): New.
7255         (i386_st_collect_regmap): New.
7256         (i386_NUM_ST_COLLECT_GREGS): New.
7257         (supply_static_tracepoint_registers): New.
7258         * server.c (handle_query): Handle qXfer:statictrace:read.
7259         <qSupported>: Report support for StaticTracepoints, and
7260         qXfer:statictrace:read features.
7261         * server.h (traceframe_read_sdata)
7262         (supply_static_tracepoint_registers): Declare.
7263         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7264         (unpack_varlen_hex): Include in IPA build.
7265         * Makefile.in (ustlibs, ustinc): New.
7266         (IPA_OBJS): Add remote-utils-ipa.o.
7267         ($(IPA_LIB)): Link -ldl and -lpthread.
7268         (UST_CFLAGS): New.
7269         (IPAGENT_CFLAGS): Add UST_CFLAGS.
7270         * config.in, configure: Regenerate.
7271
7272 2010-06-20  Ian Lance Taylor  <iant@google.com>
7273             Pedro Alves  <pedro@codesourcery.com>
7274
7275         * linux-x86-low.c (always_true): Delete.
7276         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7277         trying to fool the compiler with always_true.
7278
7279 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
7280
7281         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7282         conditions in gdbserver.
7283
7284 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
7285
7286         * spu-low.c (spu_read_memory): Wrap around local store limit.
7287         (spu_write_memory): Likewise.
7288
7289 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
7290
7291         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7292         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7293         LONGEST uses.
7294         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7295         uses.
7296         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7297         uses with LONGEST uses.
7298
7299 2010-06-14  Stan Shebs  <stan@codesourcery.com>
7300             Pedro Alves  <pedro@codesourcery.com>
7301
7302         Bytecode compiler.
7303
7304         * linux-x86-low.c: Include limits.h.
7305         (add_insns): New.
7306         (always_true): New.
7307         (EMIT_ASM): New.
7308         (EMIT_ASM32): New.
7309         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7310         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7311         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7312         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7313         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7314         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7315         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7316         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7317         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7318         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7319         (amd64_emit_void_call_2): New.
7320         (amd64_emit_ops): New.
7321         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7322         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7323         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7324         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7325         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7326         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7327         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7328         (i386_emit_call, i386_emit_reg, i386_emit_pop)
7329         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7330         (i386_emit_stack_adjust, i386_emit_int_call_1)
7331         (i386_emit_void_call_2): New.
7332         (i386_emit_ops): New.
7333         (x86_emit_ops): New.
7334         (the_low_target): Install x86_emit_ops.
7335         * server.h (struct emit_ops): New.
7336         (get_raw_reg_func_addr): Declare.
7337         (current_insn_ptr, emit_error): Declare.
7338         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7339         (set_trace_state_variable_value): New defines.
7340         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7341         addr_get_trace_state_variable_value and
7342         addr_set_trace_state_variable_value.
7343         (symbol_list): New fields for get_raw_reg,
7344         get_trace_state_variable_value and set_trace_state_variable_value.
7345         (condfn): New typedef.
7346         (struct tracepoint): New field `compiled_cond'.
7347         (do_action_at_tracepoint): Clear compiled_cond.
7348         (get_trace_state_variable_value, set_trace_state_variable_value):
7349         Export in the IPA.
7350         (condition_true_at_tracepoint): If there's a compiled condition,
7351         run that.
7352         (current_insn_ptr, emit_error): New globals.
7353         (struct bytecode_address): New.
7354         (get_raw_reg_func_addr): New.
7355         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7356         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7357         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7358         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7359         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7360         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7361         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7362         (compile_tracepoint_condition, compile_bytecodes): New.
7363         * target.h (emit_ops): Forward declare.
7364         (struct target_ops): New field emit_ops.
7365         (target_emit_ops): New.
7366         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7367         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7368         * linux-low.c (linux_emit_ops): New.
7369         (linux_target_ops): Install it.
7370         * linux-low.h (struct linux_target_ops): New field emit_ops.
7371
7372 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
7373
7374         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7375         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7376
7377 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
7378             Stan Shebs  <stan@codesourcery.com>
7379
7380         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7381         (all): Depend on $(extra_libraries).
7382         (install-only): Install the IPA.
7383         (IPA_OBJS, IPA_LIB): New.
7384         (clean): Remove the IPA lib.
7385         (IPAGENT_CFLAGS): New.
7386         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7387         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7388         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7389         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7390         * configure.ac: Check for atomic builtins support in the compiler.
7391         (IPA_DEPFILES, extra_libraries): Define.
7392         * configure.srv (ipa_obj): Add description.
7393         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7394         (i[34567]86-*-linux*): Set ipa_obj.
7395         (x86_64-*-linux*): Set ipa_obj.
7396         * linux-low.c (stabilizing_threads): New.
7397         (supports_fast_tracepoints): New.
7398         (linux_detach): Stabilize threads before detaching.
7399         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
7400         the lwp is either not stabilizing, or is moving out of a jump pad.
7401         (linux_fast_tracepoint_collecting): New.
7402         (maybe_move_out_of_jump_pad): New.
7403         (enqueue_one_deferred_signal): New.
7404         (dequeue_one_deferred_signal): New.
7405         (linux_wait_for_event_1): If moving out of a jump pad, defer
7406         pending signals to later.
7407         (linux_stabilize_threads): New.
7408         (linux_wait_1): Check if threads need moving out of jump pads, and
7409         do it if so.
7410         (stuck_in_jump_pad_callback): New.
7411         (move_out_of_jump_pad_callback): New.
7412         (lwp_running): New.
7413         (linux_resume_one_lwp): Handle moving out of jump pads.
7414         (linux_set_resume_request): Dequeue deferred signals.
7415         (need_step_over_p): Also step over fast tracepoint jumps.
7416         (start_step_over): Also uninsert fast tracepoint jumps.
7417         (finish_step_over): Also reinsert fast tracepoint jumps.
7418         (linux_install_fast_tracepoint_jump): New.
7419         (linux_target_ops): Install linux_stabilize_threads and
7420         linux_install_fast_tracepoint_jump_pad.
7421         * linux-low.h (linux_target_ops) <get_thread_area,
7422         install_fast_tracepoint_jump_pad>: New fields.
7423         (struct lwp_info) <collecting_fast_tracepoint,
7424         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7425         (linux_get_thread_area): Declare.
7426         * linux-x86-low.c (jump_insn): New.
7427         (x86_get_thread_area): New.
7428         (append_insns): New.
7429         (push_opcode): New.
7430         (amd64_install_fast_tracepoint_jump_pad): New.
7431         (i386_install_fast_tracepoint_jump_pad): New.
7432         (x86_install_fast_tracepoint_jump_pad): New.
7433         (the_low_target): Install x86_get_thread_area and
7434         x86_install_fast_tracepoint_jump_pad.
7435         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7436         (struct fast_tracepoint_jump): New.
7437         (fast_tracepoint_jump_insn): New.
7438         (fast_tracepoint_jump_shadow): New.
7439         (find_fast_tracepoint_jump_at): New.
7440         (fast_tracepoint_jump_here): New.
7441         (delete_fast_tracepoint_jump): New.
7442         (set_fast_tracepoint_jump): New.
7443         (uninsert_fast_tracepoint_jumps_at): New.
7444         (reinsert_fast_tracepoint_jumps_at): New.
7445         (set_breakpoint_at): Use write_inferior_memory.
7446         (uninsert_raw_breakpoint): Use write_inferior_memory.
7447         (check_mem_read): Mask out fast tracepoint jumps.
7448         (check_mem_write): Mask out fast tracepoint jumps.
7449         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7450         (set_fast_tracepoint_jump): Declare.
7451         (delete_fast_tracepoint_jump)
7452         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7453         (reinsert_fast_tracepoint_jumps_at): Declare.
7454         * regcache.c: Don't compile many functions when building the
7455         in-process agent library.
7456         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7457         the register buffer in the heap.
7458         (free_register_cache): If the register buffer isn't owned by the
7459         regcache, don't free it.
7460         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7461         pre-existing register caches.
7462         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7463         type.
7464         (convert_ascii_to_int): : Constify `from' parameter type.
7465         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7466         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
7467         the needed buffer in-place.
7468         (relocate_instruction): New.
7469         * server.c (handle_query) <qSymbols>: If the target supports
7470         tracepoints, give it a chance of looking up symbols.  Report
7471         support for fast tracepoints.
7472         (handle_status): Stabilize threads.
7473         (process_serial_event): Adjust.
7474         * server.h (struct fast_tracepoint_jump): Forward declare.
7475         (struct process_info) <fast_tracepoint_jumps>: New field.
7476         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7477         (decode_X_packet, decode_M_packet): Adjust.
7478         (relocate_instruction): Declare.
7479         (in_process_agent_loaded): Declare.
7480         (tracepoint_look_up_symbols): Declare.
7481         (struct fast_tpoint_collect_status): Declare.
7482         (fast_tracepoint_collecting): Declare.
7483         (force_unlock_trace_buffer): Declare.
7484         (handle_tracepoint_bkpts): Declare.
7485         (initialize_low_tracepoint)
7486         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7487         * target.h (struct target_ops) <stabilize_threads,
7488         install_fast_tracepoint_jump_pad>: New fields.
7489         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7490         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7491         [HAVE_STDINT_H]: Include stdint.h.
7492         (trace_debug_1): Rename to ...
7493         (trace_vdebug): ... this.
7494         (trace_debug): Rename to ...
7495         (trace_debug_1): ... this.  Add `level' parameter.
7496         (trace_debug): New.
7497         (ATTR_USED, ATTR_NOINLINE): New.
7498         (IP_AGENT_EXPORT): New.
7499         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7500         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7501         (about_to_request_buffer_space, trace_buffer_is_full)
7502         (stopping_tracepoint, expr_eval_result, error_tracepoint)
7503         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7504         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7505         (traceframe_write_count, traceframes_created)
7506         (trace_state_variables)
7507         New renaming defines.
7508         (struct ipa_sym_addresses): New.
7509         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7510         (symbol_list): New.
7511         (ipa_sym_addrs): New.
7512         (all_tracepoint_symbols_looked_up): New.
7513         (in_process_agent_loaded): New.
7514         (write_e_ipa_not_loaded): New.
7515         (maybe_write_ipa_not_loaded): New.
7516         (tracepoint_look_up_symbols): New.
7517         (debug_threads) [IN_PROCESS_AGENT]: New.
7518         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7519         (UNKNOWN_SIDE_EFFECTS): New.
7520         (stop_tracing): New.
7521         (flush_trace_buffer): New.
7522         (stop_tracing_bkpt): New.
7523         (flush_trace_buffer_bkpt): New.
7524         (read_inferior_integer): New.
7525         (read_inferior_uinteger): New.
7526         (read_inferior_data_pointer): New.
7527         (write_inferior_data_pointer): New.
7528         (write_inferior_integer): New.
7529         (write_inferior_uinteger): New.
7530         (struct collect_static_trace_data_action): Delete.
7531         (enum tracepoint_type): New.
7532         (struct tracepoint) <type>: New field `type'.
7533         <actions_str, step_actions, step_actions_str>: Only include in
7534         GDBserver.
7535         <orig_size, obj_addr_on_target, adjusted_insn_addr>
7536         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7537         (tracepoints): Use IP_AGENT_EXPORT.
7538         (last_tracepoint): Don't include in the IPA.
7539         (stopping_tracepoint): Use IP_AGENT_EXPORT.
7540         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7541         (alloced_trace_state_variables): New.
7542         (trace_state_variables): Use IP_AGENT_EXPORT.
7543         (traceframe_t): Delete unused variable.
7544         (circular_trace_buffer): Don't include in the IPA.
7545         (trace_buffer_start): Delete.
7546         (struct trace_buffer_control): New.
7547         (trace_buffer_free): Delete.
7548         (struct ipa_trace_buffer_control): New.
7549         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7550         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7551         New.
7552         (trace_buffer_ctrl): New.
7553         (TRACE_BUFFER_CTRL_CURR): New.
7554         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7555         Reimplement as macros.
7556         (trace_buffer_wrap): Delete.
7557         (traceframe_write_count, traceframe_read_count)
7558         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7559         (struct tracepoint_hit_ctx) <type>: New field.
7560         (struct fast_tracepoint_ctx): New.
7561         (memory_barrier): New.
7562         (cmpxchg): New.
7563         (record_tracepoint_error): Update atomically in the IPA.
7564         (clear_inferior_trace_buffer): New.
7565         (about_to_request_buffer_space): New.
7566         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7567         updating the same buffer.
7568         (add_tracepoint): Default the tracepoint's type to trap
7569         tracepoint, and orig_size to -1.
7570         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7571         internal variables.
7572         (create_trace_state_variable): New parameter `gdb'.  Handle it.
7573         (clear_installed_tracepoints): Clear fast tracepoint jumps.
7574         (cmd_qtdp): Handle fast tracepoints.
7575         (cmd_qtdv): Adjust.
7576         (max_jump_pad_size): New.
7577         (gdb_jump_pad_head): New.
7578         (get_jump_space_head): New.
7579         (claim_jump_space): New.
7580         (sort_tracepoints): New.
7581         (MAX_JUMP_SIZE): New.
7582         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
7583         IPA.
7584         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7585         support.  Upload fast traceframes, and delete internal IPA
7586         breakpoints.
7587         (stop_tracing_handler): New.
7588         (flush_trace_buffer_handler): New.
7589         (cmd_qtstop): Upload fast tracepoints.
7590         (response_tracepoint): Handle fast tracepoints.
7591         (tracepoint_finished_step): Upload fast traceframes.  Set the
7592         tracepoint hit context's tracepoint type.
7593         (handle_tracepoint_bkpts): New.
7594         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7595         type.  Add comment about fast tracepoints.
7596         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7597         non-existing action_str field.
7598         (get_context_regcache): Handle fast tracepoints.
7599         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7600         to the regcache.
7601         (fast_tracepoint_from_jump_pad_address): New.
7602         (fast_tracepoint_from_ipa_tpoint_address): New.
7603         (collecting_t): New.
7604         (force_unlock_trace_buffer): New.
7605         (fast_tracepoint_collecting): New.
7606         (collecting): New.
7607         (gdb_collect): New.
7608         (write_inferior_data_ptr): New.
7609         (target_tp_heap): New.
7610         (target_malloc): New.
7611         (download_agent_expr): New.
7612         (UALIGN): New.
7613         (download_tracepoints): New.
7614         (download_trace_state_variables): New.
7615         (upload_fast_traceframes): New.
7616         (IPA_FIRST_TRACEFRAME): New.
7617         (IPA_NEXT_TRACEFRAME_1): New.
7618         (IPA_NEXT_TRACEFRAME): New.
7619         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7620         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7621         (gdb_jump_pad_buffer_end): New.
7622         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7623         (initialize_tracepoint): Adjust.
7624         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7625         buffer.  Initialize the low module.
7626         * utils.c (PREFIX, TOOLNAME): New.
7627         (malloc_failure): Use PREFIX.
7628         (error): In the IPA, an error causes an exit.
7629         (fatal, warning): Use PREFIX.
7630         (internal_error): Use TOOLNAME.
7631         (NUMCELLS): Increase to 10.
7632         * configure, config.in: Regenerate.
7633
7634 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
7635
7636         * server.c (handle_query) <qSupported>: Do two passes over the
7637         qSupported string to avoid nesting strtok.
7638
7639 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7640
7641         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7642         (CDEPS): New.
7643         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
7644         -Wl,--dynamic-list.
7645         * configure: Regenerate.
7646         * proc-service.list: New.
7647
7648 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7649
7650         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7651         New comment.
7652
7653 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
7654
7655         * gdbreplay.c (remote_open): Check error return from socket() call by
7656         its equality to -1 not by it being negative.
7657         * remote-utils.c (remote_open): Likewise.
7658
7659 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
7660
7661         * config.h: Regenerate.
7662
7663 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
7664
7665         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7666         doesn't provide PTRACE_GET_THREAD_AREA.
7667
7668 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
7669
7670         * linux-m68k-low.c: Include <asm/ptrace.h>
7671         (ps_get_thread_area): Implement.
7672
7673 2010-05-03  Doug Evans  <dje@google.com>
7674
7675         * event-loop.c (struct callback_event): New struct.
7676         (callback_list): New global.
7677         (append_callback_event, delete_callback_event): New functions.
7678         (process_callback): New function.
7679         (start_event_loop): Call it.
7680         * remote-utils.c (NOT_SCHEDULED): Define.
7681         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7682         moved out of readchar.
7683         (readchar): Rewrite.  Call reschedule before returning.
7684         (reset_readchar): New function.
7685         (remote_close): Call it.
7686         (process_remaining, reschedule): New functions.
7687         * server.h (callback_handler_func): New typedef.
7688         (append_callback_event, delete_callback_event): Declare.
7689
7690 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
7691
7692         * proc-service.c (ps_pglobal_lookup): Use
7693         thread_db_look_up_one_symbol.
7694         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7695         parameter.  Use it instead of all_symbols_looked_up.
7696         * server.h (struct process_info) <all_symbols_looked_up>: Delete
7697         field.
7698         (all_symbols_looked_up): Don't declare.
7699         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7700         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7701         field.
7702         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7703         Set all_symbols_looked_up here.
7704         (thread_db_look_up_one_symbol): New.
7705         (thread_db_get_tls_address): Adjust.
7706         (thread_db_load_search, try_thread_db_load_1): Always allocate the
7707         thread_db object on the heap, and tentatively set it in the
7708         process structure.
7709         (thread_db_init): Don't set all_symbols_looked_up here.
7710         * linux-low.h (thread_db_look_up_one_symbol): Declare.
7711
7712 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
7713
7714         * linux-low.c (linux_kill, linux_detach): Adjust.
7715         (status_pending_p_callback): Remove redundant statement.  Check
7716         for !TARGET_WAITIKIND_IGNORE, instead of
7717         TARGET_WAITKIND_STOPPED.
7718         (handle_tracepoints): Make sure LWP is locked.  Adjust.
7719         (linux_wait_for_event_1): Adjust.
7720         (linux_cancel_breakpoints): New.
7721         (unsuspend_one_lwp): New.
7722         (unsuspend_all_lwps): New.
7723         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7724         (send_sigstop_callback): Change return type to int, add new
7725         `except' parameter and handle it.
7726         (suspend_and_send_sigstop_callback): New.
7727         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7728         pass them down.  If SUSPEND, also increment the lwp's suspend
7729         count.
7730         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7731         (need_step_over_p): Don't consider suspended LWPs.
7732         (start_step_over): Adjust.
7733         (proceed_one_lwp): Change return type to int, add new `except'
7734         parameter and handle it.
7735         (unsuspend_and_proceed_one_lwp): New.
7736         (proceed_all_lwps): Use find_inferior instead of
7737         for_each_inferior.
7738         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
7739         also decrement the suspend count of LWPs.  Pass `except' down,
7740         instead of hacking its suspend count.
7741         (linux_pause_all): Add `freeze' parameter.  Adjust.
7742         (linux_unpause_all): New.
7743         (linux_target_ops): Install linux_unpause_all.
7744         * server.c (handle_status): Adjust.
7745         * target.h (struct target_ops): New fields `unpause_all' and
7746         `cancel_breakpoints'.  Add new parameter to `pause_all'.
7747         (pause_all): Add new `freeze' parameter.
7748         (unpause_all): New.
7749         (cancel_breakpoints): New.
7750         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7751         cancel breakpoints.
7752         (cmd_qtstart): Pause threads.
7753         (stop_tracing): Pause threads, and cancel breakpoints.
7754         * win32-low.c (win32_target_ops): Adjust.
7755
7756 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
7757
7758         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7759         the inferior right away from here...
7760         (linux_wait_1): ... to here, and adjust to check the thread's
7761         last_resume_kind instead of the lwp's step or stop_expected flags.
7762
7763 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
7764
7765         * README: Use consistent `GDB' and `GDBserver' spellings.
7766
7767 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
7768
7769         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7770         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
7771         (linux_detach_one_lwp): Assume the lwp is stopped.
7772         (any_thread_of): Delete.
7773         (linux_detach): Stop all lwps here.  Don't blindly delete all
7774         breakpoints.
7775         (delete_lwp_callback): New.
7776         (linux_mourn): Delete all lwps of the process that is gone.
7777         (linux_wait_1): Don't delete the last lwp of the process here.
7778         * mem-break.h (mark_breakpoints_out): Declare.
7779         * mem-break.c (mark_breakpoints_out): New.
7780         (free_all_breakpoints): Use it.
7781         * server.c (handle_target_event): If the process is gone, mark
7782         breakpoints out.
7783         * thread-db.c (struct thread_db) <create_bp>: New field.
7784         (thread_db_enable_reporting): Fix prototype.  Store a thread event
7785         breakpoint reference in the thread_db struct.
7786         (thread_db_load_search): Clear the thread_db object.
7787         (try_thread_db_load_1): Ditto.
7788         (switch_to_process): New.
7789         (disable_thread_event_reporting): Use it.
7790         (remove_thread_event_breakpoints): New.
7791         (thread_db_detach, thread_db_mourn): Use it.
7792
7793 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
7794
7795         * linux-low.c (linux_enable_event_reporting): New.
7796         (linux_wait_for_event_1, handle_extended_wait): Use it.
7797
7798 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
7799
7800         * linux-low.c (linux_kill_one_lwp, linux_kill)
7801         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7802         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
7803         SIGSTOP even if the LWP is stopped.
7804         (send_sigstop_callback): New.
7805         (stop_all_lwps): Use send_sigstop_callback instead.
7806         (linux_resume_one_thread): Adjust.
7807         (proceed_one_lwp): Still proceed an LWP that the client has
7808         requested to stop, if we haven't reported it as stopped yet.  Make
7809         sure that LWPs the client want stopped, have a pending SIGSTOP.
7810
7811 2010-04-26  Doug Evans  <dje@google.com>
7812
7813         * server.c (handle_general_set): Make static.
7814
7815         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7816         Print received char after testing for error/eof instead of before.
7817         (input_interrupt): Tweak comment.
7818
7819 2010-04-23  Doug Evans  <dje@google.com>
7820
7821         * server.c (start_inferior): Print inferior argv if --debug.
7822
7823 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
7824
7825         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7826         * nto-x86-low.c: Include server.h
7827
7828 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
7829
7830         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7831         be consistent with other sources of this directory.
7832         (init_registers_amd64): Correct name of source file of this function
7833         in the comment.
7834
7835 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
7836
7837         * configure.srv (x86_64-*-mingw*): New configuration for Windows
7838         64-bit executables.
7839
7840 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
7841
7842         * win32-i386-low.c: Add 64-bit support.
7843         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7844         (init_registers_amd64): Declare.
7845         (mappings): Add 64-bit version of array.
7846         (init_windows_x86): New function.
7847         (the_low_target): Change init_arch field to init_windows_x86.
7848
7849 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
7850
7851         * win32-low.c: Adapt to support also 64-bit architecture.
7852         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7853         (get_image_name): Use SIZE_T type for local variable `done'.
7854         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7855         (toolhelp_get_dll_name): Idem.
7856         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7857         Use uintptr_t typecast to avoid warning.
7858         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7859         (handle_exception): Use phex_nz to avoid warning.
7860         (win32_wait): Remove unused local variable `process'.
7861
7862 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
7863
7864         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7865         `amd64-avx.o'.
7866
7867 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
7868
7869         * configure.ac: Use `ws2_32' library for srv_mingw.
7870         * configure: Regenerate.
7871         * gdbreplay.c: Include winsock2.h instead of winsock.h.
7872         * remote-utils.c: Likewise.
7873
7874 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
7875
7876         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7877         if __x86_64__ is defined.
7878
7879 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
7880
7881         * configure: Regenerate.
7882
7883 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
7884
7885         * server.c (handle_query): Handle 'qGetTIBAddr' query.
7886         * target.h (target_ops): New get_tib_address field.
7887         * win32-low.h (win32_thread_info): Add thread_local_base field.
7888         * win32-low.c (child_add_thread): Add tlb argument.
7889         Set thread_local_base field to TLB.
7890         (get_child_debug_event): Adapt to child_add_thread change.
7891         (win32_get_tib_address): New function.
7892         (win32_target_ops): Set get_tib_address field to
7893         win32_get_tib_address.
7894         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7895
7896 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
7897
7898         * linux-low.c (linux_mourn): Also remove the process.
7899         * server.c (handle_target_event): Don't remove the process here.
7900         * nto-low.c (nto_mourn): New.
7901         (nto_target_ops): Install it.
7902         * spu-low.c (spu_mourn): New.
7903         (spu_target_ops): Install it.
7904         * win32-low.c (win32_mourn): New.
7905         (win32_target_ops): Install it.
7906
7907 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
7908
7909         * server.h (buffer_xml_printf): Remove redundant `;'.
7910
7911 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
7912
7913         * regcache.c (set_register_cache): Invalidate regcaches before
7914         changing the register cache layout.
7915         (regcache_invalidate_one): Allow a NULL regcache.
7916         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7917         regcaches before changing the register cache layout or the target
7918         regsets.
7919
7920 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
7921
7922         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7923         variable warning on Linux/x86-64.
7924
7925 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
7926
7927         GDBserver disconnected tracing support.
7928
7929         * linux-low.c (linux_remove_process): Delete.
7930         (add_lwp): Don't set last_resume_kind here.
7931         (linux_kill): Use `mourn'.
7932         (linux_detach): Use `thread_db_detach', and `mourn'.
7933         (linux_mourn): New.
7934         (linux_attach_lwp_1): Adjust comment.
7935         (linux_attach): last_resume_kind moved the thread_info; adjust.
7936         (status_pending_p_callback): Adjust.
7937         (linux_wait_for_event_1): Adjust.
7938         (count_events_callback, select_singlestep_lwp_callback)
7939         (select_event_lwp_callback, cancel_breakpoints_callback)
7940         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7941         (proceed_one_lwp): Adjust.
7942         (linux_async): Add debug output.
7943         (linux_thread_stopped): New.
7944         (linux_pause_all): New.
7945         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7946         linux_pause_all.
7947         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7948         (thread_db_free): Delete declaration.
7949         (thread_db_detach, thread_db_mourn): Declare.
7950         * thread-db.c (thread_db_init): Use thread_db_mourn.
7951         (thread_db_free): Delete, split in two.
7952         (disable_thread_event_reporting): New.
7953         (thread_db_detach): New.
7954         (thread_db_mourn): New.
7955
7956         * server.h (struct thread_info) <last_resume_kind>: New field.
7957         <attached>: Add comment.
7958         <gdb_detached>: New field.
7959         (handler_func): Change return type to int.
7960         (handle_serial_event, handle_target_event): Ditto.
7961         (gdb_connected): Declare.
7962         (tracing): Delete.
7963         (disconnected_tracing): Declare.
7964         (stop_tracing): Declare.
7965
7966         * server.c (handle_query) <qSupported>: Report support for
7967         disconnected tracing.
7968         (queue_stop_reply_callback): Account for running threads.
7969         (gdb_wants_thread_stopped): New.
7970         (gdb_wants_all_threads_stopped): New.
7971         (gdb_reattached_process): New.
7972         (handle_status): Clear the `gdb_detached' flag of all processes.
7973         In all-stop, stop all threads.
7974         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
7975         (process_serial_event): If the remote connection breaks, or if an
7976         exit was forced with "monitor exit", force an event loop exit.
7977         Handle disconnected tracing on detach.
7978         (handle_serial_event): Adjust.
7979         (handle_target_event): If GDB isn't connected, forward events back
7980         to the inferior, unless the last process exited, in which case,
7981         exit gdbserver.  Adjust interface.
7982
7983         * remote-utils.c (remote_open): Don't block in accept.  Instead
7984         register an event loop source on the listen socket file
7985         descriptor.  Refactor bits into ...
7986         (listen_desc): ... this new global.
7987         (gdb_connected): ... this new function.
7988         (enable_async_notification): ... this new function.
7989         (handle_accept_event): ... this new function.
7990         (remote_close): Clear remote_desc.
7991
7992         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7993
7994         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7995         New fields.
7996         (mourn_inferior): Define.
7997         (target_process_qsupported): Avoid the dangling else problem.
7998         (thread_stopped): Define.
7999         (pause_all): Define.
8000         (target_waitstatus_to_string): Declare.
8001         * target.c (target_waitstatus_to_string): New.
8002
8003         * tracepoint.c (tracing): Make extern.
8004         (disconnected_tracing): New.
8005         (stop_tracing): Make extern.  Handle tracing stops due to GDB
8006         disconnecting.
8007         (cmd_qtdisconnected): New.
8008         (cmd_qtstatus): Report disconnected tracing status in trace reply.
8009         (handle_tracepoint_general_set): Handle QTDisconnected.
8010
8011         * event-loop.c (event_handler_func): Change return type to int.
8012         (process_event): Bail out if the event handler wants the event
8013         loop to stop.
8014         (handle_file_event): Ditto.
8015         (start_event_loop): Bail out if the event handler wants the event
8016         loop to stop.
8017
8018         * nto-low.c (nto_target_ops): Adjust.
8019         * spu-low.c (spu_wait): Don't remove the process here.
8020         (spu_target_ops): Adjust.
8021         * win32-low.c (win32_wait): Don't remove the process here.
8022         (win32_target_ops): Adjust.
8023
8024 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8025
8026         * regcache.c (realloc_register_cache): Invalidate inferior's
8027         regcache before recreating it.
8028
8029 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
8030
8031         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8032
8033 2010-04-09  Stan Shebs  <stan@codesourcery.com>
8034             Pedro Alves  <pedro@codesourcery.com>
8035
8036         * server.h (LONGEST): New.
8037         (struct thread_info) <while_stepping>: New field.
8038         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8039         Declare.
8040         (initialize_tracepoint, handle_tracepoint_general_set)
8041         (handle_tracepoint_query, tracepoint_finished_step)
8042         (tracepoint_was_hit, release_while_stepping_state_list):
8043         (current_traceframe): Declare.
8044         * server.c (handle_general_set): Handle tracepoint packets.
8045         (read_memory): New.
8046         (write_memory): New.
8047         (handle_search_memory_1): Use read_memory.
8048         (handle_query): Report support for conditional tracepoints, trace
8049         state variables, and tracepoint sources.  Handle tracepoint
8050         queries.
8051         (main): Initialize the tracepoints module.
8052         (process_serial_event): Handle traceframe reads/writes.
8053
8054         * linux-low.c (handle_tracepoints): New.
8055         (linux_wait_1): Call it.
8056         (linux_resume_one_lwp): Handle while-stepping.
8057         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8058         (linux_target_ops): Install them.
8059         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8060         New field.
8061         * linux-x86-low.c (x86_supports_tracepoints): New.
8062         (the_low_target). Install it.
8063
8064         * mem-break.h (delete_breakpoint): Declare.
8065         * mem-break.c (delete_breakpoint): Make external.
8066
8067         * target.h (struct target_ops): Add `supports_tracepoints',
8068         `read_pc', and `write_pc' fields.
8069         (target_supports_tracepoints): Define.
8070         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8071         (phex_nz): New.
8072
8073         * regcache.h (struct regcache) <registers_owned>: New field.
8074         (init_register_cache, regcache_cpy): Declare.
8075         (regcache_read_pc, regcache_write_pc): Declare.
8076         (register_cache_size): Declare.
8077         (supply_regblock): Declare.
8078         * regcache.c (init_register_cache): New.
8079         (new_register_cache): Use it.
8080         (regcache_cpy): New.
8081         (register_cache_size): New.
8082         (supply_regblock): New.
8083         (regcache_read_pc, regcache_write_pc): New.
8084
8085         * tracepoint.c: New.
8086
8087         * Makefile.in (OBS): Add tracepoint.o.
8088         (tracepoint.o): New rule.
8089
8090 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
8091
8092         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8093         (i386-mmx.o): New.
8094         (i386-mmx.c): Likewise.
8095         (i386-mmx-linux.o): Likewise.
8096         (i386-mmx-linux.c): Likewise.
8097
8098         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8099         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8100         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8101         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8102
8103         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8104         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8105         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8106
8107 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
8108
8109         * Makefile.in (clean): Updated.
8110         (i386-avx.o): New.
8111         (i386-avx.c): Likewise.
8112         (i386-avx-linux.o): Likewise.
8113         (i386-avx-linux.c): Likewise.
8114         (amd64-avx.o): Likewise.
8115         (amd64-avx.c): Likewise.
8116         (amd64-avx-linux.o): Likewise.
8117         (amd64-avx-linux.c): Likewise.
8118
8119         * configure.srv (srv_i386_regobj): Add i386-avx.o.
8120         (srv_i386_linux_regobj): Add i386-avx-linux.o.
8121         (srv_amd64_regobj): Add amd64-avx.o.
8122         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8123         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8124         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8125         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8126         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8127         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8128         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8129
8130         * i387-fp.c: Include "i386-xstate.h".
8131         (i387_xsave): New.
8132         (i387_cache_to_xsave): Likewise.
8133         (i387_xsave_to_cache): Likewise.
8134         (x86_xcr0): Likewise.
8135
8136         * i387-fp.h (i387_cache_to_xsave): Likewise.
8137         (i387_xsave_to_cache): Likewise.
8138         (x86_xcr0): Likewise.
8139
8140         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8141         * linux-crisv32-low.c (target_regsets): Likewise.
8142         * linux-m68k-low.c (target_regsets): Likewise.
8143         * linux-mips-low.c (target_regsets): Likewise.
8144         * linux-ppc-low.c (target_regsets): Likewise.
8145         * linux-s390-low.c (target_regsets): Likewise.
8146         * linux-sh-low.c (target_regsets): Likewise.
8147         * linux-sparc-low.c (target_regsets): Likewise.
8148         * linux-xtensa-low.c (target_regsets): Likewise.
8149
8150         * linux-low.c: Include <sys/uio.h>.
8151         (regsets_fetch_inferior_registers): Support nt_type.
8152         (regsets_store_inferior_registers): Likewise.
8153         (linux_process_qsupported): New.
8154         (linux_target_ops): Add linux_process_qsupported.
8155
8156         * linux-low.h (regset_info): Add nt_type.
8157         (linux_target_ops): Add process_qsupported.
8158
8159         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8160         and <sys/uio.h>.
8161         (init_registers_i386_avx_linux): New.
8162         (init_registers_amd64_avx_linux): Likewise.
8163         (xmltarget_i386_linux_no_xml): Likewise.
8164         (xmltarget_amd64_linux_no_xml): Likewise.
8165         (PTRACE_GETREGSET): Likewise.
8166         (PTRACE_SETREGSET): Likewise.
8167         (x86_fill_xstateregset): Likewise.
8168         (x86_store_xstateregset): Likewise.
8169         (use_xml): Likewise.
8170         (x86_linux_update_xmltarget): Likewise.
8171         (x86_linux_process_qsupported): Likewise.
8172         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8173         (x86_arch_setup): Don't call init_registers_amd64_linux nor
8174         init_registers_i386_linux here.  Call
8175         x86_linux_update_xmltarget.
8176         (the_low_target): Add x86_linux_process_qsupported.
8177
8178         * server.c (handle_query): Call target_process_qsupported.
8179
8180         * target.h (target_ops): Add process_qsupported.
8181         (target_process_qsupported): New.
8182
8183 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
8184
8185         * inferiors.c (add_thread): Set last_status kind to
8186         TARGET_WAITKIND_IGNORE.
8187         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8188         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
8189         (linux_wait_1): Move `thread' local definition to block that uses
8190         it.  Don't NULL initialize `event_child'.
8191         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8192         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8193         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8194
8195 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
8196
8197         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8198         an extended waitstatus, or by a watchpoint.
8199         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8200         thread was stepping or has been stopped by a watchpoint.
8201
8202 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
8203
8204         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8205         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8206         of another, then delete the previous, and validate all
8207         breakpoints.
8208         (validate_inserted_breakpoint): New.
8209         (delete_disabled_breakpoints): New.
8210         (validate_breakpoints): New.
8211         (check_mem_read): Validate breakpoints before trusting their
8212         shadow.  Delete disabled breakpoints.
8213         (check_mem_write): Validate breakpoints before trusting they
8214         should be inserted.  Delete disabled breakpoints.
8215         * mem-break.h (validate_breakpoints):
8216         * server.c (handle_query): Validate breakpoints when we see a
8217         qSymbol query.
8218
8219 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
8220
8221         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8222         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
8223         if we could tell there's a GDB breakpoint at stop_pc.
8224         (need_step_over_p): Don't do a step over if we find a GDB
8225         breakpoint at the resume PC.
8226
8227         * mem-break.c (struct raw_breakpoint): New.
8228         (enum bkpt_type): New type `gdb_breakpoint'.
8229         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8230         fields.  New field `raw'.
8231         (find_raw_breakpoint_at): New.
8232         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
8233         breakpoint instead.
8234         (set_breakpoint_at): Adjust.
8235         (delete_raw_breakpoint): New.
8236         (release_breakpoint): New.
8237         (delete_breakpoint): Rename to...
8238         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
8239         release_breakpoint.  Return ENOENT.
8240         (delete_breakpoint): Reimplement.
8241         (find_breakpoint_at): Delete.
8242         (find_gdb_breakpoint_at): New.
8243         (delete_breakpoint_at): Delete.
8244         (set_gdb_breakpoint_at): New.
8245         (delete_gdb_breakpoint_at): New.
8246         (gdb_breakpoint_here): New.
8247         (set_reinsert_breakpoint): Use release_breakpoint.
8248         (uninsert_breakpoint): Rename to ...
8249         (uninsert_raw_breakpoint): ... this.
8250         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8251         (reinsert_raw_breakpoint): Change parameter type to
8252         raw_breakpoint.
8253         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8254         instead.
8255         (check_breakpoints): Adjust.  Use release_breakpoint.
8256         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8257         (breakpoint_inserted_here): Ditto.
8258         (check_mem_read): Adjust to iterate over raw breakpoints instead.
8259         Don't trust the breakpoint's shadow if it is not inserted.
8260         (check_mem_write): Adjust to iterate over raw breakpoints instead.
8261         (delete_all_breakpoints): Adjust.
8262         (free_all_breakpoints): Mark all breakpoints as uninserted, and
8263         use delete_breakpoint_1.
8264
8265         * mem-break.h (breakpoints_supported): Delete declaration.
8266         (set_gdb_breakpoint_at): Declare.
8267         (gdb_breakpoint_here): Declare.
8268         (delete_breakpoint_at): Delete.
8269         (delete_gdb_breakpoint_at): Declare.
8270
8271         * server.h (struct raw_breakpoint): Forward declare.
8272         (struct process_info): New field `raw_breakpoints'.
8273
8274         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8275         breakpoints.
8276
8277 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
8278
8279         * linux-low.c (status_pending_p_callback): Fix comment.
8280         (linux_wait_for_event_1): Move most of the internal breakpoint
8281         handling from here...
8282         (linux_wait_1): ... to here.
8283         (count_events_callback): New.
8284         (select_singlestep_lwp_callback): New.
8285         (select_event_lwp_callback): New.
8286         (cancel_breakpoints_callback): New.
8287         (select_event_lwp): New.
8288         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
8289         priority to all LWPs that have had events that should be reported
8290         to the client.  Cancel breakpoints when about to reporting the
8291         event to the client, not while stopping lwps.  No longer cancel
8292         finished single-steps here.
8293         (cancel_finished_single_step): Delete.
8294         (cancel_finished_single_steps): Delete.
8295
8296 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
8297
8298         * mem-break.c (enum bkpt_type): New.
8299         (struct breakpoint): New field `type'.
8300         (set_breakpoint_at): Change return type to struct breakpoint
8301         pointer.  Set type to `other_breakpoint' by default.
8302         (delete_breakpoint): Rewrite, supporting more than one breakpoint
8303         in the breakpoint list.
8304         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8305         (reinsert_breakpoint): Rename to ...
8306         (reinsert_raw_breakpoint): ... this.
8307         (reinsert_breakpoints_at): Adjust.
8308         * mem-break.h (struct breakpoint): Declare.
8309         (set_breakpoint_at): Change return type to struct breakpoint
8310         pointer.
8311
8312 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
8313
8314         * server.c (handle_query): Assign, not compare.
8315
8316 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
8317
8318         Teach linux gdbserver to step-over-breakpoints.
8319
8320         * linux-low.c (can_hardware_single_step): New.
8321         (supports_breakpoints): New.
8322         (handle_extended_wait): If stopping threads, read the stop pc of
8323         the new cloned LWP.
8324         (get_pc): New.
8325         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
8326         low target doesn't support retrieving the PC.
8327         (add_lwp): Set last_resume_kind to resume_continue.
8328         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
8329         (linux_attach): Don't clear stop_expected.  Set the lwp's
8330         last_resume_kind to resume_stop.
8331         (linux_detach_one_lwp): Don't check for removed breakpoints.
8332         (check_removed_breakpoint): Delete.
8333         (status_pending_p): Rename to ...
8334         (status_pending_p_callback): ... this.  Don't check for removed
8335         breakpoints.  Don't consider threads that are stopped from GDB's
8336         perspective.
8337         (linux_wait_for_lwp): Always read the stop_pc here.
8338         (cancel_breakpoint): New.
8339         (step_over_bkpt): New global.
8340         (linux_wait_for_event_1): Implement stepping over breakpoints.
8341         (gdb_wants_lwp_stopped): New.
8342         (gdb_wants_all_stopped): New.
8343         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
8344         single-step traps here.  Store the thread's last reported target
8345         wait status.
8346         (send_sigstop): Don't clear stop_expected.  Always set it,
8347         instead.
8348         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8349         (cancel_finished_single_step): New.
8350         (cancel_finished_single_steps): New.
8351         (wait_for_sigstop): Don't cancel finished single-step traps here.
8352         (linux_resume_one_lwp): Don't check for removed breakpoints.
8353         Don't set `step' on non-hardware step archs.
8354         (linux_set_resume_request): Ignore resume_stop requests if already
8355         stopping or stopped.  Set the lwp's last_resume_kind.
8356         (resume_status_pending_p): Don't check for removed breakpoints.
8357         (need_step_over_p): New.
8358         (start_step_over): New.
8359         (finish_step_over): New.
8360         (linux_resume_one_thread): Always queue a sigstop for resume_stop
8361         requests.  Clear the thread's last reported target waitstatus.
8362         Don't use the `suspended' flag.  Don't consider pending breakpoints.
8363         (linux_resume): Start a step-over if necessary.
8364         (proceed_one_lwp): New.
8365         (proceed_all_lwps): New.
8366         (unstop_all_lwps): New.
8367         * linux-low.h (struct lwp_info): Rewrite comment for the
8368         `suspended' flag.  Add the `stop_pc' field.  Delete the
8369         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
8370         Add `'last_resume_kind' and `need_step_over' fields.
8371         * inferiors.c (struct thread_info): Delete, moved elsewhere.
8372         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8373         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
8374         (set_raw_breakpoint_at): New.
8375         (set_breakpoint_at): Rewrite to use it.
8376         (reinsert_breakpoint_handler): Delete.
8377         (set_reinsert_breakpoint): New.
8378         (reinsert_breakpoint_by_bp): Delete.
8379         (delete_reinsert_breakpoints): New.
8380         (uninsert_breakpoint): Rewrite.
8381         (uninsert_breakpoints_at): New.
8382         (reinsert_breakpoint): Rewrite.
8383         (reinsert_breakpoints_at): New.
8384         (check_breakpoints): Rewrite.
8385         (breakpoint_here): New.
8386         (breakpoint_inserted_here): New.
8387         (check_mem_read): Adjust.
8388         * mem-break.h (breakpoints_supported, breakpoint_here)
8389         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8390         (reinsert_breakpoint_by_bp): Delete declaration.
8391         (delete_reinsert_breakpoints): Declare.
8392         (reinsert_breakpoint): Delete declaration.
8393         (reinsert_breakpoints_at): Declare.
8394         (uninsert_breakpoint): Delete declaration.
8395         (uninsert_breakpoints_at): Declare.
8396         (check_breakpoints): Adjust prototype.
8397         * server.h: Adjust include order.
8398         (struct thread_info): Declare here.  Add a `last_status' field.
8399
8400 2010-03-23  Michael Snyder  <msnyder@vmware.com>
8401
8402         * server.c (crc32): New function.
8403         (handle_query): Add handling for 'qCRC:' request.
8404
8405 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
8406
8407         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8408         lwp had been stopped by a watchpoint.
8409
8410 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
8411
8412         * server.h (internal_error): Declare.
8413         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8414         * utils.c (internal_error): New function.
8415
8416 2010-03-15  Andreas Schwab  <schwab@redhat.com>
8417
8418         * configure.srv: Fix typo setting srv_regobj.
8419
8420 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
8421
8422         * linux-low.c (fetch_register): Avoid passing a non string literal
8423         format to `error'.
8424         (usr_store_inferior_registers): Ditto.
8425
8426 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
8427
8428         * linux-low.c (linux_write_memory): Bail out early if peeking
8429         memory failed.
8430
8431 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
8432
8433         * linux-low.h (struct lwp_info): New fields
8434         `stopped_by_watchpoint' and `stopped_data_address'.
8435         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8436         here, and cache them in the lwp object.
8437         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8438         directly.
8439         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8440         field.
8441         (linux_stopped_by_watchpoint): Rewrite.
8442         (linux_stopped_data_address): Rewrite.
8443
8444 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
8445
8446         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8447         switching the current inferior, not before.
8448
8449 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
8450
8451         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8452         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8453         i386-linux.c and amd64-linux.c.
8454         (reg-i386.o): Removed.
8455         (reg-i386.c): Likewise.
8456         (reg-i386-linux.o): Likewise.
8457         (reg-i386-linux.c): Likewise.
8458         (reg-x86-64.o): Likewise.
8459         (reg-x86-64.c): Likewise.
8460         (reg-x86-64-linux.o): Likewise.
8461         (reg-x86-64-linux.c): Likewise.
8462         (i386.o): New.
8463         (i386.c): Likewise.
8464         (i386-linux.o): Likewise.
8465         (i386-linux.c): Likewise.
8466         (amd64.o): Likewise.
8467         (amd64.c): Likewise.
8468         (amd64-linux.o): Likewise.
8469         (amd64-linux.c): Likewise.
8470
8471         * configure.srv (srv_i386_regobj): New.
8472         (srv_i386_linux_regobj): Likewise.
8473         (srv_amd64_regobj): Likewise.
8474         (srv_amd64_linux_regobj): Likewise.
8475         (srv_i386_32bit_xmlfiles): Likewise.
8476         (srv_i386_64bit_xmlfiles): Likewise.
8477         (srv_i386_xmlfiles): Likewise.
8478         (srv_amd64_xmlfiles): Likewise.
8479         (srv_i386_linux_xmlfiles): Likewise.
8480         (srv_amd64_linux_xmlfiles): Likewise.
8481         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
8482         srv_xmlfiles to $srv_i386_xmlfiles.
8483         (i[34567]86-*-mingw32ce*): Likewise.
8484         (i[34567]86-*-mingw*): Likewise.
8485         (i[34567]86-*-nto*): Likewise.
8486         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8487         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
8488         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8489         (x86_64-*-linux*): Likewise.
8490
8491         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8492         (init_registers_amd64_linux): New.
8493         (x86_arch_setup): Replace init_registers_x86_64_linux with
8494         init_registers_amd64_linux.
8495
8496 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
8497
8498         * configure.ac: Check for libdl.  If it is not available link against
8499         static libthread_db.
8500         * configure: Regenerate.
8501
8502 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
8503
8504         PR9605
8505
8506         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8507         handing a read watchpoint.
8508         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8509
8510 2010-02-12  Doug Evans  <dje@google.com>
8511
8512         * linux-low.c (linux_supports_tracefork_flag): Document.
8513         (linux_look_up_symbols): Add comment.
8514
8515 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
8516
8517         * regcache.c (supply_register): Clear regcache if buf is NULL.
8518
8519 2010-02-02  Nicolas Roche  <roche@sourceware.org>
8520             Joel Brobecker  <brobecker@adacore.com>
8521
8522         * inferiors.c (find_inferior): Add function documentation.
8523         (unloaded_dll): Handle the case where the unloaded dll has not
8524         been previously registered in the dll list.
8525
8526 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
8527
8528         * linux-arm-low.c (thumb_breakpoint_len): Delete.
8529         (thumb2_breakpoint): New.
8530         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8531
8532 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
8533
8534         * linux-low.c (get_stop_pc): Check for SIGTRAP.
8535         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8536         breakpoints.
8537
8538 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
8539
8540         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8541
8542 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8543
8544         * linux-s390-low.c (s390_collect_ptrace_register)
8545         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8546
8547 2010-01-21  Doug Evans  <dje@google.com>
8548
8549         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8550         (PTRACE_ARG4_TYPE): New macro.
8551         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8552         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8553         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8554         (usr_store_inferior_registers): Ditto.
8555         (linux_read_memory, linux_write_memory): Ditto.
8556         (linux_test_for_tracefork): Ditto.
8557
8558         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8559         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8560
8561 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
8562
8563         * proc-service.c (ps_lgetregs): Don't refetch registers from the
8564         target.
8565
8566 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
8567
8568         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8569         prototype to take a regcache.  Adjust.
8570
8571 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
8572
8573         * regcache.h (struct thread_info): Forward declare.
8574         (struct regcache): New.
8575         (new_register_cache): Adjust prototype.
8576         (get_thread_regcache): Declare.
8577         (free_register_cache): Adjust prototype.
8578         (registers_to_string, registers_from_string): Ditto.
8579         (supply_register, supply_register_by_name, collect_register)
8580         (collect_register_as_string, collect_register_by_name): Ditto.
8581         * regcache.c (struct inferior_regcache_data): Delete.
8582         (get_regcache): Rename to ...
8583         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
8584         fetching registers.
8585         (regcache_invalidate_one): Adjust.
8586         (regcache_invalidate): Fix prototype.
8587         (new_register_cache): Return the new register cache.
8588         (free_register_cache): Change prototype.
8589         (realloc_register_cache): Adjust.
8590         (registers_to_string): Change prototype to take a regcache.  Adjust.
8591         (registers_from_string): Ditto.
8592         (register_data): Ditto.
8593         (supply_register): Ditto.
8594         (supply_register_by_name): Ditto.
8595         (collect_register): Ditto.
8596         (collect_register_as_string): Ditto.
8597         (collect_register_by_name): Ditto.
8598         * server.c (process_serial_event): Adjust.
8599         * linux-low.h (regset_fill_func, regset_store_func): Change
8600         prototype.
8601         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8602         Change prototype.
8603         * linux-low.c (get_stop_pc): Adjust.
8604         (check_removed_breakpoint): Adjust.
8605         (linux_wait_for_event): Adjust.
8606         (linux_resume_one_lwp): Adjust.
8607         (fetch_register): Add regcache parameter.  Adjust.
8608         (usr_store_inferior_registers): Ditto.
8609         (regsets_fetch_inferior_registers): Ditto.
8610         (regsets_store_inferior_registers): Ditto.
8611         (linux_fetch_registers, linux_store_registers): Ditto.
8612         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8613         regcache.  Adjust.
8614         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8615         Ditto.
8616         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8617         prototype to take a regcache.
8618         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8619         * remote-utils.c (convert_ascii_to_int, outreg)
8620         (prepare_resume_reply): Change prototype to take a regcache.
8621         Adjust.
8622         * target.h (struct target_ops) <fetch_registers, store_registers>:
8623         Change prototype to take a regcache.
8624         (fetch_inferior_registers, store_inferior_registers): Change
8625         prototype to take a regcache.  Adjust.
8626         * proc-service.c (ps_lgetregs): Adjust.
8627         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8628         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8629         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8630         take a regcache.  Adjust.
8631         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8632         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8633         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8634         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
8635         * linux-cris-low.c (cris_get_pc, cris_set_pc)
8636         (cris_cannot_fetch_register):
8637         (cris_breakpoint_at): Change prototype to take a regcache.
8638         Adjust.
8639         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8640         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8641         to take a regcache.  Adjust.
8642         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8643         Adjust.
8644         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8645         take a regcache.  Adjust.
8646         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8647         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8648         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
8649         * linux-mips-low.c (mips_get_pc):
8650         (mips_set_pc): Change prototype to take a regcache.  Adjust.
8651         (mips_reinsert_addr): Adjust.
8652         (mips_collect_register): Change prototype to take a regcache.
8653         Adjust.
8654         (mips_supply_register):
8655         (mips_collect_register_32bit, mips_supply_register_32bit)
8656         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8657         (mips_store_fpregset): Ditto.
8658         * linux-ppc-low.c (ppc_supply_ptrace_register)
8659         (ppc_supply_ptrace_register): Ditto.
8660         (parse_spufs_run): Adjust.
8661         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8662         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8663         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8664         take a regcache.  Adjust.
8665         * linux-s390-low.c (s390_collect_ptrace_register)
8666         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8667         (s390_set_pc): Change prototype to take a regcache.  Adjust.
8668         (s390_arch_setup): Adjust.
8669         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8670         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
8671         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8672         (sparc_fill_gregset, sparc_store_gregset_from_stack)
8673         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8674         regcache.  Adjust.
8675         (sparc_breakpoint_at): Adjust.
8676         * linux-xtensa-low.c (xtensa_fill_gregset):
8677         (xtensa_store_gregset):
8678         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8679         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
8680         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8681         prototype to take a regcache.  Adjust.
8682         * win32-arm-low.c (arm_fetch_inferior_register)
8683         (arm_store_inferior_register): Change prototype to take a
8684         regcache.  Adjust.
8685         * win32-i386-low.c (i386_fetch_inferior_register)
8686         (i386_store_inferior_register): Change prototype to take a
8687         regcache.  Adjust.
8688         * win32-low.c (child_fetch_inferior_registers)
8689         (child_store_inferior_registers): Change prototype to take a
8690         regcache.  Adjust.
8691         (win32_wait): Adjust.
8692         (win32_fetch_inferior_registers): Change prototype to take a
8693         regcache.  Adjust.
8694         (win32_store_inferior_registers): Adjust.
8695         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8696         store_inferior_register>: Change prototype to take a regcache.
8697
8698 2010-01-20  Doug Evans  <dje@google.com>
8699
8700         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8701         #ifdef.
8702         (linux_wait_for_event1, linux_init_signals): Ditto.
8703         (W_STOPCODE): Provide definition if missing.
8704
8705 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
8706
8707         * linux-low.c (linux_core_of_thread): New.
8708         (compare_ints, show_process, list_threads): New.
8709         (linux_qxfer_osdata): Report threads and cores.
8710         (linux_target_op): Register linux_core_of_thread.
8711         * remote-utils.c (prepare_resume_reply): Report the core.
8712         (buffer_xml_printf): Support %d specifier.
8713         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8714         New.
8715         (handle_query): Handle qXfer:threads.  Announce availability
8716         thereof.
8717         * target.h (struct target_ops): New field core_of_thread.
8718
8719 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
8720
8721         * Makefile.in (clean): Remove new generated files.
8722         (reg-s390.o, reg-s390.c): Remove rules.
8723         (reg-s390x.o, reg-s390x.c): Likewise.
8724         (s390-linux32.o, s390-linux32.c): Add rules.
8725         (s390-linux64.o, s390-linux64.c): Likewise.
8726         (s390x-linux64.o, s390x-linux64.c): Likewise.
8727         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8728         * linux-s390-low.c: Include <elf.h>.
8729         (HWCAP_S390_HIGH_GPRS): Define if undefined.
8730         (init_registers_s390): Remove prototype.
8731         (init_registers_s390x): Likewise.
8732         (init_registers_s390_linux32): Add prototype.
8733         (init_registers_s390_linux64): Likewise.
8734         (init_registers_s390x_linux64): Likewise.
8735         (s390_num_regs_3264): New define.
8736         (s390_regmap_3264): New global variable.
8737         (s390_cannot_fetch_register): Remove obsolete check.
8738         (s390_cannot_store_register): Likewise.
8739         (s390_collect_ptrace_register): Handle upper/lower register halves.
8740         (s390_supply_ptrace_register): Likewise.
8741         (s390_fill_gregset): Update to register number changes.
8742         (s390_get_hwcap): New routine.
8743         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8744         Install appropriate regmap and register set.
8745
8746 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
8747
8748         * server.c (gdbserver_version): Update copyright year to 2010.
8749         * gdbreplay.c (gdbreplay_version): Likewise.
8750
8751 2009-12-28  Doug Evans  <dje@google.com>
8752
8753         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8754         elf/external.h.  Include <elf.h> instead but only if necessary.
8755
8756 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
8757
8758         * linux-low.c (linux_remove_process): Remove `detaching'
8759         parameter.  Don't release/detach from thread_db here.
8760         (linux_kill): Release/detach from thread_db here, ...
8761         (linux_detach): ... and here, before actually detaching.
8762         (linux_wait_1): ... and here, when a process exits.
8763         * thread-db.c (any_thread_of): New.
8764         (thread_db_free): Switch the current inferior to a thread of the
8765         passed in process.
8766
8767 2009-12-21  Doug Evans  <dje@google.com>
8768
8769         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8770
8771         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8772         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8773         warning ifndef __NR_tkill.  Move setting of errno there too.
8774         Delete unnecessary resetting of errno after syscall.
8775         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8776
8777         * configure.ac: Check for dladdr.
8778         * config.in: Regenerate.
8779         * configure: Regenerate.
8780         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8781         (try_thread_db_load): Update.
8782
8783         * linux-low.c (my_waitpid): Delete unnecessary prototype.
8784
8785 2009-12-18  Doug Evans  <dje@google.com>
8786
8787         * event-loop.c: Include unistd.h if it exists.
8788
8789         * linux-low.c (my_waitpid): Move definition away from being in
8790         between linux_tracefork_child/linux_test_for_tracefork.
8791
8792         * gdb_proc_service.h (psaddr_t): Fix type.
8793         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8794         signature to match glibc.
8795
8796 2009-12-16  Doug Evans  <dje@google.com>
8797
8798         * linux-low.c (linux_read_memory): Fix argument to read.
8799
8800 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
8801
8802         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8803         events, don't leave current_inferior pointing at null.
8804
8805 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
8806
8807         * win32-low.c (LOG): Delete.
8808         (OUTMSG): Output to stderr.
8809         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8810         on compile time LOG macro.
8811         (win32_wait): Fix debug output.
8812
8813 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
8814
8815         * win32-low.c (win32_add_one_solib): If the dll name is
8816         "ntdll.dll", prepend the system directory to the dll path.
8817
8818 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
8819
8820         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8821
8822 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
8823             Vladimir Prus  <vladimir@codesourcery.com>
8824
8825         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8826         * configure.ac: Check for __mcoldfire__ and set
8827         gdb_cv_m68k_is_coldfire.
8828         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8829         reg-cf.o and reg-m68k.o.
8830         * configure: Regenerated.
8831
8832 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
8833
8834         * linux-low.c (linux_remove_process): Add `detaching' parameter.
8835         Pass it to thread_db_free.
8836         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8837         proper `detaching' argument to linux_remove_process.
8838         * linux-low.h (thread_db_free): Add `detaching' parameter.
8839         * thread-db.c (thread_db_init): Pass false as `detaching' argument
8840         to thread_db_free.
8841         (thread_db_free): Add `detaching' parameter.  Only
8842         call td_ta_clear_event if detaching from process.
8843
8844 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
8845
8846         * thread-db.c (thread_db_free): Fix typo.
8847
8848 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
8849
8850         PR gdb/10838
8851         * thread-db.c (thread_db_free): Call td_ta_clear_event.
8852
8853 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
8854
8855         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8856         with an i686 compiler.
8857         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8858         needed.
8859         * configure: Rebuilt.
8860
8861 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
8862
8863         PR gdb/10783
8864
8865         * server.c (handle_search_memory_1): Correct read_addr initialization
8866         in loop for searching subsequent chunks.
8867
8868 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
8869
8870         * configure.ac: New --with-libthread-db option.
8871         * thread-db.c: Allow direct dependence on libthread_db.
8872         (thread_db_free): Adjust.
8873         * config.in: Regenerate.
8874         * configure: Likewise.
8875
8876 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
8877
8878         PR gdb/10757
8879         * thread-db.c (attach_thread): New function.
8880         (maybe_attach_thread): Return success/failure.
8881         (find_new_threads_callback): Adjust.
8882         (thread_db_find_new_threads): Loop until no new threads.
8883
8884 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
8885
8886         * proc-service.c (ps_lgetregs): Formatting.
8887
8888 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
8889
8890         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8891         * configure.ac: Adjust.
8892         * linux-low.h (struct process_info_private): Move members to struct
8893         thread_db.
8894         (thread_db_free, thread_db_handle_monitor_command): New prototype.
8895         * linux-low.c (linux_remove_process): Adjust.
8896         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8897         * server.c (handle_query): Move code ...
8898         (handle_monitor_command): ... here. New function.
8899         * target.h (struct target_ops): New member.
8900         * thread-db.c (struct thread_db): New.
8901         (libthread_db_search_path): New variable.
8902         (thread_db_create_event, thread_db_enable_reporting)
8903         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8904         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8905         (try_thread_db_load_1, dladdr_to_soname): New functions.
8906         (try_thread_db_load, thread_db_load_search): New functions.
8907         (thread_db_init): Search for libthread_db.
8908         (thread_db_free): New function.
8909         (thread_db_handle_monitor_command): Likewise.
8910         * config.in: Regenerate.
8911         * configure: Regenerate.
8912
8913 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
8914
8915         * spu-low.c (spu_kill): Wait for inferior to terminate.
8916         Call clear_inferiors.
8917         (spu_detach): Call clear_inferiors.
8918
8919 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8920
8921         * aclocal.m4: Regenerate.
8922         * config.in: Likewise.
8923         * configure: Likewise.
8924
8925 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
8926
8927         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8928         (parse_spufs_run): New function.
8929         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8930         (ppc_breakpoint_at): Handle SPU breakpoints.
8931
8932 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
8933
8934         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8935         (SPUFS_MAGIC): Define.
8936         (spu_enumerate_spu_ids): New function.
8937         (linux_qxfer_spu): New function.
8938         (linux_target_ops): Install linux_qxfer_spu.
8939
8940 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
8941
8942         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8943         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
8944         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8945         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8946         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8947         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8948         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8949         (init_registers_powerpc_cell32l): Add prototype.
8950         (init_registers_powerpc_cell64l): Likewise.
8951         (ppc_arch_setup): Detect Cell/B.E. architecture.
8952
8953 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8954
8955         * Makefile.in (datarootdir): New variable.
8956
8957 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
8958
8959         * linux-low.c (linux_write_memory): Update debugging output.
8960         * Makefile.in (clean): Add new descriptions.
8961         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8962         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8963         * configure.srv: Add new files for arm*-*-linux*.
8964         * linux-arm-low.c: Add new declarations.
8965         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8966         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8967         (HWCAP_VFPv3D16): New.
8968         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8969         instead of __IWMMXT__.
8970         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8971         (arm_arch_setup): New.
8972         (target_regsets): Remove #ifdef.  Add VFP regset.
8973         (the_low_target): Use arm_arch_setup.
8974
8975 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
8976
8977         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8978         the main thread again.
8979
8980 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
8981
8982         Adding Neutrino gdbserver.
8983         * configure: Regenerated.
8984         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8985         * configure.srv (i[34567]86-*-nto*): New target.
8986         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8987         * remote-utils.c [__QNX__]: Include sys/iomgr.h
8988         (nto_comctrl) [__QNX__]: New function.
8989         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8990
8991 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
8992
8993         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8994         srv_tgtobj.
8995
8996 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
8997             Pedro Alves  <pedro@codesourcery.com>
8998
8999         * win32-i386-low.c (i386_get_thread_context): Handle systems that
9000         don't support CONTEXT_EXTENDED_REGISTERS.
9001         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9002         (the_low_target): Install them.
9003         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9004         failing with ERROR_PIPE_NOT_CONNECTED.
9005
9006 2009-06-30  Doug Evans  <dje@google.com>
9007             Pierre Muller  <muller@ics.u-strasbg.fr>
9008
9009         Add h/w watchpoint support to x86-linux, win32-i386.
9010         * Makefile.in (SFILES): Add i386-low.c
9011         (i386_low_h): Define.
9012         (i386-low.o): Add dependencies.
9013         (linux-x86-low.o): Add i386-low.h dependency.
9014         (win32-i386-low.o): Ditto.
9015         * i386-low.c: New file.
9016         * i386-low.h: New file.
9017         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9018         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9019         * linux-low.c (linux_add_process): Initialize arch_private.
9020         (linux_remove_process): Free arch_private.
9021         (add_lwp): Initialize arch_private.
9022         (delete_lwp): Free arch_private.
9023         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9024         provided.
9025         * linux-low.h (process_info_private): New member arch_private.
9026         (lwp_info): New member arch_private.
9027         (linux_target_ops): New members new_process, new_thread,
9028         prepare_to_resume.
9029         (ptid_of): New macro.
9030         * linux-x86-low.c: Include stddef.h, i386-low.h.
9031         (arch_process_info): New struct.
9032         (arch_lwp_info): New struct.
9033         (x86_linux_dr_get, x86_linux_dr_set): New functions.
9034         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9035         (i386_dr_low_get_status): New function.
9036         (x86_insert_point, x86_remove_point): New functions.
9037         (x86_stopped_by_watchpoint): New function.
9038         (x86_stopped_data_address): New function.
9039         (x86_linux_new_process, x86_linux_new_thread): New functions.
9040         (x86_linux_prepare_to_resume): New function.
9041         (the_low_target): Add entries for insert_point, remove_point,
9042         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9043         prepare_to_resume.
9044         * server.c (debug_hw_points): New global.
9045         (monitor_show_help): Document set debug-hw-points.
9046         (handle_query): Process "set debug-hw-points".
9047         * server.h (debug_hw_points): Declare.
9048         (paddress): Declare.
9049         * utils.c (NUMCELLS, CELLSIZE): New macros.
9050         (get_sell, xsnprintf, paddress): New functions.
9051         * win32-arm-low.c (the_low_target): Add entries for insert_point,
9052         remove_point, stopped_by_watchpoint, stopped_data_address.
9053         * win32-i386-low.c: Include i386-low.h.
9054         (debug_reg_state): Replaces dr.
9055         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9056         (i386_dr_low_get_status): New function.
9057         (i386_insert_point, i386_remove_point): New functions.
9058         (i386_stopped_by_watchpoint): New function.
9059         (i386_stopped_data_address): New function.
9060         (i386_initial_stuff): Update.
9061         (get_thread_context,set_thread_context,i386_thread_added): Update.
9062         (the_low_target): Add entries for insert_point,
9063         remove_point, stopped_by_watchpoint, stopped_data_address.
9064         * win32-low.c (win32_insert_watchpoint): New function.
9065         (win32_remove_watchpoint): New function.
9066         (win32_stopped_by_watchpoint): New function.
9067         (win32_stopped_data_address): New function.
9068         (win32_target_ops): Add entries for insert_watchpoint,
9069         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9070         * win32-low.h (win32_target_ops): New members insert_point,
9071         remove_point, stopped_by_watchpoint, stopped_data_address.
9072
9073 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
9074
9075         * server.c (process_serial_event): Re-return unsupported, not
9076         error, if the type isn't recognized.  Re-allow supporting only
9077         insert or remove packets.  Also call require_running for
9078         breakpoints.  Add missing break statement to default case.  Tidy.
9079         * target.h (struct target_ops): Rename insert_watchpoint to
9080         insert_point, and remove_watchpoint to remove_point.
9081
9082         * linux-low.h (struct linux_target_ops): Likewise.
9083         * linux-low.c (linux_insert_watchpoint): Rename to ...
9084         (linux_insert_point): ... this.  Adjust.
9085         (linux_remove_watchpoint): Rename to ...
9086         (linux_remove_point): ... this.  Adjust.
9087         (linux_target_ops): Adjust.
9088         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9089         (cris_insert_point): ... this.
9090         (cris_remove_watchpoint): Rename to ...
9091         (cris_remove_point): ... this.
9092         (the_low_target): Adjust.
9093
9094 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
9095
9096         * server.c (handle_v_kill): Pass signal_pid to
9097         kill_inferior if multi_process is zero.
9098
9099 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
9100
9101         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9102         * target.h (target_ops): Comment for *_watchpoint to make it clear
9103         the functions can get types '0' and '1'.
9104
9105 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
9106
9107         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9108         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9109         * regcache.c (get_regcache): Likewise.
9110         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9111         * win32-low.c (child_fetch_inferior_registers): Remove check for
9112         regno 0.
9113
9114 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
9115             Pedro Alves <pedro@codesourcery.com>
9116
9117         * target.h (struct target_ops) <supports_multi_process>: New
9118         callback.
9119         (target_supports_multi_process): New.
9120         * server.c (handle_query): Even if GDB reports support, only
9121         enable multi-process if the target also supports it.  Report
9122         multi-process support only if the target backend supports it.
9123         * linux-low.c (linux_supports_multi_process): New function.
9124         (linux_target_ops): Install it as target_supports_multi_process
9125         callback.
9126
9127 2009-05-24  Doug Evans  <dje@google.com>
9128
9129         Global renaming of find_thread_pid to find_thread_ptid.
9130         * server.h (find_thread_ptid): Renamed from find_thread_pid.
9131         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9132         All callers updated.
9133
9134         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9135         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9136         directly.
9137
9138         * linux-low.c (get_stop_pc): Print pc if debug_threads.
9139         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9140         (linux_resume_one_lwp): Ditto.
9141
9142 2009-05-23  Doug Evans  <dje@google.com>
9143
9144         * linux-low.c (linux_resume_one_lwp): Change type of first arg
9145         from struct inferior_list_entry * to struct lwp_info *.
9146         All callers updated.
9147
9148 2009-05-13  Doug Evans  <dje@google.com>
9149
9150         * linux-x86-low.c: Don't include assert.h.
9151         (x86_siginfo_fixup): Use fatal, not assert.
9152         (x86_arch_setup): Fix comment.
9153
9154 2009-05-12  Doug Evans  <dje@google.com>
9155
9156         Biarch support for i386/amd64 gdbserver.
9157         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9158         Add linux-x86-low.c.
9159         (linux-i386-low.o, linux-x86-64-low.o): Delete.
9160         (linux-x86-low.o): Add.
9161         * linux-x86-64-low.c: Delete.
9162         * linux-i386-low.c: Delete.
9163         * linux-x86-low.c: New file.
9164         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9165         linux-x86-low.o.
9166         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9167         linux-x86-low.o.
9168         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9169         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9170         (linux_child_pid_to_exec_file): New function.
9171         (elf_64_header_p, elf_64_file_p): New functions.
9172         (siginfo_fixup): New function.
9173         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
9174         give target a chance to convert layout.
9175         * linux-low.h (linux_target_ops): New member siginfo_fixup.
9176         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9177
9178 2009-05-07  Doug Evans  <dje@google.com>
9179
9180         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9181         (regsets_store_inferior_registers): Ditto.
9182
9183 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
9184
9185         PR server/10048
9186
9187         * linux-low.c (must_set_ptrace_flags): Delete.
9188         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9189         of the global.
9190         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
9191         `lwp->must_set_ptrace_flags' instead.
9192         (linux_wait_for_event_1): Set ptrace options here.
9193         (linux_wait_1): ... not here.
9194
9195 2009-04-30  Doug Evans  <dje@google.com>
9196
9197         * inferiors.c (started_inferior_callback): New function.
9198         (attached_inferior_callback): New function.
9199         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9200         * server.c (print_started_pid, print_attached_pid): New functions.
9201         (detach_or_kill_for_exit): New function.
9202         (main): Call it instead of for_each_inferior (kill_inferior_callback).
9203         * server.h (have_started_inferiors_p): Declare.
9204         (have_attached_inferiors_p): Declare.
9205
9206         * inferiors.c (remove_process): Fix memory leak, free process.
9207         * linux-low.c (linux_remove_process): New function.
9208         (linux_kill): Call it instead of remove_process.
9209         (linux_detach, linux_wait_1): Ditto.
9210
9211 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
9212
9213         * configure.srv: Add x86 Windows CE target.
9214
9215 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
9216
9217         * inferiors.c (get_thread_process): Make global.
9218         * server.h (get_thread_process): Add prototype.
9219         * thread-db.c (find_one_thread): Use get_thread_process
9220         instead of current_process.
9221         (thread_db_get_tls_address): Do not crash if called when
9222         thread layer is not yet initialized.
9223
9224 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
9225
9226         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9227         * spu-low.c (current_tid): Rename to ...
9228         (current_ptid): ... this.
9229         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9230         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9231         ptid_get_lwp (current_ptid) instead of current_tid.
9232         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9233         instead of current_tid.  Use find_process_pid to verify pid
9234         argument is valid.  Pass proper argument to remove_process.
9235         (spu_thread_alive): Compare current_ptid instead of current_tid.
9236         (spu_resume): Likewise.
9237
9238 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
9239
9240         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9241         variable.
9242
9243 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
9244
9245         Implement the multiprocess extensions, and add linux multiprocess
9246         support.
9247
9248         * server.h (ULONGEST): Declare.
9249         (struct ptid, ptid_t): New.
9250         (minus_one_ptid, null_ptid): Declare.
9251         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9252         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9253         (struct inferior_list_entry): Change `id' type from unsigned from
9254         to ptid_t.
9255         (struct sym_cache, struct breakpoint, struct
9256         process_info_private): Forward declare.
9257         (struct process_info): Declare.
9258         (current_process): Declare.
9259         (all_processes): Declare.
9260         (initialize_inferiors): Declare.
9261         (add_thread): Adjust to use ptid_t.
9262         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9263         (add_process, remove_process, find_thread_pid): Declare.
9264         (find_inferior_id): Adjust to use ptid_t.
9265         (cont_thread, general_thread, step_thread): Change type to ptid_t.
9266         (multi_process): Declare.
9267         (push_event): Adjust to use ptid_t.
9268         (read_ptid, write_ptid): Declare.
9269         (prepare_resume_reply): Adjust to use ptid_t.
9270         (clear_symbol_cache): Declare.
9271         * inferiors.c (all_processes): New.
9272         (null_ptid, minus_one_ptid): New.
9273         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9274         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9275         (add_thread): Change unsigned long to ptid.  Remove gdb_id
9276         parameter.  Adjust.
9277         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9278         (gdb_id_to_thread): Rename to ...
9279         (find_thread_pid): ... this.  Change unsigned long to ptid.
9280         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9281         (loaded_dll, pull_pid_from_list): Adjust.
9282         (add_process, remove_process, find_process_pid)
9283         (get_thread_process, current_process, initialize_inferiors): New.
9284         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9285         (struct target_waitstatus) <related_pid>: Ditto.
9286         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
9287         return type to int.
9288         (struct target_ops) <join>: Add `pid' argument.
9289         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9290         (struct target_ops) <wait>: Add `ptid' field.  Change return type
9291         to ptid.
9292         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9293         (mywait): Add `ptid' argument.  Change return type to ptid_t.
9294         (target_pid_to_str): Declare.
9295         * target.c (set_desired_inferior): Adjust to use ptids.
9296         (mywait): Add new `ptid' argument.  Adjust.
9297         (target_pid_to_str): New.
9298         * mem-break.h (free_all_breakpoints): Declare.
9299         * mem-break.c (breakpoints): Delelete.
9300         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9301         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9302         to use per-process breakpoint list.
9303         (free_all_breakpoints): New.
9304         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9305         (symbol_cache, all_symbols_looked_up): Delete.
9306         (hexchars): New.
9307         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9308         read_ptid): New.
9309         (prepare_resume_reply): Change ptid argument's type from unsigned
9310         long to ptid_t.  Adjust.  Implement W;process and X;process.
9311         (free_sym_cache, clear_symbol_cache): New.
9312         (look_up_one_symbol): Adjust to per-process symbol cache.  *
9313         * server.c (cont_thread, general_thread, step_thread): Change type
9314         to ptid_t.
9315         (attached): Delete.
9316         (multi_process): New.
9317         (last_ptid): Change type to ptid_t.
9318         (struct vstop_notif) <ptid>: Change type to ptid_t.
9319         (queue_stop_reply, push_event): Change `ptid' argument's type to
9320         ptid_t.
9321         (discard_queued_stop_replies): Add `pid' argument.
9322         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
9323         changes.  Don't reference the `attached' global.
9324         (attach_inferior): Adjust to mywait interface changes.
9325         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
9326         features.  Handle and report "multiprocess+".  Handle
9327         "qAttached:PID".
9328         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
9329         changes.
9330         (handle_v_kill): New.
9331         (handle_v_stopped): Adjust to use target_pid_to_str.
9332         (handle_v_requests): Allow multiple attaches and runs when
9333         multiprocess extensions are in effect.  Handle "vKill".
9334         (myresume): Adjust to use ptids.
9335         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
9336         (handle_status): Adjust to discard_queued_stop_replies interface
9337         change.
9338         (first_thread_of, kill_inferior_callback)
9339         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9340         (main): Call initialize_inferiors.  Adjust to use ptids, killing
9341         and detaching from all inferiors.  Handle multiprocess packet
9342         variants.
9343         * linux-low.h: Include gdb_proc_service.h.
9344         (struct process_info_private): New.
9345         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9346         <lwpid_of>: Use ptid_get_lwp.
9347         (get_lwp_thread): Adjust.
9348         (struct lwp_info): Add `dead' member.
9349         (find_lwp_pid): Declare.
9350         * linux-low.c (thread_db_active): Delete.
9351         (new_inferior): Adjust comment.
9352         (inferior_pid): Delete.
9353         (linux_add_process): New.
9354         (handle_extended_wait): Adjust.
9355         (add_lwp): Change unsigned long to ptid.
9356         (linux_create_inferior): Add process to processes table.  Adjust
9357         to use ptids.  Don't set new_inferior here.
9358         (linux_attach_lwp): Rename to ...
9359         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
9360         it.  Adjust to use ptids.
9361         (linux_attach_lwp): New.
9362         (linux_attach): Add process to processes table.  Don't set
9363         new_inferior here.
9364         (struct counter): New.
9365         (second_thread_of_pid_p, last_thread_of_process_p): New.
9366         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
9367         multiple processes.
9368         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
9369         processes.  Remove process from process table.
9370         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
9371         to multiple processes.
9372         (any_thread_of): New.
9373         (linux_detach): Add `pid' argument, and handle it.  Remove process
9374         from processes table.
9375         (linux_join): Add `pid' argument.  Handle it.
9376         (linux_thread_alive): Change unsighed long argument to ptid_t.
9377         Consider dead lwps as not being alive.
9378         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
9379         threads we're not interested in.
9380         (same_lwp, find_lwp_pid): New.
9381         (linux_wait_for_lwp): Change `pid' argument's type from int to
9382         ptid_t.  Adjust.
9383         (linux_wait_for_event): Rename to ...
9384         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
9385         from int to ptid_t.  Adjust.
9386         (linux_wait_for_event): New.
9387         (linux_wait_1): Add `ptid' argument.  Change return type to
9388         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
9389         that exit from the process table.
9390         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
9391         Adjust.
9392         (mark_lwp_dead): New.
9393         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
9394         stopping all threads, mark its main lwp as dead.
9395         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9396         ptids.
9397         (fetch_register, usr_store_inferior_registers)
9398         (regsets_fetch_inferior_registers)
9399         (regsets_store_inferior_registers, linux_read_memory)
9400         (linux_write_memory): Inline `inferior_pid'.
9401         (linux_look_up_symbols): Adjust to use per-process
9402         `thread_db_active'.
9403         (linux_request_interrupt): Adjust to use ptids.
9404         (linux_read_auxv): Inline `inferior_pid'.
9405         (initialize_low): Don't reference thread_db_active.
9406         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9407         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9408         (ps_getpid): Return the pid of the current inferior.
9409         * thread-db.c (proc_handle, thread_agent): Delete.
9410         (thread_db_create_event, thread_db_enable_reporting): Adjust to
9411         per-process data.
9412         (find_one_thread): Change argument type to ptid_t.  Adjust to
9413         per-process data.
9414         (maybe_attach_thread): Adjust to per-process data and ptids.
9415         (thread_db_find_new_threads): Ditto.
9416         (thread_db_init): Ditto.
9417         * spu-low.c (spu_create_inferior, spu_attach): Add process to
9418         processes table.  Adjust to use ptids.
9419         (spu_kill, spu_detach): Adjust interface.  Remove process from
9420         processes table.
9421         (spu_join, spu_thread_alive): Adjust interface.
9422         (spu_wait): Adjust interface.  Remove process from processes
9423         table.  Adjust to use ptids.
9424         * win32-low.c (current_inferior_tid): Delete.
9425         (current_inferior_ptid): New.
9426         (debug_event_ptid): New.
9427         (thread_rec): Take a ptid.  Adjust.
9428         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
9429         (child_delete_thread): Ditto.
9430         (do_initial_child_stuff): Add `attached' argument.  Add process to
9431         processes table.
9432         (child_fetch_inferior_registers, child_store_inferior_registers):
9433         Adjust.
9434         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9435         (win32_attach): Pass 1 to do_initial_child_stuff.
9436         (win32_kill): Adjust interface.  Remove process from processes
9437         table.
9438         (win32_detach): Ditto.
9439         (win32_join): Adjust interface.
9440         (win32_thread_alive): Take a ptid.
9441         (win32_resume): Adjust to use ptids.
9442         (get_child_debug_event): Ditto.
9443         (win32_wait): Adjust interface.  Remove exiting process from
9444         processes table.
9445
9446 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
9447
9448         Non-stop mode support.
9449
9450         * server.h (non_stop): Declare.
9451         (gdb_client_data, handler_func): Declare.
9452         (delete_file_handler, add_file_handler, start_event_loop):
9453         Declare.
9454         (handle_serial_event, handle_target_event, push_event)
9455         (putpkt_notif): Declare.
9456         * target.h (enum resume_kind): New.
9457         (struct thread_resume): Replace `step' field by `kind' field.
9458         (TARGET_WNOHANG): Define.
9459         (struct target_ops) <wait>: Add `options' argument.
9460         <supports_non_stop, async, start_non_stop>: New fields.
9461         (target_supports_non_stop, target_async): New.
9462         (start_non_stop): Declare.
9463         (mywait): Add `options' argument.
9464         * target.c (mywait): Add `options' argument.  Print child exit
9465         notifications here.
9466         (start_non_stop): New.
9467         * server.c (non_stop, own_buf, mem_buf): New globals.
9468         (struct vstop_notif): New.
9469         (notif_queue): New global.
9470         (queue_stop_reply, push_event, discard_queued_stop_replies)
9471         (send_next_stop_reply): New.
9472         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
9473         interface changes.
9474         (attach_inferior): In non-stop mode, don't wait for the target
9475         here.
9476         (handle_general_set): Handle QNonStop.
9477         (handle_query): When handling qC, return the current general
9478         thread, instead of the first thread of the list.
9479         (handle_query): If the backend supports non-stop mode, include
9480         QNonStop+ in the qSupported query response.
9481         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
9482         and non-stop mode.
9483         (handle_v_attach, handle_v_run): Handle non-stop mode.
9484         (handle_v_stopped): New.
9485         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
9486         (myresume): Adjust to use resume_kind.  Handle non-stop.
9487         (queue_stop_reply_callback): New.
9488         (handle_status): Handle non-stop mode.
9489         (main): Clear non_stop flag on reconnection.  Use the event-loop.
9490         Refactor serial protocol handling from here ...
9491         (process_serial_event): ... to this new function.  When GDB
9492         selects any thread, select one here.  In non-stop mode, wait until
9493         GDB acks all pending events before exiting.
9494         (handle_serial_event, handle_target_event): New.
9495         * remote-utils.c (remote_open): Install remote_desc in the event
9496         loop.
9497         (remote_close): Remove remote_desc from the event loop.
9498         (putpkt_binary): Rename to...
9499         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
9500         (putpkt_binary): New as wrapper around putpkt_binary_1.
9501         (putpkt_notif): New.
9502         (prepare_resume_reply): In non-stop mode, don't change the
9503         general_thread.
9504         * event-loop.c: New.
9505         * Makefile.in (OBJ): Add event-loop.o.
9506         (event-loop.o): New rule.
9507
9508         * linux-low.h (pid_of): Moved here.
9509         (lwpid_of): New.
9510         (get_lwp_thread): Use lwpid_of.
9511         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
9512         * linux-low.c (pid_of): Delete.
9513         (inferior_pid): Use lwpid_of.
9514         (linux_event_pipe): New.
9515         (target_is_async_p): New.
9516         (delete_lwp): New.
9517         (handle_extended_wait): Use lwpid_of.
9518         (add_lwp): Don't set lwpid field.
9519         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
9520         (linux_kill_one_lwp): If killing a running lwp, stop it first.
9521         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
9522         (linux_detach_one_lwp): If detaching from a running lwp, stop it
9523         first.  Adjust to linux_wait_for_event interface changes.  Use
9524         lwpid_of.
9525         (linux_detach): Don't delete the main lwp here.
9526         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
9527         (status_pending_p): Don't consider explicitly suspended lwps.
9528         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9529         pointer.  Add OPTIONS argument.  Change return type to int.  Use
9530         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
9531         (linux_wait_for_event): Take an integer pid instead of a lwp_info
9532         pointer.  Add status pointer argument.  Return a pid instead of a
9533         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
9534         changes.  In non-stop mode, don't switch to a random thread.
9535         (linux_wait): Rename to...
9536         (linux_wait_1): ... this.  Add target_options argument, and handle
9537         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
9538         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
9539         clean exit and signal exit code.  Don't stop all threads in
9540         non-stop mode.  In all-stop mode, only stop all threads when
9541         reporting a stop to GDB.  Handle explicit thread stop requests.
9542         (async_file_flush, async_file_mark): New.
9543         (linux_wait): New.
9544         (send_sigstop): Use lwpid_of.
9545         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
9546         interface changes.  In non-stop mode, don't switch to a random
9547         thread.
9548         (linux_resume_one_lwp): Use lwpid_of.
9549         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9550         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
9551         non-stop mode, don't look for pending flag in all threads.
9552         (resume_status_pending_p): Don't consider explicitly suspended
9553         threads.
9554         (my_waitpid): Reimplement.  Emulate __WALL.
9555         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9556         Use lwpid_of.
9557         (sigchld_handler, linux_supports_non_stop, linux_async)
9558         (linux_start_non_stop): New.
9559         (linux_target_ops): Register linux_supports_non_stop, linux_async
9560         and linux_start_non_stop.
9561         (initialize_low): Install SIGCHLD handler.
9562         * thread-db.c (thread_db_create_event, find_one_thread)
9563         (thread_db_get_tls_address): Use lwpid_of.
9564         * win32-low.c (win32_detach): Adjust to use resume_kind.
9565         (win32_wait): Add `options' argument.
9566         * spu-low.c (spu_resume): Adjust to use resume_kind.
9567         (spu_wait): Add `options' argument.
9568
9569 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
9570
9571         Decouple target code from remote protocol.
9572
9573         * target.h (enum target_waitkind): New.
9574         (struct target_waitstatus): New.
9575         (struct target_ops) <wait>: Return an unsigned long.  Take a
9576         target_waitstatus pointer instead of a char pointer.
9577         (mywait): Likewise.
9578         * target.c (mywait): Change prototype to return an unsigned long.
9579         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
9580         * server.h (thread_from_wait, old_thread_from_wait): Delete
9581         declarations.
9582         (prepare_resume_reply): Change prototype to take a
9583         target_waitstatus.
9584         * server.c (thread_from_wait, old_thread_from_wait): Delete.
9585         (last_status, last_ptid): New.
9586         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
9587         pid instead of a signal.
9588         (attach_inferior): Remove "status" and "signal" parameters.
9589         Adjust.
9590         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9591         not as an address.
9592         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9593         (handle_v_requests, myresume): Remove "status" and "signal"
9594         parameters.  Adjust.
9595         (handle_status): New.
9596         (main): Delete local `status'.  Adjust.
9597         * remote-utils.c: Include target.h.
9598         (prepare_resume_reply): Change prototype to take a
9599         target_waitstatus.  Adjust.
9600
9601         * linux-low.c (linux_wait): Adjust to new target_ops->wait
9602         interface.
9603         * spu-low.c (spu_wait): Adjust.
9604         * win32-low.c (enum target_waitkind, struct target_waitstatus):
9605         Delete.
9606         (win32_wait): Adjust.
9607
9608 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
9609
9610         * target.h (struct thread_resume): Delete leave_stopped member.
9611         (struct target_ops): Add a `n' argument to the `resume' callback.
9612         * server.c (start_inferior): Adjust.
9613         (handle_v_cont, myresume): Adjust.
9614         * linux-low.c (check_removed_breakpoint): Adjust to resume
9615         interface change, and to removed leave_stopped field.
9616         (resume_ptr): Delete.
9617         (struct thread_resume_array): New.
9618         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
9619         resume interface change.
9620         (linux_continue_one_thread, linux_queue_one_thread)
9621         (resume_status_pending_p): Check if the resume field is NULL
9622         instead of checking the leave_stopped member.
9623         (linux_resume): Adjust to the target resume interface change.
9624         * spu-low.c (spu_resume): Adjust to the target resume interface
9625         change.
9626         * win32-low.c (win32_detach, win32_resume): Ditto.
9627
9628 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
9629
9630         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9631         flag.
9632         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9633         pending.
9634         (linux_continue_one_thread): Only preserve the stepping flag if
9635         there's a pending breakpoint.
9636
9637 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
9638
9639         * server.c (main): After the inferior having exited, call
9640         remote_close before exiting gdbserver.
9641
9642 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
9643
9644         Fix size of FPSCR in Power 7 processors.
9645         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9646         (PPC_FEATURE_HAS_DFP): New #define.
9647         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9648         size of the FPSCR.
9649
9650 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
9651
9652         * server.c (handle_query) Whitespace and formatting.
9653
9654 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
9655
9656         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9657         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9658         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9659         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9660         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9661         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9662         Makefile.in, configure.ac: Fix whitespace throughout.
9663         * configure: Regenerate.
9664
9665 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
9666
9667         * inferiors.c (find_inferior): Make it safe for the callback
9668         function to delete the currently iterated inferior.
9669
9670 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
9671
9672         * Makefile.in (linuw_low_h): Move higher.
9673         (thread-db.o): Depend on $(linux_low_h).
9674
9675 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
9676
9677         Rename "process" to "lwp" throughout.
9678
9679         * linux-low.c (all_processes): Rename to...
9680         (all_lwps): ... this.
9681         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9682         (add_process): Rename to ...
9683         (add_lwp): ... this.  Adjust.
9684         (linux_create_inferior): Adjust.
9685         (linux_attach_lwp): Adjust.
9686         (linux_attach): Adjust.
9687         (linux_kill_one_process): Rename to ...
9688         (linux_kill_one_lwp): ... this.  Adjust.
9689         (linux_kill): Adjust.
9690         (linux_detach_one_process): Rename to ...
9691         (linux_detach_one_lwp): ... this.  Adjust.
9692         (linux_detach): Adjust.
9693         (check_removed_breakpoint): Adjust.
9694         (status_pending_p): Adjust.
9695         (linux_wait_for_process): Rename to ...
9696         (linux_wait_for_lwp): ... this.  Adjust.
9697         (linux_wait_for_event): Adjust.
9698         (send_sigstop): Adjust.
9699         (wait_for_sigstop): Adjust.
9700         (stop_all_processes): Rename to ...
9701         (stop_all_lwps): ... this.
9702         (linux_resume_one_process): Rename to ...
9703         (linux_resume_one_lwp): ... this.  Adjust.
9704         (linux_set_resume_request, linux_continue_one_thread)
9705         (linux_queue_one_thread, resume_status_pending_p)
9706         (usr_store_inferior_registers, regsets_store_inferior_registers)
9707         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9708         Adjust.
9709         * linux-low.h (get_process): Rename to ...
9710         (get_lwp): ... this.  Adjust.
9711         (get_thread_process): Rename to ...
9712         (get_thread_lwp): ... this.  Adjust.
9713         (get_process_thread): Rename to ...
9714         (get_lwp_thread): ... this.  Adjust.
9715         (struct process_info): Rename to ...
9716         (struct lwp_info): ... this.
9717         (all_processes): Rename to ...
9718         (all_lwps): ... this.
9719         * proc-service.c (ps_lgetregs): Adjust.
9720         * thread-db.c (thread_db_create_event, find_one_thread)
9721         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9722
9723 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
9724
9725         * server.c (handle_query): Handle "qAttached".
9726
9727 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
9728
9729         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9730         GPLv3, update license URL.
9731
9732 2009-03-01  Doug Evans  <dje@google.com>
9733
9734         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9735         (server_h): Add gdb_signals.h.
9736         (signals.o): Update.
9737         * server.h (target_signal_from_host,target_signal_to_host_p)
9738         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9739
9740 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
9741
9742         * remote-utils.c (getpkt): Also generate remote-debug
9743         information if noack_mode is set.
9744
9745 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
9746
9747         * server.c (handle_query): Report qXfer:siginfo:read and
9748         qXfer:siginfo:write as supported and handle them.
9749         * target.h (struct target_ops) <qxfer_siginfo>: New field.
9750         * linux-low.c (linux_xfer_siginfo): New.
9751         (linux_target_ops): Set it.
9752
9753 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
9754
9755         * server.c (gdbserver_usage): Mention --remote-debug.
9756         (main): Accept '--remote-debug' switch.
9757
9758 2009-01-18  Doug Evans  <dje@google.com>
9759
9760         * regcache.c (new_register_cache): No need to check result of xcalloc.
9761         * server.c (handle_search_memory): Back out calls to xmalloc,
9762         result is checked and error is returned to user upon failure.
9763         (handle_query): Ditto.  Add more checks for result of malloc.
9764         (handle_v_cont): Check result of malloc, report error back to
9765         user upon failure.
9766         (handle_v_run): Ditto.  Call freeargv.
9767         * server.h (freeargv): Declare.
9768         * utils.c (freeargv): New fn.
9769
9770 2009-01-15  Doug Evans  <dje@google.com>
9771
9772         * gdbreplay.c (perror_with_name): Make arg const char *.
9773         * server.h (target_signal_to_name): Make return type const char *.
9774         * thread-db.c (thread_db_err_str): Make return type const char *.
9775         * utils.c (perror_with_name): Make arg const char *.
9776
9777 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
9778
9779         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9780         when handling a EXIT_PROCESS_DEBUG_EVENT.
9781
9782 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
9783
9784         * gdbreplay.c (gdbreplay_version): Update copyright year.
9785         * server.c (gdbserver_version): Likewise.
9786
9787 2009-01-05  Doug Evans  <dje@google.com>
9788
9789         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9790         (handle_extended_wait): Improve comment.
9791
9792 2008-12-13  Doug Evans  <dje@google.com>
9793
9794         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9795         * server.h (ATTR_MALLOC): New macro.
9796         (xmalloc,xcalloc,xstrdup): Declare.
9797         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9798         * inferiors.c: Ditto.
9799         * linux-low.c: Ditto.
9800         * mem-break.c: Ditto.
9801         * regcache.c: Ditto.
9802         * remote-utils.c: Ditto.
9803         * server.c: Ditto.
9804         * target.c: Ditto.
9805         * win32-low.c: Ditto.
9806
9807 2008-12-12  Doug Evans  <dje@google.com>
9808
9809         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9810         in debugging printf.
9811
9812         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9813
9814 2008-12-09  Doug Evans  <dje@google.com>
9815
9816         * linux-low.h (struct process_info): Delete member tid, unused.
9817         * thread-db.c (find_one_thread): Update.
9818         (maybe_attach_thread): Update.
9819
9820 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
9821
9822         * target.h (struct target_ops): Add qxfer_osdata member.
9823         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9824         and dirent.h.
9825         (linux_qxfer_osdata): New functions.
9826         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9827         callback.
9828         * server.c (handle_query): Handle "qXfer:osdata:read:".
9829         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9830         (buffer_xml_printf): New functions.
9831         * server.h (struct buffer): New.
9832         (buffer_grow_str, buffer_grow_str0): New macros.
9833         (buffer_grow, buffer_free, buffer_init, buffer_finish)
9834         (buffer_xml_printf): Declare.
9835
9836 2008-11-24  Doug Evans  <dje@google.com>
9837
9838         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9839
9840 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
9841
9842         * server.c (handle_v_run): Always use the supplied argument list.
9843
9844 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
9845
9846         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9847         (xtensa_regmap_table): Add entry for scompare1.
9848
9849 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
9850
9851         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9852         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9853         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9854         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9855         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9856         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9857         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9858         XML target descriptions.
9859         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9860         when inferior is running on an ISA 2.05 or later processor.  Add
9861         special case to return offset for full 64-bit slot of FPSCR when
9862         in 32-bits.
9863
9864 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
9865
9866         * Makefile.in (SFILES, clean): Added sparc64 files.
9867         (reg-sparc64.o, reg-sparc64.c): New.
9868         * configure.srv (sparc*-*-linux*): New configuration.
9869         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9870         syscall arguments for SPARC.
9871         (regsets_store_inferior_registers): Likewise.
9872         * linux-sparc-low.c: New file.
9873
9874 2008-10-21  Doug Evans  <dje@google.com>
9875
9876         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9877         (READLINE_DIR,READLINE_DEP): Delete.
9878         (INTERNAL_CFLAGS): Update.
9879         (LINTFLAGS): Update.
9880
9881 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
9882
9883         * server.c (handle_v_run): If GDB didn't specify an argv, use the
9884         whole argv from the last run, not just argv[0].
9885
9886 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
9887
9888         * regcache.c (new_register_cache): Return NULL if the register
9889         cache size isn't known yet.
9890         (free_register_cache): Avoid dereferencing a NULL regcache.
9891
9892 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
9893
9894         * configure.srv: Merge MIPS and MIPS64.
9895
9896 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
9897
9898         * Makefile.in (uninstall): Apply $(EXEEXT) too.
9899
9900 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
9901
9902         * Makefile.in: Add required vsx dependencies.
9903
9904         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9905         Declare init_registers_powerpc_vsx32l.
9906         Declare init_registers_powerpc_vsx64l.
9907         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9908         (ppc_arch_setup): Check for VSX in hwcap.
9909         (ppc_fill_vsxregset): New function.
9910         (ppc_store_vsxregset): New function.
9911         Add new VSX entry in regset_info target_regsets.
9912
9913         * configure.srv: Add new VSX dependencies.
9914
9915 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
9916
9917         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9918         (remote_open): Set or clear transport_is_reliable.
9919         (putpkt_binary): Don't expect acks in noack mode.
9920         (getpkt): Don't send ack/nac in noack mode.
9921         * server.c (handle_general_set): Handle QStartNoAckMode.
9922         (handle_query): If connected by tcp pass QStartNoAckMode+ in
9923         qSupported.
9924         (main): Reset noack_mode on every connection.
9925         * server.h (noack_mode): Declare.
9926
9927 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9928
9929         * Makefile.in (GDBREPLAY_OBS): New variable.
9930         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9931
9932 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
9933             Daniel Jacobowitz  <dan@codesourcery.com>
9934
9935         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9936         (usr_store_inferior_registers): Likewise.
9937         (regsets_store_inferior_registers): Likewise.
9938
9939 2008-07-31  Rolf Jansen  <rj@surtec.com>
9940             Pedro Alves  <pedro@codesourcery.com>
9941
9942         * configure.ac: Check for memmem declaration.
9943         * server.c [HAVE_MALLOC_H]: Include malloc.h.
9944         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9945         (disable_packet_qfThreadInfo): Unconditionally compile.
9946         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9947         * configure, config.in: Regenerate.
9948
9949 2008-07-28  Doug Kwan  <dougkwan@google.com>
9950
9951         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9952         (linux_write_memory): Remove declaration of errno.
9953
9954 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
9955
9956         * linux-low.c (handle_extended_wait): Do not use "status"
9957         variable uninitialized.
9958
9959 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
9960
9961         * server.c (handle_v_attach): Inhibit reporting dll changes.
9962
9963 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
9964
9965         * remote-utils.c (prepare_resume_reply): If requested, don't
9966         output "thread:TID" in the T stop reply.
9967
9968         * server.c (disable_packet_vCont, disable_packet_Tthread)
9969         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9970         (handle_query): If requested, disable support for qC, qfThreadInfo
9971         and qsThreadInfo.
9972         (handle_v_requests): If requested, disable support for vCont.
9973         (gdbserver_show_disableable): New.
9974         (main): Handle --disable-packet and --disable-packet=LIST.
9975
9976         * server.h (disable_packet_vCont, disable_packet_Tthread)
9977         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9978
9979 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
9980
9981         * server.c (gdbserver_usage): Mention --version.
9982
9983 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
9984
9985         * Makefile.in (gdbreplay.o): New rule.
9986
9987 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
9988
9989         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9990         message, not gdbserver.
9991
9992 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
9993             Nathan Sidwell  <nathan@codesourcery.com>
9994             Joseph Myers  <joseph@codesourcery.com>
9995
9996         * acinclude.m4: Include ../../config/acx.m4.
9997         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9998         * configure, config.in: Regenerate.
9999         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10000         * server.c (gdbserver_version): Print PKGVERSION.
10001         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
10002         (main): Adjust gdbserver_usage calls.
10003         * gdbreplay.c (version, host_name): Add declarations.
10004         (gdbreplay_version, gdbreplay_usage): New.
10005         (main): Accept --version and --help options.
10006
10007 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
10008
10009         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10010         (arm_breakpoint_at): Handle Thumb.
10011         (the_low_target): Add comment.
10012
10013 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
10014
10015         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10016
10017 2008-05-09  Doug Evans  <dje@google.com>
10018
10019         * server.h (decode_search_memory_packet): Declare.
10020         * remote-utils.c (decode_search_memory_packet): New fn.
10021         * server.c (handle_search_memory_1): New fn.
10022         (handle_search_memory): New fn.
10023         (handle_query): Process qSearch:memory packets.
10024
10025 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10026
10027         * regcache.c (registers_length): Remove.
10028         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10029         full register packet.
10030         * regcache.h (registers_length): Remove prototype.
10031         * server.h (PBUFSIZ): Define to 16384.
10032
10033 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
10034
10035         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10036         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10037         powerpc-64l.o, and powerpc-altivec64l.o.
10038         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10039         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10040         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10041         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10042         rs6000/power-linux.xml, and rs6000/power64-linux.xml
10043         to srv_xmlfiles.
10044
10045         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10046         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10047         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10048         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10049         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10050         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10051         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10052         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10053         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10054         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10055         (clean): Update.
10056
10057         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10058         (init_registers_powerpc_32l): ... this new prototype.
10059         (init_registers_powerpc_32): Remove, replace by ...
10060         (init_registers_powerpc_altivec32l): ... this new prototype.
10061         (init_registers_powerpc_e500): Remove, replace by ...
10062         (init_registers_powerpc_e500l): ... this new prototype.
10063         (init_registers_ppc64): Remove, replace by ...
10064         (init_registers_powerpc_64l): ... this new prototype.
10065         (init_registers_powerpc_64): Remove, replace by ...
10066         (init_registers_powerpc_altivec64l): ... this new prototype.
10067         (ppc_num_regs): Set to 73.
10068         (PT_ORIG_R3, PT_TRAP): Define if necessary.
10069         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10070         (ppc_cannot_store_register): Handle orig_r3 and trap.
10071         (ppc_arch_setup): Update init_registers_... calls.
10072         (ppc_fill_gregset): Handle orig_r3 and trap.
10073
10074         * inferiors.c (clear_inferiors): Reset current_inferior.
10075
10076 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
10077
10078         * acinclude.m4: Add override.m4.
10079         * configure: Regenerate.
10080
10081 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10082
10083         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10084         initial call to init_register_ppc64.
10085
10086 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10087
10088         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10089         single powerpc*-*-linux* case.
10090         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10091
10092 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
10093
10094         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10095         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10096         from reg_xmlfiles.
10097         * linux-ppc-low.c: Include <elf.h>.
10098         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10099         (ppc_hwcap): New global variable.
10100         (ppc_regmap): Remove __SPE__ #ifdef sections.
10101         (ppc_regmap_e500): New global variable.
10102         (ppc_cannot_store_register): Update __SPE__ special case.
10103         (ppc_get_hwcap): New function.
10104         (ppc_arch_setup): Use it to determine whether inferior supports
10105         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
10106         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10107         Do not access registers if target does not support AltiVec.
10108         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10109         Do not access registers if target does not support SPE.
10110         (target_regsets): Unconditionally include AltiVec and SPE regsets.
10111
10112 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
10113
10114         * linux-low.c (disabled_regsets, num_regsets): New.
10115         (use_regsets_p): Delete.
10116         (linux_wait_for_process): Clear disabled_regsets.
10117         (regsets_fetch_inferior_registers): Check and set it.
10118         (regsets_store_inferior_registers): Likewise.
10119         (linux_fetch_registers, linux_store_registers): Do not use
10120         use_regsets_p.
10121         (initialize_low): Allocate disabled_regsets.
10122
10123 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
10124
10125         * Makefile.in (LIBOBJS): New.
10126         (OBS): Use LIBOBJS.
10127         (memmem.o): New rule.
10128         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10129         * configure: Regenerated.
10130
10131 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
10132
10133         * server.c (handle_query): Never return "unsupported" for
10134         qXfer:features:read queries.
10135
10136 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
10137
10138         * server.c (get_features_xml): Fix inverted condition.
10139         (handle_query): Always support qXfer:feature:read.
10140
10141 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
10142
10143         * server.c (wrapper_argv): New.
10144         (start_inferior): Handle wrapper_argv.  If set, expect an extra
10145         trap.
10146         (gdbserver_usage): Document --wrapper.
10147         (main): Parse --wrapper.
10148
10149 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10150
10151         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10152         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10153         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10154         (ppc_set_pc): Likewise.
10155         (ppc_arch_setup): New function.
10156         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10157         of collect_register.
10158         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10159
10160 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10161
10162         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10163         instead of linux-ppc64-low.o.
10164         * linux-ppc64-low.c: Remove file.
10165         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10166         (linux-ppc64-low.o): Remove rule.
10167
10168         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10169         (init_registers_powerpc_64): Likewise.
10170         (ppc_regmap): Conditionally define depending on __powerpc64__.
10171         (ppc_cannot_store_register): Do not special-case "fpscr" when
10172         compiled on __powerpc64__.
10173         (ppc_collect_ptrace_register): New function.
10174         (ppc_supply_ptrace_register): New function.
10175         (ppc_breakpoint): Change type to "unsigned int".
10176         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10177         (the_low_target): Conditionally provide initializers for the
10178         arch_setup member depending on __powerpc64__.  Install
10179         collect_ptrace_register and supply_ptrace_register members.
10180
10181 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10182
10183         * regcache.h (gdbserver_xmltarget): Add extern declaration.
10184         * server.c (gdbserver_xmltarget): Define.
10185         (get_features_xml): Use it to replace "target.xml" and arch_string.
10186
10187         * configure.srv: Remove srv_xmltarget.  Add XML files that were
10188         mentioned there to srv_xmlfiles instead.  Remove conditional tests
10189         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10190         srv_xmlfiles and srv_regobj to include all possible choices.
10191         * configure.ac (srv_xmltarget): Remove.
10192         (srv_xmlfiles): Do not add "target.xml".
10193         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10194         checks for supplementary target information.
10195         * configure: Regenerate.
10196         * Makefile.in (XML_TARGET): Remove.
10197         (target.xml): Remove rule.
10198         (clean): Do not clean up target.xml.
10199         (.PRECIOUS): Do not mention target.xml.
10200
10201         * target.h (struct target_ops): Remove arch_string member.
10202         * linux-low.c (linux_arch_string): Remove.
10203         (linux_target_ops): Remove arch_string initializer.
10204         * linux-low.h (struct linux_target_ops): Remove arch_string member.
10205         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10206         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10207         * spu-low.c (spu_arch_string): Remove.
10208         (spu_target_ops): Remove arch_string initializer.
10209         * win32-low.c (win32_arch_string): Remove.
10210         (win32_target_ops): Remove arch_string initializer.
10211         * win32-low.h (struct win32_target_ops): Remove arch_string member.
10212         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10213         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10214
10215 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
10216
10217         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10218         by collect_ptrace_register and supply_ptrace_register hooks.
10219         * linux-low.c (fetch_register): Use supply_ptrace_register callback
10220         instead of checking for the_low_target.left_pad_xfer.
10221         (usr_store_inferior_registers): Use collect_ptrace_register callback
10222         instead of checking for the_low_target.left_pad_xfer.
10223
10224         * linux-s390-low.c (s390_collect_ptrace_register): New function.
10225         (s390_supply_ptrace_register): Likewise.
10226         (s390_fill_gregset): Call s390_collect_ptrace_register.
10227         (the_low_target): Update.
10228
10229         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10230         (ppc_supply_ptrace_register): Likewise.
10231         (the_low_target): Update.
10232
10233         * linux-i386-low.c (the_low_target): Update.
10234         * linux-x86-64-low.c (the_low_target): Update.
10235
10236 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
10237
10238         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10239         reg-s390.o and reg-s390x.o.
10240
10241         * linux-low.c (new_inferior): New global variable.
10242         (linux_create_inferior, linux_attach): Set it.
10243         (linux_wait_for_process): Call the_low_target.arch_setup after the
10244         target has stopped for the first time.
10245         (initialize_low): Do not call the_low_target.arch_setup.
10246
10247         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10248         (s390_set_pc): Likewise.
10249         (s390_arch_setup): New function.
10250         (the_low_target): Use s390_arch_setup as arch_setup routine.
10251
10252         * regcache.c (realloc_register_cache): New function.
10253         (set_register_cache): Call it for each existing regcache.
10254
10255 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
10256
10257         * server.h (init_registers): Remove prototype.
10258
10259         * linux-low.h (struct linux_target_ops): Add arch_setup field.
10260         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10261         instead of init_registers ().
10262         * linux-arm-low.c (init_registers_arm): Add prototype.
10263         (init_registers_arm_with_iwmmxt): Likewise.
10264         (the_low_target): Add initializer for arch_setup field.
10265         * linux-cris-low.c (init_registers_cris): Add prototype.
10266         (the_low_target): Add initializer for arch_setup field.
10267         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10268         (the_low_target): Add initializer for arch_setup field.
10269         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10270         (the_low_target): Add initializer for arch_setup field.
10271         * linux-ia64-low.c (init_registers_ia64): Add prototype.
10272         (the_low_target): Add initializer for arch_setup field.
10273         * linux-m32r-low.c (init_registers_m32r): Add prototype.
10274         (the_low_target): Add initializer for arch_setup field.
10275         * linux-m68k-low.c (init_registers_m68k): Add prototype.
10276         (the_low_target): Add initializer for arch_setup field.
10277         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10278         (init_registers_mips64_linux): Likewise.
10279         (the_low_target): Add initializer for arch_setup field.
10280         * linux-ppc-low.c (init_registers_ppc): Add prototype.
10281         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10282         (the_low_target): Add initializer for arch_setup field.
10283         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10284         (init_registers_powerpc_64): Likewise.
10285         (the_low_target): Add initializer for arch_setup field.
10286         * linux-s390-low.c (init_registers_s390): Add prototype.
10287         (init_registers_s390x): Likewise.
10288         (the_low_target): Add initializer for arch_setup field.
10289         * linux-sh-low.c (init_registers_sh): Add prototype.
10290         (the_low_target): Add initializer for arch_setup field.
10291         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10292         (the_low_target): Add initializer for arch_setup field.
10293         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10294         (the_low_target): Add initializer for arch_setup field.
10295
10296         * win32-low.h (struct win32_target_ops): Add arch_setup field.
10297         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10298         instead of init_registers ().
10299         * win32-arm-low.c (init_registers_arm): Add prototype.
10300         (the_low_target): Add initializer for arch_setup field.
10301         * win32-i386-low.c (init_registers_i386): Add prototype.
10302         (the_low_target): Add initializer for arch_setup field.
10303
10304         * spu-low.c (init_registers_spu): Add prototype.
10305         (initialize_low): Call initialie_registers_spu () instead of
10306         initialize_registers ().
10307
10308 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
10309
10310         * server.c (handle_v_requests): When handling the vRun and vAttach
10311         packets, if already debugging a process, don't kill it.  Return an
10312         error instead.
10313
10314 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
10315
10316         * server.c (handle_query): Correct length check.
10317
10318 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
10319
10320         * win32-low.c (do_initial_child_stuff): Add process handle
10321         parameter.  Set current_process_handle and current_process_id from the
10322         parameters. Clear globals.
10323         (win32_create_inferior): Don't set current_process_handle and
10324         current_process_id here.  Instead pass them on the call to
10325         do_initial_child_stuff.
10326         (win32_attach): Likewise.
10327         (win32_clear_inferiors): New.
10328         (win32_kill): Don't close the current process handle or the
10329         current thread handle here.  Instead call win32_clear_inferiors.
10330         (win32_detach): Don't open a new handle to the process.  Call
10331         win32_clear_inferiors.
10332         (win32_join): Don't rely on current_process_handle; open a new
10333         handle using the process id.
10334         (win32_wait): Call win32_clear_inferiors when the inferior process
10335         has exited.
10336
10337 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
10338
10339         * server.c (monitor_show_help): Add "exit".
10340
10341 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
10342
10343         * Makefile.in (SFILES): Add linux-xtensa-low.c.
10344         (clean): Add reg-xtensa.c.
10345         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10346         * configure.srv (xtensa*-*-linux*) New target.
10347         * linux-xtensa-low.c: New.
10348         * xtensa-xtregs.c: New.
10349
10350 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
10351
10352         * hostio.c: Don't include errno.h.
10353         (errno_to_fileio_errno): Move to hostio-errno.
10354         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
10355         error number outputting to the target->hostio_last_error callback.
10356         (hostio_packet_error): Use FILEIO_EINVAL directly.
10357         (handle_open, handle_pread, hostio_error, handle_unlink): Update
10358         calls to hostio_error.
10359         * hostio-errno.c: New.
10360         * server.h (hostio_last_error_from_errno): Declare.
10361         * target.h (target_ops): Add hostio_last_error member.
10362         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10363         as hostio_last_error handler.
10364         * spu-low.c (spu_target_ops): Likewise.
10365         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10366         (wince_hostio_last_error): New functions.
10367         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10368         as hostio_last_error handler.
10369         (win32_target_ops) [!_WIN32_WCE]: Register
10370         hostio_last_error_from_errno as hostio_last_error handler.
10371         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10372         (hostio-errno.o): New rule.
10373         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10374         * configure.srv (srv_hostio_err_objs): New variable.  Default to
10375         hostio-errno.o.
10376         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10377         * configure: Regenerate.
10378
10379 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
10380
10381         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10382         (linux_kill, linux_detach): Clean up the process list.
10383         * remote-utils.c (remote_open): Improve port number parsing.
10384         (putpkt_binary, input_interrupt): Only send interrupts if the target
10385         is running.
10386         * server.c (extended_protocol): Make static.
10387         (attached): Define earlier.
10388         (exit_requested, response_needed, program_argv): New variables.
10389         (target_running): New.
10390         (start_inferior): Clear attached here.
10391         (attach_inferior): Set attached here.
10392         (require_running): Define.
10393         (handle_query): Use require_running and target_running.  Implement
10394         "monitor exit".
10395         (handle_v_attach, handle_v_run): New.
10396         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
10397         (gdbserver_usage): Update.
10398         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
10399         --attach along with other options or after the port.  Save
10400         program_argv.  Support no initial program.  Resynchronize
10401         communication with GDB after an error.  Handle "monitor exit".
10402         Use require_running and target_running.  Always allow the extended
10403         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
10404         restart in extended mode.
10405         * README: Refer to the GDB manual.  Update --attach usage.
10406
10407 2007-12-20  Andreas Schwab  <schwab@suse.de>
10408
10409         * linux-low.c (STACK_SIZE): Define.
10410         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
10411         (linux_test_for_tracefork): Likewise.
10412
10413 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
10414
10415         * linux-low.c (linux_wait_for_event): Update messages.  Do not
10416         reinsert auto-delete breakpoints.
10417         * mem-break.c (struct breakpoint): Change return type of handler to
10418         int.
10419         (set_breakpoint_at): Update handler type.
10420         (reinsert_breakpoint_handler): Return 1 instead of calling
10421         delete_breakpoint.
10422         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10423         setting a new one.
10424         (check_breakpoints): Delete auto-delete breakpoints and return 2.
10425         * mem-break.h (set_breakpoint_at): Update handler type.
10426         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10427         * win32-low.c (auto_delete_breakpoint): New.
10428         (get_child_debug_event): Use it.
10429
10430 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
10431
10432         * configure.ac: Check for pread and pwrite.
10433         * hostio.c (handle_pread): Fall back to lseek and read.
10434         (handle_pwrite): Fall back to lseek and write.
10435         * config.in, configure: Regenerated.
10436
10437 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
10438
10439         * server.c (myresume): Add own_buf argument.
10440         (main): Update calls.
10441
10442 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
10443
10444         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10445         * remote-utils.c (remote_open): Do not call disable_async_io.
10446         (block_async_io): Delete.
10447         (unblock_async_io): Make static.
10448         (initialize_async_io): New.
10449         * server.c (handle_v_cont): Handle async I/O here.
10450         (myresume): Likewise.  Move other common resume tasks here...
10451         (main): ... from here.  Call initialize_async_io.  Disable async
10452         I/O before the main loop.
10453         * server.h (initialize_async_io): Declare.
10454         (block_async_io, unblock_async_io): Delete prototypes.
10455         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10456
10457 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
10458
10459         * remote-utils.c (readchar): Allow binary data in received messages.
10460
10461 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10462
10463         * win32-low.c (attaching): New global.
10464         (win32_create_inferior): Clear the `attaching' global.
10465         (win32_attach): Set the `attaching' global.
10466         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10467         attaching.  Only set a breakpoint at the entry point if not
10468         attaching.
10469
10470 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10471
10472         * server.c (main): Don't report dll events on the initial
10473         connection on attaches.
10474
10475 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10476
10477         * server.c (main): Relax numerical bases supported for the pid of
10478         the --attach command line argument.
10479
10480 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10481
10482         * win32-low.c (win32_attach): Call OpenProcess before
10483         DebugActiveProcess, not after.  Add last error output to error
10484         call.
10485
10486 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10487
10488         * win32-low.c (win32_get_thread_context)
10489         (win32_set_thread_context): New functions.
10490         (thread_rec): Use win32_get_thread_context.
10491         (continue_one_thread, win32_resume): Use win32_set_thread_context.
10492         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10493         field.
10494
10495 2007-12-03  Leo Zayas
10496             Pedro Alves  <pedro_alves@portugalmail.pt>
10497
10498         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10499         global variables.
10500         (child_add_thread): Minor cleanup.
10501         (child_continue): Resume artificially suspended threads before
10502         calling ContinueDebugEvent.
10503         (suspend_one_thread): New.
10504         (fake_breakpoint_event): New.
10505         (get_child_debug_event): Change return type to int.  Check here if
10506         gdb sent an interrupt request.  If a soft interrupt was requested,
10507         fake a breakpoint event.  Return 0 if there is no event to handle,
10508         and 1 otherwise.
10509         (win32_wait): Don't check here if gdb sent an interrupt request.
10510         Ensure there is a valid event to handle.
10511         (win32_request_interrupt): Add soft interruption method as last
10512         resort.
10513
10514 2007-12-03  Leo Zayas
10515             Pedro Alves  <pedro_alves@portugalmail.pt>
10516
10517         * win32-low.h (win32_thread_info): Add descriptions to the
10518         structure members.  Replace `suspend_count' counter by a
10519         `suspended' flag.
10520         * win32-low.c (thread_rec): Update condition of when to get the
10521         context from the inferior.  Rely on ContextFlags being set if it
10522         has already been retrieved.  Only suspend the inferior thread if
10523         we haven't already.  Warn if that fails.
10524         (continue_one_thread): s/suspend_count/suspended/.  Only call
10525         ResumeThread once.  Warn if that fails.
10526
10527 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
10528
10529         * win32-low.c (win32_wait): Don't read from the inferior when it
10530         has already exited.
10531
10532 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
10533
10534         * Makefile.in (win32_low_h): New variable.
10535         (win32-low.o): Add dependency on $(win32_low_h).
10536         (win32-arm-low.o, win32-i386-low.o): New rules.
10537
10538 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
10539
10540         * hostio.c: Correct copyright year.
10541
10542 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
10543
10544         * Makefile.in (OBS): Add hostio.o.
10545         (hostio.o): New rule.
10546         * server.h (handle_vFile): Declare.
10547         * hostio.c: New file.
10548         * server.c (handle_v_requests): Take packet_len and new_packet_len
10549         for binary packets.  Call handle_vFile.
10550         (main): Update call to handle_v_requests.
10551
10552 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
10553
10554         * linux-low.c: Include <sched.h>.
10555
10556 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
10557
10558         * linux-low.c (linux_tracefork_grandchild): New.
10559         (linux_tracefork_child): Use clone.
10560         (linux_test_for_tracefork): Use clone; allocate and free a stack.
10561
10562 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
10563
10564         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10565
10566 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
10567
10568         * linux-low.c (handle_extended_wait): Handle unexpected signals.
10569
10570 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
10571
10572         * inferiors.c (change_inferior_id): Delete.
10573         (add_pid_to_list, pull_pid_from_list): New.
10574         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10575         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10576         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10577         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10578         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10579         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10580         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10581         (using_threads): Always set to 1.
10582         (handle_extended_wait): New.
10583         (add_process): Do not set TID.
10584         (linux_create_inferior): Set must_set_ptrace_flags.
10585         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
10586         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
10587         (linux_thread_alive): Rename TID argument to LWPID.
10588         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
10589         (linux_wait_for_event): Do not use TID or check using_threads.  Update
10590         call to dead_thread_notify.  Call handle_extended_wait.
10591         (linux_create_inferior): Use PTRACE_SETOPTIONS.
10592         (send_sigstop): Delete sigstop_sent.
10593         (wait_for_sigstop): Avoid TID.
10594         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10595         (linux_test_for_tracefork): New.
10596         (linux_lookup_signals): Use thread_db_active and
10597         linux_supports_tracefork_flag.
10598         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10599         * linux-low.h (get_process_thread): Avoid TID.
10600         (struct process_ifo): Move thread_known and tid to the end.  Remove
10601         sigstop_sent.
10602         (linux_attach_lwp, thread_db_init): Update prototypes.
10603         * server.h (change_inferior_id): Delete prototype.
10604         (add_pid_to_list, pull_pid_from_list): New prototypes.
10605         * thread-db.c (thread_db_use_events): New.
10606         (find_first_thread): Rename to...
10607         (find_one_thread): ...this.  Update callers and messages.  Do not
10608         call fatal.  Check thread_db_use_events.  Do not call
10609         change_inferior_id or new_thread_notify.
10610         (maybe_attach_thread): Update.  Do not call new_thread_notify.
10611         (thread_db_init): Set thread_db_use_events.  Check use_events.
10612         * utils.c (fatal, warning): Correct message prefix.
10613
10614 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
10615
10616         * Makefile.in (clean): Remove new files.
10617         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10618         (powerpc-64.o, powerpc-64.c): New rules.
10619         * configure.srv: Use alternate register sets for powerpc64-*-linux*
10620         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10621         with SPE.
10622         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10623         SPE targets.
10624         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10625         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10626         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10627         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10628         (target_regsets): Add AltiVec and SPE register sets.
10629         * configure.ac: Check for AltiVec and SPE.
10630         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10631         (ppc_fill_vrregset, ppc_store_vrregset): New.
10632         (target_regsets): Add AltiVec register set.
10633         * configure: Regenerated.
10634
10635 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
10636
10637         * linux-low.c (O_LARGEFILE): Define.
10638         (linux_read_memory): Use /proc/PID/mem.
10639         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
10640         * configure, config.in: Regenerated.
10641
10642 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
10643
10644         * linux-low.c (linux_wait_for_event): Do not pass signals while
10645         single-stepping.
10646
10647 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10648
10649         * win32-low.c (create_process): New.
10650         (win32_create_inferior): Use create_process instead of
10651         CreateProcess.  If create_process failed retry appending an ".exe"
10652         suffix.  Store the GetLastError result immediatelly after
10653         create_process calls and use it on the call to error.
10654
10655 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10656
10657         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10658
10659 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
10660
10661         * configure.ac: Switch license to GPLv3.
10662
10663 2007-08-01  Michael Snyder  <msnyder@access-company.com>
10664
10665         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10666
10667 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
10668
10669         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10670         typedef.
10671         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10672         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
10673         CloseToolhelp32Snapshot.
10674         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10675         CloseToolhelp32Snapshot.
10676
10677 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
10678
10679         * server.c (main): Check for inferior exit before main loop.
10680
10681 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
10682
10683         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10684         instead of on tmp_desc.
10685
10686 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
10687             Daniel Jacobowitz  <dan@codesourcery.com>
10688
10689         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10690         (add_thread): Minor cleanups.
10691         (clear_inferiors): Move lower in the file.  Clear the DLL
10692         list.
10693         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10694         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10695         (xml_escape_text): New.
10696         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
10697         for qSupported.
10698         (handle_v_cont): Report errors.
10699         (gdbserver_version): Update.
10700         (main): Correct size of own_buf.  Do not report initial DLL events.
10701         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10702         (unloaded_dll, xml_escape_text): New.
10703         * win32-low.c (enum target_waitkind): Update comments.
10704         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10705         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10706         (win32_EnumProcessModules, win32_GetModuleInformation)
10707         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10708         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10709         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10710         (win32_Module32First, win32_Module32Next, load_toolhelp)
10711         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10712         (get_child_debug_event): Handle DLL events.
10713         (win32_wait): Likewise.
10714
10715 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
10716
10717         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10718         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10719
10720 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
10721
10722         * win32-low.c (handle_output_debug_string): Ignore event if not
10723         waiting.
10724
10725 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
10726
10727         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10728
10729 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
10730
10731         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10732
10733 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
10734
10735         * inferiors.c (change_inferior_id): Add comment.
10736         * linux-low.c (check_removed_breakpoint): Add an early
10737         prototype.  Improve debug output.
10738         (linux_attach): Doc update.
10739         (linux_detach_one_process, linux_detach): Clean up before releasing
10740         each process.
10741         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10742         * linux-low.h (struct process_info): Doc improvement.
10743         * mem-break.c (delete_all_breakpoints): New.
10744         * mem-break.h (delete_all_breakpoints): New prototype.
10745         * thread-db.c (find_first_thread): New.
10746         (thread_db_create_event): Call it instead of
10747         thread_db_find_new_threads.  Clean up unused variables.
10748         (maybe_attach_thread): Remove first thread handling.
10749         (thread_db_find_new_threads): Use find_first_thread.
10750         (thread_db_get_tls_address): Likewise.
10751
10752 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
10753
10754         * thread-db.c (thread_db_find_new_threads): Add prototype.
10755         (thread_db_create_event): Check for the main thread before adding
10756         a new thread.
10757         (maybe_attach_thread): Only enable event reporting if TID == 0.
10758         (thread_db_get_tls_address): Check for new threads.
10759
10760 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
10761
10762         * linux-low.c (linux_create_inferior): Try execv before execvp.
10763         * spu-low.c (spu_create_inferior): Likewise.
10764
10765 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
10766
10767         * linux-low.c (linux_create_inferior): Change execv to execvp.
10768         * spu-low.c (spu_create_inferior): Likewies.
10769
10770 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
10771
10772         * Makefile.in (clean): Clean new files instead of deleted ones.
10773         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10774         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10775         rules.
10776         * configure.srv: Specify XML files and new regformats for MIPS and
10777         MIPS64 GNU/Linux.
10778         * linux-mips-low.c (mips_num_regs): Set to only used registers.
10779         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
10780         an entry for the restart register.
10781         (mips_cannot_fetch_register, mips_cannot_store_register)
10782         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10783         register names to match the XML descriptions.
10784         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
10785         restart register instead of $0.
10786
10787 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
10788             Markus Deuling  <deuling@de.ibm.com>
10789
10790         * remote-utils.c (decode_xfer_write): New function.
10791         * server.h (decode_xfer_write): Add prototype.
10792         * server.c (handle_query): Add PACKET_LEN argument.  Support
10793         qXfer:spu:read and qXfer:spu:write packets.
10794         (main): Pass packet_len to handle_query.
10795         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10796         * target.h (target_ops): Add qxfer_spu.
10797
10798 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
10799
10800         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10801         accessing non-seekable spufs files.
10802
10803 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
10804
10805         * server.c (handle_query): Add reply for qC packet.
10806
10807 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10808             Leo Zayas  <lerele@champenstudios@com>
10809
10810         * server.h (check_remote_input_interrupt_request): New function.
10811         * remote_utils.c (INVALID_DESCRIPTOR): New define.
10812         (remote_desc): Initialize with INVALID_DESCRIPTOR.
10813         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
10814         (check_remote_input_interrupt_request): New function.
10815         * server.h (check_remote_input_interrupt_request): Declare.
10816         * win32-low.c (winapi_DebugBreakProcess,
10817         winapi_GenerateConsoleCtrlEvent): New typedefs.
10818         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10819         to 250 ms.
10820         (win32_wait): Check for remote interrupt request
10821         with check_remote_input_interrupt_request.
10822         (win32_request_interrupt): New function.
10823         (win32_target_op): Set request_interrupt to win32_request_interrupt.
10824
10825 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10826
10827         * win32-low.c (debug_registers_changed,
10828         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10829         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10830         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10831         (thread_rec): Get context using the low target.
10832         (child_add_thread): Call thread_added on the low target,
10833         which does the same thing.
10834         (regptr): Delete.
10835         (do_initial_child_stuff): Remove debug registers references.
10836         Set context using the low target.  Resume threads after
10837         setting the contexts.
10838         (child_continue): Remove dead variable.  Remove debug
10839         registers references.
10840         (child_fetch_inferior_registers): Go through the low target.
10841         (do_child_store_inferior_registers): Remove.
10842         (child_store_inferior_registers): Go through the low target.
10843         (win32_resume): Remove debug registers references.
10844         Set context using the low target.
10845         (handle_exception): Change return type to void.  Don't record
10846         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
10847         first chance exception.
10848         (get_child_debug_event): Change return type to void.  Remove
10849         goto loop.  Always return after waiting for debug event.
10850         (win32_wait): Convert to switch statement.  Handle spurious
10851         events.
10852
10853         * win32-i386-low.c (debug_registers_changed,
10854         debug_registers_used): New.
10855         (initial_stuff): Rename to ...
10856         (i386_initial_stuff): ... this.  Clear debug registers
10857         state variables.
10858         (store_debug_registers): Delete.
10859         (i386_get_thread_context): New.
10860         (load_debug_registers): Delete.
10861         (i386_set_thread_context): New.
10862         (i386_thread_added): New.
10863         (single_step): Rename to ...
10864         (i386_single_step): ... this.
10865         (do_fetch_inferior_registers): Rename to ...
10866         (i386_fetch_inferior_register): ... this.
10867         (i386_store_inferior_register): New.
10868         (the_low_target): Adapt to new interface.
10869
10870         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10871         (arm_get_thread_context): New.
10872         (arm_set_thread_context): New.
10873         (regptr): New.
10874         (do_fetch_inferior_registers): Rename to ...
10875         (arm_fetch_inferior_register): ... this.
10876         (arm_store_inferior_register): New.
10877         (arm_wince_breakpoint): Reimplement as unsigned long.
10878         (arm_wince_breakpoint_len): Define.
10879         (the_low_target): Adapt to new interface.
10880
10881         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10882         load_debug_registers.  Add get_thread_context, set_thread_context,
10883         thread_added and store_inferior_register.  Rename
10884         fetch_inferior_registers to fetch_inferior_register.
10885         (regptr): Remove declaration.
10886
10887 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10888
10889         * linux-low.c (linux_detach): Change return type to int.  Return 0.
10890         * spu-low.c (spu_detach): Likewise.
10891
10892 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10893
10894         * target.h (target_ops): Change return type of detach to int.
10895         Add join.
10896         (join_inferior): New.
10897         * server.c (main): Don't skip detach support on mingw32.
10898         If the inferior doesn't support detaching return error.
10899         Call join_inferior instead of using waitpid.
10900         * linux-low.c (linux_join): New.
10901         (linux_target_op): Add linux_join.
10902         * spu-low.c (spu_join): New.
10903         (spu_target_ops): Add spu_join.
10904         * win32-low.c (win32_detach): Adapt to new interface.
10905         Reopen current_process_handle before detaching.  Issue a child
10906         resume before detaching.
10907         (win32_join): New.
10908         (win32_target_op): Add win32_join.
10909
10910 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10911
10912         * win32-low.c (win32-attach): Fix return value.
10913         * target.h (target_ops): Describe ATTACH return values.
10914
10915 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10916
10917         * win32-low.c (GETPROCADDRESS): Define.
10918         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
10919         (winapi_DebugSetProcessKillOnExit): Likewise.
10920         (win32_create_inferior): Force usage of ansi CreateProcessA.
10921         (win32_attach): Use GETPROCADDRESS.
10922         (win32_detach): Likewise.
10923
10924 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
10925
10926         * win32-low.c (win32_wait): Don't use WSTOPSIG.
10927
10928 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
10929
10930         * win32-low.c: Commit leftover changes from 2007-03-29.
10931
10932 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
10933
10934         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10935         fields short instead of int.  Add explicit padding.
10936         (i387_cache_to_fsave): Remove unnecessary casts.
10937         (i387_fsave_to_cache): Doc fix.
10938         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10939
10940 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
10941
10942         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10943         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10944
10945 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
10946
10947         * configure.srv (arm*-*-mingw32ce*): Move near the other
10948         arm targets.
10949
10950 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
10951
10952         * configure.ac: Add errno checking.
10953         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10954         sys/file.h and malloc.h.
10955         (AC_CHECK_DECLS): Add perror.
10956         (srv_mingwce): Handle.
10957         * configure.srv (i[34567]86-*-cygwin*): Add
10958         win32-i386-low.o to srv_tgtobj.
10959         (i[34567]86-*-mingw*): Likewise.
10960         (arm*-*-mingw32ce*): Add case.
10961         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10962         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10963         [__MINGW32CE__] (strerror): New function.
10964         [__MINGW32CE__] (errno): Define to GetLastError.
10965         [__MINGW32CE__] (COUNTOF): New macro.
10966         (remote_open): Remove extra close call.
10967         * mem-break.c (delete_breakpoint_at): New function.
10968         * mem-break.h (delete_breakpoint_at): Declare.
10969         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10970         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10971         [USE_WIN32API] (read, write): Add char* casts.
10972         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10973         * server.h: Include wincecompat.h on Windows CE.
10974         [HAVE_ERRNO_H]: Check.
10975         (perror): Declare if not declared.
10976         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10977         (perror_with_name): Remove errno declaration.
10978         * wincecompat.h: New.
10979         * wincecompat.c: New.
10980         * win32-low.h: New.
10981         * win32-arm-low.c: New.
10982         * win32-i386-low.c: New.
10983         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10984         (OUTMSG2): Make it safe.
10985         (_T): New macro.
10986         (COUNTOF): New macro.
10987         (NUM_REGS): Get it from the low target.
10988         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10989         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10990         (thread_rec): Let low target handle debug registers.
10991         (child_add_thread): Likewise.
10992         (child_init_thread_list): Likewise.
10993         (continue_one_thread): Likewise.
10994         (regptr): New.
10995         (do_child_fetch_inferior_registers): Move to ...
10996         * win32-i386-low.c: ... here, and rename to ...
10997         (do_fetch_inferior_registers): ... this.
10998         * win32-low.c (child_fetch_inferior_registers):
10999         Go through the low target.
11000         (do_child_store_inferior_registers): Use regptr.
11001         (strwinerror): New function.
11002         (win32_create_inferior): Handle Windows CE.
11003         Use strwinerror instead of strerror on Windows error
11004         codes.  Add program to the error output.
11005         Don't close the main thread handle on Windows CE.
11006         (win32_attach): Use coredll.dll on Windows CE.
11007         (win32_kill): Close current process and current
11008         thread handles.
11009         (win32_detach): Use coredll.dll on Windows CE.
11010         (win32_resume): Let low target handle debug registers, and
11011         step request.
11012         (handle_exception): Add/Remove initial breakpoint.  Avoid
11013         non-existant WSTOPSIG on Windows CE.
11014         (win32_read_inferior_memory): Cast to remove warning.
11015         (win32_arch_string): Go through the low target.
11016         (initialize_low): Call set_breakpoint_data with the low
11017         target's breakpoint.
11018         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11019         FOP_REGNUM, mappings): Move to ...
11020         * win32-i386-low.c: ... here.
11021         * win32-low.c (win32_thread_info): Move to ...
11022         * win32-low.h: ... here.
11023         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11024         win32-arm-low.c and wincecompat.c.
11025         (all:): Add $EXEEXT.
11026         (install-only:): Likewise.
11027         (gdbserver:): Likewise.
11028         (gdbreplay:): Likewise.
11029         * config.in: Regenerate.
11030         * configure: Regenerate.
11031
11032 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11033
11034         * win32-low.c: Rename typedef thread_info to
11035         win32_thread_info throughout.
11036
11037 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11038
11039         * win32-i386-low.c: Rename to ...
11040         * win32-low.c: ... this.
11041         * configure.srv: Replace win32-i386-low.o with win32-low.o.
11042         * Makefile.in: Likewise.
11043
11044 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
11045
11046         * remote-utils.c (monitor_output): Constify msg parameter.
11047         * server.h (monitor_output): Likewise.
11048         * win32-i386-low.c (handle_output_debug_string): New.
11049         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11050         handle_output_debug_string.
11051         (get_child_debug_event): Likewise.
11052
11053 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
11054
11055         * server.c (main): Correct strtoul check.
11056
11057 2007-03-27  Jon Ringle  <jon@ringle.org>
11058
11059         * linux-low.c: Check __ARCH_HAS_MMU__ also.
11060
11061 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
11062
11063         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11064
11065 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
11066
11067         * terminal.h: Check HAVE_SGTTY_H.
11068
11069 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
11070
11071         * remote-utils.c (remote_open): Print out the assigned port number.
11072
11073 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
11074
11075         * remote-utils.c (monitor_output): New function.
11076         * server.c (debug_threads): Define here.
11077         (monitor_show_help): New function.
11078         (handle_query): Handle qRcmd.
11079         (main): Do not handle 'd' packet.
11080         * server.h (debug_threads, remote_debug, monitor_output): Declare.
11081         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11082         of debug_threads.
11083
11084 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11085
11086         * Makefile.in (EXEEXT): New.
11087         (clean): Use $(EXEEXT).
11088
11089 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11090
11091         * target.h (target_ops): Rename send_signal to request_interrupt,
11092         and remove enum target_signal parameter.
11093         * linux-low.c (linux_request_interrupt): Rename from
11094         linux_send_signal, and always send SIGINT.
11095         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11096         and always send SIGINT.
11097         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11098         of send_signal.
11099         (input_interrupt): Likewise.
11100
11101 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11102
11103         * server.c (get_features_xml): Check if target implemented
11104         arch_string.
11105         * win32-i386-low.c (win32_arch_string): New.
11106         (win32_target_ops): Add win32_arch_string as arch_string member.
11107
11108 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
11109
11110         * spu-low.c (spu_arch_string): New.
11111         (spu_target_ops): Add spu_arch_string.
11112
11113 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
11114
11115         * remote-utils.c: Remove HAVE_TERMINAL_H check.
11116         * configure.ac: Do not check for terminal.h.
11117         * configure, config.in: Regenerated.
11118
11119 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
11120
11121         * Makefile.in (OBS): Add $(XML_BUILTIN).
11122         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11123         (clean): Update.
11124         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11125         (arm-with-iwmmxt.c): New.
11126         * config.in, configure: Regenerate.
11127         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
11128         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
11129         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11130         (arm*-*-linux*): Add iWMMXt and regset support.
11131         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11132         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11133         (arm_store_wmmxregset, target_regsets): New.
11134         * server.c (get_features_xml): Take annex argument.  Check builtin
11135         XML documents.
11136         (handle_query): Handle multiple annexes.
11137
11138 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11139
11140         * remote-utils.c [USE_WIN32API] (read, write): Define.
11141         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11142         write.
11143
11144 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
11145
11146         * linux-i386-low.c (the_low_target): Set arch_string.
11147         * linux-x86-64-low.c (the_low_target): Likewise.
11148         * linux-low.c (linux_arch_string): New.
11149         (linux_target_ops): Add it.
11150         * linux-low.h (struct linux_target_ops): Add arch_string.
11151         * server.c (write_qxfer_response): Use const void * for DATA.
11152         (get_features_xml): New.
11153         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
11154         * target.h (struct target_ops): Add arch_string method.
11155
11156 2007-01-03  Denis Pilat  <denis.pilat@st.com>
11157             Daniel Jacobowitz  <dan@codesourcery.com>
11158
11159         * linux-low.c (linux_kill): Handle being called with no threads.
11160         * win32-i386-low.c (win32_kill): Likewise.
11161         (get_child_debug_event): Clear current_process_handle.
11162
11163 2006-12-30  Denis PILAT  <denis.pilat@st.com>
11164             Daniel Jacobowitz  <dan@codesourcery.com>
11165
11166         * remote-utils.c (remote_open): Check the type of specified
11167         serial port devices before opening them.
11168         * server.c (main): Kill the inferior if an error occurs during
11169         the first remote_open.
11170
11171 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
11172
11173         * README: Update supported targets.
11174
11175 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
11176
11177         * Makefile.in (clean): Remove reg-mips64.c.
11178         (reg-mips64.c, reg-mips64.o): New rules.
11179         * configure.srv: Handle mips64.  Include regset support for mips.
11180         * linux-mips-low.c (union mips_register): New.
11181         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11182         (mips_breakpoint, mips_breakpoint_at): Use int.
11183         (mips_collect_register, mips_supply_register)
11184         (mips_collect_register_32bit, mips_supply_register_32bit)
11185         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11186         (mips_store_fpregset, target_regsets): New.
11187         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11188
11189 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
11190
11191         * configure.srv: Add target "spu*-*-*".
11192         * Makefile.in (clean): Remove reg-spu.c.
11193         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11194         * spu-low.c: New file.
11195
11196 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
11197
11198         * configure.ac: Correct td_thr_tls_get_addr test.
11199         * configure: Regenerated.
11200
11201 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
11202
11203         * linux-low.c (linux_wait_for_event): Reformat.  Use the
11204         pass_signals array.
11205         * remote-utils.c (decode_address_to_semicolon): New.
11206         * server.c (pass_signals, handle_general_set): New.
11207         (handle_query): Mention QPassSignals for qSupported.
11208         (main): Call handle_general_set.
11209         * server.h (pass_signals, decode_address_to_semicolon): New.
11210
11211 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
11212
11213         * server.c (handle_query): Correct error handling for read_auxv.
11214
11215 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
11216
11217         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11218         and srv_linux_thread_db to yes.
11219         * linux-s390-low.c (s390_fill_gregset): New function.
11220         (target_regsets): Define data structure.
11221
11222 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
11223
11224         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11225         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
11226         * config.in, configure: Regenerated.
11227         * inferiors.c (gdb_id_to_thread): New function.
11228         (gdb_id_to_thread_id): Use it.
11229         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11230         * linux-low.h (struct process_info): Add th member.
11231         (thread_db_get_tls_address): New prototype.
11232         * remote-utils.c (decode_address): Make non-static.
11233         * server.c (handle_query): Handle qGetTLSAddr.
11234         * server.h (gdb_id_to_thread, decode_address): New prototypes.
11235         * target.h (struct target_ops): Add get_tls_address.
11236         * thread-db.c (maybe_attach_thread): Save the thread handle.
11237         (thread_db_get_tls_address): New.
11238
11239 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
11240
11241         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11242         (linux_resume_one_process): Take a siginfo_t *.  Update all
11243         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
11244         (struct pending_signals): Add a siginfo_t.
11245         (linux_wait_for_process): Always set last_status.
11246         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11247         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11248         * linux-low.h (struct process_info): Add last_status.
11249
11250 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
11251
11252         * remote-utils.c (try_rle): New function.
11253         (putpkt_binary): Use it.
11254
11255 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
11256
11257         * Makefile.in (clean): Clean reg-x86-64-linux.c.
11258         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11259         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11260         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11261         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11262         point registers.
11263
11264 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
11265
11266         * server.c (terminal_fd): New variable.
11267         (old_foreground_pgrp): Likewise.
11268         (restore_old_foreground_pgrp): New function.
11269         (start_inferior): Record the terminal file descriptor in terminal_fd
11270         and its original foreground group in old_foreground_pgrp.  Register
11271         restore_old_foreground_pgrp with atexit().
11272
11273 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
11274
11275         * server.c (handle_query): Correct qPart to qXfer.
11276
11277 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
11278
11279         * configure.ac: Check for more headers which are missing on
11280         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
11281         * configure.srv: Add Cygwin and mingw32.
11282         * remote-utils.c: Don't include headers unconditionally which
11283         are missing on mingw32.  Include <winsock.h> for mingw32.
11284         (remote_open): Adjust for mingw32 support.  Flush
11285         standard error after writing to it.
11286         (remote_close, putpkt_binary, input_interrupt, block_async_io)
11287         (unblock_async_io, enable_async_io, disable_async_io)
11288         (readchar, getpkt): Update for Winsock support.
11289         (prepare_resume_reply): Expect a protocol signal number.
11290         * server.c: Disable <sys/wait.h> on mingw32.
11291         (start_inferior): Adjust for mingw32 support.  Flush
11292         standard error after writing to it.
11293         (attach_inferior): Likewise.  Use protocol signal
11294         numbers.
11295         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
11296         and names.
11297         * win32-i386-low.c: New file.
11298         * Makefile.in (XM_CLIBS): Set.
11299         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11300         (win32-i386-low.o): New dependency rule.
11301         * linux-low.c (linux_wait): Use target signal numbers.
11302         * target.h (struct target_ops): Doc fix.
11303         * server.h (target_signal_to_name): New prototype.
11304         * gdbreplay.c: Don't include headers unconditionally which
11305         are missing on mingw32.  Include <winsock.h> for mingw32.
11306         (remote_close, remote_open): Adjust for Winsock support.
11307         * configure, config.in: Regenerated.
11308
11309 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
11310
11311         * server.c (decode_xfer_read, write_qxfer_response): New.
11312         (handle_query): Take a packet length argument.  Handle
11313         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
11314         the qSupported response.
11315         (main): Update call to handle_query.
11316
11317 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
11318
11319         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11320         (putpkt_binary): Renamed from putpkt and adjusted for binary
11321         data.
11322         (putpkt): New wrapper for putpkt_binary.
11323         (readchar): Don't mask off the high bit.
11324         (decode_X_packet): New function.
11325         * server.c (main): Call putpkt_binary if a handler sets the packet
11326         length.  Save the length of the incoming packet.  Handle 'X'.
11327         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11328
11329 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
11330
11331         * server.c (handle_query): Handle qSupported.
11332
11333 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
11334
11335         * remote-utils.c (all_symbols_looked_up): New variable.
11336         (look_up_one_symbol): Check it.
11337         * server.h (look_up_one_symbol): New declaration.
11338         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11339
11340 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
11341
11342         * Makefile.in (linux-arm-low.o): Update dependencies.
11343         * linux-arm-low.c: Include "gdb_proc_service.h".
11344         (PTRACE_GET_THREAD_AREA): Define.
11345         (ps_get_thread_area): New function.
11346
11347 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
11348
11349         * configure.srv (m68k*-*-uclinux*): New target.
11350         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11351         (linux_resume_one_process): Remove extraneous cast.
11352         (linux_read_offsets): New.
11353         (linux_target_op): Add linux_read_offsets on mmuless systems.
11354         * server.c (handle_query): Add qOffsets logic.
11355         * target.h (struct target_ops): Add read_offsets.
11356
11357 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
11358
11359         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11360         (PTRACE_GET_THREAD_AREA): Define.
11361         (ps_get_thread_area): New function.
11362         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11363         (linux-x86-64-low.o): Update.
11364
11365 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
11366
11367         * configure.ac: Remove checks for prfpregset_t.
11368         * gdb_proc_service.h: New file.
11369         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11370         new "gdb_proc_service.h".
11371         * proc-service.c: Likewise.
11372         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11373         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11374         * Makefile.in (gdb_proc_service_h): Updated.
11375         * configure, config.in: Regenerated.
11376
11377 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
11378
11379         * remote-utils.c (prepare_resume_reply): Move declaration
11380         of gdb_id_from_wait to the top of the block.
11381
11382 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
11383
11384         * linux-low.c (regsets_store_inferior_registers): Read the regset
11385         from the target before filling it.
11386
11387 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
11388
11389         * server.c (attach_inferior): Return SIGTRAP for a successful
11390         attach.
11391
11392 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
11393
11394         * Makefile.in (OBS): Add version.o.
11395         (STAGESTUFF): Delete.
11396         (version.o): Add dependencies.
11397         (version.c): Replace rule.
11398         (clean): Remove version.c.
11399         * server.c (gdbserver_version): New.
11400         (gdbserver_usage): Use printf.
11401         (main): Handle --version and --help.
11402         * server.h (version, host_name): Add declarations.
11403
11404 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
11405
11406         * linux-arm-low.c:
11407         * linux-arm-low.c:
11408         * inferiors.c:
11409         * i387-fp.h:
11410         * i387-fp.c:
11411         * gdbreplay.c:
11412         * regcache.c:
11413         * proc-service.c:
11414         * mem-break.h:
11415         * mem-break.c:
11416         * linux-x86-64-low.c:
11417         * linux-sh-low.c:
11418         * linux-s390-low.c:
11419         * linux-ppc64-low.c:
11420         * linux-ppc-low.c:
11421         * linux-mips-low.c:
11422         * linux-m68k-low.c:
11423         * linux-m32r-low.c:
11424         * linux-low.h:
11425         * linux-low.c:
11426         * linux-ia64-low.c:
11427         * linux-i386-low.c:
11428         * linux-crisv32-low.c:
11429         * thread-db.c:
11430         * terminal.h:
11431         * target.h:
11432         * target.c:
11433         * server.h:
11434         * server.c:
11435         * remote-utils.c:
11436         * regcache.h:
11437         * utils.c:
11438         * Makefile.in:
11439         * configure.ac:
11440         * gdbserver.1: Add (C) after Copyright.  Update the FSF
11441         address.
11442
11443 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
11444
11445         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11446         (arm_breakpoint_at): Recognize both breakpoints.
11447         (the_low_target): Use the correct breakpoint instruction.
11448
11449 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
11450
11451         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11452         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11453         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11454         (the_low_target): Update.
11455
11456 2005-10-25  Andreas Schwab  <schwab@suse.de>
11457
11458         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11459
11460         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11461         (ia64_num_regs): Reduce to 462.
11462
11463 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
11464
11465         * acinclude.m4: Correct quoting.
11466         * aclocal.m4: Regenerated.
11467
11468         Suggested by SZOKOVACS Robert <szo@ies.hu>:
11469         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11470         (thread_db_init): Call thread_db_err_str.
11471         * configure.ac: Check for TD_VERSION.
11472         * config.in, configure: Regenerated.
11473
11474 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11475
11476         * server.h (error, fatal, warning): Add ATTR_FORMAT.
11477
11478 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
11479
11480         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11481         is not available.  Define HAVE_PTRACE_GETREGS if it is.
11482         * config.in, configure: Regenerated.
11483         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11484         * linux-i386-low.c, linux-m68k-low.c: Update to use
11485         HAVE_PTRACE_GETREGS.
11486         * linux-low.c (regsets_fetch_inferior_registers)
11487         (regsets_store_inferior_registers): Only return 0 if we processed
11488         GENERAL_REGS.
11489         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11490         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11491
11492 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
11493
11494         * inferiors.c (struct thread_info): Add gdb_id.
11495         (add_thread): Add gdb_id argument.
11496         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11497         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11498         calls to add_thread.
11499         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11500         * server.c (handle_query): Use thread_to_gdb_id.
11501         (handle_v_cont, main): Use gdb_id_to_thread_id.
11502         * server.h (add_thread): Update prototype.
11503         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11504         prototypes.
11505
11506 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
11507
11508         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11509         left-padded registers.
11510         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11511         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11512
11513 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
11514
11515         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11516         * configure: Regenerate.
11517         * config.in: Regenerate.
11518         * server.h (NEED_DECLARATION_STRERROR):
11519         Replace with !HAVE_DECL_STRERROR.
11520
11521 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
11522
11523         * linux-low.c (linux_wait, linux_send_signal): Don't test
11524         an unsigned long variable for > 0 if it could be MAX_ULONG.
11525         * server.c (myresume): Likewise.
11526         * target.c (set_desired_inferior): Likewise.
11527
11528 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
11529
11530         * configure.ac: Simplify and improve check for socklen_t.
11531         * configure, config.in: Regenerate.
11532
11533 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
11534
11535         * acconfig.h: Remove.
11536         * configure.ac: Add a test for socklen_t.  Use three-argument
11537         AC_DEFINE throughout.
11538         * config.in: Regenerated using autoheader 2.59.
11539         * configure: Regenerated.
11540
11541         * gdbreplay.c (socklen_t): Provide a default.
11542         (remote_open): Use socklen_t.
11543         * remote-utils.c (socklen_t): Provide a default.
11544         (remote_open): Use socklen_t.
11545         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11546         unsigned char.
11547
11548         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11549         char for buffers.
11550         * linux-low.c (linux_read_memory, linux_write_memory)
11551         (linux_read_auxv): Likewise.
11552         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11553         (check_mem_write): Likewise.
11554         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11555         Likewise.
11556         * regcache.c (struct inferior_rgcache_data, registers_to_string)
11557         (registers_from_string, register_data): Likewise.
11558         * server.c (handle_query, main): Likewise.
11559         * server.h (convert_ascii_to_int, convert_int_to_ascii)
11560         (decode_M_packet): Likewise.
11561         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11562         * target.h (struct target_ops): Update read_memory, write_memory,
11563         and read_auxv.
11564         (read_inferior_memory, write_inferior_memory): Update.
11565         * linux-low.h (struct linux_target_ops): Change type of breakpoint
11566         to unsigned char *.
11567         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11568         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11569         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11570         linux-s390-low.c, linux-sh-low.c: Update for changes in
11571         read_inferior_memory and the_low_target->breakpoint.
11572
11573 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
11574
11575         * Makefile.in (SFILES): Add linux-ppc64-low.c.
11576         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11577         * configure.srv: Add powerpc64-*-linux*.
11578         * linux-ppc64-low.c: New file.
11579
11580 2005-05-23  Orjan Friberg  <orjanf@axis.com>
11581
11582         * linux-cris-low.c: New file with support for CRIS.
11583         * linux-crisv32-low.c: Ditto for CRISv32.
11584         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11585         (clean): Add reg-cris.c and reg-crisv32.c.
11586         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11587         reg-crisv32.o, and reg-crisv32.c to make rules.
11588         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11589         recognized targets.
11590
11591 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
11592
11593         * linux-low.c (fetch_register): Ensure buffer size is a multiple
11594         of sizeof (PTRACE_XFER_TYPE).
11595         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
11596
11597 2005-05-12  Orjan Friberg  <orjanf@axis.com>
11598
11599         * target.h (struct target_ops): Add insert_watchpoint,
11600         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11601         pointers for hardware watchpoint support.
11602         * linux-low.h (struct linux_target_ops): Ditto.
11603         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11604         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
11605         to linux_target_ops.
11606         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11607         reply packet.
11608         * server.c (main): Recognize 'Z' and 'z' packets.
11609
11610 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
11611
11612         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11613         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11614         (the_low_target): Add new members.
11615
11616 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
11617
11618         * proc-service.c (ps_lgetregs): Search all_processes instead of
11619         all_threads.
11620
11621 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
11622
11623         * server.c (start_inferior): Change return type to int.
11624         (attach_inferior): Change sigptr to int *.
11625         (handle_v_cont, handle_v_requests): Change signal to int *.
11626         (main): Change signal to int.
11627
11628 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
11629
11630         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11631         * configure.srv: Add m32r*-*-linux*.
11632         * linux-m32r-low.c: New file.
11633
11634 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
11635
11636         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11637
11638 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
11639
11640         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11641         Take unsigned long arguments for PIDs.
11642         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11643         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11644         (wait_for_sigstop, linux_resume_one_process)
11645         (regsets_fetch_inferior_registers, linux_send_signal)
11646         (linux_read_auxv): Likewise.  Update the types of variables holding
11647         PIDs.  Update format string specifiers.
11648         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11649         * remote-utils.c (prepare_resume_reply): Likewise.
11650         * server.c (cont_thread, general_thread, step_thread)
11651         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11652         unsigned long.
11653         (handle_query): Update format specifiers.
11654         (handle_v_cont, main): Use strtoul for thread IDs.
11655         * server.h (struct inferior_list_entry): Use unsigned long for ID.
11656         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11657         (general_thread, step_thread, thread_from_wait)
11658         (old_thread_from_wait): Update.
11659         * target.h (struct thread_resume): Use unsigned long for THREAD.
11660         (struct target_ops): Use unsigned long for arguments to attach and
11661         thread_alive.
11662
11663 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
11664
11665         * acinclude.m4: Include bfd/bfd.m4 directly.
11666         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
11667         <agriffis@toolchain.org>.
11668         * aclocal.m4, configure: Regenerated.
11669
11670 2005-01-07  Andrew Cagney  <cagney@gnu.org>
11671
11672         * configure.ac: Rename configure.in, require autoconf 2.59.
11673         * configure: Re-generate.
11674
11675 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
11676
11677         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
11678         LIBS when finished.
11679         * aclocal.m4: Regenerated.
11680         * configure: Regenerated.
11681
11682 2004-11-21  Andreas Schwab  <schwab@suse.de>
11683
11684         * linux-m68k-low.c (m68k_num_gregs): Define.
11685         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11686         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11687         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11688         (m68k_breakpoint_at): New.  Add to the_low_target.
11689
11690         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11691         srv_linux_thread_db to yes.
11692
11693 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
11694
11695         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11696         (ARCH_SET_FS): Likewise.
11697         (ARCH_GET_FS): Likewise.
11698         (ARCH_GET_GS): Likewise.
11699
11700 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
11701
11702         * linux-i386-low.c (ps_get_thread_area): New.
11703         * linux-x86-64-low.c (ps_get_thread_area): New.
11704         * linux-low.c: Include <sys/syscall.h>.
11705         (linux_kill_one_process): Don't kill the first thread here.
11706         (linux_kill): Kill the first thread here.
11707         (kill_lwp): New function.
11708         (send_sigstop, linux_send_signal): Use it.
11709         * proc-service.c: Clean up #ifdefs.
11710         (fpregset_info): Delete.
11711         (ps_lgetregs): Update and enable implementation.
11712         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11713         implementations.
11714         * remote-utils.c (struct sym_cache, symbol_cache): New.
11715         (input_interrupt): Print a clearer message.
11716         (async_io_enabled): New variable.
11717         (enable_async_io, disable_async_io): Use it.  Update comments.
11718         (look_up_one_symbol): Use the symbol cache.
11719         * thread-db.c (thread_db_look_up_symbols): New function.
11720         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
11721
11722 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
11723
11724         * configure.in: Test for -rdynamic.
11725         * configure: Regenerated.
11726         * Makefile (INTERNAL_LDFLAGS): New.
11727         (gdbserver, gdbreplay): Use it.
11728
11729 2004-09-02  Andrew Cagney  <cagney@gnu.org>
11730
11731         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11732
11733 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
11734
11735         * linux-low.c (linux_wait): Clear all_processes list also.
11736
11737 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
11738
11739         * linux-low.c: Include <errno.h>.  Remove extern declaration of
11740         errno.
11741
11742 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
11743
11744         * gdbreplay.c, server.h, utils.c: Update copyright years.
11745
11746 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
11747
11748         * server.c (main): Print child status or termination signal from
11749         variable 'signal', not 'sig'.
11750
11751 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
11752
11753         * linux-low.c (linux_read_memory): Change return type to
11754         int.  Check for and return error from ptrace().
11755         * target.c (read_inferior_memory): Change return type to int.  Pass
11756         back return status from the_target->read_memory().
11757         * target.h (struct target_ops): Adapt *read_memory() prototype.
11758         Update comment.
11759         (read_inferior_memory): Adapt prototype.
11760         * server.c (main): Return an error packet if
11761         read_inferior_memory() returns an error.
11762
11763 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
11764
11765         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11766         Unify with other clean targets.
11767
11768 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
11769
11770         * server.c (handle_v_cont): Call set_desired_inferior.
11771
11772 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
11773
11774         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11775
11776 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
11777
11778         * linux-low.c (linux_wait): Unblock async I/O.
11779         (linux_resume): Block and enable async I/O.
11780         * remote-utils.c (block_async_io, unblock_async_io): New functions.
11781         * server.h (block_async_io, unblock_async_io): Add prototypes.
11782
11783 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
11784
11785         * remote-utils.c (remote_open): Print a status notice after
11786         opening a TCP port.
11787         * server.c (attach_inferior): Print a status notice after
11788         attaching.
11789
11790 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
11791
11792         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11793
11794 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
11795
11796         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11797         error packet.
11798         * server.c, target.h: Update copyright years.
11799
11800 2004-02-25  Roland McGrath  <roland@redhat.com>
11801
11802         * target.h (struct target_ops): New member `read_auxv'.
11803         * server.c (handle_query): Handle qPart:auxv:read: query using that.
11804         * linux-low.c (linux_read_auxv): New function.
11805         (linux_target_ops): Initialize `read_auxv' member to that.
11806
11807 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11808
11809         Committed by Jim Blandy  <jimb@redhat.com>.
11810
11811         * linux-s390-low.c (s390_num_regs): Update.
11812         (s390_regmap): Remove control registers.  Use __s390x__ predefine
11813         instead of GPR_SIZE to distiguish s390 and s390x targets.
11814
11815 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
11816
11817         * linux-low.c: Update copyright year.
11818         (check_removed_breakpoint): Clear pending_is_breakpoint.
11819         (linux_set_resume_request, linux_queue_one_thread)
11820         (resume_status_pending_p): New functions.
11821         (linux_continue_one_thread): Use process->resume.
11822         (linux_resume): Only resume threads if there are no pending events.
11823         * linux-low.h (struct process_info): Add resume request
11824         pointer.
11825
11826 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
11827
11828         * regcache.c (new_register_cache): Clear the allocated register
11829         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11830
11831 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
11832
11833         * linux-low.c (linux_resume): Take a struct thread_resume *
11834         argument.
11835         (linux_wait): Update call.
11836         (resume_ptr): New static variable.
11837         (linux_continue_one_thread): Renamed from
11838         linux_continue_one_process.  Use resume_ptr.
11839         (linux_resume): Use linux_continue_one_thread.
11840         * server.c (handle_v_cont, handle_v_requests): New functions.
11841         (myresume): New function.
11842         (main): Handle 'v' case.
11843         * target.h (struct thread_resume): New type.
11844         (struct target_ops): Change argument of "resume" to struct
11845         thread_resume *.
11846         (myresume): Delete macro.
11847
11848 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
11849
11850         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11851         (uninstall): Support DESTDIR.
11852
11853 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
11854
11855         * configure.srv: Add xscale*linux copy of arm*linux entry.
11856
11857 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
11858
11859         * linux-arm-low.c (arm_reinsert_addr): New function.
11860         (the_low_target): Add arm_reinsert_addr.
11861
11862 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
11863
11864         * mem-break.c: Remove whitespace at end of file.
11865
11866 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
11867
11868         * configure.in: Check whether we need to prototype strerror.
11869         * server.h: Optionally prototype strerror.
11870         * gdbreplay.c (perror_with_name): Use strerror.
11871         * linux-low.c (linux_attach_lwp): Use strerror.
11872         * utils.c (perror_with_name): Use strerror.
11873         * config.in, configure: Regenerated.
11874
11875 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
11876
11877         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11878         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11879
11880 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
11881
11882         * Makefile.in (SFILES): Update.
11883         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11884         low-sun3.c: Remove files.
11885
11886 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
11887
11888         * linux-low.c: Move comment to linux_thread_alive where it belonged.
11889         (linux_detach_one_process, linux_detach): New functions.
11890         (linux_target_ops): Add linux_detach.
11891         * server.c (main): Handle 'D' packet.
11892         * target.h (struct target_ops): Add "detach" member.
11893         (detach_inferior): Define.
11894
11895 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
11896
11897         From Kelley Cook  <kelleycook@wideopenwest.com>:
11898         * configure.srv: Accept i[34567]86 variants.
11899
11900 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
11901
11902         * linux-low.c (linux_wait_for_event): Correct comment typos.
11903         (linux_resume_one_process): Call check_removed_breakpoint.
11904         (linux_send_signal): New function.
11905         (linux_target_ops): Add linux_send_signal.
11906         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11907         of kill.
11908         * target.h (struct target_ops): Add send_signal.
11909
11910 2003-05-29  Jim Blandy  <jimb@redhat.com>
11911
11912         * linux-low.c (usr_store_inferior_registers): Transfer buf in
11913         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
11914         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11915         away part of the register's value.
11916
11917 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
11918
11919         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11920         (linux_wait_for_event, linux_init_signals): Likewise.
11921
11922 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
11923
11924         * configure.in: Check for stdlib.h.
11925         * configure: Regenerated.
11926         * config.in: Regenerated.
11927
11928 2003-01-04  Andreas Schwab  <schwab@suse.de>
11929
11930         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11931
11932 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
11933
11934         * Makefile.in: Remove obsolete code.
11935
11936 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
11937
11938         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11939         defined(PT_FPR0_HI).
11940
11941 2002-11-17  Stuart Hughes  <seh@zee2.com>
11942
11943         * linux-arm-low.c (arm_num_regs): Increase.
11944         (arm_regmap): Include status register.
11945
11946 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
11947
11948         * linux-low.c (register_addr): Remove incorrect -1 check.
11949
11950 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
11951
11952         * linux-low.c (linux_create_inferior): Call setpgid.  Return
11953         the new PID.
11954         (unstopped_p, linux_signal_pid): Remove.
11955         (linux_target_ops): Remove linux_signal_pid.
11956         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11957         global instead of target method.
11958         * target.h (struct target_ops): Remove signal_pid.  Update comment
11959         for create_inferior.
11960         * server.c (signal_pid): New variable.
11961         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
11962         gdbserver.  Set the child to be the foreground process group.
11963         (attach_inferior): Set signal_pid.
11964
11965 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
11966
11967         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11968
11969 2002-08-20  Jim Blandy  <jimb@redhat.com>
11970
11971         * Makefile.in (LDFLAGS): Allow the configure script to establish a
11972         default for this.
11973
11974 2002-08-01  Andrew Cagney  <cagney@redhat.com>
11975
11976         * Makefile.in: Make chill references obsolete.
11977
11978 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
11979
11980         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11981         * configure: Regenerate.
11982         * config.in: Regenerate.
11983
11984 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
11985
11986         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11987         (perror_with_name, remote_close, remote_open, expect, play): Static.
11988
11989 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
11990
11991         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11992         byte offsets instead of an array of indexes.
11993         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11994
11995 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
11996
11997         * regcache.c: Add comment.
11998
11999 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
12000
12001         * thread-db.c: New file.
12002         * proc-service.c: New file.
12003         * acinclude.m4: New file.
12004         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12005         proc-service.o, and thread-db.o.
12006         (linux-low.o): Add USE_THREAD_DB.
12007         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12008         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12009         * aclocal.m4: Regenerated.
12010         * config.in: Regenerated.
12011         * configure: Regenerated.
12012         * configure.in: Check for proc_service.h, sys/procfs.h,
12013         thread_db.h, and linux/elf.h headrs.
12014         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12015         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
12016         Check for -lthread_db and thread support.
12017         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12018         PowerPC, and SuperH.
12019         * i387-fp.c: Constify arguments.
12020         * i387-fp.h: Likewise.
12021         * inferiors.c: (struct thread_info): Renamed from
12022         `struct inferior_info'.  Remove PID member.  Use generic inferior
12023         list header.  All uses updated.
12024         (inferiors, signal_pid): Removed.
12025         (all_threads): New variable.
12026         (get_thread): Define.
12027         (add_inferior_to_list): New function.
12028         (for_each_inferior): New function.
12029         (change_inferior_id): New function.
12030         (add_inferior): Removed.
12031         (remove_inferior): New function.
12032         (add_thread): New function.
12033         (free_one_thread): New function.
12034         (remove_thread): New function.
12035         (clear_inferiors): Use for_each_inferior and free_one_thread.
12036         (find_inferior): New function.
12037         (find_inferior_id): New function.
12038         (inferior_target_data): Update argument type.
12039         (set_inferior_target_data): Likewise.
12040         (inferior_regcache_data): Likewise.
12041         (set_inferior_regcache_data): Likewise.
12042         * linux-low.c (linux_bp_reinsert): Remove.
12043         (all_processes, stopping_threads, using_thrads)
12044         (struct pending_signals, debug_threads, pid_of): New.
12045         (inferior_pid): Replace with macro.
12046         (struct inferior_linux_data): Remove.
12047         (get_stop_pc, add_process): New functions.
12048         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12049         Use add_process and add_thread.
12050         (linux_attach_lwp): New function, based on old linux_attach.  Use
12051         add_process and add_thread.  Set stop_expected for new threads.
12052         (linux_attach): New function.
12053         (linux_kill_one_process): New function.
12054         (linux_kill): Kill all LWPs.
12055         (linux_thread_alive): Use find_inferior_id.
12056         (check_removed_breakpoints, status_pending_p): New functions.
12057         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12058         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
12059         struct for the found process.
12060         (linux_wait_for_event): New function.
12061         (linux_wait): Use it.  Support LWPs.
12062         (send_sigstop, wait_for_sigstop, stop_all_processes)
12063         (linux_resume_one_process, linux_continue_one_process): New functions.
12064         (linux_resume): Support LWPs.
12065         (REGISTER_RAW_SIZE): Remove.
12066         (fetch_register): Use register_size instead.  Call supply_register.
12067         (usr_store_inferior_registers): Likewise.  Call collect_register.
12068         Fix recursive case.
12069         (regsets_fetch_inferior_registers): Improve error message.
12070         (regsets_store_inferior_registers): Add debugging.
12071         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12072         (unstopped_p, linux_signal_pid): New functions.
12073         (linux_target_ops): Add linux_signal_pid.
12074         (linux_init_signals): New function.
12075         (initialize_low): Call it.  Initialize using_threads.
12076         * regcache.c (inferior_regcache_data): Add valid
12077         flag.
12078         (get_regcache): Fetch registers lazily.  Add fetch argument
12079         and update all callers.
12080         (regcache_invalidate_one, regcache_invalidate): New
12081         functions.
12082         (new_register_cache): Renamed from create_register_cache.
12083         Return the new regcache.
12084         (free_register_cache): Change argument to a void *.
12085         (registers_to_string, registers_from_string): Call get_regcache
12086         with fetch flag set.
12087         (register_data): Make static.  Pass fetch flag to get_regcache.
12088         (supply_register): Call get_regcache with fetch flag clear.
12089         (collect_register): Call get_regcache with fetch flag set.
12090         (collect_register_as_string): New function.
12091         * regcache.h: Update.
12092         * remote-utils.c (putpkt): Flush after debug output and use
12093         stderr.
12094         Handle input interrupts while waiting for an ACK.
12095         (input_interrupt): Use signal_pid method.
12096         (getpkt): Flush after debug output and use stderr.
12097         (outreg): Use collect_register_as_string.
12098         (new_thread_notify, dead_thread_notify): New functions.
12099         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
12100         and general_thread.
12101         (look_up_one_symbol): Flush after debug output.
12102         * server.c (step_thread, server_waiting): New variables.
12103         (start_inferior): Don't use signal_pid.  Update call to mywait.
12104         (attach_inferior): Update call to mywait.
12105         (handle_query): Handle qfThreadInfo and qsThreadInfo.
12106         (main): Don't fetch/store registers explicitly.  Use
12107         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
12108         calls to mywait.
12109         * server.h: Update.
12110         (struct inferior_list, struct_inferior_list_entry): New.
12111         * target.c (set_desired_inferior): New.
12112         (write_inferior_memory): Constify.
12113         (mywait): New function.
12114         * target.h: Update.
12115         (struct target_ops): New signal_pid method.
12116         (mywait): Removed macro, added prototype.
12117
12118         * linux-low.h (regset_func): Removed.
12119         (regset_fill_func, regset_store_func): New.
12120         (enum regset_type): New.
12121         (struct regset_info): Add type field.  Use new operation types.
12122         (struct linux_target_ops): stop_pc renamed to get_pc.
12123         Add decr_pc_after_break and breakpoint_at.
12124         (get_process, get_thread_proess, get_process_thread)
12125         (strut process_info, all_processes, linux_attach_lwp)
12126         (thread_db_init): New.
12127
12128         * linux-arm-low.c (arm_get_pc, arm_set_pc,
12129         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12130         (the_low_target): Add new members.
12131         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12132         (i386_store_fpxregset): Constify.
12133         (target_regsets): Add new kind identifier.
12134         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
12135         (i386_set_pc): Add debugging.
12136         (i386_breakpoint_at): New function.
12137         (the_low_target): Add new members.
12138         * linux-mips-low.c (mips_get_pc, mips_set_pc)
12139         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12140         (mips_breakpoint_at): New.
12141         (the_low_target): Add new members.
12142         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12143         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12144         (the_low_target): Add new members.
12145         * linux-sh-low.c (sh_get_pc, sh_set_pc)
12146         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12147         (the_low_target): Add new members.
12148         * linux-x86-64-low.c (target_regsets): Add new kind
12149         identifier.
12150
12151 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
12152
12153         From Martin Pool <mbp@samba.org>:
12154         * server.c (gdbserver_usage): New function.
12155         (main): Call it.
12156
12157 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
12158
12159         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12160         stop_at -> stop_pc.
12161
12162 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
12163
12164         * Makefile.in: Remove obsolete code.
12165
12166 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
12167
12168         * linux-low.c (regsets_fetch_inferior_registers),
12169         (regsets_store_inferior_registers): Removed cast to int from
12170         ptrace() calls.
12171         * regcache.h: Added declaration of struct inferior_info.
12172
12173 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
12174
12175         * inferiors.c (struct inferior_info): Add regcache_data.
12176         (add_inferior): Call create_register_cache.
12177         (clear_inferiors): Call free_register_cache.
12178         (inferior_regcache_data, set_inferior_regcache_data): New functions.
12179         * regcache.c (struct inferior_regcache_data): New.
12180         (registers): Remove.
12181         (get_regcache): New function.
12182         (create_register_cache, free_register_cache): New functions.
12183         (set_register_cache): Don't initialize the register cache here.
12184         (registers_to_string, registers_from_string, register_data): Call
12185         get_regcache.
12186         * regcache.h: Add prototypes.
12187         * server.h: Likewise.
12188
12189 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
12190
12191         * mem-break.c: New file.
12192         * mem-break.h: New file.
12193         * Makefile.in: Add mem-break.o rule; update server.h
12194         dependencies.
12195         * inferiors.c (struct inferior_info): Add target_data
12196         member.
12197         (clear_inferiors): Free target_data member if set.
12198         (inferior_target_data, set_inferior_target_data): New functions.
12199         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12200         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
12201         * linux-low.c (linux_bp_reinsert): New variable.
12202         (struct inferior_linux_data): New.
12203         (linux_create_inferior): Use set_inferior_target_data.
12204         (linux_attach): Likewise.  Call add_inferior.
12205         (linux_wait_for_one_inferior): New function.
12206         (linux_wait): Call it.
12207         (linux_write_memory): Add const.
12208         (initialize_low): Call set_breakpoint_data.
12209         * linux-low.h (struct linux_target_ops): Add breakpoint
12210         handling members.
12211         * server.c (attach_inferior): Remove extra add_inferior
12212         call.
12213         * server.h: Include mem-break.h.  Update inferior.c
12214         prototypes.
12215         * target.c (read_inferior_memory)
12216         (write_inferior_memory): New functions.
12217         * target.h (read_inferior_memory)
12218         (write_inferior_memory): Change macros to prototypes.
12219         (struct target_ops): Update comments.  Add const to write_memory
12220         definition.
12221
12222 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
12223
12224         * linux-low.c (usr_store_inferior_registers): Support
12225         registers which are allowed to fail to store.
12226         * linux-low.h (linux_target_ops): Likewise.
12227         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12228         (ppc_cannot_store_register): FPSCR may not be storable.
12229
12230 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12231
12232         * server.h: Include <string.h> if HAVE_STRING_H.
12233         * ChangeLog: Correct paths in last ChangeLog entry.
12234
12235 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12236
12237         * linux-low.h: Remove obsolete prototypes.
12238         (struct linux_target_ops): New.
12239         (extern the_low_target): New.
12240         * linux-low.c (num_regs, regmap): Remove declarations.
12241         (register_addr): Use the_low_target explicitly.
12242         (fetch_register): Likewise.
12243         (usr_fetch_inferior_registers): Likewise.
12244         (usr_store_inferior_registers): Likewise.
12245         * linux-arm-low.c (num_regs): Remove.
12246         (arm_num_regs): Define.
12247         (arm_regmap): Renamed from regmap, made static.
12248         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12249         made static.
12250         (arm_cannot_store_register): Renamed from cannot_store_register,
12251         made static.
12252         (the_low_target): New.
12253         * linux-i386-low.c (num_regs): Remove.
12254         (i386_num_regs): Define.
12255         (i386_regmap): Renamed from regmap, made static.
12256         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12257         made static.
12258         (i386_cannot_store_register): Renamed from cannot_store_register,
12259         made static.
12260         (the_low_target): New.
12261         * linux-ia64-low.c (num_regs): Remove.
12262         (ia64_num_regs): Define.
12263         (ia64_regmap): Renamed from regmap, made static.
12264         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12265         made static.
12266         (ia64_cannot_store_register): Renamed from cannot_store_register,
12267         made static.
12268         (the_low_target): New.
12269         * linux-m68k-low.c (num_regs): Remove.
12270         (m68k_num_regs): Define.
12271         (m68k_regmap): Renamed from regmap, made static.
12272         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12273         made static.
12274         (m68k_cannot_store_register): Renamed from cannot_store_register,
12275         made static.
12276         (the_low_target): New.
12277         * linux-mips-low.c (num_regs): Remove.
12278         (mips_num_regs): Define.
12279         (mips_regmap): Renamed from regmap, made static.
12280         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12281         made static.
12282         (mips_cannot_store_register): Renamed from cannot_store_register,
12283         made static.
12284         (the_low_target): New.
12285         * linux-ppc-low.c (num_regs): Remove.
12286         (ppc_num_regs): Define.
12287         (ppc_regmap): Renamed from regmap, made static.
12288         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12289         made static.
12290         (ppc_cannot_store_register): Renamed from cannot_store_register,
12291         made static.
12292         (the_low_target): New.
12293         * linux-s390-low.c (num_regs): Remove.
12294         (s390_num_regs): Define.
12295         (s390_regmap): Renamed from regmap, made static.
12296         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12297         made static.
12298         (s390_cannot_store_register): Renamed from cannot_store_register,
12299         made static.
12300         (the_low_target): New.
12301         * linux-sh-low.c (num_regs): Remove.
12302         (sh_num_regs): Define.
12303         (sh_regmap): Renamed from regmap, made static.
12304         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12305         made static.
12306         (sh_cannot_store_register): Renamed from cannot_store_register,
12307         made static.
12308         (the_low_target): New.
12309         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12310         (the_low_target): New.
12311
12312 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12313
12314         * Makefile.in: Add stamp-h target.
12315         * configure.in: Create stamp-h.
12316         * configure: Regenerated.
12317
12318 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12319
12320         * inferiors.c: New file.
12321         * target.c: New file.
12322         * target.h: New file.
12323         * Makefile.in:  Add target.o and inferiors.o.  Update
12324         dependencies.
12325         * linux-low.c (inferior_pid): New static variable,
12326         moved from server.c.
12327         (linux_create_inferior): Renamed from create_inferior.
12328         Call add_inferior.  Return 0 on success instead of a PID.
12329         (linux_attach): Renamed from myattach.
12330         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
12331         (linux_thread_alive): Renamed from mythread_alive.
12332         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
12333         child dies.
12334         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
12335         (regsets_store_inferior_registers): Correct error message.
12336         Add missing ``return 0''.
12337         (linux_fetch_registers): Renamed from fetch_inferior_registers.
12338         (linux_store_registers): Renamed from store_inferior_registers.
12339         (linux_read_memory): Renamed from read_inferior_memory.
12340         (linux_write_memory): Renamed from write_inferior_memory.
12341         (linux_target_ops): New structure.
12342         (initialize_low): Call set_target_ops ().
12343         * remote-utils.c (unhexify): New function.
12344         (hexify): New function.
12345         (input_interrupt): Send signals to ``signal_pid''.
12346         * server.c (inferior_pid): Remove.
12347         (start_inferior): Update create_inferior call.
12348         (attach_inferior): Call add_inferior.
12349         (handle_query): New function.
12350         (main): Call handle_query for `q' packets.
12351         * server.h: Include "target.h".  Remove obsolete prototypes.
12352         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12353
12354 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12355
12356         * Makefile.in: Add WARN_CFLAGS.  Update configury
12357         dependencies.
12358         * configure.in: Check for <string.h>
12359         * configure: Regenerate.
12360         * config.in: Regenerate.
12361         * gdbreplay.c: Include needed system headers.
12362         (remote_open): Remove strchr prototype.
12363         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12364         * regcache.c (supply_register): Change buf argument to const void *.
12365         (supply_register_by_name): Likewise.
12366         (collect_register): Change buf argument to void *.
12367         (collect_register_by_name): Likewise.
12368         * regcache.h: Add missing prototypes.
12369         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12370         * server.c (handle_query): New function.
12371         (attached): New static variable, moved out of main.
12372         (main): Quiet longjmp clobber warnings.
12373         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
12374         * utils.c (error): Remove NORETURN.
12375         (fatal): Likewise.